openapi.json 608 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187
  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": "ProjectNotFoundError",
  3634. "content": {
  3635. "application/json": {
  3636. "schema": {
  3637. "$ref": "#/components/schemas/ProjectNotFoundError"
  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. "ProjectNotFoundError": {
  15433. "type": "object",
  15434. "properties": {
  15435. "_tag": {
  15436. "type": "string",
  15437. "enum": ["ProjectNotFoundError"]
  15438. },
  15439. "projectID": {
  15440. "type": "string"
  15441. },
  15442. "message": {
  15443. "type": "string"
  15444. }
  15445. },
  15446. "required": ["_tag", "projectID", "message"],
  15447. "additionalProperties": false
  15448. },
  15449. "PtyNotFoundError": {
  15450. "type": "object",
  15451. "properties": {
  15452. "_tag": {
  15453. "type": "string",
  15454. "enum": ["PtyNotFoundError"]
  15455. },
  15456. "ptyID": {
  15457. "type": "string"
  15458. },
  15459. "message": {
  15460. "type": "string"
  15461. }
  15462. },
  15463. "required": ["_tag", "ptyID", "message"],
  15464. "additionalProperties": false
  15465. },
  15466. "PtyForbiddenError": {
  15467. "type": "object",
  15468. "properties": {
  15469. "_tag": {
  15470. "type": "string",
  15471. "enum": ["PtyForbiddenError"]
  15472. },
  15473. "message": {
  15474. "type": "string"
  15475. }
  15476. },
  15477. "required": ["_tag", "message"],
  15478. "additionalProperties": false
  15479. },
  15480. "QuestionNotFoundError": {
  15481. "type": "object",
  15482. "properties": {
  15483. "_tag": {
  15484. "type": "string",
  15485. "enum": ["QuestionNotFoundError"]
  15486. },
  15487. "requestID": {
  15488. "type": "string"
  15489. },
  15490. "message": {
  15491. "type": "string"
  15492. }
  15493. },
  15494. "required": ["_tag", "requestID", "message"],
  15495. "additionalProperties": false
  15496. },
  15497. "PermissionNotFoundError": {
  15498. "type": "object",
  15499. "properties": {
  15500. "_tag": {
  15501. "type": "string",
  15502. "enum": ["PermissionNotFoundError"]
  15503. },
  15504. "requestID": {
  15505. "type": "string"
  15506. },
  15507. "message": {
  15508. "type": "string"
  15509. }
  15510. },
  15511. "required": ["_tag", "requestID", "message"],
  15512. "additionalProperties": false
  15513. },
  15514. "ProviderAuthMethod": {
  15515. "type": "object",
  15516. "properties": {
  15517. "type": {
  15518. "type": "string",
  15519. "enum": ["oauth", "api"]
  15520. },
  15521. "label": {
  15522. "type": "string"
  15523. },
  15524. "prompts": {
  15525. "type": "array",
  15526. "items": {
  15527. "anyOf": [
  15528. {
  15529. "type": "object",
  15530. "properties": {
  15531. "type": {
  15532. "type": "string",
  15533. "enum": ["text"]
  15534. },
  15535. "key": {
  15536. "type": "string"
  15537. },
  15538. "message": {
  15539. "type": "string"
  15540. },
  15541. "placeholder": {
  15542. "type": "string"
  15543. },
  15544. "when": {
  15545. "type": "object",
  15546. "properties": {
  15547. "key": {
  15548. "type": "string"
  15549. },
  15550. "op": {
  15551. "type": "string",
  15552. "enum": ["eq", "neq"]
  15553. },
  15554. "value": {
  15555. "type": "string"
  15556. }
  15557. },
  15558. "required": ["key", "op", "value"],
  15559. "additionalProperties": false
  15560. }
  15561. },
  15562. "required": ["type", "key", "message"],
  15563. "additionalProperties": false
  15564. },
  15565. {
  15566. "type": "object",
  15567. "properties": {
  15568. "type": {
  15569. "type": "string",
  15570. "enum": ["select"]
  15571. },
  15572. "key": {
  15573. "type": "string"
  15574. },
  15575. "message": {
  15576. "type": "string"
  15577. },
  15578. "options": {
  15579. "type": "array",
  15580. "items": {
  15581. "type": "object",
  15582. "properties": {
  15583. "label": {
  15584. "type": "string"
  15585. },
  15586. "value": {
  15587. "type": "string"
  15588. },
  15589. "hint": {
  15590. "type": "string"
  15591. }
  15592. },
  15593. "required": ["label", "value"],
  15594. "additionalProperties": false
  15595. }
  15596. },
  15597. "when": {
  15598. "type": "object",
  15599. "properties": {
  15600. "key": {
  15601. "type": "string"
  15602. },
  15603. "op": {
  15604. "type": "string",
  15605. "enum": ["eq", "neq"]
  15606. },
  15607. "value": {
  15608. "type": "string"
  15609. }
  15610. },
  15611. "required": ["key", "op", "value"],
  15612. "additionalProperties": false
  15613. }
  15614. },
  15615. "required": ["type", "key", "message", "options"],
  15616. "additionalProperties": false
  15617. }
  15618. ]
  15619. }
  15620. }
  15621. },
  15622. "required": ["type", "label"],
  15623. "additionalProperties": false
  15624. },
  15625. "ProviderAuthAuthorization": {
  15626. "type": "object",
  15627. "properties": {
  15628. "url": {
  15629. "type": "string"
  15630. },
  15631. "method": {
  15632. "type": "string",
  15633. "enum": ["auto", "code"]
  15634. },
  15635. "instructions": {
  15636. "type": "string"
  15637. }
  15638. },
  15639. "required": ["url", "method", "instructions"],
  15640. "additionalProperties": false
  15641. },
  15642. "ProviderAuthError1": {
  15643. "type": "object",
  15644. "properties": {
  15645. "name": {
  15646. "type": "string",
  15647. "enum": [
  15648. "BadRequest",
  15649. "ProviderAuthOauthMissing",
  15650. "ProviderAuthOauthCodeMissing",
  15651. "ProviderAuthOauthCallbackFailed",
  15652. "ProviderAuthValidationFailed"
  15653. ]
  15654. },
  15655. "data": {
  15656. "type": "object",
  15657. "properties": {
  15658. "providerID": {
  15659. "type": "string"
  15660. },
  15661. "field": {
  15662. "type": "string"
  15663. },
  15664. "message": {
  15665. "type": "string"
  15666. },
  15667. "kind": {
  15668. "type": "string"
  15669. }
  15670. },
  15671. "additionalProperties": false
  15672. }
  15673. },
  15674. "required": ["name", "data"],
  15675. "additionalProperties": false
  15676. },
  15677. "NotFoundError": {
  15678. "type": "object",
  15679. "required": ["name", "data"],
  15680. "properties": {
  15681. "name": {
  15682. "type": "string",
  15683. "enum": ["NotFoundError"]
  15684. },
  15685. "data": {
  15686. "type": "object",
  15687. "required": ["message"],
  15688. "properties": {
  15689. "message": {
  15690. "type": "string"
  15691. }
  15692. }
  15693. }
  15694. }
  15695. },
  15696. "TextPartInput": {
  15697. "type": "object",
  15698. "properties": {
  15699. "id": {
  15700. "type": "string",
  15701. "pattern": "^prt"
  15702. },
  15703. "type": {
  15704. "type": "string",
  15705. "enum": ["text"]
  15706. },
  15707. "text": {
  15708. "type": "string"
  15709. },
  15710. "synthetic": {
  15711. "type": "boolean"
  15712. },
  15713. "ignored": {
  15714. "type": "boolean"
  15715. },
  15716. "time": {
  15717. "type": "object",
  15718. "properties": {
  15719. "start": {
  15720. "type": "integer",
  15721. "minimum": 0
  15722. },
  15723. "end": {
  15724. "type": "integer",
  15725. "minimum": 0
  15726. }
  15727. },
  15728. "required": ["start"],
  15729. "additionalProperties": false
  15730. },
  15731. "metadata": {
  15732. "type": "object"
  15733. }
  15734. },
  15735. "required": ["type", "text"],
  15736. "additionalProperties": false
  15737. },
  15738. "FilePartInput": {
  15739. "type": "object",
  15740. "properties": {
  15741. "id": {
  15742. "type": "string",
  15743. "pattern": "^prt"
  15744. },
  15745. "type": {
  15746. "type": "string",
  15747. "enum": ["file"]
  15748. },
  15749. "mime": {
  15750. "type": "string"
  15751. },
  15752. "filename": {
  15753. "type": "string"
  15754. },
  15755. "url": {
  15756. "type": "string"
  15757. },
  15758. "source": {
  15759. "$ref": "#/components/schemas/FilePartSource"
  15760. }
  15761. },
  15762. "required": ["type", "mime", "url"],
  15763. "additionalProperties": false
  15764. },
  15765. "AgentPartInput": {
  15766. "type": "object",
  15767. "properties": {
  15768. "id": {
  15769. "type": "string",
  15770. "pattern": "^prt"
  15771. },
  15772. "type": {
  15773. "type": "string",
  15774. "enum": ["agent"]
  15775. },
  15776. "name": {
  15777. "type": "string"
  15778. },
  15779. "source": {
  15780. "type": "object",
  15781. "properties": {
  15782. "value": {
  15783. "type": "string"
  15784. },
  15785. "start": {
  15786. "type": "integer",
  15787. "minimum": 0
  15788. },
  15789. "end": {
  15790. "type": "integer",
  15791. "minimum": 0
  15792. }
  15793. },
  15794. "required": ["value", "start", "end"],
  15795. "additionalProperties": false
  15796. }
  15797. },
  15798. "required": ["type", "name"],
  15799. "additionalProperties": false
  15800. },
  15801. "SubtaskPartInput": {
  15802. "type": "object",
  15803. "properties": {
  15804. "id": {
  15805. "type": "string",
  15806. "pattern": "^prt"
  15807. },
  15808. "type": {
  15809. "type": "string",
  15810. "enum": ["subtask"]
  15811. },
  15812. "prompt": {
  15813. "type": "string"
  15814. },
  15815. "description": {
  15816. "type": "string"
  15817. },
  15818. "agent": {
  15819. "type": "string"
  15820. },
  15821. "model": {
  15822. "type": "object",
  15823. "properties": {
  15824. "providerID": {
  15825. "type": "string"
  15826. },
  15827. "modelID": {
  15828. "type": "string"
  15829. }
  15830. },
  15831. "required": ["providerID", "modelID"],
  15832. "additionalProperties": false
  15833. },
  15834. "command": {
  15835. "type": "string"
  15836. }
  15837. },
  15838. "required": ["type", "prompt", "description", "agent"],
  15839. "additionalProperties": false
  15840. },
  15841. "SessionBusyError": {
  15842. "type": "object",
  15843. "properties": {
  15844. "_tag": {
  15845. "type": "string",
  15846. "enum": ["SessionBusyError"]
  15847. },
  15848. "sessionID": {
  15849. "type": "string"
  15850. },
  15851. "message": {
  15852. "type": "string"
  15853. }
  15854. },
  15855. "required": ["_tag", "sessionID", "message"],
  15856. "additionalProperties": false
  15857. },
  15858. "V2SessionsResponse": {
  15859. "type": "object",
  15860. "properties": {
  15861. "items": {
  15862. "type": "array",
  15863. "items": {
  15864. "$ref": "#/components/schemas/SessionInfo"
  15865. }
  15866. },
  15867. "cursor": {
  15868. "type": "object",
  15869. "properties": {
  15870. "previous": {
  15871. "type": "string"
  15872. },
  15873. "next": {
  15874. "type": "string"
  15875. }
  15876. },
  15877. "additionalProperties": false
  15878. }
  15879. },
  15880. "required": ["items", "cursor"],
  15881. "additionalProperties": false
  15882. },
  15883. "InvalidCursorError": {
  15884. "type": "object",
  15885. "properties": {
  15886. "_tag": {
  15887. "type": "string",
  15888. "enum": ["InvalidCursorError"]
  15889. },
  15890. "message": {
  15891. "type": "string"
  15892. }
  15893. },
  15894. "required": ["_tag", "message"],
  15895. "additionalProperties": false
  15896. },
  15897. "UnauthorizedError": {
  15898. "type": "object",
  15899. "properties": {
  15900. "_tag": {
  15901. "type": "string",
  15902. "enum": ["UnauthorizedError"]
  15903. },
  15904. "message": {
  15905. "type": "string"
  15906. }
  15907. },
  15908. "required": ["_tag", "message"],
  15909. "additionalProperties": false
  15910. },
  15911. "SessionNotFoundError": {
  15912. "type": "object",
  15913. "properties": {
  15914. "_tag": {
  15915. "type": "string",
  15916. "enum": ["SessionNotFoundError"]
  15917. },
  15918. "sessionID": {
  15919. "type": "string"
  15920. },
  15921. "message": {
  15922. "type": "string"
  15923. }
  15924. },
  15925. "required": ["_tag", "sessionID", "message"],
  15926. "additionalProperties": false
  15927. },
  15928. "ServiceUnavailableError": {
  15929. "type": "object",
  15930. "properties": {
  15931. "_tag": {
  15932. "type": "string",
  15933. "enum": ["ServiceUnavailableError"]
  15934. },
  15935. "message": {
  15936. "type": "string"
  15937. },
  15938. "service": {
  15939. "type": "string"
  15940. }
  15941. },
  15942. "required": ["_tag", "message"],
  15943. "additionalProperties": false
  15944. },
  15945. "UnknownError1": {
  15946. "type": "object",
  15947. "properties": {
  15948. "_tag": {
  15949. "type": "string",
  15950. "enum": ["UnknownError"]
  15951. },
  15952. "message": {
  15953. "type": "string"
  15954. },
  15955. "ref": {
  15956. "type": "string"
  15957. }
  15958. },
  15959. "required": ["_tag", "message"],
  15960. "additionalProperties": false
  15961. },
  15962. "V2SessionMessagesResponse": {
  15963. "type": "object",
  15964. "properties": {
  15965. "items": {
  15966. "type": "array",
  15967. "items": {
  15968. "$ref": "#/components/schemas/SessionMessage"
  15969. }
  15970. },
  15971. "cursor": {
  15972. "type": "object",
  15973. "properties": {
  15974. "previous": {
  15975. "type": "string"
  15976. },
  15977. "next": {
  15978. "type": "string"
  15979. }
  15980. },
  15981. "additionalProperties": false
  15982. }
  15983. },
  15984. "required": ["items", "cursor"],
  15985. "additionalProperties": false
  15986. },
  15987. "ProviderNotFoundError": {
  15988. "type": "object",
  15989. "properties": {
  15990. "_tag": {
  15991. "type": "string",
  15992. "enum": ["ProviderNotFoundError"]
  15993. },
  15994. "providerID": {
  15995. "type": "string"
  15996. },
  15997. "message": {
  15998. "type": "string"
  15999. }
  16000. },
  16001. "required": ["_tag", "providerID", "message"],
  16002. "additionalProperties": false
  16003. },
  16004. "EventTuiPromptAppend": {
  16005. "type": "object",
  16006. "properties": {
  16007. "type": {
  16008. "type": "string",
  16009. "enum": ["tui.prompt.append"]
  16010. },
  16011. "properties": {
  16012. "type": "object",
  16013. "properties": {
  16014. "text": {
  16015. "type": "string"
  16016. }
  16017. },
  16018. "required": ["text"],
  16019. "additionalProperties": false
  16020. }
  16021. },
  16022. "required": ["type", "properties"],
  16023. "additionalProperties": false
  16024. },
  16025. "EventTuiCommandExecute": {
  16026. "type": "object",
  16027. "properties": {
  16028. "type": {
  16029. "type": "string",
  16030. "enum": ["tui.command.execute"]
  16031. },
  16032. "properties": {
  16033. "type": "object",
  16034. "properties": {
  16035. "command": {
  16036. "anyOf": [
  16037. {
  16038. "type": "string",
  16039. "enum": [
  16040. "session.list",
  16041. "session.new",
  16042. "session.share",
  16043. "session.interrupt",
  16044. "session.compact",
  16045. "session.page.up",
  16046. "session.page.down",
  16047. "session.line.up",
  16048. "session.line.down",
  16049. "session.half.page.up",
  16050. "session.half.page.down",
  16051. "session.first",
  16052. "session.last",
  16053. "prompt.clear",
  16054. "prompt.submit",
  16055. "agent.cycle"
  16056. ]
  16057. },
  16058. {
  16059. "type": "string"
  16060. }
  16061. ]
  16062. }
  16063. },
  16064. "required": ["command"],
  16065. "additionalProperties": false
  16066. }
  16067. },
  16068. "required": ["type", "properties"],
  16069. "additionalProperties": false
  16070. },
  16071. "EventTuiToastShow": {
  16072. "type": "object",
  16073. "properties": {
  16074. "type": {
  16075. "type": "string",
  16076. "enum": ["tui.toast.show"]
  16077. },
  16078. "properties": {
  16079. "type": "object",
  16080. "properties": {
  16081. "title": {
  16082. "type": "string"
  16083. },
  16084. "message": {
  16085. "type": "string"
  16086. },
  16087. "variant": {
  16088. "type": "string",
  16089. "enum": ["info", "success", "warning", "error"]
  16090. },
  16091. "duration": {
  16092. "type": "integer",
  16093. "exclusiveMinimum": 0
  16094. }
  16095. },
  16096. "required": ["message", "variant"],
  16097. "additionalProperties": false
  16098. }
  16099. },
  16100. "required": ["type", "properties"],
  16101. "additionalProperties": false
  16102. },
  16103. "EventTuiSessionSelect": {
  16104. "type": "object",
  16105. "properties": {
  16106. "type": {
  16107. "type": "string",
  16108. "enum": ["tui.session.select"]
  16109. },
  16110. "properties": {
  16111. "type": "object",
  16112. "properties": {
  16113. "sessionID": {
  16114. "type": "string",
  16115. "pattern": "^ses",
  16116. "description": "Session ID to navigate to"
  16117. }
  16118. },
  16119. "required": ["sessionID"],
  16120. "additionalProperties": false
  16121. }
  16122. },
  16123. "required": ["type", "properties"],
  16124. "additionalProperties": false
  16125. },
  16126. "Workspace": {
  16127. "type": "object",
  16128. "properties": {
  16129. "id": {
  16130. "type": "string",
  16131. "pattern": "^wrk"
  16132. },
  16133. "type": {
  16134. "type": "string"
  16135. },
  16136. "name": {
  16137. "type": "string"
  16138. },
  16139. "branch": {
  16140. "anyOf": [
  16141. {
  16142. "type": "string"
  16143. },
  16144. {
  16145. "type": "null"
  16146. }
  16147. ]
  16148. },
  16149. "directory": {
  16150. "anyOf": [
  16151. {
  16152. "type": "string"
  16153. },
  16154. {
  16155. "type": "null"
  16156. }
  16157. ]
  16158. },
  16159. "extra": {
  16160. "anyOf": [
  16161. {},
  16162. {
  16163. "type": "null"
  16164. }
  16165. ]
  16166. },
  16167. "projectID": {
  16168. "type": "string"
  16169. },
  16170. "timeUsed": {
  16171. "anyOf": [
  16172. {
  16173. "type": "number"
  16174. },
  16175. {
  16176. "type": "string",
  16177. "enum": ["NaN"]
  16178. },
  16179. {
  16180. "type": "string",
  16181. "enum": ["Infinity"]
  16182. },
  16183. {
  16184. "type": "string",
  16185. "enum": ["-Infinity"]
  16186. },
  16187. {
  16188. "type": "string",
  16189. "enum": ["Infinity", "-Infinity", "NaN"]
  16190. }
  16191. ]
  16192. }
  16193. },
  16194. "required": ["id", "type", "name", "projectID", "timeUsed"],
  16195. "additionalProperties": false
  16196. },
  16197. "WorkspaceWarpError": {
  16198. "type": "object",
  16199. "properties": {
  16200. "name": {
  16201. "type": "string",
  16202. "enum": ["WorkspaceWarpError"]
  16203. },
  16204. "data": {
  16205. "type": "object",
  16206. "properties": {
  16207. "message": {
  16208. "type": "string"
  16209. }
  16210. },
  16211. "required": ["message"],
  16212. "additionalProperties": false
  16213. }
  16214. },
  16215. "required": ["name", "data"],
  16216. "additionalProperties": false
  16217. },
  16218. "effect_HttpApiError_Forbidden": {
  16219. "type": "object",
  16220. "properties": {
  16221. "_tag": {
  16222. "type": "string",
  16223. "enum": ["Forbidden"]
  16224. }
  16225. },
  16226. "required": ["_tag"],
  16227. "additionalProperties": false
  16228. },
  16229. "SyncEventMessageUpdated": {
  16230. "type": "object",
  16231. "properties": {
  16232. "type": {
  16233. "type": "string",
  16234. "enum": ["sync"]
  16235. },
  16236. "name": {
  16237. "type": "string",
  16238. "enum": ["message.updated.1"]
  16239. },
  16240. "id": {
  16241. "type": "string"
  16242. },
  16243. "seq": {
  16244. "type": "number"
  16245. },
  16246. "aggregateID": {
  16247. "type": "string",
  16248. "enum": ["sessionID"]
  16249. },
  16250. "data": {
  16251. "type": "object",
  16252. "properties": {
  16253. "sessionID": {
  16254. "type": "string",
  16255. "pattern": "^ses"
  16256. },
  16257. "info": {
  16258. "$ref": "#/components/schemas/Message"
  16259. }
  16260. },
  16261. "required": ["sessionID", "info"],
  16262. "additionalProperties": false
  16263. }
  16264. },
  16265. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16266. "additionalProperties": false
  16267. },
  16268. "SyncEventMessageRemoved": {
  16269. "type": "object",
  16270. "properties": {
  16271. "type": {
  16272. "type": "string",
  16273. "enum": ["sync"]
  16274. },
  16275. "name": {
  16276. "type": "string",
  16277. "enum": ["message.removed.1"]
  16278. },
  16279. "id": {
  16280. "type": "string"
  16281. },
  16282. "seq": {
  16283. "type": "number"
  16284. },
  16285. "aggregateID": {
  16286. "type": "string",
  16287. "enum": ["sessionID"]
  16288. },
  16289. "data": {
  16290. "type": "object",
  16291. "properties": {
  16292. "sessionID": {
  16293. "type": "string",
  16294. "pattern": "^ses"
  16295. },
  16296. "messageID": {
  16297. "type": "string",
  16298. "pattern": "^msg"
  16299. }
  16300. },
  16301. "required": ["sessionID", "messageID"],
  16302. "additionalProperties": false
  16303. }
  16304. },
  16305. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16306. "additionalProperties": false
  16307. },
  16308. "SyncEventMessagePartUpdated": {
  16309. "type": "object",
  16310. "properties": {
  16311. "type": {
  16312. "type": "string",
  16313. "enum": ["sync"]
  16314. },
  16315. "name": {
  16316. "type": "string",
  16317. "enum": ["message.part.updated.1"]
  16318. },
  16319. "id": {
  16320. "type": "string"
  16321. },
  16322. "seq": {
  16323. "type": "number"
  16324. },
  16325. "aggregateID": {
  16326. "type": "string",
  16327. "enum": ["sessionID"]
  16328. },
  16329. "data": {
  16330. "type": "object",
  16331. "properties": {
  16332. "sessionID": {
  16333. "type": "string",
  16334. "pattern": "^ses"
  16335. },
  16336. "part": {
  16337. "$ref": "#/components/schemas/Part"
  16338. },
  16339. "time": {
  16340. "type": "integer",
  16341. "minimum": 0
  16342. }
  16343. },
  16344. "required": ["sessionID", "part", "time"],
  16345. "additionalProperties": false
  16346. }
  16347. },
  16348. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16349. "additionalProperties": false
  16350. },
  16351. "SyncEventMessagePartRemoved": {
  16352. "type": "object",
  16353. "properties": {
  16354. "type": {
  16355. "type": "string",
  16356. "enum": ["sync"]
  16357. },
  16358. "name": {
  16359. "type": "string",
  16360. "enum": ["message.part.removed.1"]
  16361. },
  16362. "id": {
  16363. "type": "string"
  16364. },
  16365. "seq": {
  16366. "type": "number"
  16367. },
  16368. "aggregateID": {
  16369. "type": "string",
  16370. "enum": ["sessionID"]
  16371. },
  16372. "data": {
  16373. "type": "object",
  16374. "properties": {
  16375. "sessionID": {
  16376. "type": "string",
  16377. "pattern": "^ses"
  16378. },
  16379. "messageID": {
  16380. "type": "string",
  16381. "pattern": "^msg"
  16382. },
  16383. "partID": {
  16384. "type": "string",
  16385. "pattern": "^prt"
  16386. }
  16387. },
  16388. "required": ["sessionID", "messageID", "partID"],
  16389. "additionalProperties": false
  16390. }
  16391. },
  16392. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16393. "additionalProperties": false
  16394. },
  16395. "SyncEventSessionCreated": {
  16396. "type": "object",
  16397. "properties": {
  16398. "type": {
  16399. "type": "string",
  16400. "enum": ["sync"]
  16401. },
  16402. "name": {
  16403. "type": "string",
  16404. "enum": ["session.created.1"]
  16405. },
  16406. "id": {
  16407. "type": "string"
  16408. },
  16409. "seq": {
  16410. "type": "number"
  16411. },
  16412. "aggregateID": {
  16413. "type": "string",
  16414. "enum": ["sessionID"]
  16415. },
  16416. "data": {
  16417. "type": "object",
  16418. "properties": {
  16419. "sessionID": {
  16420. "type": "string",
  16421. "pattern": "^ses"
  16422. },
  16423. "info": {
  16424. "$ref": "#/components/schemas/Session"
  16425. }
  16426. },
  16427. "required": ["sessionID", "info"],
  16428. "additionalProperties": false
  16429. }
  16430. },
  16431. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16432. "additionalProperties": false
  16433. },
  16434. "SyncEventSessionUpdated": {
  16435. "type": "object",
  16436. "properties": {
  16437. "type": {
  16438. "type": "string",
  16439. "enum": ["sync"]
  16440. },
  16441. "name": {
  16442. "type": "string",
  16443. "enum": ["session.updated.1"]
  16444. },
  16445. "id": {
  16446. "type": "string"
  16447. },
  16448. "seq": {
  16449. "type": "number"
  16450. },
  16451. "aggregateID": {
  16452. "type": "string",
  16453. "enum": ["sessionID"]
  16454. },
  16455. "data": {
  16456. "type": "object",
  16457. "properties": {
  16458. "sessionID": {
  16459. "type": "string",
  16460. "pattern": "^ses"
  16461. },
  16462. "info": {
  16463. "type": "object",
  16464. "properties": {
  16465. "id": {
  16466. "anyOf": [
  16467. {
  16468. "type": "string",
  16469. "pattern": "^ses"
  16470. },
  16471. {
  16472. "type": "null"
  16473. }
  16474. ]
  16475. },
  16476. "slug": {
  16477. "anyOf": [
  16478. {
  16479. "type": "string"
  16480. },
  16481. {
  16482. "type": "null"
  16483. }
  16484. ]
  16485. },
  16486. "projectID": {
  16487. "anyOf": [
  16488. {
  16489. "type": "string"
  16490. },
  16491. {
  16492. "type": "null"
  16493. }
  16494. ]
  16495. },
  16496. "workspaceID": {
  16497. "anyOf": [
  16498. {
  16499. "type": "string",
  16500. "pattern": "^wrk"
  16501. },
  16502. {
  16503. "type": "null"
  16504. }
  16505. ]
  16506. },
  16507. "directory": {
  16508. "anyOf": [
  16509. {
  16510. "type": "string"
  16511. },
  16512. {
  16513. "type": "null"
  16514. }
  16515. ]
  16516. },
  16517. "path": {
  16518. "anyOf": [
  16519. {
  16520. "type": "string"
  16521. },
  16522. {
  16523. "type": "null"
  16524. }
  16525. ]
  16526. },
  16527. "parentID": {
  16528. "anyOf": [
  16529. {
  16530. "type": "string",
  16531. "pattern": "^ses"
  16532. },
  16533. {
  16534. "type": "null"
  16535. }
  16536. ]
  16537. },
  16538. "summary": {
  16539. "anyOf": [
  16540. {
  16541. "type": "object",
  16542. "properties": {
  16543. "additions": {
  16544. "type": "number"
  16545. },
  16546. "deletions": {
  16547. "type": "number"
  16548. },
  16549. "files": {
  16550. "type": "number"
  16551. },
  16552. "diffs": {
  16553. "type": "array",
  16554. "items": {
  16555. "$ref": "#/components/schemas/SnapshotFileDiff"
  16556. }
  16557. }
  16558. },
  16559. "required": ["additions", "deletions", "files"],
  16560. "additionalProperties": false
  16561. },
  16562. {
  16563. "type": "null"
  16564. }
  16565. ]
  16566. },
  16567. "cost": {
  16568. "anyOf": [
  16569. {
  16570. "type": "number"
  16571. },
  16572. {
  16573. "type": "null"
  16574. }
  16575. ]
  16576. },
  16577. "tokens": {
  16578. "anyOf": [
  16579. {
  16580. "type": "object",
  16581. "properties": {
  16582. "input": {
  16583. "type": "number"
  16584. },
  16585. "output": {
  16586. "type": "number"
  16587. },
  16588. "reasoning": {
  16589. "type": "number"
  16590. },
  16591. "cache": {
  16592. "type": "object",
  16593. "properties": {
  16594. "read": {
  16595. "type": "number"
  16596. },
  16597. "write": {
  16598. "type": "number"
  16599. }
  16600. },
  16601. "required": ["read", "write"],
  16602. "additionalProperties": false
  16603. }
  16604. },
  16605. "required": ["input", "output", "reasoning", "cache"],
  16606. "additionalProperties": false
  16607. },
  16608. {
  16609. "type": "null"
  16610. }
  16611. ]
  16612. },
  16613. "share": {
  16614. "type": "object",
  16615. "properties": {
  16616. "url": {
  16617. "anyOf": [
  16618. {
  16619. "type": "string"
  16620. },
  16621. {
  16622. "type": "null"
  16623. }
  16624. ]
  16625. }
  16626. },
  16627. "additionalProperties": false
  16628. },
  16629. "title": {
  16630. "anyOf": [
  16631. {
  16632. "type": "string"
  16633. },
  16634. {
  16635. "type": "null"
  16636. }
  16637. ]
  16638. },
  16639. "agent": {
  16640. "anyOf": [
  16641. {
  16642. "type": "string"
  16643. },
  16644. {
  16645. "type": "null"
  16646. }
  16647. ]
  16648. },
  16649. "model": {
  16650. "anyOf": [
  16651. {
  16652. "type": "object",
  16653. "properties": {
  16654. "id": {
  16655. "type": "string"
  16656. },
  16657. "providerID": {
  16658. "type": "string"
  16659. },
  16660. "variant": {
  16661. "type": "string"
  16662. }
  16663. },
  16664. "required": ["id", "providerID"],
  16665. "additionalProperties": false
  16666. },
  16667. {
  16668. "type": "null"
  16669. }
  16670. ]
  16671. },
  16672. "version": {
  16673. "anyOf": [
  16674. {
  16675. "type": "string"
  16676. },
  16677. {
  16678. "type": "null"
  16679. }
  16680. ]
  16681. },
  16682. "time": {
  16683. "type": "object",
  16684. "properties": {
  16685. "created": {
  16686. "anyOf": [
  16687. {
  16688. "type": "integer",
  16689. "minimum": 0
  16690. },
  16691. {
  16692. "type": "null"
  16693. }
  16694. ]
  16695. },
  16696. "updated": {
  16697. "anyOf": [
  16698. {
  16699. "type": "integer",
  16700. "minimum": 0
  16701. },
  16702. {
  16703. "type": "null"
  16704. }
  16705. ]
  16706. },
  16707. "compacting": {
  16708. "anyOf": [
  16709. {
  16710. "type": "integer",
  16711. "minimum": 0
  16712. },
  16713. {
  16714. "type": "null"
  16715. }
  16716. ]
  16717. },
  16718. "archived": {
  16719. "anyOf": [
  16720. {
  16721. "type": "number"
  16722. },
  16723. {
  16724. "type": "null"
  16725. }
  16726. ]
  16727. }
  16728. },
  16729. "additionalProperties": false
  16730. },
  16731. "permission": {
  16732. "anyOf": [
  16733. {
  16734. "$ref": "#/components/schemas/PermissionRuleset"
  16735. },
  16736. {
  16737. "type": "null"
  16738. }
  16739. ]
  16740. },
  16741. "revert": {
  16742. "anyOf": [
  16743. {
  16744. "type": "object",
  16745. "properties": {
  16746. "messageID": {
  16747. "type": "string",
  16748. "pattern": "^msg"
  16749. },
  16750. "partID": {
  16751. "type": "string",
  16752. "pattern": "^prt"
  16753. },
  16754. "snapshot": {
  16755. "type": "string"
  16756. },
  16757. "diff": {
  16758. "type": "string"
  16759. }
  16760. },
  16761. "required": ["messageID"],
  16762. "additionalProperties": false
  16763. },
  16764. {
  16765. "type": "null"
  16766. }
  16767. ]
  16768. }
  16769. },
  16770. "additionalProperties": false
  16771. }
  16772. },
  16773. "required": ["sessionID", "info"],
  16774. "additionalProperties": false
  16775. }
  16776. },
  16777. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16778. "additionalProperties": false
  16779. },
  16780. "SyncEventSessionDeleted": {
  16781. "type": "object",
  16782. "properties": {
  16783. "type": {
  16784. "type": "string",
  16785. "enum": ["sync"]
  16786. },
  16787. "name": {
  16788. "type": "string",
  16789. "enum": ["session.deleted.1"]
  16790. },
  16791. "id": {
  16792. "type": "string"
  16793. },
  16794. "seq": {
  16795. "type": "number"
  16796. },
  16797. "aggregateID": {
  16798. "type": "string",
  16799. "enum": ["sessionID"]
  16800. },
  16801. "data": {
  16802. "type": "object",
  16803. "properties": {
  16804. "sessionID": {
  16805. "type": "string",
  16806. "pattern": "^ses"
  16807. },
  16808. "info": {
  16809. "$ref": "#/components/schemas/Session"
  16810. }
  16811. },
  16812. "required": ["sessionID", "info"],
  16813. "additionalProperties": false
  16814. }
  16815. },
  16816. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16817. "additionalProperties": false
  16818. },
  16819. "SyncEventSessionNextAgentSwitched": {
  16820. "type": "object",
  16821. "properties": {
  16822. "type": {
  16823. "type": "string",
  16824. "enum": ["sync"]
  16825. },
  16826. "name": {
  16827. "type": "string",
  16828. "enum": ["session.next.agent.switched.1"]
  16829. },
  16830. "id": {
  16831. "type": "string"
  16832. },
  16833. "seq": {
  16834. "type": "number"
  16835. },
  16836. "aggregateID": {
  16837. "type": "string",
  16838. "enum": ["sessionID"]
  16839. },
  16840. "data": {
  16841. "type": "object",
  16842. "properties": {
  16843. "timestamp": {
  16844. "type": "number"
  16845. },
  16846. "sessionID": {
  16847. "type": "string",
  16848. "pattern": "^ses"
  16849. },
  16850. "agent": {
  16851. "type": "string"
  16852. }
  16853. },
  16854. "required": ["timestamp", "sessionID", "agent"],
  16855. "additionalProperties": false
  16856. }
  16857. },
  16858. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16859. "additionalProperties": false
  16860. },
  16861. "SyncEventSessionNextModelSwitched": {
  16862. "type": "object",
  16863. "properties": {
  16864. "type": {
  16865. "type": "string",
  16866. "enum": ["sync"]
  16867. },
  16868. "name": {
  16869. "type": "string",
  16870. "enum": ["session.next.model.switched.1"]
  16871. },
  16872. "id": {
  16873. "type": "string"
  16874. },
  16875. "seq": {
  16876. "type": "number"
  16877. },
  16878. "aggregateID": {
  16879. "type": "string",
  16880. "enum": ["sessionID"]
  16881. },
  16882. "data": {
  16883. "type": "object",
  16884. "properties": {
  16885. "timestamp": {
  16886. "type": "number"
  16887. },
  16888. "sessionID": {
  16889. "type": "string",
  16890. "pattern": "^ses"
  16891. },
  16892. "model": {
  16893. "type": "object",
  16894. "properties": {
  16895. "id": {
  16896. "type": "string"
  16897. },
  16898. "providerID": {
  16899. "type": "string"
  16900. },
  16901. "variant": {
  16902. "type": "string"
  16903. }
  16904. },
  16905. "required": ["id", "providerID", "variant"],
  16906. "additionalProperties": false
  16907. }
  16908. },
  16909. "required": ["timestamp", "sessionID", "model"],
  16910. "additionalProperties": false
  16911. }
  16912. },
  16913. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16914. "additionalProperties": false
  16915. },
  16916. "SyncEventSessionNextPrompted": {
  16917. "type": "object",
  16918. "properties": {
  16919. "type": {
  16920. "type": "string",
  16921. "enum": ["sync"]
  16922. },
  16923. "name": {
  16924. "type": "string",
  16925. "enum": ["session.next.prompted.1"]
  16926. },
  16927. "id": {
  16928. "type": "string"
  16929. },
  16930. "seq": {
  16931. "type": "number"
  16932. },
  16933. "aggregateID": {
  16934. "type": "string",
  16935. "enum": ["sessionID"]
  16936. },
  16937. "data": {
  16938. "type": "object",
  16939. "properties": {
  16940. "timestamp": {
  16941. "type": "number"
  16942. },
  16943. "sessionID": {
  16944. "type": "string",
  16945. "pattern": "^ses"
  16946. },
  16947. "prompt": {
  16948. "$ref": "#/components/schemas/Prompt"
  16949. }
  16950. },
  16951. "required": ["timestamp", "sessionID", "prompt"],
  16952. "additionalProperties": false
  16953. }
  16954. },
  16955. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16956. "additionalProperties": false
  16957. },
  16958. "SyncEventSessionNextSynthetic": {
  16959. "type": "object",
  16960. "properties": {
  16961. "type": {
  16962. "type": "string",
  16963. "enum": ["sync"]
  16964. },
  16965. "name": {
  16966. "type": "string",
  16967. "enum": ["session.next.synthetic.1"]
  16968. },
  16969. "id": {
  16970. "type": "string"
  16971. },
  16972. "seq": {
  16973. "type": "number"
  16974. },
  16975. "aggregateID": {
  16976. "type": "string",
  16977. "enum": ["sessionID"]
  16978. },
  16979. "data": {
  16980. "type": "object",
  16981. "properties": {
  16982. "timestamp": {
  16983. "type": "number"
  16984. },
  16985. "sessionID": {
  16986. "type": "string",
  16987. "pattern": "^ses"
  16988. },
  16989. "text": {
  16990. "type": "string"
  16991. }
  16992. },
  16993. "required": ["timestamp", "sessionID", "text"],
  16994. "additionalProperties": false
  16995. }
  16996. },
  16997. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  16998. "additionalProperties": false
  16999. },
  17000. "SyncEventSessionNextShellStarted": {
  17001. "type": "object",
  17002. "properties": {
  17003. "type": {
  17004. "type": "string",
  17005. "enum": ["sync"]
  17006. },
  17007. "name": {
  17008. "type": "string",
  17009. "enum": ["session.next.shell.started.1"]
  17010. },
  17011. "id": {
  17012. "type": "string"
  17013. },
  17014. "seq": {
  17015. "type": "number"
  17016. },
  17017. "aggregateID": {
  17018. "type": "string",
  17019. "enum": ["sessionID"]
  17020. },
  17021. "data": {
  17022. "type": "object",
  17023. "properties": {
  17024. "timestamp": {
  17025. "type": "number"
  17026. },
  17027. "sessionID": {
  17028. "type": "string",
  17029. "pattern": "^ses"
  17030. },
  17031. "callID": {
  17032. "type": "string"
  17033. },
  17034. "command": {
  17035. "type": "string"
  17036. }
  17037. },
  17038. "required": ["timestamp", "sessionID", "callID", "command"],
  17039. "additionalProperties": false
  17040. }
  17041. },
  17042. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17043. "additionalProperties": false
  17044. },
  17045. "SyncEventSessionNextShellEnded": {
  17046. "type": "object",
  17047. "properties": {
  17048. "type": {
  17049. "type": "string",
  17050. "enum": ["sync"]
  17051. },
  17052. "name": {
  17053. "type": "string",
  17054. "enum": ["session.next.shell.ended.1"]
  17055. },
  17056. "id": {
  17057. "type": "string"
  17058. },
  17059. "seq": {
  17060. "type": "number"
  17061. },
  17062. "aggregateID": {
  17063. "type": "string",
  17064. "enum": ["sessionID"]
  17065. },
  17066. "data": {
  17067. "type": "object",
  17068. "properties": {
  17069. "timestamp": {
  17070. "type": "number"
  17071. },
  17072. "sessionID": {
  17073. "type": "string",
  17074. "pattern": "^ses"
  17075. },
  17076. "callID": {
  17077. "type": "string"
  17078. },
  17079. "output": {
  17080. "type": "string"
  17081. }
  17082. },
  17083. "required": ["timestamp", "sessionID", "callID", "output"],
  17084. "additionalProperties": false
  17085. }
  17086. },
  17087. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17088. "additionalProperties": false
  17089. },
  17090. "SyncEventSessionNextStepStarted": {
  17091. "type": "object",
  17092. "properties": {
  17093. "type": {
  17094. "type": "string",
  17095. "enum": ["sync"]
  17096. },
  17097. "name": {
  17098. "type": "string",
  17099. "enum": ["session.next.step.started.1"]
  17100. },
  17101. "id": {
  17102. "type": "string"
  17103. },
  17104. "seq": {
  17105. "type": "number"
  17106. },
  17107. "aggregateID": {
  17108. "type": "string",
  17109. "enum": ["sessionID"]
  17110. },
  17111. "data": {
  17112. "type": "object",
  17113. "properties": {
  17114. "timestamp": {
  17115. "type": "number"
  17116. },
  17117. "sessionID": {
  17118. "type": "string",
  17119. "pattern": "^ses"
  17120. },
  17121. "agent": {
  17122. "type": "string"
  17123. },
  17124. "model": {
  17125. "type": "object",
  17126. "properties": {
  17127. "id": {
  17128. "type": "string"
  17129. },
  17130. "providerID": {
  17131. "type": "string"
  17132. },
  17133. "variant": {
  17134. "type": "string"
  17135. }
  17136. },
  17137. "required": ["id", "providerID", "variant"],
  17138. "additionalProperties": false
  17139. },
  17140. "snapshot": {
  17141. "type": "string"
  17142. }
  17143. },
  17144. "required": ["timestamp", "sessionID", "agent", "model"],
  17145. "additionalProperties": false
  17146. }
  17147. },
  17148. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17149. "additionalProperties": false
  17150. },
  17151. "SyncEventSessionNextStepEnded": {
  17152. "type": "object",
  17153. "properties": {
  17154. "type": {
  17155. "type": "string",
  17156. "enum": ["sync"]
  17157. },
  17158. "name": {
  17159. "type": "string",
  17160. "enum": ["session.next.step.ended.1"]
  17161. },
  17162. "id": {
  17163. "type": "string"
  17164. },
  17165. "seq": {
  17166. "type": "number"
  17167. },
  17168. "aggregateID": {
  17169. "type": "string",
  17170. "enum": ["sessionID"]
  17171. },
  17172. "data": {
  17173. "type": "object",
  17174. "properties": {
  17175. "timestamp": {
  17176. "type": "number"
  17177. },
  17178. "sessionID": {
  17179. "type": "string",
  17180. "pattern": "^ses"
  17181. },
  17182. "finish": {
  17183. "type": "string"
  17184. },
  17185. "cost": {
  17186. "type": "number"
  17187. },
  17188. "tokens": {
  17189. "type": "object",
  17190. "properties": {
  17191. "input": {
  17192. "type": "number"
  17193. },
  17194. "output": {
  17195. "type": "number"
  17196. },
  17197. "reasoning": {
  17198. "type": "number"
  17199. },
  17200. "cache": {
  17201. "type": "object",
  17202. "properties": {
  17203. "read": {
  17204. "type": "number"
  17205. },
  17206. "write": {
  17207. "type": "number"
  17208. }
  17209. },
  17210. "required": ["read", "write"],
  17211. "additionalProperties": false
  17212. }
  17213. },
  17214. "required": ["input", "output", "reasoning", "cache"],
  17215. "additionalProperties": false
  17216. },
  17217. "snapshot": {
  17218. "type": "string"
  17219. }
  17220. },
  17221. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  17222. "additionalProperties": false
  17223. }
  17224. },
  17225. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17226. "additionalProperties": false
  17227. },
  17228. "SyncEventSessionNextStepFailed": {
  17229. "type": "object",
  17230. "properties": {
  17231. "type": {
  17232. "type": "string",
  17233. "enum": ["sync"]
  17234. },
  17235. "name": {
  17236. "type": "string",
  17237. "enum": ["session.next.step.failed.1"]
  17238. },
  17239. "id": {
  17240. "type": "string"
  17241. },
  17242. "seq": {
  17243. "type": "number"
  17244. },
  17245. "aggregateID": {
  17246. "type": "string",
  17247. "enum": ["sessionID"]
  17248. },
  17249. "data": {
  17250. "type": "object",
  17251. "properties": {
  17252. "timestamp": {
  17253. "type": "number"
  17254. },
  17255. "sessionID": {
  17256. "type": "string",
  17257. "pattern": "^ses"
  17258. },
  17259. "error": {
  17260. "$ref": "#/components/schemas/SessionErrorUnknown"
  17261. }
  17262. },
  17263. "required": ["timestamp", "sessionID", "error"],
  17264. "additionalProperties": false
  17265. }
  17266. },
  17267. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17268. "additionalProperties": false
  17269. },
  17270. "SyncEventSessionNextTextStarted": {
  17271. "type": "object",
  17272. "properties": {
  17273. "type": {
  17274. "type": "string",
  17275. "enum": ["sync"]
  17276. },
  17277. "name": {
  17278. "type": "string",
  17279. "enum": ["session.next.text.started.1"]
  17280. },
  17281. "id": {
  17282. "type": "string"
  17283. },
  17284. "seq": {
  17285. "type": "number"
  17286. },
  17287. "aggregateID": {
  17288. "type": "string",
  17289. "enum": ["sessionID"]
  17290. },
  17291. "data": {
  17292. "type": "object",
  17293. "properties": {
  17294. "timestamp": {
  17295. "type": "number"
  17296. },
  17297. "sessionID": {
  17298. "type": "string",
  17299. "pattern": "^ses"
  17300. }
  17301. },
  17302. "required": ["timestamp", "sessionID"],
  17303. "additionalProperties": false
  17304. }
  17305. },
  17306. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17307. "additionalProperties": false
  17308. },
  17309. "SyncEventSessionNextTextDelta": {
  17310. "type": "object",
  17311. "properties": {
  17312. "type": {
  17313. "type": "string",
  17314. "enum": ["sync"]
  17315. },
  17316. "name": {
  17317. "type": "string",
  17318. "enum": ["session.next.text.delta.1"]
  17319. },
  17320. "id": {
  17321. "type": "string"
  17322. },
  17323. "seq": {
  17324. "type": "number"
  17325. },
  17326. "aggregateID": {
  17327. "type": "string",
  17328. "enum": ["sessionID"]
  17329. },
  17330. "data": {
  17331. "type": "object",
  17332. "properties": {
  17333. "timestamp": {
  17334. "type": "number"
  17335. },
  17336. "sessionID": {
  17337. "type": "string",
  17338. "pattern": "^ses"
  17339. },
  17340. "delta": {
  17341. "type": "string"
  17342. }
  17343. },
  17344. "required": ["timestamp", "sessionID", "delta"],
  17345. "additionalProperties": false
  17346. }
  17347. },
  17348. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17349. "additionalProperties": false
  17350. },
  17351. "SyncEventSessionNextTextEnded": {
  17352. "type": "object",
  17353. "properties": {
  17354. "type": {
  17355. "type": "string",
  17356. "enum": ["sync"]
  17357. },
  17358. "name": {
  17359. "type": "string",
  17360. "enum": ["session.next.text.ended.1"]
  17361. },
  17362. "id": {
  17363. "type": "string"
  17364. },
  17365. "seq": {
  17366. "type": "number"
  17367. },
  17368. "aggregateID": {
  17369. "type": "string",
  17370. "enum": ["sessionID"]
  17371. },
  17372. "data": {
  17373. "type": "object",
  17374. "properties": {
  17375. "timestamp": {
  17376. "type": "number"
  17377. },
  17378. "sessionID": {
  17379. "type": "string",
  17380. "pattern": "^ses"
  17381. },
  17382. "text": {
  17383. "type": "string"
  17384. }
  17385. },
  17386. "required": ["timestamp", "sessionID", "text"],
  17387. "additionalProperties": false
  17388. }
  17389. },
  17390. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17391. "additionalProperties": false
  17392. },
  17393. "SyncEventSessionNextReasoningStarted": {
  17394. "type": "object",
  17395. "properties": {
  17396. "type": {
  17397. "type": "string",
  17398. "enum": ["sync"]
  17399. },
  17400. "name": {
  17401. "type": "string",
  17402. "enum": ["session.next.reasoning.started.1"]
  17403. },
  17404. "id": {
  17405. "type": "string"
  17406. },
  17407. "seq": {
  17408. "type": "number"
  17409. },
  17410. "aggregateID": {
  17411. "type": "string",
  17412. "enum": ["sessionID"]
  17413. },
  17414. "data": {
  17415. "type": "object",
  17416. "properties": {
  17417. "timestamp": {
  17418. "type": "number"
  17419. },
  17420. "sessionID": {
  17421. "type": "string",
  17422. "pattern": "^ses"
  17423. },
  17424. "reasoningID": {
  17425. "type": "string"
  17426. }
  17427. },
  17428. "required": ["timestamp", "sessionID", "reasoningID"],
  17429. "additionalProperties": false
  17430. }
  17431. },
  17432. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17433. "additionalProperties": false
  17434. },
  17435. "SyncEventSessionNextReasoningDelta": {
  17436. "type": "object",
  17437. "properties": {
  17438. "type": {
  17439. "type": "string",
  17440. "enum": ["sync"]
  17441. },
  17442. "name": {
  17443. "type": "string",
  17444. "enum": ["session.next.reasoning.delta.1"]
  17445. },
  17446. "id": {
  17447. "type": "string"
  17448. },
  17449. "seq": {
  17450. "type": "number"
  17451. },
  17452. "aggregateID": {
  17453. "type": "string",
  17454. "enum": ["sessionID"]
  17455. },
  17456. "data": {
  17457. "type": "object",
  17458. "properties": {
  17459. "timestamp": {
  17460. "type": "number"
  17461. },
  17462. "sessionID": {
  17463. "type": "string",
  17464. "pattern": "^ses"
  17465. },
  17466. "reasoningID": {
  17467. "type": "string"
  17468. },
  17469. "delta": {
  17470. "type": "string"
  17471. }
  17472. },
  17473. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  17474. "additionalProperties": false
  17475. }
  17476. },
  17477. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17478. "additionalProperties": false
  17479. },
  17480. "SyncEventSessionNextReasoningEnded": {
  17481. "type": "object",
  17482. "properties": {
  17483. "type": {
  17484. "type": "string",
  17485. "enum": ["sync"]
  17486. },
  17487. "name": {
  17488. "type": "string",
  17489. "enum": ["session.next.reasoning.ended.1"]
  17490. },
  17491. "id": {
  17492. "type": "string"
  17493. },
  17494. "seq": {
  17495. "type": "number"
  17496. },
  17497. "aggregateID": {
  17498. "type": "string",
  17499. "enum": ["sessionID"]
  17500. },
  17501. "data": {
  17502. "type": "object",
  17503. "properties": {
  17504. "timestamp": {
  17505. "type": "number"
  17506. },
  17507. "sessionID": {
  17508. "type": "string",
  17509. "pattern": "^ses"
  17510. },
  17511. "reasoningID": {
  17512. "type": "string"
  17513. },
  17514. "text": {
  17515. "type": "string"
  17516. }
  17517. },
  17518. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  17519. "additionalProperties": false
  17520. }
  17521. },
  17522. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17523. "additionalProperties": false
  17524. },
  17525. "SyncEventSessionNextToolInputStarted": {
  17526. "type": "object",
  17527. "properties": {
  17528. "type": {
  17529. "type": "string",
  17530. "enum": ["sync"]
  17531. },
  17532. "name": {
  17533. "type": "string",
  17534. "enum": ["session.next.tool.input.started.1"]
  17535. },
  17536. "id": {
  17537. "type": "string"
  17538. },
  17539. "seq": {
  17540. "type": "number"
  17541. },
  17542. "aggregateID": {
  17543. "type": "string",
  17544. "enum": ["sessionID"]
  17545. },
  17546. "data": {
  17547. "type": "object",
  17548. "properties": {
  17549. "timestamp": {
  17550. "type": "number"
  17551. },
  17552. "sessionID": {
  17553. "type": "string",
  17554. "pattern": "^ses"
  17555. },
  17556. "callID": {
  17557. "type": "string"
  17558. },
  17559. "name": {
  17560. "type": "string"
  17561. }
  17562. },
  17563. "required": ["timestamp", "sessionID", "callID", "name"],
  17564. "additionalProperties": false
  17565. }
  17566. },
  17567. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17568. "additionalProperties": false
  17569. },
  17570. "SyncEventSessionNextToolInputDelta": {
  17571. "type": "object",
  17572. "properties": {
  17573. "type": {
  17574. "type": "string",
  17575. "enum": ["sync"]
  17576. },
  17577. "name": {
  17578. "type": "string",
  17579. "enum": ["session.next.tool.input.delta.1"]
  17580. },
  17581. "id": {
  17582. "type": "string"
  17583. },
  17584. "seq": {
  17585. "type": "number"
  17586. },
  17587. "aggregateID": {
  17588. "type": "string",
  17589. "enum": ["sessionID"]
  17590. },
  17591. "data": {
  17592. "type": "object",
  17593. "properties": {
  17594. "timestamp": {
  17595. "type": "number"
  17596. },
  17597. "sessionID": {
  17598. "type": "string",
  17599. "pattern": "^ses"
  17600. },
  17601. "callID": {
  17602. "type": "string"
  17603. },
  17604. "delta": {
  17605. "type": "string"
  17606. }
  17607. },
  17608. "required": ["timestamp", "sessionID", "callID", "delta"],
  17609. "additionalProperties": false
  17610. }
  17611. },
  17612. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17613. "additionalProperties": false
  17614. },
  17615. "SyncEventSessionNextToolInputEnded": {
  17616. "type": "object",
  17617. "properties": {
  17618. "type": {
  17619. "type": "string",
  17620. "enum": ["sync"]
  17621. },
  17622. "name": {
  17623. "type": "string",
  17624. "enum": ["session.next.tool.input.ended.1"]
  17625. },
  17626. "id": {
  17627. "type": "string"
  17628. },
  17629. "seq": {
  17630. "type": "number"
  17631. },
  17632. "aggregateID": {
  17633. "type": "string",
  17634. "enum": ["sessionID"]
  17635. },
  17636. "data": {
  17637. "type": "object",
  17638. "properties": {
  17639. "timestamp": {
  17640. "type": "number"
  17641. },
  17642. "sessionID": {
  17643. "type": "string",
  17644. "pattern": "^ses"
  17645. },
  17646. "callID": {
  17647. "type": "string"
  17648. },
  17649. "text": {
  17650. "type": "string"
  17651. }
  17652. },
  17653. "required": ["timestamp", "sessionID", "callID", "text"],
  17654. "additionalProperties": false
  17655. }
  17656. },
  17657. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17658. "additionalProperties": false
  17659. },
  17660. "SyncEventSessionNextToolCalled": {
  17661. "type": "object",
  17662. "properties": {
  17663. "type": {
  17664. "type": "string",
  17665. "enum": ["sync"]
  17666. },
  17667. "name": {
  17668. "type": "string",
  17669. "enum": ["session.next.tool.called.1"]
  17670. },
  17671. "id": {
  17672. "type": "string"
  17673. },
  17674. "seq": {
  17675. "type": "number"
  17676. },
  17677. "aggregateID": {
  17678. "type": "string",
  17679. "enum": ["sessionID"]
  17680. },
  17681. "data": {
  17682. "type": "object",
  17683. "properties": {
  17684. "timestamp": {
  17685. "type": "number"
  17686. },
  17687. "sessionID": {
  17688. "type": "string",
  17689. "pattern": "^ses"
  17690. },
  17691. "callID": {
  17692. "type": "string"
  17693. },
  17694. "tool": {
  17695. "type": "string"
  17696. },
  17697. "input": {
  17698. "type": "object"
  17699. },
  17700. "provider": {
  17701. "type": "object",
  17702. "properties": {
  17703. "executed": {
  17704. "type": "boolean"
  17705. },
  17706. "metadata": {
  17707. "type": "object"
  17708. }
  17709. },
  17710. "required": ["executed"],
  17711. "additionalProperties": false
  17712. }
  17713. },
  17714. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  17715. "additionalProperties": false
  17716. }
  17717. },
  17718. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17719. "additionalProperties": false
  17720. },
  17721. "SyncEventSessionNextToolProgress": {
  17722. "type": "object",
  17723. "properties": {
  17724. "type": {
  17725. "type": "string",
  17726. "enum": ["sync"]
  17727. },
  17728. "name": {
  17729. "type": "string",
  17730. "enum": ["session.next.tool.progress.1"]
  17731. },
  17732. "id": {
  17733. "type": "string"
  17734. },
  17735. "seq": {
  17736. "type": "number"
  17737. },
  17738. "aggregateID": {
  17739. "type": "string",
  17740. "enum": ["sessionID"]
  17741. },
  17742. "data": {
  17743. "type": "object",
  17744. "properties": {
  17745. "timestamp": {
  17746. "type": "number"
  17747. },
  17748. "sessionID": {
  17749. "type": "string",
  17750. "pattern": "^ses"
  17751. },
  17752. "callID": {
  17753. "type": "string"
  17754. },
  17755. "structured": {
  17756. "type": "object"
  17757. },
  17758. "content": {
  17759. "type": "array",
  17760. "items": {
  17761. "anyOf": [
  17762. {
  17763. "$ref": "#/components/schemas/ToolTextContent"
  17764. },
  17765. {
  17766. "$ref": "#/components/schemas/ToolFileContent"
  17767. }
  17768. ]
  17769. }
  17770. }
  17771. },
  17772. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  17773. "additionalProperties": false
  17774. }
  17775. },
  17776. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17777. "additionalProperties": false
  17778. },
  17779. "SyncEventSessionNextToolSuccess": {
  17780. "type": "object",
  17781. "properties": {
  17782. "type": {
  17783. "type": "string",
  17784. "enum": ["sync"]
  17785. },
  17786. "name": {
  17787. "type": "string",
  17788. "enum": ["session.next.tool.success.1"]
  17789. },
  17790. "id": {
  17791. "type": "string"
  17792. },
  17793. "seq": {
  17794. "type": "number"
  17795. },
  17796. "aggregateID": {
  17797. "type": "string",
  17798. "enum": ["sessionID"]
  17799. },
  17800. "data": {
  17801. "type": "object",
  17802. "properties": {
  17803. "timestamp": {
  17804. "type": "number"
  17805. },
  17806. "sessionID": {
  17807. "type": "string",
  17808. "pattern": "^ses"
  17809. },
  17810. "callID": {
  17811. "type": "string"
  17812. },
  17813. "structured": {
  17814. "type": "object"
  17815. },
  17816. "content": {
  17817. "type": "array",
  17818. "items": {
  17819. "anyOf": [
  17820. {
  17821. "$ref": "#/components/schemas/ToolTextContent"
  17822. },
  17823. {
  17824. "$ref": "#/components/schemas/ToolFileContent"
  17825. }
  17826. ]
  17827. }
  17828. },
  17829. "provider": {
  17830. "type": "object",
  17831. "properties": {
  17832. "executed": {
  17833. "type": "boolean"
  17834. },
  17835. "metadata": {
  17836. "type": "object"
  17837. }
  17838. },
  17839. "required": ["executed"],
  17840. "additionalProperties": false
  17841. }
  17842. },
  17843. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  17844. "additionalProperties": false
  17845. }
  17846. },
  17847. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17848. "additionalProperties": false
  17849. },
  17850. "SyncEventSessionNextToolFailed": {
  17851. "type": "object",
  17852. "properties": {
  17853. "type": {
  17854. "type": "string",
  17855. "enum": ["sync"]
  17856. },
  17857. "name": {
  17858. "type": "string",
  17859. "enum": ["session.next.tool.failed.1"]
  17860. },
  17861. "id": {
  17862. "type": "string"
  17863. },
  17864. "seq": {
  17865. "type": "number"
  17866. },
  17867. "aggregateID": {
  17868. "type": "string",
  17869. "enum": ["sessionID"]
  17870. },
  17871. "data": {
  17872. "type": "object",
  17873. "properties": {
  17874. "timestamp": {
  17875. "type": "number"
  17876. },
  17877. "sessionID": {
  17878. "type": "string",
  17879. "pattern": "^ses"
  17880. },
  17881. "callID": {
  17882. "type": "string"
  17883. },
  17884. "error": {
  17885. "$ref": "#/components/schemas/SessionErrorUnknown"
  17886. },
  17887. "provider": {
  17888. "type": "object",
  17889. "properties": {
  17890. "executed": {
  17891. "type": "boolean"
  17892. },
  17893. "metadata": {
  17894. "type": "object"
  17895. }
  17896. },
  17897. "required": ["executed"],
  17898. "additionalProperties": false
  17899. }
  17900. },
  17901. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  17902. "additionalProperties": false
  17903. }
  17904. },
  17905. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17906. "additionalProperties": false
  17907. },
  17908. "SyncEventSessionNextRetried": {
  17909. "type": "object",
  17910. "properties": {
  17911. "type": {
  17912. "type": "string",
  17913. "enum": ["sync"]
  17914. },
  17915. "name": {
  17916. "type": "string",
  17917. "enum": ["session.next.retried.1"]
  17918. },
  17919. "id": {
  17920. "type": "string"
  17921. },
  17922. "seq": {
  17923. "type": "number"
  17924. },
  17925. "aggregateID": {
  17926. "type": "string",
  17927. "enum": ["sessionID"]
  17928. },
  17929. "data": {
  17930. "type": "object",
  17931. "properties": {
  17932. "timestamp": {
  17933. "type": "number"
  17934. },
  17935. "sessionID": {
  17936. "type": "string",
  17937. "pattern": "^ses"
  17938. },
  17939. "attempt": {
  17940. "type": "number"
  17941. },
  17942. "error": {
  17943. "$ref": "#/components/schemas/SessionNextRetry_error"
  17944. }
  17945. },
  17946. "required": ["timestamp", "sessionID", "attempt", "error"],
  17947. "additionalProperties": false
  17948. }
  17949. },
  17950. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17951. "additionalProperties": false
  17952. },
  17953. "SyncEventSessionNextCompactionStarted": {
  17954. "type": "object",
  17955. "properties": {
  17956. "type": {
  17957. "type": "string",
  17958. "enum": ["sync"]
  17959. },
  17960. "name": {
  17961. "type": "string",
  17962. "enum": ["session.next.compaction.started.1"]
  17963. },
  17964. "id": {
  17965. "type": "string"
  17966. },
  17967. "seq": {
  17968. "type": "number"
  17969. },
  17970. "aggregateID": {
  17971. "type": "string",
  17972. "enum": ["sessionID"]
  17973. },
  17974. "data": {
  17975. "type": "object",
  17976. "properties": {
  17977. "timestamp": {
  17978. "type": "number"
  17979. },
  17980. "sessionID": {
  17981. "type": "string",
  17982. "pattern": "^ses"
  17983. },
  17984. "reason": {
  17985. "type": "string",
  17986. "enum": ["auto", "manual"]
  17987. }
  17988. },
  17989. "required": ["timestamp", "sessionID", "reason"],
  17990. "additionalProperties": false
  17991. }
  17992. },
  17993. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  17994. "additionalProperties": false
  17995. },
  17996. "SyncEventSessionNextCompactionDelta": {
  17997. "type": "object",
  17998. "properties": {
  17999. "type": {
  18000. "type": "string",
  18001. "enum": ["sync"]
  18002. },
  18003. "name": {
  18004. "type": "string",
  18005. "enum": ["session.next.compaction.delta.1"]
  18006. },
  18007. "id": {
  18008. "type": "string"
  18009. },
  18010. "seq": {
  18011. "type": "number"
  18012. },
  18013. "aggregateID": {
  18014. "type": "string",
  18015. "enum": ["sessionID"]
  18016. },
  18017. "data": {
  18018. "type": "object",
  18019. "properties": {
  18020. "timestamp": {
  18021. "type": "number"
  18022. },
  18023. "sessionID": {
  18024. "type": "string",
  18025. "pattern": "^ses"
  18026. },
  18027. "text": {
  18028. "type": "string"
  18029. }
  18030. },
  18031. "required": ["timestamp", "sessionID", "text"],
  18032. "additionalProperties": false
  18033. }
  18034. },
  18035. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  18036. "additionalProperties": false
  18037. },
  18038. "SyncEventSessionNextCompactionEnded": {
  18039. "type": "object",
  18040. "properties": {
  18041. "type": {
  18042. "type": "string",
  18043. "enum": ["sync"]
  18044. },
  18045. "name": {
  18046. "type": "string",
  18047. "enum": ["session.next.compaction.ended.1"]
  18048. },
  18049. "id": {
  18050. "type": "string"
  18051. },
  18052. "seq": {
  18053. "type": "number"
  18054. },
  18055. "aggregateID": {
  18056. "type": "string",
  18057. "enum": ["sessionID"]
  18058. },
  18059. "data": {
  18060. "type": "object",
  18061. "properties": {
  18062. "timestamp": {
  18063. "type": "number"
  18064. },
  18065. "sessionID": {
  18066. "type": "string",
  18067. "pattern": "^ses"
  18068. },
  18069. "text": {
  18070. "type": "string"
  18071. },
  18072. "include": {
  18073. "type": "string"
  18074. }
  18075. },
  18076. "required": ["timestamp", "sessionID", "text"],
  18077. "additionalProperties": false
  18078. }
  18079. },
  18080. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  18081. "additionalProperties": false
  18082. },
  18083. "EventServerConnected": {
  18084. "type": "object",
  18085. "properties": {
  18086. "id": {
  18087. "type": "string"
  18088. },
  18089. "type": {
  18090. "type": "string",
  18091. "enum": ["server.connected"]
  18092. },
  18093. "properties": {
  18094. "type": "object",
  18095. "properties": {}
  18096. }
  18097. },
  18098. "required": ["id", "type", "properties"],
  18099. "additionalProperties": false
  18100. },
  18101. "EventGlobalDisposed": {
  18102. "type": "object",
  18103. "properties": {
  18104. "id": {
  18105. "type": "string"
  18106. },
  18107. "type": {
  18108. "type": "string",
  18109. "enum": ["global.disposed"]
  18110. },
  18111. "properties": {
  18112. "type": "object",
  18113. "properties": {}
  18114. }
  18115. },
  18116. "required": ["id", "type", "properties"],
  18117. "additionalProperties": false
  18118. },
  18119. "EventServerInstanceDisposed": {
  18120. "type": "object",
  18121. "properties": {
  18122. "id": {
  18123. "type": "string"
  18124. },
  18125. "type": {
  18126. "type": "string",
  18127. "enum": ["server.instance.disposed"]
  18128. },
  18129. "properties": {
  18130. "type": "object",
  18131. "properties": {
  18132. "directory": {
  18133. "type": "string"
  18134. }
  18135. },
  18136. "required": ["directory"],
  18137. "additionalProperties": false
  18138. }
  18139. },
  18140. "required": ["id", "type", "properties"],
  18141. "additionalProperties": false
  18142. },
  18143. "EventFileEdited": {
  18144. "type": "object",
  18145. "properties": {
  18146. "id": {
  18147. "type": "string"
  18148. },
  18149. "type": {
  18150. "type": "string",
  18151. "enum": ["file.edited"]
  18152. },
  18153. "properties": {
  18154. "type": "object",
  18155. "properties": {
  18156. "file": {
  18157. "type": "string"
  18158. }
  18159. },
  18160. "required": ["file"],
  18161. "additionalProperties": false
  18162. }
  18163. },
  18164. "required": ["id", "type", "properties"],
  18165. "additionalProperties": false
  18166. },
  18167. "EventFileWatcherUpdated": {
  18168. "type": "object",
  18169. "properties": {
  18170. "id": {
  18171. "type": "string"
  18172. },
  18173. "type": {
  18174. "type": "string",
  18175. "enum": ["file.watcher.updated"]
  18176. },
  18177. "properties": {
  18178. "type": "object",
  18179. "properties": {
  18180. "file": {
  18181. "type": "string"
  18182. },
  18183. "event": {
  18184. "type": "string",
  18185. "enum": ["add", "change", "unlink"]
  18186. }
  18187. },
  18188. "required": ["file", "event"],
  18189. "additionalProperties": false
  18190. }
  18191. },
  18192. "required": ["id", "type", "properties"],
  18193. "additionalProperties": false
  18194. },
  18195. "EventLspClientDiagnostics": {
  18196. "type": "object",
  18197. "properties": {
  18198. "id": {
  18199. "type": "string"
  18200. },
  18201. "type": {
  18202. "type": "string",
  18203. "enum": ["lsp.client.diagnostics"]
  18204. },
  18205. "properties": {
  18206. "type": "object",
  18207. "properties": {
  18208. "serverID": {
  18209. "type": "string"
  18210. },
  18211. "path": {
  18212. "type": "string"
  18213. }
  18214. },
  18215. "required": ["serverID", "path"],
  18216. "additionalProperties": false
  18217. }
  18218. },
  18219. "required": ["id", "type", "properties"],
  18220. "additionalProperties": false
  18221. },
  18222. "EventLspUpdated": {
  18223. "type": "object",
  18224. "properties": {
  18225. "id": {
  18226. "type": "string"
  18227. },
  18228. "type": {
  18229. "type": "string",
  18230. "enum": ["lsp.updated"]
  18231. },
  18232. "properties": {
  18233. "type": "object",
  18234. "properties": {}
  18235. }
  18236. },
  18237. "required": ["id", "type", "properties"],
  18238. "additionalProperties": false
  18239. },
  18240. "EventMessagePartDelta": {
  18241. "type": "object",
  18242. "properties": {
  18243. "id": {
  18244. "type": "string"
  18245. },
  18246. "type": {
  18247. "type": "string",
  18248. "enum": ["message.part.delta"]
  18249. },
  18250. "properties": {
  18251. "type": "object",
  18252. "properties": {
  18253. "sessionID": {
  18254. "type": "string",
  18255. "pattern": "^ses"
  18256. },
  18257. "messageID": {
  18258. "type": "string",
  18259. "pattern": "^msg"
  18260. },
  18261. "partID": {
  18262. "type": "string",
  18263. "pattern": "^prt"
  18264. },
  18265. "field": {
  18266. "type": "string"
  18267. },
  18268. "delta": {
  18269. "type": "string"
  18270. }
  18271. },
  18272. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  18273. "additionalProperties": false
  18274. }
  18275. },
  18276. "required": ["id", "type", "properties"],
  18277. "additionalProperties": false
  18278. },
  18279. "EventPermissionAsked": {
  18280. "type": "object",
  18281. "properties": {
  18282. "id": {
  18283. "type": "string"
  18284. },
  18285. "type": {
  18286. "type": "string",
  18287. "enum": ["permission.asked"]
  18288. },
  18289. "properties": {
  18290. "$ref": "#/components/schemas/PermissionRequest"
  18291. }
  18292. },
  18293. "required": ["id", "type", "properties"],
  18294. "additionalProperties": false
  18295. },
  18296. "EventPermissionReplied": {
  18297. "type": "object",
  18298. "properties": {
  18299. "id": {
  18300. "type": "string"
  18301. },
  18302. "type": {
  18303. "type": "string",
  18304. "enum": ["permission.replied"]
  18305. },
  18306. "properties": {
  18307. "type": "object",
  18308. "properties": {
  18309. "sessionID": {
  18310. "type": "string",
  18311. "pattern": "^ses"
  18312. },
  18313. "requestID": {
  18314. "type": "string",
  18315. "pattern": "^per"
  18316. },
  18317. "reply": {
  18318. "type": "string",
  18319. "enum": ["once", "always", "reject"]
  18320. }
  18321. },
  18322. "required": ["sessionID", "requestID", "reply"],
  18323. "additionalProperties": false
  18324. }
  18325. },
  18326. "required": ["id", "type", "properties"],
  18327. "additionalProperties": false
  18328. },
  18329. "EventSessionDiff": {
  18330. "type": "object",
  18331. "properties": {
  18332. "id": {
  18333. "type": "string"
  18334. },
  18335. "type": {
  18336. "type": "string",
  18337. "enum": ["session.diff"]
  18338. },
  18339. "properties": {
  18340. "type": "object",
  18341. "properties": {
  18342. "sessionID": {
  18343. "type": "string",
  18344. "pattern": "^ses"
  18345. },
  18346. "diff": {
  18347. "type": "array",
  18348. "items": {
  18349. "$ref": "#/components/schemas/SnapshotFileDiff"
  18350. }
  18351. }
  18352. },
  18353. "required": ["sessionID", "diff"],
  18354. "additionalProperties": false
  18355. }
  18356. },
  18357. "required": ["id", "type", "properties"],
  18358. "additionalProperties": false
  18359. },
  18360. "EventSessionError": {
  18361. "type": "object",
  18362. "properties": {
  18363. "id": {
  18364. "type": "string"
  18365. },
  18366. "type": {
  18367. "type": "string",
  18368. "enum": ["session.error"]
  18369. },
  18370. "properties": {
  18371. "type": "object",
  18372. "properties": {
  18373. "sessionID": {
  18374. "type": "string",
  18375. "pattern": "^ses"
  18376. },
  18377. "error": {
  18378. "anyOf": [
  18379. {
  18380. "$ref": "#/components/schemas/ProviderAuthError"
  18381. },
  18382. {
  18383. "$ref": "#/components/schemas/UnknownError"
  18384. },
  18385. {
  18386. "$ref": "#/components/schemas/MessageOutputLengthError"
  18387. },
  18388. {
  18389. "$ref": "#/components/schemas/MessageAbortedError"
  18390. },
  18391. {
  18392. "$ref": "#/components/schemas/StructuredOutputError"
  18393. },
  18394. {
  18395. "$ref": "#/components/schemas/ContextOverflowError"
  18396. },
  18397. {
  18398. "$ref": "#/components/schemas/APIError"
  18399. }
  18400. ]
  18401. }
  18402. },
  18403. "additionalProperties": false
  18404. }
  18405. },
  18406. "required": ["id", "type", "properties"],
  18407. "additionalProperties": false
  18408. },
  18409. "EventQuestionAsked": {
  18410. "type": "object",
  18411. "properties": {
  18412. "id": {
  18413. "type": "string"
  18414. },
  18415. "type": {
  18416. "type": "string",
  18417. "enum": ["question.asked"]
  18418. },
  18419. "properties": {
  18420. "$ref": "#/components/schemas/QuestionRequest"
  18421. }
  18422. },
  18423. "required": ["id", "type", "properties"],
  18424. "additionalProperties": false
  18425. },
  18426. "EventQuestionReplied": {
  18427. "type": "object",
  18428. "properties": {
  18429. "id": {
  18430. "type": "string"
  18431. },
  18432. "type": {
  18433. "type": "string",
  18434. "enum": ["question.replied"]
  18435. },
  18436. "properties": {
  18437. "$ref": "#/components/schemas/QuestionReplied"
  18438. }
  18439. },
  18440. "required": ["id", "type", "properties"],
  18441. "additionalProperties": false
  18442. },
  18443. "EventQuestionRejected": {
  18444. "type": "object",
  18445. "properties": {
  18446. "id": {
  18447. "type": "string"
  18448. },
  18449. "type": {
  18450. "type": "string",
  18451. "enum": ["question.rejected"]
  18452. },
  18453. "properties": {
  18454. "$ref": "#/components/schemas/QuestionRejected"
  18455. }
  18456. },
  18457. "required": ["id", "type", "properties"],
  18458. "additionalProperties": false
  18459. },
  18460. "EventTodoUpdated": {
  18461. "type": "object",
  18462. "properties": {
  18463. "id": {
  18464. "type": "string"
  18465. },
  18466. "type": {
  18467. "type": "string",
  18468. "enum": ["todo.updated"]
  18469. },
  18470. "properties": {
  18471. "type": "object",
  18472. "properties": {
  18473. "sessionID": {
  18474. "type": "string",
  18475. "pattern": "^ses"
  18476. },
  18477. "todos": {
  18478. "type": "array",
  18479. "items": {
  18480. "$ref": "#/components/schemas/Todo"
  18481. }
  18482. }
  18483. },
  18484. "required": ["sessionID", "todos"],
  18485. "additionalProperties": false
  18486. }
  18487. },
  18488. "required": ["id", "type", "properties"],
  18489. "additionalProperties": false
  18490. },
  18491. "EventSessionStatus": {
  18492. "type": "object",
  18493. "properties": {
  18494. "id": {
  18495. "type": "string"
  18496. },
  18497. "type": {
  18498. "type": "string",
  18499. "enum": ["session.status"]
  18500. },
  18501. "properties": {
  18502. "type": "object",
  18503. "properties": {
  18504. "sessionID": {
  18505. "type": "string",
  18506. "pattern": "^ses"
  18507. },
  18508. "status": {
  18509. "$ref": "#/components/schemas/SessionStatus"
  18510. }
  18511. },
  18512. "required": ["sessionID", "status"],
  18513. "additionalProperties": false
  18514. }
  18515. },
  18516. "required": ["id", "type", "properties"],
  18517. "additionalProperties": false
  18518. },
  18519. "EventSessionIdle": {
  18520. "type": "object",
  18521. "properties": {
  18522. "id": {
  18523. "type": "string"
  18524. },
  18525. "type": {
  18526. "type": "string",
  18527. "enum": ["session.idle"]
  18528. },
  18529. "properties": {
  18530. "type": "object",
  18531. "properties": {
  18532. "sessionID": {
  18533. "type": "string",
  18534. "pattern": "^ses"
  18535. }
  18536. },
  18537. "required": ["sessionID"],
  18538. "additionalProperties": false
  18539. }
  18540. },
  18541. "required": ["id", "type", "properties"],
  18542. "additionalProperties": false
  18543. },
  18544. "EventMcpToolsChanged": {
  18545. "type": "object",
  18546. "properties": {
  18547. "id": {
  18548. "type": "string"
  18549. },
  18550. "type": {
  18551. "type": "string",
  18552. "enum": ["mcp.tools.changed"]
  18553. },
  18554. "properties": {
  18555. "type": "object",
  18556. "properties": {
  18557. "server": {
  18558. "type": "string"
  18559. }
  18560. },
  18561. "required": ["server"],
  18562. "additionalProperties": false
  18563. }
  18564. },
  18565. "required": ["id", "type", "properties"],
  18566. "additionalProperties": false
  18567. },
  18568. "EventMcpBrowserOpenFailed": {
  18569. "type": "object",
  18570. "properties": {
  18571. "id": {
  18572. "type": "string"
  18573. },
  18574. "type": {
  18575. "type": "string",
  18576. "enum": ["mcp.browser.open.failed"]
  18577. },
  18578. "properties": {
  18579. "type": "object",
  18580. "properties": {
  18581. "mcpName": {
  18582. "type": "string"
  18583. },
  18584. "url": {
  18585. "type": "string"
  18586. }
  18587. },
  18588. "required": ["mcpName", "url"],
  18589. "additionalProperties": false
  18590. }
  18591. },
  18592. "required": ["id", "type", "properties"],
  18593. "additionalProperties": false
  18594. },
  18595. "EventCommandExecuted": {
  18596. "type": "object",
  18597. "properties": {
  18598. "id": {
  18599. "type": "string"
  18600. },
  18601. "type": {
  18602. "type": "string",
  18603. "enum": ["command.executed"]
  18604. },
  18605. "properties": {
  18606. "type": "object",
  18607. "properties": {
  18608. "name": {
  18609. "type": "string"
  18610. },
  18611. "sessionID": {
  18612. "type": "string",
  18613. "pattern": "^ses"
  18614. },
  18615. "arguments": {
  18616. "type": "string"
  18617. },
  18618. "messageID": {
  18619. "type": "string",
  18620. "pattern": "^msg"
  18621. }
  18622. },
  18623. "required": ["name", "sessionID", "arguments", "messageID"],
  18624. "additionalProperties": false
  18625. }
  18626. },
  18627. "required": ["id", "type", "properties"],
  18628. "additionalProperties": false
  18629. },
  18630. "EventProjectUpdated": {
  18631. "type": "object",
  18632. "properties": {
  18633. "id": {
  18634. "type": "string"
  18635. },
  18636. "type": {
  18637. "type": "string",
  18638. "enum": ["project.updated"]
  18639. },
  18640. "properties": {
  18641. "$ref": "#/components/schemas/Project"
  18642. }
  18643. },
  18644. "required": ["id", "type", "properties"],
  18645. "additionalProperties": false
  18646. },
  18647. "EventSessionCompacted": {
  18648. "type": "object",
  18649. "properties": {
  18650. "id": {
  18651. "type": "string"
  18652. },
  18653. "type": {
  18654. "type": "string",
  18655. "enum": ["session.compacted"]
  18656. },
  18657. "properties": {
  18658. "type": "object",
  18659. "properties": {
  18660. "sessionID": {
  18661. "type": "string",
  18662. "pattern": "^ses"
  18663. }
  18664. },
  18665. "required": ["sessionID"],
  18666. "additionalProperties": false
  18667. }
  18668. },
  18669. "required": ["id", "type", "properties"],
  18670. "additionalProperties": false
  18671. },
  18672. "EventVcsBranchUpdated": {
  18673. "type": "object",
  18674. "properties": {
  18675. "id": {
  18676. "type": "string"
  18677. },
  18678. "type": {
  18679. "type": "string",
  18680. "enum": ["vcs.branch.updated"]
  18681. },
  18682. "properties": {
  18683. "type": "object",
  18684. "properties": {
  18685. "branch": {
  18686. "type": "string"
  18687. }
  18688. },
  18689. "additionalProperties": false
  18690. }
  18691. },
  18692. "required": ["id", "type", "properties"],
  18693. "additionalProperties": false
  18694. },
  18695. "EventWorkspaceReady": {
  18696. "type": "object",
  18697. "properties": {
  18698. "id": {
  18699. "type": "string"
  18700. },
  18701. "type": {
  18702. "type": "string",
  18703. "enum": ["workspace.ready"]
  18704. },
  18705. "properties": {
  18706. "type": "object",
  18707. "properties": {
  18708. "name": {
  18709. "type": "string"
  18710. }
  18711. },
  18712. "required": ["name"],
  18713. "additionalProperties": false
  18714. }
  18715. },
  18716. "required": ["id", "type", "properties"],
  18717. "additionalProperties": false
  18718. },
  18719. "EventWorkspaceFailed": {
  18720. "type": "object",
  18721. "properties": {
  18722. "id": {
  18723. "type": "string"
  18724. },
  18725. "type": {
  18726. "type": "string",
  18727. "enum": ["workspace.failed"]
  18728. },
  18729. "properties": {
  18730. "type": "object",
  18731. "properties": {
  18732. "message": {
  18733. "type": "string"
  18734. }
  18735. },
  18736. "required": ["message"],
  18737. "additionalProperties": false
  18738. }
  18739. },
  18740. "required": ["id", "type", "properties"],
  18741. "additionalProperties": false
  18742. },
  18743. "EventWorkspaceStatus": {
  18744. "type": "object",
  18745. "properties": {
  18746. "id": {
  18747. "type": "string"
  18748. },
  18749. "type": {
  18750. "type": "string",
  18751. "enum": ["workspace.status"]
  18752. },
  18753. "properties": {
  18754. "type": "object",
  18755. "properties": {
  18756. "workspaceID": {
  18757. "type": "string",
  18758. "pattern": "^wrk"
  18759. },
  18760. "status": {
  18761. "type": "string",
  18762. "enum": ["connected", "connecting", "disconnected", "error"]
  18763. }
  18764. },
  18765. "required": ["workspaceID", "status"],
  18766. "additionalProperties": false
  18767. }
  18768. },
  18769. "required": ["id", "type", "properties"],
  18770. "additionalProperties": false
  18771. },
  18772. "EventWorktreeReady": {
  18773. "type": "object",
  18774. "properties": {
  18775. "id": {
  18776. "type": "string"
  18777. },
  18778. "type": {
  18779. "type": "string",
  18780. "enum": ["worktree.ready"]
  18781. },
  18782. "properties": {
  18783. "type": "object",
  18784. "properties": {
  18785. "name": {
  18786. "type": "string"
  18787. },
  18788. "branch": {
  18789. "type": "string"
  18790. }
  18791. },
  18792. "required": ["name"],
  18793. "additionalProperties": false
  18794. }
  18795. },
  18796. "required": ["id", "type", "properties"],
  18797. "additionalProperties": false
  18798. },
  18799. "EventWorktreeFailed": {
  18800. "type": "object",
  18801. "properties": {
  18802. "id": {
  18803. "type": "string"
  18804. },
  18805. "type": {
  18806. "type": "string",
  18807. "enum": ["worktree.failed"]
  18808. },
  18809. "properties": {
  18810. "type": "object",
  18811. "properties": {
  18812. "message": {
  18813. "type": "string"
  18814. }
  18815. },
  18816. "required": ["message"],
  18817. "additionalProperties": false
  18818. }
  18819. },
  18820. "required": ["id", "type", "properties"],
  18821. "additionalProperties": false
  18822. },
  18823. "EventPtyCreated": {
  18824. "type": "object",
  18825. "properties": {
  18826. "id": {
  18827. "type": "string"
  18828. },
  18829. "type": {
  18830. "type": "string",
  18831. "enum": ["pty.created"]
  18832. },
  18833. "properties": {
  18834. "type": "object",
  18835. "properties": {
  18836. "info": {
  18837. "$ref": "#/components/schemas/Pty"
  18838. }
  18839. },
  18840. "required": ["info"],
  18841. "additionalProperties": false
  18842. }
  18843. },
  18844. "required": ["id", "type", "properties"],
  18845. "additionalProperties": false
  18846. },
  18847. "EventPtyUpdated": {
  18848. "type": "object",
  18849. "properties": {
  18850. "id": {
  18851. "type": "string"
  18852. },
  18853. "type": {
  18854. "type": "string",
  18855. "enum": ["pty.updated"]
  18856. },
  18857. "properties": {
  18858. "type": "object",
  18859. "properties": {
  18860. "info": {
  18861. "$ref": "#/components/schemas/Pty"
  18862. }
  18863. },
  18864. "required": ["info"],
  18865. "additionalProperties": false
  18866. }
  18867. },
  18868. "required": ["id", "type", "properties"],
  18869. "additionalProperties": false
  18870. },
  18871. "EventPtyExited": {
  18872. "type": "object",
  18873. "properties": {
  18874. "id": {
  18875. "type": "string"
  18876. },
  18877. "type": {
  18878. "type": "string",
  18879. "enum": ["pty.exited"]
  18880. },
  18881. "properties": {
  18882. "type": "object",
  18883. "properties": {
  18884. "id": {
  18885. "type": "string",
  18886. "pattern": "^pty"
  18887. },
  18888. "exitCode": {
  18889. "type": "integer",
  18890. "minimum": 0
  18891. }
  18892. },
  18893. "required": ["id", "exitCode"],
  18894. "additionalProperties": false
  18895. }
  18896. },
  18897. "required": ["id", "type", "properties"],
  18898. "additionalProperties": false
  18899. },
  18900. "EventPtyDeleted": {
  18901. "type": "object",
  18902. "properties": {
  18903. "id": {
  18904. "type": "string"
  18905. },
  18906. "type": {
  18907. "type": "string",
  18908. "enum": ["pty.deleted"]
  18909. },
  18910. "properties": {
  18911. "type": "object",
  18912. "properties": {
  18913. "id": {
  18914. "type": "string",
  18915. "pattern": "^pty"
  18916. }
  18917. },
  18918. "required": ["id"],
  18919. "additionalProperties": false
  18920. }
  18921. },
  18922. "required": ["id", "type", "properties"],
  18923. "additionalProperties": false
  18924. },
  18925. "EventInstallationUpdated": {
  18926. "type": "object",
  18927. "properties": {
  18928. "id": {
  18929. "type": "string"
  18930. },
  18931. "type": {
  18932. "type": "string",
  18933. "enum": ["installation.updated"]
  18934. },
  18935. "properties": {
  18936. "type": "object",
  18937. "properties": {
  18938. "version": {
  18939. "type": "string"
  18940. }
  18941. },
  18942. "required": ["version"],
  18943. "additionalProperties": false
  18944. }
  18945. },
  18946. "required": ["id", "type", "properties"],
  18947. "additionalProperties": false
  18948. },
  18949. "EventInstallationUpdate-available": {
  18950. "type": "object",
  18951. "properties": {
  18952. "id": {
  18953. "type": "string"
  18954. },
  18955. "type": {
  18956. "type": "string",
  18957. "enum": ["installation.update-available"]
  18958. },
  18959. "properties": {
  18960. "type": "object",
  18961. "properties": {
  18962. "version": {
  18963. "type": "string"
  18964. }
  18965. },
  18966. "required": ["version"],
  18967. "additionalProperties": false
  18968. }
  18969. },
  18970. "required": ["id", "type", "properties"],
  18971. "additionalProperties": false
  18972. },
  18973. "EventMessageUpdated": {
  18974. "type": "object",
  18975. "properties": {
  18976. "id": {
  18977. "type": "string"
  18978. },
  18979. "type": {
  18980. "type": "string",
  18981. "enum": ["message.updated"]
  18982. },
  18983. "properties": {
  18984. "type": "object",
  18985. "properties": {
  18986. "sessionID": {
  18987. "type": "string",
  18988. "pattern": "^ses"
  18989. },
  18990. "info": {
  18991. "$ref": "#/components/schemas/Message"
  18992. }
  18993. },
  18994. "required": ["sessionID", "info"],
  18995. "additionalProperties": false
  18996. }
  18997. },
  18998. "required": ["id", "type", "properties"],
  18999. "additionalProperties": false
  19000. },
  19001. "EventMessageRemoved": {
  19002. "type": "object",
  19003. "properties": {
  19004. "id": {
  19005. "type": "string"
  19006. },
  19007. "type": {
  19008. "type": "string",
  19009. "enum": ["message.removed"]
  19010. },
  19011. "properties": {
  19012. "type": "object",
  19013. "properties": {
  19014. "sessionID": {
  19015. "type": "string",
  19016. "pattern": "^ses"
  19017. },
  19018. "messageID": {
  19019. "type": "string",
  19020. "pattern": "^msg"
  19021. }
  19022. },
  19023. "required": ["sessionID", "messageID"],
  19024. "additionalProperties": false
  19025. }
  19026. },
  19027. "required": ["id", "type", "properties"],
  19028. "additionalProperties": false
  19029. },
  19030. "EventMessagePartUpdated": {
  19031. "type": "object",
  19032. "properties": {
  19033. "id": {
  19034. "type": "string"
  19035. },
  19036. "type": {
  19037. "type": "string",
  19038. "enum": ["message.part.updated"]
  19039. },
  19040. "properties": {
  19041. "type": "object",
  19042. "properties": {
  19043. "sessionID": {
  19044. "type": "string",
  19045. "pattern": "^ses"
  19046. },
  19047. "part": {
  19048. "$ref": "#/components/schemas/Part"
  19049. },
  19050. "time": {
  19051. "type": "integer",
  19052. "minimum": 0
  19053. }
  19054. },
  19055. "required": ["sessionID", "part", "time"],
  19056. "additionalProperties": false
  19057. }
  19058. },
  19059. "required": ["id", "type", "properties"],
  19060. "additionalProperties": false
  19061. },
  19062. "EventMessagePartRemoved": {
  19063. "type": "object",
  19064. "properties": {
  19065. "id": {
  19066. "type": "string"
  19067. },
  19068. "type": {
  19069. "type": "string",
  19070. "enum": ["message.part.removed"]
  19071. },
  19072. "properties": {
  19073. "type": "object",
  19074. "properties": {
  19075. "sessionID": {
  19076. "type": "string",
  19077. "pattern": "^ses"
  19078. },
  19079. "messageID": {
  19080. "type": "string",
  19081. "pattern": "^msg"
  19082. },
  19083. "partID": {
  19084. "type": "string",
  19085. "pattern": "^prt"
  19086. }
  19087. },
  19088. "required": ["sessionID", "messageID", "partID"],
  19089. "additionalProperties": false
  19090. }
  19091. },
  19092. "required": ["id", "type", "properties"],
  19093. "additionalProperties": false
  19094. },
  19095. "EventSessionCreated": {
  19096. "type": "object",
  19097. "properties": {
  19098. "id": {
  19099. "type": "string"
  19100. },
  19101. "type": {
  19102. "type": "string",
  19103. "enum": ["session.created"]
  19104. },
  19105. "properties": {
  19106. "type": "object",
  19107. "properties": {
  19108. "sessionID": {
  19109. "type": "string",
  19110. "pattern": "^ses"
  19111. },
  19112. "info": {
  19113. "$ref": "#/components/schemas/Session"
  19114. }
  19115. },
  19116. "required": ["sessionID", "info"],
  19117. "additionalProperties": false
  19118. }
  19119. },
  19120. "required": ["id", "type", "properties"],
  19121. "additionalProperties": false
  19122. },
  19123. "EventSessionUpdated": {
  19124. "type": "object",
  19125. "properties": {
  19126. "id": {
  19127. "type": "string"
  19128. },
  19129. "type": {
  19130. "type": "string",
  19131. "enum": ["session.updated"]
  19132. },
  19133. "properties": {
  19134. "type": "object",
  19135. "properties": {
  19136. "sessionID": {
  19137. "type": "string",
  19138. "pattern": "^ses"
  19139. },
  19140. "info": {
  19141. "$ref": "#/components/schemas/Session"
  19142. }
  19143. },
  19144. "required": ["sessionID", "info"],
  19145. "additionalProperties": false
  19146. }
  19147. },
  19148. "required": ["id", "type", "properties"],
  19149. "additionalProperties": false
  19150. },
  19151. "EventSessionDeleted": {
  19152. "type": "object",
  19153. "properties": {
  19154. "id": {
  19155. "type": "string"
  19156. },
  19157. "type": {
  19158. "type": "string",
  19159. "enum": ["session.deleted"]
  19160. },
  19161. "properties": {
  19162. "type": "object",
  19163. "properties": {
  19164. "sessionID": {
  19165. "type": "string",
  19166. "pattern": "^ses"
  19167. },
  19168. "info": {
  19169. "$ref": "#/components/schemas/Session"
  19170. }
  19171. },
  19172. "required": ["sessionID", "info"],
  19173. "additionalProperties": false
  19174. }
  19175. },
  19176. "required": ["id", "type", "properties"],
  19177. "additionalProperties": false
  19178. },
  19179. "EventSessionNextAgentSwitched": {
  19180. "type": "object",
  19181. "properties": {
  19182. "id": {
  19183. "type": "string"
  19184. },
  19185. "type": {
  19186. "type": "string",
  19187. "enum": ["session.next.agent.switched"]
  19188. },
  19189. "properties": {
  19190. "type": "object",
  19191. "properties": {
  19192. "timestamp": {
  19193. "type": "number"
  19194. },
  19195. "sessionID": {
  19196. "type": "string",
  19197. "pattern": "^ses"
  19198. },
  19199. "agent": {
  19200. "type": "string"
  19201. }
  19202. },
  19203. "required": ["timestamp", "sessionID", "agent"],
  19204. "additionalProperties": false
  19205. }
  19206. },
  19207. "required": ["id", "type", "properties"],
  19208. "additionalProperties": false
  19209. },
  19210. "EventSessionNextModelSwitched": {
  19211. "type": "object",
  19212. "properties": {
  19213. "id": {
  19214. "type": "string"
  19215. },
  19216. "type": {
  19217. "type": "string",
  19218. "enum": ["session.next.model.switched"]
  19219. },
  19220. "properties": {
  19221. "type": "object",
  19222. "properties": {
  19223. "timestamp": {
  19224. "type": "number"
  19225. },
  19226. "sessionID": {
  19227. "type": "string",
  19228. "pattern": "^ses"
  19229. },
  19230. "model": {
  19231. "type": "object",
  19232. "properties": {
  19233. "id": {
  19234. "type": "string"
  19235. },
  19236. "providerID": {
  19237. "type": "string"
  19238. },
  19239. "variant": {
  19240. "type": "string"
  19241. }
  19242. },
  19243. "required": ["id", "providerID", "variant"],
  19244. "additionalProperties": false
  19245. }
  19246. },
  19247. "required": ["timestamp", "sessionID", "model"],
  19248. "additionalProperties": false
  19249. }
  19250. },
  19251. "required": ["id", "type", "properties"],
  19252. "additionalProperties": false
  19253. },
  19254. "PromptSource": {
  19255. "type": "object",
  19256. "properties": {
  19257. "start": {
  19258. "type": "number"
  19259. },
  19260. "end": {
  19261. "type": "number"
  19262. },
  19263. "text": {
  19264. "type": "string"
  19265. }
  19266. },
  19267. "required": ["start", "end", "text"],
  19268. "additionalProperties": false
  19269. },
  19270. "PromptFileAttachment": {
  19271. "type": "object",
  19272. "properties": {
  19273. "uri": {
  19274. "type": "string"
  19275. },
  19276. "mime": {
  19277. "type": "string"
  19278. },
  19279. "name": {
  19280. "type": "string"
  19281. },
  19282. "description": {
  19283. "type": "string"
  19284. },
  19285. "source": {
  19286. "$ref": "#/components/schemas/PromptSource"
  19287. }
  19288. },
  19289. "required": ["uri", "mime"],
  19290. "additionalProperties": false
  19291. },
  19292. "PromptAgentAttachment": {
  19293. "type": "object",
  19294. "properties": {
  19295. "name": {
  19296. "type": "string"
  19297. },
  19298. "source": {
  19299. "$ref": "#/components/schemas/PromptSource"
  19300. }
  19301. },
  19302. "required": ["name"],
  19303. "additionalProperties": false
  19304. },
  19305. "PromptReferenceAttachment": {
  19306. "type": "object",
  19307. "properties": {
  19308. "name": {
  19309. "type": "string"
  19310. },
  19311. "kind": {
  19312. "type": "string",
  19313. "enum": ["local", "git", "invalid"]
  19314. },
  19315. "uri": {
  19316. "type": "string"
  19317. },
  19318. "repository": {
  19319. "type": "string"
  19320. },
  19321. "branch": {
  19322. "type": "string"
  19323. },
  19324. "target": {
  19325. "type": "string"
  19326. },
  19327. "targetUri": {
  19328. "type": "string"
  19329. },
  19330. "problem": {
  19331. "type": "string"
  19332. },
  19333. "source": {
  19334. "$ref": "#/components/schemas/PromptSource"
  19335. }
  19336. },
  19337. "required": ["name", "kind"],
  19338. "additionalProperties": false
  19339. },
  19340. "EventSessionNextPrompted": {
  19341. "type": "object",
  19342. "properties": {
  19343. "id": {
  19344. "type": "string"
  19345. },
  19346. "type": {
  19347. "type": "string",
  19348. "enum": ["session.next.prompted"]
  19349. },
  19350. "properties": {
  19351. "type": "object",
  19352. "properties": {
  19353. "timestamp": {
  19354. "type": "number"
  19355. },
  19356. "sessionID": {
  19357. "type": "string",
  19358. "pattern": "^ses"
  19359. },
  19360. "prompt": {
  19361. "$ref": "#/components/schemas/Prompt"
  19362. }
  19363. },
  19364. "required": ["timestamp", "sessionID", "prompt"],
  19365. "additionalProperties": false
  19366. }
  19367. },
  19368. "required": ["id", "type", "properties"],
  19369. "additionalProperties": false
  19370. },
  19371. "EventSessionNextSynthetic": {
  19372. "type": "object",
  19373. "properties": {
  19374. "id": {
  19375. "type": "string"
  19376. },
  19377. "type": {
  19378. "type": "string",
  19379. "enum": ["session.next.synthetic"]
  19380. },
  19381. "properties": {
  19382. "type": "object",
  19383. "properties": {
  19384. "timestamp": {
  19385. "type": "number"
  19386. },
  19387. "sessionID": {
  19388. "type": "string",
  19389. "pattern": "^ses"
  19390. },
  19391. "text": {
  19392. "type": "string"
  19393. }
  19394. },
  19395. "required": ["timestamp", "sessionID", "text"],
  19396. "additionalProperties": false
  19397. }
  19398. },
  19399. "required": ["id", "type", "properties"],
  19400. "additionalProperties": false
  19401. },
  19402. "EventSessionNextShellStarted": {
  19403. "type": "object",
  19404. "properties": {
  19405. "id": {
  19406. "type": "string"
  19407. },
  19408. "type": {
  19409. "type": "string",
  19410. "enum": ["session.next.shell.started"]
  19411. },
  19412. "properties": {
  19413. "type": "object",
  19414. "properties": {
  19415. "timestamp": {
  19416. "type": "number"
  19417. },
  19418. "sessionID": {
  19419. "type": "string",
  19420. "pattern": "^ses"
  19421. },
  19422. "callID": {
  19423. "type": "string"
  19424. },
  19425. "command": {
  19426. "type": "string"
  19427. }
  19428. },
  19429. "required": ["timestamp", "sessionID", "callID", "command"],
  19430. "additionalProperties": false
  19431. }
  19432. },
  19433. "required": ["id", "type", "properties"],
  19434. "additionalProperties": false
  19435. },
  19436. "EventSessionNextShellEnded": {
  19437. "type": "object",
  19438. "properties": {
  19439. "id": {
  19440. "type": "string"
  19441. },
  19442. "type": {
  19443. "type": "string",
  19444. "enum": ["session.next.shell.ended"]
  19445. },
  19446. "properties": {
  19447. "type": "object",
  19448. "properties": {
  19449. "timestamp": {
  19450. "type": "number"
  19451. },
  19452. "sessionID": {
  19453. "type": "string",
  19454. "pattern": "^ses"
  19455. },
  19456. "callID": {
  19457. "type": "string"
  19458. },
  19459. "output": {
  19460. "type": "string"
  19461. }
  19462. },
  19463. "required": ["timestamp", "sessionID", "callID", "output"],
  19464. "additionalProperties": false
  19465. }
  19466. },
  19467. "required": ["id", "type", "properties"],
  19468. "additionalProperties": false
  19469. },
  19470. "EventSessionNextStepStarted": {
  19471. "type": "object",
  19472. "properties": {
  19473. "id": {
  19474. "type": "string"
  19475. },
  19476. "type": {
  19477. "type": "string",
  19478. "enum": ["session.next.step.started"]
  19479. },
  19480. "properties": {
  19481. "type": "object",
  19482. "properties": {
  19483. "timestamp": {
  19484. "type": "number"
  19485. },
  19486. "sessionID": {
  19487. "type": "string",
  19488. "pattern": "^ses"
  19489. },
  19490. "agent": {
  19491. "type": "string"
  19492. },
  19493. "model": {
  19494. "type": "object",
  19495. "properties": {
  19496. "id": {
  19497. "type": "string"
  19498. },
  19499. "providerID": {
  19500. "type": "string"
  19501. },
  19502. "variant": {
  19503. "type": "string"
  19504. }
  19505. },
  19506. "required": ["id", "providerID", "variant"],
  19507. "additionalProperties": false
  19508. },
  19509. "snapshot": {
  19510. "type": "string"
  19511. }
  19512. },
  19513. "required": ["timestamp", "sessionID", "agent", "model"],
  19514. "additionalProperties": false
  19515. }
  19516. },
  19517. "required": ["id", "type", "properties"],
  19518. "additionalProperties": false
  19519. },
  19520. "EventSessionNextStepEnded": {
  19521. "type": "object",
  19522. "properties": {
  19523. "id": {
  19524. "type": "string"
  19525. },
  19526. "type": {
  19527. "type": "string",
  19528. "enum": ["session.next.step.ended"]
  19529. },
  19530. "properties": {
  19531. "type": "object",
  19532. "properties": {
  19533. "timestamp": {
  19534. "type": "number"
  19535. },
  19536. "sessionID": {
  19537. "type": "string",
  19538. "pattern": "^ses"
  19539. },
  19540. "finish": {
  19541. "type": "string"
  19542. },
  19543. "cost": {
  19544. "type": "number"
  19545. },
  19546. "tokens": {
  19547. "type": "object",
  19548. "properties": {
  19549. "input": {
  19550. "type": "number"
  19551. },
  19552. "output": {
  19553. "type": "number"
  19554. },
  19555. "reasoning": {
  19556. "type": "number"
  19557. },
  19558. "cache": {
  19559. "type": "object",
  19560. "properties": {
  19561. "read": {
  19562. "type": "number"
  19563. },
  19564. "write": {
  19565. "type": "number"
  19566. }
  19567. },
  19568. "required": ["read", "write"],
  19569. "additionalProperties": false
  19570. }
  19571. },
  19572. "required": ["input", "output", "reasoning", "cache"],
  19573. "additionalProperties": false
  19574. },
  19575. "snapshot": {
  19576. "type": "string"
  19577. }
  19578. },
  19579. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  19580. "additionalProperties": false
  19581. }
  19582. },
  19583. "required": ["id", "type", "properties"],
  19584. "additionalProperties": false
  19585. },
  19586. "SessionErrorUnknown": {
  19587. "type": "object",
  19588. "properties": {
  19589. "type": {
  19590. "type": "string",
  19591. "enum": ["unknown"]
  19592. },
  19593. "message": {
  19594. "type": "string"
  19595. }
  19596. },
  19597. "required": ["type", "message"],
  19598. "additionalProperties": false
  19599. },
  19600. "EventSessionNextStepFailed": {
  19601. "type": "object",
  19602. "properties": {
  19603. "id": {
  19604. "type": "string"
  19605. },
  19606. "type": {
  19607. "type": "string",
  19608. "enum": ["session.next.step.failed"]
  19609. },
  19610. "properties": {
  19611. "type": "object",
  19612. "properties": {
  19613. "timestamp": {
  19614. "type": "number"
  19615. },
  19616. "sessionID": {
  19617. "type": "string",
  19618. "pattern": "^ses"
  19619. },
  19620. "error": {
  19621. "$ref": "#/components/schemas/SessionErrorUnknown"
  19622. }
  19623. },
  19624. "required": ["timestamp", "sessionID", "error"],
  19625. "additionalProperties": false
  19626. }
  19627. },
  19628. "required": ["id", "type", "properties"],
  19629. "additionalProperties": false
  19630. },
  19631. "EventSessionNextTextStarted": {
  19632. "type": "object",
  19633. "properties": {
  19634. "id": {
  19635. "type": "string"
  19636. },
  19637. "type": {
  19638. "type": "string",
  19639. "enum": ["session.next.text.started"]
  19640. },
  19641. "properties": {
  19642. "type": "object",
  19643. "properties": {
  19644. "timestamp": {
  19645. "type": "number"
  19646. },
  19647. "sessionID": {
  19648. "type": "string",
  19649. "pattern": "^ses"
  19650. }
  19651. },
  19652. "required": ["timestamp", "sessionID"],
  19653. "additionalProperties": false
  19654. }
  19655. },
  19656. "required": ["id", "type", "properties"],
  19657. "additionalProperties": false
  19658. },
  19659. "EventSessionNextTextDelta": {
  19660. "type": "object",
  19661. "properties": {
  19662. "id": {
  19663. "type": "string"
  19664. },
  19665. "type": {
  19666. "type": "string",
  19667. "enum": ["session.next.text.delta"]
  19668. },
  19669. "properties": {
  19670. "type": "object",
  19671. "properties": {
  19672. "timestamp": {
  19673. "type": "number"
  19674. },
  19675. "sessionID": {
  19676. "type": "string",
  19677. "pattern": "^ses"
  19678. },
  19679. "delta": {
  19680. "type": "string"
  19681. }
  19682. },
  19683. "required": ["timestamp", "sessionID", "delta"],
  19684. "additionalProperties": false
  19685. }
  19686. },
  19687. "required": ["id", "type", "properties"],
  19688. "additionalProperties": false
  19689. },
  19690. "EventSessionNextTextEnded": {
  19691. "type": "object",
  19692. "properties": {
  19693. "id": {
  19694. "type": "string"
  19695. },
  19696. "type": {
  19697. "type": "string",
  19698. "enum": ["session.next.text.ended"]
  19699. },
  19700. "properties": {
  19701. "type": "object",
  19702. "properties": {
  19703. "timestamp": {
  19704. "type": "number"
  19705. },
  19706. "sessionID": {
  19707. "type": "string",
  19708. "pattern": "^ses"
  19709. },
  19710. "text": {
  19711. "type": "string"
  19712. }
  19713. },
  19714. "required": ["timestamp", "sessionID", "text"],
  19715. "additionalProperties": false
  19716. }
  19717. },
  19718. "required": ["id", "type", "properties"],
  19719. "additionalProperties": false
  19720. },
  19721. "EventSessionNextReasoningStarted": {
  19722. "type": "object",
  19723. "properties": {
  19724. "id": {
  19725. "type": "string"
  19726. },
  19727. "type": {
  19728. "type": "string",
  19729. "enum": ["session.next.reasoning.started"]
  19730. },
  19731. "properties": {
  19732. "type": "object",
  19733. "properties": {
  19734. "timestamp": {
  19735. "type": "number"
  19736. },
  19737. "sessionID": {
  19738. "type": "string",
  19739. "pattern": "^ses"
  19740. },
  19741. "reasoningID": {
  19742. "type": "string"
  19743. }
  19744. },
  19745. "required": ["timestamp", "sessionID", "reasoningID"],
  19746. "additionalProperties": false
  19747. }
  19748. },
  19749. "required": ["id", "type", "properties"],
  19750. "additionalProperties": false
  19751. },
  19752. "EventSessionNextReasoningDelta": {
  19753. "type": "object",
  19754. "properties": {
  19755. "id": {
  19756. "type": "string"
  19757. },
  19758. "type": {
  19759. "type": "string",
  19760. "enum": ["session.next.reasoning.delta"]
  19761. },
  19762. "properties": {
  19763. "type": "object",
  19764. "properties": {
  19765. "timestamp": {
  19766. "type": "number"
  19767. },
  19768. "sessionID": {
  19769. "type": "string",
  19770. "pattern": "^ses"
  19771. },
  19772. "reasoningID": {
  19773. "type": "string"
  19774. },
  19775. "delta": {
  19776. "type": "string"
  19777. }
  19778. },
  19779. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  19780. "additionalProperties": false
  19781. }
  19782. },
  19783. "required": ["id", "type", "properties"],
  19784. "additionalProperties": false
  19785. },
  19786. "EventSessionNextReasoningEnded": {
  19787. "type": "object",
  19788. "properties": {
  19789. "id": {
  19790. "type": "string"
  19791. },
  19792. "type": {
  19793. "type": "string",
  19794. "enum": ["session.next.reasoning.ended"]
  19795. },
  19796. "properties": {
  19797. "type": "object",
  19798. "properties": {
  19799. "timestamp": {
  19800. "type": "number"
  19801. },
  19802. "sessionID": {
  19803. "type": "string",
  19804. "pattern": "^ses"
  19805. },
  19806. "reasoningID": {
  19807. "type": "string"
  19808. },
  19809. "text": {
  19810. "type": "string"
  19811. }
  19812. },
  19813. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  19814. "additionalProperties": false
  19815. }
  19816. },
  19817. "required": ["id", "type", "properties"],
  19818. "additionalProperties": false
  19819. },
  19820. "EventSessionNextToolInputStarted": {
  19821. "type": "object",
  19822. "properties": {
  19823. "id": {
  19824. "type": "string"
  19825. },
  19826. "type": {
  19827. "type": "string",
  19828. "enum": ["session.next.tool.input.started"]
  19829. },
  19830. "properties": {
  19831. "type": "object",
  19832. "properties": {
  19833. "timestamp": {
  19834. "type": "number"
  19835. },
  19836. "sessionID": {
  19837. "type": "string",
  19838. "pattern": "^ses"
  19839. },
  19840. "callID": {
  19841. "type": "string"
  19842. },
  19843. "name": {
  19844. "type": "string"
  19845. }
  19846. },
  19847. "required": ["timestamp", "sessionID", "callID", "name"],
  19848. "additionalProperties": false
  19849. }
  19850. },
  19851. "required": ["id", "type", "properties"],
  19852. "additionalProperties": false
  19853. },
  19854. "EventSessionNextToolInputDelta": {
  19855. "type": "object",
  19856. "properties": {
  19857. "id": {
  19858. "type": "string"
  19859. },
  19860. "type": {
  19861. "type": "string",
  19862. "enum": ["session.next.tool.input.delta"]
  19863. },
  19864. "properties": {
  19865. "type": "object",
  19866. "properties": {
  19867. "timestamp": {
  19868. "type": "number"
  19869. },
  19870. "sessionID": {
  19871. "type": "string",
  19872. "pattern": "^ses"
  19873. },
  19874. "callID": {
  19875. "type": "string"
  19876. },
  19877. "delta": {
  19878. "type": "string"
  19879. }
  19880. },
  19881. "required": ["timestamp", "sessionID", "callID", "delta"],
  19882. "additionalProperties": false
  19883. }
  19884. },
  19885. "required": ["id", "type", "properties"],
  19886. "additionalProperties": false
  19887. },
  19888. "EventSessionNextToolInputEnded": {
  19889. "type": "object",
  19890. "properties": {
  19891. "id": {
  19892. "type": "string"
  19893. },
  19894. "type": {
  19895. "type": "string",
  19896. "enum": ["session.next.tool.input.ended"]
  19897. },
  19898. "properties": {
  19899. "type": "object",
  19900. "properties": {
  19901. "timestamp": {
  19902. "type": "number"
  19903. },
  19904. "sessionID": {
  19905. "type": "string",
  19906. "pattern": "^ses"
  19907. },
  19908. "callID": {
  19909. "type": "string"
  19910. },
  19911. "text": {
  19912. "type": "string"
  19913. }
  19914. },
  19915. "required": ["timestamp", "sessionID", "callID", "text"],
  19916. "additionalProperties": false
  19917. }
  19918. },
  19919. "required": ["id", "type", "properties"],
  19920. "additionalProperties": false
  19921. },
  19922. "EventSessionNextToolCalled": {
  19923. "type": "object",
  19924. "properties": {
  19925. "id": {
  19926. "type": "string"
  19927. },
  19928. "type": {
  19929. "type": "string",
  19930. "enum": ["session.next.tool.called"]
  19931. },
  19932. "properties": {
  19933. "type": "object",
  19934. "properties": {
  19935. "timestamp": {
  19936. "type": "number"
  19937. },
  19938. "sessionID": {
  19939. "type": "string",
  19940. "pattern": "^ses"
  19941. },
  19942. "callID": {
  19943. "type": "string"
  19944. },
  19945. "tool": {
  19946. "type": "string"
  19947. },
  19948. "input": {
  19949. "type": "object"
  19950. },
  19951. "provider": {
  19952. "type": "object",
  19953. "properties": {
  19954. "executed": {
  19955. "type": "boolean"
  19956. },
  19957. "metadata": {
  19958. "type": "object"
  19959. }
  19960. },
  19961. "required": ["executed"],
  19962. "additionalProperties": false
  19963. }
  19964. },
  19965. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  19966. "additionalProperties": false
  19967. }
  19968. },
  19969. "required": ["id", "type", "properties"],
  19970. "additionalProperties": false
  19971. },
  19972. "ToolTextContent": {
  19973. "type": "object",
  19974. "properties": {
  19975. "type": {
  19976. "type": "string",
  19977. "enum": ["text"]
  19978. },
  19979. "text": {
  19980. "type": "string"
  19981. }
  19982. },
  19983. "required": ["type", "text"],
  19984. "additionalProperties": false
  19985. },
  19986. "ToolFileContent": {
  19987. "type": "object",
  19988. "properties": {
  19989. "type": {
  19990. "type": "string",
  19991. "enum": ["file"]
  19992. },
  19993. "uri": {
  19994. "type": "string"
  19995. },
  19996. "mime": {
  19997. "type": "string"
  19998. },
  19999. "name": {
  20000. "type": "string"
  20001. }
  20002. },
  20003. "required": ["type", "uri", "mime"],
  20004. "additionalProperties": false
  20005. },
  20006. "EventSessionNextToolProgress": {
  20007. "type": "object",
  20008. "properties": {
  20009. "id": {
  20010. "type": "string"
  20011. },
  20012. "type": {
  20013. "type": "string",
  20014. "enum": ["session.next.tool.progress"]
  20015. },
  20016. "properties": {
  20017. "type": "object",
  20018. "properties": {
  20019. "timestamp": {
  20020. "type": "number"
  20021. },
  20022. "sessionID": {
  20023. "type": "string",
  20024. "pattern": "^ses"
  20025. },
  20026. "callID": {
  20027. "type": "string"
  20028. },
  20029. "structured": {
  20030. "type": "object"
  20031. },
  20032. "content": {
  20033. "type": "array",
  20034. "items": {
  20035. "anyOf": [
  20036. {
  20037. "$ref": "#/components/schemas/ToolTextContent"
  20038. },
  20039. {
  20040. "$ref": "#/components/schemas/ToolFileContent"
  20041. }
  20042. ]
  20043. }
  20044. }
  20045. },
  20046. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  20047. "additionalProperties": false
  20048. }
  20049. },
  20050. "required": ["id", "type", "properties"],
  20051. "additionalProperties": false
  20052. },
  20053. "EventSessionNextToolSuccess": {
  20054. "type": "object",
  20055. "properties": {
  20056. "id": {
  20057. "type": "string"
  20058. },
  20059. "type": {
  20060. "type": "string",
  20061. "enum": ["session.next.tool.success"]
  20062. },
  20063. "properties": {
  20064. "type": "object",
  20065. "properties": {
  20066. "timestamp": {
  20067. "type": "number"
  20068. },
  20069. "sessionID": {
  20070. "type": "string",
  20071. "pattern": "^ses"
  20072. },
  20073. "callID": {
  20074. "type": "string"
  20075. },
  20076. "structured": {
  20077. "type": "object"
  20078. },
  20079. "content": {
  20080. "type": "array",
  20081. "items": {
  20082. "anyOf": [
  20083. {
  20084. "$ref": "#/components/schemas/ToolTextContent"
  20085. },
  20086. {
  20087. "$ref": "#/components/schemas/ToolFileContent"
  20088. }
  20089. ]
  20090. }
  20091. },
  20092. "provider": {
  20093. "type": "object",
  20094. "properties": {
  20095. "executed": {
  20096. "type": "boolean"
  20097. },
  20098. "metadata": {
  20099. "type": "object"
  20100. }
  20101. },
  20102. "required": ["executed"],
  20103. "additionalProperties": false
  20104. }
  20105. },
  20106. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  20107. "additionalProperties": false
  20108. }
  20109. },
  20110. "required": ["id", "type", "properties"],
  20111. "additionalProperties": false
  20112. },
  20113. "EventSessionNextToolFailed": {
  20114. "type": "object",
  20115. "properties": {
  20116. "id": {
  20117. "type": "string"
  20118. },
  20119. "type": {
  20120. "type": "string",
  20121. "enum": ["session.next.tool.failed"]
  20122. },
  20123. "properties": {
  20124. "type": "object",
  20125. "properties": {
  20126. "timestamp": {
  20127. "type": "number"
  20128. },
  20129. "sessionID": {
  20130. "type": "string",
  20131. "pattern": "^ses"
  20132. },
  20133. "callID": {
  20134. "type": "string"
  20135. },
  20136. "error": {
  20137. "$ref": "#/components/schemas/SessionErrorUnknown"
  20138. },
  20139. "provider": {
  20140. "type": "object",
  20141. "properties": {
  20142. "executed": {
  20143. "type": "boolean"
  20144. },
  20145. "metadata": {
  20146. "type": "object"
  20147. }
  20148. },
  20149. "required": ["executed"],
  20150. "additionalProperties": false
  20151. }
  20152. },
  20153. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  20154. "additionalProperties": false
  20155. }
  20156. },
  20157. "required": ["id", "type", "properties"],
  20158. "additionalProperties": false
  20159. },
  20160. "SessionNextRetry_error": {
  20161. "type": "object",
  20162. "properties": {
  20163. "message": {
  20164. "type": "string"
  20165. },
  20166. "statusCode": {
  20167. "type": "number"
  20168. },
  20169. "isRetryable": {
  20170. "type": "boolean"
  20171. },
  20172. "responseHeaders": {
  20173. "type": "object",
  20174. "additionalProperties": {
  20175. "type": "string"
  20176. }
  20177. },
  20178. "responseBody": {
  20179. "type": "string"
  20180. },
  20181. "metadata": {
  20182. "type": "object",
  20183. "additionalProperties": {
  20184. "type": "string"
  20185. }
  20186. }
  20187. },
  20188. "required": ["message", "isRetryable"],
  20189. "additionalProperties": false
  20190. },
  20191. "EventSessionNextRetried": {
  20192. "type": "object",
  20193. "properties": {
  20194. "id": {
  20195. "type": "string"
  20196. },
  20197. "type": {
  20198. "type": "string",
  20199. "enum": ["session.next.retried"]
  20200. },
  20201. "properties": {
  20202. "type": "object",
  20203. "properties": {
  20204. "timestamp": {
  20205. "type": "number"
  20206. },
  20207. "sessionID": {
  20208. "type": "string",
  20209. "pattern": "^ses"
  20210. },
  20211. "attempt": {
  20212. "type": "number"
  20213. },
  20214. "error": {
  20215. "$ref": "#/components/schemas/SessionNextRetry_error"
  20216. }
  20217. },
  20218. "required": ["timestamp", "sessionID", "attempt", "error"],
  20219. "additionalProperties": false
  20220. }
  20221. },
  20222. "required": ["id", "type", "properties"],
  20223. "additionalProperties": false
  20224. },
  20225. "EventSessionNextCompactionStarted": {
  20226. "type": "object",
  20227. "properties": {
  20228. "id": {
  20229. "type": "string"
  20230. },
  20231. "type": {
  20232. "type": "string",
  20233. "enum": ["session.next.compaction.started"]
  20234. },
  20235. "properties": {
  20236. "type": "object",
  20237. "properties": {
  20238. "timestamp": {
  20239. "type": "number"
  20240. },
  20241. "sessionID": {
  20242. "type": "string",
  20243. "pattern": "^ses"
  20244. },
  20245. "reason": {
  20246. "type": "string",
  20247. "enum": ["auto", "manual"]
  20248. }
  20249. },
  20250. "required": ["timestamp", "sessionID", "reason"],
  20251. "additionalProperties": false
  20252. }
  20253. },
  20254. "required": ["id", "type", "properties"],
  20255. "additionalProperties": false
  20256. },
  20257. "EventSessionNextCompactionDelta": {
  20258. "type": "object",
  20259. "properties": {
  20260. "id": {
  20261. "type": "string"
  20262. },
  20263. "type": {
  20264. "type": "string",
  20265. "enum": ["session.next.compaction.delta"]
  20266. },
  20267. "properties": {
  20268. "type": "object",
  20269. "properties": {
  20270. "timestamp": {
  20271. "type": "number"
  20272. },
  20273. "sessionID": {
  20274. "type": "string",
  20275. "pattern": "^ses"
  20276. },
  20277. "text": {
  20278. "type": "string"
  20279. }
  20280. },
  20281. "required": ["timestamp", "sessionID", "text"],
  20282. "additionalProperties": false
  20283. }
  20284. },
  20285. "required": ["id", "type", "properties"],
  20286. "additionalProperties": false
  20287. },
  20288. "EventSessionNextCompactionEnded": {
  20289. "type": "object",
  20290. "properties": {
  20291. "id": {
  20292. "type": "string"
  20293. },
  20294. "type": {
  20295. "type": "string",
  20296. "enum": ["session.next.compaction.ended"]
  20297. },
  20298. "properties": {
  20299. "type": "object",
  20300. "properties": {
  20301. "timestamp": {
  20302. "type": "number"
  20303. },
  20304. "sessionID": {
  20305. "type": "string",
  20306. "pattern": "^ses"
  20307. },
  20308. "text": {
  20309. "type": "string"
  20310. },
  20311. "include": {
  20312. "type": "string"
  20313. }
  20314. },
  20315. "required": ["timestamp", "sessionID", "text"],
  20316. "additionalProperties": false
  20317. }
  20318. },
  20319. "required": ["id", "type", "properties"],
  20320. "additionalProperties": false
  20321. },
  20322. "ModelV2Info": {
  20323. "type": "object",
  20324. "properties": {
  20325. "id": {
  20326. "type": "string"
  20327. },
  20328. "apiID": {
  20329. "type": "string"
  20330. },
  20331. "providerID": {
  20332. "type": "string"
  20333. },
  20334. "family": {
  20335. "type": "string"
  20336. },
  20337. "name": {
  20338. "type": "string"
  20339. },
  20340. "endpoint": {
  20341. "anyOf": [
  20342. {
  20343. "type": "object",
  20344. "properties": {
  20345. "type": {
  20346. "type": "string",
  20347. "enum": ["unknown"]
  20348. }
  20349. },
  20350. "required": ["type"],
  20351. "additionalProperties": false
  20352. },
  20353. {
  20354. "type": "object",
  20355. "properties": {
  20356. "type": {
  20357. "type": "string",
  20358. "enum": ["openai/responses"]
  20359. },
  20360. "url": {
  20361. "type": "string"
  20362. },
  20363. "websocket": {
  20364. "type": "boolean"
  20365. }
  20366. },
  20367. "required": ["type", "url"],
  20368. "additionalProperties": false
  20369. },
  20370. {
  20371. "type": "object",
  20372. "properties": {
  20373. "type": {
  20374. "type": "string",
  20375. "enum": ["openai/completions"]
  20376. },
  20377. "url": {
  20378. "type": "string"
  20379. },
  20380. "reasoning": {
  20381. "anyOf": [
  20382. {
  20383. "type": "object",
  20384. "properties": {
  20385. "type": {
  20386. "type": "string",
  20387. "enum": ["reasoning_content"]
  20388. }
  20389. },
  20390. "required": ["type"],
  20391. "additionalProperties": false
  20392. },
  20393. {
  20394. "type": "object",
  20395. "properties": {
  20396. "type": {
  20397. "type": "string",
  20398. "enum": ["reasoning_details"]
  20399. }
  20400. },
  20401. "required": ["type"],
  20402. "additionalProperties": false
  20403. }
  20404. ]
  20405. }
  20406. },
  20407. "required": ["type", "url"],
  20408. "additionalProperties": false
  20409. },
  20410. {
  20411. "type": "object",
  20412. "properties": {
  20413. "type": {
  20414. "type": "string",
  20415. "enum": ["anthropic/messages"]
  20416. },
  20417. "url": {
  20418. "type": "string"
  20419. }
  20420. },
  20421. "required": ["type", "url"],
  20422. "additionalProperties": false
  20423. },
  20424. {
  20425. "type": "object",
  20426. "properties": {
  20427. "type": {
  20428. "type": "string",
  20429. "enum": ["aisdk"]
  20430. },
  20431. "package": {
  20432. "type": "string"
  20433. },
  20434. "url": {
  20435. "type": "string"
  20436. }
  20437. },
  20438. "required": ["type", "package"],
  20439. "additionalProperties": false
  20440. }
  20441. ]
  20442. },
  20443. "capabilities": {
  20444. "type": "object",
  20445. "properties": {
  20446. "tools": {
  20447. "type": "boolean"
  20448. },
  20449. "input": {
  20450. "type": "array",
  20451. "items": {
  20452. "type": "string"
  20453. }
  20454. },
  20455. "output": {
  20456. "type": "array",
  20457. "items": {
  20458. "type": "string"
  20459. }
  20460. }
  20461. },
  20462. "required": ["tools", "input", "output"],
  20463. "additionalProperties": false
  20464. },
  20465. "options": {
  20466. "type": "object",
  20467. "properties": {
  20468. "headers": {
  20469. "type": "object",
  20470. "additionalProperties": {
  20471. "type": "string"
  20472. }
  20473. },
  20474. "body": {
  20475. "type": "object"
  20476. },
  20477. "aisdk": {
  20478. "type": "object",
  20479. "properties": {
  20480. "provider": {
  20481. "type": "object"
  20482. },
  20483. "request": {
  20484. "type": "object"
  20485. }
  20486. },
  20487. "required": ["provider", "request"],
  20488. "additionalProperties": false
  20489. },
  20490. "variant": {
  20491. "type": "string"
  20492. }
  20493. },
  20494. "required": ["headers", "body", "aisdk"],
  20495. "additionalProperties": false
  20496. },
  20497. "variants": {
  20498. "type": "array",
  20499. "items": {
  20500. "type": "object",
  20501. "properties": {
  20502. "id": {
  20503. "type": "string"
  20504. },
  20505. "headers": {
  20506. "type": "object",
  20507. "additionalProperties": {
  20508. "type": "string"
  20509. }
  20510. },
  20511. "body": {
  20512. "type": "object"
  20513. },
  20514. "aisdk": {
  20515. "type": "object",
  20516. "properties": {
  20517. "provider": {
  20518. "type": "object"
  20519. },
  20520. "request": {
  20521. "type": "object"
  20522. }
  20523. },
  20524. "required": ["provider", "request"],
  20525. "additionalProperties": false
  20526. }
  20527. },
  20528. "required": ["id", "headers", "body", "aisdk"],
  20529. "additionalProperties": false
  20530. }
  20531. },
  20532. "time": {
  20533. "type": "object",
  20534. "properties": {
  20535. "released": {
  20536. "anyOf": [
  20537. {
  20538. "type": "number"
  20539. },
  20540. {
  20541. "type": "string",
  20542. "enum": ["NaN"]
  20543. },
  20544. {
  20545. "type": "string",
  20546. "enum": ["Infinity"]
  20547. },
  20548. {
  20549. "type": "string",
  20550. "enum": ["-Infinity"]
  20551. },
  20552. {
  20553. "type": "string",
  20554. "enum": ["Infinity", "-Infinity", "NaN"]
  20555. }
  20556. ]
  20557. }
  20558. },
  20559. "required": ["released"],
  20560. "additionalProperties": false
  20561. },
  20562. "cost": {
  20563. "type": "array",
  20564. "items": {
  20565. "type": "object",
  20566. "properties": {
  20567. "tier": {
  20568. "type": "object",
  20569. "properties": {
  20570. "type": {
  20571. "type": "string",
  20572. "enum": ["context"]
  20573. },
  20574. "size": {
  20575. "type": "integer"
  20576. }
  20577. },
  20578. "required": ["type", "size"],
  20579. "additionalProperties": false
  20580. },
  20581. "input": {
  20582. "type": "number"
  20583. },
  20584. "output": {
  20585. "type": "number"
  20586. },
  20587. "cache": {
  20588. "type": "object",
  20589. "properties": {
  20590. "read": {
  20591. "type": "number"
  20592. },
  20593. "write": {
  20594. "type": "number"
  20595. }
  20596. },
  20597. "required": ["read", "write"],
  20598. "additionalProperties": false
  20599. }
  20600. },
  20601. "required": ["input", "output", "cache"],
  20602. "additionalProperties": false
  20603. }
  20604. },
  20605. "status": {
  20606. "type": "string",
  20607. "enum": ["alpha", "beta", "deprecated", "active"]
  20608. },
  20609. "enabled": {
  20610. "type": "boolean"
  20611. },
  20612. "limit": {
  20613. "type": "object",
  20614. "properties": {
  20615. "context": {
  20616. "type": "integer"
  20617. },
  20618. "input": {
  20619. "type": "integer"
  20620. },
  20621. "output": {
  20622. "type": "integer"
  20623. }
  20624. },
  20625. "required": ["context", "output"],
  20626. "additionalProperties": false
  20627. }
  20628. },
  20629. "required": [
  20630. "id",
  20631. "apiID",
  20632. "providerID",
  20633. "name",
  20634. "endpoint",
  20635. "capabilities",
  20636. "options",
  20637. "variants",
  20638. "time",
  20639. "cost",
  20640. "status",
  20641. "enabled",
  20642. "limit"
  20643. ],
  20644. "additionalProperties": false
  20645. },
  20646. "EventCatalogModelUpdated": {
  20647. "type": "object",
  20648. "properties": {
  20649. "id": {
  20650. "type": "string"
  20651. },
  20652. "type": {
  20653. "type": "string",
  20654. "enum": ["catalog.model.updated"]
  20655. },
  20656. "properties": {
  20657. "type": "object",
  20658. "properties": {
  20659. "model": {
  20660. "$ref": "#/components/schemas/ModelV2Info"
  20661. }
  20662. },
  20663. "required": ["model"],
  20664. "additionalProperties": false
  20665. }
  20666. },
  20667. "required": ["id", "type", "properties"],
  20668. "additionalProperties": false
  20669. },
  20670. "EventModels-devRefreshed": {
  20671. "type": "object",
  20672. "properties": {
  20673. "id": {
  20674. "type": "string"
  20675. },
  20676. "type": {
  20677. "type": "string",
  20678. "enum": ["models-dev.refreshed"]
  20679. },
  20680. "properties": {
  20681. "type": "object",
  20682. "properties": {}
  20683. }
  20684. },
  20685. "required": ["id", "type", "properties"],
  20686. "additionalProperties": false
  20687. },
  20688. "AccountV2OAuthCredential": {
  20689. "type": "object",
  20690. "properties": {
  20691. "type": {
  20692. "type": "string",
  20693. "enum": ["oauth"]
  20694. },
  20695. "refresh": {
  20696. "type": "string"
  20697. },
  20698. "access": {
  20699. "type": "string"
  20700. },
  20701. "expires": {
  20702. "type": "integer",
  20703. "minimum": 0
  20704. }
  20705. },
  20706. "required": ["type", "refresh", "access", "expires"],
  20707. "additionalProperties": false
  20708. },
  20709. "AccountV2ApiKeyCredential": {
  20710. "type": "object",
  20711. "properties": {
  20712. "type": {
  20713. "type": "string",
  20714. "enum": ["api"]
  20715. },
  20716. "key": {
  20717. "type": "string"
  20718. },
  20719. "metadata": {
  20720. "type": "object",
  20721. "additionalProperties": {
  20722. "type": "string"
  20723. }
  20724. }
  20725. },
  20726. "required": ["type", "key"],
  20727. "additionalProperties": false
  20728. },
  20729. "AccountV2Credential": {
  20730. "anyOf": [
  20731. {
  20732. "$ref": "#/components/schemas/AccountV2OAuthCredential"
  20733. },
  20734. {
  20735. "$ref": "#/components/schemas/AccountV2ApiKeyCredential"
  20736. }
  20737. ]
  20738. },
  20739. "AccountV2Info": {
  20740. "type": "object",
  20741. "properties": {
  20742. "id": {
  20743. "type": "string"
  20744. },
  20745. "serviceID": {
  20746. "type": "string"
  20747. },
  20748. "description": {
  20749. "type": "string"
  20750. },
  20751. "credential": {
  20752. "$ref": "#/components/schemas/AccountV2Credential"
  20753. }
  20754. },
  20755. "required": ["id", "serviceID", "description", "credential"],
  20756. "additionalProperties": false
  20757. },
  20758. "EventAccountAdded": {
  20759. "type": "object",
  20760. "properties": {
  20761. "id": {
  20762. "type": "string"
  20763. },
  20764. "type": {
  20765. "type": "string",
  20766. "enum": ["account.added"]
  20767. },
  20768. "properties": {
  20769. "type": "object",
  20770. "properties": {
  20771. "account": {
  20772. "$ref": "#/components/schemas/AccountV2Info"
  20773. }
  20774. },
  20775. "required": ["account"],
  20776. "additionalProperties": false
  20777. }
  20778. },
  20779. "required": ["id", "type", "properties"],
  20780. "additionalProperties": false
  20781. },
  20782. "EventAccountRemoved": {
  20783. "type": "object",
  20784. "properties": {
  20785. "id": {
  20786. "type": "string"
  20787. },
  20788. "type": {
  20789. "type": "string",
  20790. "enum": ["account.removed"]
  20791. },
  20792. "properties": {
  20793. "type": "object",
  20794. "properties": {
  20795. "account": {
  20796. "$ref": "#/components/schemas/AccountV2Info"
  20797. }
  20798. },
  20799. "required": ["account"],
  20800. "additionalProperties": false
  20801. }
  20802. },
  20803. "required": ["id", "type", "properties"],
  20804. "additionalProperties": false
  20805. },
  20806. "EventAccountSwitched": {
  20807. "type": "object",
  20808. "properties": {
  20809. "id": {
  20810. "type": "string"
  20811. },
  20812. "type": {
  20813. "type": "string",
  20814. "enum": ["account.switched"]
  20815. },
  20816. "properties": {
  20817. "type": "object",
  20818. "properties": {
  20819. "serviceID": {
  20820. "type": "string"
  20821. },
  20822. "from": {
  20823. "type": "string"
  20824. },
  20825. "to": {
  20826. "type": "string"
  20827. }
  20828. },
  20829. "required": ["serviceID"],
  20830. "additionalProperties": false
  20831. }
  20832. },
  20833. "required": ["id", "type", "properties"],
  20834. "additionalProperties": false
  20835. },
  20836. "SessionInfo": {
  20837. "type": "object",
  20838. "properties": {
  20839. "id": {
  20840. "type": "string",
  20841. "pattern": "^ses"
  20842. },
  20843. "parentID": {
  20844. "type": "string",
  20845. "pattern": "^ses"
  20846. },
  20847. "projectID": {
  20848. "type": "string"
  20849. },
  20850. "workspaceID": {
  20851. "type": "string",
  20852. "pattern": "^wrk"
  20853. },
  20854. "path": {
  20855. "type": "string"
  20856. },
  20857. "agent": {
  20858. "type": "string"
  20859. },
  20860. "model": {
  20861. "type": "object",
  20862. "properties": {
  20863. "id": {
  20864. "type": "string"
  20865. },
  20866. "providerID": {
  20867. "type": "string"
  20868. },
  20869. "variant": {
  20870. "type": "string"
  20871. }
  20872. },
  20873. "required": ["id", "providerID", "variant"],
  20874. "additionalProperties": false
  20875. },
  20876. "cost": {
  20877. "type": "number"
  20878. },
  20879. "tokens": {
  20880. "type": "object",
  20881. "properties": {
  20882. "input": {
  20883. "type": "number"
  20884. },
  20885. "output": {
  20886. "type": "number"
  20887. },
  20888. "reasoning": {
  20889. "type": "number"
  20890. },
  20891. "cache": {
  20892. "type": "object",
  20893. "properties": {
  20894. "read": {
  20895. "type": "number"
  20896. },
  20897. "write": {
  20898. "type": "number"
  20899. }
  20900. },
  20901. "required": ["read", "write"],
  20902. "additionalProperties": false
  20903. }
  20904. },
  20905. "required": ["input", "output", "reasoning", "cache"],
  20906. "additionalProperties": false
  20907. },
  20908. "time": {
  20909. "type": "object",
  20910. "properties": {
  20911. "created": {
  20912. "type": "number"
  20913. },
  20914. "updated": {
  20915. "type": "number"
  20916. },
  20917. "archived": {
  20918. "type": "number"
  20919. }
  20920. },
  20921. "required": ["created", "updated"],
  20922. "additionalProperties": false
  20923. },
  20924. "title": {
  20925. "type": "string"
  20926. }
  20927. },
  20928. "required": ["id", "projectID", "cost", "tokens", "time", "title"],
  20929. "additionalProperties": false
  20930. },
  20931. "SessionDelivery": {
  20932. "type": "string",
  20933. "enum": ["immediate", "deferred"]
  20934. },
  20935. "SessionMessageAgentSwitched": {
  20936. "type": "object",
  20937. "properties": {
  20938. "id": {
  20939. "type": "string"
  20940. },
  20941. "metadata": {
  20942. "type": "object"
  20943. },
  20944. "time": {
  20945. "type": "object",
  20946. "properties": {
  20947. "created": {
  20948. "type": "number"
  20949. }
  20950. },
  20951. "required": ["created"],
  20952. "additionalProperties": false
  20953. },
  20954. "type": {
  20955. "type": "string",
  20956. "enum": ["agent-switched"]
  20957. },
  20958. "agent": {
  20959. "type": "string"
  20960. }
  20961. },
  20962. "required": ["id", "time", "type", "agent"],
  20963. "additionalProperties": false
  20964. },
  20965. "SessionMessageModelSwitched": {
  20966. "type": "object",
  20967. "properties": {
  20968. "id": {
  20969. "type": "string"
  20970. },
  20971. "metadata": {
  20972. "type": "object"
  20973. },
  20974. "time": {
  20975. "type": "object",
  20976. "properties": {
  20977. "created": {
  20978. "type": "number"
  20979. }
  20980. },
  20981. "required": ["created"],
  20982. "additionalProperties": false
  20983. },
  20984. "type": {
  20985. "type": "string",
  20986. "enum": ["model-switched"]
  20987. },
  20988. "model": {
  20989. "type": "object",
  20990. "properties": {
  20991. "id": {
  20992. "type": "string"
  20993. },
  20994. "providerID": {
  20995. "type": "string"
  20996. },
  20997. "variant": {
  20998. "type": "string"
  20999. }
  21000. },
  21001. "required": ["id", "providerID", "variant"],
  21002. "additionalProperties": false
  21003. }
  21004. },
  21005. "required": ["id", "time", "type", "model"],
  21006. "additionalProperties": false
  21007. },
  21008. "SessionMessageUser": {
  21009. "type": "object",
  21010. "properties": {
  21011. "id": {
  21012. "type": "string"
  21013. },
  21014. "metadata": {
  21015. "type": "object"
  21016. },
  21017. "time": {
  21018. "type": "object",
  21019. "properties": {
  21020. "created": {
  21021. "type": "number"
  21022. }
  21023. },
  21024. "required": ["created"],
  21025. "additionalProperties": false
  21026. },
  21027. "text": {
  21028. "type": "string"
  21029. },
  21030. "files": {
  21031. "type": "array",
  21032. "items": {
  21033. "$ref": "#/components/schemas/PromptFileAttachment"
  21034. }
  21035. },
  21036. "agents": {
  21037. "type": "array",
  21038. "items": {
  21039. "$ref": "#/components/schemas/PromptAgentAttachment"
  21040. }
  21041. },
  21042. "references": {
  21043. "type": "array",
  21044. "items": {
  21045. "$ref": "#/components/schemas/PromptReferenceAttachment"
  21046. }
  21047. },
  21048. "type": {
  21049. "type": "string",
  21050. "enum": ["user"]
  21051. }
  21052. },
  21053. "required": ["id", "time", "text", "type"],
  21054. "additionalProperties": false
  21055. },
  21056. "SessionMessageSynthetic": {
  21057. "type": "object",
  21058. "properties": {
  21059. "id": {
  21060. "type": "string"
  21061. },
  21062. "metadata": {
  21063. "type": "object"
  21064. },
  21065. "time": {
  21066. "type": "object",
  21067. "properties": {
  21068. "created": {
  21069. "type": "number"
  21070. }
  21071. },
  21072. "required": ["created"],
  21073. "additionalProperties": false
  21074. },
  21075. "sessionID": {
  21076. "type": "string",
  21077. "pattern": "^ses"
  21078. },
  21079. "text": {
  21080. "type": "string"
  21081. },
  21082. "type": {
  21083. "type": "string",
  21084. "enum": ["synthetic"]
  21085. }
  21086. },
  21087. "required": ["id", "time", "sessionID", "text", "type"],
  21088. "additionalProperties": false
  21089. },
  21090. "SessionMessageShell": {
  21091. "type": "object",
  21092. "properties": {
  21093. "id": {
  21094. "type": "string"
  21095. },
  21096. "metadata": {
  21097. "type": "object"
  21098. },
  21099. "time": {
  21100. "type": "object",
  21101. "properties": {
  21102. "created": {
  21103. "type": "number"
  21104. },
  21105. "completed": {
  21106. "type": "number"
  21107. }
  21108. },
  21109. "required": ["created"],
  21110. "additionalProperties": false
  21111. },
  21112. "type": {
  21113. "type": "string",
  21114. "enum": ["shell"]
  21115. },
  21116. "callID": {
  21117. "type": "string"
  21118. },
  21119. "command": {
  21120. "type": "string"
  21121. },
  21122. "output": {
  21123. "type": "string"
  21124. }
  21125. },
  21126. "required": ["id", "time", "type", "callID", "command", "output"],
  21127. "additionalProperties": false
  21128. },
  21129. "SessionMessageAssistantText": {
  21130. "type": "object",
  21131. "properties": {
  21132. "type": {
  21133. "type": "string",
  21134. "enum": ["text"]
  21135. },
  21136. "text": {
  21137. "type": "string"
  21138. }
  21139. },
  21140. "required": ["type", "text"],
  21141. "additionalProperties": false
  21142. },
  21143. "SessionMessageAssistantReasoning": {
  21144. "type": "object",
  21145. "properties": {
  21146. "type": {
  21147. "type": "string",
  21148. "enum": ["reasoning"]
  21149. },
  21150. "id": {
  21151. "type": "string"
  21152. },
  21153. "text": {
  21154. "type": "string"
  21155. }
  21156. },
  21157. "required": ["type", "id", "text"],
  21158. "additionalProperties": false
  21159. },
  21160. "SessionMessageToolStatePending": {
  21161. "type": "object",
  21162. "properties": {
  21163. "status": {
  21164. "type": "string",
  21165. "enum": ["pending"]
  21166. },
  21167. "input": {
  21168. "type": "string"
  21169. }
  21170. },
  21171. "required": ["status", "input"],
  21172. "additionalProperties": false
  21173. },
  21174. "SessionMessageToolStateRunning": {
  21175. "type": "object",
  21176. "properties": {
  21177. "status": {
  21178. "type": "string",
  21179. "enum": ["running"]
  21180. },
  21181. "input": {
  21182. "type": "object"
  21183. },
  21184. "structured": {
  21185. "type": "object"
  21186. },
  21187. "content": {
  21188. "type": "array",
  21189. "items": {
  21190. "anyOf": [
  21191. {
  21192. "$ref": "#/components/schemas/ToolTextContent"
  21193. },
  21194. {
  21195. "$ref": "#/components/schemas/ToolFileContent"
  21196. }
  21197. ]
  21198. }
  21199. }
  21200. },
  21201. "required": ["status", "input", "structured", "content"],
  21202. "additionalProperties": false
  21203. },
  21204. "SessionMessageToolStateCompleted": {
  21205. "type": "object",
  21206. "properties": {
  21207. "status": {
  21208. "type": "string",
  21209. "enum": ["completed"]
  21210. },
  21211. "input": {
  21212. "type": "object"
  21213. },
  21214. "attachments": {
  21215. "type": "array",
  21216. "items": {
  21217. "$ref": "#/components/schemas/PromptFileAttachment"
  21218. }
  21219. },
  21220. "content": {
  21221. "type": "array",
  21222. "items": {
  21223. "anyOf": [
  21224. {
  21225. "$ref": "#/components/schemas/ToolTextContent"
  21226. },
  21227. {
  21228. "$ref": "#/components/schemas/ToolFileContent"
  21229. }
  21230. ]
  21231. }
  21232. },
  21233. "structured": {
  21234. "type": "object"
  21235. }
  21236. },
  21237. "required": ["status", "input", "content", "structured"],
  21238. "additionalProperties": false
  21239. },
  21240. "SessionMessageToolStateError": {
  21241. "type": "object",
  21242. "properties": {
  21243. "status": {
  21244. "type": "string",
  21245. "enum": ["error"]
  21246. },
  21247. "input": {
  21248. "type": "object"
  21249. },
  21250. "content": {
  21251. "type": "array",
  21252. "items": {
  21253. "anyOf": [
  21254. {
  21255. "$ref": "#/components/schemas/ToolTextContent"
  21256. },
  21257. {
  21258. "$ref": "#/components/schemas/ToolFileContent"
  21259. }
  21260. ]
  21261. }
  21262. },
  21263. "structured": {
  21264. "type": "object"
  21265. },
  21266. "error": {
  21267. "$ref": "#/components/schemas/SessionErrorUnknown"
  21268. }
  21269. },
  21270. "required": ["status", "input", "content", "structured", "error"],
  21271. "additionalProperties": false
  21272. },
  21273. "SessionMessageAssistantTool": {
  21274. "type": "object",
  21275. "properties": {
  21276. "type": {
  21277. "type": "string",
  21278. "enum": ["tool"]
  21279. },
  21280. "id": {
  21281. "type": "string"
  21282. },
  21283. "name": {
  21284. "type": "string"
  21285. },
  21286. "provider": {
  21287. "type": "object",
  21288. "properties": {
  21289. "executed": {
  21290. "type": "boolean"
  21291. },
  21292. "metadata": {
  21293. "type": "object"
  21294. }
  21295. },
  21296. "required": ["executed"],
  21297. "additionalProperties": false
  21298. },
  21299. "state": {
  21300. "anyOf": [
  21301. {
  21302. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  21303. },
  21304. {
  21305. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  21306. },
  21307. {
  21308. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  21309. },
  21310. {
  21311. "$ref": "#/components/schemas/SessionMessageToolStateError"
  21312. }
  21313. ]
  21314. },
  21315. "time": {
  21316. "type": "object",
  21317. "properties": {
  21318. "created": {
  21319. "type": "number"
  21320. },
  21321. "ran": {
  21322. "type": "number"
  21323. },
  21324. "completed": {
  21325. "type": "number"
  21326. },
  21327. "pruned": {
  21328. "type": "number"
  21329. }
  21330. },
  21331. "required": ["created"],
  21332. "additionalProperties": false
  21333. }
  21334. },
  21335. "required": ["type", "id", "name", "state", "time"],
  21336. "additionalProperties": false
  21337. },
  21338. "SessionMessageAssistant": {
  21339. "type": "object",
  21340. "properties": {
  21341. "id": {
  21342. "type": "string"
  21343. },
  21344. "metadata": {
  21345. "type": "object"
  21346. },
  21347. "time": {
  21348. "type": "object",
  21349. "properties": {
  21350. "created": {
  21351. "type": "number"
  21352. },
  21353. "completed": {
  21354. "type": "number"
  21355. }
  21356. },
  21357. "required": ["created"],
  21358. "additionalProperties": false
  21359. },
  21360. "type": {
  21361. "type": "string",
  21362. "enum": ["assistant"]
  21363. },
  21364. "agent": {
  21365. "type": "string"
  21366. },
  21367. "model": {
  21368. "type": "object",
  21369. "properties": {
  21370. "id": {
  21371. "type": "string"
  21372. },
  21373. "providerID": {
  21374. "type": "string"
  21375. },
  21376. "variant": {
  21377. "type": "string"
  21378. }
  21379. },
  21380. "required": ["id", "providerID", "variant"],
  21381. "additionalProperties": false
  21382. },
  21383. "content": {
  21384. "type": "array",
  21385. "items": {
  21386. "anyOf": [
  21387. {
  21388. "$ref": "#/components/schemas/SessionMessageAssistantText"
  21389. },
  21390. {
  21391. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  21392. },
  21393. {
  21394. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  21395. }
  21396. ]
  21397. }
  21398. },
  21399. "snapshot": {
  21400. "type": "object",
  21401. "properties": {
  21402. "start": {
  21403. "type": "string"
  21404. },
  21405. "end": {
  21406. "type": "string"
  21407. }
  21408. },
  21409. "additionalProperties": false
  21410. },
  21411. "finish": {
  21412. "type": "string"
  21413. },
  21414. "cost": {
  21415. "type": "number"
  21416. },
  21417. "tokens": {
  21418. "type": "object",
  21419. "properties": {
  21420. "input": {
  21421. "type": "number"
  21422. },
  21423. "output": {
  21424. "type": "number"
  21425. },
  21426. "reasoning": {
  21427. "type": "number"
  21428. },
  21429. "cache": {
  21430. "type": "object",
  21431. "properties": {
  21432. "read": {
  21433. "type": "number"
  21434. },
  21435. "write": {
  21436. "type": "number"
  21437. }
  21438. },
  21439. "required": ["read", "write"],
  21440. "additionalProperties": false
  21441. }
  21442. },
  21443. "required": ["input", "output", "reasoning", "cache"],
  21444. "additionalProperties": false
  21445. },
  21446. "error": {
  21447. "$ref": "#/components/schemas/SessionErrorUnknown"
  21448. }
  21449. },
  21450. "required": ["id", "time", "type", "agent", "model", "content"],
  21451. "additionalProperties": false
  21452. },
  21453. "SessionMessageCompaction": {
  21454. "type": "object",
  21455. "properties": {
  21456. "type": {
  21457. "type": "string",
  21458. "enum": ["compaction"]
  21459. },
  21460. "reason": {
  21461. "type": "string",
  21462. "enum": ["auto", "manual"]
  21463. },
  21464. "summary": {
  21465. "type": "string"
  21466. },
  21467. "include": {
  21468. "type": "string"
  21469. },
  21470. "id": {
  21471. "type": "string"
  21472. },
  21473. "metadata": {
  21474. "type": "object"
  21475. },
  21476. "time": {
  21477. "type": "object",
  21478. "properties": {
  21479. "created": {
  21480. "type": "number"
  21481. }
  21482. },
  21483. "required": ["created"],
  21484. "additionalProperties": false
  21485. }
  21486. },
  21487. "required": ["type", "reason", "summary", "id", "time"],
  21488. "additionalProperties": false
  21489. },
  21490. "SessionMessage": {
  21491. "anyOf": [
  21492. {
  21493. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  21494. },
  21495. {
  21496. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  21497. },
  21498. {
  21499. "$ref": "#/components/schemas/SessionMessageUser"
  21500. },
  21501. {
  21502. "$ref": "#/components/schemas/SessionMessageSynthetic"
  21503. },
  21504. {
  21505. "$ref": "#/components/schemas/SessionMessageShell"
  21506. },
  21507. {
  21508. "$ref": "#/components/schemas/SessionMessageAssistant"
  21509. },
  21510. {
  21511. "$ref": "#/components/schemas/SessionMessageCompaction"
  21512. }
  21513. ]
  21514. },
  21515. "ProviderV2Info": {
  21516. "type": "object",
  21517. "properties": {
  21518. "id": {
  21519. "type": "string"
  21520. },
  21521. "name": {
  21522. "type": "string"
  21523. },
  21524. "enabled": {
  21525. "anyOf": [
  21526. {
  21527. "type": "boolean",
  21528. "enum": [false]
  21529. },
  21530. {
  21531. "type": "object",
  21532. "properties": {
  21533. "via": {
  21534. "type": "string",
  21535. "enum": ["env"]
  21536. },
  21537. "name": {
  21538. "type": "string"
  21539. }
  21540. },
  21541. "required": ["via", "name"],
  21542. "additionalProperties": false
  21543. },
  21544. {
  21545. "type": "object",
  21546. "properties": {
  21547. "via": {
  21548. "type": "string",
  21549. "enum": ["account"]
  21550. },
  21551. "service": {
  21552. "type": "string"
  21553. }
  21554. },
  21555. "required": ["via", "service"],
  21556. "additionalProperties": false
  21557. },
  21558. {
  21559. "type": "object",
  21560. "properties": {
  21561. "via": {
  21562. "type": "string",
  21563. "enum": ["custom"]
  21564. },
  21565. "data": {
  21566. "type": "object"
  21567. }
  21568. },
  21569. "required": ["via", "data"],
  21570. "additionalProperties": false
  21571. }
  21572. ]
  21573. },
  21574. "env": {
  21575. "type": "array",
  21576. "items": {
  21577. "type": "string"
  21578. }
  21579. },
  21580. "endpoint": {
  21581. "anyOf": [
  21582. {
  21583. "type": "object",
  21584. "properties": {
  21585. "type": {
  21586. "type": "string",
  21587. "enum": ["unknown"]
  21588. }
  21589. },
  21590. "required": ["type"],
  21591. "additionalProperties": false
  21592. },
  21593. {
  21594. "type": "object",
  21595. "properties": {
  21596. "type": {
  21597. "type": "string",
  21598. "enum": ["openai/responses"]
  21599. },
  21600. "url": {
  21601. "type": "string"
  21602. },
  21603. "websocket": {
  21604. "type": "boolean"
  21605. }
  21606. },
  21607. "required": ["type", "url"],
  21608. "additionalProperties": false
  21609. },
  21610. {
  21611. "type": "object",
  21612. "properties": {
  21613. "type": {
  21614. "type": "string",
  21615. "enum": ["openai/completions"]
  21616. },
  21617. "url": {
  21618. "type": "string"
  21619. },
  21620. "reasoning": {
  21621. "anyOf": [
  21622. {
  21623. "type": "object",
  21624. "properties": {
  21625. "type": {
  21626. "type": "string",
  21627. "enum": ["reasoning_content"]
  21628. }
  21629. },
  21630. "required": ["type"],
  21631. "additionalProperties": false
  21632. },
  21633. {
  21634. "type": "object",
  21635. "properties": {
  21636. "type": {
  21637. "type": "string",
  21638. "enum": ["reasoning_details"]
  21639. }
  21640. },
  21641. "required": ["type"],
  21642. "additionalProperties": false
  21643. }
  21644. ]
  21645. }
  21646. },
  21647. "required": ["type", "url"],
  21648. "additionalProperties": false
  21649. },
  21650. {
  21651. "type": "object",
  21652. "properties": {
  21653. "type": {
  21654. "type": "string",
  21655. "enum": ["anthropic/messages"]
  21656. },
  21657. "url": {
  21658. "type": "string"
  21659. }
  21660. },
  21661. "required": ["type", "url"],
  21662. "additionalProperties": false
  21663. },
  21664. {
  21665. "type": "object",
  21666. "properties": {
  21667. "type": {
  21668. "type": "string",
  21669. "enum": ["aisdk"]
  21670. },
  21671. "package": {
  21672. "type": "string"
  21673. },
  21674. "url": {
  21675. "type": "string"
  21676. }
  21677. },
  21678. "required": ["type", "package"],
  21679. "additionalProperties": false
  21680. }
  21681. ]
  21682. },
  21683. "options": {
  21684. "type": "object",
  21685. "properties": {
  21686. "headers": {
  21687. "type": "object",
  21688. "additionalProperties": {
  21689. "type": "string"
  21690. }
  21691. },
  21692. "body": {
  21693. "type": "object"
  21694. },
  21695. "aisdk": {
  21696. "type": "object",
  21697. "properties": {
  21698. "provider": {
  21699. "type": "object"
  21700. },
  21701. "request": {
  21702. "type": "object"
  21703. }
  21704. },
  21705. "required": ["provider", "request"],
  21706. "additionalProperties": false
  21707. }
  21708. },
  21709. "required": ["headers", "body", "aisdk"],
  21710. "additionalProperties": false
  21711. }
  21712. },
  21713. "required": ["id", "name", "enabled", "env", "endpoint", "options"],
  21714. "additionalProperties": false
  21715. },
  21716. "EventTuiToastShow1": {
  21717. "type": "object",
  21718. "properties": {
  21719. "id": {
  21720. "type": "string"
  21721. },
  21722. "type": {
  21723. "type": "string",
  21724. "enum": ["tui.toast.show"]
  21725. },
  21726. "properties": {
  21727. "type": "object",
  21728. "properties": {
  21729. "title": {
  21730. "type": "string"
  21731. },
  21732. "message": {
  21733. "type": "string"
  21734. },
  21735. "variant": {
  21736. "type": "string",
  21737. "enum": ["info", "success", "warning", "error"]
  21738. },
  21739. "duration": {
  21740. "type": "integer",
  21741. "exclusiveMinimum": 0
  21742. }
  21743. },
  21744. "required": ["message", "variant"],
  21745. "additionalProperties": false
  21746. }
  21747. },
  21748. "required": ["id", "type", "properties"],
  21749. "additionalProperties": false
  21750. },
  21751. "ModelV2Info1": {
  21752. "type": "object",
  21753. "properties": {
  21754. "id": {
  21755. "type": "string"
  21756. },
  21757. "apiID": {
  21758. "type": "string"
  21759. },
  21760. "providerID": {
  21761. "type": "string"
  21762. },
  21763. "family": {
  21764. "type": "string"
  21765. },
  21766. "name": {
  21767. "type": "string"
  21768. },
  21769. "endpoint": {
  21770. "anyOf": [
  21771. {
  21772. "type": "object",
  21773. "properties": {
  21774. "type": {
  21775. "type": "string",
  21776. "enum": ["unknown"]
  21777. }
  21778. },
  21779. "required": ["type"],
  21780. "additionalProperties": false
  21781. },
  21782. {
  21783. "type": "object",
  21784. "properties": {
  21785. "type": {
  21786. "type": "string",
  21787. "enum": ["openai/responses"]
  21788. },
  21789. "url": {
  21790. "type": "string"
  21791. },
  21792. "websocket": {
  21793. "type": "boolean"
  21794. }
  21795. },
  21796. "required": ["type", "url"],
  21797. "additionalProperties": false
  21798. },
  21799. {
  21800. "type": "object",
  21801. "properties": {
  21802. "type": {
  21803. "type": "string",
  21804. "enum": ["openai/completions"]
  21805. },
  21806. "url": {
  21807. "type": "string"
  21808. },
  21809. "reasoning": {
  21810. "anyOf": [
  21811. {
  21812. "type": "object",
  21813. "properties": {
  21814. "type": {
  21815. "type": "string",
  21816. "enum": ["reasoning_content"]
  21817. }
  21818. },
  21819. "required": ["type"],
  21820. "additionalProperties": false
  21821. },
  21822. {
  21823. "type": "object",
  21824. "properties": {
  21825. "type": {
  21826. "type": "string",
  21827. "enum": ["reasoning_details"]
  21828. }
  21829. },
  21830. "required": ["type"],
  21831. "additionalProperties": false
  21832. }
  21833. ]
  21834. }
  21835. },
  21836. "required": ["type", "url"],
  21837. "additionalProperties": false
  21838. },
  21839. {
  21840. "type": "object",
  21841. "properties": {
  21842. "type": {
  21843. "type": "string",
  21844. "enum": ["anthropic/messages"]
  21845. },
  21846. "url": {
  21847. "type": "string"
  21848. }
  21849. },
  21850. "required": ["type", "url"],
  21851. "additionalProperties": false
  21852. },
  21853. {
  21854. "type": "object",
  21855. "properties": {
  21856. "type": {
  21857. "type": "string",
  21858. "enum": ["aisdk"]
  21859. },
  21860. "package": {
  21861. "type": "string"
  21862. },
  21863. "url": {
  21864. "type": "string"
  21865. }
  21866. },
  21867. "required": ["type", "package"],
  21868. "additionalProperties": false
  21869. }
  21870. ]
  21871. },
  21872. "capabilities": {
  21873. "type": "object",
  21874. "properties": {
  21875. "tools": {
  21876. "type": "boolean"
  21877. },
  21878. "input": {
  21879. "type": "array",
  21880. "items": {
  21881. "type": "string"
  21882. }
  21883. },
  21884. "output": {
  21885. "type": "array",
  21886. "items": {
  21887. "type": "string"
  21888. }
  21889. }
  21890. },
  21891. "required": ["tools", "input", "output"],
  21892. "additionalProperties": false
  21893. },
  21894. "options": {
  21895. "type": "object",
  21896. "properties": {
  21897. "headers": {
  21898. "type": "object",
  21899. "additionalProperties": {
  21900. "type": "string"
  21901. }
  21902. },
  21903. "body": {
  21904. "type": "object"
  21905. },
  21906. "aisdk": {
  21907. "type": "object",
  21908. "properties": {
  21909. "provider": {
  21910. "type": "object"
  21911. },
  21912. "request": {
  21913. "type": "object"
  21914. }
  21915. },
  21916. "required": ["provider", "request"],
  21917. "additionalProperties": false
  21918. },
  21919. "variant": {
  21920. "type": "string"
  21921. }
  21922. },
  21923. "required": ["headers", "body", "aisdk"],
  21924. "additionalProperties": false
  21925. },
  21926. "variants": {
  21927. "type": "array",
  21928. "items": {
  21929. "type": "object",
  21930. "properties": {
  21931. "id": {
  21932. "type": "string"
  21933. },
  21934. "headers": {
  21935. "type": "object",
  21936. "additionalProperties": {
  21937. "type": "string"
  21938. }
  21939. },
  21940. "body": {
  21941. "type": "object"
  21942. },
  21943. "aisdk": {
  21944. "type": "object",
  21945. "properties": {
  21946. "provider": {
  21947. "type": "object"
  21948. },
  21949. "request": {
  21950. "type": "object"
  21951. }
  21952. },
  21953. "required": ["provider", "request"],
  21954. "additionalProperties": false
  21955. }
  21956. },
  21957. "required": ["id", "headers", "body", "aisdk"],
  21958. "additionalProperties": false
  21959. }
  21960. },
  21961. "time": {
  21962. "type": "object",
  21963. "properties": {
  21964. "released": {
  21965. "anyOf": [
  21966. {
  21967. "type": "number"
  21968. },
  21969. {
  21970. "type": "string",
  21971. "enum": ["NaN"]
  21972. },
  21973. {
  21974. "type": "string",
  21975. "enum": ["Infinity"]
  21976. },
  21977. {
  21978. "type": "string",
  21979. "enum": ["-Infinity"]
  21980. }
  21981. ]
  21982. }
  21983. },
  21984. "required": ["released"],
  21985. "additionalProperties": false
  21986. },
  21987. "cost": {
  21988. "type": "array",
  21989. "items": {
  21990. "type": "object",
  21991. "properties": {
  21992. "tier": {
  21993. "type": "object",
  21994. "properties": {
  21995. "type": {
  21996. "type": "string",
  21997. "enum": ["context"]
  21998. },
  21999. "size": {
  22000. "type": "integer"
  22001. }
  22002. },
  22003. "required": ["type", "size"],
  22004. "additionalProperties": false
  22005. },
  22006. "input": {
  22007. "type": "number"
  22008. },
  22009. "output": {
  22010. "type": "number"
  22011. },
  22012. "cache": {
  22013. "type": "object",
  22014. "properties": {
  22015. "read": {
  22016. "type": "number"
  22017. },
  22018. "write": {
  22019. "type": "number"
  22020. }
  22021. },
  22022. "required": ["read", "write"],
  22023. "additionalProperties": false
  22024. }
  22025. },
  22026. "required": ["input", "output", "cache"],
  22027. "additionalProperties": false
  22028. }
  22029. },
  22030. "status": {
  22031. "type": "string",
  22032. "enum": ["alpha", "beta", "deprecated", "active"]
  22033. },
  22034. "enabled": {
  22035. "type": "boolean"
  22036. },
  22037. "limit": {
  22038. "type": "object",
  22039. "properties": {
  22040. "context": {
  22041. "type": "integer"
  22042. },
  22043. "input": {
  22044. "type": "integer"
  22045. },
  22046. "output": {
  22047. "type": "integer"
  22048. }
  22049. },
  22050. "required": ["context", "output"],
  22051. "additionalProperties": false
  22052. }
  22053. },
  22054. "required": [
  22055. "id",
  22056. "apiID",
  22057. "providerID",
  22058. "name",
  22059. "endpoint",
  22060. "capabilities",
  22061. "options",
  22062. "variants",
  22063. "time",
  22064. "cost",
  22065. "status",
  22066. "enabled",
  22067. "limit"
  22068. ],
  22069. "additionalProperties": false
  22070. },
  22071. "BadRequestError": {
  22072. "type": "object",
  22073. "required": ["name", "data"],
  22074. "properties": {
  22075. "name": {
  22076. "type": "string",
  22077. "enum": ["BadRequest"]
  22078. },
  22079. "data": {
  22080. "type": "object",
  22081. "required": ["message"],
  22082. "properties": {
  22083. "message": {
  22084. "type": "string"
  22085. },
  22086. "kind": {
  22087. "type": "string",
  22088. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  22089. }
  22090. }
  22091. }
  22092. }
  22093. }
  22094. }
  22095. },
  22096. "security": [],
  22097. "tags": [
  22098. {
  22099. "name": "control",
  22100. "description": "Control plane routes."
  22101. },
  22102. {
  22103. "name": "global",
  22104. "description": "Global server routes."
  22105. },
  22106. {
  22107. "name": "event",
  22108. "description": "Instance event stream route."
  22109. },
  22110. {
  22111. "name": "config",
  22112. "description": "Experimental HttpApi config routes."
  22113. },
  22114. {
  22115. "name": "experimental",
  22116. "description": "Experimental HttpApi read-only routes."
  22117. },
  22118. {
  22119. "name": "file",
  22120. "description": "Experimental HttpApi file routes."
  22121. },
  22122. {
  22123. "name": "instance",
  22124. "description": "Experimental HttpApi instance read routes."
  22125. },
  22126. {
  22127. "name": "mcp",
  22128. "description": "Experimental HttpApi MCP routes."
  22129. },
  22130. {
  22131. "name": "project",
  22132. "description": "Experimental HttpApi project routes."
  22133. },
  22134. {
  22135. "name": "pty",
  22136. "description": "Experimental HttpApi PTY routes."
  22137. },
  22138. {
  22139. "name": "question",
  22140. "description": "Question routes."
  22141. },
  22142. {
  22143. "name": "permission",
  22144. "description": "Experimental HttpApi permission routes."
  22145. },
  22146. {
  22147. "name": "provider",
  22148. "description": "Experimental HttpApi provider routes."
  22149. },
  22150. {
  22151. "name": "session",
  22152. "description": "Experimental HttpApi session routes."
  22153. },
  22154. {
  22155. "name": "sync",
  22156. "description": "Experimental HttpApi sync routes."
  22157. },
  22158. {
  22159. "name": "v2",
  22160. "description": "Experimental v2 routes."
  22161. },
  22162. {
  22163. "name": "v2 messages",
  22164. "description": "Experimental v2 message routes."
  22165. },
  22166. {
  22167. "name": "v2 models",
  22168. "description": "Experimental v2 model routes."
  22169. },
  22170. {
  22171. "name": "v2 providers",
  22172. "description": "Experimental v2 provider routes."
  22173. },
  22174. {
  22175. "name": "tui",
  22176. "description": "Experimental HttpApi TUI routes."
  22177. },
  22178. {
  22179. "name": "workspace",
  22180. "description": "Experimental HttpApi workspace routes."
  22181. },
  22182. {
  22183. "name": "pty",
  22184. "description": "PTY websocket route."
  22185. }
  22186. ]
  22187. }