openapi.json 594 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662
  1. {
  2. "openapi": "3.1.0",
  3. "info": {
  4. "title": "opencode",
  5. "version": "1.0.0",
  6. "description": "opencode api"
  7. },
  8. "paths": {
  9. "/auth/{providerID}": {
  10. "put": {
  11. "tags": ["control"],
  12. "operationId": "auth.set",
  13. "parameters": [
  14. {
  15. "name": "providerID",
  16. "in": "path",
  17. "schema": {
  18. "type": "string"
  19. },
  20. "required": true
  21. }
  22. ],
  23. "responses": {
  24. "200": {
  25. "description": "Successfully set authentication credentials",
  26. "content": {
  27. "application/json": {
  28. "schema": {
  29. "type": "boolean",
  30. "description": "Successfully set authentication credentials"
  31. }
  32. }
  33. }
  34. },
  35. "400": {
  36. "description": "BadRequest | InvalidRequestError",
  37. "content": {
  38. "application/json": {
  39. "schema": {
  40. "anyOf": [
  41. {
  42. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  43. },
  44. {
  45. "$ref": "#/components/schemas/InvalidRequestError"
  46. }
  47. ]
  48. }
  49. }
  50. }
  51. }
  52. },
  53. "description": "Set authentication credentials",
  54. "summary": "Set auth credentials",
  55. "requestBody": {
  56. "content": {
  57. "application/json": {
  58. "schema": {
  59. "$ref": "#/components/schemas/Auth"
  60. }
  61. }
  62. }
  63. },
  64. "x-codeSamples": [
  65. {
  66. "lang": "js",
  67. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  68. }
  69. ]
  70. },
  71. "delete": {
  72. "tags": ["control"],
  73. "operationId": "auth.remove",
  74. "parameters": [
  75. {
  76. "name": "providerID",
  77. "in": "path",
  78. "schema": {
  79. "type": "string"
  80. },
  81. "required": true
  82. }
  83. ],
  84. "responses": {
  85. "200": {
  86. "description": "Successfully removed authentication credentials",
  87. "content": {
  88. "application/json": {
  89. "schema": {
  90. "type": "boolean",
  91. "description": "Successfully removed authentication credentials"
  92. }
  93. }
  94. }
  95. },
  96. "400": {
  97. "description": "BadRequest | InvalidRequestError",
  98. "content": {
  99. "application/json": {
  100. "schema": {
  101. "anyOf": [
  102. {
  103. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  104. },
  105. {
  106. "$ref": "#/components/schemas/InvalidRequestError"
  107. }
  108. ]
  109. }
  110. }
  111. }
  112. }
  113. },
  114. "description": "Remove authentication credentials",
  115. "summary": "Remove auth credentials",
  116. "x-codeSamples": [
  117. {
  118. "lang": "js",
  119. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  120. }
  121. ]
  122. }
  123. },
  124. "/log": {
  125. "post": {
  126. "tags": ["control"],
  127. "operationId": "app.log",
  128. "parameters": [
  129. {
  130. "name": "directory",
  131. "in": "query",
  132. "schema": {
  133. "type": "string"
  134. },
  135. "required": false
  136. },
  137. {
  138. "name": "workspace",
  139. "in": "query",
  140. "schema": {
  141. "type": "string"
  142. },
  143. "required": false
  144. }
  145. ],
  146. "responses": {
  147. "200": {
  148. "description": "Log entry written successfully",
  149. "content": {
  150. "application/json": {
  151. "schema": {
  152. "type": "boolean",
  153. "description": "Log entry written successfully"
  154. }
  155. }
  156. }
  157. },
  158. "400": {
  159. "description": "BadRequest | InvalidRequestError",
  160. "content": {
  161. "application/json": {
  162. "schema": {
  163. "anyOf": [
  164. {
  165. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  166. },
  167. {
  168. "$ref": "#/components/schemas/InvalidRequestError"
  169. }
  170. ]
  171. }
  172. }
  173. }
  174. }
  175. },
  176. "description": "Write a log entry to the server logs with specified level and metadata.",
  177. "summary": "Write log",
  178. "requestBody": {
  179. "content": {
  180. "application/json": {
  181. "schema": {
  182. "type": "object",
  183. "properties": {
  184. "service": {
  185. "type": "string",
  186. "description": "Service name for the log entry"
  187. },
  188. "level": {
  189. "type": "string",
  190. "enum": ["debug", "info", "error", "warn"],
  191. "description": "Log level"
  192. },
  193. "message": {
  194. "type": "string",
  195. "description": "Log message"
  196. },
  197. "extra": {
  198. "type": "object"
  199. }
  200. },
  201. "required": ["service", "level", "message"],
  202. "additionalProperties": false
  203. }
  204. }
  205. }
  206. },
  207. "x-codeSamples": [
  208. {
  209. "lang": "js",
  210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  211. }
  212. ]
  213. }
  214. },
  215. "/global/health": {
  216. "get": {
  217. "tags": ["global"],
  218. "operationId": "global.health",
  219. "parameters": [],
  220. "responses": {
  221. "200": {
  222. "description": "Health information",
  223. "content": {
  224. "application/json": {
  225. "schema": {
  226. "type": "object",
  227. "properties": {
  228. "healthy": {
  229. "type": "boolean",
  230. "enum": [true]
  231. },
  232. "version": {
  233. "type": "string"
  234. }
  235. },
  236. "required": ["healthy", "version"],
  237. "additionalProperties": false,
  238. "description": "Health information"
  239. }
  240. }
  241. }
  242. },
  243. "400": {
  244. "description": "Bad request",
  245. "content": {
  246. "application/json": {
  247. "schema": {
  248. "$ref": "#/components/schemas/BadRequestError"
  249. }
  250. }
  251. }
  252. }
  253. },
  254. "description": "Get health information about the OpenCode server.",
  255. "summary": "Get health",
  256. "x-codeSamples": [
  257. {
  258. "lang": "js",
  259. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  260. }
  261. ]
  262. }
  263. },
  264. "/global/event": {
  265. "get": {
  266. "tags": ["global"],
  267. "operationId": "global.event",
  268. "parameters": [],
  269. "responses": {
  270. "200": {
  271. "description": "Event stream",
  272. "content": {
  273. "text/event-stream": {
  274. "schema": {
  275. "$ref": "#/components/schemas/GlobalEvent"
  276. }
  277. }
  278. }
  279. },
  280. "400": {
  281. "description": "Bad request",
  282. "content": {
  283. "application/json": {
  284. "schema": {
  285. "$ref": "#/components/schemas/BadRequestError"
  286. }
  287. }
  288. }
  289. }
  290. },
  291. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  292. "summary": "Get global events",
  293. "x-codeSamples": [
  294. {
  295. "lang": "js",
  296. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  297. }
  298. ]
  299. }
  300. },
  301. "/global/config": {
  302. "get": {
  303. "tags": ["global"],
  304. "operationId": "global.config.get",
  305. "parameters": [],
  306. "responses": {
  307. "200": {
  308. "description": "Get global config info",
  309. "content": {
  310. "application/json": {
  311. "schema": {
  312. "$ref": "#/components/schemas/Config"
  313. }
  314. }
  315. }
  316. },
  317. "400": {
  318. "description": "Bad request",
  319. "content": {
  320. "application/json": {
  321. "schema": {
  322. "$ref": "#/components/schemas/BadRequestError"
  323. }
  324. }
  325. }
  326. }
  327. },
  328. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  329. "summary": "Get global configuration",
  330. "x-codeSamples": [
  331. {
  332. "lang": "js",
  333. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  334. }
  335. ]
  336. },
  337. "patch": {
  338. "tags": ["global"],
  339. "operationId": "global.config.update",
  340. "parameters": [],
  341. "responses": {
  342. "200": {
  343. "description": "Successfully updated global config",
  344. "content": {
  345. "application/json": {
  346. "schema": {
  347. "$ref": "#/components/schemas/Config"
  348. }
  349. }
  350. }
  351. },
  352. "400": {
  353. "description": "BadRequest | InvalidRequestError",
  354. "content": {
  355. "application/json": {
  356. "schema": {
  357. "anyOf": [
  358. {
  359. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  360. },
  361. {
  362. "$ref": "#/components/schemas/InvalidRequestError"
  363. }
  364. ]
  365. }
  366. }
  367. }
  368. }
  369. },
  370. "description": "Update global OpenCode configuration settings and preferences.",
  371. "summary": "Update global configuration",
  372. "requestBody": {
  373. "content": {
  374. "application/json": {
  375. "schema": {
  376. "$ref": "#/components/schemas/Config"
  377. }
  378. }
  379. }
  380. },
  381. "x-codeSamples": [
  382. {
  383. "lang": "js",
  384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  385. }
  386. ]
  387. }
  388. },
  389. "/global/dispose": {
  390. "post": {
  391. "tags": ["global"],
  392. "operationId": "global.dispose",
  393. "parameters": [],
  394. "responses": {
  395. "200": {
  396. "description": "Global disposed",
  397. "content": {
  398. "application/json": {
  399. "schema": {
  400. "type": "boolean",
  401. "description": "Global disposed"
  402. }
  403. }
  404. }
  405. },
  406. "400": {
  407. "description": "Bad request",
  408. "content": {
  409. "application/json": {
  410. "schema": {
  411. "$ref": "#/components/schemas/BadRequestError"
  412. }
  413. }
  414. }
  415. }
  416. },
  417. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  418. "summary": "Dispose instance",
  419. "x-codeSamples": [
  420. {
  421. "lang": "js",
  422. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  423. }
  424. ]
  425. }
  426. },
  427. "/global/upgrade": {
  428. "post": {
  429. "tags": ["global"],
  430. "operationId": "global.upgrade",
  431. "parameters": [],
  432. "responses": {
  433. "200": {
  434. "description": "Upgrade result",
  435. "content": {
  436. "application/json": {
  437. "schema": {
  438. "anyOf": [
  439. {
  440. "type": "object",
  441. "properties": {
  442. "success": {
  443. "type": "boolean",
  444. "enum": [true]
  445. },
  446. "version": {
  447. "type": "string"
  448. }
  449. },
  450. "required": ["success", "version"],
  451. "additionalProperties": false
  452. },
  453. {
  454. "type": "object",
  455. "properties": {
  456. "success": {
  457. "type": "boolean",
  458. "enum": [false]
  459. },
  460. "error": {
  461. "type": "string"
  462. }
  463. },
  464. "required": ["success", "error"],
  465. "additionalProperties": false
  466. }
  467. ],
  468. "description": "Upgrade result"
  469. }
  470. }
  471. }
  472. },
  473. "400": {
  474. "description": "BadRequest | InvalidRequestError",
  475. "content": {
  476. "application/json": {
  477. "schema": {
  478. "anyOf": [
  479. {
  480. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  481. },
  482. {
  483. "$ref": "#/components/schemas/InvalidRequestError"
  484. }
  485. ]
  486. }
  487. }
  488. }
  489. }
  490. },
  491. "description": "Upgrade opencode to the specified version or latest if not specified.",
  492. "summary": "Upgrade opencode",
  493. "requestBody": {
  494. "content": {
  495. "application/json": {
  496. "schema": {
  497. "type": "object",
  498. "properties": {
  499. "target": {
  500. "type": "string"
  501. }
  502. },
  503. "additionalProperties": false
  504. }
  505. }
  506. }
  507. },
  508. "x-codeSamples": [
  509. {
  510. "lang": "js",
  511. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  512. }
  513. ]
  514. }
  515. },
  516. "/event": {
  517. "get": {
  518. "tags": ["event"],
  519. "operationId": "event.subscribe",
  520. "parameters": [
  521. {
  522. "name": "directory",
  523. "in": "query",
  524. "schema": {
  525. "type": "string"
  526. },
  527. "required": false
  528. },
  529. {
  530. "name": "workspace",
  531. "in": "query",
  532. "schema": {
  533. "type": "string"
  534. },
  535. "required": false
  536. }
  537. ],
  538. "responses": {
  539. "200": {
  540. "description": "Event stream",
  541. "content": {
  542. "text/event-stream": {
  543. "schema": {
  544. "$ref": "#/components/schemas/Event"
  545. }
  546. }
  547. }
  548. }
  549. },
  550. "description": "Get events",
  551. "summary": "Subscribe to events",
  552. "x-codeSamples": [
  553. {
  554. "lang": "js",
  555. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  556. }
  557. ]
  558. }
  559. },
  560. "/config": {
  561. "get": {
  562. "tags": ["config"],
  563. "operationId": "config.get",
  564. "parameters": [
  565. {
  566. "name": "directory",
  567. "in": "query",
  568. "schema": {
  569. "type": "string"
  570. },
  571. "required": false
  572. },
  573. {
  574. "name": "workspace",
  575. "in": "query",
  576. "schema": {
  577. "type": "string"
  578. },
  579. "required": false
  580. }
  581. ],
  582. "responses": {
  583. "200": {
  584. "description": "Get config info",
  585. "content": {
  586. "application/json": {
  587. "schema": {
  588. "$ref": "#/components/schemas/Config"
  589. }
  590. }
  591. }
  592. },
  593. "400": {
  594. "description": "Bad request",
  595. "content": {
  596. "application/json": {
  597. "schema": {
  598. "$ref": "#/components/schemas/BadRequestError"
  599. }
  600. }
  601. }
  602. }
  603. },
  604. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  605. "summary": "Get configuration",
  606. "x-codeSamples": [
  607. {
  608. "lang": "js",
  609. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  610. }
  611. ]
  612. },
  613. "patch": {
  614. "tags": ["config"],
  615. "operationId": "config.update",
  616. "parameters": [
  617. {
  618. "name": "directory",
  619. "in": "query",
  620. "schema": {
  621. "type": "string"
  622. },
  623. "required": false
  624. },
  625. {
  626. "name": "workspace",
  627. "in": "query",
  628. "schema": {
  629. "type": "string"
  630. },
  631. "required": false
  632. }
  633. ],
  634. "responses": {
  635. "200": {
  636. "description": "Successfully updated config",
  637. "content": {
  638. "application/json": {
  639. "schema": {
  640. "$ref": "#/components/schemas/Config"
  641. }
  642. }
  643. }
  644. },
  645. "400": {
  646. "description": "BadRequest | InvalidRequestError",
  647. "content": {
  648. "application/json": {
  649. "schema": {
  650. "anyOf": [
  651. {
  652. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  653. },
  654. {
  655. "$ref": "#/components/schemas/InvalidRequestError"
  656. }
  657. ]
  658. }
  659. }
  660. }
  661. }
  662. },
  663. "description": "Update OpenCode configuration settings and preferences.",
  664. "summary": "Update configuration",
  665. "requestBody": {
  666. "content": {
  667. "application/json": {
  668. "schema": {
  669. "$ref": "#/components/schemas/Config"
  670. }
  671. }
  672. }
  673. },
  674. "x-codeSamples": [
  675. {
  676. "lang": "js",
  677. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  678. }
  679. ]
  680. }
  681. },
  682. "/config/providers": {
  683. "get": {
  684. "tags": ["config"],
  685. "operationId": "config.providers",
  686. "parameters": [
  687. {
  688. "name": "directory",
  689. "in": "query",
  690. "schema": {
  691. "type": "string"
  692. },
  693. "required": false
  694. },
  695. {
  696. "name": "workspace",
  697. "in": "query",
  698. "schema": {
  699. "type": "string"
  700. },
  701. "required": false
  702. }
  703. ],
  704. "responses": {
  705. "200": {
  706. "description": "List of providers",
  707. "content": {
  708. "application/json": {
  709. "schema": {
  710. "type": "object",
  711. "properties": {
  712. "providers": {
  713. "type": "array",
  714. "items": {
  715. "$ref": "#/components/schemas/Provider"
  716. }
  717. },
  718. "default": {
  719. "type": "object",
  720. "additionalProperties": {
  721. "type": "string"
  722. }
  723. }
  724. },
  725. "required": ["providers", "default"],
  726. "additionalProperties": false,
  727. "description": "List of providers"
  728. }
  729. }
  730. }
  731. },
  732. "400": {
  733. "description": "Bad request",
  734. "content": {
  735. "application/json": {
  736. "schema": {
  737. "$ref": "#/components/schemas/BadRequestError"
  738. }
  739. }
  740. }
  741. }
  742. },
  743. "description": "Get a list of all configured AI providers and their default models.",
  744. "summary": "List config providers",
  745. "x-codeSamples": [
  746. {
  747. "lang": "js",
  748. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  749. }
  750. ]
  751. }
  752. },
  753. "/experimental/console": {
  754. "get": {
  755. "tags": ["experimental"],
  756. "operationId": "experimental.console.get",
  757. "parameters": [
  758. {
  759. "name": "directory",
  760. "in": "query",
  761. "schema": {
  762. "type": "string"
  763. },
  764. "required": false
  765. },
  766. {
  767. "name": "workspace",
  768. "in": "query",
  769. "schema": {
  770. "type": "string"
  771. },
  772. "required": false
  773. }
  774. ],
  775. "responses": {
  776. "200": {
  777. "description": "Active Console provider metadata",
  778. "content": {
  779. "application/json": {
  780. "schema": {
  781. "$ref": "#/components/schemas/ConsoleState"
  782. }
  783. }
  784. }
  785. },
  786. "400": {
  787. "description": "Bad request",
  788. "content": {
  789. "application/json": {
  790. "schema": {
  791. "$ref": "#/components/schemas/BadRequestError"
  792. }
  793. }
  794. }
  795. },
  796. "500": {
  797. "description": "InternalServerError",
  798. "content": {
  799. "application/json": {
  800. "schema": {
  801. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  802. }
  803. }
  804. }
  805. }
  806. },
  807. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  808. "summary": "Get active Console provider metadata",
  809. "x-codeSamples": [
  810. {
  811. "lang": "js",
  812. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  813. }
  814. ]
  815. }
  816. },
  817. "/experimental/console/orgs": {
  818. "get": {
  819. "tags": ["experimental"],
  820. "operationId": "experimental.console.listOrgs",
  821. "parameters": [
  822. {
  823. "name": "directory",
  824. "in": "query",
  825. "schema": {
  826. "type": "string"
  827. },
  828. "required": false
  829. },
  830. {
  831. "name": "workspace",
  832. "in": "query",
  833. "schema": {
  834. "type": "string"
  835. },
  836. "required": false
  837. }
  838. ],
  839. "responses": {
  840. "200": {
  841. "description": "Switchable Console orgs",
  842. "content": {
  843. "application/json": {
  844. "schema": {
  845. "type": "object",
  846. "properties": {
  847. "orgs": {
  848. "type": "array",
  849. "items": {
  850. "type": "object",
  851. "properties": {
  852. "accountID": {
  853. "type": "string"
  854. },
  855. "accountEmail": {
  856. "type": "string"
  857. },
  858. "accountUrl": {
  859. "type": "string"
  860. },
  861. "orgID": {
  862. "type": "string"
  863. },
  864. "orgName": {
  865. "type": "string"
  866. },
  867. "active": {
  868. "type": "boolean"
  869. }
  870. },
  871. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  872. "additionalProperties": false
  873. }
  874. }
  875. },
  876. "required": ["orgs"],
  877. "additionalProperties": false,
  878. "description": "Switchable Console orgs"
  879. }
  880. }
  881. }
  882. },
  883. "400": {
  884. "description": "Bad request",
  885. "content": {
  886. "application/json": {
  887. "schema": {
  888. "$ref": "#/components/schemas/BadRequestError"
  889. }
  890. }
  891. }
  892. },
  893. "500": {
  894. "description": "InternalServerError",
  895. "content": {
  896. "application/json": {
  897. "schema": {
  898. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  899. }
  900. }
  901. }
  902. }
  903. },
  904. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  905. "summary": "List switchable Console orgs",
  906. "x-codeSamples": [
  907. {
  908. "lang": "js",
  909. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  910. }
  911. ]
  912. }
  913. },
  914. "/experimental/console/switch": {
  915. "post": {
  916. "tags": ["experimental"],
  917. "operationId": "experimental.console.switchOrg",
  918. "parameters": [
  919. {
  920. "name": "directory",
  921. "in": "query",
  922. "schema": {
  923. "type": "string"
  924. },
  925. "required": false
  926. },
  927. {
  928. "name": "workspace",
  929. "in": "query",
  930. "schema": {
  931. "type": "string"
  932. },
  933. "required": false
  934. }
  935. ],
  936. "responses": {
  937. "200": {
  938. "description": "Switch success",
  939. "content": {
  940. "application/json": {
  941. "schema": {
  942. "type": "boolean",
  943. "description": "Switch success"
  944. }
  945. }
  946. }
  947. }
  948. },
  949. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  950. "summary": "Switch active Console org",
  951. "requestBody": {
  952. "content": {
  953. "application/json": {
  954. "schema": {
  955. "type": "object",
  956. "properties": {
  957. "accountID": {
  958. "type": "string"
  959. },
  960. "orgID": {
  961. "type": "string"
  962. }
  963. },
  964. "required": ["accountID", "orgID"],
  965. "additionalProperties": false
  966. }
  967. }
  968. }
  969. },
  970. "x-codeSamples": [
  971. {
  972. "lang": "js",
  973. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  974. }
  975. ]
  976. }
  977. },
  978. "/experimental/tool": {
  979. "get": {
  980. "tags": ["experimental"],
  981. "operationId": "tool.list",
  982. "parameters": [
  983. {
  984. "name": "directory",
  985. "in": "query",
  986. "schema": {
  987. "type": "string"
  988. },
  989. "required": false
  990. },
  991. {
  992. "name": "workspace",
  993. "in": "query",
  994. "schema": {
  995. "type": "string"
  996. },
  997. "required": false
  998. },
  999. {
  1000. "name": "provider",
  1001. "in": "query",
  1002. "schema": {
  1003. "type": "string"
  1004. },
  1005. "required": true
  1006. },
  1007. {
  1008. "name": "model",
  1009. "in": "query",
  1010. "schema": {
  1011. "type": "string"
  1012. },
  1013. "required": true
  1014. }
  1015. ],
  1016. "responses": {
  1017. "200": {
  1018. "description": "Tools",
  1019. "content": {
  1020. "application/json": {
  1021. "schema": {
  1022. "$ref": "#/components/schemas/ToolList"
  1023. }
  1024. }
  1025. }
  1026. },
  1027. "400": {
  1028. "description": "BadRequest | InvalidRequestError",
  1029. "content": {
  1030. "application/json": {
  1031. "schema": {
  1032. "anyOf": [
  1033. {
  1034. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1035. },
  1036. {
  1037. "$ref": "#/components/schemas/InvalidRequestError"
  1038. }
  1039. ]
  1040. }
  1041. }
  1042. }
  1043. }
  1044. },
  1045. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1046. "summary": "List tools",
  1047. "x-codeSamples": [
  1048. {
  1049. "lang": "js",
  1050. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1051. }
  1052. ]
  1053. }
  1054. },
  1055. "/experimental/tool/ids": {
  1056. "get": {
  1057. "tags": ["experimental"],
  1058. "operationId": "tool.ids",
  1059. "parameters": [
  1060. {
  1061. "name": "directory",
  1062. "in": "query",
  1063. "schema": {
  1064. "type": "string"
  1065. },
  1066. "required": false
  1067. },
  1068. {
  1069. "name": "workspace",
  1070. "in": "query",
  1071. "schema": {
  1072. "type": "string"
  1073. },
  1074. "required": false
  1075. }
  1076. ],
  1077. "responses": {
  1078. "200": {
  1079. "description": "Tool IDs",
  1080. "content": {
  1081. "application/json": {
  1082. "schema": {
  1083. "$ref": "#/components/schemas/ToolIDs"
  1084. }
  1085. }
  1086. }
  1087. },
  1088. "400": {
  1089. "description": "BadRequest | InvalidRequestError",
  1090. "content": {
  1091. "application/json": {
  1092. "schema": {
  1093. "anyOf": [
  1094. {
  1095. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1096. },
  1097. {
  1098. "$ref": "#/components/schemas/InvalidRequestError"
  1099. }
  1100. ]
  1101. }
  1102. }
  1103. }
  1104. }
  1105. },
  1106. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1107. "summary": "List tool IDs",
  1108. "x-codeSamples": [
  1109. {
  1110. "lang": "js",
  1111. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1112. }
  1113. ]
  1114. }
  1115. },
  1116. "/experimental/worktree": {
  1117. "get": {
  1118. "tags": ["experimental"],
  1119. "operationId": "worktree.list",
  1120. "parameters": [
  1121. {
  1122. "name": "directory",
  1123. "in": "query",
  1124. "schema": {
  1125. "type": "string"
  1126. },
  1127. "required": false
  1128. },
  1129. {
  1130. "name": "workspace",
  1131. "in": "query",
  1132. "schema": {
  1133. "type": "string"
  1134. },
  1135. "required": false
  1136. }
  1137. ],
  1138. "responses": {
  1139. "200": {
  1140. "description": "List of worktree directories",
  1141. "content": {
  1142. "application/json": {
  1143. "schema": {
  1144. "type": "array",
  1145. "items": {
  1146. "type": "string"
  1147. },
  1148. "description": "List of worktree directories"
  1149. }
  1150. }
  1151. }
  1152. },
  1153. "400": {
  1154. "description": "WorktreeError | InvalidRequestError",
  1155. "content": {
  1156. "application/json": {
  1157. "schema": {
  1158. "anyOf": [
  1159. {
  1160. "$ref": "#/components/schemas/WorktreeError"
  1161. },
  1162. {
  1163. "$ref": "#/components/schemas/InvalidRequestError"
  1164. }
  1165. ]
  1166. }
  1167. }
  1168. }
  1169. }
  1170. },
  1171. "description": "List all sandbox worktrees for the current project.",
  1172. "summary": "List worktrees",
  1173. "x-codeSamples": [
  1174. {
  1175. "lang": "js",
  1176. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1177. }
  1178. ]
  1179. },
  1180. "post": {
  1181. "tags": ["experimental"],
  1182. "operationId": "worktree.create",
  1183. "parameters": [
  1184. {
  1185. "name": "directory",
  1186. "in": "query",
  1187. "schema": {
  1188. "type": "string"
  1189. },
  1190. "required": false
  1191. },
  1192. {
  1193. "name": "workspace",
  1194. "in": "query",
  1195. "schema": {
  1196. "type": "string"
  1197. },
  1198. "required": false
  1199. }
  1200. ],
  1201. "responses": {
  1202. "200": {
  1203. "description": "Worktree created",
  1204. "content": {
  1205. "application/json": {
  1206. "schema": {
  1207. "$ref": "#/components/schemas/Worktree"
  1208. }
  1209. }
  1210. }
  1211. },
  1212. "400": {
  1213. "description": "WorktreeError | InvalidRequestError",
  1214. "content": {
  1215. "application/json": {
  1216. "schema": {
  1217. "anyOf": [
  1218. {
  1219. "$ref": "#/components/schemas/WorktreeError"
  1220. },
  1221. {
  1222. "$ref": "#/components/schemas/InvalidRequestError"
  1223. }
  1224. ]
  1225. }
  1226. }
  1227. }
  1228. }
  1229. },
  1230. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1231. "summary": "Create worktree",
  1232. "requestBody": {
  1233. "content": {
  1234. "application/json": {
  1235. "schema": {
  1236. "$ref": "#/components/schemas/WorktreeCreateInput"
  1237. }
  1238. }
  1239. }
  1240. },
  1241. "x-codeSamples": [
  1242. {
  1243. "lang": "js",
  1244. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1245. }
  1246. ]
  1247. },
  1248. "delete": {
  1249. "tags": ["experimental"],
  1250. "operationId": "worktree.remove",
  1251. "parameters": [
  1252. {
  1253. "name": "directory",
  1254. "in": "query",
  1255. "schema": {
  1256. "type": "string"
  1257. },
  1258. "required": false
  1259. },
  1260. {
  1261. "name": "workspace",
  1262. "in": "query",
  1263. "schema": {
  1264. "type": "string"
  1265. },
  1266. "required": false
  1267. }
  1268. ],
  1269. "responses": {
  1270. "200": {
  1271. "description": "Worktree removed",
  1272. "content": {
  1273. "application/json": {
  1274. "schema": {
  1275. "type": "boolean",
  1276. "description": "Worktree removed"
  1277. }
  1278. }
  1279. }
  1280. },
  1281. "400": {
  1282. "description": "WorktreeError | InvalidRequestError",
  1283. "content": {
  1284. "application/json": {
  1285. "schema": {
  1286. "anyOf": [
  1287. {
  1288. "$ref": "#/components/schemas/WorktreeError"
  1289. },
  1290. {
  1291. "$ref": "#/components/schemas/InvalidRequestError"
  1292. }
  1293. ]
  1294. }
  1295. }
  1296. }
  1297. }
  1298. },
  1299. "description": "Remove a git worktree and delete its branch.",
  1300. "summary": "Remove worktree",
  1301. "requestBody": {
  1302. "content": {
  1303. "application/json": {
  1304. "schema": {
  1305. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1306. }
  1307. }
  1308. }
  1309. },
  1310. "x-codeSamples": [
  1311. {
  1312. "lang": "js",
  1313. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1314. }
  1315. ]
  1316. }
  1317. },
  1318. "/experimental/worktree/reset": {
  1319. "post": {
  1320. "tags": ["experimental"],
  1321. "operationId": "worktree.reset",
  1322. "parameters": [
  1323. {
  1324. "name": "directory",
  1325. "in": "query",
  1326. "schema": {
  1327. "type": "string"
  1328. },
  1329. "required": false
  1330. },
  1331. {
  1332. "name": "workspace",
  1333. "in": "query",
  1334. "schema": {
  1335. "type": "string"
  1336. },
  1337. "required": false
  1338. }
  1339. ],
  1340. "responses": {
  1341. "200": {
  1342. "description": "Worktree reset",
  1343. "content": {
  1344. "application/json": {
  1345. "schema": {
  1346. "type": "boolean",
  1347. "description": "Worktree reset"
  1348. }
  1349. }
  1350. }
  1351. },
  1352. "400": {
  1353. "description": "WorktreeError | InvalidRequestError",
  1354. "content": {
  1355. "application/json": {
  1356. "schema": {
  1357. "anyOf": [
  1358. {
  1359. "$ref": "#/components/schemas/WorktreeError"
  1360. },
  1361. {
  1362. "$ref": "#/components/schemas/InvalidRequestError"
  1363. }
  1364. ]
  1365. }
  1366. }
  1367. }
  1368. }
  1369. },
  1370. "description": "Reset a worktree branch to the primary default branch.",
  1371. "summary": "Reset worktree",
  1372. "requestBody": {
  1373. "content": {
  1374. "application/json": {
  1375. "schema": {
  1376. "$ref": "#/components/schemas/WorktreeResetInput"
  1377. }
  1378. }
  1379. }
  1380. },
  1381. "x-codeSamples": [
  1382. {
  1383. "lang": "js",
  1384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1385. }
  1386. ]
  1387. }
  1388. },
  1389. "/experimental/session": {
  1390. "get": {
  1391. "tags": ["experimental"],
  1392. "operationId": "experimental.session.list",
  1393. "parameters": [
  1394. {
  1395. "name": "directory",
  1396. "in": "query",
  1397. "schema": {
  1398. "type": "string"
  1399. },
  1400. "required": false
  1401. },
  1402. {
  1403. "name": "workspace",
  1404. "in": "query",
  1405. "schema": {
  1406. "type": "string"
  1407. },
  1408. "required": false
  1409. },
  1410. {
  1411. "name": "roots",
  1412. "in": "query",
  1413. "schema": {
  1414. "anyOf": [
  1415. {
  1416. "type": "boolean"
  1417. },
  1418. {
  1419. "type": "string",
  1420. "enum": ["true", "false"]
  1421. }
  1422. ]
  1423. },
  1424. "required": false
  1425. },
  1426. {
  1427. "name": "start",
  1428. "in": "query",
  1429. "schema": {
  1430. "type": "number"
  1431. },
  1432. "required": false
  1433. },
  1434. {
  1435. "name": "cursor",
  1436. "in": "query",
  1437. "schema": {
  1438. "type": "number"
  1439. },
  1440. "required": false
  1441. },
  1442. {
  1443. "name": "search",
  1444. "in": "query",
  1445. "schema": {
  1446. "type": "string"
  1447. },
  1448. "required": false
  1449. },
  1450. {
  1451. "name": "limit",
  1452. "in": "query",
  1453. "schema": {
  1454. "type": "number"
  1455. },
  1456. "required": false
  1457. },
  1458. {
  1459. "name": "archived",
  1460. "in": "query",
  1461. "schema": {
  1462. "anyOf": [
  1463. {
  1464. "type": "boolean"
  1465. },
  1466. {
  1467. "type": "string",
  1468. "enum": ["true", "false"]
  1469. }
  1470. ]
  1471. },
  1472. "required": false
  1473. }
  1474. ],
  1475. "responses": {
  1476. "200": {
  1477. "description": "List of sessions",
  1478. "content": {
  1479. "application/json": {
  1480. "schema": {
  1481. "type": "array",
  1482. "items": {
  1483. "$ref": "#/components/schemas/GlobalSession"
  1484. },
  1485. "description": "List of sessions"
  1486. }
  1487. }
  1488. }
  1489. },
  1490. "400": {
  1491. "description": "Bad request",
  1492. "content": {
  1493. "application/json": {
  1494. "schema": {
  1495. "$ref": "#/components/schemas/BadRequestError"
  1496. }
  1497. }
  1498. }
  1499. }
  1500. },
  1501. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1502. "summary": "List sessions",
  1503. "x-codeSamples": [
  1504. {
  1505. "lang": "js",
  1506. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1507. }
  1508. ]
  1509. }
  1510. },
  1511. "/experimental/resource": {
  1512. "get": {
  1513. "tags": ["experimental"],
  1514. "operationId": "experimental.resource.list",
  1515. "parameters": [
  1516. {
  1517. "name": "directory",
  1518. "in": "query",
  1519. "schema": {
  1520. "type": "string"
  1521. },
  1522. "required": false
  1523. },
  1524. {
  1525. "name": "workspace",
  1526. "in": "query",
  1527. "schema": {
  1528. "type": "string"
  1529. },
  1530. "required": false
  1531. }
  1532. ],
  1533. "responses": {
  1534. "200": {
  1535. "description": "MCP resources",
  1536. "content": {
  1537. "application/json": {
  1538. "schema": {
  1539. "type": "object",
  1540. "additionalProperties": {
  1541. "$ref": "#/components/schemas/McpResource"
  1542. },
  1543. "description": "MCP resources"
  1544. }
  1545. }
  1546. }
  1547. },
  1548. "400": {
  1549. "description": "Bad request",
  1550. "content": {
  1551. "application/json": {
  1552. "schema": {
  1553. "$ref": "#/components/schemas/BadRequestError"
  1554. }
  1555. }
  1556. }
  1557. }
  1558. },
  1559. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1560. "summary": "Get MCP resources",
  1561. "x-codeSamples": [
  1562. {
  1563. "lang": "js",
  1564. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1565. }
  1566. ]
  1567. }
  1568. },
  1569. "/find": {
  1570. "get": {
  1571. "tags": ["file"],
  1572. "operationId": "find.text",
  1573. "parameters": [
  1574. {
  1575. "name": "directory",
  1576. "in": "query",
  1577. "schema": {
  1578. "type": "string"
  1579. },
  1580. "required": false
  1581. },
  1582. {
  1583. "name": "workspace",
  1584. "in": "query",
  1585. "schema": {
  1586. "type": "string"
  1587. },
  1588. "required": false
  1589. },
  1590. {
  1591. "name": "pattern",
  1592. "in": "query",
  1593. "schema": {
  1594. "type": "string"
  1595. },
  1596. "required": true
  1597. }
  1598. ],
  1599. "responses": {
  1600. "200": {
  1601. "description": "Matches",
  1602. "content": {
  1603. "application/json": {
  1604. "schema": {
  1605. "type": "array",
  1606. "items": {
  1607. "type": "object",
  1608. "properties": {
  1609. "path": {
  1610. "type": "object",
  1611. "properties": {
  1612. "text": {
  1613. "type": "string"
  1614. }
  1615. },
  1616. "required": ["text"],
  1617. "additionalProperties": false
  1618. },
  1619. "lines": {
  1620. "type": "object",
  1621. "properties": {
  1622. "text": {
  1623. "type": "string"
  1624. }
  1625. },
  1626. "required": ["text"],
  1627. "additionalProperties": false
  1628. },
  1629. "line_number": {
  1630. "type": "integer",
  1631. "minimum": 0
  1632. },
  1633. "absolute_offset": {
  1634. "type": "integer",
  1635. "minimum": 0
  1636. },
  1637. "submatches": {
  1638. "type": "array",
  1639. "items": {
  1640. "type": "object",
  1641. "properties": {
  1642. "match": {
  1643. "type": "object",
  1644. "properties": {
  1645. "text": {
  1646. "type": "string"
  1647. }
  1648. },
  1649. "required": ["text"],
  1650. "additionalProperties": false
  1651. },
  1652. "start": {
  1653. "type": "integer",
  1654. "minimum": 0
  1655. },
  1656. "end": {
  1657. "type": "integer",
  1658. "minimum": 0
  1659. }
  1660. },
  1661. "required": ["match", "start", "end"],
  1662. "additionalProperties": false
  1663. }
  1664. }
  1665. },
  1666. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1667. "additionalProperties": false
  1668. },
  1669. "description": "Matches"
  1670. }
  1671. }
  1672. }
  1673. },
  1674. "400": {
  1675. "description": "Bad request",
  1676. "content": {
  1677. "application/json": {
  1678. "schema": {
  1679. "$ref": "#/components/schemas/BadRequestError"
  1680. }
  1681. }
  1682. }
  1683. }
  1684. },
  1685. "description": "Search for text patterns across files in the project using ripgrep.",
  1686. "summary": "Find text",
  1687. "x-codeSamples": [
  1688. {
  1689. "lang": "js",
  1690. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1691. }
  1692. ]
  1693. }
  1694. },
  1695. "/find/file": {
  1696. "get": {
  1697. "tags": ["file"],
  1698. "operationId": "find.files",
  1699. "parameters": [
  1700. {
  1701. "name": "directory",
  1702. "in": "query",
  1703. "schema": {
  1704. "type": "string"
  1705. },
  1706. "required": false
  1707. },
  1708. {
  1709. "name": "workspace",
  1710. "in": "query",
  1711. "schema": {
  1712. "type": "string"
  1713. },
  1714. "required": false
  1715. },
  1716. {
  1717. "name": "query",
  1718. "in": "query",
  1719. "schema": {
  1720. "type": "string"
  1721. },
  1722. "required": true
  1723. },
  1724. {
  1725. "name": "dirs",
  1726. "in": "query",
  1727. "schema": {
  1728. "type": "string",
  1729. "enum": ["true", "false"]
  1730. },
  1731. "required": false
  1732. },
  1733. {
  1734. "name": "type",
  1735. "in": "query",
  1736. "schema": {
  1737. "type": "string",
  1738. "enum": ["file", "directory"]
  1739. },
  1740. "required": false
  1741. },
  1742. {
  1743. "name": "limit",
  1744. "in": "query",
  1745. "schema": {
  1746. "type": "integer",
  1747. "minimum": 1,
  1748. "maximum": 200
  1749. },
  1750. "required": false
  1751. }
  1752. ],
  1753. "responses": {
  1754. "200": {
  1755. "description": "File paths",
  1756. "content": {
  1757. "application/json": {
  1758. "schema": {
  1759. "type": "array",
  1760. "items": {
  1761. "type": "string"
  1762. },
  1763. "description": "File paths"
  1764. }
  1765. }
  1766. }
  1767. },
  1768. "400": {
  1769. "description": "Bad request",
  1770. "content": {
  1771. "application/json": {
  1772. "schema": {
  1773. "$ref": "#/components/schemas/BadRequestError"
  1774. }
  1775. }
  1776. }
  1777. }
  1778. },
  1779. "description": "Search for files or directories by name or pattern in the project directory.",
  1780. "summary": "Find files",
  1781. "x-codeSamples": [
  1782. {
  1783. "lang": "js",
  1784. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1785. }
  1786. ]
  1787. }
  1788. },
  1789. "/find/symbol": {
  1790. "get": {
  1791. "tags": ["file"],
  1792. "operationId": "find.symbols",
  1793. "parameters": [
  1794. {
  1795. "name": "directory",
  1796. "in": "query",
  1797. "schema": {
  1798. "type": "string"
  1799. },
  1800. "required": false
  1801. },
  1802. {
  1803. "name": "workspace",
  1804. "in": "query",
  1805. "schema": {
  1806. "type": "string"
  1807. },
  1808. "required": false
  1809. },
  1810. {
  1811. "name": "query",
  1812. "in": "query",
  1813. "schema": {
  1814. "type": "string"
  1815. },
  1816. "required": true
  1817. }
  1818. ],
  1819. "responses": {
  1820. "200": {
  1821. "description": "Symbols",
  1822. "content": {
  1823. "application/json": {
  1824. "schema": {
  1825. "type": "array",
  1826. "items": {
  1827. "$ref": "#/components/schemas/Symbol"
  1828. },
  1829. "description": "Symbols"
  1830. }
  1831. }
  1832. }
  1833. },
  1834. "400": {
  1835. "description": "Bad request",
  1836. "content": {
  1837. "application/json": {
  1838. "schema": {
  1839. "$ref": "#/components/schemas/BadRequestError"
  1840. }
  1841. }
  1842. }
  1843. }
  1844. },
  1845. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  1846. "summary": "Find symbols",
  1847. "x-codeSamples": [
  1848. {
  1849. "lang": "js",
  1850. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  1851. }
  1852. ]
  1853. }
  1854. },
  1855. "/file": {
  1856. "get": {
  1857. "tags": ["file"],
  1858. "operationId": "file.list",
  1859. "parameters": [
  1860. {
  1861. "name": "directory",
  1862. "in": "query",
  1863. "schema": {
  1864. "type": "string"
  1865. },
  1866. "required": false
  1867. },
  1868. {
  1869. "name": "workspace",
  1870. "in": "query",
  1871. "schema": {
  1872. "type": "string"
  1873. },
  1874. "required": false
  1875. },
  1876. {
  1877. "name": "path",
  1878. "in": "query",
  1879. "schema": {
  1880. "type": "string"
  1881. },
  1882. "required": true
  1883. }
  1884. ],
  1885. "responses": {
  1886. "200": {
  1887. "description": "Files and directories",
  1888. "content": {
  1889. "application/json": {
  1890. "schema": {
  1891. "type": "array",
  1892. "items": {
  1893. "$ref": "#/components/schemas/FileNode"
  1894. },
  1895. "description": "Files and directories"
  1896. }
  1897. }
  1898. }
  1899. },
  1900. "400": {
  1901. "description": "Bad request",
  1902. "content": {
  1903. "application/json": {
  1904. "schema": {
  1905. "$ref": "#/components/schemas/BadRequestError"
  1906. }
  1907. }
  1908. }
  1909. }
  1910. },
  1911. "description": "List files and directories in a specified path.",
  1912. "summary": "List files",
  1913. "x-codeSamples": [
  1914. {
  1915. "lang": "js",
  1916. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  1917. }
  1918. ]
  1919. }
  1920. },
  1921. "/file/content": {
  1922. "get": {
  1923. "tags": ["file"],
  1924. "operationId": "file.read",
  1925. "parameters": [
  1926. {
  1927. "name": "directory",
  1928. "in": "query",
  1929. "schema": {
  1930. "type": "string"
  1931. },
  1932. "required": false
  1933. },
  1934. {
  1935. "name": "workspace",
  1936. "in": "query",
  1937. "schema": {
  1938. "type": "string"
  1939. },
  1940. "required": false
  1941. },
  1942. {
  1943. "name": "path",
  1944. "in": "query",
  1945. "schema": {
  1946. "type": "string"
  1947. },
  1948. "required": true
  1949. }
  1950. ],
  1951. "responses": {
  1952. "200": {
  1953. "description": "File content",
  1954. "content": {
  1955. "application/json": {
  1956. "schema": {
  1957. "$ref": "#/components/schemas/FileContent"
  1958. }
  1959. }
  1960. }
  1961. },
  1962. "400": {
  1963. "description": "Bad request",
  1964. "content": {
  1965. "application/json": {
  1966. "schema": {
  1967. "$ref": "#/components/schemas/BadRequestError"
  1968. }
  1969. }
  1970. }
  1971. }
  1972. },
  1973. "description": "Read the content of a specified file.",
  1974. "summary": "Read file",
  1975. "x-codeSamples": [
  1976. {
  1977. "lang": "js",
  1978. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  1979. }
  1980. ]
  1981. }
  1982. },
  1983. "/file/status": {
  1984. "get": {
  1985. "tags": ["file"],
  1986. "operationId": "file.status",
  1987. "parameters": [
  1988. {
  1989. "name": "directory",
  1990. "in": "query",
  1991. "schema": {
  1992. "type": "string"
  1993. },
  1994. "required": false
  1995. },
  1996. {
  1997. "name": "workspace",
  1998. "in": "query",
  1999. "schema": {
  2000. "type": "string"
  2001. },
  2002. "required": false
  2003. }
  2004. ],
  2005. "responses": {
  2006. "200": {
  2007. "description": "File status",
  2008. "content": {
  2009. "application/json": {
  2010. "schema": {
  2011. "type": "array",
  2012. "items": {
  2013. "$ref": "#/components/schemas/File"
  2014. },
  2015. "description": "File status"
  2016. }
  2017. }
  2018. }
  2019. },
  2020. "400": {
  2021. "description": "Bad request",
  2022. "content": {
  2023. "application/json": {
  2024. "schema": {
  2025. "$ref": "#/components/schemas/BadRequestError"
  2026. }
  2027. }
  2028. }
  2029. }
  2030. },
  2031. "description": "Get the git status of all files in the project.",
  2032. "summary": "Get file status",
  2033. "x-codeSamples": [
  2034. {
  2035. "lang": "js",
  2036. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  2037. }
  2038. ]
  2039. }
  2040. },
  2041. "/instance/dispose": {
  2042. "post": {
  2043. "tags": ["instance"],
  2044. "operationId": "instance.dispose",
  2045. "parameters": [
  2046. {
  2047. "name": "directory",
  2048. "in": "query",
  2049. "schema": {
  2050. "type": "string"
  2051. },
  2052. "required": false
  2053. },
  2054. {
  2055. "name": "workspace",
  2056. "in": "query",
  2057. "schema": {
  2058. "type": "string"
  2059. },
  2060. "required": false
  2061. }
  2062. ],
  2063. "responses": {
  2064. "200": {
  2065. "description": "Instance disposed",
  2066. "content": {
  2067. "application/json": {
  2068. "schema": {
  2069. "type": "boolean",
  2070. "description": "Instance disposed"
  2071. }
  2072. }
  2073. }
  2074. },
  2075. "400": {
  2076. "description": "Bad request",
  2077. "content": {
  2078. "application/json": {
  2079. "schema": {
  2080. "$ref": "#/components/schemas/BadRequestError"
  2081. }
  2082. }
  2083. }
  2084. }
  2085. },
  2086. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  2087. "summary": "Dispose instance",
  2088. "x-codeSamples": [
  2089. {
  2090. "lang": "js",
  2091. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  2092. }
  2093. ]
  2094. }
  2095. },
  2096. "/path": {
  2097. "get": {
  2098. "tags": ["instance"],
  2099. "operationId": "path.get",
  2100. "parameters": [
  2101. {
  2102. "name": "directory",
  2103. "in": "query",
  2104. "schema": {
  2105. "type": "string"
  2106. },
  2107. "required": false
  2108. },
  2109. {
  2110. "name": "workspace",
  2111. "in": "query",
  2112. "schema": {
  2113. "type": "string"
  2114. },
  2115. "required": false
  2116. }
  2117. ],
  2118. "responses": {
  2119. "200": {
  2120. "description": "Path",
  2121. "content": {
  2122. "application/json": {
  2123. "schema": {
  2124. "$ref": "#/components/schemas/Path"
  2125. }
  2126. }
  2127. }
  2128. },
  2129. "400": {
  2130. "description": "Bad request",
  2131. "content": {
  2132. "application/json": {
  2133. "schema": {
  2134. "$ref": "#/components/schemas/BadRequestError"
  2135. }
  2136. }
  2137. }
  2138. }
  2139. },
  2140. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  2141. "summary": "Get paths",
  2142. "x-codeSamples": [
  2143. {
  2144. "lang": "js",
  2145. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  2146. }
  2147. ]
  2148. }
  2149. },
  2150. "/vcs": {
  2151. "get": {
  2152. "tags": ["instance"],
  2153. "operationId": "vcs.get",
  2154. "parameters": [
  2155. {
  2156. "name": "directory",
  2157. "in": "query",
  2158. "schema": {
  2159. "type": "string"
  2160. },
  2161. "required": false
  2162. },
  2163. {
  2164. "name": "workspace",
  2165. "in": "query",
  2166. "schema": {
  2167. "type": "string"
  2168. },
  2169. "required": false
  2170. }
  2171. ],
  2172. "responses": {
  2173. "200": {
  2174. "description": "VCS info",
  2175. "content": {
  2176. "application/json": {
  2177. "schema": {
  2178. "$ref": "#/components/schemas/VcsInfo"
  2179. }
  2180. }
  2181. }
  2182. },
  2183. "400": {
  2184. "description": "Bad request",
  2185. "content": {
  2186. "application/json": {
  2187. "schema": {
  2188. "$ref": "#/components/schemas/BadRequestError"
  2189. }
  2190. }
  2191. }
  2192. }
  2193. },
  2194. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  2195. "summary": "Get VCS info",
  2196. "x-codeSamples": [
  2197. {
  2198. "lang": "js",
  2199. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  2200. }
  2201. ]
  2202. }
  2203. },
  2204. "/vcs/status": {
  2205. "get": {
  2206. "tags": ["instance"],
  2207. "operationId": "vcs.status",
  2208. "parameters": [
  2209. {
  2210. "name": "directory",
  2211. "in": "query",
  2212. "schema": {
  2213. "type": "string"
  2214. },
  2215. "required": false
  2216. },
  2217. {
  2218. "name": "workspace",
  2219. "in": "query",
  2220. "schema": {
  2221. "type": "string"
  2222. },
  2223. "required": false
  2224. }
  2225. ],
  2226. "responses": {
  2227. "200": {
  2228. "description": "VCS status",
  2229. "content": {
  2230. "application/json": {
  2231. "schema": {
  2232. "type": "array",
  2233. "items": {
  2234. "$ref": "#/components/schemas/VcsFileStatus"
  2235. },
  2236. "description": "VCS status"
  2237. }
  2238. }
  2239. }
  2240. },
  2241. "400": {
  2242. "description": "Bad request",
  2243. "content": {
  2244. "application/json": {
  2245. "schema": {
  2246. "$ref": "#/components/schemas/BadRequestError"
  2247. }
  2248. }
  2249. }
  2250. }
  2251. },
  2252. "description": "Retrieve changed files in the current working tree without patches.",
  2253. "summary": "Get VCS status",
  2254. "x-codeSamples": [
  2255. {
  2256. "lang": "js",
  2257. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  2258. }
  2259. ]
  2260. }
  2261. },
  2262. "/vcs/diff": {
  2263. "get": {
  2264. "tags": ["instance"],
  2265. "operationId": "vcs.diff",
  2266. "parameters": [
  2267. {
  2268. "name": "directory",
  2269. "in": "query",
  2270. "schema": {
  2271. "type": "string"
  2272. },
  2273. "required": false
  2274. },
  2275. {
  2276. "name": "workspace",
  2277. "in": "query",
  2278. "schema": {
  2279. "type": "string"
  2280. },
  2281. "required": false
  2282. },
  2283. {
  2284. "name": "mode",
  2285. "in": "query",
  2286. "schema": {
  2287. "type": "string",
  2288. "enum": ["git", "branch"]
  2289. },
  2290. "required": true
  2291. }
  2292. ],
  2293. "responses": {
  2294. "200": {
  2295. "description": "VCS diff",
  2296. "content": {
  2297. "application/json": {
  2298. "schema": {
  2299. "type": "array",
  2300. "items": {
  2301. "$ref": "#/components/schemas/VcsFileDiff"
  2302. },
  2303. "description": "VCS diff"
  2304. }
  2305. }
  2306. }
  2307. },
  2308. "400": {
  2309. "description": "Bad request",
  2310. "content": {
  2311. "application/json": {
  2312. "schema": {
  2313. "$ref": "#/components/schemas/BadRequestError"
  2314. }
  2315. }
  2316. }
  2317. }
  2318. },
  2319. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2320. "summary": "Get VCS diff",
  2321. "x-codeSamples": [
  2322. {
  2323. "lang": "js",
  2324. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2325. }
  2326. ]
  2327. }
  2328. },
  2329. "/vcs/diff/raw": {
  2330. "get": {
  2331. "tags": ["instance"],
  2332. "operationId": "vcs.diff.raw",
  2333. "parameters": [
  2334. {
  2335. "name": "directory",
  2336. "in": "query",
  2337. "schema": {
  2338. "type": "string"
  2339. },
  2340. "required": false
  2341. },
  2342. {
  2343. "name": "workspace",
  2344. "in": "query",
  2345. "schema": {
  2346. "type": "string"
  2347. },
  2348. "required": false
  2349. }
  2350. ],
  2351. "responses": {
  2352. "200": {
  2353. "description": "Raw VCS diff",
  2354. "content": {
  2355. "text/x-diff; charset=utf-8": {
  2356. "schema": {
  2357. "type": "string"
  2358. }
  2359. }
  2360. }
  2361. },
  2362. "400": {
  2363. "description": "Bad request",
  2364. "content": {
  2365. "application/json": {
  2366. "schema": {
  2367. "$ref": "#/components/schemas/BadRequestError"
  2368. }
  2369. }
  2370. }
  2371. }
  2372. },
  2373. "description": "Retrieve a raw patch for current uncommitted changes.",
  2374. "summary": "Get raw VCS diff",
  2375. "x-codeSamples": [
  2376. {
  2377. "lang": "js",
  2378. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2379. }
  2380. ]
  2381. }
  2382. },
  2383. "/vcs/apply": {
  2384. "post": {
  2385. "tags": ["instance"],
  2386. "operationId": "vcs.apply",
  2387. "parameters": [
  2388. {
  2389. "name": "directory",
  2390. "in": "query",
  2391. "schema": {
  2392. "type": "string"
  2393. },
  2394. "required": false
  2395. },
  2396. {
  2397. "name": "workspace",
  2398. "in": "query",
  2399. "schema": {
  2400. "type": "string"
  2401. },
  2402. "required": false
  2403. }
  2404. ],
  2405. "responses": {
  2406. "200": {
  2407. "description": "VCS patch applied",
  2408. "content": {
  2409. "application/json": {
  2410. "schema": {
  2411. "type": "object",
  2412. "properties": {
  2413. "applied": {
  2414. "type": "boolean"
  2415. }
  2416. },
  2417. "required": ["applied"],
  2418. "additionalProperties": false,
  2419. "description": "VCS patch applied"
  2420. }
  2421. }
  2422. }
  2423. },
  2424. "400": {
  2425. "description": "VcsApplyError | InvalidRequestError",
  2426. "content": {
  2427. "application/json": {
  2428. "schema": {
  2429. "anyOf": [
  2430. {
  2431. "$ref": "#/components/schemas/VcsApplyError"
  2432. },
  2433. {
  2434. "$ref": "#/components/schemas/InvalidRequestError"
  2435. }
  2436. ]
  2437. }
  2438. }
  2439. }
  2440. }
  2441. },
  2442. "description": "Apply a raw patch to the current working tree.",
  2443. "summary": "Apply VCS patch",
  2444. "requestBody": {
  2445. "content": {
  2446. "application/json": {
  2447. "schema": {
  2448. "type": "object",
  2449. "properties": {
  2450. "patch": {
  2451. "type": "string"
  2452. }
  2453. },
  2454. "required": ["patch"],
  2455. "additionalProperties": false
  2456. }
  2457. }
  2458. }
  2459. },
  2460. "x-codeSamples": [
  2461. {
  2462. "lang": "js",
  2463. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2464. }
  2465. ]
  2466. }
  2467. },
  2468. "/command": {
  2469. "get": {
  2470. "tags": ["instance"],
  2471. "operationId": "command.list",
  2472. "parameters": [
  2473. {
  2474. "name": "directory",
  2475. "in": "query",
  2476. "schema": {
  2477. "type": "string"
  2478. },
  2479. "required": false
  2480. },
  2481. {
  2482. "name": "workspace",
  2483. "in": "query",
  2484. "schema": {
  2485. "type": "string"
  2486. },
  2487. "required": false
  2488. }
  2489. ],
  2490. "responses": {
  2491. "200": {
  2492. "description": "List of commands",
  2493. "content": {
  2494. "application/json": {
  2495. "schema": {
  2496. "type": "array",
  2497. "items": {
  2498. "$ref": "#/components/schemas/Command"
  2499. },
  2500. "description": "List of commands"
  2501. }
  2502. }
  2503. }
  2504. },
  2505. "400": {
  2506. "description": "Bad request",
  2507. "content": {
  2508. "application/json": {
  2509. "schema": {
  2510. "$ref": "#/components/schemas/BadRequestError"
  2511. }
  2512. }
  2513. }
  2514. }
  2515. },
  2516. "description": "Get a list of all available commands in the OpenCode system.",
  2517. "summary": "List commands",
  2518. "x-codeSamples": [
  2519. {
  2520. "lang": "js",
  2521. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2522. }
  2523. ]
  2524. }
  2525. },
  2526. "/agent": {
  2527. "get": {
  2528. "tags": ["instance"],
  2529. "operationId": "app.agents",
  2530. "parameters": [
  2531. {
  2532. "name": "directory",
  2533. "in": "query",
  2534. "schema": {
  2535. "type": "string"
  2536. },
  2537. "required": false
  2538. },
  2539. {
  2540. "name": "workspace",
  2541. "in": "query",
  2542. "schema": {
  2543. "type": "string"
  2544. },
  2545. "required": false
  2546. }
  2547. ],
  2548. "responses": {
  2549. "200": {
  2550. "description": "List of agents",
  2551. "content": {
  2552. "application/json": {
  2553. "schema": {
  2554. "type": "array",
  2555. "items": {
  2556. "$ref": "#/components/schemas/Agent"
  2557. },
  2558. "description": "List of agents"
  2559. }
  2560. }
  2561. }
  2562. },
  2563. "400": {
  2564. "description": "Bad request",
  2565. "content": {
  2566. "application/json": {
  2567. "schema": {
  2568. "$ref": "#/components/schemas/BadRequestError"
  2569. }
  2570. }
  2571. }
  2572. }
  2573. },
  2574. "description": "Get a list of all available AI agents in the OpenCode system.",
  2575. "summary": "List agents",
  2576. "x-codeSamples": [
  2577. {
  2578. "lang": "js",
  2579. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2580. }
  2581. ]
  2582. }
  2583. },
  2584. "/skill": {
  2585. "get": {
  2586. "tags": ["instance"],
  2587. "operationId": "app.skills",
  2588. "parameters": [
  2589. {
  2590. "name": "directory",
  2591. "in": "query",
  2592. "schema": {
  2593. "type": "string"
  2594. },
  2595. "required": false
  2596. },
  2597. {
  2598. "name": "workspace",
  2599. "in": "query",
  2600. "schema": {
  2601. "type": "string"
  2602. },
  2603. "required": false
  2604. }
  2605. ],
  2606. "responses": {
  2607. "200": {
  2608. "description": "List of skills",
  2609. "content": {
  2610. "application/json": {
  2611. "schema": {
  2612. "type": "array",
  2613. "items": {
  2614. "type": "object",
  2615. "properties": {
  2616. "name": {
  2617. "type": "string"
  2618. },
  2619. "description": {
  2620. "type": "string"
  2621. },
  2622. "location": {
  2623. "type": "string"
  2624. },
  2625. "content": {
  2626. "type": "string"
  2627. }
  2628. },
  2629. "required": ["name", "location", "content"],
  2630. "additionalProperties": false
  2631. },
  2632. "description": "List of skills"
  2633. }
  2634. }
  2635. }
  2636. },
  2637. "400": {
  2638. "description": "Bad request",
  2639. "content": {
  2640. "application/json": {
  2641. "schema": {
  2642. "$ref": "#/components/schemas/BadRequestError"
  2643. }
  2644. }
  2645. }
  2646. }
  2647. },
  2648. "description": "Get a list of all available skills in the OpenCode system.",
  2649. "summary": "List skills",
  2650. "x-codeSamples": [
  2651. {
  2652. "lang": "js",
  2653. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2654. }
  2655. ]
  2656. }
  2657. },
  2658. "/lsp": {
  2659. "get": {
  2660. "tags": ["instance"],
  2661. "operationId": "lsp.status",
  2662. "parameters": [
  2663. {
  2664. "name": "directory",
  2665. "in": "query",
  2666. "schema": {
  2667. "type": "string"
  2668. },
  2669. "required": false
  2670. },
  2671. {
  2672. "name": "workspace",
  2673. "in": "query",
  2674. "schema": {
  2675. "type": "string"
  2676. },
  2677. "required": false
  2678. }
  2679. ],
  2680. "responses": {
  2681. "200": {
  2682. "description": "LSP server status",
  2683. "content": {
  2684. "application/json": {
  2685. "schema": {
  2686. "type": "array",
  2687. "items": {
  2688. "$ref": "#/components/schemas/LSPStatus"
  2689. },
  2690. "description": "LSP server status"
  2691. }
  2692. }
  2693. }
  2694. },
  2695. "400": {
  2696. "description": "Bad request",
  2697. "content": {
  2698. "application/json": {
  2699. "schema": {
  2700. "$ref": "#/components/schemas/BadRequestError"
  2701. }
  2702. }
  2703. }
  2704. }
  2705. },
  2706. "description": "Get LSP server status",
  2707. "summary": "Get LSP status",
  2708. "x-codeSamples": [
  2709. {
  2710. "lang": "js",
  2711. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2712. }
  2713. ]
  2714. }
  2715. },
  2716. "/formatter": {
  2717. "get": {
  2718. "tags": ["instance"],
  2719. "operationId": "formatter.status",
  2720. "parameters": [
  2721. {
  2722. "name": "directory",
  2723. "in": "query",
  2724. "schema": {
  2725. "type": "string"
  2726. },
  2727. "required": false
  2728. },
  2729. {
  2730. "name": "workspace",
  2731. "in": "query",
  2732. "schema": {
  2733. "type": "string"
  2734. },
  2735. "required": false
  2736. }
  2737. ],
  2738. "responses": {
  2739. "200": {
  2740. "description": "Formatter status",
  2741. "content": {
  2742. "application/json": {
  2743. "schema": {
  2744. "type": "array",
  2745. "items": {
  2746. "$ref": "#/components/schemas/FormatterStatus"
  2747. },
  2748. "description": "Formatter status"
  2749. }
  2750. }
  2751. }
  2752. },
  2753. "400": {
  2754. "description": "Bad request",
  2755. "content": {
  2756. "application/json": {
  2757. "schema": {
  2758. "$ref": "#/components/schemas/BadRequestError"
  2759. }
  2760. }
  2761. }
  2762. }
  2763. },
  2764. "description": "Get formatter status",
  2765. "summary": "Get formatter status",
  2766. "x-codeSamples": [
  2767. {
  2768. "lang": "js",
  2769. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2770. }
  2771. ]
  2772. }
  2773. },
  2774. "/mcp": {
  2775. "get": {
  2776. "tags": ["mcp"],
  2777. "operationId": "mcp.status",
  2778. "parameters": [
  2779. {
  2780. "name": "directory",
  2781. "in": "query",
  2782. "schema": {
  2783. "type": "string"
  2784. },
  2785. "required": false
  2786. },
  2787. {
  2788. "name": "workspace",
  2789. "in": "query",
  2790. "schema": {
  2791. "type": "string"
  2792. },
  2793. "required": false
  2794. }
  2795. ],
  2796. "responses": {
  2797. "200": {
  2798. "description": "MCP server status",
  2799. "content": {
  2800. "application/json": {
  2801. "schema": {
  2802. "type": "object",
  2803. "additionalProperties": {
  2804. "$ref": "#/components/schemas/MCPStatus"
  2805. },
  2806. "description": "MCP server status"
  2807. }
  2808. }
  2809. }
  2810. },
  2811. "400": {
  2812. "description": "Bad request",
  2813. "content": {
  2814. "application/json": {
  2815. "schema": {
  2816. "$ref": "#/components/schemas/BadRequestError"
  2817. }
  2818. }
  2819. }
  2820. }
  2821. },
  2822. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  2823. "summary": "Get MCP status",
  2824. "x-codeSamples": [
  2825. {
  2826. "lang": "js",
  2827. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  2828. }
  2829. ]
  2830. },
  2831. "post": {
  2832. "tags": ["mcp"],
  2833. "operationId": "mcp.add",
  2834. "parameters": [
  2835. {
  2836. "name": "directory",
  2837. "in": "query",
  2838. "schema": {
  2839. "type": "string"
  2840. },
  2841. "required": false
  2842. },
  2843. {
  2844. "name": "workspace",
  2845. "in": "query",
  2846. "schema": {
  2847. "type": "string"
  2848. },
  2849. "required": false
  2850. }
  2851. ],
  2852. "responses": {
  2853. "200": {
  2854. "description": "MCP server added successfully",
  2855. "content": {
  2856. "application/json": {
  2857. "schema": {
  2858. "type": "object",
  2859. "additionalProperties": {
  2860. "$ref": "#/components/schemas/MCPStatus"
  2861. },
  2862. "description": "MCP server added successfully"
  2863. }
  2864. }
  2865. }
  2866. },
  2867. "400": {
  2868. "description": "BadRequest | InvalidRequestError",
  2869. "content": {
  2870. "application/json": {
  2871. "schema": {
  2872. "anyOf": [
  2873. {
  2874. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  2875. },
  2876. {
  2877. "$ref": "#/components/schemas/InvalidRequestError"
  2878. }
  2879. ]
  2880. }
  2881. }
  2882. }
  2883. }
  2884. },
  2885. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  2886. "summary": "Add MCP server",
  2887. "requestBody": {
  2888. "content": {
  2889. "application/json": {
  2890. "schema": {
  2891. "type": "object",
  2892. "properties": {
  2893. "name": {
  2894. "type": "string"
  2895. },
  2896. "config": {
  2897. "anyOf": [
  2898. {
  2899. "$ref": "#/components/schemas/McpLocalConfig"
  2900. },
  2901. {
  2902. "$ref": "#/components/schemas/McpRemoteConfig"
  2903. }
  2904. ]
  2905. }
  2906. },
  2907. "required": ["name", "config"],
  2908. "additionalProperties": false
  2909. }
  2910. }
  2911. }
  2912. },
  2913. "x-codeSamples": [
  2914. {
  2915. "lang": "js",
  2916. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  2917. }
  2918. ]
  2919. }
  2920. },
  2921. "/mcp/{name}/auth": {
  2922. "post": {
  2923. "tags": ["mcp"],
  2924. "operationId": "mcp.auth.start",
  2925. "parameters": [
  2926. {
  2927. "name": "name",
  2928. "in": "path",
  2929. "schema": {
  2930. "type": "string"
  2931. },
  2932. "required": true
  2933. },
  2934. {
  2935. "name": "directory",
  2936. "in": "query",
  2937. "schema": {
  2938. "type": "string"
  2939. },
  2940. "required": false
  2941. },
  2942. {
  2943. "name": "workspace",
  2944. "in": "query",
  2945. "schema": {
  2946. "type": "string"
  2947. },
  2948. "required": false
  2949. }
  2950. ],
  2951. "responses": {
  2952. "200": {
  2953. "description": "OAuth flow started",
  2954. "content": {
  2955. "application/json": {
  2956. "schema": {
  2957. "type": "object",
  2958. "properties": {
  2959. "authorizationUrl": {
  2960. "type": "string"
  2961. },
  2962. "oauthState": {
  2963. "type": "string"
  2964. }
  2965. },
  2966. "required": ["authorizationUrl", "oauthState"],
  2967. "additionalProperties": false,
  2968. "description": "OAuth flow started"
  2969. }
  2970. }
  2971. }
  2972. },
  2973. "400": {
  2974. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  2975. "content": {
  2976. "application/json": {
  2977. "schema": {
  2978. "anyOf": [
  2979. {
  2980. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  2981. },
  2982. {
  2983. "$ref": "#/components/schemas/InvalidRequestError"
  2984. }
  2985. ]
  2986. }
  2987. }
  2988. }
  2989. },
  2990. "404": {
  2991. "description": "Not found",
  2992. "content": {
  2993. "application/json": {
  2994. "schema": {
  2995. "$ref": "#/components/schemas/NotFoundError"
  2996. }
  2997. }
  2998. }
  2999. }
  3000. },
  3001. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3002. "summary": "Start MCP OAuth",
  3003. "x-codeSamples": [
  3004. {
  3005. "lang": "js",
  3006. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3007. }
  3008. ]
  3009. },
  3010. "delete": {
  3011. "tags": ["mcp"],
  3012. "operationId": "mcp.auth.remove",
  3013. "parameters": [
  3014. {
  3015. "name": "name",
  3016. "in": "path",
  3017. "schema": {
  3018. "type": "string"
  3019. },
  3020. "required": true
  3021. },
  3022. {
  3023. "name": "directory",
  3024. "in": "query",
  3025. "schema": {
  3026. "type": "string"
  3027. },
  3028. "required": false
  3029. },
  3030. {
  3031. "name": "workspace",
  3032. "in": "query",
  3033. "schema": {
  3034. "type": "string"
  3035. },
  3036. "required": false
  3037. }
  3038. ],
  3039. "responses": {
  3040. "200": {
  3041. "description": "OAuth credentials removed",
  3042. "content": {
  3043. "application/json": {
  3044. "schema": {
  3045. "type": "object",
  3046. "properties": {
  3047. "success": {
  3048. "type": "boolean",
  3049. "enum": [true]
  3050. }
  3051. },
  3052. "required": ["success"],
  3053. "additionalProperties": false,
  3054. "description": "OAuth credentials removed"
  3055. }
  3056. }
  3057. }
  3058. },
  3059. "400": {
  3060. "description": "Bad request",
  3061. "content": {
  3062. "application/json": {
  3063. "schema": {
  3064. "$ref": "#/components/schemas/BadRequestError"
  3065. }
  3066. }
  3067. }
  3068. },
  3069. "404": {
  3070. "description": "Not found",
  3071. "content": {
  3072. "application/json": {
  3073. "schema": {
  3074. "$ref": "#/components/schemas/NotFoundError"
  3075. }
  3076. }
  3077. }
  3078. }
  3079. },
  3080. "description": "Remove OAuth credentials for an MCP server.",
  3081. "summary": "Remove MCP OAuth",
  3082. "x-codeSamples": [
  3083. {
  3084. "lang": "js",
  3085. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3086. }
  3087. ]
  3088. }
  3089. },
  3090. "/mcp/{name}/auth/callback": {
  3091. "post": {
  3092. "tags": ["mcp"],
  3093. "operationId": "mcp.auth.callback",
  3094. "parameters": [
  3095. {
  3096. "name": "name",
  3097. "in": "path",
  3098. "schema": {
  3099. "type": "string"
  3100. },
  3101. "required": true
  3102. },
  3103. {
  3104. "name": "directory",
  3105. "in": "query",
  3106. "schema": {
  3107. "type": "string"
  3108. },
  3109. "required": false
  3110. },
  3111. {
  3112. "name": "workspace",
  3113. "in": "query",
  3114. "schema": {
  3115. "type": "string"
  3116. },
  3117. "required": false
  3118. }
  3119. ],
  3120. "responses": {
  3121. "200": {
  3122. "description": "OAuth authentication completed",
  3123. "content": {
  3124. "application/json": {
  3125. "schema": {
  3126. "$ref": "#/components/schemas/MCPStatus"
  3127. }
  3128. }
  3129. }
  3130. },
  3131. "400": {
  3132. "description": "BadRequest | InvalidRequestError",
  3133. "content": {
  3134. "application/json": {
  3135. "schema": {
  3136. "anyOf": [
  3137. {
  3138. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3139. },
  3140. {
  3141. "$ref": "#/components/schemas/InvalidRequestError"
  3142. }
  3143. ]
  3144. }
  3145. }
  3146. }
  3147. },
  3148. "404": {
  3149. "description": "Not found",
  3150. "content": {
  3151. "application/json": {
  3152. "schema": {
  3153. "$ref": "#/components/schemas/NotFoundError"
  3154. }
  3155. }
  3156. }
  3157. }
  3158. },
  3159. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3160. "summary": "Complete MCP OAuth",
  3161. "requestBody": {
  3162. "content": {
  3163. "application/json": {
  3164. "schema": {
  3165. "type": "object",
  3166. "properties": {
  3167. "code": {
  3168. "type": "string"
  3169. }
  3170. },
  3171. "required": ["code"],
  3172. "additionalProperties": false
  3173. }
  3174. }
  3175. }
  3176. },
  3177. "x-codeSamples": [
  3178. {
  3179. "lang": "js",
  3180. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3181. }
  3182. ]
  3183. }
  3184. },
  3185. "/mcp/{name}/auth/authenticate": {
  3186. "post": {
  3187. "tags": ["mcp"],
  3188. "operationId": "mcp.auth.authenticate",
  3189. "parameters": [
  3190. {
  3191. "name": "name",
  3192. "in": "path",
  3193. "schema": {
  3194. "type": "string"
  3195. },
  3196. "required": true
  3197. },
  3198. {
  3199. "name": "directory",
  3200. "in": "query",
  3201. "schema": {
  3202. "type": "string"
  3203. },
  3204. "required": false
  3205. },
  3206. {
  3207. "name": "workspace",
  3208. "in": "query",
  3209. "schema": {
  3210. "type": "string"
  3211. },
  3212. "required": false
  3213. }
  3214. ],
  3215. "responses": {
  3216. "200": {
  3217. "description": "OAuth authentication completed",
  3218. "content": {
  3219. "application/json": {
  3220. "schema": {
  3221. "$ref": "#/components/schemas/MCPStatus"
  3222. }
  3223. }
  3224. }
  3225. },
  3226. "400": {
  3227. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3228. "content": {
  3229. "application/json": {
  3230. "schema": {
  3231. "anyOf": [
  3232. {
  3233. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3234. },
  3235. {
  3236. "$ref": "#/components/schemas/InvalidRequestError"
  3237. }
  3238. ]
  3239. }
  3240. }
  3241. }
  3242. },
  3243. "404": {
  3244. "description": "Not found",
  3245. "content": {
  3246. "application/json": {
  3247. "schema": {
  3248. "$ref": "#/components/schemas/NotFoundError"
  3249. }
  3250. }
  3251. }
  3252. }
  3253. },
  3254. "description": "Start OAuth flow and wait for callback (opens browser).",
  3255. "summary": "Authenticate MCP OAuth",
  3256. "x-codeSamples": [
  3257. {
  3258. "lang": "js",
  3259. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3260. }
  3261. ]
  3262. }
  3263. },
  3264. "/mcp/{name}/connect": {
  3265. "post": {
  3266. "tags": ["mcp"],
  3267. "operationId": "mcp.connect",
  3268. "parameters": [
  3269. {
  3270. "name": "name",
  3271. "in": "path",
  3272. "schema": {
  3273. "type": "string"
  3274. },
  3275. "required": true
  3276. },
  3277. {
  3278. "name": "directory",
  3279. "in": "query",
  3280. "schema": {
  3281. "type": "string"
  3282. },
  3283. "required": false
  3284. },
  3285. {
  3286. "name": "workspace",
  3287. "in": "query",
  3288. "schema": {
  3289. "type": "string"
  3290. },
  3291. "required": false
  3292. }
  3293. ],
  3294. "responses": {
  3295. "200": {
  3296. "description": "MCP server connected successfully",
  3297. "content": {
  3298. "application/json": {
  3299. "schema": {
  3300. "type": "boolean",
  3301. "description": "MCP server connected successfully"
  3302. }
  3303. }
  3304. }
  3305. },
  3306. "400": {
  3307. "description": "Bad request",
  3308. "content": {
  3309. "application/json": {
  3310. "schema": {
  3311. "$ref": "#/components/schemas/BadRequestError"
  3312. }
  3313. }
  3314. }
  3315. }
  3316. },
  3317. "description": "Connect an MCP server.",
  3318. "x-codeSamples": [
  3319. {
  3320. "lang": "js",
  3321. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3322. }
  3323. ]
  3324. }
  3325. },
  3326. "/mcp/{name}/disconnect": {
  3327. "post": {
  3328. "tags": ["mcp"],
  3329. "operationId": "mcp.disconnect",
  3330. "parameters": [
  3331. {
  3332. "name": "name",
  3333. "in": "path",
  3334. "schema": {
  3335. "type": "string"
  3336. },
  3337. "required": true
  3338. },
  3339. {
  3340. "name": "directory",
  3341. "in": "query",
  3342. "schema": {
  3343. "type": "string"
  3344. },
  3345. "required": false
  3346. },
  3347. {
  3348. "name": "workspace",
  3349. "in": "query",
  3350. "schema": {
  3351. "type": "string"
  3352. },
  3353. "required": false
  3354. }
  3355. ],
  3356. "responses": {
  3357. "200": {
  3358. "description": "MCP server disconnected successfully",
  3359. "content": {
  3360. "application/json": {
  3361. "schema": {
  3362. "type": "boolean",
  3363. "description": "MCP server disconnected successfully"
  3364. }
  3365. }
  3366. }
  3367. },
  3368. "400": {
  3369. "description": "Bad request",
  3370. "content": {
  3371. "application/json": {
  3372. "schema": {
  3373. "$ref": "#/components/schemas/BadRequestError"
  3374. }
  3375. }
  3376. }
  3377. }
  3378. },
  3379. "description": "Disconnect an MCP server.",
  3380. "x-codeSamples": [
  3381. {
  3382. "lang": "js",
  3383. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3384. }
  3385. ]
  3386. }
  3387. },
  3388. "/project": {
  3389. "get": {
  3390. "tags": ["project"],
  3391. "operationId": "project.list",
  3392. "parameters": [
  3393. {
  3394. "name": "directory",
  3395. "in": "query",
  3396. "schema": {
  3397. "type": "string"
  3398. },
  3399. "required": false
  3400. },
  3401. {
  3402. "name": "workspace",
  3403. "in": "query",
  3404. "schema": {
  3405. "type": "string"
  3406. },
  3407. "required": false
  3408. }
  3409. ],
  3410. "responses": {
  3411. "200": {
  3412. "description": "List of projects",
  3413. "content": {
  3414. "application/json": {
  3415. "schema": {
  3416. "type": "array",
  3417. "items": {
  3418. "$ref": "#/components/schemas/Project"
  3419. },
  3420. "description": "List of projects"
  3421. }
  3422. }
  3423. }
  3424. },
  3425. "400": {
  3426. "description": "Bad request",
  3427. "content": {
  3428. "application/json": {
  3429. "schema": {
  3430. "$ref": "#/components/schemas/BadRequestError"
  3431. }
  3432. }
  3433. }
  3434. }
  3435. },
  3436. "description": "Get a list of projects that have been opened with OpenCode.",
  3437. "summary": "List all projects",
  3438. "x-codeSamples": [
  3439. {
  3440. "lang": "js",
  3441. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3442. }
  3443. ]
  3444. }
  3445. },
  3446. "/project/current": {
  3447. "get": {
  3448. "tags": ["project"],
  3449. "operationId": "project.current",
  3450. "parameters": [
  3451. {
  3452. "name": "directory",
  3453. "in": "query",
  3454. "schema": {
  3455. "type": "string"
  3456. },
  3457. "required": false
  3458. },
  3459. {
  3460. "name": "workspace",
  3461. "in": "query",
  3462. "schema": {
  3463. "type": "string"
  3464. },
  3465. "required": false
  3466. }
  3467. ],
  3468. "responses": {
  3469. "200": {
  3470. "description": "Current project information",
  3471. "content": {
  3472. "application/json": {
  3473. "schema": {
  3474. "$ref": "#/components/schemas/Project"
  3475. }
  3476. }
  3477. }
  3478. },
  3479. "400": {
  3480. "description": "Bad request",
  3481. "content": {
  3482. "application/json": {
  3483. "schema": {
  3484. "$ref": "#/components/schemas/BadRequestError"
  3485. }
  3486. }
  3487. }
  3488. }
  3489. },
  3490. "description": "Retrieve the currently active project that OpenCode is working with.",
  3491. "summary": "Get current project",
  3492. "x-codeSamples": [
  3493. {
  3494. "lang": "js",
  3495. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3496. }
  3497. ]
  3498. }
  3499. },
  3500. "/project/git/init": {
  3501. "post": {
  3502. "tags": ["project"],
  3503. "operationId": "project.initGit",
  3504. "parameters": [
  3505. {
  3506. "name": "directory",
  3507. "in": "query",
  3508. "schema": {
  3509. "type": "string"
  3510. },
  3511. "required": false
  3512. },
  3513. {
  3514. "name": "workspace",
  3515. "in": "query",
  3516. "schema": {
  3517. "type": "string"
  3518. },
  3519. "required": false
  3520. }
  3521. ],
  3522. "responses": {
  3523. "200": {
  3524. "description": "Project information after git initialization",
  3525. "content": {
  3526. "application/json": {
  3527. "schema": {
  3528. "$ref": "#/components/schemas/Project"
  3529. }
  3530. }
  3531. }
  3532. },
  3533. "400": {
  3534. "description": "Bad request",
  3535. "content": {
  3536. "application/json": {
  3537. "schema": {
  3538. "$ref": "#/components/schemas/BadRequestError"
  3539. }
  3540. }
  3541. }
  3542. }
  3543. },
  3544. "description": "Create a git repository for the current project and return the refreshed project info.",
  3545. "summary": "Initialize git repository",
  3546. "x-codeSamples": [
  3547. {
  3548. "lang": "js",
  3549. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3550. }
  3551. ]
  3552. }
  3553. },
  3554. "/project/{projectID}": {
  3555. "patch": {
  3556. "tags": ["project"],
  3557. "operationId": "project.update",
  3558. "parameters": [
  3559. {
  3560. "name": "projectID",
  3561. "in": "path",
  3562. "schema": {
  3563. "type": "string"
  3564. },
  3565. "required": true
  3566. },
  3567. {
  3568. "name": "directory",
  3569. "in": "query",
  3570. "schema": {
  3571. "type": "string"
  3572. },
  3573. "required": false
  3574. },
  3575. {
  3576. "name": "workspace",
  3577. "in": "query",
  3578. "schema": {
  3579. "type": "string"
  3580. },
  3581. "required": false
  3582. }
  3583. ],
  3584. "responses": {
  3585. "200": {
  3586. "description": "Updated project information",
  3587. "content": {
  3588. "application/json": {
  3589. "schema": {
  3590. "$ref": "#/components/schemas/Project"
  3591. }
  3592. }
  3593. }
  3594. },
  3595. "400": {
  3596. "description": "BadRequest | InvalidRequestError",
  3597. "content": {
  3598. "application/json": {
  3599. "schema": {
  3600. "anyOf": [
  3601. {
  3602. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3603. },
  3604. {
  3605. "$ref": "#/components/schemas/InvalidRequestError"
  3606. }
  3607. ]
  3608. }
  3609. }
  3610. }
  3611. },
  3612. "404": {
  3613. "description": "Not found",
  3614. "content": {
  3615. "application/json": {
  3616. "schema": {
  3617. "$ref": "#/components/schemas/NotFoundError"
  3618. }
  3619. }
  3620. }
  3621. }
  3622. },
  3623. "description": "Update project properties such as name, icon, and commands.",
  3624. "summary": "Update project",
  3625. "requestBody": {
  3626. "content": {
  3627. "application/json": {
  3628. "schema": {
  3629. "type": "object",
  3630. "properties": {
  3631. "name": {
  3632. "type": "string"
  3633. },
  3634. "icon": {
  3635. "type": "object",
  3636. "properties": {
  3637. "url": {
  3638. "type": "string"
  3639. },
  3640. "override": {
  3641. "type": "string"
  3642. },
  3643. "color": {
  3644. "type": "string"
  3645. }
  3646. },
  3647. "additionalProperties": false
  3648. },
  3649. "commands": {
  3650. "type": "object",
  3651. "properties": {
  3652. "start": {
  3653. "type": "string",
  3654. "description": "Startup script to run when creating a new workspace (worktree)"
  3655. }
  3656. },
  3657. "additionalProperties": false
  3658. }
  3659. },
  3660. "additionalProperties": false
  3661. }
  3662. }
  3663. }
  3664. },
  3665. "x-codeSamples": [
  3666. {
  3667. "lang": "js",
  3668. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3669. }
  3670. ]
  3671. }
  3672. },
  3673. "/pty/shells": {
  3674. "get": {
  3675. "tags": ["pty"],
  3676. "operationId": "pty.shells",
  3677. "parameters": [
  3678. {
  3679. "name": "directory",
  3680. "in": "query",
  3681. "schema": {
  3682. "type": "string"
  3683. },
  3684. "required": false
  3685. },
  3686. {
  3687. "name": "workspace",
  3688. "in": "query",
  3689. "schema": {
  3690. "type": "string"
  3691. },
  3692. "required": false
  3693. }
  3694. ],
  3695. "responses": {
  3696. "200": {
  3697. "description": "List of shells",
  3698. "content": {
  3699. "application/json": {
  3700. "schema": {
  3701. "type": "array",
  3702. "items": {
  3703. "type": "object",
  3704. "properties": {
  3705. "path": {
  3706. "type": "string"
  3707. },
  3708. "name": {
  3709. "type": "string"
  3710. },
  3711. "acceptable": {
  3712. "type": "boolean"
  3713. }
  3714. },
  3715. "required": ["path", "name", "acceptable"],
  3716. "additionalProperties": false
  3717. },
  3718. "description": "List of shells"
  3719. }
  3720. }
  3721. }
  3722. },
  3723. "400": {
  3724. "description": "Bad request",
  3725. "content": {
  3726. "application/json": {
  3727. "schema": {
  3728. "$ref": "#/components/schemas/BadRequestError"
  3729. }
  3730. }
  3731. }
  3732. }
  3733. },
  3734. "description": "Get a list of available shells on the system.",
  3735. "summary": "List available shells",
  3736. "x-codeSamples": [
  3737. {
  3738. "lang": "js",
  3739. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  3740. }
  3741. ]
  3742. }
  3743. },
  3744. "/pty": {
  3745. "get": {
  3746. "tags": ["pty"],
  3747. "operationId": "pty.list",
  3748. "parameters": [
  3749. {
  3750. "name": "directory",
  3751. "in": "query",
  3752. "schema": {
  3753. "type": "string"
  3754. },
  3755. "required": false
  3756. },
  3757. {
  3758. "name": "workspace",
  3759. "in": "query",
  3760. "schema": {
  3761. "type": "string"
  3762. },
  3763. "required": false
  3764. }
  3765. ],
  3766. "responses": {
  3767. "200": {
  3768. "description": "List of sessions",
  3769. "content": {
  3770. "application/json": {
  3771. "schema": {
  3772. "type": "array",
  3773. "items": {
  3774. "$ref": "#/components/schemas/Pty"
  3775. },
  3776. "description": "List of sessions"
  3777. }
  3778. }
  3779. }
  3780. },
  3781. "400": {
  3782. "description": "Bad request",
  3783. "content": {
  3784. "application/json": {
  3785. "schema": {
  3786. "$ref": "#/components/schemas/BadRequestError"
  3787. }
  3788. }
  3789. }
  3790. }
  3791. },
  3792. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  3793. "summary": "List PTY sessions",
  3794. "x-codeSamples": [
  3795. {
  3796. "lang": "js",
  3797. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  3798. }
  3799. ]
  3800. },
  3801. "post": {
  3802. "tags": ["pty"],
  3803. "operationId": "pty.create",
  3804. "parameters": [
  3805. {
  3806. "name": "directory",
  3807. "in": "query",
  3808. "schema": {
  3809. "type": "string"
  3810. },
  3811. "required": false
  3812. },
  3813. {
  3814. "name": "workspace",
  3815. "in": "query",
  3816. "schema": {
  3817. "type": "string"
  3818. },
  3819. "required": false
  3820. }
  3821. ],
  3822. "responses": {
  3823. "200": {
  3824. "description": "Created session",
  3825. "content": {
  3826. "application/json": {
  3827. "schema": {
  3828. "$ref": "#/components/schemas/Pty"
  3829. }
  3830. }
  3831. }
  3832. },
  3833. "400": {
  3834. "description": "BadRequest | InvalidRequestError",
  3835. "content": {
  3836. "application/json": {
  3837. "schema": {
  3838. "anyOf": [
  3839. {
  3840. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3841. },
  3842. {
  3843. "$ref": "#/components/schemas/InvalidRequestError"
  3844. }
  3845. ]
  3846. }
  3847. }
  3848. }
  3849. }
  3850. },
  3851. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  3852. "summary": "Create PTY session",
  3853. "requestBody": {
  3854. "content": {
  3855. "application/json": {
  3856. "schema": {
  3857. "type": "object",
  3858. "properties": {
  3859. "command": {
  3860. "type": "string"
  3861. },
  3862. "args": {
  3863. "type": "array",
  3864. "items": {
  3865. "type": "string"
  3866. }
  3867. },
  3868. "cwd": {
  3869. "type": "string"
  3870. },
  3871. "title": {
  3872. "type": "string"
  3873. },
  3874. "env": {
  3875. "type": "object",
  3876. "additionalProperties": {
  3877. "type": "string"
  3878. }
  3879. }
  3880. },
  3881. "additionalProperties": false
  3882. }
  3883. }
  3884. }
  3885. },
  3886. "x-codeSamples": [
  3887. {
  3888. "lang": "js",
  3889. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  3890. }
  3891. ]
  3892. }
  3893. },
  3894. "/pty/{ptyID}": {
  3895. "get": {
  3896. "tags": ["pty"],
  3897. "operationId": "pty.get",
  3898. "parameters": [
  3899. {
  3900. "name": "ptyID",
  3901. "in": "path",
  3902. "schema": {
  3903. "type": "string",
  3904. "pattern": "^pty"
  3905. },
  3906. "required": true
  3907. },
  3908. {
  3909. "name": "directory",
  3910. "in": "query",
  3911. "schema": {
  3912. "type": "string"
  3913. },
  3914. "required": false
  3915. },
  3916. {
  3917. "name": "workspace",
  3918. "in": "query",
  3919. "schema": {
  3920. "type": "string"
  3921. },
  3922. "required": false
  3923. }
  3924. ],
  3925. "responses": {
  3926. "200": {
  3927. "description": "Session info",
  3928. "content": {
  3929. "application/json": {
  3930. "schema": {
  3931. "$ref": "#/components/schemas/Pty"
  3932. }
  3933. }
  3934. }
  3935. },
  3936. "400": {
  3937. "description": "Bad request",
  3938. "content": {
  3939. "application/json": {
  3940. "schema": {
  3941. "$ref": "#/components/schemas/BadRequestError"
  3942. }
  3943. }
  3944. }
  3945. },
  3946. "404": {
  3947. "description": "NotFoundError",
  3948. "content": {
  3949. "application/json": {
  3950. "schema": {
  3951. "$ref": "#/components/schemas/NotFoundError"
  3952. }
  3953. }
  3954. }
  3955. }
  3956. },
  3957. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  3958. "summary": "Get PTY session",
  3959. "x-codeSamples": [
  3960. {
  3961. "lang": "js",
  3962. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  3963. }
  3964. ]
  3965. },
  3966. "put": {
  3967. "tags": ["pty"],
  3968. "operationId": "pty.update",
  3969. "parameters": [
  3970. {
  3971. "name": "ptyID",
  3972. "in": "path",
  3973. "schema": {
  3974. "type": "string",
  3975. "pattern": "^pty"
  3976. },
  3977. "required": true
  3978. },
  3979. {
  3980. "name": "directory",
  3981. "in": "query",
  3982. "schema": {
  3983. "type": "string"
  3984. },
  3985. "required": false
  3986. },
  3987. {
  3988. "name": "workspace",
  3989. "in": "query",
  3990. "schema": {
  3991. "type": "string"
  3992. },
  3993. "required": false
  3994. }
  3995. ],
  3996. "responses": {
  3997. "200": {
  3998. "description": "Updated session",
  3999. "content": {
  4000. "application/json": {
  4001. "schema": {
  4002. "$ref": "#/components/schemas/Pty"
  4003. }
  4004. }
  4005. }
  4006. },
  4007. "400": {
  4008. "description": "BadRequest | InvalidRequestError",
  4009. "content": {
  4010. "application/json": {
  4011. "schema": {
  4012. "anyOf": [
  4013. {
  4014. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4015. },
  4016. {
  4017. "$ref": "#/components/schemas/InvalidRequestError"
  4018. }
  4019. ]
  4020. }
  4021. }
  4022. }
  4023. }
  4024. },
  4025. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4026. "summary": "Update PTY session",
  4027. "requestBody": {
  4028. "content": {
  4029. "application/json": {
  4030. "schema": {
  4031. "type": "object",
  4032. "properties": {
  4033. "title": {
  4034. "type": "string"
  4035. },
  4036. "size": {
  4037. "type": "object",
  4038. "properties": {
  4039. "rows": {
  4040. "type": "integer",
  4041. "exclusiveMinimum": 0
  4042. },
  4043. "cols": {
  4044. "type": "integer",
  4045. "exclusiveMinimum": 0
  4046. }
  4047. },
  4048. "required": ["rows", "cols"],
  4049. "additionalProperties": false
  4050. }
  4051. },
  4052. "additionalProperties": false
  4053. }
  4054. }
  4055. }
  4056. },
  4057. "x-codeSamples": [
  4058. {
  4059. "lang": "js",
  4060. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4061. }
  4062. ]
  4063. },
  4064. "delete": {
  4065. "tags": ["pty"],
  4066. "operationId": "pty.remove",
  4067. "parameters": [
  4068. {
  4069. "name": "ptyID",
  4070. "in": "path",
  4071. "schema": {
  4072. "type": "string",
  4073. "pattern": "^pty"
  4074. },
  4075. "required": true
  4076. },
  4077. {
  4078. "name": "directory",
  4079. "in": "query",
  4080. "schema": {
  4081. "type": "string"
  4082. },
  4083. "required": false
  4084. },
  4085. {
  4086. "name": "workspace",
  4087. "in": "query",
  4088. "schema": {
  4089. "type": "string"
  4090. },
  4091. "required": false
  4092. }
  4093. ],
  4094. "responses": {
  4095. "200": {
  4096. "description": "Session removed",
  4097. "content": {
  4098. "application/json": {
  4099. "schema": {
  4100. "type": "boolean",
  4101. "description": "Session removed"
  4102. }
  4103. }
  4104. }
  4105. },
  4106. "400": {
  4107. "description": "Bad request",
  4108. "content": {
  4109. "application/json": {
  4110. "schema": {
  4111. "$ref": "#/components/schemas/BadRequestError"
  4112. }
  4113. }
  4114. }
  4115. },
  4116. "404": {
  4117. "description": "NotFoundError",
  4118. "content": {
  4119. "application/json": {
  4120. "schema": {
  4121. "$ref": "#/components/schemas/NotFoundError"
  4122. }
  4123. }
  4124. }
  4125. }
  4126. },
  4127. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4128. "summary": "Remove PTY session",
  4129. "x-codeSamples": [
  4130. {
  4131. "lang": "js",
  4132. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4133. }
  4134. ]
  4135. }
  4136. },
  4137. "/pty/{ptyID}/connect-token": {
  4138. "post": {
  4139. "tags": ["pty"],
  4140. "operationId": "pty.connectToken",
  4141. "parameters": [
  4142. {
  4143. "name": "ptyID",
  4144. "in": "path",
  4145. "schema": {
  4146. "type": "string",
  4147. "pattern": "^pty"
  4148. },
  4149. "required": true
  4150. },
  4151. {
  4152. "name": "directory",
  4153. "in": "query",
  4154. "schema": {
  4155. "type": "string"
  4156. },
  4157. "required": false
  4158. },
  4159. {
  4160. "name": "workspace",
  4161. "in": "query",
  4162. "schema": {
  4163. "type": "string"
  4164. },
  4165. "required": false
  4166. }
  4167. ],
  4168. "responses": {
  4169. "200": {
  4170. "description": "WebSocket connect token",
  4171. "content": {
  4172. "application/json": {
  4173. "schema": {
  4174. "type": "object",
  4175. "properties": {
  4176. "ticket": {
  4177. "type": "string"
  4178. },
  4179. "expires_in": {
  4180. "type": "integer",
  4181. "exclusiveMinimum": 0
  4182. }
  4183. },
  4184. "required": ["ticket", "expires_in"],
  4185. "additionalProperties": false,
  4186. "description": "WebSocket connect token"
  4187. }
  4188. }
  4189. }
  4190. },
  4191. "400": {
  4192. "description": "Bad request",
  4193. "content": {
  4194. "application/json": {
  4195. "schema": {
  4196. "$ref": "#/components/schemas/BadRequestError"
  4197. }
  4198. }
  4199. }
  4200. },
  4201. "403": {
  4202. "description": "Forbidden",
  4203. "content": {
  4204. "application/json": {
  4205. "schema": {
  4206. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  4207. }
  4208. }
  4209. }
  4210. },
  4211. "404": {
  4212. "description": "NotFoundError",
  4213. "content": {
  4214. "application/json": {
  4215. "schema": {
  4216. "$ref": "#/components/schemas/NotFoundError"
  4217. }
  4218. }
  4219. }
  4220. }
  4221. },
  4222. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4223. "summary": "Create PTY WebSocket token",
  4224. "x-codeSamples": [
  4225. {
  4226. "lang": "js",
  4227. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4228. }
  4229. ]
  4230. }
  4231. },
  4232. "/question": {
  4233. "get": {
  4234. "tags": ["question"],
  4235. "operationId": "question.list",
  4236. "parameters": [
  4237. {
  4238. "name": "directory",
  4239. "in": "query",
  4240. "schema": {
  4241. "type": "string"
  4242. },
  4243. "required": false
  4244. },
  4245. {
  4246. "name": "workspace",
  4247. "in": "query",
  4248. "schema": {
  4249. "type": "string"
  4250. },
  4251. "required": false
  4252. }
  4253. ],
  4254. "responses": {
  4255. "200": {
  4256. "description": "List of pending questions",
  4257. "content": {
  4258. "application/json": {
  4259. "schema": {
  4260. "type": "array",
  4261. "items": {
  4262. "$ref": "#/components/schemas/QuestionRequest"
  4263. },
  4264. "description": "List of pending questions"
  4265. }
  4266. }
  4267. }
  4268. },
  4269. "400": {
  4270. "description": "Bad request",
  4271. "content": {
  4272. "application/json": {
  4273. "schema": {
  4274. "$ref": "#/components/schemas/BadRequestError"
  4275. }
  4276. }
  4277. }
  4278. }
  4279. },
  4280. "description": "Get all pending question requests across all sessions.",
  4281. "summary": "List pending questions",
  4282. "x-codeSamples": [
  4283. {
  4284. "lang": "js",
  4285. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4286. }
  4287. ]
  4288. }
  4289. },
  4290. "/question/{requestID}/reply": {
  4291. "post": {
  4292. "tags": ["question"],
  4293. "operationId": "question.reply",
  4294. "parameters": [
  4295. {
  4296. "name": "requestID",
  4297. "in": "path",
  4298. "schema": {
  4299. "type": "string",
  4300. "pattern": "^que"
  4301. },
  4302. "required": true
  4303. },
  4304. {
  4305. "name": "directory",
  4306. "in": "query",
  4307. "schema": {
  4308. "type": "string"
  4309. },
  4310. "required": false
  4311. },
  4312. {
  4313. "name": "workspace",
  4314. "in": "query",
  4315. "schema": {
  4316. "type": "string"
  4317. },
  4318. "required": false
  4319. }
  4320. ],
  4321. "responses": {
  4322. "200": {
  4323. "description": "Question answered successfully",
  4324. "content": {
  4325. "application/json": {
  4326. "schema": {
  4327. "type": "boolean",
  4328. "description": "Question answered successfully"
  4329. }
  4330. }
  4331. }
  4332. },
  4333. "400": {
  4334. "description": "BadRequest | InvalidRequestError",
  4335. "content": {
  4336. "application/json": {
  4337. "schema": {
  4338. "anyOf": [
  4339. {
  4340. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4341. },
  4342. {
  4343. "$ref": "#/components/schemas/InvalidRequestError"
  4344. }
  4345. ]
  4346. }
  4347. }
  4348. }
  4349. },
  4350. "404": {
  4351. "description": "Not found",
  4352. "content": {
  4353. "application/json": {
  4354. "schema": {
  4355. "$ref": "#/components/schemas/NotFoundError"
  4356. }
  4357. }
  4358. }
  4359. }
  4360. },
  4361. "description": "Provide answers to a question request from the AI assistant.",
  4362. "summary": "Reply to question request",
  4363. "requestBody": {
  4364. "content": {
  4365. "application/json": {
  4366. "schema": {
  4367. "type": "object",
  4368. "properties": {
  4369. "answers": {
  4370. "type": "array",
  4371. "items": {
  4372. "$ref": "#/components/schemas/QuestionAnswer"
  4373. },
  4374. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4375. }
  4376. },
  4377. "required": ["answers"],
  4378. "additionalProperties": false
  4379. }
  4380. }
  4381. }
  4382. },
  4383. "x-codeSamples": [
  4384. {
  4385. "lang": "js",
  4386. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4387. }
  4388. ]
  4389. }
  4390. },
  4391. "/question/{requestID}/reject": {
  4392. "post": {
  4393. "tags": ["question"],
  4394. "operationId": "question.reject",
  4395. "parameters": [
  4396. {
  4397. "name": "requestID",
  4398. "in": "path",
  4399. "schema": {
  4400. "type": "string",
  4401. "pattern": "^que"
  4402. },
  4403. "required": true
  4404. },
  4405. {
  4406. "name": "directory",
  4407. "in": "query",
  4408. "schema": {
  4409. "type": "string"
  4410. },
  4411. "required": false
  4412. },
  4413. {
  4414. "name": "workspace",
  4415. "in": "query",
  4416. "schema": {
  4417. "type": "string"
  4418. },
  4419. "required": false
  4420. }
  4421. ],
  4422. "responses": {
  4423. "200": {
  4424. "description": "Question rejected successfully",
  4425. "content": {
  4426. "application/json": {
  4427. "schema": {
  4428. "type": "boolean",
  4429. "description": "Question rejected successfully"
  4430. }
  4431. }
  4432. }
  4433. },
  4434. "400": {
  4435. "description": "BadRequest | InvalidRequestError",
  4436. "content": {
  4437. "application/json": {
  4438. "schema": {
  4439. "anyOf": [
  4440. {
  4441. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4442. },
  4443. {
  4444. "$ref": "#/components/schemas/InvalidRequestError"
  4445. }
  4446. ]
  4447. }
  4448. }
  4449. }
  4450. },
  4451. "404": {
  4452. "description": "Not found",
  4453. "content": {
  4454. "application/json": {
  4455. "schema": {
  4456. "$ref": "#/components/schemas/NotFoundError"
  4457. }
  4458. }
  4459. }
  4460. }
  4461. },
  4462. "description": "Reject a question request from the AI assistant.",
  4463. "summary": "Reject question request",
  4464. "x-codeSamples": [
  4465. {
  4466. "lang": "js",
  4467. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4468. }
  4469. ]
  4470. }
  4471. },
  4472. "/permission": {
  4473. "get": {
  4474. "tags": ["permission"],
  4475. "operationId": "permission.list",
  4476. "parameters": [
  4477. {
  4478. "name": "directory",
  4479. "in": "query",
  4480. "schema": {
  4481. "type": "string"
  4482. },
  4483. "required": false
  4484. },
  4485. {
  4486. "name": "workspace",
  4487. "in": "query",
  4488. "schema": {
  4489. "type": "string"
  4490. },
  4491. "required": false
  4492. }
  4493. ],
  4494. "responses": {
  4495. "200": {
  4496. "description": "List of pending permissions",
  4497. "content": {
  4498. "application/json": {
  4499. "schema": {
  4500. "type": "array",
  4501. "items": {
  4502. "$ref": "#/components/schemas/PermissionRequest"
  4503. },
  4504. "description": "List of pending permissions"
  4505. }
  4506. }
  4507. }
  4508. },
  4509. "400": {
  4510. "description": "Bad request",
  4511. "content": {
  4512. "application/json": {
  4513. "schema": {
  4514. "$ref": "#/components/schemas/BadRequestError"
  4515. }
  4516. }
  4517. }
  4518. }
  4519. },
  4520. "description": "Get all pending permission requests across all sessions.",
  4521. "summary": "List pending permissions",
  4522. "x-codeSamples": [
  4523. {
  4524. "lang": "js",
  4525. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4526. }
  4527. ]
  4528. }
  4529. },
  4530. "/permission/{requestID}/reply": {
  4531. "post": {
  4532. "tags": ["permission"],
  4533. "operationId": "permission.reply",
  4534. "parameters": [
  4535. {
  4536. "name": "requestID",
  4537. "in": "path",
  4538. "schema": {
  4539. "type": "string",
  4540. "pattern": "^per"
  4541. },
  4542. "required": true
  4543. },
  4544. {
  4545. "name": "directory",
  4546. "in": "query",
  4547. "schema": {
  4548. "type": "string"
  4549. },
  4550. "required": false
  4551. },
  4552. {
  4553. "name": "workspace",
  4554. "in": "query",
  4555. "schema": {
  4556. "type": "string"
  4557. },
  4558. "required": false
  4559. }
  4560. ],
  4561. "responses": {
  4562. "200": {
  4563. "description": "Permission processed successfully",
  4564. "content": {
  4565. "application/json": {
  4566. "schema": {
  4567. "type": "boolean",
  4568. "description": "Permission processed successfully"
  4569. }
  4570. }
  4571. }
  4572. },
  4573. "400": {
  4574. "description": "BadRequest | InvalidRequestError",
  4575. "content": {
  4576. "application/json": {
  4577. "schema": {
  4578. "anyOf": [
  4579. {
  4580. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4581. },
  4582. {
  4583. "$ref": "#/components/schemas/InvalidRequestError"
  4584. }
  4585. ]
  4586. }
  4587. }
  4588. }
  4589. },
  4590. "404": {
  4591. "description": "Not found",
  4592. "content": {
  4593. "application/json": {
  4594. "schema": {
  4595. "$ref": "#/components/schemas/NotFoundError"
  4596. }
  4597. }
  4598. }
  4599. }
  4600. },
  4601. "description": "Approve or deny a permission request from the AI assistant.",
  4602. "summary": "Respond to permission request",
  4603. "requestBody": {
  4604. "content": {
  4605. "application/json": {
  4606. "schema": {
  4607. "type": "object",
  4608. "properties": {
  4609. "reply": {
  4610. "type": "string",
  4611. "enum": ["once", "always", "reject"]
  4612. },
  4613. "message": {
  4614. "type": "string"
  4615. }
  4616. },
  4617. "required": ["reply"],
  4618. "additionalProperties": false
  4619. }
  4620. }
  4621. }
  4622. },
  4623. "x-codeSamples": [
  4624. {
  4625. "lang": "js",
  4626. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4627. }
  4628. ]
  4629. }
  4630. },
  4631. "/provider": {
  4632. "get": {
  4633. "tags": ["provider"],
  4634. "operationId": "provider.list",
  4635. "parameters": [
  4636. {
  4637. "name": "directory",
  4638. "in": "query",
  4639. "schema": {
  4640. "type": "string"
  4641. },
  4642. "required": false
  4643. },
  4644. {
  4645. "name": "workspace",
  4646. "in": "query",
  4647. "schema": {
  4648. "type": "string"
  4649. },
  4650. "required": false
  4651. }
  4652. ],
  4653. "responses": {
  4654. "200": {
  4655. "description": "List of providers",
  4656. "content": {
  4657. "application/json": {
  4658. "schema": {
  4659. "type": "object",
  4660. "properties": {
  4661. "all": {
  4662. "type": "array",
  4663. "items": {
  4664. "$ref": "#/components/schemas/Provider"
  4665. }
  4666. },
  4667. "default": {
  4668. "type": "object",
  4669. "additionalProperties": {
  4670. "type": "string"
  4671. }
  4672. },
  4673. "connected": {
  4674. "type": "array",
  4675. "items": {
  4676. "type": "string"
  4677. }
  4678. }
  4679. },
  4680. "required": ["all", "default", "connected"],
  4681. "additionalProperties": false,
  4682. "description": "List of providers"
  4683. }
  4684. }
  4685. }
  4686. },
  4687. "400": {
  4688. "description": "Bad request",
  4689. "content": {
  4690. "application/json": {
  4691. "schema": {
  4692. "$ref": "#/components/schemas/BadRequestError"
  4693. }
  4694. }
  4695. }
  4696. }
  4697. },
  4698. "description": "Get a list of all available AI providers, including both available and connected ones.",
  4699. "summary": "List providers",
  4700. "x-codeSamples": [
  4701. {
  4702. "lang": "js",
  4703. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  4704. }
  4705. ]
  4706. }
  4707. },
  4708. "/provider/auth": {
  4709. "get": {
  4710. "tags": ["provider"],
  4711. "operationId": "provider.auth",
  4712. "parameters": [
  4713. {
  4714. "name": "directory",
  4715. "in": "query",
  4716. "schema": {
  4717. "type": "string"
  4718. },
  4719. "required": false
  4720. },
  4721. {
  4722. "name": "workspace",
  4723. "in": "query",
  4724. "schema": {
  4725. "type": "string"
  4726. },
  4727. "required": false
  4728. }
  4729. ],
  4730. "responses": {
  4731. "200": {
  4732. "description": "Provider auth methods",
  4733. "content": {
  4734. "application/json": {
  4735. "schema": {
  4736. "type": "object",
  4737. "additionalProperties": {
  4738. "type": "array",
  4739. "items": {
  4740. "$ref": "#/components/schemas/ProviderAuthMethod"
  4741. }
  4742. },
  4743. "description": "Provider auth methods"
  4744. }
  4745. }
  4746. }
  4747. },
  4748. "400": {
  4749. "description": "Bad request",
  4750. "content": {
  4751. "application/json": {
  4752. "schema": {
  4753. "$ref": "#/components/schemas/BadRequestError"
  4754. }
  4755. }
  4756. }
  4757. }
  4758. },
  4759. "description": "Retrieve available authentication methods for all AI providers.",
  4760. "summary": "Get provider auth methods",
  4761. "x-codeSamples": [
  4762. {
  4763. "lang": "js",
  4764. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  4765. }
  4766. ]
  4767. }
  4768. },
  4769. "/provider/{providerID}/oauth/authorize": {
  4770. "post": {
  4771. "tags": ["provider"],
  4772. "operationId": "provider.oauth.authorize",
  4773. "parameters": [
  4774. {
  4775. "name": "providerID",
  4776. "in": "path",
  4777. "schema": {
  4778. "type": "string"
  4779. },
  4780. "required": true
  4781. },
  4782. {
  4783. "name": "directory",
  4784. "in": "query",
  4785. "schema": {
  4786. "type": "string"
  4787. },
  4788. "required": false
  4789. },
  4790. {
  4791. "name": "workspace",
  4792. "in": "query",
  4793. "schema": {
  4794. "type": "string"
  4795. },
  4796. "required": false
  4797. }
  4798. ],
  4799. "responses": {
  4800. "200": {
  4801. "description": "Authorization URL and method",
  4802. "content": {
  4803. "application/json": {
  4804. "schema": {
  4805. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  4806. }
  4807. }
  4808. }
  4809. },
  4810. "400": {
  4811. "description": "ProviderAuthError | InvalidRequestError",
  4812. "content": {
  4813. "application/json": {
  4814. "schema": {
  4815. "anyOf": [
  4816. {
  4817. "$ref": "#/components/schemas/ProviderAuthError1"
  4818. },
  4819. {
  4820. "$ref": "#/components/schemas/InvalidRequestError"
  4821. }
  4822. ]
  4823. }
  4824. }
  4825. }
  4826. }
  4827. },
  4828. "description": "Start the OAuth authorization flow for a provider.",
  4829. "summary": "Start OAuth authorization",
  4830. "requestBody": {
  4831. "content": {
  4832. "application/json": {
  4833. "schema": {
  4834. "type": "object",
  4835. "properties": {
  4836. "method": {
  4837. "type": "number",
  4838. "description": "Auth method index"
  4839. },
  4840. "inputs": {
  4841. "type": "object",
  4842. "additionalProperties": {
  4843. "type": "string"
  4844. }
  4845. }
  4846. },
  4847. "required": ["method"],
  4848. "additionalProperties": false
  4849. }
  4850. }
  4851. }
  4852. },
  4853. "x-codeSamples": [
  4854. {
  4855. "lang": "js",
  4856. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  4857. }
  4858. ]
  4859. }
  4860. },
  4861. "/provider/{providerID}/oauth/callback": {
  4862. "post": {
  4863. "tags": ["provider"],
  4864. "operationId": "provider.oauth.callback",
  4865. "parameters": [
  4866. {
  4867. "name": "providerID",
  4868. "in": "path",
  4869. "schema": {
  4870. "type": "string"
  4871. },
  4872. "required": true
  4873. },
  4874. {
  4875. "name": "directory",
  4876. "in": "query",
  4877. "schema": {
  4878. "type": "string"
  4879. },
  4880. "required": false
  4881. },
  4882. {
  4883. "name": "workspace",
  4884. "in": "query",
  4885. "schema": {
  4886. "type": "string"
  4887. },
  4888. "required": false
  4889. }
  4890. ],
  4891. "responses": {
  4892. "200": {
  4893. "description": "OAuth callback processed successfully",
  4894. "content": {
  4895. "application/json": {
  4896. "schema": {
  4897. "type": "boolean",
  4898. "description": "OAuth callback processed successfully"
  4899. }
  4900. }
  4901. }
  4902. },
  4903. "400": {
  4904. "description": "ProviderAuthError | InvalidRequestError",
  4905. "content": {
  4906. "application/json": {
  4907. "schema": {
  4908. "anyOf": [
  4909. {
  4910. "$ref": "#/components/schemas/ProviderAuthError1"
  4911. },
  4912. {
  4913. "$ref": "#/components/schemas/InvalidRequestError"
  4914. }
  4915. ]
  4916. }
  4917. }
  4918. }
  4919. }
  4920. },
  4921. "description": "Handle the OAuth callback from a provider after user authorization.",
  4922. "summary": "Handle OAuth callback",
  4923. "requestBody": {
  4924. "content": {
  4925. "application/json": {
  4926. "schema": {
  4927. "type": "object",
  4928. "properties": {
  4929. "method": {
  4930. "type": "number",
  4931. "description": "Auth method index"
  4932. },
  4933. "code": {
  4934. "type": "string"
  4935. }
  4936. },
  4937. "required": ["method"],
  4938. "additionalProperties": false
  4939. }
  4940. }
  4941. }
  4942. },
  4943. "x-codeSamples": [
  4944. {
  4945. "lang": "js",
  4946. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  4947. }
  4948. ]
  4949. }
  4950. },
  4951. "/session": {
  4952. "get": {
  4953. "tags": ["session"],
  4954. "operationId": "session.list",
  4955. "parameters": [
  4956. {
  4957. "name": "directory",
  4958. "in": "query",
  4959. "schema": {
  4960. "type": "string"
  4961. },
  4962. "required": false
  4963. },
  4964. {
  4965. "name": "workspace",
  4966. "in": "query",
  4967. "schema": {
  4968. "type": "string"
  4969. },
  4970. "required": false
  4971. },
  4972. {
  4973. "name": "scope",
  4974. "in": "query",
  4975. "schema": {
  4976. "type": "string",
  4977. "enum": ["project"]
  4978. },
  4979. "required": false
  4980. },
  4981. {
  4982. "name": "path",
  4983. "in": "query",
  4984. "schema": {
  4985. "type": "string"
  4986. },
  4987. "required": false
  4988. },
  4989. {
  4990. "name": "roots",
  4991. "in": "query",
  4992. "schema": {
  4993. "anyOf": [
  4994. {
  4995. "type": "boolean"
  4996. },
  4997. {
  4998. "type": "string",
  4999. "enum": ["true", "false"]
  5000. }
  5001. ]
  5002. },
  5003. "required": false
  5004. },
  5005. {
  5006. "name": "start",
  5007. "in": "query",
  5008. "schema": {
  5009. "type": "number"
  5010. },
  5011. "required": false
  5012. },
  5013. {
  5014. "name": "search",
  5015. "in": "query",
  5016. "schema": {
  5017. "type": "string"
  5018. },
  5019. "required": false
  5020. },
  5021. {
  5022. "name": "limit",
  5023. "in": "query",
  5024. "schema": {
  5025. "type": "number"
  5026. },
  5027. "required": false
  5028. }
  5029. ],
  5030. "responses": {
  5031. "200": {
  5032. "description": "List of sessions",
  5033. "content": {
  5034. "application/json": {
  5035. "schema": {
  5036. "type": "array",
  5037. "items": {
  5038. "$ref": "#/components/schemas/Session"
  5039. },
  5040. "description": "List of sessions"
  5041. }
  5042. }
  5043. }
  5044. },
  5045. "400": {
  5046. "description": "Bad request",
  5047. "content": {
  5048. "application/json": {
  5049. "schema": {
  5050. "$ref": "#/components/schemas/BadRequestError"
  5051. }
  5052. }
  5053. }
  5054. }
  5055. },
  5056. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5057. "summary": "List sessions",
  5058. "x-codeSamples": [
  5059. {
  5060. "lang": "js",
  5061. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5062. }
  5063. ]
  5064. },
  5065. "post": {
  5066. "tags": ["session"],
  5067. "operationId": "session.create",
  5068. "parameters": [
  5069. {
  5070. "name": "directory",
  5071. "in": "query",
  5072. "schema": {
  5073. "type": "string"
  5074. },
  5075. "required": false
  5076. },
  5077. {
  5078. "name": "workspace",
  5079. "in": "query",
  5080. "schema": {
  5081. "type": "string"
  5082. },
  5083. "required": false
  5084. }
  5085. ],
  5086. "responses": {
  5087. "200": {
  5088. "description": "Successfully created session",
  5089. "content": {
  5090. "application/json": {
  5091. "schema": {
  5092. "$ref": "#/components/schemas/Session"
  5093. }
  5094. }
  5095. }
  5096. },
  5097. "400": {
  5098. "description": "BadRequest | InvalidRequestError",
  5099. "content": {
  5100. "application/json": {
  5101. "schema": {
  5102. "anyOf": [
  5103. {
  5104. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5105. },
  5106. {
  5107. "$ref": "#/components/schemas/InvalidRequestError"
  5108. }
  5109. ]
  5110. }
  5111. }
  5112. }
  5113. }
  5114. },
  5115. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5116. "summary": "Create session",
  5117. "requestBody": {
  5118. "content": {
  5119. "application/json": {
  5120. "schema": {
  5121. "type": "object",
  5122. "properties": {
  5123. "parentID": {
  5124. "type": "string",
  5125. "pattern": "^ses"
  5126. },
  5127. "title": {
  5128. "type": "string"
  5129. },
  5130. "agent": {
  5131. "type": "string"
  5132. },
  5133. "model": {
  5134. "type": "object",
  5135. "properties": {
  5136. "id": {
  5137. "type": "string"
  5138. },
  5139. "providerID": {
  5140. "type": "string"
  5141. },
  5142. "variant": {
  5143. "type": "string"
  5144. }
  5145. },
  5146. "required": ["id", "providerID"],
  5147. "additionalProperties": false
  5148. },
  5149. "permission": {
  5150. "$ref": "#/components/schemas/PermissionRuleset"
  5151. },
  5152. "workspaceID": {
  5153. "type": "string",
  5154. "pattern": "^wrk"
  5155. }
  5156. },
  5157. "additionalProperties": false
  5158. }
  5159. }
  5160. }
  5161. },
  5162. "x-codeSamples": [
  5163. {
  5164. "lang": "js",
  5165. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5166. }
  5167. ]
  5168. }
  5169. },
  5170. "/session/status": {
  5171. "get": {
  5172. "tags": ["session"],
  5173. "operationId": "session.status",
  5174. "parameters": [
  5175. {
  5176. "name": "directory",
  5177. "in": "query",
  5178. "schema": {
  5179. "type": "string"
  5180. },
  5181. "required": false
  5182. },
  5183. {
  5184. "name": "workspace",
  5185. "in": "query",
  5186. "schema": {
  5187. "type": "string"
  5188. },
  5189. "required": false
  5190. }
  5191. ],
  5192. "responses": {
  5193. "200": {
  5194. "description": "Get session status",
  5195. "content": {
  5196. "application/json": {
  5197. "schema": {
  5198. "type": "object",
  5199. "additionalProperties": {
  5200. "$ref": "#/components/schemas/SessionStatus"
  5201. },
  5202. "description": "Get session status"
  5203. }
  5204. }
  5205. }
  5206. },
  5207. "400": {
  5208. "description": "BadRequest | InvalidRequestError",
  5209. "content": {
  5210. "application/json": {
  5211. "schema": {
  5212. "anyOf": [
  5213. {
  5214. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5215. },
  5216. {
  5217. "$ref": "#/components/schemas/InvalidRequestError"
  5218. }
  5219. ]
  5220. }
  5221. }
  5222. }
  5223. }
  5224. },
  5225. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5226. "summary": "Get session status",
  5227. "x-codeSamples": [
  5228. {
  5229. "lang": "js",
  5230. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5231. }
  5232. ]
  5233. }
  5234. },
  5235. "/session/{sessionID}": {
  5236. "get": {
  5237. "tags": ["session"],
  5238. "operationId": "session.get",
  5239. "parameters": [
  5240. {
  5241. "name": "sessionID",
  5242. "in": "path",
  5243. "schema": {
  5244. "type": "string",
  5245. "pattern": "^ses"
  5246. },
  5247. "required": true
  5248. },
  5249. {
  5250. "name": "directory",
  5251. "in": "query",
  5252. "schema": {
  5253. "type": "string"
  5254. },
  5255. "required": false
  5256. },
  5257. {
  5258. "name": "workspace",
  5259. "in": "query",
  5260. "schema": {
  5261. "type": "string"
  5262. },
  5263. "required": false
  5264. }
  5265. ],
  5266. "responses": {
  5267. "200": {
  5268. "description": "Get session",
  5269. "content": {
  5270. "application/json": {
  5271. "schema": {
  5272. "$ref": "#/components/schemas/Session"
  5273. }
  5274. }
  5275. }
  5276. },
  5277. "400": {
  5278. "description": "BadRequest | InvalidRequestError",
  5279. "content": {
  5280. "application/json": {
  5281. "schema": {
  5282. "anyOf": [
  5283. {
  5284. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5285. },
  5286. {
  5287. "$ref": "#/components/schemas/InvalidRequestError"
  5288. }
  5289. ]
  5290. }
  5291. }
  5292. }
  5293. },
  5294. "404": {
  5295. "description": "NotFoundError",
  5296. "content": {
  5297. "application/json": {
  5298. "schema": {
  5299. "$ref": "#/components/schemas/NotFoundError"
  5300. }
  5301. }
  5302. }
  5303. }
  5304. },
  5305. "description": "Retrieve detailed information about a specific OpenCode session.",
  5306. "summary": "Get session",
  5307. "x-codeSamples": [
  5308. {
  5309. "lang": "js",
  5310. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5311. }
  5312. ]
  5313. },
  5314. "delete": {
  5315. "tags": ["session"],
  5316. "operationId": "session.delete",
  5317. "parameters": [
  5318. {
  5319. "name": "sessionID",
  5320. "in": "path",
  5321. "schema": {
  5322. "type": "string",
  5323. "pattern": "^ses"
  5324. },
  5325. "required": true
  5326. },
  5327. {
  5328. "name": "directory",
  5329. "in": "query",
  5330. "schema": {
  5331. "type": "string"
  5332. },
  5333. "required": false
  5334. },
  5335. {
  5336. "name": "workspace",
  5337. "in": "query",
  5338. "schema": {
  5339. "type": "string"
  5340. },
  5341. "required": false
  5342. }
  5343. ],
  5344. "responses": {
  5345. "200": {
  5346. "description": "Successfully deleted session",
  5347. "content": {
  5348. "application/json": {
  5349. "schema": {
  5350. "type": "boolean",
  5351. "description": "Successfully deleted session"
  5352. }
  5353. }
  5354. }
  5355. },
  5356. "400": {
  5357. "description": "BadRequest | InvalidRequestError",
  5358. "content": {
  5359. "application/json": {
  5360. "schema": {
  5361. "anyOf": [
  5362. {
  5363. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5364. },
  5365. {
  5366. "$ref": "#/components/schemas/InvalidRequestError"
  5367. }
  5368. ]
  5369. }
  5370. }
  5371. }
  5372. },
  5373. "404": {
  5374. "description": "NotFoundError",
  5375. "content": {
  5376. "application/json": {
  5377. "schema": {
  5378. "$ref": "#/components/schemas/NotFoundError"
  5379. }
  5380. }
  5381. }
  5382. }
  5383. },
  5384. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5385. "summary": "Delete session",
  5386. "x-codeSamples": [
  5387. {
  5388. "lang": "js",
  5389. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5390. }
  5391. ]
  5392. },
  5393. "patch": {
  5394. "tags": ["session"],
  5395. "operationId": "session.update",
  5396. "parameters": [
  5397. {
  5398. "name": "sessionID",
  5399. "in": "path",
  5400. "schema": {
  5401. "type": "string",
  5402. "pattern": "^ses"
  5403. },
  5404. "required": true
  5405. },
  5406. {
  5407. "name": "directory",
  5408. "in": "query",
  5409. "schema": {
  5410. "type": "string"
  5411. },
  5412. "required": false
  5413. },
  5414. {
  5415. "name": "workspace",
  5416. "in": "query",
  5417. "schema": {
  5418. "type": "string"
  5419. },
  5420. "required": false
  5421. }
  5422. ],
  5423. "responses": {
  5424. "200": {
  5425. "description": "Successfully updated session",
  5426. "content": {
  5427. "application/json": {
  5428. "schema": {
  5429. "$ref": "#/components/schemas/Session"
  5430. }
  5431. }
  5432. }
  5433. },
  5434. "400": {
  5435. "description": "BadRequest | InvalidRequestError",
  5436. "content": {
  5437. "application/json": {
  5438. "schema": {
  5439. "anyOf": [
  5440. {
  5441. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5442. },
  5443. {
  5444. "$ref": "#/components/schemas/InvalidRequestError"
  5445. }
  5446. ]
  5447. }
  5448. }
  5449. }
  5450. },
  5451. "404": {
  5452. "description": "NotFoundError",
  5453. "content": {
  5454. "application/json": {
  5455. "schema": {
  5456. "$ref": "#/components/schemas/NotFoundError"
  5457. }
  5458. }
  5459. }
  5460. }
  5461. },
  5462. "description": "Update properties of an existing session, such as title or other metadata.",
  5463. "summary": "Update session",
  5464. "requestBody": {
  5465. "content": {
  5466. "application/json": {
  5467. "schema": {
  5468. "type": "object",
  5469. "properties": {
  5470. "title": {
  5471. "type": "string"
  5472. },
  5473. "permission": {
  5474. "$ref": "#/components/schemas/PermissionRuleset"
  5475. },
  5476. "time": {
  5477. "type": "object",
  5478. "properties": {
  5479. "archived": {
  5480. "type": "number"
  5481. }
  5482. },
  5483. "additionalProperties": false
  5484. }
  5485. },
  5486. "additionalProperties": false
  5487. }
  5488. }
  5489. }
  5490. },
  5491. "x-codeSamples": [
  5492. {
  5493. "lang": "js",
  5494. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5495. }
  5496. ]
  5497. }
  5498. },
  5499. "/session/{sessionID}/children": {
  5500. "get": {
  5501. "tags": ["session"],
  5502. "operationId": "session.children",
  5503. "parameters": [
  5504. {
  5505. "name": "sessionID",
  5506. "in": "path",
  5507. "schema": {
  5508. "type": "string",
  5509. "pattern": "^ses"
  5510. },
  5511. "required": true
  5512. },
  5513. {
  5514. "name": "directory",
  5515. "in": "query",
  5516. "schema": {
  5517. "type": "string"
  5518. },
  5519. "required": false
  5520. },
  5521. {
  5522. "name": "workspace",
  5523. "in": "query",
  5524. "schema": {
  5525. "type": "string"
  5526. },
  5527. "required": false
  5528. }
  5529. ],
  5530. "responses": {
  5531. "200": {
  5532. "description": "List of children",
  5533. "content": {
  5534. "application/json": {
  5535. "schema": {
  5536. "type": "array",
  5537. "items": {
  5538. "$ref": "#/components/schemas/Session"
  5539. },
  5540. "description": "List of children"
  5541. }
  5542. }
  5543. }
  5544. },
  5545. "400": {
  5546. "description": "BadRequest | InvalidRequestError",
  5547. "content": {
  5548. "application/json": {
  5549. "schema": {
  5550. "anyOf": [
  5551. {
  5552. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5553. },
  5554. {
  5555. "$ref": "#/components/schemas/InvalidRequestError"
  5556. }
  5557. ]
  5558. }
  5559. }
  5560. }
  5561. },
  5562. "404": {
  5563. "description": "NotFoundError",
  5564. "content": {
  5565. "application/json": {
  5566. "schema": {
  5567. "$ref": "#/components/schemas/NotFoundError"
  5568. }
  5569. }
  5570. }
  5571. }
  5572. },
  5573. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  5574. "summary": "Get session children",
  5575. "x-codeSamples": [
  5576. {
  5577. "lang": "js",
  5578. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  5579. }
  5580. ]
  5581. }
  5582. },
  5583. "/session/{sessionID}/todo": {
  5584. "get": {
  5585. "tags": ["session"],
  5586. "operationId": "session.todo",
  5587. "parameters": [
  5588. {
  5589. "name": "sessionID",
  5590. "in": "path",
  5591. "schema": {
  5592. "type": "string",
  5593. "pattern": "^ses"
  5594. },
  5595. "required": true
  5596. },
  5597. {
  5598. "name": "directory",
  5599. "in": "query",
  5600. "schema": {
  5601. "type": "string"
  5602. },
  5603. "required": false
  5604. },
  5605. {
  5606. "name": "workspace",
  5607. "in": "query",
  5608. "schema": {
  5609. "type": "string"
  5610. },
  5611. "required": false
  5612. }
  5613. ],
  5614. "responses": {
  5615. "200": {
  5616. "description": "Todo list",
  5617. "content": {
  5618. "application/json": {
  5619. "schema": {
  5620. "type": "array",
  5621. "items": {
  5622. "$ref": "#/components/schemas/Todo"
  5623. },
  5624. "description": "Todo list"
  5625. }
  5626. }
  5627. }
  5628. },
  5629. "400": {
  5630. "description": "BadRequest | InvalidRequestError",
  5631. "content": {
  5632. "application/json": {
  5633. "schema": {
  5634. "anyOf": [
  5635. {
  5636. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5637. },
  5638. {
  5639. "$ref": "#/components/schemas/InvalidRequestError"
  5640. }
  5641. ]
  5642. }
  5643. }
  5644. }
  5645. },
  5646. "404": {
  5647. "description": "NotFoundError",
  5648. "content": {
  5649. "application/json": {
  5650. "schema": {
  5651. "$ref": "#/components/schemas/NotFoundError"
  5652. }
  5653. }
  5654. }
  5655. }
  5656. },
  5657. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  5658. "summary": "Get session todos",
  5659. "x-codeSamples": [
  5660. {
  5661. "lang": "js",
  5662. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  5663. }
  5664. ]
  5665. }
  5666. },
  5667. "/session/{sessionID}/diff": {
  5668. "get": {
  5669. "tags": ["session"],
  5670. "operationId": "session.diff",
  5671. "parameters": [
  5672. {
  5673. "name": "sessionID",
  5674. "in": "path",
  5675. "schema": {
  5676. "type": "string",
  5677. "pattern": "^ses"
  5678. },
  5679. "required": true
  5680. },
  5681. {
  5682. "name": "directory",
  5683. "in": "query",
  5684. "schema": {
  5685. "type": "string"
  5686. },
  5687. "required": false
  5688. },
  5689. {
  5690. "name": "workspace",
  5691. "in": "query",
  5692. "schema": {
  5693. "type": "string"
  5694. },
  5695. "required": false
  5696. },
  5697. {
  5698. "name": "messageID",
  5699. "in": "query",
  5700. "schema": {
  5701. "type": "string",
  5702. "pattern": "^msg"
  5703. },
  5704. "required": false
  5705. }
  5706. ],
  5707. "responses": {
  5708. "200": {
  5709. "description": "Successfully retrieved diff",
  5710. "content": {
  5711. "application/json": {
  5712. "schema": {
  5713. "type": "array",
  5714. "items": {
  5715. "$ref": "#/components/schemas/SnapshotFileDiff"
  5716. },
  5717. "description": "Successfully retrieved diff"
  5718. }
  5719. }
  5720. }
  5721. },
  5722. "400": {
  5723. "description": "Bad request",
  5724. "content": {
  5725. "application/json": {
  5726. "schema": {
  5727. "$ref": "#/components/schemas/BadRequestError"
  5728. }
  5729. }
  5730. }
  5731. }
  5732. },
  5733. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  5734. "summary": "Get message diff",
  5735. "x-codeSamples": [
  5736. {
  5737. "lang": "js",
  5738. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  5739. }
  5740. ]
  5741. }
  5742. },
  5743. "/session/{sessionID}/message": {
  5744. "get": {
  5745. "tags": ["session"],
  5746. "operationId": "session.messages",
  5747. "parameters": [
  5748. {
  5749. "name": "sessionID",
  5750. "in": "path",
  5751. "schema": {
  5752. "type": "string",
  5753. "pattern": "^ses"
  5754. },
  5755. "required": true
  5756. },
  5757. {
  5758. "name": "directory",
  5759. "in": "query",
  5760. "schema": {
  5761. "type": "string"
  5762. },
  5763. "required": false
  5764. },
  5765. {
  5766. "name": "workspace",
  5767. "in": "query",
  5768. "schema": {
  5769. "type": "string"
  5770. },
  5771. "required": false
  5772. },
  5773. {
  5774. "name": "limit",
  5775. "in": "query",
  5776. "schema": {
  5777. "type": "integer",
  5778. "minimum": 0,
  5779. "maximum": 9007199254740991
  5780. },
  5781. "required": false
  5782. },
  5783. {
  5784. "name": "before",
  5785. "in": "query",
  5786. "schema": {
  5787. "type": "string"
  5788. },
  5789. "required": false
  5790. }
  5791. ],
  5792. "responses": {
  5793. "200": {
  5794. "description": "List of messages",
  5795. "content": {
  5796. "application/json": {
  5797. "schema": {
  5798. "type": "array",
  5799. "items": {
  5800. "type": "object",
  5801. "properties": {
  5802. "info": {
  5803. "$ref": "#/components/schemas/Message"
  5804. },
  5805. "parts": {
  5806. "type": "array",
  5807. "items": {
  5808. "$ref": "#/components/schemas/Part"
  5809. }
  5810. }
  5811. },
  5812. "required": ["info", "parts"],
  5813. "additionalProperties": false
  5814. },
  5815. "description": "List of messages"
  5816. }
  5817. }
  5818. }
  5819. },
  5820. "400": {
  5821. "description": "BadRequest | InvalidRequestError",
  5822. "content": {
  5823. "application/json": {
  5824. "schema": {
  5825. "anyOf": [
  5826. {
  5827. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5828. },
  5829. {
  5830. "$ref": "#/components/schemas/InvalidRequestError"
  5831. }
  5832. ]
  5833. }
  5834. }
  5835. }
  5836. },
  5837. "404": {
  5838. "description": "NotFoundError",
  5839. "content": {
  5840. "application/json": {
  5841. "schema": {
  5842. "$ref": "#/components/schemas/NotFoundError"
  5843. }
  5844. }
  5845. }
  5846. }
  5847. },
  5848. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  5849. "summary": "Get session messages",
  5850. "x-codeSamples": [
  5851. {
  5852. "lang": "js",
  5853. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  5854. }
  5855. ]
  5856. },
  5857. "post": {
  5858. "tags": ["session"],
  5859. "operationId": "session.prompt",
  5860. "parameters": [
  5861. {
  5862. "name": "sessionID",
  5863. "in": "path",
  5864. "schema": {
  5865. "type": "string",
  5866. "pattern": "^ses"
  5867. },
  5868. "required": true
  5869. },
  5870. {
  5871. "name": "directory",
  5872. "in": "query",
  5873. "schema": {
  5874. "type": "string"
  5875. },
  5876. "required": false
  5877. },
  5878. {
  5879. "name": "workspace",
  5880. "in": "query",
  5881. "schema": {
  5882. "type": "string"
  5883. },
  5884. "required": false
  5885. }
  5886. ],
  5887. "responses": {
  5888. "200": {
  5889. "description": "Created message",
  5890. "content": {
  5891. "application/json": {
  5892. "schema": {
  5893. "type": "object",
  5894. "required": ["info", "parts"],
  5895. "properties": {
  5896. "info": {
  5897. "$ref": "#/components/schemas/AssistantMessage"
  5898. },
  5899. "parts": {
  5900. "type": "array",
  5901. "items": {
  5902. "$ref": "#/components/schemas/Part"
  5903. }
  5904. }
  5905. }
  5906. }
  5907. }
  5908. }
  5909. },
  5910. "400": {
  5911. "description": "BadRequest | InvalidRequestError",
  5912. "content": {
  5913. "application/json": {
  5914. "schema": {
  5915. "anyOf": [
  5916. {
  5917. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5918. },
  5919. {
  5920. "$ref": "#/components/schemas/InvalidRequestError"
  5921. }
  5922. ]
  5923. }
  5924. }
  5925. }
  5926. },
  5927. "404": {
  5928. "description": "NotFoundError",
  5929. "content": {
  5930. "application/json": {
  5931. "schema": {
  5932. "$ref": "#/components/schemas/NotFoundError"
  5933. }
  5934. }
  5935. }
  5936. }
  5937. },
  5938. "description": "Create and send a new message to a session, streaming the AI response.",
  5939. "summary": "Send message",
  5940. "requestBody": {
  5941. "content": {
  5942. "application/json": {
  5943. "schema": {
  5944. "type": "object",
  5945. "properties": {
  5946. "messageID": {
  5947. "type": "string",
  5948. "pattern": "^msg"
  5949. },
  5950. "model": {
  5951. "type": "object",
  5952. "properties": {
  5953. "providerID": {
  5954. "type": "string"
  5955. },
  5956. "modelID": {
  5957. "type": "string"
  5958. }
  5959. },
  5960. "required": ["providerID", "modelID"],
  5961. "additionalProperties": false
  5962. },
  5963. "agent": {
  5964. "type": "string"
  5965. },
  5966. "noReply": {
  5967. "type": "boolean"
  5968. },
  5969. "tools": {
  5970. "type": "object",
  5971. "additionalProperties": {
  5972. "type": "boolean"
  5973. }
  5974. },
  5975. "format": {
  5976. "$ref": "#/components/schemas/OutputFormat"
  5977. },
  5978. "system": {
  5979. "type": "string"
  5980. },
  5981. "variant": {
  5982. "type": "string"
  5983. },
  5984. "parts": {
  5985. "type": "array",
  5986. "items": {
  5987. "anyOf": [
  5988. {
  5989. "$ref": "#/components/schemas/TextPartInput"
  5990. },
  5991. {
  5992. "$ref": "#/components/schemas/FilePartInput"
  5993. },
  5994. {
  5995. "$ref": "#/components/schemas/AgentPartInput"
  5996. },
  5997. {
  5998. "$ref": "#/components/schemas/SubtaskPartInput"
  5999. }
  6000. ]
  6001. }
  6002. }
  6003. },
  6004. "required": ["parts"],
  6005. "additionalProperties": false
  6006. }
  6007. }
  6008. }
  6009. },
  6010. "x-codeSamples": [
  6011. {
  6012. "lang": "js",
  6013. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6014. }
  6015. ]
  6016. }
  6017. },
  6018. "/session/{sessionID}/message/{messageID}": {
  6019. "get": {
  6020. "tags": ["session"],
  6021. "operationId": "session.message",
  6022. "parameters": [
  6023. {
  6024. "name": "sessionID",
  6025. "in": "path",
  6026. "schema": {
  6027. "type": "string",
  6028. "pattern": "^ses"
  6029. },
  6030. "required": true
  6031. },
  6032. {
  6033. "name": "messageID",
  6034. "in": "path",
  6035. "schema": {
  6036. "type": "string",
  6037. "pattern": "^msg"
  6038. },
  6039. "required": true
  6040. },
  6041. {
  6042. "name": "directory",
  6043. "in": "query",
  6044. "schema": {
  6045. "type": "string"
  6046. },
  6047. "required": false
  6048. },
  6049. {
  6050. "name": "workspace",
  6051. "in": "query",
  6052. "schema": {
  6053. "type": "string"
  6054. },
  6055. "required": false
  6056. }
  6057. ],
  6058. "responses": {
  6059. "200": {
  6060. "description": "Message",
  6061. "content": {
  6062. "application/json": {
  6063. "schema": {
  6064. "type": "object",
  6065. "properties": {
  6066. "info": {
  6067. "$ref": "#/components/schemas/Message"
  6068. },
  6069. "parts": {
  6070. "type": "array",
  6071. "items": {
  6072. "$ref": "#/components/schemas/Part"
  6073. }
  6074. }
  6075. },
  6076. "required": ["info", "parts"],
  6077. "additionalProperties": false,
  6078. "description": "Message"
  6079. }
  6080. }
  6081. }
  6082. },
  6083. "400": {
  6084. "description": "BadRequest | InvalidRequestError",
  6085. "content": {
  6086. "application/json": {
  6087. "schema": {
  6088. "anyOf": [
  6089. {
  6090. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6091. },
  6092. {
  6093. "$ref": "#/components/schemas/InvalidRequestError"
  6094. }
  6095. ]
  6096. }
  6097. }
  6098. }
  6099. },
  6100. "404": {
  6101. "description": "NotFoundError",
  6102. "content": {
  6103. "application/json": {
  6104. "schema": {
  6105. "$ref": "#/components/schemas/NotFoundError"
  6106. }
  6107. }
  6108. }
  6109. }
  6110. },
  6111. "description": "Retrieve a specific message from a session by its message ID.",
  6112. "summary": "Get message",
  6113. "x-codeSamples": [
  6114. {
  6115. "lang": "js",
  6116. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6117. }
  6118. ]
  6119. },
  6120. "delete": {
  6121. "tags": ["session"],
  6122. "operationId": "session.deleteMessage",
  6123. "parameters": [
  6124. {
  6125. "name": "sessionID",
  6126. "in": "path",
  6127. "schema": {
  6128. "type": "string",
  6129. "pattern": "^ses"
  6130. },
  6131. "required": true
  6132. },
  6133. {
  6134. "name": "messageID",
  6135. "in": "path",
  6136. "schema": {
  6137. "type": "string",
  6138. "pattern": "^msg"
  6139. },
  6140. "required": true
  6141. },
  6142. {
  6143. "name": "directory",
  6144. "in": "query",
  6145. "schema": {
  6146. "type": "string"
  6147. },
  6148. "required": false
  6149. },
  6150. {
  6151. "name": "workspace",
  6152. "in": "query",
  6153. "schema": {
  6154. "type": "string"
  6155. },
  6156. "required": false
  6157. }
  6158. ],
  6159. "responses": {
  6160. "200": {
  6161. "description": "Successfully deleted message",
  6162. "content": {
  6163. "application/json": {
  6164. "schema": {
  6165. "type": "boolean",
  6166. "description": "Successfully deleted message"
  6167. }
  6168. }
  6169. }
  6170. },
  6171. "400": {
  6172. "description": "BadRequest | InvalidRequestError",
  6173. "content": {
  6174. "application/json": {
  6175. "schema": {
  6176. "anyOf": [
  6177. {
  6178. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6179. },
  6180. {
  6181. "$ref": "#/components/schemas/InvalidRequestError"
  6182. }
  6183. ]
  6184. }
  6185. }
  6186. }
  6187. },
  6188. "404": {
  6189. "description": "NotFoundError",
  6190. "content": {
  6191. "application/json": {
  6192. "schema": {
  6193. "$ref": "#/components/schemas/NotFoundError"
  6194. }
  6195. }
  6196. }
  6197. }
  6198. },
  6199. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6200. "summary": "Delete message",
  6201. "x-codeSamples": [
  6202. {
  6203. "lang": "js",
  6204. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6205. }
  6206. ]
  6207. }
  6208. },
  6209. "/session/{sessionID}/fork": {
  6210. "post": {
  6211. "tags": ["session"],
  6212. "operationId": "session.fork",
  6213. "parameters": [
  6214. {
  6215. "name": "sessionID",
  6216. "in": "path",
  6217. "schema": {
  6218. "type": "string",
  6219. "pattern": "^ses"
  6220. },
  6221. "required": true
  6222. },
  6223. {
  6224. "name": "directory",
  6225. "in": "query",
  6226. "schema": {
  6227. "type": "string"
  6228. },
  6229. "required": false
  6230. },
  6231. {
  6232. "name": "workspace",
  6233. "in": "query",
  6234. "schema": {
  6235. "type": "string"
  6236. },
  6237. "required": false
  6238. }
  6239. ],
  6240. "responses": {
  6241. "200": {
  6242. "description": "200",
  6243. "content": {
  6244. "application/json": {
  6245. "schema": {
  6246. "$ref": "#/components/schemas/Session"
  6247. }
  6248. }
  6249. }
  6250. },
  6251. "400": {
  6252. "description": "BadRequest | InvalidRequestError",
  6253. "content": {
  6254. "application/json": {
  6255. "schema": {
  6256. "anyOf": [
  6257. {
  6258. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6259. },
  6260. {
  6261. "$ref": "#/components/schemas/InvalidRequestError"
  6262. }
  6263. ]
  6264. }
  6265. }
  6266. }
  6267. },
  6268. "404": {
  6269. "description": "NotFoundError",
  6270. "content": {
  6271. "application/json": {
  6272. "schema": {
  6273. "$ref": "#/components/schemas/NotFoundError"
  6274. }
  6275. }
  6276. }
  6277. }
  6278. },
  6279. "description": "Create a new session by forking an existing session at a specific message point.",
  6280. "summary": "Fork session",
  6281. "requestBody": {
  6282. "content": {
  6283. "application/json": {
  6284. "schema": {
  6285. "type": "object",
  6286. "properties": {
  6287. "messageID": {
  6288. "type": "string",
  6289. "pattern": "^msg"
  6290. }
  6291. },
  6292. "additionalProperties": false
  6293. }
  6294. }
  6295. }
  6296. },
  6297. "x-codeSamples": [
  6298. {
  6299. "lang": "js",
  6300. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6301. }
  6302. ]
  6303. }
  6304. },
  6305. "/session/{sessionID}/abort": {
  6306. "post": {
  6307. "tags": ["session"],
  6308. "operationId": "session.abort",
  6309. "parameters": [
  6310. {
  6311. "name": "sessionID",
  6312. "in": "path",
  6313. "schema": {
  6314. "type": "string",
  6315. "pattern": "^ses"
  6316. },
  6317. "required": true
  6318. },
  6319. {
  6320. "name": "directory",
  6321. "in": "query",
  6322. "schema": {
  6323. "type": "string"
  6324. },
  6325. "required": false
  6326. },
  6327. {
  6328. "name": "workspace",
  6329. "in": "query",
  6330. "schema": {
  6331. "type": "string"
  6332. },
  6333. "required": false
  6334. }
  6335. ],
  6336. "responses": {
  6337. "200": {
  6338. "description": "Aborted session",
  6339. "content": {
  6340. "application/json": {
  6341. "schema": {
  6342. "type": "boolean",
  6343. "description": "Aborted session"
  6344. }
  6345. }
  6346. }
  6347. },
  6348. "400": {
  6349. "description": "BadRequest | InvalidRequestError",
  6350. "content": {
  6351. "application/json": {
  6352. "schema": {
  6353. "anyOf": [
  6354. {
  6355. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6356. },
  6357. {
  6358. "$ref": "#/components/schemas/InvalidRequestError"
  6359. }
  6360. ]
  6361. }
  6362. }
  6363. }
  6364. }
  6365. },
  6366. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6367. "summary": "Abort session",
  6368. "x-codeSamples": [
  6369. {
  6370. "lang": "js",
  6371. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6372. }
  6373. ]
  6374. }
  6375. },
  6376. "/session/{sessionID}/init": {
  6377. "post": {
  6378. "tags": ["session"],
  6379. "operationId": "session.init",
  6380. "parameters": [
  6381. {
  6382. "name": "sessionID",
  6383. "in": "path",
  6384. "schema": {
  6385. "type": "string",
  6386. "pattern": "^ses"
  6387. },
  6388. "required": true
  6389. },
  6390. {
  6391. "name": "directory",
  6392. "in": "query",
  6393. "schema": {
  6394. "type": "string"
  6395. },
  6396. "required": false
  6397. },
  6398. {
  6399. "name": "workspace",
  6400. "in": "query",
  6401. "schema": {
  6402. "type": "string"
  6403. },
  6404. "required": false
  6405. }
  6406. ],
  6407. "responses": {
  6408. "200": {
  6409. "description": "200",
  6410. "content": {
  6411. "application/json": {
  6412. "schema": {
  6413. "type": "boolean",
  6414. "description": "200"
  6415. }
  6416. }
  6417. }
  6418. },
  6419. "400": {
  6420. "description": "BadRequest | InvalidRequestError",
  6421. "content": {
  6422. "application/json": {
  6423. "schema": {
  6424. "anyOf": [
  6425. {
  6426. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6427. },
  6428. {
  6429. "$ref": "#/components/schemas/InvalidRequestError"
  6430. }
  6431. ]
  6432. }
  6433. }
  6434. }
  6435. },
  6436. "404": {
  6437. "description": "NotFoundError",
  6438. "content": {
  6439. "application/json": {
  6440. "schema": {
  6441. "$ref": "#/components/schemas/NotFoundError"
  6442. }
  6443. }
  6444. }
  6445. }
  6446. },
  6447. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6448. "summary": "Initialize session",
  6449. "requestBody": {
  6450. "content": {
  6451. "application/json": {
  6452. "schema": {
  6453. "type": "object",
  6454. "properties": {
  6455. "modelID": {
  6456. "type": "string"
  6457. },
  6458. "providerID": {
  6459. "type": "string"
  6460. },
  6461. "messageID": {
  6462. "type": "string",
  6463. "pattern": "^msg"
  6464. }
  6465. },
  6466. "required": ["modelID", "providerID", "messageID"],
  6467. "additionalProperties": false
  6468. }
  6469. }
  6470. }
  6471. },
  6472. "x-codeSamples": [
  6473. {
  6474. "lang": "js",
  6475. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6476. }
  6477. ]
  6478. }
  6479. },
  6480. "/session/{sessionID}/share": {
  6481. "post": {
  6482. "tags": ["session"],
  6483. "operationId": "session.share",
  6484. "parameters": [
  6485. {
  6486. "name": "sessionID",
  6487. "in": "path",
  6488. "schema": {
  6489. "type": "string",
  6490. "pattern": "^ses"
  6491. },
  6492. "required": true
  6493. },
  6494. {
  6495. "name": "directory",
  6496. "in": "query",
  6497. "schema": {
  6498. "type": "string"
  6499. },
  6500. "required": false
  6501. },
  6502. {
  6503. "name": "workspace",
  6504. "in": "query",
  6505. "schema": {
  6506. "type": "string"
  6507. },
  6508. "required": false
  6509. }
  6510. ],
  6511. "responses": {
  6512. "200": {
  6513. "description": "Successfully shared session",
  6514. "content": {
  6515. "application/json": {
  6516. "schema": {
  6517. "$ref": "#/components/schemas/Session"
  6518. }
  6519. }
  6520. }
  6521. },
  6522. "400": {
  6523. "description": "Bad request",
  6524. "content": {
  6525. "application/json": {
  6526. "schema": {
  6527. "$ref": "#/components/schemas/BadRequestError"
  6528. }
  6529. }
  6530. }
  6531. },
  6532. "404": {
  6533. "description": "NotFoundError",
  6534. "content": {
  6535. "application/json": {
  6536. "schema": {
  6537. "$ref": "#/components/schemas/NotFoundError"
  6538. }
  6539. }
  6540. }
  6541. },
  6542. "500": {
  6543. "description": "InternalServerError",
  6544. "content": {
  6545. "application/json": {
  6546. "schema": {
  6547. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6548. }
  6549. }
  6550. }
  6551. }
  6552. },
  6553. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  6554. "summary": "Share session",
  6555. "x-codeSamples": [
  6556. {
  6557. "lang": "js",
  6558. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  6559. }
  6560. ]
  6561. },
  6562. "delete": {
  6563. "tags": ["session"],
  6564. "operationId": "session.unshare",
  6565. "parameters": [
  6566. {
  6567. "name": "sessionID",
  6568. "in": "path",
  6569. "schema": {
  6570. "type": "string",
  6571. "pattern": "^ses"
  6572. },
  6573. "required": true
  6574. },
  6575. {
  6576. "name": "directory",
  6577. "in": "query",
  6578. "schema": {
  6579. "type": "string"
  6580. },
  6581. "required": false
  6582. },
  6583. {
  6584. "name": "workspace",
  6585. "in": "query",
  6586. "schema": {
  6587. "type": "string"
  6588. },
  6589. "required": false
  6590. }
  6591. ],
  6592. "responses": {
  6593. "200": {
  6594. "description": "Successfully unshared session",
  6595. "content": {
  6596. "application/json": {
  6597. "schema": {
  6598. "$ref": "#/components/schemas/Session"
  6599. }
  6600. }
  6601. }
  6602. },
  6603. "400": {
  6604. "description": "Bad request",
  6605. "content": {
  6606. "application/json": {
  6607. "schema": {
  6608. "$ref": "#/components/schemas/BadRequestError"
  6609. }
  6610. }
  6611. }
  6612. },
  6613. "404": {
  6614. "description": "NotFoundError",
  6615. "content": {
  6616. "application/json": {
  6617. "schema": {
  6618. "$ref": "#/components/schemas/NotFoundError"
  6619. }
  6620. }
  6621. }
  6622. },
  6623. "500": {
  6624. "description": "InternalServerError",
  6625. "content": {
  6626. "application/json": {
  6627. "schema": {
  6628. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6629. }
  6630. }
  6631. }
  6632. }
  6633. },
  6634. "description": "Remove the shareable link for a session, making it private again.",
  6635. "summary": "Unshare session",
  6636. "x-codeSamples": [
  6637. {
  6638. "lang": "js",
  6639. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  6640. }
  6641. ]
  6642. }
  6643. },
  6644. "/session/{sessionID}/summarize": {
  6645. "post": {
  6646. "tags": ["session"],
  6647. "operationId": "session.summarize",
  6648. "parameters": [
  6649. {
  6650. "name": "sessionID",
  6651. "in": "path",
  6652. "schema": {
  6653. "type": "string",
  6654. "pattern": "^ses"
  6655. },
  6656. "required": true
  6657. },
  6658. {
  6659. "name": "directory",
  6660. "in": "query",
  6661. "schema": {
  6662. "type": "string"
  6663. },
  6664. "required": false
  6665. },
  6666. {
  6667. "name": "workspace",
  6668. "in": "query",
  6669. "schema": {
  6670. "type": "string"
  6671. },
  6672. "required": false
  6673. }
  6674. ],
  6675. "responses": {
  6676. "200": {
  6677. "description": "Summarized session",
  6678. "content": {
  6679. "application/json": {
  6680. "schema": {
  6681. "type": "boolean",
  6682. "description": "Summarized session"
  6683. }
  6684. }
  6685. }
  6686. },
  6687. "400": {
  6688. "description": "BadRequest | InvalidRequestError",
  6689. "content": {
  6690. "application/json": {
  6691. "schema": {
  6692. "anyOf": [
  6693. {
  6694. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6695. },
  6696. {
  6697. "$ref": "#/components/schemas/InvalidRequestError"
  6698. }
  6699. ]
  6700. }
  6701. }
  6702. }
  6703. },
  6704. "404": {
  6705. "description": "NotFoundError",
  6706. "content": {
  6707. "application/json": {
  6708. "schema": {
  6709. "$ref": "#/components/schemas/NotFoundError"
  6710. }
  6711. }
  6712. }
  6713. }
  6714. },
  6715. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  6716. "summary": "Summarize session",
  6717. "requestBody": {
  6718. "content": {
  6719. "application/json": {
  6720. "schema": {
  6721. "type": "object",
  6722. "properties": {
  6723. "providerID": {
  6724. "type": "string"
  6725. },
  6726. "modelID": {
  6727. "type": "string"
  6728. },
  6729. "auto": {
  6730. "type": "boolean"
  6731. }
  6732. },
  6733. "required": ["providerID", "modelID"],
  6734. "additionalProperties": false
  6735. }
  6736. }
  6737. }
  6738. },
  6739. "x-codeSamples": [
  6740. {
  6741. "lang": "js",
  6742. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  6743. }
  6744. ]
  6745. }
  6746. },
  6747. "/session/{sessionID}/prompt_async": {
  6748. "post": {
  6749. "tags": ["session"],
  6750. "operationId": "session.prompt_async",
  6751. "parameters": [
  6752. {
  6753. "name": "sessionID",
  6754. "in": "path",
  6755. "schema": {
  6756. "type": "string",
  6757. "pattern": "^ses"
  6758. },
  6759. "required": true
  6760. },
  6761. {
  6762. "name": "directory",
  6763. "in": "query",
  6764. "schema": {
  6765. "type": "string"
  6766. },
  6767. "required": false
  6768. },
  6769. {
  6770. "name": "workspace",
  6771. "in": "query",
  6772. "schema": {
  6773. "type": "string"
  6774. },
  6775. "required": false
  6776. }
  6777. ],
  6778. "responses": {
  6779. "204": {
  6780. "description": "Prompt accepted"
  6781. },
  6782. "400": {
  6783. "description": "BadRequest | InvalidRequestError",
  6784. "content": {
  6785. "application/json": {
  6786. "schema": {
  6787. "anyOf": [
  6788. {
  6789. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6790. },
  6791. {
  6792. "$ref": "#/components/schemas/InvalidRequestError"
  6793. }
  6794. ]
  6795. }
  6796. }
  6797. }
  6798. },
  6799. "404": {
  6800. "description": "NotFoundError",
  6801. "content": {
  6802. "application/json": {
  6803. "schema": {
  6804. "$ref": "#/components/schemas/NotFoundError"
  6805. }
  6806. }
  6807. }
  6808. }
  6809. },
  6810. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  6811. "summary": "Send async message",
  6812. "requestBody": {
  6813. "content": {
  6814. "application/json": {
  6815. "schema": {
  6816. "type": "object",
  6817. "properties": {
  6818. "messageID": {
  6819. "type": "string",
  6820. "pattern": "^msg"
  6821. },
  6822. "model": {
  6823. "type": "object",
  6824. "properties": {
  6825. "providerID": {
  6826. "type": "string"
  6827. },
  6828. "modelID": {
  6829. "type": "string"
  6830. }
  6831. },
  6832. "required": ["providerID", "modelID"],
  6833. "additionalProperties": false
  6834. },
  6835. "agent": {
  6836. "type": "string"
  6837. },
  6838. "noReply": {
  6839. "type": "boolean"
  6840. },
  6841. "tools": {
  6842. "type": "object",
  6843. "additionalProperties": {
  6844. "type": "boolean"
  6845. }
  6846. },
  6847. "format": {
  6848. "$ref": "#/components/schemas/OutputFormat"
  6849. },
  6850. "system": {
  6851. "type": "string"
  6852. },
  6853. "variant": {
  6854. "type": "string"
  6855. },
  6856. "parts": {
  6857. "type": "array",
  6858. "items": {
  6859. "anyOf": [
  6860. {
  6861. "$ref": "#/components/schemas/TextPartInput"
  6862. },
  6863. {
  6864. "$ref": "#/components/schemas/FilePartInput"
  6865. },
  6866. {
  6867. "$ref": "#/components/schemas/AgentPartInput"
  6868. },
  6869. {
  6870. "$ref": "#/components/schemas/SubtaskPartInput"
  6871. }
  6872. ]
  6873. }
  6874. }
  6875. },
  6876. "required": ["parts"],
  6877. "additionalProperties": false
  6878. }
  6879. }
  6880. }
  6881. },
  6882. "x-codeSamples": [
  6883. {
  6884. "lang": "js",
  6885. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  6886. }
  6887. ]
  6888. }
  6889. },
  6890. "/session/{sessionID}/command": {
  6891. "post": {
  6892. "tags": ["session"],
  6893. "operationId": "session.command",
  6894. "parameters": [
  6895. {
  6896. "name": "sessionID",
  6897. "in": "path",
  6898. "schema": {
  6899. "type": "string",
  6900. "pattern": "^ses"
  6901. },
  6902. "required": true
  6903. },
  6904. {
  6905. "name": "directory",
  6906. "in": "query",
  6907. "schema": {
  6908. "type": "string"
  6909. },
  6910. "required": false
  6911. },
  6912. {
  6913. "name": "workspace",
  6914. "in": "query",
  6915. "schema": {
  6916. "type": "string"
  6917. },
  6918. "required": false
  6919. }
  6920. ],
  6921. "responses": {
  6922. "200": {
  6923. "description": "Created message",
  6924. "content": {
  6925. "application/json": {
  6926. "schema": {
  6927. "type": "object",
  6928. "required": ["info", "parts"],
  6929. "properties": {
  6930. "info": {
  6931. "$ref": "#/components/schemas/AssistantMessage"
  6932. },
  6933. "parts": {
  6934. "type": "array",
  6935. "items": {
  6936. "$ref": "#/components/schemas/Part"
  6937. }
  6938. }
  6939. }
  6940. }
  6941. }
  6942. }
  6943. },
  6944. "400": {
  6945. "description": "BadRequest | InvalidRequestError",
  6946. "content": {
  6947. "application/json": {
  6948. "schema": {
  6949. "anyOf": [
  6950. {
  6951. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6952. },
  6953. {
  6954. "$ref": "#/components/schemas/InvalidRequestError"
  6955. }
  6956. ]
  6957. }
  6958. }
  6959. }
  6960. },
  6961. "404": {
  6962. "description": "NotFoundError",
  6963. "content": {
  6964. "application/json": {
  6965. "schema": {
  6966. "$ref": "#/components/schemas/NotFoundError"
  6967. }
  6968. }
  6969. }
  6970. }
  6971. },
  6972. "description": "Send a new command to a session for execution by the AI assistant.",
  6973. "summary": "Send command",
  6974. "requestBody": {
  6975. "content": {
  6976. "application/json": {
  6977. "schema": {
  6978. "type": "object",
  6979. "properties": {
  6980. "messageID": {
  6981. "type": "string",
  6982. "pattern": "^msg"
  6983. },
  6984. "agent": {
  6985. "type": "string"
  6986. },
  6987. "model": {
  6988. "type": "string"
  6989. },
  6990. "arguments": {
  6991. "type": "string"
  6992. },
  6993. "command": {
  6994. "type": "string"
  6995. },
  6996. "variant": {
  6997. "type": "string"
  6998. },
  6999. "parts": {
  7000. "type": "array",
  7001. "items": {
  7002. "type": "object",
  7003. "properties": {
  7004. "id": {
  7005. "type": "string",
  7006. "pattern": "^prt"
  7007. },
  7008. "type": {
  7009. "type": "string",
  7010. "enum": ["file"]
  7011. },
  7012. "mime": {
  7013. "type": "string"
  7014. },
  7015. "filename": {
  7016. "type": "string"
  7017. },
  7018. "url": {
  7019. "type": "string"
  7020. },
  7021. "source": {
  7022. "$ref": "#/components/schemas/FilePartSource"
  7023. }
  7024. },
  7025. "required": ["type", "mime", "url"],
  7026. "additionalProperties": false
  7027. }
  7028. }
  7029. },
  7030. "required": ["arguments", "command"],
  7031. "additionalProperties": false
  7032. }
  7033. }
  7034. }
  7035. },
  7036. "x-codeSamples": [
  7037. {
  7038. "lang": "js",
  7039. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7040. }
  7041. ]
  7042. }
  7043. },
  7044. "/session/{sessionID}/shell": {
  7045. "post": {
  7046. "tags": ["session"],
  7047. "operationId": "session.shell",
  7048. "parameters": [
  7049. {
  7050. "name": "sessionID",
  7051. "in": "path",
  7052. "schema": {
  7053. "type": "string",
  7054. "pattern": "^ses"
  7055. },
  7056. "required": true
  7057. },
  7058. {
  7059. "name": "directory",
  7060. "in": "query",
  7061. "schema": {
  7062. "type": "string"
  7063. },
  7064. "required": false
  7065. },
  7066. {
  7067. "name": "workspace",
  7068. "in": "query",
  7069. "schema": {
  7070. "type": "string"
  7071. },
  7072. "required": false
  7073. }
  7074. ],
  7075. "responses": {
  7076. "200": {
  7077. "description": "Created message",
  7078. "content": {
  7079. "application/json": {
  7080. "schema": {
  7081. "type": "object",
  7082. "properties": {
  7083. "info": {
  7084. "$ref": "#/components/schemas/Message"
  7085. },
  7086. "parts": {
  7087. "type": "array",
  7088. "items": {
  7089. "$ref": "#/components/schemas/Part"
  7090. }
  7091. }
  7092. },
  7093. "required": ["info", "parts"],
  7094. "additionalProperties": false,
  7095. "description": "Created message"
  7096. }
  7097. }
  7098. }
  7099. },
  7100. "400": {
  7101. "description": "BadRequest | InvalidRequestError",
  7102. "content": {
  7103. "application/json": {
  7104. "schema": {
  7105. "anyOf": [
  7106. {
  7107. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7108. },
  7109. {
  7110. "$ref": "#/components/schemas/InvalidRequestError"
  7111. }
  7112. ]
  7113. }
  7114. }
  7115. }
  7116. },
  7117. "404": {
  7118. "description": "NotFoundError",
  7119. "content": {
  7120. "application/json": {
  7121. "schema": {
  7122. "$ref": "#/components/schemas/NotFoundError"
  7123. }
  7124. }
  7125. }
  7126. }
  7127. },
  7128. "description": "Execute a shell command within the session context and return the AI's response.",
  7129. "summary": "Run shell command",
  7130. "requestBody": {
  7131. "content": {
  7132. "application/json": {
  7133. "schema": {
  7134. "type": "object",
  7135. "properties": {
  7136. "messageID": {
  7137. "type": "string",
  7138. "pattern": "^msg"
  7139. },
  7140. "agent": {
  7141. "type": "string"
  7142. },
  7143. "model": {
  7144. "type": "object",
  7145. "properties": {
  7146. "providerID": {
  7147. "type": "string"
  7148. },
  7149. "modelID": {
  7150. "type": "string"
  7151. }
  7152. },
  7153. "required": ["providerID", "modelID"],
  7154. "additionalProperties": false
  7155. },
  7156. "command": {
  7157. "type": "string"
  7158. }
  7159. },
  7160. "required": ["agent", "command"],
  7161. "additionalProperties": false
  7162. }
  7163. }
  7164. }
  7165. },
  7166. "x-codeSamples": [
  7167. {
  7168. "lang": "js",
  7169. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7170. }
  7171. ]
  7172. }
  7173. },
  7174. "/session/{sessionID}/revert": {
  7175. "post": {
  7176. "tags": ["session"],
  7177. "operationId": "session.revert",
  7178. "parameters": [
  7179. {
  7180. "name": "sessionID",
  7181. "in": "path",
  7182. "schema": {
  7183. "type": "string",
  7184. "pattern": "^ses"
  7185. },
  7186. "required": true
  7187. },
  7188. {
  7189. "name": "directory",
  7190. "in": "query",
  7191. "schema": {
  7192. "type": "string"
  7193. },
  7194. "required": false
  7195. },
  7196. {
  7197. "name": "workspace",
  7198. "in": "query",
  7199. "schema": {
  7200. "type": "string"
  7201. },
  7202. "required": false
  7203. }
  7204. ],
  7205. "responses": {
  7206. "200": {
  7207. "description": "Updated session",
  7208. "content": {
  7209. "application/json": {
  7210. "schema": {
  7211. "$ref": "#/components/schemas/Session"
  7212. }
  7213. }
  7214. }
  7215. },
  7216. "400": {
  7217. "description": "BadRequest | InvalidRequestError",
  7218. "content": {
  7219. "application/json": {
  7220. "schema": {
  7221. "anyOf": [
  7222. {
  7223. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7224. },
  7225. {
  7226. "$ref": "#/components/schemas/InvalidRequestError"
  7227. }
  7228. ]
  7229. }
  7230. }
  7231. }
  7232. },
  7233. "404": {
  7234. "description": "NotFoundError",
  7235. "content": {
  7236. "application/json": {
  7237. "schema": {
  7238. "$ref": "#/components/schemas/NotFoundError"
  7239. }
  7240. }
  7241. }
  7242. }
  7243. },
  7244. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7245. "summary": "Revert message",
  7246. "requestBody": {
  7247. "content": {
  7248. "application/json": {
  7249. "schema": {
  7250. "type": "object",
  7251. "properties": {
  7252. "messageID": {
  7253. "type": "string",
  7254. "pattern": "^msg"
  7255. },
  7256. "partID": {
  7257. "type": "string",
  7258. "pattern": "^prt"
  7259. }
  7260. },
  7261. "required": ["messageID"],
  7262. "additionalProperties": false
  7263. }
  7264. }
  7265. }
  7266. },
  7267. "x-codeSamples": [
  7268. {
  7269. "lang": "js",
  7270. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7271. }
  7272. ]
  7273. }
  7274. },
  7275. "/session/{sessionID}/unrevert": {
  7276. "post": {
  7277. "tags": ["session"],
  7278. "operationId": "session.unrevert",
  7279. "parameters": [
  7280. {
  7281. "name": "sessionID",
  7282. "in": "path",
  7283. "schema": {
  7284. "type": "string",
  7285. "pattern": "^ses"
  7286. },
  7287. "required": true
  7288. },
  7289. {
  7290. "name": "directory",
  7291. "in": "query",
  7292. "schema": {
  7293. "type": "string"
  7294. },
  7295. "required": false
  7296. },
  7297. {
  7298. "name": "workspace",
  7299. "in": "query",
  7300. "schema": {
  7301. "type": "string"
  7302. },
  7303. "required": false
  7304. }
  7305. ],
  7306. "responses": {
  7307. "200": {
  7308. "description": "Updated session",
  7309. "content": {
  7310. "application/json": {
  7311. "schema": {
  7312. "$ref": "#/components/schemas/Session"
  7313. }
  7314. }
  7315. }
  7316. },
  7317. "400": {
  7318. "description": "BadRequest | InvalidRequestError",
  7319. "content": {
  7320. "application/json": {
  7321. "schema": {
  7322. "anyOf": [
  7323. {
  7324. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7325. },
  7326. {
  7327. "$ref": "#/components/schemas/InvalidRequestError"
  7328. }
  7329. ]
  7330. }
  7331. }
  7332. }
  7333. },
  7334. "404": {
  7335. "description": "NotFoundError",
  7336. "content": {
  7337. "application/json": {
  7338. "schema": {
  7339. "$ref": "#/components/schemas/NotFoundError"
  7340. }
  7341. }
  7342. }
  7343. }
  7344. },
  7345. "description": "Restore all previously reverted messages in a session.",
  7346. "summary": "Restore reverted messages",
  7347. "x-codeSamples": [
  7348. {
  7349. "lang": "js",
  7350. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7351. }
  7352. ]
  7353. }
  7354. },
  7355. "/session/{sessionID}/permissions/{permissionID}": {
  7356. "post": {
  7357. "tags": ["session"],
  7358. "operationId": "permission.respond",
  7359. "parameters": [
  7360. {
  7361. "name": "sessionID",
  7362. "in": "path",
  7363. "schema": {
  7364. "type": "string",
  7365. "pattern": "^ses"
  7366. },
  7367. "required": true
  7368. },
  7369. {
  7370. "name": "permissionID",
  7371. "in": "path",
  7372. "schema": {
  7373. "type": "string",
  7374. "pattern": "^per"
  7375. },
  7376. "required": true
  7377. },
  7378. {
  7379. "name": "directory",
  7380. "in": "query",
  7381. "schema": {
  7382. "type": "string"
  7383. },
  7384. "required": false
  7385. },
  7386. {
  7387. "name": "workspace",
  7388. "in": "query",
  7389. "schema": {
  7390. "type": "string"
  7391. },
  7392. "required": false
  7393. }
  7394. ],
  7395. "responses": {
  7396. "200": {
  7397. "description": "Permission processed successfully",
  7398. "content": {
  7399. "application/json": {
  7400. "schema": {
  7401. "type": "boolean",
  7402. "description": "Permission processed successfully"
  7403. }
  7404. }
  7405. }
  7406. },
  7407. "400": {
  7408. "description": "BadRequest | InvalidRequestError",
  7409. "content": {
  7410. "application/json": {
  7411. "schema": {
  7412. "anyOf": [
  7413. {
  7414. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7415. },
  7416. {
  7417. "$ref": "#/components/schemas/InvalidRequestError"
  7418. }
  7419. ]
  7420. }
  7421. }
  7422. }
  7423. },
  7424. "404": {
  7425. "description": "NotFoundError",
  7426. "content": {
  7427. "application/json": {
  7428. "schema": {
  7429. "$ref": "#/components/schemas/NotFoundError"
  7430. }
  7431. }
  7432. }
  7433. }
  7434. },
  7435. "description": "Approve or deny a permission request from the AI assistant.",
  7436. "summary": "Respond to permission",
  7437. "deprecated": true,
  7438. "requestBody": {
  7439. "content": {
  7440. "application/json": {
  7441. "schema": {
  7442. "type": "object",
  7443. "properties": {
  7444. "response": {
  7445. "type": "string",
  7446. "enum": ["once", "always", "reject"]
  7447. }
  7448. },
  7449. "required": ["response"],
  7450. "additionalProperties": false
  7451. }
  7452. }
  7453. }
  7454. },
  7455. "x-codeSamples": [
  7456. {
  7457. "lang": "js",
  7458. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7459. }
  7460. ]
  7461. }
  7462. },
  7463. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7464. "delete": {
  7465. "tags": ["session"],
  7466. "operationId": "part.delete",
  7467. "parameters": [
  7468. {
  7469. "name": "sessionID",
  7470. "in": "path",
  7471. "schema": {
  7472. "type": "string",
  7473. "pattern": "^ses"
  7474. },
  7475. "required": true
  7476. },
  7477. {
  7478. "name": "messageID",
  7479. "in": "path",
  7480. "schema": {
  7481. "type": "string",
  7482. "pattern": "^msg"
  7483. },
  7484. "required": true
  7485. },
  7486. {
  7487. "name": "partID",
  7488. "in": "path",
  7489. "schema": {
  7490. "type": "string",
  7491. "pattern": "^prt"
  7492. },
  7493. "required": true
  7494. },
  7495. {
  7496. "name": "directory",
  7497. "in": "query",
  7498. "schema": {
  7499. "type": "string"
  7500. },
  7501. "required": false
  7502. },
  7503. {
  7504. "name": "workspace",
  7505. "in": "query",
  7506. "schema": {
  7507. "type": "string"
  7508. },
  7509. "required": false
  7510. }
  7511. ],
  7512. "responses": {
  7513. "200": {
  7514. "description": "Successfully deleted part",
  7515. "content": {
  7516. "application/json": {
  7517. "schema": {
  7518. "type": "boolean",
  7519. "description": "Successfully deleted part"
  7520. }
  7521. }
  7522. }
  7523. },
  7524. "400": {
  7525. "description": "BadRequest | InvalidRequestError",
  7526. "content": {
  7527. "application/json": {
  7528. "schema": {
  7529. "anyOf": [
  7530. {
  7531. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7532. },
  7533. {
  7534. "$ref": "#/components/schemas/InvalidRequestError"
  7535. }
  7536. ]
  7537. }
  7538. }
  7539. }
  7540. },
  7541. "404": {
  7542. "description": "NotFoundError",
  7543. "content": {
  7544. "application/json": {
  7545. "schema": {
  7546. "$ref": "#/components/schemas/NotFoundError"
  7547. }
  7548. }
  7549. }
  7550. }
  7551. },
  7552. "description": "Delete a part from a message.",
  7553. "x-codeSamples": [
  7554. {
  7555. "lang": "js",
  7556. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  7557. }
  7558. ]
  7559. },
  7560. "patch": {
  7561. "tags": ["session"],
  7562. "operationId": "part.update",
  7563. "parameters": [
  7564. {
  7565. "name": "sessionID",
  7566. "in": "path",
  7567. "schema": {
  7568. "type": "string",
  7569. "pattern": "^ses"
  7570. },
  7571. "required": true
  7572. },
  7573. {
  7574. "name": "messageID",
  7575. "in": "path",
  7576. "schema": {
  7577. "type": "string",
  7578. "pattern": "^msg"
  7579. },
  7580. "required": true
  7581. },
  7582. {
  7583. "name": "partID",
  7584. "in": "path",
  7585. "schema": {
  7586. "type": "string",
  7587. "pattern": "^prt"
  7588. },
  7589. "required": true
  7590. },
  7591. {
  7592. "name": "directory",
  7593. "in": "query",
  7594. "schema": {
  7595. "type": "string"
  7596. },
  7597. "required": false
  7598. },
  7599. {
  7600. "name": "workspace",
  7601. "in": "query",
  7602. "schema": {
  7603. "type": "string"
  7604. },
  7605. "required": false
  7606. }
  7607. ],
  7608. "responses": {
  7609. "200": {
  7610. "description": "Successfully updated part",
  7611. "content": {
  7612. "application/json": {
  7613. "schema": {
  7614. "$ref": "#/components/schemas/Part"
  7615. }
  7616. }
  7617. }
  7618. },
  7619. "400": {
  7620. "description": "BadRequest | InvalidRequestError",
  7621. "content": {
  7622. "application/json": {
  7623. "schema": {
  7624. "anyOf": [
  7625. {
  7626. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7627. },
  7628. {
  7629. "$ref": "#/components/schemas/InvalidRequestError"
  7630. }
  7631. ]
  7632. }
  7633. }
  7634. }
  7635. },
  7636. "404": {
  7637. "description": "NotFoundError",
  7638. "content": {
  7639. "application/json": {
  7640. "schema": {
  7641. "$ref": "#/components/schemas/NotFoundError"
  7642. }
  7643. }
  7644. }
  7645. }
  7646. },
  7647. "description": "Update a part in a message.",
  7648. "requestBody": {
  7649. "content": {
  7650. "application/json": {
  7651. "schema": {
  7652. "$ref": "#/components/schemas/Part"
  7653. }
  7654. }
  7655. }
  7656. },
  7657. "x-codeSamples": [
  7658. {
  7659. "lang": "js",
  7660. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  7661. }
  7662. ]
  7663. }
  7664. },
  7665. "/sync/start": {
  7666. "post": {
  7667. "tags": ["sync"],
  7668. "operationId": "sync.start",
  7669. "parameters": [
  7670. {
  7671. "name": "directory",
  7672. "in": "query",
  7673. "schema": {
  7674. "type": "string"
  7675. },
  7676. "required": false
  7677. },
  7678. {
  7679. "name": "workspace",
  7680. "in": "query",
  7681. "schema": {
  7682. "type": "string"
  7683. },
  7684. "required": false
  7685. }
  7686. ],
  7687. "responses": {
  7688. "200": {
  7689. "description": "Workspace sync started",
  7690. "content": {
  7691. "application/json": {
  7692. "schema": {
  7693. "type": "boolean",
  7694. "description": "Workspace sync started"
  7695. }
  7696. }
  7697. }
  7698. },
  7699. "400": {
  7700. "description": "Bad request",
  7701. "content": {
  7702. "application/json": {
  7703. "schema": {
  7704. "$ref": "#/components/schemas/BadRequestError"
  7705. }
  7706. }
  7707. }
  7708. }
  7709. },
  7710. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  7711. "summary": "Start workspace sync",
  7712. "x-codeSamples": [
  7713. {
  7714. "lang": "js",
  7715. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  7716. }
  7717. ]
  7718. }
  7719. },
  7720. "/sync/replay": {
  7721. "post": {
  7722. "tags": ["sync"],
  7723. "operationId": "sync.replay",
  7724. "parameters": [
  7725. {
  7726. "name": "directory",
  7727. "in": "query",
  7728. "schema": {
  7729. "type": "string"
  7730. },
  7731. "required": false
  7732. },
  7733. {
  7734. "name": "workspace",
  7735. "in": "query",
  7736. "schema": {
  7737. "type": "string"
  7738. },
  7739. "required": false
  7740. }
  7741. ],
  7742. "responses": {
  7743. "200": {
  7744. "description": "Replayed sync events",
  7745. "content": {
  7746. "application/json": {
  7747. "schema": {
  7748. "type": "object",
  7749. "properties": {
  7750. "sessionID": {
  7751. "type": "string"
  7752. }
  7753. },
  7754. "required": ["sessionID"],
  7755. "additionalProperties": false,
  7756. "description": "Replayed sync events"
  7757. }
  7758. }
  7759. }
  7760. },
  7761. "400": {
  7762. "description": "BadRequest | InvalidRequestError",
  7763. "content": {
  7764. "application/json": {
  7765. "schema": {
  7766. "anyOf": [
  7767. {
  7768. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7769. },
  7770. {
  7771. "$ref": "#/components/schemas/InvalidRequestError"
  7772. }
  7773. ]
  7774. }
  7775. }
  7776. }
  7777. }
  7778. },
  7779. "description": "Validate and replay a complete sync event history.",
  7780. "summary": "Replay sync events",
  7781. "requestBody": {
  7782. "content": {
  7783. "application/json": {
  7784. "schema": {
  7785. "type": "object",
  7786. "properties": {
  7787. "directory": {
  7788. "type": "string"
  7789. },
  7790. "events": {
  7791. "type": "array",
  7792. "minItems": 1,
  7793. "items": {
  7794. "type": "object",
  7795. "properties": {
  7796. "id": {
  7797. "type": "string"
  7798. },
  7799. "aggregateID": {
  7800. "type": "string"
  7801. },
  7802. "seq": {
  7803. "type": "integer",
  7804. "minimum": 0
  7805. },
  7806. "type": {
  7807. "type": "string"
  7808. },
  7809. "data": {
  7810. "type": "object"
  7811. }
  7812. },
  7813. "required": ["id", "aggregateID", "seq", "type", "data"],
  7814. "additionalProperties": false
  7815. }
  7816. }
  7817. },
  7818. "required": ["directory", "events"],
  7819. "additionalProperties": false
  7820. }
  7821. }
  7822. }
  7823. },
  7824. "x-codeSamples": [
  7825. {
  7826. "lang": "js",
  7827. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  7828. }
  7829. ]
  7830. }
  7831. },
  7832. "/sync/steal": {
  7833. "post": {
  7834. "tags": ["sync"],
  7835. "operationId": "sync.steal",
  7836. "parameters": [
  7837. {
  7838. "name": "directory",
  7839. "in": "query",
  7840. "schema": {
  7841. "type": "string"
  7842. },
  7843. "required": false
  7844. },
  7845. {
  7846. "name": "workspace",
  7847. "in": "query",
  7848. "schema": {
  7849. "type": "string"
  7850. },
  7851. "required": false
  7852. }
  7853. ],
  7854. "responses": {
  7855. "200": {
  7856. "description": "Session stolen into workspace",
  7857. "content": {
  7858. "application/json": {
  7859. "schema": {
  7860. "type": "object",
  7861. "properties": {
  7862. "sessionID": {
  7863. "type": "string",
  7864. "pattern": "^ses"
  7865. }
  7866. },
  7867. "required": ["sessionID"],
  7868. "additionalProperties": false,
  7869. "description": "Session stolen into workspace"
  7870. }
  7871. }
  7872. }
  7873. },
  7874. "400": {
  7875. "description": "BadRequest | InvalidRequestError",
  7876. "content": {
  7877. "application/json": {
  7878. "schema": {
  7879. "anyOf": [
  7880. {
  7881. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7882. },
  7883. {
  7884. "$ref": "#/components/schemas/InvalidRequestError"
  7885. }
  7886. ]
  7887. }
  7888. }
  7889. }
  7890. }
  7891. },
  7892. "description": "Update a session to belong to the current workspace through the sync event system.",
  7893. "summary": "Steal session into workspace",
  7894. "requestBody": {
  7895. "content": {
  7896. "application/json": {
  7897. "schema": {
  7898. "type": "object",
  7899. "properties": {
  7900. "sessionID": {
  7901. "type": "string",
  7902. "pattern": "^ses"
  7903. }
  7904. },
  7905. "required": ["sessionID"],
  7906. "additionalProperties": false
  7907. }
  7908. }
  7909. }
  7910. },
  7911. "x-codeSamples": [
  7912. {
  7913. "lang": "js",
  7914. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  7915. }
  7916. ]
  7917. }
  7918. },
  7919. "/sync/history": {
  7920. "post": {
  7921. "tags": ["sync"],
  7922. "operationId": "sync.history.list",
  7923. "parameters": [
  7924. {
  7925. "name": "directory",
  7926. "in": "query",
  7927. "schema": {
  7928. "type": "string"
  7929. },
  7930. "required": false
  7931. },
  7932. {
  7933. "name": "workspace",
  7934. "in": "query",
  7935. "schema": {
  7936. "type": "string"
  7937. },
  7938. "required": false
  7939. }
  7940. ],
  7941. "responses": {
  7942. "200": {
  7943. "description": "Sync events",
  7944. "content": {
  7945. "application/json": {
  7946. "schema": {
  7947. "type": "array",
  7948. "items": {
  7949. "type": "object",
  7950. "properties": {
  7951. "id": {
  7952. "type": "string"
  7953. },
  7954. "aggregate_id": {
  7955. "type": "string"
  7956. },
  7957. "seq": {
  7958. "type": "integer",
  7959. "minimum": 0
  7960. },
  7961. "type": {
  7962. "type": "string"
  7963. },
  7964. "data": {
  7965. "type": "object"
  7966. }
  7967. },
  7968. "required": ["id", "aggregate_id", "seq", "type", "data"],
  7969. "additionalProperties": false
  7970. },
  7971. "description": "Sync events"
  7972. }
  7973. }
  7974. }
  7975. },
  7976. "400": {
  7977. "description": "BadRequest | InvalidRequestError",
  7978. "content": {
  7979. "application/json": {
  7980. "schema": {
  7981. "anyOf": [
  7982. {
  7983. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7984. },
  7985. {
  7986. "$ref": "#/components/schemas/InvalidRequestError"
  7987. }
  7988. ]
  7989. }
  7990. }
  7991. }
  7992. }
  7993. },
  7994. "description": "List sync events for all aggregates. Keys are aggregate IDs the client already knows about, values are the last known sequence ID. Events with seq > value are returned for those aggregates. Aggregates not listed in the input get their full history.",
  7995. "summary": "List sync events",
  7996. "requestBody": {
  7997. "content": {
  7998. "application/json": {
  7999. "schema": {
  8000. "type": "object",
  8001. "additionalProperties": {
  8002. "type": "integer",
  8003. "minimum": 0
  8004. }
  8005. }
  8006. }
  8007. }
  8008. },
  8009. "x-codeSamples": [
  8010. {
  8011. "lang": "js",
  8012. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8013. }
  8014. ]
  8015. }
  8016. },
  8017. "/api/session": {
  8018. "get": {
  8019. "tags": ["v2"],
  8020. "operationId": "v2.session.list",
  8021. "parameters": [
  8022. {
  8023. "name": "directory",
  8024. "in": "query",
  8025. "schema": {
  8026. "type": "string"
  8027. },
  8028. "required": false
  8029. },
  8030. {
  8031. "name": "workspace",
  8032. "in": "query",
  8033. "schema": {
  8034. "type": "string"
  8035. },
  8036. "required": false
  8037. },
  8038. {
  8039. "name": "limit",
  8040. "in": "query",
  8041. "schema": {
  8042. "type": "number"
  8043. },
  8044. "required": false
  8045. },
  8046. {
  8047. "name": "order",
  8048. "in": "query",
  8049. "schema": {
  8050. "type": "string",
  8051. "enum": ["asc", "desc"]
  8052. },
  8053. "required": false
  8054. },
  8055. {
  8056. "name": "path",
  8057. "in": "query",
  8058. "schema": {
  8059. "type": "string"
  8060. },
  8061. "required": false
  8062. },
  8063. {
  8064. "name": "roots",
  8065. "in": "query",
  8066. "schema": {
  8067. "anyOf": [
  8068. {
  8069. "type": "boolean"
  8070. },
  8071. {
  8072. "type": "string",
  8073. "enum": ["true", "false"]
  8074. }
  8075. ]
  8076. },
  8077. "required": false
  8078. },
  8079. {
  8080. "name": "start",
  8081. "in": "query",
  8082. "schema": {
  8083. "type": "number"
  8084. },
  8085. "required": false
  8086. },
  8087. {
  8088. "name": "search",
  8089. "in": "query",
  8090. "schema": {
  8091. "type": "string"
  8092. },
  8093. "required": false
  8094. },
  8095. {
  8096. "name": "cursor",
  8097. "in": "query",
  8098. "schema": {
  8099. "type": "string",
  8100. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order or filters."
  8101. },
  8102. "required": false
  8103. }
  8104. ],
  8105. "security": [],
  8106. "responses": {
  8107. "200": {
  8108. "description": "V2SessionsResponse",
  8109. "content": {
  8110. "application/json": {
  8111. "schema": {
  8112. "$ref": "#/components/schemas/V2SessionsResponse"
  8113. }
  8114. }
  8115. }
  8116. },
  8117. "400": {
  8118. "description": "InvalidCursorError | InvalidRequestError",
  8119. "content": {
  8120. "application/json": {
  8121. "schema": {
  8122. "anyOf": [
  8123. {
  8124. "$ref": "#/components/schemas/InvalidCursorError"
  8125. },
  8126. {
  8127. "$ref": "#/components/schemas/InvalidRequestError"
  8128. },
  8129. {
  8130. "$ref": "#/components/schemas/InvalidRequestError"
  8131. }
  8132. ]
  8133. }
  8134. }
  8135. }
  8136. },
  8137. "401": {
  8138. "description": "UnauthorizedError",
  8139. "content": {
  8140. "application/json": {
  8141. "schema": {
  8142. "$ref": "#/components/schemas/UnauthorizedError"
  8143. }
  8144. }
  8145. }
  8146. }
  8147. },
  8148. "description": "Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.",
  8149. "summary": "List v2 sessions",
  8150. "x-codeSamples": [
  8151. {
  8152. "lang": "js",
  8153. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  8154. }
  8155. ]
  8156. }
  8157. },
  8158. "/api/session/{sessionID}/prompt": {
  8159. "post": {
  8160. "tags": ["v2"],
  8161. "operationId": "v2.session.prompt",
  8162. "parameters": [
  8163. {
  8164. "name": "sessionID",
  8165. "in": "path",
  8166. "schema": {
  8167. "type": "string",
  8168. "pattern": "^ses"
  8169. },
  8170. "required": true
  8171. },
  8172. {
  8173. "name": "directory",
  8174. "in": "query",
  8175. "schema": {
  8176. "type": "string"
  8177. },
  8178. "required": false
  8179. },
  8180. {
  8181. "name": "workspace",
  8182. "in": "query",
  8183. "schema": {
  8184. "type": "string"
  8185. },
  8186. "required": false
  8187. }
  8188. ],
  8189. "security": [],
  8190. "responses": {
  8191. "200": {
  8192. "description": "Session.Message",
  8193. "content": {
  8194. "application/json": {
  8195. "schema": {
  8196. "$ref": "#/components/schemas/SessionMessage"
  8197. }
  8198. }
  8199. }
  8200. },
  8201. "400": {
  8202. "description": "InvalidRequestError",
  8203. "content": {
  8204. "application/json": {
  8205. "schema": {
  8206. "$ref": "#/components/schemas/InvalidRequestError"
  8207. }
  8208. }
  8209. }
  8210. },
  8211. "401": {
  8212. "description": "UnauthorizedError",
  8213. "content": {
  8214. "application/json": {
  8215. "schema": {
  8216. "$ref": "#/components/schemas/UnauthorizedError"
  8217. }
  8218. }
  8219. }
  8220. }
  8221. },
  8222. "description": "Create a v2 session message and queue it for the agent loop.",
  8223. "summary": "Send v2 message",
  8224. "requestBody": {
  8225. "content": {
  8226. "application/json": {
  8227. "schema": {
  8228. "type": "object",
  8229. "properties": {
  8230. "prompt": {
  8231. "$ref": "#/components/schemas/Prompt"
  8232. },
  8233. "delivery": {
  8234. "$ref": "#/components/schemas/SessionDelivery"
  8235. }
  8236. },
  8237. "required": ["prompt"],
  8238. "additionalProperties": false
  8239. }
  8240. }
  8241. }
  8242. },
  8243. "x-codeSamples": [
  8244. {
  8245. "lang": "js",
  8246. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  8247. }
  8248. ]
  8249. }
  8250. },
  8251. "/api/session/{sessionID}/compact": {
  8252. "post": {
  8253. "tags": ["v2"],
  8254. "operationId": "v2.session.compact",
  8255. "parameters": [
  8256. {
  8257. "name": "sessionID",
  8258. "in": "path",
  8259. "schema": {
  8260. "type": "string",
  8261. "pattern": "^ses"
  8262. },
  8263. "required": true
  8264. },
  8265. {
  8266. "name": "directory",
  8267. "in": "query",
  8268. "schema": {
  8269. "type": "string"
  8270. },
  8271. "required": false
  8272. },
  8273. {
  8274. "name": "workspace",
  8275. "in": "query",
  8276. "schema": {
  8277. "type": "string"
  8278. },
  8279. "required": false
  8280. }
  8281. ],
  8282. "security": [],
  8283. "responses": {
  8284. "204": {
  8285. "description": "<No Content>"
  8286. },
  8287. "400": {
  8288. "description": "InvalidRequestError",
  8289. "content": {
  8290. "application/json": {
  8291. "schema": {
  8292. "$ref": "#/components/schemas/InvalidRequestError"
  8293. }
  8294. }
  8295. }
  8296. },
  8297. "401": {
  8298. "description": "UnauthorizedError",
  8299. "content": {
  8300. "application/json": {
  8301. "schema": {
  8302. "$ref": "#/components/schemas/UnauthorizedError"
  8303. }
  8304. }
  8305. }
  8306. }
  8307. },
  8308. "description": "Compact a v2 session conversation.",
  8309. "summary": "Compact v2 session",
  8310. "x-codeSamples": [
  8311. {
  8312. "lang": "js",
  8313. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  8314. }
  8315. ]
  8316. }
  8317. },
  8318. "/api/session/{sessionID}/wait": {
  8319. "post": {
  8320. "tags": ["v2"],
  8321. "operationId": "v2.session.wait",
  8322. "parameters": [
  8323. {
  8324. "name": "sessionID",
  8325. "in": "path",
  8326. "schema": {
  8327. "type": "string",
  8328. "pattern": "^ses"
  8329. },
  8330. "required": true
  8331. },
  8332. {
  8333. "name": "directory",
  8334. "in": "query",
  8335. "schema": {
  8336. "type": "string"
  8337. },
  8338. "required": false
  8339. },
  8340. {
  8341. "name": "workspace",
  8342. "in": "query",
  8343. "schema": {
  8344. "type": "string"
  8345. },
  8346. "required": false
  8347. }
  8348. ],
  8349. "security": [],
  8350. "responses": {
  8351. "204": {
  8352. "description": "<No Content>"
  8353. },
  8354. "400": {
  8355. "description": "InvalidRequestError",
  8356. "content": {
  8357. "application/json": {
  8358. "schema": {
  8359. "$ref": "#/components/schemas/InvalidRequestError"
  8360. }
  8361. }
  8362. }
  8363. },
  8364. "401": {
  8365. "description": "UnauthorizedError",
  8366. "content": {
  8367. "application/json": {
  8368. "schema": {
  8369. "$ref": "#/components/schemas/UnauthorizedError"
  8370. }
  8371. }
  8372. }
  8373. }
  8374. },
  8375. "description": "Wait for a v2 session agent loop to become idle.",
  8376. "summary": "Wait for v2 session",
  8377. "x-codeSamples": [
  8378. {
  8379. "lang": "js",
  8380. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  8381. }
  8382. ]
  8383. }
  8384. },
  8385. "/api/session/{sessionID}/context": {
  8386. "get": {
  8387. "tags": ["v2"],
  8388. "operationId": "v2.session.context",
  8389. "parameters": [
  8390. {
  8391. "name": "sessionID",
  8392. "in": "path",
  8393. "schema": {
  8394. "type": "string",
  8395. "pattern": "^ses"
  8396. },
  8397. "required": true
  8398. },
  8399. {
  8400. "name": "directory",
  8401. "in": "query",
  8402. "schema": {
  8403. "type": "string"
  8404. },
  8405. "required": false
  8406. },
  8407. {
  8408. "name": "workspace",
  8409. "in": "query",
  8410. "schema": {
  8411. "type": "string"
  8412. },
  8413. "required": false
  8414. }
  8415. ],
  8416. "security": [],
  8417. "responses": {
  8418. "200": {
  8419. "description": "Success",
  8420. "content": {
  8421. "application/json": {
  8422. "schema": {
  8423. "type": "array",
  8424. "items": {
  8425. "$ref": "#/components/schemas/SessionMessage"
  8426. }
  8427. }
  8428. }
  8429. }
  8430. },
  8431. "400": {
  8432. "description": "InvalidRequestError",
  8433. "content": {
  8434. "application/json": {
  8435. "schema": {
  8436. "$ref": "#/components/schemas/InvalidRequestError"
  8437. }
  8438. }
  8439. }
  8440. },
  8441. "401": {
  8442. "description": "UnauthorizedError",
  8443. "content": {
  8444. "application/json": {
  8445. "schema": {
  8446. "$ref": "#/components/schemas/UnauthorizedError"
  8447. }
  8448. }
  8449. }
  8450. }
  8451. },
  8452. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  8453. "summary": "Get v2 session context",
  8454. "x-codeSamples": [
  8455. {
  8456. "lang": "js",
  8457. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  8458. }
  8459. ]
  8460. }
  8461. },
  8462. "/api/session/{sessionID}/message": {
  8463. "get": {
  8464. "tags": ["v2 messages"],
  8465. "operationId": "v2.session.messages",
  8466. "parameters": [
  8467. {
  8468. "name": "sessionID",
  8469. "in": "path",
  8470. "schema": {
  8471. "type": "string",
  8472. "pattern": "^ses"
  8473. },
  8474. "required": true
  8475. },
  8476. {
  8477. "name": "directory",
  8478. "in": "query",
  8479. "schema": {
  8480. "type": "string"
  8481. },
  8482. "required": false
  8483. },
  8484. {
  8485. "name": "workspace",
  8486. "in": "query",
  8487. "schema": {
  8488. "type": "string"
  8489. },
  8490. "required": false
  8491. },
  8492. {
  8493. "name": "limit",
  8494. "in": "query",
  8495. "schema": {
  8496. "type": "number"
  8497. },
  8498. "required": false
  8499. },
  8500. {
  8501. "name": "order",
  8502. "in": "query",
  8503. "schema": {
  8504. "type": "string",
  8505. "enum": ["asc", "desc"]
  8506. },
  8507. "required": false
  8508. },
  8509. {
  8510. "name": "cursor",
  8511. "in": "query",
  8512. "schema": {
  8513. "type": "string",
  8514. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  8515. },
  8516. "required": false
  8517. }
  8518. ],
  8519. "security": [],
  8520. "responses": {
  8521. "200": {
  8522. "description": "V2SessionMessagesResponse",
  8523. "content": {
  8524. "application/json": {
  8525. "schema": {
  8526. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  8527. }
  8528. }
  8529. }
  8530. },
  8531. "400": {
  8532. "description": "InvalidCursorError | InvalidRequestError",
  8533. "content": {
  8534. "application/json": {
  8535. "schema": {
  8536. "anyOf": [
  8537. {
  8538. "$ref": "#/components/schemas/InvalidCursorError"
  8539. },
  8540. {
  8541. "$ref": "#/components/schemas/InvalidRequestError"
  8542. }
  8543. ]
  8544. }
  8545. }
  8546. }
  8547. },
  8548. "401": {
  8549. "description": "UnauthorizedError",
  8550. "content": {
  8551. "application/json": {
  8552. "schema": {
  8553. "$ref": "#/components/schemas/UnauthorizedError"
  8554. }
  8555. }
  8556. }
  8557. }
  8558. },
  8559. "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.",
  8560. "summary": "Get v2 session messages",
  8561. "x-codeSamples": [
  8562. {
  8563. "lang": "js",
  8564. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  8565. }
  8566. ]
  8567. }
  8568. },
  8569. "/api/model": {
  8570. "get": {
  8571. "tags": ["v2 models"],
  8572. "operationId": "v2.model.list",
  8573. "parameters": [
  8574. {
  8575. "name": "location",
  8576. "in": "query",
  8577. "schema": {
  8578. "type": "object",
  8579. "properties": {
  8580. "directory": {
  8581. "type": "string"
  8582. },
  8583. "workspace": {
  8584. "type": "string"
  8585. }
  8586. },
  8587. "additionalProperties": false
  8588. },
  8589. "required": false,
  8590. "style": "deepObject",
  8591. "explode": true
  8592. }
  8593. ],
  8594. "security": [],
  8595. "responses": {
  8596. "200": {
  8597. "description": "Success",
  8598. "content": {
  8599. "application/json": {
  8600. "schema": {
  8601. "type": "array",
  8602. "items": {
  8603. "$ref": "#/components/schemas/ModelV2Info"
  8604. }
  8605. }
  8606. }
  8607. }
  8608. },
  8609. "400": {
  8610. "description": "InvalidRequestError",
  8611. "content": {
  8612. "application/json": {
  8613. "schema": {
  8614. "$ref": "#/components/schemas/InvalidRequestError"
  8615. }
  8616. }
  8617. }
  8618. },
  8619. "401": {
  8620. "description": "UnauthorizedError",
  8621. "content": {
  8622. "application/json": {
  8623. "schema": {
  8624. "$ref": "#/components/schemas/UnauthorizedError"
  8625. }
  8626. }
  8627. }
  8628. },
  8629. "503": {
  8630. "description": "ServiceUnavailableError",
  8631. "content": {
  8632. "application/json": {
  8633. "schema": {
  8634. "$ref": "#/components/schemas/ServiceUnavailableError"
  8635. }
  8636. }
  8637. }
  8638. }
  8639. },
  8640. "description": "Retrieve available v2 models ordered by release date.",
  8641. "summary": "List v2 models",
  8642. "x-codeSamples": [
  8643. {
  8644. "lang": "js",
  8645. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  8646. }
  8647. ]
  8648. }
  8649. },
  8650. "/api/provider": {
  8651. "get": {
  8652. "tags": ["v2 providers"],
  8653. "operationId": "v2.provider.list",
  8654. "parameters": [
  8655. {
  8656. "name": "location",
  8657. "in": "query",
  8658. "schema": {
  8659. "type": "object",
  8660. "properties": {
  8661. "directory": {
  8662. "type": "string"
  8663. },
  8664. "workspace": {
  8665. "type": "string"
  8666. }
  8667. },
  8668. "additionalProperties": false
  8669. },
  8670. "required": false,
  8671. "style": "deepObject",
  8672. "explode": true
  8673. }
  8674. ],
  8675. "security": [],
  8676. "responses": {
  8677. "200": {
  8678. "description": "Success",
  8679. "content": {
  8680. "application/json": {
  8681. "schema": {
  8682. "type": "array",
  8683. "items": {
  8684. "$ref": "#/components/schemas/ProviderV2Info"
  8685. }
  8686. }
  8687. }
  8688. }
  8689. },
  8690. "400": {
  8691. "description": "InvalidRequestError",
  8692. "content": {
  8693. "application/json": {
  8694. "schema": {
  8695. "$ref": "#/components/schemas/InvalidRequestError"
  8696. }
  8697. }
  8698. }
  8699. },
  8700. "401": {
  8701. "description": "UnauthorizedError",
  8702. "content": {
  8703. "application/json": {
  8704. "schema": {
  8705. "$ref": "#/components/schemas/UnauthorizedError"
  8706. }
  8707. }
  8708. }
  8709. },
  8710. "503": {
  8711. "description": "ServiceUnavailableError",
  8712. "content": {
  8713. "application/json": {
  8714. "schema": {
  8715. "$ref": "#/components/schemas/ServiceUnavailableError"
  8716. }
  8717. }
  8718. }
  8719. }
  8720. },
  8721. "description": "Retrieve active v2 AI providers so clients can show provider availability and configuration.",
  8722. "summary": "List v2 providers",
  8723. "x-codeSamples": [
  8724. {
  8725. "lang": "js",
  8726. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  8727. }
  8728. ]
  8729. }
  8730. },
  8731. "/api/provider/{providerID}": {
  8732. "get": {
  8733. "tags": ["v2 providers"],
  8734. "operationId": "v2.provider.get",
  8735. "parameters": [
  8736. {
  8737. "name": "providerID",
  8738. "in": "path",
  8739. "schema": {
  8740. "type": "string"
  8741. },
  8742. "required": true
  8743. },
  8744. {
  8745. "name": "location",
  8746. "in": "query",
  8747. "schema": {
  8748. "type": "object",
  8749. "properties": {
  8750. "directory": {
  8751. "type": "string"
  8752. },
  8753. "workspace": {
  8754. "type": "string"
  8755. }
  8756. },
  8757. "additionalProperties": false
  8758. },
  8759. "required": false,
  8760. "style": "deepObject",
  8761. "explode": true
  8762. }
  8763. ],
  8764. "security": [],
  8765. "responses": {
  8766. "200": {
  8767. "description": "ProviderV2.Info",
  8768. "content": {
  8769. "application/json": {
  8770. "schema": {
  8771. "$ref": "#/components/schemas/ProviderV2Info"
  8772. }
  8773. }
  8774. }
  8775. },
  8776. "400": {
  8777. "description": "InvalidRequestError",
  8778. "content": {
  8779. "application/json": {
  8780. "schema": {
  8781. "$ref": "#/components/schemas/InvalidRequestError"
  8782. }
  8783. }
  8784. }
  8785. },
  8786. "401": {
  8787. "description": "UnauthorizedError",
  8788. "content": {
  8789. "application/json": {
  8790. "schema": {
  8791. "$ref": "#/components/schemas/UnauthorizedError"
  8792. }
  8793. }
  8794. }
  8795. },
  8796. "404": {
  8797. "description": "ProviderNotFoundError",
  8798. "content": {
  8799. "application/json": {
  8800. "schema": {
  8801. "$ref": "#/components/schemas/ProviderNotFoundError"
  8802. }
  8803. }
  8804. }
  8805. },
  8806. "503": {
  8807. "description": "ServiceUnavailableError",
  8808. "content": {
  8809. "application/json": {
  8810. "schema": {
  8811. "$ref": "#/components/schemas/ServiceUnavailableError"
  8812. }
  8813. }
  8814. }
  8815. }
  8816. },
  8817. "description": "Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.",
  8818. "summary": "Get v2 provider",
  8819. "x-codeSamples": [
  8820. {
  8821. "lang": "js",
  8822. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  8823. }
  8824. ]
  8825. }
  8826. },
  8827. "/tui/append-prompt": {
  8828. "post": {
  8829. "tags": ["tui"],
  8830. "operationId": "tui.appendPrompt",
  8831. "parameters": [
  8832. {
  8833. "name": "directory",
  8834. "in": "query",
  8835. "schema": {
  8836. "type": "string"
  8837. },
  8838. "required": false
  8839. },
  8840. {
  8841. "name": "workspace",
  8842. "in": "query",
  8843. "schema": {
  8844. "type": "string"
  8845. },
  8846. "required": false
  8847. }
  8848. ],
  8849. "responses": {
  8850. "200": {
  8851. "description": "Prompt processed successfully",
  8852. "content": {
  8853. "application/json": {
  8854. "schema": {
  8855. "type": "boolean",
  8856. "description": "Prompt processed successfully"
  8857. }
  8858. }
  8859. }
  8860. },
  8861. "400": {
  8862. "description": "BadRequest | InvalidRequestError",
  8863. "content": {
  8864. "application/json": {
  8865. "schema": {
  8866. "anyOf": [
  8867. {
  8868. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8869. },
  8870. {
  8871. "$ref": "#/components/schemas/InvalidRequestError"
  8872. }
  8873. ]
  8874. }
  8875. }
  8876. }
  8877. }
  8878. },
  8879. "description": "Append prompt to the TUI.",
  8880. "summary": "Append TUI prompt",
  8881. "requestBody": {
  8882. "content": {
  8883. "application/json": {
  8884. "schema": {
  8885. "type": "object",
  8886. "properties": {
  8887. "text": {
  8888. "type": "string"
  8889. }
  8890. },
  8891. "required": ["text"],
  8892. "additionalProperties": false
  8893. }
  8894. }
  8895. }
  8896. },
  8897. "x-codeSamples": [
  8898. {
  8899. "lang": "js",
  8900. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  8901. }
  8902. ]
  8903. }
  8904. },
  8905. "/tui/open-help": {
  8906. "post": {
  8907. "tags": ["tui"],
  8908. "operationId": "tui.openHelp",
  8909. "parameters": [
  8910. {
  8911. "name": "directory",
  8912. "in": "query",
  8913. "schema": {
  8914. "type": "string"
  8915. },
  8916. "required": false
  8917. },
  8918. {
  8919. "name": "workspace",
  8920. "in": "query",
  8921. "schema": {
  8922. "type": "string"
  8923. },
  8924. "required": false
  8925. }
  8926. ],
  8927. "responses": {
  8928. "200": {
  8929. "description": "Help dialog opened successfully",
  8930. "content": {
  8931. "application/json": {
  8932. "schema": {
  8933. "type": "boolean",
  8934. "description": "Help dialog opened successfully"
  8935. }
  8936. }
  8937. }
  8938. },
  8939. "400": {
  8940. "description": "Bad request",
  8941. "content": {
  8942. "application/json": {
  8943. "schema": {
  8944. "$ref": "#/components/schemas/BadRequestError"
  8945. }
  8946. }
  8947. }
  8948. }
  8949. },
  8950. "description": "Open the help dialog in the TUI to display user assistance information.",
  8951. "summary": "Open help dialog",
  8952. "x-codeSamples": [
  8953. {
  8954. "lang": "js",
  8955. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  8956. }
  8957. ]
  8958. }
  8959. },
  8960. "/tui/open-sessions": {
  8961. "post": {
  8962. "tags": ["tui"],
  8963. "operationId": "tui.openSessions",
  8964. "parameters": [
  8965. {
  8966. "name": "directory",
  8967. "in": "query",
  8968. "schema": {
  8969. "type": "string"
  8970. },
  8971. "required": false
  8972. },
  8973. {
  8974. "name": "workspace",
  8975. "in": "query",
  8976. "schema": {
  8977. "type": "string"
  8978. },
  8979. "required": false
  8980. }
  8981. ],
  8982. "responses": {
  8983. "200": {
  8984. "description": "Session dialog opened successfully",
  8985. "content": {
  8986. "application/json": {
  8987. "schema": {
  8988. "type": "boolean",
  8989. "description": "Session dialog opened successfully"
  8990. }
  8991. }
  8992. }
  8993. },
  8994. "400": {
  8995. "description": "Bad request",
  8996. "content": {
  8997. "application/json": {
  8998. "schema": {
  8999. "$ref": "#/components/schemas/BadRequestError"
  9000. }
  9001. }
  9002. }
  9003. }
  9004. },
  9005. "description": "Open the session dialog.",
  9006. "summary": "Open sessions dialog",
  9007. "x-codeSamples": [
  9008. {
  9009. "lang": "js",
  9010. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  9011. }
  9012. ]
  9013. }
  9014. },
  9015. "/tui/open-themes": {
  9016. "post": {
  9017. "tags": ["tui"],
  9018. "operationId": "tui.openThemes",
  9019. "parameters": [
  9020. {
  9021. "name": "directory",
  9022. "in": "query",
  9023. "schema": {
  9024. "type": "string"
  9025. },
  9026. "required": false
  9027. },
  9028. {
  9029. "name": "workspace",
  9030. "in": "query",
  9031. "schema": {
  9032. "type": "string"
  9033. },
  9034. "required": false
  9035. }
  9036. ],
  9037. "responses": {
  9038. "200": {
  9039. "description": "Theme dialog opened successfully",
  9040. "content": {
  9041. "application/json": {
  9042. "schema": {
  9043. "type": "boolean",
  9044. "description": "Theme dialog opened successfully"
  9045. }
  9046. }
  9047. }
  9048. },
  9049. "400": {
  9050. "description": "Bad request",
  9051. "content": {
  9052. "application/json": {
  9053. "schema": {
  9054. "$ref": "#/components/schemas/BadRequestError"
  9055. }
  9056. }
  9057. }
  9058. }
  9059. },
  9060. "description": "Open the theme dialog.",
  9061. "summary": "Open themes dialog",
  9062. "x-codeSamples": [
  9063. {
  9064. "lang": "js",
  9065. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  9066. }
  9067. ]
  9068. }
  9069. },
  9070. "/tui/open-models": {
  9071. "post": {
  9072. "tags": ["tui"],
  9073. "operationId": "tui.openModels",
  9074. "parameters": [
  9075. {
  9076. "name": "directory",
  9077. "in": "query",
  9078. "schema": {
  9079. "type": "string"
  9080. },
  9081. "required": false
  9082. },
  9083. {
  9084. "name": "workspace",
  9085. "in": "query",
  9086. "schema": {
  9087. "type": "string"
  9088. },
  9089. "required": false
  9090. }
  9091. ],
  9092. "responses": {
  9093. "200": {
  9094. "description": "Model dialog opened successfully",
  9095. "content": {
  9096. "application/json": {
  9097. "schema": {
  9098. "type": "boolean",
  9099. "description": "Model dialog opened successfully"
  9100. }
  9101. }
  9102. }
  9103. },
  9104. "400": {
  9105. "description": "Bad request",
  9106. "content": {
  9107. "application/json": {
  9108. "schema": {
  9109. "$ref": "#/components/schemas/BadRequestError"
  9110. }
  9111. }
  9112. }
  9113. }
  9114. },
  9115. "description": "Open the model dialog.",
  9116. "summary": "Open models dialog",
  9117. "x-codeSamples": [
  9118. {
  9119. "lang": "js",
  9120. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  9121. }
  9122. ]
  9123. }
  9124. },
  9125. "/tui/submit-prompt": {
  9126. "post": {
  9127. "tags": ["tui"],
  9128. "operationId": "tui.submitPrompt",
  9129. "parameters": [
  9130. {
  9131. "name": "directory",
  9132. "in": "query",
  9133. "schema": {
  9134. "type": "string"
  9135. },
  9136. "required": false
  9137. },
  9138. {
  9139. "name": "workspace",
  9140. "in": "query",
  9141. "schema": {
  9142. "type": "string"
  9143. },
  9144. "required": false
  9145. }
  9146. ],
  9147. "responses": {
  9148. "200": {
  9149. "description": "Prompt submitted successfully",
  9150. "content": {
  9151. "application/json": {
  9152. "schema": {
  9153. "type": "boolean",
  9154. "description": "Prompt submitted successfully"
  9155. }
  9156. }
  9157. }
  9158. },
  9159. "400": {
  9160. "description": "Bad request",
  9161. "content": {
  9162. "application/json": {
  9163. "schema": {
  9164. "$ref": "#/components/schemas/BadRequestError"
  9165. }
  9166. }
  9167. }
  9168. }
  9169. },
  9170. "description": "Submit the prompt.",
  9171. "summary": "Submit TUI prompt",
  9172. "x-codeSamples": [
  9173. {
  9174. "lang": "js",
  9175. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  9176. }
  9177. ]
  9178. }
  9179. },
  9180. "/tui/clear-prompt": {
  9181. "post": {
  9182. "tags": ["tui"],
  9183. "operationId": "tui.clearPrompt",
  9184. "parameters": [
  9185. {
  9186. "name": "directory",
  9187. "in": "query",
  9188. "schema": {
  9189. "type": "string"
  9190. },
  9191. "required": false
  9192. },
  9193. {
  9194. "name": "workspace",
  9195. "in": "query",
  9196. "schema": {
  9197. "type": "string"
  9198. },
  9199. "required": false
  9200. }
  9201. ],
  9202. "responses": {
  9203. "200": {
  9204. "description": "Prompt cleared successfully",
  9205. "content": {
  9206. "application/json": {
  9207. "schema": {
  9208. "type": "boolean",
  9209. "description": "Prompt cleared successfully"
  9210. }
  9211. }
  9212. }
  9213. },
  9214. "400": {
  9215. "description": "Bad request",
  9216. "content": {
  9217. "application/json": {
  9218. "schema": {
  9219. "$ref": "#/components/schemas/BadRequestError"
  9220. }
  9221. }
  9222. }
  9223. }
  9224. },
  9225. "description": "Clear the prompt.",
  9226. "summary": "Clear TUI prompt",
  9227. "x-codeSamples": [
  9228. {
  9229. "lang": "js",
  9230. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  9231. }
  9232. ]
  9233. }
  9234. },
  9235. "/tui/execute-command": {
  9236. "post": {
  9237. "tags": ["tui"],
  9238. "operationId": "tui.executeCommand",
  9239. "parameters": [
  9240. {
  9241. "name": "directory",
  9242. "in": "query",
  9243. "schema": {
  9244. "type": "string"
  9245. },
  9246. "required": false
  9247. },
  9248. {
  9249. "name": "workspace",
  9250. "in": "query",
  9251. "schema": {
  9252. "type": "string"
  9253. },
  9254. "required": false
  9255. }
  9256. ],
  9257. "responses": {
  9258. "200": {
  9259. "description": "Command executed successfully",
  9260. "content": {
  9261. "application/json": {
  9262. "schema": {
  9263. "type": "boolean",
  9264. "description": "Command executed successfully"
  9265. }
  9266. }
  9267. }
  9268. },
  9269. "400": {
  9270. "description": "BadRequest | InvalidRequestError",
  9271. "content": {
  9272. "application/json": {
  9273. "schema": {
  9274. "anyOf": [
  9275. {
  9276. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9277. },
  9278. {
  9279. "$ref": "#/components/schemas/InvalidRequestError"
  9280. }
  9281. ]
  9282. }
  9283. }
  9284. }
  9285. }
  9286. },
  9287. "description": "Execute a TUI command.",
  9288. "summary": "Execute TUI command",
  9289. "requestBody": {
  9290. "content": {
  9291. "application/json": {
  9292. "schema": {
  9293. "type": "object",
  9294. "properties": {
  9295. "command": {
  9296. "type": "string"
  9297. }
  9298. },
  9299. "required": ["command"],
  9300. "additionalProperties": false
  9301. }
  9302. }
  9303. }
  9304. },
  9305. "x-codeSamples": [
  9306. {
  9307. "lang": "js",
  9308. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  9309. }
  9310. ]
  9311. }
  9312. },
  9313. "/tui/show-toast": {
  9314. "post": {
  9315. "tags": ["tui"],
  9316. "operationId": "tui.showToast",
  9317. "parameters": [
  9318. {
  9319. "name": "directory",
  9320. "in": "query",
  9321. "schema": {
  9322. "type": "string"
  9323. },
  9324. "required": false
  9325. },
  9326. {
  9327. "name": "workspace",
  9328. "in": "query",
  9329. "schema": {
  9330. "type": "string"
  9331. },
  9332. "required": false
  9333. }
  9334. ],
  9335. "responses": {
  9336. "200": {
  9337. "description": "Toast notification shown successfully",
  9338. "content": {
  9339. "application/json": {
  9340. "schema": {
  9341. "type": "boolean",
  9342. "description": "Toast notification shown successfully"
  9343. }
  9344. }
  9345. }
  9346. },
  9347. "400": {
  9348. "description": "Bad request",
  9349. "content": {
  9350. "application/json": {
  9351. "schema": {
  9352. "$ref": "#/components/schemas/BadRequestError"
  9353. }
  9354. }
  9355. }
  9356. }
  9357. },
  9358. "description": "Show a toast notification in the TUI.",
  9359. "summary": "Show TUI toast",
  9360. "requestBody": {
  9361. "content": {
  9362. "application/json": {
  9363. "schema": {
  9364. "type": "object",
  9365. "properties": {
  9366. "title": {
  9367. "type": "string"
  9368. },
  9369. "message": {
  9370. "type": "string"
  9371. },
  9372. "variant": {
  9373. "type": "string",
  9374. "enum": ["info", "success", "warning", "error"]
  9375. },
  9376. "duration": {
  9377. "type": "integer",
  9378. "exclusiveMinimum": 0
  9379. }
  9380. },
  9381. "required": ["message", "variant"],
  9382. "additionalProperties": false
  9383. }
  9384. }
  9385. }
  9386. },
  9387. "x-codeSamples": [
  9388. {
  9389. "lang": "js",
  9390. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  9391. }
  9392. ]
  9393. }
  9394. },
  9395. "/tui/publish": {
  9396. "post": {
  9397. "tags": ["tui"],
  9398. "operationId": "tui.publish",
  9399. "parameters": [
  9400. {
  9401. "name": "directory",
  9402. "in": "query",
  9403. "schema": {
  9404. "type": "string"
  9405. },
  9406. "required": false
  9407. },
  9408. {
  9409. "name": "workspace",
  9410. "in": "query",
  9411. "schema": {
  9412. "type": "string"
  9413. },
  9414. "required": false
  9415. }
  9416. ],
  9417. "responses": {
  9418. "200": {
  9419. "description": "Event published successfully",
  9420. "content": {
  9421. "application/json": {
  9422. "schema": {
  9423. "type": "boolean",
  9424. "description": "Event published successfully"
  9425. }
  9426. }
  9427. }
  9428. },
  9429. "400": {
  9430. "description": "BadRequest | InvalidRequestError",
  9431. "content": {
  9432. "application/json": {
  9433. "schema": {
  9434. "anyOf": [
  9435. {
  9436. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9437. },
  9438. {
  9439. "$ref": "#/components/schemas/InvalidRequestError"
  9440. }
  9441. ]
  9442. }
  9443. }
  9444. }
  9445. }
  9446. },
  9447. "description": "Publish a TUI event.",
  9448. "summary": "Publish TUI event",
  9449. "requestBody": {
  9450. "content": {
  9451. "application/json": {
  9452. "schema": {
  9453. "anyOf": [
  9454. {
  9455. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9456. },
  9457. {
  9458. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9459. },
  9460. {
  9461. "$ref": "#/components/schemas/EventTuiToastShow"
  9462. },
  9463. {
  9464. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9465. }
  9466. ]
  9467. }
  9468. }
  9469. }
  9470. },
  9471. "x-codeSamples": [
  9472. {
  9473. "lang": "js",
  9474. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9475. }
  9476. ]
  9477. }
  9478. },
  9479. "/tui/select-session": {
  9480. "post": {
  9481. "tags": ["tui"],
  9482. "operationId": "tui.selectSession",
  9483. "parameters": [
  9484. {
  9485. "name": "directory",
  9486. "in": "query",
  9487. "schema": {
  9488. "type": "string"
  9489. },
  9490. "required": false
  9491. },
  9492. {
  9493. "name": "workspace",
  9494. "in": "query",
  9495. "schema": {
  9496. "type": "string"
  9497. },
  9498. "required": false
  9499. }
  9500. ],
  9501. "responses": {
  9502. "200": {
  9503. "description": "Session selected successfully",
  9504. "content": {
  9505. "application/json": {
  9506. "schema": {
  9507. "type": "boolean",
  9508. "description": "Session selected successfully"
  9509. }
  9510. }
  9511. }
  9512. },
  9513. "400": {
  9514. "description": "BadRequest | InvalidRequestError",
  9515. "content": {
  9516. "application/json": {
  9517. "schema": {
  9518. "anyOf": [
  9519. {
  9520. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9521. },
  9522. {
  9523. "$ref": "#/components/schemas/InvalidRequestError"
  9524. }
  9525. ]
  9526. }
  9527. }
  9528. }
  9529. },
  9530. "404": {
  9531. "description": "NotFoundError",
  9532. "content": {
  9533. "application/json": {
  9534. "schema": {
  9535. "$ref": "#/components/schemas/NotFoundError"
  9536. }
  9537. }
  9538. }
  9539. }
  9540. },
  9541. "description": "Navigate the TUI to display the specified session.",
  9542. "summary": "Select session",
  9543. "requestBody": {
  9544. "content": {
  9545. "application/json": {
  9546. "schema": {
  9547. "type": "object",
  9548. "properties": {
  9549. "sessionID": {
  9550. "type": "string",
  9551. "pattern": "^ses",
  9552. "description": "Session ID to navigate to"
  9553. }
  9554. },
  9555. "required": ["sessionID"],
  9556. "additionalProperties": false
  9557. }
  9558. }
  9559. }
  9560. },
  9561. "x-codeSamples": [
  9562. {
  9563. "lang": "js",
  9564. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9565. }
  9566. ]
  9567. }
  9568. },
  9569. "/tui/control/next": {
  9570. "get": {
  9571. "tags": ["tui"],
  9572. "operationId": "tui.control.next",
  9573. "parameters": [
  9574. {
  9575. "name": "directory",
  9576. "in": "query",
  9577. "schema": {
  9578. "type": "string"
  9579. },
  9580. "required": false
  9581. },
  9582. {
  9583. "name": "workspace",
  9584. "in": "query",
  9585. "schema": {
  9586. "type": "string"
  9587. },
  9588. "required": false
  9589. }
  9590. ],
  9591. "responses": {
  9592. "200": {
  9593. "description": "Next TUI request",
  9594. "content": {
  9595. "application/json": {
  9596. "schema": {
  9597. "type": "object",
  9598. "properties": {
  9599. "path": {
  9600. "type": "string"
  9601. },
  9602. "body": {}
  9603. },
  9604. "required": ["path", "body"],
  9605. "additionalProperties": false,
  9606. "description": "Next TUI request"
  9607. }
  9608. }
  9609. }
  9610. },
  9611. "400": {
  9612. "description": "Bad request",
  9613. "content": {
  9614. "application/json": {
  9615. "schema": {
  9616. "$ref": "#/components/schemas/BadRequestError"
  9617. }
  9618. }
  9619. }
  9620. }
  9621. },
  9622. "description": "Retrieve the next TUI request from the queue for processing.",
  9623. "summary": "Get next TUI request",
  9624. "x-codeSamples": [
  9625. {
  9626. "lang": "js",
  9627. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9628. }
  9629. ]
  9630. }
  9631. },
  9632. "/tui/control/response": {
  9633. "post": {
  9634. "tags": ["tui"],
  9635. "operationId": "tui.control.response",
  9636. "parameters": [
  9637. {
  9638. "name": "directory",
  9639. "in": "query",
  9640. "schema": {
  9641. "type": "string"
  9642. },
  9643. "required": false
  9644. },
  9645. {
  9646. "name": "workspace",
  9647. "in": "query",
  9648. "schema": {
  9649. "type": "string"
  9650. },
  9651. "required": false
  9652. }
  9653. ],
  9654. "responses": {
  9655. "200": {
  9656. "description": "Response submitted successfully",
  9657. "content": {
  9658. "application/json": {
  9659. "schema": {
  9660. "type": "boolean",
  9661. "description": "Response submitted successfully"
  9662. }
  9663. }
  9664. }
  9665. },
  9666. "400": {
  9667. "description": "Bad request",
  9668. "content": {
  9669. "application/json": {
  9670. "schema": {
  9671. "$ref": "#/components/schemas/BadRequestError"
  9672. }
  9673. }
  9674. }
  9675. }
  9676. },
  9677. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9678. "summary": "Submit TUI response",
  9679. "requestBody": {
  9680. "content": {
  9681. "application/json": {
  9682. "schema": {}
  9683. }
  9684. }
  9685. },
  9686. "x-codeSamples": [
  9687. {
  9688. "lang": "js",
  9689. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9690. }
  9691. ]
  9692. }
  9693. },
  9694. "/experimental/workspace/adapter": {
  9695. "get": {
  9696. "tags": ["workspace"],
  9697. "operationId": "experimental.workspace.adapter.list",
  9698. "parameters": [
  9699. {
  9700. "name": "directory",
  9701. "in": "query",
  9702. "schema": {
  9703. "type": "string"
  9704. },
  9705. "required": false
  9706. },
  9707. {
  9708. "name": "workspace",
  9709. "in": "query",
  9710. "schema": {
  9711. "type": "string"
  9712. },
  9713. "required": false
  9714. }
  9715. ],
  9716. "responses": {
  9717. "200": {
  9718. "description": "Workspace adapters",
  9719. "content": {
  9720. "application/json": {
  9721. "schema": {
  9722. "type": "array",
  9723. "items": {
  9724. "type": "object",
  9725. "properties": {
  9726. "type": {
  9727. "type": "string"
  9728. },
  9729. "name": {
  9730. "type": "string"
  9731. },
  9732. "description": {
  9733. "type": "string"
  9734. }
  9735. },
  9736. "required": ["type", "name", "description"],
  9737. "additionalProperties": false
  9738. },
  9739. "description": "Workspace adapters"
  9740. }
  9741. }
  9742. }
  9743. },
  9744. "400": {
  9745. "description": "Bad request",
  9746. "content": {
  9747. "application/json": {
  9748. "schema": {
  9749. "$ref": "#/components/schemas/BadRequestError"
  9750. }
  9751. }
  9752. }
  9753. }
  9754. },
  9755. "description": "List all available workspace adapters for the current project.",
  9756. "summary": "List workspace adapters",
  9757. "x-codeSamples": [
  9758. {
  9759. "lang": "js",
  9760. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9761. }
  9762. ]
  9763. }
  9764. },
  9765. "/experimental/workspace": {
  9766. "get": {
  9767. "tags": ["workspace"],
  9768. "operationId": "experimental.workspace.list",
  9769. "parameters": [
  9770. {
  9771. "name": "directory",
  9772. "in": "query",
  9773. "schema": {
  9774. "type": "string"
  9775. },
  9776. "required": false
  9777. },
  9778. {
  9779. "name": "workspace",
  9780. "in": "query",
  9781. "schema": {
  9782. "type": "string"
  9783. },
  9784. "required": false
  9785. }
  9786. ],
  9787. "responses": {
  9788. "200": {
  9789. "description": "Workspaces",
  9790. "content": {
  9791. "application/json": {
  9792. "schema": {
  9793. "type": "array",
  9794. "items": {
  9795. "$ref": "#/components/schemas/Workspace"
  9796. },
  9797. "description": "Workspaces"
  9798. }
  9799. }
  9800. }
  9801. },
  9802. "400": {
  9803. "description": "Bad request",
  9804. "content": {
  9805. "application/json": {
  9806. "schema": {
  9807. "$ref": "#/components/schemas/BadRequestError"
  9808. }
  9809. }
  9810. }
  9811. }
  9812. },
  9813. "description": "List all workspaces.",
  9814. "summary": "List workspaces",
  9815. "x-codeSamples": [
  9816. {
  9817. "lang": "js",
  9818. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9819. }
  9820. ]
  9821. },
  9822. "post": {
  9823. "tags": ["workspace"],
  9824. "operationId": "experimental.workspace.create",
  9825. "parameters": [
  9826. {
  9827. "name": "directory",
  9828. "in": "query",
  9829. "schema": {
  9830. "type": "string"
  9831. },
  9832. "required": false
  9833. },
  9834. {
  9835. "name": "workspace",
  9836. "in": "query",
  9837. "schema": {
  9838. "type": "string"
  9839. },
  9840. "required": false
  9841. }
  9842. ],
  9843. "responses": {
  9844. "200": {
  9845. "description": "Workspace created",
  9846. "content": {
  9847. "application/json": {
  9848. "schema": {
  9849. "$ref": "#/components/schemas/Workspace"
  9850. }
  9851. }
  9852. }
  9853. },
  9854. "400": {
  9855. "description": "BadRequest | InvalidRequestError",
  9856. "content": {
  9857. "application/json": {
  9858. "schema": {
  9859. "anyOf": [
  9860. {
  9861. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9862. },
  9863. {
  9864. "$ref": "#/components/schemas/InvalidRequestError"
  9865. }
  9866. ]
  9867. }
  9868. }
  9869. }
  9870. }
  9871. },
  9872. "description": "Create a workspace for the current project.",
  9873. "summary": "Create workspace",
  9874. "requestBody": {
  9875. "content": {
  9876. "application/json": {
  9877. "schema": {
  9878. "type": "object",
  9879. "properties": {
  9880. "id": {
  9881. "type": "string",
  9882. "pattern": "^wrk"
  9883. },
  9884. "type": {
  9885. "type": "string"
  9886. },
  9887. "branch": {
  9888. "anyOf": [
  9889. {
  9890. "type": "string"
  9891. },
  9892. {
  9893. "type": "null"
  9894. }
  9895. ]
  9896. },
  9897. "extra": {
  9898. "anyOf": [
  9899. {},
  9900. {
  9901. "type": "null"
  9902. }
  9903. ]
  9904. }
  9905. },
  9906. "required": ["type"],
  9907. "additionalProperties": false
  9908. }
  9909. }
  9910. }
  9911. },
  9912. "x-codeSamples": [
  9913. {
  9914. "lang": "js",
  9915. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  9916. }
  9917. ]
  9918. }
  9919. },
  9920. "/experimental/workspace/sync-list": {
  9921. "post": {
  9922. "tags": ["workspace"],
  9923. "operationId": "experimental.workspace.syncList",
  9924. "parameters": [
  9925. {
  9926. "name": "directory",
  9927. "in": "query",
  9928. "schema": {
  9929. "type": "string"
  9930. },
  9931. "required": false
  9932. },
  9933. {
  9934. "name": "workspace",
  9935. "in": "query",
  9936. "schema": {
  9937. "type": "string"
  9938. },
  9939. "required": false
  9940. }
  9941. ],
  9942. "responses": {
  9943. "204": {
  9944. "description": "Workspace list synced"
  9945. },
  9946. "400": {
  9947. "description": "Bad request",
  9948. "content": {
  9949. "application/json": {
  9950. "schema": {
  9951. "$ref": "#/components/schemas/BadRequestError"
  9952. }
  9953. }
  9954. }
  9955. }
  9956. },
  9957. "description": "Register missing workspaces returned by workspace adapters.",
  9958. "summary": "Sync workspace list",
  9959. "x-codeSamples": [
  9960. {
  9961. "lang": "js",
  9962. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  9963. }
  9964. ]
  9965. }
  9966. },
  9967. "/experimental/workspace/status": {
  9968. "get": {
  9969. "tags": ["workspace"],
  9970. "operationId": "experimental.workspace.status",
  9971. "parameters": [
  9972. {
  9973. "name": "directory",
  9974. "in": "query",
  9975. "schema": {
  9976. "type": "string"
  9977. },
  9978. "required": false
  9979. },
  9980. {
  9981. "name": "workspace",
  9982. "in": "query",
  9983. "schema": {
  9984. "type": "string"
  9985. },
  9986. "required": false
  9987. }
  9988. ],
  9989. "responses": {
  9990. "200": {
  9991. "description": "Workspace status",
  9992. "content": {
  9993. "application/json": {
  9994. "schema": {
  9995. "type": "array",
  9996. "items": {
  9997. "type": "object",
  9998. "properties": {
  9999. "workspaceID": {
  10000. "type": "string",
  10001. "pattern": "^wrk"
  10002. },
  10003. "status": {
  10004. "type": "string",
  10005. "enum": ["connected", "connecting", "disconnected", "error"]
  10006. }
  10007. },
  10008. "required": ["workspaceID", "status"],
  10009. "additionalProperties": false
  10010. },
  10011. "description": "Workspace status"
  10012. }
  10013. }
  10014. }
  10015. },
  10016. "400": {
  10017. "description": "Bad request",
  10018. "content": {
  10019. "application/json": {
  10020. "schema": {
  10021. "$ref": "#/components/schemas/BadRequestError"
  10022. }
  10023. }
  10024. }
  10025. }
  10026. },
  10027. "description": "Get connection status for workspaces in the current project.",
  10028. "summary": "Workspace status",
  10029. "x-codeSamples": [
  10030. {
  10031. "lang": "js",
  10032. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  10033. }
  10034. ]
  10035. }
  10036. },
  10037. "/experimental/workspace/{id}": {
  10038. "delete": {
  10039. "tags": ["workspace"],
  10040. "operationId": "experimental.workspace.remove",
  10041. "parameters": [
  10042. {
  10043. "name": "id",
  10044. "in": "path",
  10045. "schema": {
  10046. "type": "string",
  10047. "pattern": "^wrk"
  10048. },
  10049. "required": true
  10050. },
  10051. {
  10052. "name": "directory",
  10053. "in": "query",
  10054. "schema": {
  10055. "type": "string"
  10056. },
  10057. "required": false
  10058. },
  10059. {
  10060. "name": "workspace",
  10061. "in": "query",
  10062. "schema": {
  10063. "type": "string"
  10064. },
  10065. "required": false
  10066. }
  10067. ],
  10068. "responses": {
  10069. "200": {
  10070. "description": "Workspace removed",
  10071. "content": {
  10072. "application/json": {
  10073. "schema": {
  10074. "$ref": "#/components/schemas/Workspace"
  10075. }
  10076. }
  10077. }
  10078. },
  10079. "400": {
  10080. "description": "BadRequest | InvalidRequestError",
  10081. "content": {
  10082. "application/json": {
  10083. "schema": {
  10084. "anyOf": [
  10085. {
  10086. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10087. },
  10088. {
  10089. "$ref": "#/components/schemas/InvalidRequestError"
  10090. }
  10091. ]
  10092. }
  10093. }
  10094. }
  10095. }
  10096. },
  10097. "description": "Remove an existing workspace.",
  10098. "summary": "Remove workspace",
  10099. "x-codeSamples": [
  10100. {
  10101. "lang": "js",
  10102. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  10103. }
  10104. ]
  10105. }
  10106. },
  10107. "/experimental/workspace/warp": {
  10108. "post": {
  10109. "tags": ["workspace"],
  10110. "operationId": "experimental.workspace.warp",
  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. "204": {
  10131. "description": "Session warped"
  10132. },
  10133. "400": {
  10134. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  10135. "content": {
  10136. "application/json": {
  10137. "schema": {
  10138. "anyOf": [
  10139. {
  10140. "$ref": "#/components/schemas/WorkspaceWarpError"
  10141. },
  10142. {
  10143. "$ref": "#/components/schemas/VcsApplyError"
  10144. },
  10145. {
  10146. "$ref": "#/components/schemas/InvalidRequestError"
  10147. }
  10148. ]
  10149. }
  10150. }
  10151. }
  10152. }
  10153. },
  10154. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  10155. "summary": "Warp session into workspace",
  10156. "requestBody": {
  10157. "content": {
  10158. "application/json": {
  10159. "schema": {
  10160. "type": "object",
  10161. "properties": {
  10162. "id": {
  10163. "anyOf": [
  10164. {
  10165. "type": "string",
  10166. "pattern": "^wrk"
  10167. },
  10168. {
  10169. "type": "null"
  10170. }
  10171. ]
  10172. },
  10173. "sessionID": {
  10174. "type": "string",
  10175. "pattern": "^ses"
  10176. },
  10177. "copyChanges": {
  10178. "type": "boolean"
  10179. }
  10180. },
  10181. "required": ["id", "sessionID"],
  10182. "additionalProperties": false
  10183. }
  10184. }
  10185. }
  10186. },
  10187. "x-codeSamples": [
  10188. {
  10189. "lang": "js",
  10190. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  10191. }
  10192. ]
  10193. }
  10194. },
  10195. "/pty/{ptyID}/connect": {
  10196. "get": {
  10197. "tags": ["pty"],
  10198. "operationId": "pty.connect",
  10199. "parameters": [
  10200. {
  10201. "name": "ptyID",
  10202. "in": "path",
  10203. "schema": {
  10204. "type": "string",
  10205. "pattern": "^pty"
  10206. },
  10207. "required": true
  10208. },
  10209. {
  10210. "name": "directory",
  10211. "in": "query",
  10212. "schema": {
  10213. "type": "string"
  10214. },
  10215. "required": false
  10216. },
  10217. {
  10218. "name": "workspace",
  10219. "in": "query",
  10220. "schema": {
  10221. "type": "string"
  10222. },
  10223. "required": false
  10224. }
  10225. ],
  10226. "responses": {
  10227. "200": {
  10228. "description": "Connected session",
  10229. "content": {
  10230. "application/json": {
  10231. "schema": {
  10232. "type": "boolean",
  10233. "description": "Connected session"
  10234. }
  10235. }
  10236. }
  10237. },
  10238. "403": {
  10239. "description": "Forbidden",
  10240. "content": {
  10241. "application/json": {
  10242. "schema": {
  10243. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  10244. }
  10245. }
  10246. }
  10247. },
  10248. "404": {
  10249. "description": "Not found",
  10250. "content": {
  10251. "application/json": {
  10252. "schema": {
  10253. "$ref": "#/components/schemas/NotFoundError"
  10254. }
  10255. }
  10256. }
  10257. }
  10258. },
  10259. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  10260. "summary": "Connect to PTY session",
  10261. "x-codeSamples": [
  10262. {
  10263. "lang": "js",
  10264. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  10265. }
  10266. ]
  10267. }
  10268. }
  10269. },
  10270. "components": {
  10271. "schemas": {
  10272. "Event": {
  10273. "anyOf": [
  10274. {
  10275. "$ref": "#/components/schemas/Event.tui.prompt.append"
  10276. },
  10277. {
  10278. "$ref": "#/components/schemas/Event.tui.command.execute"
  10279. },
  10280. {
  10281. "$ref": "#/components/schemas/EventTuiToastShow1"
  10282. },
  10283. {
  10284. "$ref": "#/components/schemas/Event.tui.session.select"
  10285. },
  10286. {
  10287. "$ref": "#/components/schemas/EventServerConnected"
  10288. },
  10289. {
  10290. "$ref": "#/components/schemas/EventGlobalDisposed"
  10291. },
  10292. {
  10293. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  10294. },
  10295. {
  10296. "$ref": "#/components/schemas/EventFileEdited"
  10297. },
  10298. {
  10299. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  10300. },
  10301. {
  10302. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  10303. },
  10304. {
  10305. "$ref": "#/components/schemas/EventLspUpdated"
  10306. },
  10307. {
  10308. "$ref": "#/components/schemas/EventMessagePartDelta"
  10309. },
  10310. {
  10311. "$ref": "#/components/schemas/EventPermissionAsked"
  10312. },
  10313. {
  10314. "$ref": "#/components/schemas/EventPermissionReplied"
  10315. },
  10316. {
  10317. "$ref": "#/components/schemas/EventSessionDiff"
  10318. },
  10319. {
  10320. "$ref": "#/components/schemas/EventSessionError"
  10321. },
  10322. {
  10323. "$ref": "#/components/schemas/EventQuestionAsked"
  10324. },
  10325. {
  10326. "$ref": "#/components/schemas/EventQuestionReplied"
  10327. },
  10328. {
  10329. "$ref": "#/components/schemas/EventQuestionRejected"
  10330. },
  10331. {
  10332. "$ref": "#/components/schemas/EventTodoUpdated"
  10333. },
  10334. {
  10335. "$ref": "#/components/schemas/EventSessionStatus"
  10336. },
  10337. {
  10338. "$ref": "#/components/schemas/EventSessionIdle"
  10339. },
  10340. {
  10341. "$ref": "#/components/schemas/EventMcpToolsChanged"
  10342. },
  10343. {
  10344. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  10345. },
  10346. {
  10347. "$ref": "#/components/schemas/EventCommandExecuted"
  10348. },
  10349. {
  10350. "$ref": "#/components/schemas/EventProjectUpdated"
  10351. },
  10352. {
  10353. "$ref": "#/components/schemas/EventSessionCompacted"
  10354. },
  10355. {
  10356. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  10357. },
  10358. {
  10359. "$ref": "#/components/schemas/EventWorkspaceReady"
  10360. },
  10361. {
  10362. "$ref": "#/components/schemas/EventWorkspaceFailed"
  10363. },
  10364. {
  10365. "$ref": "#/components/schemas/EventWorkspaceStatus"
  10366. },
  10367. {
  10368. "$ref": "#/components/schemas/EventWorktreeReady"
  10369. },
  10370. {
  10371. "$ref": "#/components/schemas/EventWorktreeFailed"
  10372. },
  10373. {
  10374. "$ref": "#/components/schemas/EventPtyCreated"
  10375. },
  10376. {
  10377. "$ref": "#/components/schemas/EventPtyUpdated"
  10378. },
  10379. {
  10380. "$ref": "#/components/schemas/EventPtyExited"
  10381. },
  10382. {
  10383. "$ref": "#/components/schemas/EventPtyDeleted"
  10384. },
  10385. {
  10386. "$ref": "#/components/schemas/EventInstallationUpdated"
  10387. },
  10388. {
  10389. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  10390. },
  10391. {
  10392. "$ref": "#/components/schemas/EventMessageUpdated"
  10393. },
  10394. {
  10395. "$ref": "#/components/schemas/EventMessageRemoved"
  10396. },
  10397. {
  10398. "$ref": "#/components/schemas/EventMessagePartUpdated"
  10399. },
  10400. {
  10401. "$ref": "#/components/schemas/EventMessagePartRemoved"
  10402. },
  10403. {
  10404. "$ref": "#/components/schemas/EventSessionCreated"
  10405. },
  10406. {
  10407. "$ref": "#/components/schemas/EventSessionUpdated"
  10408. },
  10409. {
  10410. "$ref": "#/components/schemas/EventSessionDeleted"
  10411. },
  10412. {
  10413. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  10414. },
  10415. {
  10416. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  10417. },
  10418. {
  10419. "$ref": "#/components/schemas/EventSessionNextPrompted"
  10420. },
  10421. {
  10422. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  10423. },
  10424. {
  10425. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  10426. },
  10427. {
  10428. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  10429. },
  10430. {
  10431. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  10432. },
  10433. {
  10434. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  10435. },
  10436. {
  10437. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  10438. },
  10439. {
  10440. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  10441. },
  10442. {
  10443. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  10444. },
  10445. {
  10446. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  10447. },
  10448. {
  10449. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  10450. },
  10451. {
  10452. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  10453. },
  10454. {
  10455. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  10456. },
  10457. {
  10458. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  10459. },
  10460. {
  10461. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  10462. },
  10463. {
  10464. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  10465. },
  10466. {
  10467. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  10468. },
  10469. {
  10470. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  10471. },
  10472. {
  10473. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  10474. },
  10475. {
  10476. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  10477. },
  10478. {
  10479. "$ref": "#/components/schemas/EventSessionNextRetried"
  10480. },
  10481. {
  10482. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  10483. },
  10484. {
  10485. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  10486. },
  10487. {
  10488. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  10489. },
  10490. {
  10491. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  10492. },
  10493. {
  10494. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  10495. },
  10496. {
  10497. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  10498. },
  10499. {
  10500. "$ref": "#/components/schemas/EventSessionNextPrompted"
  10501. },
  10502. {
  10503. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  10504. },
  10505. {
  10506. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  10507. },
  10508. {
  10509. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  10510. },
  10511. {
  10512. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  10513. },
  10514. {
  10515. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  10516. },
  10517. {
  10518. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  10519. },
  10520. {
  10521. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  10522. },
  10523. {
  10524. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  10525. },
  10526. {
  10527. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  10528. },
  10529. {
  10530. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  10531. },
  10532. {
  10533. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  10534. },
  10535. {
  10536. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  10537. },
  10538. {
  10539. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  10540. },
  10541. {
  10542. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  10543. },
  10544. {
  10545. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  10546. },
  10547. {
  10548. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  10549. },
  10550. {
  10551. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  10552. },
  10553. {
  10554. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  10555. },
  10556. {
  10557. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  10558. },
  10559. {
  10560. "$ref": "#/components/schemas/EventSessionNextRetried"
  10561. },
  10562. {
  10563. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  10564. },
  10565. {
  10566. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  10567. },
  10568. {
  10569. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  10570. }
  10571. ]
  10572. },
  10573. "OAuth": {
  10574. "type": "object",
  10575. "properties": {
  10576. "type": {
  10577. "type": "string",
  10578. "enum": ["oauth"]
  10579. },
  10580. "refresh": {
  10581. "type": "string"
  10582. },
  10583. "access": {
  10584. "type": "string"
  10585. },
  10586. "expires": {
  10587. "type": "integer",
  10588. "minimum": 0
  10589. },
  10590. "accountId": {
  10591. "type": "string"
  10592. },
  10593. "enterpriseUrl": {
  10594. "type": "string"
  10595. }
  10596. },
  10597. "required": ["type", "refresh", "access", "expires"],
  10598. "additionalProperties": false
  10599. },
  10600. "ApiAuth": {
  10601. "type": "object",
  10602. "properties": {
  10603. "type": {
  10604. "type": "string",
  10605. "enum": ["api"]
  10606. },
  10607. "key": {
  10608. "type": "string"
  10609. },
  10610. "metadata": {
  10611. "type": "object",
  10612. "additionalProperties": {
  10613. "type": "string"
  10614. }
  10615. }
  10616. },
  10617. "required": ["type", "key"],
  10618. "additionalProperties": false
  10619. },
  10620. "WellKnownAuth": {
  10621. "type": "object",
  10622. "properties": {
  10623. "type": {
  10624. "type": "string",
  10625. "enum": ["wellknown"]
  10626. },
  10627. "key": {
  10628. "type": "string"
  10629. },
  10630. "token": {
  10631. "type": "string"
  10632. }
  10633. },
  10634. "required": ["type", "key", "token"],
  10635. "additionalProperties": false
  10636. },
  10637. "Auth": {
  10638. "anyOf": [
  10639. {
  10640. "$ref": "#/components/schemas/OAuth"
  10641. },
  10642. {
  10643. "$ref": "#/components/schemas/ApiAuth"
  10644. },
  10645. {
  10646. "$ref": "#/components/schemas/WellKnownAuth"
  10647. }
  10648. ]
  10649. },
  10650. "effect_HttpApiError_BadRequest": {
  10651. "type": "object",
  10652. "properties": {
  10653. "_tag": {
  10654. "type": "string",
  10655. "enum": ["BadRequest"]
  10656. }
  10657. },
  10658. "required": ["_tag"],
  10659. "additionalProperties": false
  10660. },
  10661. "InvalidRequestError": {
  10662. "type": "object",
  10663. "properties": {
  10664. "_tag": {
  10665. "type": "string",
  10666. "enum": ["InvalidRequestError"]
  10667. },
  10668. "message": {
  10669. "type": "string"
  10670. },
  10671. "kind": {
  10672. "type": "string"
  10673. },
  10674. "field": {
  10675. "type": "string"
  10676. }
  10677. },
  10678. "required": ["_tag", "message"],
  10679. "additionalProperties": false
  10680. },
  10681. "Event.tui.prompt.append": {
  10682. "type": "object",
  10683. "properties": {
  10684. "id": {
  10685. "type": "string"
  10686. },
  10687. "type": {
  10688. "type": "string",
  10689. "enum": ["tui.prompt.append"]
  10690. },
  10691. "properties": {
  10692. "type": "object",
  10693. "properties": {
  10694. "text": {
  10695. "type": "string"
  10696. }
  10697. },
  10698. "required": ["text"],
  10699. "additionalProperties": false
  10700. }
  10701. },
  10702. "required": ["id", "type", "properties"],
  10703. "additionalProperties": false
  10704. },
  10705. "Event.tui.command.execute": {
  10706. "type": "object",
  10707. "properties": {
  10708. "id": {
  10709. "type": "string"
  10710. },
  10711. "type": {
  10712. "type": "string",
  10713. "enum": ["tui.command.execute"]
  10714. },
  10715. "properties": {
  10716. "type": "object",
  10717. "properties": {
  10718. "command": {
  10719. "anyOf": [
  10720. {
  10721. "type": "string",
  10722. "enum": [
  10723. "session.list",
  10724. "session.new",
  10725. "session.share",
  10726. "session.interrupt",
  10727. "session.compact",
  10728. "session.page.up",
  10729. "session.page.down",
  10730. "session.line.up",
  10731. "session.line.down",
  10732. "session.half.page.up",
  10733. "session.half.page.down",
  10734. "session.first",
  10735. "session.last",
  10736. "prompt.clear",
  10737. "prompt.submit",
  10738. "agent.cycle"
  10739. ]
  10740. },
  10741. {
  10742. "type": "string"
  10743. }
  10744. ]
  10745. }
  10746. },
  10747. "required": ["command"],
  10748. "additionalProperties": false
  10749. }
  10750. },
  10751. "required": ["id", "type", "properties"],
  10752. "additionalProperties": false
  10753. },
  10754. "Event.tui.toast.show": {
  10755. "type": "object",
  10756. "properties": {
  10757. "id": {
  10758. "type": "string"
  10759. },
  10760. "type": {
  10761. "type": "string",
  10762. "enum": ["tui.toast.show"]
  10763. },
  10764. "properties": {
  10765. "type": "object",
  10766. "properties": {
  10767. "title": {
  10768. "type": "string"
  10769. },
  10770. "message": {
  10771. "type": "string"
  10772. },
  10773. "variant": {
  10774. "type": "string",
  10775. "enum": ["info", "success", "warning", "error"]
  10776. },
  10777. "duration": {
  10778. "type": "integer",
  10779. "exclusiveMinimum": 0
  10780. }
  10781. },
  10782. "required": ["message", "variant"],
  10783. "additionalProperties": false
  10784. }
  10785. },
  10786. "required": ["id", "type", "properties"],
  10787. "additionalProperties": false
  10788. },
  10789. "Event.tui.session.select": {
  10790. "type": "object",
  10791. "properties": {
  10792. "id": {
  10793. "type": "string"
  10794. },
  10795. "type": {
  10796. "type": "string",
  10797. "enum": ["tui.session.select"]
  10798. },
  10799. "properties": {
  10800. "type": "object",
  10801. "properties": {
  10802. "sessionID": {
  10803. "type": "string",
  10804. "pattern": "^ses",
  10805. "description": "Session ID to navigate to"
  10806. }
  10807. },
  10808. "required": ["sessionID"],
  10809. "additionalProperties": false
  10810. }
  10811. },
  10812. "required": ["id", "type", "properties"],
  10813. "additionalProperties": false
  10814. },
  10815. "PermissionRequest": {
  10816. "type": "object",
  10817. "properties": {
  10818. "id": {
  10819. "type": "string",
  10820. "pattern": "^per"
  10821. },
  10822. "sessionID": {
  10823. "type": "string",
  10824. "pattern": "^ses"
  10825. },
  10826. "permission": {
  10827. "type": "string"
  10828. },
  10829. "patterns": {
  10830. "type": "array",
  10831. "items": {
  10832. "type": "string"
  10833. }
  10834. },
  10835. "metadata": {
  10836. "type": "object"
  10837. },
  10838. "always": {
  10839. "type": "array",
  10840. "items": {
  10841. "type": "string"
  10842. }
  10843. },
  10844. "tool": {
  10845. "type": "object",
  10846. "properties": {
  10847. "messageID": {
  10848. "type": "string",
  10849. "pattern": "^msg"
  10850. },
  10851. "callID": {
  10852. "type": "string"
  10853. }
  10854. },
  10855. "required": ["messageID", "callID"],
  10856. "additionalProperties": false
  10857. }
  10858. },
  10859. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  10860. "additionalProperties": false
  10861. },
  10862. "SnapshotFileDiff": {
  10863. "type": "object",
  10864. "properties": {
  10865. "file": {
  10866. "type": "string"
  10867. },
  10868. "patch": {
  10869. "type": "string"
  10870. },
  10871. "additions": {
  10872. "type": "number"
  10873. },
  10874. "deletions": {
  10875. "type": "number"
  10876. },
  10877. "status": {
  10878. "type": "string",
  10879. "enum": ["added", "deleted", "modified"]
  10880. }
  10881. },
  10882. "required": ["additions", "deletions"],
  10883. "additionalProperties": false
  10884. },
  10885. "ProviderAuthError": {
  10886. "type": "object",
  10887. "properties": {
  10888. "name": {
  10889. "type": "string",
  10890. "enum": ["ProviderAuthError"]
  10891. },
  10892. "data": {
  10893. "type": "object",
  10894. "properties": {
  10895. "providerID": {
  10896. "type": "string"
  10897. },
  10898. "message": {
  10899. "type": "string"
  10900. }
  10901. },
  10902. "required": ["providerID", "message"],
  10903. "additionalProperties": false
  10904. }
  10905. },
  10906. "required": ["name", "data"],
  10907. "additionalProperties": false
  10908. },
  10909. "UnknownError": {
  10910. "type": "object",
  10911. "properties": {
  10912. "name": {
  10913. "type": "string",
  10914. "enum": ["UnknownError"]
  10915. },
  10916. "data": {
  10917. "type": "object",
  10918. "properties": {
  10919. "message": {
  10920. "type": "string"
  10921. }
  10922. },
  10923. "required": ["message"],
  10924. "additionalProperties": false
  10925. }
  10926. },
  10927. "required": ["name", "data"],
  10928. "additionalProperties": false
  10929. },
  10930. "MessageOutputLengthError": {
  10931. "type": "object",
  10932. "properties": {
  10933. "name": {
  10934. "type": "string",
  10935. "enum": ["MessageOutputLengthError"]
  10936. },
  10937. "data": {
  10938. "type": "object",
  10939. "properties": {}
  10940. }
  10941. },
  10942. "required": ["name", "data"],
  10943. "additionalProperties": false
  10944. },
  10945. "MessageAbortedError": {
  10946. "type": "object",
  10947. "properties": {
  10948. "name": {
  10949. "type": "string",
  10950. "enum": ["MessageAbortedError"]
  10951. },
  10952. "data": {
  10953. "type": "object",
  10954. "properties": {
  10955. "message": {
  10956. "type": "string"
  10957. }
  10958. },
  10959. "required": ["message"],
  10960. "additionalProperties": false
  10961. }
  10962. },
  10963. "required": ["name", "data"],
  10964. "additionalProperties": false
  10965. },
  10966. "StructuredOutputError": {
  10967. "type": "object",
  10968. "properties": {
  10969. "name": {
  10970. "type": "string",
  10971. "enum": ["StructuredOutputError"]
  10972. },
  10973. "data": {
  10974. "type": "object",
  10975. "properties": {
  10976. "message": {
  10977. "type": "string"
  10978. },
  10979. "retries": {
  10980. "type": "integer",
  10981. "minimum": 0
  10982. }
  10983. },
  10984. "required": ["message", "retries"],
  10985. "additionalProperties": false
  10986. }
  10987. },
  10988. "required": ["name", "data"],
  10989. "additionalProperties": false
  10990. },
  10991. "ContextOverflowError": {
  10992. "type": "object",
  10993. "properties": {
  10994. "name": {
  10995. "type": "string",
  10996. "enum": ["ContextOverflowError"]
  10997. },
  10998. "data": {
  10999. "type": "object",
  11000. "properties": {
  11001. "message": {
  11002. "type": "string"
  11003. },
  11004. "responseBody": {
  11005. "type": "string"
  11006. }
  11007. },
  11008. "required": ["message"],
  11009. "additionalProperties": false
  11010. }
  11011. },
  11012. "required": ["name", "data"],
  11013. "additionalProperties": false
  11014. },
  11015. "APIError": {
  11016. "type": "object",
  11017. "properties": {
  11018. "name": {
  11019. "type": "string",
  11020. "enum": ["APIError"]
  11021. },
  11022. "data": {
  11023. "type": "object",
  11024. "properties": {
  11025. "message": {
  11026. "type": "string"
  11027. },
  11028. "statusCode": {
  11029. "type": "integer",
  11030. "minimum": 0
  11031. },
  11032. "isRetryable": {
  11033. "type": "boolean"
  11034. },
  11035. "responseHeaders": {
  11036. "type": "object",
  11037. "additionalProperties": {
  11038. "type": "string"
  11039. }
  11040. },
  11041. "responseBody": {
  11042. "type": "string"
  11043. },
  11044. "metadata": {
  11045. "type": "object",
  11046. "additionalProperties": {
  11047. "type": "string"
  11048. }
  11049. }
  11050. },
  11051. "required": ["message", "isRetryable"],
  11052. "additionalProperties": false
  11053. }
  11054. },
  11055. "required": ["name", "data"],
  11056. "additionalProperties": false
  11057. },
  11058. "QuestionOption": {
  11059. "type": "object",
  11060. "properties": {
  11061. "label": {
  11062. "type": "string",
  11063. "description": "Display text (1-5 words, concise)"
  11064. },
  11065. "description": {
  11066. "type": "string",
  11067. "description": "Explanation of choice"
  11068. }
  11069. },
  11070. "required": ["label", "description"],
  11071. "additionalProperties": false
  11072. },
  11073. "QuestionInfo": {
  11074. "type": "object",
  11075. "properties": {
  11076. "question": {
  11077. "type": "string",
  11078. "description": "Complete question"
  11079. },
  11080. "header": {
  11081. "type": "string",
  11082. "description": "Very short label (max 30 chars)"
  11083. },
  11084. "options": {
  11085. "type": "array",
  11086. "items": {
  11087. "$ref": "#/components/schemas/QuestionOption"
  11088. },
  11089. "description": "Available choices"
  11090. },
  11091. "multiple": {
  11092. "type": "boolean"
  11093. },
  11094. "custom": {
  11095. "type": "boolean"
  11096. }
  11097. },
  11098. "required": ["question", "header", "options"],
  11099. "additionalProperties": false
  11100. },
  11101. "QuestionTool": {
  11102. "type": "object",
  11103. "properties": {
  11104. "messageID": {
  11105. "type": "string",
  11106. "pattern": "^msg"
  11107. },
  11108. "callID": {
  11109. "type": "string"
  11110. }
  11111. },
  11112. "required": ["messageID", "callID"],
  11113. "additionalProperties": false
  11114. },
  11115. "QuestionRequest": {
  11116. "type": "object",
  11117. "properties": {
  11118. "id": {
  11119. "type": "string",
  11120. "pattern": "^que"
  11121. },
  11122. "sessionID": {
  11123. "type": "string",
  11124. "pattern": "^ses"
  11125. },
  11126. "questions": {
  11127. "type": "array",
  11128. "items": {
  11129. "$ref": "#/components/schemas/QuestionInfo"
  11130. },
  11131. "description": "Questions to ask"
  11132. },
  11133. "tool": {
  11134. "$ref": "#/components/schemas/QuestionTool"
  11135. }
  11136. },
  11137. "required": ["id", "sessionID", "questions"],
  11138. "additionalProperties": false
  11139. },
  11140. "QuestionAnswer": {
  11141. "type": "array",
  11142. "items": {
  11143. "type": "string"
  11144. }
  11145. },
  11146. "QuestionReplied": {
  11147. "type": "object",
  11148. "properties": {
  11149. "sessionID": {
  11150. "type": "string",
  11151. "pattern": "^ses"
  11152. },
  11153. "requestID": {
  11154. "type": "string",
  11155. "pattern": "^que"
  11156. },
  11157. "answers": {
  11158. "type": "array",
  11159. "items": {
  11160. "$ref": "#/components/schemas/QuestionAnswer"
  11161. }
  11162. }
  11163. },
  11164. "required": ["sessionID", "requestID", "answers"],
  11165. "additionalProperties": false
  11166. },
  11167. "QuestionRejected": {
  11168. "type": "object",
  11169. "properties": {
  11170. "sessionID": {
  11171. "type": "string",
  11172. "pattern": "^ses"
  11173. },
  11174. "requestID": {
  11175. "type": "string",
  11176. "pattern": "^que"
  11177. }
  11178. },
  11179. "required": ["sessionID", "requestID"],
  11180. "additionalProperties": false
  11181. },
  11182. "Todo": {
  11183. "type": "object",
  11184. "properties": {
  11185. "content": {
  11186. "type": "string",
  11187. "description": "Brief description of the task"
  11188. },
  11189. "status": {
  11190. "type": "string",
  11191. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  11192. },
  11193. "priority": {
  11194. "type": "string",
  11195. "description": "Priority level of the task: high, medium, low"
  11196. }
  11197. },
  11198. "required": ["content", "status", "priority"],
  11199. "additionalProperties": false
  11200. },
  11201. "SessionStatus": {
  11202. "anyOf": [
  11203. {
  11204. "type": "object",
  11205. "properties": {
  11206. "type": {
  11207. "type": "string",
  11208. "enum": ["idle"]
  11209. }
  11210. },
  11211. "required": ["type"],
  11212. "additionalProperties": false
  11213. },
  11214. {
  11215. "type": "object",
  11216. "properties": {
  11217. "type": {
  11218. "type": "string",
  11219. "enum": ["retry"]
  11220. },
  11221. "attempt": {
  11222. "type": "integer",
  11223. "minimum": 0
  11224. },
  11225. "message": {
  11226. "type": "string"
  11227. },
  11228. "action": {
  11229. "type": "object",
  11230. "properties": {
  11231. "reason": {
  11232. "type": "string"
  11233. },
  11234. "provider": {
  11235. "type": "string"
  11236. },
  11237. "title": {
  11238. "type": "string"
  11239. },
  11240. "message": {
  11241. "type": "string"
  11242. },
  11243. "label": {
  11244. "type": "string"
  11245. },
  11246. "link": {
  11247. "type": "string"
  11248. }
  11249. },
  11250. "required": ["reason", "provider", "title", "message", "label"],
  11251. "additionalProperties": false
  11252. },
  11253. "next": {
  11254. "type": "integer",
  11255. "minimum": 0
  11256. }
  11257. },
  11258. "required": ["type", "attempt", "message", "next"],
  11259. "additionalProperties": false
  11260. },
  11261. {
  11262. "type": "object",
  11263. "properties": {
  11264. "type": {
  11265. "type": "string",
  11266. "enum": ["busy"]
  11267. }
  11268. },
  11269. "required": ["type"],
  11270. "additionalProperties": false
  11271. }
  11272. ]
  11273. },
  11274. "Project": {
  11275. "type": "object",
  11276. "properties": {
  11277. "id": {
  11278. "type": "string"
  11279. },
  11280. "worktree": {
  11281. "type": "string"
  11282. },
  11283. "vcs": {
  11284. "type": "string",
  11285. "enum": ["git"]
  11286. },
  11287. "name": {
  11288. "type": "string"
  11289. },
  11290. "icon": {
  11291. "type": "object",
  11292. "properties": {
  11293. "url": {
  11294. "type": "string"
  11295. },
  11296. "override": {
  11297. "type": "string"
  11298. },
  11299. "color": {
  11300. "type": "string"
  11301. }
  11302. },
  11303. "additionalProperties": false
  11304. },
  11305. "commands": {
  11306. "type": "object",
  11307. "properties": {
  11308. "start": {
  11309. "type": "string",
  11310. "description": "Startup script to run when creating a new workspace (worktree)"
  11311. }
  11312. },
  11313. "additionalProperties": false
  11314. },
  11315. "time": {
  11316. "type": "object",
  11317. "properties": {
  11318. "created": {
  11319. "type": "integer",
  11320. "minimum": 0
  11321. },
  11322. "updated": {
  11323. "type": "integer",
  11324. "minimum": 0
  11325. },
  11326. "initialized": {
  11327. "type": "integer",
  11328. "minimum": 0
  11329. }
  11330. },
  11331. "required": ["created", "updated"],
  11332. "additionalProperties": false
  11333. },
  11334. "sandboxes": {
  11335. "type": "array",
  11336. "items": {
  11337. "type": "string"
  11338. }
  11339. }
  11340. },
  11341. "required": ["id", "worktree", "time", "sandboxes"],
  11342. "additionalProperties": false
  11343. },
  11344. "Pty": {
  11345. "type": "object",
  11346. "properties": {
  11347. "id": {
  11348. "type": "string",
  11349. "pattern": "^pty"
  11350. },
  11351. "title": {
  11352. "type": "string"
  11353. },
  11354. "command": {
  11355. "type": "string"
  11356. },
  11357. "args": {
  11358. "type": "array",
  11359. "items": {
  11360. "type": "string"
  11361. }
  11362. },
  11363. "cwd": {
  11364. "type": "string"
  11365. },
  11366. "status": {
  11367. "type": "string",
  11368. "enum": ["running", "exited"]
  11369. },
  11370. "pid": {
  11371. "type": "integer",
  11372. "exclusiveMinimum": 0
  11373. }
  11374. },
  11375. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  11376. "additionalProperties": false
  11377. },
  11378. "OutputFormatText": {
  11379. "type": "object",
  11380. "properties": {
  11381. "type": {
  11382. "type": "string",
  11383. "enum": ["text"]
  11384. }
  11385. },
  11386. "required": ["type"],
  11387. "additionalProperties": false
  11388. },
  11389. "JSONSchema": {
  11390. "type": "object"
  11391. },
  11392. "OutputFormatJsonSchema": {
  11393. "type": "object",
  11394. "properties": {
  11395. "type": {
  11396. "type": "string",
  11397. "enum": ["json_schema"]
  11398. },
  11399. "schema": {
  11400. "$ref": "#/components/schemas/JSONSchema"
  11401. },
  11402. "retryCount": {
  11403. "type": "integer",
  11404. "minimum": 0
  11405. }
  11406. },
  11407. "required": ["type", "schema"],
  11408. "additionalProperties": false
  11409. },
  11410. "OutputFormat": {
  11411. "anyOf": [
  11412. {
  11413. "$ref": "#/components/schemas/OutputFormatText"
  11414. },
  11415. {
  11416. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  11417. }
  11418. ]
  11419. },
  11420. "UserMessage": {
  11421. "type": "object",
  11422. "properties": {
  11423. "id": {
  11424. "type": "string",
  11425. "pattern": "^msg"
  11426. },
  11427. "sessionID": {
  11428. "type": "string",
  11429. "pattern": "^ses"
  11430. },
  11431. "role": {
  11432. "type": "string",
  11433. "enum": ["user"]
  11434. },
  11435. "time": {
  11436. "type": "object",
  11437. "properties": {
  11438. "created": {
  11439. "type": "integer",
  11440. "minimum": 0
  11441. }
  11442. },
  11443. "required": ["created"],
  11444. "additionalProperties": false
  11445. },
  11446. "format": {
  11447. "$ref": "#/components/schemas/OutputFormat"
  11448. },
  11449. "summary": {
  11450. "type": "object",
  11451. "properties": {
  11452. "title": {
  11453. "type": "string"
  11454. },
  11455. "body": {
  11456. "type": "string"
  11457. },
  11458. "diffs": {
  11459. "type": "array",
  11460. "items": {
  11461. "$ref": "#/components/schemas/SnapshotFileDiff"
  11462. }
  11463. }
  11464. },
  11465. "required": ["diffs"],
  11466. "additionalProperties": false
  11467. },
  11468. "agent": {
  11469. "type": "string"
  11470. },
  11471. "model": {
  11472. "type": "object",
  11473. "properties": {
  11474. "providerID": {
  11475. "type": "string"
  11476. },
  11477. "modelID": {
  11478. "type": "string"
  11479. },
  11480. "variant": {
  11481. "type": "string"
  11482. }
  11483. },
  11484. "required": ["providerID", "modelID"],
  11485. "additionalProperties": false
  11486. },
  11487. "system": {
  11488. "type": "string"
  11489. },
  11490. "tools": {
  11491. "type": "object",
  11492. "additionalProperties": {
  11493. "type": "boolean"
  11494. }
  11495. }
  11496. },
  11497. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  11498. "additionalProperties": false
  11499. },
  11500. "AssistantMessage": {
  11501. "type": "object",
  11502. "properties": {
  11503. "id": {
  11504. "type": "string",
  11505. "pattern": "^msg"
  11506. },
  11507. "sessionID": {
  11508. "type": "string",
  11509. "pattern": "^ses"
  11510. },
  11511. "role": {
  11512. "type": "string",
  11513. "enum": ["assistant"]
  11514. },
  11515. "time": {
  11516. "type": "object",
  11517. "properties": {
  11518. "created": {
  11519. "type": "integer",
  11520. "minimum": 0
  11521. },
  11522. "completed": {
  11523. "type": "integer",
  11524. "minimum": 0
  11525. }
  11526. },
  11527. "required": ["created"],
  11528. "additionalProperties": false
  11529. },
  11530. "error": {
  11531. "anyOf": [
  11532. {
  11533. "$ref": "#/components/schemas/ProviderAuthError"
  11534. },
  11535. {
  11536. "$ref": "#/components/schemas/UnknownError"
  11537. },
  11538. {
  11539. "$ref": "#/components/schemas/MessageOutputLengthError"
  11540. },
  11541. {
  11542. "$ref": "#/components/schemas/MessageAbortedError"
  11543. },
  11544. {
  11545. "$ref": "#/components/schemas/StructuredOutputError"
  11546. },
  11547. {
  11548. "$ref": "#/components/schemas/ContextOverflowError"
  11549. },
  11550. {
  11551. "$ref": "#/components/schemas/APIError"
  11552. }
  11553. ]
  11554. },
  11555. "parentID": {
  11556. "type": "string",
  11557. "pattern": "^msg"
  11558. },
  11559. "modelID": {
  11560. "type": "string"
  11561. },
  11562. "providerID": {
  11563. "type": "string"
  11564. },
  11565. "mode": {
  11566. "type": "string"
  11567. },
  11568. "agent": {
  11569. "type": "string"
  11570. },
  11571. "path": {
  11572. "type": "object",
  11573. "properties": {
  11574. "cwd": {
  11575. "type": "string"
  11576. },
  11577. "root": {
  11578. "type": "string"
  11579. }
  11580. },
  11581. "required": ["cwd", "root"],
  11582. "additionalProperties": false
  11583. },
  11584. "summary": {
  11585. "type": "boolean"
  11586. },
  11587. "cost": {
  11588. "type": "number"
  11589. },
  11590. "tokens": {
  11591. "type": "object",
  11592. "properties": {
  11593. "total": {
  11594. "type": "number"
  11595. },
  11596. "input": {
  11597. "type": "number"
  11598. },
  11599. "output": {
  11600. "type": "number"
  11601. },
  11602. "reasoning": {
  11603. "type": "number"
  11604. },
  11605. "cache": {
  11606. "type": "object",
  11607. "properties": {
  11608. "read": {
  11609. "type": "number"
  11610. },
  11611. "write": {
  11612. "type": "number"
  11613. }
  11614. },
  11615. "required": ["read", "write"],
  11616. "additionalProperties": false
  11617. }
  11618. },
  11619. "required": ["input", "output", "reasoning", "cache"],
  11620. "additionalProperties": false
  11621. },
  11622. "structured": {},
  11623. "variant": {
  11624. "type": "string"
  11625. },
  11626. "finish": {
  11627. "type": "string"
  11628. }
  11629. },
  11630. "required": [
  11631. "id",
  11632. "sessionID",
  11633. "role",
  11634. "time",
  11635. "parentID",
  11636. "modelID",
  11637. "providerID",
  11638. "mode",
  11639. "agent",
  11640. "path",
  11641. "cost",
  11642. "tokens"
  11643. ],
  11644. "additionalProperties": false
  11645. },
  11646. "Message": {
  11647. "anyOf": [
  11648. {
  11649. "$ref": "#/components/schemas/UserMessage"
  11650. },
  11651. {
  11652. "$ref": "#/components/schemas/AssistantMessage"
  11653. }
  11654. ]
  11655. },
  11656. "TextPart": {
  11657. "type": "object",
  11658. "properties": {
  11659. "id": {
  11660. "type": "string",
  11661. "pattern": "^prt"
  11662. },
  11663. "sessionID": {
  11664. "type": "string",
  11665. "pattern": "^ses"
  11666. },
  11667. "messageID": {
  11668. "type": "string",
  11669. "pattern": "^msg"
  11670. },
  11671. "type": {
  11672. "type": "string",
  11673. "enum": ["text"]
  11674. },
  11675. "text": {
  11676. "type": "string"
  11677. },
  11678. "synthetic": {
  11679. "type": "boolean"
  11680. },
  11681. "ignored": {
  11682. "type": "boolean"
  11683. },
  11684. "time": {
  11685. "type": "object",
  11686. "properties": {
  11687. "start": {
  11688. "type": "integer",
  11689. "minimum": 0
  11690. },
  11691. "end": {
  11692. "type": "integer",
  11693. "minimum": 0
  11694. }
  11695. },
  11696. "required": ["start"],
  11697. "additionalProperties": false
  11698. },
  11699. "metadata": {
  11700. "type": "object"
  11701. }
  11702. },
  11703. "required": ["id", "sessionID", "messageID", "type", "text"],
  11704. "additionalProperties": false
  11705. },
  11706. "SubtaskPart": {
  11707. "type": "object",
  11708. "properties": {
  11709. "id": {
  11710. "type": "string",
  11711. "pattern": "^prt"
  11712. },
  11713. "sessionID": {
  11714. "type": "string",
  11715. "pattern": "^ses"
  11716. },
  11717. "messageID": {
  11718. "type": "string",
  11719. "pattern": "^msg"
  11720. },
  11721. "type": {
  11722. "type": "string",
  11723. "enum": ["subtask"]
  11724. },
  11725. "prompt": {
  11726. "type": "string"
  11727. },
  11728. "description": {
  11729. "type": "string"
  11730. },
  11731. "agent": {
  11732. "type": "string"
  11733. },
  11734. "model": {
  11735. "type": "object",
  11736. "properties": {
  11737. "providerID": {
  11738. "type": "string"
  11739. },
  11740. "modelID": {
  11741. "type": "string"
  11742. }
  11743. },
  11744. "required": ["providerID", "modelID"],
  11745. "additionalProperties": false
  11746. },
  11747. "command": {
  11748. "type": "string"
  11749. }
  11750. },
  11751. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  11752. "additionalProperties": false
  11753. },
  11754. "ReasoningPart": {
  11755. "type": "object",
  11756. "properties": {
  11757. "id": {
  11758. "type": "string",
  11759. "pattern": "^prt"
  11760. },
  11761. "sessionID": {
  11762. "type": "string",
  11763. "pattern": "^ses"
  11764. },
  11765. "messageID": {
  11766. "type": "string",
  11767. "pattern": "^msg"
  11768. },
  11769. "type": {
  11770. "type": "string",
  11771. "enum": ["reasoning"]
  11772. },
  11773. "text": {
  11774. "type": "string"
  11775. },
  11776. "metadata": {
  11777. "type": "object"
  11778. },
  11779. "time": {
  11780. "type": "object",
  11781. "properties": {
  11782. "start": {
  11783. "type": "integer",
  11784. "minimum": 0
  11785. },
  11786. "end": {
  11787. "type": "integer",
  11788. "minimum": 0
  11789. }
  11790. },
  11791. "required": ["start"],
  11792. "additionalProperties": false
  11793. }
  11794. },
  11795. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  11796. "additionalProperties": false
  11797. },
  11798. "FilePartSourceText": {
  11799. "type": "object",
  11800. "properties": {
  11801. "value": {
  11802. "type": "string"
  11803. },
  11804. "start": {
  11805. "type": "number"
  11806. },
  11807. "end": {
  11808. "type": "number"
  11809. }
  11810. },
  11811. "required": ["value", "start", "end"],
  11812. "additionalProperties": false
  11813. },
  11814. "FileSource": {
  11815. "type": "object",
  11816. "properties": {
  11817. "text": {
  11818. "$ref": "#/components/schemas/FilePartSourceText"
  11819. },
  11820. "type": {
  11821. "type": "string",
  11822. "enum": ["file"]
  11823. },
  11824. "path": {
  11825. "type": "string"
  11826. }
  11827. },
  11828. "required": ["text", "type", "path"],
  11829. "additionalProperties": false
  11830. },
  11831. "Range": {
  11832. "type": "object",
  11833. "properties": {
  11834. "start": {
  11835. "type": "object",
  11836. "properties": {
  11837. "line": {
  11838. "type": "integer",
  11839. "minimum": 0
  11840. },
  11841. "character": {
  11842. "type": "integer",
  11843. "minimum": 0
  11844. }
  11845. },
  11846. "required": ["line", "character"],
  11847. "additionalProperties": false
  11848. },
  11849. "end": {
  11850. "type": "object",
  11851. "properties": {
  11852. "line": {
  11853. "type": "integer",
  11854. "minimum": 0
  11855. },
  11856. "character": {
  11857. "type": "integer",
  11858. "minimum": 0
  11859. }
  11860. },
  11861. "required": ["line", "character"],
  11862. "additionalProperties": false
  11863. }
  11864. },
  11865. "required": ["start", "end"],
  11866. "additionalProperties": false
  11867. },
  11868. "SymbolSource": {
  11869. "type": "object",
  11870. "properties": {
  11871. "text": {
  11872. "$ref": "#/components/schemas/FilePartSourceText"
  11873. },
  11874. "type": {
  11875. "type": "string",
  11876. "enum": ["symbol"]
  11877. },
  11878. "path": {
  11879. "type": "string"
  11880. },
  11881. "range": {
  11882. "$ref": "#/components/schemas/Range"
  11883. },
  11884. "name": {
  11885. "type": "string"
  11886. },
  11887. "kind": {
  11888. "type": "integer",
  11889. "minimum": 0
  11890. }
  11891. },
  11892. "required": ["text", "type", "path", "range", "name", "kind"],
  11893. "additionalProperties": false
  11894. },
  11895. "ResourceSource": {
  11896. "type": "object",
  11897. "properties": {
  11898. "text": {
  11899. "$ref": "#/components/schemas/FilePartSourceText"
  11900. },
  11901. "type": {
  11902. "type": "string",
  11903. "enum": ["resource"]
  11904. },
  11905. "clientName": {
  11906. "type": "string"
  11907. },
  11908. "uri": {
  11909. "type": "string"
  11910. }
  11911. },
  11912. "required": ["text", "type", "clientName", "uri"],
  11913. "additionalProperties": false
  11914. },
  11915. "FilePartSource": {
  11916. "anyOf": [
  11917. {
  11918. "$ref": "#/components/schemas/FileSource"
  11919. },
  11920. {
  11921. "$ref": "#/components/schemas/SymbolSource"
  11922. },
  11923. {
  11924. "$ref": "#/components/schemas/ResourceSource"
  11925. }
  11926. ]
  11927. },
  11928. "FilePart": {
  11929. "type": "object",
  11930. "properties": {
  11931. "id": {
  11932. "type": "string",
  11933. "pattern": "^prt"
  11934. },
  11935. "sessionID": {
  11936. "type": "string",
  11937. "pattern": "^ses"
  11938. },
  11939. "messageID": {
  11940. "type": "string",
  11941. "pattern": "^msg"
  11942. },
  11943. "type": {
  11944. "type": "string",
  11945. "enum": ["file"]
  11946. },
  11947. "mime": {
  11948. "type": "string"
  11949. },
  11950. "filename": {
  11951. "type": "string"
  11952. },
  11953. "url": {
  11954. "type": "string"
  11955. },
  11956. "source": {
  11957. "$ref": "#/components/schemas/FilePartSource"
  11958. }
  11959. },
  11960. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  11961. "additionalProperties": false
  11962. },
  11963. "ToolStatePending": {
  11964. "type": "object",
  11965. "properties": {
  11966. "status": {
  11967. "type": "string",
  11968. "enum": ["pending"]
  11969. },
  11970. "input": {
  11971. "type": "object"
  11972. },
  11973. "raw": {
  11974. "type": "string"
  11975. }
  11976. },
  11977. "required": ["status", "input", "raw"],
  11978. "additionalProperties": false
  11979. },
  11980. "ToolStateRunning": {
  11981. "type": "object",
  11982. "properties": {
  11983. "status": {
  11984. "type": "string",
  11985. "enum": ["running"]
  11986. },
  11987. "input": {
  11988. "type": "object"
  11989. },
  11990. "title": {
  11991. "type": "string"
  11992. },
  11993. "metadata": {
  11994. "type": "object"
  11995. },
  11996. "time": {
  11997. "type": "object",
  11998. "properties": {
  11999. "start": {
  12000. "type": "integer",
  12001. "minimum": 0
  12002. }
  12003. },
  12004. "required": ["start"],
  12005. "additionalProperties": false
  12006. }
  12007. },
  12008. "required": ["status", "input", "time"],
  12009. "additionalProperties": false
  12010. },
  12011. "ToolStateCompleted": {
  12012. "type": "object",
  12013. "properties": {
  12014. "status": {
  12015. "type": "string",
  12016. "enum": ["completed"]
  12017. },
  12018. "input": {
  12019. "type": "object"
  12020. },
  12021. "output": {
  12022. "type": "string"
  12023. },
  12024. "title": {
  12025. "type": "string"
  12026. },
  12027. "metadata": {
  12028. "type": "object"
  12029. },
  12030. "time": {
  12031. "type": "object",
  12032. "properties": {
  12033. "start": {
  12034. "type": "integer",
  12035. "minimum": 0
  12036. },
  12037. "end": {
  12038. "type": "integer",
  12039. "minimum": 0
  12040. },
  12041. "compacted": {
  12042. "type": "integer",
  12043. "minimum": 0
  12044. }
  12045. },
  12046. "required": ["start", "end"],
  12047. "additionalProperties": false
  12048. },
  12049. "attachments": {
  12050. "type": "array",
  12051. "items": {
  12052. "$ref": "#/components/schemas/FilePart"
  12053. }
  12054. }
  12055. },
  12056. "required": ["status", "input", "output", "title", "metadata", "time"],
  12057. "additionalProperties": false
  12058. },
  12059. "ToolStateError": {
  12060. "type": "object",
  12061. "properties": {
  12062. "status": {
  12063. "type": "string",
  12064. "enum": ["error"]
  12065. },
  12066. "input": {
  12067. "type": "object"
  12068. },
  12069. "error": {
  12070. "type": "string"
  12071. },
  12072. "metadata": {
  12073. "type": "object"
  12074. },
  12075. "time": {
  12076. "type": "object",
  12077. "properties": {
  12078. "start": {
  12079. "type": "integer",
  12080. "minimum": 0
  12081. },
  12082. "end": {
  12083. "type": "integer",
  12084. "minimum": 0
  12085. }
  12086. },
  12087. "required": ["start", "end"],
  12088. "additionalProperties": false
  12089. }
  12090. },
  12091. "required": ["status", "input", "error", "time"],
  12092. "additionalProperties": false
  12093. },
  12094. "ToolState": {
  12095. "anyOf": [
  12096. {
  12097. "$ref": "#/components/schemas/ToolStatePending"
  12098. },
  12099. {
  12100. "$ref": "#/components/schemas/ToolStateRunning"
  12101. },
  12102. {
  12103. "$ref": "#/components/schemas/ToolStateCompleted"
  12104. },
  12105. {
  12106. "$ref": "#/components/schemas/ToolStateError"
  12107. }
  12108. ]
  12109. },
  12110. "ToolPart": {
  12111. "type": "object",
  12112. "properties": {
  12113. "id": {
  12114. "type": "string",
  12115. "pattern": "^prt"
  12116. },
  12117. "sessionID": {
  12118. "type": "string",
  12119. "pattern": "^ses"
  12120. },
  12121. "messageID": {
  12122. "type": "string",
  12123. "pattern": "^msg"
  12124. },
  12125. "type": {
  12126. "type": "string",
  12127. "enum": ["tool"]
  12128. },
  12129. "callID": {
  12130. "type": "string"
  12131. },
  12132. "tool": {
  12133. "type": "string"
  12134. },
  12135. "state": {
  12136. "$ref": "#/components/schemas/ToolState"
  12137. },
  12138. "metadata": {
  12139. "type": "object"
  12140. }
  12141. },
  12142. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  12143. "additionalProperties": false
  12144. },
  12145. "StepStartPart": {
  12146. "type": "object",
  12147. "properties": {
  12148. "id": {
  12149. "type": "string",
  12150. "pattern": "^prt"
  12151. },
  12152. "sessionID": {
  12153. "type": "string",
  12154. "pattern": "^ses"
  12155. },
  12156. "messageID": {
  12157. "type": "string",
  12158. "pattern": "^msg"
  12159. },
  12160. "type": {
  12161. "type": "string",
  12162. "enum": ["step-start"]
  12163. },
  12164. "snapshot": {
  12165. "type": "string"
  12166. }
  12167. },
  12168. "required": ["id", "sessionID", "messageID", "type"],
  12169. "additionalProperties": false
  12170. },
  12171. "StepFinishPart": {
  12172. "type": "object",
  12173. "properties": {
  12174. "id": {
  12175. "type": "string",
  12176. "pattern": "^prt"
  12177. },
  12178. "sessionID": {
  12179. "type": "string",
  12180. "pattern": "^ses"
  12181. },
  12182. "messageID": {
  12183. "type": "string",
  12184. "pattern": "^msg"
  12185. },
  12186. "type": {
  12187. "type": "string",
  12188. "enum": ["step-finish"]
  12189. },
  12190. "reason": {
  12191. "type": "string"
  12192. },
  12193. "snapshot": {
  12194. "type": "string"
  12195. },
  12196. "cost": {
  12197. "type": "number"
  12198. },
  12199. "tokens": {
  12200. "type": "object",
  12201. "properties": {
  12202. "total": {
  12203. "type": "number"
  12204. },
  12205. "input": {
  12206. "type": "number"
  12207. },
  12208. "output": {
  12209. "type": "number"
  12210. },
  12211. "reasoning": {
  12212. "type": "number"
  12213. },
  12214. "cache": {
  12215. "type": "object",
  12216. "properties": {
  12217. "read": {
  12218. "type": "number"
  12219. },
  12220. "write": {
  12221. "type": "number"
  12222. }
  12223. },
  12224. "required": ["read", "write"],
  12225. "additionalProperties": false
  12226. }
  12227. },
  12228. "required": ["input", "output", "reasoning", "cache"],
  12229. "additionalProperties": false
  12230. }
  12231. },
  12232. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  12233. "additionalProperties": false
  12234. },
  12235. "SnapshotPart": {
  12236. "type": "object",
  12237. "properties": {
  12238. "id": {
  12239. "type": "string",
  12240. "pattern": "^prt"
  12241. },
  12242. "sessionID": {
  12243. "type": "string",
  12244. "pattern": "^ses"
  12245. },
  12246. "messageID": {
  12247. "type": "string",
  12248. "pattern": "^msg"
  12249. },
  12250. "type": {
  12251. "type": "string",
  12252. "enum": ["snapshot"]
  12253. },
  12254. "snapshot": {
  12255. "type": "string"
  12256. }
  12257. },
  12258. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  12259. "additionalProperties": false
  12260. },
  12261. "PatchPart": {
  12262. "type": "object",
  12263. "properties": {
  12264. "id": {
  12265. "type": "string",
  12266. "pattern": "^prt"
  12267. },
  12268. "sessionID": {
  12269. "type": "string",
  12270. "pattern": "^ses"
  12271. },
  12272. "messageID": {
  12273. "type": "string",
  12274. "pattern": "^msg"
  12275. },
  12276. "type": {
  12277. "type": "string",
  12278. "enum": ["patch"]
  12279. },
  12280. "hash": {
  12281. "type": "string"
  12282. },
  12283. "files": {
  12284. "type": "array",
  12285. "items": {
  12286. "type": "string"
  12287. }
  12288. }
  12289. },
  12290. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  12291. "additionalProperties": false
  12292. },
  12293. "AgentPart": {
  12294. "type": "object",
  12295. "properties": {
  12296. "id": {
  12297. "type": "string",
  12298. "pattern": "^prt"
  12299. },
  12300. "sessionID": {
  12301. "type": "string",
  12302. "pattern": "^ses"
  12303. },
  12304. "messageID": {
  12305. "type": "string",
  12306. "pattern": "^msg"
  12307. },
  12308. "type": {
  12309. "type": "string",
  12310. "enum": ["agent"]
  12311. },
  12312. "name": {
  12313. "type": "string"
  12314. },
  12315. "source": {
  12316. "type": "object",
  12317. "properties": {
  12318. "value": {
  12319. "type": "string"
  12320. },
  12321. "start": {
  12322. "type": "integer",
  12323. "minimum": 0
  12324. },
  12325. "end": {
  12326. "type": "integer",
  12327. "minimum": 0
  12328. }
  12329. },
  12330. "required": ["value", "start", "end"],
  12331. "additionalProperties": false
  12332. }
  12333. },
  12334. "required": ["id", "sessionID", "messageID", "type", "name"],
  12335. "additionalProperties": false
  12336. },
  12337. "RetryPart": {
  12338. "type": "object",
  12339. "properties": {
  12340. "id": {
  12341. "type": "string",
  12342. "pattern": "^prt"
  12343. },
  12344. "sessionID": {
  12345. "type": "string",
  12346. "pattern": "^ses"
  12347. },
  12348. "messageID": {
  12349. "type": "string",
  12350. "pattern": "^msg"
  12351. },
  12352. "type": {
  12353. "type": "string",
  12354. "enum": ["retry"]
  12355. },
  12356. "attempt": {
  12357. "type": "integer",
  12358. "minimum": 0
  12359. },
  12360. "error": {
  12361. "$ref": "#/components/schemas/APIError"
  12362. },
  12363. "time": {
  12364. "type": "object",
  12365. "properties": {
  12366. "created": {
  12367. "type": "integer",
  12368. "minimum": 0
  12369. }
  12370. },
  12371. "required": ["created"],
  12372. "additionalProperties": false
  12373. }
  12374. },
  12375. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  12376. "additionalProperties": false
  12377. },
  12378. "CompactionPart": {
  12379. "type": "object",
  12380. "properties": {
  12381. "id": {
  12382. "type": "string",
  12383. "pattern": "^prt"
  12384. },
  12385. "sessionID": {
  12386. "type": "string",
  12387. "pattern": "^ses"
  12388. },
  12389. "messageID": {
  12390. "type": "string",
  12391. "pattern": "^msg"
  12392. },
  12393. "type": {
  12394. "type": "string",
  12395. "enum": ["compaction"]
  12396. },
  12397. "auto": {
  12398. "type": "boolean"
  12399. },
  12400. "overflow": {
  12401. "type": "boolean"
  12402. },
  12403. "tail_start_id": {
  12404. "type": "string",
  12405. "pattern": "^msg"
  12406. }
  12407. },
  12408. "required": ["id", "sessionID", "messageID", "type", "auto"],
  12409. "additionalProperties": false
  12410. },
  12411. "Part": {
  12412. "anyOf": [
  12413. {
  12414. "$ref": "#/components/schemas/TextPart"
  12415. },
  12416. {
  12417. "$ref": "#/components/schemas/SubtaskPart"
  12418. },
  12419. {
  12420. "$ref": "#/components/schemas/ReasoningPart"
  12421. },
  12422. {
  12423. "$ref": "#/components/schemas/FilePart"
  12424. },
  12425. {
  12426. "$ref": "#/components/schemas/ToolPart"
  12427. },
  12428. {
  12429. "$ref": "#/components/schemas/StepStartPart"
  12430. },
  12431. {
  12432. "$ref": "#/components/schemas/StepFinishPart"
  12433. },
  12434. {
  12435. "$ref": "#/components/schemas/SnapshotPart"
  12436. },
  12437. {
  12438. "$ref": "#/components/schemas/PatchPart"
  12439. },
  12440. {
  12441. "$ref": "#/components/schemas/AgentPart"
  12442. },
  12443. {
  12444. "$ref": "#/components/schemas/RetryPart"
  12445. },
  12446. {
  12447. "$ref": "#/components/schemas/CompactionPart"
  12448. }
  12449. ]
  12450. },
  12451. "PermissionAction": {
  12452. "type": "string",
  12453. "enum": ["allow", "deny", "ask"]
  12454. },
  12455. "PermissionRule": {
  12456. "type": "object",
  12457. "properties": {
  12458. "permission": {
  12459. "type": "string"
  12460. },
  12461. "pattern": {
  12462. "type": "string"
  12463. },
  12464. "action": {
  12465. "$ref": "#/components/schemas/PermissionAction"
  12466. }
  12467. },
  12468. "required": ["permission", "pattern", "action"],
  12469. "additionalProperties": false
  12470. },
  12471. "PermissionRuleset": {
  12472. "type": "array",
  12473. "items": {
  12474. "$ref": "#/components/schemas/PermissionRule"
  12475. }
  12476. },
  12477. "Session": {
  12478. "type": "object",
  12479. "properties": {
  12480. "id": {
  12481. "type": "string",
  12482. "pattern": "^ses"
  12483. },
  12484. "slug": {
  12485. "type": "string"
  12486. },
  12487. "projectID": {
  12488. "type": "string"
  12489. },
  12490. "workspaceID": {
  12491. "type": "string",
  12492. "pattern": "^wrk"
  12493. },
  12494. "directory": {
  12495. "type": "string"
  12496. },
  12497. "path": {
  12498. "type": "string"
  12499. },
  12500. "parentID": {
  12501. "type": "string",
  12502. "pattern": "^ses"
  12503. },
  12504. "summary": {
  12505. "type": "object",
  12506. "properties": {
  12507. "additions": {
  12508. "type": "number"
  12509. },
  12510. "deletions": {
  12511. "type": "number"
  12512. },
  12513. "files": {
  12514. "type": "number"
  12515. },
  12516. "diffs": {
  12517. "type": "array",
  12518. "items": {
  12519. "$ref": "#/components/schemas/SnapshotFileDiff"
  12520. }
  12521. }
  12522. },
  12523. "required": ["additions", "deletions", "files"],
  12524. "additionalProperties": false
  12525. },
  12526. "cost": {
  12527. "type": "number"
  12528. },
  12529. "tokens": {
  12530. "type": "object",
  12531. "properties": {
  12532. "input": {
  12533. "type": "number"
  12534. },
  12535. "output": {
  12536. "type": "number"
  12537. },
  12538. "reasoning": {
  12539. "type": "number"
  12540. },
  12541. "cache": {
  12542. "type": "object",
  12543. "properties": {
  12544. "read": {
  12545. "type": "number"
  12546. },
  12547. "write": {
  12548. "type": "number"
  12549. }
  12550. },
  12551. "required": ["read", "write"],
  12552. "additionalProperties": false
  12553. }
  12554. },
  12555. "required": ["input", "output", "reasoning", "cache"],
  12556. "additionalProperties": false
  12557. },
  12558. "share": {
  12559. "type": "object",
  12560. "properties": {
  12561. "url": {
  12562. "type": "string"
  12563. }
  12564. },
  12565. "required": ["url"],
  12566. "additionalProperties": false
  12567. },
  12568. "title": {
  12569. "type": "string"
  12570. },
  12571. "agent": {
  12572. "type": "string"
  12573. },
  12574. "model": {
  12575. "type": "object",
  12576. "properties": {
  12577. "id": {
  12578. "type": "string"
  12579. },
  12580. "providerID": {
  12581. "type": "string"
  12582. },
  12583. "variant": {
  12584. "type": "string"
  12585. }
  12586. },
  12587. "required": ["id", "providerID"],
  12588. "additionalProperties": false
  12589. },
  12590. "version": {
  12591. "type": "string"
  12592. },
  12593. "time": {
  12594. "type": "object",
  12595. "properties": {
  12596. "created": {
  12597. "type": "integer",
  12598. "minimum": 0
  12599. },
  12600. "updated": {
  12601. "type": "integer",
  12602. "minimum": 0
  12603. },
  12604. "compacting": {
  12605. "type": "integer",
  12606. "minimum": 0
  12607. },
  12608. "archived": {
  12609. "type": "number"
  12610. }
  12611. },
  12612. "required": ["created", "updated"],
  12613. "additionalProperties": false
  12614. },
  12615. "permission": {
  12616. "$ref": "#/components/schemas/PermissionRuleset"
  12617. },
  12618. "revert": {
  12619. "type": "object",
  12620. "properties": {
  12621. "messageID": {
  12622. "type": "string",
  12623. "pattern": "^msg"
  12624. },
  12625. "partID": {
  12626. "type": "string",
  12627. "pattern": "^prt"
  12628. },
  12629. "snapshot": {
  12630. "type": "string"
  12631. },
  12632. "diff": {
  12633. "type": "string"
  12634. }
  12635. },
  12636. "required": ["messageID"],
  12637. "additionalProperties": false
  12638. }
  12639. },
  12640. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  12641. "additionalProperties": false
  12642. },
  12643. "Prompt": {
  12644. "type": "object",
  12645. "properties": {
  12646. "text": {
  12647. "type": "string"
  12648. },
  12649. "files": {
  12650. "type": "array",
  12651. "items": {
  12652. "$ref": "#/components/schemas/PromptFileAttachment"
  12653. }
  12654. },
  12655. "agents": {
  12656. "type": "array",
  12657. "items": {
  12658. "$ref": "#/components/schemas/PromptAgentAttachment"
  12659. }
  12660. },
  12661. "references": {
  12662. "type": "array",
  12663. "items": {
  12664. "$ref": "#/components/schemas/PromptReferenceAttachment"
  12665. }
  12666. }
  12667. },
  12668. "required": ["text"],
  12669. "additionalProperties": false
  12670. },
  12671. "GlobalEvent": {
  12672. "type": "object",
  12673. "properties": {
  12674. "directory": {
  12675. "type": "string"
  12676. },
  12677. "project": {
  12678. "type": "string"
  12679. },
  12680. "workspace": {
  12681. "type": "string"
  12682. },
  12683. "payload": {
  12684. "anyOf": [
  12685. {
  12686. "$ref": "#/components/schemas/Event.tui.prompt.append"
  12687. },
  12688. {
  12689. "$ref": "#/components/schemas/Event.tui.command.execute"
  12690. },
  12691. {
  12692. "$ref": "#/components/schemas/Event.tui.toast.show"
  12693. },
  12694. {
  12695. "$ref": "#/components/schemas/Event.tui.session.select"
  12696. },
  12697. {
  12698. "$ref": "#/components/schemas/EventServerConnected"
  12699. },
  12700. {
  12701. "$ref": "#/components/schemas/EventGlobalDisposed"
  12702. },
  12703. {
  12704. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  12705. },
  12706. {
  12707. "$ref": "#/components/schemas/EventFileEdited"
  12708. },
  12709. {
  12710. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  12711. },
  12712. {
  12713. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  12714. },
  12715. {
  12716. "$ref": "#/components/schemas/EventLspUpdated"
  12717. },
  12718. {
  12719. "$ref": "#/components/schemas/EventMessagePartDelta"
  12720. },
  12721. {
  12722. "$ref": "#/components/schemas/EventPermissionAsked"
  12723. },
  12724. {
  12725. "$ref": "#/components/schemas/EventPermissionReplied"
  12726. },
  12727. {
  12728. "$ref": "#/components/schemas/EventSessionDiff"
  12729. },
  12730. {
  12731. "$ref": "#/components/schemas/EventSessionError"
  12732. },
  12733. {
  12734. "$ref": "#/components/schemas/EventQuestionAsked"
  12735. },
  12736. {
  12737. "$ref": "#/components/schemas/EventQuestionReplied"
  12738. },
  12739. {
  12740. "$ref": "#/components/schemas/EventQuestionRejected"
  12741. },
  12742. {
  12743. "$ref": "#/components/schemas/EventTodoUpdated"
  12744. },
  12745. {
  12746. "$ref": "#/components/schemas/EventSessionStatus"
  12747. },
  12748. {
  12749. "$ref": "#/components/schemas/EventSessionIdle"
  12750. },
  12751. {
  12752. "$ref": "#/components/schemas/EventMcpToolsChanged"
  12753. },
  12754. {
  12755. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  12756. },
  12757. {
  12758. "$ref": "#/components/schemas/EventCommandExecuted"
  12759. },
  12760. {
  12761. "$ref": "#/components/schemas/EventProjectUpdated"
  12762. },
  12763. {
  12764. "$ref": "#/components/schemas/EventSessionCompacted"
  12765. },
  12766. {
  12767. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  12768. },
  12769. {
  12770. "$ref": "#/components/schemas/EventWorkspaceReady"
  12771. },
  12772. {
  12773. "$ref": "#/components/schemas/EventWorkspaceFailed"
  12774. },
  12775. {
  12776. "$ref": "#/components/schemas/EventWorkspaceStatus"
  12777. },
  12778. {
  12779. "$ref": "#/components/schemas/EventWorktreeReady"
  12780. },
  12781. {
  12782. "$ref": "#/components/schemas/EventWorktreeFailed"
  12783. },
  12784. {
  12785. "$ref": "#/components/schemas/EventPtyCreated"
  12786. },
  12787. {
  12788. "$ref": "#/components/schemas/EventPtyUpdated"
  12789. },
  12790. {
  12791. "$ref": "#/components/schemas/EventPtyExited"
  12792. },
  12793. {
  12794. "$ref": "#/components/schemas/EventPtyDeleted"
  12795. },
  12796. {
  12797. "$ref": "#/components/schemas/EventInstallationUpdated"
  12798. },
  12799. {
  12800. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  12801. },
  12802. {
  12803. "$ref": "#/components/schemas/EventMessageUpdated"
  12804. },
  12805. {
  12806. "$ref": "#/components/schemas/EventMessageRemoved"
  12807. },
  12808. {
  12809. "$ref": "#/components/schemas/EventMessagePartUpdated"
  12810. },
  12811. {
  12812. "$ref": "#/components/schemas/EventMessagePartRemoved"
  12813. },
  12814. {
  12815. "$ref": "#/components/schemas/EventSessionCreated"
  12816. },
  12817. {
  12818. "$ref": "#/components/schemas/EventSessionUpdated"
  12819. },
  12820. {
  12821. "$ref": "#/components/schemas/EventSessionDeleted"
  12822. },
  12823. {
  12824. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  12825. },
  12826. {
  12827. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  12828. },
  12829. {
  12830. "$ref": "#/components/schemas/EventSessionNextPrompted"
  12831. },
  12832. {
  12833. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  12834. },
  12835. {
  12836. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  12837. },
  12838. {
  12839. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  12840. },
  12841. {
  12842. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  12843. },
  12844. {
  12845. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  12846. },
  12847. {
  12848. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  12849. },
  12850. {
  12851. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  12852. },
  12853. {
  12854. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  12855. },
  12856. {
  12857. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  12858. },
  12859. {
  12860. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  12861. },
  12862. {
  12863. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  12864. },
  12865. {
  12866. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  12867. },
  12868. {
  12869. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  12870. },
  12871. {
  12872. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  12873. },
  12874. {
  12875. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  12876. },
  12877. {
  12878. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  12879. },
  12880. {
  12881. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  12882. },
  12883. {
  12884. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  12885. },
  12886. {
  12887. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  12888. },
  12889. {
  12890. "$ref": "#/components/schemas/EventSessionNextRetried"
  12891. },
  12892. {
  12893. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  12894. },
  12895. {
  12896. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  12897. },
  12898. {
  12899. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  12900. },
  12901. {
  12902. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  12903. },
  12904. {
  12905. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  12906. },
  12907. {
  12908. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  12909. },
  12910. {
  12911. "$ref": "#/components/schemas/EventSessionNextPrompted"
  12912. },
  12913. {
  12914. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  12915. },
  12916. {
  12917. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  12918. },
  12919. {
  12920. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  12921. },
  12922. {
  12923. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  12924. },
  12925. {
  12926. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  12927. },
  12928. {
  12929. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  12930. },
  12931. {
  12932. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  12933. },
  12934. {
  12935. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  12936. },
  12937. {
  12938. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  12939. },
  12940. {
  12941. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  12942. },
  12943. {
  12944. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  12945. },
  12946. {
  12947. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  12948. },
  12949. {
  12950. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  12951. },
  12952. {
  12953. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  12954. },
  12955. {
  12956. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  12957. },
  12958. {
  12959. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  12960. },
  12961. {
  12962. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  12963. },
  12964. {
  12965. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  12966. },
  12967. {
  12968. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  12969. },
  12970. {
  12971. "$ref": "#/components/schemas/EventSessionNextRetried"
  12972. },
  12973. {
  12974. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  12975. },
  12976. {
  12977. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  12978. },
  12979. {
  12980. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  12981. },
  12982. {
  12983. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  12984. },
  12985. {
  12986. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  12987. },
  12988. {
  12989. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  12990. },
  12991. {
  12992. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  12993. },
  12994. {
  12995. "$ref": "#/components/schemas/SyncEventSessionCreated"
  12996. },
  12997. {
  12998. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  12999. },
  13000. {
  13001. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  13002. },
  13003. {
  13004. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  13005. },
  13006. {
  13007. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  13008. },
  13009. {
  13010. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  13011. },
  13012. {
  13013. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  13014. },
  13015. {
  13016. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  13017. },
  13018. {
  13019. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  13020. },
  13021. {
  13022. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  13023. },
  13024. {
  13025. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  13026. },
  13027. {
  13028. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  13029. },
  13030. {
  13031. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  13032. },
  13033. {
  13034. "$ref": "#/components/schemas/SyncEventSessionNextTextDelta"
  13035. },
  13036. {
  13037. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  13038. },
  13039. {
  13040. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  13041. },
  13042. {
  13043. "$ref": "#/components/schemas/SyncEventSessionNextReasoningDelta"
  13044. },
  13045. {
  13046. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  13047. },
  13048. {
  13049. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  13050. },
  13051. {
  13052. "$ref": "#/components/schemas/SyncEventSessionNextToolInputDelta"
  13053. },
  13054. {
  13055. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  13056. },
  13057. {
  13058. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  13059. },
  13060. {
  13061. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  13062. },
  13063. {
  13064. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  13065. },
  13066. {
  13067. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  13068. },
  13069. {
  13070. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  13071. },
  13072. {
  13073. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  13074. },
  13075. {
  13076. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  13077. },
  13078. {
  13079. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  13080. }
  13081. ]
  13082. }
  13083. },
  13084. "required": ["directory", "payload"],
  13085. "additionalProperties": false
  13086. },
  13087. "LogLevel": {
  13088. "type": "string",
  13089. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  13090. "description": "Log level"
  13091. },
  13092. "ServerConfig": {
  13093. "type": "object",
  13094. "properties": {
  13095. "port": {
  13096. "type": "integer",
  13097. "exclusiveMinimum": 0
  13098. },
  13099. "hostname": {
  13100. "type": "string"
  13101. },
  13102. "mdns": {
  13103. "type": "boolean"
  13104. },
  13105. "mdnsDomain": {
  13106. "type": "string"
  13107. },
  13108. "cors": {
  13109. "type": "array",
  13110. "items": {
  13111. "type": "string"
  13112. }
  13113. }
  13114. },
  13115. "additionalProperties": false,
  13116. "description": "Server configuration for opencode serve and web commands"
  13117. },
  13118. "ReferenceConfigEntry": {
  13119. "anyOf": [
  13120. {
  13121. "type": "string"
  13122. },
  13123. {
  13124. "type": "object",
  13125. "properties": {
  13126. "repository": {
  13127. "type": "string",
  13128. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  13129. },
  13130. "branch": {
  13131. "type": "string"
  13132. }
  13133. },
  13134. "required": ["repository"],
  13135. "additionalProperties": false
  13136. },
  13137. {
  13138. "type": "object",
  13139. "properties": {
  13140. "path": {
  13141. "type": "string",
  13142. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  13143. }
  13144. },
  13145. "required": ["path"],
  13146. "additionalProperties": false
  13147. }
  13148. ]
  13149. },
  13150. "ReferenceConfig": {
  13151. "type": "object",
  13152. "additionalProperties": {
  13153. "$ref": "#/components/schemas/ReferenceConfigEntry"
  13154. }
  13155. },
  13156. "PermissionActionConfig": {
  13157. "type": "string",
  13158. "enum": ["ask", "allow", "deny"]
  13159. },
  13160. "PermissionObjectConfig": {
  13161. "type": "object",
  13162. "additionalProperties": {
  13163. "$ref": "#/components/schemas/PermissionActionConfig"
  13164. }
  13165. },
  13166. "PermissionRuleConfig": {
  13167. "anyOf": [
  13168. {
  13169. "$ref": "#/components/schemas/PermissionActionConfig"
  13170. },
  13171. {
  13172. "$ref": "#/components/schemas/PermissionObjectConfig"
  13173. }
  13174. ]
  13175. },
  13176. "PermissionConfig": {
  13177. "anyOf": [
  13178. {
  13179. "$ref": "#/components/schemas/PermissionActionConfig"
  13180. },
  13181. {
  13182. "type": "object",
  13183. "properties": {
  13184. "read": {
  13185. "$ref": "#/components/schemas/PermissionRuleConfig"
  13186. },
  13187. "edit": {
  13188. "$ref": "#/components/schemas/PermissionRuleConfig"
  13189. },
  13190. "glob": {
  13191. "$ref": "#/components/schemas/PermissionRuleConfig"
  13192. },
  13193. "grep": {
  13194. "$ref": "#/components/schemas/PermissionRuleConfig"
  13195. },
  13196. "list": {
  13197. "$ref": "#/components/schemas/PermissionRuleConfig"
  13198. },
  13199. "bash": {
  13200. "$ref": "#/components/schemas/PermissionRuleConfig"
  13201. },
  13202. "task": {
  13203. "$ref": "#/components/schemas/PermissionRuleConfig"
  13204. },
  13205. "external_directory": {
  13206. "$ref": "#/components/schemas/PermissionRuleConfig"
  13207. },
  13208. "todowrite": {
  13209. "$ref": "#/components/schemas/PermissionActionConfig"
  13210. },
  13211. "question": {
  13212. "$ref": "#/components/schemas/PermissionActionConfig"
  13213. },
  13214. "webfetch": {
  13215. "$ref": "#/components/schemas/PermissionActionConfig"
  13216. },
  13217. "websearch": {
  13218. "$ref": "#/components/schemas/PermissionActionConfig"
  13219. },
  13220. "repo_clone": {
  13221. "$ref": "#/components/schemas/PermissionRuleConfig"
  13222. },
  13223. "repo_overview": {
  13224. "$ref": "#/components/schemas/PermissionRuleConfig"
  13225. },
  13226. "lsp": {
  13227. "$ref": "#/components/schemas/PermissionRuleConfig"
  13228. },
  13229. "doom_loop": {
  13230. "$ref": "#/components/schemas/PermissionActionConfig"
  13231. },
  13232. "skill": {
  13233. "$ref": "#/components/schemas/PermissionRuleConfig"
  13234. }
  13235. },
  13236. "additionalProperties": {
  13237. "$ref": "#/components/schemas/PermissionRuleConfig"
  13238. }
  13239. }
  13240. ]
  13241. },
  13242. "AgentConfig": {
  13243. "type": "object",
  13244. "properties": {
  13245. "model": {
  13246. "type": "string"
  13247. },
  13248. "variant": {
  13249. "type": "string"
  13250. },
  13251. "temperature": {
  13252. "type": "number"
  13253. },
  13254. "top_p": {
  13255. "type": "number"
  13256. },
  13257. "prompt": {
  13258. "type": "string"
  13259. },
  13260. "tools": {
  13261. "type": "object",
  13262. "additionalProperties": {
  13263. "type": "boolean"
  13264. }
  13265. },
  13266. "disable": {
  13267. "type": "boolean"
  13268. },
  13269. "description": {
  13270. "type": "string"
  13271. },
  13272. "mode": {
  13273. "type": "string",
  13274. "enum": ["subagent", "primary", "all"]
  13275. },
  13276. "hidden": {
  13277. "type": "boolean"
  13278. },
  13279. "options": {
  13280. "type": "object"
  13281. },
  13282. "color": {
  13283. "anyOf": [
  13284. {
  13285. "type": "string",
  13286. "pattern": "^#[0-9a-fA-F]{6}$"
  13287. },
  13288. {
  13289. "type": "string",
  13290. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  13291. }
  13292. ],
  13293. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  13294. },
  13295. "steps": {
  13296. "type": "integer",
  13297. "exclusiveMinimum": 0
  13298. },
  13299. "maxSteps": {
  13300. "type": "integer",
  13301. "exclusiveMinimum": 0
  13302. },
  13303. "permission": {
  13304. "$ref": "#/components/schemas/PermissionConfig"
  13305. }
  13306. },
  13307. "additionalProperties": {}
  13308. },
  13309. "ProviderConfig": {
  13310. "type": "object",
  13311. "properties": {
  13312. "api": {
  13313. "type": "string"
  13314. },
  13315. "name": {
  13316. "type": "string"
  13317. },
  13318. "env": {
  13319. "type": "array",
  13320. "items": {
  13321. "type": "string"
  13322. }
  13323. },
  13324. "id": {
  13325. "type": "string"
  13326. },
  13327. "npm": {
  13328. "type": "string"
  13329. },
  13330. "whitelist": {
  13331. "type": "array",
  13332. "items": {
  13333. "type": "string"
  13334. }
  13335. },
  13336. "blacklist": {
  13337. "type": "array",
  13338. "items": {
  13339. "type": "string"
  13340. }
  13341. },
  13342. "options": {
  13343. "type": "object",
  13344. "properties": {
  13345. "apiKey": {
  13346. "type": "string"
  13347. },
  13348. "baseURL": {
  13349. "type": "string"
  13350. },
  13351. "enterpriseUrl": {
  13352. "type": "string"
  13353. },
  13354. "setCacheKey": {
  13355. "type": "boolean"
  13356. },
  13357. "timeout": {
  13358. "anyOf": [
  13359. {
  13360. "type": "integer",
  13361. "exclusiveMinimum": 0
  13362. },
  13363. {
  13364. "type": "boolean",
  13365. "enum": [false]
  13366. }
  13367. ],
  13368. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout."
  13369. },
  13370. "chunkTimeout": {
  13371. "type": "integer",
  13372. "exclusiveMinimum": 0
  13373. }
  13374. },
  13375. "additionalProperties": {}
  13376. },
  13377. "models": {
  13378. "type": "object",
  13379. "additionalProperties": {
  13380. "type": "object",
  13381. "properties": {
  13382. "id": {
  13383. "type": "string"
  13384. },
  13385. "name": {
  13386. "type": "string"
  13387. },
  13388. "family": {
  13389. "type": "string"
  13390. },
  13391. "release_date": {
  13392. "type": "string"
  13393. },
  13394. "attachment": {
  13395. "type": "boolean"
  13396. },
  13397. "reasoning": {
  13398. "type": "boolean"
  13399. },
  13400. "temperature": {
  13401. "type": "boolean"
  13402. },
  13403. "tool_call": {
  13404. "type": "boolean"
  13405. },
  13406. "interleaved": {
  13407. "anyOf": [
  13408. {
  13409. "type": "boolean",
  13410. "enum": [true]
  13411. },
  13412. {
  13413. "type": "object",
  13414. "properties": {
  13415. "field": {
  13416. "type": "string",
  13417. "enum": ["reasoning_content", "reasoning_details"]
  13418. }
  13419. },
  13420. "required": ["field"],
  13421. "additionalProperties": false
  13422. }
  13423. ]
  13424. },
  13425. "cost": {
  13426. "type": "object",
  13427. "properties": {
  13428. "input": {
  13429. "type": "number"
  13430. },
  13431. "output": {
  13432. "type": "number"
  13433. },
  13434. "cache_read": {
  13435. "type": "number"
  13436. },
  13437. "cache_write": {
  13438. "type": "number"
  13439. },
  13440. "context_over_200k": {
  13441. "type": "object",
  13442. "properties": {
  13443. "input": {
  13444. "type": "number"
  13445. },
  13446. "output": {
  13447. "type": "number"
  13448. },
  13449. "cache_read": {
  13450. "type": "number"
  13451. },
  13452. "cache_write": {
  13453. "type": "number"
  13454. }
  13455. },
  13456. "required": ["input", "output"],
  13457. "additionalProperties": false
  13458. }
  13459. },
  13460. "required": ["input", "output"],
  13461. "additionalProperties": false
  13462. },
  13463. "limit": {
  13464. "type": "object",
  13465. "properties": {
  13466. "context": {
  13467. "type": "number"
  13468. },
  13469. "input": {
  13470. "type": "number"
  13471. },
  13472. "output": {
  13473. "type": "number"
  13474. }
  13475. },
  13476. "required": ["context", "output"],
  13477. "additionalProperties": false
  13478. },
  13479. "modalities": {
  13480. "type": "object",
  13481. "properties": {
  13482. "input": {
  13483. "type": "array",
  13484. "items": {
  13485. "type": "string",
  13486. "enum": ["text", "audio", "image", "video", "pdf"]
  13487. }
  13488. },
  13489. "output": {
  13490. "type": "array",
  13491. "items": {
  13492. "type": "string",
  13493. "enum": ["text", "audio", "image", "video", "pdf"]
  13494. }
  13495. }
  13496. },
  13497. "required": ["input", "output"],
  13498. "additionalProperties": false
  13499. },
  13500. "experimental": {
  13501. "type": "boolean"
  13502. },
  13503. "status": {
  13504. "type": "string",
  13505. "enum": ["alpha", "beta", "deprecated", "active"]
  13506. },
  13507. "provider": {
  13508. "type": "object",
  13509. "properties": {
  13510. "npm": {
  13511. "type": "string"
  13512. },
  13513. "api": {
  13514. "type": "string"
  13515. }
  13516. },
  13517. "additionalProperties": false
  13518. },
  13519. "options": {
  13520. "type": "object"
  13521. },
  13522. "headers": {
  13523. "type": "object",
  13524. "additionalProperties": {
  13525. "type": "string"
  13526. }
  13527. },
  13528. "variants": {
  13529. "type": "object",
  13530. "additionalProperties": {
  13531. "type": "object",
  13532. "properties": {
  13533. "disabled": {
  13534. "type": "boolean"
  13535. }
  13536. },
  13537. "additionalProperties": {}
  13538. },
  13539. "description": "Variant-specific configuration"
  13540. }
  13541. },
  13542. "additionalProperties": false
  13543. }
  13544. }
  13545. },
  13546. "additionalProperties": false
  13547. },
  13548. "McpLocalConfig": {
  13549. "type": "object",
  13550. "properties": {
  13551. "type": {
  13552. "type": "string",
  13553. "enum": ["local"],
  13554. "description": "Type of MCP server connection"
  13555. },
  13556. "command": {
  13557. "type": "array",
  13558. "items": {
  13559. "type": "string"
  13560. },
  13561. "description": "Command and arguments to run the MCP server"
  13562. },
  13563. "environment": {
  13564. "type": "object",
  13565. "additionalProperties": {
  13566. "type": "string"
  13567. }
  13568. },
  13569. "enabled": {
  13570. "type": "boolean"
  13571. },
  13572. "timeout": {
  13573. "type": "integer",
  13574. "exclusiveMinimum": 0
  13575. }
  13576. },
  13577. "required": ["type", "command"],
  13578. "additionalProperties": false
  13579. },
  13580. "McpOAuthConfig": {
  13581. "type": "object",
  13582. "properties": {
  13583. "clientId": {
  13584. "type": "string"
  13585. },
  13586. "clientSecret": {
  13587. "type": "string"
  13588. },
  13589. "scope": {
  13590. "type": "string"
  13591. },
  13592. "redirectUri": {
  13593. "type": "string"
  13594. }
  13595. },
  13596. "additionalProperties": false
  13597. },
  13598. "McpRemoteConfig": {
  13599. "type": "object",
  13600. "properties": {
  13601. "type": {
  13602. "type": "string",
  13603. "enum": ["remote"],
  13604. "description": "Type of MCP server connection"
  13605. },
  13606. "url": {
  13607. "type": "string",
  13608. "description": "URL of the remote MCP server"
  13609. },
  13610. "enabled": {
  13611. "type": "boolean"
  13612. },
  13613. "headers": {
  13614. "type": "object",
  13615. "additionalProperties": {
  13616. "type": "string"
  13617. }
  13618. },
  13619. "oauth": {
  13620. "anyOf": [
  13621. {
  13622. "$ref": "#/components/schemas/McpOAuthConfig"
  13623. },
  13624. {
  13625. "type": "boolean",
  13626. "enum": [false]
  13627. }
  13628. ],
  13629. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  13630. },
  13631. "timeout": {
  13632. "type": "integer",
  13633. "exclusiveMinimum": 0
  13634. }
  13635. },
  13636. "required": ["type", "url"],
  13637. "additionalProperties": false
  13638. },
  13639. "LayoutConfig": {
  13640. "type": "string",
  13641. "enum": ["auto", "stretch"],
  13642. "description": "@deprecated Always uses stretch layout."
  13643. },
  13644. "ImageAttachmentConfig": {
  13645. "type": "object",
  13646. "properties": {
  13647. "auto_resize": {
  13648. "type": "boolean"
  13649. },
  13650. "max_width": {
  13651. "type": "integer",
  13652. "exclusiveMinimum": 0
  13653. },
  13654. "max_height": {
  13655. "type": "integer",
  13656. "exclusiveMinimum": 0
  13657. },
  13658. "max_base64_bytes": {
  13659. "type": "integer",
  13660. "exclusiveMinimum": 0
  13661. }
  13662. },
  13663. "additionalProperties": false
  13664. },
  13665. "AttachmentConfig": {
  13666. "type": "object",
  13667. "properties": {
  13668. "image": {
  13669. "$ref": "#/components/schemas/ImageAttachmentConfig"
  13670. }
  13671. },
  13672. "additionalProperties": false
  13673. },
  13674. "Config": {
  13675. "type": "object",
  13676. "properties": {
  13677. "$schema": {
  13678. "type": "string"
  13679. },
  13680. "shell": {
  13681. "type": "string"
  13682. },
  13683. "logLevel": {
  13684. "$ref": "#/components/schemas/LogLevel"
  13685. },
  13686. "server": {
  13687. "$ref": "#/components/schemas/ServerConfig"
  13688. },
  13689. "command": {
  13690. "type": "object",
  13691. "additionalProperties": {
  13692. "type": "object",
  13693. "properties": {
  13694. "template": {
  13695. "type": "string"
  13696. },
  13697. "description": {
  13698. "type": "string"
  13699. },
  13700. "agent": {
  13701. "type": "string"
  13702. },
  13703. "model": {
  13704. "type": "string"
  13705. },
  13706. "subtask": {
  13707. "type": "boolean"
  13708. }
  13709. },
  13710. "required": ["template"],
  13711. "additionalProperties": false
  13712. }
  13713. },
  13714. "skills": {
  13715. "type": "object",
  13716. "properties": {
  13717. "paths": {
  13718. "type": "array",
  13719. "items": {
  13720. "type": "string"
  13721. }
  13722. },
  13723. "urls": {
  13724. "type": "array",
  13725. "items": {
  13726. "type": "string"
  13727. }
  13728. }
  13729. },
  13730. "additionalProperties": false
  13731. },
  13732. "reference": {
  13733. "$ref": "#/components/schemas/ReferenceConfig"
  13734. },
  13735. "watcher": {
  13736. "type": "object",
  13737. "properties": {
  13738. "ignore": {
  13739. "type": "array",
  13740. "items": {
  13741. "type": "string"
  13742. }
  13743. }
  13744. },
  13745. "additionalProperties": false
  13746. },
  13747. "snapshot": {
  13748. "type": "boolean"
  13749. },
  13750. "plugin": {
  13751. "type": "array",
  13752. "items": {
  13753. "anyOf": [
  13754. {
  13755. "type": "string"
  13756. },
  13757. {
  13758. "type": "array",
  13759. "prefixItems": [
  13760. {
  13761. "type": "string"
  13762. },
  13763. {
  13764. "type": "object"
  13765. }
  13766. ],
  13767. "maxItems": 2,
  13768. "minItems": 2
  13769. }
  13770. ]
  13771. }
  13772. },
  13773. "share": {
  13774. "type": "string",
  13775. "enum": ["manual", "auto", "disabled"]
  13776. },
  13777. "autoshare": {
  13778. "type": "boolean"
  13779. },
  13780. "autoupdate": {
  13781. "anyOf": [
  13782. {
  13783. "type": "boolean"
  13784. },
  13785. {
  13786. "type": "string",
  13787. "enum": ["notify"]
  13788. }
  13789. ],
  13790. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  13791. },
  13792. "disabled_providers": {
  13793. "type": "array",
  13794. "items": {
  13795. "type": "string"
  13796. }
  13797. },
  13798. "enabled_providers": {
  13799. "type": "array",
  13800. "items": {
  13801. "type": "string"
  13802. }
  13803. },
  13804. "model": {
  13805. "type": "string"
  13806. },
  13807. "small_model": {
  13808. "type": "string"
  13809. },
  13810. "default_agent": {
  13811. "type": "string"
  13812. },
  13813. "username": {
  13814. "type": "string"
  13815. },
  13816. "mode": {
  13817. "type": "object",
  13818. "properties": {
  13819. "build": {
  13820. "$ref": "#/components/schemas/AgentConfig"
  13821. },
  13822. "plan": {
  13823. "$ref": "#/components/schemas/AgentConfig"
  13824. }
  13825. },
  13826. "additionalProperties": {
  13827. "$ref": "#/components/schemas/AgentConfig"
  13828. }
  13829. },
  13830. "agent": {
  13831. "type": "object",
  13832. "properties": {
  13833. "plan": {
  13834. "$ref": "#/components/schemas/AgentConfig"
  13835. },
  13836. "build": {
  13837. "$ref": "#/components/schemas/AgentConfig"
  13838. },
  13839. "general": {
  13840. "$ref": "#/components/schemas/AgentConfig"
  13841. },
  13842. "explore": {
  13843. "$ref": "#/components/schemas/AgentConfig"
  13844. },
  13845. "scout": {
  13846. "$ref": "#/components/schemas/AgentConfig"
  13847. },
  13848. "title": {
  13849. "$ref": "#/components/schemas/AgentConfig"
  13850. },
  13851. "summary": {
  13852. "$ref": "#/components/schemas/AgentConfig"
  13853. },
  13854. "compaction": {
  13855. "$ref": "#/components/schemas/AgentConfig"
  13856. }
  13857. },
  13858. "additionalProperties": {
  13859. "$ref": "#/components/schemas/AgentConfig"
  13860. }
  13861. },
  13862. "provider": {
  13863. "type": "object",
  13864. "additionalProperties": {
  13865. "$ref": "#/components/schemas/ProviderConfig"
  13866. }
  13867. },
  13868. "mcp": {
  13869. "type": "object",
  13870. "additionalProperties": {
  13871. "anyOf": [
  13872. {
  13873. "$ref": "#/components/schemas/McpLocalConfig"
  13874. },
  13875. {
  13876. "$ref": "#/components/schemas/McpRemoteConfig"
  13877. },
  13878. {
  13879. "type": "object",
  13880. "properties": {
  13881. "enabled": {
  13882. "type": "boolean"
  13883. }
  13884. },
  13885. "required": ["enabled"],
  13886. "additionalProperties": false
  13887. }
  13888. ]
  13889. }
  13890. },
  13891. "formatter": {
  13892. "anyOf": [
  13893. {
  13894. "type": "boolean"
  13895. },
  13896. {
  13897. "type": "object",
  13898. "additionalProperties": {
  13899. "type": "object",
  13900. "properties": {
  13901. "disabled": {
  13902. "type": "boolean"
  13903. },
  13904. "command": {
  13905. "type": "array",
  13906. "items": {
  13907. "type": "string"
  13908. }
  13909. },
  13910. "environment": {
  13911. "type": "object",
  13912. "additionalProperties": {
  13913. "type": "string"
  13914. }
  13915. },
  13916. "extensions": {
  13917. "type": "array",
  13918. "items": {
  13919. "type": "string"
  13920. }
  13921. }
  13922. },
  13923. "additionalProperties": false
  13924. }
  13925. }
  13926. ],
  13927. "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."
  13928. },
  13929. "lsp": {
  13930. "anyOf": [
  13931. {
  13932. "type": "boolean"
  13933. },
  13934. {
  13935. "type": "object",
  13936. "additionalProperties": {
  13937. "anyOf": [
  13938. {
  13939. "type": "object",
  13940. "properties": {
  13941. "disabled": {
  13942. "type": "boolean",
  13943. "enum": [true]
  13944. }
  13945. },
  13946. "required": ["disabled"],
  13947. "additionalProperties": false
  13948. },
  13949. {
  13950. "type": "object",
  13951. "properties": {
  13952. "command": {
  13953. "type": "array",
  13954. "items": {
  13955. "type": "string"
  13956. }
  13957. },
  13958. "extensions": {
  13959. "type": "array",
  13960. "items": {
  13961. "type": "string"
  13962. }
  13963. },
  13964. "disabled": {
  13965. "type": "boolean"
  13966. },
  13967. "env": {
  13968. "type": "object",
  13969. "additionalProperties": {
  13970. "type": "string"
  13971. }
  13972. },
  13973. "initialization": {
  13974. "type": "object"
  13975. }
  13976. },
  13977. "required": ["command"],
  13978. "additionalProperties": false
  13979. }
  13980. ]
  13981. }
  13982. }
  13983. ],
  13984. "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."
  13985. },
  13986. "instructions": {
  13987. "type": "array",
  13988. "items": {
  13989. "type": "string"
  13990. }
  13991. },
  13992. "layout": {
  13993. "$ref": "#/components/schemas/LayoutConfig"
  13994. },
  13995. "permission": {
  13996. "$ref": "#/components/schemas/PermissionConfig"
  13997. },
  13998. "tools": {
  13999. "type": "object",
  14000. "additionalProperties": {
  14001. "type": "boolean"
  14002. }
  14003. },
  14004. "attachment": {
  14005. "$ref": "#/components/schemas/AttachmentConfig"
  14006. },
  14007. "enterprise": {
  14008. "type": "object",
  14009. "properties": {
  14010. "url": {
  14011. "type": "string"
  14012. }
  14013. },
  14014. "additionalProperties": false
  14015. },
  14016. "tool_output": {
  14017. "type": "object",
  14018. "properties": {
  14019. "max_lines": {
  14020. "type": "integer",
  14021. "exclusiveMinimum": 0
  14022. },
  14023. "max_bytes": {
  14024. "type": "integer",
  14025. "exclusiveMinimum": 0
  14026. }
  14027. },
  14028. "additionalProperties": false
  14029. },
  14030. "compaction": {
  14031. "type": "object",
  14032. "properties": {
  14033. "auto": {
  14034. "type": "boolean"
  14035. },
  14036. "prune": {
  14037. "type": "boolean"
  14038. },
  14039. "tail_turns": {
  14040. "type": "integer",
  14041. "minimum": 0
  14042. },
  14043. "preserve_recent_tokens": {
  14044. "type": "integer",
  14045. "minimum": 0
  14046. },
  14047. "reserved": {
  14048. "type": "integer",
  14049. "minimum": 0
  14050. }
  14051. },
  14052. "additionalProperties": false
  14053. },
  14054. "experimental": {
  14055. "type": "object",
  14056. "properties": {
  14057. "disable_paste_summary": {
  14058. "type": "boolean"
  14059. },
  14060. "batch_tool": {
  14061. "type": "boolean"
  14062. },
  14063. "openTelemetry": {
  14064. "type": "boolean"
  14065. },
  14066. "primary_tools": {
  14067. "type": "array",
  14068. "items": {
  14069. "type": "string"
  14070. }
  14071. },
  14072. "continue_loop_on_deny": {
  14073. "type": "boolean"
  14074. },
  14075. "mcp_timeout": {
  14076. "type": "integer",
  14077. "exclusiveMinimum": 0
  14078. }
  14079. },
  14080. "additionalProperties": false
  14081. }
  14082. },
  14083. "additionalProperties": false
  14084. },
  14085. "Model": {
  14086. "type": "object",
  14087. "properties": {
  14088. "id": {
  14089. "type": "string"
  14090. },
  14091. "providerID": {
  14092. "type": "string"
  14093. },
  14094. "api": {
  14095. "type": "object",
  14096. "properties": {
  14097. "id": {
  14098. "type": "string"
  14099. },
  14100. "url": {
  14101. "type": "string"
  14102. },
  14103. "npm": {
  14104. "type": "string"
  14105. }
  14106. },
  14107. "required": ["id", "url", "npm"],
  14108. "additionalProperties": false
  14109. },
  14110. "name": {
  14111. "type": "string"
  14112. },
  14113. "family": {
  14114. "type": "string"
  14115. },
  14116. "capabilities": {
  14117. "type": "object",
  14118. "properties": {
  14119. "temperature": {
  14120. "type": "boolean"
  14121. },
  14122. "reasoning": {
  14123. "type": "boolean"
  14124. },
  14125. "attachment": {
  14126. "type": "boolean"
  14127. },
  14128. "toolcall": {
  14129. "type": "boolean"
  14130. },
  14131. "input": {
  14132. "type": "object",
  14133. "properties": {
  14134. "text": {
  14135. "type": "boolean"
  14136. },
  14137. "audio": {
  14138. "type": "boolean"
  14139. },
  14140. "image": {
  14141. "type": "boolean"
  14142. },
  14143. "video": {
  14144. "type": "boolean"
  14145. },
  14146. "pdf": {
  14147. "type": "boolean"
  14148. }
  14149. },
  14150. "required": ["text", "audio", "image", "video", "pdf"],
  14151. "additionalProperties": false
  14152. },
  14153. "output": {
  14154. "type": "object",
  14155. "properties": {
  14156. "text": {
  14157. "type": "boolean"
  14158. },
  14159. "audio": {
  14160. "type": "boolean"
  14161. },
  14162. "image": {
  14163. "type": "boolean"
  14164. },
  14165. "video": {
  14166. "type": "boolean"
  14167. },
  14168. "pdf": {
  14169. "type": "boolean"
  14170. }
  14171. },
  14172. "required": ["text", "audio", "image", "video", "pdf"],
  14173. "additionalProperties": false
  14174. },
  14175. "interleaved": {
  14176. "anyOf": [
  14177. {
  14178. "type": "boolean"
  14179. },
  14180. {
  14181. "type": "object",
  14182. "properties": {
  14183. "field": {
  14184. "type": "string",
  14185. "enum": ["reasoning_content", "reasoning_details"]
  14186. }
  14187. },
  14188. "required": ["field"],
  14189. "additionalProperties": false
  14190. }
  14191. ]
  14192. }
  14193. },
  14194. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  14195. "additionalProperties": false
  14196. },
  14197. "cost": {
  14198. "type": "object",
  14199. "properties": {
  14200. "input": {
  14201. "type": "number"
  14202. },
  14203. "output": {
  14204. "type": "number"
  14205. },
  14206. "cache": {
  14207. "type": "object",
  14208. "properties": {
  14209. "read": {
  14210. "type": "number"
  14211. },
  14212. "write": {
  14213. "type": "number"
  14214. }
  14215. },
  14216. "required": ["read", "write"],
  14217. "additionalProperties": false
  14218. },
  14219. "tiers": {
  14220. "type": "array",
  14221. "items": {
  14222. "type": "object",
  14223. "properties": {
  14224. "input": {
  14225. "type": "number"
  14226. },
  14227. "output": {
  14228. "type": "number"
  14229. },
  14230. "cache": {
  14231. "type": "object",
  14232. "properties": {
  14233. "read": {
  14234. "type": "number"
  14235. },
  14236. "write": {
  14237. "type": "number"
  14238. }
  14239. },
  14240. "required": ["read", "write"],
  14241. "additionalProperties": false
  14242. },
  14243. "tier": {
  14244. "type": "object",
  14245. "properties": {
  14246. "type": {
  14247. "type": "string",
  14248. "enum": ["context"]
  14249. },
  14250. "size": {
  14251. "type": "number"
  14252. }
  14253. },
  14254. "required": ["type", "size"],
  14255. "additionalProperties": false
  14256. }
  14257. },
  14258. "required": ["input", "output", "cache", "tier"],
  14259. "additionalProperties": false
  14260. }
  14261. },
  14262. "experimentalOver200K": {
  14263. "type": "object",
  14264. "properties": {
  14265. "input": {
  14266. "type": "number"
  14267. },
  14268. "output": {
  14269. "type": "number"
  14270. },
  14271. "cache": {
  14272. "type": "object",
  14273. "properties": {
  14274. "read": {
  14275. "type": "number"
  14276. },
  14277. "write": {
  14278. "type": "number"
  14279. }
  14280. },
  14281. "required": ["read", "write"],
  14282. "additionalProperties": false
  14283. }
  14284. },
  14285. "required": ["input", "output", "cache"],
  14286. "additionalProperties": false
  14287. }
  14288. },
  14289. "required": ["input", "output", "cache"],
  14290. "additionalProperties": false
  14291. },
  14292. "limit": {
  14293. "type": "object",
  14294. "properties": {
  14295. "context": {
  14296. "type": "number"
  14297. },
  14298. "input": {
  14299. "type": "number"
  14300. },
  14301. "output": {
  14302. "type": "number"
  14303. }
  14304. },
  14305. "required": ["context", "output"],
  14306. "additionalProperties": false
  14307. },
  14308. "status": {
  14309. "type": "string",
  14310. "enum": ["alpha", "beta", "deprecated", "active"]
  14311. },
  14312. "options": {
  14313. "type": "object"
  14314. },
  14315. "headers": {
  14316. "type": "object",
  14317. "additionalProperties": {
  14318. "type": "string"
  14319. }
  14320. },
  14321. "release_date": {
  14322. "type": "string"
  14323. },
  14324. "variants": {
  14325. "type": "object",
  14326. "additionalProperties": {
  14327. "type": "object"
  14328. }
  14329. }
  14330. },
  14331. "required": [
  14332. "id",
  14333. "providerID",
  14334. "api",
  14335. "name",
  14336. "capabilities",
  14337. "cost",
  14338. "limit",
  14339. "status",
  14340. "options",
  14341. "headers",
  14342. "release_date"
  14343. ],
  14344. "additionalProperties": false
  14345. },
  14346. "Provider": {
  14347. "type": "object",
  14348. "properties": {
  14349. "id": {
  14350. "type": "string"
  14351. },
  14352. "name": {
  14353. "type": "string"
  14354. },
  14355. "source": {
  14356. "type": "string",
  14357. "enum": ["env", "config", "custom", "api"]
  14358. },
  14359. "env": {
  14360. "type": "array",
  14361. "items": {
  14362. "type": "string"
  14363. }
  14364. },
  14365. "key": {
  14366. "type": "string"
  14367. },
  14368. "options": {
  14369. "type": "object"
  14370. },
  14371. "models": {
  14372. "type": "object",
  14373. "additionalProperties": {
  14374. "$ref": "#/components/schemas/Model"
  14375. }
  14376. }
  14377. },
  14378. "required": ["id", "name", "source", "env", "options", "models"],
  14379. "additionalProperties": false
  14380. },
  14381. "ConsoleState": {
  14382. "type": "object",
  14383. "properties": {
  14384. "consoleManagedProviders": {
  14385. "type": "array",
  14386. "items": {
  14387. "type": "string"
  14388. }
  14389. },
  14390. "activeOrgName": {
  14391. "type": "string"
  14392. },
  14393. "switchableOrgCount": {
  14394. "type": "integer",
  14395. "minimum": 0
  14396. }
  14397. },
  14398. "required": ["consoleManagedProviders", "switchableOrgCount"],
  14399. "additionalProperties": false
  14400. },
  14401. "effect_HttpApiError_InternalServerError": {
  14402. "type": "object",
  14403. "properties": {
  14404. "_tag": {
  14405. "type": "string",
  14406. "enum": ["InternalServerError"]
  14407. }
  14408. },
  14409. "required": ["_tag"],
  14410. "additionalProperties": false
  14411. },
  14412. "ToolListItem": {
  14413. "type": "object",
  14414. "properties": {
  14415. "id": {
  14416. "type": "string"
  14417. },
  14418. "description": {
  14419. "type": "string"
  14420. },
  14421. "parameters": {}
  14422. },
  14423. "required": ["id", "description", "parameters"],
  14424. "additionalProperties": false
  14425. },
  14426. "ToolList": {
  14427. "type": "array",
  14428. "items": {
  14429. "$ref": "#/components/schemas/ToolListItem"
  14430. }
  14431. },
  14432. "ToolIDs": {
  14433. "type": "array",
  14434. "items": {
  14435. "type": "string"
  14436. }
  14437. },
  14438. "WorktreeError": {
  14439. "type": "object",
  14440. "properties": {
  14441. "name": {
  14442. "type": "string",
  14443. "enum": [
  14444. "WorktreeNotGitError",
  14445. "WorktreeNameGenerationFailedError",
  14446. "WorktreeCreateFailedError",
  14447. "WorktreeStartCommandFailedError",
  14448. "WorktreeRemoveFailedError",
  14449. "WorktreeResetFailedError",
  14450. "WorktreeListFailedError"
  14451. ]
  14452. },
  14453. "data": {
  14454. "type": "object",
  14455. "properties": {
  14456. "message": {
  14457. "type": "string"
  14458. }
  14459. },
  14460. "required": ["message"],
  14461. "additionalProperties": false
  14462. }
  14463. },
  14464. "required": ["name", "data"],
  14465. "additionalProperties": false
  14466. },
  14467. "WorktreeCreateInput": {
  14468. "type": "object",
  14469. "properties": {
  14470. "name": {
  14471. "type": "string"
  14472. },
  14473. "startCommand": {
  14474. "type": "string",
  14475. "description": "Additional startup script to run after the project's start command"
  14476. }
  14477. },
  14478. "additionalProperties": false
  14479. },
  14480. "Worktree": {
  14481. "type": "object",
  14482. "properties": {
  14483. "name": {
  14484. "type": "string"
  14485. },
  14486. "branch": {
  14487. "type": "string"
  14488. },
  14489. "directory": {
  14490. "type": "string"
  14491. }
  14492. },
  14493. "required": ["name", "directory"],
  14494. "additionalProperties": false
  14495. },
  14496. "WorktreeRemoveInput": {
  14497. "type": "object",
  14498. "properties": {
  14499. "directory": {
  14500. "type": "string"
  14501. }
  14502. },
  14503. "required": ["directory"],
  14504. "additionalProperties": false
  14505. },
  14506. "WorktreeResetInput": {
  14507. "type": "object",
  14508. "properties": {
  14509. "directory": {
  14510. "type": "string"
  14511. }
  14512. },
  14513. "required": ["directory"],
  14514. "additionalProperties": false
  14515. },
  14516. "ProjectSummary": {
  14517. "type": "object",
  14518. "properties": {
  14519. "id": {
  14520. "type": "string"
  14521. },
  14522. "name": {
  14523. "type": "string"
  14524. },
  14525. "worktree": {
  14526. "type": "string"
  14527. }
  14528. },
  14529. "required": ["id", "worktree"],
  14530. "additionalProperties": false
  14531. },
  14532. "GlobalSession": {
  14533. "type": "object",
  14534. "properties": {
  14535. "id": {
  14536. "type": "string",
  14537. "pattern": "^ses"
  14538. },
  14539. "slug": {
  14540. "type": "string"
  14541. },
  14542. "projectID": {
  14543. "type": "string"
  14544. },
  14545. "workspaceID": {
  14546. "type": "string",
  14547. "pattern": "^wrk"
  14548. },
  14549. "directory": {
  14550. "type": "string"
  14551. },
  14552. "path": {
  14553. "type": "string"
  14554. },
  14555. "parentID": {
  14556. "type": "string",
  14557. "pattern": "^ses"
  14558. },
  14559. "summary": {
  14560. "type": "object",
  14561. "properties": {
  14562. "additions": {
  14563. "type": "number"
  14564. },
  14565. "deletions": {
  14566. "type": "number"
  14567. },
  14568. "files": {
  14569. "type": "number"
  14570. },
  14571. "diffs": {
  14572. "type": "array",
  14573. "items": {
  14574. "$ref": "#/components/schemas/SnapshotFileDiff"
  14575. }
  14576. }
  14577. },
  14578. "required": ["additions", "deletions", "files"],
  14579. "additionalProperties": false
  14580. },
  14581. "cost": {
  14582. "type": "number"
  14583. },
  14584. "tokens": {
  14585. "type": "object",
  14586. "properties": {
  14587. "input": {
  14588. "type": "number"
  14589. },
  14590. "output": {
  14591. "type": "number"
  14592. },
  14593. "reasoning": {
  14594. "type": "number"
  14595. },
  14596. "cache": {
  14597. "type": "object",
  14598. "properties": {
  14599. "read": {
  14600. "type": "number"
  14601. },
  14602. "write": {
  14603. "type": "number"
  14604. }
  14605. },
  14606. "required": ["read", "write"],
  14607. "additionalProperties": false
  14608. }
  14609. },
  14610. "required": ["input", "output", "reasoning", "cache"],
  14611. "additionalProperties": false
  14612. },
  14613. "share": {
  14614. "type": "object",
  14615. "properties": {
  14616. "url": {
  14617. "type": "string"
  14618. }
  14619. },
  14620. "required": ["url"],
  14621. "additionalProperties": false
  14622. },
  14623. "title": {
  14624. "type": "string"
  14625. },
  14626. "agent": {
  14627. "type": "string"
  14628. },
  14629. "model": {
  14630. "type": "object",
  14631. "properties": {
  14632. "id": {
  14633. "type": "string"
  14634. },
  14635. "providerID": {
  14636. "type": "string"
  14637. },
  14638. "variant": {
  14639. "type": "string"
  14640. }
  14641. },
  14642. "required": ["id", "providerID"],
  14643. "additionalProperties": false
  14644. },
  14645. "version": {
  14646. "type": "string"
  14647. },
  14648. "time": {
  14649. "type": "object",
  14650. "properties": {
  14651. "created": {
  14652. "type": "integer",
  14653. "minimum": 0
  14654. },
  14655. "updated": {
  14656. "type": "integer",
  14657. "minimum": 0
  14658. },
  14659. "compacting": {
  14660. "type": "integer",
  14661. "minimum": 0
  14662. },
  14663. "archived": {
  14664. "type": "number"
  14665. }
  14666. },
  14667. "required": ["created", "updated"],
  14668. "additionalProperties": false
  14669. },
  14670. "permission": {
  14671. "$ref": "#/components/schemas/PermissionRuleset"
  14672. },
  14673. "revert": {
  14674. "type": "object",
  14675. "properties": {
  14676. "messageID": {
  14677. "type": "string",
  14678. "pattern": "^msg"
  14679. },
  14680. "partID": {
  14681. "type": "string",
  14682. "pattern": "^prt"
  14683. },
  14684. "snapshot": {
  14685. "type": "string"
  14686. },
  14687. "diff": {
  14688. "type": "string"
  14689. }
  14690. },
  14691. "required": ["messageID"],
  14692. "additionalProperties": false
  14693. },
  14694. "project": {
  14695. "anyOf": [
  14696. {
  14697. "$ref": "#/components/schemas/ProjectSummary"
  14698. },
  14699. {
  14700. "type": "null"
  14701. }
  14702. ]
  14703. }
  14704. },
  14705. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  14706. "additionalProperties": false
  14707. },
  14708. "McpResource": {
  14709. "type": "object",
  14710. "properties": {
  14711. "name": {
  14712. "type": "string"
  14713. },
  14714. "uri": {
  14715. "type": "string"
  14716. },
  14717. "description": {
  14718. "type": "string"
  14719. },
  14720. "mimeType": {
  14721. "type": "string"
  14722. },
  14723. "client": {
  14724. "type": "string"
  14725. }
  14726. },
  14727. "required": ["name", "uri", "client"],
  14728. "additionalProperties": false
  14729. },
  14730. "Symbol": {
  14731. "type": "object",
  14732. "properties": {
  14733. "name": {
  14734. "type": "string"
  14735. },
  14736. "kind": {
  14737. "type": "integer",
  14738. "minimum": 0
  14739. },
  14740. "location": {
  14741. "type": "object",
  14742. "properties": {
  14743. "uri": {
  14744. "type": "string"
  14745. },
  14746. "range": {
  14747. "$ref": "#/components/schemas/Range"
  14748. }
  14749. },
  14750. "required": ["uri", "range"],
  14751. "additionalProperties": false
  14752. }
  14753. },
  14754. "required": ["name", "kind", "location"],
  14755. "additionalProperties": false
  14756. },
  14757. "FileNode": {
  14758. "type": "object",
  14759. "properties": {
  14760. "name": {
  14761. "type": "string"
  14762. },
  14763. "path": {
  14764. "type": "string"
  14765. },
  14766. "absolute": {
  14767. "type": "string"
  14768. },
  14769. "type": {
  14770. "type": "string",
  14771. "enum": ["file", "directory"]
  14772. },
  14773. "ignored": {
  14774. "type": "boolean"
  14775. }
  14776. },
  14777. "required": ["name", "path", "absolute", "type", "ignored"],
  14778. "additionalProperties": false
  14779. },
  14780. "FileContent": {
  14781. "type": "object",
  14782. "properties": {
  14783. "type": {
  14784. "type": "string",
  14785. "enum": ["text", "binary"]
  14786. },
  14787. "content": {
  14788. "type": "string"
  14789. },
  14790. "diff": {
  14791. "type": "string"
  14792. },
  14793. "patch": {
  14794. "type": "object",
  14795. "properties": {
  14796. "oldFileName": {
  14797. "type": "string"
  14798. },
  14799. "newFileName": {
  14800. "type": "string"
  14801. },
  14802. "oldHeader": {
  14803. "type": "string"
  14804. },
  14805. "newHeader": {
  14806. "type": "string"
  14807. },
  14808. "hunks": {
  14809. "type": "array",
  14810. "items": {
  14811. "type": "object",
  14812. "properties": {
  14813. "oldStart": {
  14814. "type": "integer",
  14815. "minimum": 0
  14816. },
  14817. "oldLines": {
  14818. "type": "integer",
  14819. "minimum": 0
  14820. },
  14821. "newStart": {
  14822. "type": "integer",
  14823. "minimum": 0
  14824. },
  14825. "newLines": {
  14826. "type": "integer",
  14827. "minimum": 0
  14828. },
  14829. "lines": {
  14830. "type": "array",
  14831. "items": {
  14832. "type": "string"
  14833. }
  14834. }
  14835. },
  14836. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  14837. "additionalProperties": false
  14838. }
  14839. },
  14840. "index": {
  14841. "type": "string"
  14842. }
  14843. },
  14844. "required": ["oldFileName", "newFileName", "hunks"],
  14845. "additionalProperties": false
  14846. },
  14847. "encoding": {
  14848. "type": "string",
  14849. "enum": ["base64"]
  14850. },
  14851. "mimeType": {
  14852. "type": "string"
  14853. }
  14854. },
  14855. "required": ["type", "content"],
  14856. "additionalProperties": false
  14857. },
  14858. "File": {
  14859. "type": "object",
  14860. "properties": {
  14861. "path": {
  14862. "type": "string"
  14863. },
  14864. "added": {
  14865. "type": "integer",
  14866. "minimum": 0
  14867. },
  14868. "removed": {
  14869. "type": "integer",
  14870. "minimum": 0
  14871. },
  14872. "status": {
  14873. "type": "string",
  14874. "enum": ["added", "deleted", "modified"]
  14875. }
  14876. },
  14877. "required": ["path", "added", "removed", "status"],
  14878. "additionalProperties": false
  14879. },
  14880. "Path": {
  14881. "type": "object",
  14882. "properties": {
  14883. "home": {
  14884. "type": "string"
  14885. },
  14886. "state": {
  14887. "type": "string"
  14888. },
  14889. "config": {
  14890. "type": "string"
  14891. },
  14892. "worktree": {
  14893. "type": "string"
  14894. },
  14895. "directory": {
  14896. "type": "string"
  14897. }
  14898. },
  14899. "required": ["home", "state", "config", "worktree", "directory"],
  14900. "additionalProperties": false
  14901. },
  14902. "VcsInfo": {
  14903. "type": "object",
  14904. "properties": {
  14905. "branch": {
  14906. "type": "string"
  14907. },
  14908. "default_branch": {
  14909. "type": "string"
  14910. }
  14911. },
  14912. "additionalProperties": false
  14913. },
  14914. "VcsFileStatus": {
  14915. "type": "object",
  14916. "properties": {
  14917. "file": {
  14918. "type": "string"
  14919. },
  14920. "additions": {
  14921. "type": "number"
  14922. },
  14923. "deletions": {
  14924. "type": "number"
  14925. },
  14926. "status": {
  14927. "type": "string",
  14928. "enum": ["added", "deleted", "modified"]
  14929. }
  14930. },
  14931. "required": ["file", "additions", "deletions", "status"],
  14932. "additionalProperties": false
  14933. },
  14934. "VcsFileDiff": {
  14935. "type": "object",
  14936. "properties": {
  14937. "file": {
  14938. "type": "string"
  14939. },
  14940. "patch": {
  14941. "type": "string"
  14942. },
  14943. "additions": {
  14944. "type": "number"
  14945. },
  14946. "deletions": {
  14947. "type": "number"
  14948. },
  14949. "status": {
  14950. "type": "string",
  14951. "enum": ["added", "deleted", "modified"]
  14952. }
  14953. },
  14954. "required": ["file", "additions", "deletions"],
  14955. "additionalProperties": false
  14956. },
  14957. "VcsApplyError": {
  14958. "type": "object",
  14959. "properties": {
  14960. "name": {
  14961. "type": "string",
  14962. "enum": ["VcsApplyError"]
  14963. },
  14964. "data": {
  14965. "type": "object",
  14966. "properties": {
  14967. "message": {
  14968. "type": "string"
  14969. },
  14970. "reason": {
  14971. "type": "string",
  14972. "enum": ["non-git", "not-clean"]
  14973. }
  14974. },
  14975. "required": ["message", "reason"],
  14976. "additionalProperties": false
  14977. }
  14978. },
  14979. "required": ["name", "data"],
  14980. "additionalProperties": false
  14981. },
  14982. "Command": {
  14983. "type": "object",
  14984. "properties": {
  14985. "name": {
  14986. "type": "string"
  14987. },
  14988. "description": {
  14989. "type": "string"
  14990. },
  14991. "agent": {
  14992. "type": "string"
  14993. },
  14994. "model": {
  14995. "type": "string"
  14996. },
  14997. "source": {
  14998. "type": "string",
  14999. "enum": ["command", "mcp", "skill"]
  15000. },
  15001. "template": {
  15002. "type": "string"
  15003. },
  15004. "subtask": {
  15005. "type": "boolean"
  15006. },
  15007. "hints": {
  15008. "type": "array",
  15009. "items": {
  15010. "type": "string"
  15011. }
  15012. }
  15013. },
  15014. "required": ["name", "template", "hints"],
  15015. "additionalProperties": false
  15016. },
  15017. "Agent": {
  15018. "type": "object",
  15019. "properties": {
  15020. "name": {
  15021. "type": "string"
  15022. },
  15023. "description": {
  15024. "type": "string"
  15025. },
  15026. "mode": {
  15027. "type": "string",
  15028. "enum": ["subagent", "primary", "all"]
  15029. },
  15030. "native": {
  15031. "type": "boolean"
  15032. },
  15033. "hidden": {
  15034. "type": "boolean"
  15035. },
  15036. "topP": {
  15037. "type": "number"
  15038. },
  15039. "temperature": {
  15040. "type": "number"
  15041. },
  15042. "color": {
  15043. "type": "string"
  15044. },
  15045. "permission": {
  15046. "$ref": "#/components/schemas/PermissionRuleset"
  15047. },
  15048. "model": {
  15049. "type": "object",
  15050. "properties": {
  15051. "modelID": {
  15052. "type": "string"
  15053. },
  15054. "providerID": {
  15055. "type": "string"
  15056. }
  15057. },
  15058. "required": ["modelID", "providerID"],
  15059. "additionalProperties": false
  15060. },
  15061. "variant": {
  15062. "type": "string"
  15063. },
  15064. "prompt": {
  15065. "type": "string"
  15066. },
  15067. "options": {
  15068. "type": "object"
  15069. },
  15070. "steps": {
  15071. "type": "number"
  15072. }
  15073. },
  15074. "required": ["name", "mode", "permission", "options"],
  15075. "additionalProperties": false
  15076. },
  15077. "LSPStatus": {
  15078. "type": "object",
  15079. "properties": {
  15080. "id": {
  15081. "type": "string"
  15082. },
  15083. "name": {
  15084. "type": "string"
  15085. },
  15086. "root": {
  15087. "type": "string"
  15088. },
  15089. "status": {
  15090. "type": "string",
  15091. "enum": ["connected", "error"]
  15092. }
  15093. },
  15094. "required": ["id", "name", "root", "status"],
  15095. "additionalProperties": false
  15096. },
  15097. "FormatterStatus": {
  15098. "type": "object",
  15099. "properties": {
  15100. "name": {
  15101. "type": "string"
  15102. },
  15103. "extensions": {
  15104. "type": "array",
  15105. "items": {
  15106. "type": "string"
  15107. }
  15108. },
  15109. "enabled": {
  15110. "type": "boolean"
  15111. }
  15112. },
  15113. "required": ["name", "extensions", "enabled"],
  15114. "additionalProperties": false
  15115. },
  15116. "MCPStatusConnected": {
  15117. "type": "object",
  15118. "properties": {
  15119. "status": {
  15120. "type": "string",
  15121. "enum": ["connected"]
  15122. }
  15123. },
  15124. "required": ["status"],
  15125. "additionalProperties": false
  15126. },
  15127. "MCPStatusDisabled": {
  15128. "type": "object",
  15129. "properties": {
  15130. "status": {
  15131. "type": "string",
  15132. "enum": ["disabled"]
  15133. }
  15134. },
  15135. "required": ["status"],
  15136. "additionalProperties": false
  15137. },
  15138. "MCPStatusFailed": {
  15139. "type": "object",
  15140. "properties": {
  15141. "status": {
  15142. "type": "string",
  15143. "enum": ["failed"]
  15144. },
  15145. "error": {
  15146. "type": "string"
  15147. }
  15148. },
  15149. "required": ["status", "error"],
  15150. "additionalProperties": false
  15151. },
  15152. "MCPStatusNeedsAuth": {
  15153. "type": "object",
  15154. "properties": {
  15155. "status": {
  15156. "type": "string",
  15157. "enum": ["needs_auth"]
  15158. }
  15159. },
  15160. "required": ["status"],
  15161. "additionalProperties": false
  15162. },
  15163. "MCPStatusNeedsClientRegistration": {
  15164. "type": "object",
  15165. "properties": {
  15166. "status": {
  15167. "type": "string",
  15168. "enum": ["needs_client_registration"]
  15169. },
  15170. "error": {
  15171. "type": "string"
  15172. }
  15173. },
  15174. "required": ["status", "error"],
  15175. "additionalProperties": false
  15176. },
  15177. "MCPStatus": {
  15178. "anyOf": [
  15179. {
  15180. "$ref": "#/components/schemas/MCPStatusConnected"
  15181. },
  15182. {
  15183. "$ref": "#/components/schemas/MCPStatusDisabled"
  15184. },
  15185. {
  15186. "$ref": "#/components/schemas/MCPStatusFailed"
  15187. },
  15188. {
  15189. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  15190. },
  15191. {
  15192. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  15193. }
  15194. ]
  15195. },
  15196. "McpUnsupportedOAuthError": {
  15197. "type": "object",
  15198. "properties": {
  15199. "error": {
  15200. "type": "string"
  15201. }
  15202. },
  15203. "required": ["error"],
  15204. "additionalProperties": false
  15205. },
  15206. "NotFoundError": {
  15207. "type": "object",
  15208. "required": ["name", "data"],
  15209. "properties": {
  15210. "name": {
  15211. "type": "string",
  15212. "enum": ["NotFoundError"]
  15213. },
  15214. "data": {
  15215. "type": "object",
  15216. "required": ["message"],
  15217. "properties": {
  15218. "message": {
  15219. "type": "string"
  15220. }
  15221. }
  15222. }
  15223. }
  15224. },
  15225. "effect_HttpApiError_Forbidden": {
  15226. "type": "object",
  15227. "properties": {
  15228. "_tag": {
  15229. "type": "string",
  15230. "enum": ["Forbidden"]
  15231. }
  15232. },
  15233. "required": ["_tag"],
  15234. "additionalProperties": false
  15235. },
  15236. "ProviderAuthMethod": {
  15237. "type": "object",
  15238. "properties": {
  15239. "type": {
  15240. "type": "string",
  15241. "enum": ["oauth", "api"]
  15242. },
  15243. "label": {
  15244. "type": "string"
  15245. },
  15246. "prompts": {
  15247. "type": "array",
  15248. "items": {
  15249. "anyOf": [
  15250. {
  15251. "type": "object",
  15252. "properties": {
  15253. "type": {
  15254. "type": "string",
  15255. "enum": ["text"]
  15256. },
  15257. "key": {
  15258. "type": "string"
  15259. },
  15260. "message": {
  15261. "type": "string"
  15262. },
  15263. "placeholder": {
  15264. "type": "string"
  15265. },
  15266. "when": {
  15267. "type": "object",
  15268. "properties": {
  15269. "key": {
  15270. "type": "string"
  15271. },
  15272. "op": {
  15273. "type": "string",
  15274. "enum": ["eq", "neq"]
  15275. },
  15276. "value": {
  15277. "type": "string"
  15278. }
  15279. },
  15280. "required": ["key", "op", "value"],
  15281. "additionalProperties": false
  15282. }
  15283. },
  15284. "required": ["type", "key", "message"],
  15285. "additionalProperties": false
  15286. },
  15287. {
  15288. "type": "object",
  15289. "properties": {
  15290. "type": {
  15291. "type": "string",
  15292. "enum": ["select"]
  15293. },
  15294. "key": {
  15295. "type": "string"
  15296. },
  15297. "message": {
  15298. "type": "string"
  15299. },
  15300. "options": {
  15301. "type": "array",
  15302. "items": {
  15303. "type": "object",
  15304. "properties": {
  15305. "label": {
  15306. "type": "string"
  15307. },
  15308. "value": {
  15309. "type": "string"
  15310. },
  15311. "hint": {
  15312. "type": "string"
  15313. }
  15314. },
  15315. "required": ["label", "value"],
  15316. "additionalProperties": false
  15317. }
  15318. },
  15319. "when": {
  15320. "type": "object",
  15321. "properties": {
  15322. "key": {
  15323. "type": "string"
  15324. },
  15325. "op": {
  15326. "type": "string",
  15327. "enum": ["eq", "neq"]
  15328. },
  15329. "value": {
  15330. "type": "string"
  15331. }
  15332. },
  15333. "required": ["key", "op", "value"],
  15334. "additionalProperties": false
  15335. }
  15336. },
  15337. "required": ["type", "key", "message", "options"],
  15338. "additionalProperties": false
  15339. }
  15340. ]
  15341. }
  15342. }
  15343. },
  15344. "required": ["type", "label"],
  15345. "additionalProperties": false
  15346. },
  15347. "ProviderAuthAuthorization": {
  15348. "type": "object",
  15349. "properties": {
  15350. "url": {
  15351. "type": "string"
  15352. },
  15353. "method": {
  15354. "type": "string",
  15355. "enum": ["auto", "code"]
  15356. },
  15357. "instructions": {
  15358. "type": "string"
  15359. }
  15360. },
  15361. "required": ["url", "method", "instructions"],
  15362. "additionalProperties": false
  15363. },
  15364. "ProviderAuthError1": {
  15365. "type": "object",
  15366. "properties": {
  15367. "name": {
  15368. "type": "string",
  15369. "enum": [
  15370. "BadRequest",
  15371. "ProviderAuthOauthMissing",
  15372. "ProviderAuthOauthCodeMissing",
  15373. "ProviderAuthOauthCallbackFailed",
  15374. "ProviderAuthValidationFailed"
  15375. ]
  15376. },
  15377. "data": {
  15378. "type": "object",
  15379. "properties": {
  15380. "providerID": {
  15381. "type": "string"
  15382. },
  15383. "field": {
  15384. "type": "string"
  15385. },
  15386. "message": {
  15387. "type": "string"
  15388. },
  15389. "kind": {
  15390. "type": "string"
  15391. }
  15392. },
  15393. "additionalProperties": false
  15394. }
  15395. },
  15396. "required": ["name", "data"],
  15397. "additionalProperties": false
  15398. },
  15399. "TextPartInput": {
  15400. "type": "object",
  15401. "properties": {
  15402. "id": {
  15403. "type": "string",
  15404. "pattern": "^prt"
  15405. },
  15406. "type": {
  15407. "type": "string",
  15408. "enum": ["text"]
  15409. },
  15410. "text": {
  15411. "type": "string"
  15412. },
  15413. "synthetic": {
  15414. "type": "boolean"
  15415. },
  15416. "ignored": {
  15417. "type": "boolean"
  15418. },
  15419. "time": {
  15420. "type": "object",
  15421. "properties": {
  15422. "start": {
  15423. "type": "integer",
  15424. "minimum": 0
  15425. },
  15426. "end": {
  15427. "type": "integer",
  15428. "minimum": 0
  15429. }
  15430. },
  15431. "required": ["start"],
  15432. "additionalProperties": false
  15433. },
  15434. "metadata": {
  15435. "type": "object"
  15436. }
  15437. },
  15438. "required": ["type", "text"],
  15439. "additionalProperties": false
  15440. },
  15441. "FilePartInput": {
  15442. "type": "object",
  15443. "properties": {
  15444. "id": {
  15445. "type": "string",
  15446. "pattern": "^prt"
  15447. },
  15448. "type": {
  15449. "type": "string",
  15450. "enum": ["file"]
  15451. },
  15452. "mime": {
  15453. "type": "string"
  15454. },
  15455. "filename": {
  15456. "type": "string"
  15457. },
  15458. "url": {
  15459. "type": "string"
  15460. },
  15461. "source": {
  15462. "$ref": "#/components/schemas/FilePartSource"
  15463. }
  15464. },
  15465. "required": ["type", "mime", "url"],
  15466. "additionalProperties": false
  15467. },
  15468. "AgentPartInput": {
  15469. "type": "object",
  15470. "properties": {
  15471. "id": {
  15472. "type": "string",
  15473. "pattern": "^prt"
  15474. },
  15475. "type": {
  15476. "type": "string",
  15477. "enum": ["agent"]
  15478. },
  15479. "name": {
  15480. "type": "string"
  15481. },
  15482. "source": {
  15483. "type": "object",
  15484. "properties": {
  15485. "value": {
  15486. "type": "string"
  15487. },
  15488. "start": {
  15489. "type": "integer",
  15490. "minimum": 0
  15491. },
  15492. "end": {
  15493. "type": "integer",
  15494. "minimum": 0
  15495. }
  15496. },
  15497. "required": ["value", "start", "end"],
  15498. "additionalProperties": false
  15499. }
  15500. },
  15501. "required": ["type", "name"],
  15502. "additionalProperties": false
  15503. },
  15504. "SubtaskPartInput": {
  15505. "type": "object",
  15506. "properties": {
  15507. "id": {
  15508. "type": "string",
  15509. "pattern": "^prt"
  15510. },
  15511. "type": {
  15512. "type": "string",
  15513. "enum": ["subtask"]
  15514. },
  15515. "prompt": {
  15516. "type": "string"
  15517. },
  15518. "description": {
  15519. "type": "string"
  15520. },
  15521. "agent": {
  15522. "type": "string"
  15523. },
  15524. "model": {
  15525. "type": "object",
  15526. "properties": {
  15527. "providerID": {
  15528. "type": "string"
  15529. },
  15530. "modelID": {
  15531. "type": "string"
  15532. }
  15533. },
  15534. "required": ["providerID", "modelID"],
  15535. "additionalProperties": false
  15536. },
  15537. "command": {
  15538. "type": "string"
  15539. }
  15540. },
  15541. "required": ["type", "prompt", "description", "agent"],
  15542. "additionalProperties": false
  15543. },
  15544. "V2SessionsResponse": {
  15545. "type": "object",
  15546. "properties": {
  15547. "items": {
  15548. "type": "array",
  15549. "items": {
  15550. "$ref": "#/components/schemas/SessionInfo"
  15551. }
  15552. },
  15553. "cursor": {
  15554. "type": "object",
  15555. "properties": {
  15556. "previous": {
  15557. "type": "string"
  15558. },
  15559. "next": {
  15560. "type": "string"
  15561. }
  15562. },
  15563. "additionalProperties": false
  15564. }
  15565. },
  15566. "required": ["items", "cursor"],
  15567. "additionalProperties": false
  15568. },
  15569. "InvalidCursorError": {
  15570. "type": "object",
  15571. "properties": {
  15572. "_tag": {
  15573. "type": "string",
  15574. "enum": ["InvalidCursorError"]
  15575. },
  15576. "message": {
  15577. "type": "string"
  15578. }
  15579. },
  15580. "required": ["_tag", "message"],
  15581. "additionalProperties": false
  15582. },
  15583. "UnauthorizedError": {
  15584. "type": "object",
  15585. "properties": {
  15586. "_tag": {
  15587. "type": "string",
  15588. "enum": ["UnauthorizedError"]
  15589. },
  15590. "message": {
  15591. "type": "string"
  15592. }
  15593. },
  15594. "required": ["_tag", "message"],
  15595. "additionalProperties": false
  15596. },
  15597. "V2SessionMessagesResponse": {
  15598. "type": "object",
  15599. "properties": {
  15600. "items": {
  15601. "type": "array",
  15602. "items": {
  15603. "$ref": "#/components/schemas/SessionMessage"
  15604. }
  15605. },
  15606. "cursor": {
  15607. "type": "object",
  15608. "properties": {
  15609. "previous": {
  15610. "type": "string"
  15611. },
  15612. "next": {
  15613. "type": "string"
  15614. }
  15615. },
  15616. "additionalProperties": false
  15617. }
  15618. },
  15619. "required": ["items", "cursor"],
  15620. "additionalProperties": false
  15621. },
  15622. "ServiceUnavailableError": {
  15623. "type": "object",
  15624. "properties": {
  15625. "_tag": {
  15626. "type": "string",
  15627. "enum": ["ServiceUnavailableError"]
  15628. },
  15629. "message": {
  15630. "type": "string"
  15631. },
  15632. "service": {
  15633. "type": "string"
  15634. }
  15635. },
  15636. "required": ["_tag", "message"],
  15637. "additionalProperties": false
  15638. },
  15639. "ProviderNotFoundError": {
  15640. "type": "object",
  15641. "properties": {
  15642. "_tag": {
  15643. "type": "string",
  15644. "enum": ["ProviderNotFoundError"]
  15645. },
  15646. "providerID": {
  15647. "type": "string"
  15648. },
  15649. "message": {
  15650. "type": "string"
  15651. }
  15652. },
  15653. "required": ["_tag", "providerID", "message"],
  15654. "additionalProperties": false
  15655. },
  15656. "EventTuiPromptAppend": {
  15657. "type": "object",
  15658. "properties": {
  15659. "type": {
  15660. "type": "string",
  15661. "enum": ["tui.prompt.append"]
  15662. },
  15663. "properties": {
  15664. "type": "object",
  15665. "properties": {
  15666. "text": {
  15667. "type": "string"
  15668. }
  15669. },
  15670. "required": ["text"],
  15671. "additionalProperties": false
  15672. }
  15673. },
  15674. "required": ["type", "properties"],
  15675. "additionalProperties": false
  15676. },
  15677. "EventTuiCommandExecute": {
  15678. "type": "object",
  15679. "properties": {
  15680. "type": {
  15681. "type": "string",
  15682. "enum": ["tui.command.execute"]
  15683. },
  15684. "properties": {
  15685. "type": "object",
  15686. "properties": {
  15687. "command": {
  15688. "anyOf": [
  15689. {
  15690. "type": "string",
  15691. "enum": [
  15692. "session.list",
  15693. "session.new",
  15694. "session.share",
  15695. "session.interrupt",
  15696. "session.compact",
  15697. "session.page.up",
  15698. "session.page.down",
  15699. "session.line.up",
  15700. "session.line.down",
  15701. "session.half.page.up",
  15702. "session.half.page.down",
  15703. "session.first",
  15704. "session.last",
  15705. "prompt.clear",
  15706. "prompt.submit",
  15707. "agent.cycle"
  15708. ]
  15709. },
  15710. {
  15711. "type": "string"
  15712. }
  15713. ]
  15714. }
  15715. },
  15716. "required": ["command"],
  15717. "additionalProperties": false
  15718. }
  15719. },
  15720. "required": ["type", "properties"],
  15721. "additionalProperties": false
  15722. },
  15723. "EventTuiToastShow": {
  15724. "type": "object",
  15725. "properties": {
  15726. "type": {
  15727. "type": "string",
  15728. "enum": ["tui.toast.show"]
  15729. },
  15730. "properties": {
  15731. "type": "object",
  15732. "properties": {
  15733. "title": {
  15734. "type": "string"
  15735. },
  15736. "message": {
  15737. "type": "string"
  15738. },
  15739. "variant": {
  15740. "type": "string",
  15741. "enum": ["info", "success", "warning", "error"]
  15742. },
  15743. "duration": {
  15744. "type": "integer",
  15745. "exclusiveMinimum": 0
  15746. }
  15747. },
  15748. "required": ["message", "variant"],
  15749. "additionalProperties": false
  15750. }
  15751. },
  15752. "required": ["type", "properties"],
  15753. "additionalProperties": false
  15754. },
  15755. "EventTuiSessionSelect": {
  15756. "type": "object",
  15757. "properties": {
  15758. "type": {
  15759. "type": "string",
  15760. "enum": ["tui.session.select"]
  15761. },
  15762. "properties": {
  15763. "type": "object",
  15764. "properties": {
  15765. "sessionID": {
  15766. "type": "string",
  15767. "pattern": "^ses",
  15768. "description": "Session ID to navigate to"
  15769. }
  15770. },
  15771. "required": ["sessionID"],
  15772. "additionalProperties": false
  15773. }
  15774. },
  15775. "required": ["type", "properties"],
  15776. "additionalProperties": false
  15777. },
  15778. "Workspace": {
  15779. "type": "object",
  15780. "properties": {
  15781. "id": {
  15782. "type": "string",
  15783. "pattern": "^wrk"
  15784. },
  15785. "type": {
  15786. "type": "string"
  15787. },
  15788. "name": {
  15789. "type": "string"
  15790. },
  15791. "branch": {
  15792. "anyOf": [
  15793. {
  15794. "type": "string"
  15795. },
  15796. {
  15797. "type": "null"
  15798. }
  15799. ]
  15800. },
  15801. "directory": {
  15802. "anyOf": [
  15803. {
  15804. "type": "string"
  15805. },
  15806. {
  15807. "type": "null"
  15808. }
  15809. ]
  15810. },
  15811. "extra": {
  15812. "anyOf": [
  15813. {},
  15814. {
  15815. "type": "null"
  15816. }
  15817. ]
  15818. },
  15819. "projectID": {
  15820. "type": "string"
  15821. },
  15822. "timeUsed": {
  15823. "anyOf": [
  15824. {
  15825. "type": "number"
  15826. },
  15827. {
  15828. "type": "string",
  15829. "enum": ["NaN"]
  15830. },
  15831. {
  15832. "type": "string",
  15833. "enum": ["Infinity"]
  15834. },
  15835. {
  15836. "type": "string",
  15837. "enum": ["-Infinity"]
  15838. },
  15839. {
  15840. "type": "string",
  15841. "enum": ["Infinity", "-Infinity", "NaN"]
  15842. }
  15843. ]
  15844. }
  15845. },
  15846. "required": ["id", "type", "name", "projectID", "timeUsed"],
  15847. "additionalProperties": false
  15848. },
  15849. "WorkspaceWarpError": {
  15850. "type": "object",
  15851. "properties": {
  15852. "name": {
  15853. "type": "string",
  15854. "enum": ["WorkspaceWarpError"]
  15855. },
  15856. "data": {
  15857. "type": "object",
  15858. "properties": {
  15859. "message": {
  15860. "type": "string"
  15861. }
  15862. },
  15863. "required": ["message"],
  15864. "additionalProperties": false
  15865. }
  15866. },
  15867. "required": ["name", "data"],
  15868. "additionalProperties": false
  15869. },
  15870. "SyncEventMessageUpdated": {
  15871. "type": "object",
  15872. "properties": {
  15873. "type": {
  15874. "type": "string",
  15875. "enum": ["sync"]
  15876. },
  15877. "name": {
  15878. "type": "string",
  15879. "enum": ["message.updated.1"]
  15880. },
  15881. "id": {
  15882. "type": "string"
  15883. },
  15884. "seq": {
  15885. "type": "number"
  15886. },
  15887. "aggregateID": {
  15888. "type": "string",
  15889. "enum": ["sessionID"]
  15890. },
  15891. "data": {
  15892. "type": "object",
  15893. "properties": {
  15894. "sessionID": {
  15895. "type": "string",
  15896. "pattern": "^ses"
  15897. },
  15898. "info": {
  15899. "$ref": "#/components/schemas/Message"
  15900. }
  15901. },
  15902. "required": ["sessionID", "info"],
  15903. "additionalProperties": false
  15904. }
  15905. },
  15906. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15907. "additionalProperties": false
  15908. },
  15909. "SyncEventMessageRemoved": {
  15910. "type": "object",
  15911. "properties": {
  15912. "type": {
  15913. "type": "string",
  15914. "enum": ["sync"]
  15915. },
  15916. "name": {
  15917. "type": "string",
  15918. "enum": ["message.removed.1"]
  15919. },
  15920. "id": {
  15921. "type": "string"
  15922. },
  15923. "seq": {
  15924. "type": "number"
  15925. },
  15926. "aggregateID": {
  15927. "type": "string",
  15928. "enum": ["sessionID"]
  15929. },
  15930. "data": {
  15931. "type": "object",
  15932. "properties": {
  15933. "sessionID": {
  15934. "type": "string",
  15935. "pattern": "^ses"
  15936. },
  15937. "messageID": {
  15938. "type": "string",
  15939. "pattern": "^msg"
  15940. }
  15941. },
  15942. "required": ["sessionID", "messageID"],
  15943. "additionalProperties": false
  15944. }
  15945. },
  15946. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15947. "additionalProperties": false
  15948. },
  15949. "SyncEventMessagePartUpdated": {
  15950. "type": "object",
  15951. "properties": {
  15952. "type": {
  15953. "type": "string",
  15954. "enum": ["sync"]
  15955. },
  15956. "name": {
  15957. "type": "string",
  15958. "enum": ["message.part.updated.1"]
  15959. },
  15960. "id": {
  15961. "type": "string"
  15962. },
  15963. "seq": {
  15964. "type": "number"
  15965. },
  15966. "aggregateID": {
  15967. "type": "string",
  15968. "enum": ["sessionID"]
  15969. },
  15970. "data": {
  15971. "type": "object",
  15972. "properties": {
  15973. "sessionID": {
  15974. "type": "string",
  15975. "pattern": "^ses"
  15976. },
  15977. "part": {
  15978. "$ref": "#/components/schemas/Part"
  15979. },
  15980. "time": {
  15981. "type": "integer",
  15982. "minimum": 0
  15983. }
  15984. },
  15985. "required": ["sessionID", "part", "time"],
  15986. "additionalProperties": false
  15987. }
  15988. },
  15989. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15990. "additionalProperties": false
  15991. },
  15992. "SyncEventMessagePartRemoved": {
  15993. "type": "object",
  15994. "properties": {
  15995. "type": {
  15996. "type": "string",
  15997. "enum": ["sync"]
  15998. },
  15999. "name": {
  16000. "type": "string",
  16001. "enum": ["message.part.removed.1"]
  16002. },
  16003. "id": {
  16004. "type": "string"
  16005. },
  16006. "seq": {
  16007. "type": "number"
  16008. },
  16009. "aggregateID": {
  16010. "type": "string",
  16011. "enum": ["sessionID"]
  16012. },
  16013. "data": {
  16014. "type": "object",
  16015. "properties": {
  16016. "sessionID": {
  16017. "type": "string",
  16018. "pattern": "^ses"
  16019. },
  16020. "messageID": {
  16021. "type": "string",
  16022. "pattern": "^msg"
  16023. },
  16024. "partID": {
  16025. "type": "string",
  16026. "pattern": "^prt"
  16027. }
  16028. },
  16029. "required": ["sessionID", "messageID", "partID"],
  16030. "additionalProperties": false
  16031. }
  16032. },
  16033. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16034. "additionalProperties": false
  16035. },
  16036. "SyncEventSessionCreated": {
  16037. "type": "object",
  16038. "properties": {
  16039. "type": {
  16040. "type": "string",
  16041. "enum": ["sync"]
  16042. },
  16043. "name": {
  16044. "type": "string",
  16045. "enum": ["session.created.1"]
  16046. },
  16047. "id": {
  16048. "type": "string"
  16049. },
  16050. "seq": {
  16051. "type": "number"
  16052. },
  16053. "aggregateID": {
  16054. "type": "string",
  16055. "enum": ["sessionID"]
  16056. },
  16057. "data": {
  16058. "type": "object",
  16059. "properties": {
  16060. "sessionID": {
  16061. "type": "string",
  16062. "pattern": "^ses"
  16063. },
  16064. "info": {
  16065. "$ref": "#/components/schemas/Session"
  16066. }
  16067. },
  16068. "required": ["sessionID", "info"],
  16069. "additionalProperties": false
  16070. }
  16071. },
  16072. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16073. "additionalProperties": false
  16074. },
  16075. "SyncEventSessionUpdated": {
  16076. "type": "object",
  16077. "properties": {
  16078. "type": {
  16079. "type": "string",
  16080. "enum": ["sync"]
  16081. },
  16082. "name": {
  16083. "type": "string",
  16084. "enum": ["session.updated.1"]
  16085. },
  16086. "id": {
  16087. "type": "string"
  16088. },
  16089. "seq": {
  16090. "type": "number"
  16091. },
  16092. "aggregateID": {
  16093. "type": "string",
  16094. "enum": ["sessionID"]
  16095. },
  16096. "data": {
  16097. "type": "object",
  16098. "properties": {
  16099. "sessionID": {
  16100. "type": "string",
  16101. "pattern": "^ses"
  16102. },
  16103. "info": {
  16104. "type": "object",
  16105. "properties": {
  16106. "id": {
  16107. "anyOf": [
  16108. {
  16109. "type": "string",
  16110. "pattern": "^ses"
  16111. },
  16112. {
  16113. "type": "null"
  16114. }
  16115. ]
  16116. },
  16117. "slug": {
  16118. "anyOf": [
  16119. {
  16120. "type": "string"
  16121. },
  16122. {
  16123. "type": "null"
  16124. }
  16125. ]
  16126. },
  16127. "projectID": {
  16128. "anyOf": [
  16129. {
  16130. "type": "string"
  16131. },
  16132. {
  16133. "type": "null"
  16134. }
  16135. ]
  16136. },
  16137. "workspaceID": {
  16138. "anyOf": [
  16139. {
  16140. "type": "string",
  16141. "pattern": "^wrk"
  16142. },
  16143. {
  16144. "type": "null"
  16145. }
  16146. ]
  16147. },
  16148. "directory": {
  16149. "anyOf": [
  16150. {
  16151. "type": "string"
  16152. },
  16153. {
  16154. "type": "null"
  16155. }
  16156. ]
  16157. },
  16158. "path": {
  16159. "anyOf": [
  16160. {
  16161. "type": "string"
  16162. },
  16163. {
  16164. "type": "null"
  16165. }
  16166. ]
  16167. },
  16168. "parentID": {
  16169. "anyOf": [
  16170. {
  16171. "type": "string",
  16172. "pattern": "^ses"
  16173. },
  16174. {
  16175. "type": "null"
  16176. }
  16177. ]
  16178. },
  16179. "summary": {
  16180. "anyOf": [
  16181. {
  16182. "type": "object",
  16183. "properties": {
  16184. "additions": {
  16185. "type": "number"
  16186. },
  16187. "deletions": {
  16188. "type": "number"
  16189. },
  16190. "files": {
  16191. "type": "number"
  16192. },
  16193. "diffs": {
  16194. "type": "array",
  16195. "items": {
  16196. "$ref": "#/components/schemas/SnapshotFileDiff"
  16197. }
  16198. }
  16199. },
  16200. "required": ["additions", "deletions", "files"],
  16201. "additionalProperties": false
  16202. },
  16203. {
  16204. "type": "null"
  16205. }
  16206. ]
  16207. },
  16208. "cost": {
  16209. "anyOf": [
  16210. {
  16211. "type": "number"
  16212. },
  16213. {
  16214. "type": "null"
  16215. }
  16216. ]
  16217. },
  16218. "tokens": {
  16219. "anyOf": [
  16220. {
  16221. "type": "object",
  16222. "properties": {
  16223. "input": {
  16224. "type": "number"
  16225. },
  16226. "output": {
  16227. "type": "number"
  16228. },
  16229. "reasoning": {
  16230. "type": "number"
  16231. },
  16232. "cache": {
  16233. "type": "object",
  16234. "properties": {
  16235. "read": {
  16236. "type": "number"
  16237. },
  16238. "write": {
  16239. "type": "number"
  16240. }
  16241. },
  16242. "required": ["read", "write"],
  16243. "additionalProperties": false
  16244. }
  16245. },
  16246. "required": ["input", "output", "reasoning", "cache"],
  16247. "additionalProperties": false
  16248. },
  16249. {
  16250. "type": "null"
  16251. }
  16252. ]
  16253. },
  16254. "share": {
  16255. "type": "object",
  16256. "properties": {
  16257. "url": {
  16258. "anyOf": [
  16259. {
  16260. "type": "string"
  16261. },
  16262. {
  16263. "type": "null"
  16264. }
  16265. ]
  16266. }
  16267. },
  16268. "additionalProperties": false
  16269. },
  16270. "title": {
  16271. "anyOf": [
  16272. {
  16273. "type": "string"
  16274. },
  16275. {
  16276. "type": "null"
  16277. }
  16278. ]
  16279. },
  16280. "agent": {
  16281. "anyOf": [
  16282. {
  16283. "type": "string"
  16284. },
  16285. {
  16286. "type": "null"
  16287. }
  16288. ]
  16289. },
  16290. "model": {
  16291. "anyOf": [
  16292. {
  16293. "type": "object",
  16294. "properties": {
  16295. "id": {
  16296. "type": "string"
  16297. },
  16298. "providerID": {
  16299. "type": "string"
  16300. },
  16301. "variant": {
  16302. "type": "string"
  16303. }
  16304. },
  16305. "required": ["id", "providerID"],
  16306. "additionalProperties": false
  16307. },
  16308. {
  16309. "type": "null"
  16310. }
  16311. ]
  16312. },
  16313. "version": {
  16314. "anyOf": [
  16315. {
  16316. "type": "string"
  16317. },
  16318. {
  16319. "type": "null"
  16320. }
  16321. ]
  16322. },
  16323. "time": {
  16324. "type": "object",
  16325. "properties": {
  16326. "created": {
  16327. "anyOf": [
  16328. {
  16329. "type": "integer",
  16330. "minimum": 0
  16331. },
  16332. {
  16333. "type": "null"
  16334. }
  16335. ]
  16336. },
  16337. "updated": {
  16338. "anyOf": [
  16339. {
  16340. "type": "integer",
  16341. "minimum": 0
  16342. },
  16343. {
  16344. "type": "null"
  16345. }
  16346. ]
  16347. },
  16348. "compacting": {
  16349. "anyOf": [
  16350. {
  16351. "type": "integer",
  16352. "minimum": 0
  16353. },
  16354. {
  16355. "type": "null"
  16356. }
  16357. ]
  16358. },
  16359. "archived": {
  16360. "anyOf": [
  16361. {
  16362. "type": "number"
  16363. },
  16364. {
  16365. "type": "null"
  16366. }
  16367. ]
  16368. }
  16369. },
  16370. "additionalProperties": false
  16371. },
  16372. "permission": {
  16373. "anyOf": [
  16374. {
  16375. "$ref": "#/components/schemas/PermissionRuleset"
  16376. },
  16377. {
  16378. "type": "null"
  16379. }
  16380. ]
  16381. },
  16382. "revert": {
  16383. "anyOf": [
  16384. {
  16385. "type": "object",
  16386. "properties": {
  16387. "messageID": {
  16388. "type": "string",
  16389. "pattern": "^msg"
  16390. },
  16391. "partID": {
  16392. "type": "string",
  16393. "pattern": "^prt"
  16394. },
  16395. "snapshot": {
  16396. "type": "string"
  16397. },
  16398. "diff": {
  16399. "type": "string"
  16400. }
  16401. },
  16402. "required": ["messageID"],
  16403. "additionalProperties": false
  16404. },
  16405. {
  16406. "type": "null"
  16407. }
  16408. ]
  16409. }
  16410. },
  16411. "additionalProperties": false
  16412. }
  16413. },
  16414. "required": ["sessionID", "info"],
  16415. "additionalProperties": false
  16416. }
  16417. },
  16418. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16419. "additionalProperties": false
  16420. },
  16421. "SyncEventSessionDeleted": {
  16422. "type": "object",
  16423. "properties": {
  16424. "type": {
  16425. "type": "string",
  16426. "enum": ["sync"]
  16427. },
  16428. "name": {
  16429. "type": "string",
  16430. "enum": ["session.deleted.1"]
  16431. },
  16432. "id": {
  16433. "type": "string"
  16434. },
  16435. "seq": {
  16436. "type": "number"
  16437. },
  16438. "aggregateID": {
  16439. "type": "string",
  16440. "enum": ["sessionID"]
  16441. },
  16442. "data": {
  16443. "type": "object",
  16444. "properties": {
  16445. "sessionID": {
  16446. "type": "string",
  16447. "pattern": "^ses"
  16448. },
  16449. "info": {
  16450. "$ref": "#/components/schemas/Session"
  16451. }
  16452. },
  16453. "required": ["sessionID", "info"],
  16454. "additionalProperties": false
  16455. }
  16456. },
  16457. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16458. "additionalProperties": false
  16459. },
  16460. "SyncEventSessionNextAgentSwitched": {
  16461. "type": "object",
  16462. "properties": {
  16463. "type": {
  16464. "type": "string",
  16465. "enum": ["sync"]
  16466. },
  16467. "name": {
  16468. "type": "string",
  16469. "enum": ["session.next.agent.switched.1"]
  16470. },
  16471. "id": {
  16472. "type": "string"
  16473. },
  16474. "seq": {
  16475. "type": "number"
  16476. },
  16477. "aggregateID": {
  16478. "type": "string",
  16479. "enum": ["sessionID"]
  16480. },
  16481. "data": {
  16482. "type": "object",
  16483. "properties": {
  16484. "timestamp": {
  16485. "type": "number"
  16486. },
  16487. "sessionID": {
  16488. "type": "string",
  16489. "pattern": "^ses"
  16490. },
  16491. "agent": {
  16492. "type": "string"
  16493. }
  16494. },
  16495. "required": ["timestamp", "sessionID", "agent"],
  16496. "additionalProperties": false
  16497. }
  16498. },
  16499. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16500. "additionalProperties": false
  16501. },
  16502. "SyncEventSessionNextModelSwitched": {
  16503. "type": "object",
  16504. "properties": {
  16505. "type": {
  16506. "type": "string",
  16507. "enum": ["sync"]
  16508. },
  16509. "name": {
  16510. "type": "string",
  16511. "enum": ["session.next.model.switched.1"]
  16512. },
  16513. "id": {
  16514. "type": "string"
  16515. },
  16516. "seq": {
  16517. "type": "number"
  16518. },
  16519. "aggregateID": {
  16520. "type": "string",
  16521. "enum": ["sessionID"]
  16522. },
  16523. "data": {
  16524. "type": "object",
  16525. "properties": {
  16526. "timestamp": {
  16527. "type": "number"
  16528. },
  16529. "sessionID": {
  16530. "type": "string",
  16531. "pattern": "^ses"
  16532. },
  16533. "model": {
  16534. "type": "object",
  16535. "properties": {
  16536. "id": {
  16537. "type": "string"
  16538. },
  16539. "providerID": {
  16540. "type": "string"
  16541. },
  16542. "variant": {
  16543. "type": "string"
  16544. }
  16545. },
  16546. "required": ["id", "providerID", "variant"],
  16547. "additionalProperties": false
  16548. }
  16549. },
  16550. "required": ["timestamp", "sessionID", "model"],
  16551. "additionalProperties": false
  16552. }
  16553. },
  16554. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16555. "additionalProperties": false
  16556. },
  16557. "SyncEventSessionNextPrompted": {
  16558. "type": "object",
  16559. "properties": {
  16560. "type": {
  16561. "type": "string",
  16562. "enum": ["sync"]
  16563. },
  16564. "name": {
  16565. "type": "string",
  16566. "enum": ["session.next.prompted.1"]
  16567. },
  16568. "id": {
  16569. "type": "string"
  16570. },
  16571. "seq": {
  16572. "type": "number"
  16573. },
  16574. "aggregateID": {
  16575. "type": "string",
  16576. "enum": ["sessionID"]
  16577. },
  16578. "data": {
  16579. "type": "object",
  16580. "properties": {
  16581. "timestamp": {
  16582. "type": "number"
  16583. },
  16584. "sessionID": {
  16585. "type": "string",
  16586. "pattern": "^ses"
  16587. },
  16588. "prompt": {
  16589. "$ref": "#/components/schemas/Prompt"
  16590. }
  16591. },
  16592. "required": ["timestamp", "sessionID", "prompt"],
  16593. "additionalProperties": false
  16594. }
  16595. },
  16596. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16597. "additionalProperties": false
  16598. },
  16599. "SyncEventSessionNextSynthetic": {
  16600. "type": "object",
  16601. "properties": {
  16602. "type": {
  16603. "type": "string",
  16604. "enum": ["sync"]
  16605. },
  16606. "name": {
  16607. "type": "string",
  16608. "enum": ["session.next.synthetic.1"]
  16609. },
  16610. "id": {
  16611. "type": "string"
  16612. },
  16613. "seq": {
  16614. "type": "number"
  16615. },
  16616. "aggregateID": {
  16617. "type": "string",
  16618. "enum": ["sessionID"]
  16619. },
  16620. "data": {
  16621. "type": "object",
  16622. "properties": {
  16623. "timestamp": {
  16624. "type": "number"
  16625. },
  16626. "sessionID": {
  16627. "type": "string",
  16628. "pattern": "^ses"
  16629. },
  16630. "text": {
  16631. "type": "string"
  16632. }
  16633. },
  16634. "required": ["timestamp", "sessionID", "text"],
  16635. "additionalProperties": false
  16636. }
  16637. },
  16638. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16639. "additionalProperties": false
  16640. },
  16641. "SyncEventSessionNextShellStarted": {
  16642. "type": "object",
  16643. "properties": {
  16644. "type": {
  16645. "type": "string",
  16646. "enum": ["sync"]
  16647. },
  16648. "name": {
  16649. "type": "string",
  16650. "enum": ["session.next.shell.started.1"]
  16651. },
  16652. "id": {
  16653. "type": "string"
  16654. },
  16655. "seq": {
  16656. "type": "number"
  16657. },
  16658. "aggregateID": {
  16659. "type": "string",
  16660. "enum": ["sessionID"]
  16661. },
  16662. "data": {
  16663. "type": "object",
  16664. "properties": {
  16665. "timestamp": {
  16666. "type": "number"
  16667. },
  16668. "sessionID": {
  16669. "type": "string",
  16670. "pattern": "^ses"
  16671. },
  16672. "callID": {
  16673. "type": "string"
  16674. },
  16675. "command": {
  16676. "type": "string"
  16677. }
  16678. },
  16679. "required": ["timestamp", "sessionID", "callID", "command"],
  16680. "additionalProperties": false
  16681. }
  16682. },
  16683. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16684. "additionalProperties": false
  16685. },
  16686. "SyncEventSessionNextShellEnded": {
  16687. "type": "object",
  16688. "properties": {
  16689. "type": {
  16690. "type": "string",
  16691. "enum": ["sync"]
  16692. },
  16693. "name": {
  16694. "type": "string",
  16695. "enum": ["session.next.shell.ended.1"]
  16696. },
  16697. "id": {
  16698. "type": "string"
  16699. },
  16700. "seq": {
  16701. "type": "number"
  16702. },
  16703. "aggregateID": {
  16704. "type": "string",
  16705. "enum": ["sessionID"]
  16706. },
  16707. "data": {
  16708. "type": "object",
  16709. "properties": {
  16710. "timestamp": {
  16711. "type": "number"
  16712. },
  16713. "sessionID": {
  16714. "type": "string",
  16715. "pattern": "^ses"
  16716. },
  16717. "callID": {
  16718. "type": "string"
  16719. },
  16720. "output": {
  16721. "type": "string"
  16722. }
  16723. },
  16724. "required": ["timestamp", "sessionID", "callID", "output"],
  16725. "additionalProperties": false
  16726. }
  16727. },
  16728. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16729. "additionalProperties": false
  16730. },
  16731. "SyncEventSessionNextStepStarted": {
  16732. "type": "object",
  16733. "properties": {
  16734. "type": {
  16735. "type": "string",
  16736. "enum": ["sync"]
  16737. },
  16738. "name": {
  16739. "type": "string",
  16740. "enum": ["session.next.step.started.1"]
  16741. },
  16742. "id": {
  16743. "type": "string"
  16744. },
  16745. "seq": {
  16746. "type": "number"
  16747. },
  16748. "aggregateID": {
  16749. "type": "string",
  16750. "enum": ["sessionID"]
  16751. },
  16752. "data": {
  16753. "type": "object",
  16754. "properties": {
  16755. "timestamp": {
  16756. "type": "number"
  16757. },
  16758. "sessionID": {
  16759. "type": "string",
  16760. "pattern": "^ses"
  16761. },
  16762. "agent": {
  16763. "type": "string"
  16764. },
  16765. "model": {
  16766. "type": "object",
  16767. "properties": {
  16768. "id": {
  16769. "type": "string"
  16770. },
  16771. "providerID": {
  16772. "type": "string"
  16773. },
  16774. "variant": {
  16775. "type": "string"
  16776. }
  16777. },
  16778. "required": ["id", "providerID", "variant"],
  16779. "additionalProperties": false
  16780. },
  16781. "snapshot": {
  16782. "type": "string"
  16783. }
  16784. },
  16785. "required": ["timestamp", "sessionID", "agent", "model"],
  16786. "additionalProperties": false
  16787. }
  16788. },
  16789. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16790. "additionalProperties": false
  16791. },
  16792. "SyncEventSessionNextStepEnded": {
  16793. "type": "object",
  16794. "properties": {
  16795. "type": {
  16796. "type": "string",
  16797. "enum": ["sync"]
  16798. },
  16799. "name": {
  16800. "type": "string",
  16801. "enum": ["session.next.step.ended.1"]
  16802. },
  16803. "id": {
  16804. "type": "string"
  16805. },
  16806. "seq": {
  16807. "type": "number"
  16808. },
  16809. "aggregateID": {
  16810. "type": "string",
  16811. "enum": ["sessionID"]
  16812. },
  16813. "data": {
  16814. "type": "object",
  16815. "properties": {
  16816. "timestamp": {
  16817. "type": "number"
  16818. },
  16819. "sessionID": {
  16820. "type": "string",
  16821. "pattern": "^ses"
  16822. },
  16823. "finish": {
  16824. "type": "string"
  16825. },
  16826. "cost": {
  16827. "type": "number"
  16828. },
  16829. "tokens": {
  16830. "type": "object",
  16831. "properties": {
  16832. "input": {
  16833. "type": "number"
  16834. },
  16835. "output": {
  16836. "type": "number"
  16837. },
  16838. "reasoning": {
  16839. "type": "number"
  16840. },
  16841. "cache": {
  16842. "type": "object",
  16843. "properties": {
  16844. "read": {
  16845. "type": "number"
  16846. },
  16847. "write": {
  16848. "type": "number"
  16849. }
  16850. },
  16851. "required": ["read", "write"],
  16852. "additionalProperties": false
  16853. }
  16854. },
  16855. "required": ["input", "output", "reasoning", "cache"],
  16856. "additionalProperties": false
  16857. },
  16858. "snapshot": {
  16859. "type": "string"
  16860. }
  16861. },
  16862. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  16863. "additionalProperties": false
  16864. }
  16865. },
  16866. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16867. "additionalProperties": false
  16868. },
  16869. "SyncEventSessionNextStepFailed": {
  16870. "type": "object",
  16871. "properties": {
  16872. "type": {
  16873. "type": "string",
  16874. "enum": ["sync"]
  16875. },
  16876. "name": {
  16877. "type": "string",
  16878. "enum": ["session.next.step.failed.1"]
  16879. },
  16880. "id": {
  16881. "type": "string"
  16882. },
  16883. "seq": {
  16884. "type": "number"
  16885. },
  16886. "aggregateID": {
  16887. "type": "string",
  16888. "enum": ["sessionID"]
  16889. },
  16890. "data": {
  16891. "type": "object",
  16892. "properties": {
  16893. "timestamp": {
  16894. "type": "number"
  16895. },
  16896. "sessionID": {
  16897. "type": "string",
  16898. "pattern": "^ses"
  16899. },
  16900. "error": {
  16901. "$ref": "#/components/schemas/SessionErrorUnknown"
  16902. }
  16903. },
  16904. "required": ["timestamp", "sessionID", "error"],
  16905. "additionalProperties": false
  16906. }
  16907. },
  16908. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16909. "additionalProperties": false
  16910. },
  16911. "SyncEventSessionNextTextStarted": {
  16912. "type": "object",
  16913. "properties": {
  16914. "type": {
  16915. "type": "string",
  16916. "enum": ["sync"]
  16917. },
  16918. "name": {
  16919. "type": "string",
  16920. "enum": ["session.next.text.started.1"]
  16921. },
  16922. "id": {
  16923. "type": "string"
  16924. },
  16925. "seq": {
  16926. "type": "number"
  16927. },
  16928. "aggregateID": {
  16929. "type": "string",
  16930. "enum": ["sessionID"]
  16931. },
  16932. "data": {
  16933. "type": "object",
  16934. "properties": {
  16935. "timestamp": {
  16936. "type": "number"
  16937. },
  16938. "sessionID": {
  16939. "type": "string",
  16940. "pattern": "^ses"
  16941. }
  16942. },
  16943. "required": ["timestamp", "sessionID"],
  16944. "additionalProperties": false
  16945. }
  16946. },
  16947. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16948. "additionalProperties": false
  16949. },
  16950. "SyncEventSessionNextTextDelta": {
  16951. "type": "object",
  16952. "properties": {
  16953. "type": {
  16954. "type": "string",
  16955. "enum": ["sync"]
  16956. },
  16957. "name": {
  16958. "type": "string",
  16959. "enum": ["session.next.text.delta.1"]
  16960. },
  16961. "id": {
  16962. "type": "string"
  16963. },
  16964. "seq": {
  16965. "type": "number"
  16966. },
  16967. "aggregateID": {
  16968. "type": "string",
  16969. "enum": ["sessionID"]
  16970. },
  16971. "data": {
  16972. "type": "object",
  16973. "properties": {
  16974. "timestamp": {
  16975. "type": "number"
  16976. },
  16977. "sessionID": {
  16978. "type": "string",
  16979. "pattern": "^ses"
  16980. },
  16981. "delta": {
  16982. "type": "string"
  16983. }
  16984. },
  16985. "required": ["timestamp", "sessionID", "delta"],
  16986. "additionalProperties": false
  16987. }
  16988. },
  16989. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16990. "additionalProperties": false
  16991. },
  16992. "SyncEventSessionNextTextEnded": {
  16993. "type": "object",
  16994. "properties": {
  16995. "type": {
  16996. "type": "string",
  16997. "enum": ["sync"]
  16998. },
  16999. "name": {
  17000. "type": "string",
  17001. "enum": ["session.next.text.ended.1"]
  17002. },
  17003. "id": {
  17004. "type": "string"
  17005. },
  17006. "seq": {
  17007. "type": "number"
  17008. },
  17009. "aggregateID": {
  17010. "type": "string",
  17011. "enum": ["sessionID"]
  17012. },
  17013. "data": {
  17014. "type": "object",
  17015. "properties": {
  17016. "timestamp": {
  17017. "type": "number"
  17018. },
  17019. "sessionID": {
  17020. "type": "string",
  17021. "pattern": "^ses"
  17022. },
  17023. "text": {
  17024. "type": "string"
  17025. }
  17026. },
  17027. "required": ["timestamp", "sessionID", "text"],
  17028. "additionalProperties": false
  17029. }
  17030. },
  17031. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17032. "additionalProperties": false
  17033. },
  17034. "SyncEventSessionNextReasoningStarted": {
  17035. "type": "object",
  17036. "properties": {
  17037. "type": {
  17038. "type": "string",
  17039. "enum": ["sync"]
  17040. },
  17041. "name": {
  17042. "type": "string",
  17043. "enum": ["session.next.reasoning.started.1"]
  17044. },
  17045. "id": {
  17046. "type": "string"
  17047. },
  17048. "seq": {
  17049. "type": "number"
  17050. },
  17051. "aggregateID": {
  17052. "type": "string",
  17053. "enum": ["sessionID"]
  17054. },
  17055. "data": {
  17056. "type": "object",
  17057. "properties": {
  17058. "timestamp": {
  17059. "type": "number"
  17060. },
  17061. "sessionID": {
  17062. "type": "string",
  17063. "pattern": "^ses"
  17064. },
  17065. "reasoningID": {
  17066. "type": "string"
  17067. }
  17068. },
  17069. "required": ["timestamp", "sessionID", "reasoningID"],
  17070. "additionalProperties": false
  17071. }
  17072. },
  17073. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17074. "additionalProperties": false
  17075. },
  17076. "SyncEventSessionNextReasoningDelta": {
  17077. "type": "object",
  17078. "properties": {
  17079. "type": {
  17080. "type": "string",
  17081. "enum": ["sync"]
  17082. },
  17083. "name": {
  17084. "type": "string",
  17085. "enum": ["session.next.reasoning.delta.1"]
  17086. },
  17087. "id": {
  17088. "type": "string"
  17089. },
  17090. "seq": {
  17091. "type": "number"
  17092. },
  17093. "aggregateID": {
  17094. "type": "string",
  17095. "enum": ["sessionID"]
  17096. },
  17097. "data": {
  17098. "type": "object",
  17099. "properties": {
  17100. "timestamp": {
  17101. "type": "number"
  17102. },
  17103. "sessionID": {
  17104. "type": "string",
  17105. "pattern": "^ses"
  17106. },
  17107. "reasoningID": {
  17108. "type": "string"
  17109. },
  17110. "delta": {
  17111. "type": "string"
  17112. }
  17113. },
  17114. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  17115. "additionalProperties": false
  17116. }
  17117. },
  17118. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17119. "additionalProperties": false
  17120. },
  17121. "SyncEventSessionNextReasoningEnded": {
  17122. "type": "object",
  17123. "properties": {
  17124. "type": {
  17125. "type": "string",
  17126. "enum": ["sync"]
  17127. },
  17128. "name": {
  17129. "type": "string",
  17130. "enum": ["session.next.reasoning.ended.1"]
  17131. },
  17132. "id": {
  17133. "type": "string"
  17134. },
  17135. "seq": {
  17136. "type": "number"
  17137. },
  17138. "aggregateID": {
  17139. "type": "string",
  17140. "enum": ["sessionID"]
  17141. },
  17142. "data": {
  17143. "type": "object",
  17144. "properties": {
  17145. "timestamp": {
  17146. "type": "number"
  17147. },
  17148. "sessionID": {
  17149. "type": "string",
  17150. "pattern": "^ses"
  17151. },
  17152. "reasoningID": {
  17153. "type": "string"
  17154. },
  17155. "text": {
  17156. "type": "string"
  17157. }
  17158. },
  17159. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  17160. "additionalProperties": false
  17161. }
  17162. },
  17163. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17164. "additionalProperties": false
  17165. },
  17166. "SyncEventSessionNextToolInputStarted": {
  17167. "type": "object",
  17168. "properties": {
  17169. "type": {
  17170. "type": "string",
  17171. "enum": ["sync"]
  17172. },
  17173. "name": {
  17174. "type": "string",
  17175. "enum": ["session.next.tool.input.started.1"]
  17176. },
  17177. "id": {
  17178. "type": "string"
  17179. },
  17180. "seq": {
  17181. "type": "number"
  17182. },
  17183. "aggregateID": {
  17184. "type": "string",
  17185. "enum": ["sessionID"]
  17186. },
  17187. "data": {
  17188. "type": "object",
  17189. "properties": {
  17190. "timestamp": {
  17191. "type": "number"
  17192. },
  17193. "sessionID": {
  17194. "type": "string",
  17195. "pattern": "^ses"
  17196. },
  17197. "callID": {
  17198. "type": "string"
  17199. },
  17200. "name": {
  17201. "type": "string"
  17202. }
  17203. },
  17204. "required": ["timestamp", "sessionID", "callID", "name"],
  17205. "additionalProperties": false
  17206. }
  17207. },
  17208. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17209. "additionalProperties": false
  17210. },
  17211. "SyncEventSessionNextToolInputDelta": {
  17212. "type": "object",
  17213. "properties": {
  17214. "type": {
  17215. "type": "string",
  17216. "enum": ["sync"]
  17217. },
  17218. "name": {
  17219. "type": "string",
  17220. "enum": ["session.next.tool.input.delta.1"]
  17221. },
  17222. "id": {
  17223. "type": "string"
  17224. },
  17225. "seq": {
  17226. "type": "number"
  17227. },
  17228. "aggregateID": {
  17229. "type": "string",
  17230. "enum": ["sessionID"]
  17231. },
  17232. "data": {
  17233. "type": "object",
  17234. "properties": {
  17235. "timestamp": {
  17236. "type": "number"
  17237. },
  17238. "sessionID": {
  17239. "type": "string",
  17240. "pattern": "^ses"
  17241. },
  17242. "callID": {
  17243. "type": "string"
  17244. },
  17245. "delta": {
  17246. "type": "string"
  17247. }
  17248. },
  17249. "required": ["timestamp", "sessionID", "callID", "delta"],
  17250. "additionalProperties": false
  17251. }
  17252. },
  17253. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17254. "additionalProperties": false
  17255. },
  17256. "SyncEventSessionNextToolInputEnded": {
  17257. "type": "object",
  17258. "properties": {
  17259. "type": {
  17260. "type": "string",
  17261. "enum": ["sync"]
  17262. },
  17263. "name": {
  17264. "type": "string",
  17265. "enum": ["session.next.tool.input.ended.1"]
  17266. },
  17267. "id": {
  17268. "type": "string"
  17269. },
  17270. "seq": {
  17271. "type": "number"
  17272. },
  17273. "aggregateID": {
  17274. "type": "string",
  17275. "enum": ["sessionID"]
  17276. },
  17277. "data": {
  17278. "type": "object",
  17279. "properties": {
  17280. "timestamp": {
  17281. "type": "number"
  17282. },
  17283. "sessionID": {
  17284. "type": "string",
  17285. "pattern": "^ses"
  17286. },
  17287. "callID": {
  17288. "type": "string"
  17289. },
  17290. "text": {
  17291. "type": "string"
  17292. }
  17293. },
  17294. "required": ["timestamp", "sessionID", "callID", "text"],
  17295. "additionalProperties": false
  17296. }
  17297. },
  17298. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17299. "additionalProperties": false
  17300. },
  17301. "SyncEventSessionNextToolCalled": {
  17302. "type": "object",
  17303. "properties": {
  17304. "type": {
  17305. "type": "string",
  17306. "enum": ["sync"]
  17307. },
  17308. "name": {
  17309. "type": "string",
  17310. "enum": ["session.next.tool.called.1"]
  17311. },
  17312. "id": {
  17313. "type": "string"
  17314. },
  17315. "seq": {
  17316. "type": "number"
  17317. },
  17318. "aggregateID": {
  17319. "type": "string",
  17320. "enum": ["sessionID"]
  17321. },
  17322. "data": {
  17323. "type": "object",
  17324. "properties": {
  17325. "timestamp": {
  17326. "type": "number"
  17327. },
  17328. "sessionID": {
  17329. "type": "string",
  17330. "pattern": "^ses"
  17331. },
  17332. "callID": {
  17333. "type": "string"
  17334. },
  17335. "tool": {
  17336. "type": "string"
  17337. },
  17338. "input": {
  17339. "type": "object"
  17340. },
  17341. "provider": {
  17342. "type": "object",
  17343. "properties": {
  17344. "executed": {
  17345. "type": "boolean"
  17346. },
  17347. "metadata": {
  17348. "type": "object"
  17349. }
  17350. },
  17351. "required": ["executed"],
  17352. "additionalProperties": false
  17353. }
  17354. },
  17355. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  17356. "additionalProperties": false
  17357. }
  17358. },
  17359. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17360. "additionalProperties": false
  17361. },
  17362. "SyncEventSessionNextToolProgress": {
  17363. "type": "object",
  17364. "properties": {
  17365. "type": {
  17366. "type": "string",
  17367. "enum": ["sync"]
  17368. },
  17369. "name": {
  17370. "type": "string",
  17371. "enum": ["session.next.tool.progress.1"]
  17372. },
  17373. "id": {
  17374. "type": "string"
  17375. },
  17376. "seq": {
  17377. "type": "number"
  17378. },
  17379. "aggregateID": {
  17380. "type": "string",
  17381. "enum": ["sessionID"]
  17382. },
  17383. "data": {
  17384. "type": "object",
  17385. "properties": {
  17386. "timestamp": {
  17387. "type": "number"
  17388. },
  17389. "sessionID": {
  17390. "type": "string",
  17391. "pattern": "^ses"
  17392. },
  17393. "callID": {
  17394. "type": "string"
  17395. },
  17396. "structured": {
  17397. "type": "object"
  17398. },
  17399. "content": {
  17400. "type": "array",
  17401. "items": {
  17402. "anyOf": [
  17403. {
  17404. "$ref": "#/components/schemas/ToolTextContent"
  17405. },
  17406. {
  17407. "$ref": "#/components/schemas/ToolFileContent"
  17408. }
  17409. ]
  17410. }
  17411. }
  17412. },
  17413. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  17414. "additionalProperties": false
  17415. }
  17416. },
  17417. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17418. "additionalProperties": false
  17419. },
  17420. "SyncEventSessionNextToolSuccess": {
  17421. "type": "object",
  17422. "properties": {
  17423. "type": {
  17424. "type": "string",
  17425. "enum": ["sync"]
  17426. },
  17427. "name": {
  17428. "type": "string",
  17429. "enum": ["session.next.tool.success.1"]
  17430. },
  17431. "id": {
  17432. "type": "string"
  17433. },
  17434. "seq": {
  17435. "type": "number"
  17436. },
  17437. "aggregateID": {
  17438. "type": "string",
  17439. "enum": ["sessionID"]
  17440. },
  17441. "data": {
  17442. "type": "object",
  17443. "properties": {
  17444. "timestamp": {
  17445. "type": "number"
  17446. },
  17447. "sessionID": {
  17448. "type": "string",
  17449. "pattern": "^ses"
  17450. },
  17451. "callID": {
  17452. "type": "string"
  17453. },
  17454. "structured": {
  17455. "type": "object"
  17456. },
  17457. "content": {
  17458. "type": "array",
  17459. "items": {
  17460. "anyOf": [
  17461. {
  17462. "$ref": "#/components/schemas/ToolTextContent"
  17463. },
  17464. {
  17465. "$ref": "#/components/schemas/ToolFileContent"
  17466. }
  17467. ]
  17468. }
  17469. },
  17470. "provider": {
  17471. "type": "object",
  17472. "properties": {
  17473. "executed": {
  17474. "type": "boolean"
  17475. },
  17476. "metadata": {
  17477. "type": "object"
  17478. }
  17479. },
  17480. "required": ["executed"],
  17481. "additionalProperties": false
  17482. }
  17483. },
  17484. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  17485. "additionalProperties": false
  17486. }
  17487. },
  17488. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17489. "additionalProperties": false
  17490. },
  17491. "SyncEventSessionNextToolFailed": {
  17492. "type": "object",
  17493. "properties": {
  17494. "type": {
  17495. "type": "string",
  17496. "enum": ["sync"]
  17497. },
  17498. "name": {
  17499. "type": "string",
  17500. "enum": ["session.next.tool.failed.1"]
  17501. },
  17502. "id": {
  17503. "type": "string"
  17504. },
  17505. "seq": {
  17506. "type": "number"
  17507. },
  17508. "aggregateID": {
  17509. "type": "string",
  17510. "enum": ["sessionID"]
  17511. },
  17512. "data": {
  17513. "type": "object",
  17514. "properties": {
  17515. "timestamp": {
  17516. "type": "number"
  17517. },
  17518. "sessionID": {
  17519. "type": "string",
  17520. "pattern": "^ses"
  17521. },
  17522. "callID": {
  17523. "type": "string"
  17524. },
  17525. "error": {
  17526. "$ref": "#/components/schemas/SessionErrorUnknown"
  17527. },
  17528. "provider": {
  17529. "type": "object",
  17530. "properties": {
  17531. "executed": {
  17532. "type": "boolean"
  17533. },
  17534. "metadata": {
  17535. "type": "object"
  17536. }
  17537. },
  17538. "required": ["executed"],
  17539. "additionalProperties": false
  17540. }
  17541. },
  17542. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  17543. "additionalProperties": false
  17544. }
  17545. },
  17546. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17547. "additionalProperties": false
  17548. },
  17549. "SyncEventSessionNextRetried": {
  17550. "type": "object",
  17551. "properties": {
  17552. "type": {
  17553. "type": "string",
  17554. "enum": ["sync"]
  17555. },
  17556. "name": {
  17557. "type": "string",
  17558. "enum": ["session.next.retried.1"]
  17559. },
  17560. "id": {
  17561. "type": "string"
  17562. },
  17563. "seq": {
  17564. "type": "number"
  17565. },
  17566. "aggregateID": {
  17567. "type": "string",
  17568. "enum": ["sessionID"]
  17569. },
  17570. "data": {
  17571. "type": "object",
  17572. "properties": {
  17573. "timestamp": {
  17574. "type": "number"
  17575. },
  17576. "sessionID": {
  17577. "type": "string",
  17578. "pattern": "^ses"
  17579. },
  17580. "attempt": {
  17581. "type": "number"
  17582. },
  17583. "error": {
  17584. "$ref": "#/components/schemas/SessionNextRetry_error"
  17585. }
  17586. },
  17587. "required": ["timestamp", "sessionID", "attempt", "error"],
  17588. "additionalProperties": false
  17589. }
  17590. },
  17591. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17592. "additionalProperties": false
  17593. },
  17594. "SyncEventSessionNextCompactionStarted": {
  17595. "type": "object",
  17596. "properties": {
  17597. "type": {
  17598. "type": "string",
  17599. "enum": ["sync"]
  17600. },
  17601. "name": {
  17602. "type": "string",
  17603. "enum": ["session.next.compaction.started.1"]
  17604. },
  17605. "id": {
  17606. "type": "string"
  17607. },
  17608. "seq": {
  17609. "type": "number"
  17610. },
  17611. "aggregateID": {
  17612. "type": "string",
  17613. "enum": ["sessionID"]
  17614. },
  17615. "data": {
  17616. "type": "object",
  17617. "properties": {
  17618. "timestamp": {
  17619. "type": "number"
  17620. },
  17621. "sessionID": {
  17622. "type": "string",
  17623. "pattern": "^ses"
  17624. },
  17625. "reason": {
  17626. "type": "string",
  17627. "enum": ["auto", "manual"]
  17628. }
  17629. },
  17630. "required": ["timestamp", "sessionID", "reason"],
  17631. "additionalProperties": false
  17632. }
  17633. },
  17634. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17635. "additionalProperties": false
  17636. },
  17637. "SyncEventSessionNextCompactionDelta": {
  17638. "type": "object",
  17639. "properties": {
  17640. "type": {
  17641. "type": "string",
  17642. "enum": ["sync"]
  17643. },
  17644. "name": {
  17645. "type": "string",
  17646. "enum": ["session.next.compaction.delta.1"]
  17647. },
  17648. "id": {
  17649. "type": "string"
  17650. },
  17651. "seq": {
  17652. "type": "number"
  17653. },
  17654. "aggregateID": {
  17655. "type": "string",
  17656. "enum": ["sessionID"]
  17657. },
  17658. "data": {
  17659. "type": "object",
  17660. "properties": {
  17661. "timestamp": {
  17662. "type": "number"
  17663. },
  17664. "sessionID": {
  17665. "type": "string",
  17666. "pattern": "^ses"
  17667. },
  17668. "text": {
  17669. "type": "string"
  17670. }
  17671. },
  17672. "required": ["timestamp", "sessionID", "text"],
  17673. "additionalProperties": false
  17674. }
  17675. },
  17676. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17677. "additionalProperties": false
  17678. },
  17679. "SyncEventSessionNextCompactionEnded": {
  17680. "type": "object",
  17681. "properties": {
  17682. "type": {
  17683. "type": "string",
  17684. "enum": ["sync"]
  17685. },
  17686. "name": {
  17687. "type": "string",
  17688. "enum": ["session.next.compaction.ended.1"]
  17689. },
  17690. "id": {
  17691. "type": "string"
  17692. },
  17693. "seq": {
  17694. "type": "number"
  17695. },
  17696. "aggregateID": {
  17697. "type": "string",
  17698. "enum": ["sessionID"]
  17699. },
  17700. "data": {
  17701. "type": "object",
  17702. "properties": {
  17703. "timestamp": {
  17704. "type": "number"
  17705. },
  17706. "sessionID": {
  17707. "type": "string",
  17708. "pattern": "^ses"
  17709. },
  17710. "text": {
  17711. "type": "string"
  17712. },
  17713. "include": {
  17714. "type": "string"
  17715. }
  17716. },
  17717. "required": ["timestamp", "sessionID", "text"],
  17718. "additionalProperties": false
  17719. }
  17720. },
  17721. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17722. "additionalProperties": false
  17723. },
  17724. "EventServerConnected": {
  17725. "type": "object",
  17726. "properties": {
  17727. "id": {
  17728. "type": "string"
  17729. },
  17730. "type": {
  17731. "type": "string",
  17732. "enum": ["server.connected"]
  17733. },
  17734. "properties": {
  17735. "type": "object",
  17736. "properties": {}
  17737. }
  17738. },
  17739. "required": ["id", "type", "properties"],
  17740. "additionalProperties": false
  17741. },
  17742. "EventGlobalDisposed": {
  17743. "type": "object",
  17744. "properties": {
  17745. "id": {
  17746. "type": "string"
  17747. },
  17748. "type": {
  17749. "type": "string",
  17750. "enum": ["global.disposed"]
  17751. },
  17752. "properties": {
  17753. "type": "object",
  17754. "properties": {}
  17755. }
  17756. },
  17757. "required": ["id", "type", "properties"],
  17758. "additionalProperties": false
  17759. },
  17760. "EventServerInstanceDisposed": {
  17761. "type": "object",
  17762. "properties": {
  17763. "id": {
  17764. "type": "string"
  17765. },
  17766. "type": {
  17767. "type": "string",
  17768. "enum": ["server.instance.disposed"]
  17769. },
  17770. "properties": {
  17771. "type": "object",
  17772. "properties": {
  17773. "directory": {
  17774. "type": "string"
  17775. }
  17776. },
  17777. "required": ["directory"],
  17778. "additionalProperties": false
  17779. }
  17780. },
  17781. "required": ["id", "type", "properties"],
  17782. "additionalProperties": false
  17783. },
  17784. "EventFileEdited": {
  17785. "type": "object",
  17786. "properties": {
  17787. "id": {
  17788. "type": "string"
  17789. },
  17790. "type": {
  17791. "type": "string",
  17792. "enum": ["file.edited"]
  17793. },
  17794. "properties": {
  17795. "type": "object",
  17796. "properties": {
  17797. "file": {
  17798. "type": "string"
  17799. }
  17800. },
  17801. "required": ["file"],
  17802. "additionalProperties": false
  17803. }
  17804. },
  17805. "required": ["id", "type", "properties"],
  17806. "additionalProperties": false
  17807. },
  17808. "EventFileWatcherUpdated": {
  17809. "type": "object",
  17810. "properties": {
  17811. "id": {
  17812. "type": "string"
  17813. },
  17814. "type": {
  17815. "type": "string",
  17816. "enum": ["file.watcher.updated"]
  17817. },
  17818. "properties": {
  17819. "type": "object",
  17820. "properties": {
  17821. "file": {
  17822. "type": "string"
  17823. },
  17824. "event": {
  17825. "type": "string",
  17826. "enum": ["add", "change", "unlink"]
  17827. }
  17828. },
  17829. "required": ["file", "event"],
  17830. "additionalProperties": false
  17831. }
  17832. },
  17833. "required": ["id", "type", "properties"],
  17834. "additionalProperties": false
  17835. },
  17836. "EventLspClientDiagnostics": {
  17837. "type": "object",
  17838. "properties": {
  17839. "id": {
  17840. "type": "string"
  17841. },
  17842. "type": {
  17843. "type": "string",
  17844. "enum": ["lsp.client.diagnostics"]
  17845. },
  17846. "properties": {
  17847. "type": "object",
  17848. "properties": {
  17849. "serverID": {
  17850. "type": "string"
  17851. },
  17852. "path": {
  17853. "type": "string"
  17854. }
  17855. },
  17856. "required": ["serverID", "path"],
  17857. "additionalProperties": false
  17858. }
  17859. },
  17860. "required": ["id", "type", "properties"],
  17861. "additionalProperties": false
  17862. },
  17863. "EventLspUpdated": {
  17864. "type": "object",
  17865. "properties": {
  17866. "id": {
  17867. "type": "string"
  17868. },
  17869. "type": {
  17870. "type": "string",
  17871. "enum": ["lsp.updated"]
  17872. },
  17873. "properties": {
  17874. "type": "object",
  17875. "properties": {}
  17876. }
  17877. },
  17878. "required": ["id", "type", "properties"],
  17879. "additionalProperties": false
  17880. },
  17881. "EventMessagePartDelta": {
  17882. "type": "object",
  17883. "properties": {
  17884. "id": {
  17885. "type": "string"
  17886. },
  17887. "type": {
  17888. "type": "string",
  17889. "enum": ["message.part.delta"]
  17890. },
  17891. "properties": {
  17892. "type": "object",
  17893. "properties": {
  17894. "sessionID": {
  17895. "type": "string",
  17896. "pattern": "^ses"
  17897. },
  17898. "messageID": {
  17899. "type": "string",
  17900. "pattern": "^msg"
  17901. },
  17902. "partID": {
  17903. "type": "string",
  17904. "pattern": "^prt"
  17905. },
  17906. "field": {
  17907. "type": "string"
  17908. },
  17909. "delta": {
  17910. "type": "string"
  17911. }
  17912. },
  17913. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  17914. "additionalProperties": false
  17915. }
  17916. },
  17917. "required": ["id", "type", "properties"],
  17918. "additionalProperties": false
  17919. },
  17920. "EventPermissionAsked": {
  17921. "type": "object",
  17922. "properties": {
  17923. "id": {
  17924. "type": "string"
  17925. },
  17926. "type": {
  17927. "type": "string",
  17928. "enum": ["permission.asked"]
  17929. },
  17930. "properties": {
  17931. "$ref": "#/components/schemas/PermissionRequest"
  17932. }
  17933. },
  17934. "required": ["id", "type", "properties"],
  17935. "additionalProperties": false
  17936. },
  17937. "EventPermissionReplied": {
  17938. "type": "object",
  17939. "properties": {
  17940. "id": {
  17941. "type": "string"
  17942. },
  17943. "type": {
  17944. "type": "string",
  17945. "enum": ["permission.replied"]
  17946. },
  17947. "properties": {
  17948. "type": "object",
  17949. "properties": {
  17950. "sessionID": {
  17951. "type": "string",
  17952. "pattern": "^ses"
  17953. },
  17954. "requestID": {
  17955. "type": "string",
  17956. "pattern": "^per"
  17957. },
  17958. "reply": {
  17959. "type": "string",
  17960. "enum": ["once", "always", "reject"]
  17961. }
  17962. },
  17963. "required": ["sessionID", "requestID", "reply"],
  17964. "additionalProperties": false
  17965. }
  17966. },
  17967. "required": ["id", "type", "properties"],
  17968. "additionalProperties": false
  17969. },
  17970. "EventSessionDiff": {
  17971. "type": "object",
  17972. "properties": {
  17973. "id": {
  17974. "type": "string"
  17975. },
  17976. "type": {
  17977. "type": "string",
  17978. "enum": ["session.diff"]
  17979. },
  17980. "properties": {
  17981. "type": "object",
  17982. "properties": {
  17983. "sessionID": {
  17984. "type": "string",
  17985. "pattern": "^ses"
  17986. },
  17987. "diff": {
  17988. "type": "array",
  17989. "items": {
  17990. "$ref": "#/components/schemas/SnapshotFileDiff"
  17991. }
  17992. }
  17993. },
  17994. "required": ["sessionID", "diff"],
  17995. "additionalProperties": false
  17996. }
  17997. },
  17998. "required": ["id", "type", "properties"],
  17999. "additionalProperties": false
  18000. },
  18001. "EventSessionError": {
  18002. "type": "object",
  18003. "properties": {
  18004. "id": {
  18005. "type": "string"
  18006. },
  18007. "type": {
  18008. "type": "string",
  18009. "enum": ["session.error"]
  18010. },
  18011. "properties": {
  18012. "type": "object",
  18013. "properties": {
  18014. "sessionID": {
  18015. "type": "string",
  18016. "pattern": "^ses"
  18017. },
  18018. "error": {
  18019. "anyOf": [
  18020. {
  18021. "$ref": "#/components/schemas/ProviderAuthError"
  18022. },
  18023. {
  18024. "$ref": "#/components/schemas/UnknownError"
  18025. },
  18026. {
  18027. "$ref": "#/components/schemas/MessageOutputLengthError"
  18028. },
  18029. {
  18030. "$ref": "#/components/schemas/MessageAbortedError"
  18031. },
  18032. {
  18033. "$ref": "#/components/schemas/StructuredOutputError"
  18034. },
  18035. {
  18036. "$ref": "#/components/schemas/ContextOverflowError"
  18037. },
  18038. {
  18039. "$ref": "#/components/schemas/APIError"
  18040. }
  18041. ]
  18042. }
  18043. },
  18044. "additionalProperties": false
  18045. }
  18046. },
  18047. "required": ["id", "type", "properties"],
  18048. "additionalProperties": false
  18049. },
  18050. "EventQuestionAsked": {
  18051. "type": "object",
  18052. "properties": {
  18053. "id": {
  18054. "type": "string"
  18055. },
  18056. "type": {
  18057. "type": "string",
  18058. "enum": ["question.asked"]
  18059. },
  18060. "properties": {
  18061. "$ref": "#/components/schemas/QuestionRequest"
  18062. }
  18063. },
  18064. "required": ["id", "type", "properties"],
  18065. "additionalProperties": false
  18066. },
  18067. "EventQuestionReplied": {
  18068. "type": "object",
  18069. "properties": {
  18070. "id": {
  18071. "type": "string"
  18072. },
  18073. "type": {
  18074. "type": "string",
  18075. "enum": ["question.replied"]
  18076. },
  18077. "properties": {
  18078. "$ref": "#/components/schemas/QuestionReplied"
  18079. }
  18080. },
  18081. "required": ["id", "type", "properties"],
  18082. "additionalProperties": false
  18083. },
  18084. "EventQuestionRejected": {
  18085. "type": "object",
  18086. "properties": {
  18087. "id": {
  18088. "type": "string"
  18089. },
  18090. "type": {
  18091. "type": "string",
  18092. "enum": ["question.rejected"]
  18093. },
  18094. "properties": {
  18095. "$ref": "#/components/schemas/QuestionRejected"
  18096. }
  18097. },
  18098. "required": ["id", "type", "properties"],
  18099. "additionalProperties": false
  18100. },
  18101. "EventTodoUpdated": {
  18102. "type": "object",
  18103. "properties": {
  18104. "id": {
  18105. "type": "string"
  18106. },
  18107. "type": {
  18108. "type": "string",
  18109. "enum": ["todo.updated"]
  18110. },
  18111. "properties": {
  18112. "type": "object",
  18113. "properties": {
  18114. "sessionID": {
  18115. "type": "string",
  18116. "pattern": "^ses"
  18117. },
  18118. "todos": {
  18119. "type": "array",
  18120. "items": {
  18121. "$ref": "#/components/schemas/Todo"
  18122. }
  18123. }
  18124. },
  18125. "required": ["sessionID", "todos"],
  18126. "additionalProperties": false
  18127. }
  18128. },
  18129. "required": ["id", "type", "properties"],
  18130. "additionalProperties": false
  18131. },
  18132. "EventSessionStatus": {
  18133. "type": "object",
  18134. "properties": {
  18135. "id": {
  18136. "type": "string"
  18137. },
  18138. "type": {
  18139. "type": "string",
  18140. "enum": ["session.status"]
  18141. },
  18142. "properties": {
  18143. "type": "object",
  18144. "properties": {
  18145. "sessionID": {
  18146. "type": "string",
  18147. "pattern": "^ses"
  18148. },
  18149. "status": {
  18150. "$ref": "#/components/schemas/SessionStatus"
  18151. }
  18152. },
  18153. "required": ["sessionID", "status"],
  18154. "additionalProperties": false
  18155. }
  18156. },
  18157. "required": ["id", "type", "properties"],
  18158. "additionalProperties": false
  18159. },
  18160. "EventSessionIdle": {
  18161. "type": "object",
  18162. "properties": {
  18163. "id": {
  18164. "type": "string"
  18165. },
  18166. "type": {
  18167. "type": "string",
  18168. "enum": ["session.idle"]
  18169. },
  18170. "properties": {
  18171. "type": "object",
  18172. "properties": {
  18173. "sessionID": {
  18174. "type": "string",
  18175. "pattern": "^ses"
  18176. }
  18177. },
  18178. "required": ["sessionID"],
  18179. "additionalProperties": false
  18180. }
  18181. },
  18182. "required": ["id", "type", "properties"],
  18183. "additionalProperties": false
  18184. },
  18185. "EventMcpToolsChanged": {
  18186. "type": "object",
  18187. "properties": {
  18188. "id": {
  18189. "type": "string"
  18190. },
  18191. "type": {
  18192. "type": "string",
  18193. "enum": ["mcp.tools.changed"]
  18194. },
  18195. "properties": {
  18196. "type": "object",
  18197. "properties": {
  18198. "server": {
  18199. "type": "string"
  18200. }
  18201. },
  18202. "required": ["server"],
  18203. "additionalProperties": false
  18204. }
  18205. },
  18206. "required": ["id", "type", "properties"],
  18207. "additionalProperties": false
  18208. },
  18209. "EventMcpBrowserOpenFailed": {
  18210. "type": "object",
  18211. "properties": {
  18212. "id": {
  18213. "type": "string"
  18214. },
  18215. "type": {
  18216. "type": "string",
  18217. "enum": ["mcp.browser.open.failed"]
  18218. },
  18219. "properties": {
  18220. "type": "object",
  18221. "properties": {
  18222. "mcpName": {
  18223. "type": "string"
  18224. },
  18225. "url": {
  18226. "type": "string"
  18227. }
  18228. },
  18229. "required": ["mcpName", "url"],
  18230. "additionalProperties": false
  18231. }
  18232. },
  18233. "required": ["id", "type", "properties"],
  18234. "additionalProperties": false
  18235. },
  18236. "EventCommandExecuted": {
  18237. "type": "object",
  18238. "properties": {
  18239. "id": {
  18240. "type": "string"
  18241. },
  18242. "type": {
  18243. "type": "string",
  18244. "enum": ["command.executed"]
  18245. },
  18246. "properties": {
  18247. "type": "object",
  18248. "properties": {
  18249. "name": {
  18250. "type": "string"
  18251. },
  18252. "sessionID": {
  18253. "type": "string",
  18254. "pattern": "^ses"
  18255. },
  18256. "arguments": {
  18257. "type": "string"
  18258. },
  18259. "messageID": {
  18260. "type": "string",
  18261. "pattern": "^msg"
  18262. }
  18263. },
  18264. "required": ["name", "sessionID", "arguments", "messageID"],
  18265. "additionalProperties": false
  18266. }
  18267. },
  18268. "required": ["id", "type", "properties"],
  18269. "additionalProperties": false
  18270. },
  18271. "EventProjectUpdated": {
  18272. "type": "object",
  18273. "properties": {
  18274. "id": {
  18275. "type": "string"
  18276. },
  18277. "type": {
  18278. "type": "string",
  18279. "enum": ["project.updated"]
  18280. },
  18281. "properties": {
  18282. "$ref": "#/components/schemas/Project"
  18283. }
  18284. },
  18285. "required": ["id", "type", "properties"],
  18286. "additionalProperties": false
  18287. },
  18288. "EventSessionCompacted": {
  18289. "type": "object",
  18290. "properties": {
  18291. "id": {
  18292. "type": "string"
  18293. },
  18294. "type": {
  18295. "type": "string",
  18296. "enum": ["session.compacted"]
  18297. },
  18298. "properties": {
  18299. "type": "object",
  18300. "properties": {
  18301. "sessionID": {
  18302. "type": "string",
  18303. "pattern": "^ses"
  18304. }
  18305. },
  18306. "required": ["sessionID"],
  18307. "additionalProperties": false
  18308. }
  18309. },
  18310. "required": ["id", "type", "properties"],
  18311. "additionalProperties": false
  18312. },
  18313. "EventVcsBranchUpdated": {
  18314. "type": "object",
  18315. "properties": {
  18316. "id": {
  18317. "type": "string"
  18318. },
  18319. "type": {
  18320. "type": "string",
  18321. "enum": ["vcs.branch.updated"]
  18322. },
  18323. "properties": {
  18324. "type": "object",
  18325. "properties": {
  18326. "branch": {
  18327. "type": "string"
  18328. }
  18329. },
  18330. "additionalProperties": false
  18331. }
  18332. },
  18333. "required": ["id", "type", "properties"],
  18334. "additionalProperties": false
  18335. },
  18336. "EventWorkspaceReady": {
  18337. "type": "object",
  18338. "properties": {
  18339. "id": {
  18340. "type": "string"
  18341. },
  18342. "type": {
  18343. "type": "string",
  18344. "enum": ["workspace.ready"]
  18345. },
  18346. "properties": {
  18347. "type": "object",
  18348. "properties": {
  18349. "name": {
  18350. "type": "string"
  18351. }
  18352. },
  18353. "required": ["name"],
  18354. "additionalProperties": false
  18355. }
  18356. },
  18357. "required": ["id", "type", "properties"],
  18358. "additionalProperties": false
  18359. },
  18360. "EventWorkspaceFailed": {
  18361. "type": "object",
  18362. "properties": {
  18363. "id": {
  18364. "type": "string"
  18365. },
  18366. "type": {
  18367. "type": "string",
  18368. "enum": ["workspace.failed"]
  18369. },
  18370. "properties": {
  18371. "type": "object",
  18372. "properties": {
  18373. "message": {
  18374. "type": "string"
  18375. }
  18376. },
  18377. "required": ["message"],
  18378. "additionalProperties": false
  18379. }
  18380. },
  18381. "required": ["id", "type", "properties"],
  18382. "additionalProperties": false
  18383. },
  18384. "EventWorkspaceStatus": {
  18385. "type": "object",
  18386. "properties": {
  18387. "id": {
  18388. "type": "string"
  18389. },
  18390. "type": {
  18391. "type": "string",
  18392. "enum": ["workspace.status"]
  18393. },
  18394. "properties": {
  18395. "type": "object",
  18396. "properties": {
  18397. "workspaceID": {
  18398. "type": "string",
  18399. "pattern": "^wrk"
  18400. },
  18401. "status": {
  18402. "type": "string",
  18403. "enum": ["connected", "connecting", "disconnected", "error"]
  18404. }
  18405. },
  18406. "required": ["workspaceID", "status"],
  18407. "additionalProperties": false
  18408. }
  18409. },
  18410. "required": ["id", "type", "properties"],
  18411. "additionalProperties": false
  18412. },
  18413. "EventWorktreeReady": {
  18414. "type": "object",
  18415. "properties": {
  18416. "id": {
  18417. "type": "string"
  18418. },
  18419. "type": {
  18420. "type": "string",
  18421. "enum": ["worktree.ready"]
  18422. },
  18423. "properties": {
  18424. "type": "object",
  18425. "properties": {
  18426. "name": {
  18427. "type": "string"
  18428. },
  18429. "branch": {
  18430. "type": "string"
  18431. }
  18432. },
  18433. "required": ["name"],
  18434. "additionalProperties": false
  18435. }
  18436. },
  18437. "required": ["id", "type", "properties"],
  18438. "additionalProperties": false
  18439. },
  18440. "EventWorktreeFailed": {
  18441. "type": "object",
  18442. "properties": {
  18443. "id": {
  18444. "type": "string"
  18445. },
  18446. "type": {
  18447. "type": "string",
  18448. "enum": ["worktree.failed"]
  18449. },
  18450. "properties": {
  18451. "type": "object",
  18452. "properties": {
  18453. "message": {
  18454. "type": "string"
  18455. }
  18456. },
  18457. "required": ["message"],
  18458. "additionalProperties": false
  18459. }
  18460. },
  18461. "required": ["id", "type", "properties"],
  18462. "additionalProperties": false
  18463. },
  18464. "EventPtyCreated": {
  18465. "type": "object",
  18466. "properties": {
  18467. "id": {
  18468. "type": "string"
  18469. },
  18470. "type": {
  18471. "type": "string",
  18472. "enum": ["pty.created"]
  18473. },
  18474. "properties": {
  18475. "type": "object",
  18476. "properties": {
  18477. "info": {
  18478. "$ref": "#/components/schemas/Pty"
  18479. }
  18480. },
  18481. "required": ["info"],
  18482. "additionalProperties": false
  18483. }
  18484. },
  18485. "required": ["id", "type", "properties"],
  18486. "additionalProperties": false
  18487. },
  18488. "EventPtyUpdated": {
  18489. "type": "object",
  18490. "properties": {
  18491. "id": {
  18492. "type": "string"
  18493. },
  18494. "type": {
  18495. "type": "string",
  18496. "enum": ["pty.updated"]
  18497. },
  18498. "properties": {
  18499. "type": "object",
  18500. "properties": {
  18501. "info": {
  18502. "$ref": "#/components/schemas/Pty"
  18503. }
  18504. },
  18505. "required": ["info"],
  18506. "additionalProperties": false
  18507. }
  18508. },
  18509. "required": ["id", "type", "properties"],
  18510. "additionalProperties": false
  18511. },
  18512. "EventPtyExited": {
  18513. "type": "object",
  18514. "properties": {
  18515. "id": {
  18516. "type": "string"
  18517. },
  18518. "type": {
  18519. "type": "string",
  18520. "enum": ["pty.exited"]
  18521. },
  18522. "properties": {
  18523. "type": "object",
  18524. "properties": {
  18525. "id": {
  18526. "type": "string",
  18527. "pattern": "^pty"
  18528. },
  18529. "exitCode": {
  18530. "type": "integer",
  18531. "minimum": 0
  18532. }
  18533. },
  18534. "required": ["id", "exitCode"],
  18535. "additionalProperties": false
  18536. }
  18537. },
  18538. "required": ["id", "type", "properties"],
  18539. "additionalProperties": false
  18540. },
  18541. "EventPtyDeleted": {
  18542. "type": "object",
  18543. "properties": {
  18544. "id": {
  18545. "type": "string"
  18546. },
  18547. "type": {
  18548. "type": "string",
  18549. "enum": ["pty.deleted"]
  18550. },
  18551. "properties": {
  18552. "type": "object",
  18553. "properties": {
  18554. "id": {
  18555. "type": "string",
  18556. "pattern": "^pty"
  18557. }
  18558. },
  18559. "required": ["id"],
  18560. "additionalProperties": false
  18561. }
  18562. },
  18563. "required": ["id", "type", "properties"],
  18564. "additionalProperties": false
  18565. },
  18566. "EventInstallationUpdated": {
  18567. "type": "object",
  18568. "properties": {
  18569. "id": {
  18570. "type": "string"
  18571. },
  18572. "type": {
  18573. "type": "string",
  18574. "enum": ["installation.updated"]
  18575. },
  18576. "properties": {
  18577. "type": "object",
  18578. "properties": {
  18579. "version": {
  18580. "type": "string"
  18581. }
  18582. },
  18583. "required": ["version"],
  18584. "additionalProperties": false
  18585. }
  18586. },
  18587. "required": ["id", "type", "properties"],
  18588. "additionalProperties": false
  18589. },
  18590. "EventInstallationUpdate-available": {
  18591. "type": "object",
  18592. "properties": {
  18593. "id": {
  18594. "type": "string"
  18595. },
  18596. "type": {
  18597. "type": "string",
  18598. "enum": ["installation.update-available"]
  18599. },
  18600. "properties": {
  18601. "type": "object",
  18602. "properties": {
  18603. "version": {
  18604. "type": "string"
  18605. }
  18606. },
  18607. "required": ["version"],
  18608. "additionalProperties": false
  18609. }
  18610. },
  18611. "required": ["id", "type", "properties"],
  18612. "additionalProperties": false
  18613. },
  18614. "EventMessageUpdated": {
  18615. "type": "object",
  18616. "properties": {
  18617. "id": {
  18618. "type": "string"
  18619. },
  18620. "type": {
  18621. "type": "string",
  18622. "enum": ["message.updated"]
  18623. },
  18624. "properties": {
  18625. "type": "object",
  18626. "properties": {
  18627. "sessionID": {
  18628. "type": "string",
  18629. "pattern": "^ses"
  18630. },
  18631. "info": {
  18632. "$ref": "#/components/schemas/Message"
  18633. }
  18634. },
  18635. "required": ["sessionID", "info"],
  18636. "additionalProperties": false
  18637. }
  18638. },
  18639. "required": ["id", "type", "properties"],
  18640. "additionalProperties": false
  18641. },
  18642. "EventMessageRemoved": {
  18643. "type": "object",
  18644. "properties": {
  18645. "id": {
  18646. "type": "string"
  18647. },
  18648. "type": {
  18649. "type": "string",
  18650. "enum": ["message.removed"]
  18651. },
  18652. "properties": {
  18653. "type": "object",
  18654. "properties": {
  18655. "sessionID": {
  18656. "type": "string",
  18657. "pattern": "^ses"
  18658. },
  18659. "messageID": {
  18660. "type": "string",
  18661. "pattern": "^msg"
  18662. }
  18663. },
  18664. "required": ["sessionID", "messageID"],
  18665. "additionalProperties": false
  18666. }
  18667. },
  18668. "required": ["id", "type", "properties"],
  18669. "additionalProperties": false
  18670. },
  18671. "EventMessagePartUpdated": {
  18672. "type": "object",
  18673. "properties": {
  18674. "id": {
  18675. "type": "string"
  18676. },
  18677. "type": {
  18678. "type": "string",
  18679. "enum": ["message.part.updated"]
  18680. },
  18681. "properties": {
  18682. "type": "object",
  18683. "properties": {
  18684. "sessionID": {
  18685. "type": "string",
  18686. "pattern": "^ses"
  18687. },
  18688. "part": {
  18689. "$ref": "#/components/schemas/Part"
  18690. },
  18691. "time": {
  18692. "type": "integer",
  18693. "minimum": 0
  18694. }
  18695. },
  18696. "required": ["sessionID", "part", "time"],
  18697. "additionalProperties": false
  18698. }
  18699. },
  18700. "required": ["id", "type", "properties"],
  18701. "additionalProperties": false
  18702. },
  18703. "EventMessagePartRemoved": {
  18704. "type": "object",
  18705. "properties": {
  18706. "id": {
  18707. "type": "string"
  18708. },
  18709. "type": {
  18710. "type": "string",
  18711. "enum": ["message.part.removed"]
  18712. },
  18713. "properties": {
  18714. "type": "object",
  18715. "properties": {
  18716. "sessionID": {
  18717. "type": "string",
  18718. "pattern": "^ses"
  18719. },
  18720. "messageID": {
  18721. "type": "string",
  18722. "pattern": "^msg"
  18723. },
  18724. "partID": {
  18725. "type": "string",
  18726. "pattern": "^prt"
  18727. }
  18728. },
  18729. "required": ["sessionID", "messageID", "partID"],
  18730. "additionalProperties": false
  18731. }
  18732. },
  18733. "required": ["id", "type", "properties"],
  18734. "additionalProperties": false
  18735. },
  18736. "EventSessionCreated": {
  18737. "type": "object",
  18738. "properties": {
  18739. "id": {
  18740. "type": "string"
  18741. },
  18742. "type": {
  18743. "type": "string",
  18744. "enum": ["session.created"]
  18745. },
  18746. "properties": {
  18747. "type": "object",
  18748. "properties": {
  18749. "sessionID": {
  18750. "type": "string",
  18751. "pattern": "^ses"
  18752. },
  18753. "info": {
  18754. "$ref": "#/components/schemas/Session"
  18755. }
  18756. },
  18757. "required": ["sessionID", "info"],
  18758. "additionalProperties": false
  18759. }
  18760. },
  18761. "required": ["id", "type", "properties"],
  18762. "additionalProperties": false
  18763. },
  18764. "EventSessionUpdated": {
  18765. "type": "object",
  18766. "properties": {
  18767. "id": {
  18768. "type": "string"
  18769. },
  18770. "type": {
  18771. "type": "string",
  18772. "enum": ["session.updated"]
  18773. },
  18774. "properties": {
  18775. "type": "object",
  18776. "properties": {
  18777. "sessionID": {
  18778. "type": "string",
  18779. "pattern": "^ses"
  18780. },
  18781. "info": {
  18782. "$ref": "#/components/schemas/Session"
  18783. }
  18784. },
  18785. "required": ["sessionID", "info"],
  18786. "additionalProperties": false
  18787. }
  18788. },
  18789. "required": ["id", "type", "properties"],
  18790. "additionalProperties": false
  18791. },
  18792. "EventSessionDeleted": {
  18793. "type": "object",
  18794. "properties": {
  18795. "id": {
  18796. "type": "string"
  18797. },
  18798. "type": {
  18799. "type": "string",
  18800. "enum": ["session.deleted"]
  18801. },
  18802. "properties": {
  18803. "type": "object",
  18804. "properties": {
  18805. "sessionID": {
  18806. "type": "string",
  18807. "pattern": "^ses"
  18808. },
  18809. "info": {
  18810. "$ref": "#/components/schemas/Session"
  18811. }
  18812. },
  18813. "required": ["sessionID", "info"],
  18814. "additionalProperties": false
  18815. }
  18816. },
  18817. "required": ["id", "type", "properties"],
  18818. "additionalProperties": false
  18819. },
  18820. "EventSessionNextAgentSwitched": {
  18821. "type": "object",
  18822. "properties": {
  18823. "id": {
  18824. "type": "string"
  18825. },
  18826. "type": {
  18827. "type": "string",
  18828. "enum": ["session.next.agent.switched"]
  18829. },
  18830. "properties": {
  18831. "type": "object",
  18832. "properties": {
  18833. "timestamp": {
  18834. "type": "number"
  18835. },
  18836. "sessionID": {
  18837. "type": "string",
  18838. "pattern": "^ses"
  18839. },
  18840. "agent": {
  18841. "type": "string"
  18842. }
  18843. },
  18844. "required": ["timestamp", "sessionID", "agent"],
  18845. "additionalProperties": false
  18846. }
  18847. },
  18848. "required": ["id", "type", "properties"],
  18849. "additionalProperties": false
  18850. },
  18851. "EventSessionNextModelSwitched": {
  18852. "type": "object",
  18853. "properties": {
  18854. "id": {
  18855. "type": "string"
  18856. },
  18857. "type": {
  18858. "type": "string",
  18859. "enum": ["session.next.model.switched"]
  18860. },
  18861. "properties": {
  18862. "type": "object",
  18863. "properties": {
  18864. "timestamp": {
  18865. "type": "number"
  18866. },
  18867. "sessionID": {
  18868. "type": "string",
  18869. "pattern": "^ses"
  18870. },
  18871. "model": {
  18872. "type": "object",
  18873. "properties": {
  18874. "id": {
  18875. "type": "string"
  18876. },
  18877. "providerID": {
  18878. "type": "string"
  18879. },
  18880. "variant": {
  18881. "type": "string"
  18882. }
  18883. },
  18884. "required": ["id", "providerID", "variant"],
  18885. "additionalProperties": false
  18886. }
  18887. },
  18888. "required": ["timestamp", "sessionID", "model"],
  18889. "additionalProperties": false
  18890. }
  18891. },
  18892. "required": ["id", "type", "properties"],
  18893. "additionalProperties": false
  18894. },
  18895. "PromptSource": {
  18896. "type": "object",
  18897. "properties": {
  18898. "start": {
  18899. "type": "number"
  18900. },
  18901. "end": {
  18902. "type": "number"
  18903. },
  18904. "text": {
  18905. "type": "string"
  18906. }
  18907. },
  18908. "required": ["start", "end", "text"],
  18909. "additionalProperties": false
  18910. },
  18911. "PromptFileAttachment": {
  18912. "type": "object",
  18913. "properties": {
  18914. "uri": {
  18915. "type": "string"
  18916. },
  18917. "mime": {
  18918. "type": "string"
  18919. },
  18920. "name": {
  18921. "type": "string"
  18922. },
  18923. "description": {
  18924. "type": "string"
  18925. },
  18926. "source": {
  18927. "$ref": "#/components/schemas/PromptSource"
  18928. }
  18929. },
  18930. "required": ["uri", "mime"],
  18931. "additionalProperties": false
  18932. },
  18933. "PromptAgentAttachment": {
  18934. "type": "object",
  18935. "properties": {
  18936. "name": {
  18937. "type": "string"
  18938. },
  18939. "source": {
  18940. "$ref": "#/components/schemas/PromptSource"
  18941. }
  18942. },
  18943. "required": ["name"],
  18944. "additionalProperties": false
  18945. },
  18946. "PromptReferenceAttachment": {
  18947. "type": "object",
  18948. "properties": {
  18949. "name": {
  18950. "type": "string"
  18951. },
  18952. "kind": {
  18953. "type": "string",
  18954. "enum": ["local", "git", "invalid"]
  18955. },
  18956. "uri": {
  18957. "type": "string"
  18958. },
  18959. "repository": {
  18960. "type": "string"
  18961. },
  18962. "branch": {
  18963. "type": "string"
  18964. },
  18965. "target": {
  18966. "type": "string"
  18967. },
  18968. "targetUri": {
  18969. "type": "string"
  18970. },
  18971. "problem": {
  18972. "type": "string"
  18973. },
  18974. "source": {
  18975. "$ref": "#/components/schemas/PromptSource"
  18976. }
  18977. },
  18978. "required": ["name", "kind"],
  18979. "additionalProperties": false
  18980. },
  18981. "EventSessionNextPrompted": {
  18982. "type": "object",
  18983. "properties": {
  18984. "id": {
  18985. "type": "string"
  18986. },
  18987. "type": {
  18988. "type": "string",
  18989. "enum": ["session.next.prompted"]
  18990. },
  18991. "properties": {
  18992. "type": "object",
  18993. "properties": {
  18994. "timestamp": {
  18995. "type": "number"
  18996. },
  18997. "sessionID": {
  18998. "type": "string",
  18999. "pattern": "^ses"
  19000. },
  19001. "prompt": {
  19002. "$ref": "#/components/schemas/Prompt"
  19003. }
  19004. },
  19005. "required": ["timestamp", "sessionID", "prompt"],
  19006. "additionalProperties": false
  19007. }
  19008. },
  19009. "required": ["id", "type", "properties"],
  19010. "additionalProperties": false
  19011. },
  19012. "EventSessionNextSynthetic": {
  19013. "type": "object",
  19014. "properties": {
  19015. "id": {
  19016. "type": "string"
  19017. },
  19018. "type": {
  19019. "type": "string",
  19020. "enum": ["session.next.synthetic"]
  19021. },
  19022. "properties": {
  19023. "type": "object",
  19024. "properties": {
  19025. "timestamp": {
  19026. "type": "number"
  19027. },
  19028. "sessionID": {
  19029. "type": "string",
  19030. "pattern": "^ses"
  19031. },
  19032. "text": {
  19033. "type": "string"
  19034. }
  19035. },
  19036. "required": ["timestamp", "sessionID", "text"],
  19037. "additionalProperties": false
  19038. }
  19039. },
  19040. "required": ["id", "type", "properties"],
  19041. "additionalProperties": false
  19042. },
  19043. "EventSessionNextShellStarted": {
  19044. "type": "object",
  19045. "properties": {
  19046. "id": {
  19047. "type": "string"
  19048. },
  19049. "type": {
  19050. "type": "string",
  19051. "enum": ["session.next.shell.started"]
  19052. },
  19053. "properties": {
  19054. "type": "object",
  19055. "properties": {
  19056. "timestamp": {
  19057. "type": "number"
  19058. },
  19059. "sessionID": {
  19060. "type": "string",
  19061. "pattern": "^ses"
  19062. },
  19063. "callID": {
  19064. "type": "string"
  19065. },
  19066. "command": {
  19067. "type": "string"
  19068. }
  19069. },
  19070. "required": ["timestamp", "sessionID", "callID", "command"],
  19071. "additionalProperties": false
  19072. }
  19073. },
  19074. "required": ["id", "type", "properties"],
  19075. "additionalProperties": false
  19076. },
  19077. "EventSessionNextShellEnded": {
  19078. "type": "object",
  19079. "properties": {
  19080. "id": {
  19081. "type": "string"
  19082. },
  19083. "type": {
  19084. "type": "string",
  19085. "enum": ["session.next.shell.ended"]
  19086. },
  19087. "properties": {
  19088. "type": "object",
  19089. "properties": {
  19090. "timestamp": {
  19091. "type": "number"
  19092. },
  19093. "sessionID": {
  19094. "type": "string",
  19095. "pattern": "^ses"
  19096. },
  19097. "callID": {
  19098. "type": "string"
  19099. },
  19100. "output": {
  19101. "type": "string"
  19102. }
  19103. },
  19104. "required": ["timestamp", "sessionID", "callID", "output"],
  19105. "additionalProperties": false
  19106. }
  19107. },
  19108. "required": ["id", "type", "properties"],
  19109. "additionalProperties": false
  19110. },
  19111. "EventSessionNextStepStarted": {
  19112. "type": "object",
  19113. "properties": {
  19114. "id": {
  19115. "type": "string"
  19116. },
  19117. "type": {
  19118. "type": "string",
  19119. "enum": ["session.next.step.started"]
  19120. },
  19121. "properties": {
  19122. "type": "object",
  19123. "properties": {
  19124. "timestamp": {
  19125. "type": "number"
  19126. },
  19127. "sessionID": {
  19128. "type": "string",
  19129. "pattern": "^ses"
  19130. },
  19131. "agent": {
  19132. "type": "string"
  19133. },
  19134. "model": {
  19135. "type": "object",
  19136. "properties": {
  19137. "id": {
  19138. "type": "string"
  19139. },
  19140. "providerID": {
  19141. "type": "string"
  19142. },
  19143. "variant": {
  19144. "type": "string"
  19145. }
  19146. },
  19147. "required": ["id", "providerID", "variant"],
  19148. "additionalProperties": false
  19149. },
  19150. "snapshot": {
  19151. "type": "string"
  19152. }
  19153. },
  19154. "required": ["timestamp", "sessionID", "agent", "model"],
  19155. "additionalProperties": false
  19156. }
  19157. },
  19158. "required": ["id", "type", "properties"],
  19159. "additionalProperties": false
  19160. },
  19161. "EventSessionNextStepEnded": {
  19162. "type": "object",
  19163. "properties": {
  19164. "id": {
  19165. "type": "string"
  19166. },
  19167. "type": {
  19168. "type": "string",
  19169. "enum": ["session.next.step.ended"]
  19170. },
  19171. "properties": {
  19172. "type": "object",
  19173. "properties": {
  19174. "timestamp": {
  19175. "type": "number"
  19176. },
  19177. "sessionID": {
  19178. "type": "string",
  19179. "pattern": "^ses"
  19180. },
  19181. "finish": {
  19182. "type": "string"
  19183. },
  19184. "cost": {
  19185. "type": "number"
  19186. },
  19187. "tokens": {
  19188. "type": "object",
  19189. "properties": {
  19190. "input": {
  19191. "type": "number"
  19192. },
  19193. "output": {
  19194. "type": "number"
  19195. },
  19196. "reasoning": {
  19197. "type": "number"
  19198. },
  19199. "cache": {
  19200. "type": "object",
  19201. "properties": {
  19202. "read": {
  19203. "type": "number"
  19204. },
  19205. "write": {
  19206. "type": "number"
  19207. }
  19208. },
  19209. "required": ["read", "write"],
  19210. "additionalProperties": false
  19211. }
  19212. },
  19213. "required": ["input", "output", "reasoning", "cache"],
  19214. "additionalProperties": false
  19215. },
  19216. "snapshot": {
  19217. "type": "string"
  19218. }
  19219. },
  19220. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  19221. "additionalProperties": false
  19222. }
  19223. },
  19224. "required": ["id", "type", "properties"],
  19225. "additionalProperties": false
  19226. },
  19227. "SessionErrorUnknown": {
  19228. "type": "object",
  19229. "properties": {
  19230. "type": {
  19231. "type": "string",
  19232. "enum": ["unknown"]
  19233. },
  19234. "message": {
  19235. "type": "string"
  19236. }
  19237. },
  19238. "required": ["type", "message"],
  19239. "additionalProperties": false
  19240. },
  19241. "EventSessionNextStepFailed": {
  19242. "type": "object",
  19243. "properties": {
  19244. "id": {
  19245. "type": "string"
  19246. },
  19247. "type": {
  19248. "type": "string",
  19249. "enum": ["session.next.step.failed"]
  19250. },
  19251. "properties": {
  19252. "type": "object",
  19253. "properties": {
  19254. "timestamp": {
  19255. "type": "number"
  19256. },
  19257. "sessionID": {
  19258. "type": "string",
  19259. "pattern": "^ses"
  19260. },
  19261. "error": {
  19262. "$ref": "#/components/schemas/SessionErrorUnknown"
  19263. }
  19264. },
  19265. "required": ["timestamp", "sessionID", "error"],
  19266. "additionalProperties": false
  19267. }
  19268. },
  19269. "required": ["id", "type", "properties"],
  19270. "additionalProperties": false
  19271. },
  19272. "EventSessionNextTextStarted": {
  19273. "type": "object",
  19274. "properties": {
  19275. "id": {
  19276. "type": "string"
  19277. },
  19278. "type": {
  19279. "type": "string",
  19280. "enum": ["session.next.text.started"]
  19281. },
  19282. "properties": {
  19283. "type": "object",
  19284. "properties": {
  19285. "timestamp": {
  19286. "type": "number"
  19287. },
  19288. "sessionID": {
  19289. "type": "string",
  19290. "pattern": "^ses"
  19291. }
  19292. },
  19293. "required": ["timestamp", "sessionID"],
  19294. "additionalProperties": false
  19295. }
  19296. },
  19297. "required": ["id", "type", "properties"],
  19298. "additionalProperties": false
  19299. },
  19300. "EventSessionNextTextDelta": {
  19301. "type": "object",
  19302. "properties": {
  19303. "id": {
  19304. "type": "string"
  19305. },
  19306. "type": {
  19307. "type": "string",
  19308. "enum": ["session.next.text.delta"]
  19309. },
  19310. "properties": {
  19311. "type": "object",
  19312. "properties": {
  19313. "timestamp": {
  19314. "type": "number"
  19315. },
  19316. "sessionID": {
  19317. "type": "string",
  19318. "pattern": "^ses"
  19319. },
  19320. "delta": {
  19321. "type": "string"
  19322. }
  19323. },
  19324. "required": ["timestamp", "sessionID", "delta"],
  19325. "additionalProperties": false
  19326. }
  19327. },
  19328. "required": ["id", "type", "properties"],
  19329. "additionalProperties": false
  19330. },
  19331. "EventSessionNextTextEnded": {
  19332. "type": "object",
  19333. "properties": {
  19334. "id": {
  19335. "type": "string"
  19336. },
  19337. "type": {
  19338. "type": "string",
  19339. "enum": ["session.next.text.ended"]
  19340. },
  19341. "properties": {
  19342. "type": "object",
  19343. "properties": {
  19344. "timestamp": {
  19345. "type": "number"
  19346. },
  19347. "sessionID": {
  19348. "type": "string",
  19349. "pattern": "^ses"
  19350. },
  19351. "text": {
  19352. "type": "string"
  19353. }
  19354. },
  19355. "required": ["timestamp", "sessionID", "text"],
  19356. "additionalProperties": false
  19357. }
  19358. },
  19359. "required": ["id", "type", "properties"],
  19360. "additionalProperties": false
  19361. },
  19362. "EventSessionNextReasoningStarted": {
  19363. "type": "object",
  19364. "properties": {
  19365. "id": {
  19366. "type": "string"
  19367. },
  19368. "type": {
  19369. "type": "string",
  19370. "enum": ["session.next.reasoning.started"]
  19371. },
  19372. "properties": {
  19373. "type": "object",
  19374. "properties": {
  19375. "timestamp": {
  19376. "type": "number"
  19377. },
  19378. "sessionID": {
  19379. "type": "string",
  19380. "pattern": "^ses"
  19381. },
  19382. "reasoningID": {
  19383. "type": "string"
  19384. }
  19385. },
  19386. "required": ["timestamp", "sessionID", "reasoningID"],
  19387. "additionalProperties": false
  19388. }
  19389. },
  19390. "required": ["id", "type", "properties"],
  19391. "additionalProperties": false
  19392. },
  19393. "EventSessionNextReasoningDelta": {
  19394. "type": "object",
  19395. "properties": {
  19396. "id": {
  19397. "type": "string"
  19398. },
  19399. "type": {
  19400. "type": "string",
  19401. "enum": ["session.next.reasoning.delta"]
  19402. },
  19403. "properties": {
  19404. "type": "object",
  19405. "properties": {
  19406. "timestamp": {
  19407. "type": "number"
  19408. },
  19409. "sessionID": {
  19410. "type": "string",
  19411. "pattern": "^ses"
  19412. },
  19413. "reasoningID": {
  19414. "type": "string"
  19415. },
  19416. "delta": {
  19417. "type": "string"
  19418. }
  19419. },
  19420. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  19421. "additionalProperties": false
  19422. }
  19423. },
  19424. "required": ["id", "type", "properties"],
  19425. "additionalProperties": false
  19426. },
  19427. "EventSessionNextReasoningEnded": {
  19428. "type": "object",
  19429. "properties": {
  19430. "id": {
  19431. "type": "string"
  19432. },
  19433. "type": {
  19434. "type": "string",
  19435. "enum": ["session.next.reasoning.ended"]
  19436. },
  19437. "properties": {
  19438. "type": "object",
  19439. "properties": {
  19440. "timestamp": {
  19441. "type": "number"
  19442. },
  19443. "sessionID": {
  19444. "type": "string",
  19445. "pattern": "^ses"
  19446. },
  19447. "reasoningID": {
  19448. "type": "string"
  19449. },
  19450. "text": {
  19451. "type": "string"
  19452. }
  19453. },
  19454. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  19455. "additionalProperties": false
  19456. }
  19457. },
  19458. "required": ["id", "type", "properties"],
  19459. "additionalProperties": false
  19460. },
  19461. "EventSessionNextToolInputStarted": {
  19462. "type": "object",
  19463. "properties": {
  19464. "id": {
  19465. "type": "string"
  19466. },
  19467. "type": {
  19468. "type": "string",
  19469. "enum": ["session.next.tool.input.started"]
  19470. },
  19471. "properties": {
  19472. "type": "object",
  19473. "properties": {
  19474. "timestamp": {
  19475. "type": "number"
  19476. },
  19477. "sessionID": {
  19478. "type": "string",
  19479. "pattern": "^ses"
  19480. },
  19481. "callID": {
  19482. "type": "string"
  19483. },
  19484. "name": {
  19485. "type": "string"
  19486. }
  19487. },
  19488. "required": ["timestamp", "sessionID", "callID", "name"],
  19489. "additionalProperties": false
  19490. }
  19491. },
  19492. "required": ["id", "type", "properties"],
  19493. "additionalProperties": false
  19494. },
  19495. "EventSessionNextToolInputDelta": {
  19496. "type": "object",
  19497. "properties": {
  19498. "id": {
  19499. "type": "string"
  19500. },
  19501. "type": {
  19502. "type": "string",
  19503. "enum": ["session.next.tool.input.delta"]
  19504. },
  19505. "properties": {
  19506. "type": "object",
  19507. "properties": {
  19508. "timestamp": {
  19509. "type": "number"
  19510. },
  19511. "sessionID": {
  19512. "type": "string",
  19513. "pattern": "^ses"
  19514. },
  19515. "callID": {
  19516. "type": "string"
  19517. },
  19518. "delta": {
  19519. "type": "string"
  19520. }
  19521. },
  19522. "required": ["timestamp", "sessionID", "callID", "delta"],
  19523. "additionalProperties": false
  19524. }
  19525. },
  19526. "required": ["id", "type", "properties"],
  19527. "additionalProperties": false
  19528. },
  19529. "EventSessionNextToolInputEnded": {
  19530. "type": "object",
  19531. "properties": {
  19532. "id": {
  19533. "type": "string"
  19534. },
  19535. "type": {
  19536. "type": "string",
  19537. "enum": ["session.next.tool.input.ended"]
  19538. },
  19539. "properties": {
  19540. "type": "object",
  19541. "properties": {
  19542. "timestamp": {
  19543. "type": "number"
  19544. },
  19545. "sessionID": {
  19546. "type": "string",
  19547. "pattern": "^ses"
  19548. },
  19549. "callID": {
  19550. "type": "string"
  19551. },
  19552. "text": {
  19553. "type": "string"
  19554. }
  19555. },
  19556. "required": ["timestamp", "sessionID", "callID", "text"],
  19557. "additionalProperties": false
  19558. }
  19559. },
  19560. "required": ["id", "type", "properties"],
  19561. "additionalProperties": false
  19562. },
  19563. "EventSessionNextToolCalled": {
  19564. "type": "object",
  19565. "properties": {
  19566. "id": {
  19567. "type": "string"
  19568. },
  19569. "type": {
  19570. "type": "string",
  19571. "enum": ["session.next.tool.called"]
  19572. },
  19573. "properties": {
  19574. "type": "object",
  19575. "properties": {
  19576. "timestamp": {
  19577. "type": "number"
  19578. },
  19579. "sessionID": {
  19580. "type": "string",
  19581. "pattern": "^ses"
  19582. },
  19583. "callID": {
  19584. "type": "string"
  19585. },
  19586. "tool": {
  19587. "type": "string"
  19588. },
  19589. "input": {
  19590. "type": "object"
  19591. },
  19592. "provider": {
  19593. "type": "object",
  19594. "properties": {
  19595. "executed": {
  19596. "type": "boolean"
  19597. },
  19598. "metadata": {
  19599. "type": "object"
  19600. }
  19601. },
  19602. "required": ["executed"],
  19603. "additionalProperties": false
  19604. }
  19605. },
  19606. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  19607. "additionalProperties": false
  19608. }
  19609. },
  19610. "required": ["id", "type", "properties"],
  19611. "additionalProperties": false
  19612. },
  19613. "ToolTextContent": {
  19614. "type": "object",
  19615. "properties": {
  19616. "type": {
  19617. "type": "string",
  19618. "enum": ["text"]
  19619. },
  19620. "text": {
  19621. "type": "string"
  19622. }
  19623. },
  19624. "required": ["type", "text"],
  19625. "additionalProperties": false
  19626. },
  19627. "ToolFileContent": {
  19628. "type": "object",
  19629. "properties": {
  19630. "type": {
  19631. "type": "string",
  19632. "enum": ["file"]
  19633. },
  19634. "uri": {
  19635. "type": "string"
  19636. },
  19637. "mime": {
  19638. "type": "string"
  19639. },
  19640. "name": {
  19641. "type": "string"
  19642. }
  19643. },
  19644. "required": ["type", "uri", "mime"],
  19645. "additionalProperties": false
  19646. },
  19647. "EventSessionNextToolProgress": {
  19648. "type": "object",
  19649. "properties": {
  19650. "id": {
  19651. "type": "string"
  19652. },
  19653. "type": {
  19654. "type": "string",
  19655. "enum": ["session.next.tool.progress"]
  19656. },
  19657. "properties": {
  19658. "type": "object",
  19659. "properties": {
  19660. "timestamp": {
  19661. "type": "number"
  19662. },
  19663. "sessionID": {
  19664. "type": "string",
  19665. "pattern": "^ses"
  19666. },
  19667. "callID": {
  19668. "type": "string"
  19669. },
  19670. "structured": {
  19671. "type": "object"
  19672. },
  19673. "content": {
  19674. "type": "array",
  19675. "items": {
  19676. "anyOf": [
  19677. {
  19678. "$ref": "#/components/schemas/ToolTextContent"
  19679. },
  19680. {
  19681. "$ref": "#/components/schemas/ToolFileContent"
  19682. }
  19683. ]
  19684. }
  19685. }
  19686. },
  19687. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  19688. "additionalProperties": false
  19689. }
  19690. },
  19691. "required": ["id", "type", "properties"],
  19692. "additionalProperties": false
  19693. },
  19694. "EventSessionNextToolSuccess": {
  19695. "type": "object",
  19696. "properties": {
  19697. "id": {
  19698. "type": "string"
  19699. },
  19700. "type": {
  19701. "type": "string",
  19702. "enum": ["session.next.tool.success"]
  19703. },
  19704. "properties": {
  19705. "type": "object",
  19706. "properties": {
  19707. "timestamp": {
  19708. "type": "number"
  19709. },
  19710. "sessionID": {
  19711. "type": "string",
  19712. "pattern": "^ses"
  19713. },
  19714. "callID": {
  19715. "type": "string"
  19716. },
  19717. "structured": {
  19718. "type": "object"
  19719. },
  19720. "content": {
  19721. "type": "array",
  19722. "items": {
  19723. "anyOf": [
  19724. {
  19725. "$ref": "#/components/schemas/ToolTextContent"
  19726. },
  19727. {
  19728. "$ref": "#/components/schemas/ToolFileContent"
  19729. }
  19730. ]
  19731. }
  19732. },
  19733. "provider": {
  19734. "type": "object",
  19735. "properties": {
  19736. "executed": {
  19737. "type": "boolean"
  19738. },
  19739. "metadata": {
  19740. "type": "object"
  19741. }
  19742. },
  19743. "required": ["executed"],
  19744. "additionalProperties": false
  19745. }
  19746. },
  19747. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  19748. "additionalProperties": false
  19749. }
  19750. },
  19751. "required": ["id", "type", "properties"],
  19752. "additionalProperties": false
  19753. },
  19754. "EventSessionNextToolFailed": {
  19755. "type": "object",
  19756. "properties": {
  19757. "id": {
  19758. "type": "string"
  19759. },
  19760. "type": {
  19761. "type": "string",
  19762. "enum": ["session.next.tool.failed"]
  19763. },
  19764. "properties": {
  19765. "type": "object",
  19766. "properties": {
  19767. "timestamp": {
  19768. "type": "number"
  19769. },
  19770. "sessionID": {
  19771. "type": "string",
  19772. "pattern": "^ses"
  19773. },
  19774. "callID": {
  19775. "type": "string"
  19776. },
  19777. "error": {
  19778. "$ref": "#/components/schemas/SessionErrorUnknown"
  19779. },
  19780. "provider": {
  19781. "type": "object",
  19782. "properties": {
  19783. "executed": {
  19784. "type": "boolean"
  19785. },
  19786. "metadata": {
  19787. "type": "object"
  19788. }
  19789. },
  19790. "required": ["executed"],
  19791. "additionalProperties": false
  19792. }
  19793. },
  19794. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  19795. "additionalProperties": false
  19796. }
  19797. },
  19798. "required": ["id", "type", "properties"],
  19799. "additionalProperties": false
  19800. },
  19801. "SessionNextRetry_error": {
  19802. "type": "object",
  19803. "properties": {
  19804. "message": {
  19805. "type": "string"
  19806. },
  19807. "statusCode": {
  19808. "type": "number"
  19809. },
  19810. "isRetryable": {
  19811. "type": "boolean"
  19812. },
  19813. "responseHeaders": {
  19814. "type": "object",
  19815. "additionalProperties": {
  19816. "type": "string"
  19817. }
  19818. },
  19819. "responseBody": {
  19820. "type": "string"
  19821. },
  19822. "metadata": {
  19823. "type": "object",
  19824. "additionalProperties": {
  19825. "type": "string"
  19826. }
  19827. }
  19828. },
  19829. "required": ["message", "isRetryable"],
  19830. "additionalProperties": false
  19831. },
  19832. "EventSessionNextRetried": {
  19833. "type": "object",
  19834. "properties": {
  19835. "id": {
  19836. "type": "string"
  19837. },
  19838. "type": {
  19839. "type": "string",
  19840. "enum": ["session.next.retried"]
  19841. },
  19842. "properties": {
  19843. "type": "object",
  19844. "properties": {
  19845. "timestamp": {
  19846. "type": "number"
  19847. },
  19848. "sessionID": {
  19849. "type": "string",
  19850. "pattern": "^ses"
  19851. },
  19852. "attempt": {
  19853. "type": "number"
  19854. },
  19855. "error": {
  19856. "$ref": "#/components/schemas/SessionNextRetry_error"
  19857. }
  19858. },
  19859. "required": ["timestamp", "sessionID", "attempt", "error"],
  19860. "additionalProperties": false
  19861. }
  19862. },
  19863. "required": ["id", "type", "properties"],
  19864. "additionalProperties": false
  19865. },
  19866. "EventSessionNextCompactionStarted": {
  19867. "type": "object",
  19868. "properties": {
  19869. "id": {
  19870. "type": "string"
  19871. },
  19872. "type": {
  19873. "type": "string",
  19874. "enum": ["session.next.compaction.started"]
  19875. },
  19876. "properties": {
  19877. "type": "object",
  19878. "properties": {
  19879. "timestamp": {
  19880. "type": "number"
  19881. },
  19882. "sessionID": {
  19883. "type": "string",
  19884. "pattern": "^ses"
  19885. },
  19886. "reason": {
  19887. "type": "string",
  19888. "enum": ["auto", "manual"]
  19889. }
  19890. },
  19891. "required": ["timestamp", "sessionID", "reason"],
  19892. "additionalProperties": false
  19893. }
  19894. },
  19895. "required": ["id", "type", "properties"],
  19896. "additionalProperties": false
  19897. },
  19898. "EventSessionNextCompactionDelta": {
  19899. "type": "object",
  19900. "properties": {
  19901. "id": {
  19902. "type": "string"
  19903. },
  19904. "type": {
  19905. "type": "string",
  19906. "enum": ["session.next.compaction.delta"]
  19907. },
  19908. "properties": {
  19909. "type": "object",
  19910. "properties": {
  19911. "timestamp": {
  19912. "type": "number"
  19913. },
  19914. "sessionID": {
  19915. "type": "string",
  19916. "pattern": "^ses"
  19917. },
  19918. "text": {
  19919. "type": "string"
  19920. }
  19921. },
  19922. "required": ["timestamp", "sessionID", "text"],
  19923. "additionalProperties": false
  19924. }
  19925. },
  19926. "required": ["id", "type", "properties"],
  19927. "additionalProperties": false
  19928. },
  19929. "EventSessionNextCompactionEnded": {
  19930. "type": "object",
  19931. "properties": {
  19932. "id": {
  19933. "type": "string"
  19934. },
  19935. "type": {
  19936. "type": "string",
  19937. "enum": ["session.next.compaction.ended"]
  19938. },
  19939. "properties": {
  19940. "type": "object",
  19941. "properties": {
  19942. "timestamp": {
  19943. "type": "number"
  19944. },
  19945. "sessionID": {
  19946. "type": "string",
  19947. "pattern": "^ses"
  19948. },
  19949. "text": {
  19950. "type": "string"
  19951. },
  19952. "include": {
  19953. "type": "string"
  19954. }
  19955. },
  19956. "required": ["timestamp", "sessionID", "text"],
  19957. "additionalProperties": false
  19958. }
  19959. },
  19960. "required": ["id", "type", "properties"],
  19961. "additionalProperties": false
  19962. },
  19963. "ModelV2Info": {
  19964. "type": "object",
  19965. "properties": {
  19966. "id": {
  19967. "type": "string"
  19968. },
  19969. "apiID": {
  19970. "type": "string"
  19971. },
  19972. "providerID": {
  19973. "type": "string"
  19974. },
  19975. "family": {
  19976. "type": "string"
  19977. },
  19978. "name": {
  19979. "type": "string"
  19980. },
  19981. "endpoint": {
  19982. "anyOf": [
  19983. {
  19984. "type": "object",
  19985. "properties": {
  19986. "type": {
  19987. "type": "string",
  19988. "enum": ["unknown"]
  19989. }
  19990. },
  19991. "required": ["type"],
  19992. "additionalProperties": false
  19993. },
  19994. {
  19995. "type": "object",
  19996. "properties": {
  19997. "type": {
  19998. "type": "string",
  19999. "enum": ["openai/responses"]
  20000. },
  20001. "url": {
  20002. "type": "string"
  20003. },
  20004. "websocket": {
  20005. "type": "boolean"
  20006. }
  20007. },
  20008. "required": ["type", "url"],
  20009. "additionalProperties": false
  20010. },
  20011. {
  20012. "type": "object",
  20013. "properties": {
  20014. "type": {
  20015. "type": "string",
  20016. "enum": ["openai/completions"]
  20017. },
  20018. "url": {
  20019. "type": "string"
  20020. },
  20021. "reasoning": {
  20022. "anyOf": [
  20023. {
  20024. "type": "object",
  20025. "properties": {
  20026. "type": {
  20027. "type": "string",
  20028. "enum": ["reasoning_content"]
  20029. }
  20030. },
  20031. "required": ["type"],
  20032. "additionalProperties": false
  20033. },
  20034. {
  20035. "type": "object",
  20036. "properties": {
  20037. "type": {
  20038. "type": "string",
  20039. "enum": ["reasoning_details"]
  20040. }
  20041. },
  20042. "required": ["type"],
  20043. "additionalProperties": false
  20044. }
  20045. ]
  20046. }
  20047. },
  20048. "required": ["type", "url"],
  20049. "additionalProperties": false
  20050. },
  20051. {
  20052. "type": "object",
  20053. "properties": {
  20054. "type": {
  20055. "type": "string",
  20056. "enum": ["anthropic/messages"]
  20057. },
  20058. "url": {
  20059. "type": "string"
  20060. }
  20061. },
  20062. "required": ["type", "url"],
  20063. "additionalProperties": false
  20064. },
  20065. {
  20066. "type": "object",
  20067. "properties": {
  20068. "type": {
  20069. "type": "string",
  20070. "enum": ["aisdk"]
  20071. },
  20072. "package": {
  20073. "type": "string"
  20074. },
  20075. "url": {
  20076. "type": "string"
  20077. }
  20078. },
  20079. "required": ["type", "package"],
  20080. "additionalProperties": false
  20081. }
  20082. ]
  20083. },
  20084. "capabilities": {
  20085. "type": "object",
  20086. "properties": {
  20087. "tools": {
  20088. "type": "boolean"
  20089. },
  20090. "input": {
  20091. "type": "array",
  20092. "items": {
  20093. "type": "string"
  20094. }
  20095. },
  20096. "output": {
  20097. "type": "array",
  20098. "items": {
  20099. "type": "string"
  20100. }
  20101. }
  20102. },
  20103. "required": ["tools", "input", "output"],
  20104. "additionalProperties": false
  20105. },
  20106. "options": {
  20107. "type": "object",
  20108. "properties": {
  20109. "headers": {
  20110. "type": "object",
  20111. "additionalProperties": {
  20112. "type": "string"
  20113. }
  20114. },
  20115. "body": {
  20116. "type": "object"
  20117. },
  20118. "aisdk": {
  20119. "type": "object",
  20120. "properties": {
  20121. "provider": {
  20122. "type": "object"
  20123. },
  20124. "request": {
  20125. "type": "object"
  20126. }
  20127. },
  20128. "required": ["provider", "request"],
  20129. "additionalProperties": false
  20130. },
  20131. "variant": {
  20132. "type": "string"
  20133. }
  20134. },
  20135. "required": ["headers", "body", "aisdk"],
  20136. "additionalProperties": false
  20137. },
  20138. "variants": {
  20139. "type": "array",
  20140. "items": {
  20141. "type": "object",
  20142. "properties": {
  20143. "id": {
  20144. "type": "string"
  20145. },
  20146. "headers": {
  20147. "type": "object",
  20148. "additionalProperties": {
  20149. "type": "string"
  20150. }
  20151. },
  20152. "body": {
  20153. "type": "object"
  20154. },
  20155. "aisdk": {
  20156. "type": "object",
  20157. "properties": {
  20158. "provider": {
  20159. "type": "object"
  20160. },
  20161. "request": {
  20162. "type": "object"
  20163. }
  20164. },
  20165. "required": ["provider", "request"],
  20166. "additionalProperties": false
  20167. }
  20168. },
  20169. "required": ["id", "headers", "body", "aisdk"],
  20170. "additionalProperties": false
  20171. }
  20172. },
  20173. "time": {
  20174. "type": "object",
  20175. "properties": {
  20176. "released": {
  20177. "anyOf": [
  20178. {
  20179. "type": "number"
  20180. },
  20181. {
  20182. "type": "string",
  20183. "enum": ["NaN"]
  20184. },
  20185. {
  20186. "type": "string",
  20187. "enum": ["Infinity"]
  20188. },
  20189. {
  20190. "type": "string",
  20191. "enum": ["-Infinity"]
  20192. },
  20193. {
  20194. "type": "string",
  20195. "enum": ["Infinity", "-Infinity", "NaN"]
  20196. }
  20197. ]
  20198. }
  20199. },
  20200. "required": ["released"],
  20201. "additionalProperties": false
  20202. },
  20203. "cost": {
  20204. "type": "array",
  20205. "items": {
  20206. "type": "object",
  20207. "properties": {
  20208. "tier": {
  20209. "type": "object",
  20210. "properties": {
  20211. "type": {
  20212. "type": "string",
  20213. "enum": ["context"]
  20214. },
  20215. "size": {
  20216. "type": "integer"
  20217. }
  20218. },
  20219. "required": ["type", "size"],
  20220. "additionalProperties": false
  20221. },
  20222. "input": {
  20223. "type": "number"
  20224. },
  20225. "output": {
  20226. "type": "number"
  20227. },
  20228. "cache": {
  20229. "type": "object",
  20230. "properties": {
  20231. "read": {
  20232. "type": "number"
  20233. },
  20234. "write": {
  20235. "type": "number"
  20236. }
  20237. },
  20238. "required": ["read", "write"],
  20239. "additionalProperties": false
  20240. }
  20241. },
  20242. "required": ["input", "output", "cache"],
  20243. "additionalProperties": false
  20244. }
  20245. },
  20246. "status": {
  20247. "type": "string",
  20248. "enum": ["alpha", "beta", "deprecated", "active"]
  20249. },
  20250. "enabled": {
  20251. "type": "boolean"
  20252. },
  20253. "limit": {
  20254. "type": "object",
  20255. "properties": {
  20256. "context": {
  20257. "type": "integer"
  20258. },
  20259. "input": {
  20260. "type": "integer"
  20261. },
  20262. "output": {
  20263. "type": "integer"
  20264. }
  20265. },
  20266. "required": ["context", "output"],
  20267. "additionalProperties": false
  20268. }
  20269. },
  20270. "required": [
  20271. "id",
  20272. "apiID",
  20273. "providerID",
  20274. "name",
  20275. "endpoint",
  20276. "capabilities",
  20277. "options",
  20278. "variants",
  20279. "time",
  20280. "cost",
  20281. "status",
  20282. "enabled",
  20283. "limit"
  20284. ],
  20285. "additionalProperties": false
  20286. },
  20287. "EventCatalogModelUpdated": {
  20288. "type": "object",
  20289. "properties": {
  20290. "id": {
  20291. "type": "string"
  20292. },
  20293. "type": {
  20294. "type": "string",
  20295. "enum": ["catalog.model.updated"]
  20296. },
  20297. "properties": {
  20298. "type": "object",
  20299. "properties": {
  20300. "model": {
  20301. "$ref": "#/components/schemas/ModelV2Info"
  20302. }
  20303. },
  20304. "required": ["model"],
  20305. "additionalProperties": false
  20306. }
  20307. },
  20308. "required": ["id", "type", "properties"],
  20309. "additionalProperties": false
  20310. },
  20311. "SessionInfo": {
  20312. "type": "object",
  20313. "properties": {
  20314. "id": {
  20315. "type": "string",
  20316. "pattern": "^ses"
  20317. },
  20318. "parentID": {
  20319. "type": "string",
  20320. "pattern": "^ses"
  20321. },
  20322. "projectID": {
  20323. "type": "string"
  20324. },
  20325. "workspaceID": {
  20326. "type": "string",
  20327. "pattern": "^wrk"
  20328. },
  20329. "path": {
  20330. "type": "string"
  20331. },
  20332. "agent": {
  20333. "type": "string"
  20334. },
  20335. "model": {
  20336. "type": "object",
  20337. "properties": {
  20338. "id": {
  20339. "type": "string"
  20340. },
  20341. "providerID": {
  20342. "type": "string"
  20343. },
  20344. "variant": {
  20345. "type": "string"
  20346. }
  20347. },
  20348. "required": ["id", "providerID", "variant"],
  20349. "additionalProperties": false
  20350. },
  20351. "cost": {
  20352. "type": "number"
  20353. },
  20354. "tokens": {
  20355. "type": "object",
  20356. "properties": {
  20357. "input": {
  20358. "type": "number"
  20359. },
  20360. "output": {
  20361. "type": "number"
  20362. },
  20363. "reasoning": {
  20364. "type": "number"
  20365. },
  20366. "cache": {
  20367. "type": "object",
  20368. "properties": {
  20369. "read": {
  20370. "type": "number"
  20371. },
  20372. "write": {
  20373. "type": "number"
  20374. }
  20375. },
  20376. "required": ["read", "write"],
  20377. "additionalProperties": false
  20378. }
  20379. },
  20380. "required": ["input", "output", "reasoning", "cache"],
  20381. "additionalProperties": false
  20382. },
  20383. "time": {
  20384. "type": "object",
  20385. "properties": {
  20386. "created": {
  20387. "type": "number"
  20388. },
  20389. "updated": {
  20390. "type": "number"
  20391. },
  20392. "archived": {
  20393. "type": "number"
  20394. }
  20395. },
  20396. "required": ["created", "updated"],
  20397. "additionalProperties": false
  20398. },
  20399. "title": {
  20400. "type": "string"
  20401. }
  20402. },
  20403. "required": ["id", "projectID", "cost", "tokens", "time", "title"],
  20404. "additionalProperties": false
  20405. },
  20406. "SessionDelivery": {
  20407. "type": "string",
  20408. "enum": ["immediate", "deferred"]
  20409. },
  20410. "SessionMessageAgentSwitched": {
  20411. "type": "object",
  20412. "properties": {
  20413. "id": {
  20414. "type": "string"
  20415. },
  20416. "metadata": {
  20417. "type": "object"
  20418. },
  20419. "time": {
  20420. "type": "object",
  20421. "properties": {
  20422. "created": {
  20423. "type": "number"
  20424. }
  20425. },
  20426. "required": ["created"],
  20427. "additionalProperties": false
  20428. },
  20429. "type": {
  20430. "type": "string",
  20431. "enum": ["agent-switched"]
  20432. },
  20433. "agent": {
  20434. "type": "string"
  20435. }
  20436. },
  20437. "required": ["id", "time", "type", "agent"],
  20438. "additionalProperties": false
  20439. },
  20440. "SessionMessageModelSwitched": {
  20441. "type": "object",
  20442. "properties": {
  20443. "id": {
  20444. "type": "string"
  20445. },
  20446. "metadata": {
  20447. "type": "object"
  20448. },
  20449. "time": {
  20450. "type": "object",
  20451. "properties": {
  20452. "created": {
  20453. "type": "number"
  20454. }
  20455. },
  20456. "required": ["created"],
  20457. "additionalProperties": false
  20458. },
  20459. "type": {
  20460. "type": "string",
  20461. "enum": ["model-switched"]
  20462. },
  20463. "model": {
  20464. "type": "object",
  20465. "properties": {
  20466. "id": {
  20467. "type": "string"
  20468. },
  20469. "providerID": {
  20470. "type": "string"
  20471. },
  20472. "variant": {
  20473. "type": "string"
  20474. }
  20475. },
  20476. "required": ["id", "providerID", "variant"],
  20477. "additionalProperties": false
  20478. }
  20479. },
  20480. "required": ["id", "time", "type", "model"],
  20481. "additionalProperties": false
  20482. },
  20483. "SessionMessageUser": {
  20484. "type": "object",
  20485. "properties": {
  20486. "id": {
  20487. "type": "string"
  20488. },
  20489. "metadata": {
  20490. "type": "object"
  20491. },
  20492. "time": {
  20493. "type": "object",
  20494. "properties": {
  20495. "created": {
  20496. "type": "number"
  20497. }
  20498. },
  20499. "required": ["created"],
  20500. "additionalProperties": false
  20501. },
  20502. "text": {
  20503. "type": "string"
  20504. },
  20505. "files": {
  20506. "type": "array",
  20507. "items": {
  20508. "$ref": "#/components/schemas/PromptFileAttachment"
  20509. }
  20510. },
  20511. "agents": {
  20512. "type": "array",
  20513. "items": {
  20514. "$ref": "#/components/schemas/PromptAgentAttachment"
  20515. }
  20516. },
  20517. "references": {
  20518. "type": "array",
  20519. "items": {
  20520. "$ref": "#/components/schemas/PromptReferenceAttachment"
  20521. }
  20522. },
  20523. "type": {
  20524. "type": "string",
  20525. "enum": ["user"]
  20526. }
  20527. },
  20528. "required": ["id", "time", "text", "type"],
  20529. "additionalProperties": false
  20530. },
  20531. "SessionMessageSynthetic": {
  20532. "type": "object",
  20533. "properties": {
  20534. "id": {
  20535. "type": "string"
  20536. },
  20537. "metadata": {
  20538. "type": "object"
  20539. },
  20540. "time": {
  20541. "type": "object",
  20542. "properties": {
  20543. "created": {
  20544. "type": "number"
  20545. }
  20546. },
  20547. "required": ["created"],
  20548. "additionalProperties": false
  20549. },
  20550. "sessionID": {
  20551. "type": "string",
  20552. "pattern": "^ses"
  20553. },
  20554. "text": {
  20555. "type": "string"
  20556. },
  20557. "type": {
  20558. "type": "string",
  20559. "enum": ["synthetic"]
  20560. }
  20561. },
  20562. "required": ["id", "time", "sessionID", "text", "type"],
  20563. "additionalProperties": false
  20564. },
  20565. "SessionMessageShell": {
  20566. "type": "object",
  20567. "properties": {
  20568. "id": {
  20569. "type": "string"
  20570. },
  20571. "metadata": {
  20572. "type": "object"
  20573. },
  20574. "time": {
  20575. "type": "object",
  20576. "properties": {
  20577. "created": {
  20578. "type": "number"
  20579. },
  20580. "completed": {
  20581. "type": "number"
  20582. }
  20583. },
  20584. "required": ["created"],
  20585. "additionalProperties": false
  20586. },
  20587. "type": {
  20588. "type": "string",
  20589. "enum": ["shell"]
  20590. },
  20591. "callID": {
  20592. "type": "string"
  20593. },
  20594. "command": {
  20595. "type": "string"
  20596. },
  20597. "output": {
  20598. "type": "string"
  20599. }
  20600. },
  20601. "required": ["id", "time", "type", "callID", "command", "output"],
  20602. "additionalProperties": false
  20603. },
  20604. "SessionMessageAssistantText": {
  20605. "type": "object",
  20606. "properties": {
  20607. "type": {
  20608. "type": "string",
  20609. "enum": ["text"]
  20610. },
  20611. "text": {
  20612. "type": "string"
  20613. }
  20614. },
  20615. "required": ["type", "text"],
  20616. "additionalProperties": false
  20617. },
  20618. "SessionMessageAssistantReasoning": {
  20619. "type": "object",
  20620. "properties": {
  20621. "type": {
  20622. "type": "string",
  20623. "enum": ["reasoning"]
  20624. },
  20625. "id": {
  20626. "type": "string"
  20627. },
  20628. "text": {
  20629. "type": "string"
  20630. }
  20631. },
  20632. "required": ["type", "id", "text"],
  20633. "additionalProperties": false
  20634. },
  20635. "SessionMessageToolStatePending": {
  20636. "type": "object",
  20637. "properties": {
  20638. "status": {
  20639. "type": "string",
  20640. "enum": ["pending"]
  20641. },
  20642. "input": {
  20643. "type": "string"
  20644. }
  20645. },
  20646. "required": ["status", "input"],
  20647. "additionalProperties": false
  20648. },
  20649. "SessionMessageToolStateRunning": {
  20650. "type": "object",
  20651. "properties": {
  20652. "status": {
  20653. "type": "string",
  20654. "enum": ["running"]
  20655. },
  20656. "input": {
  20657. "type": "object"
  20658. },
  20659. "structured": {
  20660. "type": "object"
  20661. },
  20662. "content": {
  20663. "type": "array",
  20664. "items": {
  20665. "anyOf": [
  20666. {
  20667. "$ref": "#/components/schemas/ToolTextContent"
  20668. },
  20669. {
  20670. "$ref": "#/components/schemas/ToolFileContent"
  20671. }
  20672. ]
  20673. }
  20674. }
  20675. },
  20676. "required": ["status", "input", "structured", "content"],
  20677. "additionalProperties": false
  20678. },
  20679. "SessionMessageToolStateCompleted": {
  20680. "type": "object",
  20681. "properties": {
  20682. "status": {
  20683. "type": "string",
  20684. "enum": ["completed"]
  20685. },
  20686. "input": {
  20687. "type": "object"
  20688. },
  20689. "attachments": {
  20690. "type": "array",
  20691. "items": {
  20692. "$ref": "#/components/schemas/PromptFileAttachment"
  20693. }
  20694. },
  20695. "content": {
  20696. "type": "array",
  20697. "items": {
  20698. "anyOf": [
  20699. {
  20700. "$ref": "#/components/schemas/ToolTextContent"
  20701. },
  20702. {
  20703. "$ref": "#/components/schemas/ToolFileContent"
  20704. }
  20705. ]
  20706. }
  20707. },
  20708. "structured": {
  20709. "type": "object"
  20710. }
  20711. },
  20712. "required": ["status", "input", "content", "structured"],
  20713. "additionalProperties": false
  20714. },
  20715. "SessionMessageToolStateError": {
  20716. "type": "object",
  20717. "properties": {
  20718. "status": {
  20719. "type": "string",
  20720. "enum": ["error"]
  20721. },
  20722. "input": {
  20723. "type": "object"
  20724. },
  20725. "content": {
  20726. "type": "array",
  20727. "items": {
  20728. "anyOf": [
  20729. {
  20730. "$ref": "#/components/schemas/ToolTextContent"
  20731. },
  20732. {
  20733. "$ref": "#/components/schemas/ToolFileContent"
  20734. }
  20735. ]
  20736. }
  20737. },
  20738. "structured": {
  20739. "type": "object"
  20740. },
  20741. "error": {
  20742. "$ref": "#/components/schemas/SessionErrorUnknown"
  20743. }
  20744. },
  20745. "required": ["status", "input", "content", "structured", "error"],
  20746. "additionalProperties": false
  20747. },
  20748. "SessionMessageAssistantTool": {
  20749. "type": "object",
  20750. "properties": {
  20751. "type": {
  20752. "type": "string",
  20753. "enum": ["tool"]
  20754. },
  20755. "id": {
  20756. "type": "string"
  20757. },
  20758. "name": {
  20759. "type": "string"
  20760. },
  20761. "provider": {
  20762. "type": "object",
  20763. "properties": {
  20764. "executed": {
  20765. "type": "boolean"
  20766. },
  20767. "metadata": {
  20768. "type": "object"
  20769. }
  20770. },
  20771. "required": ["executed"],
  20772. "additionalProperties": false
  20773. },
  20774. "state": {
  20775. "anyOf": [
  20776. {
  20777. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  20778. },
  20779. {
  20780. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  20781. },
  20782. {
  20783. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  20784. },
  20785. {
  20786. "$ref": "#/components/schemas/SessionMessageToolStateError"
  20787. }
  20788. ]
  20789. },
  20790. "time": {
  20791. "type": "object",
  20792. "properties": {
  20793. "created": {
  20794. "type": "number"
  20795. },
  20796. "ran": {
  20797. "type": "number"
  20798. },
  20799. "completed": {
  20800. "type": "number"
  20801. },
  20802. "pruned": {
  20803. "type": "number"
  20804. }
  20805. },
  20806. "required": ["created"],
  20807. "additionalProperties": false
  20808. }
  20809. },
  20810. "required": ["type", "id", "name", "state", "time"],
  20811. "additionalProperties": false
  20812. },
  20813. "SessionMessageAssistant": {
  20814. "type": "object",
  20815. "properties": {
  20816. "id": {
  20817. "type": "string"
  20818. },
  20819. "metadata": {
  20820. "type": "object"
  20821. },
  20822. "time": {
  20823. "type": "object",
  20824. "properties": {
  20825. "created": {
  20826. "type": "number"
  20827. },
  20828. "completed": {
  20829. "type": "number"
  20830. }
  20831. },
  20832. "required": ["created"],
  20833. "additionalProperties": false
  20834. },
  20835. "type": {
  20836. "type": "string",
  20837. "enum": ["assistant"]
  20838. },
  20839. "agent": {
  20840. "type": "string"
  20841. },
  20842. "model": {
  20843. "type": "object",
  20844. "properties": {
  20845. "id": {
  20846. "type": "string"
  20847. },
  20848. "providerID": {
  20849. "type": "string"
  20850. },
  20851. "variant": {
  20852. "type": "string"
  20853. }
  20854. },
  20855. "required": ["id", "providerID", "variant"],
  20856. "additionalProperties": false
  20857. },
  20858. "content": {
  20859. "type": "array",
  20860. "items": {
  20861. "anyOf": [
  20862. {
  20863. "$ref": "#/components/schemas/SessionMessageAssistantText"
  20864. },
  20865. {
  20866. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  20867. },
  20868. {
  20869. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  20870. }
  20871. ]
  20872. }
  20873. },
  20874. "snapshot": {
  20875. "type": "object",
  20876. "properties": {
  20877. "start": {
  20878. "type": "string"
  20879. },
  20880. "end": {
  20881. "type": "string"
  20882. }
  20883. },
  20884. "additionalProperties": false
  20885. },
  20886. "finish": {
  20887. "type": "string"
  20888. },
  20889. "cost": {
  20890. "type": "number"
  20891. },
  20892. "tokens": {
  20893. "type": "object",
  20894. "properties": {
  20895. "input": {
  20896. "type": "number"
  20897. },
  20898. "output": {
  20899. "type": "number"
  20900. },
  20901. "reasoning": {
  20902. "type": "number"
  20903. },
  20904. "cache": {
  20905. "type": "object",
  20906. "properties": {
  20907. "read": {
  20908. "type": "number"
  20909. },
  20910. "write": {
  20911. "type": "number"
  20912. }
  20913. },
  20914. "required": ["read", "write"],
  20915. "additionalProperties": false
  20916. }
  20917. },
  20918. "required": ["input", "output", "reasoning", "cache"],
  20919. "additionalProperties": false
  20920. },
  20921. "error": {
  20922. "$ref": "#/components/schemas/SessionErrorUnknown"
  20923. }
  20924. },
  20925. "required": ["id", "time", "type", "agent", "model", "content"],
  20926. "additionalProperties": false
  20927. },
  20928. "SessionMessageCompaction": {
  20929. "type": "object",
  20930. "properties": {
  20931. "type": {
  20932. "type": "string",
  20933. "enum": ["compaction"]
  20934. },
  20935. "reason": {
  20936. "type": "string",
  20937. "enum": ["auto", "manual"]
  20938. },
  20939. "summary": {
  20940. "type": "string"
  20941. },
  20942. "include": {
  20943. "type": "string"
  20944. },
  20945. "id": {
  20946. "type": "string"
  20947. },
  20948. "metadata": {
  20949. "type": "object"
  20950. },
  20951. "time": {
  20952. "type": "object",
  20953. "properties": {
  20954. "created": {
  20955. "type": "number"
  20956. }
  20957. },
  20958. "required": ["created"],
  20959. "additionalProperties": false
  20960. }
  20961. },
  20962. "required": ["type", "reason", "summary", "id", "time"],
  20963. "additionalProperties": false
  20964. },
  20965. "SessionMessage": {
  20966. "anyOf": [
  20967. {
  20968. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  20969. },
  20970. {
  20971. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  20972. },
  20973. {
  20974. "$ref": "#/components/schemas/SessionMessageUser"
  20975. },
  20976. {
  20977. "$ref": "#/components/schemas/SessionMessageSynthetic"
  20978. },
  20979. {
  20980. "$ref": "#/components/schemas/SessionMessageShell"
  20981. },
  20982. {
  20983. "$ref": "#/components/schemas/SessionMessageAssistant"
  20984. },
  20985. {
  20986. "$ref": "#/components/schemas/SessionMessageCompaction"
  20987. }
  20988. ]
  20989. },
  20990. "ProviderV2Info": {
  20991. "type": "object",
  20992. "properties": {
  20993. "id": {
  20994. "type": "string"
  20995. },
  20996. "name": {
  20997. "type": "string"
  20998. },
  20999. "enabled": {
  21000. "anyOf": [
  21001. {
  21002. "type": "boolean",
  21003. "enum": [false]
  21004. },
  21005. {
  21006. "type": "object",
  21007. "properties": {
  21008. "via": {
  21009. "type": "string",
  21010. "enum": ["env"]
  21011. },
  21012. "name": {
  21013. "type": "string"
  21014. }
  21015. },
  21016. "required": ["via", "name"],
  21017. "additionalProperties": false
  21018. },
  21019. {
  21020. "type": "object",
  21021. "properties": {
  21022. "via": {
  21023. "type": "string",
  21024. "enum": ["auth"]
  21025. },
  21026. "service": {
  21027. "type": "string"
  21028. }
  21029. },
  21030. "required": ["via", "service"],
  21031. "additionalProperties": false
  21032. },
  21033. {
  21034. "type": "object",
  21035. "properties": {
  21036. "via": {
  21037. "type": "string",
  21038. "enum": ["custom"]
  21039. },
  21040. "data": {
  21041. "type": "object"
  21042. }
  21043. },
  21044. "required": ["via", "data"],
  21045. "additionalProperties": false
  21046. }
  21047. ]
  21048. },
  21049. "env": {
  21050. "type": "array",
  21051. "items": {
  21052. "type": "string"
  21053. }
  21054. },
  21055. "endpoint": {
  21056. "anyOf": [
  21057. {
  21058. "type": "object",
  21059. "properties": {
  21060. "type": {
  21061. "type": "string",
  21062. "enum": ["unknown"]
  21063. }
  21064. },
  21065. "required": ["type"],
  21066. "additionalProperties": false
  21067. },
  21068. {
  21069. "type": "object",
  21070. "properties": {
  21071. "type": {
  21072. "type": "string",
  21073. "enum": ["openai/responses"]
  21074. },
  21075. "url": {
  21076. "type": "string"
  21077. },
  21078. "websocket": {
  21079. "type": "boolean"
  21080. }
  21081. },
  21082. "required": ["type", "url"],
  21083. "additionalProperties": false
  21084. },
  21085. {
  21086. "type": "object",
  21087. "properties": {
  21088. "type": {
  21089. "type": "string",
  21090. "enum": ["openai/completions"]
  21091. },
  21092. "url": {
  21093. "type": "string"
  21094. },
  21095. "reasoning": {
  21096. "anyOf": [
  21097. {
  21098. "type": "object",
  21099. "properties": {
  21100. "type": {
  21101. "type": "string",
  21102. "enum": ["reasoning_content"]
  21103. }
  21104. },
  21105. "required": ["type"],
  21106. "additionalProperties": false
  21107. },
  21108. {
  21109. "type": "object",
  21110. "properties": {
  21111. "type": {
  21112. "type": "string",
  21113. "enum": ["reasoning_details"]
  21114. }
  21115. },
  21116. "required": ["type"],
  21117. "additionalProperties": false
  21118. }
  21119. ]
  21120. }
  21121. },
  21122. "required": ["type", "url"],
  21123. "additionalProperties": false
  21124. },
  21125. {
  21126. "type": "object",
  21127. "properties": {
  21128. "type": {
  21129. "type": "string",
  21130. "enum": ["anthropic/messages"]
  21131. },
  21132. "url": {
  21133. "type": "string"
  21134. }
  21135. },
  21136. "required": ["type", "url"],
  21137. "additionalProperties": false
  21138. },
  21139. {
  21140. "type": "object",
  21141. "properties": {
  21142. "type": {
  21143. "type": "string",
  21144. "enum": ["aisdk"]
  21145. },
  21146. "package": {
  21147. "type": "string"
  21148. },
  21149. "url": {
  21150. "type": "string"
  21151. }
  21152. },
  21153. "required": ["type", "package"],
  21154. "additionalProperties": false
  21155. }
  21156. ]
  21157. },
  21158. "options": {
  21159. "type": "object",
  21160. "properties": {
  21161. "headers": {
  21162. "type": "object",
  21163. "additionalProperties": {
  21164. "type": "string"
  21165. }
  21166. },
  21167. "body": {
  21168. "type": "object"
  21169. },
  21170. "aisdk": {
  21171. "type": "object",
  21172. "properties": {
  21173. "provider": {
  21174. "type": "object"
  21175. },
  21176. "request": {
  21177. "type": "object"
  21178. }
  21179. },
  21180. "required": ["provider", "request"],
  21181. "additionalProperties": false
  21182. }
  21183. },
  21184. "required": ["headers", "body", "aisdk"],
  21185. "additionalProperties": false
  21186. }
  21187. },
  21188. "required": ["id", "name", "enabled", "env", "endpoint", "options"],
  21189. "additionalProperties": false
  21190. },
  21191. "EventTuiToastShow1": {
  21192. "type": "object",
  21193. "properties": {
  21194. "id": {
  21195. "type": "string"
  21196. },
  21197. "type": {
  21198. "type": "string",
  21199. "enum": ["tui.toast.show"]
  21200. },
  21201. "properties": {
  21202. "type": "object",
  21203. "properties": {
  21204. "title": {
  21205. "type": "string"
  21206. },
  21207. "message": {
  21208. "type": "string"
  21209. },
  21210. "variant": {
  21211. "type": "string",
  21212. "enum": ["info", "success", "warning", "error"]
  21213. },
  21214. "duration": {
  21215. "type": "integer",
  21216. "exclusiveMinimum": 0
  21217. }
  21218. },
  21219. "required": ["message", "variant"],
  21220. "additionalProperties": false
  21221. }
  21222. },
  21223. "required": ["id", "type", "properties"],
  21224. "additionalProperties": false
  21225. },
  21226. "ModelV2Info1": {
  21227. "type": "object",
  21228. "properties": {
  21229. "id": {
  21230. "type": "string"
  21231. },
  21232. "apiID": {
  21233. "type": "string"
  21234. },
  21235. "providerID": {
  21236. "type": "string"
  21237. },
  21238. "family": {
  21239. "type": "string"
  21240. },
  21241. "name": {
  21242. "type": "string"
  21243. },
  21244. "endpoint": {
  21245. "anyOf": [
  21246. {
  21247. "type": "object",
  21248. "properties": {
  21249. "type": {
  21250. "type": "string",
  21251. "enum": ["unknown"]
  21252. }
  21253. },
  21254. "required": ["type"],
  21255. "additionalProperties": false
  21256. },
  21257. {
  21258. "type": "object",
  21259. "properties": {
  21260. "type": {
  21261. "type": "string",
  21262. "enum": ["openai/responses"]
  21263. },
  21264. "url": {
  21265. "type": "string"
  21266. },
  21267. "websocket": {
  21268. "type": "boolean"
  21269. }
  21270. },
  21271. "required": ["type", "url"],
  21272. "additionalProperties": false
  21273. },
  21274. {
  21275. "type": "object",
  21276. "properties": {
  21277. "type": {
  21278. "type": "string",
  21279. "enum": ["openai/completions"]
  21280. },
  21281. "url": {
  21282. "type": "string"
  21283. },
  21284. "reasoning": {
  21285. "anyOf": [
  21286. {
  21287. "type": "object",
  21288. "properties": {
  21289. "type": {
  21290. "type": "string",
  21291. "enum": ["reasoning_content"]
  21292. }
  21293. },
  21294. "required": ["type"],
  21295. "additionalProperties": false
  21296. },
  21297. {
  21298. "type": "object",
  21299. "properties": {
  21300. "type": {
  21301. "type": "string",
  21302. "enum": ["reasoning_details"]
  21303. }
  21304. },
  21305. "required": ["type"],
  21306. "additionalProperties": false
  21307. }
  21308. ]
  21309. }
  21310. },
  21311. "required": ["type", "url"],
  21312. "additionalProperties": false
  21313. },
  21314. {
  21315. "type": "object",
  21316. "properties": {
  21317. "type": {
  21318. "type": "string",
  21319. "enum": ["anthropic/messages"]
  21320. },
  21321. "url": {
  21322. "type": "string"
  21323. }
  21324. },
  21325. "required": ["type", "url"],
  21326. "additionalProperties": false
  21327. },
  21328. {
  21329. "type": "object",
  21330. "properties": {
  21331. "type": {
  21332. "type": "string",
  21333. "enum": ["aisdk"]
  21334. },
  21335. "package": {
  21336. "type": "string"
  21337. },
  21338. "url": {
  21339. "type": "string"
  21340. }
  21341. },
  21342. "required": ["type", "package"],
  21343. "additionalProperties": false
  21344. }
  21345. ]
  21346. },
  21347. "capabilities": {
  21348. "type": "object",
  21349. "properties": {
  21350. "tools": {
  21351. "type": "boolean"
  21352. },
  21353. "input": {
  21354. "type": "array",
  21355. "items": {
  21356. "type": "string"
  21357. }
  21358. },
  21359. "output": {
  21360. "type": "array",
  21361. "items": {
  21362. "type": "string"
  21363. }
  21364. }
  21365. },
  21366. "required": ["tools", "input", "output"],
  21367. "additionalProperties": false
  21368. },
  21369. "options": {
  21370. "type": "object",
  21371. "properties": {
  21372. "headers": {
  21373. "type": "object",
  21374. "additionalProperties": {
  21375. "type": "string"
  21376. }
  21377. },
  21378. "body": {
  21379. "type": "object"
  21380. },
  21381. "aisdk": {
  21382. "type": "object",
  21383. "properties": {
  21384. "provider": {
  21385. "type": "object"
  21386. },
  21387. "request": {
  21388. "type": "object"
  21389. }
  21390. },
  21391. "required": ["provider", "request"],
  21392. "additionalProperties": false
  21393. },
  21394. "variant": {
  21395. "type": "string"
  21396. }
  21397. },
  21398. "required": ["headers", "body", "aisdk"],
  21399. "additionalProperties": false
  21400. },
  21401. "variants": {
  21402. "type": "array",
  21403. "items": {
  21404. "type": "object",
  21405. "properties": {
  21406. "id": {
  21407. "type": "string"
  21408. },
  21409. "headers": {
  21410. "type": "object",
  21411. "additionalProperties": {
  21412. "type": "string"
  21413. }
  21414. },
  21415. "body": {
  21416. "type": "object"
  21417. },
  21418. "aisdk": {
  21419. "type": "object",
  21420. "properties": {
  21421. "provider": {
  21422. "type": "object"
  21423. },
  21424. "request": {
  21425. "type": "object"
  21426. }
  21427. },
  21428. "required": ["provider", "request"],
  21429. "additionalProperties": false
  21430. }
  21431. },
  21432. "required": ["id", "headers", "body", "aisdk"],
  21433. "additionalProperties": false
  21434. }
  21435. },
  21436. "time": {
  21437. "type": "object",
  21438. "properties": {
  21439. "released": {
  21440. "anyOf": [
  21441. {
  21442. "type": "number"
  21443. },
  21444. {
  21445. "type": "string",
  21446. "enum": ["NaN"]
  21447. },
  21448. {
  21449. "type": "string",
  21450. "enum": ["Infinity"]
  21451. },
  21452. {
  21453. "type": "string",
  21454. "enum": ["-Infinity"]
  21455. }
  21456. ]
  21457. }
  21458. },
  21459. "required": ["released"],
  21460. "additionalProperties": false
  21461. },
  21462. "cost": {
  21463. "type": "array",
  21464. "items": {
  21465. "type": "object",
  21466. "properties": {
  21467. "tier": {
  21468. "type": "object",
  21469. "properties": {
  21470. "type": {
  21471. "type": "string",
  21472. "enum": ["context"]
  21473. },
  21474. "size": {
  21475. "type": "integer"
  21476. }
  21477. },
  21478. "required": ["type", "size"],
  21479. "additionalProperties": false
  21480. },
  21481. "input": {
  21482. "type": "number"
  21483. },
  21484. "output": {
  21485. "type": "number"
  21486. },
  21487. "cache": {
  21488. "type": "object",
  21489. "properties": {
  21490. "read": {
  21491. "type": "number"
  21492. },
  21493. "write": {
  21494. "type": "number"
  21495. }
  21496. },
  21497. "required": ["read", "write"],
  21498. "additionalProperties": false
  21499. }
  21500. },
  21501. "required": ["input", "output", "cache"],
  21502. "additionalProperties": false
  21503. }
  21504. },
  21505. "status": {
  21506. "type": "string",
  21507. "enum": ["alpha", "beta", "deprecated", "active"]
  21508. },
  21509. "enabled": {
  21510. "type": "boolean"
  21511. },
  21512. "limit": {
  21513. "type": "object",
  21514. "properties": {
  21515. "context": {
  21516. "type": "integer"
  21517. },
  21518. "input": {
  21519. "type": "integer"
  21520. },
  21521. "output": {
  21522. "type": "integer"
  21523. }
  21524. },
  21525. "required": ["context", "output"],
  21526. "additionalProperties": false
  21527. }
  21528. },
  21529. "required": [
  21530. "id",
  21531. "apiID",
  21532. "providerID",
  21533. "name",
  21534. "endpoint",
  21535. "capabilities",
  21536. "options",
  21537. "variants",
  21538. "time",
  21539. "cost",
  21540. "status",
  21541. "enabled",
  21542. "limit"
  21543. ],
  21544. "additionalProperties": false
  21545. },
  21546. "BadRequestError": {
  21547. "type": "object",
  21548. "required": ["name", "data"],
  21549. "properties": {
  21550. "name": {
  21551. "type": "string",
  21552. "enum": ["BadRequest"]
  21553. },
  21554. "data": {
  21555. "type": "object",
  21556. "required": ["message"],
  21557. "properties": {
  21558. "message": {
  21559. "type": "string"
  21560. },
  21561. "kind": {
  21562. "type": "string",
  21563. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  21564. }
  21565. }
  21566. }
  21567. }
  21568. }
  21569. }
  21570. },
  21571. "security": [],
  21572. "tags": [
  21573. {
  21574. "name": "control",
  21575. "description": "Control plane routes."
  21576. },
  21577. {
  21578. "name": "global",
  21579. "description": "Global server routes."
  21580. },
  21581. {
  21582. "name": "event",
  21583. "description": "Instance event stream route."
  21584. },
  21585. {
  21586. "name": "config",
  21587. "description": "Experimental HttpApi config routes."
  21588. },
  21589. {
  21590. "name": "experimental",
  21591. "description": "Experimental HttpApi read-only routes."
  21592. },
  21593. {
  21594. "name": "file",
  21595. "description": "Experimental HttpApi file routes."
  21596. },
  21597. {
  21598. "name": "instance",
  21599. "description": "Experimental HttpApi instance read routes."
  21600. },
  21601. {
  21602. "name": "mcp",
  21603. "description": "Experimental HttpApi MCP routes."
  21604. },
  21605. {
  21606. "name": "project",
  21607. "description": "Experimental HttpApi project routes."
  21608. },
  21609. {
  21610. "name": "pty",
  21611. "description": "Experimental HttpApi PTY routes."
  21612. },
  21613. {
  21614. "name": "question",
  21615. "description": "Question routes."
  21616. },
  21617. {
  21618. "name": "permission",
  21619. "description": "Experimental HttpApi permission routes."
  21620. },
  21621. {
  21622. "name": "provider",
  21623. "description": "Experimental HttpApi provider routes."
  21624. },
  21625. {
  21626. "name": "session",
  21627. "description": "Experimental HttpApi session routes."
  21628. },
  21629. {
  21630. "name": "sync",
  21631. "description": "Experimental HttpApi sync routes."
  21632. },
  21633. {
  21634. "name": "v2",
  21635. "description": "Experimental v2 routes."
  21636. },
  21637. {
  21638. "name": "v2 messages",
  21639. "description": "Experimental v2 message routes."
  21640. },
  21641. {
  21642. "name": "v2 models",
  21643. "description": "Experimental v2 model routes."
  21644. },
  21645. {
  21646. "name": "v2 providers",
  21647. "description": "Experimental v2 provider routes."
  21648. },
  21649. {
  21650. "name": "tui",
  21651. "description": "Experimental HttpApi TUI routes."
  21652. },
  21653. {
  21654. "name": "workspace",
  21655. "description": "Experimental HttpApi workspace routes."
  21656. },
  21657. {
  21658. "name": "pty",
  21659. "description": "PTY websocket route."
  21660. }
  21661. ]
  21662. }