openapi.json 608 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170
  1. {
  2. "openapi": "3.1.0",
  3. "info": {
  4. "title": "opencode",
  5. "version": "1.0.0",
  6. "description": "opencode api"
  7. },
  8. "paths": {
  9. "/auth/{providerID}": {
  10. "put": {
  11. "tags": ["control"],
  12. "operationId": "auth.set",
  13. "parameters": [
  14. {
  15. "name": "providerID",
  16. "in": "path",
  17. "schema": {
  18. "type": "string"
  19. },
  20. "required": true
  21. }
  22. ],
  23. "responses": {
  24. "200": {
  25. "description": "Successfully set authentication credentials",
  26. "content": {
  27. "application/json": {
  28. "schema": {
  29. "type": "boolean",
  30. "description": "Successfully set authentication credentials"
  31. }
  32. }
  33. }
  34. },
  35. "400": {
  36. "description": "BadRequest | InvalidRequestError",
  37. "content": {
  38. "application/json": {
  39. "schema": {
  40. "anyOf": [
  41. {
  42. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  43. },
  44. {
  45. "$ref": "#/components/schemas/InvalidRequestError"
  46. }
  47. ]
  48. }
  49. }
  50. }
  51. }
  52. },
  53. "description": "Set authentication credentials",
  54. "summary": "Set auth credentials",
  55. "requestBody": {
  56. "content": {
  57. "application/json": {
  58. "schema": {
  59. "$ref": "#/components/schemas/Auth"
  60. }
  61. }
  62. }
  63. },
  64. "x-codeSamples": [
  65. {
  66. "lang": "js",
  67. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  68. }
  69. ]
  70. },
  71. "delete": {
  72. "tags": ["control"],
  73. "operationId": "auth.remove",
  74. "parameters": [
  75. {
  76. "name": "providerID",
  77. "in": "path",
  78. "schema": {
  79. "type": "string"
  80. },
  81. "required": true
  82. }
  83. ],
  84. "responses": {
  85. "200": {
  86. "description": "Successfully removed authentication credentials",
  87. "content": {
  88. "application/json": {
  89. "schema": {
  90. "type": "boolean",
  91. "description": "Successfully removed authentication credentials"
  92. }
  93. }
  94. }
  95. },
  96. "400": {
  97. "description": "BadRequest | InvalidRequestError",
  98. "content": {
  99. "application/json": {
  100. "schema": {
  101. "anyOf": [
  102. {
  103. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  104. },
  105. {
  106. "$ref": "#/components/schemas/InvalidRequestError"
  107. }
  108. ]
  109. }
  110. }
  111. }
  112. }
  113. },
  114. "description": "Remove authentication credentials",
  115. "summary": "Remove auth credentials",
  116. "x-codeSamples": [
  117. {
  118. "lang": "js",
  119. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  120. }
  121. ]
  122. }
  123. },
  124. "/log": {
  125. "post": {
  126. "tags": ["control"],
  127. "operationId": "app.log",
  128. "parameters": [
  129. {
  130. "name": "directory",
  131. "in": "query",
  132. "schema": {
  133. "type": "string"
  134. },
  135. "required": false
  136. },
  137. {
  138. "name": "workspace",
  139. "in": "query",
  140. "schema": {
  141. "type": "string"
  142. },
  143. "required": false
  144. }
  145. ],
  146. "responses": {
  147. "200": {
  148. "description": "Log entry written successfully",
  149. "content": {
  150. "application/json": {
  151. "schema": {
  152. "type": "boolean",
  153. "description": "Log entry written successfully"
  154. }
  155. }
  156. }
  157. },
  158. "400": {
  159. "description": "BadRequest | InvalidRequestError",
  160. "content": {
  161. "application/json": {
  162. "schema": {
  163. "anyOf": [
  164. {
  165. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  166. },
  167. {
  168. "$ref": "#/components/schemas/InvalidRequestError"
  169. }
  170. ]
  171. }
  172. }
  173. }
  174. }
  175. },
  176. "description": "Write a log entry to the server logs with specified level and metadata.",
  177. "summary": "Write log",
  178. "requestBody": {
  179. "content": {
  180. "application/json": {
  181. "schema": {
  182. "type": "object",
  183. "properties": {
  184. "service": {
  185. "type": "string",
  186. "description": "Service name for the log entry"
  187. },
  188. "level": {
  189. "type": "string",
  190. "enum": ["debug", "info", "error", "warn"],
  191. "description": "Log level"
  192. },
  193. "message": {
  194. "type": "string",
  195. "description": "Log message"
  196. },
  197. "extra": {
  198. "type": "object"
  199. }
  200. },
  201. "required": ["service", "level", "message"],
  202. "additionalProperties": false
  203. }
  204. }
  205. }
  206. },
  207. "x-codeSamples": [
  208. {
  209. "lang": "js",
  210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  211. }
  212. ]
  213. }
  214. },
  215. "/global/health": {
  216. "get": {
  217. "tags": ["global"],
  218. "operationId": "global.health",
  219. "parameters": [],
  220. "responses": {
  221. "200": {
  222. "description": "Health information",
  223. "content": {
  224. "application/json": {
  225. "schema": {
  226. "type": "object",
  227. "properties": {
  228. "healthy": {
  229. "type": "boolean",
  230. "enum": [true]
  231. },
  232. "version": {
  233. "type": "string"
  234. }
  235. },
  236. "required": ["healthy", "version"],
  237. "additionalProperties": false,
  238. "description": "Health information"
  239. }
  240. }
  241. }
  242. },
  243. "400": {
  244. "description": "Bad request",
  245. "content": {
  246. "application/json": {
  247. "schema": {
  248. "$ref": "#/components/schemas/BadRequestError"
  249. }
  250. }
  251. }
  252. }
  253. },
  254. "description": "Get health information about the OpenCode server.",
  255. "summary": "Get health",
  256. "x-codeSamples": [
  257. {
  258. "lang": "js",
  259. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  260. }
  261. ]
  262. }
  263. },
  264. "/global/event": {
  265. "get": {
  266. "tags": ["global"],
  267. "operationId": "global.event",
  268. "parameters": [],
  269. "responses": {
  270. "200": {
  271. "description": "Event stream",
  272. "content": {
  273. "text/event-stream": {
  274. "schema": {
  275. "$ref": "#/components/schemas/GlobalEvent"
  276. }
  277. }
  278. }
  279. },
  280. "400": {
  281. "description": "Bad request",
  282. "content": {
  283. "application/json": {
  284. "schema": {
  285. "$ref": "#/components/schemas/BadRequestError"
  286. }
  287. }
  288. }
  289. }
  290. },
  291. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  292. "summary": "Get global events",
  293. "x-codeSamples": [
  294. {
  295. "lang": "js",
  296. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  297. }
  298. ]
  299. }
  300. },
  301. "/global/config": {
  302. "get": {
  303. "tags": ["global"],
  304. "operationId": "global.config.get",
  305. "parameters": [],
  306. "responses": {
  307. "200": {
  308. "description": "Get global config info",
  309. "content": {
  310. "application/json": {
  311. "schema": {
  312. "$ref": "#/components/schemas/Config"
  313. }
  314. }
  315. }
  316. },
  317. "400": {
  318. "description": "Bad request",
  319. "content": {
  320. "application/json": {
  321. "schema": {
  322. "$ref": "#/components/schemas/BadRequestError"
  323. }
  324. }
  325. }
  326. }
  327. },
  328. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  329. "summary": "Get global configuration",
  330. "x-codeSamples": [
  331. {
  332. "lang": "js",
  333. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  334. }
  335. ]
  336. },
  337. "patch": {
  338. "tags": ["global"],
  339. "operationId": "global.config.update",
  340. "parameters": [],
  341. "responses": {
  342. "200": {
  343. "description": "Successfully updated global config",
  344. "content": {
  345. "application/json": {
  346. "schema": {
  347. "$ref": "#/components/schemas/Config"
  348. }
  349. }
  350. }
  351. },
  352. "400": {
  353. "description": "BadRequest | InvalidRequestError",
  354. "content": {
  355. "application/json": {
  356. "schema": {
  357. "anyOf": [
  358. {
  359. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  360. },
  361. {
  362. "$ref": "#/components/schemas/InvalidRequestError"
  363. }
  364. ]
  365. }
  366. }
  367. }
  368. }
  369. },
  370. "description": "Update global OpenCode configuration settings and preferences.",
  371. "summary": "Update global configuration",
  372. "requestBody": {
  373. "content": {
  374. "application/json": {
  375. "schema": {
  376. "$ref": "#/components/schemas/Config"
  377. }
  378. }
  379. }
  380. },
  381. "x-codeSamples": [
  382. {
  383. "lang": "js",
  384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  385. }
  386. ]
  387. }
  388. },
  389. "/global/dispose": {
  390. "post": {
  391. "tags": ["global"],
  392. "operationId": "global.dispose",
  393. "parameters": [],
  394. "responses": {
  395. "200": {
  396. "description": "Global disposed",
  397. "content": {
  398. "application/json": {
  399. "schema": {
  400. "type": "boolean",
  401. "description": "Global disposed"
  402. }
  403. }
  404. }
  405. },
  406. "400": {
  407. "description": "Bad request",
  408. "content": {
  409. "application/json": {
  410. "schema": {
  411. "$ref": "#/components/schemas/BadRequestError"
  412. }
  413. }
  414. }
  415. }
  416. },
  417. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  418. "summary": "Dispose instance",
  419. "x-codeSamples": [
  420. {
  421. "lang": "js",
  422. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  423. }
  424. ]
  425. }
  426. },
  427. "/global/upgrade": {
  428. "post": {
  429. "tags": ["global"],
  430. "operationId": "global.upgrade",
  431. "parameters": [],
  432. "responses": {
  433. "200": {
  434. "description": "Upgrade result",
  435. "content": {
  436. "application/json": {
  437. "schema": {
  438. "anyOf": [
  439. {
  440. "type": "object",
  441. "properties": {
  442. "success": {
  443. "type": "boolean",
  444. "enum": [true]
  445. },
  446. "version": {
  447. "type": "string"
  448. }
  449. },
  450. "required": ["success", "version"],
  451. "additionalProperties": false
  452. },
  453. {
  454. "type": "object",
  455. "properties": {
  456. "success": {
  457. "type": "boolean",
  458. "enum": [false]
  459. },
  460. "error": {
  461. "type": "string"
  462. }
  463. },
  464. "required": ["success", "error"],
  465. "additionalProperties": false
  466. }
  467. ],
  468. "description": "Upgrade result"
  469. }
  470. }
  471. }
  472. },
  473. "400": {
  474. "description": "BadRequest | InvalidRequestError",
  475. "content": {
  476. "application/json": {
  477. "schema": {
  478. "anyOf": [
  479. {
  480. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  481. },
  482. {
  483. "$ref": "#/components/schemas/InvalidRequestError"
  484. }
  485. ]
  486. }
  487. }
  488. }
  489. }
  490. },
  491. "description": "Upgrade opencode to the specified version or latest if not specified.",
  492. "summary": "Upgrade opencode",
  493. "requestBody": {
  494. "content": {
  495. "application/json": {
  496. "schema": {
  497. "type": "object",
  498. "properties": {
  499. "target": {
  500. "type": "string"
  501. }
  502. },
  503. "additionalProperties": false
  504. }
  505. }
  506. }
  507. },
  508. "x-codeSamples": [
  509. {
  510. "lang": "js",
  511. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  512. }
  513. ]
  514. }
  515. },
  516. "/event": {
  517. "get": {
  518. "tags": ["event"],
  519. "operationId": "event.subscribe",
  520. "parameters": [
  521. {
  522. "name": "directory",
  523. "in": "query",
  524. "schema": {
  525. "type": "string"
  526. },
  527. "required": false
  528. },
  529. {
  530. "name": "workspace",
  531. "in": "query",
  532. "schema": {
  533. "type": "string"
  534. },
  535. "required": false
  536. }
  537. ],
  538. "responses": {
  539. "200": {
  540. "description": "Event stream",
  541. "content": {
  542. "text/event-stream": {
  543. "schema": {
  544. "$ref": "#/components/schemas/Event"
  545. }
  546. }
  547. }
  548. }
  549. },
  550. "description": "Get events",
  551. "summary": "Subscribe to events",
  552. "x-codeSamples": [
  553. {
  554. "lang": "js",
  555. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  556. }
  557. ]
  558. }
  559. },
  560. "/config": {
  561. "get": {
  562. "tags": ["config"],
  563. "operationId": "config.get",
  564. "parameters": [
  565. {
  566. "name": "directory",
  567. "in": "query",
  568. "schema": {
  569. "type": "string"
  570. },
  571. "required": false
  572. },
  573. {
  574. "name": "workspace",
  575. "in": "query",
  576. "schema": {
  577. "type": "string"
  578. },
  579. "required": false
  580. }
  581. ],
  582. "responses": {
  583. "200": {
  584. "description": "Get config info",
  585. "content": {
  586. "application/json": {
  587. "schema": {
  588. "$ref": "#/components/schemas/Config"
  589. }
  590. }
  591. }
  592. },
  593. "400": {
  594. "description": "Bad request",
  595. "content": {
  596. "application/json": {
  597. "schema": {
  598. "$ref": "#/components/schemas/BadRequestError"
  599. }
  600. }
  601. }
  602. }
  603. },
  604. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  605. "summary": "Get configuration",
  606. "x-codeSamples": [
  607. {
  608. "lang": "js",
  609. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  610. }
  611. ]
  612. },
  613. "patch": {
  614. "tags": ["config"],
  615. "operationId": "config.update",
  616. "parameters": [
  617. {
  618. "name": "directory",
  619. "in": "query",
  620. "schema": {
  621. "type": "string"
  622. },
  623. "required": false
  624. },
  625. {
  626. "name": "workspace",
  627. "in": "query",
  628. "schema": {
  629. "type": "string"
  630. },
  631. "required": false
  632. }
  633. ],
  634. "responses": {
  635. "200": {
  636. "description": "Successfully updated config",
  637. "content": {
  638. "application/json": {
  639. "schema": {
  640. "$ref": "#/components/schemas/Config"
  641. }
  642. }
  643. }
  644. },
  645. "400": {
  646. "description": "BadRequest | InvalidRequestError",
  647. "content": {
  648. "application/json": {
  649. "schema": {
  650. "anyOf": [
  651. {
  652. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  653. },
  654. {
  655. "$ref": "#/components/schemas/InvalidRequestError"
  656. }
  657. ]
  658. }
  659. }
  660. }
  661. }
  662. },
  663. "description": "Update OpenCode configuration settings and preferences.",
  664. "summary": "Update configuration",
  665. "requestBody": {
  666. "content": {
  667. "application/json": {
  668. "schema": {
  669. "$ref": "#/components/schemas/Config"
  670. }
  671. }
  672. }
  673. },
  674. "x-codeSamples": [
  675. {
  676. "lang": "js",
  677. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  678. }
  679. ]
  680. }
  681. },
  682. "/config/providers": {
  683. "get": {
  684. "tags": ["config"],
  685. "operationId": "config.providers",
  686. "parameters": [
  687. {
  688. "name": "directory",
  689. "in": "query",
  690. "schema": {
  691. "type": "string"
  692. },
  693. "required": false
  694. },
  695. {
  696. "name": "workspace",
  697. "in": "query",
  698. "schema": {
  699. "type": "string"
  700. },
  701. "required": false
  702. }
  703. ],
  704. "responses": {
  705. "200": {
  706. "description": "List of providers",
  707. "content": {
  708. "application/json": {
  709. "schema": {
  710. "type": "object",
  711. "properties": {
  712. "providers": {
  713. "type": "array",
  714. "items": {
  715. "$ref": "#/components/schemas/Provider"
  716. }
  717. },
  718. "default": {
  719. "type": "object",
  720. "additionalProperties": {
  721. "type": "string"
  722. }
  723. }
  724. },
  725. "required": ["providers", "default"],
  726. "additionalProperties": false,
  727. "description": "List of providers"
  728. }
  729. }
  730. }
  731. },
  732. "400": {
  733. "description": "Bad request",
  734. "content": {
  735. "application/json": {
  736. "schema": {
  737. "$ref": "#/components/schemas/BadRequestError"
  738. }
  739. }
  740. }
  741. }
  742. },
  743. "description": "Get a list of all configured AI providers and their default models.",
  744. "summary": "List config providers",
  745. "x-codeSamples": [
  746. {
  747. "lang": "js",
  748. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  749. }
  750. ]
  751. }
  752. },
  753. "/experimental/console": {
  754. "get": {
  755. "tags": ["experimental"],
  756. "operationId": "experimental.console.get",
  757. "parameters": [
  758. {
  759. "name": "directory",
  760. "in": "query",
  761. "schema": {
  762. "type": "string"
  763. },
  764. "required": false
  765. },
  766. {
  767. "name": "workspace",
  768. "in": "query",
  769. "schema": {
  770. "type": "string"
  771. },
  772. "required": false
  773. }
  774. ],
  775. "responses": {
  776. "200": {
  777. "description": "Active Console provider metadata",
  778. "content": {
  779. "application/json": {
  780. "schema": {
  781. "$ref": "#/components/schemas/ConsoleState"
  782. }
  783. }
  784. }
  785. },
  786. "400": {
  787. "description": "Bad request",
  788. "content": {
  789. "application/json": {
  790. "schema": {
  791. "$ref": "#/components/schemas/BadRequestError"
  792. }
  793. }
  794. }
  795. },
  796. "500": {
  797. "description": "InternalServerError",
  798. "content": {
  799. "application/json": {
  800. "schema": {
  801. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  802. }
  803. }
  804. }
  805. }
  806. },
  807. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  808. "summary": "Get active Console provider metadata",
  809. "x-codeSamples": [
  810. {
  811. "lang": "js",
  812. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  813. }
  814. ]
  815. }
  816. },
  817. "/experimental/console/orgs": {
  818. "get": {
  819. "tags": ["experimental"],
  820. "operationId": "experimental.console.listOrgs",
  821. "parameters": [
  822. {
  823. "name": "directory",
  824. "in": "query",
  825. "schema": {
  826. "type": "string"
  827. },
  828. "required": false
  829. },
  830. {
  831. "name": "workspace",
  832. "in": "query",
  833. "schema": {
  834. "type": "string"
  835. },
  836. "required": false
  837. }
  838. ],
  839. "responses": {
  840. "200": {
  841. "description": "Switchable Console orgs",
  842. "content": {
  843. "application/json": {
  844. "schema": {
  845. "type": "object",
  846. "properties": {
  847. "orgs": {
  848. "type": "array",
  849. "items": {
  850. "type": "object",
  851. "properties": {
  852. "accountID": {
  853. "type": "string"
  854. },
  855. "accountEmail": {
  856. "type": "string"
  857. },
  858. "accountUrl": {
  859. "type": "string"
  860. },
  861. "orgID": {
  862. "type": "string"
  863. },
  864. "orgName": {
  865. "type": "string"
  866. },
  867. "active": {
  868. "type": "boolean"
  869. }
  870. },
  871. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  872. "additionalProperties": false
  873. }
  874. }
  875. },
  876. "required": ["orgs"],
  877. "additionalProperties": false,
  878. "description": "Switchable Console orgs"
  879. }
  880. }
  881. }
  882. },
  883. "400": {
  884. "description": "Bad request",
  885. "content": {
  886. "application/json": {
  887. "schema": {
  888. "$ref": "#/components/schemas/BadRequestError"
  889. }
  890. }
  891. }
  892. },
  893. "500": {
  894. "description": "InternalServerError",
  895. "content": {
  896. "application/json": {
  897. "schema": {
  898. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  899. }
  900. }
  901. }
  902. }
  903. },
  904. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  905. "summary": "List switchable Console orgs",
  906. "x-codeSamples": [
  907. {
  908. "lang": "js",
  909. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  910. }
  911. ]
  912. }
  913. },
  914. "/experimental/console/switch": {
  915. "post": {
  916. "tags": ["experimental"],
  917. "operationId": "experimental.console.switchOrg",
  918. "parameters": [
  919. {
  920. "name": "directory",
  921. "in": "query",
  922. "schema": {
  923. "type": "string"
  924. },
  925. "required": false
  926. },
  927. {
  928. "name": "workspace",
  929. "in": "query",
  930. "schema": {
  931. "type": "string"
  932. },
  933. "required": false
  934. }
  935. ],
  936. "responses": {
  937. "200": {
  938. "description": "Switch success",
  939. "content": {
  940. "application/json": {
  941. "schema": {
  942. "type": "boolean",
  943. "description": "Switch success"
  944. }
  945. }
  946. }
  947. }
  948. },
  949. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  950. "summary": "Switch active Console org",
  951. "requestBody": {
  952. "content": {
  953. "application/json": {
  954. "schema": {
  955. "type": "object",
  956. "properties": {
  957. "accountID": {
  958. "type": "string"
  959. },
  960. "orgID": {
  961. "type": "string"
  962. }
  963. },
  964. "required": ["accountID", "orgID"],
  965. "additionalProperties": false
  966. }
  967. }
  968. }
  969. },
  970. "x-codeSamples": [
  971. {
  972. "lang": "js",
  973. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  974. }
  975. ]
  976. }
  977. },
  978. "/experimental/tool": {
  979. "get": {
  980. "tags": ["experimental"],
  981. "operationId": "tool.list",
  982. "parameters": [
  983. {
  984. "name": "directory",
  985. "in": "query",
  986. "schema": {
  987. "type": "string"
  988. },
  989. "required": false
  990. },
  991. {
  992. "name": "workspace",
  993. "in": "query",
  994. "schema": {
  995. "type": "string"
  996. },
  997. "required": false
  998. },
  999. {
  1000. "name": "provider",
  1001. "in": "query",
  1002. "schema": {
  1003. "type": "string"
  1004. },
  1005. "required": true
  1006. },
  1007. {
  1008. "name": "model",
  1009. "in": "query",
  1010. "schema": {
  1011. "type": "string"
  1012. },
  1013. "required": true
  1014. }
  1015. ],
  1016. "responses": {
  1017. "200": {
  1018. "description": "Tools",
  1019. "content": {
  1020. "application/json": {
  1021. "schema": {
  1022. "$ref": "#/components/schemas/ToolList"
  1023. }
  1024. }
  1025. }
  1026. },
  1027. "400": {
  1028. "description": "BadRequest | InvalidRequestError",
  1029. "content": {
  1030. "application/json": {
  1031. "schema": {
  1032. "anyOf": [
  1033. {
  1034. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1035. },
  1036. {
  1037. "$ref": "#/components/schemas/InvalidRequestError"
  1038. }
  1039. ]
  1040. }
  1041. }
  1042. }
  1043. }
  1044. },
  1045. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1046. "summary": "List tools",
  1047. "x-codeSamples": [
  1048. {
  1049. "lang": "js",
  1050. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1051. }
  1052. ]
  1053. }
  1054. },
  1055. "/experimental/tool/ids": {
  1056. "get": {
  1057. "tags": ["experimental"],
  1058. "operationId": "tool.ids",
  1059. "parameters": [
  1060. {
  1061. "name": "directory",
  1062. "in": "query",
  1063. "schema": {
  1064. "type": "string"
  1065. },
  1066. "required": false
  1067. },
  1068. {
  1069. "name": "workspace",
  1070. "in": "query",
  1071. "schema": {
  1072. "type": "string"
  1073. },
  1074. "required": false
  1075. }
  1076. ],
  1077. "responses": {
  1078. "200": {
  1079. "description": "Tool IDs",
  1080. "content": {
  1081. "application/json": {
  1082. "schema": {
  1083. "$ref": "#/components/schemas/ToolIDs"
  1084. }
  1085. }
  1086. }
  1087. },
  1088. "400": {
  1089. "description": "BadRequest | InvalidRequestError",
  1090. "content": {
  1091. "application/json": {
  1092. "schema": {
  1093. "anyOf": [
  1094. {
  1095. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1096. },
  1097. {
  1098. "$ref": "#/components/schemas/InvalidRequestError"
  1099. }
  1100. ]
  1101. }
  1102. }
  1103. }
  1104. }
  1105. },
  1106. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1107. "summary": "List tool IDs",
  1108. "x-codeSamples": [
  1109. {
  1110. "lang": "js",
  1111. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1112. }
  1113. ]
  1114. }
  1115. },
  1116. "/experimental/worktree": {
  1117. "get": {
  1118. "tags": ["experimental"],
  1119. "operationId": "worktree.list",
  1120. "parameters": [
  1121. {
  1122. "name": "directory",
  1123. "in": "query",
  1124. "schema": {
  1125. "type": "string"
  1126. },
  1127. "required": false
  1128. },
  1129. {
  1130. "name": "workspace",
  1131. "in": "query",
  1132. "schema": {
  1133. "type": "string"
  1134. },
  1135. "required": false
  1136. }
  1137. ],
  1138. "responses": {
  1139. "200": {
  1140. "description": "List of worktree directories",
  1141. "content": {
  1142. "application/json": {
  1143. "schema": {
  1144. "type": "array",
  1145. "items": {
  1146. "type": "string"
  1147. },
  1148. "description": "List of worktree directories"
  1149. }
  1150. }
  1151. }
  1152. },
  1153. "400": {
  1154. "description": "WorktreeError | InvalidRequestError",
  1155. "content": {
  1156. "application/json": {
  1157. "schema": {
  1158. "anyOf": [
  1159. {
  1160. "$ref": "#/components/schemas/WorktreeError"
  1161. },
  1162. {
  1163. "$ref": "#/components/schemas/InvalidRequestError"
  1164. }
  1165. ]
  1166. }
  1167. }
  1168. }
  1169. }
  1170. },
  1171. "description": "List all sandbox worktrees for the current project.",
  1172. "summary": "List worktrees",
  1173. "x-codeSamples": [
  1174. {
  1175. "lang": "js",
  1176. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1177. }
  1178. ]
  1179. },
  1180. "post": {
  1181. "tags": ["experimental"],
  1182. "operationId": "worktree.create",
  1183. "parameters": [
  1184. {
  1185. "name": "directory",
  1186. "in": "query",
  1187. "schema": {
  1188. "type": "string"
  1189. },
  1190. "required": false
  1191. },
  1192. {
  1193. "name": "workspace",
  1194. "in": "query",
  1195. "schema": {
  1196. "type": "string"
  1197. },
  1198. "required": false
  1199. }
  1200. ],
  1201. "responses": {
  1202. "200": {
  1203. "description": "Worktree created",
  1204. "content": {
  1205. "application/json": {
  1206. "schema": {
  1207. "$ref": "#/components/schemas/Worktree"
  1208. }
  1209. }
  1210. }
  1211. },
  1212. "400": {
  1213. "description": "WorktreeError | InvalidRequestError",
  1214. "content": {
  1215. "application/json": {
  1216. "schema": {
  1217. "anyOf": [
  1218. {
  1219. "$ref": "#/components/schemas/WorktreeError"
  1220. },
  1221. {
  1222. "$ref": "#/components/schemas/InvalidRequestError"
  1223. }
  1224. ]
  1225. }
  1226. }
  1227. }
  1228. }
  1229. },
  1230. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1231. "summary": "Create worktree",
  1232. "requestBody": {
  1233. "content": {
  1234. "application/json": {
  1235. "schema": {
  1236. "$ref": "#/components/schemas/WorktreeCreateInput"
  1237. }
  1238. }
  1239. }
  1240. },
  1241. "x-codeSamples": [
  1242. {
  1243. "lang": "js",
  1244. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1245. }
  1246. ]
  1247. },
  1248. "delete": {
  1249. "tags": ["experimental"],
  1250. "operationId": "worktree.remove",
  1251. "parameters": [
  1252. {
  1253. "name": "directory",
  1254. "in": "query",
  1255. "schema": {
  1256. "type": "string"
  1257. },
  1258. "required": false
  1259. },
  1260. {
  1261. "name": "workspace",
  1262. "in": "query",
  1263. "schema": {
  1264. "type": "string"
  1265. },
  1266. "required": false
  1267. }
  1268. ],
  1269. "responses": {
  1270. "200": {
  1271. "description": "Worktree removed",
  1272. "content": {
  1273. "application/json": {
  1274. "schema": {
  1275. "type": "boolean",
  1276. "description": "Worktree removed"
  1277. }
  1278. }
  1279. }
  1280. },
  1281. "400": {
  1282. "description": "WorktreeError | InvalidRequestError",
  1283. "content": {
  1284. "application/json": {
  1285. "schema": {
  1286. "anyOf": [
  1287. {
  1288. "$ref": "#/components/schemas/WorktreeError"
  1289. },
  1290. {
  1291. "$ref": "#/components/schemas/InvalidRequestError"
  1292. }
  1293. ]
  1294. }
  1295. }
  1296. }
  1297. }
  1298. },
  1299. "description": "Remove a git worktree and delete its branch.",
  1300. "summary": "Remove worktree",
  1301. "requestBody": {
  1302. "content": {
  1303. "application/json": {
  1304. "schema": {
  1305. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1306. }
  1307. }
  1308. }
  1309. },
  1310. "x-codeSamples": [
  1311. {
  1312. "lang": "js",
  1313. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1314. }
  1315. ]
  1316. }
  1317. },
  1318. "/experimental/worktree/reset": {
  1319. "post": {
  1320. "tags": ["experimental"],
  1321. "operationId": "worktree.reset",
  1322. "parameters": [
  1323. {
  1324. "name": "directory",
  1325. "in": "query",
  1326. "schema": {
  1327. "type": "string"
  1328. },
  1329. "required": false
  1330. },
  1331. {
  1332. "name": "workspace",
  1333. "in": "query",
  1334. "schema": {
  1335. "type": "string"
  1336. },
  1337. "required": false
  1338. }
  1339. ],
  1340. "responses": {
  1341. "200": {
  1342. "description": "Worktree reset",
  1343. "content": {
  1344. "application/json": {
  1345. "schema": {
  1346. "type": "boolean",
  1347. "description": "Worktree reset"
  1348. }
  1349. }
  1350. }
  1351. },
  1352. "400": {
  1353. "description": "WorktreeError | InvalidRequestError",
  1354. "content": {
  1355. "application/json": {
  1356. "schema": {
  1357. "anyOf": [
  1358. {
  1359. "$ref": "#/components/schemas/WorktreeError"
  1360. },
  1361. {
  1362. "$ref": "#/components/schemas/InvalidRequestError"
  1363. }
  1364. ]
  1365. }
  1366. }
  1367. }
  1368. }
  1369. },
  1370. "description": "Reset a worktree branch to the primary default branch.",
  1371. "summary": "Reset worktree",
  1372. "requestBody": {
  1373. "content": {
  1374. "application/json": {
  1375. "schema": {
  1376. "$ref": "#/components/schemas/WorktreeResetInput"
  1377. }
  1378. }
  1379. }
  1380. },
  1381. "x-codeSamples": [
  1382. {
  1383. "lang": "js",
  1384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1385. }
  1386. ]
  1387. }
  1388. },
  1389. "/experimental/session": {
  1390. "get": {
  1391. "tags": ["experimental"],
  1392. "operationId": "experimental.session.list",
  1393. "parameters": [
  1394. {
  1395. "name": "directory",
  1396. "in": "query",
  1397. "schema": {
  1398. "type": "string"
  1399. },
  1400. "required": false
  1401. },
  1402. {
  1403. "name": "workspace",
  1404. "in": "query",
  1405. "schema": {
  1406. "type": "string"
  1407. },
  1408. "required": false
  1409. },
  1410. {
  1411. "name": "roots",
  1412. "in": "query",
  1413. "schema": {
  1414. "anyOf": [
  1415. {
  1416. "type": "boolean"
  1417. },
  1418. {
  1419. "type": "string",
  1420. "enum": ["true", "false"]
  1421. }
  1422. ]
  1423. },
  1424. "required": false
  1425. },
  1426. {
  1427. "name": "start",
  1428. "in": "query",
  1429. "schema": {
  1430. "type": "number"
  1431. },
  1432. "required": false
  1433. },
  1434. {
  1435. "name": "cursor",
  1436. "in": "query",
  1437. "schema": {
  1438. "type": "number"
  1439. },
  1440. "required": false
  1441. },
  1442. {
  1443. "name": "search",
  1444. "in": "query",
  1445. "schema": {
  1446. "type": "string"
  1447. },
  1448. "required": false
  1449. },
  1450. {
  1451. "name": "limit",
  1452. "in": "query",
  1453. "schema": {
  1454. "type": "number"
  1455. },
  1456. "required": false
  1457. },
  1458. {
  1459. "name": "archived",
  1460. "in": "query",
  1461. "schema": {
  1462. "anyOf": [
  1463. {
  1464. "type": "boolean"
  1465. },
  1466. {
  1467. "type": "string",
  1468. "enum": ["true", "false"]
  1469. }
  1470. ]
  1471. },
  1472. "required": false
  1473. }
  1474. ],
  1475. "responses": {
  1476. "200": {
  1477. "description": "List of sessions",
  1478. "content": {
  1479. "application/json": {
  1480. "schema": {
  1481. "type": "array",
  1482. "items": {
  1483. "$ref": "#/components/schemas/GlobalSession"
  1484. },
  1485. "description": "List of sessions"
  1486. }
  1487. }
  1488. }
  1489. },
  1490. "400": {
  1491. "description": "Bad request",
  1492. "content": {
  1493. "application/json": {
  1494. "schema": {
  1495. "$ref": "#/components/schemas/BadRequestError"
  1496. }
  1497. }
  1498. }
  1499. }
  1500. },
  1501. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1502. "summary": "List sessions",
  1503. "x-codeSamples": [
  1504. {
  1505. "lang": "js",
  1506. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1507. }
  1508. ]
  1509. }
  1510. },
  1511. "/experimental/resource": {
  1512. "get": {
  1513. "tags": ["experimental"],
  1514. "operationId": "experimental.resource.list",
  1515. "parameters": [
  1516. {
  1517. "name": "directory",
  1518. "in": "query",
  1519. "schema": {
  1520. "type": "string"
  1521. },
  1522. "required": false
  1523. },
  1524. {
  1525. "name": "workspace",
  1526. "in": "query",
  1527. "schema": {
  1528. "type": "string"
  1529. },
  1530. "required": false
  1531. }
  1532. ],
  1533. "responses": {
  1534. "200": {
  1535. "description": "MCP resources",
  1536. "content": {
  1537. "application/json": {
  1538. "schema": {
  1539. "type": "object",
  1540. "additionalProperties": {
  1541. "$ref": "#/components/schemas/McpResource"
  1542. },
  1543. "description": "MCP resources"
  1544. }
  1545. }
  1546. }
  1547. },
  1548. "400": {
  1549. "description": "Bad request",
  1550. "content": {
  1551. "application/json": {
  1552. "schema": {
  1553. "$ref": "#/components/schemas/BadRequestError"
  1554. }
  1555. }
  1556. }
  1557. }
  1558. },
  1559. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1560. "summary": "Get MCP resources",
  1561. "x-codeSamples": [
  1562. {
  1563. "lang": "js",
  1564. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1565. }
  1566. ]
  1567. }
  1568. },
  1569. "/find": {
  1570. "get": {
  1571. "tags": ["file"],
  1572. "operationId": "find.text",
  1573. "parameters": [
  1574. {
  1575. "name": "directory",
  1576. "in": "query",
  1577. "schema": {
  1578. "type": "string"
  1579. },
  1580. "required": false
  1581. },
  1582. {
  1583. "name": "workspace",
  1584. "in": "query",
  1585. "schema": {
  1586. "type": "string"
  1587. },
  1588. "required": false
  1589. },
  1590. {
  1591. "name": "pattern",
  1592. "in": "query",
  1593. "schema": {
  1594. "type": "string"
  1595. },
  1596. "required": true
  1597. }
  1598. ],
  1599. "responses": {
  1600. "200": {
  1601. "description": "Matches",
  1602. "content": {
  1603. "application/json": {
  1604. "schema": {
  1605. "type": "array",
  1606. "items": {
  1607. "type": "object",
  1608. "properties": {
  1609. "path": {
  1610. "type": "object",
  1611. "properties": {
  1612. "text": {
  1613. "type": "string"
  1614. }
  1615. },
  1616. "required": ["text"],
  1617. "additionalProperties": false
  1618. },
  1619. "lines": {
  1620. "type": "object",
  1621. "properties": {
  1622. "text": {
  1623. "type": "string"
  1624. }
  1625. },
  1626. "required": ["text"],
  1627. "additionalProperties": false
  1628. },
  1629. "line_number": {
  1630. "type": "integer",
  1631. "minimum": 0
  1632. },
  1633. "absolute_offset": {
  1634. "type": "integer",
  1635. "minimum": 0
  1636. },
  1637. "submatches": {
  1638. "type": "array",
  1639. "items": {
  1640. "type": "object",
  1641. "properties": {
  1642. "match": {
  1643. "type": "object",
  1644. "properties": {
  1645. "text": {
  1646. "type": "string"
  1647. }
  1648. },
  1649. "required": ["text"],
  1650. "additionalProperties": false
  1651. },
  1652. "start": {
  1653. "type": "integer",
  1654. "minimum": 0
  1655. },
  1656. "end": {
  1657. "type": "integer",
  1658. "minimum": 0
  1659. }
  1660. },
  1661. "required": ["match", "start", "end"],
  1662. "additionalProperties": false
  1663. }
  1664. }
  1665. },
  1666. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1667. "additionalProperties": false
  1668. },
  1669. "description": "Matches"
  1670. }
  1671. }
  1672. }
  1673. },
  1674. "400": {
  1675. "description": "Bad request",
  1676. "content": {
  1677. "application/json": {
  1678. "schema": {
  1679. "$ref": "#/components/schemas/BadRequestError"
  1680. }
  1681. }
  1682. }
  1683. }
  1684. },
  1685. "description": "Search for text patterns across files in the project using ripgrep.",
  1686. "summary": "Find text",
  1687. "x-codeSamples": [
  1688. {
  1689. "lang": "js",
  1690. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1691. }
  1692. ]
  1693. }
  1694. },
  1695. "/find/file": {
  1696. "get": {
  1697. "tags": ["file"],
  1698. "operationId": "find.files",
  1699. "parameters": [
  1700. {
  1701. "name": "directory",
  1702. "in": "query",
  1703. "schema": {
  1704. "type": "string"
  1705. },
  1706. "required": false
  1707. },
  1708. {
  1709. "name": "workspace",
  1710. "in": "query",
  1711. "schema": {
  1712. "type": "string"
  1713. },
  1714. "required": false
  1715. },
  1716. {
  1717. "name": "query",
  1718. "in": "query",
  1719. "schema": {
  1720. "type": "string"
  1721. },
  1722. "required": true
  1723. },
  1724. {
  1725. "name": "dirs",
  1726. "in": "query",
  1727. "schema": {
  1728. "type": "string",
  1729. "enum": ["true", "false"]
  1730. },
  1731. "required": false
  1732. },
  1733. {
  1734. "name": "type",
  1735. "in": "query",
  1736. "schema": {
  1737. "type": "string",
  1738. "enum": ["file", "directory"]
  1739. },
  1740. "required": false
  1741. },
  1742. {
  1743. "name": "limit",
  1744. "in": "query",
  1745. "schema": {
  1746. "type": "integer",
  1747. "minimum": 1,
  1748. "maximum": 200
  1749. },
  1750. "required": false
  1751. }
  1752. ],
  1753. "responses": {
  1754. "200": {
  1755. "description": "File paths",
  1756. "content": {
  1757. "application/json": {
  1758. "schema": {
  1759. "type": "array",
  1760. "items": {
  1761. "type": "string"
  1762. },
  1763. "description": "File paths"
  1764. }
  1765. }
  1766. }
  1767. },
  1768. "400": {
  1769. "description": "Bad request",
  1770. "content": {
  1771. "application/json": {
  1772. "schema": {
  1773. "$ref": "#/components/schemas/BadRequestError"
  1774. }
  1775. }
  1776. }
  1777. }
  1778. },
  1779. "description": "Search for files or directories by name or pattern in the project directory.",
  1780. "summary": "Find files",
  1781. "x-codeSamples": [
  1782. {
  1783. "lang": "js",
  1784. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1785. }
  1786. ]
  1787. }
  1788. },
  1789. "/find/symbol": {
  1790. "get": {
  1791. "tags": ["file"],
  1792. "operationId": "find.symbols",
  1793. "parameters": [
  1794. {
  1795. "name": "directory",
  1796. "in": "query",
  1797. "schema": {
  1798. "type": "string"
  1799. },
  1800. "required": false
  1801. },
  1802. {
  1803. "name": "workspace",
  1804. "in": "query",
  1805. "schema": {
  1806. "type": "string"
  1807. },
  1808. "required": false
  1809. },
  1810. {
  1811. "name": "query",
  1812. "in": "query",
  1813. "schema": {
  1814. "type": "string"
  1815. },
  1816. "required": true
  1817. }
  1818. ],
  1819. "responses": {
  1820. "200": {
  1821. "description": "Symbols",
  1822. "content": {
  1823. "application/json": {
  1824. "schema": {
  1825. "type": "array",
  1826. "items": {
  1827. "$ref": "#/components/schemas/Symbol"
  1828. },
  1829. "description": "Symbols"
  1830. }
  1831. }
  1832. }
  1833. },
  1834. "400": {
  1835. "description": "Bad request",
  1836. "content": {
  1837. "application/json": {
  1838. "schema": {
  1839. "$ref": "#/components/schemas/BadRequestError"
  1840. }
  1841. }
  1842. }
  1843. }
  1844. },
  1845. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  1846. "summary": "Find symbols",
  1847. "x-codeSamples": [
  1848. {
  1849. "lang": "js",
  1850. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  1851. }
  1852. ]
  1853. }
  1854. },
  1855. "/file": {
  1856. "get": {
  1857. "tags": ["file"],
  1858. "operationId": "file.list",
  1859. "parameters": [
  1860. {
  1861. "name": "directory",
  1862. "in": "query",
  1863. "schema": {
  1864. "type": "string"
  1865. },
  1866. "required": false
  1867. },
  1868. {
  1869. "name": "workspace",
  1870. "in": "query",
  1871. "schema": {
  1872. "type": "string"
  1873. },
  1874. "required": false
  1875. },
  1876. {
  1877. "name": "path",
  1878. "in": "query",
  1879. "schema": {
  1880. "type": "string"
  1881. },
  1882. "required": true
  1883. }
  1884. ],
  1885. "responses": {
  1886. "200": {
  1887. "description": "Files and directories",
  1888. "content": {
  1889. "application/json": {
  1890. "schema": {
  1891. "type": "array",
  1892. "items": {
  1893. "$ref": "#/components/schemas/FileNode"
  1894. },
  1895. "description": "Files and directories"
  1896. }
  1897. }
  1898. }
  1899. },
  1900. "400": {
  1901. "description": "Bad request",
  1902. "content": {
  1903. "application/json": {
  1904. "schema": {
  1905. "$ref": "#/components/schemas/BadRequestError"
  1906. }
  1907. }
  1908. }
  1909. }
  1910. },
  1911. "description": "List files and directories in a specified path.",
  1912. "summary": "List files",
  1913. "x-codeSamples": [
  1914. {
  1915. "lang": "js",
  1916. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  1917. }
  1918. ]
  1919. }
  1920. },
  1921. "/file/content": {
  1922. "get": {
  1923. "tags": ["file"],
  1924. "operationId": "file.read",
  1925. "parameters": [
  1926. {
  1927. "name": "directory",
  1928. "in": "query",
  1929. "schema": {
  1930. "type": "string"
  1931. },
  1932. "required": false
  1933. },
  1934. {
  1935. "name": "workspace",
  1936. "in": "query",
  1937. "schema": {
  1938. "type": "string"
  1939. },
  1940. "required": false
  1941. },
  1942. {
  1943. "name": "path",
  1944. "in": "query",
  1945. "schema": {
  1946. "type": "string"
  1947. },
  1948. "required": true
  1949. }
  1950. ],
  1951. "responses": {
  1952. "200": {
  1953. "description": "File content",
  1954. "content": {
  1955. "application/json": {
  1956. "schema": {
  1957. "$ref": "#/components/schemas/FileContent"
  1958. }
  1959. }
  1960. }
  1961. },
  1962. "400": {
  1963. "description": "Bad request",
  1964. "content": {
  1965. "application/json": {
  1966. "schema": {
  1967. "$ref": "#/components/schemas/BadRequestError"
  1968. }
  1969. }
  1970. }
  1971. }
  1972. },
  1973. "description": "Read the content of a specified file.",
  1974. "summary": "Read file",
  1975. "x-codeSamples": [
  1976. {
  1977. "lang": "js",
  1978. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  1979. }
  1980. ]
  1981. }
  1982. },
  1983. "/file/status": {
  1984. "get": {
  1985. "tags": ["file"],
  1986. "operationId": "file.status",
  1987. "parameters": [
  1988. {
  1989. "name": "directory",
  1990. "in": "query",
  1991. "schema": {
  1992. "type": "string"
  1993. },
  1994. "required": false
  1995. },
  1996. {
  1997. "name": "workspace",
  1998. "in": "query",
  1999. "schema": {
  2000. "type": "string"
  2001. },
  2002. "required": false
  2003. }
  2004. ],
  2005. "responses": {
  2006. "200": {
  2007. "description": "File status",
  2008. "content": {
  2009. "application/json": {
  2010. "schema": {
  2011. "type": "array",
  2012. "items": {
  2013. "$ref": "#/components/schemas/File"
  2014. },
  2015. "description": "File status"
  2016. }
  2017. }
  2018. }
  2019. },
  2020. "400": {
  2021. "description": "Bad request",
  2022. "content": {
  2023. "application/json": {
  2024. "schema": {
  2025. "$ref": "#/components/schemas/BadRequestError"
  2026. }
  2027. }
  2028. }
  2029. }
  2030. },
  2031. "description": "Get the git status of all files in the project.",
  2032. "summary": "Get file status",
  2033. "x-codeSamples": [
  2034. {
  2035. "lang": "js",
  2036. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  2037. }
  2038. ]
  2039. }
  2040. },
  2041. "/instance/dispose": {
  2042. "post": {
  2043. "tags": ["instance"],
  2044. "operationId": "instance.dispose",
  2045. "parameters": [
  2046. {
  2047. "name": "directory",
  2048. "in": "query",
  2049. "schema": {
  2050. "type": "string"
  2051. },
  2052. "required": false
  2053. },
  2054. {
  2055. "name": "workspace",
  2056. "in": "query",
  2057. "schema": {
  2058. "type": "string"
  2059. },
  2060. "required": false
  2061. }
  2062. ],
  2063. "responses": {
  2064. "200": {
  2065. "description": "Instance disposed",
  2066. "content": {
  2067. "application/json": {
  2068. "schema": {
  2069. "type": "boolean",
  2070. "description": "Instance disposed"
  2071. }
  2072. }
  2073. }
  2074. },
  2075. "400": {
  2076. "description": "Bad request",
  2077. "content": {
  2078. "application/json": {
  2079. "schema": {
  2080. "$ref": "#/components/schemas/BadRequestError"
  2081. }
  2082. }
  2083. }
  2084. }
  2085. },
  2086. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  2087. "summary": "Dispose instance",
  2088. "x-codeSamples": [
  2089. {
  2090. "lang": "js",
  2091. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  2092. }
  2093. ]
  2094. }
  2095. },
  2096. "/path": {
  2097. "get": {
  2098. "tags": ["instance"],
  2099. "operationId": "path.get",
  2100. "parameters": [
  2101. {
  2102. "name": "directory",
  2103. "in": "query",
  2104. "schema": {
  2105. "type": "string"
  2106. },
  2107. "required": false
  2108. },
  2109. {
  2110. "name": "workspace",
  2111. "in": "query",
  2112. "schema": {
  2113. "type": "string"
  2114. },
  2115. "required": false
  2116. }
  2117. ],
  2118. "responses": {
  2119. "200": {
  2120. "description": "Path",
  2121. "content": {
  2122. "application/json": {
  2123. "schema": {
  2124. "$ref": "#/components/schemas/Path"
  2125. }
  2126. }
  2127. }
  2128. },
  2129. "400": {
  2130. "description": "Bad request",
  2131. "content": {
  2132. "application/json": {
  2133. "schema": {
  2134. "$ref": "#/components/schemas/BadRequestError"
  2135. }
  2136. }
  2137. }
  2138. }
  2139. },
  2140. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  2141. "summary": "Get paths",
  2142. "x-codeSamples": [
  2143. {
  2144. "lang": "js",
  2145. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  2146. }
  2147. ]
  2148. }
  2149. },
  2150. "/vcs": {
  2151. "get": {
  2152. "tags": ["instance"],
  2153. "operationId": "vcs.get",
  2154. "parameters": [
  2155. {
  2156. "name": "directory",
  2157. "in": "query",
  2158. "schema": {
  2159. "type": "string"
  2160. },
  2161. "required": false
  2162. },
  2163. {
  2164. "name": "workspace",
  2165. "in": "query",
  2166. "schema": {
  2167. "type": "string"
  2168. },
  2169. "required": false
  2170. }
  2171. ],
  2172. "responses": {
  2173. "200": {
  2174. "description": "VCS info",
  2175. "content": {
  2176. "application/json": {
  2177. "schema": {
  2178. "$ref": "#/components/schemas/VcsInfo"
  2179. }
  2180. }
  2181. }
  2182. },
  2183. "400": {
  2184. "description": "Bad request",
  2185. "content": {
  2186. "application/json": {
  2187. "schema": {
  2188. "$ref": "#/components/schemas/BadRequestError"
  2189. }
  2190. }
  2191. }
  2192. }
  2193. },
  2194. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  2195. "summary": "Get VCS info",
  2196. "x-codeSamples": [
  2197. {
  2198. "lang": "js",
  2199. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  2200. }
  2201. ]
  2202. }
  2203. },
  2204. "/vcs/status": {
  2205. "get": {
  2206. "tags": ["instance"],
  2207. "operationId": "vcs.status",
  2208. "parameters": [
  2209. {
  2210. "name": "directory",
  2211. "in": "query",
  2212. "schema": {
  2213. "type": "string"
  2214. },
  2215. "required": false
  2216. },
  2217. {
  2218. "name": "workspace",
  2219. "in": "query",
  2220. "schema": {
  2221. "type": "string"
  2222. },
  2223. "required": false
  2224. }
  2225. ],
  2226. "responses": {
  2227. "200": {
  2228. "description": "VCS status",
  2229. "content": {
  2230. "application/json": {
  2231. "schema": {
  2232. "type": "array",
  2233. "items": {
  2234. "$ref": "#/components/schemas/VcsFileStatus"
  2235. },
  2236. "description": "VCS status"
  2237. }
  2238. }
  2239. }
  2240. },
  2241. "400": {
  2242. "description": "Bad request",
  2243. "content": {
  2244. "application/json": {
  2245. "schema": {
  2246. "$ref": "#/components/schemas/BadRequestError"
  2247. }
  2248. }
  2249. }
  2250. }
  2251. },
  2252. "description": "Retrieve changed files in the current working tree without patches.",
  2253. "summary": "Get VCS status",
  2254. "x-codeSamples": [
  2255. {
  2256. "lang": "js",
  2257. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  2258. }
  2259. ]
  2260. }
  2261. },
  2262. "/vcs/diff": {
  2263. "get": {
  2264. "tags": ["instance"],
  2265. "operationId": "vcs.diff",
  2266. "parameters": [
  2267. {
  2268. "name": "directory",
  2269. "in": "query",
  2270. "schema": {
  2271. "type": "string"
  2272. },
  2273. "required": false
  2274. },
  2275. {
  2276. "name": "workspace",
  2277. "in": "query",
  2278. "schema": {
  2279. "type": "string"
  2280. },
  2281. "required": false
  2282. },
  2283. {
  2284. "name": "mode",
  2285. "in": "query",
  2286. "schema": {
  2287. "type": "string",
  2288. "enum": ["git", "branch"]
  2289. },
  2290. "required": true
  2291. }
  2292. ],
  2293. "responses": {
  2294. "200": {
  2295. "description": "VCS diff",
  2296. "content": {
  2297. "application/json": {
  2298. "schema": {
  2299. "type": "array",
  2300. "items": {
  2301. "$ref": "#/components/schemas/VcsFileDiff"
  2302. },
  2303. "description": "VCS diff"
  2304. }
  2305. }
  2306. }
  2307. },
  2308. "400": {
  2309. "description": "Bad request",
  2310. "content": {
  2311. "application/json": {
  2312. "schema": {
  2313. "$ref": "#/components/schemas/BadRequestError"
  2314. }
  2315. }
  2316. }
  2317. }
  2318. },
  2319. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2320. "summary": "Get VCS diff",
  2321. "x-codeSamples": [
  2322. {
  2323. "lang": "js",
  2324. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2325. }
  2326. ]
  2327. }
  2328. },
  2329. "/vcs/diff/raw": {
  2330. "get": {
  2331. "tags": ["instance"],
  2332. "operationId": "vcs.diff.raw",
  2333. "parameters": [
  2334. {
  2335. "name": "directory",
  2336. "in": "query",
  2337. "schema": {
  2338. "type": "string"
  2339. },
  2340. "required": false
  2341. },
  2342. {
  2343. "name": "workspace",
  2344. "in": "query",
  2345. "schema": {
  2346. "type": "string"
  2347. },
  2348. "required": false
  2349. }
  2350. ],
  2351. "responses": {
  2352. "200": {
  2353. "description": "Raw VCS diff",
  2354. "content": {
  2355. "text/x-diff; charset=utf-8": {
  2356. "schema": {
  2357. "type": "string"
  2358. }
  2359. }
  2360. }
  2361. },
  2362. "400": {
  2363. "description": "Bad request",
  2364. "content": {
  2365. "application/json": {
  2366. "schema": {
  2367. "$ref": "#/components/schemas/BadRequestError"
  2368. }
  2369. }
  2370. }
  2371. }
  2372. },
  2373. "description": "Retrieve a raw patch for current uncommitted changes.",
  2374. "summary": "Get raw VCS diff",
  2375. "x-codeSamples": [
  2376. {
  2377. "lang": "js",
  2378. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2379. }
  2380. ]
  2381. }
  2382. },
  2383. "/vcs/apply": {
  2384. "post": {
  2385. "tags": ["instance"],
  2386. "operationId": "vcs.apply",
  2387. "parameters": [
  2388. {
  2389. "name": "directory",
  2390. "in": "query",
  2391. "schema": {
  2392. "type": "string"
  2393. },
  2394. "required": false
  2395. },
  2396. {
  2397. "name": "workspace",
  2398. "in": "query",
  2399. "schema": {
  2400. "type": "string"
  2401. },
  2402. "required": false
  2403. }
  2404. ],
  2405. "responses": {
  2406. "200": {
  2407. "description": "VCS patch applied",
  2408. "content": {
  2409. "application/json": {
  2410. "schema": {
  2411. "type": "object",
  2412. "properties": {
  2413. "applied": {
  2414. "type": "boolean"
  2415. }
  2416. },
  2417. "required": ["applied"],
  2418. "additionalProperties": false,
  2419. "description": "VCS patch applied"
  2420. }
  2421. }
  2422. }
  2423. },
  2424. "400": {
  2425. "description": "VcsApplyError | InvalidRequestError",
  2426. "content": {
  2427. "application/json": {
  2428. "schema": {
  2429. "anyOf": [
  2430. {
  2431. "$ref": "#/components/schemas/VcsApplyError"
  2432. },
  2433. {
  2434. "$ref": "#/components/schemas/InvalidRequestError"
  2435. }
  2436. ]
  2437. }
  2438. }
  2439. }
  2440. }
  2441. },
  2442. "description": "Apply a raw patch to the current working tree.",
  2443. "summary": "Apply VCS patch",
  2444. "requestBody": {
  2445. "content": {
  2446. "application/json": {
  2447. "schema": {
  2448. "type": "object",
  2449. "properties": {
  2450. "patch": {
  2451. "type": "string"
  2452. }
  2453. },
  2454. "required": ["patch"],
  2455. "additionalProperties": false
  2456. }
  2457. }
  2458. }
  2459. },
  2460. "x-codeSamples": [
  2461. {
  2462. "lang": "js",
  2463. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2464. }
  2465. ]
  2466. }
  2467. },
  2468. "/command": {
  2469. "get": {
  2470. "tags": ["instance"],
  2471. "operationId": "command.list",
  2472. "parameters": [
  2473. {
  2474. "name": "directory",
  2475. "in": "query",
  2476. "schema": {
  2477. "type": "string"
  2478. },
  2479. "required": false
  2480. },
  2481. {
  2482. "name": "workspace",
  2483. "in": "query",
  2484. "schema": {
  2485. "type": "string"
  2486. },
  2487. "required": false
  2488. }
  2489. ],
  2490. "responses": {
  2491. "200": {
  2492. "description": "List of commands",
  2493. "content": {
  2494. "application/json": {
  2495. "schema": {
  2496. "type": "array",
  2497. "items": {
  2498. "$ref": "#/components/schemas/Command"
  2499. },
  2500. "description": "List of commands"
  2501. }
  2502. }
  2503. }
  2504. },
  2505. "400": {
  2506. "description": "Bad request",
  2507. "content": {
  2508. "application/json": {
  2509. "schema": {
  2510. "$ref": "#/components/schemas/BadRequestError"
  2511. }
  2512. }
  2513. }
  2514. }
  2515. },
  2516. "description": "Get a list of all available commands in the OpenCode system.",
  2517. "summary": "List commands",
  2518. "x-codeSamples": [
  2519. {
  2520. "lang": "js",
  2521. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2522. }
  2523. ]
  2524. }
  2525. },
  2526. "/agent": {
  2527. "get": {
  2528. "tags": ["instance"],
  2529. "operationId": "app.agents",
  2530. "parameters": [
  2531. {
  2532. "name": "directory",
  2533. "in": "query",
  2534. "schema": {
  2535. "type": "string"
  2536. },
  2537. "required": false
  2538. },
  2539. {
  2540. "name": "workspace",
  2541. "in": "query",
  2542. "schema": {
  2543. "type": "string"
  2544. },
  2545. "required": false
  2546. }
  2547. ],
  2548. "responses": {
  2549. "200": {
  2550. "description": "List of agents",
  2551. "content": {
  2552. "application/json": {
  2553. "schema": {
  2554. "type": "array",
  2555. "items": {
  2556. "$ref": "#/components/schemas/Agent"
  2557. },
  2558. "description": "List of agents"
  2559. }
  2560. }
  2561. }
  2562. },
  2563. "400": {
  2564. "description": "Bad request",
  2565. "content": {
  2566. "application/json": {
  2567. "schema": {
  2568. "$ref": "#/components/schemas/BadRequestError"
  2569. }
  2570. }
  2571. }
  2572. }
  2573. },
  2574. "description": "Get a list of all available AI agents in the OpenCode system.",
  2575. "summary": "List agents",
  2576. "x-codeSamples": [
  2577. {
  2578. "lang": "js",
  2579. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2580. }
  2581. ]
  2582. }
  2583. },
  2584. "/skill": {
  2585. "get": {
  2586. "tags": ["instance"],
  2587. "operationId": "app.skills",
  2588. "parameters": [
  2589. {
  2590. "name": "directory",
  2591. "in": "query",
  2592. "schema": {
  2593. "type": "string"
  2594. },
  2595. "required": false
  2596. },
  2597. {
  2598. "name": "workspace",
  2599. "in": "query",
  2600. "schema": {
  2601. "type": "string"
  2602. },
  2603. "required": false
  2604. }
  2605. ],
  2606. "responses": {
  2607. "200": {
  2608. "description": "List of skills",
  2609. "content": {
  2610. "application/json": {
  2611. "schema": {
  2612. "type": "array",
  2613. "items": {
  2614. "type": "object",
  2615. "properties": {
  2616. "name": {
  2617. "type": "string"
  2618. },
  2619. "description": {
  2620. "type": "string"
  2621. },
  2622. "location": {
  2623. "type": "string"
  2624. },
  2625. "content": {
  2626. "type": "string"
  2627. }
  2628. },
  2629. "required": ["name", "location", "content"],
  2630. "additionalProperties": false
  2631. },
  2632. "description": "List of skills"
  2633. }
  2634. }
  2635. }
  2636. },
  2637. "400": {
  2638. "description": "Bad request",
  2639. "content": {
  2640. "application/json": {
  2641. "schema": {
  2642. "$ref": "#/components/schemas/BadRequestError"
  2643. }
  2644. }
  2645. }
  2646. }
  2647. },
  2648. "description": "Get a list of all available skills in the OpenCode system.",
  2649. "summary": "List skills",
  2650. "x-codeSamples": [
  2651. {
  2652. "lang": "js",
  2653. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2654. }
  2655. ]
  2656. }
  2657. },
  2658. "/lsp": {
  2659. "get": {
  2660. "tags": ["instance"],
  2661. "operationId": "lsp.status",
  2662. "parameters": [
  2663. {
  2664. "name": "directory",
  2665. "in": "query",
  2666. "schema": {
  2667. "type": "string"
  2668. },
  2669. "required": false
  2670. },
  2671. {
  2672. "name": "workspace",
  2673. "in": "query",
  2674. "schema": {
  2675. "type": "string"
  2676. },
  2677. "required": false
  2678. }
  2679. ],
  2680. "responses": {
  2681. "200": {
  2682. "description": "LSP server status",
  2683. "content": {
  2684. "application/json": {
  2685. "schema": {
  2686. "type": "array",
  2687. "items": {
  2688. "$ref": "#/components/schemas/LSPStatus"
  2689. },
  2690. "description": "LSP server status"
  2691. }
  2692. }
  2693. }
  2694. },
  2695. "400": {
  2696. "description": "Bad request",
  2697. "content": {
  2698. "application/json": {
  2699. "schema": {
  2700. "$ref": "#/components/schemas/BadRequestError"
  2701. }
  2702. }
  2703. }
  2704. }
  2705. },
  2706. "description": "Get LSP server status",
  2707. "summary": "Get LSP status",
  2708. "x-codeSamples": [
  2709. {
  2710. "lang": "js",
  2711. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2712. }
  2713. ]
  2714. }
  2715. },
  2716. "/formatter": {
  2717. "get": {
  2718. "tags": ["instance"],
  2719. "operationId": "formatter.status",
  2720. "parameters": [
  2721. {
  2722. "name": "directory",
  2723. "in": "query",
  2724. "schema": {
  2725. "type": "string"
  2726. },
  2727. "required": false
  2728. },
  2729. {
  2730. "name": "workspace",
  2731. "in": "query",
  2732. "schema": {
  2733. "type": "string"
  2734. },
  2735. "required": false
  2736. }
  2737. ],
  2738. "responses": {
  2739. "200": {
  2740. "description": "Formatter status",
  2741. "content": {
  2742. "application/json": {
  2743. "schema": {
  2744. "type": "array",
  2745. "items": {
  2746. "$ref": "#/components/schemas/FormatterStatus"
  2747. },
  2748. "description": "Formatter status"
  2749. }
  2750. }
  2751. }
  2752. },
  2753. "400": {
  2754. "description": "Bad request",
  2755. "content": {
  2756. "application/json": {
  2757. "schema": {
  2758. "$ref": "#/components/schemas/BadRequestError"
  2759. }
  2760. }
  2761. }
  2762. }
  2763. },
  2764. "description": "Get formatter status",
  2765. "summary": "Get formatter status",
  2766. "x-codeSamples": [
  2767. {
  2768. "lang": "js",
  2769. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2770. }
  2771. ]
  2772. }
  2773. },
  2774. "/mcp": {
  2775. "get": {
  2776. "tags": ["mcp"],
  2777. "operationId": "mcp.status",
  2778. "parameters": [
  2779. {
  2780. "name": "directory",
  2781. "in": "query",
  2782. "schema": {
  2783. "type": "string"
  2784. },
  2785. "required": false
  2786. },
  2787. {
  2788. "name": "workspace",
  2789. "in": "query",
  2790. "schema": {
  2791. "type": "string"
  2792. },
  2793. "required": false
  2794. }
  2795. ],
  2796. "responses": {
  2797. "200": {
  2798. "description": "MCP server status",
  2799. "content": {
  2800. "application/json": {
  2801. "schema": {
  2802. "type": "object",
  2803. "additionalProperties": {
  2804. "$ref": "#/components/schemas/MCPStatus"
  2805. },
  2806. "description": "MCP server status"
  2807. }
  2808. }
  2809. }
  2810. },
  2811. "400": {
  2812. "description": "Bad request",
  2813. "content": {
  2814. "application/json": {
  2815. "schema": {
  2816. "$ref": "#/components/schemas/BadRequestError"
  2817. }
  2818. }
  2819. }
  2820. }
  2821. },
  2822. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  2823. "summary": "Get MCP status",
  2824. "x-codeSamples": [
  2825. {
  2826. "lang": "js",
  2827. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  2828. }
  2829. ]
  2830. },
  2831. "post": {
  2832. "tags": ["mcp"],
  2833. "operationId": "mcp.add",
  2834. "parameters": [
  2835. {
  2836. "name": "directory",
  2837. "in": "query",
  2838. "schema": {
  2839. "type": "string"
  2840. },
  2841. "required": false
  2842. },
  2843. {
  2844. "name": "workspace",
  2845. "in": "query",
  2846. "schema": {
  2847. "type": "string"
  2848. },
  2849. "required": false
  2850. }
  2851. ],
  2852. "responses": {
  2853. "200": {
  2854. "description": "MCP server added successfully",
  2855. "content": {
  2856. "application/json": {
  2857. "schema": {
  2858. "type": "object",
  2859. "additionalProperties": {
  2860. "$ref": "#/components/schemas/MCPStatus"
  2861. },
  2862. "description": "MCP server added successfully"
  2863. }
  2864. }
  2865. }
  2866. },
  2867. "400": {
  2868. "description": "BadRequest | InvalidRequestError",
  2869. "content": {
  2870. "application/json": {
  2871. "schema": {
  2872. "anyOf": [
  2873. {
  2874. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  2875. },
  2876. {
  2877. "$ref": "#/components/schemas/InvalidRequestError"
  2878. }
  2879. ]
  2880. }
  2881. }
  2882. }
  2883. }
  2884. },
  2885. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  2886. "summary": "Add MCP server",
  2887. "requestBody": {
  2888. "content": {
  2889. "application/json": {
  2890. "schema": {
  2891. "type": "object",
  2892. "properties": {
  2893. "name": {
  2894. "type": "string"
  2895. },
  2896. "config": {
  2897. "anyOf": [
  2898. {
  2899. "$ref": "#/components/schemas/McpLocalConfig"
  2900. },
  2901. {
  2902. "$ref": "#/components/schemas/McpRemoteConfig"
  2903. }
  2904. ]
  2905. }
  2906. },
  2907. "required": ["name", "config"],
  2908. "additionalProperties": false
  2909. }
  2910. }
  2911. }
  2912. },
  2913. "x-codeSamples": [
  2914. {
  2915. "lang": "js",
  2916. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  2917. }
  2918. ]
  2919. }
  2920. },
  2921. "/mcp/{name}/auth": {
  2922. "post": {
  2923. "tags": ["mcp"],
  2924. "operationId": "mcp.auth.start",
  2925. "parameters": [
  2926. {
  2927. "name": "name",
  2928. "in": "path",
  2929. "schema": {
  2930. "type": "string"
  2931. },
  2932. "required": true
  2933. },
  2934. {
  2935. "name": "directory",
  2936. "in": "query",
  2937. "schema": {
  2938. "type": "string"
  2939. },
  2940. "required": false
  2941. },
  2942. {
  2943. "name": "workspace",
  2944. "in": "query",
  2945. "schema": {
  2946. "type": "string"
  2947. },
  2948. "required": false
  2949. }
  2950. ],
  2951. "responses": {
  2952. "200": {
  2953. "description": "OAuth flow started",
  2954. "content": {
  2955. "application/json": {
  2956. "schema": {
  2957. "type": "object",
  2958. "properties": {
  2959. "authorizationUrl": {
  2960. "type": "string"
  2961. },
  2962. "oauthState": {
  2963. "type": "string"
  2964. }
  2965. },
  2966. "required": ["authorizationUrl", "oauthState"],
  2967. "additionalProperties": false,
  2968. "description": "OAuth flow started"
  2969. }
  2970. }
  2971. }
  2972. },
  2973. "400": {
  2974. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  2975. "content": {
  2976. "application/json": {
  2977. "schema": {
  2978. "anyOf": [
  2979. {
  2980. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  2981. },
  2982. {
  2983. "$ref": "#/components/schemas/InvalidRequestError"
  2984. }
  2985. ]
  2986. }
  2987. }
  2988. }
  2989. },
  2990. "404": {
  2991. "description": "McpServerNotFoundError",
  2992. "content": {
  2993. "application/json": {
  2994. "schema": {
  2995. "$ref": "#/components/schemas/McpServerNotFoundError"
  2996. }
  2997. }
  2998. }
  2999. }
  3000. },
  3001. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3002. "summary": "Start MCP OAuth",
  3003. "x-codeSamples": [
  3004. {
  3005. "lang": "js",
  3006. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3007. }
  3008. ]
  3009. },
  3010. "delete": {
  3011. "tags": ["mcp"],
  3012. "operationId": "mcp.auth.remove",
  3013. "parameters": [
  3014. {
  3015. "name": "name",
  3016. "in": "path",
  3017. "schema": {
  3018. "type": "string"
  3019. },
  3020. "required": true
  3021. },
  3022. {
  3023. "name": "directory",
  3024. "in": "query",
  3025. "schema": {
  3026. "type": "string"
  3027. },
  3028. "required": false
  3029. },
  3030. {
  3031. "name": "workspace",
  3032. "in": "query",
  3033. "schema": {
  3034. "type": "string"
  3035. },
  3036. "required": false
  3037. }
  3038. ],
  3039. "responses": {
  3040. "200": {
  3041. "description": "OAuth credentials removed",
  3042. "content": {
  3043. "application/json": {
  3044. "schema": {
  3045. "type": "object",
  3046. "properties": {
  3047. "success": {
  3048. "type": "boolean",
  3049. "enum": [true]
  3050. }
  3051. },
  3052. "required": ["success"],
  3053. "additionalProperties": false,
  3054. "description": "OAuth credentials removed"
  3055. }
  3056. }
  3057. }
  3058. },
  3059. "400": {
  3060. "description": "Bad request",
  3061. "content": {
  3062. "application/json": {
  3063. "schema": {
  3064. "$ref": "#/components/schemas/BadRequestError"
  3065. }
  3066. }
  3067. }
  3068. },
  3069. "404": {
  3070. "description": "McpServerNotFoundError",
  3071. "content": {
  3072. "application/json": {
  3073. "schema": {
  3074. "$ref": "#/components/schemas/McpServerNotFoundError"
  3075. }
  3076. }
  3077. }
  3078. }
  3079. },
  3080. "description": "Remove OAuth credentials for an MCP server.",
  3081. "summary": "Remove MCP OAuth",
  3082. "x-codeSamples": [
  3083. {
  3084. "lang": "js",
  3085. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3086. }
  3087. ]
  3088. }
  3089. },
  3090. "/mcp/{name}/auth/callback": {
  3091. "post": {
  3092. "tags": ["mcp"],
  3093. "operationId": "mcp.auth.callback",
  3094. "parameters": [
  3095. {
  3096. "name": "name",
  3097. "in": "path",
  3098. "schema": {
  3099. "type": "string"
  3100. },
  3101. "required": true
  3102. },
  3103. {
  3104. "name": "directory",
  3105. "in": "query",
  3106. "schema": {
  3107. "type": "string"
  3108. },
  3109. "required": false
  3110. },
  3111. {
  3112. "name": "workspace",
  3113. "in": "query",
  3114. "schema": {
  3115. "type": "string"
  3116. },
  3117. "required": false
  3118. }
  3119. ],
  3120. "responses": {
  3121. "200": {
  3122. "description": "OAuth authentication completed",
  3123. "content": {
  3124. "application/json": {
  3125. "schema": {
  3126. "$ref": "#/components/schemas/MCPStatus"
  3127. }
  3128. }
  3129. }
  3130. },
  3131. "400": {
  3132. "description": "BadRequest | InvalidRequestError",
  3133. "content": {
  3134. "application/json": {
  3135. "schema": {
  3136. "anyOf": [
  3137. {
  3138. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3139. },
  3140. {
  3141. "$ref": "#/components/schemas/InvalidRequestError"
  3142. }
  3143. ]
  3144. }
  3145. }
  3146. }
  3147. },
  3148. "404": {
  3149. "description": "McpServerNotFoundError",
  3150. "content": {
  3151. "application/json": {
  3152. "schema": {
  3153. "$ref": "#/components/schemas/McpServerNotFoundError"
  3154. }
  3155. }
  3156. }
  3157. }
  3158. },
  3159. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3160. "summary": "Complete MCP OAuth",
  3161. "requestBody": {
  3162. "content": {
  3163. "application/json": {
  3164. "schema": {
  3165. "type": "object",
  3166. "properties": {
  3167. "code": {
  3168. "type": "string"
  3169. }
  3170. },
  3171. "required": ["code"],
  3172. "additionalProperties": false
  3173. }
  3174. }
  3175. }
  3176. },
  3177. "x-codeSamples": [
  3178. {
  3179. "lang": "js",
  3180. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3181. }
  3182. ]
  3183. }
  3184. },
  3185. "/mcp/{name}/auth/authenticate": {
  3186. "post": {
  3187. "tags": ["mcp"],
  3188. "operationId": "mcp.auth.authenticate",
  3189. "parameters": [
  3190. {
  3191. "name": "name",
  3192. "in": "path",
  3193. "schema": {
  3194. "type": "string"
  3195. },
  3196. "required": true
  3197. },
  3198. {
  3199. "name": "directory",
  3200. "in": "query",
  3201. "schema": {
  3202. "type": "string"
  3203. },
  3204. "required": false
  3205. },
  3206. {
  3207. "name": "workspace",
  3208. "in": "query",
  3209. "schema": {
  3210. "type": "string"
  3211. },
  3212. "required": false
  3213. }
  3214. ],
  3215. "responses": {
  3216. "200": {
  3217. "description": "OAuth authentication completed",
  3218. "content": {
  3219. "application/json": {
  3220. "schema": {
  3221. "$ref": "#/components/schemas/MCPStatus"
  3222. }
  3223. }
  3224. }
  3225. },
  3226. "400": {
  3227. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3228. "content": {
  3229. "application/json": {
  3230. "schema": {
  3231. "anyOf": [
  3232. {
  3233. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3234. },
  3235. {
  3236. "$ref": "#/components/schemas/InvalidRequestError"
  3237. }
  3238. ]
  3239. }
  3240. }
  3241. }
  3242. },
  3243. "404": {
  3244. "description": "McpServerNotFoundError",
  3245. "content": {
  3246. "application/json": {
  3247. "schema": {
  3248. "$ref": "#/components/schemas/McpServerNotFoundError"
  3249. }
  3250. }
  3251. }
  3252. }
  3253. },
  3254. "description": "Start OAuth flow and wait for callback (opens browser).",
  3255. "summary": "Authenticate MCP OAuth",
  3256. "x-codeSamples": [
  3257. {
  3258. "lang": "js",
  3259. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3260. }
  3261. ]
  3262. }
  3263. },
  3264. "/mcp/{name}/connect": {
  3265. "post": {
  3266. "tags": ["mcp"],
  3267. "operationId": "mcp.connect",
  3268. "parameters": [
  3269. {
  3270. "name": "name",
  3271. "in": "path",
  3272. "schema": {
  3273. "type": "string"
  3274. },
  3275. "required": true
  3276. },
  3277. {
  3278. "name": "directory",
  3279. "in": "query",
  3280. "schema": {
  3281. "type": "string"
  3282. },
  3283. "required": false
  3284. },
  3285. {
  3286. "name": "workspace",
  3287. "in": "query",
  3288. "schema": {
  3289. "type": "string"
  3290. },
  3291. "required": false
  3292. }
  3293. ],
  3294. "responses": {
  3295. "200": {
  3296. "description": "MCP server connected successfully",
  3297. "content": {
  3298. "application/json": {
  3299. "schema": {
  3300. "type": "boolean",
  3301. "description": "MCP server connected successfully"
  3302. }
  3303. }
  3304. }
  3305. },
  3306. "400": {
  3307. "description": "Bad request",
  3308. "content": {
  3309. "application/json": {
  3310. "schema": {
  3311. "$ref": "#/components/schemas/BadRequestError"
  3312. }
  3313. }
  3314. }
  3315. },
  3316. "404": {
  3317. "description": "McpServerNotFoundError",
  3318. "content": {
  3319. "application/json": {
  3320. "schema": {
  3321. "$ref": "#/components/schemas/McpServerNotFoundError"
  3322. }
  3323. }
  3324. }
  3325. }
  3326. },
  3327. "description": "Connect an MCP server.",
  3328. "x-codeSamples": [
  3329. {
  3330. "lang": "js",
  3331. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3332. }
  3333. ]
  3334. }
  3335. },
  3336. "/mcp/{name}/disconnect": {
  3337. "post": {
  3338. "tags": ["mcp"],
  3339. "operationId": "mcp.disconnect",
  3340. "parameters": [
  3341. {
  3342. "name": "name",
  3343. "in": "path",
  3344. "schema": {
  3345. "type": "string"
  3346. },
  3347. "required": true
  3348. },
  3349. {
  3350. "name": "directory",
  3351. "in": "query",
  3352. "schema": {
  3353. "type": "string"
  3354. },
  3355. "required": false
  3356. },
  3357. {
  3358. "name": "workspace",
  3359. "in": "query",
  3360. "schema": {
  3361. "type": "string"
  3362. },
  3363. "required": false
  3364. }
  3365. ],
  3366. "responses": {
  3367. "200": {
  3368. "description": "MCP server disconnected successfully",
  3369. "content": {
  3370. "application/json": {
  3371. "schema": {
  3372. "type": "boolean",
  3373. "description": "MCP server disconnected successfully"
  3374. }
  3375. }
  3376. }
  3377. },
  3378. "400": {
  3379. "description": "Bad request",
  3380. "content": {
  3381. "application/json": {
  3382. "schema": {
  3383. "$ref": "#/components/schemas/BadRequestError"
  3384. }
  3385. }
  3386. }
  3387. },
  3388. "404": {
  3389. "description": "McpServerNotFoundError",
  3390. "content": {
  3391. "application/json": {
  3392. "schema": {
  3393. "$ref": "#/components/schemas/McpServerNotFoundError"
  3394. }
  3395. }
  3396. }
  3397. }
  3398. },
  3399. "description": "Disconnect an MCP server.",
  3400. "x-codeSamples": [
  3401. {
  3402. "lang": "js",
  3403. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3404. }
  3405. ]
  3406. }
  3407. },
  3408. "/project": {
  3409. "get": {
  3410. "tags": ["project"],
  3411. "operationId": "project.list",
  3412. "parameters": [
  3413. {
  3414. "name": "directory",
  3415. "in": "query",
  3416. "schema": {
  3417. "type": "string"
  3418. },
  3419. "required": false
  3420. },
  3421. {
  3422. "name": "workspace",
  3423. "in": "query",
  3424. "schema": {
  3425. "type": "string"
  3426. },
  3427. "required": false
  3428. }
  3429. ],
  3430. "responses": {
  3431. "200": {
  3432. "description": "List of projects",
  3433. "content": {
  3434. "application/json": {
  3435. "schema": {
  3436. "type": "array",
  3437. "items": {
  3438. "$ref": "#/components/schemas/Project"
  3439. },
  3440. "description": "List of projects"
  3441. }
  3442. }
  3443. }
  3444. },
  3445. "400": {
  3446. "description": "Bad request",
  3447. "content": {
  3448. "application/json": {
  3449. "schema": {
  3450. "$ref": "#/components/schemas/BadRequestError"
  3451. }
  3452. }
  3453. }
  3454. }
  3455. },
  3456. "description": "Get a list of projects that have been opened with OpenCode.",
  3457. "summary": "List all projects",
  3458. "x-codeSamples": [
  3459. {
  3460. "lang": "js",
  3461. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3462. }
  3463. ]
  3464. }
  3465. },
  3466. "/project/current": {
  3467. "get": {
  3468. "tags": ["project"],
  3469. "operationId": "project.current",
  3470. "parameters": [
  3471. {
  3472. "name": "directory",
  3473. "in": "query",
  3474. "schema": {
  3475. "type": "string"
  3476. },
  3477. "required": false
  3478. },
  3479. {
  3480. "name": "workspace",
  3481. "in": "query",
  3482. "schema": {
  3483. "type": "string"
  3484. },
  3485. "required": false
  3486. }
  3487. ],
  3488. "responses": {
  3489. "200": {
  3490. "description": "Current project information",
  3491. "content": {
  3492. "application/json": {
  3493. "schema": {
  3494. "$ref": "#/components/schemas/Project"
  3495. }
  3496. }
  3497. }
  3498. },
  3499. "400": {
  3500. "description": "Bad request",
  3501. "content": {
  3502. "application/json": {
  3503. "schema": {
  3504. "$ref": "#/components/schemas/BadRequestError"
  3505. }
  3506. }
  3507. }
  3508. }
  3509. },
  3510. "description": "Retrieve the currently active project that OpenCode is working with.",
  3511. "summary": "Get current project",
  3512. "x-codeSamples": [
  3513. {
  3514. "lang": "js",
  3515. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3516. }
  3517. ]
  3518. }
  3519. },
  3520. "/project/git/init": {
  3521. "post": {
  3522. "tags": ["project"],
  3523. "operationId": "project.initGit",
  3524. "parameters": [
  3525. {
  3526. "name": "directory",
  3527. "in": "query",
  3528. "schema": {
  3529. "type": "string"
  3530. },
  3531. "required": false
  3532. },
  3533. {
  3534. "name": "workspace",
  3535. "in": "query",
  3536. "schema": {
  3537. "type": "string"
  3538. },
  3539. "required": false
  3540. }
  3541. ],
  3542. "responses": {
  3543. "200": {
  3544. "description": "Project information after git initialization",
  3545. "content": {
  3546. "application/json": {
  3547. "schema": {
  3548. "$ref": "#/components/schemas/Project"
  3549. }
  3550. }
  3551. }
  3552. },
  3553. "400": {
  3554. "description": "Bad request",
  3555. "content": {
  3556. "application/json": {
  3557. "schema": {
  3558. "$ref": "#/components/schemas/BadRequestError"
  3559. }
  3560. }
  3561. }
  3562. }
  3563. },
  3564. "description": "Create a git repository for the current project and return the refreshed project info.",
  3565. "summary": "Initialize git repository",
  3566. "x-codeSamples": [
  3567. {
  3568. "lang": "js",
  3569. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3570. }
  3571. ]
  3572. }
  3573. },
  3574. "/project/{projectID}": {
  3575. "patch": {
  3576. "tags": ["project"],
  3577. "operationId": "project.update",
  3578. "parameters": [
  3579. {
  3580. "name": "projectID",
  3581. "in": "path",
  3582. "schema": {
  3583. "type": "string"
  3584. },
  3585. "required": true
  3586. },
  3587. {
  3588. "name": "directory",
  3589. "in": "query",
  3590. "schema": {
  3591. "type": "string"
  3592. },
  3593. "required": false
  3594. },
  3595. {
  3596. "name": "workspace",
  3597. "in": "query",
  3598. "schema": {
  3599. "type": "string"
  3600. },
  3601. "required": false
  3602. }
  3603. ],
  3604. "responses": {
  3605. "200": {
  3606. "description": "Updated project information",
  3607. "content": {
  3608. "application/json": {
  3609. "schema": {
  3610. "$ref": "#/components/schemas/Project"
  3611. }
  3612. }
  3613. }
  3614. },
  3615. "400": {
  3616. "description": "BadRequest | InvalidRequestError",
  3617. "content": {
  3618. "application/json": {
  3619. "schema": {
  3620. "anyOf": [
  3621. {
  3622. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3623. },
  3624. {
  3625. "$ref": "#/components/schemas/InvalidRequestError"
  3626. }
  3627. ]
  3628. }
  3629. }
  3630. }
  3631. },
  3632. "404": {
  3633. "description": "Not found",
  3634. "content": {
  3635. "application/json": {
  3636. "schema": {
  3637. "$ref": "#/components/schemas/NotFoundError"
  3638. }
  3639. }
  3640. }
  3641. }
  3642. },
  3643. "description": "Update project properties such as name, icon, and commands.",
  3644. "summary": "Update project",
  3645. "requestBody": {
  3646. "content": {
  3647. "application/json": {
  3648. "schema": {
  3649. "type": "object",
  3650. "properties": {
  3651. "name": {
  3652. "type": "string"
  3653. },
  3654. "icon": {
  3655. "type": "object",
  3656. "properties": {
  3657. "url": {
  3658. "type": "string"
  3659. },
  3660. "override": {
  3661. "type": "string"
  3662. },
  3663. "color": {
  3664. "type": "string"
  3665. }
  3666. },
  3667. "additionalProperties": false
  3668. },
  3669. "commands": {
  3670. "type": "object",
  3671. "properties": {
  3672. "start": {
  3673. "type": "string",
  3674. "description": "Startup script to run when creating a new workspace (worktree)"
  3675. }
  3676. },
  3677. "additionalProperties": false
  3678. }
  3679. },
  3680. "additionalProperties": false
  3681. }
  3682. }
  3683. }
  3684. },
  3685. "x-codeSamples": [
  3686. {
  3687. "lang": "js",
  3688. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3689. }
  3690. ]
  3691. }
  3692. },
  3693. "/pty/shells": {
  3694. "get": {
  3695. "tags": ["pty"],
  3696. "operationId": "pty.shells",
  3697. "parameters": [
  3698. {
  3699. "name": "directory",
  3700. "in": "query",
  3701. "schema": {
  3702. "type": "string"
  3703. },
  3704. "required": false
  3705. },
  3706. {
  3707. "name": "workspace",
  3708. "in": "query",
  3709. "schema": {
  3710. "type": "string"
  3711. },
  3712. "required": false
  3713. }
  3714. ],
  3715. "responses": {
  3716. "200": {
  3717. "description": "List of shells",
  3718. "content": {
  3719. "application/json": {
  3720. "schema": {
  3721. "type": "array",
  3722. "items": {
  3723. "type": "object",
  3724. "properties": {
  3725. "path": {
  3726. "type": "string"
  3727. },
  3728. "name": {
  3729. "type": "string"
  3730. },
  3731. "acceptable": {
  3732. "type": "boolean"
  3733. }
  3734. },
  3735. "required": ["path", "name", "acceptable"],
  3736. "additionalProperties": false
  3737. },
  3738. "description": "List of shells"
  3739. }
  3740. }
  3741. }
  3742. },
  3743. "400": {
  3744. "description": "Bad request",
  3745. "content": {
  3746. "application/json": {
  3747. "schema": {
  3748. "$ref": "#/components/schemas/BadRequestError"
  3749. }
  3750. }
  3751. }
  3752. }
  3753. },
  3754. "description": "Get a list of available shells on the system.",
  3755. "summary": "List available shells",
  3756. "x-codeSamples": [
  3757. {
  3758. "lang": "js",
  3759. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  3760. }
  3761. ]
  3762. }
  3763. },
  3764. "/pty": {
  3765. "get": {
  3766. "tags": ["pty"],
  3767. "operationId": "pty.list",
  3768. "parameters": [
  3769. {
  3770. "name": "directory",
  3771. "in": "query",
  3772. "schema": {
  3773. "type": "string"
  3774. },
  3775. "required": false
  3776. },
  3777. {
  3778. "name": "workspace",
  3779. "in": "query",
  3780. "schema": {
  3781. "type": "string"
  3782. },
  3783. "required": false
  3784. }
  3785. ],
  3786. "responses": {
  3787. "200": {
  3788. "description": "List of sessions",
  3789. "content": {
  3790. "application/json": {
  3791. "schema": {
  3792. "type": "array",
  3793. "items": {
  3794. "$ref": "#/components/schemas/Pty"
  3795. },
  3796. "description": "List of sessions"
  3797. }
  3798. }
  3799. }
  3800. },
  3801. "400": {
  3802. "description": "Bad request",
  3803. "content": {
  3804. "application/json": {
  3805. "schema": {
  3806. "$ref": "#/components/schemas/BadRequestError"
  3807. }
  3808. }
  3809. }
  3810. }
  3811. },
  3812. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  3813. "summary": "List PTY sessions",
  3814. "x-codeSamples": [
  3815. {
  3816. "lang": "js",
  3817. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  3818. }
  3819. ]
  3820. },
  3821. "post": {
  3822. "tags": ["pty"],
  3823. "operationId": "pty.create",
  3824. "parameters": [
  3825. {
  3826. "name": "directory",
  3827. "in": "query",
  3828. "schema": {
  3829. "type": "string"
  3830. },
  3831. "required": false
  3832. },
  3833. {
  3834. "name": "workspace",
  3835. "in": "query",
  3836. "schema": {
  3837. "type": "string"
  3838. },
  3839. "required": false
  3840. }
  3841. ],
  3842. "responses": {
  3843. "200": {
  3844. "description": "Created session",
  3845. "content": {
  3846. "application/json": {
  3847. "schema": {
  3848. "$ref": "#/components/schemas/Pty"
  3849. }
  3850. }
  3851. }
  3852. },
  3853. "400": {
  3854. "description": "BadRequest | InvalidRequestError",
  3855. "content": {
  3856. "application/json": {
  3857. "schema": {
  3858. "anyOf": [
  3859. {
  3860. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3861. },
  3862. {
  3863. "$ref": "#/components/schemas/InvalidRequestError"
  3864. }
  3865. ]
  3866. }
  3867. }
  3868. }
  3869. }
  3870. },
  3871. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  3872. "summary": "Create PTY session",
  3873. "requestBody": {
  3874. "content": {
  3875. "application/json": {
  3876. "schema": {
  3877. "type": "object",
  3878. "properties": {
  3879. "command": {
  3880. "type": "string"
  3881. },
  3882. "args": {
  3883. "type": "array",
  3884. "items": {
  3885. "type": "string"
  3886. }
  3887. },
  3888. "cwd": {
  3889. "type": "string"
  3890. },
  3891. "title": {
  3892. "type": "string"
  3893. },
  3894. "env": {
  3895. "type": "object",
  3896. "additionalProperties": {
  3897. "type": "string"
  3898. }
  3899. }
  3900. },
  3901. "additionalProperties": false
  3902. }
  3903. }
  3904. }
  3905. },
  3906. "x-codeSamples": [
  3907. {
  3908. "lang": "js",
  3909. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  3910. }
  3911. ]
  3912. }
  3913. },
  3914. "/pty/{ptyID}": {
  3915. "get": {
  3916. "tags": ["pty"],
  3917. "operationId": "pty.get",
  3918. "parameters": [
  3919. {
  3920. "name": "ptyID",
  3921. "in": "path",
  3922. "schema": {
  3923. "type": "string",
  3924. "pattern": "^pty"
  3925. },
  3926. "required": true
  3927. },
  3928. {
  3929. "name": "directory",
  3930. "in": "query",
  3931. "schema": {
  3932. "type": "string"
  3933. },
  3934. "required": false
  3935. },
  3936. {
  3937. "name": "workspace",
  3938. "in": "query",
  3939. "schema": {
  3940. "type": "string"
  3941. },
  3942. "required": false
  3943. }
  3944. ],
  3945. "responses": {
  3946. "200": {
  3947. "description": "Session info",
  3948. "content": {
  3949. "application/json": {
  3950. "schema": {
  3951. "$ref": "#/components/schemas/Pty"
  3952. }
  3953. }
  3954. }
  3955. },
  3956. "400": {
  3957. "description": "Bad request",
  3958. "content": {
  3959. "application/json": {
  3960. "schema": {
  3961. "$ref": "#/components/schemas/BadRequestError"
  3962. }
  3963. }
  3964. }
  3965. },
  3966. "404": {
  3967. "description": "PtyNotFoundError",
  3968. "content": {
  3969. "application/json": {
  3970. "schema": {
  3971. "$ref": "#/components/schemas/PtyNotFoundError"
  3972. }
  3973. }
  3974. }
  3975. }
  3976. },
  3977. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  3978. "summary": "Get PTY session",
  3979. "x-codeSamples": [
  3980. {
  3981. "lang": "js",
  3982. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  3983. }
  3984. ]
  3985. },
  3986. "put": {
  3987. "tags": ["pty"],
  3988. "operationId": "pty.update",
  3989. "parameters": [
  3990. {
  3991. "name": "ptyID",
  3992. "in": "path",
  3993. "schema": {
  3994. "type": "string",
  3995. "pattern": "^pty"
  3996. },
  3997. "required": true
  3998. },
  3999. {
  4000. "name": "directory",
  4001. "in": "query",
  4002. "schema": {
  4003. "type": "string"
  4004. },
  4005. "required": false
  4006. },
  4007. {
  4008. "name": "workspace",
  4009. "in": "query",
  4010. "schema": {
  4011. "type": "string"
  4012. },
  4013. "required": false
  4014. }
  4015. ],
  4016. "responses": {
  4017. "200": {
  4018. "description": "Updated session",
  4019. "content": {
  4020. "application/json": {
  4021. "schema": {
  4022. "$ref": "#/components/schemas/Pty"
  4023. }
  4024. }
  4025. }
  4026. },
  4027. "400": {
  4028. "description": "BadRequest | InvalidRequestError",
  4029. "content": {
  4030. "application/json": {
  4031. "schema": {
  4032. "anyOf": [
  4033. {
  4034. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4035. },
  4036. {
  4037. "$ref": "#/components/schemas/InvalidRequestError"
  4038. }
  4039. ]
  4040. }
  4041. }
  4042. }
  4043. },
  4044. "404": {
  4045. "description": "PtyNotFoundError",
  4046. "content": {
  4047. "application/json": {
  4048. "schema": {
  4049. "$ref": "#/components/schemas/PtyNotFoundError"
  4050. }
  4051. }
  4052. }
  4053. }
  4054. },
  4055. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4056. "summary": "Update PTY session",
  4057. "requestBody": {
  4058. "content": {
  4059. "application/json": {
  4060. "schema": {
  4061. "type": "object",
  4062. "properties": {
  4063. "title": {
  4064. "type": "string"
  4065. },
  4066. "size": {
  4067. "type": "object",
  4068. "properties": {
  4069. "rows": {
  4070. "type": "integer",
  4071. "exclusiveMinimum": 0
  4072. },
  4073. "cols": {
  4074. "type": "integer",
  4075. "exclusiveMinimum": 0
  4076. }
  4077. },
  4078. "required": ["rows", "cols"],
  4079. "additionalProperties": false
  4080. }
  4081. },
  4082. "additionalProperties": false
  4083. }
  4084. }
  4085. }
  4086. },
  4087. "x-codeSamples": [
  4088. {
  4089. "lang": "js",
  4090. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4091. }
  4092. ]
  4093. },
  4094. "delete": {
  4095. "tags": ["pty"],
  4096. "operationId": "pty.remove",
  4097. "parameters": [
  4098. {
  4099. "name": "ptyID",
  4100. "in": "path",
  4101. "schema": {
  4102. "type": "string",
  4103. "pattern": "^pty"
  4104. },
  4105. "required": true
  4106. },
  4107. {
  4108. "name": "directory",
  4109. "in": "query",
  4110. "schema": {
  4111. "type": "string"
  4112. },
  4113. "required": false
  4114. },
  4115. {
  4116. "name": "workspace",
  4117. "in": "query",
  4118. "schema": {
  4119. "type": "string"
  4120. },
  4121. "required": false
  4122. }
  4123. ],
  4124. "responses": {
  4125. "200": {
  4126. "description": "Session removed",
  4127. "content": {
  4128. "application/json": {
  4129. "schema": {
  4130. "type": "boolean",
  4131. "description": "Session removed"
  4132. }
  4133. }
  4134. }
  4135. },
  4136. "400": {
  4137. "description": "Bad request",
  4138. "content": {
  4139. "application/json": {
  4140. "schema": {
  4141. "$ref": "#/components/schemas/BadRequestError"
  4142. }
  4143. }
  4144. }
  4145. },
  4146. "404": {
  4147. "description": "PtyNotFoundError",
  4148. "content": {
  4149. "application/json": {
  4150. "schema": {
  4151. "$ref": "#/components/schemas/PtyNotFoundError"
  4152. }
  4153. }
  4154. }
  4155. }
  4156. },
  4157. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4158. "summary": "Remove PTY session",
  4159. "x-codeSamples": [
  4160. {
  4161. "lang": "js",
  4162. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4163. }
  4164. ]
  4165. }
  4166. },
  4167. "/pty/{ptyID}/connect-token": {
  4168. "post": {
  4169. "tags": ["pty"],
  4170. "operationId": "pty.connectToken",
  4171. "parameters": [
  4172. {
  4173. "name": "ptyID",
  4174. "in": "path",
  4175. "schema": {
  4176. "type": "string",
  4177. "pattern": "^pty"
  4178. },
  4179. "required": true
  4180. },
  4181. {
  4182. "name": "directory",
  4183. "in": "query",
  4184. "schema": {
  4185. "type": "string"
  4186. },
  4187. "required": false
  4188. },
  4189. {
  4190. "name": "workspace",
  4191. "in": "query",
  4192. "schema": {
  4193. "type": "string"
  4194. },
  4195. "required": false
  4196. }
  4197. ],
  4198. "responses": {
  4199. "200": {
  4200. "description": "WebSocket connect token",
  4201. "content": {
  4202. "application/json": {
  4203. "schema": {
  4204. "type": "object",
  4205. "properties": {
  4206. "ticket": {
  4207. "type": "string"
  4208. },
  4209. "expires_in": {
  4210. "type": "integer",
  4211. "exclusiveMinimum": 0
  4212. }
  4213. },
  4214. "required": ["ticket", "expires_in"],
  4215. "additionalProperties": false,
  4216. "description": "WebSocket connect token"
  4217. }
  4218. }
  4219. }
  4220. },
  4221. "400": {
  4222. "description": "Bad request",
  4223. "content": {
  4224. "application/json": {
  4225. "schema": {
  4226. "$ref": "#/components/schemas/BadRequestError"
  4227. }
  4228. }
  4229. }
  4230. },
  4231. "403": {
  4232. "description": "PtyForbiddenError",
  4233. "content": {
  4234. "application/json": {
  4235. "schema": {
  4236. "$ref": "#/components/schemas/PtyForbiddenError"
  4237. }
  4238. }
  4239. }
  4240. },
  4241. "404": {
  4242. "description": "PtyNotFoundError",
  4243. "content": {
  4244. "application/json": {
  4245. "schema": {
  4246. "$ref": "#/components/schemas/PtyNotFoundError"
  4247. }
  4248. }
  4249. }
  4250. }
  4251. },
  4252. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4253. "summary": "Create PTY WebSocket token",
  4254. "x-codeSamples": [
  4255. {
  4256. "lang": "js",
  4257. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4258. }
  4259. ]
  4260. }
  4261. },
  4262. "/question": {
  4263. "get": {
  4264. "tags": ["question"],
  4265. "operationId": "question.list",
  4266. "parameters": [
  4267. {
  4268. "name": "directory",
  4269. "in": "query",
  4270. "schema": {
  4271. "type": "string"
  4272. },
  4273. "required": false
  4274. },
  4275. {
  4276. "name": "workspace",
  4277. "in": "query",
  4278. "schema": {
  4279. "type": "string"
  4280. },
  4281. "required": false
  4282. }
  4283. ],
  4284. "responses": {
  4285. "200": {
  4286. "description": "List of pending questions",
  4287. "content": {
  4288. "application/json": {
  4289. "schema": {
  4290. "type": "array",
  4291. "items": {
  4292. "$ref": "#/components/schemas/QuestionRequest"
  4293. },
  4294. "description": "List of pending questions"
  4295. }
  4296. }
  4297. }
  4298. },
  4299. "400": {
  4300. "description": "Bad request",
  4301. "content": {
  4302. "application/json": {
  4303. "schema": {
  4304. "$ref": "#/components/schemas/BadRequestError"
  4305. }
  4306. }
  4307. }
  4308. }
  4309. },
  4310. "description": "Get all pending question requests across all sessions.",
  4311. "summary": "List pending questions",
  4312. "x-codeSamples": [
  4313. {
  4314. "lang": "js",
  4315. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4316. }
  4317. ]
  4318. }
  4319. },
  4320. "/question/{requestID}/reply": {
  4321. "post": {
  4322. "tags": ["question"],
  4323. "operationId": "question.reply",
  4324. "parameters": [
  4325. {
  4326. "name": "requestID",
  4327. "in": "path",
  4328. "schema": {
  4329. "type": "string",
  4330. "pattern": "^que"
  4331. },
  4332. "required": true
  4333. },
  4334. {
  4335. "name": "directory",
  4336. "in": "query",
  4337. "schema": {
  4338. "type": "string"
  4339. },
  4340. "required": false
  4341. },
  4342. {
  4343. "name": "workspace",
  4344. "in": "query",
  4345. "schema": {
  4346. "type": "string"
  4347. },
  4348. "required": false
  4349. }
  4350. ],
  4351. "responses": {
  4352. "200": {
  4353. "description": "Question answered successfully",
  4354. "content": {
  4355. "application/json": {
  4356. "schema": {
  4357. "type": "boolean",
  4358. "description": "Question answered successfully"
  4359. }
  4360. }
  4361. }
  4362. },
  4363. "400": {
  4364. "description": "BadRequest | InvalidRequestError",
  4365. "content": {
  4366. "application/json": {
  4367. "schema": {
  4368. "anyOf": [
  4369. {
  4370. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4371. },
  4372. {
  4373. "$ref": "#/components/schemas/InvalidRequestError"
  4374. }
  4375. ]
  4376. }
  4377. }
  4378. }
  4379. },
  4380. "404": {
  4381. "description": "QuestionNotFoundError",
  4382. "content": {
  4383. "application/json": {
  4384. "schema": {
  4385. "$ref": "#/components/schemas/QuestionNotFoundError"
  4386. }
  4387. }
  4388. }
  4389. }
  4390. },
  4391. "description": "Provide answers to a question request from the AI assistant.",
  4392. "summary": "Reply to question request",
  4393. "requestBody": {
  4394. "content": {
  4395. "application/json": {
  4396. "schema": {
  4397. "type": "object",
  4398. "properties": {
  4399. "answers": {
  4400. "type": "array",
  4401. "items": {
  4402. "$ref": "#/components/schemas/QuestionAnswer"
  4403. },
  4404. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4405. }
  4406. },
  4407. "required": ["answers"],
  4408. "additionalProperties": false
  4409. }
  4410. }
  4411. }
  4412. },
  4413. "x-codeSamples": [
  4414. {
  4415. "lang": "js",
  4416. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4417. }
  4418. ]
  4419. }
  4420. },
  4421. "/question/{requestID}/reject": {
  4422. "post": {
  4423. "tags": ["question"],
  4424. "operationId": "question.reject",
  4425. "parameters": [
  4426. {
  4427. "name": "requestID",
  4428. "in": "path",
  4429. "schema": {
  4430. "type": "string",
  4431. "pattern": "^que"
  4432. },
  4433. "required": true
  4434. },
  4435. {
  4436. "name": "directory",
  4437. "in": "query",
  4438. "schema": {
  4439. "type": "string"
  4440. },
  4441. "required": false
  4442. },
  4443. {
  4444. "name": "workspace",
  4445. "in": "query",
  4446. "schema": {
  4447. "type": "string"
  4448. },
  4449. "required": false
  4450. }
  4451. ],
  4452. "responses": {
  4453. "200": {
  4454. "description": "Question rejected successfully",
  4455. "content": {
  4456. "application/json": {
  4457. "schema": {
  4458. "type": "boolean",
  4459. "description": "Question rejected successfully"
  4460. }
  4461. }
  4462. }
  4463. },
  4464. "400": {
  4465. "description": "BadRequest | InvalidRequestError",
  4466. "content": {
  4467. "application/json": {
  4468. "schema": {
  4469. "anyOf": [
  4470. {
  4471. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4472. },
  4473. {
  4474. "$ref": "#/components/schemas/InvalidRequestError"
  4475. }
  4476. ]
  4477. }
  4478. }
  4479. }
  4480. },
  4481. "404": {
  4482. "description": "QuestionNotFoundError",
  4483. "content": {
  4484. "application/json": {
  4485. "schema": {
  4486. "$ref": "#/components/schemas/QuestionNotFoundError"
  4487. }
  4488. }
  4489. }
  4490. }
  4491. },
  4492. "description": "Reject a question request from the AI assistant.",
  4493. "summary": "Reject question request",
  4494. "x-codeSamples": [
  4495. {
  4496. "lang": "js",
  4497. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4498. }
  4499. ]
  4500. }
  4501. },
  4502. "/permission": {
  4503. "get": {
  4504. "tags": ["permission"],
  4505. "operationId": "permission.list",
  4506. "parameters": [
  4507. {
  4508. "name": "directory",
  4509. "in": "query",
  4510. "schema": {
  4511. "type": "string"
  4512. },
  4513. "required": false
  4514. },
  4515. {
  4516. "name": "workspace",
  4517. "in": "query",
  4518. "schema": {
  4519. "type": "string"
  4520. },
  4521. "required": false
  4522. }
  4523. ],
  4524. "responses": {
  4525. "200": {
  4526. "description": "List of pending permissions",
  4527. "content": {
  4528. "application/json": {
  4529. "schema": {
  4530. "type": "array",
  4531. "items": {
  4532. "$ref": "#/components/schemas/PermissionRequest"
  4533. },
  4534. "description": "List of pending permissions"
  4535. }
  4536. }
  4537. }
  4538. },
  4539. "400": {
  4540. "description": "Bad request",
  4541. "content": {
  4542. "application/json": {
  4543. "schema": {
  4544. "$ref": "#/components/schemas/BadRequestError"
  4545. }
  4546. }
  4547. }
  4548. }
  4549. },
  4550. "description": "Get all pending permission requests across all sessions.",
  4551. "summary": "List pending permissions",
  4552. "x-codeSamples": [
  4553. {
  4554. "lang": "js",
  4555. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4556. }
  4557. ]
  4558. }
  4559. },
  4560. "/permission/{requestID}/reply": {
  4561. "post": {
  4562. "tags": ["permission"],
  4563. "operationId": "permission.reply",
  4564. "parameters": [
  4565. {
  4566. "name": "requestID",
  4567. "in": "path",
  4568. "schema": {
  4569. "type": "string",
  4570. "pattern": "^per"
  4571. },
  4572. "required": true
  4573. },
  4574. {
  4575. "name": "directory",
  4576. "in": "query",
  4577. "schema": {
  4578. "type": "string"
  4579. },
  4580. "required": false
  4581. },
  4582. {
  4583. "name": "workspace",
  4584. "in": "query",
  4585. "schema": {
  4586. "type": "string"
  4587. },
  4588. "required": false
  4589. }
  4590. ],
  4591. "responses": {
  4592. "200": {
  4593. "description": "Permission processed successfully",
  4594. "content": {
  4595. "application/json": {
  4596. "schema": {
  4597. "type": "boolean",
  4598. "description": "Permission processed successfully"
  4599. }
  4600. }
  4601. }
  4602. },
  4603. "400": {
  4604. "description": "BadRequest | InvalidRequestError",
  4605. "content": {
  4606. "application/json": {
  4607. "schema": {
  4608. "anyOf": [
  4609. {
  4610. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4611. },
  4612. {
  4613. "$ref": "#/components/schemas/InvalidRequestError"
  4614. }
  4615. ]
  4616. }
  4617. }
  4618. }
  4619. },
  4620. "404": {
  4621. "description": "PermissionNotFoundError",
  4622. "content": {
  4623. "application/json": {
  4624. "schema": {
  4625. "$ref": "#/components/schemas/PermissionNotFoundError"
  4626. }
  4627. }
  4628. }
  4629. }
  4630. },
  4631. "description": "Approve or deny a permission request from the AI assistant.",
  4632. "summary": "Respond to permission request",
  4633. "requestBody": {
  4634. "content": {
  4635. "application/json": {
  4636. "schema": {
  4637. "type": "object",
  4638. "properties": {
  4639. "reply": {
  4640. "type": "string",
  4641. "enum": ["once", "always", "reject"]
  4642. },
  4643. "message": {
  4644. "type": "string"
  4645. }
  4646. },
  4647. "required": ["reply"],
  4648. "additionalProperties": false
  4649. }
  4650. }
  4651. }
  4652. },
  4653. "x-codeSamples": [
  4654. {
  4655. "lang": "js",
  4656. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4657. }
  4658. ]
  4659. }
  4660. },
  4661. "/provider": {
  4662. "get": {
  4663. "tags": ["provider"],
  4664. "operationId": "provider.list",
  4665. "parameters": [
  4666. {
  4667. "name": "directory",
  4668. "in": "query",
  4669. "schema": {
  4670. "type": "string"
  4671. },
  4672. "required": false
  4673. },
  4674. {
  4675. "name": "workspace",
  4676. "in": "query",
  4677. "schema": {
  4678. "type": "string"
  4679. },
  4680. "required": false
  4681. }
  4682. ],
  4683. "responses": {
  4684. "200": {
  4685. "description": "List of providers",
  4686. "content": {
  4687. "application/json": {
  4688. "schema": {
  4689. "type": "object",
  4690. "properties": {
  4691. "all": {
  4692. "type": "array",
  4693. "items": {
  4694. "$ref": "#/components/schemas/Provider"
  4695. }
  4696. },
  4697. "default": {
  4698. "type": "object",
  4699. "additionalProperties": {
  4700. "type": "string"
  4701. }
  4702. },
  4703. "connected": {
  4704. "type": "array",
  4705. "items": {
  4706. "type": "string"
  4707. }
  4708. }
  4709. },
  4710. "required": ["all", "default", "connected"],
  4711. "additionalProperties": false,
  4712. "description": "List of providers"
  4713. }
  4714. }
  4715. }
  4716. },
  4717. "400": {
  4718. "description": "Bad request",
  4719. "content": {
  4720. "application/json": {
  4721. "schema": {
  4722. "$ref": "#/components/schemas/BadRequestError"
  4723. }
  4724. }
  4725. }
  4726. }
  4727. },
  4728. "description": "Get a list of all available AI providers, including both available and connected ones.",
  4729. "summary": "List providers",
  4730. "x-codeSamples": [
  4731. {
  4732. "lang": "js",
  4733. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  4734. }
  4735. ]
  4736. }
  4737. },
  4738. "/provider/auth": {
  4739. "get": {
  4740. "tags": ["provider"],
  4741. "operationId": "provider.auth",
  4742. "parameters": [
  4743. {
  4744. "name": "directory",
  4745. "in": "query",
  4746. "schema": {
  4747. "type": "string"
  4748. },
  4749. "required": false
  4750. },
  4751. {
  4752. "name": "workspace",
  4753. "in": "query",
  4754. "schema": {
  4755. "type": "string"
  4756. },
  4757. "required": false
  4758. }
  4759. ],
  4760. "responses": {
  4761. "200": {
  4762. "description": "Provider auth methods",
  4763. "content": {
  4764. "application/json": {
  4765. "schema": {
  4766. "type": "object",
  4767. "additionalProperties": {
  4768. "type": "array",
  4769. "items": {
  4770. "$ref": "#/components/schemas/ProviderAuthMethod"
  4771. }
  4772. },
  4773. "description": "Provider auth methods"
  4774. }
  4775. }
  4776. }
  4777. },
  4778. "400": {
  4779. "description": "Bad request",
  4780. "content": {
  4781. "application/json": {
  4782. "schema": {
  4783. "$ref": "#/components/schemas/BadRequestError"
  4784. }
  4785. }
  4786. }
  4787. }
  4788. },
  4789. "description": "Retrieve available authentication methods for all AI providers.",
  4790. "summary": "Get provider auth methods",
  4791. "x-codeSamples": [
  4792. {
  4793. "lang": "js",
  4794. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  4795. }
  4796. ]
  4797. }
  4798. },
  4799. "/provider/{providerID}/oauth/authorize": {
  4800. "post": {
  4801. "tags": ["provider"],
  4802. "operationId": "provider.oauth.authorize",
  4803. "parameters": [
  4804. {
  4805. "name": "providerID",
  4806. "in": "path",
  4807. "schema": {
  4808. "type": "string"
  4809. },
  4810. "required": true
  4811. },
  4812. {
  4813. "name": "directory",
  4814. "in": "query",
  4815. "schema": {
  4816. "type": "string"
  4817. },
  4818. "required": false
  4819. },
  4820. {
  4821. "name": "workspace",
  4822. "in": "query",
  4823. "schema": {
  4824. "type": "string"
  4825. },
  4826. "required": false
  4827. }
  4828. ],
  4829. "responses": {
  4830. "200": {
  4831. "description": "Authorization URL and method",
  4832. "content": {
  4833. "application/json": {
  4834. "schema": {
  4835. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  4836. }
  4837. }
  4838. }
  4839. },
  4840. "400": {
  4841. "description": "ProviderAuthError | InvalidRequestError",
  4842. "content": {
  4843. "application/json": {
  4844. "schema": {
  4845. "anyOf": [
  4846. {
  4847. "$ref": "#/components/schemas/ProviderAuthError1"
  4848. },
  4849. {
  4850. "$ref": "#/components/schemas/InvalidRequestError"
  4851. }
  4852. ]
  4853. }
  4854. }
  4855. }
  4856. }
  4857. },
  4858. "description": "Start the OAuth authorization flow for a provider.",
  4859. "summary": "Start OAuth authorization",
  4860. "requestBody": {
  4861. "content": {
  4862. "application/json": {
  4863. "schema": {
  4864. "type": "object",
  4865. "properties": {
  4866. "method": {
  4867. "type": "number",
  4868. "description": "Auth method index"
  4869. },
  4870. "inputs": {
  4871. "type": "object",
  4872. "additionalProperties": {
  4873. "type": "string"
  4874. }
  4875. }
  4876. },
  4877. "required": ["method"],
  4878. "additionalProperties": false
  4879. }
  4880. }
  4881. }
  4882. },
  4883. "x-codeSamples": [
  4884. {
  4885. "lang": "js",
  4886. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  4887. }
  4888. ]
  4889. }
  4890. },
  4891. "/provider/{providerID}/oauth/callback": {
  4892. "post": {
  4893. "tags": ["provider"],
  4894. "operationId": "provider.oauth.callback",
  4895. "parameters": [
  4896. {
  4897. "name": "providerID",
  4898. "in": "path",
  4899. "schema": {
  4900. "type": "string"
  4901. },
  4902. "required": true
  4903. },
  4904. {
  4905. "name": "directory",
  4906. "in": "query",
  4907. "schema": {
  4908. "type": "string"
  4909. },
  4910. "required": false
  4911. },
  4912. {
  4913. "name": "workspace",
  4914. "in": "query",
  4915. "schema": {
  4916. "type": "string"
  4917. },
  4918. "required": false
  4919. }
  4920. ],
  4921. "responses": {
  4922. "200": {
  4923. "description": "OAuth callback processed successfully",
  4924. "content": {
  4925. "application/json": {
  4926. "schema": {
  4927. "type": "boolean",
  4928. "description": "OAuth callback processed successfully"
  4929. }
  4930. }
  4931. }
  4932. },
  4933. "400": {
  4934. "description": "ProviderAuthError | InvalidRequestError",
  4935. "content": {
  4936. "application/json": {
  4937. "schema": {
  4938. "anyOf": [
  4939. {
  4940. "$ref": "#/components/schemas/ProviderAuthError1"
  4941. },
  4942. {
  4943. "$ref": "#/components/schemas/InvalidRequestError"
  4944. }
  4945. ]
  4946. }
  4947. }
  4948. }
  4949. }
  4950. },
  4951. "description": "Handle the OAuth callback from a provider after user authorization.",
  4952. "summary": "Handle OAuth callback",
  4953. "requestBody": {
  4954. "content": {
  4955. "application/json": {
  4956. "schema": {
  4957. "type": "object",
  4958. "properties": {
  4959. "method": {
  4960. "type": "number",
  4961. "description": "Auth method index"
  4962. },
  4963. "code": {
  4964. "type": "string"
  4965. }
  4966. },
  4967. "required": ["method"],
  4968. "additionalProperties": false
  4969. }
  4970. }
  4971. }
  4972. },
  4973. "x-codeSamples": [
  4974. {
  4975. "lang": "js",
  4976. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  4977. }
  4978. ]
  4979. }
  4980. },
  4981. "/session": {
  4982. "get": {
  4983. "tags": ["session"],
  4984. "operationId": "session.list",
  4985. "parameters": [
  4986. {
  4987. "name": "directory",
  4988. "in": "query",
  4989. "schema": {
  4990. "type": "string"
  4991. },
  4992. "required": false
  4993. },
  4994. {
  4995. "name": "workspace",
  4996. "in": "query",
  4997. "schema": {
  4998. "type": "string"
  4999. },
  5000. "required": false
  5001. },
  5002. {
  5003. "name": "scope",
  5004. "in": "query",
  5005. "schema": {
  5006. "type": "string",
  5007. "enum": ["project"]
  5008. },
  5009. "required": false
  5010. },
  5011. {
  5012. "name": "path",
  5013. "in": "query",
  5014. "schema": {
  5015. "type": "string"
  5016. },
  5017. "required": false
  5018. },
  5019. {
  5020. "name": "roots",
  5021. "in": "query",
  5022. "schema": {
  5023. "anyOf": [
  5024. {
  5025. "type": "boolean"
  5026. },
  5027. {
  5028. "type": "string",
  5029. "enum": ["true", "false"]
  5030. }
  5031. ]
  5032. },
  5033. "required": false
  5034. },
  5035. {
  5036. "name": "start",
  5037. "in": "query",
  5038. "schema": {
  5039. "type": "number"
  5040. },
  5041. "required": false
  5042. },
  5043. {
  5044. "name": "search",
  5045. "in": "query",
  5046. "schema": {
  5047. "type": "string"
  5048. },
  5049. "required": false
  5050. },
  5051. {
  5052. "name": "limit",
  5053. "in": "query",
  5054. "schema": {
  5055. "type": "number"
  5056. },
  5057. "required": false
  5058. }
  5059. ],
  5060. "responses": {
  5061. "200": {
  5062. "description": "List of sessions",
  5063. "content": {
  5064. "application/json": {
  5065. "schema": {
  5066. "type": "array",
  5067. "items": {
  5068. "$ref": "#/components/schemas/Session"
  5069. },
  5070. "description": "List of sessions"
  5071. }
  5072. }
  5073. }
  5074. },
  5075. "400": {
  5076. "description": "Bad request",
  5077. "content": {
  5078. "application/json": {
  5079. "schema": {
  5080. "$ref": "#/components/schemas/BadRequestError"
  5081. }
  5082. }
  5083. }
  5084. }
  5085. },
  5086. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5087. "summary": "List sessions",
  5088. "x-codeSamples": [
  5089. {
  5090. "lang": "js",
  5091. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5092. }
  5093. ]
  5094. },
  5095. "post": {
  5096. "tags": ["session"],
  5097. "operationId": "session.create",
  5098. "parameters": [
  5099. {
  5100. "name": "directory",
  5101. "in": "query",
  5102. "schema": {
  5103. "type": "string"
  5104. },
  5105. "required": false
  5106. },
  5107. {
  5108. "name": "workspace",
  5109. "in": "query",
  5110. "schema": {
  5111. "type": "string"
  5112. },
  5113. "required": false
  5114. }
  5115. ],
  5116. "responses": {
  5117. "200": {
  5118. "description": "Successfully created session",
  5119. "content": {
  5120. "application/json": {
  5121. "schema": {
  5122. "$ref": "#/components/schemas/Session"
  5123. }
  5124. }
  5125. }
  5126. },
  5127. "400": {
  5128. "description": "BadRequest | InvalidRequestError",
  5129. "content": {
  5130. "application/json": {
  5131. "schema": {
  5132. "anyOf": [
  5133. {
  5134. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5135. },
  5136. {
  5137. "$ref": "#/components/schemas/InvalidRequestError"
  5138. }
  5139. ]
  5140. }
  5141. }
  5142. }
  5143. }
  5144. },
  5145. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5146. "summary": "Create session",
  5147. "requestBody": {
  5148. "content": {
  5149. "application/json": {
  5150. "schema": {
  5151. "type": "object",
  5152. "properties": {
  5153. "parentID": {
  5154. "type": "string",
  5155. "pattern": "^ses"
  5156. },
  5157. "title": {
  5158. "type": "string"
  5159. },
  5160. "agent": {
  5161. "type": "string"
  5162. },
  5163. "model": {
  5164. "type": "object",
  5165. "properties": {
  5166. "id": {
  5167. "type": "string"
  5168. },
  5169. "providerID": {
  5170. "type": "string"
  5171. },
  5172. "variant": {
  5173. "type": "string"
  5174. }
  5175. },
  5176. "required": ["id", "providerID"],
  5177. "additionalProperties": false
  5178. },
  5179. "permission": {
  5180. "$ref": "#/components/schemas/PermissionRuleset"
  5181. },
  5182. "workspaceID": {
  5183. "type": "string",
  5184. "pattern": "^wrk"
  5185. }
  5186. },
  5187. "additionalProperties": false
  5188. }
  5189. }
  5190. }
  5191. },
  5192. "x-codeSamples": [
  5193. {
  5194. "lang": "js",
  5195. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5196. }
  5197. ]
  5198. }
  5199. },
  5200. "/session/status": {
  5201. "get": {
  5202. "tags": ["session"],
  5203. "operationId": "session.status",
  5204. "parameters": [
  5205. {
  5206. "name": "directory",
  5207. "in": "query",
  5208. "schema": {
  5209. "type": "string"
  5210. },
  5211. "required": false
  5212. },
  5213. {
  5214. "name": "workspace",
  5215. "in": "query",
  5216. "schema": {
  5217. "type": "string"
  5218. },
  5219. "required": false
  5220. }
  5221. ],
  5222. "responses": {
  5223. "200": {
  5224. "description": "Get session status",
  5225. "content": {
  5226. "application/json": {
  5227. "schema": {
  5228. "type": "object",
  5229. "additionalProperties": {
  5230. "$ref": "#/components/schemas/SessionStatus"
  5231. },
  5232. "description": "Get session status"
  5233. }
  5234. }
  5235. }
  5236. },
  5237. "400": {
  5238. "description": "BadRequest | InvalidRequestError",
  5239. "content": {
  5240. "application/json": {
  5241. "schema": {
  5242. "anyOf": [
  5243. {
  5244. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5245. },
  5246. {
  5247. "$ref": "#/components/schemas/InvalidRequestError"
  5248. }
  5249. ]
  5250. }
  5251. }
  5252. }
  5253. }
  5254. },
  5255. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5256. "summary": "Get session status",
  5257. "x-codeSamples": [
  5258. {
  5259. "lang": "js",
  5260. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5261. }
  5262. ]
  5263. }
  5264. },
  5265. "/session/{sessionID}": {
  5266. "get": {
  5267. "tags": ["session"],
  5268. "operationId": "session.get",
  5269. "parameters": [
  5270. {
  5271. "name": "sessionID",
  5272. "in": "path",
  5273. "schema": {
  5274. "type": "string",
  5275. "pattern": "^ses"
  5276. },
  5277. "required": true
  5278. },
  5279. {
  5280. "name": "directory",
  5281. "in": "query",
  5282. "schema": {
  5283. "type": "string"
  5284. },
  5285. "required": false
  5286. },
  5287. {
  5288. "name": "workspace",
  5289. "in": "query",
  5290. "schema": {
  5291. "type": "string"
  5292. },
  5293. "required": false
  5294. }
  5295. ],
  5296. "responses": {
  5297. "200": {
  5298. "description": "Get session",
  5299. "content": {
  5300. "application/json": {
  5301. "schema": {
  5302. "$ref": "#/components/schemas/Session"
  5303. }
  5304. }
  5305. }
  5306. },
  5307. "400": {
  5308. "description": "BadRequest | InvalidRequestError",
  5309. "content": {
  5310. "application/json": {
  5311. "schema": {
  5312. "anyOf": [
  5313. {
  5314. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5315. },
  5316. {
  5317. "$ref": "#/components/schemas/InvalidRequestError"
  5318. }
  5319. ]
  5320. }
  5321. }
  5322. }
  5323. },
  5324. "404": {
  5325. "description": "NotFoundError",
  5326. "content": {
  5327. "application/json": {
  5328. "schema": {
  5329. "$ref": "#/components/schemas/NotFoundError"
  5330. }
  5331. }
  5332. }
  5333. }
  5334. },
  5335. "description": "Retrieve detailed information about a specific OpenCode session.",
  5336. "summary": "Get session",
  5337. "x-codeSamples": [
  5338. {
  5339. "lang": "js",
  5340. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5341. }
  5342. ]
  5343. },
  5344. "delete": {
  5345. "tags": ["session"],
  5346. "operationId": "session.delete",
  5347. "parameters": [
  5348. {
  5349. "name": "sessionID",
  5350. "in": "path",
  5351. "schema": {
  5352. "type": "string",
  5353. "pattern": "^ses"
  5354. },
  5355. "required": true
  5356. },
  5357. {
  5358. "name": "directory",
  5359. "in": "query",
  5360. "schema": {
  5361. "type": "string"
  5362. },
  5363. "required": false
  5364. },
  5365. {
  5366. "name": "workspace",
  5367. "in": "query",
  5368. "schema": {
  5369. "type": "string"
  5370. },
  5371. "required": false
  5372. }
  5373. ],
  5374. "responses": {
  5375. "200": {
  5376. "description": "Successfully deleted session",
  5377. "content": {
  5378. "application/json": {
  5379. "schema": {
  5380. "type": "boolean",
  5381. "description": "Successfully deleted session"
  5382. }
  5383. }
  5384. }
  5385. },
  5386. "400": {
  5387. "description": "BadRequest | InvalidRequestError",
  5388. "content": {
  5389. "application/json": {
  5390. "schema": {
  5391. "anyOf": [
  5392. {
  5393. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5394. },
  5395. {
  5396. "$ref": "#/components/schemas/InvalidRequestError"
  5397. }
  5398. ]
  5399. }
  5400. }
  5401. }
  5402. },
  5403. "404": {
  5404. "description": "NotFoundError",
  5405. "content": {
  5406. "application/json": {
  5407. "schema": {
  5408. "$ref": "#/components/schemas/NotFoundError"
  5409. }
  5410. }
  5411. }
  5412. }
  5413. },
  5414. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5415. "summary": "Delete session",
  5416. "x-codeSamples": [
  5417. {
  5418. "lang": "js",
  5419. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5420. }
  5421. ]
  5422. },
  5423. "patch": {
  5424. "tags": ["session"],
  5425. "operationId": "session.update",
  5426. "parameters": [
  5427. {
  5428. "name": "sessionID",
  5429. "in": "path",
  5430. "schema": {
  5431. "type": "string",
  5432. "pattern": "^ses"
  5433. },
  5434. "required": true
  5435. },
  5436. {
  5437. "name": "directory",
  5438. "in": "query",
  5439. "schema": {
  5440. "type": "string"
  5441. },
  5442. "required": false
  5443. },
  5444. {
  5445. "name": "workspace",
  5446. "in": "query",
  5447. "schema": {
  5448. "type": "string"
  5449. },
  5450. "required": false
  5451. }
  5452. ],
  5453. "responses": {
  5454. "200": {
  5455. "description": "Successfully updated session",
  5456. "content": {
  5457. "application/json": {
  5458. "schema": {
  5459. "$ref": "#/components/schemas/Session"
  5460. }
  5461. }
  5462. }
  5463. },
  5464. "400": {
  5465. "description": "BadRequest | InvalidRequestError",
  5466. "content": {
  5467. "application/json": {
  5468. "schema": {
  5469. "anyOf": [
  5470. {
  5471. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5472. },
  5473. {
  5474. "$ref": "#/components/schemas/InvalidRequestError"
  5475. }
  5476. ]
  5477. }
  5478. }
  5479. }
  5480. },
  5481. "404": {
  5482. "description": "NotFoundError",
  5483. "content": {
  5484. "application/json": {
  5485. "schema": {
  5486. "$ref": "#/components/schemas/NotFoundError"
  5487. }
  5488. }
  5489. }
  5490. }
  5491. },
  5492. "description": "Update properties of an existing session, such as title or other metadata.",
  5493. "summary": "Update session",
  5494. "requestBody": {
  5495. "content": {
  5496. "application/json": {
  5497. "schema": {
  5498. "type": "object",
  5499. "properties": {
  5500. "title": {
  5501. "type": "string"
  5502. },
  5503. "permission": {
  5504. "$ref": "#/components/schemas/PermissionRuleset"
  5505. },
  5506. "time": {
  5507. "type": "object",
  5508. "properties": {
  5509. "archived": {
  5510. "type": "number"
  5511. }
  5512. },
  5513. "additionalProperties": false
  5514. }
  5515. },
  5516. "additionalProperties": false
  5517. }
  5518. }
  5519. }
  5520. },
  5521. "x-codeSamples": [
  5522. {
  5523. "lang": "js",
  5524. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5525. }
  5526. ]
  5527. }
  5528. },
  5529. "/session/{sessionID}/children": {
  5530. "get": {
  5531. "tags": ["session"],
  5532. "operationId": "session.children",
  5533. "parameters": [
  5534. {
  5535. "name": "sessionID",
  5536. "in": "path",
  5537. "schema": {
  5538. "type": "string",
  5539. "pattern": "^ses"
  5540. },
  5541. "required": true
  5542. },
  5543. {
  5544. "name": "directory",
  5545. "in": "query",
  5546. "schema": {
  5547. "type": "string"
  5548. },
  5549. "required": false
  5550. },
  5551. {
  5552. "name": "workspace",
  5553. "in": "query",
  5554. "schema": {
  5555. "type": "string"
  5556. },
  5557. "required": false
  5558. }
  5559. ],
  5560. "responses": {
  5561. "200": {
  5562. "description": "List of children",
  5563. "content": {
  5564. "application/json": {
  5565. "schema": {
  5566. "type": "array",
  5567. "items": {
  5568. "$ref": "#/components/schemas/Session"
  5569. },
  5570. "description": "List of children"
  5571. }
  5572. }
  5573. }
  5574. },
  5575. "400": {
  5576. "description": "BadRequest | InvalidRequestError",
  5577. "content": {
  5578. "application/json": {
  5579. "schema": {
  5580. "anyOf": [
  5581. {
  5582. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5583. },
  5584. {
  5585. "$ref": "#/components/schemas/InvalidRequestError"
  5586. }
  5587. ]
  5588. }
  5589. }
  5590. }
  5591. },
  5592. "404": {
  5593. "description": "NotFoundError",
  5594. "content": {
  5595. "application/json": {
  5596. "schema": {
  5597. "$ref": "#/components/schemas/NotFoundError"
  5598. }
  5599. }
  5600. }
  5601. }
  5602. },
  5603. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  5604. "summary": "Get session children",
  5605. "x-codeSamples": [
  5606. {
  5607. "lang": "js",
  5608. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  5609. }
  5610. ]
  5611. }
  5612. },
  5613. "/session/{sessionID}/todo": {
  5614. "get": {
  5615. "tags": ["session"],
  5616. "operationId": "session.todo",
  5617. "parameters": [
  5618. {
  5619. "name": "sessionID",
  5620. "in": "path",
  5621. "schema": {
  5622. "type": "string",
  5623. "pattern": "^ses"
  5624. },
  5625. "required": true
  5626. },
  5627. {
  5628. "name": "directory",
  5629. "in": "query",
  5630. "schema": {
  5631. "type": "string"
  5632. },
  5633. "required": false
  5634. },
  5635. {
  5636. "name": "workspace",
  5637. "in": "query",
  5638. "schema": {
  5639. "type": "string"
  5640. },
  5641. "required": false
  5642. }
  5643. ],
  5644. "responses": {
  5645. "200": {
  5646. "description": "Todo list",
  5647. "content": {
  5648. "application/json": {
  5649. "schema": {
  5650. "type": "array",
  5651. "items": {
  5652. "$ref": "#/components/schemas/Todo"
  5653. },
  5654. "description": "Todo list"
  5655. }
  5656. }
  5657. }
  5658. },
  5659. "400": {
  5660. "description": "BadRequest | InvalidRequestError",
  5661. "content": {
  5662. "application/json": {
  5663. "schema": {
  5664. "anyOf": [
  5665. {
  5666. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5667. },
  5668. {
  5669. "$ref": "#/components/schemas/InvalidRequestError"
  5670. }
  5671. ]
  5672. }
  5673. }
  5674. }
  5675. },
  5676. "404": {
  5677. "description": "NotFoundError",
  5678. "content": {
  5679. "application/json": {
  5680. "schema": {
  5681. "$ref": "#/components/schemas/NotFoundError"
  5682. }
  5683. }
  5684. }
  5685. }
  5686. },
  5687. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  5688. "summary": "Get session todos",
  5689. "x-codeSamples": [
  5690. {
  5691. "lang": "js",
  5692. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  5693. }
  5694. ]
  5695. }
  5696. },
  5697. "/session/{sessionID}/diff": {
  5698. "get": {
  5699. "tags": ["session"],
  5700. "operationId": "session.diff",
  5701. "parameters": [
  5702. {
  5703. "name": "sessionID",
  5704. "in": "path",
  5705. "schema": {
  5706. "type": "string",
  5707. "pattern": "^ses"
  5708. },
  5709. "required": true
  5710. },
  5711. {
  5712. "name": "directory",
  5713. "in": "query",
  5714. "schema": {
  5715. "type": "string"
  5716. },
  5717. "required": false
  5718. },
  5719. {
  5720. "name": "workspace",
  5721. "in": "query",
  5722. "schema": {
  5723. "type": "string"
  5724. },
  5725. "required": false
  5726. },
  5727. {
  5728. "name": "messageID",
  5729. "in": "query",
  5730. "schema": {
  5731. "type": "string",
  5732. "pattern": "^msg"
  5733. },
  5734. "required": false
  5735. }
  5736. ],
  5737. "responses": {
  5738. "200": {
  5739. "description": "Successfully retrieved diff",
  5740. "content": {
  5741. "application/json": {
  5742. "schema": {
  5743. "type": "array",
  5744. "items": {
  5745. "$ref": "#/components/schemas/SnapshotFileDiff"
  5746. },
  5747. "description": "Successfully retrieved diff"
  5748. }
  5749. }
  5750. }
  5751. },
  5752. "400": {
  5753. "description": "Bad request",
  5754. "content": {
  5755. "application/json": {
  5756. "schema": {
  5757. "$ref": "#/components/schemas/BadRequestError"
  5758. }
  5759. }
  5760. }
  5761. }
  5762. },
  5763. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  5764. "summary": "Get message diff",
  5765. "x-codeSamples": [
  5766. {
  5767. "lang": "js",
  5768. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  5769. }
  5770. ]
  5771. }
  5772. },
  5773. "/session/{sessionID}/message": {
  5774. "get": {
  5775. "tags": ["session"],
  5776. "operationId": "session.messages",
  5777. "parameters": [
  5778. {
  5779. "name": "sessionID",
  5780. "in": "path",
  5781. "schema": {
  5782. "type": "string",
  5783. "pattern": "^ses"
  5784. },
  5785. "required": true
  5786. },
  5787. {
  5788. "name": "directory",
  5789. "in": "query",
  5790. "schema": {
  5791. "type": "string"
  5792. },
  5793. "required": false
  5794. },
  5795. {
  5796. "name": "workspace",
  5797. "in": "query",
  5798. "schema": {
  5799. "type": "string"
  5800. },
  5801. "required": false
  5802. },
  5803. {
  5804. "name": "limit",
  5805. "in": "query",
  5806. "schema": {
  5807. "type": "integer",
  5808. "minimum": 0,
  5809. "maximum": 9007199254740991
  5810. },
  5811. "required": false
  5812. },
  5813. {
  5814. "name": "before",
  5815. "in": "query",
  5816. "schema": {
  5817. "type": "string"
  5818. },
  5819. "required": false
  5820. }
  5821. ],
  5822. "responses": {
  5823. "200": {
  5824. "description": "List of messages",
  5825. "content": {
  5826. "application/json": {
  5827. "schema": {
  5828. "type": "array",
  5829. "items": {
  5830. "type": "object",
  5831. "properties": {
  5832. "info": {
  5833. "$ref": "#/components/schemas/Message"
  5834. },
  5835. "parts": {
  5836. "type": "array",
  5837. "items": {
  5838. "$ref": "#/components/schemas/Part"
  5839. }
  5840. }
  5841. },
  5842. "required": ["info", "parts"],
  5843. "additionalProperties": false
  5844. },
  5845. "description": "List of messages"
  5846. }
  5847. }
  5848. }
  5849. },
  5850. "400": {
  5851. "description": "BadRequest | InvalidRequestError",
  5852. "content": {
  5853. "application/json": {
  5854. "schema": {
  5855. "anyOf": [
  5856. {
  5857. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5858. },
  5859. {
  5860. "$ref": "#/components/schemas/InvalidRequestError"
  5861. }
  5862. ]
  5863. }
  5864. }
  5865. }
  5866. },
  5867. "404": {
  5868. "description": "NotFoundError",
  5869. "content": {
  5870. "application/json": {
  5871. "schema": {
  5872. "$ref": "#/components/schemas/NotFoundError"
  5873. }
  5874. }
  5875. }
  5876. }
  5877. },
  5878. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  5879. "summary": "Get session messages",
  5880. "x-codeSamples": [
  5881. {
  5882. "lang": "js",
  5883. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  5884. }
  5885. ]
  5886. },
  5887. "post": {
  5888. "tags": ["session"],
  5889. "operationId": "session.prompt",
  5890. "parameters": [
  5891. {
  5892. "name": "sessionID",
  5893. "in": "path",
  5894. "schema": {
  5895. "type": "string",
  5896. "pattern": "^ses"
  5897. },
  5898. "required": true
  5899. },
  5900. {
  5901. "name": "directory",
  5902. "in": "query",
  5903. "schema": {
  5904. "type": "string"
  5905. },
  5906. "required": false
  5907. },
  5908. {
  5909. "name": "workspace",
  5910. "in": "query",
  5911. "schema": {
  5912. "type": "string"
  5913. },
  5914. "required": false
  5915. }
  5916. ],
  5917. "responses": {
  5918. "200": {
  5919. "description": "Created message",
  5920. "content": {
  5921. "application/json": {
  5922. "schema": {
  5923. "type": "object",
  5924. "required": ["info", "parts"],
  5925. "properties": {
  5926. "info": {
  5927. "$ref": "#/components/schemas/AssistantMessage"
  5928. },
  5929. "parts": {
  5930. "type": "array",
  5931. "items": {
  5932. "$ref": "#/components/schemas/Part"
  5933. }
  5934. }
  5935. }
  5936. }
  5937. }
  5938. }
  5939. },
  5940. "400": {
  5941. "description": "BadRequest | InvalidRequestError",
  5942. "content": {
  5943. "application/json": {
  5944. "schema": {
  5945. "anyOf": [
  5946. {
  5947. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5948. },
  5949. {
  5950. "$ref": "#/components/schemas/InvalidRequestError"
  5951. }
  5952. ]
  5953. }
  5954. }
  5955. }
  5956. },
  5957. "404": {
  5958. "description": "NotFoundError",
  5959. "content": {
  5960. "application/json": {
  5961. "schema": {
  5962. "$ref": "#/components/schemas/NotFoundError"
  5963. }
  5964. }
  5965. }
  5966. }
  5967. },
  5968. "description": "Create and send a new message to a session, streaming the AI response.",
  5969. "summary": "Send message",
  5970. "requestBody": {
  5971. "content": {
  5972. "application/json": {
  5973. "schema": {
  5974. "type": "object",
  5975. "properties": {
  5976. "messageID": {
  5977. "type": "string",
  5978. "pattern": "^msg"
  5979. },
  5980. "model": {
  5981. "type": "object",
  5982. "properties": {
  5983. "providerID": {
  5984. "type": "string"
  5985. },
  5986. "modelID": {
  5987. "type": "string"
  5988. }
  5989. },
  5990. "required": ["providerID", "modelID"],
  5991. "additionalProperties": false
  5992. },
  5993. "agent": {
  5994. "type": "string"
  5995. },
  5996. "noReply": {
  5997. "type": "boolean"
  5998. },
  5999. "tools": {
  6000. "type": "object",
  6001. "additionalProperties": {
  6002. "type": "boolean"
  6003. }
  6004. },
  6005. "format": {
  6006. "$ref": "#/components/schemas/OutputFormat"
  6007. },
  6008. "system": {
  6009. "type": "string"
  6010. },
  6011. "variant": {
  6012. "type": "string"
  6013. },
  6014. "parts": {
  6015. "type": "array",
  6016. "items": {
  6017. "anyOf": [
  6018. {
  6019. "$ref": "#/components/schemas/TextPartInput"
  6020. },
  6021. {
  6022. "$ref": "#/components/schemas/FilePartInput"
  6023. },
  6024. {
  6025. "$ref": "#/components/schemas/AgentPartInput"
  6026. },
  6027. {
  6028. "$ref": "#/components/schemas/SubtaskPartInput"
  6029. }
  6030. ]
  6031. }
  6032. }
  6033. },
  6034. "required": ["parts"],
  6035. "additionalProperties": false
  6036. }
  6037. }
  6038. }
  6039. },
  6040. "x-codeSamples": [
  6041. {
  6042. "lang": "js",
  6043. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6044. }
  6045. ]
  6046. }
  6047. },
  6048. "/session/{sessionID}/message/{messageID}": {
  6049. "get": {
  6050. "tags": ["session"],
  6051. "operationId": "session.message",
  6052. "parameters": [
  6053. {
  6054. "name": "sessionID",
  6055. "in": "path",
  6056. "schema": {
  6057. "type": "string",
  6058. "pattern": "^ses"
  6059. },
  6060. "required": true
  6061. },
  6062. {
  6063. "name": "messageID",
  6064. "in": "path",
  6065. "schema": {
  6066. "type": "string",
  6067. "pattern": "^msg"
  6068. },
  6069. "required": true
  6070. },
  6071. {
  6072. "name": "directory",
  6073. "in": "query",
  6074. "schema": {
  6075. "type": "string"
  6076. },
  6077. "required": false
  6078. },
  6079. {
  6080. "name": "workspace",
  6081. "in": "query",
  6082. "schema": {
  6083. "type": "string"
  6084. },
  6085. "required": false
  6086. }
  6087. ],
  6088. "responses": {
  6089. "200": {
  6090. "description": "Message",
  6091. "content": {
  6092. "application/json": {
  6093. "schema": {
  6094. "type": "object",
  6095. "properties": {
  6096. "info": {
  6097. "$ref": "#/components/schemas/Message"
  6098. },
  6099. "parts": {
  6100. "type": "array",
  6101. "items": {
  6102. "$ref": "#/components/schemas/Part"
  6103. }
  6104. }
  6105. },
  6106. "required": ["info", "parts"],
  6107. "additionalProperties": false,
  6108. "description": "Message"
  6109. }
  6110. }
  6111. }
  6112. },
  6113. "400": {
  6114. "description": "BadRequest | InvalidRequestError",
  6115. "content": {
  6116. "application/json": {
  6117. "schema": {
  6118. "anyOf": [
  6119. {
  6120. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6121. },
  6122. {
  6123. "$ref": "#/components/schemas/InvalidRequestError"
  6124. }
  6125. ]
  6126. }
  6127. }
  6128. }
  6129. },
  6130. "404": {
  6131. "description": "NotFoundError",
  6132. "content": {
  6133. "application/json": {
  6134. "schema": {
  6135. "$ref": "#/components/schemas/NotFoundError"
  6136. }
  6137. }
  6138. }
  6139. }
  6140. },
  6141. "description": "Retrieve a specific message from a session by its message ID.",
  6142. "summary": "Get message",
  6143. "x-codeSamples": [
  6144. {
  6145. "lang": "js",
  6146. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6147. }
  6148. ]
  6149. },
  6150. "delete": {
  6151. "tags": ["session"],
  6152. "operationId": "session.deleteMessage",
  6153. "parameters": [
  6154. {
  6155. "name": "sessionID",
  6156. "in": "path",
  6157. "schema": {
  6158. "type": "string",
  6159. "pattern": "^ses"
  6160. },
  6161. "required": true
  6162. },
  6163. {
  6164. "name": "messageID",
  6165. "in": "path",
  6166. "schema": {
  6167. "type": "string",
  6168. "pattern": "^msg"
  6169. },
  6170. "required": true
  6171. },
  6172. {
  6173. "name": "directory",
  6174. "in": "query",
  6175. "schema": {
  6176. "type": "string"
  6177. },
  6178. "required": false
  6179. },
  6180. {
  6181. "name": "workspace",
  6182. "in": "query",
  6183. "schema": {
  6184. "type": "string"
  6185. },
  6186. "required": false
  6187. }
  6188. ],
  6189. "responses": {
  6190. "200": {
  6191. "description": "Successfully deleted message",
  6192. "content": {
  6193. "application/json": {
  6194. "schema": {
  6195. "type": "boolean",
  6196. "description": "Successfully deleted message"
  6197. }
  6198. }
  6199. }
  6200. },
  6201. "400": {
  6202. "description": "BadRequest | InvalidRequestError",
  6203. "content": {
  6204. "application/json": {
  6205. "schema": {
  6206. "anyOf": [
  6207. {
  6208. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6209. },
  6210. {
  6211. "$ref": "#/components/schemas/InvalidRequestError"
  6212. }
  6213. ]
  6214. }
  6215. }
  6216. }
  6217. },
  6218. "404": {
  6219. "description": "NotFoundError",
  6220. "content": {
  6221. "application/json": {
  6222. "schema": {
  6223. "$ref": "#/components/schemas/NotFoundError"
  6224. }
  6225. }
  6226. }
  6227. },
  6228. "409": {
  6229. "description": "SessionBusyError",
  6230. "content": {
  6231. "application/json": {
  6232. "schema": {
  6233. "$ref": "#/components/schemas/SessionBusyError"
  6234. }
  6235. }
  6236. }
  6237. }
  6238. },
  6239. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6240. "summary": "Delete message",
  6241. "x-codeSamples": [
  6242. {
  6243. "lang": "js",
  6244. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6245. }
  6246. ]
  6247. }
  6248. },
  6249. "/session/{sessionID}/fork": {
  6250. "post": {
  6251. "tags": ["session"],
  6252. "operationId": "session.fork",
  6253. "parameters": [
  6254. {
  6255. "name": "sessionID",
  6256. "in": "path",
  6257. "schema": {
  6258. "type": "string",
  6259. "pattern": "^ses"
  6260. },
  6261. "required": true
  6262. },
  6263. {
  6264. "name": "directory",
  6265. "in": "query",
  6266. "schema": {
  6267. "type": "string"
  6268. },
  6269. "required": false
  6270. },
  6271. {
  6272. "name": "workspace",
  6273. "in": "query",
  6274. "schema": {
  6275. "type": "string"
  6276. },
  6277. "required": false
  6278. }
  6279. ],
  6280. "responses": {
  6281. "200": {
  6282. "description": "200",
  6283. "content": {
  6284. "application/json": {
  6285. "schema": {
  6286. "$ref": "#/components/schemas/Session"
  6287. }
  6288. }
  6289. }
  6290. },
  6291. "400": {
  6292. "description": "BadRequest | InvalidRequestError",
  6293. "content": {
  6294. "application/json": {
  6295. "schema": {
  6296. "anyOf": [
  6297. {
  6298. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6299. },
  6300. {
  6301. "$ref": "#/components/schemas/InvalidRequestError"
  6302. }
  6303. ]
  6304. }
  6305. }
  6306. }
  6307. },
  6308. "404": {
  6309. "description": "NotFoundError",
  6310. "content": {
  6311. "application/json": {
  6312. "schema": {
  6313. "$ref": "#/components/schemas/NotFoundError"
  6314. }
  6315. }
  6316. }
  6317. }
  6318. },
  6319. "description": "Create a new session by forking an existing session at a specific message point.",
  6320. "summary": "Fork session",
  6321. "requestBody": {
  6322. "content": {
  6323. "application/json": {
  6324. "schema": {
  6325. "type": "object",
  6326. "properties": {
  6327. "messageID": {
  6328. "type": "string",
  6329. "pattern": "^msg"
  6330. }
  6331. },
  6332. "additionalProperties": false
  6333. }
  6334. }
  6335. }
  6336. },
  6337. "x-codeSamples": [
  6338. {
  6339. "lang": "js",
  6340. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6341. }
  6342. ]
  6343. }
  6344. },
  6345. "/session/{sessionID}/abort": {
  6346. "post": {
  6347. "tags": ["session"],
  6348. "operationId": "session.abort",
  6349. "parameters": [
  6350. {
  6351. "name": "sessionID",
  6352. "in": "path",
  6353. "schema": {
  6354. "type": "string",
  6355. "pattern": "^ses"
  6356. },
  6357. "required": true
  6358. },
  6359. {
  6360. "name": "directory",
  6361. "in": "query",
  6362. "schema": {
  6363. "type": "string"
  6364. },
  6365. "required": false
  6366. },
  6367. {
  6368. "name": "workspace",
  6369. "in": "query",
  6370. "schema": {
  6371. "type": "string"
  6372. },
  6373. "required": false
  6374. }
  6375. ],
  6376. "responses": {
  6377. "200": {
  6378. "description": "Aborted session",
  6379. "content": {
  6380. "application/json": {
  6381. "schema": {
  6382. "type": "boolean",
  6383. "description": "Aborted session"
  6384. }
  6385. }
  6386. }
  6387. },
  6388. "400": {
  6389. "description": "BadRequest | InvalidRequestError",
  6390. "content": {
  6391. "application/json": {
  6392. "schema": {
  6393. "anyOf": [
  6394. {
  6395. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6396. },
  6397. {
  6398. "$ref": "#/components/schemas/InvalidRequestError"
  6399. }
  6400. ]
  6401. }
  6402. }
  6403. }
  6404. }
  6405. },
  6406. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6407. "summary": "Abort session",
  6408. "x-codeSamples": [
  6409. {
  6410. "lang": "js",
  6411. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6412. }
  6413. ]
  6414. }
  6415. },
  6416. "/session/{sessionID}/init": {
  6417. "post": {
  6418. "tags": ["session"],
  6419. "operationId": "session.init",
  6420. "parameters": [
  6421. {
  6422. "name": "sessionID",
  6423. "in": "path",
  6424. "schema": {
  6425. "type": "string",
  6426. "pattern": "^ses"
  6427. },
  6428. "required": true
  6429. },
  6430. {
  6431. "name": "directory",
  6432. "in": "query",
  6433. "schema": {
  6434. "type": "string"
  6435. },
  6436. "required": false
  6437. },
  6438. {
  6439. "name": "workspace",
  6440. "in": "query",
  6441. "schema": {
  6442. "type": "string"
  6443. },
  6444. "required": false
  6445. }
  6446. ],
  6447. "responses": {
  6448. "200": {
  6449. "description": "200",
  6450. "content": {
  6451. "application/json": {
  6452. "schema": {
  6453. "type": "boolean",
  6454. "description": "200"
  6455. }
  6456. }
  6457. }
  6458. },
  6459. "400": {
  6460. "description": "BadRequest | InvalidRequestError",
  6461. "content": {
  6462. "application/json": {
  6463. "schema": {
  6464. "anyOf": [
  6465. {
  6466. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6467. },
  6468. {
  6469. "$ref": "#/components/schemas/InvalidRequestError"
  6470. }
  6471. ]
  6472. }
  6473. }
  6474. }
  6475. },
  6476. "404": {
  6477. "description": "NotFoundError",
  6478. "content": {
  6479. "application/json": {
  6480. "schema": {
  6481. "$ref": "#/components/schemas/NotFoundError"
  6482. }
  6483. }
  6484. }
  6485. }
  6486. },
  6487. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6488. "summary": "Initialize session",
  6489. "requestBody": {
  6490. "content": {
  6491. "application/json": {
  6492. "schema": {
  6493. "type": "object",
  6494. "properties": {
  6495. "modelID": {
  6496. "type": "string"
  6497. },
  6498. "providerID": {
  6499. "type": "string"
  6500. },
  6501. "messageID": {
  6502. "type": "string",
  6503. "pattern": "^msg"
  6504. }
  6505. },
  6506. "required": ["modelID", "providerID", "messageID"],
  6507. "additionalProperties": false
  6508. }
  6509. }
  6510. }
  6511. },
  6512. "x-codeSamples": [
  6513. {
  6514. "lang": "js",
  6515. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6516. }
  6517. ]
  6518. }
  6519. },
  6520. "/session/{sessionID}/share": {
  6521. "post": {
  6522. "tags": ["session"],
  6523. "operationId": "session.share",
  6524. "parameters": [
  6525. {
  6526. "name": "sessionID",
  6527. "in": "path",
  6528. "schema": {
  6529. "type": "string",
  6530. "pattern": "^ses"
  6531. },
  6532. "required": true
  6533. },
  6534. {
  6535. "name": "directory",
  6536. "in": "query",
  6537. "schema": {
  6538. "type": "string"
  6539. },
  6540. "required": false
  6541. },
  6542. {
  6543. "name": "workspace",
  6544. "in": "query",
  6545. "schema": {
  6546. "type": "string"
  6547. },
  6548. "required": false
  6549. }
  6550. ],
  6551. "responses": {
  6552. "200": {
  6553. "description": "Successfully shared session",
  6554. "content": {
  6555. "application/json": {
  6556. "schema": {
  6557. "$ref": "#/components/schemas/Session"
  6558. }
  6559. }
  6560. }
  6561. },
  6562. "400": {
  6563. "description": "Bad request",
  6564. "content": {
  6565. "application/json": {
  6566. "schema": {
  6567. "$ref": "#/components/schemas/BadRequestError"
  6568. }
  6569. }
  6570. }
  6571. },
  6572. "404": {
  6573. "description": "NotFoundError",
  6574. "content": {
  6575. "application/json": {
  6576. "schema": {
  6577. "$ref": "#/components/schemas/NotFoundError"
  6578. }
  6579. }
  6580. }
  6581. },
  6582. "500": {
  6583. "description": "InternalServerError",
  6584. "content": {
  6585. "application/json": {
  6586. "schema": {
  6587. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6588. }
  6589. }
  6590. }
  6591. }
  6592. },
  6593. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  6594. "summary": "Share session",
  6595. "x-codeSamples": [
  6596. {
  6597. "lang": "js",
  6598. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  6599. }
  6600. ]
  6601. },
  6602. "delete": {
  6603. "tags": ["session"],
  6604. "operationId": "session.unshare",
  6605. "parameters": [
  6606. {
  6607. "name": "sessionID",
  6608. "in": "path",
  6609. "schema": {
  6610. "type": "string",
  6611. "pattern": "^ses"
  6612. },
  6613. "required": true
  6614. },
  6615. {
  6616. "name": "directory",
  6617. "in": "query",
  6618. "schema": {
  6619. "type": "string"
  6620. },
  6621. "required": false
  6622. },
  6623. {
  6624. "name": "workspace",
  6625. "in": "query",
  6626. "schema": {
  6627. "type": "string"
  6628. },
  6629. "required": false
  6630. }
  6631. ],
  6632. "responses": {
  6633. "200": {
  6634. "description": "Successfully unshared session",
  6635. "content": {
  6636. "application/json": {
  6637. "schema": {
  6638. "$ref": "#/components/schemas/Session"
  6639. }
  6640. }
  6641. }
  6642. },
  6643. "400": {
  6644. "description": "Bad request",
  6645. "content": {
  6646. "application/json": {
  6647. "schema": {
  6648. "$ref": "#/components/schemas/BadRequestError"
  6649. }
  6650. }
  6651. }
  6652. },
  6653. "404": {
  6654. "description": "NotFoundError",
  6655. "content": {
  6656. "application/json": {
  6657. "schema": {
  6658. "$ref": "#/components/schemas/NotFoundError"
  6659. }
  6660. }
  6661. }
  6662. },
  6663. "500": {
  6664. "description": "InternalServerError",
  6665. "content": {
  6666. "application/json": {
  6667. "schema": {
  6668. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6669. }
  6670. }
  6671. }
  6672. }
  6673. },
  6674. "description": "Remove the shareable link for a session, making it private again.",
  6675. "summary": "Unshare session",
  6676. "x-codeSamples": [
  6677. {
  6678. "lang": "js",
  6679. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  6680. }
  6681. ]
  6682. }
  6683. },
  6684. "/session/{sessionID}/summarize": {
  6685. "post": {
  6686. "tags": ["session"],
  6687. "operationId": "session.summarize",
  6688. "parameters": [
  6689. {
  6690. "name": "sessionID",
  6691. "in": "path",
  6692. "schema": {
  6693. "type": "string",
  6694. "pattern": "^ses"
  6695. },
  6696. "required": true
  6697. },
  6698. {
  6699. "name": "directory",
  6700. "in": "query",
  6701. "schema": {
  6702. "type": "string"
  6703. },
  6704. "required": false
  6705. },
  6706. {
  6707. "name": "workspace",
  6708. "in": "query",
  6709. "schema": {
  6710. "type": "string"
  6711. },
  6712. "required": false
  6713. }
  6714. ],
  6715. "responses": {
  6716. "200": {
  6717. "description": "Summarized session",
  6718. "content": {
  6719. "application/json": {
  6720. "schema": {
  6721. "type": "boolean",
  6722. "description": "Summarized session"
  6723. }
  6724. }
  6725. }
  6726. },
  6727. "400": {
  6728. "description": "BadRequest | InvalidRequestError",
  6729. "content": {
  6730. "application/json": {
  6731. "schema": {
  6732. "anyOf": [
  6733. {
  6734. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6735. },
  6736. {
  6737. "$ref": "#/components/schemas/InvalidRequestError"
  6738. }
  6739. ]
  6740. }
  6741. }
  6742. }
  6743. },
  6744. "404": {
  6745. "description": "NotFoundError",
  6746. "content": {
  6747. "application/json": {
  6748. "schema": {
  6749. "$ref": "#/components/schemas/NotFoundError"
  6750. }
  6751. }
  6752. }
  6753. }
  6754. },
  6755. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  6756. "summary": "Summarize session",
  6757. "requestBody": {
  6758. "content": {
  6759. "application/json": {
  6760. "schema": {
  6761. "type": "object",
  6762. "properties": {
  6763. "providerID": {
  6764. "type": "string"
  6765. },
  6766. "modelID": {
  6767. "type": "string"
  6768. },
  6769. "auto": {
  6770. "type": "boolean"
  6771. }
  6772. },
  6773. "required": ["providerID", "modelID"],
  6774. "additionalProperties": false
  6775. }
  6776. }
  6777. }
  6778. },
  6779. "x-codeSamples": [
  6780. {
  6781. "lang": "js",
  6782. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  6783. }
  6784. ]
  6785. }
  6786. },
  6787. "/session/{sessionID}/prompt_async": {
  6788. "post": {
  6789. "tags": ["session"],
  6790. "operationId": "session.prompt_async",
  6791. "parameters": [
  6792. {
  6793. "name": "sessionID",
  6794. "in": "path",
  6795. "schema": {
  6796. "type": "string",
  6797. "pattern": "^ses"
  6798. },
  6799. "required": true
  6800. },
  6801. {
  6802. "name": "directory",
  6803. "in": "query",
  6804. "schema": {
  6805. "type": "string"
  6806. },
  6807. "required": false
  6808. },
  6809. {
  6810. "name": "workspace",
  6811. "in": "query",
  6812. "schema": {
  6813. "type": "string"
  6814. },
  6815. "required": false
  6816. }
  6817. ],
  6818. "responses": {
  6819. "204": {
  6820. "description": "Prompt accepted"
  6821. },
  6822. "400": {
  6823. "description": "BadRequest | InvalidRequestError",
  6824. "content": {
  6825. "application/json": {
  6826. "schema": {
  6827. "anyOf": [
  6828. {
  6829. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6830. },
  6831. {
  6832. "$ref": "#/components/schemas/InvalidRequestError"
  6833. }
  6834. ]
  6835. }
  6836. }
  6837. }
  6838. },
  6839. "404": {
  6840. "description": "NotFoundError",
  6841. "content": {
  6842. "application/json": {
  6843. "schema": {
  6844. "$ref": "#/components/schemas/NotFoundError"
  6845. }
  6846. }
  6847. }
  6848. }
  6849. },
  6850. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  6851. "summary": "Send async message",
  6852. "requestBody": {
  6853. "content": {
  6854. "application/json": {
  6855. "schema": {
  6856. "type": "object",
  6857. "properties": {
  6858. "messageID": {
  6859. "type": "string",
  6860. "pattern": "^msg"
  6861. },
  6862. "model": {
  6863. "type": "object",
  6864. "properties": {
  6865. "providerID": {
  6866. "type": "string"
  6867. },
  6868. "modelID": {
  6869. "type": "string"
  6870. }
  6871. },
  6872. "required": ["providerID", "modelID"],
  6873. "additionalProperties": false
  6874. },
  6875. "agent": {
  6876. "type": "string"
  6877. },
  6878. "noReply": {
  6879. "type": "boolean"
  6880. },
  6881. "tools": {
  6882. "type": "object",
  6883. "additionalProperties": {
  6884. "type": "boolean"
  6885. }
  6886. },
  6887. "format": {
  6888. "$ref": "#/components/schemas/OutputFormat"
  6889. },
  6890. "system": {
  6891. "type": "string"
  6892. },
  6893. "variant": {
  6894. "type": "string"
  6895. },
  6896. "parts": {
  6897. "type": "array",
  6898. "items": {
  6899. "anyOf": [
  6900. {
  6901. "$ref": "#/components/schemas/TextPartInput"
  6902. },
  6903. {
  6904. "$ref": "#/components/schemas/FilePartInput"
  6905. },
  6906. {
  6907. "$ref": "#/components/schemas/AgentPartInput"
  6908. },
  6909. {
  6910. "$ref": "#/components/schemas/SubtaskPartInput"
  6911. }
  6912. ]
  6913. }
  6914. }
  6915. },
  6916. "required": ["parts"],
  6917. "additionalProperties": false
  6918. }
  6919. }
  6920. }
  6921. },
  6922. "x-codeSamples": [
  6923. {
  6924. "lang": "js",
  6925. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  6926. }
  6927. ]
  6928. }
  6929. },
  6930. "/session/{sessionID}/command": {
  6931. "post": {
  6932. "tags": ["session"],
  6933. "operationId": "session.command",
  6934. "parameters": [
  6935. {
  6936. "name": "sessionID",
  6937. "in": "path",
  6938. "schema": {
  6939. "type": "string",
  6940. "pattern": "^ses"
  6941. },
  6942. "required": true
  6943. },
  6944. {
  6945. "name": "directory",
  6946. "in": "query",
  6947. "schema": {
  6948. "type": "string"
  6949. },
  6950. "required": false
  6951. },
  6952. {
  6953. "name": "workspace",
  6954. "in": "query",
  6955. "schema": {
  6956. "type": "string"
  6957. },
  6958. "required": false
  6959. }
  6960. ],
  6961. "responses": {
  6962. "200": {
  6963. "description": "Created message",
  6964. "content": {
  6965. "application/json": {
  6966. "schema": {
  6967. "type": "object",
  6968. "required": ["info", "parts"],
  6969. "properties": {
  6970. "info": {
  6971. "$ref": "#/components/schemas/AssistantMessage"
  6972. },
  6973. "parts": {
  6974. "type": "array",
  6975. "items": {
  6976. "$ref": "#/components/schemas/Part"
  6977. }
  6978. }
  6979. }
  6980. }
  6981. }
  6982. }
  6983. },
  6984. "400": {
  6985. "description": "BadRequest | InvalidRequestError",
  6986. "content": {
  6987. "application/json": {
  6988. "schema": {
  6989. "anyOf": [
  6990. {
  6991. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6992. },
  6993. {
  6994. "$ref": "#/components/schemas/InvalidRequestError"
  6995. }
  6996. ]
  6997. }
  6998. }
  6999. }
  7000. },
  7001. "404": {
  7002. "description": "NotFoundError",
  7003. "content": {
  7004. "application/json": {
  7005. "schema": {
  7006. "$ref": "#/components/schemas/NotFoundError"
  7007. }
  7008. }
  7009. }
  7010. }
  7011. },
  7012. "description": "Send a new command to a session for execution by the AI assistant.",
  7013. "summary": "Send command",
  7014. "requestBody": {
  7015. "content": {
  7016. "application/json": {
  7017. "schema": {
  7018. "type": "object",
  7019. "properties": {
  7020. "messageID": {
  7021. "type": "string",
  7022. "pattern": "^msg"
  7023. },
  7024. "agent": {
  7025. "type": "string"
  7026. },
  7027. "model": {
  7028. "type": "string"
  7029. },
  7030. "arguments": {
  7031. "type": "string"
  7032. },
  7033. "command": {
  7034. "type": "string"
  7035. },
  7036. "variant": {
  7037. "type": "string"
  7038. },
  7039. "parts": {
  7040. "type": "array",
  7041. "items": {
  7042. "type": "object",
  7043. "properties": {
  7044. "id": {
  7045. "type": "string",
  7046. "pattern": "^prt"
  7047. },
  7048. "type": {
  7049. "type": "string",
  7050. "enum": ["file"]
  7051. },
  7052. "mime": {
  7053. "type": "string"
  7054. },
  7055. "filename": {
  7056. "type": "string"
  7057. },
  7058. "url": {
  7059. "type": "string"
  7060. },
  7061. "source": {
  7062. "$ref": "#/components/schemas/FilePartSource"
  7063. }
  7064. },
  7065. "required": ["type", "mime", "url"],
  7066. "additionalProperties": false
  7067. }
  7068. }
  7069. },
  7070. "required": ["arguments", "command"],
  7071. "additionalProperties": false
  7072. }
  7073. }
  7074. }
  7075. },
  7076. "x-codeSamples": [
  7077. {
  7078. "lang": "js",
  7079. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7080. }
  7081. ]
  7082. }
  7083. },
  7084. "/session/{sessionID}/shell": {
  7085. "post": {
  7086. "tags": ["session"],
  7087. "operationId": "session.shell",
  7088. "parameters": [
  7089. {
  7090. "name": "sessionID",
  7091. "in": "path",
  7092. "schema": {
  7093. "type": "string",
  7094. "pattern": "^ses"
  7095. },
  7096. "required": true
  7097. },
  7098. {
  7099. "name": "directory",
  7100. "in": "query",
  7101. "schema": {
  7102. "type": "string"
  7103. },
  7104. "required": false
  7105. },
  7106. {
  7107. "name": "workspace",
  7108. "in": "query",
  7109. "schema": {
  7110. "type": "string"
  7111. },
  7112. "required": false
  7113. }
  7114. ],
  7115. "responses": {
  7116. "200": {
  7117. "description": "Created message",
  7118. "content": {
  7119. "application/json": {
  7120. "schema": {
  7121. "type": "object",
  7122. "properties": {
  7123. "info": {
  7124. "$ref": "#/components/schemas/Message"
  7125. },
  7126. "parts": {
  7127. "type": "array",
  7128. "items": {
  7129. "$ref": "#/components/schemas/Part"
  7130. }
  7131. }
  7132. },
  7133. "required": ["info", "parts"],
  7134. "additionalProperties": false,
  7135. "description": "Created message"
  7136. }
  7137. }
  7138. }
  7139. },
  7140. "400": {
  7141. "description": "BadRequest | InvalidRequestError",
  7142. "content": {
  7143. "application/json": {
  7144. "schema": {
  7145. "anyOf": [
  7146. {
  7147. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7148. },
  7149. {
  7150. "$ref": "#/components/schemas/InvalidRequestError"
  7151. }
  7152. ]
  7153. }
  7154. }
  7155. }
  7156. },
  7157. "404": {
  7158. "description": "NotFoundError",
  7159. "content": {
  7160. "application/json": {
  7161. "schema": {
  7162. "$ref": "#/components/schemas/NotFoundError"
  7163. }
  7164. }
  7165. }
  7166. },
  7167. "409": {
  7168. "description": "SessionBusyError",
  7169. "content": {
  7170. "application/json": {
  7171. "schema": {
  7172. "$ref": "#/components/schemas/SessionBusyError"
  7173. }
  7174. }
  7175. }
  7176. }
  7177. },
  7178. "description": "Execute a shell command within the session context and return the AI's response.",
  7179. "summary": "Run shell command",
  7180. "requestBody": {
  7181. "content": {
  7182. "application/json": {
  7183. "schema": {
  7184. "type": "object",
  7185. "properties": {
  7186. "messageID": {
  7187. "type": "string",
  7188. "pattern": "^msg"
  7189. },
  7190. "agent": {
  7191. "type": "string"
  7192. },
  7193. "model": {
  7194. "type": "object",
  7195. "properties": {
  7196. "providerID": {
  7197. "type": "string"
  7198. },
  7199. "modelID": {
  7200. "type": "string"
  7201. }
  7202. },
  7203. "required": ["providerID", "modelID"],
  7204. "additionalProperties": false
  7205. },
  7206. "command": {
  7207. "type": "string"
  7208. }
  7209. },
  7210. "required": ["agent", "command"],
  7211. "additionalProperties": false
  7212. }
  7213. }
  7214. }
  7215. },
  7216. "x-codeSamples": [
  7217. {
  7218. "lang": "js",
  7219. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7220. }
  7221. ]
  7222. }
  7223. },
  7224. "/session/{sessionID}/revert": {
  7225. "post": {
  7226. "tags": ["session"],
  7227. "operationId": "session.revert",
  7228. "parameters": [
  7229. {
  7230. "name": "sessionID",
  7231. "in": "path",
  7232. "schema": {
  7233. "type": "string",
  7234. "pattern": "^ses"
  7235. },
  7236. "required": true
  7237. },
  7238. {
  7239. "name": "directory",
  7240. "in": "query",
  7241. "schema": {
  7242. "type": "string"
  7243. },
  7244. "required": false
  7245. },
  7246. {
  7247. "name": "workspace",
  7248. "in": "query",
  7249. "schema": {
  7250. "type": "string"
  7251. },
  7252. "required": false
  7253. }
  7254. ],
  7255. "responses": {
  7256. "200": {
  7257. "description": "Updated session",
  7258. "content": {
  7259. "application/json": {
  7260. "schema": {
  7261. "$ref": "#/components/schemas/Session"
  7262. }
  7263. }
  7264. }
  7265. },
  7266. "400": {
  7267. "description": "BadRequest | InvalidRequestError",
  7268. "content": {
  7269. "application/json": {
  7270. "schema": {
  7271. "anyOf": [
  7272. {
  7273. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7274. },
  7275. {
  7276. "$ref": "#/components/schemas/InvalidRequestError"
  7277. }
  7278. ]
  7279. }
  7280. }
  7281. }
  7282. },
  7283. "404": {
  7284. "description": "NotFoundError",
  7285. "content": {
  7286. "application/json": {
  7287. "schema": {
  7288. "$ref": "#/components/schemas/NotFoundError"
  7289. }
  7290. }
  7291. }
  7292. },
  7293. "409": {
  7294. "description": "SessionBusyError",
  7295. "content": {
  7296. "application/json": {
  7297. "schema": {
  7298. "$ref": "#/components/schemas/SessionBusyError"
  7299. }
  7300. }
  7301. }
  7302. }
  7303. },
  7304. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7305. "summary": "Revert message",
  7306. "requestBody": {
  7307. "content": {
  7308. "application/json": {
  7309. "schema": {
  7310. "type": "object",
  7311. "properties": {
  7312. "messageID": {
  7313. "type": "string",
  7314. "pattern": "^msg"
  7315. },
  7316. "partID": {
  7317. "type": "string",
  7318. "pattern": "^prt"
  7319. }
  7320. },
  7321. "required": ["messageID"],
  7322. "additionalProperties": false
  7323. }
  7324. }
  7325. }
  7326. },
  7327. "x-codeSamples": [
  7328. {
  7329. "lang": "js",
  7330. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7331. }
  7332. ]
  7333. }
  7334. },
  7335. "/session/{sessionID}/unrevert": {
  7336. "post": {
  7337. "tags": ["session"],
  7338. "operationId": "session.unrevert",
  7339. "parameters": [
  7340. {
  7341. "name": "sessionID",
  7342. "in": "path",
  7343. "schema": {
  7344. "type": "string",
  7345. "pattern": "^ses"
  7346. },
  7347. "required": true
  7348. },
  7349. {
  7350. "name": "directory",
  7351. "in": "query",
  7352. "schema": {
  7353. "type": "string"
  7354. },
  7355. "required": false
  7356. },
  7357. {
  7358. "name": "workspace",
  7359. "in": "query",
  7360. "schema": {
  7361. "type": "string"
  7362. },
  7363. "required": false
  7364. }
  7365. ],
  7366. "responses": {
  7367. "200": {
  7368. "description": "Updated session",
  7369. "content": {
  7370. "application/json": {
  7371. "schema": {
  7372. "$ref": "#/components/schemas/Session"
  7373. }
  7374. }
  7375. }
  7376. },
  7377. "400": {
  7378. "description": "BadRequest | InvalidRequestError",
  7379. "content": {
  7380. "application/json": {
  7381. "schema": {
  7382. "anyOf": [
  7383. {
  7384. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7385. },
  7386. {
  7387. "$ref": "#/components/schemas/InvalidRequestError"
  7388. }
  7389. ]
  7390. }
  7391. }
  7392. }
  7393. },
  7394. "404": {
  7395. "description": "NotFoundError",
  7396. "content": {
  7397. "application/json": {
  7398. "schema": {
  7399. "$ref": "#/components/schemas/NotFoundError"
  7400. }
  7401. }
  7402. }
  7403. },
  7404. "409": {
  7405. "description": "SessionBusyError",
  7406. "content": {
  7407. "application/json": {
  7408. "schema": {
  7409. "$ref": "#/components/schemas/SessionBusyError"
  7410. }
  7411. }
  7412. }
  7413. }
  7414. },
  7415. "description": "Restore all previously reverted messages in a session.",
  7416. "summary": "Restore reverted messages",
  7417. "x-codeSamples": [
  7418. {
  7419. "lang": "js",
  7420. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7421. }
  7422. ]
  7423. }
  7424. },
  7425. "/session/{sessionID}/permissions/{permissionID}": {
  7426. "post": {
  7427. "tags": ["session"],
  7428. "operationId": "permission.respond",
  7429. "parameters": [
  7430. {
  7431. "name": "sessionID",
  7432. "in": "path",
  7433. "schema": {
  7434. "type": "string",
  7435. "pattern": "^ses"
  7436. },
  7437. "required": true
  7438. },
  7439. {
  7440. "name": "permissionID",
  7441. "in": "path",
  7442. "schema": {
  7443. "type": "string",
  7444. "pattern": "^per"
  7445. },
  7446. "required": true
  7447. },
  7448. {
  7449. "name": "directory",
  7450. "in": "query",
  7451. "schema": {
  7452. "type": "string"
  7453. },
  7454. "required": false
  7455. },
  7456. {
  7457. "name": "workspace",
  7458. "in": "query",
  7459. "schema": {
  7460. "type": "string"
  7461. },
  7462. "required": false
  7463. }
  7464. ],
  7465. "responses": {
  7466. "200": {
  7467. "description": "Permission processed successfully",
  7468. "content": {
  7469. "application/json": {
  7470. "schema": {
  7471. "type": "boolean",
  7472. "description": "Permission processed successfully"
  7473. }
  7474. }
  7475. }
  7476. },
  7477. "400": {
  7478. "description": "BadRequest | InvalidRequestError",
  7479. "content": {
  7480. "application/json": {
  7481. "schema": {
  7482. "anyOf": [
  7483. {
  7484. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7485. },
  7486. {
  7487. "$ref": "#/components/schemas/InvalidRequestError"
  7488. }
  7489. ]
  7490. }
  7491. }
  7492. }
  7493. },
  7494. "404": {
  7495. "description": "NotFoundError | PermissionNotFoundError",
  7496. "content": {
  7497. "application/json": {
  7498. "schema": {
  7499. "anyOf": [
  7500. {
  7501. "$ref": "#/components/schemas/NotFoundError"
  7502. },
  7503. {
  7504. "$ref": "#/components/schemas/PermissionNotFoundError"
  7505. }
  7506. ]
  7507. }
  7508. }
  7509. }
  7510. }
  7511. },
  7512. "description": "Approve or deny a permission request from the AI assistant.",
  7513. "summary": "Respond to permission",
  7514. "deprecated": true,
  7515. "requestBody": {
  7516. "content": {
  7517. "application/json": {
  7518. "schema": {
  7519. "type": "object",
  7520. "properties": {
  7521. "response": {
  7522. "type": "string",
  7523. "enum": ["once", "always", "reject"]
  7524. }
  7525. },
  7526. "required": ["response"],
  7527. "additionalProperties": false
  7528. }
  7529. }
  7530. }
  7531. },
  7532. "x-codeSamples": [
  7533. {
  7534. "lang": "js",
  7535. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7536. }
  7537. ]
  7538. }
  7539. },
  7540. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7541. "delete": {
  7542. "tags": ["session"],
  7543. "operationId": "part.delete",
  7544. "parameters": [
  7545. {
  7546. "name": "sessionID",
  7547. "in": "path",
  7548. "schema": {
  7549. "type": "string",
  7550. "pattern": "^ses"
  7551. },
  7552. "required": true
  7553. },
  7554. {
  7555. "name": "messageID",
  7556. "in": "path",
  7557. "schema": {
  7558. "type": "string",
  7559. "pattern": "^msg"
  7560. },
  7561. "required": true
  7562. },
  7563. {
  7564. "name": "partID",
  7565. "in": "path",
  7566. "schema": {
  7567. "type": "string",
  7568. "pattern": "^prt"
  7569. },
  7570. "required": true
  7571. },
  7572. {
  7573. "name": "directory",
  7574. "in": "query",
  7575. "schema": {
  7576. "type": "string"
  7577. },
  7578. "required": false
  7579. },
  7580. {
  7581. "name": "workspace",
  7582. "in": "query",
  7583. "schema": {
  7584. "type": "string"
  7585. },
  7586. "required": false
  7587. }
  7588. ],
  7589. "responses": {
  7590. "200": {
  7591. "description": "Successfully deleted part",
  7592. "content": {
  7593. "application/json": {
  7594. "schema": {
  7595. "type": "boolean",
  7596. "description": "Successfully deleted part"
  7597. }
  7598. }
  7599. }
  7600. },
  7601. "400": {
  7602. "description": "BadRequest | InvalidRequestError",
  7603. "content": {
  7604. "application/json": {
  7605. "schema": {
  7606. "anyOf": [
  7607. {
  7608. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7609. },
  7610. {
  7611. "$ref": "#/components/schemas/InvalidRequestError"
  7612. }
  7613. ]
  7614. }
  7615. }
  7616. }
  7617. },
  7618. "404": {
  7619. "description": "NotFoundError",
  7620. "content": {
  7621. "application/json": {
  7622. "schema": {
  7623. "$ref": "#/components/schemas/NotFoundError"
  7624. }
  7625. }
  7626. }
  7627. }
  7628. },
  7629. "description": "Delete a part from a message.",
  7630. "x-codeSamples": [
  7631. {
  7632. "lang": "js",
  7633. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  7634. }
  7635. ]
  7636. },
  7637. "patch": {
  7638. "tags": ["session"],
  7639. "operationId": "part.update",
  7640. "parameters": [
  7641. {
  7642. "name": "sessionID",
  7643. "in": "path",
  7644. "schema": {
  7645. "type": "string",
  7646. "pattern": "^ses"
  7647. },
  7648. "required": true
  7649. },
  7650. {
  7651. "name": "messageID",
  7652. "in": "path",
  7653. "schema": {
  7654. "type": "string",
  7655. "pattern": "^msg"
  7656. },
  7657. "required": true
  7658. },
  7659. {
  7660. "name": "partID",
  7661. "in": "path",
  7662. "schema": {
  7663. "type": "string",
  7664. "pattern": "^prt"
  7665. },
  7666. "required": true
  7667. },
  7668. {
  7669. "name": "directory",
  7670. "in": "query",
  7671. "schema": {
  7672. "type": "string"
  7673. },
  7674. "required": false
  7675. },
  7676. {
  7677. "name": "workspace",
  7678. "in": "query",
  7679. "schema": {
  7680. "type": "string"
  7681. },
  7682. "required": false
  7683. }
  7684. ],
  7685. "responses": {
  7686. "200": {
  7687. "description": "Successfully updated part",
  7688. "content": {
  7689. "application/json": {
  7690. "schema": {
  7691. "$ref": "#/components/schemas/Part"
  7692. }
  7693. }
  7694. }
  7695. },
  7696. "400": {
  7697. "description": "BadRequest | InvalidRequestError",
  7698. "content": {
  7699. "application/json": {
  7700. "schema": {
  7701. "anyOf": [
  7702. {
  7703. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7704. },
  7705. {
  7706. "$ref": "#/components/schemas/InvalidRequestError"
  7707. }
  7708. ]
  7709. }
  7710. }
  7711. }
  7712. },
  7713. "404": {
  7714. "description": "NotFoundError",
  7715. "content": {
  7716. "application/json": {
  7717. "schema": {
  7718. "$ref": "#/components/schemas/NotFoundError"
  7719. }
  7720. }
  7721. }
  7722. }
  7723. },
  7724. "description": "Update a part in a message.",
  7725. "requestBody": {
  7726. "content": {
  7727. "application/json": {
  7728. "schema": {
  7729. "$ref": "#/components/schemas/Part"
  7730. }
  7731. }
  7732. }
  7733. },
  7734. "x-codeSamples": [
  7735. {
  7736. "lang": "js",
  7737. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  7738. }
  7739. ]
  7740. }
  7741. },
  7742. "/sync/start": {
  7743. "post": {
  7744. "tags": ["sync"],
  7745. "operationId": "sync.start",
  7746. "parameters": [
  7747. {
  7748. "name": "directory",
  7749. "in": "query",
  7750. "schema": {
  7751. "type": "string"
  7752. },
  7753. "required": false
  7754. },
  7755. {
  7756. "name": "workspace",
  7757. "in": "query",
  7758. "schema": {
  7759. "type": "string"
  7760. },
  7761. "required": false
  7762. }
  7763. ],
  7764. "responses": {
  7765. "200": {
  7766. "description": "Workspace sync started",
  7767. "content": {
  7768. "application/json": {
  7769. "schema": {
  7770. "type": "boolean",
  7771. "description": "Workspace sync started"
  7772. }
  7773. }
  7774. }
  7775. },
  7776. "400": {
  7777. "description": "Bad request",
  7778. "content": {
  7779. "application/json": {
  7780. "schema": {
  7781. "$ref": "#/components/schemas/BadRequestError"
  7782. }
  7783. }
  7784. }
  7785. }
  7786. },
  7787. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  7788. "summary": "Start workspace sync",
  7789. "x-codeSamples": [
  7790. {
  7791. "lang": "js",
  7792. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  7793. }
  7794. ]
  7795. }
  7796. },
  7797. "/sync/replay": {
  7798. "post": {
  7799. "tags": ["sync"],
  7800. "operationId": "sync.replay",
  7801. "parameters": [
  7802. {
  7803. "name": "directory",
  7804. "in": "query",
  7805. "schema": {
  7806. "type": "string"
  7807. },
  7808. "required": false
  7809. },
  7810. {
  7811. "name": "workspace",
  7812. "in": "query",
  7813. "schema": {
  7814. "type": "string"
  7815. },
  7816. "required": false
  7817. }
  7818. ],
  7819. "responses": {
  7820. "200": {
  7821. "description": "Replayed sync events",
  7822. "content": {
  7823. "application/json": {
  7824. "schema": {
  7825. "type": "object",
  7826. "properties": {
  7827. "sessionID": {
  7828. "type": "string"
  7829. }
  7830. },
  7831. "required": ["sessionID"],
  7832. "additionalProperties": false,
  7833. "description": "Replayed sync events"
  7834. }
  7835. }
  7836. }
  7837. },
  7838. "400": {
  7839. "description": "BadRequest | InvalidRequestError",
  7840. "content": {
  7841. "application/json": {
  7842. "schema": {
  7843. "anyOf": [
  7844. {
  7845. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7846. },
  7847. {
  7848. "$ref": "#/components/schemas/InvalidRequestError"
  7849. }
  7850. ]
  7851. }
  7852. }
  7853. }
  7854. }
  7855. },
  7856. "description": "Validate and replay a complete sync event history.",
  7857. "summary": "Replay sync events",
  7858. "requestBody": {
  7859. "content": {
  7860. "application/json": {
  7861. "schema": {
  7862. "type": "object",
  7863. "properties": {
  7864. "directory": {
  7865. "type": "string"
  7866. },
  7867. "events": {
  7868. "type": "array",
  7869. "minItems": 1,
  7870. "items": {
  7871. "type": "object",
  7872. "properties": {
  7873. "id": {
  7874. "type": "string"
  7875. },
  7876. "aggregateID": {
  7877. "type": "string"
  7878. },
  7879. "seq": {
  7880. "type": "integer",
  7881. "minimum": 0
  7882. },
  7883. "type": {
  7884. "type": "string"
  7885. },
  7886. "data": {
  7887. "type": "object"
  7888. }
  7889. },
  7890. "required": ["id", "aggregateID", "seq", "type", "data"],
  7891. "additionalProperties": false
  7892. }
  7893. }
  7894. },
  7895. "required": ["directory", "events"],
  7896. "additionalProperties": false
  7897. }
  7898. }
  7899. }
  7900. },
  7901. "x-codeSamples": [
  7902. {
  7903. "lang": "js",
  7904. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  7905. }
  7906. ]
  7907. }
  7908. },
  7909. "/sync/steal": {
  7910. "post": {
  7911. "tags": ["sync"],
  7912. "operationId": "sync.steal",
  7913. "parameters": [
  7914. {
  7915. "name": "directory",
  7916. "in": "query",
  7917. "schema": {
  7918. "type": "string"
  7919. },
  7920. "required": false
  7921. },
  7922. {
  7923. "name": "workspace",
  7924. "in": "query",
  7925. "schema": {
  7926. "type": "string"
  7927. },
  7928. "required": false
  7929. }
  7930. ],
  7931. "responses": {
  7932. "200": {
  7933. "description": "Session stolen into workspace",
  7934. "content": {
  7935. "application/json": {
  7936. "schema": {
  7937. "type": "object",
  7938. "properties": {
  7939. "sessionID": {
  7940. "type": "string",
  7941. "pattern": "^ses"
  7942. }
  7943. },
  7944. "required": ["sessionID"],
  7945. "additionalProperties": false,
  7946. "description": "Session stolen into workspace"
  7947. }
  7948. }
  7949. }
  7950. },
  7951. "400": {
  7952. "description": "BadRequest | InvalidRequestError",
  7953. "content": {
  7954. "application/json": {
  7955. "schema": {
  7956. "anyOf": [
  7957. {
  7958. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7959. },
  7960. {
  7961. "$ref": "#/components/schemas/InvalidRequestError"
  7962. }
  7963. ]
  7964. }
  7965. }
  7966. }
  7967. }
  7968. },
  7969. "description": "Update a session to belong to the current workspace through the sync event system.",
  7970. "summary": "Steal session into workspace",
  7971. "requestBody": {
  7972. "content": {
  7973. "application/json": {
  7974. "schema": {
  7975. "type": "object",
  7976. "properties": {
  7977. "sessionID": {
  7978. "type": "string",
  7979. "pattern": "^ses"
  7980. }
  7981. },
  7982. "required": ["sessionID"],
  7983. "additionalProperties": false
  7984. }
  7985. }
  7986. }
  7987. },
  7988. "x-codeSamples": [
  7989. {
  7990. "lang": "js",
  7991. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  7992. }
  7993. ]
  7994. }
  7995. },
  7996. "/sync/history": {
  7997. "post": {
  7998. "tags": ["sync"],
  7999. "operationId": "sync.history.list",
  8000. "parameters": [
  8001. {
  8002. "name": "directory",
  8003. "in": "query",
  8004. "schema": {
  8005. "type": "string"
  8006. },
  8007. "required": false
  8008. },
  8009. {
  8010. "name": "workspace",
  8011. "in": "query",
  8012. "schema": {
  8013. "type": "string"
  8014. },
  8015. "required": false
  8016. }
  8017. ],
  8018. "responses": {
  8019. "200": {
  8020. "description": "Sync events",
  8021. "content": {
  8022. "application/json": {
  8023. "schema": {
  8024. "type": "array",
  8025. "items": {
  8026. "type": "object",
  8027. "properties": {
  8028. "id": {
  8029. "type": "string"
  8030. },
  8031. "aggregate_id": {
  8032. "type": "string"
  8033. },
  8034. "seq": {
  8035. "type": "integer",
  8036. "minimum": 0
  8037. },
  8038. "type": {
  8039. "type": "string"
  8040. },
  8041. "data": {
  8042. "type": "object"
  8043. }
  8044. },
  8045. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8046. "additionalProperties": false
  8047. },
  8048. "description": "Sync events"
  8049. }
  8050. }
  8051. }
  8052. },
  8053. "400": {
  8054. "description": "BadRequest | InvalidRequestError",
  8055. "content": {
  8056. "application/json": {
  8057. "schema": {
  8058. "anyOf": [
  8059. {
  8060. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8061. },
  8062. {
  8063. "$ref": "#/components/schemas/InvalidRequestError"
  8064. }
  8065. ]
  8066. }
  8067. }
  8068. }
  8069. }
  8070. },
  8071. "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.",
  8072. "summary": "List sync events",
  8073. "requestBody": {
  8074. "content": {
  8075. "application/json": {
  8076. "schema": {
  8077. "type": "object",
  8078. "additionalProperties": {
  8079. "type": "integer",
  8080. "minimum": 0
  8081. }
  8082. }
  8083. }
  8084. }
  8085. },
  8086. "x-codeSamples": [
  8087. {
  8088. "lang": "js",
  8089. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8090. }
  8091. ]
  8092. }
  8093. },
  8094. "/api/session": {
  8095. "get": {
  8096. "tags": ["v2"],
  8097. "operationId": "v2.session.list",
  8098. "parameters": [
  8099. {
  8100. "name": "directory",
  8101. "in": "query",
  8102. "schema": {
  8103. "type": "string"
  8104. },
  8105. "required": false
  8106. },
  8107. {
  8108. "name": "workspace",
  8109. "in": "query",
  8110. "schema": {
  8111. "type": "string"
  8112. },
  8113. "required": false
  8114. },
  8115. {
  8116. "name": "limit",
  8117. "in": "query",
  8118. "schema": {
  8119. "type": "number"
  8120. },
  8121. "required": false
  8122. },
  8123. {
  8124. "name": "order",
  8125. "in": "query",
  8126. "schema": {
  8127. "type": "string",
  8128. "enum": ["asc", "desc"]
  8129. },
  8130. "required": false
  8131. },
  8132. {
  8133. "name": "path",
  8134. "in": "query",
  8135. "schema": {
  8136. "type": "string"
  8137. },
  8138. "required": false
  8139. },
  8140. {
  8141. "name": "roots",
  8142. "in": "query",
  8143. "schema": {
  8144. "anyOf": [
  8145. {
  8146. "type": "boolean"
  8147. },
  8148. {
  8149. "type": "string",
  8150. "enum": ["true", "false"]
  8151. }
  8152. ]
  8153. },
  8154. "required": false
  8155. },
  8156. {
  8157. "name": "start",
  8158. "in": "query",
  8159. "schema": {
  8160. "type": "number"
  8161. },
  8162. "required": false
  8163. },
  8164. {
  8165. "name": "search",
  8166. "in": "query",
  8167. "schema": {
  8168. "type": "string"
  8169. },
  8170. "required": false
  8171. },
  8172. {
  8173. "name": "cursor",
  8174. "in": "query",
  8175. "schema": {
  8176. "type": "string",
  8177. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order or filters."
  8178. },
  8179. "required": false
  8180. }
  8181. ],
  8182. "security": [],
  8183. "responses": {
  8184. "200": {
  8185. "description": "V2SessionsResponse",
  8186. "content": {
  8187. "application/json": {
  8188. "schema": {
  8189. "$ref": "#/components/schemas/V2SessionsResponse"
  8190. }
  8191. }
  8192. }
  8193. },
  8194. "400": {
  8195. "description": "InvalidCursorError | InvalidRequestError",
  8196. "content": {
  8197. "application/json": {
  8198. "schema": {
  8199. "anyOf": [
  8200. {
  8201. "$ref": "#/components/schemas/InvalidCursorError"
  8202. },
  8203. {
  8204. "$ref": "#/components/schemas/InvalidRequestError"
  8205. },
  8206. {
  8207. "$ref": "#/components/schemas/InvalidRequestError"
  8208. }
  8209. ]
  8210. }
  8211. }
  8212. }
  8213. },
  8214. "401": {
  8215. "description": "UnauthorizedError",
  8216. "content": {
  8217. "application/json": {
  8218. "schema": {
  8219. "$ref": "#/components/schemas/UnauthorizedError"
  8220. }
  8221. }
  8222. }
  8223. }
  8224. },
  8225. "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.",
  8226. "summary": "List v2 sessions",
  8227. "x-codeSamples": [
  8228. {
  8229. "lang": "js",
  8230. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  8231. }
  8232. ]
  8233. }
  8234. },
  8235. "/api/session/{sessionID}/prompt": {
  8236. "post": {
  8237. "tags": ["v2"],
  8238. "operationId": "v2.session.prompt",
  8239. "parameters": [
  8240. {
  8241. "name": "sessionID",
  8242. "in": "path",
  8243. "schema": {
  8244. "type": "string",
  8245. "pattern": "^ses"
  8246. },
  8247. "required": true
  8248. },
  8249. {
  8250. "name": "directory",
  8251. "in": "query",
  8252. "schema": {
  8253. "type": "string"
  8254. },
  8255. "required": false
  8256. },
  8257. {
  8258. "name": "workspace",
  8259. "in": "query",
  8260. "schema": {
  8261. "type": "string"
  8262. },
  8263. "required": false
  8264. }
  8265. ],
  8266. "security": [],
  8267. "responses": {
  8268. "200": {
  8269. "description": "Session.Message",
  8270. "content": {
  8271. "application/json": {
  8272. "schema": {
  8273. "$ref": "#/components/schemas/SessionMessage"
  8274. }
  8275. }
  8276. }
  8277. },
  8278. "400": {
  8279. "description": "InvalidRequestError",
  8280. "content": {
  8281. "application/json": {
  8282. "schema": {
  8283. "$ref": "#/components/schemas/InvalidRequestError"
  8284. }
  8285. }
  8286. }
  8287. },
  8288. "401": {
  8289. "description": "UnauthorizedError",
  8290. "content": {
  8291. "application/json": {
  8292. "schema": {
  8293. "$ref": "#/components/schemas/UnauthorizedError"
  8294. }
  8295. }
  8296. }
  8297. },
  8298. "404": {
  8299. "description": "SessionNotFoundError",
  8300. "content": {
  8301. "application/json": {
  8302. "schema": {
  8303. "$ref": "#/components/schemas/SessionNotFoundError"
  8304. }
  8305. }
  8306. }
  8307. },
  8308. "503": {
  8309. "description": "ServiceUnavailableError",
  8310. "content": {
  8311. "application/json": {
  8312. "schema": {
  8313. "$ref": "#/components/schemas/ServiceUnavailableError"
  8314. }
  8315. }
  8316. }
  8317. }
  8318. },
  8319. "description": "Create a v2 session message and queue it for the agent loop.",
  8320. "summary": "Send v2 message",
  8321. "requestBody": {
  8322. "content": {
  8323. "application/json": {
  8324. "schema": {
  8325. "type": "object",
  8326. "properties": {
  8327. "prompt": {
  8328. "$ref": "#/components/schemas/Prompt"
  8329. },
  8330. "delivery": {
  8331. "$ref": "#/components/schemas/SessionDelivery"
  8332. }
  8333. },
  8334. "required": ["prompt"],
  8335. "additionalProperties": false
  8336. }
  8337. }
  8338. }
  8339. },
  8340. "x-codeSamples": [
  8341. {
  8342. "lang": "js",
  8343. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  8344. }
  8345. ]
  8346. }
  8347. },
  8348. "/api/session/{sessionID}/compact": {
  8349. "post": {
  8350. "tags": ["v2"],
  8351. "operationId": "v2.session.compact",
  8352. "parameters": [
  8353. {
  8354. "name": "sessionID",
  8355. "in": "path",
  8356. "schema": {
  8357. "type": "string",
  8358. "pattern": "^ses"
  8359. },
  8360. "required": true
  8361. },
  8362. {
  8363. "name": "directory",
  8364. "in": "query",
  8365. "schema": {
  8366. "type": "string"
  8367. },
  8368. "required": false
  8369. },
  8370. {
  8371. "name": "workspace",
  8372. "in": "query",
  8373. "schema": {
  8374. "type": "string"
  8375. },
  8376. "required": false
  8377. }
  8378. ],
  8379. "security": [],
  8380. "responses": {
  8381. "204": {
  8382. "description": "<No Content>"
  8383. },
  8384. "400": {
  8385. "description": "InvalidRequestError",
  8386. "content": {
  8387. "application/json": {
  8388. "schema": {
  8389. "$ref": "#/components/schemas/InvalidRequestError"
  8390. }
  8391. }
  8392. }
  8393. },
  8394. "401": {
  8395. "description": "UnauthorizedError",
  8396. "content": {
  8397. "application/json": {
  8398. "schema": {
  8399. "$ref": "#/components/schemas/UnauthorizedError"
  8400. }
  8401. }
  8402. }
  8403. },
  8404. "404": {
  8405. "description": "SessionNotFoundError",
  8406. "content": {
  8407. "application/json": {
  8408. "schema": {
  8409. "$ref": "#/components/schemas/SessionNotFoundError"
  8410. }
  8411. }
  8412. }
  8413. },
  8414. "503": {
  8415. "description": "ServiceUnavailableError",
  8416. "content": {
  8417. "application/json": {
  8418. "schema": {
  8419. "$ref": "#/components/schemas/ServiceUnavailableError"
  8420. }
  8421. }
  8422. }
  8423. }
  8424. },
  8425. "description": "Compact a v2 session conversation.",
  8426. "summary": "Compact v2 session",
  8427. "x-codeSamples": [
  8428. {
  8429. "lang": "js",
  8430. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  8431. }
  8432. ]
  8433. }
  8434. },
  8435. "/api/session/{sessionID}/wait": {
  8436. "post": {
  8437. "tags": ["v2"],
  8438. "operationId": "v2.session.wait",
  8439. "parameters": [
  8440. {
  8441. "name": "sessionID",
  8442. "in": "path",
  8443. "schema": {
  8444. "type": "string",
  8445. "pattern": "^ses"
  8446. },
  8447. "required": true
  8448. },
  8449. {
  8450. "name": "directory",
  8451. "in": "query",
  8452. "schema": {
  8453. "type": "string"
  8454. },
  8455. "required": false
  8456. },
  8457. {
  8458. "name": "workspace",
  8459. "in": "query",
  8460. "schema": {
  8461. "type": "string"
  8462. },
  8463. "required": false
  8464. }
  8465. ],
  8466. "security": [],
  8467. "responses": {
  8468. "204": {
  8469. "description": "<No Content>"
  8470. },
  8471. "400": {
  8472. "description": "InvalidRequestError",
  8473. "content": {
  8474. "application/json": {
  8475. "schema": {
  8476. "$ref": "#/components/schemas/InvalidRequestError"
  8477. }
  8478. }
  8479. }
  8480. },
  8481. "401": {
  8482. "description": "UnauthorizedError",
  8483. "content": {
  8484. "application/json": {
  8485. "schema": {
  8486. "$ref": "#/components/schemas/UnauthorizedError"
  8487. }
  8488. }
  8489. }
  8490. },
  8491. "404": {
  8492. "description": "SessionNotFoundError",
  8493. "content": {
  8494. "application/json": {
  8495. "schema": {
  8496. "$ref": "#/components/schemas/SessionNotFoundError"
  8497. }
  8498. }
  8499. }
  8500. },
  8501. "503": {
  8502. "description": "ServiceUnavailableError",
  8503. "content": {
  8504. "application/json": {
  8505. "schema": {
  8506. "$ref": "#/components/schemas/ServiceUnavailableError"
  8507. }
  8508. }
  8509. }
  8510. }
  8511. },
  8512. "description": "Wait for a v2 session agent loop to become idle.",
  8513. "summary": "Wait for v2 session",
  8514. "x-codeSamples": [
  8515. {
  8516. "lang": "js",
  8517. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  8518. }
  8519. ]
  8520. }
  8521. },
  8522. "/api/session/{sessionID}/context": {
  8523. "get": {
  8524. "tags": ["v2"],
  8525. "operationId": "v2.session.context",
  8526. "parameters": [
  8527. {
  8528. "name": "sessionID",
  8529. "in": "path",
  8530. "schema": {
  8531. "type": "string",
  8532. "pattern": "^ses"
  8533. },
  8534. "required": true
  8535. },
  8536. {
  8537. "name": "directory",
  8538. "in": "query",
  8539. "schema": {
  8540. "type": "string"
  8541. },
  8542. "required": false
  8543. },
  8544. {
  8545. "name": "workspace",
  8546. "in": "query",
  8547. "schema": {
  8548. "type": "string"
  8549. },
  8550. "required": false
  8551. }
  8552. ],
  8553. "security": [],
  8554. "responses": {
  8555. "200": {
  8556. "description": "Success",
  8557. "content": {
  8558. "application/json": {
  8559. "schema": {
  8560. "type": "array",
  8561. "items": {
  8562. "$ref": "#/components/schemas/SessionMessage"
  8563. }
  8564. }
  8565. }
  8566. }
  8567. },
  8568. "400": {
  8569. "description": "InvalidRequestError",
  8570. "content": {
  8571. "application/json": {
  8572. "schema": {
  8573. "$ref": "#/components/schemas/InvalidRequestError"
  8574. }
  8575. }
  8576. }
  8577. },
  8578. "401": {
  8579. "description": "UnauthorizedError",
  8580. "content": {
  8581. "application/json": {
  8582. "schema": {
  8583. "$ref": "#/components/schemas/UnauthorizedError"
  8584. }
  8585. }
  8586. }
  8587. },
  8588. "404": {
  8589. "description": "SessionNotFoundError",
  8590. "content": {
  8591. "application/json": {
  8592. "schema": {
  8593. "$ref": "#/components/schemas/SessionNotFoundError"
  8594. }
  8595. }
  8596. }
  8597. },
  8598. "500": {
  8599. "description": "UnknownError",
  8600. "content": {
  8601. "application/json": {
  8602. "schema": {
  8603. "$ref": "#/components/schemas/UnknownError1"
  8604. }
  8605. }
  8606. }
  8607. }
  8608. },
  8609. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  8610. "summary": "Get v2 session context",
  8611. "x-codeSamples": [
  8612. {
  8613. "lang": "js",
  8614. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  8615. }
  8616. ]
  8617. }
  8618. },
  8619. "/api/session/{sessionID}/message": {
  8620. "get": {
  8621. "tags": ["v2 messages"],
  8622. "operationId": "v2.session.messages",
  8623. "parameters": [
  8624. {
  8625. "name": "sessionID",
  8626. "in": "path",
  8627. "schema": {
  8628. "type": "string",
  8629. "pattern": "^ses"
  8630. },
  8631. "required": true
  8632. },
  8633. {
  8634. "name": "directory",
  8635. "in": "query",
  8636. "schema": {
  8637. "type": "string"
  8638. },
  8639. "required": false
  8640. },
  8641. {
  8642. "name": "workspace",
  8643. "in": "query",
  8644. "schema": {
  8645. "type": "string"
  8646. },
  8647. "required": false
  8648. },
  8649. {
  8650. "name": "limit",
  8651. "in": "query",
  8652. "schema": {
  8653. "type": "number"
  8654. },
  8655. "required": false
  8656. },
  8657. {
  8658. "name": "order",
  8659. "in": "query",
  8660. "schema": {
  8661. "type": "string",
  8662. "enum": ["asc", "desc"]
  8663. },
  8664. "required": false
  8665. },
  8666. {
  8667. "name": "cursor",
  8668. "in": "query",
  8669. "schema": {
  8670. "type": "string",
  8671. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  8672. },
  8673. "required": false
  8674. }
  8675. ],
  8676. "security": [],
  8677. "responses": {
  8678. "200": {
  8679. "description": "V2SessionMessagesResponse",
  8680. "content": {
  8681. "application/json": {
  8682. "schema": {
  8683. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  8684. }
  8685. }
  8686. }
  8687. },
  8688. "400": {
  8689. "description": "InvalidCursorError | InvalidRequestError",
  8690. "content": {
  8691. "application/json": {
  8692. "schema": {
  8693. "anyOf": [
  8694. {
  8695. "$ref": "#/components/schemas/InvalidCursorError"
  8696. },
  8697. {
  8698. "$ref": "#/components/schemas/InvalidRequestError"
  8699. }
  8700. ]
  8701. }
  8702. }
  8703. }
  8704. },
  8705. "401": {
  8706. "description": "UnauthorizedError",
  8707. "content": {
  8708. "application/json": {
  8709. "schema": {
  8710. "$ref": "#/components/schemas/UnauthorizedError"
  8711. }
  8712. }
  8713. }
  8714. },
  8715. "404": {
  8716. "description": "SessionNotFoundError",
  8717. "content": {
  8718. "application/json": {
  8719. "schema": {
  8720. "$ref": "#/components/schemas/SessionNotFoundError"
  8721. }
  8722. }
  8723. }
  8724. },
  8725. "500": {
  8726. "description": "UnknownError",
  8727. "content": {
  8728. "application/json": {
  8729. "schema": {
  8730. "$ref": "#/components/schemas/UnknownError1"
  8731. }
  8732. }
  8733. }
  8734. }
  8735. },
  8736. "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.",
  8737. "summary": "Get v2 session messages",
  8738. "x-codeSamples": [
  8739. {
  8740. "lang": "js",
  8741. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  8742. }
  8743. ]
  8744. }
  8745. },
  8746. "/api/model": {
  8747. "get": {
  8748. "tags": ["v2 models"],
  8749. "operationId": "v2.model.list",
  8750. "parameters": [
  8751. {
  8752. "name": "location",
  8753. "in": "query",
  8754. "schema": {
  8755. "type": "object",
  8756. "properties": {
  8757. "directory": {
  8758. "type": "string"
  8759. },
  8760. "workspace": {
  8761. "type": "string"
  8762. }
  8763. },
  8764. "additionalProperties": false
  8765. },
  8766. "required": false,
  8767. "style": "deepObject",
  8768. "explode": true
  8769. }
  8770. ],
  8771. "security": [],
  8772. "responses": {
  8773. "200": {
  8774. "description": "Success",
  8775. "content": {
  8776. "application/json": {
  8777. "schema": {
  8778. "type": "array",
  8779. "items": {
  8780. "$ref": "#/components/schemas/ModelV2Info"
  8781. }
  8782. }
  8783. }
  8784. }
  8785. },
  8786. "400": {
  8787. "description": "InvalidRequestError",
  8788. "content": {
  8789. "application/json": {
  8790. "schema": {
  8791. "$ref": "#/components/schemas/InvalidRequestError"
  8792. }
  8793. }
  8794. }
  8795. },
  8796. "401": {
  8797. "description": "UnauthorizedError",
  8798. "content": {
  8799. "application/json": {
  8800. "schema": {
  8801. "$ref": "#/components/schemas/UnauthorizedError"
  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 available v2 models ordered by release date.",
  8818. "summary": "List v2 models",
  8819. "x-codeSamples": [
  8820. {
  8821. "lang": "js",
  8822. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  8823. }
  8824. ]
  8825. }
  8826. },
  8827. "/api/provider": {
  8828. "get": {
  8829. "tags": ["v2 providers"],
  8830. "operationId": "v2.provider.list",
  8831. "parameters": [
  8832. {
  8833. "name": "location",
  8834. "in": "query",
  8835. "schema": {
  8836. "type": "object",
  8837. "properties": {
  8838. "directory": {
  8839. "type": "string"
  8840. },
  8841. "workspace": {
  8842. "type": "string"
  8843. }
  8844. },
  8845. "additionalProperties": false
  8846. },
  8847. "required": false,
  8848. "style": "deepObject",
  8849. "explode": true
  8850. }
  8851. ],
  8852. "security": [],
  8853. "responses": {
  8854. "200": {
  8855. "description": "Success",
  8856. "content": {
  8857. "application/json": {
  8858. "schema": {
  8859. "type": "array",
  8860. "items": {
  8861. "$ref": "#/components/schemas/ProviderV2Info"
  8862. }
  8863. }
  8864. }
  8865. }
  8866. },
  8867. "400": {
  8868. "description": "InvalidRequestError",
  8869. "content": {
  8870. "application/json": {
  8871. "schema": {
  8872. "$ref": "#/components/schemas/InvalidRequestError"
  8873. }
  8874. }
  8875. }
  8876. },
  8877. "401": {
  8878. "description": "UnauthorizedError",
  8879. "content": {
  8880. "application/json": {
  8881. "schema": {
  8882. "$ref": "#/components/schemas/UnauthorizedError"
  8883. }
  8884. }
  8885. }
  8886. },
  8887. "503": {
  8888. "description": "ServiceUnavailableError",
  8889. "content": {
  8890. "application/json": {
  8891. "schema": {
  8892. "$ref": "#/components/schemas/ServiceUnavailableError"
  8893. }
  8894. }
  8895. }
  8896. }
  8897. },
  8898. "description": "Retrieve active v2 AI providers so clients can show provider availability and configuration.",
  8899. "summary": "List v2 providers",
  8900. "x-codeSamples": [
  8901. {
  8902. "lang": "js",
  8903. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  8904. }
  8905. ]
  8906. }
  8907. },
  8908. "/api/provider/{providerID}": {
  8909. "get": {
  8910. "tags": ["v2 providers"],
  8911. "operationId": "v2.provider.get",
  8912. "parameters": [
  8913. {
  8914. "name": "providerID",
  8915. "in": "path",
  8916. "schema": {
  8917. "type": "string"
  8918. },
  8919. "required": true
  8920. },
  8921. {
  8922. "name": "location",
  8923. "in": "query",
  8924. "schema": {
  8925. "type": "object",
  8926. "properties": {
  8927. "directory": {
  8928. "type": "string"
  8929. },
  8930. "workspace": {
  8931. "type": "string"
  8932. }
  8933. },
  8934. "additionalProperties": false
  8935. },
  8936. "required": false,
  8937. "style": "deepObject",
  8938. "explode": true
  8939. }
  8940. ],
  8941. "security": [],
  8942. "responses": {
  8943. "200": {
  8944. "description": "ProviderV2.Info",
  8945. "content": {
  8946. "application/json": {
  8947. "schema": {
  8948. "$ref": "#/components/schemas/ProviderV2Info"
  8949. }
  8950. }
  8951. }
  8952. },
  8953. "400": {
  8954. "description": "InvalidRequestError",
  8955. "content": {
  8956. "application/json": {
  8957. "schema": {
  8958. "$ref": "#/components/schemas/InvalidRequestError"
  8959. }
  8960. }
  8961. }
  8962. },
  8963. "401": {
  8964. "description": "UnauthorizedError",
  8965. "content": {
  8966. "application/json": {
  8967. "schema": {
  8968. "$ref": "#/components/schemas/UnauthorizedError"
  8969. }
  8970. }
  8971. }
  8972. },
  8973. "404": {
  8974. "description": "ProviderNotFoundError",
  8975. "content": {
  8976. "application/json": {
  8977. "schema": {
  8978. "$ref": "#/components/schemas/ProviderNotFoundError"
  8979. }
  8980. }
  8981. }
  8982. },
  8983. "503": {
  8984. "description": "ServiceUnavailableError",
  8985. "content": {
  8986. "application/json": {
  8987. "schema": {
  8988. "$ref": "#/components/schemas/ServiceUnavailableError"
  8989. }
  8990. }
  8991. }
  8992. }
  8993. },
  8994. "description": "Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.",
  8995. "summary": "Get v2 provider",
  8996. "x-codeSamples": [
  8997. {
  8998. "lang": "js",
  8999. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  9000. }
  9001. ]
  9002. }
  9003. },
  9004. "/tui/append-prompt": {
  9005. "post": {
  9006. "tags": ["tui"],
  9007. "operationId": "tui.appendPrompt",
  9008. "parameters": [
  9009. {
  9010. "name": "directory",
  9011. "in": "query",
  9012. "schema": {
  9013. "type": "string"
  9014. },
  9015. "required": false
  9016. },
  9017. {
  9018. "name": "workspace",
  9019. "in": "query",
  9020. "schema": {
  9021. "type": "string"
  9022. },
  9023. "required": false
  9024. }
  9025. ],
  9026. "responses": {
  9027. "200": {
  9028. "description": "Prompt processed successfully",
  9029. "content": {
  9030. "application/json": {
  9031. "schema": {
  9032. "type": "boolean",
  9033. "description": "Prompt processed successfully"
  9034. }
  9035. }
  9036. }
  9037. },
  9038. "400": {
  9039. "description": "BadRequest | InvalidRequestError",
  9040. "content": {
  9041. "application/json": {
  9042. "schema": {
  9043. "anyOf": [
  9044. {
  9045. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9046. },
  9047. {
  9048. "$ref": "#/components/schemas/InvalidRequestError"
  9049. }
  9050. ]
  9051. }
  9052. }
  9053. }
  9054. }
  9055. },
  9056. "description": "Append prompt to the TUI.",
  9057. "summary": "Append TUI prompt",
  9058. "requestBody": {
  9059. "content": {
  9060. "application/json": {
  9061. "schema": {
  9062. "type": "object",
  9063. "properties": {
  9064. "text": {
  9065. "type": "string"
  9066. }
  9067. },
  9068. "required": ["text"],
  9069. "additionalProperties": false
  9070. }
  9071. }
  9072. }
  9073. },
  9074. "x-codeSamples": [
  9075. {
  9076. "lang": "js",
  9077. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  9078. }
  9079. ]
  9080. }
  9081. },
  9082. "/tui/open-help": {
  9083. "post": {
  9084. "tags": ["tui"],
  9085. "operationId": "tui.openHelp",
  9086. "parameters": [
  9087. {
  9088. "name": "directory",
  9089. "in": "query",
  9090. "schema": {
  9091. "type": "string"
  9092. },
  9093. "required": false
  9094. },
  9095. {
  9096. "name": "workspace",
  9097. "in": "query",
  9098. "schema": {
  9099. "type": "string"
  9100. },
  9101. "required": false
  9102. }
  9103. ],
  9104. "responses": {
  9105. "200": {
  9106. "description": "Help dialog opened successfully",
  9107. "content": {
  9108. "application/json": {
  9109. "schema": {
  9110. "type": "boolean",
  9111. "description": "Help dialog opened successfully"
  9112. }
  9113. }
  9114. }
  9115. },
  9116. "400": {
  9117. "description": "Bad request",
  9118. "content": {
  9119. "application/json": {
  9120. "schema": {
  9121. "$ref": "#/components/schemas/BadRequestError"
  9122. }
  9123. }
  9124. }
  9125. }
  9126. },
  9127. "description": "Open the help dialog in the TUI to display user assistance information.",
  9128. "summary": "Open help dialog",
  9129. "x-codeSamples": [
  9130. {
  9131. "lang": "js",
  9132. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  9133. }
  9134. ]
  9135. }
  9136. },
  9137. "/tui/open-sessions": {
  9138. "post": {
  9139. "tags": ["tui"],
  9140. "operationId": "tui.openSessions",
  9141. "parameters": [
  9142. {
  9143. "name": "directory",
  9144. "in": "query",
  9145. "schema": {
  9146. "type": "string"
  9147. },
  9148. "required": false
  9149. },
  9150. {
  9151. "name": "workspace",
  9152. "in": "query",
  9153. "schema": {
  9154. "type": "string"
  9155. },
  9156. "required": false
  9157. }
  9158. ],
  9159. "responses": {
  9160. "200": {
  9161. "description": "Session dialog opened successfully",
  9162. "content": {
  9163. "application/json": {
  9164. "schema": {
  9165. "type": "boolean",
  9166. "description": "Session dialog opened successfully"
  9167. }
  9168. }
  9169. }
  9170. },
  9171. "400": {
  9172. "description": "Bad request",
  9173. "content": {
  9174. "application/json": {
  9175. "schema": {
  9176. "$ref": "#/components/schemas/BadRequestError"
  9177. }
  9178. }
  9179. }
  9180. }
  9181. },
  9182. "description": "Open the session dialog.",
  9183. "summary": "Open sessions dialog",
  9184. "x-codeSamples": [
  9185. {
  9186. "lang": "js",
  9187. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  9188. }
  9189. ]
  9190. }
  9191. },
  9192. "/tui/open-themes": {
  9193. "post": {
  9194. "tags": ["tui"],
  9195. "operationId": "tui.openThemes",
  9196. "parameters": [
  9197. {
  9198. "name": "directory",
  9199. "in": "query",
  9200. "schema": {
  9201. "type": "string"
  9202. },
  9203. "required": false
  9204. },
  9205. {
  9206. "name": "workspace",
  9207. "in": "query",
  9208. "schema": {
  9209. "type": "string"
  9210. },
  9211. "required": false
  9212. }
  9213. ],
  9214. "responses": {
  9215. "200": {
  9216. "description": "Theme dialog opened successfully",
  9217. "content": {
  9218. "application/json": {
  9219. "schema": {
  9220. "type": "boolean",
  9221. "description": "Theme dialog opened successfully"
  9222. }
  9223. }
  9224. }
  9225. },
  9226. "400": {
  9227. "description": "Bad request",
  9228. "content": {
  9229. "application/json": {
  9230. "schema": {
  9231. "$ref": "#/components/schemas/BadRequestError"
  9232. }
  9233. }
  9234. }
  9235. }
  9236. },
  9237. "description": "Open the theme dialog.",
  9238. "summary": "Open themes dialog",
  9239. "x-codeSamples": [
  9240. {
  9241. "lang": "js",
  9242. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  9243. }
  9244. ]
  9245. }
  9246. },
  9247. "/tui/open-models": {
  9248. "post": {
  9249. "tags": ["tui"],
  9250. "operationId": "tui.openModels",
  9251. "parameters": [
  9252. {
  9253. "name": "directory",
  9254. "in": "query",
  9255. "schema": {
  9256. "type": "string"
  9257. },
  9258. "required": false
  9259. },
  9260. {
  9261. "name": "workspace",
  9262. "in": "query",
  9263. "schema": {
  9264. "type": "string"
  9265. },
  9266. "required": false
  9267. }
  9268. ],
  9269. "responses": {
  9270. "200": {
  9271. "description": "Model dialog opened successfully",
  9272. "content": {
  9273. "application/json": {
  9274. "schema": {
  9275. "type": "boolean",
  9276. "description": "Model dialog opened successfully"
  9277. }
  9278. }
  9279. }
  9280. },
  9281. "400": {
  9282. "description": "Bad request",
  9283. "content": {
  9284. "application/json": {
  9285. "schema": {
  9286. "$ref": "#/components/schemas/BadRequestError"
  9287. }
  9288. }
  9289. }
  9290. }
  9291. },
  9292. "description": "Open the model dialog.",
  9293. "summary": "Open models dialog",
  9294. "x-codeSamples": [
  9295. {
  9296. "lang": "js",
  9297. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  9298. }
  9299. ]
  9300. }
  9301. },
  9302. "/tui/submit-prompt": {
  9303. "post": {
  9304. "tags": ["tui"],
  9305. "operationId": "tui.submitPrompt",
  9306. "parameters": [
  9307. {
  9308. "name": "directory",
  9309. "in": "query",
  9310. "schema": {
  9311. "type": "string"
  9312. },
  9313. "required": false
  9314. },
  9315. {
  9316. "name": "workspace",
  9317. "in": "query",
  9318. "schema": {
  9319. "type": "string"
  9320. },
  9321. "required": false
  9322. }
  9323. ],
  9324. "responses": {
  9325. "200": {
  9326. "description": "Prompt submitted successfully",
  9327. "content": {
  9328. "application/json": {
  9329. "schema": {
  9330. "type": "boolean",
  9331. "description": "Prompt submitted successfully"
  9332. }
  9333. }
  9334. }
  9335. },
  9336. "400": {
  9337. "description": "Bad request",
  9338. "content": {
  9339. "application/json": {
  9340. "schema": {
  9341. "$ref": "#/components/schemas/BadRequestError"
  9342. }
  9343. }
  9344. }
  9345. }
  9346. },
  9347. "description": "Submit the prompt.",
  9348. "summary": "Submit TUI prompt",
  9349. "x-codeSamples": [
  9350. {
  9351. "lang": "js",
  9352. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  9353. }
  9354. ]
  9355. }
  9356. },
  9357. "/tui/clear-prompt": {
  9358. "post": {
  9359. "tags": ["tui"],
  9360. "operationId": "tui.clearPrompt",
  9361. "parameters": [
  9362. {
  9363. "name": "directory",
  9364. "in": "query",
  9365. "schema": {
  9366. "type": "string"
  9367. },
  9368. "required": false
  9369. },
  9370. {
  9371. "name": "workspace",
  9372. "in": "query",
  9373. "schema": {
  9374. "type": "string"
  9375. },
  9376. "required": false
  9377. }
  9378. ],
  9379. "responses": {
  9380. "200": {
  9381. "description": "Prompt cleared successfully",
  9382. "content": {
  9383. "application/json": {
  9384. "schema": {
  9385. "type": "boolean",
  9386. "description": "Prompt cleared successfully"
  9387. }
  9388. }
  9389. }
  9390. },
  9391. "400": {
  9392. "description": "Bad request",
  9393. "content": {
  9394. "application/json": {
  9395. "schema": {
  9396. "$ref": "#/components/schemas/BadRequestError"
  9397. }
  9398. }
  9399. }
  9400. }
  9401. },
  9402. "description": "Clear the prompt.",
  9403. "summary": "Clear TUI prompt",
  9404. "x-codeSamples": [
  9405. {
  9406. "lang": "js",
  9407. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  9408. }
  9409. ]
  9410. }
  9411. },
  9412. "/tui/execute-command": {
  9413. "post": {
  9414. "tags": ["tui"],
  9415. "operationId": "tui.executeCommand",
  9416. "parameters": [
  9417. {
  9418. "name": "directory",
  9419. "in": "query",
  9420. "schema": {
  9421. "type": "string"
  9422. },
  9423. "required": false
  9424. },
  9425. {
  9426. "name": "workspace",
  9427. "in": "query",
  9428. "schema": {
  9429. "type": "string"
  9430. },
  9431. "required": false
  9432. }
  9433. ],
  9434. "responses": {
  9435. "200": {
  9436. "description": "Command executed successfully",
  9437. "content": {
  9438. "application/json": {
  9439. "schema": {
  9440. "type": "boolean",
  9441. "description": "Command executed successfully"
  9442. }
  9443. }
  9444. }
  9445. },
  9446. "400": {
  9447. "description": "BadRequest | InvalidRequestError",
  9448. "content": {
  9449. "application/json": {
  9450. "schema": {
  9451. "anyOf": [
  9452. {
  9453. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9454. },
  9455. {
  9456. "$ref": "#/components/schemas/InvalidRequestError"
  9457. }
  9458. ]
  9459. }
  9460. }
  9461. }
  9462. }
  9463. },
  9464. "description": "Execute a TUI command.",
  9465. "summary": "Execute TUI command",
  9466. "requestBody": {
  9467. "content": {
  9468. "application/json": {
  9469. "schema": {
  9470. "type": "object",
  9471. "properties": {
  9472. "command": {
  9473. "type": "string"
  9474. }
  9475. },
  9476. "required": ["command"],
  9477. "additionalProperties": false
  9478. }
  9479. }
  9480. }
  9481. },
  9482. "x-codeSamples": [
  9483. {
  9484. "lang": "js",
  9485. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  9486. }
  9487. ]
  9488. }
  9489. },
  9490. "/tui/show-toast": {
  9491. "post": {
  9492. "tags": ["tui"],
  9493. "operationId": "tui.showToast",
  9494. "parameters": [
  9495. {
  9496. "name": "directory",
  9497. "in": "query",
  9498. "schema": {
  9499. "type": "string"
  9500. },
  9501. "required": false
  9502. },
  9503. {
  9504. "name": "workspace",
  9505. "in": "query",
  9506. "schema": {
  9507. "type": "string"
  9508. },
  9509. "required": false
  9510. }
  9511. ],
  9512. "responses": {
  9513. "200": {
  9514. "description": "Toast notification shown successfully",
  9515. "content": {
  9516. "application/json": {
  9517. "schema": {
  9518. "type": "boolean",
  9519. "description": "Toast notification shown successfully"
  9520. }
  9521. }
  9522. }
  9523. },
  9524. "400": {
  9525. "description": "Bad request",
  9526. "content": {
  9527. "application/json": {
  9528. "schema": {
  9529. "$ref": "#/components/schemas/BadRequestError"
  9530. }
  9531. }
  9532. }
  9533. }
  9534. },
  9535. "description": "Show a toast notification in the TUI.",
  9536. "summary": "Show TUI toast",
  9537. "requestBody": {
  9538. "content": {
  9539. "application/json": {
  9540. "schema": {
  9541. "type": "object",
  9542. "properties": {
  9543. "title": {
  9544. "type": "string"
  9545. },
  9546. "message": {
  9547. "type": "string"
  9548. },
  9549. "variant": {
  9550. "type": "string",
  9551. "enum": ["info", "success", "warning", "error"]
  9552. },
  9553. "duration": {
  9554. "type": "integer",
  9555. "exclusiveMinimum": 0
  9556. }
  9557. },
  9558. "required": ["message", "variant"],
  9559. "additionalProperties": false
  9560. }
  9561. }
  9562. }
  9563. },
  9564. "x-codeSamples": [
  9565. {
  9566. "lang": "js",
  9567. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  9568. }
  9569. ]
  9570. }
  9571. },
  9572. "/tui/publish": {
  9573. "post": {
  9574. "tags": ["tui"],
  9575. "operationId": "tui.publish",
  9576. "parameters": [
  9577. {
  9578. "name": "directory",
  9579. "in": "query",
  9580. "schema": {
  9581. "type": "string"
  9582. },
  9583. "required": false
  9584. },
  9585. {
  9586. "name": "workspace",
  9587. "in": "query",
  9588. "schema": {
  9589. "type": "string"
  9590. },
  9591. "required": false
  9592. }
  9593. ],
  9594. "responses": {
  9595. "200": {
  9596. "description": "Event published successfully",
  9597. "content": {
  9598. "application/json": {
  9599. "schema": {
  9600. "type": "boolean",
  9601. "description": "Event published successfully"
  9602. }
  9603. }
  9604. }
  9605. },
  9606. "400": {
  9607. "description": "BadRequest | InvalidRequestError",
  9608. "content": {
  9609. "application/json": {
  9610. "schema": {
  9611. "anyOf": [
  9612. {
  9613. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9614. },
  9615. {
  9616. "$ref": "#/components/schemas/InvalidRequestError"
  9617. }
  9618. ]
  9619. }
  9620. }
  9621. }
  9622. }
  9623. },
  9624. "description": "Publish a TUI event.",
  9625. "summary": "Publish TUI event",
  9626. "requestBody": {
  9627. "content": {
  9628. "application/json": {
  9629. "schema": {
  9630. "anyOf": [
  9631. {
  9632. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9633. },
  9634. {
  9635. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9636. },
  9637. {
  9638. "$ref": "#/components/schemas/EventTuiToastShow"
  9639. },
  9640. {
  9641. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9642. }
  9643. ]
  9644. }
  9645. }
  9646. }
  9647. },
  9648. "x-codeSamples": [
  9649. {
  9650. "lang": "js",
  9651. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9652. }
  9653. ]
  9654. }
  9655. },
  9656. "/tui/select-session": {
  9657. "post": {
  9658. "tags": ["tui"],
  9659. "operationId": "tui.selectSession",
  9660. "parameters": [
  9661. {
  9662. "name": "directory",
  9663. "in": "query",
  9664. "schema": {
  9665. "type": "string"
  9666. },
  9667. "required": false
  9668. },
  9669. {
  9670. "name": "workspace",
  9671. "in": "query",
  9672. "schema": {
  9673. "type": "string"
  9674. },
  9675. "required": false
  9676. }
  9677. ],
  9678. "responses": {
  9679. "200": {
  9680. "description": "Session selected successfully",
  9681. "content": {
  9682. "application/json": {
  9683. "schema": {
  9684. "type": "boolean",
  9685. "description": "Session selected successfully"
  9686. }
  9687. }
  9688. }
  9689. },
  9690. "400": {
  9691. "description": "BadRequest | InvalidRequestError",
  9692. "content": {
  9693. "application/json": {
  9694. "schema": {
  9695. "anyOf": [
  9696. {
  9697. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9698. },
  9699. {
  9700. "$ref": "#/components/schemas/InvalidRequestError"
  9701. }
  9702. ]
  9703. }
  9704. }
  9705. }
  9706. },
  9707. "404": {
  9708. "description": "NotFoundError",
  9709. "content": {
  9710. "application/json": {
  9711. "schema": {
  9712. "$ref": "#/components/schemas/NotFoundError"
  9713. }
  9714. }
  9715. }
  9716. }
  9717. },
  9718. "description": "Navigate the TUI to display the specified session.",
  9719. "summary": "Select session",
  9720. "requestBody": {
  9721. "content": {
  9722. "application/json": {
  9723. "schema": {
  9724. "type": "object",
  9725. "properties": {
  9726. "sessionID": {
  9727. "type": "string",
  9728. "pattern": "^ses",
  9729. "description": "Session ID to navigate to"
  9730. }
  9731. },
  9732. "required": ["sessionID"],
  9733. "additionalProperties": false
  9734. }
  9735. }
  9736. }
  9737. },
  9738. "x-codeSamples": [
  9739. {
  9740. "lang": "js",
  9741. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9742. }
  9743. ]
  9744. }
  9745. },
  9746. "/tui/control/next": {
  9747. "get": {
  9748. "tags": ["tui"],
  9749. "operationId": "tui.control.next",
  9750. "parameters": [
  9751. {
  9752. "name": "directory",
  9753. "in": "query",
  9754. "schema": {
  9755. "type": "string"
  9756. },
  9757. "required": false
  9758. },
  9759. {
  9760. "name": "workspace",
  9761. "in": "query",
  9762. "schema": {
  9763. "type": "string"
  9764. },
  9765. "required": false
  9766. }
  9767. ],
  9768. "responses": {
  9769. "200": {
  9770. "description": "Next TUI request",
  9771. "content": {
  9772. "application/json": {
  9773. "schema": {
  9774. "type": "object",
  9775. "properties": {
  9776. "path": {
  9777. "type": "string"
  9778. },
  9779. "body": {}
  9780. },
  9781. "required": ["path", "body"],
  9782. "additionalProperties": false,
  9783. "description": "Next TUI request"
  9784. }
  9785. }
  9786. }
  9787. },
  9788. "400": {
  9789. "description": "Bad request",
  9790. "content": {
  9791. "application/json": {
  9792. "schema": {
  9793. "$ref": "#/components/schemas/BadRequestError"
  9794. }
  9795. }
  9796. }
  9797. }
  9798. },
  9799. "description": "Retrieve the next TUI request from the queue for processing.",
  9800. "summary": "Get next TUI request",
  9801. "x-codeSamples": [
  9802. {
  9803. "lang": "js",
  9804. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9805. }
  9806. ]
  9807. }
  9808. },
  9809. "/tui/control/response": {
  9810. "post": {
  9811. "tags": ["tui"],
  9812. "operationId": "tui.control.response",
  9813. "parameters": [
  9814. {
  9815. "name": "directory",
  9816. "in": "query",
  9817. "schema": {
  9818. "type": "string"
  9819. },
  9820. "required": false
  9821. },
  9822. {
  9823. "name": "workspace",
  9824. "in": "query",
  9825. "schema": {
  9826. "type": "string"
  9827. },
  9828. "required": false
  9829. }
  9830. ],
  9831. "responses": {
  9832. "200": {
  9833. "description": "Response submitted successfully",
  9834. "content": {
  9835. "application/json": {
  9836. "schema": {
  9837. "type": "boolean",
  9838. "description": "Response submitted successfully"
  9839. }
  9840. }
  9841. }
  9842. },
  9843. "400": {
  9844. "description": "Bad request",
  9845. "content": {
  9846. "application/json": {
  9847. "schema": {
  9848. "$ref": "#/components/schemas/BadRequestError"
  9849. }
  9850. }
  9851. }
  9852. }
  9853. },
  9854. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9855. "summary": "Submit TUI response",
  9856. "requestBody": {
  9857. "content": {
  9858. "application/json": {
  9859. "schema": {}
  9860. }
  9861. }
  9862. },
  9863. "x-codeSamples": [
  9864. {
  9865. "lang": "js",
  9866. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9867. }
  9868. ]
  9869. }
  9870. },
  9871. "/experimental/workspace/adapter": {
  9872. "get": {
  9873. "tags": ["workspace"],
  9874. "operationId": "experimental.workspace.adapter.list",
  9875. "parameters": [
  9876. {
  9877. "name": "directory",
  9878. "in": "query",
  9879. "schema": {
  9880. "type": "string"
  9881. },
  9882. "required": false
  9883. },
  9884. {
  9885. "name": "workspace",
  9886. "in": "query",
  9887. "schema": {
  9888. "type": "string"
  9889. },
  9890. "required": false
  9891. }
  9892. ],
  9893. "responses": {
  9894. "200": {
  9895. "description": "Workspace adapters",
  9896. "content": {
  9897. "application/json": {
  9898. "schema": {
  9899. "type": "array",
  9900. "items": {
  9901. "type": "object",
  9902. "properties": {
  9903. "type": {
  9904. "type": "string"
  9905. },
  9906. "name": {
  9907. "type": "string"
  9908. },
  9909. "description": {
  9910. "type": "string"
  9911. }
  9912. },
  9913. "required": ["type", "name", "description"],
  9914. "additionalProperties": false
  9915. },
  9916. "description": "Workspace adapters"
  9917. }
  9918. }
  9919. }
  9920. },
  9921. "400": {
  9922. "description": "Bad request",
  9923. "content": {
  9924. "application/json": {
  9925. "schema": {
  9926. "$ref": "#/components/schemas/BadRequestError"
  9927. }
  9928. }
  9929. }
  9930. }
  9931. },
  9932. "description": "List all available workspace adapters for the current project.",
  9933. "summary": "List workspace adapters",
  9934. "x-codeSamples": [
  9935. {
  9936. "lang": "js",
  9937. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9938. }
  9939. ]
  9940. }
  9941. },
  9942. "/experimental/workspace": {
  9943. "get": {
  9944. "tags": ["workspace"],
  9945. "operationId": "experimental.workspace.list",
  9946. "parameters": [
  9947. {
  9948. "name": "directory",
  9949. "in": "query",
  9950. "schema": {
  9951. "type": "string"
  9952. },
  9953. "required": false
  9954. },
  9955. {
  9956. "name": "workspace",
  9957. "in": "query",
  9958. "schema": {
  9959. "type": "string"
  9960. },
  9961. "required": false
  9962. }
  9963. ],
  9964. "responses": {
  9965. "200": {
  9966. "description": "Workspaces",
  9967. "content": {
  9968. "application/json": {
  9969. "schema": {
  9970. "type": "array",
  9971. "items": {
  9972. "$ref": "#/components/schemas/Workspace"
  9973. },
  9974. "description": "Workspaces"
  9975. }
  9976. }
  9977. }
  9978. },
  9979. "400": {
  9980. "description": "Bad request",
  9981. "content": {
  9982. "application/json": {
  9983. "schema": {
  9984. "$ref": "#/components/schemas/BadRequestError"
  9985. }
  9986. }
  9987. }
  9988. }
  9989. },
  9990. "description": "List all workspaces.",
  9991. "summary": "List workspaces",
  9992. "x-codeSamples": [
  9993. {
  9994. "lang": "js",
  9995. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9996. }
  9997. ]
  9998. },
  9999. "post": {
  10000. "tags": ["workspace"],
  10001. "operationId": "experimental.workspace.create",
  10002. "parameters": [
  10003. {
  10004. "name": "directory",
  10005. "in": "query",
  10006. "schema": {
  10007. "type": "string"
  10008. },
  10009. "required": false
  10010. },
  10011. {
  10012. "name": "workspace",
  10013. "in": "query",
  10014. "schema": {
  10015. "type": "string"
  10016. },
  10017. "required": false
  10018. }
  10019. ],
  10020. "responses": {
  10021. "200": {
  10022. "description": "Workspace created",
  10023. "content": {
  10024. "application/json": {
  10025. "schema": {
  10026. "$ref": "#/components/schemas/Workspace"
  10027. }
  10028. }
  10029. }
  10030. },
  10031. "400": {
  10032. "description": "BadRequest | InvalidRequestError",
  10033. "content": {
  10034. "application/json": {
  10035. "schema": {
  10036. "anyOf": [
  10037. {
  10038. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10039. },
  10040. {
  10041. "$ref": "#/components/schemas/InvalidRequestError"
  10042. }
  10043. ]
  10044. }
  10045. }
  10046. }
  10047. }
  10048. },
  10049. "description": "Create a workspace for the current project.",
  10050. "summary": "Create workspace",
  10051. "requestBody": {
  10052. "content": {
  10053. "application/json": {
  10054. "schema": {
  10055. "type": "object",
  10056. "properties": {
  10057. "id": {
  10058. "type": "string",
  10059. "pattern": "^wrk"
  10060. },
  10061. "type": {
  10062. "type": "string"
  10063. },
  10064. "branch": {
  10065. "anyOf": [
  10066. {
  10067. "type": "string"
  10068. },
  10069. {
  10070. "type": "null"
  10071. }
  10072. ]
  10073. },
  10074. "extra": {
  10075. "anyOf": [
  10076. {},
  10077. {
  10078. "type": "null"
  10079. }
  10080. ]
  10081. }
  10082. },
  10083. "required": ["type"],
  10084. "additionalProperties": false
  10085. }
  10086. }
  10087. }
  10088. },
  10089. "x-codeSamples": [
  10090. {
  10091. "lang": "js",
  10092. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  10093. }
  10094. ]
  10095. }
  10096. },
  10097. "/experimental/workspace/sync-list": {
  10098. "post": {
  10099. "tags": ["workspace"],
  10100. "operationId": "experimental.workspace.syncList",
  10101. "parameters": [
  10102. {
  10103. "name": "directory",
  10104. "in": "query",
  10105. "schema": {
  10106. "type": "string"
  10107. },
  10108. "required": false
  10109. },
  10110. {
  10111. "name": "workspace",
  10112. "in": "query",
  10113. "schema": {
  10114. "type": "string"
  10115. },
  10116. "required": false
  10117. }
  10118. ],
  10119. "responses": {
  10120. "204": {
  10121. "description": "Workspace list synced"
  10122. },
  10123. "400": {
  10124. "description": "Bad request",
  10125. "content": {
  10126. "application/json": {
  10127. "schema": {
  10128. "$ref": "#/components/schemas/BadRequestError"
  10129. }
  10130. }
  10131. }
  10132. }
  10133. },
  10134. "description": "Register missing workspaces returned by workspace adapters.",
  10135. "summary": "Sync workspace list",
  10136. "x-codeSamples": [
  10137. {
  10138. "lang": "js",
  10139. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  10140. }
  10141. ]
  10142. }
  10143. },
  10144. "/experimental/workspace/status": {
  10145. "get": {
  10146. "tags": ["workspace"],
  10147. "operationId": "experimental.workspace.status",
  10148. "parameters": [
  10149. {
  10150. "name": "directory",
  10151. "in": "query",
  10152. "schema": {
  10153. "type": "string"
  10154. },
  10155. "required": false
  10156. },
  10157. {
  10158. "name": "workspace",
  10159. "in": "query",
  10160. "schema": {
  10161. "type": "string"
  10162. },
  10163. "required": false
  10164. }
  10165. ],
  10166. "responses": {
  10167. "200": {
  10168. "description": "Workspace status",
  10169. "content": {
  10170. "application/json": {
  10171. "schema": {
  10172. "type": "array",
  10173. "items": {
  10174. "type": "object",
  10175. "properties": {
  10176. "workspaceID": {
  10177. "type": "string",
  10178. "pattern": "^wrk"
  10179. },
  10180. "status": {
  10181. "type": "string",
  10182. "enum": ["connected", "connecting", "disconnected", "error"]
  10183. }
  10184. },
  10185. "required": ["workspaceID", "status"],
  10186. "additionalProperties": false
  10187. },
  10188. "description": "Workspace status"
  10189. }
  10190. }
  10191. }
  10192. },
  10193. "400": {
  10194. "description": "Bad request",
  10195. "content": {
  10196. "application/json": {
  10197. "schema": {
  10198. "$ref": "#/components/schemas/BadRequestError"
  10199. }
  10200. }
  10201. }
  10202. }
  10203. },
  10204. "description": "Get connection status for workspaces in the current project.",
  10205. "summary": "Workspace status",
  10206. "x-codeSamples": [
  10207. {
  10208. "lang": "js",
  10209. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  10210. }
  10211. ]
  10212. }
  10213. },
  10214. "/experimental/workspace/{id}": {
  10215. "delete": {
  10216. "tags": ["workspace"],
  10217. "operationId": "experimental.workspace.remove",
  10218. "parameters": [
  10219. {
  10220. "name": "id",
  10221. "in": "path",
  10222. "schema": {
  10223. "type": "string",
  10224. "pattern": "^wrk"
  10225. },
  10226. "required": true
  10227. },
  10228. {
  10229. "name": "directory",
  10230. "in": "query",
  10231. "schema": {
  10232. "type": "string"
  10233. },
  10234. "required": false
  10235. },
  10236. {
  10237. "name": "workspace",
  10238. "in": "query",
  10239. "schema": {
  10240. "type": "string"
  10241. },
  10242. "required": false
  10243. }
  10244. ],
  10245. "responses": {
  10246. "200": {
  10247. "description": "Workspace removed",
  10248. "content": {
  10249. "application/json": {
  10250. "schema": {
  10251. "$ref": "#/components/schemas/Workspace"
  10252. }
  10253. }
  10254. }
  10255. },
  10256. "400": {
  10257. "description": "BadRequest | InvalidRequestError",
  10258. "content": {
  10259. "application/json": {
  10260. "schema": {
  10261. "anyOf": [
  10262. {
  10263. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  10264. },
  10265. {
  10266. "$ref": "#/components/schemas/InvalidRequestError"
  10267. }
  10268. ]
  10269. }
  10270. }
  10271. }
  10272. }
  10273. },
  10274. "description": "Remove an existing workspace.",
  10275. "summary": "Remove workspace",
  10276. "x-codeSamples": [
  10277. {
  10278. "lang": "js",
  10279. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  10280. }
  10281. ]
  10282. }
  10283. },
  10284. "/experimental/workspace/warp": {
  10285. "post": {
  10286. "tags": ["workspace"],
  10287. "operationId": "experimental.workspace.warp",
  10288. "parameters": [
  10289. {
  10290. "name": "directory",
  10291. "in": "query",
  10292. "schema": {
  10293. "type": "string"
  10294. },
  10295. "required": false
  10296. },
  10297. {
  10298. "name": "workspace",
  10299. "in": "query",
  10300. "schema": {
  10301. "type": "string"
  10302. },
  10303. "required": false
  10304. }
  10305. ],
  10306. "responses": {
  10307. "204": {
  10308. "description": "Session warped"
  10309. },
  10310. "400": {
  10311. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  10312. "content": {
  10313. "application/json": {
  10314. "schema": {
  10315. "anyOf": [
  10316. {
  10317. "$ref": "#/components/schemas/WorkspaceWarpError"
  10318. },
  10319. {
  10320. "$ref": "#/components/schemas/VcsApplyError"
  10321. },
  10322. {
  10323. "$ref": "#/components/schemas/InvalidRequestError"
  10324. }
  10325. ]
  10326. }
  10327. }
  10328. }
  10329. }
  10330. },
  10331. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  10332. "summary": "Warp session into workspace",
  10333. "requestBody": {
  10334. "content": {
  10335. "application/json": {
  10336. "schema": {
  10337. "type": "object",
  10338. "properties": {
  10339. "id": {
  10340. "anyOf": [
  10341. {
  10342. "type": "string",
  10343. "pattern": "^wrk"
  10344. },
  10345. {
  10346. "type": "null"
  10347. }
  10348. ]
  10349. },
  10350. "sessionID": {
  10351. "type": "string",
  10352. "pattern": "^ses"
  10353. },
  10354. "copyChanges": {
  10355. "type": "boolean"
  10356. }
  10357. },
  10358. "required": ["id", "sessionID"],
  10359. "additionalProperties": false
  10360. }
  10361. }
  10362. }
  10363. },
  10364. "x-codeSamples": [
  10365. {
  10366. "lang": "js",
  10367. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  10368. }
  10369. ]
  10370. }
  10371. },
  10372. "/pty/{ptyID}/connect": {
  10373. "get": {
  10374. "tags": ["pty"],
  10375. "operationId": "pty.connect",
  10376. "parameters": [
  10377. {
  10378. "name": "ptyID",
  10379. "in": "path",
  10380. "schema": {
  10381. "type": "string",
  10382. "pattern": "^pty"
  10383. },
  10384. "required": true
  10385. },
  10386. {
  10387. "name": "directory",
  10388. "in": "query",
  10389. "schema": {
  10390. "type": "string"
  10391. },
  10392. "required": false
  10393. },
  10394. {
  10395. "name": "workspace",
  10396. "in": "query",
  10397. "schema": {
  10398. "type": "string"
  10399. },
  10400. "required": false
  10401. }
  10402. ],
  10403. "responses": {
  10404. "200": {
  10405. "description": "Connected session",
  10406. "content": {
  10407. "application/json": {
  10408. "schema": {
  10409. "type": "boolean",
  10410. "description": "Connected session"
  10411. }
  10412. }
  10413. }
  10414. },
  10415. "403": {
  10416. "description": "Forbidden",
  10417. "content": {
  10418. "application/json": {
  10419. "schema": {
  10420. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  10421. }
  10422. }
  10423. }
  10424. },
  10425. "404": {
  10426. "description": "Not found",
  10427. "content": {
  10428. "application/json": {
  10429. "schema": {
  10430. "$ref": "#/components/schemas/NotFoundError"
  10431. }
  10432. }
  10433. }
  10434. }
  10435. },
  10436. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  10437. "summary": "Connect to PTY session",
  10438. "x-codeSamples": [
  10439. {
  10440. "lang": "js",
  10441. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  10442. }
  10443. ]
  10444. }
  10445. }
  10446. },
  10447. "components": {
  10448. "schemas": {
  10449. "Event": {
  10450. "anyOf": [
  10451. {
  10452. "$ref": "#/components/schemas/Event.tui.prompt.append"
  10453. },
  10454. {
  10455. "$ref": "#/components/schemas/Event.tui.command.execute"
  10456. },
  10457. {
  10458. "$ref": "#/components/schemas/EventTuiToastShow1"
  10459. },
  10460. {
  10461. "$ref": "#/components/schemas/Event.tui.session.select"
  10462. },
  10463. {
  10464. "$ref": "#/components/schemas/EventServerConnected"
  10465. },
  10466. {
  10467. "$ref": "#/components/schemas/EventGlobalDisposed"
  10468. },
  10469. {
  10470. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  10471. },
  10472. {
  10473. "$ref": "#/components/schemas/EventFileEdited"
  10474. },
  10475. {
  10476. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  10477. },
  10478. {
  10479. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  10480. },
  10481. {
  10482. "$ref": "#/components/schemas/EventLspUpdated"
  10483. },
  10484. {
  10485. "$ref": "#/components/schemas/EventMessagePartDelta"
  10486. },
  10487. {
  10488. "$ref": "#/components/schemas/EventPermissionAsked"
  10489. },
  10490. {
  10491. "$ref": "#/components/schemas/EventPermissionReplied"
  10492. },
  10493. {
  10494. "$ref": "#/components/schemas/EventSessionDiff"
  10495. },
  10496. {
  10497. "$ref": "#/components/schemas/EventSessionError"
  10498. },
  10499. {
  10500. "$ref": "#/components/schemas/EventQuestionAsked"
  10501. },
  10502. {
  10503. "$ref": "#/components/schemas/EventQuestionReplied"
  10504. },
  10505. {
  10506. "$ref": "#/components/schemas/EventQuestionRejected"
  10507. },
  10508. {
  10509. "$ref": "#/components/schemas/EventTodoUpdated"
  10510. },
  10511. {
  10512. "$ref": "#/components/schemas/EventSessionStatus"
  10513. },
  10514. {
  10515. "$ref": "#/components/schemas/EventSessionIdle"
  10516. },
  10517. {
  10518. "$ref": "#/components/schemas/EventMcpToolsChanged"
  10519. },
  10520. {
  10521. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  10522. },
  10523. {
  10524. "$ref": "#/components/schemas/EventCommandExecuted"
  10525. },
  10526. {
  10527. "$ref": "#/components/schemas/EventProjectUpdated"
  10528. },
  10529. {
  10530. "$ref": "#/components/schemas/EventSessionCompacted"
  10531. },
  10532. {
  10533. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  10534. },
  10535. {
  10536. "$ref": "#/components/schemas/EventWorkspaceReady"
  10537. },
  10538. {
  10539. "$ref": "#/components/schemas/EventWorkspaceFailed"
  10540. },
  10541. {
  10542. "$ref": "#/components/schemas/EventWorkspaceStatus"
  10543. },
  10544. {
  10545. "$ref": "#/components/schemas/EventWorktreeReady"
  10546. },
  10547. {
  10548. "$ref": "#/components/schemas/EventWorktreeFailed"
  10549. },
  10550. {
  10551. "$ref": "#/components/schemas/EventPtyCreated"
  10552. },
  10553. {
  10554. "$ref": "#/components/schemas/EventPtyUpdated"
  10555. },
  10556. {
  10557. "$ref": "#/components/schemas/EventPtyExited"
  10558. },
  10559. {
  10560. "$ref": "#/components/schemas/EventPtyDeleted"
  10561. },
  10562. {
  10563. "$ref": "#/components/schemas/EventInstallationUpdated"
  10564. },
  10565. {
  10566. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  10567. },
  10568. {
  10569. "$ref": "#/components/schemas/EventMessageUpdated"
  10570. },
  10571. {
  10572. "$ref": "#/components/schemas/EventMessageRemoved"
  10573. },
  10574. {
  10575. "$ref": "#/components/schemas/EventMessagePartUpdated"
  10576. },
  10577. {
  10578. "$ref": "#/components/schemas/EventMessagePartRemoved"
  10579. },
  10580. {
  10581. "$ref": "#/components/schemas/EventSessionCreated"
  10582. },
  10583. {
  10584. "$ref": "#/components/schemas/EventSessionUpdated"
  10585. },
  10586. {
  10587. "$ref": "#/components/schemas/EventSessionDeleted"
  10588. },
  10589. {
  10590. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  10591. },
  10592. {
  10593. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  10594. },
  10595. {
  10596. "$ref": "#/components/schemas/EventSessionNextPrompted"
  10597. },
  10598. {
  10599. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  10600. },
  10601. {
  10602. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  10603. },
  10604. {
  10605. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  10606. },
  10607. {
  10608. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  10609. },
  10610. {
  10611. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  10612. },
  10613. {
  10614. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  10615. },
  10616. {
  10617. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  10618. },
  10619. {
  10620. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  10621. },
  10622. {
  10623. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  10624. },
  10625. {
  10626. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  10627. },
  10628. {
  10629. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  10630. },
  10631. {
  10632. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  10633. },
  10634. {
  10635. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  10636. },
  10637. {
  10638. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  10639. },
  10640. {
  10641. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  10642. },
  10643. {
  10644. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  10645. },
  10646. {
  10647. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  10648. },
  10649. {
  10650. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  10651. },
  10652. {
  10653. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  10654. },
  10655. {
  10656. "$ref": "#/components/schemas/EventSessionNextRetried"
  10657. },
  10658. {
  10659. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  10660. },
  10661. {
  10662. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  10663. },
  10664. {
  10665. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  10666. },
  10667. {
  10668. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  10669. },
  10670. {
  10671. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  10672. },
  10673. {
  10674. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  10675. },
  10676. {
  10677. "$ref": "#/components/schemas/EventSessionNextPrompted"
  10678. },
  10679. {
  10680. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  10681. },
  10682. {
  10683. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  10684. },
  10685. {
  10686. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  10687. },
  10688. {
  10689. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  10690. },
  10691. {
  10692. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  10693. },
  10694. {
  10695. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  10696. },
  10697. {
  10698. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  10699. },
  10700. {
  10701. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  10702. },
  10703. {
  10704. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  10705. },
  10706. {
  10707. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  10708. },
  10709. {
  10710. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  10711. },
  10712. {
  10713. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  10714. },
  10715. {
  10716. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  10717. },
  10718. {
  10719. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  10720. },
  10721. {
  10722. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  10723. },
  10724. {
  10725. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  10726. },
  10727. {
  10728. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  10729. },
  10730. {
  10731. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  10732. },
  10733. {
  10734. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  10735. },
  10736. {
  10737. "$ref": "#/components/schemas/EventSessionNextRetried"
  10738. },
  10739. {
  10740. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  10741. },
  10742. {
  10743. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  10744. },
  10745. {
  10746. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  10747. },
  10748. {
  10749. "$ref": "#/components/schemas/EventModels-devRefreshed"
  10750. },
  10751. {
  10752. "$ref": "#/components/schemas/EventAccountAdded"
  10753. },
  10754. {
  10755. "$ref": "#/components/schemas/EventAccountRemoved"
  10756. },
  10757. {
  10758. "$ref": "#/components/schemas/EventAccountSwitched"
  10759. }
  10760. ]
  10761. },
  10762. "OAuth": {
  10763. "type": "object",
  10764. "properties": {
  10765. "type": {
  10766. "type": "string",
  10767. "enum": ["oauth"]
  10768. },
  10769. "refresh": {
  10770. "type": "string"
  10771. },
  10772. "access": {
  10773. "type": "string"
  10774. },
  10775. "expires": {
  10776. "type": "integer",
  10777. "minimum": 0
  10778. },
  10779. "accountId": {
  10780. "type": "string"
  10781. },
  10782. "enterpriseUrl": {
  10783. "type": "string"
  10784. }
  10785. },
  10786. "required": ["type", "refresh", "access", "expires"],
  10787. "additionalProperties": false
  10788. },
  10789. "ApiAuth": {
  10790. "type": "object",
  10791. "properties": {
  10792. "type": {
  10793. "type": "string",
  10794. "enum": ["api"]
  10795. },
  10796. "key": {
  10797. "type": "string"
  10798. },
  10799. "metadata": {
  10800. "type": "object",
  10801. "additionalProperties": {
  10802. "type": "string"
  10803. }
  10804. }
  10805. },
  10806. "required": ["type", "key"],
  10807. "additionalProperties": false
  10808. },
  10809. "WellKnownAuth": {
  10810. "type": "object",
  10811. "properties": {
  10812. "type": {
  10813. "type": "string",
  10814. "enum": ["wellknown"]
  10815. },
  10816. "key": {
  10817. "type": "string"
  10818. },
  10819. "token": {
  10820. "type": "string"
  10821. }
  10822. },
  10823. "required": ["type", "key", "token"],
  10824. "additionalProperties": false
  10825. },
  10826. "Auth": {
  10827. "anyOf": [
  10828. {
  10829. "$ref": "#/components/schemas/OAuth"
  10830. },
  10831. {
  10832. "$ref": "#/components/schemas/ApiAuth"
  10833. },
  10834. {
  10835. "$ref": "#/components/schemas/WellKnownAuth"
  10836. }
  10837. ]
  10838. },
  10839. "effect_HttpApiError_BadRequest": {
  10840. "type": "object",
  10841. "properties": {
  10842. "_tag": {
  10843. "type": "string",
  10844. "enum": ["BadRequest"]
  10845. }
  10846. },
  10847. "required": ["_tag"],
  10848. "additionalProperties": false
  10849. },
  10850. "InvalidRequestError": {
  10851. "type": "object",
  10852. "properties": {
  10853. "_tag": {
  10854. "type": "string",
  10855. "enum": ["InvalidRequestError"]
  10856. },
  10857. "message": {
  10858. "type": "string"
  10859. },
  10860. "kind": {
  10861. "type": "string"
  10862. },
  10863. "field": {
  10864. "type": "string"
  10865. }
  10866. },
  10867. "required": ["_tag", "message"],
  10868. "additionalProperties": false
  10869. },
  10870. "Event.tui.prompt.append": {
  10871. "type": "object",
  10872. "properties": {
  10873. "id": {
  10874. "type": "string"
  10875. },
  10876. "type": {
  10877. "type": "string",
  10878. "enum": ["tui.prompt.append"]
  10879. },
  10880. "properties": {
  10881. "type": "object",
  10882. "properties": {
  10883. "text": {
  10884. "type": "string"
  10885. }
  10886. },
  10887. "required": ["text"],
  10888. "additionalProperties": false
  10889. }
  10890. },
  10891. "required": ["id", "type", "properties"],
  10892. "additionalProperties": false
  10893. },
  10894. "Event.tui.command.execute": {
  10895. "type": "object",
  10896. "properties": {
  10897. "id": {
  10898. "type": "string"
  10899. },
  10900. "type": {
  10901. "type": "string",
  10902. "enum": ["tui.command.execute"]
  10903. },
  10904. "properties": {
  10905. "type": "object",
  10906. "properties": {
  10907. "command": {
  10908. "anyOf": [
  10909. {
  10910. "type": "string",
  10911. "enum": [
  10912. "session.list",
  10913. "session.new",
  10914. "session.share",
  10915. "session.interrupt",
  10916. "session.compact",
  10917. "session.page.up",
  10918. "session.page.down",
  10919. "session.line.up",
  10920. "session.line.down",
  10921. "session.half.page.up",
  10922. "session.half.page.down",
  10923. "session.first",
  10924. "session.last",
  10925. "prompt.clear",
  10926. "prompt.submit",
  10927. "agent.cycle"
  10928. ]
  10929. },
  10930. {
  10931. "type": "string"
  10932. }
  10933. ]
  10934. }
  10935. },
  10936. "required": ["command"],
  10937. "additionalProperties": false
  10938. }
  10939. },
  10940. "required": ["id", "type", "properties"],
  10941. "additionalProperties": false
  10942. },
  10943. "Event.tui.toast.show": {
  10944. "type": "object",
  10945. "properties": {
  10946. "id": {
  10947. "type": "string"
  10948. },
  10949. "type": {
  10950. "type": "string",
  10951. "enum": ["tui.toast.show"]
  10952. },
  10953. "properties": {
  10954. "type": "object",
  10955. "properties": {
  10956. "title": {
  10957. "type": "string"
  10958. },
  10959. "message": {
  10960. "type": "string"
  10961. },
  10962. "variant": {
  10963. "type": "string",
  10964. "enum": ["info", "success", "warning", "error"]
  10965. },
  10966. "duration": {
  10967. "type": "integer",
  10968. "exclusiveMinimum": 0
  10969. }
  10970. },
  10971. "required": ["message", "variant"],
  10972. "additionalProperties": false
  10973. }
  10974. },
  10975. "required": ["id", "type", "properties"],
  10976. "additionalProperties": false
  10977. },
  10978. "Event.tui.session.select": {
  10979. "type": "object",
  10980. "properties": {
  10981. "id": {
  10982. "type": "string"
  10983. },
  10984. "type": {
  10985. "type": "string",
  10986. "enum": ["tui.session.select"]
  10987. },
  10988. "properties": {
  10989. "type": "object",
  10990. "properties": {
  10991. "sessionID": {
  10992. "type": "string",
  10993. "pattern": "^ses",
  10994. "description": "Session ID to navigate to"
  10995. }
  10996. },
  10997. "required": ["sessionID"],
  10998. "additionalProperties": false
  10999. }
  11000. },
  11001. "required": ["id", "type", "properties"],
  11002. "additionalProperties": false
  11003. },
  11004. "PermissionRequest": {
  11005. "type": "object",
  11006. "properties": {
  11007. "id": {
  11008. "type": "string",
  11009. "pattern": "^per"
  11010. },
  11011. "sessionID": {
  11012. "type": "string",
  11013. "pattern": "^ses"
  11014. },
  11015. "permission": {
  11016. "type": "string"
  11017. },
  11018. "patterns": {
  11019. "type": "array",
  11020. "items": {
  11021. "type": "string"
  11022. }
  11023. },
  11024. "metadata": {
  11025. "type": "object"
  11026. },
  11027. "always": {
  11028. "type": "array",
  11029. "items": {
  11030. "type": "string"
  11031. }
  11032. },
  11033. "tool": {
  11034. "type": "object",
  11035. "properties": {
  11036. "messageID": {
  11037. "type": "string",
  11038. "pattern": "^msg"
  11039. },
  11040. "callID": {
  11041. "type": "string"
  11042. }
  11043. },
  11044. "required": ["messageID", "callID"],
  11045. "additionalProperties": false
  11046. }
  11047. },
  11048. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  11049. "additionalProperties": false
  11050. },
  11051. "SnapshotFileDiff": {
  11052. "type": "object",
  11053. "properties": {
  11054. "file": {
  11055. "type": "string"
  11056. },
  11057. "patch": {
  11058. "type": "string"
  11059. },
  11060. "additions": {
  11061. "type": "number"
  11062. },
  11063. "deletions": {
  11064. "type": "number"
  11065. },
  11066. "status": {
  11067. "type": "string",
  11068. "enum": ["added", "deleted", "modified"]
  11069. }
  11070. },
  11071. "required": ["additions", "deletions"],
  11072. "additionalProperties": false
  11073. },
  11074. "ProviderAuthError": {
  11075. "type": "object",
  11076. "properties": {
  11077. "name": {
  11078. "type": "string",
  11079. "enum": ["ProviderAuthError"]
  11080. },
  11081. "data": {
  11082. "type": "object",
  11083. "properties": {
  11084. "providerID": {
  11085. "type": "string"
  11086. },
  11087. "message": {
  11088. "type": "string"
  11089. }
  11090. },
  11091. "required": ["providerID", "message"],
  11092. "additionalProperties": false
  11093. }
  11094. },
  11095. "required": ["name", "data"],
  11096. "additionalProperties": false
  11097. },
  11098. "UnknownError": {
  11099. "type": "object",
  11100. "properties": {
  11101. "name": {
  11102. "type": "string",
  11103. "enum": ["UnknownError"]
  11104. },
  11105. "data": {
  11106. "type": "object",
  11107. "properties": {
  11108. "message": {
  11109. "type": "string"
  11110. },
  11111. "ref": {
  11112. "type": "string"
  11113. }
  11114. },
  11115. "required": ["message"],
  11116. "additionalProperties": false
  11117. }
  11118. },
  11119. "required": ["name", "data"],
  11120. "additionalProperties": false
  11121. },
  11122. "MessageOutputLengthError": {
  11123. "type": "object",
  11124. "properties": {
  11125. "name": {
  11126. "type": "string",
  11127. "enum": ["MessageOutputLengthError"]
  11128. },
  11129. "data": {
  11130. "type": "object",
  11131. "properties": {}
  11132. }
  11133. },
  11134. "required": ["name", "data"],
  11135. "additionalProperties": false
  11136. },
  11137. "MessageAbortedError": {
  11138. "type": "object",
  11139. "properties": {
  11140. "name": {
  11141. "type": "string",
  11142. "enum": ["MessageAbortedError"]
  11143. },
  11144. "data": {
  11145. "type": "object",
  11146. "properties": {
  11147. "message": {
  11148. "type": "string"
  11149. }
  11150. },
  11151. "required": ["message"],
  11152. "additionalProperties": false
  11153. }
  11154. },
  11155. "required": ["name", "data"],
  11156. "additionalProperties": false
  11157. },
  11158. "StructuredOutputError": {
  11159. "type": "object",
  11160. "properties": {
  11161. "name": {
  11162. "type": "string",
  11163. "enum": ["StructuredOutputError"]
  11164. },
  11165. "data": {
  11166. "type": "object",
  11167. "properties": {
  11168. "message": {
  11169. "type": "string"
  11170. },
  11171. "retries": {
  11172. "type": "integer",
  11173. "minimum": 0
  11174. }
  11175. },
  11176. "required": ["message", "retries"],
  11177. "additionalProperties": false
  11178. }
  11179. },
  11180. "required": ["name", "data"],
  11181. "additionalProperties": false
  11182. },
  11183. "ContextOverflowError": {
  11184. "type": "object",
  11185. "properties": {
  11186. "name": {
  11187. "type": "string",
  11188. "enum": ["ContextOverflowError"]
  11189. },
  11190. "data": {
  11191. "type": "object",
  11192. "properties": {
  11193. "message": {
  11194. "type": "string"
  11195. },
  11196. "responseBody": {
  11197. "type": "string"
  11198. }
  11199. },
  11200. "required": ["message"],
  11201. "additionalProperties": false
  11202. }
  11203. },
  11204. "required": ["name", "data"],
  11205. "additionalProperties": false
  11206. },
  11207. "APIError": {
  11208. "type": "object",
  11209. "properties": {
  11210. "name": {
  11211. "type": "string",
  11212. "enum": ["APIError"]
  11213. },
  11214. "data": {
  11215. "type": "object",
  11216. "properties": {
  11217. "message": {
  11218. "type": "string"
  11219. },
  11220. "statusCode": {
  11221. "type": "integer",
  11222. "minimum": 0
  11223. },
  11224. "isRetryable": {
  11225. "type": "boolean"
  11226. },
  11227. "responseHeaders": {
  11228. "type": "object",
  11229. "additionalProperties": {
  11230. "type": "string"
  11231. }
  11232. },
  11233. "responseBody": {
  11234. "type": "string"
  11235. },
  11236. "metadata": {
  11237. "type": "object",
  11238. "additionalProperties": {
  11239. "type": "string"
  11240. }
  11241. }
  11242. },
  11243. "required": ["message", "isRetryable"],
  11244. "additionalProperties": false
  11245. }
  11246. },
  11247. "required": ["name", "data"],
  11248. "additionalProperties": false
  11249. },
  11250. "QuestionOption": {
  11251. "type": "object",
  11252. "properties": {
  11253. "label": {
  11254. "type": "string",
  11255. "description": "Display text (1-5 words, concise)"
  11256. },
  11257. "description": {
  11258. "type": "string",
  11259. "description": "Explanation of choice"
  11260. }
  11261. },
  11262. "required": ["label", "description"],
  11263. "additionalProperties": false
  11264. },
  11265. "QuestionInfo": {
  11266. "type": "object",
  11267. "properties": {
  11268. "question": {
  11269. "type": "string",
  11270. "description": "Complete question"
  11271. },
  11272. "header": {
  11273. "type": "string",
  11274. "description": "Very short label (max 30 chars)"
  11275. },
  11276. "options": {
  11277. "type": "array",
  11278. "items": {
  11279. "$ref": "#/components/schemas/QuestionOption"
  11280. },
  11281. "description": "Available choices"
  11282. },
  11283. "multiple": {
  11284. "type": "boolean"
  11285. },
  11286. "custom": {
  11287. "type": "boolean"
  11288. }
  11289. },
  11290. "required": ["question", "header", "options"],
  11291. "additionalProperties": false
  11292. },
  11293. "QuestionTool": {
  11294. "type": "object",
  11295. "properties": {
  11296. "messageID": {
  11297. "type": "string",
  11298. "pattern": "^msg"
  11299. },
  11300. "callID": {
  11301. "type": "string"
  11302. }
  11303. },
  11304. "required": ["messageID", "callID"],
  11305. "additionalProperties": false
  11306. },
  11307. "QuestionRequest": {
  11308. "type": "object",
  11309. "properties": {
  11310. "id": {
  11311. "type": "string",
  11312. "pattern": "^que"
  11313. },
  11314. "sessionID": {
  11315. "type": "string",
  11316. "pattern": "^ses"
  11317. },
  11318. "questions": {
  11319. "type": "array",
  11320. "items": {
  11321. "$ref": "#/components/schemas/QuestionInfo"
  11322. },
  11323. "description": "Questions to ask"
  11324. },
  11325. "tool": {
  11326. "$ref": "#/components/schemas/QuestionTool"
  11327. }
  11328. },
  11329. "required": ["id", "sessionID", "questions"],
  11330. "additionalProperties": false
  11331. },
  11332. "QuestionAnswer": {
  11333. "type": "array",
  11334. "items": {
  11335. "type": "string"
  11336. }
  11337. },
  11338. "QuestionReplied": {
  11339. "type": "object",
  11340. "properties": {
  11341. "sessionID": {
  11342. "type": "string",
  11343. "pattern": "^ses"
  11344. },
  11345. "requestID": {
  11346. "type": "string",
  11347. "pattern": "^que"
  11348. },
  11349. "answers": {
  11350. "type": "array",
  11351. "items": {
  11352. "$ref": "#/components/schemas/QuestionAnswer"
  11353. }
  11354. }
  11355. },
  11356. "required": ["sessionID", "requestID", "answers"],
  11357. "additionalProperties": false
  11358. },
  11359. "QuestionRejected": {
  11360. "type": "object",
  11361. "properties": {
  11362. "sessionID": {
  11363. "type": "string",
  11364. "pattern": "^ses"
  11365. },
  11366. "requestID": {
  11367. "type": "string",
  11368. "pattern": "^que"
  11369. }
  11370. },
  11371. "required": ["sessionID", "requestID"],
  11372. "additionalProperties": false
  11373. },
  11374. "Todo": {
  11375. "type": "object",
  11376. "properties": {
  11377. "content": {
  11378. "type": "string",
  11379. "description": "Brief description of the task"
  11380. },
  11381. "status": {
  11382. "type": "string",
  11383. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  11384. },
  11385. "priority": {
  11386. "type": "string",
  11387. "description": "Priority level of the task: high, medium, low"
  11388. }
  11389. },
  11390. "required": ["content", "status", "priority"],
  11391. "additionalProperties": false
  11392. },
  11393. "SessionStatus": {
  11394. "anyOf": [
  11395. {
  11396. "type": "object",
  11397. "properties": {
  11398. "type": {
  11399. "type": "string",
  11400. "enum": ["idle"]
  11401. }
  11402. },
  11403. "required": ["type"],
  11404. "additionalProperties": false
  11405. },
  11406. {
  11407. "type": "object",
  11408. "properties": {
  11409. "type": {
  11410. "type": "string",
  11411. "enum": ["retry"]
  11412. },
  11413. "attempt": {
  11414. "type": "integer",
  11415. "minimum": 0
  11416. },
  11417. "message": {
  11418. "type": "string"
  11419. },
  11420. "action": {
  11421. "type": "object",
  11422. "properties": {
  11423. "reason": {
  11424. "type": "string"
  11425. },
  11426. "provider": {
  11427. "type": "string"
  11428. },
  11429. "title": {
  11430. "type": "string"
  11431. },
  11432. "message": {
  11433. "type": "string"
  11434. },
  11435. "label": {
  11436. "type": "string"
  11437. },
  11438. "link": {
  11439. "type": "string"
  11440. }
  11441. },
  11442. "required": ["reason", "provider", "title", "message", "label"],
  11443. "additionalProperties": false
  11444. },
  11445. "next": {
  11446. "type": "integer",
  11447. "minimum": 0
  11448. }
  11449. },
  11450. "required": ["type", "attempt", "message", "next"],
  11451. "additionalProperties": false
  11452. },
  11453. {
  11454. "type": "object",
  11455. "properties": {
  11456. "type": {
  11457. "type": "string",
  11458. "enum": ["busy"]
  11459. }
  11460. },
  11461. "required": ["type"],
  11462. "additionalProperties": false
  11463. }
  11464. ]
  11465. },
  11466. "Project": {
  11467. "type": "object",
  11468. "properties": {
  11469. "id": {
  11470. "type": "string"
  11471. },
  11472. "worktree": {
  11473. "type": "string"
  11474. },
  11475. "vcs": {
  11476. "type": "string",
  11477. "enum": ["git"]
  11478. },
  11479. "name": {
  11480. "type": "string"
  11481. },
  11482. "icon": {
  11483. "type": "object",
  11484. "properties": {
  11485. "url": {
  11486. "type": "string"
  11487. },
  11488. "override": {
  11489. "type": "string"
  11490. },
  11491. "color": {
  11492. "type": "string"
  11493. }
  11494. },
  11495. "additionalProperties": false
  11496. },
  11497. "commands": {
  11498. "type": "object",
  11499. "properties": {
  11500. "start": {
  11501. "type": "string",
  11502. "description": "Startup script to run when creating a new workspace (worktree)"
  11503. }
  11504. },
  11505. "additionalProperties": false
  11506. },
  11507. "time": {
  11508. "type": "object",
  11509. "properties": {
  11510. "created": {
  11511. "type": "integer",
  11512. "minimum": 0
  11513. },
  11514. "updated": {
  11515. "type": "integer",
  11516. "minimum": 0
  11517. },
  11518. "initialized": {
  11519. "type": "integer",
  11520. "minimum": 0
  11521. }
  11522. },
  11523. "required": ["created", "updated"],
  11524. "additionalProperties": false
  11525. },
  11526. "sandboxes": {
  11527. "type": "array",
  11528. "items": {
  11529. "type": "string"
  11530. }
  11531. }
  11532. },
  11533. "required": ["id", "worktree", "time", "sandboxes"],
  11534. "additionalProperties": false
  11535. },
  11536. "Pty": {
  11537. "type": "object",
  11538. "properties": {
  11539. "id": {
  11540. "type": "string",
  11541. "pattern": "^pty"
  11542. },
  11543. "title": {
  11544. "type": "string"
  11545. },
  11546. "command": {
  11547. "type": "string"
  11548. },
  11549. "args": {
  11550. "type": "array",
  11551. "items": {
  11552. "type": "string"
  11553. }
  11554. },
  11555. "cwd": {
  11556. "type": "string"
  11557. },
  11558. "status": {
  11559. "type": "string",
  11560. "enum": ["running", "exited"]
  11561. },
  11562. "pid": {
  11563. "type": "integer",
  11564. "exclusiveMinimum": 0
  11565. }
  11566. },
  11567. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  11568. "additionalProperties": false
  11569. },
  11570. "OutputFormatText": {
  11571. "type": "object",
  11572. "properties": {
  11573. "type": {
  11574. "type": "string",
  11575. "enum": ["text"]
  11576. }
  11577. },
  11578. "required": ["type"],
  11579. "additionalProperties": false
  11580. },
  11581. "JSONSchema": {
  11582. "type": "object"
  11583. },
  11584. "OutputFormatJsonSchema": {
  11585. "type": "object",
  11586. "properties": {
  11587. "type": {
  11588. "type": "string",
  11589. "enum": ["json_schema"]
  11590. },
  11591. "schema": {
  11592. "$ref": "#/components/schemas/JSONSchema"
  11593. },
  11594. "retryCount": {
  11595. "type": "integer",
  11596. "minimum": 0
  11597. }
  11598. },
  11599. "required": ["type", "schema"],
  11600. "additionalProperties": false
  11601. },
  11602. "OutputFormat": {
  11603. "anyOf": [
  11604. {
  11605. "$ref": "#/components/schemas/OutputFormatText"
  11606. },
  11607. {
  11608. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  11609. }
  11610. ]
  11611. },
  11612. "UserMessage": {
  11613. "type": "object",
  11614. "properties": {
  11615. "id": {
  11616. "type": "string",
  11617. "pattern": "^msg"
  11618. },
  11619. "sessionID": {
  11620. "type": "string",
  11621. "pattern": "^ses"
  11622. },
  11623. "role": {
  11624. "type": "string",
  11625. "enum": ["user"]
  11626. },
  11627. "time": {
  11628. "type": "object",
  11629. "properties": {
  11630. "created": {
  11631. "type": "integer",
  11632. "minimum": 0
  11633. }
  11634. },
  11635. "required": ["created"],
  11636. "additionalProperties": false
  11637. },
  11638. "format": {
  11639. "$ref": "#/components/schemas/OutputFormat"
  11640. },
  11641. "summary": {
  11642. "type": "object",
  11643. "properties": {
  11644. "title": {
  11645. "type": "string"
  11646. },
  11647. "body": {
  11648. "type": "string"
  11649. },
  11650. "diffs": {
  11651. "type": "array",
  11652. "items": {
  11653. "$ref": "#/components/schemas/SnapshotFileDiff"
  11654. }
  11655. }
  11656. },
  11657. "required": ["diffs"],
  11658. "additionalProperties": false
  11659. },
  11660. "agent": {
  11661. "type": "string"
  11662. },
  11663. "model": {
  11664. "type": "object",
  11665. "properties": {
  11666. "providerID": {
  11667. "type": "string"
  11668. },
  11669. "modelID": {
  11670. "type": "string"
  11671. },
  11672. "variant": {
  11673. "type": "string"
  11674. }
  11675. },
  11676. "required": ["providerID", "modelID"],
  11677. "additionalProperties": false
  11678. },
  11679. "system": {
  11680. "type": "string"
  11681. },
  11682. "tools": {
  11683. "type": "object",
  11684. "additionalProperties": {
  11685. "type": "boolean"
  11686. }
  11687. }
  11688. },
  11689. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  11690. "additionalProperties": false
  11691. },
  11692. "AssistantMessage": {
  11693. "type": "object",
  11694. "properties": {
  11695. "id": {
  11696. "type": "string",
  11697. "pattern": "^msg"
  11698. },
  11699. "sessionID": {
  11700. "type": "string",
  11701. "pattern": "^ses"
  11702. },
  11703. "role": {
  11704. "type": "string",
  11705. "enum": ["assistant"]
  11706. },
  11707. "time": {
  11708. "type": "object",
  11709. "properties": {
  11710. "created": {
  11711. "type": "integer",
  11712. "minimum": 0
  11713. },
  11714. "completed": {
  11715. "type": "integer",
  11716. "minimum": 0
  11717. }
  11718. },
  11719. "required": ["created"],
  11720. "additionalProperties": false
  11721. },
  11722. "error": {
  11723. "anyOf": [
  11724. {
  11725. "$ref": "#/components/schemas/ProviderAuthError"
  11726. },
  11727. {
  11728. "$ref": "#/components/schemas/UnknownError"
  11729. },
  11730. {
  11731. "$ref": "#/components/schemas/MessageOutputLengthError"
  11732. },
  11733. {
  11734. "$ref": "#/components/schemas/MessageAbortedError"
  11735. },
  11736. {
  11737. "$ref": "#/components/schemas/StructuredOutputError"
  11738. },
  11739. {
  11740. "$ref": "#/components/schemas/ContextOverflowError"
  11741. },
  11742. {
  11743. "$ref": "#/components/schemas/APIError"
  11744. }
  11745. ]
  11746. },
  11747. "parentID": {
  11748. "type": "string",
  11749. "pattern": "^msg"
  11750. },
  11751. "modelID": {
  11752. "type": "string"
  11753. },
  11754. "providerID": {
  11755. "type": "string"
  11756. },
  11757. "mode": {
  11758. "type": "string"
  11759. },
  11760. "agent": {
  11761. "type": "string"
  11762. },
  11763. "path": {
  11764. "type": "object",
  11765. "properties": {
  11766. "cwd": {
  11767. "type": "string"
  11768. },
  11769. "root": {
  11770. "type": "string"
  11771. }
  11772. },
  11773. "required": ["cwd", "root"],
  11774. "additionalProperties": false
  11775. },
  11776. "summary": {
  11777. "type": "boolean"
  11778. },
  11779. "cost": {
  11780. "type": "number"
  11781. },
  11782. "tokens": {
  11783. "type": "object",
  11784. "properties": {
  11785. "total": {
  11786. "type": "number"
  11787. },
  11788. "input": {
  11789. "type": "number"
  11790. },
  11791. "output": {
  11792. "type": "number"
  11793. },
  11794. "reasoning": {
  11795. "type": "number"
  11796. },
  11797. "cache": {
  11798. "type": "object",
  11799. "properties": {
  11800. "read": {
  11801. "type": "number"
  11802. },
  11803. "write": {
  11804. "type": "number"
  11805. }
  11806. },
  11807. "required": ["read", "write"],
  11808. "additionalProperties": false
  11809. }
  11810. },
  11811. "required": ["input", "output", "reasoning", "cache"],
  11812. "additionalProperties": false
  11813. },
  11814. "structured": {},
  11815. "variant": {
  11816. "type": "string"
  11817. },
  11818. "finish": {
  11819. "type": "string"
  11820. }
  11821. },
  11822. "required": [
  11823. "id",
  11824. "sessionID",
  11825. "role",
  11826. "time",
  11827. "parentID",
  11828. "modelID",
  11829. "providerID",
  11830. "mode",
  11831. "agent",
  11832. "path",
  11833. "cost",
  11834. "tokens"
  11835. ],
  11836. "additionalProperties": false
  11837. },
  11838. "Message": {
  11839. "anyOf": [
  11840. {
  11841. "$ref": "#/components/schemas/UserMessage"
  11842. },
  11843. {
  11844. "$ref": "#/components/schemas/AssistantMessage"
  11845. }
  11846. ]
  11847. },
  11848. "TextPart": {
  11849. "type": "object",
  11850. "properties": {
  11851. "id": {
  11852. "type": "string",
  11853. "pattern": "^prt"
  11854. },
  11855. "sessionID": {
  11856. "type": "string",
  11857. "pattern": "^ses"
  11858. },
  11859. "messageID": {
  11860. "type": "string",
  11861. "pattern": "^msg"
  11862. },
  11863. "type": {
  11864. "type": "string",
  11865. "enum": ["text"]
  11866. },
  11867. "text": {
  11868. "type": "string"
  11869. },
  11870. "synthetic": {
  11871. "type": "boolean"
  11872. },
  11873. "ignored": {
  11874. "type": "boolean"
  11875. },
  11876. "time": {
  11877. "type": "object",
  11878. "properties": {
  11879. "start": {
  11880. "type": "integer",
  11881. "minimum": 0
  11882. },
  11883. "end": {
  11884. "type": "integer",
  11885. "minimum": 0
  11886. }
  11887. },
  11888. "required": ["start"],
  11889. "additionalProperties": false
  11890. },
  11891. "metadata": {
  11892. "type": "object"
  11893. }
  11894. },
  11895. "required": ["id", "sessionID", "messageID", "type", "text"],
  11896. "additionalProperties": false
  11897. },
  11898. "SubtaskPart": {
  11899. "type": "object",
  11900. "properties": {
  11901. "id": {
  11902. "type": "string",
  11903. "pattern": "^prt"
  11904. },
  11905. "sessionID": {
  11906. "type": "string",
  11907. "pattern": "^ses"
  11908. },
  11909. "messageID": {
  11910. "type": "string",
  11911. "pattern": "^msg"
  11912. },
  11913. "type": {
  11914. "type": "string",
  11915. "enum": ["subtask"]
  11916. },
  11917. "prompt": {
  11918. "type": "string"
  11919. },
  11920. "description": {
  11921. "type": "string"
  11922. },
  11923. "agent": {
  11924. "type": "string"
  11925. },
  11926. "model": {
  11927. "type": "object",
  11928. "properties": {
  11929. "providerID": {
  11930. "type": "string"
  11931. },
  11932. "modelID": {
  11933. "type": "string"
  11934. }
  11935. },
  11936. "required": ["providerID", "modelID"],
  11937. "additionalProperties": false
  11938. },
  11939. "command": {
  11940. "type": "string"
  11941. }
  11942. },
  11943. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  11944. "additionalProperties": false
  11945. },
  11946. "ReasoningPart": {
  11947. "type": "object",
  11948. "properties": {
  11949. "id": {
  11950. "type": "string",
  11951. "pattern": "^prt"
  11952. },
  11953. "sessionID": {
  11954. "type": "string",
  11955. "pattern": "^ses"
  11956. },
  11957. "messageID": {
  11958. "type": "string",
  11959. "pattern": "^msg"
  11960. },
  11961. "type": {
  11962. "type": "string",
  11963. "enum": ["reasoning"]
  11964. },
  11965. "text": {
  11966. "type": "string"
  11967. },
  11968. "metadata": {
  11969. "type": "object"
  11970. },
  11971. "time": {
  11972. "type": "object",
  11973. "properties": {
  11974. "start": {
  11975. "type": "integer",
  11976. "minimum": 0
  11977. },
  11978. "end": {
  11979. "type": "integer",
  11980. "minimum": 0
  11981. }
  11982. },
  11983. "required": ["start"],
  11984. "additionalProperties": false
  11985. }
  11986. },
  11987. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  11988. "additionalProperties": false
  11989. },
  11990. "FilePartSourceText": {
  11991. "type": "object",
  11992. "properties": {
  11993. "value": {
  11994. "type": "string"
  11995. },
  11996. "start": {
  11997. "type": "number"
  11998. },
  11999. "end": {
  12000. "type": "number"
  12001. }
  12002. },
  12003. "required": ["value", "start", "end"],
  12004. "additionalProperties": false
  12005. },
  12006. "FileSource": {
  12007. "type": "object",
  12008. "properties": {
  12009. "text": {
  12010. "$ref": "#/components/schemas/FilePartSourceText"
  12011. },
  12012. "type": {
  12013. "type": "string",
  12014. "enum": ["file"]
  12015. },
  12016. "path": {
  12017. "type": "string"
  12018. }
  12019. },
  12020. "required": ["text", "type", "path"],
  12021. "additionalProperties": false
  12022. },
  12023. "Range": {
  12024. "type": "object",
  12025. "properties": {
  12026. "start": {
  12027. "type": "object",
  12028. "properties": {
  12029. "line": {
  12030. "type": "integer",
  12031. "minimum": 0
  12032. },
  12033. "character": {
  12034. "type": "integer",
  12035. "minimum": 0
  12036. }
  12037. },
  12038. "required": ["line", "character"],
  12039. "additionalProperties": false
  12040. },
  12041. "end": {
  12042. "type": "object",
  12043. "properties": {
  12044. "line": {
  12045. "type": "integer",
  12046. "minimum": 0
  12047. },
  12048. "character": {
  12049. "type": "integer",
  12050. "minimum": 0
  12051. }
  12052. },
  12053. "required": ["line", "character"],
  12054. "additionalProperties": false
  12055. }
  12056. },
  12057. "required": ["start", "end"],
  12058. "additionalProperties": false
  12059. },
  12060. "SymbolSource": {
  12061. "type": "object",
  12062. "properties": {
  12063. "text": {
  12064. "$ref": "#/components/schemas/FilePartSourceText"
  12065. },
  12066. "type": {
  12067. "type": "string",
  12068. "enum": ["symbol"]
  12069. },
  12070. "path": {
  12071. "type": "string"
  12072. },
  12073. "range": {
  12074. "$ref": "#/components/schemas/Range"
  12075. },
  12076. "name": {
  12077. "type": "string"
  12078. },
  12079. "kind": {
  12080. "type": "integer",
  12081. "minimum": 0
  12082. }
  12083. },
  12084. "required": ["text", "type", "path", "range", "name", "kind"],
  12085. "additionalProperties": false
  12086. },
  12087. "ResourceSource": {
  12088. "type": "object",
  12089. "properties": {
  12090. "text": {
  12091. "$ref": "#/components/schemas/FilePartSourceText"
  12092. },
  12093. "type": {
  12094. "type": "string",
  12095. "enum": ["resource"]
  12096. },
  12097. "clientName": {
  12098. "type": "string"
  12099. },
  12100. "uri": {
  12101. "type": "string"
  12102. }
  12103. },
  12104. "required": ["text", "type", "clientName", "uri"],
  12105. "additionalProperties": false
  12106. },
  12107. "FilePartSource": {
  12108. "anyOf": [
  12109. {
  12110. "$ref": "#/components/schemas/FileSource"
  12111. },
  12112. {
  12113. "$ref": "#/components/schemas/SymbolSource"
  12114. },
  12115. {
  12116. "$ref": "#/components/schemas/ResourceSource"
  12117. }
  12118. ]
  12119. },
  12120. "FilePart": {
  12121. "type": "object",
  12122. "properties": {
  12123. "id": {
  12124. "type": "string",
  12125. "pattern": "^prt"
  12126. },
  12127. "sessionID": {
  12128. "type": "string",
  12129. "pattern": "^ses"
  12130. },
  12131. "messageID": {
  12132. "type": "string",
  12133. "pattern": "^msg"
  12134. },
  12135. "type": {
  12136. "type": "string",
  12137. "enum": ["file"]
  12138. },
  12139. "mime": {
  12140. "type": "string"
  12141. },
  12142. "filename": {
  12143. "type": "string"
  12144. },
  12145. "url": {
  12146. "type": "string"
  12147. },
  12148. "source": {
  12149. "$ref": "#/components/schemas/FilePartSource"
  12150. }
  12151. },
  12152. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  12153. "additionalProperties": false
  12154. },
  12155. "ToolStatePending": {
  12156. "type": "object",
  12157. "properties": {
  12158. "status": {
  12159. "type": "string",
  12160. "enum": ["pending"]
  12161. },
  12162. "input": {
  12163. "type": "object"
  12164. },
  12165. "raw": {
  12166. "type": "string"
  12167. }
  12168. },
  12169. "required": ["status", "input", "raw"],
  12170. "additionalProperties": false
  12171. },
  12172. "ToolStateRunning": {
  12173. "type": "object",
  12174. "properties": {
  12175. "status": {
  12176. "type": "string",
  12177. "enum": ["running"]
  12178. },
  12179. "input": {
  12180. "type": "object"
  12181. },
  12182. "title": {
  12183. "type": "string"
  12184. },
  12185. "metadata": {
  12186. "type": "object"
  12187. },
  12188. "time": {
  12189. "type": "object",
  12190. "properties": {
  12191. "start": {
  12192. "type": "integer",
  12193. "minimum": 0
  12194. }
  12195. },
  12196. "required": ["start"],
  12197. "additionalProperties": false
  12198. }
  12199. },
  12200. "required": ["status", "input", "time"],
  12201. "additionalProperties": false
  12202. },
  12203. "ToolStateCompleted": {
  12204. "type": "object",
  12205. "properties": {
  12206. "status": {
  12207. "type": "string",
  12208. "enum": ["completed"]
  12209. },
  12210. "input": {
  12211. "type": "object"
  12212. },
  12213. "output": {
  12214. "type": "string"
  12215. },
  12216. "title": {
  12217. "type": "string"
  12218. },
  12219. "metadata": {
  12220. "type": "object"
  12221. },
  12222. "time": {
  12223. "type": "object",
  12224. "properties": {
  12225. "start": {
  12226. "type": "integer",
  12227. "minimum": 0
  12228. },
  12229. "end": {
  12230. "type": "integer",
  12231. "minimum": 0
  12232. },
  12233. "compacted": {
  12234. "type": "integer",
  12235. "minimum": 0
  12236. }
  12237. },
  12238. "required": ["start", "end"],
  12239. "additionalProperties": false
  12240. },
  12241. "attachments": {
  12242. "type": "array",
  12243. "items": {
  12244. "$ref": "#/components/schemas/FilePart"
  12245. }
  12246. }
  12247. },
  12248. "required": ["status", "input", "output", "title", "metadata", "time"],
  12249. "additionalProperties": false
  12250. },
  12251. "ToolStateError": {
  12252. "type": "object",
  12253. "properties": {
  12254. "status": {
  12255. "type": "string",
  12256. "enum": ["error"]
  12257. },
  12258. "input": {
  12259. "type": "object"
  12260. },
  12261. "error": {
  12262. "type": "string"
  12263. },
  12264. "metadata": {
  12265. "type": "object"
  12266. },
  12267. "time": {
  12268. "type": "object",
  12269. "properties": {
  12270. "start": {
  12271. "type": "integer",
  12272. "minimum": 0
  12273. },
  12274. "end": {
  12275. "type": "integer",
  12276. "minimum": 0
  12277. }
  12278. },
  12279. "required": ["start", "end"],
  12280. "additionalProperties": false
  12281. }
  12282. },
  12283. "required": ["status", "input", "error", "time"],
  12284. "additionalProperties": false
  12285. },
  12286. "ToolState": {
  12287. "anyOf": [
  12288. {
  12289. "$ref": "#/components/schemas/ToolStatePending"
  12290. },
  12291. {
  12292. "$ref": "#/components/schemas/ToolStateRunning"
  12293. },
  12294. {
  12295. "$ref": "#/components/schemas/ToolStateCompleted"
  12296. },
  12297. {
  12298. "$ref": "#/components/schemas/ToolStateError"
  12299. }
  12300. ]
  12301. },
  12302. "ToolPart": {
  12303. "type": "object",
  12304. "properties": {
  12305. "id": {
  12306. "type": "string",
  12307. "pattern": "^prt"
  12308. },
  12309. "sessionID": {
  12310. "type": "string",
  12311. "pattern": "^ses"
  12312. },
  12313. "messageID": {
  12314. "type": "string",
  12315. "pattern": "^msg"
  12316. },
  12317. "type": {
  12318. "type": "string",
  12319. "enum": ["tool"]
  12320. },
  12321. "callID": {
  12322. "type": "string"
  12323. },
  12324. "tool": {
  12325. "type": "string"
  12326. },
  12327. "state": {
  12328. "$ref": "#/components/schemas/ToolState"
  12329. },
  12330. "metadata": {
  12331. "type": "object"
  12332. }
  12333. },
  12334. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  12335. "additionalProperties": false
  12336. },
  12337. "StepStartPart": {
  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": ["step-start"]
  12355. },
  12356. "snapshot": {
  12357. "type": "string"
  12358. }
  12359. },
  12360. "required": ["id", "sessionID", "messageID", "type"],
  12361. "additionalProperties": false
  12362. },
  12363. "StepFinishPart": {
  12364. "type": "object",
  12365. "properties": {
  12366. "id": {
  12367. "type": "string",
  12368. "pattern": "^prt"
  12369. },
  12370. "sessionID": {
  12371. "type": "string",
  12372. "pattern": "^ses"
  12373. },
  12374. "messageID": {
  12375. "type": "string",
  12376. "pattern": "^msg"
  12377. },
  12378. "type": {
  12379. "type": "string",
  12380. "enum": ["step-finish"]
  12381. },
  12382. "reason": {
  12383. "type": "string"
  12384. },
  12385. "snapshot": {
  12386. "type": "string"
  12387. },
  12388. "cost": {
  12389. "type": "number"
  12390. },
  12391. "tokens": {
  12392. "type": "object",
  12393. "properties": {
  12394. "total": {
  12395. "type": "number"
  12396. },
  12397. "input": {
  12398. "type": "number"
  12399. },
  12400. "output": {
  12401. "type": "number"
  12402. },
  12403. "reasoning": {
  12404. "type": "number"
  12405. },
  12406. "cache": {
  12407. "type": "object",
  12408. "properties": {
  12409. "read": {
  12410. "type": "number"
  12411. },
  12412. "write": {
  12413. "type": "number"
  12414. }
  12415. },
  12416. "required": ["read", "write"],
  12417. "additionalProperties": false
  12418. }
  12419. },
  12420. "required": ["input", "output", "reasoning", "cache"],
  12421. "additionalProperties": false
  12422. }
  12423. },
  12424. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  12425. "additionalProperties": false
  12426. },
  12427. "SnapshotPart": {
  12428. "type": "object",
  12429. "properties": {
  12430. "id": {
  12431. "type": "string",
  12432. "pattern": "^prt"
  12433. },
  12434. "sessionID": {
  12435. "type": "string",
  12436. "pattern": "^ses"
  12437. },
  12438. "messageID": {
  12439. "type": "string",
  12440. "pattern": "^msg"
  12441. },
  12442. "type": {
  12443. "type": "string",
  12444. "enum": ["snapshot"]
  12445. },
  12446. "snapshot": {
  12447. "type": "string"
  12448. }
  12449. },
  12450. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  12451. "additionalProperties": false
  12452. },
  12453. "PatchPart": {
  12454. "type": "object",
  12455. "properties": {
  12456. "id": {
  12457. "type": "string",
  12458. "pattern": "^prt"
  12459. },
  12460. "sessionID": {
  12461. "type": "string",
  12462. "pattern": "^ses"
  12463. },
  12464. "messageID": {
  12465. "type": "string",
  12466. "pattern": "^msg"
  12467. },
  12468. "type": {
  12469. "type": "string",
  12470. "enum": ["patch"]
  12471. },
  12472. "hash": {
  12473. "type": "string"
  12474. },
  12475. "files": {
  12476. "type": "array",
  12477. "items": {
  12478. "type": "string"
  12479. }
  12480. }
  12481. },
  12482. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  12483. "additionalProperties": false
  12484. },
  12485. "AgentPart": {
  12486. "type": "object",
  12487. "properties": {
  12488. "id": {
  12489. "type": "string",
  12490. "pattern": "^prt"
  12491. },
  12492. "sessionID": {
  12493. "type": "string",
  12494. "pattern": "^ses"
  12495. },
  12496. "messageID": {
  12497. "type": "string",
  12498. "pattern": "^msg"
  12499. },
  12500. "type": {
  12501. "type": "string",
  12502. "enum": ["agent"]
  12503. },
  12504. "name": {
  12505. "type": "string"
  12506. },
  12507. "source": {
  12508. "type": "object",
  12509. "properties": {
  12510. "value": {
  12511. "type": "string"
  12512. },
  12513. "start": {
  12514. "type": "integer",
  12515. "minimum": 0
  12516. },
  12517. "end": {
  12518. "type": "integer",
  12519. "minimum": 0
  12520. }
  12521. },
  12522. "required": ["value", "start", "end"],
  12523. "additionalProperties": false
  12524. }
  12525. },
  12526. "required": ["id", "sessionID", "messageID", "type", "name"],
  12527. "additionalProperties": false
  12528. },
  12529. "RetryPart": {
  12530. "type": "object",
  12531. "properties": {
  12532. "id": {
  12533. "type": "string",
  12534. "pattern": "^prt"
  12535. },
  12536. "sessionID": {
  12537. "type": "string",
  12538. "pattern": "^ses"
  12539. },
  12540. "messageID": {
  12541. "type": "string",
  12542. "pattern": "^msg"
  12543. },
  12544. "type": {
  12545. "type": "string",
  12546. "enum": ["retry"]
  12547. },
  12548. "attempt": {
  12549. "type": "integer",
  12550. "minimum": 0
  12551. },
  12552. "error": {
  12553. "$ref": "#/components/schemas/APIError"
  12554. },
  12555. "time": {
  12556. "type": "object",
  12557. "properties": {
  12558. "created": {
  12559. "type": "integer",
  12560. "minimum": 0
  12561. }
  12562. },
  12563. "required": ["created"],
  12564. "additionalProperties": false
  12565. }
  12566. },
  12567. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  12568. "additionalProperties": false
  12569. },
  12570. "CompactionPart": {
  12571. "type": "object",
  12572. "properties": {
  12573. "id": {
  12574. "type": "string",
  12575. "pattern": "^prt"
  12576. },
  12577. "sessionID": {
  12578. "type": "string",
  12579. "pattern": "^ses"
  12580. },
  12581. "messageID": {
  12582. "type": "string",
  12583. "pattern": "^msg"
  12584. },
  12585. "type": {
  12586. "type": "string",
  12587. "enum": ["compaction"]
  12588. },
  12589. "auto": {
  12590. "type": "boolean"
  12591. },
  12592. "overflow": {
  12593. "type": "boolean"
  12594. },
  12595. "tail_start_id": {
  12596. "type": "string",
  12597. "pattern": "^msg"
  12598. }
  12599. },
  12600. "required": ["id", "sessionID", "messageID", "type", "auto"],
  12601. "additionalProperties": false
  12602. },
  12603. "Part": {
  12604. "anyOf": [
  12605. {
  12606. "$ref": "#/components/schemas/TextPart"
  12607. },
  12608. {
  12609. "$ref": "#/components/schemas/SubtaskPart"
  12610. },
  12611. {
  12612. "$ref": "#/components/schemas/ReasoningPart"
  12613. },
  12614. {
  12615. "$ref": "#/components/schemas/FilePart"
  12616. },
  12617. {
  12618. "$ref": "#/components/schemas/ToolPart"
  12619. },
  12620. {
  12621. "$ref": "#/components/schemas/StepStartPart"
  12622. },
  12623. {
  12624. "$ref": "#/components/schemas/StepFinishPart"
  12625. },
  12626. {
  12627. "$ref": "#/components/schemas/SnapshotPart"
  12628. },
  12629. {
  12630. "$ref": "#/components/schemas/PatchPart"
  12631. },
  12632. {
  12633. "$ref": "#/components/schemas/AgentPart"
  12634. },
  12635. {
  12636. "$ref": "#/components/schemas/RetryPart"
  12637. },
  12638. {
  12639. "$ref": "#/components/schemas/CompactionPart"
  12640. }
  12641. ]
  12642. },
  12643. "PermissionAction": {
  12644. "type": "string",
  12645. "enum": ["allow", "deny", "ask"]
  12646. },
  12647. "PermissionRule": {
  12648. "type": "object",
  12649. "properties": {
  12650. "permission": {
  12651. "type": "string"
  12652. },
  12653. "pattern": {
  12654. "type": "string"
  12655. },
  12656. "action": {
  12657. "$ref": "#/components/schemas/PermissionAction"
  12658. }
  12659. },
  12660. "required": ["permission", "pattern", "action"],
  12661. "additionalProperties": false
  12662. },
  12663. "PermissionRuleset": {
  12664. "type": "array",
  12665. "items": {
  12666. "$ref": "#/components/schemas/PermissionRule"
  12667. }
  12668. },
  12669. "Session": {
  12670. "type": "object",
  12671. "properties": {
  12672. "id": {
  12673. "type": "string",
  12674. "pattern": "^ses"
  12675. },
  12676. "slug": {
  12677. "type": "string"
  12678. },
  12679. "projectID": {
  12680. "type": "string"
  12681. },
  12682. "workspaceID": {
  12683. "type": "string",
  12684. "pattern": "^wrk"
  12685. },
  12686. "directory": {
  12687. "type": "string"
  12688. },
  12689. "path": {
  12690. "type": "string"
  12691. },
  12692. "parentID": {
  12693. "type": "string",
  12694. "pattern": "^ses"
  12695. },
  12696. "summary": {
  12697. "type": "object",
  12698. "properties": {
  12699. "additions": {
  12700. "type": "number"
  12701. },
  12702. "deletions": {
  12703. "type": "number"
  12704. },
  12705. "files": {
  12706. "type": "number"
  12707. },
  12708. "diffs": {
  12709. "type": "array",
  12710. "items": {
  12711. "$ref": "#/components/schemas/SnapshotFileDiff"
  12712. }
  12713. }
  12714. },
  12715. "required": ["additions", "deletions", "files"],
  12716. "additionalProperties": false
  12717. },
  12718. "cost": {
  12719. "type": "number"
  12720. },
  12721. "tokens": {
  12722. "type": "object",
  12723. "properties": {
  12724. "input": {
  12725. "type": "number"
  12726. },
  12727. "output": {
  12728. "type": "number"
  12729. },
  12730. "reasoning": {
  12731. "type": "number"
  12732. },
  12733. "cache": {
  12734. "type": "object",
  12735. "properties": {
  12736. "read": {
  12737. "type": "number"
  12738. },
  12739. "write": {
  12740. "type": "number"
  12741. }
  12742. },
  12743. "required": ["read", "write"],
  12744. "additionalProperties": false
  12745. }
  12746. },
  12747. "required": ["input", "output", "reasoning", "cache"],
  12748. "additionalProperties": false
  12749. },
  12750. "share": {
  12751. "type": "object",
  12752. "properties": {
  12753. "url": {
  12754. "type": "string"
  12755. }
  12756. },
  12757. "required": ["url"],
  12758. "additionalProperties": false
  12759. },
  12760. "title": {
  12761. "type": "string"
  12762. },
  12763. "agent": {
  12764. "type": "string"
  12765. },
  12766. "model": {
  12767. "type": "object",
  12768. "properties": {
  12769. "id": {
  12770. "type": "string"
  12771. },
  12772. "providerID": {
  12773. "type": "string"
  12774. },
  12775. "variant": {
  12776. "type": "string"
  12777. }
  12778. },
  12779. "required": ["id", "providerID"],
  12780. "additionalProperties": false
  12781. },
  12782. "version": {
  12783. "type": "string"
  12784. },
  12785. "time": {
  12786. "type": "object",
  12787. "properties": {
  12788. "created": {
  12789. "type": "integer",
  12790. "minimum": 0
  12791. },
  12792. "updated": {
  12793. "type": "integer",
  12794. "minimum": 0
  12795. },
  12796. "compacting": {
  12797. "type": "integer",
  12798. "minimum": 0
  12799. },
  12800. "archived": {
  12801. "type": "number"
  12802. }
  12803. },
  12804. "required": ["created", "updated"],
  12805. "additionalProperties": false
  12806. },
  12807. "permission": {
  12808. "$ref": "#/components/schemas/PermissionRuleset"
  12809. },
  12810. "revert": {
  12811. "type": "object",
  12812. "properties": {
  12813. "messageID": {
  12814. "type": "string",
  12815. "pattern": "^msg"
  12816. },
  12817. "partID": {
  12818. "type": "string",
  12819. "pattern": "^prt"
  12820. },
  12821. "snapshot": {
  12822. "type": "string"
  12823. },
  12824. "diff": {
  12825. "type": "string"
  12826. }
  12827. },
  12828. "required": ["messageID"],
  12829. "additionalProperties": false
  12830. }
  12831. },
  12832. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  12833. "additionalProperties": false
  12834. },
  12835. "Prompt": {
  12836. "type": "object",
  12837. "properties": {
  12838. "text": {
  12839. "type": "string"
  12840. },
  12841. "files": {
  12842. "type": "array",
  12843. "items": {
  12844. "$ref": "#/components/schemas/PromptFileAttachment"
  12845. }
  12846. },
  12847. "agents": {
  12848. "type": "array",
  12849. "items": {
  12850. "$ref": "#/components/schemas/PromptAgentAttachment"
  12851. }
  12852. },
  12853. "references": {
  12854. "type": "array",
  12855. "items": {
  12856. "$ref": "#/components/schemas/PromptReferenceAttachment"
  12857. }
  12858. }
  12859. },
  12860. "required": ["text"],
  12861. "additionalProperties": false
  12862. },
  12863. "GlobalEvent": {
  12864. "type": "object",
  12865. "properties": {
  12866. "directory": {
  12867. "type": "string"
  12868. },
  12869. "project": {
  12870. "type": "string"
  12871. },
  12872. "workspace": {
  12873. "type": "string"
  12874. },
  12875. "payload": {
  12876. "anyOf": [
  12877. {
  12878. "$ref": "#/components/schemas/Event.tui.prompt.append"
  12879. },
  12880. {
  12881. "$ref": "#/components/schemas/Event.tui.command.execute"
  12882. },
  12883. {
  12884. "$ref": "#/components/schemas/Event.tui.toast.show"
  12885. },
  12886. {
  12887. "$ref": "#/components/schemas/Event.tui.session.select"
  12888. },
  12889. {
  12890. "$ref": "#/components/schemas/EventServerConnected"
  12891. },
  12892. {
  12893. "$ref": "#/components/schemas/EventGlobalDisposed"
  12894. },
  12895. {
  12896. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  12897. },
  12898. {
  12899. "$ref": "#/components/schemas/EventFileEdited"
  12900. },
  12901. {
  12902. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  12903. },
  12904. {
  12905. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  12906. },
  12907. {
  12908. "$ref": "#/components/schemas/EventLspUpdated"
  12909. },
  12910. {
  12911. "$ref": "#/components/schemas/EventMessagePartDelta"
  12912. },
  12913. {
  12914. "$ref": "#/components/schemas/EventPermissionAsked"
  12915. },
  12916. {
  12917. "$ref": "#/components/schemas/EventPermissionReplied"
  12918. },
  12919. {
  12920. "$ref": "#/components/schemas/EventSessionDiff"
  12921. },
  12922. {
  12923. "$ref": "#/components/schemas/EventSessionError"
  12924. },
  12925. {
  12926. "$ref": "#/components/schemas/EventQuestionAsked"
  12927. },
  12928. {
  12929. "$ref": "#/components/schemas/EventQuestionReplied"
  12930. },
  12931. {
  12932. "$ref": "#/components/schemas/EventQuestionRejected"
  12933. },
  12934. {
  12935. "$ref": "#/components/schemas/EventTodoUpdated"
  12936. },
  12937. {
  12938. "$ref": "#/components/schemas/EventSessionStatus"
  12939. },
  12940. {
  12941. "$ref": "#/components/schemas/EventSessionIdle"
  12942. },
  12943. {
  12944. "$ref": "#/components/schemas/EventMcpToolsChanged"
  12945. },
  12946. {
  12947. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  12948. },
  12949. {
  12950. "$ref": "#/components/schemas/EventCommandExecuted"
  12951. },
  12952. {
  12953. "$ref": "#/components/schemas/EventProjectUpdated"
  12954. },
  12955. {
  12956. "$ref": "#/components/schemas/EventSessionCompacted"
  12957. },
  12958. {
  12959. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  12960. },
  12961. {
  12962. "$ref": "#/components/schemas/EventWorkspaceReady"
  12963. },
  12964. {
  12965. "$ref": "#/components/schemas/EventWorkspaceFailed"
  12966. },
  12967. {
  12968. "$ref": "#/components/schemas/EventWorkspaceStatus"
  12969. },
  12970. {
  12971. "$ref": "#/components/schemas/EventWorktreeReady"
  12972. },
  12973. {
  12974. "$ref": "#/components/schemas/EventWorktreeFailed"
  12975. },
  12976. {
  12977. "$ref": "#/components/schemas/EventPtyCreated"
  12978. },
  12979. {
  12980. "$ref": "#/components/schemas/EventPtyUpdated"
  12981. },
  12982. {
  12983. "$ref": "#/components/schemas/EventPtyExited"
  12984. },
  12985. {
  12986. "$ref": "#/components/schemas/EventPtyDeleted"
  12987. },
  12988. {
  12989. "$ref": "#/components/schemas/EventInstallationUpdated"
  12990. },
  12991. {
  12992. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  12993. },
  12994. {
  12995. "$ref": "#/components/schemas/EventMessageUpdated"
  12996. },
  12997. {
  12998. "$ref": "#/components/schemas/EventMessageRemoved"
  12999. },
  13000. {
  13001. "$ref": "#/components/schemas/EventMessagePartUpdated"
  13002. },
  13003. {
  13004. "$ref": "#/components/schemas/EventMessagePartRemoved"
  13005. },
  13006. {
  13007. "$ref": "#/components/schemas/EventSessionCreated"
  13008. },
  13009. {
  13010. "$ref": "#/components/schemas/EventSessionUpdated"
  13011. },
  13012. {
  13013. "$ref": "#/components/schemas/EventSessionDeleted"
  13014. },
  13015. {
  13016. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  13017. },
  13018. {
  13019. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  13020. },
  13021. {
  13022. "$ref": "#/components/schemas/EventSessionNextPrompted"
  13023. },
  13024. {
  13025. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  13026. },
  13027. {
  13028. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  13029. },
  13030. {
  13031. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  13032. },
  13033. {
  13034. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  13035. },
  13036. {
  13037. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  13038. },
  13039. {
  13040. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  13041. },
  13042. {
  13043. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  13044. },
  13045. {
  13046. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  13047. },
  13048. {
  13049. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  13050. },
  13051. {
  13052. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  13053. },
  13054. {
  13055. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  13056. },
  13057. {
  13058. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  13059. },
  13060. {
  13061. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  13062. },
  13063. {
  13064. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  13065. },
  13066. {
  13067. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  13068. },
  13069. {
  13070. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  13071. },
  13072. {
  13073. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  13074. },
  13075. {
  13076. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  13077. },
  13078. {
  13079. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  13080. },
  13081. {
  13082. "$ref": "#/components/schemas/EventSessionNextRetried"
  13083. },
  13084. {
  13085. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  13086. },
  13087. {
  13088. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  13089. },
  13090. {
  13091. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  13092. },
  13093. {
  13094. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  13095. },
  13096. {
  13097. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  13098. },
  13099. {
  13100. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  13101. },
  13102. {
  13103. "$ref": "#/components/schemas/EventSessionNextPrompted"
  13104. },
  13105. {
  13106. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  13107. },
  13108. {
  13109. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  13110. },
  13111. {
  13112. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  13113. },
  13114. {
  13115. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  13116. },
  13117. {
  13118. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  13119. },
  13120. {
  13121. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  13122. },
  13123. {
  13124. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  13125. },
  13126. {
  13127. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  13128. },
  13129. {
  13130. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  13131. },
  13132. {
  13133. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  13134. },
  13135. {
  13136. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  13137. },
  13138. {
  13139. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  13140. },
  13141. {
  13142. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  13143. },
  13144. {
  13145. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  13146. },
  13147. {
  13148. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  13149. },
  13150. {
  13151. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  13152. },
  13153. {
  13154. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  13155. },
  13156. {
  13157. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  13158. },
  13159. {
  13160. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  13161. },
  13162. {
  13163. "$ref": "#/components/schemas/EventSessionNextRetried"
  13164. },
  13165. {
  13166. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  13167. },
  13168. {
  13169. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  13170. },
  13171. {
  13172. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  13173. },
  13174. {
  13175. "$ref": "#/components/schemas/EventModels-devRefreshed"
  13176. },
  13177. {
  13178. "$ref": "#/components/schemas/EventAccountAdded"
  13179. },
  13180. {
  13181. "$ref": "#/components/schemas/EventAccountRemoved"
  13182. },
  13183. {
  13184. "$ref": "#/components/schemas/EventAccountSwitched"
  13185. },
  13186. {
  13187. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  13188. },
  13189. {
  13190. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  13191. },
  13192. {
  13193. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  13194. },
  13195. {
  13196. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  13197. },
  13198. {
  13199. "$ref": "#/components/schemas/SyncEventSessionCreated"
  13200. },
  13201. {
  13202. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  13203. },
  13204. {
  13205. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  13206. },
  13207. {
  13208. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  13209. },
  13210. {
  13211. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  13212. },
  13213. {
  13214. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  13215. },
  13216. {
  13217. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  13218. },
  13219. {
  13220. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  13221. },
  13222. {
  13223. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  13224. },
  13225. {
  13226. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  13227. },
  13228. {
  13229. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  13230. },
  13231. {
  13232. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  13233. },
  13234. {
  13235. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  13236. },
  13237. {
  13238. "$ref": "#/components/schemas/SyncEventSessionNextTextDelta"
  13239. },
  13240. {
  13241. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  13242. },
  13243. {
  13244. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  13245. },
  13246. {
  13247. "$ref": "#/components/schemas/SyncEventSessionNextReasoningDelta"
  13248. },
  13249. {
  13250. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  13251. },
  13252. {
  13253. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  13254. },
  13255. {
  13256. "$ref": "#/components/schemas/SyncEventSessionNextToolInputDelta"
  13257. },
  13258. {
  13259. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  13260. },
  13261. {
  13262. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  13263. },
  13264. {
  13265. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  13266. },
  13267. {
  13268. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  13269. },
  13270. {
  13271. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  13272. },
  13273. {
  13274. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  13275. },
  13276. {
  13277. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  13278. },
  13279. {
  13280. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  13281. },
  13282. {
  13283. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  13284. }
  13285. ]
  13286. }
  13287. },
  13288. "required": ["directory", "payload"],
  13289. "additionalProperties": false
  13290. },
  13291. "LogLevel": {
  13292. "type": "string",
  13293. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  13294. "description": "Log level"
  13295. },
  13296. "ServerConfig": {
  13297. "type": "object",
  13298. "properties": {
  13299. "port": {
  13300. "type": "integer",
  13301. "exclusiveMinimum": 0
  13302. },
  13303. "hostname": {
  13304. "type": "string"
  13305. },
  13306. "mdns": {
  13307. "type": "boolean"
  13308. },
  13309. "mdnsDomain": {
  13310. "type": "string"
  13311. },
  13312. "cors": {
  13313. "type": "array",
  13314. "items": {
  13315. "type": "string"
  13316. }
  13317. }
  13318. },
  13319. "additionalProperties": false,
  13320. "description": "Server configuration for opencode serve and web commands"
  13321. },
  13322. "ReferenceConfigEntry": {
  13323. "anyOf": [
  13324. {
  13325. "type": "string"
  13326. },
  13327. {
  13328. "type": "object",
  13329. "properties": {
  13330. "repository": {
  13331. "type": "string",
  13332. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  13333. },
  13334. "branch": {
  13335. "type": "string"
  13336. }
  13337. },
  13338. "required": ["repository"],
  13339. "additionalProperties": false
  13340. },
  13341. {
  13342. "type": "object",
  13343. "properties": {
  13344. "path": {
  13345. "type": "string",
  13346. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  13347. }
  13348. },
  13349. "required": ["path"],
  13350. "additionalProperties": false
  13351. }
  13352. ]
  13353. },
  13354. "ReferenceConfig": {
  13355. "type": "object",
  13356. "additionalProperties": {
  13357. "$ref": "#/components/schemas/ReferenceConfigEntry"
  13358. }
  13359. },
  13360. "PermissionActionConfig": {
  13361. "type": "string",
  13362. "enum": ["ask", "allow", "deny"]
  13363. },
  13364. "PermissionObjectConfig": {
  13365. "type": "object",
  13366. "additionalProperties": {
  13367. "$ref": "#/components/schemas/PermissionActionConfig"
  13368. }
  13369. },
  13370. "PermissionRuleConfig": {
  13371. "anyOf": [
  13372. {
  13373. "$ref": "#/components/schemas/PermissionActionConfig"
  13374. },
  13375. {
  13376. "$ref": "#/components/schemas/PermissionObjectConfig"
  13377. }
  13378. ]
  13379. },
  13380. "PermissionConfig": {
  13381. "anyOf": [
  13382. {
  13383. "$ref": "#/components/schemas/PermissionActionConfig"
  13384. },
  13385. {
  13386. "type": "object",
  13387. "properties": {
  13388. "read": {
  13389. "$ref": "#/components/schemas/PermissionRuleConfig"
  13390. },
  13391. "edit": {
  13392. "$ref": "#/components/schemas/PermissionRuleConfig"
  13393. },
  13394. "glob": {
  13395. "$ref": "#/components/schemas/PermissionRuleConfig"
  13396. },
  13397. "grep": {
  13398. "$ref": "#/components/schemas/PermissionRuleConfig"
  13399. },
  13400. "list": {
  13401. "$ref": "#/components/schemas/PermissionRuleConfig"
  13402. },
  13403. "bash": {
  13404. "$ref": "#/components/schemas/PermissionRuleConfig"
  13405. },
  13406. "task": {
  13407. "$ref": "#/components/schemas/PermissionRuleConfig"
  13408. },
  13409. "external_directory": {
  13410. "$ref": "#/components/schemas/PermissionRuleConfig"
  13411. },
  13412. "todowrite": {
  13413. "$ref": "#/components/schemas/PermissionActionConfig"
  13414. },
  13415. "question": {
  13416. "$ref": "#/components/schemas/PermissionActionConfig"
  13417. },
  13418. "webfetch": {
  13419. "$ref": "#/components/schemas/PermissionActionConfig"
  13420. },
  13421. "websearch": {
  13422. "$ref": "#/components/schemas/PermissionActionConfig"
  13423. },
  13424. "repo_clone": {
  13425. "$ref": "#/components/schemas/PermissionRuleConfig"
  13426. },
  13427. "repo_overview": {
  13428. "$ref": "#/components/schemas/PermissionRuleConfig"
  13429. },
  13430. "lsp": {
  13431. "$ref": "#/components/schemas/PermissionRuleConfig"
  13432. },
  13433. "doom_loop": {
  13434. "$ref": "#/components/schemas/PermissionActionConfig"
  13435. },
  13436. "skill": {
  13437. "$ref": "#/components/schemas/PermissionRuleConfig"
  13438. }
  13439. },
  13440. "additionalProperties": {
  13441. "$ref": "#/components/schemas/PermissionRuleConfig"
  13442. }
  13443. }
  13444. ]
  13445. },
  13446. "AgentConfig": {
  13447. "type": "object",
  13448. "properties": {
  13449. "model": {
  13450. "type": "string"
  13451. },
  13452. "variant": {
  13453. "type": "string"
  13454. },
  13455. "temperature": {
  13456. "type": "number"
  13457. },
  13458. "top_p": {
  13459. "type": "number"
  13460. },
  13461. "prompt": {
  13462. "type": "string"
  13463. },
  13464. "tools": {
  13465. "type": "object",
  13466. "additionalProperties": {
  13467. "type": "boolean"
  13468. }
  13469. },
  13470. "disable": {
  13471. "type": "boolean"
  13472. },
  13473. "description": {
  13474. "type": "string"
  13475. },
  13476. "mode": {
  13477. "type": "string",
  13478. "enum": ["subagent", "primary", "all"]
  13479. },
  13480. "hidden": {
  13481. "type": "boolean"
  13482. },
  13483. "options": {
  13484. "type": "object"
  13485. },
  13486. "color": {
  13487. "anyOf": [
  13488. {
  13489. "type": "string",
  13490. "pattern": "^#[0-9a-fA-F]{6}$"
  13491. },
  13492. {
  13493. "type": "string",
  13494. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  13495. }
  13496. ],
  13497. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  13498. },
  13499. "steps": {
  13500. "type": "integer",
  13501. "exclusiveMinimum": 0
  13502. },
  13503. "maxSteps": {
  13504. "type": "integer",
  13505. "exclusiveMinimum": 0
  13506. },
  13507. "permission": {
  13508. "$ref": "#/components/schemas/PermissionConfig"
  13509. }
  13510. },
  13511. "additionalProperties": {}
  13512. },
  13513. "ProviderConfig": {
  13514. "type": "object",
  13515. "properties": {
  13516. "api": {
  13517. "type": "string"
  13518. },
  13519. "name": {
  13520. "type": "string"
  13521. },
  13522. "env": {
  13523. "type": "array",
  13524. "items": {
  13525. "type": "string"
  13526. }
  13527. },
  13528. "id": {
  13529. "type": "string"
  13530. },
  13531. "npm": {
  13532. "type": "string"
  13533. },
  13534. "whitelist": {
  13535. "type": "array",
  13536. "items": {
  13537. "type": "string"
  13538. }
  13539. },
  13540. "blacklist": {
  13541. "type": "array",
  13542. "items": {
  13543. "type": "string"
  13544. }
  13545. },
  13546. "options": {
  13547. "type": "object",
  13548. "properties": {
  13549. "apiKey": {
  13550. "type": "string"
  13551. },
  13552. "baseURL": {
  13553. "type": "string"
  13554. },
  13555. "enterpriseUrl": {
  13556. "type": "string"
  13557. },
  13558. "setCacheKey": {
  13559. "type": "boolean"
  13560. },
  13561. "timeout": {
  13562. "anyOf": [
  13563. {
  13564. "type": "integer",
  13565. "exclusiveMinimum": 0
  13566. },
  13567. {
  13568. "type": "boolean",
  13569. "enum": [false]
  13570. }
  13571. ],
  13572. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout."
  13573. },
  13574. "chunkTimeout": {
  13575. "type": "integer",
  13576. "exclusiveMinimum": 0
  13577. }
  13578. },
  13579. "additionalProperties": {}
  13580. },
  13581. "models": {
  13582. "type": "object",
  13583. "additionalProperties": {
  13584. "type": "object",
  13585. "properties": {
  13586. "id": {
  13587. "type": "string"
  13588. },
  13589. "name": {
  13590. "type": "string"
  13591. },
  13592. "family": {
  13593. "type": "string"
  13594. },
  13595. "release_date": {
  13596. "type": "string"
  13597. },
  13598. "attachment": {
  13599. "type": "boolean"
  13600. },
  13601. "reasoning": {
  13602. "type": "boolean"
  13603. },
  13604. "temperature": {
  13605. "type": "boolean"
  13606. },
  13607. "tool_call": {
  13608. "type": "boolean"
  13609. },
  13610. "interleaved": {
  13611. "anyOf": [
  13612. {
  13613. "type": "boolean",
  13614. "enum": [true]
  13615. },
  13616. {
  13617. "type": "object",
  13618. "properties": {
  13619. "field": {
  13620. "type": "string",
  13621. "enum": ["reasoning_content", "reasoning_details"]
  13622. }
  13623. },
  13624. "required": ["field"],
  13625. "additionalProperties": false
  13626. }
  13627. ]
  13628. },
  13629. "cost": {
  13630. "type": "object",
  13631. "properties": {
  13632. "input": {
  13633. "type": "number"
  13634. },
  13635. "output": {
  13636. "type": "number"
  13637. },
  13638. "cache_read": {
  13639. "type": "number"
  13640. },
  13641. "cache_write": {
  13642. "type": "number"
  13643. },
  13644. "context_over_200k": {
  13645. "type": "object",
  13646. "properties": {
  13647. "input": {
  13648. "type": "number"
  13649. },
  13650. "output": {
  13651. "type": "number"
  13652. },
  13653. "cache_read": {
  13654. "type": "number"
  13655. },
  13656. "cache_write": {
  13657. "type": "number"
  13658. }
  13659. },
  13660. "required": ["input", "output"],
  13661. "additionalProperties": false
  13662. }
  13663. },
  13664. "required": ["input", "output"],
  13665. "additionalProperties": false
  13666. },
  13667. "limit": {
  13668. "type": "object",
  13669. "properties": {
  13670. "context": {
  13671. "type": "number"
  13672. },
  13673. "input": {
  13674. "type": "number"
  13675. },
  13676. "output": {
  13677. "type": "number"
  13678. }
  13679. },
  13680. "required": ["context", "output"],
  13681. "additionalProperties": false
  13682. },
  13683. "modalities": {
  13684. "type": "object",
  13685. "properties": {
  13686. "input": {
  13687. "type": "array",
  13688. "items": {
  13689. "type": "string",
  13690. "enum": ["text", "audio", "image", "video", "pdf"]
  13691. }
  13692. },
  13693. "output": {
  13694. "type": "array",
  13695. "items": {
  13696. "type": "string",
  13697. "enum": ["text", "audio", "image", "video", "pdf"]
  13698. }
  13699. }
  13700. },
  13701. "required": ["input", "output"],
  13702. "additionalProperties": false
  13703. },
  13704. "experimental": {
  13705. "type": "boolean"
  13706. },
  13707. "status": {
  13708. "type": "string",
  13709. "enum": ["alpha", "beta", "deprecated", "active"]
  13710. },
  13711. "provider": {
  13712. "type": "object",
  13713. "properties": {
  13714. "npm": {
  13715. "type": "string"
  13716. },
  13717. "api": {
  13718. "type": "string"
  13719. }
  13720. },
  13721. "additionalProperties": false
  13722. },
  13723. "options": {
  13724. "type": "object"
  13725. },
  13726. "headers": {
  13727. "type": "object",
  13728. "additionalProperties": {
  13729. "type": "string"
  13730. }
  13731. },
  13732. "variants": {
  13733. "type": "object",
  13734. "additionalProperties": {
  13735. "type": "object",
  13736. "properties": {
  13737. "disabled": {
  13738. "type": "boolean"
  13739. }
  13740. },
  13741. "additionalProperties": {}
  13742. },
  13743. "description": "Variant-specific configuration"
  13744. }
  13745. },
  13746. "additionalProperties": false
  13747. }
  13748. }
  13749. },
  13750. "additionalProperties": false
  13751. },
  13752. "McpLocalConfig": {
  13753. "type": "object",
  13754. "properties": {
  13755. "type": {
  13756. "type": "string",
  13757. "enum": ["local"],
  13758. "description": "Type of MCP server connection"
  13759. },
  13760. "command": {
  13761. "type": "array",
  13762. "items": {
  13763. "type": "string"
  13764. },
  13765. "description": "Command and arguments to run the MCP server"
  13766. },
  13767. "environment": {
  13768. "type": "object",
  13769. "additionalProperties": {
  13770. "type": "string"
  13771. }
  13772. },
  13773. "enabled": {
  13774. "type": "boolean"
  13775. },
  13776. "timeout": {
  13777. "type": "integer",
  13778. "exclusiveMinimum": 0
  13779. }
  13780. },
  13781. "required": ["type", "command"],
  13782. "additionalProperties": false
  13783. },
  13784. "McpOAuthConfig": {
  13785. "type": "object",
  13786. "properties": {
  13787. "clientId": {
  13788. "type": "string"
  13789. },
  13790. "clientSecret": {
  13791. "type": "string"
  13792. },
  13793. "scope": {
  13794. "type": "string"
  13795. },
  13796. "callbackPort": {
  13797. "type": "integer",
  13798. "minimum": 1,
  13799. "maximum": 65535
  13800. },
  13801. "redirectUri": {
  13802. "type": "string"
  13803. }
  13804. },
  13805. "additionalProperties": false
  13806. },
  13807. "McpRemoteConfig": {
  13808. "type": "object",
  13809. "properties": {
  13810. "type": {
  13811. "type": "string",
  13812. "enum": ["remote"],
  13813. "description": "Type of MCP server connection"
  13814. },
  13815. "url": {
  13816. "type": "string",
  13817. "description": "URL of the remote MCP server"
  13818. },
  13819. "enabled": {
  13820. "type": "boolean"
  13821. },
  13822. "headers": {
  13823. "type": "object",
  13824. "additionalProperties": {
  13825. "type": "string"
  13826. }
  13827. },
  13828. "oauth": {
  13829. "anyOf": [
  13830. {
  13831. "$ref": "#/components/schemas/McpOAuthConfig"
  13832. },
  13833. {
  13834. "type": "boolean",
  13835. "enum": [false]
  13836. }
  13837. ],
  13838. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  13839. },
  13840. "timeout": {
  13841. "type": "integer",
  13842. "exclusiveMinimum": 0
  13843. }
  13844. },
  13845. "required": ["type", "url"],
  13846. "additionalProperties": false
  13847. },
  13848. "LayoutConfig": {
  13849. "type": "string",
  13850. "enum": ["auto", "stretch"],
  13851. "description": "@deprecated Always uses stretch layout."
  13852. },
  13853. "ImageAttachmentConfig": {
  13854. "type": "object",
  13855. "properties": {
  13856. "auto_resize": {
  13857. "type": "boolean"
  13858. },
  13859. "max_width": {
  13860. "type": "integer",
  13861. "exclusiveMinimum": 0
  13862. },
  13863. "max_height": {
  13864. "type": "integer",
  13865. "exclusiveMinimum": 0
  13866. },
  13867. "max_base64_bytes": {
  13868. "type": "integer",
  13869. "exclusiveMinimum": 0
  13870. }
  13871. },
  13872. "additionalProperties": false
  13873. },
  13874. "AttachmentConfig": {
  13875. "type": "object",
  13876. "properties": {
  13877. "image": {
  13878. "$ref": "#/components/schemas/ImageAttachmentConfig"
  13879. }
  13880. },
  13881. "additionalProperties": false
  13882. },
  13883. "Config": {
  13884. "type": "object",
  13885. "properties": {
  13886. "$schema": {
  13887. "type": "string"
  13888. },
  13889. "shell": {
  13890. "type": "string"
  13891. },
  13892. "logLevel": {
  13893. "$ref": "#/components/schemas/LogLevel"
  13894. },
  13895. "server": {
  13896. "$ref": "#/components/schemas/ServerConfig"
  13897. },
  13898. "command": {
  13899. "type": "object",
  13900. "additionalProperties": {
  13901. "type": "object",
  13902. "properties": {
  13903. "template": {
  13904. "type": "string"
  13905. },
  13906. "description": {
  13907. "type": "string"
  13908. },
  13909. "agent": {
  13910. "type": "string"
  13911. },
  13912. "model": {
  13913. "type": "string"
  13914. },
  13915. "subtask": {
  13916. "type": "boolean"
  13917. }
  13918. },
  13919. "required": ["template"],
  13920. "additionalProperties": false
  13921. }
  13922. },
  13923. "skills": {
  13924. "type": "object",
  13925. "properties": {
  13926. "paths": {
  13927. "type": "array",
  13928. "items": {
  13929. "type": "string"
  13930. }
  13931. },
  13932. "urls": {
  13933. "type": "array",
  13934. "items": {
  13935. "type": "string"
  13936. }
  13937. }
  13938. },
  13939. "additionalProperties": false
  13940. },
  13941. "reference": {
  13942. "$ref": "#/components/schemas/ReferenceConfig"
  13943. },
  13944. "watcher": {
  13945. "type": "object",
  13946. "properties": {
  13947. "ignore": {
  13948. "type": "array",
  13949. "items": {
  13950. "type": "string"
  13951. }
  13952. }
  13953. },
  13954. "additionalProperties": false
  13955. },
  13956. "snapshot": {
  13957. "type": "boolean"
  13958. },
  13959. "plugin": {
  13960. "type": "array",
  13961. "items": {
  13962. "anyOf": [
  13963. {
  13964. "type": "string"
  13965. },
  13966. {
  13967. "type": "array",
  13968. "prefixItems": [
  13969. {
  13970. "type": "string"
  13971. },
  13972. {
  13973. "type": "object"
  13974. }
  13975. ],
  13976. "maxItems": 2,
  13977. "minItems": 2
  13978. }
  13979. ]
  13980. }
  13981. },
  13982. "share": {
  13983. "type": "string",
  13984. "enum": ["manual", "auto", "disabled"]
  13985. },
  13986. "autoshare": {
  13987. "type": "boolean"
  13988. },
  13989. "autoupdate": {
  13990. "anyOf": [
  13991. {
  13992. "type": "boolean"
  13993. },
  13994. {
  13995. "type": "string",
  13996. "enum": ["notify"]
  13997. }
  13998. ],
  13999. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  14000. },
  14001. "disabled_providers": {
  14002. "type": "array",
  14003. "items": {
  14004. "type": "string"
  14005. }
  14006. },
  14007. "enabled_providers": {
  14008. "type": "array",
  14009. "items": {
  14010. "type": "string"
  14011. }
  14012. },
  14013. "model": {
  14014. "type": "string"
  14015. },
  14016. "small_model": {
  14017. "type": "string"
  14018. },
  14019. "default_agent": {
  14020. "type": "string"
  14021. },
  14022. "username": {
  14023. "type": "string"
  14024. },
  14025. "mode": {
  14026. "type": "object",
  14027. "properties": {
  14028. "build": {
  14029. "$ref": "#/components/schemas/AgentConfig"
  14030. },
  14031. "plan": {
  14032. "$ref": "#/components/schemas/AgentConfig"
  14033. }
  14034. },
  14035. "additionalProperties": {
  14036. "$ref": "#/components/schemas/AgentConfig"
  14037. }
  14038. },
  14039. "agent": {
  14040. "type": "object",
  14041. "properties": {
  14042. "plan": {
  14043. "$ref": "#/components/schemas/AgentConfig"
  14044. },
  14045. "build": {
  14046. "$ref": "#/components/schemas/AgentConfig"
  14047. },
  14048. "general": {
  14049. "$ref": "#/components/schemas/AgentConfig"
  14050. },
  14051. "explore": {
  14052. "$ref": "#/components/schemas/AgentConfig"
  14053. },
  14054. "scout": {
  14055. "$ref": "#/components/schemas/AgentConfig"
  14056. },
  14057. "title": {
  14058. "$ref": "#/components/schemas/AgentConfig"
  14059. },
  14060. "summary": {
  14061. "$ref": "#/components/schemas/AgentConfig"
  14062. },
  14063. "compaction": {
  14064. "$ref": "#/components/schemas/AgentConfig"
  14065. }
  14066. },
  14067. "additionalProperties": {
  14068. "$ref": "#/components/schemas/AgentConfig"
  14069. }
  14070. },
  14071. "provider": {
  14072. "type": "object",
  14073. "additionalProperties": {
  14074. "$ref": "#/components/schemas/ProviderConfig"
  14075. }
  14076. },
  14077. "mcp": {
  14078. "type": "object",
  14079. "additionalProperties": {
  14080. "anyOf": [
  14081. {
  14082. "$ref": "#/components/schemas/McpLocalConfig"
  14083. },
  14084. {
  14085. "$ref": "#/components/schemas/McpRemoteConfig"
  14086. },
  14087. {
  14088. "type": "object",
  14089. "properties": {
  14090. "enabled": {
  14091. "type": "boolean"
  14092. }
  14093. },
  14094. "required": ["enabled"],
  14095. "additionalProperties": false
  14096. }
  14097. ]
  14098. }
  14099. },
  14100. "formatter": {
  14101. "anyOf": [
  14102. {
  14103. "type": "boolean"
  14104. },
  14105. {
  14106. "type": "object",
  14107. "additionalProperties": {
  14108. "type": "object",
  14109. "properties": {
  14110. "disabled": {
  14111. "type": "boolean"
  14112. },
  14113. "command": {
  14114. "type": "array",
  14115. "items": {
  14116. "type": "string"
  14117. }
  14118. },
  14119. "environment": {
  14120. "type": "object",
  14121. "additionalProperties": {
  14122. "type": "string"
  14123. }
  14124. },
  14125. "extensions": {
  14126. "type": "array",
  14127. "items": {
  14128. "type": "string"
  14129. }
  14130. }
  14131. },
  14132. "additionalProperties": false
  14133. }
  14134. }
  14135. ],
  14136. "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."
  14137. },
  14138. "lsp": {
  14139. "anyOf": [
  14140. {
  14141. "type": "boolean"
  14142. },
  14143. {
  14144. "type": "object",
  14145. "additionalProperties": {
  14146. "anyOf": [
  14147. {
  14148. "type": "object",
  14149. "properties": {
  14150. "disabled": {
  14151. "type": "boolean",
  14152. "enum": [true]
  14153. }
  14154. },
  14155. "required": ["disabled"],
  14156. "additionalProperties": false
  14157. },
  14158. {
  14159. "type": "object",
  14160. "properties": {
  14161. "command": {
  14162. "type": "array",
  14163. "items": {
  14164. "type": "string"
  14165. }
  14166. },
  14167. "extensions": {
  14168. "type": "array",
  14169. "items": {
  14170. "type": "string"
  14171. }
  14172. },
  14173. "disabled": {
  14174. "type": "boolean"
  14175. },
  14176. "env": {
  14177. "type": "object",
  14178. "additionalProperties": {
  14179. "type": "string"
  14180. }
  14181. },
  14182. "initialization": {
  14183. "type": "object"
  14184. }
  14185. },
  14186. "required": ["command"],
  14187. "additionalProperties": false
  14188. }
  14189. ]
  14190. }
  14191. }
  14192. ],
  14193. "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."
  14194. },
  14195. "instructions": {
  14196. "type": "array",
  14197. "items": {
  14198. "type": "string"
  14199. }
  14200. },
  14201. "layout": {
  14202. "$ref": "#/components/schemas/LayoutConfig"
  14203. },
  14204. "permission": {
  14205. "$ref": "#/components/schemas/PermissionConfig"
  14206. },
  14207. "tools": {
  14208. "type": "object",
  14209. "additionalProperties": {
  14210. "type": "boolean"
  14211. }
  14212. },
  14213. "attachment": {
  14214. "$ref": "#/components/schemas/AttachmentConfig"
  14215. },
  14216. "enterprise": {
  14217. "type": "object",
  14218. "properties": {
  14219. "url": {
  14220. "type": "string"
  14221. }
  14222. },
  14223. "additionalProperties": false
  14224. },
  14225. "tool_output": {
  14226. "type": "object",
  14227. "properties": {
  14228. "max_lines": {
  14229. "type": "integer",
  14230. "exclusiveMinimum": 0
  14231. },
  14232. "max_bytes": {
  14233. "type": "integer",
  14234. "exclusiveMinimum": 0
  14235. }
  14236. },
  14237. "additionalProperties": false
  14238. },
  14239. "compaction": {
  14240. "type": "object",
  14241. "properties": {
  14242. "auto": {
  14243. "type": "boolean"
  14244. },
  14245. "prune": {
  14246. "type": "boolean"
  14247. },
  14248. "tail_turns": {
  14249. "type": "integer",
  14250. "minimum": 0
  14251. },
  14252. "preserve_recent_tokens": {
  14253. "type": "integer",
  14254. "minimum": 0
  14255. },
  14256. "reserved": {
  14257. "type": "integer",
  14258. "minimum": 0
  14259. }
  14260. },
  14261. "additionalProperties": false
  14262. },
  14263. "experimental": {
  14264. "type": "object",
  14265. "properties": {
  14266. "disable_paste_summary": {
  14267. "type": "boolean"
  14268. },
  14269. "batch_tool": {
  14270. "type": "boolean"
  14271. },
  14272. "openTelemetry": {
  14273. "type": "boolean"
  14274. },
  14275. "primary_tools": {
  14276. "type": "array",
  14277. "items": {
  14278. "type": "string"
  14279. }
  14280. },
  14281. "continue_loop_on_deny": {
  14282. "type": "boolean"
  14283. },
  14284. "mcp_timeout": {
  14285. "type": "integer",
  14286. "exclusiveMinimum": 0
  14287. }
  14288. },
  14289. "additionalProperties": false
  14290. }
  14291. },
  14292. "additionalProperties": false
  14293. },
  14294. "Model": {
  14295. "type": "object",
  14296. "properties": {
  14297. "id": {
  14298. "type": "string"
  14299. },
  14300. "providerID": {
  14301. "type": "string"
  14302. },
  14303. "api": {
  14304. "type": "object",
  14305. "properties": {
  14306. "id": {
  14307. "type": "string"
  14308. },
  14309. "url": {
  14310. "type": "string"
  14311. },
  14312. "npm": {
  14313. "type": "string"
  14314. }
  14315. },
  14316. "required": ["id", "url", "npm"],
  14317. "additionalProperties": false
  14318. },
  14319. "name": {
  14320. "type": "string"
  14321. },
  14322. "family": {
  14323. "type": "string"
  14324. },
  14325. "capabilities": {
  14326. "type": "object",
  14327. "properties": {
  14328. "temperature": {
  14329. "type": "boolean"
  14330. },
  14331. "reasoning": {
  14332. "type": "boolean"
  14333. },
  14334. "attachment": {
  14335. "type": "boolean"
  14336. },
  14337. "toolcall": {
  14338. "type": "boolean"
  14339. },
  14340. "input": {
  14341. "type": "object",
  14342. "properties": {
  14343. "text": {
  14344. "type": "boolean"
  14345. },
  14346. "audio": {
  14347. "type": "boolean"
  14348. },
  14349. "image": {
  14350. "type": "boolean"
  14351. },
  14352. "video": {
  14353. "type": "boolean"
  14354. },
  14355. "pdf": {
  14356. "type": "boolean"
  14357. }
  14358. },
  14359. "required": ["text", "audio", "image", "video", "pdf"],
  14360. "additionalProperties": false
  14361. },
  14362. "output": {
  14363. "type": "object",
  14364. "properties": {
  14365. "text": {
  14366. "type": "boolean"
  14367. },
  14368. "audio": {
  14369. "type": "boolean"
  14370. },
  14371. "image": {
  14372. "type": "boolean"
  14373. },
  14374. "video": {
  14375. "type": "boolean"
  14376. },
  14377. "pdf": {
  14378. "type": "boolean"
  14379. }
  14380. },
  14381. "required": ["text", "audio", "image", "video", "pdf"],
  14382. "additionalProperties": false
  14383. },
  14384. "interleaved": {
  14385. "anyOf": [
  14386. {
  14387. "type": "boolean"
  14388. },
  14389. {
  14390. "type": "object",
  14391. "properties": {
  14392. "field": {
  14393. "type": "string",
  14394. "enum": ["reasoning_content", "reasoning_details"]
  14395. }
  14396. },
  14397. "required": ["field"],
  14398. "additionalProperties": false
  14399. }
  14400. ]
  14401. }
  14402. },
  14403. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  14404. "additionalProperties": false
  14405. },
  14406. "cost": {
  14407. "type": "object",
  14408. "properties": {
  14409. "input": {
  14410. "type": "number"
  14411. },
  14412. "output": {
  14413. "type": "number"
  14414. },
  14415. "cache": {
  14416. "type": "object",
  14417. "properties": {
  14418. "read": {
  14419. "type": "number"
  14420. },
  14421. "write": {
  14422. "type": "number"
  14423. }
  14424. },
  14425. "required": ["read", "write"],
  14426. "additionalProperties": false
  14427. },
  14428. "tiers": {
  14429. "type": "array",
  14430. "items": {
  14431. "type": "object",
  14432. "properties": {
  14433. "input": {
  14434. "type": "number"
  14435. },
  14436. "output": {
  14437. "type": "number"
  14438. },
  14439. "cache": {
  14440. "type": "object",
  14441. "properties": {
  14442. "read": {
  14443. "type": "number"
  14444. },
  14445. "write": {
  14446. "type": "number"
  14447. }
  14448. },
  14449. "required": ["read", "write"],
  14450. "additionalProperties": false
  14451. },
  14452. "tier": {
  14453. "type": "object",
  14454. "properties": {
  14455. "type": {
  14456. "type": "string",
  14457. "enum": ["context"]
  14458. },
  14459. "size": {
  14460. "type": "number"
  14461. }
  14462. },
  14463. "required": ["type", "size"],
  14464. "additionalProperties": false
  14465. }
  14466. },
  14467. "required": ["input", "output", "cache", "tier"],
  14468. "additionalProperties": false
  14469. }
  14470. },
  14471. "experimentalOver200K": {
  14472. "type": "object",
  14473. "properties": {
  14474. "input": {
  14475. "type": "number"
  14476. },
  14477. "output": {
  14478. "type": "number"
  14479. },
  14480. "cache": {
  14481. "type": "object",
  14482. "properties": {
  14483. "read": {
  14484. "type": "number"
  14485. },
  14486. "write": {
  14487. "type": "number"
  14488. }
  14489. },
  14490. "required": ["read", "write"],
  14491. "additionalProperties": false
  14492. }
  14493. },
  14494. "required": ["input", "output", "cache"],
  14495. "additionalProperties": false
  14496. }
  14497. },
  14498. "required": ["input", "output", "cache"],
  14499. "additionalProperties": false
  14500. },
  14501. "limit": {
  14502. "type": "object",
  14503. "properties": {
  14504. "context": {
  14505. "type": "number"
  14506. },
  14507. "input": {
  14508. "type": "number"
  14509. },
  14510. "output": {
  14511. "type": "number"
  14512. }
  14513. },
  14514. "required": ["context", "output"],
  14515. "additionalProperties": false
  14516. },
  14517. "status": {
  14518. "type": "string",
  14519. "enum": ["alpha", "beta", "deprecated", "active"]
  14520. },
  14521. "options": {
  14522. "type": "object"
  14523. },
  14524. "headers": {
  14525. "type": "object",
  14526. "additionalProperties": {
  14527. "type": "string"
  14528. }
  14529. },
  14530. "release_date": {
  14531. "type": "string"
  14532. },
  14533. "variants": {
  14534. "type": "object",
  14535. "additionalProperties": {
  14536. "type": "object"
  14537. }
  14538. }
  14539. },
  14540. "required": [
  14541. "id",
  14542. "providerID",
  14543. "api",
  14544. "name",
  14545. "capabilities",
  14546. "cost",
  14547. "limit",
  14548. "status",
  14549. "options",
  14550. "headers",
  14551. "release_date"
  14552. ],
  14553. "additionalProperties": false
  14554. },
  14555. "Provider": {
  14556. "type": "object",
  14557. "properties": {
  14558. "id": {
  14559. "type": "string"
  14560. },
  14561. "name": {
  14562. "type": "string"
  14563. },
  14564. "source": {
  14565. "type": "string",
  14566. "enum": ["env", "config", "custom", "api"]
  14567. },
  14568. "env": {
  14569. "type": "array",
  14570. "items": {
  14571. "type": "string"
  14572. }
  14573. },
  14574. "key": {
  14575. "type": "string"
  14576. },
  14577. "options": {
  14578. "type": "object"
  14579. },
  14580. "models": {
  14581. "type": "object",
  14582. "additionalProperties": {
  14583. "$ref": "#/components/schemas/Model"
  14584. }
  14585. }
  14586. },
  14587. "required": ["id", "name", "source", "env", "options", "models"],
  14588. "additionalProperties": false
  14589. },
  14590. "ConsoleState": {
  14591. "type": "object",
  14592. "properties": {
  14593. "consoleManagedProviders": {
  14594. "type": "array",
  14595. "items": {
  14596. "type": "string"
  14597. }
  14598. },
  14599. "activeOrgName": {
  14600. "type": "string"
  14601. },
  14602. "switchableOrgCount": {
  14603. "type": "integer",
  14604. "minimum": 0
  14605. }
  14606. },
  14607. "required": ["consoleManagedProviders", "switchableOrgCount"],
  14608. "additionalProperties": false
  14609. },
  14610. "effect_HttpApiError_InternalServerError": {
  14611. "type": "object",
  14612. "properties": {
  14613. "_tag": {
  14614. "type": "string",
  14615. "enum": ["InternalServerError"]
  14616. }
  14617. },
  14618. "required": ["_tag"],
  14619. "additionalProperties": false
  14620. },
  14621. "ToolListItem": {
  14622. "type": "object",
  14623. "properties": {
  14624. "id": {
  14625. "type": "string"
  14626. },
  14627. "description": {
  14628. "type": "string"
  14629. },
  14630. "parameters": {}
  14631. },
  14632. "required": ["id", "description", "parameters"],
  14633. "additionalProperties": false
  14634. },
  14635. "ToolList": {
  14636. "type": "array",
  14637. "items": {
  14638. "$ref": "#/components/schemas/ToolListItem"
  14639. }
  14640. },
  14641. "ToolIDs": {
  14642. "type": "array",
  14643. "items": {
  14644. "type": "string"
  14645. }
  14646. },
  14647. "WorktreeError": {
  14648. "type": "object",
  14649. "properties": {
  14650. "name": {
  14651. "type": "string",
  14652. "enum": [
  14653. "WorktreeNotGitError",
  14654. "WorktreeNameGenerationFailedError",
  14655. "WorktreeCreateFailedError",
  14656. "WorktreeStartCommandFailedError",
  14657. "WorktreeRemoveFailedError",
  14658. "WorktreeResetFailedError",
  14659. "WorktreeListFailedError"
  14660. ]
  14661. },
  14662. "data": {
  14663. "type": "object",
  14664. "properties": {
  14665. "message": {
  14666. "type": "string"
  14667. }
  14668. },
  14669. "required": ["message"],
  14670. "additionalProperties": false
  14671. }
  14672. },
  14673. "required": ["name", "data"],
  14674. "additionalProperties": false
  14675. },
  14676. "WorktreeCreateInput": {
  14677. "type": "object",
  14678. "properties": {
  14679. "name": {
  14680. "type": "string"
  14681. },
  14682. "startCommand": {
  14683. "type": "string",
  14684. "description": "Additional startup script to run after the project's start command"
  14685. }
  14686. },
  14687. "additionalProperties": false
  14688. },
  14689. "Worktree": {
  14690. "type": "object",
  14691. "properties": {
  14692. "name": {
  14693. "type": "string"
  14694. },
  14695. "branch": {
  14696. "type": "string"
  14697. },
  14698. "directory": {
  14699. "type": "string"
  14700. }
  14701. },
  14702. "required": ["name", "directory"],
  14703. "additionalProperties": false
  14704. },
  14705. "WorktreeRemoveInput": {
  14706. "type": "object",
  14707. "properties": {
  14708. "directory": {
  14709. "type": "string"
  14710. }
  14711. },
  14712. "required": ["directory"],
  14713. "additionalProperties": false
  14714. },
  14715. "WorktreeResetInput": {
  14716. "type": "object",
  14717. "properties": {
  14718. "directory": {
  14719. "type": "string"
  14720. }
  14721. },
  14722. "required": ["directory"],
  14723. "additionalProperties": false
  14724. },
  14725. "ProjectSummary": {
  14726. "type": "object",
  14727. "properties": {
  14728. "id": {
  14729. "type": "string"
  14730. },
  14731. "name": {
  14732. "type": "string"
  14733. },
  14734. "worktree": {
  14735. "type": "string"
  14736. }
  14737. },
  14738. "required": ["id", "worktree"],
  14739. "additionalProperties": false
  14740. },
  14741. "GlobalSession": {
  14742. "type": "object",
  14743. "properties": {
  14744. "id": {
  14745. "type": "string",
  14746. "pattern": "^ses"
  14747. },
  14748. "slug": {
  14749. "type": "string"
  14750. },
  14751. "projectID": {
  14752. "type": "string"
  14753. },
  14754. "workspaceID": {
  14755. "type": "string",
  14756. "pattern": "^wrk"
  14757. },
  14758. "directory": {
  14759. "type": "string"
  14760. },
  14761. "path": {
  14762. "type": "string"
  14763. },
  14764. "parentID": {
  14765. "type": "string",
  14766. "pattern": "^ses"
  14767. },
  14768. "summary": {
  14769. "type": "object",
  14770. "properties": {
  14771. "additions": {
  14772. "type": "number"
  14773. },
  14774. "deletions": {
  14775. "type": "number"
  14776. },
  14777. "files": {
  14778. "type": "number"
  14779. },
  14780. "diffs": {
  14781. "type": "array",
  14782. "items": {
  14783. "$ref": "#/components/schemas/SnapshotFileDiff"
  14784. }
  14785. }
  14786. },
  14787. "required": ["additions", "deletions", "files"],
  14788. "additionalProperties": false
  14789. },
  14790. "cost": {
  14791. "type": "number"
  14792. },
  14793. "tokens": {
  14794. "type": "object",
  14795. "properties": {
  14796. "input": {
  14797. "type": "number"
  14798. },
  14799. "output": {
  14800. "type": "number"
  14801. },
  14802. "reasoning": {
  14803. "type": "number"
  14804. },
  14805. "cache": {
  14806. "type": "object",
  14807. "properties": {
  14808. "read": {
  14809. "type": "number"
  14810. },
  14811. "write": {
  14812. "type": "number"
  14813. }
  14814. },
  14815. "required": ["read", "write"],
  14816. "additionalProperties": false
  14817. }
  14818. },
  14819. "required": ["input", "output", "reasoning", "cache"],
  14820. "additionalProperties": false
  14821. },
  14822. "share": {
  14823. "type": "object",
  14824. "properties": {
  14825. "url": {
  14826. "type": "string"
  14827. }
  14828. },
  14829. "required": ["url"],
  14830. "additionalProperties": false
  14831. },
  14832. "title": {
  14833. "type": "string"
  14834. },
  14835. "agent": {
  14836. "type": "string"
  14837. },
  14838. "model": {
  14839. "type": "object",
  14840. "properties": {
  14841. "id": {
  14842. "type": "string"
  14843. },
  14844. "providerID": {
  14845. "type": "string"
  14846. },
  14847. "variant": {
  14848. "type": "string"
  14849. }
  14850. },
  14851. "required": ["id", "providerID"],
  14852. "additionalProperties": false
  14853. },
  14854. "version": {
  14855. "type": "string"
  14856. },
  14857. "time": {
  14858. "type": "object",
  14859. "properties": {
  14860. "created": {
  14861. "type": "integer",
  14862. "minimum": 0
  14863. },
  14864. "updated": {
  14865. "type": "integer",
  14866. "minimum": 0
  14867. },
  14868. "compacting": {
  14869. "type": "integer",
  14870. "minimum": 0
  14871. },
  14872. "archived": {
  14873. "type": "number"
  14874. }
  14875. },
  14876. "required": ["created", "updated"],
  14877. "additionalProperties": false
  14878. },
  14879. "permission": {
  14880. "$ref": "#/components/schemas/PermissionRuleset"
  14881. },
  14882. "revert": {
  14883. "type": "object",
  14884. "properties": {
  14885. "messageID": {
  14886. "type": "string",
  14887. "pattern": "^msg"
  14888. },
  14889. "partID": {
  14890. "type": "string",
  14891. "pattern": "^prt"
  14892. },
  14893. "snapshot": {
  14894. "type": "string"
  14895. },
  14896. "diff": {
  14897. "type": "string"
  14898. }
  14899. },
  14900. "required": ["messageID"],
  14901. "additionalProperties": false
  14902. },
  14903. "project": {
  14904. "anyOf": [
  14905. {
  14906. "$ref": "#/components/schemas/ProjectSummary"
  14907. },
  14908. {
  14909. "type": "null"
  14910. }
  14911. ]
  14912. }
  14913. },
  14914. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  14915. "additionalProperties": false
  14916. },
  14917. "McpResource": {
  14918. "type": "object",
  14919. "properties": {
  14920. "name": {
  14921. "type": "string"
  14922. },
  14923. "uri": {
  14924. "type": "string"
  14925. },
  14926. "description": {
  14927. "type": "string"
  14928. },
  14929. "mimeType": {
  14930. "type": "string"
  14931. },
  14932. "client": {
  14933. "type": "string"
  14934. }
  14935. },
  14936. "required": ["name", "uri", "client"],
  14937. "additionalProperties": false
  14938. },
  14939. "Symbol": {
  14940. "type": "object",
  14941. "properties": {
  14942. "name": {
  14943. "type": "string"
  14944. },
  14945. "kind": {
  14946. "type": "integer",
  14947. "minimum": 0
  14948. },
  14949. "location": {
  14950. "type": "object",
  14951. "properties": {
  14952. "uri": {
  14953. "type": "string"
  14954. },
  14955. "range": {
  14956. "$ref": "#/components/schemas/Range"
  14957. }
  14958. },
  14959. "required": ["uri", "range"],
  14960. "additionalProperties": false
  14961. }
  14962. },
  14963. "required": ["name", "kind", "location"],
  14964. "additionalProperties": false
  14965. },
  14966. "FileNode": {
  14967. "type": "object",
  14968. "properties": {
  14969. "name": {
  14970. "type": "string"
  14971. },
  14972. "path": {
  14973. "type": "string"
  14974. },
  14975. "absolute": {
  14976. "type": "string"
  14977. },
  14978. "type": {
  14979. "type": "string",
  14980. "enum": ["file", "directory"]
  14981. },
  14982. "ignored": {
  14983. "type": "boolean"
  14984. }
  14985. },
  14986. "required": ["name", "path", "absolute", "type", "ignored"],
  14987. "additionalProperties": false
  14988. },
  14989. "FileContent": {
  14990. "type": "object",
  14991. "properties": {
  14992. "type": {
  14993. "type": "string",
  14994. "enum": ["text", "binary"]
  14995. },
  14996. "content": {
  14997. "type": "string"
  14998. },
  14999. "diff": {
  15000. "type": "string"
  15001. },
  15002. "patch": {
  15003. "type": "object",
  15004. "properties": {
  15005. "oldFileName": {
  15006. "type": "string"
  15007. },
  15008. "newFileName": {
  15009. "type": "string"
  15010. },
  15011. "oldHeader": {
  15012. "type": "string"
  15013. },
  15014. "newHeader": {
  15015. "type": "string"
  15016. },
  15017. "hunks": {
  15018. "type": "array",
  15019. "items": {
  15020. "type": "object",
  15021. "properties": {
  15022. "oldStart": {
  15023. "type": "integer",
  15024. "minimum": 0
  15025. },
  15026. "oldLines": {
  15027. "type": "integer",
  15028. "minimum": 0
  15029. },
  15030. "newStart": {
  15031. "type": "integer",
  15032. "minimum": 0
  15033. },
  15034. "newLines": {
  15035. "type": "integer",
  15036. "minimum": 0
  15037. },
  15038. "lines": {
  15039. "type": "array",
  15040. "items": {
  15041. "type": "string"
  15042. }
  15043. }
  15044. },
  15045. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  15046. "additionalProperties": false
  15047. }
  15048. },
  15049. "index": {
  15050. "type": "string"
  15051. }
  15052. },
  15053. "required": ["oldFileName", "newFileName", "hunks"],
  15054. "additionalProperties": false
  15055. },
  15056. "encoding": {
  15057. "type": "string",
  15058. "enum": ["base64"]
  15059. },
  15060. "mimeType": {
  15061. "type": "string"
  15062. }
  15063. },
  15064. "required": ["type", "content"],
  15065. "additionalProperties": false
  15066. },
  15067. "File": {
  15068. "type": "object",
  15069. "properties": {
  15070. "path": {
  15071. "type": "string"
  15072. },
  15073. "added": {
  15074. "type": "integer",
  15075. "minimum": 0
  15076. },
  15077. "removed": {
  15078. "type": "integer",
  15079. "minimum": 0
  15080. },
  15081. "status": {
  15082. "type": "string",
  15083. "enum": ["added", "deleted", "modified"]
  15084. }
  15085. },
  15086. "required": ["path", "added", "removed", "status"],
  15087. "additionalProperties": false
  15088. },
  15089. "Path": {
  15090. "type": "object",
  15091. "properties": {
  15092. "home": {
  15093. "type": "string"
  15094. },
  15095. "state": {
  15096. "type": "string"
  15097. },
  15098. "config": {
  15099. "type": "string"
  15100. },
  15101. "worktree": {
  15102. "type": "string"
  15103. },
  15104. "directory": {
  15105. "type": "string"
  15106. }
  15107. },
  15108. "required": ["home", "state", "config", "worktree", "directory"],
  15109. "additionalProperties": false
  15110. },
  15111. "VcsInfo": {
  15112. "type": "object",
  15113. "properties": {
  15114. "branch": {
  15115. "type": "string"
  15116. },
  15117. "default_branch": {
  15118. "type": "string"
  15119. }
  15120. },
  15121. "additionalProperties": false
  15122. },
  15123. "VcsFileStatus": {
  15124. "type": "object",
  15125. "properties": {
  15126. "file": {
  15127. "type": "string"
  15128. },
  15129. "additions": {
  15130. "type": "number"
  15131. },
  15132. "deletions": {
  15133. "type": "number"
  15134. },
  15135. "status": {
  15136. "type": "string",
  15137. "enum": ["added", "deleted", "modified"]
  15138. }
  15139. },
  15140. "required": ["file", "additions", "deletions", "status"],
  15141. "additionalProperties": false
  15142. },
  15143. "VcsFileDiff": {
  15144. "type": "object",
  15145. "properties": {
  15146. "file": {
  15147. "type": "string"
  15148. },
  15149. "patch": {
  15150. "type": "string"
  15151. },
  15152. "additions": {
  15153. "type": "number"
  15154. },
  15155. "deletions": {
  15156. "type": "number"
  15157. },
  15158. "status": {
  15159. "type": "string",
  15160. "enum": ["added", "deleted", "modified"]
  15161. }
  15162. },
  15163. "required": ["file", "additions", "deletions"],
  15164. "additionalProperties": false
  15165. },
  15166. "VcsApplyError": {
  15167. "type": "object",
  15168. "properties": {
  15169. "name": {
  15170. "type": "string",
  15171. "enum": ["VcsApplyError"]
  15172. },
  15173. "data": {
  15174. "type": "object",
  15175. "properties": {
  15176. "message": {
  15177. "type": "string"
  15178. },
  15179. "reason": {
  15180. "type": "string",
  15181. "enum": ["non-git", "not-clean"]
  15182. }
  15183. },
  15184. "required": ["message", "reason"],
  15185. "additionalProperties": false
  15186. }
  15187. },
  15188. "required": ["name", "data"],
  15189. "additionalProperties": false
  15190. },
  15191. "Command": {
  15192. "type": "object",
  15193. "properties": {
  15194. "name": {
  15195. "type": "string"
  15196. },
  15197. "description": {
  15198. "type": "string"
  15199. },
  15200. "agent": {
  15201. "type": "string"
  15202. },
  15203. "model": {
  15204. "type": "string"
  15205. },
  15206. "source": {
  15207. "type": "string",
  15208. "enum": ["command", "mcp", "skill"]
  15209. },
  15210. "template": {
  15211. "type": "string"
  15212. },
  15213. "subtask": {
  15214. "type": "boolean"
  15215. },
  15216. "hints": {
  15217. "type": "array",
  15218. "items": {
  15219. "type": "string"
  15220. }
  15221. }
  15222. },
  15223. "required": ["name", "template", "hints"],
  15224. "additionalProperties": false
  15225. },
  15226. "Agent": {
  15227. "type": "object",
  15228. "properties": {
  15229. "name": {
  15230. "type": "string"
  15231. },
  15232. "description": {
  15233. "type": "string"
  15234. },
  15235. "mode": {
  15236. "type": "string",
  15237. "enum": ["subagent", "primary", "all"]
  15238. },
  15239. "native": {
  15240. "type": "boolean"
  15241. },
  15242. "hidden": {
  15243. "type": "boolean"
  15244. },
  15245. "topP": {
  15246. "type": "number"
  15247. },
  15248. "temperature": {
  15249. "type": "number"
  15250. },
  15251. "color": {
  15252. "type": "string"
  15253. },
  15254. "permission": {
  15255. "$ref": "#/components/schemas/PermissionRuleset"
  15256. },
  15257. "model": {
  15258. "type": "object",
  15259. "properties": {
  15260. "modelID": {
  15261. "type": "string"
  15262. },
  15263. "providerID": {
  15264. "type": "string"
  15265. }
  15266. },
  15267. "required": ["modelID", "providerID"],
  15268. "additionalProperties": false
  15269. },
  15270. "variant": {
  15271. "type": "string"
  15272. },
  15273. "prompt": {
  15274. "type": "string"
  15275. },
  15276. "options": {
  15277. "type": "object"
  15278. },
  15279. "steps": {
  15280. "type": "number"
  15281. }
  15282. },
  15283. "required": ["name", "mode", "permission", "options"],
  15284. "additionalProperties": false
  15285. },
  15286. "LSPStatus": {
  15287. "type": "object",
  15288. "properties": {
  15289. "id": {
  15290. "type": "string"
  15291. },
  15292. "name": {
  15293. "type": "string"
  15294. },
  15295. "root": {
  15296. "type": "string"
  15297. },
  15298. "status": {
  15299. "type": "string",
  15300. "enum": ["connected", "error"]
  15301. }
  15302. },
  15303. "required": ["id", "name", "root", "status"],
  15304. "additionalProperties": false
  15305. },
  15306. "FormatterStatus": {
  15307. "type": "object",
  15308. "properties": {
  15309. "name": {
  15310. "type": "string"
  15311. },
  15312. "extensions": {
  15313. "type": "array",
  15314. "items": {
  15315. "type": "string"
  15316. }
  15317. },
  15318. "enabled": {
  15319. "type": "boolean"
  15320. }
  15321. },
  15322. "required": ["name", "extensions", "enabled"],
  15323. "additionalProperties": false
  15324. },
  15325. "MCPStatusConnected": {
  15326. "type": "object",
  15327. "properties": {
  15328. "status": {
  15329. "type": "string",
  15330. "enum": ["connected"]
  15331. }
  15332. },
  15333. "required": ["status"],
  15334. "additionalProperties": false
  15335. },
  15336. "MCPStatusDisabled": {
  15337. "type": "object",
  15338. "properties": {
  15339. "status": {
  15340. "type": "string",
  15341. "enum": ["disabled"]
  15342. }
  15343. },
  15344. "required": ["status"],
  15345. "additionalProperties": false
  15346. },
  15347. "MCPStatusFailed": {
  15348. "type": "object",
  15349. "properties": {
  15350. "status": {
  15351. "type": "string",
  15352. "enum": ["failed"]
  15353. },
  15354. "error": {
  15355. "type": "string"
  15356. }
  15357. },
  15358. "required": ["status", "error"],
  15359. "additionalProperties": false
  15360. },
  15361. "MCPStatusNeedsAuth": {
  15362. "type": "object",
  15363. "properties": {
  15364. "status": {
  15365. "type": "string",
  15366. "enum": ["needs_auth"]
  15367. }
  15368. },
  15369. "required": ["status"],
  15370. "additionalProperties": false
  15371. },
  15372. "MCPStatusNeedsClientRegistration": {
  15373. "type": "object",
  15374. "properties": {
  15375. "status": {
  15376. "type": "string",
  15377. "enum": ["needs_client_registration"]
  15378. },
  15379. "error": {
  15380. "type": "string"
  15381. }
  15382. },
  15383. "required": ["status", "error"],
  15384. "additionalProperties": false
  15385. },
  15386. "MCPStatus": {
  15387. "anyOf": [
  15388. {
  15389. "$ref": "#/components/schemas/MCPStatusConnected"
  15390. },
  15391. {
  15392. "$ref": "#/components/schemas/MCPStatusDisabled"
  15393. },
  15394. {
  15395. "$ref": "#/components/schemas/MCPStatusFailed"
  15396. },
  15397. {
  15398. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  15399. },
  15400. {
  15401. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  15402. }
  15403. ]
  15404. },
  15405. "McpUnsupportedOAuthError": {
  15406. "type": "object",
  15407. "properties": {
  15408. "error": {
  15409. "type": "string"
  15410. }
  15411. },
  15412. "required": ["error"],
  15413. "additionalProperties": false
  15414. },
  15415. "McpServerNotFoundError": {
  15416. "type": "object",
  15417. "properties": {
  15418. "_tag": {
  15419. "type": "string",
  15420. "enum": ["McpServerNotFoundError"]
  15421. },
  15422. "name": {
  15423. "type": "string"
  15424. },
  15425. "message": {
  15426. "type": "string"
  15427. }
  15428. },
  15429. "required": ["_tag", "name", "message"],
  15430. "additionalProperties": false
  15431. },
  15432. "PtyNotFoundError": {
  15433. "type": "object",
  15434. "properties": {
  15435. "_tag": {
  15436. "type": "string",
  15437. "enum": ["PtyNotFoundError"]
  15438. },
  15439. "ptyID": {
  15440. "type": "string"
  15441. },
  15442. "message": {
  15443. "type": "string"
  15444. }
  15445. },
  15446. "required": ["_tag", "ptyID", "message"],
  15447. "additionalProperties": false
  15448. },
  15449. "PtyForbiddenError": {
  15450. "type": "object",
  15451. "properties": {
  15452. "_tag": {
  15453. "type": "string",
  15454. "enum": ["PtyForbiddenError"]
  15455. },
  15456. "message": {
  15457. "type": "string"
  15458. }
  15459. },
  15460. "required": ["_tag", "message"],
  15461. "additionalProperties": false
  15462. },
  15463. "QuestionNotFoundError": {
  15464. "type": "object",
  15465. "properties": {
  15466. "_tag": {
  15467. "type": "string",
  15468. "enum": ["QuestionNotFoundError"]
  15469. },
  15470. "requestID": {
  15471. "type": "string"
  15472. },
  15473. "message": {
  15474. "type": "string"
  15475. }
  15476. },
  15477. "required": ["_tag", "requestID", "message"],
  15478. "additionalProperties": false
  15479. },
  15480. "PermissionNotFoundError": {
  15481. "type": "object",
  15482. "properties": {
  15483. "_tag": {
  15484. "type": "string",
  15485. "enum": ["PermissionNotFoundError"]
  15486. },
  15487. "requestID": {
  15488. "type": "string"
  15489. },
  15490. "message": {
  15491. "type": "string"
  15492. }
  15493. },
  15494. "required": ["_tag", "requestID", "message"],
  15495. "additionalProperties": false
  15496. },
  15497. "ProviderAuthMethod": {
  15498. "type": "object",
  15499. "properties": {
  15500. "type": {
  15501. "type": "string",
  15502. "enum": ["oauth", "api"]
  15503. },
  15504. "label": {
  15505. "type": "string"
  15506. },
  15507. "prompts": {
  15508. "type": "array",
  15509. "items": {
  15510. "anyOf": [
  15511. {
  15512. "type": "object",
  15513. "properties": {
  15514. "type": {
  15515. "type": "string",
  15516. "enum": ["text"]
  15517. },
  15518. "key": {
  15519. "type": "string"
  15520. },
  15521. "message": {
  15522. "type": "string"
  15523. },
  15524. "placeholder": {
  15525. "type": "string"
  15526. },
  15527. "when": {
  15528. "type": "object",
  15529. "properties": {
  15530. "key": {
  15531. "type": "string"
  15532. },
  15533. "op": {
  15534. "type": "string",
  15535. "enum": ["eq", "neq"]
  15536. },
  15537. "value": {
  15538. "type": "string"
  15539. }
  15540. },
  15541. "required": ["key", "op", "value"],
  15542. "additionalProperties": false
  15543. }
  15544. },
  15545. "required": ["type", "key", "message"],
  15546. "additionalProperties": false
  15547. },
  15548. {
  15549. "type": "object",
  15550. "properties": {
  15551. "type": {
  15552. "type": "string",
  15553. "enum": ["select"]
  15554. },
  15555. "key": {
  15556. "type": "string"
  15557. },
  15558. "message": {
  15559. "type": "string"
  15560. },
  15561. "options": {
  15562. "type": "array",
  15563. "items": {
  15564. "type": "object",
  15565. "properties": {
  15566. "label": {
  15567. "type": "string"
  15568. },
  15569. "value": {
  15570. "type": "string"
  15571. },
  15572. "hint": {
  15573. "type": "string"
  15574. }
  15575. },
  15576. "required": ["label", "value"],
  15577. "additionalProperties": false
  15578. }
  15579. },
  15580. "when": {
  15581. "type": "object",
  15582. "properties": {
  15583. "key": {
  15584. "type": "string"
  15585. },
  15586. "op": {
  15587. "type": "string",
  15588. "enum": ["eq", "neq"]
  15589. },
  15590. "value": {
  15591. "type": "string"
  15592. }
  15593. },
  15594. "required": ["key", "op", "value"],
  15595. "additionalProperties": false
  15596. }
  15597. },
  15598. "required": ["type", "key", "message", "options"],
  15599. "additionalProperties": false
  15600. }
  15601. ]
  15602. }
  15603. }
  15604. },
  15605. "required": ["type", "label"],
  15606. "additionalProperties": false
  15607. },
  15608. "ProviderAuthAuthorization": {
  15609. "type": "object",
  15610. "properties": {
  15611. "url": {
  15612. "type": "string"
  15613. },
  15614. "method": {
  15615. "type": "string",
  15616. "enum": ["auto", "code"]
  15617. },
  15618. "instructions": {
  15619. "type": "string"
  15620. }
  15621. },
  15622. "required": ["url", "method", "instructions"],
  15623. "additionalProperties": false
  15624. },
  15625. "ProviderAuthError1": {
  15626. "type": "object",
  15627. "properties": {
  15628. "name": {
  15629. "type": "string",
  15630. "enum": [
  15631. "BadRequest",
  15632. "ProviderAuthOauthMissing",
  15633. "ProviderAuthOauthCodeMissing",
  15634. "ProviderAuthOauthCallbackFailed",
  15635. "ProviderAuthValidationFailed"
  15636. ]
  15637. },
  15638. "data": {
  15639. "type": "object",
  15640. "properties": {
  15641. "providerID": {
  15642. "type": "string"
  15643. },
  15644. "field": {
  15645. "type": "string"
  15646. },
  15647. "message": {
  15648. "type": "string"
  15649. },
  15650. "kind": {
  15651. "type": "string"
  15652. }
  15653. },
  15654. "additionalProperties": false
  15655. }
  15656. },
  15657. "required": ["name", "data"],
  15658. "additionalProperties": false
  15659. },
  15660. "NotFoundError": {
  15661. "type": "object",
  15662. "required": ["name", "data"],
  15663. "properties": {
  15664. "name": {
  15665. "type": "string",
  15666. "enum": ["NotFoundError"]
  15667. },
  15668. "data": {
  15669. "type": "object",
  15670. "required": ["message"],
  15671. "properties": {
  15672. "message": {
  15673. "type": "string"
  15674. }
  15675. }
  15676. }
  15677. }
  15678. },
  15679. "TextPartInput": {
  15680. "type": "object",
  15681. "properties": {
  15682. "id": {
  15683. "type": "string",
  15684. "pattern": "^prt"
  15685. },
  15686. "type": {
  15687. "type": "string",
  15688. "enum": ["text"]
  15689. },
  15690. "text": {
  15691. "type": "string"
  15692. },
  15693. "synthetic": {
  15694. "type": "boolean"
  15695. },
  15696. "ignored": {
  15697. "type": "boolean"
  15698. },
  15699. "time": {
  15700. "type": "object",
  15701. "properties": {
  15702. "start": {
  15703. "type": "integer",
  15704. "minimum": 0
  15705. },
  15706. "end": {
  15707. "type": "integer",
  15708. "minimum": 0
  15709. }
  15710. },
  15711. "required": ["start"],
  15712. "additionalProperties": false
  15713. },
  15714. "metadata": {
  15715. "type": "object"
  15716. }
  15717. },
  15718. "required": ["type", "text"],
  15719. "additionalProperties": false
  15720. },
  15721. "FilePartInput": {
  15722. "type": "object",
  15723. "properties": {
  15724. "id": {
  15725. "type": "string",
  15726. "pattern": "^prt"
  15727. },
  15728. "type": {
  15729. "type": "string",
  15730. "enum": ["file"]
  15731. },
  15732. "mime": {
  15733. "type": "string"
  15734. },
  15735. "filename": {
  15736. "type": "string"
  15737. },
  15738. "url": {
  15739. "type": "string"
  15740. },
  15741. "source": {
  15742. "$ref": "#/components/schemas/FilePartSource"
  15743. }
  15744. },
  15745. "required": ["type", "mime", "url"],
  15746. "additionalProperties": false
  15747. },
  15748. "AgentPartInput": {
  15749. "type": "object",
  15750. "properties": {
  15751. "id": {
  15752. "type": "string",
  15753. "pattern": "^prt"
  15754. },
  15755. "type": {
  15756. "type": "string",
  15757. "enum": ["agent"]
  15758. },
  15759. "name": {
  15760. "type": "string"
  15761. },
  15762. "source": {
  15763. "type": "object",
  15764. "properties": {
  15765. "value": {
  15766. "type": "string"
  15767. },
  15768. "start": {
  15769. "type": "integer",
  15770. "minimum": 0
  15771. },
  15772. "end": {
  15773. "type": "integer",
  15774. "minimum": 0
  15775. }
  15776. },
  15777. "required": ["value", "start", "end"],
  15778. "additionalProperties": false
  15779. }
  15780. },
  15781. "required": ["type", "name"],
  15782. "additionalProperties": false
  15783. },
  15784. "SubtaskPartInput": {
  15785. "type": "object",
  15786. "properties": {
  15787. "id": {
  15788. "type": "string",
  15789. "pattern": "^prt"
  15790. },
  15791. "type": {
  15792. "type": "string",
  15793. "enum": ["subtask"]
  15794. },
  15795. "prompt": {
  15796. "type": "string"
  15797. },
  15798. "description": {
  15799. "type": "string"
  15800. },
  15801. "agent": {
  15802. "type": "string"
  15803. },
  15804. "model": {
  15805. "type": "object",
  15806. "properties": {
  15807. "providerID": {
  15808. "type": "string"
  15809. },
  15810. "modelID": {
  15811. "type": "string"
  15812. }
  15813. },
  15814. "required": ["providerID", "modelID"],
  15815. "additionalProperties": false
  15816. },
  15817. "command": {
  15818. "type": "string"
  15819. }
  15820. },
  15821. "required": ["type", "prompt", "description", "agent"],
  15822. "additionalProperties": false
  15823. },
  15824. "SessionBusyError": {
  15825. "type": "object",
  15826. "properties": {
  15827. "_tag": {
  15828. "type": "string",
  15829. "enum": ["SessionBusyError"]
  15830. },
  15831. "sessionID": {
  15832. "type": "string"
  15833. },
  15834. "message": {
  15835. "type": "string"
  15836. }
  15837. },
  15838. "required": ["_tag", "sessionID", "message"],
  15839. "additionalProperties": false
  15840. },
  15841. "V2SessionsResponse": {
  15842. "type": "object",
  15843. "properties": {
  15844. "items": {
  15845. "type": "array",
  15846. "items": {
  15847. "$ref": "#/components/schemas/SessionInfo"
  15848. }
  15849. },
  15850. "cursor": {
  15851. "type": "object",
  15852. "properties": {
  15853. "previous": {
  15854. "type": "string"
  15855. },
  15856. "next": {
  15857. "type": "string"
  15858. }
  15859. },
  15860. "additionalProperties": false
  15861. }
  15862. },
  15863. "required": ["items", "cursor"],
  15864. "additionalProperties": false
  15865. },
  15866. "InvalidCursorError": {
  15867. "type": "object",
  15868. "properties": {
  15869. "_tag": {
  15870. "type": "string",
  15871. "enum": ["InvalidCursorError"]
  15872. },
  15873. "message": {
  15874. "type": "string"
  15875. }
  15876. },
  15877. "required": ["_tag", "message"],
  15878. "additionalProperties": false
  15879. },
  15880. "UnauthorizedError": {
  15881. "type": "object",
  15882. "properties": {
  15883. "_tag": {
  15884. "type": "string",
  15885. "enum": ["UnauthorizedError"]
  15886. },
  15887. "message": {
  15888. "type": "string"
  15889. }
  15890. },
  15891. "required": ["_tag", "message"],
  15892. "additionalProperties": false
  15893. },
  15894. "SessionNotFoundError": {
  15895. "type": "object",
  15896. "properties": {
  15897. "_tag": {
  15898. "type": "string",
  15899. "enum": ["SessionNotFoundError"]
  15900. },
  15901. "sessionID": {
  15902. "type": "string"
  15903. },
  15904. "message": {
  15905. "type": "string"
  15906. }
  15907. },
  15908. "required": ["_tag", "sessionID", "message"],
  15909. "additionalProperties": false
  15910. },
  15911. "ServiceUnavailableError": {
  15912. "type": "object",
  15913. "properties": {
  15914. "_tag": {
  15915. "type": "string",
  15916. "enum": ["ServiceUnavailableError"]
  15917. },
  15918. "message": {
  15919. "type": "string"
  15920. },
  15921. "service": {
  15922. "type": "string"
  15923. }
  15924. },
  15925. "required": ["_tag", "message"],
  15926. "additionalProperties": false
  15927. },
  15928. "UnknownError1": {
  15929. "type": "object",
  15930. "properties": {
  15931. "_tag": {
  15932. "type": "string",
  15933. "enum": ["UnknownError"]
  15934. },
  15935. "message": {
  15936. "type": "string"
  15937. },
  15938. "ref": {
  15939. "type": "string"
  15940. }
  15941. },
  15942. "required": ["_tag", "message"],
  15943. "additionalProperties": false
  15944. },
  15945. "V2SessionMessagesResponse": {
  15946. "type": "object",
  15947. "properties": {
  15948. "items": {
  15949. "type": "array",
  15950. "items": {
  15951. "$ref": "#/components/schemas/SessionMessage"
  15952. }
  15953. },
  15954. "cursor": {
  15955. "type": "object",
  15956. "properties": {
  15957. "previous": {
  15958. "type": "string"
  15959. },
  15960. "next": {
  15961. "type": "string"
  15962. }
  15963. },
  15964. "additionalProperties": false
  15965. }
  15966. },
  15967. "required": ["items", "cursor"],
  15968. "additionalProperties": false
  15969. },
  15970. "ProviderNotFoundError": {
  15971. "type": "object",
  15972. "properties": {
  15973. "_tag": {
  15974. "type": "string",
  15975. "enum": ["ProviderNotFoundError"]
  15976. },
  15977. "providerID": {
  15978. "type": "string"
  15979. },
  15980. "message": {
  15981. "type": "string"
  15982. }
  15983. },
  15984. "required": ["_tag", "providerID", "message"],
  15985. "additionalProperties": false
  15986. },
  15987. "EventTuiPromptAppend": {
  15988. "type": "object",
  15989. "properties": {
  15990. "type": {
  15991. "type": "string",
  15992. "enum": ["tui.prompt.append"]
  15993. },
  15994. "properties": {
  15995. "type": "object",
  15996. "properties": {
  15997. "text": {
  15998. "type": "string"
  15999. }
  16000. },
  16001. "required": ["text"],
  16002. "additionalProperties": false
  16003. }
  16004. },
  16005. "required": ["type", "properties"],
  16006. "additionalProperties": false
  16007. },
  16008. "EventTuiCommandExecute": {
  16009. "type": "object",
  16010. "properties": {
  16011. "type": {
  16012. "type": "string",
  16013. "enum": ["tui.command.execute"]
  16014. },
  16015. "properties": {
  16016. "type": "object",
  16017. "properties": {
  16018. "command": {
  16019. "anyOf": [
  16020. {
  16021. "type": "string",
  16022. "enum": [
  16023. "session.list",
  16024. "session.new",
  16025. "session.share",
  16026. "session.interrupt",
  16027. "session.compact",
  16028. "session.page.up",
  16029. "session.page.down",
  16030. "session.line.up",
  16031. "session.line.down",
  16032. "session.half.page.up",
  16033. "session.half.page.down",
  16034. "session.first",
  16035. "session.last",
  16036. "prompt.clear",
  16037. "prompt.submit",
  16038. "agent.cycle"
  16039. ]
  16040. },
  16041. {
  16042. "type": "string"
  16043. }
  16044. ]
  16045. }
  16046. },
  16047. "required": ["command"],
  16048. "additionalProperties": false
  16049. }
  16050. },
  16051. "required": ["type", "properties"],
  16052. "additionalProperties": false
  16053. },
  16054. "EventTuiToastShow": {
  16055. "type": "object",
  16056. "properties": {
  16057. "type": {
  16058. "type": "string",
  16059. "enum": ["tui.toast.show"]
  16060. },
  16061. "properties": {
  16062. "type": "object",
  16063. "properties": {
  16064. "title": {
  16065. "type": "string"
  16066. },
  16067. "message": {
  16068. "type": "string"
  16069. },
  16070. "variant": {
  16071. "type": "string",
  16072. "enum": ["info", "success", "warning", "error"]
  16073. },
  16074. "duration": {
  16075. "type": "integer",
  16076. "exclusiveMinimum": 0
  16077. }
  16078. },
  16079. "required": ["message", "variant"],
  16080. "additionalProperties": false
  16081. }
  16082. },
  16083. "required": ["type", "properties"],
  16084. "additionalProperties": false
  16085. },
  16086. "EventTuiSessionSelect": {
  16087. "type": "object",
  16088. "properties": {
  16089. "type": {
  16090. "type": "string",
  16091. "enum": ["tui.session.select"]
  16092. },
  16093. "properties": {
  16094. "type": "object",
  16095. "properties": {
  16096. "sessionID": {
  16097. "type": "string",
  16098. "pattern": "^ses",
  16099. "description": "Session ID to navigate to"
  16100. }
  16101. },
  16102. "required": ["sessionID"],
  16103. "additionalProperties": false
  16104. }
  16105. },
  16106. "required": ["type", "properties"],
  16107. "additionalProperties": false
  16108. },
  16109. "Workspace": {
  16110. "type": "object",
  16111. "properties": {
  16112. "id": {
  16113. "type": "string",
  16114. "pattern": "^wrk"
  16115. },
  16116. "type": {
  16117. "type": "string"
  16118. },
  16119. "name": {
  16120. "type": "string"
  16121. },
  16122. "branch": {
  16123. "anyOf": [
  16124. {
  16125. "type": "string"
  16126. },
  16127. {
  16128. "type": "null"
  16129. }
  16130. ]
  16131. },
  16132. "directory": {
  16133. "anyOf": [
  16134. {
  16135. "type": "string"
  16136. },
  16137. {
  16138. "type": "null"
  16139. }
  16140. ]
  16141. },
  16142. "extra": {
  16143. "anyOf": [
  16144. {},
  16145. {
  16146. "type": "null"
  16147. }
  16148. ]
  16149. },
  16150. "projectID": {
  16151. "type": "string"
  16152. },
  16153. "timeUsed": {
  16154. "anyOf": [
  16155. {
  16156. "type": "number"
  16157. },
  16158. {
  16159. "type": "string",
  16160. "enum": ["NaN"]
  16161. },
  16162. {
  16163. "type": "string",
  16164. "enum": ["Infinity"]
  16165. },
  16166. {
  16167. "type": "string",
  16168. "enum": ["-Infinity"]
  16169. },
  16170. {
  16171. "type": "string",
  16172. "enum": ["Infinity", "-Infinity", "NaN"]
  16173. }
  16174. ]
  16175. }
  16176. },
  16177. "required": ["id", "type", "name", "projectID", "timeUsed"],
  16178. "additionalProperties": false
  16179. },
  16180. "WorkspaceWarpError": {
  16181. "type": "object",
  16182. "properties": {
  16183. "name": {
  16184. "type": "string",
  16185. "enum": ["WorkspaceWarpError"]
  16186. },
  16187. "data": {
  16188. "type": "object",
  16189. "properties": {
  16190. "message": {
  16191. "type": "string"
  16192. }
  16193. },
  16194. "required": ["message"],
  16195. "additionalProperties": false
  16196. }
  16197. },
  16198. "required": ["name", "data"],
  16199. "additionalProperties": false
  16200. },
  16201. "effect_HttpApiError_Forbidden": {
  16202. "type": "object",
  16203. "properties": {
  16204. "_tag": {
  16205. "type": "string",
  16206. "enum": ["Forbidden"]
  16207. }
  16208. },
  16209. "required": ["_tag"],
  16210. "additionalProperties": false
  16211. },
  16212. "SyncEventMessageUpdated": {
  16213. "type": "object",
  16214. "properties": {
  16215. "type": {
  16216. "type": "string",
  16217. "enum": ["sync"]
  16218. },
  16219. "name": {
  16220. "type": "string",
  16221. "enum": ["message.updated.1"]
  16222. },
  16223. "id": {
  16224. "type": "string"
  16225. },
  16226. "seq": {
  16227. "type": "number"
  16228. },
  16229. "aggregateID": {
  16230. "type": "string",
  16231. "enum": ["sessionID"]
  16232. },
  16233. "data": {
  16234. "type": "object",
  16235. "properties": {
  16236. "sessionID": {
  16237. "type": "string",
  16238. "pattern": "^ses"
  16239. },
  16240. "info": {
  16241. "$ref": "#/components/schemas/Message"
  16242. }
  16243. },
  16244. "required": ["sessionID", "info"],
  16245. "additionalProperties": false
  16246. }
  16247. },
  16248. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16249. "additionalProperties": false
  16250. },
  16251. "SyncEventMessageRemoved": {
  16252. "type": "object",
  16253. "properties": {
  16254. "type": {
  16255. "type": "string",
  16256. "enum": ["sync"]
  16257. },
  16258. "name": {
  16259. "type": "string",
  16260. "enum": ["message.removed.1"]
  16261. },
  16262. "id": {
  16263. "type": "string"
  16264. },
  16265. "seq": {
  16266. "type": "number"
  16267. },
  16268. "aggregateID": {
  16269. "type": "string",
  16270. "enum": ["sessionID"]
  16271. },
  16272. "data": {
  16273. "type": "object",
  16274. "properties": {
  16275. "sessionID": {
  16276. "type": "string",
  16277. "pattern": "^ses"
  16278. },
  16279. "messageID": {
  16280. "type": "string",
  16281. "pattern": "^msg"
  16282. }
  16283. },
  16284. "required": ["sessionID", "messageID"],
  16285. "additionalProperties": false
  16286. }
  16287. },
  16288. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16289. "additionalProperties": false
  16290. },
  16291. "SyncEventMessagePartUpdated": {
  16292. "type": "object",
  16293. "properties": {
  16294. "type": {
  16295. "type": "string",
  16296. "enum": ["sync"]
  16297. },
  16298. "name": {
  16299. "type": "string",
  16300. "enum": ["message.part.updated.1"]
  16301. },
  16302. "id": {
  16303. "type": "string"
  16304. },
  16305. "seq": {
  16306. "type": "number"
  16307. },
  16308. "aggregateID": {
  16309. "type": "string",
  16310. "enum": ["sessionID"]
  16311. },
  16312. "data": {
  16313. "type": "object",
  16314. "properties": {
  16315. "sessionID": {
  16316. "type": "string",
  16317. "pattern": "^ses"
  16318. },
  16319. "part": {
  16320. "$ref": "#/components/schemas/Part"
  16321. },
  16322. "time": {
  16323. "type": "integer",
  16324. "minimum": 0
  16325. }
  16326. },
  16327. "required": ["sessionID", "part", "time"],
  16328. "additionalProperties": false
  16329. }
  16330. },
  16331. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16332. "additionalProperties": false
  16333. },
  16334. "SyncEventMessagePartRemoved": {
  16335. "type": "object",
  16336. "properties": {
  16337. "type": {
  16338. "type": "string",
  16339. "enum": ["sync"]
  16340. },
  16341. "name": {
  16342. "type": "string",
  16343. "enum": ["message.part.removed.1"]
  16344. },
  16345. "id": {
  16346. "type": "string"
  16347. },
  16348. "seq": {
  16349. "type": "number"
  16350. },
  16351. "aggregateID": {
  16352. "type": "string",
  16353. "enum": ["sessionID"]
  16354. },
  16355. "data": {
  16356. "type": "object",
  16357. "properties": {
  16358. "sessionID": {
  16359. "type": "string",
  16360. "pattern": "^ses"
  16361. },
  16362. "messageID": {
  16363. "type": "string",
  16364. "pattern": "^msg"
  16365. },
  16366. "partID": {
  16367. "type": "string",
  16368. "pattern": "^prt"
  16369. }
  16370. },
  16371. "required": ["sessionID", "messageID", "partID"],
  16372. "additionalProperties": false
  16373. }
  16374. },
  16375. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16376. "additionalProperties": false
  16377. },
  16378. "SyncEventSessionCreated": {
  16379. "type": "object",
  16380. "properties": {
  16381. "type": {
  16382. "type": "string",
  16383. "enum": ["sync"]
  16384. },
  16385. "name": {
  16386. "type": "string",
  16387. "enum": ["session.created.1"]
  16388. },
  16389. "id": {
  16390. "type": "string"
  16391. },
  16392. "seq": {
  16393. "type": "number"
  16394. },
  16395. "aggregateID": {
  16396. "type": "string",
  16397. "enum": ["sessionID"]
  16398. },
  16399. "data": {
  16400. "type": "object",
  16401. "properties": {
  16402. "sessionID": {
  16403. "type": "string",
  16404. "pattern": "^ses"
  16405. },
  16406. "info": {
  16407. "$ref": "#/components/schemas/Session"
  16408. }
  16409. },
  16410. "required": ["sessionID", "info"],
  16411. "additionalProperties": false
  16412. }
  16413. },
  16414. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16415. "additionalProperties": false
  16416. },
  16417. "SyncEventSessionUpdated": {
  16418. "type": "object",
  16419. "properties": {
  16420. "type": {
  16421. "type": "string",
  16422. "enum": ["sync"]
  16423. },
  16424. "name": {
  16425. "type": "string",
  16426. "enum": ["session.updated.1"]
  16427. },
  16428. "id": {
  16429. "type": "string"
  16430. },
  16431. "seq": {
  16432. "type": "number"
  16433. },
  16434. "aggregateID": {
  16435. "type": "string",
  16436. "enum": ["sessionID"]
  16437. },
  16438. "data": {
  16439. "type": "object",
  16440. "properties": {
  16441. "sessionID": {
  16442. "type": "string",
  16443. "pattern": "^ses"
  16444. },
  16445. "info": {
  16446. "type": "object",
  16447. "properties": {
  16448. "id": {
  16449. "anyOf": [
  16450. {
  16451. "type": "string",
  16452. "pattern": "^ses"
  16453. },
  16454. {
  16455. "type": "null"
  16456. }
  16457. ]
  16458. },
  16459. "slug": {
  16460. "anyOf": [
  16461. {
  16462. "type": "string"
  16463. },
  16464. {
  16465. "type": "null"
  16466. }
  16467. ]
  16468. },
  16469. "projectID": {
  16470. "anyOf": [
  16471. {
  16472. "type": "string"
  16473. },
  16474. {
  16475. "type": "null"
  16476. }
  16477. ]
  16478. },
  16479. "workspaceID": {
  16480. "anyOf": [
  16481. {
  16482. "type": "string",
  16483. "pattern": "^wrk"
  16484. },
  16485. {
  16486. "type": "null"
  16487. }
  16488. ]
  16489. },
  16490. "directory": {
  16491. "anyOf": [
  16492. {
  16493. "type": "string"
  16494. },
  16495. {
  16496. "type": "null"
  16497. }
  16498. ]
  16499. },
  16500. "path": {
  16501. "anyOf": [
  16502. {
  16503. "type": "string"
  16504. },
  16505. {
  16506. "type": "null"
  16507. }
  16508. ]
  16509. },
  16510. "parentID": {
  16511. "anyOf": [
  16512. {
  16513. "type": "string",
  16514. "pattern": "^ses"
  16515. },
  16516. {
  16517. "type": "null"
  16518. }
  16519. ]
  16520. },
  16521. "summary": {
  16522. "anyOf": [
  16523. {
  16524. "type": "object",
  16525. "properties": {
  16526. "additions": {
  16527. "type": "number"
  16528. },
  16529. "deletions": {
  16530. "type": "number"
  16531. },
  16532. "files": {
  16533. "type": "number"
  16534. },
  16535. "diffs": {
  16536. "type": "array",
  16537. "items": {
  16538. "$ref": "#/components/schemas/SnapshotFileDiff"
  16539. }
  16540. }
  16541. },
  16542. "required": ["additions", "deletions", "files"],
  16543. "additionalProperties": false
  16544. },
  16545. {
  16546. "type": "null"
  16547. }
  16548. ]
  16549. },
  16550. "cost": {
  16551. "anyOf": [
  16552. {
  16553. "type": "number"
  16554. },
  16555. {
  16556. "type": "null"
  16557. }
  16558. ]
  16559. },
  16560. "tokens": {
  16561. "anyOf": [
  16562. {
  16563. "type": "object",
  16564. "properties": {
  16565. "input": {
  16566. "type": "number"
  16567. },
  16568. "output": {
  16569. "type": "number"
  16570. },
  16571. "reasoning": {
  16572. "type": "number"
  16573. },
  16574. "cache": {
  16575. "type": "object",
  16576. "properties": {
  16577. "read": {
  16578. "type": "number"
  16579. },
  16580. "write": {
  16581. "type": "number"
  16582. }
  16583. },
  16584. "required": ["read", "write"],
  16585. "additionalProperties": false
  16586. }
  16587. },
  16588. "required": ["input", "output", "reasoning", "cache"],
  16589. "additionalProperties": false
  16590. },
  16591. {
  16592. "type": "null"
  16593. }
  16594. ]
  16595. },
  16596. "share": {
  16597. "type": "object",
  16598. "properties": {
  16599. "url": {
  16600. "anyOf": [
  16601. {
  16602. "type": "string"
  16603. },
  16604. {
  16605. "type": "null"
  16606. }
  16607. ]
  16608. }
  16609. },
  16610. "additionalProperties": false
  16611. },
  16612. "title": {
  16613. "anyOf": [
  16614. {
  16615. "type": "string"
  16616. },
  16617. {
  16618. "type": "null"
  16619. }
  16620. ]
  16621. },
  16622. "agent": {
  16623. "anyOf": [
  16624. {
  16625. "type": "string"
  16626. },
  16627. {
  16628. "type": "null"
  16629. }
  16630. ]
  16631. },
  16632. "model": {
  16633. "anyOf": [
  16634. {
  16635. "type": "object",
  16636. "properties": {
  16637. "id": {
  16638. "type": "string"
  16639. },
  16640. "providerID": {
  16641. "type": "string"
  16642. },
  16643. "variant": {
  16644. "type": "string"
  16645. }
  16646. },
  16647. "required": ["id", "providerID"],
  16648. "additionalProperties": false
  16649. },
  16650. {
  16651. "type": "null"
  16652. }
  16653. ]
  16654. },
  16655. "version": {
  16656. "anyOf": [
  16657. {
  16658. "type": "string"
  16659. },
  16660. {
  16661. "type": "null"
  16662. }
  16663. ]
  16664. },
  16665. "time": {
  16666. "type": "object",
  16667. "properties": {
  16668. "created": {
  16669. "anyOf": [
  16670. {
  16671. "type": "integer",
  16672. "minimum": 0
  16673. },
  16674. {
  16675. "type": "null"
  16676. }
  16677. ]
  16678. },
  16679. "updated": {
  16680. "anyOf": [
  16681. {
  16682. "type": "integer",
  16683. "minimum": 0
  16684. },
  16685. {
  16686. "type": "null"
  16687. }
  16688. ]
  16689. },
  16690. "compacting": {
  16691. "anyOf": [
  16692. {
  16693. "type": "integer",
  16694. "minimum": 0
  16695. },
  16696. {
  16697. "type": "null"
  16698. }
  16699. ]
  16700. },
  16701. "archived": {
  16702. "anyOf": [
  16703. {
  16704. "type": "number"
  16705. },
  16706. {
  16707. "type": "null"
  16708. }
  16709. ]
  16710. }
  16711. },
  16712. "additionalProperties": false
  16713. },
  16714. "permission": {
  16715. "anyOf": [
  16716. {
  16717. "$ref": "#/components/schemas/PermissionRuleset"
  16718. },
  16719. {
  16720. "type": "null"
  16721. }
  16722. ]
  16723. },
  16724. "revert": {
  16725. "anyOf": [
  16726. {
  16727. "type": "object",
  16728. "properties": {
  16729. "messageID": {
  16730. "type": "string",
  16731. "pattern": "^msg"
  16732. },
  16733. "partID": {
  16734. "type": "string",
  16735. "pattern": "^prt"
  16736. },
  16737. "snapshot": {
  16738. "type": "string"
  16739. },
  16740. "diff": {
  16741. "type": "string"
  16742. }
  16743. },
  16744. "required": ["messageID"],
  16745. "additionalProperties": false
  16746. },
  16747. {
  16748. "type": "null"
  16749. }
  16750. ]
  16751. }
  16752. },
  16753. "additionalProperties": false
  16754. }
  16755. },
  16756. "required": ["sessionID", "info"],
  16757. "additionalProperties": false
  16758. }
  16759. },
  16760. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16761. "additionalProperties": false
  16762. },
  16763. "SyncEventSessionDeleted": {
  16764. "type": "object",
  16765. "properties": {
  16766. "type": {
  16767. "type": "string",
  16768. "enum": ["sync"]
  16769. },
  16770. "name": {
  16771. "type": "string",
  16772. "enum": ["session.deleted.1"]
  16773. },
  16774. "id": {
  16775. "type": "string"
  16776. },
  16777. "seq": {
  16778. "type": "number"
  16779. },
  16780. "aggregateID": {
  16781. "type": "string",
  16782. "enum": ["sessionID"]
  16783. },
  16784. "data": {
  16785. "type": "object",
  16786. "properties": {
  16787. "sessionID": {
  16788. "type": "string",
  16789. "pattern": "^ses"
  16790. },
  16791. "info": {
  16792. "$ref": "#/components/schemas/Session"
  16793. }
  16794. },
  16795. "required": ["sessionID", "info"],
  16796. "additionalProperties": false
  16797. }
  16798. },
  16799. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16800. "additionalProperties": false
  16801. },
  16802. "SyncEventSessionNextAgentSwitched": {
  16803. "type": "object",
  16804. "properties": {
  16805. "type": {
  16806. "type": "string",
  16807. "enum": ["sync"]
  16808. },
  16809. "name": {
  16810. "type": "string",
  16811. "enum": ["session.next.agent.switched.1"]
  16812. },
  16813. "id": {
  16814. "type": "string"
  16815. },
  16816. "seq": {
  16817. "type": "number"
  16818. },
  16819. "aggregateID": {
  16820. "type": "string",
  16821. "enum": ["sessionID"]
  16822. },
  16823. "data": {
  16824. "type": "object",
  16825. "properties": {
  16826. "timestamp": {
  16827. "type": "number"
  16828. },
  16829. "sessionID": {
  16830. "type": "string",
  16831. "pattern": "^ses"
  16832. },
  16833. "agent": {
  16834. "type": "string"
  16835. }
  16836. },
  16837. "required": ["timestamp", "sessionID", "agent"],
  16838. "additionalProperties": false
  16839. }
  16840. },
  16841. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16842. "additionalProperties": false
  16843. },
  16844. "SyncEventSessionNextModelSwitched": {
  16845. "type": "object",
  16846. "properties": {
  16847. "type": {
  16848. "type": "string",
  16849. "enum": ["sync"]
  16850. },
  16851. "name": {
  16852. "type": "string",
  16853. "enum": ["session.next.model.switched.1"]
  16854. },
  16855. "id": {
  16856. "type": "string"
  16857. },
  16858. "seq": {
  16859. "type": "number"
  16860. },
  16861. "aggregateID": {
  16862. "type": "string",
  16863. "enum": ["sessionID"]
  16864. },
  16865. "data": {
  16866. "type": "object",
  16867. "properties": {
  16868. "timestamp": {
  16869. "type": "number"
  16870. },
  16871. "sessionID": {
  16872. "type": "string",
  16873. "pattern": "^ses"
  16874. },
  16875. "model": {
  16876. "type": "object",
  16877. "properties": {
  16878. "id": {
  16879. "type": "string"
  16880. },
  16881. "providerID": {
  16882. "type": "string"
  16883. },
  16884. "variant": {
  16885. "type": "string"
  16886. }
  16887. },
  16888. "required": ["id", "providerID", "variant"],
  16889. "additionalProperties": false
  16890. }
  16891. },
  16892. "required": ["timestamp", "sessionID", "model"],
  16893. "additionalProperties": false
  16894. }
  16895. },
  16896. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16897. "additionalProperties": false
  16898. },
  16899. "SyncEventSessionNextPrompted": {
  16900. "type": "object",
  16901. "properties": {
  16902. "type": {
  16903. "type": "string",
  16904. "enum": ["sync"]
  16905. },
  16906. "name": {
  16907. "type": "string",
  16908. "enum": ["session.next.prompted.1"]
  16909. },
  16910. "id": {
  16911. "type": "string"
  16912. },
  16913. "seq": {
  16914. "type": "number"
  16915. },
  16916. "aggregateID": {
  16917. "type": "string",
  16918. "enum": ["sessionID"]
  16919. },
  16920. "data": {
  16921. "type": "object",
  16922. "properties": {
  16923. "timestamp": {
  16924. "type": "number"
  16925. },
  16926. "sessionID": {
  16927. "type": "string",
  16928. "pattern": "^ses"
  16929. },
  16930. "prompt": {
  16931. "$ref": "#/components/schemas/Prompt"
  16932. }
  16933. },
  16934. "required": ["timestamp", "sessionID", "prompt"],
  16935. "additionalProperties": false
  16936. }
  16937. },
  16938. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16939. "additionalProperties": false
  16940. },
  16941. "SyncEventSessionNextSynthetic": {
  16942. "type": "object",
  16943. "properties": {
  16944. "type": {
  16945. "type": "string",
  16946. "enum": ["sync"]
  16947. },
  16948. "name": {
  16949. "type": "string",
  16950. "enum": ["session.next.synthetic.1"]
  16951. },
  16952. "id": {
  16953. "type": "string"
  16954. },
  16955. "seq": {
  16956. "type": "number"
  16957. },
  16958. "aggregateID": {
  16959. "type": "string",
  16960. "enum": ["sessionID"]
  16961. },
  16962. "data": {
  16963. "type": "object",
  16964. "properties": {
  16965. "timestamp": {
  16966. "type": "number"
  16967. },
  16968. "sessionID": {
  16969. "type": "string",
  16970. "pattern": "^ses"
  16971. },
  16972. "text": {
  16973. "type": "string"
  16974. }
  16975. },
  16976. "required": ["timestamp", "sessionID", "text"],
  16977. "additionalProperties": false
  16978. }
  16979. },
  16980. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16981. "additionalProperties": false
  16982. },
  16983. "SyncEventSessionNextShellStarted": {
  16984. "type": "object",
  16985. "properties": {
  16986. "type": {
  16987. "type": "string",
  16988. "enum": ["sync"]
  16989. },
  16990. "name": {
  16991. "type": "string",
  16992. "enum": ["session.next.shell.started.1"]
  16993. },
  16994. "id": {
  16995. "type": "string"
  16996. },
  16997. "seq": {
  16998. "type": "number"
  16999. },
  17000. "aggregateID": {
  17001. "type": "string",
  17002. "enum": ["sessionID"]
  17003. },
  17004. "data": {
  17005. "type": "object",
  17006. "properties": {
  17007. "timestamp": {
  17008. "type": "number"
  17009. },
  17010. "sessionID": {
  17011. "type": "string",
  17012. "pattern": "^ses"
  17013. },
  17014. "callID": {
  17015. "type": "string"
  17016. },
  17017. "command": {
  17018. "type": "string"
  17019. }
  17020. },
  17021. "required": ["timestamp", "sessionID", "callID", "command"],
  17022. "additionalProperties": false
  17023. }
  17024. },
  17025. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17026. "additionalProperties": false
  17027. },
  17028. "SyncEventSessionNextShellEnded": {
  17029. "type": "object",
  17030. "properties": {
  17031. "type": {
  17032. "type": "string",
  17033. "enum": ["sync"]
  17034. },
  17035. "name": {
  17036. "type": "string",
  17037. "enum": ["session.next.shell.ended.1"]
  17038. },
  17039. "id": {
  17040. "type": "string"
  17041. },
  17042. "seq": {
  17043. "type": "number"
  17044. },
  17045. "aggregateID": {
  17046. "type": "string",
  17047. "enum": ["sessionID"]
  17048. },
  17049. "data": {
  17050. "type": "object",
  17051. "properties": {
  17052. "timestamp": {
  17053. "type": "number"
  17054. },
  17055. "sessionID": {
  17056. "type": "string",
  17057. "pattern": "^ses"
  17058. },
  17059. "callID": {
  17060. "type": "string"
  17061. },
  17062. "output": {
  17063. "type": "string"
  17064. }
  17065. },
  17066. "required": ["timestamp", "sessionID", "callID", "output"],
  17067. "additionalProperties": false
  17068. }
  17069. },
  17070. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17071. "additionalProperties": false
  17072. },
  17073. "SyncEventSessionNextStepStarted": {
  17074. "type": "object",
  17075. "properties": {
  17076. "type": {
  17077. "type": "string",
  17078. "enum": ["sync"]
  17079. },
  17080. "name": {
  17081. "type": "string",
  17082. "enum": ["session.next.step.started.1"]
  17083. },
  17084. "id": {
  17085. "type": "string"
  17086. },
  17087. "seq": {
  17088. "type": "number"
  17089. },
  17090. "aggregateID": {
  17091. "type": "string",
  17092. "enum": ["sessionID"]
  17093. },
  17094. "data": {
  17095. "type": "object",
  17096. "properties": {
  17097. "timestamp": {
  17098. "type": "number"
  17099. },
  17100. "sessionID": {
  17101. "type": "string",
  17102. "pattern": "^ses"
  17103. },
  17104. "agent": {
  17105. "type": "string"
  17106. },
  17107. "model": {
  17108. "type": "object",
  17109. "properties": {
  17110. "id": {
  17111. "type": "string"
  17112. },
  17113. "providerID": {
  17114. "type": "string"
  17115. },
  17116. "variant": {
  17117. "type": "string"
  17118. }
  17119. },
  17120. "required": ["id", "providerID", "variant"],
  17121. "additionalProperties": false
  17122. },
  17123. "snapshot": {
  17124. "type": "string"
  17125. }
  17126. },
  17127. "required": ["timestamp", "sessionID", "agent", "model"],
  17128. "additionalProperties": false
  17129. }
  17130. },
  17131. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17132. "additionalProperties": false
  17133. },
  17134. "SyncEventSessionNextStepEnded": {
  17135. "type": "object",
  17136. "properties": {
  17137. "type": {
  17138. "type": "string",
  17139. "enum": ["sync"]
  17140. },
  17141. "name": {
  17142. "type": "string",
  17143. "enum": ["session.next.step.ended.1"]
  17144. },
  17145. "id": {
  17146. "type": "string"
  17147. },
  17148. "seq": {
  17149. "type": "number"
  17150. },
  17151. "aggregateID": {
  17152. "type": "string",
  17153. "enum": ["sessionID"]
  17154. },
  17155. "data": {
  17156. "type": "object",
  17157. "properties": {
  17158. "timestamp": {
  17159. "type": "number"
  17160. },
  17161. "sessionID": {
  17162. "type": "string",
  17163. "pattern": "^ses"
  17164. },
  17165. "finish": {
  17166. "type": "string"
  17167. },
  17168. "cost": {
  17169. "type": "number"
  17170. },
  17171. "tokens": {
  17172. "type": "object",
  17173. "properties": {
  17174. "input": {
  17175. "type": "number"
  17176. },
  17177. "output": {
  17178. "type": "number"
  17179. },
  17180. "reasoning": {
  17181. "type": "number"
  17182. },
  17183. "cache": {
  17184. "type": "object",
  17185. "properties": {
  17186. "read": {
  17187. "type": "number"
  17188. },
  17189. "write": {
  17190. "type": "number"
  17191. }
  17192. },
  17193. "required": ["read", "write"],
  17194. "additionalProperties": false
  17195. }
  17196. },
  17197. "required": ["input", "output", "reasoning", "cache"],
  17198. "additionalProperties": false
  17199. },
  17200. "snapshot": {
  17201. "type": "string"
  17202. }
  17203. },
  17204. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  17205. "additionalProperties": false
  17206. }
  17207. },
  17208. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17209. "additionalProperties": false
  17210. },
  17211. "SyncEventSessionNextStepFailed": {
  17212. "type": "object",
  17213. "properties": {
  17214. "type": {
  17215. "type": "string",
  17216. "enum": ["sync"]
  17217. },
  17218. "name": {
  17219. "type": "string",
  17220. "enum": ["session.next.step.failed.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. "error": {
  17243. "$ref": "#/components/schemas/SessionErrorUnknown"
  17244. }
  17245. },
  17246. "required": ["timestamp", "sessionID", "error"],
  17247. "additionalProperties": false
  17248. }
  17249. },
  17250. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17251. "additionalProperties": false
  17252. },
  17253. "SyncEventSessionNextTextStarted": {
  17254. "type": "object",
  17255. "properties": {
  17256. "type": {
  17257. "type": "string",
  17258. "enum": ["sync"]
  17259. },
  17260. "name": {
  17261. "type": "string",
  17262. "enum": ["session.next.text.started.1"]
  17263. },
  17264. "id": {
  17265. "type": "string"
  17266. },
  17267. "seq": {
  17268. "type": "number"
  17269. },
  17270. "aggregateID": {
  17271. "type": "string",
  17272. "enum": ["sessionID"]
  17273. },
  17274. "data": {
  17275. "type": "object",
  17276. "properties": {
  17277. "timestamp": {
  17278. "type": "number"
  17279. },
  17280. "sessionID": {
  17281. "type": "string",
  17282. "pattern": "^ses"
  17283. }
  17284. },
  17285. "required": ["timestamp", "sessionID"],
  17286. "additionalProperties": false
  17287. }
  17288. },
  17289. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17290. "additionalProperties": false
  17291. },
  17292. "SyncEventSessionNextTextDelta": {
  17293. "type": "object",
  17294. "properties": {
  17295. "type": {
  17296. "type": "string",
  17297. "enum": ["sync"]
  17298. },
  17299. "name": {
  17300. "type": "string",
  17301. "enum": ["session.next.text.delta.1"]
  17302. },
  17303. "id": {
  17304. "type": "string"
  17305. },
  17306. "seq": {
  17307. "type": "number"
  17308. },
  17309. "aggregateID": {
  17310. "type": "string",
  17311. "enum": ["sessionID"]
  17312. },
  17313. "data": {
  17314. "type": "object",
  17315. "properties": {
  17316. "timestamp": {
  17317. "type": "number"
  17318. },
  17319. "sessionID": {
  17320. "type": "string",
  17321. "pattern": "^ses"
  17322. },
  17323. "delta": {
  17324. "type": "string"
  17325. }
  17326. },
  17327. "required": ["timestamp", "sessionID", "delta"],
  17328. "additionalProperties": false
  17329. }
  17330. },
  17331. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17332. "additionalProperties": false
  17333. },
  17334. "SyncEventSessionNextTextEnded": {
  17335. "type": "object",
  17336. "properties": {
  17337. "type": {
  17338. "type": "string",
  17339. "enum": ["sync"]
  17340. },
  17341. "name": {
  17342. "type": "string",
  17343. "enum": ["session.next.text.ended.1"]
  17344. },
  17345. "id": {
  17346. "type": "string"
  17347. },
  17348. "seq": {
  17349. "type": "number"
  17350. },
  17351. "aggregateID": {
  17352. "type": "string",
  17353. "enum": ["sessionID"]
  17354. },
  17355. "data": {
  17356. "type": "object",
  17357. "properties": {
  17358. "timestamp": {
  17359. "type": "number"
  17360. },
  17361. "sessionID": {
  17362. "type": "string",
  17363. "pattern": "^ses"
  17364. },
  17365. "text": {
  17366. "type": "string"
  17367. }
  17368. },
  17369. "required": ["timestamp", "sessionID", "text"],
  17370. "additionalProperties": false
  17371. }
  17372. },
  17373. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17374. "additionalProperties": false
  17375. },
  17376. "SyncEventSessionNextReasoningStarted": {
  17377. "type": "object",
  17378. "properties": {
  17379. "type": {
  17380. "type": "string",
  17381. "enum": ["sync"]
  17382. },
  17383. "name": {
  17384. "type": "string",
  17385. "enum": ["session.next.reasoning.started.1"]
  17386. },
  17387. "id": {
  17388. "type": "string"
  17389. },
  17390. "seq": {
  17391. "type": "number"
  17392. },
  17393. "aggregateID": {
  17394. "type": "string",
  17395. "enum": ["sessionID"]
  17396. },
  17397. "data": {
  17398. "type": "object",
  17399. "properties": {
  17400. "timestamp": {
  17401. "type": "number"
  17402. },
  17403. "sessionID": {
  17404. "type": "string",
  17405. "pattern": "^ses"
  17406. },
  17407. "reasoningID": {
  17408. "type": "string"
  17409. }
  17410. },
  17411. "required": ["timestamp", "sessionID", "reasoningID"],
  17412. "additionalProperties": false
  17413. }
  17414. },
  17415. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17416. "additionalProperties": false
  17417. },
  17418. "SyncEventSessionNextReasoningDelta": {
  17419. "type": "object",
  17420. "properties": {
  17421. "type": {
  17422. "type": "string",
  17423. "enum": ["sync"]
  17424. },
  17425. "name": {
  17426. "type": "string",
  17427. "enum": ["session.next.reasoning.delta.1"]
  17428. },
  17429. "id": {
  17430. "type": "string"
  17431. },
  17432. "seq": {
  17433. "type": "number"
  17434. },
  17435. "aggregateID": {
  17436. "type": "string",
  17437. "enum": ["sessionID"]
  17438. },
  17439. "data": {
  17440. "type": "object",
  17441. "properties": {
  17442. "timestamp": {
  17443. "type": "number"
  17444. },
  17445. "sessionID": {
  17446. "type": "string",
  17447. "pattern": "^ses"
  17448. },
  17449. "reasoningID": {
  17450. "type": "string"
  17451. },
  17452. "delta": {
  17453. "type": "string"
  17454. }
  17455. },
  17456. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  17457. "additionalProperties": false
  17458. }
  17459. },
  17460. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17461. "additionalProperties": false
  17462. },
  17463. "SyncEventSessionNextReasoningEnded": {
  17464. "type": "object",
  17465. "properties": {
  17466. "type": {
  17467. "type": "string",
  17468. "enum": ["sync"]
  17469. },
  17470. "name": {
  17471. "type": "string",
  17472. "enum": ["session.next.reasoning.ended.1"]
  17473. },
  17474. "id": {
  17475. "type": "string"
  17476. },
  17477. "seq": {
  17478. "type": "number"
  17479. },
  17480. "aggregateID": {
  17481. "type": "string",
  17482. "enum": ["sessionID"]
  17483. },
  17484. "data": {
  17485. "type": "object",
  17486. "properties": {
  17487. "timestamp": {
  17488. "type": "number"
  17489. },
  17490. "sessionID": {
  17491. "type": "string",
  17492. "pattern": "^ses"
  17493. },
  17494. "reasoningID": {
  17495. "type": "string"
  17496. },
  17497. "text": {
  17498. "type": "string"
  17499. }
  17500. },
  17501. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  17502. "additionalProperties": false
  17503. }
  17504. },
  17505. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17506. "additionalProperties": false
  17507. },
  17508. "SyncEventSessionNextToolInputStarted": {
  17509. "type": "object",
  17510. "properties": {
  17511. "type": {
  17512. "type": "string",
  17513. "enum": ["sync"]
  17514. },
  17515. "name": {
  17516. "type": "string",
  17517. "enum": ["session.next.tool.input.started.1"]
  17518. },
  17519. "id": {
  17520. "type": "string"
  17521. },
  17522. "seq": {
  17523. "type": "number"
  17524. },
  17525. "aggregateID": {
  17526. "type": "string",
  17527. "enum": ["sessionID"]
  17528. },
  17529. "data": {
  17530. "type": "object",
  17531. "properties": {
  17532. "timestamp": {
  17533. "type": "number"
  17534. },
  17535. "sessionID": {
  17536. "type": "string",
  17537. "pattern": "^ses"
  17538. },
  17539. "callID": {
  17540. "type": "string"
  17541. },
  17542. "name": {
  17543. "type": "string"
  17544. }
  17545. },
  17546. "required": ["timestamp", "sessionID", "callID", "name"],
  17547. "additionalProperties": false
  17548. }
  17549. },
  17550. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17551. "additionalProperties": false
  17552. },
  17553. "SyncEventSessionNextToolInputDelta": {
  17554. "type": "object",
  17555. "properties": {
  17556. "type": {
  17557. "type": "string",
  17558. "enum": ["sync"]
  17559. },
  17560. "name": {
  17561. "type": "string",
  17562. "enum": ["session.next.tool.input.delta.1"]
  17563. },
  17564. "id": {
  17565. "type": "string"
  17566. },
  17567. "seq": {
  17568. "type": "number"
  17569. },
  17570. "aggregateID": {
  17571. "type": "string",
  17572. "enum": ["sessionID"]
  17573. },
  17574. "data": {
  17575. "type": "object",
  17576. "properties": {
  17577. "timestamp": {
  17578. "type": "number"
  17579. },
  17580. "sessionID": {
  17581. "type": "string",
  17582. "pattern": "^ses"
  17583. },
  17584. "callID": {
  17585. "type": "string"
  17586. },
  17587. "delta": {
  17588. "type": "string"
  17589. }
  17590. },
  17591. "required": ["timestamp", "sessionID", "callID", "delta"],
  17592. "additionalProperties": false
  17593. }
  17594. },
  17595. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17596. "additionalProperties": false
  17597. },
  17598. "SyncEventSessionNextToolInputEnded": {
  17599. "type": "object",
  17600. "properties": {
  17601. "type": {
  17602. "type": "string",
  17603. "enum": ["sync"]
  17604. },
  17605. "name": {
  17606. "type": "string",
  17607. "enum": ["session.next.tool.input.ended.1"]
  17608. },
  17609. "id": {
  17610. "type": "string"
  17611. },
  17612. "seq": {
  17613. "type": "number"
  17614. },
  17615. "aggregateID": {
  17616. "type": "string",
  17617. "enum": ["sessionID"]
  17618. },
  17619. "data": {
  17620. "type": "object",
  17621. "properties": {
  17622. "timestamp": {
  17623. "type": "number"
  17624. },
  17625. "sessionID": {
  17626. "type": "string",
  17627. "pattern": "^ses"
  17628. },
  17629. "callID": {
  17630. "type": "string"
  17631. },
  17632. "text": {
  17633. "type": "string"
  17634. }
  17635. },
  17636. "required": ["timestamp", "sessionID", "callID", "text"],
  17637. "additionalProperties": false
  17638. }
  17639. },
  17640. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17641. "additionalProperties": false
  17642. },
  17643. "SyncEventSessionNextToolCalled": {
  17644. "type": "object",
  17645. "properties": {
  17646. "type": {
  17647. "type": "string",
  17648. "enum": ["sync"]
  17649. },
  17650. "name": {
  17651. "type": "string",
  17652. "enum": ["session.next.tool.called.1"]
  17653. },
  17654. "id": {
  17655. "type": "string"
  17656. },
  17657. "seq": {
  17658. "type": "number"
  17659. },
  17660. "aggregateID": {
  17661. "type": "string",
  17662. "enum": ["sessionID"]
  17663. },
  17664. "data": {
  17665. "type": "object",
  17666. "properties": {
  17667. "timestamp": {
  17668. "type": "number"
  17669. },
  17670. "sessionID": {
  17671. "type": "string",
  17672. "pattern": "^ses"
  17673. },
  17674. "callID": {
  17675. "type": "string"
  17676. },
  17677. "tool": {
  17678. "type": "string"
  17679. },
  17680. "input": {
  17681. "type": "object"
  17682. },
  17683. "provider": {
  17684. "type": "object",
  17685. "properties": {
  17686. "executed": {
  17687. "type": "boolean"
  17688. },
  17689. "metadata": {
  17690. "type": "object"
  17691. }
  17692. },
  17693. "required": ["executed"],
  17694. "additionalProperties": false
  17695. }
  17696. },
  17697. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  17698. "additionalProperties": false
  17699. }
  17700. },
  17701. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17702. "additionalProperties": false
  17703. },
  17704. "SyncEventSessionNextToolProgress": {
  17705. "type": "object",
  17706. "properties": {
  17707. "type": {
  17708. "type": "string",
  17709. "enum": ["sync"]
  17710. },
  17711. "name": {
  17712. "type": "string",
  17713. "enum": ["session.next.tool.progress.1"]
  17714. },
  17715. "id": {
  17716. "type": "string"
  17717. },
  17718. "seq": {
  17719. "type": "number"
  17720. },
  17721. "aggregateID": {
  17722. "type": "string",
  17723. "enum": ["sessionID"]
  17724. },
  17725. "data": {
  17726. "type": "object",
  17727. "properties": {
  17728. "timestamp": {
  17729. "type": "number"
  17730. },
  17731. "sessionID": {
  17732. "type": "string",
  17733. "pattern": "^ses"
  17734. },
  17735. "callID": {
  17736. "type": "string"
  17737. },
  17738. "structured": {
  17739. "type": "object"
  17740. },
  17741. "content": {
  17742. "type": "array",
  17743. "items": {
  17744. "anyOf": [
  17745. {
  17746. "$ref": "#/components/schemas/ToolTextContent"
  17747. },
  17748. {
  17749. "$ref": "#/components/schemas/ToolFileContent"
  17750. }
  17751. ]
  17752. }
  17753. }
  17754. },
  17755. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  17756. "additionalProperties": false
  17757. }
  17758. },
  17759. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17760. "additionalProperties": false
  17761. },
  17762. "SyncEventSessionNextToolSuccess": {
  17763. "type": "object",
  17764. "properties": {
  17765. "type": {
  17766. "type": "string",
  17767. "enum": ["sync"]
  17768. },
  17769. "name": {
  17770. "type": "string",
  17771. "enum": ["session.next.tool.success.1"]
  17772. },
  17773. "id": {
  17774. "type": "string"
  17775. },
  17776. "seq": {
  17777. "type": "number"
  17778. },
  17779. "aggregateID": {
  17780. "type": "string",
  17781. "enum": ["sessionID"]
  17782. },
  17783. "data": {
  17784. "type": "object",
  17785. "properties": {
  17786. "timestamp": {
  17787. "type": "number"
  17788. },
  17789. "sessionID": {
  17790. "type": "string",
  17791. "pattern": "^ses"
  17792. },
  17793. "callID": {
  17794. "type": "string"
  17795. },
  17796. "structured": {
  17797. "type": "object"
  17798. },
  17799. "content": {
  17800. "type": "array",
  17801. "items": {
  17802. "anyOf": [
  17803. {
  17804. "$ref": "#/components/schemas/ToolTextContent"
  17805. },
  17806. {
  17807. "$ref": "#/components/schemas/ToolFileContent"
  17808. }
  17809. ]
  17810. }
  17811. },
  17812. "provider": {
  17813. "type": "object",
  17814. "properties": {
  17815. "executed": {
  17816. "type": "boolean"
  17817. },
  17818. "metadata": {
  17819. "type": "object"
  17820. }
  17821. },
  17822. "required": ["executed"],
  17823. "additionalProperties": false
  17824. }
  17825. },
  17826. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  17827. "additionalProperties": false
  17828. }
  17829. },
  17830. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17831. "additionalProperties": false
  17832. },
  17833. "SyncEventSessionNextToolFailed": {
  17834. "type": "object",
  17835. "properties": {
  17836. "type": {
  17837. "type": "string",
  17838. "enum": ["sync"]
  17839. },
  17840. "name": {
  17841. "type": "string",
  17842. "enum": ["session.next.tool.failed.1"]
  17843. },
  17844. "id": {
  17845. "type": "string"
  17846. },
  17847. "seq": {
  17848. "type": "number"
  17849. },
  17850. "aggregateID": {
  17851. "type": "string",
  17852. "enum": ["sessionID"]
  17853. },
  17854. "data": {
  17855. "type": "object",
  17856. "properties": {
  17857. "timestamp": {
  17858. "type": "number"
  17859. },
  17860. "sessionID": {
  17861. "type": "string",
  17862. "pattern": "^ses"
  17863. },
  17864. "callID": {
  17865. "type": "string"
  17866. },
  17867. "error": {
  17868. "$ref": "#/components/schemas/SessionErrorUnknown"
  17869. },
  17870. "provider": {
  17871. "type": "object",
  17872. "properties": {
  17873. "executed": {
  17874. "type": "boolean"
  17875. },
  17876. "metadata": {
  17877. "type": "object"
  17878. }
  17879. },
  17880. "required": ["executed"],
  17881. "additionalProperties": false
  17882. }
  17883. },
  17884. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  17885. "additionalProperties": false
  17886. }
  17887. },
  17888. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17889. "additionalProperties": false
  17890. },
  17891. "SyncEventSessionNextRetried": {
  17892. "type": "object",
  17893. "properties": {
  17894. "type": {
  17895. "type": "string",
  17896. "enum": ["sync"]
  17897. },
  17898. "name": {
  17899. "type": "string",
  17900. "enum": ["session.next.retried.1"]
  17901. },
  17902. "id": {
  17903. "type": "string"
  17904. },
  17905. "seq": {
  17906. "type": "number"
  17907. },
  17908. "aggregateID": {
  17909. "type": "string",
  17910. "enum": ["sessionID"]
  17911. },
  17912. "data": {
  17913. "type": "object",
  17914. "properties": {
  17915. "timestamp": {
  17916. "type": "number"
  17917. },
  17918. "sessionID": {
  17919. "type": "string",
  17920. "pattern": "^ses"
  17921. },
  17922. "attempt": {
  17923. "type": "number"
  17924. },
  17925. "error": {
  17926. "$ref": "#/components/schemas/SessionNextRetry_error"
  17927. }
  17928. },
  17929. "required": ["timestamp", "sessionID", "attempt", "error"],
  17930. "additionalProperties": false
  17931. }
  17932. },
  17933. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17934. "additionalProperties": false
  17935. },
  17936. "SyncEventSessionNextCompactionStarted": {
  17937. "type": "object",
  17938. "properties": {
  17939. "type": {
  17940. "type": "string",
  17941. "enum": ["sync"]
  17942. },
  17943. "name": {
  17944. "type": "string",
  17945. "enum": ["session.next.compaction.started.1"]
  17946. },
  17947. "id": {
  17948. "type": "string"
  17949. },
  17950. "seq": {
  17951. "type": "number"
  17952. },
  17953. "aggregateID": {
  17954. "type": "string",
  17955. "enum": ["sessionID"]
  17956. },
  17957. "data": {
  17958. "type": "object",
  17959. "properties": {
  17960. "timestamp": {
  17961. "type": "number"
  17962. },
  17963. "sessionID": {
  17964. "type": "string",
  17965. "pattern": "^ses"
  17966. },
  17967. "reason": {
  17968. "type": "string",
  17969. "enum": ["auto", "manual"]
  17970. }
  17971. },
  17972. "required": ["timestamp", "sessionID", "reason"],
  17973. "additionalProperties": false
  17974. }
  17975. },
  17976. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17977. "additionalProperties": false
  17978. },
  17979. "SyncEventSessionNextCompactionDelta": {
  17980. "type": "object",
  17981. "properties": {
  17982. "type": {
  17983. "type": "string",
  17984. "enum": ["sync"]
  17985. },
  17986. "name": {
  17987. "type": "string",
  17988. "enum": ["session.next.compaction.delta.1"]
  17989. },
  17990. "id": {
  17991. "type": "string"
  17992. },
  17993. "seq": {
  17994. "type": "number"
  17995. },
  17996. "aggregateID": {
  17997. "type": "string",
  17998. "enum": ["sessionID"]
  17999. },
  18000. "data": {
  18001. "type": "object",
  18002. "properties": {
  18003. "timestamp": {
  18004. "type": "number"
  18005. },
  18006. "sessionID": {
  18007. "type": "string",
  18008. "pattern": "^ses"
  18009. },
  18010. "text": {
  18011. "type": "string"
  18012. }
  18013. },
  18014. "required": ["timestamp", "sessionID", "text"],
  18015. "additionalProperties": false
  18016. }
  18017. },
  18018. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  18019. "additionalProperties": false
  18020. },
  18021. "SyncEventSessionNextCompactionEnded": {
  18022. "type": "object",
  18023. "properties": {
  18024. "type": {
  18025. "type": "string",
  18026. "enum": ["sync"]
  18027. },
  18028. "name": {
  18029. "type": "string",
  18030. "enum": ["session.next.compaction.ended.1"]
  18031. },
  18032. "id": {
  18033. "type": "string"
  18034. },
  18035. "seq": {
  18036. "type": "number"
  18037. },
  18038. "aggregateID": {
  18039. "type": "string",
  18040. "enum": ["sessionID"]
  18041. },
  18042. "data": {
  18043. "type": "object",
  18044. "properties": {
  18045. "timestamp": {
  18046. "type": "number"
  18047. },
  18048. "sessionID": {
  18049. "type": "string",
  18050. "pattern": "^ses"
  18051. },
  18052. "text": {
  18053. "type": "string"
  18054. },
  18055. "include": {
  18056. "type": "string"
  18057. }
  18058. },
  18059. "required": ["timestamp", "sessionID", "text"],
  18060. "additionalProperties": false
  18061. }
  18062. },
  18063. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  18064. "additionalProperties": false
  18065. },
  18066. "EventServerConnected": {
  18067. "type": "object",
  18068. "properties": {
  18069. "id": {
  18070. "type": "string"
  18071. },
  18072. "type": {
  18073. "type": "string",
  18074. "enum": ["server.connected"]
  18075. },
  18076. "properties": {
  18077. "type": "object",
  18078. "properties": {}
  18079. }
  18080. },
  18081. "required": ["id", "type", "properties"],
  18082. "additionalProperties": false
  18083. },
  18084. "EventGlobalDisposed": {
  18085. "type": "object",
  18086. "properties": {
  18087. "id": {
  18088. "type": "string"
  18089. },
  18090. "type": {
  18091. "type": "string",
  18092. "enum": ["global.disposed"]
  18093. },
  18094. "properties": {
  18095. "type": "object",
  18096. "properties": {}
  18097. }
  18098. },
  18099. "required": ["id", "type", "properties"],
  18100. "additionalProperties": false
  18101. },
  18102. "EventServerInstanceDisposed": {
  18103. "type": "object",
  18104. "properties": {
  18105. "id": {
  18106. "type": "string"
  18107. },
  18108. "type": {
  18109. "type": "string",
  18110. "enum": ["server.instance.disposed"]
  18111. },
  18112. "properties": {
  18113. "type": "object",
  18114. "properties": {
  18115. "directory": {
  18116. "type": "string"
  18117. }
  18118. },
  18119. "required": ["directory"],
  18120. "additionalProperties": false
  18121. }
  18122. },
  18123. "required": ["id", "type", "properties"],
  18124. "additionalProperties": false
  18125. },
  18126. "EventFileEdited": {
  18127. "type": "object",
  18128. "properties": {
  18129. "id": {
  18130. "type": "string"
  18131. },
  18132. "type": {
  18133. "type": "string",
  18134. "enum": ["file.edited"]
  18135. },
  18136. "properties": {
  18137. "type": "object",
  18138. "properties": {
  18139. "file": {
  18140. "type": "string"
  18141. }
  18142. },
  18143. "required": ["file"],
  18144. "additionalProperties": false
  18145. }
  18146. },
  18147. "required": ["id", "type", "properties"],
  18148. "additionalProperties": false
  18149. },
  18150. "EventFileWatcherUpdated": {
  18151. "type": "object",
  18152. "properties": {
  18153. "id": {
  18154. "type": "string"
  18155. },
  18156. "type": {
  18157. "type": "string",
  18158. "enum": ["file.watcher.updated"]
  18159. },
  18160. "properties": {
  18161. "type": "object",
  18162. "properties": {
  18163. "file": {
  18164. "type": "string"
  18165. },
  18166. "event": {
  18167. "type": "string",
  18168. "enum": ["add", "change", "unlink"]
  18169. }
  18170. },
  18171. "required": ["file", "event"],
  18172. "additionalProperties": false
  18173. }
  18174. },
  18175. "required": ["id", "type", "properties"],
  18176. "additionalProperties": false
  18177. },
  18178. "EventLspClientDiagnostics": {
  18179. "type": "object",
  18180. "properties": {
  18181. "id": {
  18182. "type": "string"
  18183. },
  18184. "type": {
  18185. "type": "string",
  18186. "enum": ["lsp.client.diagnostics"]
  18187. },
  18188. "properties": {
  18189. "type": "object",
  18190. "properties": {
  18191. "serverID": {
  18192. "type": "string"
  18193. },
  18194. "path": {
  18195. "type": "string"
  18196. }
  18197. },
  18198. "required": ["serverID", "path"],
  18199. "additionalProperties": false
  18200. }
  18201. },
  18202. "required": ["id", "type", "properties"],
  18203. "additionalProperties": false
  18204. },
  18205. "EventLspUpdated": {
  18206. "type": "object",
  18207. "properties": {
  18208. "id": {
  18209. "type": "string"
  18210. },
  18211. "type": {
  18212. "type": "string",
  18213. "enum": ["lsp.updated"]
  18214. },
  18215. "properties": {
  18216. "type": "object",
  18217. "properties": {}
  18218. }
  18219. },
  18220. "required": ["id", "type", "properties"],
  18221. "additionalProperties": false
  18222. },
  18223. "EventMessagePartDelta": {
  18224. "type": "object",
  18225. "properties": {
  18226. "id": {
  18227. "type": "string"
  18228. },
  18229. "type": {
  18230. "type": "string",
  18231. "enum": ["message.part.delta"]
  18232. },
  18233. "properties": {
  18234. "type": "object",
  18235. "properties": {
  18236. "sessionID": {
  18237. "type": "string",
  18238. "pattern": "^ses"
  18239. },
  18240. "messageID": {
  18241. "type": "string",
  18242. "pattern": "^msg"
  18243. },
  18244. "partID": {
  18245. "type": "string",
  18246. "pattern": "^prt"
  18247. },
  18248. "field": {
  18249. "type": "string"
  18250. },
  18251. "delta": {
  18252. "type": "string"
  18253. }
  18254. },
  18255. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  18256. "additionalProperties": false
  18257. }
  18258. },
  18259. "required": ["id", "type", "properties"],
  18260. "additionalProperties": false
  18261. },
  18262. "EventPermissionAsked": {
  18263. "type": "object",
  18264. "properties": {
  18265. "id": {
  18266. "type": "string"
  18267. },
  18268. "type": {
  18269. "type": "string",
  18270. "enum": ["permission.asked"]
  18271. },
  18272. "properties": {
  18273. "$ref": "#/components/schemas/PermissionRequest"
  18274. }
  18275. },
  18276. "required": ["id", "type", "properties"],
  18277. "additionalProperties": false
  18278. },
  18279. "EventPermissionReplied": {
  18280. "type": "object",
  18281. "properties": {
  18282. "id": {
  18283. "type": "string"
  18284. },
  18285. "type": {
  18286. "type": "string",
  18287. "enum": ["permission.replied"]
  18288. },
  18289. "properties": {
  18290. "type": "object",
  18291. "properties": {
  18292. "sessionID": {
  18293. "type": "string",
  18294. "pattern": "^ses"
  18295. },
  18296. "requestID": {
  18297. "type": "string",
  18298. "pattern": "^per"
  18299. },
  18300. "reply": {
  18301. "type": "string",
  18302. "enum": ["once", "always", "reject"]
  18303. }
  18304. },
  18305. "required": ["sessionID", "requestID", "reply"],
  18306. "additionalProperties": false
  18307. }
  18308. },
  18309. "required": ["id", "type", "properties"],
  18310. "additionalProperties": false
  18311. },
  18312. "EventSessionDiff": {
  18313. "type": "object",
  18314. "properties": {
  18315. "id": {
  18316. "type": "string"
  18317. },
  18318. "type": {
  18319. "type": "string",
  18320. "enum": ["session.diff"]
  18321. },
  18322. "properties": {
  18323. "type": "object",
  18324. "properties": {
  18325. "sessionID": {
  18326. "type": "string",
  18327. "pattern": "^ses"
  18328. },
  18329. "diff": {
  18330. "type": "array",
  18331. "items": {
  18332. "$ref": "#/components/schemas/SnapshotFileDiff"
  18333. }
  18334. }
  18335. },
  18336. "required": ["sessionID", "diff"],
  18337. "additionalProperties": false
  18338. }
  18339. },
  18340. "required": ["id", "type", "properties"],
  18341. "additionalProperties": false
  18342. },
  18343. "EventSessionError": {
  18344. "type": "object",
  18345. "properties": {
  18346. "id": {
  18347. "type": "string"
  18348. },
  18349. "type": {
  18350. "type": "string",
  18351. "enum": ["session.error"]
  18352. },
  18353. "properties": {
  18354. "type": "object",
  18355. "properties": {
  18356. "sessionID": {
  18357. "type": "string",
  18358. "pattern": "^ses"
  18359. },
  18360. "error": {
  18361. "anyOf": [
  18362. {
  18363. "$ref": "#/components/schemas/ProviderAuthError"
  18364. },
  18365. {
  18366. "$ref": "#/components/schemas/UnknownError"
  18367. },
  18368. {
  18369. "$ref": "#/components/schemas/MessageOutputLengthError"
  18370. },
  18371. {
  18372. "$ref": "#/components/schemas/MessageAbortedError"
  18373. },
  18374. {
  18375. "$ref": "#/components/schemas/StructuredOutputError"
  18376. },
  18377. {
  18378. "$ref": "#/components/schemas/ContextOverflowError"
  18379. },
  18380. {
  18381. "$ref": "#/components/schemas/APIError"
  18382. }
  18383. ]
  18384. }
  18385. },
  18386. "additionalProperties": false
  18387. }
  18388. },
  18389. "required": ["id", "type", "properties"],
  18390. "additionalProperties": false
  18391. },
  18392. "EventQuestionAsked": {
  18393. "type": "object",
  18394. "properties": {
  18395. "id": {
  18396. "type": "string"
  18397. },
  18398. "type": {
  18399. "type": "string",
  18400. "enum": ["question.asked"]
  18401. },
  18402. "properties": {
  18403. "$ref": "#/components/schemas/QuestionRequest"
  18404. }
  18405. },
  18406. "required": ["id", "type", "properties"],
  18407. "additionalProperties": false
  18408. },
  18409. "EventQuestionReplied": {
  18410. "type": "object",
  18411. "properties": {
  18412. "id": {
  18413. "type": "string"
  18414. },
  18415. "type": {
  18416. "type": "string",
  18417. "enum": ["question.replied"]
  18418. },
  18419. "properties": {
  18420. "$ref": "#/components/schemas/QuestionReplied"
  18421. }
  18422. },
  18423. "required": ["id", "type", "properties"],
  18424. "additionalProperties": false
  18425. },
  18426. "EventQuestionRejected": {
  18427. "type": "object",
  18428. "properties": {
  18429. "id": {
  18430. "type": "string"
  18431. },
  18432. "type": {
  18433. "type": "string",
  18434. "enum": ["question.rejected"]
  18435. },
  18436. "properties": {
  18437. "$ref": "#/components/schemas/QuestionRejected"
  18438. }
  18439. },
  18440. "required": ["id", "type", "properties"],
  18441. "additionalProperties": false
  18442. },
  18443. "EventTodoUpdated": {
  18444. "type": "object",
  18445. "properties": {
  18446. "id": {
  18447. "type": "string"
  18448. },
  18449. "type": {
  18450. "type": "string",
  18451. "enum": ["todo.updated"]
  18452. },
  18453. "properties": {
  18454. "type": "object",
  18455. "properties": {
  18456. "sessionID": {
  18457. "type": "string",
  18458. "pattern": "^ses"
  18459. },
  18460. "todos": {
  18461. "type": "array",
  18462. "items": {
  18463. "$ref": "#/components/schemas/Todo"
  18464. }
  18465. }
  18466. },
  18467. "required": ["sessionID", "todos"],
  18468. "additionalProperties": false
  18469. }
  18470. },
  18471. "required": ["id", "type", "properties"],
  18472. "additionalProperties": false
  18473. },
  18474. "EventSessionStatus": {
  18475. "type": "object",
  18476. "properties": {
  18477. "id": {
  18478. "type": "string"
  18479. },
  18480. "type": {
  18481. "type": "string",
  18482. "enum": ["session.status"]
  18483. },
  18484. "properties": {
  18485. "type": "object",
  18486. "properties": {
  18487. "sessionID": {
  18488. "type": "string",
  18489. "pattern": "^ses"
  18490. },
  18491. "status": {
  18492. "$ref": "#/components/schemas/SessionStatus"
  18493. }
  18494. },
  18495. "required": ["sessionID", "status"],
  18496. "additionalProperties": false
  18497. }
  18498. },
  18499. "required": ["id", "type", "properties"],
  18500. "additionalProperties": false
  18501. },
  18502. "EventSessionIdle": {
  18503. "type": "object",
  18504. "properties": {
  18505. "id": {
  18506. "type": "string"
  18507. },
  18508. "type": {
  18509. "type": "string",
  18510. "enum": ["session.idle"]
  18511. },
  18512. "properties": {
  18513. "type": "object",
  18514. "properties": {
  18515. "sessionID": {
  18516. "type": "string",
  18517. "pattern": "^ses"
  18518. }
  18519. },
  18520. "required": ["sessionID"],
  18521. "additionalProperties": false
  18522. }
  18523. },
  18524. "required": ["id", "type", "properties"],
  18525. "additionalProperties": false
  18526. },
  18527. "EventMcpToolsChanged": {
  18528. "type": "object",
  18529. "properties": {
  18530. "id": {
  18531. "type": "string"
  18532. },
  18533. "type": {
  18534. "type": "string",
  18535. "enum": ["mcp.tools.changed"]
  18536. },
  18537. "properties": {
  18538. "type": "object",
  18539. "properties": {
  18540. "server": {
  18541. "type": "string"
  18542. }
  18543. },
  18544. "required": ["server"],
  18545. "additionalProperties": false
  18546. }
  18547. },
  18548. "required": ["id", "type", "properties"],
  18549. "additionalProperties": false
  18550. },
  18551. "EventMcpBrowserOpenFailed": {
  18552. "type": "object",
  18553. "properties": {
  18554. "id": {
  18555. "type": "string"
  18556. },
  18557. "type": {
  18558. "type": "string",
  18559. "enum": ["mcp.browser.open.failed"]
  18560. },
  18561. "properties": {
  18562. "type": "object",
  18563. "properties": {
  18564. "mcpName": {
  18565. "type": "string"
  18566. },
  18567. "url": {
  18568. "type": "string"
  18569. }
  18570. },
  18571. "required": ["mcpName", "url"],
  18572. "additionalProperties": false
  18573. }
  18574. },
  18575. "required": ["id", "type", "properties"],
  18576. "additionalProperties": false
  18577. },
  18578. "EventCommandExecuted": {
  18579. "type": "object",
  18580. "properties": {
  18581. "id": {
  18582. "type": "string"
  18583. },
  18584. "type": {
  18585. "type": "string",
  18586. "enum": ["command.executed"]
  18587. },
  18588. "properties": {
  18589. "type": "object",
  18590. "properties": {
  18591. "name": {
  18592. "type": "string"
  18593. },
  18594. "sessionID": {
  18595. "type": "string",
  18596. "pattern": "^ses"
  18597. },
  18598. "arguments": {
  18599. "type": "string"
  18600. },
  18601. "messageID": {
  18602. "type": "string",
  18603. "pattern": "^msg"
  18604. }
  18605. },
  18606. "required": ["name", "sessionID", "arguments", "messageID"],
  18607. "additionalProperties": false
  18608. }
  18609. },
  18610. "required": ["id", "type", "properties"],
  18611. "additionalProperties": false
  18612. },
  18613. "EventProjectUpdated": {
  18614. "type": "object",
  18615. "properties": {
  18616. "id": {
  18617. "type": "string"
  18618. },
  18619. "type": {
  18620. "type": "string",
  18621. "enum": ["project.updated"]
  18622. },
  18623. "properties": {
  18624. "$ref": "#/components/schemas/Project"
  18625. }
  18626. },
  18627. "required": ["id", "type", "properties"],
  18628. "additionalProperties": false
  18629. },
  18630. "EventSessionCompacted": {
  18631. "type": "object",
  18632. "properties": {
  18633. "id": {
  18634. "type": "string"
  18635. },
  18636. "type": {
  18637. "type": "string",
  18638. "enum": ["session.compacted"]
  18639. },
  18640. "properties": {
  18641. "type": "object",
  18642. "properties": {
  18643. "sessionID": {
  18644. "type": "string",
  18645. "pattern": "^ses"
  18646. }
  18647. },
  18648. "required": ["sessionID"],
  18649. "additionalProperties": false
  18650. }
  18651. },
  18652. "required": ["id", "type", "properties"],
  18653. "additionalProperties": false
  18654. },
  18655. "EventVcsBranchUpdated": {
  18656. "type": "object",
  18657. "properties": {
  18658. "id": {
  18659. "type": "string"
  18660. },
  18661. "type": {
  18662. "type": "string",
  18663. "enum": ["vcs.branch.updated"]
  18664. },
  18665. "properties": {
  18666. "type": "object",
  18667. "properties": {
  18668. "branch": {
  18669. "type": "string"
  18670. }
  18671. },
  18672. "additionalProperties": false
  18673. }
  18674. },
  18675. "required": ["id", "type", "properties"],
  18676. "additionalProperties": false
  18677. },
  18678. "EventWorkspaceReady": {
  18679. "type": "object",
  18680. "properties": {
  18681. "id": {
  18682. "type": "string"
  18683. },
  18684. "type": {
  18685. "type": "string",
  18686. "enum": ["workspace.ready"]
  18687. },
  18688. "properties": {
  18689. "type": "object",
  18690. "properties": {
  18691. "name": {
  18692. "type": "string"
  18693. }
  18694. },
  18695. "required": ["name"],
  18696. "additionalProperties": false
  18697. }
  18698. },
  18699. "required": ["id", "type", "properties"],
  18700. "additionalProperties": false
  18701. },
  18702. "EventWorkspaceFailed": {
  18703. "type": "object",
  18704. "properties": {
  18705. "id": {
  18706. "type": "string"
  18707. },
  18708. "type": {
  18709. "type": "string",
  18710. "enum": ["workspace.failed"]
  18711. },
  18712. "properties": {
  18713. "type": "object",
  18714. "properties": {
  18715. "message": {
  18716. "type": "string"
  18717. }
  18718. },
  18719. "required": ["message"],
  18720. "additionalProperties": false
  18721. }
  18722. },
  18723. "required": ["id", "type", "properties"],
  18724. "additionalProperties": false
  18725. },
  18726. "EventWorkspaceStatus": {
  18727. "type": "object",
  18728. "properties": {
  18729. "id": {
  18730. "type": "string"
  18731. },
  18732. "type": {
  18733. "type": "string",
  18734. "enum": ["workspace.status"]
  18735. },
  18736. "properties": {
  18737. "type": "object",
  18738. "properties": {
  18739. "workspaceID": {
  18740. "type": "string",
  18741. "pattern": "^wrk"
  18742. },
  18743. "status": {
  18744. "type": "string",
  18745. "enum": ["connected", "connecting", "disconnected", "error"]
  18746. }
  18747. },
  18748. "required": ["workspaceID", "status"],
  18749. "additionalProperties": false
  18750. }
  18751. },
  18752. "required": ["id", "type", "properties"],
  18753. "additionalProperties": false
  18754. },
  18755. "EventWorktreeReady": {
  18756. "type": "object",
  18757. "properties": {
  18758. "id": {
  18759. "type": "string"
  18760. },
  18761. "type": {
  18762. "type": "string",
  18763. "enum": ["worktree.ready"]
  18764. },
  18765. "properties": {
  18766. "type": "object",
  18767. "properties": {
  18768. "name": {
  18769. "type": "string"
  18770. },
  18771. "branch": {
  18772. "type": "string"
  18773. }
  18774. },
  18775. "required": ["name"],
  18776. "additionalProperties": false
  18777. }
  18778. },
  18779. "required": ["id", "type", "properties"],
  18780. "additionalProperties": false
  18781. },
  18782. "EventWorktreeFailed": {
  18783. "type": "object",
  18784. "properties": {
  18785. "id": {
  18786. "type": "string"
  18787. },
  18788. "type": {
  18789. "type": "string",
  18790. "enum": ["worktree.failed"]
  18791. },
  18792. "properties": {
  18793. "type": "object",
  18794. "properties": {
  18795. "message": {
  18796. "type": "string"
  18797. }
  18798. },
  18799. "required": ["message"],
  18800. "additionalProperties": false
  18801. }
  18802. },
  18803. "required": ["id", "type", "properties"],
  18804. "additionalProperties": false
  18805. },
  18806. "EventPtyCreated": {
  18807. "type": "object",
  18808. "properties": {
  18809. "id": {
  18810. "type": "string"
  18811. },
  18812. "type": {
  18813. "type": "string",
  18814. "enum": ["pty.created"]
  18815. },
  18816. "properties": {
  18817. "type": "object",
  18818. "properties": {
  18819. "info": {
  18820. "$ref": "#/components/schemas/Pty"
  18821. }
  18822. },
  18823. "required": ["info"],
  18824. "additionalProperties": false
  18825. }
  18826. },
  18827. "required": ["id", "type", "properties"],
  18828. "additionalProperties": false
  18829. },
  18830. "EventPtyUpdated": {
  18831. "type": "object",
  18832. "properties": {
  18833. "id": {
  18834. "type": "string"
  18835. },
  18836. "type": {
  18837. "type": "string",
  18838. "enum": ["pty.updated"]
  18839. },
  18840. "properties": {
  18841. "type": "object",
  18842. "properties": {
  18843. "info": {
  18844. "$ref": "#/components/schemas/Pty"
  18845. }
  18846. },
  18847. "required": ["info"],
  18848. "additionalProperties": false
  18849. }
  18850. },
  18851. "required": ["id", "type", "properties"],
  18852. "additionalProperties": false
  18853. },
  18854. "EventPtyExited": {
  18855. "type": "object",
  18856. "properties": {
  18857. "id": {
  18858. "type": "string"
  18859. },
  18860. "type": {
  18861. "type": "string",
  18862. "enum": ["pty.exited"]
  18863. },
  18864. "properties": {
  18865. "type": "object",
  18866. "properties": {
  18867. "id": {
  18868. "type": "string",
  18869. "pattern": "^pty"
  18870. },
  18871. "exitCode": {
  18872. "type": "integer",
  18873. "minimum": 0
  18874. }
  18875. },
  18876. "required": ["id", "exitCode"],
  18877. "additionalProperties": false
  18878. }
  18879. },
  18880. "required": ["id", "type", "properties"],
  18881. "additionalProperties": false
  18882. },
  18883. "EventPtyDeleted": {
  18884. "type": "object",
  18885. "properties": {
  18886. "id": {
  18887. "type": "string"
  18888. },
  18889. "type": {
  18890. "type": "string",
  18891. "enum": ["pty.deleted"]
  18892. },
  18893. "properties": {
  18894. "type": "object",
  18895. "properties": {
  18896. "id": {
  18897. "type": "string",
  18898. "pattern": "^pty"
  18899. }
  18900. },
  18901. "required": ["id"],
  18902. "additionalProperties": false
  18903. }
  18904. },
  18905. "required": ["id", "type", "properties"],
  18906. "additionalProperties": false
  18907. },
  18908. "EventInstallationUpdated": {
  18909. "type": "object",
  18910. "properties": {
  18911. "id": {
  18912. "type": "string"
  18913. },
  18914. "type": {
  18915. "type": "string",
  18916. "enum": ["installation.updated"]
  18917. },
  18918. "properties": {
  18919. "type": "object",
  18920. "properties": {
  18921. "version": {
  18922. "type": "string"
  18923. }
  18924. },
  18925. "required": ["version"],
  18926. "additionalProperties": false
  18927. }
  18928. },
  18929. "required": ["id", "type", "properties"],
  18930. "additionalProperties": false
  18931. },
  18932. "EventInstallationUpdate-available": {
  18933. "type": "object",
  18934. "properties": {
  18935. "id": {
  18936. "type": "string"
  18937. },
  18938. "type": {
  18939. "type": "string",
  18940. "enum": ["installation.update-available"]
  18941. },
  18942. "properties": {
  18943. "type": "object",
  18944. "properties": {
  18945. "version": {
  18946. "type": "string"
  18947. }
  18948. },
  18949. "required": ["version"],
  18950. "additionalProperties": false
  18951. }
  18952. },
  18953. "required": ["id", "type", "properties"],
  18954. "additionalProperties": false
  18955. },
  18956. "EventMessageUpdated": {
  18957. "type": "object",
  18958. "properties": {
  18959. "id": {
  18960. "type": "string"
  18961. },
  18962. "type": {
  18963. "type": "string",
  18964. "enum": ["message.updated"]
  18965. },
  18966. "properties": {
  18967. "type": "object",
  18968. "properties": {
  18969. "sessionID": {
  18970. "type": "string",
  18971. "pattern": "^ses"
  18972. },
  18973. "info": {
  18974. "$ref": "#/components/schemas/Message"
  18975. }
  18976. },
  18977. "required": ["sessionID", "info"],
  18978. "additionalProperties": false
  18979. }
  18980. },
  18981. "required": ["id", "type", "properties"],
  18982. "additionalProperties": false
  18983. },
  18984. "EventMessageRemoved": {
  18985. "type": "object",
  18986. "properties": {
  18987. "id": {
  18988. "type": "string"
  18989. },
  18990. "type": {
  18991. "type": "string",
  18992. "enum": ["message.removed"]
  18993. },
  18994. "properties": {
  18995. "type": "object",
  18996. "properties": {
  18997. "sessionID": {
  18998. "type": "string",
  18999. "pattern": "^ses"
  19000. },
  19001. "messageID": {
  19002. "type": "string",
  19003. "pattern": "^msg"
  19004. }
  19005. },
  19006. "required": ["sessionID", "messageID"],
  19007. "additionalProperties": false
  19008. }
  19009. },
  19010. "required": ["id", "type", "properties"],
  19011. "additionalProperties": false
  19012. },
  19013. "EventMessagePartUpdated": {
  19014. "type": "object",
  19015. "properties": {
  19016. "id": {
  19017. "type": "string"
  19018. },
  19019. "type": {
  19020. "type": "string",
  19021. "enum": ["message.part.updated"]
  19022. },
  19023. "properties": {
  19024. "type": "object",
  19025. "properties": {
  19026. "sessionID": {
  19027. "type": "string",
  19028. "pattern": "^ses"
  19029. },
  19030. "part": {
  19031. "$ref": "#/components/schemas/Part"
  19032. },
  19033. "time": {
  19034. "type": "integer",
  19035. "minimum": 0
  19036. }
  19037. },
  19038. "required": ["sessionID", "part", "time"],
  19039. "additionalProperties": false
  19040. }
  19041. },
  19042. "required": ["id", "type", "properties"],
  19043. "additionalProperties": false
  19044. },
  19045. "EventMessagePartRemoved": {
  19046. "type": "object",
  19047. "properties": {
  19048. "id": {
  19049. "type": "string"
  19050. },
  19051. "type": {
  19052. "type": "string",
  19053. "enum": ["message.part.removed"]
  19054. },
  19055. "properties": {
  19056. "type": "object",
  19057. "properties": {
  19058. "sessionID": {
  19059. "type": "string",
  19060. "pattern": "^ses"
  19061. },
  19062. "messageID": {
  19063. "type": "string",
  19064. "pattern": "^msg"
  19065. },
  19066. "partID": {
  19067. "type": "string",
  19068. "pattern": "^prt"
  19069. }
  19070. },
  19071. "required": ["sessionID", "messageID", "partID"],
  19072. "additionalProperties": false
  19073. }
  19074. },
  19075. "required": ["id", "type", "properties"],
  19076. "additionalProperties": false
  19077. },
  19078. "EventSessionCreated": {
  19079. "type": "object",
  19080. "properties": {
  19081. "id": {
  19082. "type": "string"
  19083. },
  19084. "type": {
  19085. "type": "string",
  19086. "enum": ["session.created"]
  19087. },
  19088. "properties": {
  19089. "type": "object",
  19090. "properties": {
  19091. "sessionID": {
  19092. "type": "string",
  19093. "pattern": "^ses"
  19094. },
  19095. "info": {
  19096. "$ref": "#/components/schemas/Session"
  19097. }
  19098. },
  19099. "required": ["sessionID", "info"],
  19100. "additionalProperties": false
  19101. }
  19102. },
  19103. "required": ["id", "type", "properties"],
  19104. "additionalProperties": false
  19105. },
  19106. "EventSessionUpdated": {
  19107. "type": "object",
  19108. "properties": {
  19109. "id": {
  19110. "type": "string"
  19111. },
  19112. "type": {
  19113. "type": "string",
  19114. "enum": ["session.updated"]
  19115. },
  19116. "properties": {
  19117. "type": "object",
  19118. "properties": {
  19119. "sessionID": {
  19120. "type": "string",
  19121. "pattern": "^ses"
  19122. },
  19123. "info": {
  19124. "$ref": "#/components/schemas/Session"
  19125. }
  19126. },
  19127. "required": ["sessionID", "info"],
  19128. "additionalProperties": false
  19129. }
  19130. },
  19131. "required": ["id", "type", "properties"],
  19132. "additionalProperties": false
  19133. },
  19134. "EventSessionDeleted": {
  19135. "type": "object",
  19136. "properties": {
  19137. "id": {
  19138. "type": "string"
  19139. },
  19140. "type": {
  19141. "type": "string",
  19142. "enum": ["session.deleted"]
  19143. },
  19144. "properties": {
  19145. "type": "object",
  19146. "properties": {
  19147. "sessionID": {
  19148. "type": "string",
  19149. "pattern": "^ses"
  19150. },
  19151. "info": {
  19152. "$ref": "#/components/schemas/Session"
  19153. }
  19154. },
  19155. "required": ["sessionID", "info"],
  19156. "additionalProperties": false
  19157. }
  19158. },
  19159. "required": ["id", "type", "properties"],
  19160. "additionalProperties": false
  19161. },
  19162. "EventSessionNextAgentSwitched": {
  19163. "type": "object",
  19164. "properties": {
  19165. "id": {
  19166. "type": "string"
  19167. },
  19168. "type": {
  19169. "type": "string",
  19170. "enum": ["session.next.agent.switched"]
  19171. },
  19172. "properties": {
  19173. "type": "object",
  19174. "properties": {
  19175. "timestamp": {
  19176. "type": "number"
  19177. },
  19178. "sessionID": {
  19179. "type": "string",
  19180. "pattern": "^ses"
  19181. },
  19182. "agent": {
  19183. "type": "string"
  19184. }
  19185. },
  19186. "required": ["timestamp", "sessionID", "agent"],
  19187. "additionalProperties": false
  19188. }
  19189. },
  19190. "required": ["id", "type", "properties"],
  19191. "additionalProperties": false
  19192. },
  19193. "EventSessionNextModelSwitched": {
  19194. "type": "object",
  19195. "properties": {
  19196. "id": {
  19197. "type": "string"
  19198. },
  19199. "type": {
  19200. "type": "string",
  19201. "enum": ["session.next.model.switched"]
  19202. },
  19203. "properties": {
  19204. "type": "object",
  19205. "properties": {
  19206. "timestamp": {
  19207. "type": "number"
  19208. },
  19209. "sessionID": {
  19210. "type": "string",
  19211. "pattern": "^ses"
  19212. },
  19213. "model": {
  19214. "type": "object",
  19215. "properties": {
  19216. "id": {
  19217. "type": "string"
  19218. },
  19219. "providerID": {
  19220. "type": "string"
  19221. },
  19222. "variant": {
  19223. "type": "string"
  19224. }
  19225. },
  19226. "required": ["id", "providerID", "variant"],
  19227. "additionalProperties": false
  19228. }
  19229. },
  19230. "required": ["timestamp", "sessionID", "model"],
  19231. "additionalProperties": false
  19232. }
  19233. },
  19234. "required": ["id", "type", "properties"],
  19235. "additionalProperties": false
  19236. },
  19237. "PromptSource": {
  19238. "type": "object",
  19239. "properties": {
  19240. "start": {
  19241. "type": "number"
  19242. },
  19243. "end": {
  19244. "type": "number"
  19245. },
  19246. "text": {
  19247. "type": "string"
  19248. }
  19249. },
  19250. "required": ["start", "end", "text"],
  19251. "additionalProperties": false
  19252. },
  19253. "PromptFileAttachment": {
  19254. "type": "object",
  19255. "properties": {
  19256. "uri": {
  19257. "type": "string"
  19258. },
  19259. "mime": {
  19260. "type": "string"
  19261. },
  19262. "name": {
  19263. "type": "string"
  19264. },
  19265. "description": {
  19266. "type": "string"
  19267. },
  19268. "source": {
  19269. "$ref": "#/components/schemas/PromptSource"
  19270. }
  19271. },
  19272. "required": ["uri", "mime"],
  19273. "additionalProperties": false
  19274. },
  19275. "PromptAgentAttachment": {
  19276. "type": "object",
  19277. "properties": {
  19278. "name": {
  19279. "type": "string"
  19280. },
  19281. "source": {
  19282. "$ref": "#/components/schemas/PromptSource"
  19283. }
  19284. },
  19285. "required": ["name"],
  19286. "additionalProperties": false
  19287. },
  19288. "PromptReferenceAttachment": {
  19289. "type": "object",
  19290. "properties": {
  19291. "name": {
  19292. "type": "string"
  19293. },
  19294. "kind": {
  19295. "type": "string",
  19296. "enum": ["local", "git", "invalid"]
  19297. },
  19298. "uri": {
  19299. "type": "string"
  19300. },
  19301. "repository": {
  19302. "type": "string"
  19303. },
  19304. "branch": {
  19305. "type": "string"
  19306. },
  19307. "target": {
  19308. "type": "string"
  19309. },
  19310. "targetUri": {
  19311. "type": "string"
  19312. },
  19313. "problem": {
  19314. "type": "string"
  19315. },
  19316. "source": {
  19317. "$ref": "#/components/schemas/PromptSource"
  19318. }
  19319. },
  19320. "required": ["name", "kind"],
  19321. "additionalProperties": false
  19322. },
  19323. "EventSessionNextPrompted": {
  19324. "type": "object",
  19325. "properties": {
  19326. "id": {
  19327. "type": "string"
  19328. },
  19329. "type": {
  19330. "type": "string",
  19331. "enum": ["session.next.prompted"]
  19332. },
  19333. "properties": {
  19334. "type": "object",
  19335. "properties": {
  19336. "timestamp": {
  19337. "type": "number"
  19338. },
  19339. "sessionID": {
  19340. "type": "string",
  19341. "pattern": "^ses"
  19342. },
  19343. "prompt": {
  19344. "$ref": "#/components/schemas/Prompt"
  19345. }
  19346. },
  19347. "required": ["timestamp", "sessionID", "prompt"],
  19348. "additionalProperties": false
  19349. }
  19350. },
  19351. "required": ["id", "type", "properties"],
  19352. "additionalProperties": false
  19353. },
  19354. "EventSessionNextSynthetic": {
  19355. "type": "object",
  19356. "properties": {
  19357. "id": {
  19358. "type": "string"
  19359. },
  19360. "type": {
  19361. "type": "string",
  19362. "enum": ["session.next.synthetic"]
  19363. },
  19364. "properties": {
  19365. "type": "object",
  19366. "properties": {
  19367. "timestamp": {
  19368. "type": "number"
  19369. },
  19370. "sessionID": {
  19371. "type": "string",
  19372. "pattern": "^ses"
  19373. },
  19374. "text": {
  19375. "type": "string"
  19376. }
  19377. },
  19378. "required": ["timestamp", "sessionID", "text"],
  19379. "additionalProperties": false
  19380. }
  19381. },
  19382. "required": ["id", "type", "properties"],
  19383. "additionalProperties": false
  19384. },
  19385. "EventSessionNextShellStarted": {
  19386. "type": "object",
  19387. "properties": {
  19388. "id": {
  19389. "type": "string"
  19390. },
  19391. "type": {
  19392. "type": "string",
  19393. "enum": ["session.next.shell.started"]
  19394. },
  19395. "properties": {
  19396. "type": "object",
  19397. "properties": {
  19398. "timestamp": {
  19399. "type": "number"
  19400. },
  19401. "sessionID": {
  19402. "type": "string",
  19403. "pattern": "^ses"
  19404. },
  19405. "callID": {
  19406. "type": "string"
  19407. },
  19408. "command": {
  19409. "type": "string"
  19410. }
  19411. },
  19412. "required": ["timestamp", "sessionID", "callID", "command"],
  19413. "additionalProperties": false
  19414. }
  19415. },
  19416. "required": ["id", "type", "properties"],
  19417. "additionalProperties": false
  19418. },
  19419. "EventSessionNextShellEnded": {
  19420. "type": "object",
  19421. "properties": {
  19422. "id": {
  19423. "type": "string"
  19424. },
  19425. "type": {
  19426. "type": "string",
  19427. "enum": ["session.next.shell.ended"]
  19428. },
  19429. "properties": {
  19430. "type": "object",
  19431. "properties": {
  19432. "timestamp": {
  19433. "type": "number"
  19434. },
  19435. "sessionID": {
  19436. "type": "string",
  19437. "pattern": "^ses"
  19438. },
  19439. "callID": {
  19440. "type": "string"
  19441. },
  19442. "output": {
  19443. "type": "string"
  19444. }
  19445. },
  19446. "required": ["timestamp", "sessionID", "callID", "output"],
  19447. "additionalProperties": false
  19448. }
  19449. },
  19450. "required": ["id", "type", "properties"],
  19451. "additionalProperties": false
  19452. },
  19453. "EventSessionNextStepStarted": {
  19454. "type": "object",
  19455. "properties": {
  19456. "id": {
  19457. "type": "string"
  19458. },
  19459. "type": {
  19460. "type": "string",
  19461. "enum": ["session.next.step.started"]
  19462. },
  19463. "properties": {
  19464. "type": "object",
  19465. "properties": {
  19466. "timestamp": {
  19467. "type": "number"
  19468. },
  19469. "sessionID": {
  19470. "type": "string",
  19471. "pattern": "^ses"
  19472. },
  19473. "agent": {
  19474. "type": "string"
  19475. },
  19476. "model": {
  19477. "type": "object",
  19478. "properties": {
  19479. "id": {
  19480. "type": "string"
  19481. },
  19482. "providerID": {
  19483. "type": "string"
  19484. },
  19485. "variant": {
  19486. "type": "string"
  19487. }
  19488. },
  19489. "required": ["id", "providerID", "variant"],
  19490. "additionalProperties": false
  19491. },
  19492. "snapshot": {
  19493. "type": "string"
  19494. }
  19495. },
  19496. "required": ["timestamp", "sessionID", "agent", "model"],
  19497. "additionalProperties": false
  19498. }
  19499. },
  19500. "required": ["id", "type", "properties"],
  19501. "additionalProperties": false
  19502. },
  19503. "EventSessionNextStepEnded": {
  19504. "type": "object",
  19505. "properties": {
  19506. "id": {
  19507. "type": "string"
  19508. },
  19509. "type": {
  19510. "type": "string",
  19511. "enum": ["session.next.step.ended"]
  19512. },
  19513. "properties": {
  19514. "type": "object",
  19515. "properties": {
  19516. "timestamp": {
  19517. "type": "number"
  19518. },
  19519. "sessionID": {
  19520. "type": "string",
  19521. "pattern": "^ses"
  19522. },
  19523. "finish": {
  19524. "type": "string"
  19525. },
  19526. "cost": {
  19527. "type": "number"
  19528. },
  19529. "tokens": {
  19530. "type": "object",
  19531. "properties": {
  19532. "input": {
  19533. "type": "number"
  19534. },
  19535. "output": {
  19536. "type": "number"
  19537. },
  19538. "reasoning": {
  19539. "type": "number"
  19540. },
  19541. "cache": {
  19542. "type": "object",
  19543. "properties": {
  19544. "read": {
  19545. "type": "number"
  19546. },
  19547. "write": {
  19548. "type": "number"
  19549. }
  19550. },
  19551. "required": ["read", "write"],
  19552. "additionalProperties": false
  19553. }
  19554. },
  19555. "required": ["input", "output", "reasoning", "cache"],
  19556. "additionalProperties": false
  19557. },
  19558. "snapshot": {
  19559. "type": "string"
  19560. }
  19561. },
  19562. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  19563. "additionalProperties": false
  19564. }
  19565. },
  19566. "required": ["id", "type", "properties"],
  19567. "additionalProperties": false
  19568. },
  19569. "SessionErrorUnknown": {
  19570. "type": "object",
  19571. "properties": {
  19572. "type": {
  19573. "type": "string",
  19574. "enum": ["unknown"]
  19575. },
  19576. "message": {
  19577. "type": "string"
  19578. }
  19579. },
  19580. "required": ["type", "message"],
  19581. "additionalProperties": false
  19582. },
  19583. "EventSessionNextStepFailed": {
  19584. "type": "object",
  19585. "properties": {
  19586. "id": {
  19587. "type": "string"
  19588. },
  19589. "type": {
  19590. "type": "string",
  19591. "enum": ["session.next.step.failed"]
  19592. },
  19593. "properties": {
  19594. "type": "object",
  19595. "properties": {
  19596. "timestamp": {
  19597. "type": "number"
  19598. },
  19599. "sessionID": {
  19600. "type": "string",
  19601. "pattern": "^ses"
  19602. },
  19603. "error": {
  19604. "$ref": "#/components/schemas/SessionErrorUnknown"
  19605. }
  19606. },
  19607. "required": ["timestamp", "sessionID", "error"],
  19608. "additionalProperties": false
  19609. }
  19610. },
  19611. "required": ["id", "type", "properties"],
  19612. "additionalProperties": false
  19613. },
  19614. "EventSessionNextTextStarted": {
  19615. "type": "object",
  19616. "properties": {
  19617. "id": {
  19618. "type": "string"
  19619. },
  19620. "type": {
  19621. "type": "string",
  19622. "enum": ["session.next.text.started"]
  19623. },
  19624. "properties": {
  19625. "type": "object",
  19626. "properties": {
  19627. "timestamp": {
  19628. "type": "number"
  19629. },
  19630. "sessionID": {
  19631. "type": "string",
  19632. "pattern": "^ses"
  19633. }
  19634. },
  19635. "required": ["timestamp", "sessionID"],
  19636. "additionalProperties": false
  19637. }
  19638. },
  19639. "required": ["id", "type", "properties"],
  19640. "additionalProperties": false
  19641. },
  19642. "EventSessionNextTextDelta": {
  19643. "type": "object",
  19644. "properties": {
  19645. "id": {
  19646. "type": "string"
  19647. },
  19648. "type": {
  19649. "type": "string",
  19650. "enum": ["session.next.text.delta"]
  19651. },
  19652. "properties": {
  19653. "type": "object",
  19654. "properties": {
  19655. "timestamp": {
  19656. "type": "number"
  19657. },
  19658. "sessionID": {
  19659. "type": "string",
  19660. "pattern": "^ses"
  19661. },
  19662. "delta": {
  19663. "type": "string"
  19664. }
  19665. },
  19666. "required": ["timestamp", "sessionID", "delta"],
  19667. "additionalProperties": false
  19668. }
  19669. },
  19670. "required": ["id", "type", "properties"],
  19671. "additionalProperties": false
  19672. },
  19673. "EventSessionNextTextEnded": {
  19674. "type": "object",
  19675. "properties": {
  19676. "id": {
  19677. "type": "string"
  19678. },
  19679. "type": {
  19680. "type": "string",
  19681. "enum": ["session.next.text.ended"]
  19682. },
  19683. "properties": {
  19684. "type": "object",
  19685. "properties": {
  19686. "timestamp": {
  19687. "type": "number"
  19688. },
  19689. "sessionID": {
  19690. "type": "string",
  19691. "pattern": "^ses"
  19692. },
  19693. "text": {
  19694. "type": "string"
  19695. }
  19696. },
  19697. "required": ["timestamp", "sessionID", "text"],
  19698. "additionalProperties": false
  19699. }
  19700. },
  19701. "required": ["id", "type", "properties"],
  19702. "additionalProperties": false
  19703. },
  19704. "EventSessionNextReasoningStarted": {
  19705. "type": "object",
  19706. "properties": {
  19707. "id": {
  19708. "type": "string"
  19709. },
  19710. "type": {
  19711. "type": "string",
  19712. "enum": ["session.next.reasoning.started"]
  19713. },
  19714. "properties": {
  19715. "type": "object",
  19716. "properties": {
  19717. "timestamp": {
  19718. "type": "number"
  19719. },
  19720. "sessionID": {
  19721. "type": "string",
  19722. "pattern": "^ses"
  19723. },
  19724. "reasoningID": {
  19725. "type": "string"
  19726. }
  19727. },
  19728. "required": ["timestamp", "sessionID", "reasoningID"],
  19729. "additionalProperties": false
  19730. }
  19731. },
  19732. "required": ["id", "type", "properties"],
  19733. "additionalProperties": false
  19734. },
  19735. "EventSessionNextReasoningDelta": {
  19736. "type": "object",
  19737. "properties": {
  19738. "id": {
  19739. "type": "string"
  19740. },
  19741. "type": {
  19742. "type": "string",
  19743. "enum": ["session.next.reasoning.delta"]
  19744. },
  19745. "properties": {
  19746. "type": "object",
  19747. "properties": {
  19748. "timestamp": {
  19749. "type": "number"
  19750. },
  19751. "sessionID": {
  19752. "type": "string",
  19753. "pattern": "^ses"
  19754. },
  19755. "reasoningID": {
  19756. "type": "string"
  19757. },
  19758. "delta": {
  19759. "type": "string"
  19760. }
  19761. },
  19762. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  19763. "additionalProperties": false
  19764. }
  19765. },
  19766. "required": ["id", "type", "properties"],
  19767. "additionalProperties": false
  19768. },
  19769. "EventSessionNextReasoningEnded": {
  19770. "type": "object",
  19771. "properties": {
  19772. "id": {
  19773. "type": "string"
  19774. },
  19775. "type": {
  19776. "type": "string",
  19777. "enum": ["session.next.reasoning.ended"]
  19778. },
  19779. "properties": {
  19780. "type": "object",
  19781. "properties": {
  19782. "timestamp": {
  19783. "type": "number"
  19784. },
  19785. "sessionID": {
  19786. "type": "string",
  19787. "pattern": "^ses"
  19788. },
  19789. "reasoningID": {
  19790. "type": "string"
  19791. },
  19792. "text": {
  19793. "type": "string"
  19794. }
  19795. },
  19796. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  19797. "additionalProperties": false
  19798. }
  19799. },
  19800. "required": ["id", "type", "properties"],
  19801. "additionalProperties": false
  19802. },
  19803. "EventSessionNextToolInputStarted": {
  19804. "type": "object",
  19805. "properties": {
  19806. "id": {
  19807. "type": "string"
  19808. },
  19809. "type": {
  19810. "type": "string",
  19811. "enum": ["session.next.tool.input.started"]
  19812. },
  19813. "properties": {
  19814. "type": "object",
  19815. "properties": {
  19816. "timestamp": {
  19817. "type": "number"
  19818. },
  19819. "sessionID": {
  19820. "type": "string",
  19821. "pattern": "^ses"
  19822. },
  19823. "callID": {
  19824. "type": "string"
  19825. },
  19826. "name": {
  19827. "type": "string"
  19828. }
  19829. },
  19830. "required": ["timestamp", "sessionID", "callID", "name"],
  19831. "additionalProperties": false
  19832. }
  19833. },
  19834. "required": ["id", "type", "properties"],
  19835. "additionalProperties": false
  19836. },
  19837. "EventSessionNextToolInputDelta": {
  19838. "type": "object",
  19839. "properties": {
  19840. "id": {
  19841. "type": "string"
  19842. },
  19843. "type": {
  19844. "type": "string",
  19845. "enum": ["session.next.tool.input.delta"]
  19846. },
  19847. "properties": {
  19848. "type": "object",
  19849. "properties": {
  19850. "timestamp": {
  19851. "type": "number"
  19852. },
  19853. "sessionID": {
  19854. "type": "string",
  19855. "pattern": "^ses"
  19856. },
  19857. "callID": {
  19858. "type": "string"
  19859. },
  19860. "delta": {
  19861. "type": "string"
  19862. }
  19863. },
  19864. "required": ["timestamp", "sessionID", "callID", "delta"],
  19865. "additionalProperties": false
  19866. }
  19867. },
  19868. "required": ["id", "type", "properties"],
  19869. "additionalProperties": false
  19870. },
  19871. "EventSessionNextToolInputEnded": {
  19872. "type": "object",
  19873. "properties": {
  19874. "id": {
  19875. "type": "string"
  19876. },
  19877. "type": {
  19878. "type": "string",
  19879. "enum": ["session.next.tool.input.ended"]
  19880. },
  19881. "properties": {
  19882. "type": "object",
  19883. "properties": {
  19884. "timestamp": {
  19885. "type": "number"
  19886. },
  19887. "sessionID": {
  19888. "type": "string",
  19889. "pattern": "^ses"
  19890. },
  19891. "callID": {
  19892. "type": "string"
  19893. },
  19894. "text": {
  19895. "type": "string"
  19896. }
  19897. },
  19898. "required": ["timestamp", "sessionID", "callID", "text"],
  19899. "additionalProperties": false
  19900. }
  19901. },
  19902. "required": ["id", "type", "properties"],
  19903. "additionalProperties": false
  19904. },
  19905. "EventSessionNextToolCalled": {
  19906. "type": "object",
  19907. "properties": {
  19908. "id": {
  19909. "type": "string"
  19910. },
  19911. "type": {
  19912. "type": "string",
  19913. "enum": ["session.next.tool.called"]
  19914. },
  19915. "properties": {
  19916. "type": "object",
  19917. "properties": {
  19918. "timestamp": {
  19919. "type": "number"
  19920. },
  19921. "sessionID": {
  19922. "type": "string",
  19923. "pattern": "^ses"
  19924. },
  19925. "callID": {
  19926. "type": "string"
  19927. },
  19928. "tool": {
  19929. "type": "string"
  19930. },
  19931. "input": {
  19932. "type": "object"
  19933. },
  19934. "provider": {
  19935. "type": "object",
  19936. "properties": {
  19937. "executed": {
  19938. "type": "boolean"
  19939. },
  19940. "metadata": {
  19941. "type": "object"
  19942. }
  19943. },
  19944. "required": ["executed"],
  19945. "additionalProperties": false
  19946. }
  19947. },
  19948. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  19949. "additionalProperties": false
  19950. }
  19951. },
  19952. "required": ["id", "type", "properties"],
  19953. "additionalProperties": false
  19954. },
  19955. "ToolTextContent": {
  19956. "type": "object",
  19957. "properties": {
  19958. "type": {
  19959. "type": "string",
  19960. "enum": ["text"]
  19961. },
  19962. "text": {
  19963. "type": "string"
  19964. }
  19965. },
  19966. "required": ["type", "text"],
  19967. "additionalProperties": false
  19968. },
  19969. "ToolFileContent": {
  19970. "type": "object",
  19971. "properties": {
  19972. "type": {
  19973. "type": "string",
  19974. "enum": ["file"]
  19975. },
  19976. "uri": {
  19977. "type": "string"
  19978. },
  19979. "mime": {
  19980. "type": "string"
  19981. },
  19982. "name": {
  19983. "type": "string"
  19984. }
  19985. },
  19986. "required": ["type", "uri", "mime"],
  19987. "additionalProperties": false
  19988. },
  19989. "EventSessionNextToolProgress": {
  19990. "type": "object",
  19991. "properties": {
  19992. "id": {
  19993. "type": "string"
  19994. },
  19995. "type": {
  19996. "type": "string",
  19997. "enum": ["session.next.tool.progress"]
  19998. },
  19999. "properties": {
  20000. "type": "object",
  20001. "properties": {
  20002. "timestamp": {
  20003. "type": "number"
  20004. },
  20005. "sessionID": {
  20006. "type": "string",
  20007. "pattern": "^ses"
  20008. },
  20009. "callID": {
  20010. "type": "string"
  20011. },
  20012. "structured": {
  20013. "type": "object"
  20014. },
  20015. "content": {
  20016. "type": "array",
  20017. "items": {
  20018. "anyOf": [
  20019. {
  20020. "$ref": "#/components/schemas/ToolTextContent"
  20021. },
  20022. {
  20023. "$ref": "#/components/schemas/ToolFileContent"
  20024. }
  20025. ]
  20026. }
  20027. }
  20028. },
  20029. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  20030. "additionalProperties": false
  20031. }
  20032. },
  20033. "required": ["id", "type", "properties"],
  20034. "additionalProperties": false
  20035. },
  20036. "EventSessionNextToolSuccess": {
  20037. "type": "object",
  20038. "properties": {
  20039. "id": {
  20040. "type": "string"
  20041. },
  20042. "type": {
  20043. "type": "string",
  20044. "enum": ["session.next.tool.success"]
  20045. },
  20046. "properties": {
  20047. "type": "object",
  20048. "properties": {
  20049. "timestamp": {
  20050. "type": "number"
  20051. },
  20052. "sessionID": {
  20053. "type": "string",
  20054. "pattern": "^ses"
  20055. },
  20056. "callID": {
  20057. "type": "string"
  20058. },
  20059. "structured": {
  20060. "type": "object"
  20061. },
  20062. "content": {
  20063. "type": "array",
  20064. "items": {
  20065. "anyOf": [
  20066. {
  20067. "$ref": "#/components/schemas/ToolTextContent"
  20068. },
  20069. {
  20070. "$ref": "#/components/schemas/ToolFileContent"
  20071. }
  20072. ]
  20073. }
  20074. },
  20075. "provider": {
  20076. "type": "object",
  20077. "properties": {
  20078. "executed": {
  20079. "type": "boolean"
  20080. },
  20081. "metadata": {
  20082. "type": "object"
  20083. }
  20084. },
  20085. "required": ["executed"],
  20086. "additionalProperties": false
  20087. }
  20088. },
  20089. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  20090. "additionalProperties": false
  20091. }
  20092. },
  20093. "required": ["id", "type", "properties"],
  20094. "additionalProperties": false
  20095. },
  20096. "EventSessionNextToolFailed": {
  20097. "type": "object",
  20098. "properties": {
  20099. "id": {
  20100. "type": "string"
  20101. },
  20102. "type": {
  20103. "type": "string",
  20104. "enum": ["session.next.tool.failed"]
  20105. },
  20106. "properties": {
  20107. "type": "object",
  20108. "properties": {
  20109. "timestamp": {
  20110. "type": "number"
  20111. },
  20112. "sessionID": {
  20113. "type": "string",
  20114. "pattern": "^ses"
  20115. },
  20116. "callID": {
  20117. "type": "string"
  20118. },
  20119. "error": {
  20120. "$ref": "#/components/schemas/SessionErrorUnknown"
  20121. },
  20122. "provider": {
  20123. "type": "object",
  20124. "properties": {
  20125. "executed": {
  20126. "type": "boolean"
  20127. },
  20128. "metadata": {
  20129. "type": "object"
  20130. }
  20131. },
  20132. "required": ["executed"],
  20133. "additionalProperties": false
  20134. }
  20135. },
  20136. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  20137. "additionalProperties": false
  20138. }
  20139. },
  20140. "required": ["id", "type", "properties"],
  20141. "additionalProperties": false
  20142. },
  20143. "SessionNextRetry_error": {
  20144. "type": "object",
  20145. "properties": {
  20146. "message": {
  20147. "type": "string"
  20148. },
  20149. "statusCode": {
  20150. "type": "number"
  20151. },
  20152. "isRetryable": {
  20153. "type": "boolean"
  20154. },
  20155. "responseHeaders": {
  20156. "type": "object",
  20157. "additionalProperties": {
  20158. "type": "string"
  20159. }
  20160. },
  20161. "responseBody": {
  20162. "type": "string"
  20163. },
  20164. "metadata": {
  20165. "type": "object",
  20166. "additionalProperties": {
  20167. "type": "string"
  20168. }
  20169. }
  20170. },
  20171. "required": ["message", "isRetryable"],
  20172. "additionalProperties": false
  20173. },
  20174. "EventSessionNextRetried": {
  20175. "type": "object",
  20176. "properties": {
  20177. "id": {
  20178. "type": "string"
  20179. },
  20180. "type": {
  20181. "type": "string",
  20182. "enum": ["session.next.retried"]
  20183. },
  20184. "properties": {
  20185. "type": "object",
  20186. "properties": {
  20187. "timestamp": {
  20188. "type": "number"
  20189. },
  20190. "sessionID": {
  20191. "type": "string",
  20192. "pattern": "^ses"
  20193. },
  20194. "attempt": {
  20195. "type": "number"
  20196. },
  20197. "error": {
  20198. "$ref": "#/components/schemas/SessionNextRetry_error"
  20199. }
  20200. },
  20201. "required": ["timestamp", "sessionID", "attempt", "error"],
  20202. "additionalProperties": false
  20203. }
  20204. },
  20205. "required": ["id", "type", "properties"],
  20206. "additionalProperties": false
  20207. },
  20208. "EventSessionNextCompactionStarted": {
  20209. "type": "object",
  20210. "properties": {
  20211. "id": {
  20212. "type": "string"
  20213. },
  20214. "type": {
  20215. "type": "string",
  20216. "enum": ["session.next.compaction.started"]
  20217. },
  20218. "properties": {
  20219. "type": "object",
  20220. "properties": {
  20221. "timestamp": {
  20222. "type": "number"
  20223. },
  20224. "sessionID": {
  20225. "type": "string",
  20226. "pattern": "^ses"
  20227. },
  20228. "reason": {
  20229. "type": "string",
  20230. "enum": ["auto", "manual"]
  20231. }
  20232. },
  20233. "required": ["timestamp", "sessionID", "reason"],
  20234. "additionalProperties": false
  20235. }
  20236. },
  20237. "required": ["id", "type", "properties"],
  20238. "additionalProperties": false
  20239. },
  20240. "EventSessionNextCompactionDelta": {
  20241. "type": "object",
  20242. "properties": {
  20243. "id": {
  20244. "type": "string"
  20245. },
  20246. "type": {
  20247. "type": "string",
  20248. "enum": ["session.next.compaction.delta"]
  20249. },
  20250. "properties": {
  20251. "type": "object",
  20252. "properties": {
  20253. "timestamp": {
  20254. "type": "number"
  20255. },
  20256. "sessionID": {
  20257. "type": "string",
  20258. "pattern": "^ses"
  20259. },
  20260. "text": {
  20261. "type": "string"
  20262. }
  20263. },
  20264. "required": ["timestamp", "sessionID", "text"],
  20265. "additionalProperties": false
  20266. }
  20267. },
  20268. "required": ["id", "type", "properties"],
  20269. "additionalProperties": false
  20270. },
  20271. "EventSessionNextCompactionEnded": {
  20272. "type": "object",
  20273. "properties": {
  20274. "id": {
  20275. "type": "string"
  20276. },
  20277. "type": {
  20278. "type": "string",
  20279. "enum": ["session.next.compaction.ended"]
  20280. },
  20281. "properties": {
  20282. "type": "object",
  20283. "properties": {
  20284. "timestamp": {
  20285. "type": "number"
  20286. },
  20287. "sessionID": {
  20288. "type": "string",
  20289. "pattern": "^ses"
  20290. },
  20291. "text": {
  20292. "type": "string"
  20293. },
  20294. "include": {
  20295. "type": "string"
  20296. }
  20297. },
  20298. "required": ["timestamp", "sessionID", "text"],
  20299. "additionalProperties": false
  20300. }
  20301. },
  20302. "required": ["id", "type", "properties"],
  20303. "additionalProperties": false
  20304. },
  20305. "ModelV2Info": {
  20306. "type": "object",
  20307. "properties": {
  20308. "id": {
  20309. "type": "string"
  20310. },
  20311. "apiID": {
  20312. "type": "string"
  20313. },
  20314. "providerID": {
  20315. "type": "string"
  20316. },
  20317. "family": {
  20318. "type": "string"
  20319. },
  20320. "name": {
  20321. "type": "string"
  20322. },
  20323. "endpoint": {
  20324. "anyOf": [
  20325. {
  20326. "type": "object",
  20327. "properties": {
  20328. "type": {
  20329. "type": "string",
  20330. "enum": ["unknown"]
  20331. }
  20332. },
  20333. "required": ["type"],
  20334. "additionalProperties": false
  20335. },
  20336. {
  20337. "type": "object",
  20338. "properties": {
  20339. "type": {
  20340. "type": "string",
  20341. "enum": ["openai/responses"]
  20342. },
  20343. "url": {
  20344. "type": "string"
  20345. },
  20346. "websocket": {
  20347. "type": "boolean"
  20348. }
  20349. },
  20350. "required": ["type", "url"],
  20351. "additionalProperties": false
  20352. },
  20353. {
  20354. "type": "object",
  20355. "properties": {
  20356. "type": {
  20357. "type": "string",
  20358. "enum": ["openai/completions"]
  20359. },
  20360. "url": {
  20361. "type": "string"
  20362. },
  20363. "reasoning": {
  20364. "anyOf": [
  20365. {
  20366. "type": "object",
  20367. "properties": {
  20368. "type": {
  20369. "type": "string",
  20370. "enum": ["reasoning_content"]
  20371. }
  20372. },
  20373. "required": ["type"],
  20374. "additionalProperties": false
  20375. },
  20376. {
  20377. "type": "object",
  20378. "properties": {
  20379. "type": {
  20380. "type": "string",
  20381. "enum": ["reasoning_details"]
  20382. }
  20383. },
  20384. "required": ["type"],
  20385. "additionalProperties": false
  20386. }
  20387. ]
  20388. }
  20389. },
  20390. "required": ["type", "url"],
  20391. "additionalProperties": false
  20392. },
  20393. {
  20394. "type": "object",
  20395. "properties": {
  20396. "type": {
  20397. "type": "string",
  20398. "enum": ["anthropic/messages"]
  20399. },
  20400. "url": {
  20401. "type": "string"
  20402. }
  20403. },
  20404. "required": ["type", "url"],
  20405. "additionalProperties": false
  20406. },
  20407. {
  20408. "type": "object",
  20409. "properties": {
  20410. "type": {
  20411. "type": "string",
  20412. "enum": ["aisdk"]
  20413. },
  20414. "package": {
  20415. "type": "string"
  20416. },
  20417. "url": {
  20418. "type": "string"
  20419. }
  20420. },
  20421. "required": ["type", "package"],
  20422. "additionalProperties": false
  20423. }
  20424. ]
  20425. },
  20426. "capabilities": {
  20427. "type": "object",
  20428. "properties": {
  20429. "tools": {
  20430. "type": "boolean"
  20431. },
  20432. "input": {
  20433. "type": "array",
  20434. "items": {
  20435. "type": "string"
  20436. }
  20437. },
  20438. "output": {
  20439. "type": "array",
  20440. "items": {
  20441. "type": "string"
  20442. }
  20443. }
  20444. },
  20445. "required": ["tools", "input", "output"],
  20446. "additionalProperties": false
  20447. },
  20448. "options": {
  20449. "type": "object",
  20450. "properties": {
  20451. "headers": {
  20452. "type": "object",
  20453. "additionalProperties": {
  20454. "type": "string"
  20455. }
  20456. },
  20457. "body": {
  20458. "type": "object"
  20459. },
  20460. "aisdk": {
  20461. "type": "object",
  20462. "properties": {
  20463. "provider": {
  20464. "type": "object"
  20465. },
  20466. "request": {
  20467. "type": "object"
  20468. }
  20469. },
  20470. "required": ["provider", "request"],
  20471. "additionalProperties": false
  20472. },
  20473. "variant": {
  20474. "type": "string"
  20475. }
  20476. },
  20477. "required": ["headers", "body", "aisdk"],
  20478. "additionalProperties": false
  20479. },
  20480. "variants": {
  20481. "type": "array",
  20482. "items": {
  20483. "type": "object",
  20484. "properties": {
  20485. "id": {
  20486. "type": "string"
  20487. },
  20488. "headers": {
  20489. "type": "object",
  20490. "additionalProperties": {
  20491. "type": "string"
  20492. }
  20493. },
  20494. "body": {
  20495. "type": "object"
  20496. },
  20497. "aisdk": {
  20498. "type": "object",
  20499. "properties": {
  20500. "provider": {
  20501. "type": "object"
  20502. },
  20503. "request": {
  20504. "type": "object"
  20505. }
  20506. },
  20507. "required": ["provider", "request"],
  20508. "additionalProperties": false
  20509. }
  20510. },
  20511. "required": ["id", "headers", "body", "aisdk"],
  20512. "additionalProperties": false
  20513. }
  20514. },
  20515. "time": {
  20516. "type": "object",
  20517. "properties": {
  20518. "released": {
  20519. "anyOf": [
  20520. {
  20521. "type": "number"
  20522. },
  20523. {
  20524. "type": "string",
  20525. "enum": ["NaN"]
  20526. },
  20527. {
  20528. "type": "string",
  20529. "enum": ["Infinity"]
  20530. },
  20531. {
  20532. "type": "string",
  20533. "enum": ["-Infinity"]
  20534. },
  20535. {
  20536. "type": "string",
  20537. "enum": ["Infinity", "-Infinity", "NaN"]
  20538. }
  20539. ]
  20540. }
  20541. },
  20542. "required": ["released"],
  20543. "additionalProperties": false
  20544. },
  20545. "cost": {
  20546. "type": "array",
  20547. "items": {
  20548. "type": "object",
  20549. "properties": {
  20550. "tier": {
  20551. "type": "object",
  20552. "properties": {
  20553. "type": {
  20554. "type": "string",
  20555. "enum": ["context"]
  20556. },
  20557. "size": {
  20558. "type": "integer"
  20559. }
  20560. },
  20561. "required": ["type", "size"],
  20562. "additionalProperties": false
  20563. },
  20564. "input": {
  20565. "type": "number"
  20566. },
  20567. "output": {
  20568. "type": "number"
  20569. },
  20570. "cache": {
  20571. "type": "object",
  20572. "properties": {
  20573. "read": {
  20574. "type": "number"
  20575. },
  20576. "write": {
  20577. "type": "number"
  20578. }
  20579. },
  20580. "required": ["read", "write"],
  20581. "additionalProperties": false
  20582. }
  20583. },
  20584. "required": ["input", "output", "cache"],
  20585. "additionalProperties": false
  20586. }
  20587. },
  20588. "status": {
  20589. "type": "string",
  20590. "enum": ["alpha", "beta", "deprecated", "active"]
  20591. },
  20592. "enabled": {
  20593. "type": "boolean"
  20594. },
  20595. "limit": {
  20596. "type": "object",
  20597. "properties": {
  20598. "context": {
  20599. "type": "integer"
  20600. },
  20601. "input": {
  20602. "type": "integer"
  20603. },
  20604. "output": {
  20605. "type": "integer"
  20606. }
  20607. },
  20608. "required": ["context", "output"],
  20609. "additionalProperties": false
  20610. }
  20611. },
  20612. "required": [
  20613. "id",
  20614. "apiID",
  20615. "providerID",
  20616. "name",
  20617. "endpoint",
  20618. "capabilities",
  20619. "options",
  20620. "variants",
  20621. "time",
  20622. "cost",
  20623. "status",
  20624. "enabled",
  20625. "limit"
  20626. ],
  20627. "additionalProperties": false
  20628. },
  20629. "EventCatalogModelUpdated": {
  20630. "type": "object",
  20631. "properties": {
  20632. "id": {
  20633. "type": "string"
  20634. },
  20635. "type": {
  20636. "type": "string",
  20637. "enum": ["catalog.model.updated"]
  20638. },
  20639. "properties": {
  20640. "type": "object",
  20641. "properties": {
  20642. "model": {
  20643. "$ref": "#/components/schemas/ModelV2Info"
  20644. }
  20645. },
  20646. "required": ["model"],
  20647. "additionalProperties": false
  20648. }
  20649. },
  20650. "required": ["id", "type", "properties"],
  20651. "additionalProperties": false
  20652. },
  20653. "EventModels-devRefreshed": {
  20654. "type": "object",
  20655. "properties": {
  20656. "id": {
  20657. "type": "string"
  20658. },
  20659. "type": {
  20660. "type": "string",
  20661. "enum": ["models-dev.refreshed"]
  20662. },
  20663. "properties": {
  20664. "type": "object",
  20665. "properties": {}
  20666. }
  20667. },
  20668. "required": ["id", "type", "properties"],
  20669. "additionalProperties": false
  20670. },
  20671. "AccountV2OAuthCredential": {
  20672. "type": "object",
  20673. "properties": {
  20674. "type": {
  20675. "type": "string",
  20676. "enum": ["oauth"]
  20677. },
  20678. "refresh": {
  20679. "type": "string"
  20680. },
  20681. "access": {
  20682. "type": "string"
  20683. },
  20684. "expires": {
  20685. "type": "integer",
  20686. "minimum": 0
  20687. }
  20688. },
  20689. "required": ["type", "refresh", "access", "expires"],
  20690. "additionalProperties": false
  20691. },
  20692. "AccountV2ApiKeyCredential": {
  20693. "type": "object",
  20694. "properties": {
  20695. "type": {
  20696. "type": "string",
  20697. "enum": ["api"]
  20698. },
  20699. "key": {
  20700. "type": "string"
  20701. },
  20702. "metadata": {
  20703. "type": "object",
  20704. "additionalProperties": {
  20705. "type": "string"
  20706. }
  20707. }
  20708. },
  20709. "required": ["type", "key"],
  20710. "additionalProperties": false
  20711. },
  20712. "AccountV2Credential": {
  20713. "anyOf": [
  20714. {
  20715. "$ref": "#/components/schemas/AccountV2OAuthCredential"
  20716. },
  20717. {
  20718. "$ref": "#/components/schemas/AccountV2ApiKeyCredential"
  20719. }
  20720. ]
  20721. },
  20722. "AccountV2Info": {
  20723. "type": "object",
  20724. "properties": {
  20725. "id": {
  20726. "type": "string"
  20727. },
  20728. "serviceID": {
  20729. "type": "string"
  20730. },
  20731. "description": {
  20732. "type": "string"
  20733. },
  20734. "credential": {
  20735. "$ref": "#/components/schemas/AccountV2Credential"
  20736. }
  20737. },
  20738. "required": ["id", "serviceID", "description", "credential"],
  20739. "additionalProperties": false
  20740. },
  20741. "EventAccountAdded": {
  20742. "type": "object",
  20743. "properties": {
  20744. "id": {
  20745. "type": "string"
  20746. },
  20747. "type": {
  20748. "type": "string",
  20749. "enum": ["account.added"]
  20750. },
  20751. "properties": {
  20752. "type": "object",
  20753. "properties": {
  20754. "account": {
  20755. "$ref": "#/components/schemas/AccountV2Info"
  20756. }
  20757. },
  20758. "required": ["account"],
  20759. "additionalProperties": false
  20760. }
  20761. },
  20762. "required": ["id", "type", "properties"],
  20763. "additionalProperties": false
  20764. },
  20765. "EventAccountRemoved": {
  20766. "type": "object",
  20767. "properties": {
  20768. "id": {
  20769. "type": "string"
  20770. },
  20771. "type": {
  20772. "type": "string",
  20773. "enum": ["account.removed"]
  20774. },
  20775. "properties": {
  20776. "type": "object",
  20777. "properties": {
  20778. "account": {
  20779. "$ref": "#/components/schemas/AccountV2Info"
  20780. }
  20781. },
  20782. "required": ["account"],
  20783. "additionalProperties": false
  20784. }
  20785. },
  20786. "required": ["id", "type", "properties"],
  20787. "additionalProperties": false
  20788. },
  20789. "EventAccountSwitched": {
  20790. "type": "object",
  20791. "properties": {
  20792. "id": {
  20793. "type": "string"
  20794. },
  20795. "type": {
  20796. "type": "string",
  20797. "enum": ["account.switched"]
  20798. },
  20799. "properties": {
  20800. "type": "object",
  20801. "properties": {
  20802. "serviceID": {
  20803. "type": "string"
  20804. },
  20805. "from": {
  20806. "type": "string"
  20807. },
  20808. "to": {
  20809. "type": "string"
  20810. }
  20811. },
  20812. "required": ["serviceID"],
  20813. "additionalProperties": false
  20814. }
  20815. },
  20816. "required": ["id", "type", "properties"],
  20817. "additionalProperties": false
  20818. },
  20819. "SessionInfo": {
  20820. "type": "object",
  20821. "properties": {
  20822. "id": {
  20823. "type": "string",
  20824. "pattern": "^ses"
  20825. },
  20826. "parentID": {
  20827. "type": "string",
  20828. "pattern": "^ses"
  20829. },
  20830. "projectID": {
  20831. "type": "string"
  20832. },
  20833. "workspaceID": {
  20834. "type": "string",
  20835. "pattern": "^wrk"
  20836. },
  20837. "path": {
  20838. "type": "string"
  20839. },
  20840. "agent": {
  20841. "type": "string"
  20842. },
  20843. "model": {
  20844. "type": "object",
  20845. "properties": {
  20846. "id": {
  20847. "type": "string"
  20848. },
  20849. "providerID": {
  20850. "type": "string"
  20851. },
  20852. "variant": {
  20853. "type": "string"
  20854. }
  20855. },
  20856. "required": ["id", "providerID", "variant"],
  20857. "additionalProperties": false
  20858. },
  20859. "cost": {
  20860. "type": "number"
  20861. },
  20862. "tokens": {
  20863. "type": "object",
  20864. "properties": {
  20865. "input": {
  20866. "type": "number"
  20867. },
  20868. "output": {
  20869. "type": "number"
  20870. },
  20871. "reasoning": {
  20872. "type": "number"
  20873. },
  20874. "cache": {
  20875. "type": "object",
  20876. "properties": {
  20877. "read": {
  20878. "type": "number"
  20879. },
  20880. "write": {
  20881. "type": "number"
  20882. }
  20883. },
  20884. "required": ["read", "write"],
  20885. "additionalProperties": false
  20886. }
  20887. },
  20888. "required": ["input", "output", "reasoning", "cache"],
  20889. "additionalProperties": false
  20890. },
  20891. "time": {
  20892. "type": "object",
  20893. "properties": {
  20894. "created": {
  20895. "type": "number"
  20896. },
  20897. "updated": {
  20898. "type": "number"
  20899. },
  20900. "archived": {
  20901. "type": "number"
  20902. }
  20903. },
  20904. "required": ["created", "updated"],
  20905. "additionalProperties": false
  20906. },
  20907. "title": {
  20908. "type": "string"
  20909. }
  20910. },
  20911. "required": ["id", "projectID", "cost", "tokens", "time", "title"],
  20912. "additionalProperties": false
  20913. },
  20914. "SessionDelivery": {
  20915. "type": "string",
  20916. "enum": ["immediate", "deferred"]
  20917. },
  20918. "SessionMessageAgentSwitched": {
  20919. "type": "object",
  20920. "properties": {
  20921. "id": {
  20922. "type": "string"
  20923. },
  20924. "metadata": {
  20925. "type": "object"
  20926. },
  20927. "time": {
  20928. "type": "object",
  20929. "properties": {
  20930. "created": {
  20931. "type": "number"
  20932. }
  20933. },
  20934. "required": ["created"],
  20935. "additionalProperties": false
  20936. },
  20937. "type": {
  20938. "type": "string",
  20939. "enum": ["agent-switched"]
  20940. },
  20941. "agent": {
  20942. "type": "string"
  20943. }
  20944. },
  20945. "required": ["id", "time", "type", "agent"],
  20946. "additionalProperties": false
  20947. },
  20948. "SessionMessageModelSwitched": {
  20949. "type": "object",
  20950. "properties": {
  20951. "id": {
  20952. "type": "string"
  20953. },
  20954. "metadata": {
  20955. "type": "object"
  20956. },
  20957. "time": {
  20958. "type": "object",
  20959. "properties": {
  20960. "created": {
  20961. "type": "number"
  20962. }
  20963. },
  20964. "required": ["created"],
  20965. "additionalProperties": false
  20966. },
  20967. "type": {
  20968. "type": "string",
  20969. "enum": ["model-switched"]
  20970. },
  20971. "model": {
  20972. "type": "object",
  20973. "properties": {
  20974. "id": {
  20975. "type": "string"
  20976. },
  20977. "providerID": {
  20978. "type": "string"
  20979. },
  20980. "variant": {
  20981. "type": "string"
  20982. }
  20983. },
  20984. "required": ["id", "providerID", "variant"],
  20985. "additionalProperties": false
  20986. }
  20987. },
  20988. "required": ["id", "time", "type", "model"],
  20989. "additionalProperties": false
  20990. },
  20991. "SessionMessageUser": {
  20992. "type": "object",
  20993. "properties": {
  20994. "id": {
  20995. "type": "string"
  20996. },
  20997. "metadata": {
  20998. "type": "object"
  20999. },
  21000. "time": {
  21001. "type": "object",
  21002. "properties": {
  21003. "created": {
  21004. "type": "number"
  21005. }
  21006. },
  21007. "required": ["created"],
  21008. "additionalProperties": false
  21009. },
  21010. "text": {
  21011. "type": "string"
  21012. },
  21013. "files": {
  21014. "type": "array",
  21015. "items": {
  21016. "$ref": "#/components/schemas/PromptFileAttachment"
  21017. }
  21018. },
  21019. "agents": {
  21020. "type": "array",
  21021. "items": {
  21022. "$ref": "#/components/schemas/PromptAgentAttachment"
  21023. }
  21024. },
  21025. "references": {
  21026. "type": "array",
  21027. "items": {
  21028. "$ref": "#/components/schemas/PromptReferenceAttachment"
  21029. }
  21030. },
  21031. "type": {
  21032. "type": "string",
  21033. "enum": ["user"]
  21034. }
  21035. },
  21036. "required": ["id", "time", "text", "type"],
  21037. "additionalProperties": false
  21038. },
  21039. "SessionMessageSynthetic": {
  21040. "type": "object",
  21041. "properties": {
  21042. "id": {
  21043. "type": "string"
  21044. },
  21045. "metadata": {
  21046. "type": "object"
  21047. },
  21048. "time": {
  21049. "type": "object",
  21050. "properties": {
  21051. "created": {
  21052. "type": "number"
  21053. }
  21054. },
  21055. "required": ["created"],
  21056. "additionalProperties": false
  21057. },
  21058. "sessionID": {
  21059. "type": "string",
  21060. "pattern": "^ses"
  21061. },
  21062. "text": {
  21063. "type": "string"
  21064. },
  21065. "type": {
  21066. "type": "string",
  21067. "enum": ["synthetic"]
  21068. }
  21069. },
  21070. "required": ["id", "time", "sessionID", "text", "type"],
  21071. "additionalProperties": false
  21072. },
  21073. "SessionMessageShell": {
  21074. "type": "object",
  21075. "properties": {
  21076. "id": {
  21077. "type": "string"
  21078. },
  21079. "metadata": {
  21080. "type": "object"
  21081. },
  21082. "time": {
  21083. "type": "object",
  21084. "properties": {
  21085. "created": {
  21086. "type": "number"
  21087. },
  21088. "completed": {
  21089. "type": "number"
  21090. }
  21091. },
  21092. "required": ["created"],
  21093. "additionalProperties": false
  21094. },
  21095. "type": {
  21096. "type": "string",
  21097. "enum": ["shell"]
  21098. },
  21099. "callID": {
  21100. "type": "string"
  21101. },
  21102. "command": {
  21103. "type": "string"
  21104. },
  21105. "output": {
  21106. "type": "string"
  21107. }
  21108. },
  21109. "required": ["id", "time", "type", "callID", "command", "output"],
  21110. "additionalProperties": false
  21111. },
  21112. "SessionMessageAssistantText": {
  21113. "type": "object",
  21114. "properties": {
  21115. "type": {
  21116. "type": "string",
  21117. "enum": ["text"]
  21118. },
  21119. "text": {
  21120. "type": "string"
  21121. }
  21122. },
  21123. "required": ["type", "text"],
  21124. "additionalProperties": false
  21125. },
  21126. "SessionMessageAssistantReasoning": {
  21127. "type": "object",
  21128. "properties": {
  21129. "type": {
  21130. "type": "string",
  21131. "enum": ["reasoning"]
  21132. },
  21133. "id": {
  21134. "type": "string"
  21135. },
  21136. "text": {
  21137. "type": "string"
  21138. }
  21139. },
  21140. "required": ["type", "id", "text"],
  21141. "additionalProperties": false
  21142. },
  21143. "SessionMessageToolStatePending": {
  21144. "type": "object",
  21145. "properties": {
  21146. "status": {
  21147. "type": "string",
  21148. "enum": ["pending"]
  21149. },
  21150. "input": {
  21151. "type": "string"
  21152. }
  21153. },
  21154. "required": ["status", "input"],
  21155. "additionalProperties": false
  21156. },
  21157. "SessionMessageToolStateRunning": {
  21158. "type": "object",
  21159. "properties": {
  21160. "status": {
  21161. "type": "string",
  21162. "enum": ["running"]
  21163. },
  21164. "input": {
  21165. "type": "object"
  21166. },
  21167. "structured": {
  21168. "type": "object"
  21169. },
  21170. "content": {
  21171. "type": "array",
  21172. "items": {
  21173. "anyOf": [
  21174. {
  21175. "$ref": "#/components/schemas/ToolTextContent"
  21176. },
  21177. {
  21178. "$ref": "#/components/schemas/ToolFileContent"
  21179. }
  21180. ]
  21181. }
  21182. }
  21183. },
  21184. "required": ["status", "input", "structured", "content"],
  21185. "additionalProperties": false
  21186. },
  21187. "SessionMessageToolStateCompleted": {
  21188. "type": "object",
  21189. "properties": {
  21190. "status": {
  21191. "type": "string",
  21192. "enum": ["completed"]
  21193. },
  21194. "input": {
  21195. "type": "object"
  21196. },
  21197. "attachments": {
  21198. "type": "array",
  21199. "items": {
  21200. "$ref": "#/components/schemas/PromptFileAttachment"
  21201. }
  21202. },
  21203. "content": {
  21204. "type": "array",
  21205. "items": {
  21206. "anyOf": [
  21207. {
  21208. "$ref": "#/components/schemas/ToolTextContent"
  21209. },
  21210. {
  21211. "$ref": "#/components/schemas/ToolFileContent"
  21212. }
  21213. ]
  21214. }
  21215. },
  21216. "structured": {
  21217. "type": "object"
  21218. }
  21219. },
  21220. "required": ["status", "input", "content", "structured"],
  21221. "additionalProperties": false
  21222. },
  21223. "SessionMessageToolStateError": {
  21224. "type": "object",
  21225. "properties": {
  21226. "status": {
  21227. "type": "string",
  21228. "enum": ["error"]
  21229. },
  21230. "input": {
  21231. "type": "object"
  21232. },
  21233. "content": {
  21234. "type": "array",
  21235. "items": {
  21236. "anyOf": [
  21237. {
  21238. "$ref": "#/components/schemas/ToolTextContent"
  21239. },
  21240. {
  21241. "$ref": "#/components/schemas/ToolFileContent"
  21242. }
  21243. ]
  21244. }
  21245. },
  21246. "structured": {
  21247. "type": "object"
  21248. },
  21249. "error": {
  21250. "$ref": "#/components/schemas/SessionErrorUnknown"
  21251. }
  21252. },
  21253. "required": ["status", "input", "content", "structured", "error"],
  21254. "additionalProperties": false
  21255. },
  21256. "SessionMessageAssistantTool": {
  21257. "type": "object",
  21258. "properties": {
  21259. "type": {
  21260. "type": "string",
  21261. "enum": ["tool"]
  21262. },
  21263. "id": {
  21264. "type": "string"
  21265. },
  21266. "name": {
  21267. "type": "string"
  21268. },
  21269. "provider": {
  21270. "type": "object",
  21271. "properties": {
  21272. "executed": {
  21273. "type": "boolean"
  21274. },
  21275. "metadata": {
  21276. "type": "object"
  21277. }
  21278. },
  21279. "required": ["executed"],
  21280. "additionalProperties": false
  21281. },
  21282. "state": {
  21283. "anyOf": [
  21284. {
  21285. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  21286. },
  21287. {
  21288. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  21289. },
  21290. {
  21291. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  21292. },
  21293. {
  21294. "$ref": "#/components/schemas/SessionMessageToolStateError"
  21295. }
  21296. ]
  21297. },
  21298. "time": {
  21299. "type": "object",
  21300. "properties": {
  21301. "created": {
  21302. "type": "number"
  21303. },
  21304. "ran": {
  21305. "type": "number"
  21306. },
  21307. "completed": {
  21308. "type": "number"
  21309. },
  21310. "pruned": {
  21311. "type": "number"
  21312. }
  21313. },
  21314. "required": ["created"],
  21315. "additionalProperties": false
  21316. }
  21317. },
  21318. "required": ["type", "id", "name", "state", "time"],
  21319. "additionalProperties": false
  21320. },
  21321. "SessionMessageAssistant": {
  21322. "type": "object",
  21323. "properties": {
  21324. "id": {
  21325. "type": "string"
  21326. },
  21327. "metadata": {
  21328. "type": "object"
  21329. },
  21330. "time": {
  21331. "type": "object",
  21332. "properties": {
  21333. "created": {
  21334. "type": "number"
  21335. },
  21336. "completed": {
  21337. "type": "number"
  21338. }
  21339. },
  21340. "required": ["created"],
  21341. "additionalProperties": false
  21342. },
  21343. "type": {
  21344. "type": "string",
  21345. "enum": ["assistant"]
  21346. },
  21347. "agent": {
  21348. "type": "string"
  21349. },
  21350. "model": {
  21351. "type": "object",
  21352. "properties": {
  21353. "id": {
  21354. "type": "string"
  21355. },
  21356. "providerID": {
  21357. "type": "string"
  21358. },
  21359. "variant": {
  21360. "type": "string"
  21361. }
  21362. },
  21363. "required": ["id", "providerID", "variant"],
  21364. "additionalProperties": false
  21365. },
  21366. "content": {
  21367. "type": "array",
  21368. "items": {
  21369. "anyOf": [
  21370. {
  21371. "$ref": "#/components/schemas/SessionMessageAssistantText"
  21372. },
  21373. {
  21374. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  21375. },
  21376. {
  21377. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  21378. }
  21379. ]
  21380. }
  21381. },
  21382. "snapshot": {
  21383. "type": "object",
  21384. "properties": {
  21385. "start": {
  21386. "type": "string"
  21387. },
  21388. "end": {
  21389. "type": "string"
  21390. }
  21391. },
  21392. "additionalProperties": false
  21393. },
  21394. "finish": {
  21395. "type": "string"
  21396. },
  21397. "cost": {
  21398. "type": "number"
  21399. },
  21400. "tokens": {
  21401. "type": "object",
  21402. "properties": {
  21403. "input": {
  21404. "type": "number"
  21405. },
  21406. "output": {
  21407. "type": "number"
  21408. },
  21409. "reasoning": {
  21410. "type": "number"
  21411. },
  21412. "cache": {
  21413. "type": "object",
  21414. "properties": {
  21415. "read": {
  21416. "type": "number"
  21417. },
  21418. "write": {
  21419. "type": "number"
  21420. }
  21421. },
  21422. "required": ["read", "write"],
  21423. "additionalProperties": false
  21424. }
  21425. },
  21426. "required": ["input", "output", "reasoning", "cache"],
  21427. "additionalProperties": false
  21428. },
  21429. "error": {
  21430. "$ref": "#/components/schemas/SessionErrorUnknown"
  21431. }
  21432. },
  21433. "required": ["id", "time", "type", "agent", "model", "content"],
  21434. "additionalProperties": false
  21435. },
  21436. "SessionMessageCompaction": {
  21437. "type": "object",
  21438. "properties": {
  21439. "type": {
  21440. "type": "string",
  21441. "enum": ["compaction"]
  21442. },
  21443. "reason": {
  21444. "type": "string",
  21445. "enum": ["auto", "manual"]
  21446. },
  21447. "summary": {
  21448. "type": "string"
  21449. },
  21450. "include": {
  21451. "type": "string"
  21452. },
  21453. "id": {
  21454. "type": "string"
  21455. },
  21456. "metadata": {
  21457. "type": "object"
  21458. },
  21459. "time": {
  21460. "type": "object",
  21461. "properties": {
  21462. "created": {
  21463. "type": "number"
  21464. }
  21465. },
  21466. "required": ["created"],
  21467. "additionalProperties": false
  21468. }
  21469. },
  21470. "required": ["type", "reason", "summary", "id", "time"],
  21471. "additionalProperties": false
  21472. },
  21473. "SessionMessage": {
  21474. "anyOf": [
  21475. {
  21476. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  21477. },
  21478. {
  21479. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  21480. },
  21481. {
  21482. "$ref": "#/components/schemas/SessionMessageUser"
  21483. },
  21484. {
  21485. "$ref": "#/components/schemas/SessionMessageSynthetic"
  21486. },
  21487. {
  21488. "$ref": "#/components/schemas/SessionMessageShell"
  21489. },
  21490. {
  21491. "$ref": "#/components/schemas/SessionMessageAssistant"
  21492. },
  21493. {
  21494. "$ref": "#/components/schemas/SessionMessageCompaction"
  21495. }
  21496. ]
  21497. },
  21498. "ProviderV2Info": {
  21499. "type": "object",
  21500. "properties": {
  21501. "id": {
  21502. "type": "string"
  21503. },
  21504. "name": {
  21505. "type": "string"
  21506. },
  21507. "enabled": {
  21508. "anyOf": [
  21509. {
  21510. "type": "boolean",
  21511. "enum": [false]
  21512. },
  21513. {
  21514. "type": "object",
  21515. "properties": {
  21516. "via": {
  21517. "type": "string",
  21518. "enum": ["env"]
  21519. },
  21520. "name": {
  21521. "type": "string"
  21522. }
  21523. },
  21524. "required": ["via", "name"],
  21525. "additionalProperties": false
  21526. },
  21527. {
  21528. "type": "object",
  21529. "properties": {
  21530. "via": {
  21531. "type": "string",
  21532. "enum": ["account"]
  21533. },
  21534. "service": {
  21535. "type": "string"
  21536. }
  21537. },
  21538. "required": ["via", "service"],
  21539. "additionalProperties": false
  21540. },
  21541. {
  21542. "type": "object",
  21543. "properties": {
  21544. "via": {
  21545. "type": "string",
  21546. "enum": ["custom"]
  21547. },
  21548. "data": {
  21549. "type": "object"
  21550. }
  21551. },
  21552. "required": ["via", "data"],
  21553. "additionalProperties": false
  21554. }
  21555. ]
  21556. },
  21557. "env": {
  21558. "type": "array",
  21559. "items": {
  21560. "type": "string"
  21561. }
  21562. },
  21563. "endpoint": {
  21564. "anyOf": [
  21565. {
  21566. "type": "object",
  21567. "properties": {
  21568. "type": {
  21569. "type": "string",
  21570. "enum": ["unknown"]
  21571. }
  21572. },
  21573. "required": ["type"],
  21574. "additionalProperties": false
  21575. },
  21576. {
  21577. "type": "object",
  21578. "properties": {
  21579. "type": {
  21580. "type": "string",
  21581. "enum": ["openai/responses"]
  21582. },
  21583. "url": {
  21584. "type": "string"
  21585. },
  21586. "websocket": {
  21587. "type": "boolean"
  21588. }
  21589. },
  21590. "required": ["type", "url"],
  21591. "additionalProperties": false
  21592. },
  21593. {
  21594. "type": "object",
  21595. "properties": {
  21596. "type": {
  21597. "type": "string",
  21598. "enum": ["openai/completions"]
  21599. },
  21600. "url": {
  21601. "type": "string"
  21602. },
  21603. "reasoning": {
  21604. "anyOf": [
  21605. {
  21606. "type": "object",
  21607. "properties": {
  21608. "type": {
  21609. "type": "string",
  21610. "enum": ["reasoning_content"]
  21611. }
  21612. },
  21613. "required": ["type"],
  21614. "additionalProperties": false
  21615. },
  21616. {
  21617. "type": "object",
  21618. "properties": {
  21619. "type": {
  21620. "type": "string",
  21621. "enum": ["reasoning_details"]
  21622. }
  21623. },
  21624. "required": ["type"],
  21625. "additionalProperties": false
  21626. }
  21627. ]
  21628. }
  21629. },
  21630. "required": ["type", "url"],
  21631. "additionalProperties": false
  21632. },
  21633. {
  21634. "type": "object",
  21635. "properties": {
  21636. "type": {
  21637. "type": "string",
  21638. "enum": ["anthropic/messages"]
  21639. },
  21640. "url": {
  21641. "type": "string"
  21642. }
  21643. },
  21644. "required": ["type", "url"],
  21645. "additionalProperties": false
  21646. },
  21647. {
  21648. "type": "object",
  21649. "properties": {
  21650. "type": {
  21651. "type": "string",
  21652. "enum": ["aisdk"]
  21653. },
  21654. "package": {
  21655. "type": "string"
  21656. },
  21657. "url": {
  21658. "type": "string"
  21659. }
  21660. },
  21661. "required": ["type", "package"],
  21662. "additionalProperties": false
  21663. }
  21664. ]
  21665. },
  21666. "options": {
  21667. "type": "object",
  21668. "properties": {
  21669. "headers": {
  21670. "type": "object",
  21671. "additionalProperties": {
  21672. "type": "string"
  21673. }
  21674. },
  21675. "body": {
  21676. "type": "object"
  21677. },
  21678. "aisdk": {
  21679. "type": "object",
  21680. "properties": {
  21681. "provider": {
  21682. "type": "object"
  21683. },
  21684. "request": {
  21685. "type": "object"
  21686. }
  21687. },
  21688. "required": ["provider", "request"],
  21689. "additionalProperties": false
  21690. }
  21691. },
  21692. "required": ["headers", "body", "aisdk"],
  21693. "additionalProperties": false
  21694. }
  21695. },
  21696. "required": ["id", "name", "enabled", "env", "endpoint", "options"],
  21697. "additionalProperties": false
  21698. },
  21699. "EventTuiToastShow1": {
  21700. "type": "object",
  21701. "properties": {
  21702. "id": {
  21703. "type": "string"
  21704. },
  21705. "type": {
  21706. "type": "string",
  21707. "enum": ["tui.toast.show"]
  21708. },
  21709. "properties": {
  21710. "type": "object",
  21711. "properties": {
  21712. "title": {
  21713. "type": "string"
  21714. },
  21715. "message": {
  21716. "type": "string"
  21717. },
  21718. "variant": {
  21719. "type": "string",
  21720. "enum": ["info", "success", "warning", "error"]
  21721. },
  21722. "duration": {
  21723. "type": "integer",
  21724. "exclusiveMinimum": 0
  21725. }
  21726. },
  21727. "required": ["message", "variant"],
  21728. "additionalProperties": false
  21729. }
  21730. },
  21731. "required": ["id", "type", "properties"],
  21732. "additionalProperties": false
  21733. },
  21734. "ModelV2Info1": {
  21735. "type": "object",
  21736. "properties": {
  21737. "id": {
  21738. "type": "string"
  21739. },
  21740. "apiID": {
  21741. "type": "string"
  21742. },
  21743. "providerID": {
  21744. "type": "string"
  21745. },
  21746. "family": {
  21747. "type": "string"
  21748. },
  21749. "name": {
  21750. "type": "string"
  21751. },
  21752. "endpoint": {
  21753. "anyOf": [
  21754. {
  21755. "type": "object",
  21756. "properties": {
  21757. "type": {
  21758. "type": "string",
  21759. "enum": ["unknown"]
  21760. }
  21761. },
  21762. "required": ["type"],
  21763. "additionalProperties": false
  21764. },
  21765. {
  21766. "type": "object",
  21767. "properties": {
  21768. "type": {
  21769. "type": "string",
  21770. "enum": ["openai/responses"]
  21771. },
  21772. "url": {
  21773. "type": "string"
  21774. },
  21775. "websocket": {
  21776. "type": "boolean"
  21777. }
  21778. },
  21779. "required": ["type", "url"],
  21780. "additionalProperties": false
  21781. },
  21782. {
  21783. "type": "object",
  21784. "properties": {
  21785. "type": {
  21786. "type": "string",
  21787. "enum": ["openai/completions"]
  21788. },
  21789. "url": {
  21790. "type": "string"
  21791. },
  21792. "reasoning": {
  21793. "anyOf": [
  21794. {
  21795. "type": "object",
  21796. "properties": {
  21797. "type": {
  21798. "type": "string",
  21799. "enum": ["reasoning_content"]
  21800. }
  21801. },
  21802. "required": ["type"],
  21803. "additionalProperties": false
  21804. },
  21805. {
  21806. "type": "object",
  21807. "properties": {
  21808. "type": {
  21809. "type": "string",
  21810. "enum": ["reasoning_details"]
  21811. }
  21812. },
  21813. "required": ["type"],
  21814. "additionalProperties": false
  21815. }
  21816. ]
  21817. }
  21818. },
  21819. "required": ["type", "url"],
  21820. "additionalProperties": false
  21821. },
  21822. {
  21823. "type": "object",
  21824. "properties": {
  21825. "type": {
  21826. "type": "string",
  21827. "enum": ["anthropic/messages"]
  21828. },
  21829. "url": {
  21830. "type": "string"
  21831. }
  21832. },
  21833. "required": ["type", "url"],
  21834. "additionalProperties": false
  21835. },
  21836. {
  21837. "type": "object",
  21838. "properties": {
  21839. "type": {
  21840. "type": "string",
  21841. "enum": ["aisdk"]
  21842. },
  21843. "package": {
  21844. "type": "string"
  21845. },
  21846. "url": {
  21847. "type": "string"
  21848. }
  21849. },
  21850. "required": ["type", "package"],
  21851. "additionalProperties": false
  21852. }
  21853. ]
  21854. },
  21855. "capabilities": {
  21856. "type": "object",
  21857. "properties": {
  21858. "tools": {
  21859. "type": "boolean"
  21860. },
  21861. "input": {
  21862. "type": "array",
  21863. "items": {
  21864. "type": "string"
  21865. }
  21866. },
  21867. "output": {
  21868. "type": "array",
  21869. "items": {
  21870. "type": "string"
  21871. }
  21872. }
  21873. },
  21874. "required": ["tools", "input", "output"],
  21875. "additionalProperties": false
  21876. },
  21877. "options": {
  21878. "type": "object",
  21879. "properties": {
  21880. "headers": {
  21881. "type": "object",
  21882. "additionalProperties": {
  21883. "type": "string"
  21884. }
  21885. },
  21886. "body": {
  21887. "type": "object"
  21888. },
  21889. "aisdk": {
  21890. "type": "object",
  21891. "properties": {
  21892. "provider": {
  21893. "type": "object"
  21894. },
  21895. "request": {
  21896. "type": "object"
  21897. }
  21898. },
  21899. "required": ["provider", "request"],
  21900. "additionalProperties": false
  21901. },
  21902. "variant": {
  21903. "type": "string"
  21904. }
  21905. },
  21906. "required": ["headers", "body", "aisdk"],
  21907. "additionalProperties": false
  21908. },
  21909. "variants": {
  21910. "type": "array",
  21911. "items": {
  21912. "type": "object",
  21913. "properties": {
  21914. "id": {
  21915. "type": "string"
  21916. },
  21917. "headers": {
  21918. "type": "object",
  21919. "additionalProperties": {
  21920. "type": "string"
  21921. }
  21922. },
  21923. "body": {
  21924. "type": "object"
  21925. },
  21926. "aisdk": {
  21927. "type": "object",
  21928. "properties": {
  21929. "provider": {
  21930. "type": "object"
  21931. },
  21932. "request": {
  21933. "type": "object"
  21934. }
  21935. },
  21936. "required": ["provider", "request"],
  21937. "additionalProperties": false
  21938. }
  21939. },
  21940. "required": ["id", "headers", "body", "aisdk"],
  21941. "additionalProperties": false
  21942. }
  21943. },
  21944. "time": {
  21945. "type": "object",
  21946. "properties": {
  21947. "released": {
  21948. "anyOf": [
  21949. {
  21950. "type": "number"
  21951. },
  21952. {
  21953. "type": "string",
  21954. "enum": ["NaN"]
  21955. },
  21956. {
  21957. "type": "string",
  21958. "enum": ["Infinity"]
  21959. },
  21960. {
  21961. "type": "string",
  21962. "enum": ["-Infinity"]
  21963. }
  21964. ]
  21965. }
  21966. },
  21967. "required": ["released"],
  21968. "additionalProperties": false
  21969. },
  21970. "cost": {
  21971. "type": "array",
  21972. "items": {
  21973. "type": "object",
  21974. "properties": {
  21975. "tier": {
  21976. "type": "object",
  21977. "properties": {
  21978. "type": {
  21979. "type": "string",
  21980. "enum": ["context"]
  21981. },
  21982. "size": {
  21983. "type": "integer"
  21984. }
  21985. },
  21986. "required": ["type", "size"],
  21987. "additionalProperties": false
  21988. },
  21989. "input": {
  21990. "type": "number"
  21991. },
  21992. "output": {
  21993. "type": "number"
  21994. },
  21995. "cache": {
  21996. "type": "object",
  21997. "properties": {
  21998. "read": {
  21999. "type": "number"
  22000. },
  22001. "write": {
  22002. "type": "number"
  22003. }
  22004. },
  22005. "required": ["read", "write"],
  22006. "additionalProperties": false
  22007. }
  22008. },
  22009. "required": ["input", "output", "cache"],
  22010. "additionalProperties": false
  22011. }
  22012. },
  22013. "status": {
  22014. "type": "string",
  22015. "enum": ["alpha", "beta", "deprecated", "active"]
  22016. },
  22017. "enabled": {
  22018. "type": "boolean"
  22019. },
  22020. "limit": {
  22021. "type": "object",
  22022. "properties": {
  22023. "context": {
  22024. "type": "integer"
  22025. },
  22026. "input": {
  22027. "type": "integer"
  22028. },
  22029. "output": {
  22030. "type": "integer"
  22031. }
  22032. },
  22033. "required": ["context", "output"],
  22034. "additionalProperties": false
  22035. }
  22036. },
  22037. "required": [
  22038. "id",
  22039. "apiID",
  22040. "providerID",
  22041. "name",
  22042. "endpoint",
  22043. "capabilities",
  22044. "options",
  22045. "variants",
  22046. "time",
  22047. "cost",
  22048. "status",
  22049. "enabled",
  22050. "limit"
  22051. ],
  22052. "additionalProperties": false
  22053. },
  22054. "BadRequestError": {
  22055. "type": "object",
  22056. "required": ["name", "data"],
  22057. "properties": {
  22058. "name": {
  22059. "type": "string",
  22060. "enum": ["BadRequest"]
  22061. },
  22062. "data": {
  22063. "type": "object",
  22064. "required": ["message"],
  22065. "properties": {
  22066. "message": {
  22067. "type": "string"
  22068. },
  22069. "kind": {
  22070. "type": "string",
  22071. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  22072. }
  22073. }
  22074. }
  22075. }
  22076. }
  22077. }
  22078. },
  22079. "security": [],
  22080. "tags": [
  22081. {
  22082. "name": "control",
  22083. "description": "Control plane routes."
  22084. },
  22085. {
  22086. "name": "global",
  22087. "description": "Global server routes."
  22088. },
  22089. {
  22090. "name": "event",
  22091. "description": "Instance event stream route."
  22092. },
  22093. {
  22094. "name": "config",
  22095. "description": "Experimental HttpApi config routes."
  22096. },
  22097. {
  22098. "name": "experimental",
  22099. "description": "Experimental HttpApi read-only routes."
  22100. },
  22101. {
  22102. "name": "file",
  22103. "description": "Experimental HttpApi file routes."
  22104. },
  22105. {
  22106. "name": "instance",
  22107. "description": "Experimental HttpApi instance read routes."
  22108. },
  22109. {
  22110. "name": "mcp",
  22111. "description": "Experimental HttpApi MCP routes."
  22112. },
  22113. {
  22114. "name": "project",
  22115. "description": "Experimental HttpApi project routes."
  22116. },
  22117. {
  22118. "name": "pty",
  22119. "description": "Experimental HttpApi PTY routes."
  22120. },
  22121. {
  22122. "name": "question",
  22123. "description": "Question routes."
  22124. },
  22125. {
  22126. "name": "permission",
  22127. "description": "Experimental HttpApi permission routes."
  22128. },
  22129. {
  22130. "name": "provider",
  22131. "description": "Experimental HttpApi provider routes."
  22132. },
  22133. {
  22134. "name": "session",
  22135. "description": "Experimental HttpApi session routes."
  22136. },
  22137. {
  22138. "name": "sync",
  22139. "description": "Experimental HttpApi sync routes."
  22140. },
  22141. {
  22142. "name": "v2",
  22143. "description": "Experimental v2 routes."
  22144. },
  22145. {
  22146. "name": "v2 messages",
  22147. "description": "Experimental v2 message routes."
  22148. },
  22149. {
  22150. "name": "v2 models",
  22151. "description": "Experimental v2 model routes."
  22152. },
  22153. {
  22154. "name": "v2 providers",
  22155. "description": "Experimental v2 provider routes."
  22156. },
  22157. {
  22158. "name": "tui",
  22159. "description": "Experimental HttpApi TUI routes."
  22160. },
  22161. {
  22162. "name": "workspace",
  22163. "description": "Experimental HttpApi workspace routes."
  22164. },
  22165. {
  22166. "name": "pty",
  22167. "description": "PTY websocket route."
  22168. }
  22169. ]
  22170. }