openapi.json 775 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440
  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. "/experimental/control-plane/move-session": {
  216. "post": {
  217. "tags": ["controlPlane"],
  218. "operationId": "experimental.controlPlane.moveSession",
  219. "parameters": [],
  220. "responses": {
  221. "204": {
  222. "description": "Session moved"
  223. },
  224. "400": {
  225. "description": "MoveSessionError | InvalidRequestError",
  226. "content": {
  227. "application/json": {
  228. "schema": {
  229. "anyOf": [
  230. {
  231. "$ref": "#/components/schemas/MoveSessionError"
  232. },
  233. {
  234. "$ref": "#/components/schemas/InvalidRequestError"
  235. }
  236. ]
  237. }
  238. }
  239. }
  240. }
  241. },
  242. "description": "Move a session to another project directory, optionally transferring local changes.",
  243. "summary": "Move session",
  244. "requestBody": {
  245. "content": {
  246. "application/json": {
  247. "schema": {
  248. "type": "object",
  249. "properties": {
  250. "sessionID": {
  251. "type": "string",
  252. "pattern": "^ses"
  253. },
  254. "destination": {
  255. "$ref": "#/components/schemas/MoveSessionDestination"
  256. },
  257. "moveChanges": {
  258. "type": "boolean"
  259. }
  260. },
  261. "required": ["sessionID", "destination"],
  262. "additionalProperties": false
  263. }
  264. }
  265. }
  266. },
  267. "x-codeSamples": [
  268. {
  269. "lang": "js",
  270. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.controlPlane.moveSession({\n ...\n})"
  271. }
  272. ]
  273. }
  274. },
  275. "/global/health": {
  276. "get": {
  277. "tags": ["global"],
  278. "operationId": "global.health",
  279. "parameters": [],
  280. "responses": {
  281. "200": {
  282. "description": "Health information",
  283. "content": {
  284. "application/json": {
  285. "schema": {
  286. "type": "object",
  287. "properties": {
  288. "healthy": {
  289. "type": "boolean",
  290. "enum": [true]
  291. },
  292. "version": {
  293. "type": "string"
  294. }
  295. },
  296. "required": ["healthy", "version"],
  297. "additionalProperties": false,
  298. "description": "Health information"
  299. }
  300. }
  301. }
  302. },
  303. "400": {
  304. "description": "Bad request",
  305. "content": {
  306. "application/json": {
  307. "schema": {
  308. "$ref": "#/components/schemas/BadRequestError"
  309. }
  310. }
  311. }
  312. }
  313. },
  314. "description": "Get health information about the OpenCode server.",
  315. "summary": "Get health",
  316. "x-codeSamples": [
  317. {
  318. "lang": "js",
  319. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  320. }
  321. ]
  322. }
  323. },
  324. "/global/event": {
  325. "get": {
  326. "tags": ["global"],
  327. "operationId": "global.event",
  328. "parameters": [],
  329. "responses": {
  330. "200": {
  331. "description": "Event stream",
  332. "content": {
  333. "text/event-stream": {
  334. "schema": {
  335. "$ref": "#/components/schemas/GlobalEvent"
  336. }
  337. }
  338. }
  339. },
  340. "400": {
  341. "description": "Bad request",
  342. "content": {
  343. "application/json": {
  344. "schema": {
  345. "$ref": "#/components/schemas/BadRequestError"
  346. }
  347. }
  348. }
  349. }
  350. },
  351. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  352. "summary": "Get global events",
  353. "x-codeSamples": [
  354. {
  355. "lang": "js",
  356. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  357. }
  358. ]
  359. }
  360. },
  361. "/global/config": {
  362. "get": {
  363. "tags": ["global"],
  364. "operationId": "global.config.get",
  365. "parameters": [],
  366. "responses": {
  367. "200": {
  368. "description": "Get global config info",
  369. "content": {
  370. "application/json": {
  371. "schema": {
  372. "$ref": "#/components/schemas/Config"
  373. }
  374. }
  375. }
  376. },
  377. "400": {
  378. "description": "Bad request",
  379. "content": {
  380. "application/json": {
  381. "schema": {
  382. "$ref": "#/components/schemas/BadRequestError"
  383. }
  384. }
  385. }
  386. }
  387. },
  388. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  389. "summary": "Get global configuration",
  390. "x-codeSamples": [
  391. {
  392. "lang": "js",
  393. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  394. }
  395. ]
  396. },
  397. "patch": {
  398. "tags": ["global"],
  399. "operationId": "global.config.update",
  400. "parameters": [],
  401. "responses": {
  402. "200": {
  403. "description": "Successfully updated global config",
  404. "content": {
  405. "application/json": {
  406. "schema": {
  407. "$ref": "#/components/schemas/Config"
  408. }
  409. }
  410. }
  411. },
  412. "400": {
  413. "description": "BadRequest | InvalidRequestError",
  414. "content": {
  415. "application/json": {
  416. "schema": {
  417. "anyOf": [
  418. {
  419. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  420. },
  421. {
  422. "$ref": "#/components/schemas/InvalidRequestError"
  423. }
  424. ]
  425. }
  426. }
  427. }
  428. }
  429. },
  430. "description": "Update global OpenCode configuration settings and preferences.",
  431. "summary": "Update global configuration",
  432. "requestBody": {
  433. "content": {
  434. "application/json": {
  435. "schema": {
  436. "$ref": "#/components/schemas/Config"
  437. }
  438. }
  439. }
  440. },
  441. "x-codeSamples": [
  442. {
  443. "lang": "js",
  444. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  445. }
  446. ]
  447. }
  448. },
  449. "/global/dispose": {
  450. "post": {
  451. "tags": ["global"],
  452. "operationId": "global.dispose",
  453. "parameters": [],
  454. "responses": {
  455. "200": {
  456. "description": "Global disposed",
  457. "content": {
  458. "application/json": {
  459. "schema": {
  460. "type": "boolean",
  461. "description": "Global disposed"
  462. }
  463. }
  464. }
  465. },
  466. "400": {
  467. "description": "Bad request",
  468. "content": {
  469. "application/json": {
  470. "schema": {
  471. "$ref": "#/components/schemas/BadRequestError"
  472. }
  473. }
  474. }
  475. }
  476. },
  477. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  478. "summary": "Dispose instance",
  479. "x-codeSamples": [
  480. {
  481. "lang": "js",
  482. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  483. }
  484. ]
  485. }
  486. },
  487. "/global/upgrade": {
  488. "post": {
  489. "tags": ["global"],
  490. "operationId": "global.upgrade",
  491. "parameters": [],
  492. "responses": {
  493. "200": {
  494. "description": "Upgrade result",
  495. "content": {
  496. "application/json": {
  497. "schema": {
  498. "anyOf": [
  499. {
  500. "type": "object",
  501. "properties": {
  502. "success": {
  503. "type": "boolean",
  504. "enum": [true]
  505. },
  506. "version": {
  507. "type": "string"
  508. }
  509. },
  510. "required": ["success", "version"],
  511. "additionalProperties": false
  512. },
  513. {
  514. "type": "object",
  515. "properties": {
  516. "success": {
  517. "type": "boolean",
  518. "enum": [false]
  519. },
  520. "error": {
  521. "type": "string"
  522. }
  523. },
  524. "required": ["success", "error"],
  525. "additionalProperties": false
  526. }
  527. ],
  528. "description": "Upgrade result"
  529. }
  530. }
  531. }
  532. },
  533. "400": {
  534. "description": "BadRequest | InvalidRequestError",
  535. "content": {
  536. "application/json": {
  537. "schema": {
  538. "anyOf": [
  539. {
  540. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  541. },
  542. {
  543. "$ref": "#/components/schemas/InvalidRequestError"
  544. }
  545. ]
  546. }
  547. }
  548. }
  549. }
  550. },
  551. "description": "Upgrade opencode to the specified version or latest if not specified.",
  552. "summary": "Upgrade opencode",
  553. "requestBody": {
  554. "content": {
  555. "application/json": {
  556. "schema": {
  557. "type": "object",
  558. "properties": {
  559. "target": {
  560. "type": "string"
  561. }
  562. },
  563. "additionalProperties": false
  564. }
  565. }
  566. }
  567. },
  568. "x-codeSamples": [
  569. {
  570. "lang": "js",
  571. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  572. }
  573. ]
  574. }
  575. },
  576. "/event": {
  577. "get": {
  578. "tags": ["event"],
  579. "operationId": "event.subscribe",
  580. "parameters": [
  581. {
  582. "name": "directory",
  583. "in": "query",
  584. "schema": {
  585. "type": "string"
  586. },
  587. "required": false
  588. },
  589. {
  590. "name": "workspace",
  591. "in": "query",
  592. "schema": {
  593. "type": "string"
  594. },
  595. "required": false
  596. }
  597. ],
  598. "responses": {
  599. "200": {
  600. "description": "Event stream",
  601. "content": {
  602. "text/event-stream": {
  603. "schema": {
  604. "$ref": "#/components/schemas/Event"
  605. }
  606. }
  607. }
  608. }
  609. },
  610. "description": "Get events",
  611. "summary": "Subscribe to events",
  612. "x-codeSamples": [
  613. {
  614. "lang": "js",
  615. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  616. }
  617. ]
  618. }
  619. },
  620. "/config": {
  621. "get": {
  622. "tags": ["config"],
  623. "operationId": "config.get",
  624. "parameters": [
  625. {
  626. "name": "directory",
  627. "in": "query",
  628. "schema": {
  629. "type": "string"
  630. },
  631. "required": false
  632. },
  633. {
  634. "name": "workspace",
  635. "in": "query",
  636. "schema": {
  637. "type": "string"
  638. },
  639. "required": false
  640. }
  641. ],
  642. "responses": {
  643. "200": {
  644. "description": "Get config info",
  645. "content": {
  646. "application/json": {
  647. "schema": {
  648. "$ref": "#/components/schemas/Config"
  649. }
  650. }
  651. }
  652. },
  653. "400": {
  654. "description": "Bad request",
  655. "content": {
  656. "application/json": {
  657. "schema": {
  658. "$ref": "#/components/schemas/BadRequestError"
  659. }
  660. }
  661. }
  662. }
  663. },
  664. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  665. "summary": "Get configuration",
  666. "x-codeSamples": [
  667. {
  668. "lang": "js",
  669. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  670. }
  671. ]
  672. },
  673. "patch": {
  674. "tags": ["config"],
  675. "operationId": "config.update",
  676. "parameters": [
  677. {
  678. "name": "directory",
  679. "in": "query",
  680. "schema": {
  681. "type": "string"
  682. },
  683. "required": false
  684. },
  685. {
  686. "name": "workspace",
  687. "in": "query",
  688. "schema": {
  689. "type": "string"
  690. },
  691. "required": false
  692. }
  693. ],
  694. "responses": {
  695. "200": {
  696. "description": "Successfully updated config",
  697. "content": {
  698. "application/json": {
  699. "schema": {
  700. "$ref": "#/components/schemas/Config"
  701. }
  702. }
  703. }
  704. },
  705. "400": {
  706. "description": "BadRequest | InvalidRequestError",
  707. "content": {
  708. "application/json": {
  709. "schema": {
  710. "anyOf": [
  711. {
  712. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  713. },
  714. {
  715. "$ref": "#/components/schemas/InvalidRequestError"
  716. }
  717. ]
  718. }
  719. }
  720. }
  721. }
  722. },
  723. "description": "Update OpenCode configuration settings and preferences.",
  724. "summary": "Update configuration",
  725. "requestBody": {
  726. "content": {
  727. "application/json": {
  728. "schema": {
  729. "$ref": "#/components/schemas/Config"
  730. }
  731. }
  732. }
  733. },
  734. "x-codeSamples": [
  735. {
  736. "lang": "js",
  737. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  738. }
  739. ]
  740. }
  741. },
  742. "/config/providers": {
  743. "get": {
  744. "tags": ["config"],
  745. "operationId": "config.providers",
  746. "parameters": [
  747. {
  748. "name": "directory",
  749. "in": "query",
  750. "schema": {
  751. "type": "string"
  752. },
  753. "required": false
  754. },
  755. {
  756. "name": "workspace",
  757. "in": "query",
  758. "schema": {
  759. "type": "string"
  760. },
  761. "required": false
  762. }
  763. ],
  764. "responses": {
  765. "200": {
  766. "description": "List of providers",
  767. "content": {
  768. "application/json": {
  769. "schema": {
  770. "type": "object",
  771. "properties": {
  772. "providers": {
  773. "type": "array",
  774. "items": {
  775. "$ref": "#/components/schemas/Provider"
  776. }
  777. },
  778. "default": {
  779. "type": "object",
  780. "additionalProperties": {
  781. "type": "string"
  782. }
  783. }
  784. },
  785. "required": ["providers", "default"],
  786. "additionalProperties": false,
  787. "description": "List of providers"
  788. }
  789. }
  790. }
  791. },
  792. "400": {
  793. "description": "Bad request",
  794. "content": {
  795. "application/json": {
  796. "schema": {
  797. "$ref": "#/components/schemas/BadRequestError"
  798. }
  799. }
  800. }
  801. }
  802. },
  803. "description": "Get a list of all configured AI providers and their default models.",
  804. "summary": "List config providers",
  805. "x-codeSamples": [
  806. {
  807. "lang": "js",
  808. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  809. }
  810. ]
  811. }
  812. },
  813. "/experimental/console": {
  814. "get": {
  815. "tags": ["experimental"],
  816. "operationId": "experimental.console.get",
  817. "parameters": [
  818. {
  819. "name": "directory",
  820. "in": "query",
  821. "schema": {
  822. "type": "string"
  823. },
  824. "required": false
  825. },
  826. {
  827. "name": "workspace",
  828. "in": "query",
  829. "schema": {
  830. "type": "string"
  831. },
  832. "required": false
  833. }
  834. ],
  835. "responses": {
  836. "200": {
  837. "description": "Active Console provider metadata",
  838. "content": {
  839. "application/json": {
  840. "schema": {
  841. "$ref": "#/components/schemas/ConsoleState"
  842. }
  843. }
  844. }
  845. },
  846. "400": {
  847. "description": "Bad request",
  848. "content": {
  849. "application/json": {
  850. "schema": {
  851. "$ref": "#/components/schemas/BadRequestError"
  852. }
  853. }
  854. }
  855. },
  856. "500": {
  857. "description": "InternalServerError",
  858. "content": {
  859. "application/json": {
  860. "schema": {
  861. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  862. }
  863. }
  864. }
  865. }
  866. },
  867. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  868. "summary": "Get active Console provider metadata",
  869. "x-codeSamples": [
  870. {
  871. "lang": "js",
  872. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  873. }
  874. ]
  875. }
  876. },
  877. "/experimental/console/orgs": {
  878. "get": {
  879. "tags": ["experimental"],
  880. "operationId": "experimental.console.listOrgs",
  881. "parameters": [
  882. {
  883. "name": "directory",
  884. "in": "query",
  885. "schema": {
  886. "type": "string"
  887. },
  888. "required": false
  889. },
  890. {
  891. "name": "workspace",
  892. "in": "query",
  893. "schema": {
  894. "type": "string"
  895. },
  896. "required": false
  897. }
  898. ],
  899. "responses": {
  900. "200": {
  901. "description": "Switchable Console orgs",
  902. "content": {
  903. "application/json": {
  904. "schema": {
  905. "type": "object",
  906. "properties": {
  907. "orgs": {
  908. "type": "array",
  909. "items": {
  910. "type": "object",
  911. "properties": {
  912. "accountID": {
  913. "type": "string"
  914. },
  915. "accountEmail": {
  916. "type": "string"
  917. },
  918. "accountUrl": {
  919. "type": "string"
  920. },
  921. "orgID": {
  922. "type": "string"
  923. },
  924. "orgName": {
  925. "type": "string"
  926. },
  927. "active": {
  928. "type": "boolean"
  929. }
  930. },
  931. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  932. "additionalProperties": false
  933. }
  934. }
  935. },
  936. "required": ["orgs"],
  937. "additionalProperties": false,
  938. "description": "Switchable Console orgs"
  939. }
  940. }
  941. }
  942. },
  943. "400": {
  944. "description": "Bad request",
  945. "content": {
  946. "application/json": {
  947. "schema": {
  948. "$ref": "#/components/schemas/BadRequestError"
  949. }
  950. }
  951. }
  952. },
  953. "500": {
  954. "description": "InternalServerError",
  955. "content": {
  956. "application/json": {
  957. "schema": {
  958. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  959. }
  960. }
  961. }
  962. }
  963. },
  964. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  965. "summary": "List switchable Console orgs",
  966. "x-codeSamples": [
  967. {
  968. "lang": "js",
  969. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  970. }
  971. ]
  972. }
  973. },
  974. "/experimental/console/switch": {
  975. "post": {
  976. "tags": ["experimental"],
  977. "operationId": "experimental.console.switchOrg",
  978. "parameters": [
  979. {
  980. "name": "directory",
  981. "in": "query",
  982. "schema": {
  983. "type": "string"
  984. },
  985. "required": false
  986. },
  987. {
  988. "name": "workspace",
  989. "in": "query",
  990. "schema": {
  991. "type": "string"
  992. },
  993. "required": false
  994. }
  995. ],
  996. "responses": {
  997. "200": {
  998. "description": "Switch success",
  999. "content": {
  1000. "application/json": {
  1001. "schema": {
  1002. "type": "boolean",
  1003. "description": "Switch success"
  1004. }
  1005. }
  1006. }
  1007. }
  1008. },
  1009. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  1010. "summary": "Switch active Console org",
  1011. "requestBody": {
  1012. "content": {
  1013. "application/json": {
  1014. "schema": {
  1015. "type": "object",
  1016. "properties": {
  1017. "accountID": {
  1018. "type": "string"
  1019. },
  1020. "orgID": {
  1021. "type": "string"
  1022. }
  1023. },
  1024. "required": ["accountID", "orgID"],
  1025. "additionalProperties": false
  1026. }
  1027. }
  1028. }
  1029. },
  1030. "x-codeSamples": [
  1031. {
  1032. "lang": "js",
  1033. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  1034. }
  1035. ]
  1036. }
  1037. },
  1038. "/experimental/tool": {
  1039. "get": {
  1040. "tags": ["experimental"],
  1041. "operationId": "tool.list",
  1042. "parameters": [
  1043. {
  1044. "name": "directory",
  1045. "in": "query",
  1046. "schema": {
  1047. "type": "string"
  1048. },
  1049. "required": false
  1050. },
  1051. {
  1052. "name": "workspace",
  1053. "in": "query",
  1054. "schema": {
  1055. "type": "string"
  1056. },
  1057. "required": false
  1058. },
  1059. {
  1060. "name": "provider",
  1061. "in": "query",
  1062. "schema": {
  1063. "type": "string"
  1064. },
  1065. "required": true
  1066. },
  1067. {
  1068. "name": "model",
  1069. "in": "query",
  1070. "schema": {
  1071. "type": "string"
  1072. },
  1073. "required": true
  1074. }
  1075. ],
  1076. "responses": {
  1077. "200": {
  1078. "description": "Tools",
  1079. "content": {
  1080. "application/json": {
  1081. "schema": {
  1082. "$ref": "#/components/schemas/ToolList"
  1083. }
  1084. }
  1085. }
  1086. },
  1087. "400": {
  1088. "description": "BadRequest | InvalidRequestError",
  1089. "content": {
  1090. "application/json": {
  1091. "schema": {
  1092. "anyOf": [
  1093. {
  1094. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1095. },
  1096. {
  1097. "$ref": "#/components/schemas/InvalidRequestError"
  1098. }
  1099. ]
  1100. }
  1101. }
  1102. }
  1103. }
  1104. },
  1105. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1106. "summary": "List tools",
  1107. "x-codeSamples": [
  1108. {
  1109. "lang": "js",
  1110. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1111. }
  1112. ]
  1113. }
  1114. },
  1115. "/experimental/tool/ids": {
  1116. "get": {
  1117. "tags": ["experimental"],
  1118. "operationId": "tool.ids",
  1119. "parameters": [
  1120. {
  1121. "name": "directory",
  1122. "in": "query",
  1123. "schema": {
  1124. "type": "string"
  1125. },
  1126. "required": false
  1127. },
  1128. {
  1129. "name": "workspace",
  1130. "in": "query",
  1131. "schema": {
  1132. "type": "string"
  1133. },
  1134. "required": false
  1135. }
  1136. ],
  1137. "responses": {
  1138. "200": {
  1139. "description": "Tool IDs",
  1140. "content": {
  1141. "application/json": {
  1142. "schema": {
  1143. "$ref": "#/components/schemas/ToolIDs"
  1144. }
  1145. }
  1146. }
  1147. },
  1148. "400": {
  1149. "description": "BadRequest | InvalidRequestError",
  1150. "content": {
  1151. "application/json": {
  1152. "schema": {
  1153. "anyOf": [
  1154. {
  1155. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1156. },
  1157. {
  1158. "$ref": "#/components/schemas/InvalidRequestError"
  1159. }
  1160. ]
  1161. }
  1162. }
  1163. }
  1164. }
  1165. },
  1166. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1167. "summary": "List tool IDs",
  1168. "x-codeSamples": [
  1169. {
  1170. "lang": "js",
  1171. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1172. }
  1173. ]
  1174. }
  1175. },
  1176. "/experimental/worktree": {
  1177. "get": {
  1178. "tags": ["experimental"],
  1179. "operationId": "worktree.list",
  1180. "parameters": [
  1181. {
  1182. "name": "directory",
  1183. "in": "query",
  1184. "schema": {
  1185. "type": "string"
  1186. },
  1187. "required": false
  1188. },
  1189. {
  1190. "name": "workspace",
  1191. "in": "query",
  1192. "schema": {
  1193. "type": "string"
  1194. },
  1195. "required": false
  1196. }
  1197. ],
  1198. "responses": {
  1199. "200": {
  1200. "description": "List of worktree directories",
  1201. "content": {
  1202. "application/json": {
  1203. "schema": {
  1204. "type": "array",
  1205. "items": {
  1206. "type": "string"
  1207. },
  1208. "description": "List of worktree directories"
  1209. }
  1210. }
  1211. }
  1212. },
  1213. "400": {
  1214. "description": "WorktreeError | InvalidRequestError",
  1215. "content": {
  1216. "application/json": {
  1217. "schema": {
  1218. "anyOf": [
  1219. {
  1220. "$ref": "#/components/schemas/WorktreeError"
  1221. },
  1222. {
  1223. "$ref": "#/components/schemas/InvalidRequestError"
  1224. }
  1225. ]
  1226. }
  1227. }
  1228. }
  1229. }
  1230. },
  1231. "description": "List all sandbox worktrees for the current project.",
  1232. "summary": "List worktrees",
  1233. "x-codeSamples": [
  1234. {
  1235. "lang": "js",
  1236. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1237. }
  1238. ]
  1239. },
  1240. "post": {
  1241. "tags": ["experimental"],
  1242. "operationId": "worktree.create",
  1243. "parameters": [
  1244. {
  1245. "name": "directory",
  1246. "in": "query",
  1247. "schema": {
  1248. "type": "string"
  1249. },
  1250. "required": false
  1251. },
  1252. {
  1253. "name": "workspace",
  1254. "in": "query",
  1255. "schema": {
  1256. "type": "string"
  1257. },
  1258. "required": false
  1259. }
  1260. ],
  1261. "responses": {
  1262. "200": {
  1263. "description": "Worktree created",
  1264. "content": {
  1265. "application/json": {
  1266. "schema": {
  1267. "$ref": "#/components/schemas/Worktree"
  1268. }
  1269. }
  1270. }
  1271. },
  1272. "400": {
  1273. "description": "WorktreeError | InvalidRequestError",
  1274. "content": {
  1275. "application/json": {
  1276. "schema": {
  1277. "anyOf": [
  1278. {
  1279. "$ref": "#/components/schemas/WorktreeError"
  1280. },
  1281. {
  1282. "$ref": "#/components/schemas/InvalidRequestError"
  1283. }
  1284. ]
  1285. }
  1286. }
  1287. }
  1288. }
  1289. },
  1290. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1291. "summary": "Create worktree",
  1292. "requestBody": {
  1293. "content": {
  1294. "application/json": {
  1295. "schema": {
  1296. "$ref": "#/components/schemas/WorktreeCreateInput"
  1297. }
  1298. }
  1299. }
  1300. },
  1301. "x-codeSamples": [
  1302. {
  1303. "lang": "js",
  1304. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1305. }
  1306. ]
  1307. },
  1308. "delete": {
  1309. "tags": ["experimental"],
  1310. "operationId": "worktree.remove",
  1311. "parameters": [
  1312. {
  1313. "name": "directory",
  1314. "in": "query",
  1315. "schema": {
  1316. "type": "string"
  1317. },
  1318. "required": false
  1319. },
  1320. {
  1321. "name": "workspace",
  1322. "in": "query",
  1323. "schema": {
  1324. "type": "string"
  1325. },
  1326. "required": false
  1327. }
  1328. ],
  1329. "responses": {
  1330. "200": {
  1331. "description": "Worktree removed",
  1332. "content": {
  1333. "application/json": {
  1334. "schema": {
  1335. "type": "boolean",
  1336. "description": "Worktree removed"
  1337. }
  1338. }
  1339. }
  1340. },
  1341. "400": {
  1342. "description": "WorktreeError | InvalidRequestError",
  1343. "content": {
  1344. "application/json": {
  1345. "schema": {
  1346. "anyOf": [
  1347. {
  1348. "$ref": "#/components/schemas/WorktreeError"
  1349. },
  1350. {
  1351. "$ref": "#/components/schemas/InvalidRequestError"
  1352. }
  1353. ]
  1354. }
  1355. }
  1356. }
  1357. }
  1358. },
  1359. "description": "Remove a git worktree and delete its branch.",
  1360. "summary": "Remove worktree",
  1361. "requestBody": {
  1362. "content": {
  1363. "application/json": {
  1364. "schema": {
  1365. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1366. }
  1367. }
  1368. }
  1369. },
  1370. "x-codeSamples": [
  1371. {
  1372. "lang": "js",
  1373. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1374. }
  1375. ]
  1376. }
  1377. },
  1378. "/experimental/worktree/reset": {
  1379. "post": {
  1380. "tags": ["experimental"],
  1381. "operationId": "worktree.reset",
  1382. "parameters": [
  1383. {
  1384. "name": "directory",
  1385. "in": "query",
  1386. "schema": {
  1387. "type": "string"
  1388. },
  1389. "required": false
  1390. },
  1391. {
  1392. "name": "workspace",
  1393. "in": "query",
  1394. "schema": {
  1395. "type": "string"
  1396. },
  1397. "required": false
  1398. }
  1399. ],
  1400. "responses": {
  1401. "200": {
  1402. "description": "Worktree reset",
  1403. "content": {
  1404. "application/json": {
  1405. "schema": {
  1406. "type": "boolean",
  1407. "description": "Worktree reset"
  1408. }
  1409. }
  1410. }
  1411. },
  1412. "400": {
  1413. "description": "WorktreeError | InvalidRequestError",
  1414. "content": {
  1415. "application/json": {
  1416. "schema": {
  1417. "anyOf": [
  1418. {
  1419. "$ref": "#/components/schemas/WorktreeError"
  1420. },
  1421. {
  1422. "$ref": "#/components/schemas/InvalidRequestError"
  1423. }
  1424. ]
  1425. }
  1426. }
  1427. }
  1428. }
  1429. },
  1430. "description": "Reset a worktree branch to the primary default branch.",
  1431. "summary": "Reset worktree",
  1432. "requestBody": {
  1433. "content": {
  1434. "application/json": {
  1435. "schema": {
  1436. "$ref": "#/components/schemas/WorktreeResetInput"
  1437. }
  1438. }
  1439. }
  1440. },
  1441. "x-codeSamples": [
  1442. {
  1443. "lang": "js",
  1444. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1445. }
  1446. ]
  1447. }
  1448. },
  1449. "/experimental/session": {
  1450. "get": {
  1451. "tags": ["experimental"],
  1452. "operationId": "experimental.session.list",
  1453. "parameters": [
  1454. {
  1455. "name": "directory",
  1456. "in": "query",
  1457. "schema": {
  1458. "type": "string"
  1459. },
  1460. "required": false
  1461. },
  1462. {
  1463. "name": "workspace",
  1464. "in": "query",
  1465. "schema": {
  1466. "type": "string"
  1467. },
  1468. "required": false
  1469. },
  1470. {
  1471. "name": "roots",
  1472. "in": "query",
  1473. "schema": {
  1474. "anyOf": [
  1475. {
  1476. "type": "boolean"
  1477. },
  1478. {
  1479. "type": "string",
  1480. "enum": ["true", "false"]
  1481. }
  1482. ]
  1483. },
  1484. "required": false
  1485. },
  1486. {
  1487. "name": "start",
  1488. "in": "query",
  1489. "schema": {
  1490. "type": "number"
  1491. },
  1492. "required": false
  1493. },
  1494. {
  1495. "name": "cursor",
  1496. "in": "query",
  1497. "schema": {
  1498. "type": "number"
  1499. },
  1500. "required": false
  1501. },
  1502. {
  1503. "name": "search",
  1504. "in": "query",
  1505. "schema": {
  1506. "type": "string"
  1507. },
  1508. "required": false
  1509. },
  1510. {
  1511. "name": "limit",
  1512. "in": "query",
  1513. "schema": {
  1514. "type": "number"
  1515. },
  1516. "required": false
  1517. },
  1518. {
  1519. "name": "archived",
  1520. "in": "query",
  1521. "schema": {
  1522. "anyOf": [
  1523. {
  1524. "type": "boolean"
  1525. },
  1526. {
  1527. "type": "string",
  1528. "enum": ["true", "false"]
  1529. }
  1530. ]
  1531. },
  1532. "required": false
  1533. }
  1534. ],
  1535. "responses": {
  1536. "200": {
  1537. "description": "List of sessions",
  1538. "content": {
  1539. "application/json": {
  1540. "schema": {
  1541. "type": "array",
  1542. "items": {
  1543. "$ref": "#/components/schemas/GlobalSession"
  1544. },
  1545. "description": "List of sessions"
  1546. }
  1547. }
  1548. }
  1549. },
  1550. "400": {
  1551. "description": "Bad request",
  1552. "content": {
  1553. "application/json": {
  1554. "schema": {
  1555. "$ref": "#/components/schemas/BadRequestError"
  1556. }
  1557. }
  1558. }
  1559. }
  1560. },
  1561. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1562. "summary": "List sessions",
  1563. "x-codeSamples": [
  1564. {
  1565. "lang": "js",
  1566. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1567. }
  1568. ]
  1569. }
  1570. },
  1571. "/experimental/resource": {
  1572. "get": {
  1573. "tags": ["experimental"],
  1574. "operationId": "experimental.resource.list",
  1575. "parameters": [
  1576. {
  1577. "name": "directory",
  1578. "in": "query",
  1579. "schema": {
  1580. "type": "string"
  1581. },
  1582. "required": false
  1583. },
  1584. {
  1585. "name": "workspace",
  1586. "in": "query",
  1587. "schema": {
  1588. "type": "string"
  1589. },
  1590. "required": false
  1591. }
  1592. ],
  1593. "responses": {
  1594. "200": {
  1595. "description": "MCP resources",
  1596. "content": {
  1597. "application/json": {
  1598. "schema": {
  1599. "type": "object",
  1600. "additionalProperties": {
  1601. "$ref": "#/components/schemas/McpResource"
  1602. },
  1603. "description": "MCP resources"
  1604. }
  1605. }
  1606. }
  1607. },
  1608. "400": {
  1609. "description": "Bad request",
  1610. "content": {
  1611. "application/json": {
  1612. "schema": {
  1613. "$ref": "#/components/schemas/BadRequestError"
  1614. }
  1615. }
  1616. }
  1617. }
  1618. },
  1619. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1620. "summary": "Get MCP resources",
  1621. "x-codeSamples": [
  1622. {
  1623. "lang": "js",
  1624. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1625. }
  1626. ]
  1627. }
  1628. },
  1629. "/find": {
  1630. "get": {
  1631. "tags": ["file"],
  1632. "operationId": "find.text",
  1633. "parameters": [
  1634. {
  1635. "name": "directory",
  1636. "in": "query",
  1637. "schema": {
  1638. "type": "string"
  1639. },
  1640. "required": false
  1641. },
  1642. {
  1643. "name": "workspace",
  1644. "in": "query",
  1645. "schema": {
  1646. "type": "string"
  1647. },
  1648. "required": false
  1649. },
  1650. {
  1651. "name": "pattern",
  1652. "in": "query",
  1653. "schema": {
  1654. "type": "string"
  1655. },
  1656. "required": true
  1657. }
  1658. ],
  1659. "responses": {
  1660. "200": {
  1661. "description": "Matches",
  1662. "content": {
  1663. "application/json": {
  1664. "schema": {
  1665. "type": "array",
  1666. "items": {
  1667. "type": "object",
  1668. "properties": {
  1669. "path": {
  1670. "type": "object",
  1671. "properties": {
  1672. "text": {
  1673. "type": "string"
  1674. }
  1675. },
  1676. "required": ["text"],
  1677. "additionalProperties": false
  1678. },
  1679. "lines": {
  1680. "type": "object",
  1681. "properties": {
  1682. "text": {
  1683. "type": "string"
  1684. }
  1685. },
  1686. "required": ["text"],
  1687. "additionalProperties": false
  1688. },
  1689. "line_number": {
  1690. "type": "integer",
  1691. "minimum": 0
  1692. },
  1693. "absolute_offset": {
  1694. "type": "integer",
  1695. "minimum": 0
  1696. },
  1697. "submatches": {
  1698. "type": "array",
  1699. "items": {
  1700. "type": "object",
  1701. "properties": {
  1702. "match": {
  1703. "type": "object",
  1704. "properties": {
  1705. "text": {
  1706. "type": "string"
  1707. }
  1708. },
  1709. "required": ["text"],
  1710. "additionalProperties": false
  1711. },
  1712. "start": {
  1713. "type": "integer",
  1714. "minimum": 0
  1715. },
  1716. "end": {
  1717. "type": "integer",
  1718. "minimum": 0
  1719. }
  1720. },
  1721. "required": ["match", "start", "end"],
  1722. "additionalProperties": false
  1723. }
  1724. }
  1725. },
  1726. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1727. "additionalProperties": false
  1728. },
  1729. "description": "Matches"
  1730. }
  1731. }
  1732. }
  1733. },
  1734. "400": {
  1735. "description": "Bad request",
  1736. "content": {
  1737. "application/json": {
  1738. "schema": {
  1739. "$ref": "#/components/schemas/BadRequestError"
  1740. }
  1741. }
  1742. }
  1743. }
  1744. },
  1745. "description": "Search for text patterns across files in the project using ripgrep.",
  1746. "summary": "Find text",
  1747. "x-codeSamples": [
  1748. {
  1749. "lang": "js",
  1750. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1751. }
  1752. ]
  1753. }
  1754. },
  1755. "/find/file": {
  1756. "get": {
  1757. "tags": ["file"],
  1758. "operationId": "find.files",
  1759. "parameters": [
  1760. {
  1761. "name": "directory",
  1762. "in": "query",
  1763. "schema": {
  1764. "type": "string"
  1765. },
  1766. "required": false
  1767. },
  1768. {
  1769. "name": "workspace",
  1770. "in": "query",
  1771. "schema": {
  1772. "type": "string"
  1773. },
  1774. "required": false
  1775. },
  1776. {
  1777. "name": "query",
  1778. "in": "query",
  1779. "schema": {
  1780. "type": "string"
  1781. },
  1782. "required": true
  1783. },
  1784. {
  1785. "name": "dirs",
  1786. "in": "query",
  1787. "schema": {
  1788. "type": "string",
  1789. "enum": ["true", "false"]
  1790. },
  1791. "required": false
  1792. },
  1793. {
  1794. "name": "type",
  1795. "in": "query",
  1796. "schema": {
  1797. "type": "string",
  1798. "enum": ["file", "directory"]
  1799. },
  1800. "required": false
  1801. },
  1802. {
  1803. "name": "limit",
  1804. "in": "query",
  1805. "schema": {
  1806. "type": "integer",
  1807. "minimum": 1,
  1808. "maximum": 200
  1809. },
  1810. "required": false
  1811. }
  1812. ],
  1813. "responses": {
  1814. "200": {
  1815. "description": "File paths",
  1816. "content": {
  1817. "application/json": {
  1818. "schema": {
  1819. "type": "array",
  1820. "items": {
  1821. "type": "string"
  1822. },
  1823. "description": "File paths"
  1824. }
  1825. }
  1826. }
  1827. },
  1828. "400": {
  1829. "description": "Bad request",
  1830. "content": {
  1831. "application/json": {
  1832. "schema": {
  1833. "$ref": "#/components/schemas/BadRequestError"
  1834. }
  1835. }
  1836. }
  1837. }
  1838. },
  1839. "description": "Search for files or directories by name or pattern in the project directory.",
  1840. "summary": "Find files",
  1841. "x-codeSamples": [
  1842. {
  1843. "lang": "js",
  1844. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1845. }
  1846. ]
  1847. }
  1848. },
  1849. "/find/symbol": {
  1850. "get": {
  1851. "tags": ["file"],
  1852. "operationId": "find.symbols",
  1853. "parameters": [
  1854. {
  1855. "name": "directory",
  1856. "in": "query",
  1857. "schema": {
  1858. "type": "string"
  1859. },
  1860. "required": false
  1861. },
  1862. {
  1863. "name": "workspace",
  1864. "in": "query",
  1865. "schema": {
  1866. "type": "string"
  1867. },
  1868. "required": false
  1869. },
  1870. {
  1871. "name": "query",
  1872. "in": "query",
  1873. "schema": {
  1874. "type": "string"
  1875. },
  1876. "required": true
  1877. }
  1878. ],
  1879. "responses": {
  1880. "200": {
  1881. "description": "Symbols",
  1882. "content": {
  1883. "application/json": {
  1884. "schema": {
  1885. "type": "array",
  1886. "items": {
  1887. "$ref": "#/components/schemas/Symbol"
  1888. },
  1889. "description": "Symbols"
  1890. }
  1891. }
  1892. }
  1893. },
  1894. "400": {
  1895. "description": "Bad request",
  1896. "content": {
  1897. "application/json": {
  1898. "schema": {
  1899. "$ref": "#/components/schemas/BadRequestError"
  1900. }
  1901. }
  1902. }
  1903. }
  1904. },
  1905. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  1906. "summary": "Find symbols",
  1907. "x-codeSamples": [
  1908. {
  1909. "lang": "js",
  1910. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  1911. }
  1912. ]
  1913. }
  1914. },
  1915. "/file": {
  1916. "get": {
  1917. "tags": ["file"],
  1918. "operationId": "file.list",
  1919. "parameters": [
  1920. {
  1921. "name": "directory",
  1922. "in": "query",
  1923. "schema": {
  1924. "type": "string"
  1925. },
  1926. "required": false
  1927. },
  1928. {
  1929. "name": "workspace",
  1930. "in": "query",
  1931. "schema": {
  1932. "type": "string"
  1933. },
  1934. "required": false
  1935. },
  1936. {
  1937. "name": "path",
  1938. "in": "query",
  1939. "schema": {
  1940. "type": "string"
  1941. },
  1942. "required": true
  1943. }
  1944. ],
  1945. "responses": {
  1946. "200": {
  1947. "description": "Files and directories",
  1948. "content": {
  1949. "application/json": {
  1950. "schema": {
  1951. "type": "array",
  1952. "items": {
  1953. "$ref": "#/components/schemas/FileNode"
  1954. },
  1955. "description": "Files and directories"
  1956. }
  1957. }
  1958. }
  1959. },
  1960. "400": {
  1961. "description": "Bad request",
  1962. "content": {
  1963. "application/json": {
  1964. "schema": {
  1965. "$ref": "#/components/schemas/BadRequestError"
  1966. }
  1967. }
  1968. }
  1969. }
  1970. },
  1971. "description": "List files and directories in a specified path.",
  1972. "summary": "List files",
  1973. "x-codeSamples": [
  1974. {
  1975. "lang": "js",
  1976. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  1977. }
  1978. ]
  1979. }
  1980. },
  1981. "/file/content": {
  1982. "get": {
  1983. "tags": ["file"],
  1984. "operationId": "file.read",
  1985. "parameters": [
  1986. {
  1987. "name": "directory",
  1988. "in": "query",
  1989. "schema": {
  1990. "type": "string"
  1991. },
  1992. "required": false
  1993. },
  1994. {
  1995. "name": "workspace",
  1996. "in": "query",
  1997. "schema": {
  1998. "type": "string"
  1999. },
  2000. "required": false
  2001. },
  2002. {
  2003. "name": "path",
  2004. "in": "query",
  2005. "schema": {
  2006. "type": "string"
  2007. },
  2008. "required": true
  2009. }
  2010. ],
  2011. "responses": {
  2012. "200": {
  2013. "description": "File content",
  2014. "content": {
  2015. "application/json": {
  2016. "schema": {
  2017. "$ref": "#/components/schemas/FileContent"
  2018. }
  2019. }
  2020. }
  2021. },
  2022. "400": {
  2023. "description": "Bad request",
  2024. "content": {
  2025. "application/json": {
  2026. "schema": {
  2027. "$ref": "#/components/schemas/BadRequestError"
  2028. }
  2029. }
  2030. }
  2031. }
  2032. },
  2033. "description": "Read the content of a specified file.",
  2034. "summary": "Read file",
  2035. "x-codeSamples": [
  2036. {
  2037. "lang": "js",
  2038. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  2039. }
  2040. ]
  2041. }
  2042. },
  2043. "/file/status": {
  2044. "get": {
  2045. "tags": ["file"],
  2046. "operationId": "file.status",
  2047. "parameters": [
  2048. {
  2049. "name": "directory",
  2050. "in": "query",
  2051. "schema": {
  2052. "type": "string"
  2053. },
  2054. "required": false
  2055. },
  2056. {
  2057. "name": "workspace",
  2058. "in": "query",
  2059. "schema": {
  2060. "type": "string"
  2061. },
  2062. "required": false
  2063. }
  2064. ],
  2065. "responses": {
  2066. "200": {
  2067. "description": "File status",
  2068. "content": {
  2069. "application/json": {
  2070. "schema": {
  2071. "type": "array",
  2072. "items": {
  2073. "$ref": "#/components/schemas/File"
  2074. },
  2075. "description": "File status"
  2076. }
  2077. }
  2078. }
  2079. },
  2080. "400": {
  2081. "description": "Bad request",
  2082. "content": {
  2083. "application/json": {
  2084. "schema": {
  2085. "$ref": "#/components/schemas/BadRequestError"
  2086. }
  2087. }
  2088. }
  2089. }
  2090. },
  2091. "description": "Get the git status of all files in the project.",
  2092. "summary": "Get file status",
  2093. "x-codeSamples": [
  2094. {
  2095. "lang": "js",
  2096. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  2097. }
  2098. ]
  2099. }
  2100. },
  2101. "/instance/dispose": {
  2102. "post": {
  2103. "tags": ["instance"],
  2104. "operationId": "instance.dispose",
  2105. "parameters": [
  2106. {
  2107. "name": "directory",
  2108. "in": "query",
  2109. "schema": {
  2110. "type": "string"
  2111. },
  2112. "required": false
  2113. },
  2114. {
  2115. "name": "workspace",
  2116. "in": "query",
  2117. "schema": {
  2118. "type": "string"
  2119. },
  2120. "required": false
  2121. }
  2122. ],
  2123. "responses": {
  2124. "200": {
  2125. "description": "Instance disposed",
  2126. "content": {
  2127. "application/json": {
  2128. "schema": {
  2129. "type": "boolean",
  2130. "description": "Instance disposed"
  2131. }
  2132. }
  2133. }
  2134. },
  2135. "400": {
  2136. "description": "Bad request",
  2137. "content": {
  2138. "application/json": {
  2139. "schema": {
  2140. "$ref": "#/components/schemas/BadRequestError"
  2141. }
  2142. }
  2143. }
  2144. }
  2145. },
  2146. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  2147. "summary": "Dispose instance",
  2148. "x-codeSamples": [
  2149. {
  2150. "lang": "js",
  2151. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  2152. }
  2153. ]
  2154. }
  2155. },
  2156. "/path": {
  2157. "get": {
  2158. "tags": ["instance"],
  2159. "operationId": "path.get",
  2160. "parameters": [
  2161. {
  2162. "name": "directory",
  2163. "in": "query",
  2164. "schema": {
  2165. "type": "string"
  2166. },
  2167. "required": false
  2168. },
  2169. {
  2170. "name": "workspace",
  2171. "in": "query",
  2172. "schema": {
  2173. "type": "string"
  2174. },
  2175. "required": false
  2176. }
  2177. ],
  2178. "responses": {
  2179. "200": {
  2180. "description": "Path",
  2181. "content": {
  2182. "application/json": {
  2183. "schema": {
  2184. "$ref": "#/components/schemas/Path"
  2185. }
  2186. }
  2187. }
  2188. },
  2189. "400": {
  2190. "description": "Bad request",
  2191. "content": {
  2192. "application/json": {
  2193. "schema": {
  2194. "$ref": "#/components/schemas/BadRequestError"
  2195. }
  2196. }
  2197. }
  2198. }
  2199. },
  2200. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  2201. "summary": "Get paths",
  2202. "x-codeSamples": [
  2203. {
  2204. "lang": "js",
  2205. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  2206. }
  2207. ]
  2208. }
  2209. },
  2210. "/vcs": {
  2211. "get": {
  2212. "tags": ["instance"],
  2213. "operationId": "vcs.get",
  2214. "parameters": [
  2215. {
  2216. "name": "directory",
  2217. "in": "query",
  2218. "schema": {
  2219. "type": "string"
  2220. },
  2221. "required": false
  2222. },
  2223. {
  2224. "name": "workspace",
  2225. "in": "query",
  2226. "schema": {
  2227. "type": "string"
  2228. },
  2229. "required": false
  2230. }
  2231. ],
  2232. "responses": {
  2233. "200": {
  2234. "description": "VCS info",
  2235. "content": {
  2236. "application/json": {
  2237. "schema": {
  2238. "$ref": "#/components/schemas/VcsInfo"
  2239. }
  2240. }
  2241. }
  2242. },
  2243. "400": {
  2244. "description": "Bad request",
  2245. "content": {
  2246. "application/json": {
  2247. "schema": {
  2248. "$ref": "#/components/schemas/BadRequestError"
  2249. }
  2250. }
  2251. }
  2252. }
  2253. },
  2254. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  2255. "summary": "Get VCS info",
  2256. "x-codeSamples": [
  2257. {
  2258. "lang": "js",
  2259. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  2260. }
  2261. ]
  2262. }
  2263. },
  2264. "/vcs/status": {
  2265. "get": {
  2266. "tags": ["instance"],
  2267. "operationId": "vcs.status",
  2268. "parameters": [
  2269. {
  2270. "name": "directory",
  2271. "in": "query",
  2272. "schema": {
  2273. "type": "string"
  2274. },
  2275. "required": false
  2276. },
  2277. {
  2278. "name": "workspace",
  2279. "in": "query",
  2280. "schema": {
  2281. "type": "string"
  2282. },
  2283. "required": false
  2284. }
  2285. ],
  2286. "responses": {
  2287. "200": {
  2288. "description": "VCS status",
  2289. "content": {
  2290. "application/json": {
  2291. "schema": {
  2292. "type": "array",
  2293. "items": {
  2294. "$ref": "#/components/schemas/VcsFileStatus"
  2295. },
  2296. "description": "VCS status"
  2297. }
  2298. }
  2299. }
  2300. },
  2301. "400": {
  2302. "description": "Bad request",
  2303. "content": {
  2304. "application/json": {
  2305. "schema": {
  2306. "$ref": "#/components/schemas/BadRequestError"
  2307. }
  2308. }
  2309. }
  2310. }
  2311. },
  2312. "description": "Retrieve changed files in the current working tree without patches.",
  2313. "summary": "Get VCS status",
  2314. "x-codeSamples": [
  2315. {
  2316. "lang": "js",
  2317. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  2318. }
  2319. ]
  2320. }
  2321. },
  2322. "/vcs/diff": {
  2323. "get": {
  2324. "tags": ["instance"],
  2325. "operationId": "vcs.diff",
  2326. "parameters": [
  2327. {
  2328. "name": "directory",
  2329. "in": "query",
  2330. "schema": {
  2331. "type": "string"
  2332. },
  2333. "required": false
  2334. },
  2335. {
  2336. "name": "workspace",
  2337. "in": "query",
  2338. "schema": {
  2339. "type": "string"
  2340. },
  2341. "required": false
  2342. },
  2343. {
  2344. "name": "mode",
  2345. "in": "query",
  2346. "schema": {
  2347. "type": "string",
  2348. "enum": ["git", "branch"]
  2349. },
  2350. "required": true
  2351. },
  2352. {
  2353. "name": "context",
  2354. "in": "query",
  2355. "schema": {
  2356. "type": "integer",
  2357. "minimum": 0
  2358. },
  2359. "required": false
  2360. }
  2361. ],
  2362. "responses": {
  2363. "200": {
  2364. "description": "VCS diff",
  2365. "content": {
  2366. "application/json": {
  2367. "schema": {
  2368. "type": "array",
  2369. "items": {
  2370. "$ref": "#/components/schemas/VcsFileDiff"
  2371. },
  2372. "description": "VCS diff"
  2373. }
  2374. }
  2375. }
  2376. },
  2377. "400": {
  2378. "description": "Bad request",
  2379. "content": {
  2380. "application/json": {
  2381. "schema": {
  2382. "$ref": "#/components/schemas/BadRequestError"
  2383. }
  2384. }
  2385. }
  2386. }
  2387. },
  2388. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2389. "summary": "Get VCS diff",
  2390. "x-codeSamples": [
  2391. {
  2392. "lang": "js",
  2393. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2394. }
  2395. ]
  2396. }
  2397. },
  2398. "/vcs/diff/raw": {
  2399. "get": {
  2400. "tags": ["instance"],
  2401. "operationId": "vcs.diff.raw",
  2402. "parameters": [
  2403. {
  2404. "name": "directory",
  2405. "in": "query",
  2406. "schema": {
  2407. "type": "string"
  2408. },
  2409. "required": false
  2410. },
  2411. {
  2412. "name": "workspace",
  2413. "in": "query",
  2414. "schema": {
  2415. "type": "string"
  2416. },
  2417. "required": false
  2418. }
  2419. ],
  2420. "responses": {
  2421. "200": {
  2422. "description": "Raw VCS diff",
  2423. "content": {
  2424. "text/x-diff; charset=utf-8": {
  2425. "schema": {
  2426. "type": "string"
  2427. }
  2428. }
  2429. }
  2430. },
  2431. "400": {
  2432. "description": "Bad request",
  2433. "content": {
  2434. "application/json": {
  2435. "schema": {
  2436. "$ref": "#/components/schemas/BadRequestError"
  2437. }
  2438. }
  2439. }
  2440. }
  2441. },
  2442. "description": "Retrieve a raw patch for current uncommitted changes.",
  2443. "summary": "Get raw VCS diff",
  2444. "x-codeSamples": [
  2445. {
  2446. "lang": "js",
  2447. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2448. }
  2449. ]
  2450. }
  2451. },
  2452. "/vcs/apply": {
  2453. "post": {
  2454. "tags": ["instance"],
  2455. "operationId": "vcs.apply",
  2456. "parameters": [
  2457. {
  2458. "name": "directory",
  2459. "in": "query",
  2460. "schema": {
  2461. "type": "string"
  2462. },
  2463. "required": false
  2464. },
  2465. {
  2466. "name": "workspace",
  2467. "in": "query",
  2468. "schema": {
  2469. "type": "string"
  2470. },
  2471. "required": false
  2472. }
  2473. ],
  2474. "responses": {
  2475. "200": {
  2476. "description": "VCS patch applied",
  2477. "content": {
  2478. "application/json": {
  2479. "schema": {
  2480. "type": "object",
  2481. "properties": {
  2482. "applied": {
  2483. "type": "boolean"
  2484. }
  2485. },
  2486. "required": ["applied"],
  2487. "additionalProperties": false,
  2488. "description": "VCS patch applied"
  2489. }
  2490. }
  2491. }
  2492. },
  2493. "400": {
  2494. "description": "VcsApplyError | InvalidRequestError",
  2495. "content": {
  2496. "application/json": {
  2497. "schema": {
  2498. "anyOf": [
  2499. {
  2500. "$ref": "#/components/schemas/VcsApplyError"
  2501. },
  2502. {
  2503. "$ref": "#/components/schemas/InvalidRequestError"
  2504. }
  2505. ]
  2506. }
  2507. }
  2508. }
  2509. }
  2510. },
  2511. "description": "Apply a raw patch to the current working tree.",
  2512. "summary": "Apply VCS patch",
  2513. "requestBody": {
  2514. "content": {
  2515. "application/json": {
  2516. "schema": {
  2517. "type": "object",
  2518. "properties": {
  2519. "patch": {
  2520. "type": "string"
  2521. }
  2522. },
  2523. "required": ["patch"],
  2524. "additionalProperties": false
  2525. }
  2526. }
  2527. }
  2528. },
  2529. "x-codeSamples": [
  2530. {
  2531. "lang": "js",
  2532. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2533. }
  2534. ]
  2535. }
  2536. },
  2537. "/command": {
  2538. "get": {
  2539. "tags": ["instance"],
  2540. "operationId": "command.list",
  2541. "parameters": [
  2542. {
  2543. "name": "directory",
  2544. "in": "query",
  2545. "schema": {
  2546. "type": "string"
  2547. },
  2548. "required": false
  2549. },
  2550. {
  2551. "name": "workspace",
  2552. "in": "query",
  2553. "schema": {
  2554. "type": "string"
  2555. },
  2556. "required": false
  2557. }
  2558. ],
  2559. "responses": {
  2560. "200": {
  2561. "description": "List of commands",
  2562. "content": {
  2563. "application/json": {
  2564. "schema": {
  2565. "type": "array",
  2566. "items": {
  2567. "$ref": "#/components/schemas/Command"
  2568. },
  2569. "description": "List of commands"
  2570. }
  2571. }
  2572. }
  2573. },
  2574. "400": {
  2575. "description": "Bad request",
  2576. "content": {
  2577. "application/json": {
  2578. "schema": {
  2579. "$ref": "#/components/schemas/BadRequestError"
  2580. }
  2581. }
  2582. }
  2583. }
  2584. },
  2585. "description": "Get a list of all available commands in the OpenCode system.",
  2586. "summary": "List commands",
  2587. "x-codeSamples": [
  2588. {
  2589. "lang": "js",
  2590. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2591. }
  2592. ]
  2593. }
  2594. },
  2595. "/agent": {
  2596. "get": {
  2597. "tags": ["instance"],
  2598. "operationId": "app.agents",
  2599. "parameters": [
  2600. {
  2601. "name": "directory",
  2602. "in": "query",
  2603. "schema": {
  2604. "type": "string"
  2605. },
  2606. "required": false
  2607. },
  2608. {
  2609. "name": "workspace",
  2610. "in": "query",
  2611. "schema": {
  2612. "type": "string"
  2613. },
  2614. "required": false
  2615. }
  2616. ],
  2617. "responses": {
  2618. "200": {
  2619. "description": "List of agents",
  2620. "content": {
  2621. "application/json": {
  2622. "schema": {
  2623. "type": "array",
  2624. "items": {
  2625. "$ref": "#/components/schemas/Agent"
  2626. },
  2627. "description": "List of agents"
  2628. }
  2629. }
  2630. }
  2631. },
  2632. "400": {
  2633. "description": "Bad request",
  2634. "content": {
  2635. "application/json": {
  2636. "schema": {
  2637. "$ref": "#/components/schemas/BadRequestError"
  2638. }
  2639. }
  2640. }
  2641. }
  2642. },
  2643. "description": "Get a list of all available AI agents in the OpenCode system.",
  2644. "summary": "List agents",
  2645. "x-codeSamples": [
  2646. {
  2647. "lang": "js",
  2648. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2649. }
  2650. ]
  2651. }
  2652. },
  2653. "/skill": {
  2654. "get": {
  2655. "tags": ["instance"],
  2656. "operationId": "app.skills",
  2657. "parameters": [
  2658. {
  2659. "name": "directory",
  2660. "in": "query",
  2661. "schema": {
  2662. "type": "string"
  2663. },
  2664. "required": false
  2665. },
  2666. {
  2667. "name": "workspace",
  2668. "in": "query",
  2669. "schema": {
  2670. "type": "string"
  2671. },
  2672. "required": false
  2673. }
  2674. ],
  2675. "responses": {
  2676. "200": {
  2677. "description": "List of skills",
  2678. "content": {
  2679. "application/json": {
  2680. "schema": {
  2681. "type": "array",
  2682. "items": {
  2683. "type": "object",
  2684. "properties": {
  2685. "name": {
  2686. "type": "string"
  2687. },
  2688. "description": {
  2689. "type": "string"
  2690. },
  2691. "location": {
  2692. "type": "string"
  2693. },
  2694. "content": {
  2695. "type": "string"
  2696. }
  2697. },
  2698. "required": ["name", "location", "content"],
  2699. "additionalProperties": false
  2700. },
  2701. "description": "List of skills"
  2702. }
  2703. }
  2704. }
  2705. },
  2706. "400": {
  2707. "description": "Bad request",
  2708. "content": {
  2709. "application/json": {
  2710. "schema": {
  2711. "$ref": "#/components/schemas/BadRequestError"
  2712. }
  2713. }
  2714. }
  2715. }
  2716. },
  2717. "description": "Get a list of all available skills in the OpenCode system.",
  2718. "summary": "List skills",
  2719. "x-codeSamples": [
  2720. {
  2721. "lang": "js",
  2722. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2723. }
  2724. ]
  2725. }
  2726. },
  2727. "/lsp": {
  2728. "get": {
  2729. "tags": ["instance"],
  2730. "operationId": "lsp.status",
  2731. "parameters": [
  2732. {
  2733. "name": "directory",
  2734. "in": "query",
  2735. "schema": {
  2736. "type": "string"
  2737. },
  2738. "required": false
  2739. },
  2740. {
  2741. "name": "workspace",
  2742. "in": "query",
  2743. "schema": {
  2744. "type": "string"
  2745. },
  2746. "required": false
  2747. }
  2748. ],
  2749. "responses": {
  2750. "200": {
  2751. "description": "LSP server status",
  2752. "content": {
  2753. "application/json": {
  2754. "schema": {
  2755. "type": "array",
  2756. "items": {
  2757. "$ref": "#/components/schemas/LSPStatus"
  2758. },
  2759. "description": "LSP server status"
  2760. }
  2761. }
  2762. }
  2763. },
  2764. "400": {
  2765. "description": "Bad request",
  2766. "content": {
  2767. "application/json": {
  2768. "schema": {
  2769. "$ref": "#/components/schemas/BadRequestError"
  2770. }
  2771. }
  2772. }
  2773. }
  2774. },
  2775. "description": "Get LSP server status",
  2776. "summary": "Get LSP status",
  2777. "x-codeSamples": [
  2778. {
  2779. "lang": "js",
  2780. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2781. }
  2782. ]
  2783. }
  2784. },
  2785. "/formatter": {
  2786. "get": {
  2787. "tags": ["instance"],
  2788. "operationId": "formatter.status",
  2789. "parameters": [
  2790. {
  2791. "name": "directory",
  2792. "in": "query",
  2793. "schema": {
  2794. "type": "string"
  2795. },
  2796. "required": false
  2797. },
  2798. {
  2799. "name": "workspace",
  2800. "in": "query",
  2801. "schema": {
  2802. "type": "string"
  2803. },
  2804. "required": false
  2805. }
  2806. ],
  2807. "responses": {
  2808. "200": {
  2809. "description": "Formatter status",
  2810. "content": {
  2811. "application/json": {
  2812. "schema": {
  2813. "type": "array",
  2814. "items": {
  2815. "$ref": "#/components/schemas/FormatterStatus"
  2816. },
  2817. "description": "Formatter status"
  2818. }
  2819. }
  2820. }
  2821. },
  2822. "400": {
  2823. "description": "Bad request",
  2824. "content": {
  2825. "application/json": {
  2826. "schema": {
  2827. "$ref": "#/components/schemas/BadRequestError"
  2828. }
  2829. }
  2830. }
  2831. }
  2832. },
  2833. "description": "Get formatter status",
  2834. "summary": "Get formatter status",
  2835. "x-codeSamples": [
  2836. {
  2837. "lang": "js",
  2838. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2839. }
  2840. ]
  2841. }
  2842. },
  2843. "/mcp": {
  2844. "get": {
  2845. "tags": ["mcp"],
  2846. "operationId": "mcp.status",
  2847. "parameters": [
  2848. {
  2849. "name": "directory",
  2850. "in": "query",
  2851. "schema": {
  2852. "type": "string"
  2853. },
  2854. "required": false
  2855. },
  2856. {
  2857. "name": "workspace",
  2858. "in": "query",
  2859. "schema": {
  2860. "type": "string"
  2861. },
  2862. "required": false
  2863. }
  2864. ],
  2865. "responses": {
  2866. "200": {
  2867. "description": "MCP server status",
  2868. "content": {
  2869. "application/json": {
  2870. "schema": {
  2871. "type": "object",
  2872. "additionalProperties": {
  2873. "$ref": "#/components/schemas/MCPStatus"
  2874. },
  2875. "description": "MCP server status"
  2876. }
  2877. }
  2878. }
  2879. },
  2880. "400": {
  2881. "description": "Bad request",
  2882. "content": {
  2883. "application/json": {
  2884. "schema": {
  2885. "$ref": "#/components/schemas/BadRequestError"
  2886. }
  2887. }
  2888. }
  2889. }
  2890. },
  2891. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  2892. "summary": "Get MCP status",
  2893. "x-codeSamples": [
  2894. {
  2895. "lang": "js",
  2896. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  2897. }
  2898. ]
  2899. },
  2900. "post": {
  2901. "tags": ["mcp"],
  2902. "operationId": "mcp.add",
  2903. "parameters": [
  2904. {
  2905. "name": "directory",
  2906. "in": "query",
  2907. "schema": {
  2908. "type": "string"
  2909. },
  2910. "required": false
  2911. },
  2912. {
  2913. "name": "workspace",
  2914. "in": "query",
  2915. "schema": {
  2916. "type": "string"
  2917. },
  2918. "required": false
  2919. }
  2920. ],
  2921. "responses": {
  2922. "200": {
  2923. "description": "MCP server added successfully",
  2924. "content": {
  2925. "application/json": {
  2926. "schema": {
  2927. "type": "object",
  2928. "additionalProperties": {
  2929. "$ref": "#/components/schemas/MCPStatus"
  2930. },
  2931. "description": "MCP server added successfully"
  2932. }
  2933. }
  2934. }
  2935. },
  2936. "400": {
  2937. "description": "BadRequest | InvalidRequestError",
  2938. "content": {
  2939. "application/json": {
  2940. "schema": {
  2941. "anyOf": [
  2942. {
  2943. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  2944. },
  2945. {
  2946. "$ref": "#/components/schemas/InvalidRequestError"
  2947. }
  2948. ]
  2949. }
  2950. }
  2951. }
  2952. }
  2953. },
  2954. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  2955. "summary": "Add MCP server",
  2956. "requestBody": {
  2957. "content": {
  2958. "application/json": {
  2959. "schema": {
  2960. "type": "object",
  2961. "properties": {
  2962. "name": {
  2963. "type": "string"
  2964. },
  2965. "config": {
  2966. "anyOf": [
  2967. {
  2968. "$ref": "#/components/schemas/McpLocalConfig"
  2969. },
  2970. {
  2971. "$ref": "#/components/schemas/McpRemoteConfig"
  2972. }
  2973. ]
  2974. }
  2975. },
  2976. "required": ["name", "config"],
  2977. "additionalProperties": false
  2978. }
  2979. }
  2980. }
  2981. },
  2982. "x-codeSamples": [
  2983. {
  2984. "lang": "js",
  2985. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  2986. }
  2987. ]
  2988. }
  2989. },
  2990. "/mcp/{name}/auth": {
  2991. "post": {
  2992. "tags": ["mcp"],
  2993. "operationId": "mcp.auth.start",
  2994. "parameters": [
  2995. {
  2996. "name": "name",
  2997. "in": "path",
  2998. "schema": {
  2999. "type": "string"
  3000. },
  3001. "required": true
  3002. },
  3003. {
  3004. "name": "directory",
  3005. "in": "query",
  3006. "schema": {
  3007. "type": "string"
  3008. },
  3009. "required": false
  3010. },
  3011. {
  3012. "name": "workspace",
  3013. "in": "query",
  3014. "schema": {
  3015. "type": "string"
  3016. },
  3017. "required": false
  3018. }
  3019. ],
  3020. "responses": {
  3021. "200": {
  3022. "description": "OAuth flow started",
  3023. "content": {
  3024. "application/json": {
  3025. "schema": {
  3026. "type": "object",
  3027. "properties": {
  3028. "authorizationUrl": {
  3029. "type": "string"
  3030. },
  3031. "oauthState": {
  3032. "type": "string"
  3033. }
  3034. },
  3035. "required": ["authorizationUrl", "oauthState"],
  3036. "additionalProperties": false,
  3037. "description": "OAuth flow started"
  3038. }
  3039. }
  3040. }
  3041. },
  3042. "400": {
  3043. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3044. "content": {
  3045. "application/json": {
  3046. "schema": {
  3047. "anyOf": [
  3048. {
  3049. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3050. },
  3051. {
  3052. "$ref": "#/components/schemas/InvalidRequestError"
  3053. }
  3054. ]
  3055. }
  3056. }
  3057. }
  3058. },
  3059. "404": {
  3060. "description": "McpServerNotFoundError",
  3061. "content": {
  3062. "application/json": {
  3063. "schema": {
  3064. "$ref": "#/components/schemas/McpServerNotFoundError"
  3065. }
  3066. }
  3067. }
  3068. }
  3069. },
  3070. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3071. "summary": "Start MCP OAuth",
  3072. "x-codeSamples": [
  3073. {
  3074. "lang": "js",
  3075. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3076. }
  3077. ]
  3078. },
  3079. "delete": {
  3080. "tags": ["mcp"],
  3081. "operationId": "mcp.auth.remove",
  3082. "parameters": [
  3083. {
  3084. "name": "name",
  3085. "in": "path",
  3086. "schema": {
  3087. "type": "string"
  3088. },
  3089. "required": true
  3090. },
  3091. {
  3092. "name": "directory",
  3093. "in": "query",
  3094. "schema": {
  3095. "type": "string"
  3096. },
  3097. "required": false
  3098. },
  3099. {
  3100. "name": "workspace",
  3101. "in": "query",
  3102. "schema": {
  3103. "type": "string"
  3104. },
  3105. "required": false
  3106. }
  3107. ],
  3108. "responses": {
  3109. "200": {
  3110. "description": "OAuth credentials removed",
  3111. "content": {
  3112. "application/json": {
  3113. "schema": {
  3114. "type": "object",
  3115. "properties": {
  3116. "success": {
  3117. "type": "boolean",
  3118. "enum": [true]
  3119. }
  3120. },
  3121. "required": ["success"],
  3122. "additionalProperties": false,
  3123. "description": "OAuth credentials removed"
  3124. }
  3125. }
  3126. }
  3127. },
  3128. "400": {
  3129. "description": "Bad request",
  3130. "content": {
  3131. "application/json": {
  3132. "schema": {
  3133. "$ref": "#/components/schemas/BadRequestError"
  3134. }
  3135. }
  3136. }
  3137. },
  3138. "404": {
  3139. "description": "McpServerNotFoundError",
  3140. "content": {
  3141. "application/json": {
  3142. "schema": {
  3143. "$ref": "#/components/schemas/McpServerNotFoundError"
  3144. }
  3145. }
  3146. }
  3147. }
  3148. },
  3149. "description": "Remove OAuth credentials for an MCP server.",
  3150. "summary": "Remove MCP OAuth",
  3151. "x-codeSamples": [
  3152. {
  3153. "lang": "js",
  3154. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3155. }
  3156. ]
  3157. }
  3158. },
  3159. "/mcp/{name}/auth/callback": {
  3160. "post": {
  3161. "tags": ["mcp"],
  3162. "operationId": "mcp.auth.callback",
  3163. "parameters": [
  3164. {
  3165. "name": "name",
  3166. "in": "path",
  3167. "schema": {
  3168. "type": "string"
  3169. },
  3170. "required": true
  3171. },
  3172. {
  3173. "name": "directory",
  3174. "in": "query",
  3175. "schema": {
  3176. "type": "string"
  3177. },
  3178. "required": false
  3179. },
  3180. {
  3181. "name": "workspace",
  3182. "in": "query",
  3183. "schema": {
  3184. "type": "string"
  3185. },
  3186. "required": false
  3187. }
  3188. ],
  3189. "responses": {
  3190. "200": {
  3191. "description": "OAuth authentication completed",
  3192. "content": {
  3193. "application/json": {
  3194. "schema": {
  3195. "$ref": "#/components/schemas/MCPStatus"
  3196. }
  3197. }
  3198. }
  3199. },
  3200. "400": {
  3201. "description": "BadRequest | InvalidRequestError",
  3202. "content": {
  3203. "application/json": {
  3204. "schema": {
  3205. "anyOf": [
  3206. {
  3207. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3208. },
  3209. {
  3210. "$ref": "#/components/schemas/InvalidRequestError"
  3211. }
  3212. ]
  3213. }
  3214. }
  3215. }
  3216. },
  3217. "404": {
  3218. "description": "McpServerNotFoundError",
  3219. "content": {
  3220. "application/json": {
  3221. "schema": {
  3222. "$ref": "#/components/schemas/McpServerNotFoundError"
  3223. }
  3224. }
  3225. }
  3226. }
  3227. },
  3228. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3229. "summary": "Complete MCP OAuth",
  3230. "requestBody": {
  3231. "content": {
  3232. "application/json": {
  3233. "schema": {
  3234. "type": "object",
  3235. "properties": {
  3236. "code": {
  3237. "type": "string"
  3238. }
  3239. },
  3240. "required": ["code"],
  3241. "additionalProperties": false
  3242. }
  3243. }
  3244. }
  3245. },
  3246. "x-codeSamples": [
  3247. {
  3248. "lang": "js",
  3249. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3250. }
  3251. ]
  3252. }
  3253. },
  3254. "/mcp/{name}/auth/authenticate": {
  3255. "post": {
  3256. "tags": ["mcp"],
  3257. "operationId": "mcp.auth.authenticate",
  3258. "parameters": [
  3259. {
  3260. "name": "name",
  3261. "in": "path",
  3262. "schema": {
  3263. "type": "string"
  3264. },
  3265. "required": true
  3266. },
  3267. {
  3268. "name": "directory",
  3269. "in": "query",
  3270. "schema": {
  3271. "type": "string"
  3272. },
  3273. "required": false
  3274. },
  3275. {
  3276. "name": "workspace",
  3277. "in": "query",
  3278. "schema": {
  3279. "type": "string"
  3280. },
  3281. "required": false
  3282. }
  3283. ],
  3284. "responses": {
  3285. "200": {
  3286. "description": "OAuth authentication completed",
  3287. "content": {
  3288. "application/json": {
  3289. "schema": {
  3290. "$ref": "#/components/schemas/MCPStatus"
  3291. }
  3292. }
  3293. }
  3294. },
  3295. "400": {
  3296. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3297. "content": {
  3298. "application/json": {
  3299. "schema": {
  3300. "anyOf": [
  3301. {
  3302. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3303. },
  3304. {
  3305. "$ref": "#/components/schemas/InvalidRequestError"
  3306. }
  3307. ]
  3308. }
  3309. }
  3310. }
  3311. },
  3312. "404": {
  3313. "description": "McpServerNotFoundError",
  3314. "content": {
  3315. "application/json": {
  3316. "schema": {
  3317. "$ref": "#/components/schemas/McpServerNotFoundError"
  3318. }
  3319. }
  3320. }
  3321. }
  3322. },
  3323. "description": "Start OAuth flow and wait for callback (opens browser).",
  3324. "summary": "Authenticate MCP OAuth",
  3325. "x-codeSamples": [
  3326. {
  3327. "lang": "js",
  3328. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3329. }
  3330. ]
  3331. }
  3332. },
  3333. "/mcp/{name}/connect": {
  3334. "post": {
  3335. "tags": ["mcp"],
  3336. "operationId": "mcp.connect",
  3337. "parameters": [
  3338. {
  3339. "name": "name",
  3340. "in": "path",
  3341. "schema": {
  3342. "type": "string"
  3343. },
  3344. "required": true
  3345. },
  3346. {
  3347. "name": "directory",
  3348. "in": "query",
  3349. "schema": {
  3350. "type": "string"
  3351. },
  3352. "required": false
  3353. },
  3354. {
  3355. "name": "workspace",
  3356. "in": "query",
  3357. "schema": {
  3358. "type": "string"
  3359. },
  3360. "required": false
  3361. }
  3362. ],
  3363. "responses": {
  3364. "200": {
  3365. "description": "MCP server connected successfully",
  3366. "content": {
  3367. "application/json": {
  3368. "schema": {
  3369. "type": "boolean",
  3370. "description": "MCP server connected successfully"
  3371. }
  3372. }
  3373. }
  3374. },
  3375. "400": {
  3376. "description": "Bad request",
  3377. "content": {
  3378. "application/json": {
  3379. "schema": {
  3380. "$ref": "#/components/schemas/BadRequestError"
  3381. }
  3382. }
  3383. }
  3384. },
  3385. "404": {
  3386. "description": "McpServerNotFoundError",
  3387. "content": {
  3388. "application/json": {
  3389. "schema": {
  3390. "$ref": "#/components/schemas/McpServerNotFoundError"
  3391. }
  3392. }
  3393. }
  3394. }
  3395. },
  3396. "description": "Connect an MCP server.",
  3397. "x-codeSamples": [
  3398. {
  3399. "lang": "js",
  3400. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3401. }
  3402. ]
  3403. }
  3404. },
  3405. "/mcp/{name}/disconnect": {
  3406. "post": {
  3407. "tags": ["mcp"],
  3408. "operationId": "mcp.disconnect",
  3409. "parameters": [
  3410. {
  3411. "name": "name",
  3412. "in": "path",
  3413. "schema": {
  3414. "type": "string"
  3415. },
  3416. "required": true
  3417. },
  3418. {
  3419. "name": "directory",
  3420. "in": "query",
  3421. "schema": {
  3422. "type": "string"
  3423. },
  3424. "required": false
  3425. },
  3426. {
  3427. "name": "workspace",
  3428. "in": "query",
  3429. "schema": {
  3430. "type": "string"
  3431. },
  3432. "required": false
  3433. }
  3434. ],
  3435. "responses": {
  3436. "200": {
  3437. "description": "MCP server disconnected successfully",
  3438. "content": {
  3439. "application/json": {
  3440. "schema": {
  3441. "type": "boolean",
  3442. "description": "MCP server disconnected successfully"
  3443. }
  3444. }
  3445. }
  3446. },
  3447. "400": {
  3448. "description": "Bad request",
  3449. "content": {
  3450. "application/json": {
  3451. "schema": {
  3452. "$ref": "#/components/schemas/BadRequestError"
  3453. }
  3454. }
  3455. }
  3456. },
  3457. "404": {
  3458. "description": "McpServerNotFoundError",
  3459. "content": {
  3460. "application/json": {
  3461. "schema": {
  3462. "$ref": "#/components/schemas/McpServerNotFoundError"
  3463. }
  3464. }
  3465. }
  3466. }
  3467. },
  3468. "description": "Disconnect an MCP server.",
  3469. "x-codeSamples": [
  3470. {
  3471. "lang": "js",
  3472. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3473. }
  3474. ]
  3475. }
  3476. },
  3477. "/project": {
  3478. "get": {
  3479. "tags": ["project"],
  3480. "operationId": "project.list",
  3481. "parameters": [
  3482. {
  3483. "name": "directory",
  3484. "in": "query",
  3485. "schema": {
  3486. "type": "string"
  3487. },
  3488. "required": false
  3489. },
  3490. {
  3491. "name": "workspace",
  3492. "in": "query",
  3493. "schema": {
  3494. "type": "string"
  3495. },
  3496. "required": false
  3497. }
  3498. ],
  3499. "responses": {
  3500. "200": {
  3501. "description": "List of projects",
  3502. "content": {
  3503. "application/json": {
  3504. "schema": {
  3505. "type": "array",
  3506. "items": {
  3507. "$ref": "#/components/schemas/Project"
  3508. },
  3509. "description": "List of projects"
  3510. }
  3511. }
  3512. }
  3513. },
  3514. "400": {
  3515. "description": "Bad request",
  3516. "content": {
  3517. "application/json": {
  3518. "schema": {
  3519. "$ref": "#/components/schemas/BadRequestError"
  3520. }
  3521. }
  3522. }
  3523. }
  3524. },
  3525. "description": "Get a list of projects that have been opened with OpenCode.",
  3526. "summary": "List all projects",
  3527. "x-codeSamples": [
  3528. {
  3529. "lang": "js",
  3530. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3531. }
  3532. ]
  3533. }
  3534. },
  3535. "/project/current": {
  3536. "get": {
  3537. "tags": ["project"],
  3538. "operationId": "project.current",
  3539. "parameters": [
  3540. {
  3541. "name": "directory",
  3542. "in": "query",
  3543. "schema": {
  3544. "type": "string"
  3545. },
  3546. "required": false
  3547. },
  3548. {
  3549. "name": "workspace",
  3550. "in": "query",
  3551. "schema": {
  3552. "type": "string"
  3553. },
  3554. "required": false
  3555. }
  3556. ],
  3557. "responses": {
  3558. "200": {
  3559. "description": "Current project information",
  3560. "content": {
  3561. "application/json": {
  3562. "schema": {
  3563. "$ref": "#/components/schemas/Project"
  3564. }
  3565. }
  3566. }
  3567. },
  3568. "400": {
  3569. "description": "Bad request",
  3570. "content": {
  3571. "application/json": {
  3572. "schema": {
  3573. "$ref": "#/components/schemas/BadRequestError"
  3574. }
  3575. }
  3576. }
  3577. }
  3578. },
  3579. "description": "Retrieve the currently active project that OpenCode is working with.",
  3580. "summary": "Get current project",
  3581. "x-codeSamples": [
  3582. {
  3583. "lang": "js",
  3584. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3585. }
  3586. ]
  3587. }
  3588. },
  3589. "/project/git/init": {
  3590. "post": {
  3591. "tags": ["project"],
  3592. "operationId": "project.initGit",
  3593. "parameters": [
  3594. {
  3595. "name": "directory",
  3596. "in": "query",
  3597. "schema": {
  3598. "type": "string"
  3599. },
  3600. "required": false
  3601. },
  3602. {
  3603. "name": "workspace",
  3604. "in": "query",
  3605. "schema": {
  3606. "type": "string"
  3607. },
  3608. "required": false
  3609. }
  3610. ],
  3611. "responses": {
  3612. "200": {
  3613. "description": "Project information after git initialization",
  3614. "content": {
  3615. "application/json": {
  3616. "schema": {
  3617. "$ref": "#/components/schemas/Project"
  3618. }
  3619. }
  3620. }
  3621. },
  3622. "400": {
  3623. "description": "Bad request",
  3624. "content": {
  3625. "application/json": {
  3626. "schema": {
  3627. "$ref": "#/components/schemas/BadRequestError"
  3628. }
  3629. }
  3630. }
  3631. }
  3632. },
  3633. "description": "Create a git repository for the current project and return the refreshed project info.",
  3634. "summary": "Initialize git repository",
  3635. "x-codeSamples": [
  3636. {
  3637. "lang": "js",
  3638. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3639. }
  3640. ]
  3641. }
  3642. },
  3643. "/project/{projectID}": {
  3644. "patch": {
  3645. "tags": ["project"],
  3646. "operationId": "project.update",
  3647. "parameters": [
  3648. {
  3649. "name": "projectID",
  3650. "in": "path",
  3651. "schema": {
  3652. "type": "string"
  3653. },
  3654. "required": true
  3655. },
  3656. {
  3657. "name": "directory",
  3658. "in": "query",
  3659. "schema": {
  3660. "type": "string"
  3661. },
  3662. "required": false
  3663. },
  3664. {
  3665. "name": "workspace",
  3666. "in": "query",
  3667. "schema": {
  3668. "type": "string"
  3669. },
  3670. "required": false
  3671. }
  3672. ],
  3673. "responses": {
  3674. "200": {
  3675. "description": "Updated project information",
  3676. "content": {
  3677. "application/json": {
  3678. "schema": {
  3679. "$ref": "#/components/schemas/Project"
  3680. }
  3681. }
  3682. }
  3683. },
  3684. "400": {
  3685. "description": "BadRequest | InvalidRequestError",
  3686. "content": {
  3687. "application/json": {
  3688. "schema": {
  3689. "anyOf": [
  3690. {
  3691. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3692. },
  3693. {
  3694. "$ref": "#/components/schemas/InvalidRequestError"
  3695. }
  3696. ]
  3697. }
  3698. }
  3699. }
  3700. },
  3701. "404": {
  3702. "description": "ProjectNotFoundError",
  3703. "content": {
  3704. "application/json": {
  3705. "schema": {
  3706. "$ref": "#/components/schemas/ProjectNotFoundError"
  3707. }
  3708. }
  3709. }
  3710. }
  3711. },
  3712. "description": "Update project properties such as name, icon, and commands.",
  3713. "summary": "Update project",
  3714. "requestBody": {
  3715. "content": {
  3716. "application/json": {
  3717. "schema": {
  3718. "type": "object",
  3719. "properties": {
  3720. "name": {
  3721. "type": "string"
  3722. },
  3723. "icon": {
  3724. "type": "object",
  3725. "properties": {
  3726. "url": {
  3727. "type": "string"
  3728. },
  3729. "override": {
  3730. "type": "string"
  3731. },
  3732. "color": {
  3733. "type": "string"
  3734. }
  3735. },
  3736. "additionalProperties": false
  3737. },
  3738. "commands": {
  3739. "type": "object",
  3740. "properties": {
  3741. "start": {
  3742. "type": "string",
  3743. "description": "Startup script to run when creating a new workspace (worktree)"
  3744. }
  3745. },
  3746. "additionalProperties": false
  3747. }
  3748. },
  3749. "additionalProperties": false
  3750. }
  3751. }
  3752. }
  3753. },
  3754. "x-codeSamples": [
  3755. {
  3756. "lang": "js",
  3757. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3758. }
  3759. ]
  3760. }
  3761. },
  3762. "/project/{projectID}/directories": {
  3763. "get": {
  3764. "tags": ["project"],
  3765. "operationId": "project.directories",
  3766. "parameters": [
  3767. {
  3768. "name": "projectID",
  3769. "in": "path",
  3770. "schema": {
  3771. "type": "string"
  3772. },
  3773. "required": true
  3774. },
  3775. {
  3776. "name": "directory",
  3777. "in": "query",
  3778. "schema": {
  3779. "type": "string"
  3780. },
  3781. "required": false
  3782. },
  3783. {
  3784. "name": "workspace",
  3785. "in": "query",
  3786. "schema": {
  3787. "type": "string"
  3788. },
  3789. "required": false
  3790. }
  3791. ],
  3792. "responses": {
  3793. "200": {
  3794. "description": "Project directories",
  3795. "content": {
  3796. "application/json": {
  3797. "schema": {
  3798. "$ref": "#/components/schemas/ProjectDirectories"
  3799. }
  3800. }
  3801. }
  3802. },
  3803. "400": {
  3804. "description": "Bad request",
  3805. "content": {
  3806. "application/json": {
  3807. "schema": {
  3808. "$ref": "#/components/schemas/BadRequestError"
  3809. }
  3810. }
  3811. }
  3812. }
  3813. },
  3814. "description": "List known local absolute directories for a project.",
  3815. "summary": "List project directories",
  3816. "x-codeSamples": [
  3817. {
  3818. "lang": "js",
  3819. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.directories({\n ...\n})"
  3820. }
  3821. ]
  3822. }
  3823. },
  3824. "/experimental/project/{projectID}/copy": {
  3825. "post": {
  3826. "tags": ["projectCopy"],
  3827. "operationId": "experimental.projectCopy.create",
  3828. "parameters": [
  3829. {
  3830. "name": "projectID",
  3831. "in": "path",
  3832. "schema": {
  3833. "type": "string"
  3834. },
  3835. "required": true
  3836. },
  3837. {
  3838. "name": "workspace",
  3839. "in": "query",
  3840. "schema": {
  3841. "type": "string"
  3842. },
  3843. "required": false
  3844. }
  3845. ],
  3846. "responses": {
  3847. "200": {
  3848. "description": "Project copy created",
  3849. "content": {
  3850. "application/json": {
  3851. "schema": {
  3852. "$ref": "#/components/schemas/ProjectCopyCopy"
  3853. }
  3854. }
  3855. }
  3856. },
  3857. "400": {
  3858. "description": "ProjectCopyError | InvalidRequestError",
  3859. "content": {
  3860. "application/json": {
  3861. "schema": {
  3862. "anyOf": [
  3863. {
  3864. "$ref": "#/components/schemas/ProjectCopyError"
  3865. },
  3866. {
  3867. "$ref": "#/components/schemas/InvalidRequestError"
  3868. }
  3869. ]
  3870. }
  3871. }
  3872. }
  3873. }
  3874. },
  3875. "description": "Create a local physical copy of a project using the selected strategy.",
  3876. "summary": "Create project copy",
  3877. "requestBody": {
  3878. "content": {
  3879. "application/json": {
  3880. "schema": {
  3881. "type": "object",
  3882. "properties": {
  3883. "strategy": {
  3884. "type": "string",
  3885. "enum": ["git_worktree"]
  3886. },
  3887. "directory": {
  3888. "type": "string"
  3889. },
  3890. "name": {
  3891. "type": "string"
  3892. },
  3893. "context": {
  3894. "type": "string"
  3895. }
  3896. },
  3897. "required": ["strategy", "directory"],
  3898. "additionalProperties": false
  3899. }
  3900. }
  3901. }
  3902. },
  3903. "x-codeSamples": [
  3904. {
  3905. "lang": "js",
  3906. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.create({\n ...\n})"
  3907. }
  3908. ]
  3909. },
  3910. "delete": {
  3911. "tags": ["projectCopy"],
  3912. "operationId": "experimental.projectCopy.remove",
  3913. "parameters": [
  3914. {
  3915. "name": "projectID",
  3916. "in": "path",
  3917. "schema": {
  3918. "type": "string"
  3919. },
  3920. "required": true
  3921. },
  3922. {
  3923. "name": "directory",
  3924. "in": "query",
  3925. "schema": {
  3926. "type": "string"
  3927. },
  3928. "required": false
  3929. },
  3930. {
  3931. "name": "workspace",
  3932. "in": "query",
  3933. "schema": {
  3934. "type": "string"
  3935. },
  3936. "required": false
  3937. }
  3938. ],
  3939. "responses": {
  3940. "204": {
  3941. "description": "Project copy removed"
  3942. },
  3943. "400": {
  3944. "description": "ProjectCopyError | InvalidRequestError",
  3945. "content": {
  3946. "application/json": {
  3947. "schema": {
  3948. "anyOf": [
  3949. {
  3950. "$ref": "#/components/schemas/ProjectCopyError"
  3951. },
  3952. {
  3953. "$ref": "#/components/schemas/InvalidRequestError"
  3954. }
  3955. ]
  3956. }
  3957. }
  3958. }
  3959. }
  3960. },
  3961. "description": "Remove a local physical copy of a project using the selected strategy.",
  3962. "summary": "Remove project copy",
  3963. "requestBody": {
  3964. "content": {
  3965. "application/json": {
  3966. "schema": {
  3967. "type": "object",
  3968. "properties": {
  3969. "directory": {
  3970. "type": "string"
  3971. }
  3972. },
  3973. "required": ["directory"],
  3974. "additionalProperties": false
  3975. }
  3976. }
  3977. }
  3978. },
  3979. "x-codeSamples": [
  3980. {
  3981. "lang": "js",
  3982. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.remove({\n ...\n})"
  3983. }
  3984. ]
  3985. }
  3986. },
  3987. "/experimental/project/{projectID}/copy/refresh": {
  3988. "post": {
  3989. "tags": ["projectCopy"],
  3990. "operationId": "experimental.projectCopy.refresh",
  3991. "parameters": [
  3992. {
  3993. "name": "projectID",
  3994. "in": "path",
  3995. "schema": {
  3996. "type": "string"
  3997. },
  3998. "required": true
  3999. },
  4000. {
  4001. "name": "directory",
  4002. "in": "query",
  4003. "schema": {
  4004. "type": "string"
  4005. },
  4006. "required": false
  4007. },
  4008. {
  4009. "name": "workspace",
  4010. "in": "query",
  4011. "schema": {
  4012. "type": "string"
  4013. },
  4014. "required": false
  4015. }
  4016. ],
  4017. "responses": {
  4018. "204": {
  4019. "description": "Project copies refreshed"
  4020. },
  4021. "400": {
  4022. "description": "ProjectCopyError | InvalidRequestError",
  4023. "content": {
  4024. "application/json": {
  4025. "schema": {
  4026. "anyOf": [
  4027. {
  4028. "$ref": "#/components/schemas/ProjectCopyError"
  4029. },
  4030. {
  4031. "$ref": "#/components/schemas/InvalidRequestError"
  4032. }
  4033. ]
  4034. }
  4035. }
  4036. }
  4037. }
  4038. },
  4039. "description": "Discover local project copies using one or all configured strategies.",
  4040. "summary": "Refresh project copies",
  4041. "x-codeSamples": [
  4042. {
  4043. "lang": "js",
  4044. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.refresh({\n ...\n})"
  4045. }
  4046. ]
  4047. }
  4048. },
  4049. "/pty/shells": {
  4050. "get": {
  4051. "tags": ["pty"],
  4052. "operationId": "pty.shells",
  4053. "parameters": [
  4054. {
  4055. "name": "directory",
  4056. "in": "query",
  4057. "schema": {
  4058. "type": "string"
  4059. },
  4060. "required": false
  4061. },
  4062. {
  4063. "name": "workspace",
  4064. "in": "query",
  4065. "schema": {
  4066. "type": "string"
  4067. },
  4068. "required": false
  4069. }
  4070. ],
  4071. "responses": {
  4072. "200": {
  4073. "description": "List of shells",
  4074. "content": {
  4075. "application/json": {
  4076. "schema": {
  4077. "type": "array",
  4078. "items": {
  4079. "type": "object",
  4080. "properties": {
  4081. "path": {
  4082. "type": "string"
  4083. },
  4084. "name": {
  4085. "type": "string"
  4086. },
  4087. "acceptable": {
  4088. "type": "boolean"
  4089. }
  4090. },
  4091. "required": ["path", "name", "acceptable"],
  4092. "additionalProperties": false
  4093. },
  4094. "description": "List of shells"
  4095. }
  4096. }
  4097. }
  4098. },
  4099. "400": {
  4100. "description": "Bad request",
  4101. "content": {
  4102. "application/json": {
  4103. "schema": {
  4104. "$ref": "#/components/schemas/BadRequestError"
  4105. }
  4106. }
  4107. }
  4108. }
  4109. },
  4110. "description": "Get a list of available shells on the system.",
  4111. "summary": "List available shells",
  4112. "x-codeSamples": [
  4113. {
  4114. "lang": "js",
  4115. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  4116. }
  4117. ]
  4118. }
  4119. },
  4120. "/pty": {
  4121. "get": {
  4122. "tags": ["pty"],
  4123. "operationId": "pty.list",
  4124. "parameters": [
  4125. {
  4126. "name": "directory",
  4127. "in": "query",
  4128. "schema": {
  4129. "type": "string"
  4130. },
  4131. "required": false
  4132. },
  4133. {
  4134. "name": "workspace",
  4135. "in": "query",
  4136. "schema": {
  4137. "type": "string"
  4138. },
  4139. "required": false
  4140. }
  4141. ],
  4142. "responses": {
  4143. "200": {
  4144. "description": "List of sessions",
  4145. "content": {
  4146. "application/json": {
  4147. "schema": {
  4148. "type": "array",
  4149. "items": {
  4150. "$ref": "#/components/schemas/Pty"
  4151. },
  4152. "description": "List of sessions"
  4153. }
  4154. }
  4155. }
  4156. },
  4157. "400": {
  4158. "description": "Bad request",
  4159. "content": {
  4160. "application/json": {
  4161. "schema": {
  4162. "$ref": "#/components/schemas/BadRequestError"
  4163. }
  4164. }
  4165. }
  4166. }
  4167. },
  4168. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  4169. "summary": "List PTY sessions",
  4170. "x-codeSamples": [
  4171. {
  4172. "lang": "js",
  4173. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  4174. }
  4175. ]
  4176. },
  4177. "post": {
  4178. "tags": ["pty"],
  4179. "operationId": "pty.create",
  4180. "parameters": [
  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": "Created session",
  4201. "content": {
  4202. "application/json": {
  4203. "schema": {
  4204. "$ref": "#/components/schemas/Pty"
  4205. }
  4206. }
  4207. }
  4208. },
  4209. "400": {
  4210. "description": "BadRequest | InvalidRequestError",
  4211. "content": {
  4212. "application/json": {
  4213. "schema": {
  4214. "anyOf": [
  4215. {
  4216. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4217. },
  4218. {
  4219. "$ref": "#/components/schemas/InvalidRequestError"
  4220. }
  4221. ]
  4222. }
  4223. }
  4224. }
  4225. }
  4226. },
  4227. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  4228. "summary": "Create PTY session",
  4229. "requestBody": {
  4230. "content": {
  4231. "application/json": {
  4232. "schema": {
  4233. "type": "object",
  4234. "properties": {
  4235. "command": {
  4236. "type": "string"
  4237. },
  4238. "args": {
  4239. "type": "array",
  4240. "items": {
  4241. "type": "string"
  4242. }
  4243. },
  4244. "cwd": {
  4245. "type": "string"
  4246. },
  4247. "title": {
  4248. "type": "string"
  4249. },
  4250. "env": {
  4251. "type": "object",
  4252. "additionalProperties": {
  4253. "type": "string"
  4254. }
  4255. }
  4256. },
  4257. "additionalProperties": false
  4258. }
  4259. }
  4260. }
  4261. },
  4262. "x-codeSamples": [
  4263. {
  4264. "lang": "js",
  4265. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  4266. }
  4267. ]
  4268. }
  4269. },
  4270. "/pty/{ptyID}": {
  4271. "get": {
  4272. "tags": ["pty"],
  4273. "operationId": "pty.get",
  4274. "parameters": [
  4275. {
  4276. "name": "ptyID",
  4277. "in": "path",
  4278. "schema": {
  4279. "type": "string",
  4280. "pattern": "^pty"
  4281. },
  4282. "required": true
  4283. },
  4284. {
  4285. "name": "directory",
  4286. "in": "query",
  4287. "schema": {
  4288. "type": "string"
  4289. },
  4290. "required": false
  4291. },
  4292. {
  4293. "name": "workspace",
  4294. "in": "query",
  4295. "schema": {
  4296. "type": "string"
  4297. },
  4298. "required": false
  4299. }
  4300. ],
  4301. "responses": {
  4302. "200": {
  4303. "description": "Session info",
  4304. "content": {
  4305. "application/json": {
  4306. "schema": {
  4307. "$ref": "#/components/schemas/Pty"
  4308. }
  4309. }
  4310. }
  4311. },
  4312. "400": {
  4313. "description": "Bad request",
  4314. "content": {
  4315. "application/json": {
  4316. "schema": {
  4317. "$ref": "#/components/schemas/BadRequestError"
  4318. }
  4319. }
  4320. }
  4321. },
  4322. "404": {
  4323. "description": "PtyNotFoundError",
  4324. "content": {
  4325. "application/json": {
  4326. "schema": {
  4327. "$ref": "#/components/schemas/PtyNotFoundError"
  4328. }
  4329. }
  4330. }
  4331. }
  4332. },
  4333. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  4334. "summary": "Get PTY session",
  4335. "x-codeSamples": [
  4336. {
  4337. "lang": "js",
  4338. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  4339. }
  4340. ]
  4341. },
  4342. "put": {
  4343. "tags": ["pty"],
  4344. "operationId": "pty.update",
  4345. "parameters": [
  4346. {
  4347. "name": "ptyID",
  4348. "in": "path",
  4349. "schema": {
  4350. "type": "string",
  4351. "pattern": "^pty"
  4352. },
  4353. "required": true
  4354. },
  4355. {
  4356. "name": "directory",
  4357. "in": "query",
  4358. "schema": {
  4359. "type": "string"
  4360. },
  4361. "required": false
  4362. },
  4363. {
  4364. "name": "workspace",
  4365. "in": "query",
  4366. "schema": {
  4367. "type": "string"
  4368. },
  4369. "required": false
  4370. }
  4371. ],
  4372. "responses": {
  4373. "200": {
  4374. "description": "Updated session",
  4375. "content": {
  4376. "application/json": {
  4377. "schema": {
  4378. "$ref": "#/components/schemas/Pty"
  4379. }
  4380. }
  4381. }
  4382. },
  4383. "400": {
  4384. "description": "BadRequest | InvalidRequestError",
  4385. "content": {
  4386. "application/json": {
  4387. "schema": {
  4388. "anyOf": [
  4389. {
  4390. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4391. },
  4392. {
  4393. "$ref": "#/components/schemas/InvalidRequestError"
  4394. }
  4395. ]
  4396. }
  4397. }
  4398. }
  4399. },
  4400. "404": {
  4401. "description": "PtyNotFoundError",
  4402. "content": {
  4403. "application/json": {
  4404. "schema": {
  4405. "$ref": "#/components/schemas/PtyNotFoundError"
  4406. }
  4407. }
  4408. }
  4409. }
  4410. },
  4411. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4412. "summary": "Update PTY session",
  4413. "requestBody": {
  4414. "content": {
  4415. "application/json": {
  4416. "schema": {
  4417. "type": "object",
  4418. "properties": {
  4419. "title": {
  4420. "type": "string"
  4421. },
  4422. "size": {
  4423. "type": "object",
  4424. "properties": {
  4425. "rows": {
  4426. "type": "integer",
  4427. "exclusiveMinimum": 0
  4428. },
  4429. "cols": {
  4430. "type": "integer",
  4431. "exclusiveMinimum": 0
  4432. }
  4433. },
  4434. "required": ["rows", "cols"],
  4435. "additionalProperties": false
  4436. }
  4437. },
  4438. "additionalProperties": false
  4439. }
  4440. }
  4441. }
  4442. },
  4443. "x-codeSamples": [
  4444. {
  4445. "lang": "js",
  4446. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4447. }
  4448. ]
  4449. },
  4450. "delete": {
  4451. "tags": ["pty"],
  4452. "operationId": "pty.remove",
  4453. "parameters": [
  4454. {
  4455. "name": "ptyID",
  4456. "in": "path",
  4457. "schema": {
  4458. "type": "string",
  4459. "pattern": "^pty"
  4460. },
  4461. "required": true
  4462. },
  4463. {
  4464. "name": "directory",
  4465. "in": "query",
  4466. "schema": {
  4467. "type": "string"
  4468. },
  4469. "required": false
  4470. },
  4471. {
  4472. "name": "workspace",
  4473. "in": "query",
  4474. "schema": {
  4475. "type": "string"
  4476. },
  4477. "required": false
  4478. }
  4479. ],
  4480. "responses": {
  4481. "200": {
  4482. "description": "Session removed",
  4483. "content": {
  4484. "application/json": {
  4485. "schema": {
  4486. "type": "boolean",
  4487. "description": "Session removed"
  4488. }
  4489. }
  4490. }
  4491. },
  4492. "400": {
  4493. "description": "Bad request",
  4494. "content": {
  4495. "application/json": {
  4496. "schema": {
  4497. "$ref": "#/components/schemas/BadRequestError"
  4498. }
  4499. }
  4500. }
  4501. },
  4502. "404": {
  4503. "description": "PtyNotFoundError",
  4504. "content": {
  4505. "application/json": {
  4506. "schema": {
  4507. "$ref": "#/components/schemas/PtyNotFoundError"
  4508. }
  4509. }
  4510. }
  4511. }
  4512. },
  4513. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4514. "summary": "Remove PTY session",
  4515. "x-codeSamples": [
  4516. {
  4517. "lang": "js",
  4518. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4519. }
  4520. ]
  4521. }
  4522. },
  4523. "/pty/{ptyID}/connect-token": {
  4524. "post": {
  4525. "tags": ["pty"],
  4526. "operationId": "pty.connectToken",
  4527. "parameters": [
  4528. {
  4529. "name": "ptyID",
  4530. "in": "path",
  4531. "schema": {
  4532. "type": "string",
  4533. "pattern": "^pty"
  4534. },
  4535. "required": true
  4536. },
  4537. {
  4538. "name": "directory",
  4539. "in": "query",
  4540. "schema": {
  4541. "type": "string"
  4542. },
  4543. "required": false
  4544. },
  4545. {
  4546. "name": "workspace",
  4547. "in": "query",
  4548. "schema": {
  4549. "type": "string"
  4550. },
  4551. "required": false
  4552. }
  4553. ],
  4554. "responses": {
  4555. "200": {
  4556. "description": "WebSocket connect token",
  4557. "content": {
  4558. "application/json": {
  4559. "schema": {
  4560. "type": "object",
  4561. "properties": {
  4562. "ticket": {
  4563. "type": "string"
  4564. },
  4565. "expires_in": {
  4566. "type": "integer",
  4567. "exclusiveMinimum": 0
  4568. }
  4569. },
  4570. "required": ["ticket", "expires_in"],
  4571. "additionalProperties": false,
  4572. "description": "WebSocket connect token"
  4573. }
  4574. }
  4575. }
  4576. },
  4577. "400": {
  4578. "description": "Bad request",
  4579. "content": {
  4580. "application/json": {
  4581. "schema": {
  4582. "$ref": "#/components/schemas/BadRequestError"
  4583. }
  4584. }
  4585. }
  4586. },
  4587. "403": {
  4588. "description": "PtyForbiddenError",
  4589. "content": {
  4590. "application/json": {
  4591. "schema": {
  4592. "$ref": "#/components/schemas/PtyForbiddenError"
  4593. }
  4594. }
  4595. }
  4596. },
  4597. "404": {
  4598. "description": "PtyNotFoundError",
  4599. "content": {
  4600. "application/json": {
  4601. "schema": {
  4602. "$ref": "#/components/schemas/PtyNotFoundError"
  4603. }
  4604. }
  4605. }
  4606. }
  4607. },
  4608. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4609. "summary": "Create PTY WebSocket token",
  4610. "x-codeSamples": [
  4611. {
  4612. "lang": "js",
  4613. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4614. }
  4615. ]
  4616. }
  4617. },
  4618. "/question": {
  4619. "get": {
  4620. "tags": ["question"],
  4621. "operationId": "question.list",
  4622. "parameters": [
  4623. {
  4624. "name": "directory",
  4625. "in": "query",
  4626. "schema": {
  4627. "type": "string"
  4628. },
  4629. "required": false
  4630. },
  4631. {
  4632. "name": "workspace",
  4633. "in": "query",
  4634. "schema": {
  4635. "type": "string"
  4636. },
  4637. "required": false
  4638. }
  4639. ],
  4640. "responses": {
  4641. "200": {
  4642. "description": "List of pending questions",
  4643. "content": {
  4644. "application/json": {
  4645. "schema": {
  4646. "type": "array",
  4647. "items": {
  4648. "$ref": "#/components/schemas/QuestionRequest"
  4649. },
  4650. "description": "List of pending questions"
  4651. }
  4652. }
  4653. }
  4654. },
  4655. "400": {
  4656. "description": "Bad request",
  4657. "content": {
  4658. "application/json": {
  4659. "schema": {
  4660. "$ref": "#/components/schemas/BadRequestError"
  4661. }
  4662. }
  4663. }
  4664. }
  4665. },
  4666. "description": "Get all pending question requests across all sessions.",
  4667. "summary": "List pending questions",
  4668. "x-codeSamples": [
  4669. {
  4670. "lang": "js",
  4671. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4672. }
  4673. ]
  4674. }
  4675. },
  4676. "/question/{requestID}/reply": {
  4677. "post": {
  4678. "tags": ["question"],
  4679. "operationId": "question.reply",
  4680. "parameters": [
  4681. {
  4682. "name": "requestID",
  4683. "in": "path",
  4684. "schema": {
  4685. "type": "string",
  4686. "pattern": "^que"
  4687. },
  4688. "required": true
  4689. },
  4690. {
  4691. "name": "directory",
  4692. "in": "query",
  4693. "schema": {
  4694. "type": "string"
  4695. },
  4696. "required": false
  4697. },
  4698. {
  4699. "name": "workspace",
  4700. "in": "query",
  4701. "schema": {
  4702. "type": "string"
  4703. },
  4704. "required": false
  4705. }
  4706. ],
  4707. "responses": {
  4708. "200": {
  4709. "description": "Question answered successfully",
  4710. "content": {
  4711. "application/json": {
  4712. "schema": {
  4713. "type": "boolean",
  4714. "description": "Question answered successfully"
  4715. }
  4716. }
  4717. }
  4718. },
  4719. "400": {
  4720. "description": "BadRequest | InvalidRequestError",
  4721. "content": {
  4722. "application/json": {
  4723. "schema": {
  4724. "anyOf": [
  4725. {
  4726. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4727. },
  4728. {
  4729. "$ref": "#/components/schemas/InvalidRequestError"
  4730. }
  4731. ]
  4732. }
  4733. }
  4734. }
  4735. },
  4736. "404": {
  4737. "description": "QuestionNotFoundError",
  4738. "content": {
  4739. "application/json": {
  4740. "schema": {
  4741. "$ref": "#/components/schemas/QuestionNotFoundError"
  4742. }
  4743. }
  4744. }
  4745. }
  4746. },
  4747. "description": "Provide answers to a question request from the AI assistant.",
  4748. "summary": "Reply to question request",
  4749. "requestBody": {
  4750. "content": {
  4751. "application/json": {
  4752. "schema": {
  4753. "type": "object",
  4754. "properties": {
  4755. "answers": {
  4756. "type": "array",
  4757. "items": {
  4758. "$ref": "#/components/schemas/QuestionAnswer"
  4759. },
  4760. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4761. }
  4762. },
  4763. "required": ["answers"],
  4764. "additionalProperties": false
  4765. }
  4766. }
  4767. }
  4768. },
  4769. "x-codeSamples": [
  4770. {
  4771. "lang": "js",
  4772. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4773. }
  4774. ]
  4775. }
  4776. },
  4777. "/question/{requestID}/reject": {
  4778. "post": {
  4779. "tags": ["question"],
  4780. "operationId": "question.reject",
  4781. "parameters": [
  4782. {
  4783. "name": "requestID",
  4784. "in": "path",
  4785. "schema": {
  4786. "type": "string",
  4787. "pattern": "^que"
  4788. },
  4789. "required": true
  4790. },
  4791. {
  4792. "name": "directory",
  4793. "in": "query",
  4794. "schema": {
  4795. "type": "string"
  4796. },
  4797. "required": false
  4798. },
  4799. {
  4800. "name": "workspace",
  4801. "in": "query",
  4802. "schema": {
  4803. "type": "string"
  4804. },
  4805. "required": false
  4806. }
  4807. ],
  4808. "responses": {
  4809. "200": {
  4810. "description": "Question rejected successfully",
  4811. "content": {
  4812. "application/json": {
  4813. "schema": {
  4814. "type": "boolean",
  4815. "description": "Question rejected successfully"
  4816. }
  4817. }
  4818. }
  4819. },
  4820. "400": {
  4821. "description": "BadRequest | InvalidRequestError",
  4822. "content": {
  4823. "application/json": {
  4824. "schema": {
  4825. "anyOf": [
  4826. {
  4827. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4828. },
  4829. {
  4830. "$ref": "#/components/schemas/InvalidRequestError"
  4831. }
  4832. ]
  4833. }
  4834. }
  4835. }
  4836. },
  4837. "404": {
  4838. "description": "QuestionNotFoundError",
  4839. "content": {
  4840. "application/json": {
  4841. "schema": {
  4842. "$ref": "#/components/schemas/QuestionNotFoundError"
  4843. }
  4844. }
  4845. }
  4846. }
  4847. },
  4848. "description": "Reject a question request from the AI assistant.",
  4849. "summary": "Reject question request",
  4850. "x-codeSamples": [
  4851. {
  4852. "lang": "js",
  4853. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4854. }
  4855. ]
  4856. }
  4857. },
  4858. "/permission": {
  4859. "get": {
  4860. "tags": ["permission"],
  4861. "operationId": "permission.list",
  4862. "parameters": [
  4863. {
  4864. "name": "directory",
  4865. "in": "query",
  4866. "schema": {
  4867. "type": "string"
  4868. },
  4869. "required": false
  4870. },
  4871. {
  4872. "name": "workspace",
  4873. "in": "query",
  4874. "schema": {
  4875. "type": "string"
  4876. },
  4877. "required": false
  4878. }
  4879. ],
  4880. "responses": {
  4881. "200": {
  4882. "description": "List of pending permissions",
  4883. "content": {
  4884. "application/json": {
  4885. "schema": {
  4886. "type": "array",
  4887. "items": {
  4888. "$ref": "#/components/schemas/PermissionRequest"
  4889. },
  4890. "description": "List of pending permissions"
  4891. }
  4892. }
  4893. }
  4894. },
  4895. "400": {
  4896. "description": "Bad request",
  4897. "content": {
  4898. "application/json": {
  4899. "schema": {
  4900. "$ref": "#/components/schemas/BadRequestError"
  4901. }
  4902. }
  4903. }
  4904. }
  4905. },
  4906. "description": "Get all pending permission requests across all sessions.",
  4907. "summary": "List pending permissions",
  4908. "x-codeSamples": [
  4909. {
  4910. "lang": "js",
  4911. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4912. }
  4913. ]
  4914. }
  4915. },
  4916. "/permission/{requestID}/reply": {
  4917. "post": {
  4918. "tags": ["permission"],
  4919. "operationId": "permission.reply",
  4920. "parameters": [
  4921. {
  4922. "name": "requestID",
  4923. "in": "path",
  4924. "schema": {
  4925. "type": "string",
  4926. "pattern": "^per"
  4927. },
  4928. "required": true
  4929. },
  4930. {
  4931. "name": "directory",
  4932. "in": "query",
  4933. "schema": {
  4934. "type": "string"
  4935. },
  4936. "required": false
  4937. },
  4938. {
  4939. "name": "workspace",
  4940. "in": "query",
  4941. "schema": {
  4942. "type": "string"
  4943. },
  4944. "required": false
  4945. }
  4946. ],
  4947. "responses": {
  4948. "200": {
  4949. "description": "Permission processed successfully",
  4950. "content": {
  4951. "application/json": {
  4952. "schema": {
  4953. "type": "boolean",
  4954. "description": "Permission processed successfully"
  4955. }
  4956. }
  4957. }
  4958. },
  4959. "400": {
  4960. "description": "BadRequest | InvalidRequestError",
  4961. "content": {
  4962. "application/json": {
  4963. "schema": {
  4964. "anyOf": [
  4965. {
  4966. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4967. },
  4968. {
  4969. "$ref": "#/components/schemas/InvalidRequestError"
  4970. }
  4971. ]
  4972. }
  4973. }
  4974. }
  4975. },
  4976. "404": {
  4977. "description": "PermissionNotFoundError",
  4978. "content": {
  4979. "application/json": {
  4980. "schema": {
  4981. "$ref": "#/components/schemas/PermissionNotFoundError"
  4982. }
  4983. }
  4984. }
  4985. }
  4986. },
  4987. "description": "Approve or deny a permission request from the AI assistant.",
  4988. "summary": "Respond to permission request",
  4989. "requestBody": {
  4990. "content": {
  4991. "application/json": {
  4992. "schema": {
  4993. "type": "object",
  4994. "properties": {
  4995. "reply": {
  4996. "type": "string",
  4997. "enum": ["once", "always", "reject"]
  4998. },
  4999. "message": {
  5000. "type": "string"
  5001. }
  5002. },
  5003. "required": ["reply"],
  5004. "additionalProperties": false
  5005. }
  5006. }
  5007. }
  5008. },
  5009. "x-codeSamples": [
  5010. {
  5011. "lang": "js",
  5012. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  5013. }
  5014. ]
  5015. }
  5016. },
  5017. "/provider": {
  5018. "get": {
  5019. "tags": ["provider"],
  5020. "operationId": "provider.list",
  5021. "parameters": [
  5022. {
  5023. "name": "directory",
  5024. "in": "query",
  5025. "schema": {
  5026. "type": "string"
  5027. },
  5028. "required": false
  5029. },
  5030. {
  5031. "name": "workspace",
  5032. "in": "query",
  5033. "schema": {
  5034. "type": "string"
  5035. },
  5036. "required": false
  5037. }
  5038. ],
  5039. "responses": {
  5040. "200": {
  5041. "description": "List of providers",
  5042. "content": {
  5043. "application/json": {
  5044. "schema": {
  5045. "type": "object",
  5046. "properties": {
  5047. "all": {
  5048. "type": "array",
  5049. "items": {
  5050. "$ref": "#/components/schemas/Provider"
  5051. }
  5052. },
  5053. "default": {
  5054. "type": "object",
  5055. "additionalProperties": {
  5056. "type": "string"
  5057. }
  5058. },
  5059. "connected": {
  5060. "type": "array",
  5061. "items": {
  5062. "type": "string"
  5063. }
  5064. }
  5065. },
  5066. "required": ["all", "default", "connected"],
  5067. "additionalProperties": false,
  5068. "description": "List of providers"
  5069. }
  5070. }
  5071. }
  5072. },
  5073. "400": {
  5074. "description": "Bad request",
  5075. "content": {
  5076. "application/json": {
  5077. "schema": {
  5078. "$ref": "#/components/schemas/BadRequestError"
  5079. }
  5080. }
  5081. }
  5082. }
  5083. },
  5084. "description": "Get a list of all available AI providers, including both available and connected ones.",
  5085. "summary": "List providers",
  5086. "x-codeSamples": [
  5087. {
  5088. "lang": "js",
  5089. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  5090. }
  5091. ]
  5092. }
  5093. },
  5094. "/provider/auth": {
  5095. "get": {
  5096. "tags": ["provider"],
  5097. "operationId": "provider.auth",
  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": "Provider auth methods",
  5119. "content": {
  5120. "application/json": {
  5121. "schema": {
  5122. "type": "object",
  5123. "additionalProperties": {
  5124. "type": "array",
  5125. "items": {
  5126. "$ref": "#/components/schemas/ProviderAuthMethod"
  5127. }
  5128. },
  5129. "description": "Provider auth methods"
  5130. }
  5131. }
  5132. }
  5133. },
  5134. "400": {
  5135. "description": "Bad request",
  5136. "content": {
  5137. "application/json": {
  5138. "schema": {
  5139. "$ref": "#/components/schemas/BadRequestError"
  5140. }
  5141. }
  5142. }
  5143. }
  5144. },
  5145. "description": "Retrieve available authentication methods for all AI providers.",
  5146. "summary": "Get provider auth methods",
  5147. "x-codeSamples": [
  5148. {
  5149. "lang": "js",
  5150. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  5151. }
  5152. ]
  5153. }
  5154. },
  5155. "/provider/{providerID}/oauth/authorize": {
  5156. "post": {
  5157. "tags": ["provider"],
  5158. "operationId": "provider.oauth.authorize",
  5159. "parameters": [
  5160. {
  5161. "name": "providerID",
  5162. "in": "path",
  5163. "schema": {
  5164. "type": "string"
  5165. },
  5166. "required": true
  5167. },
  5168. {
  5169. "name": "directory",
  5170. "in": "query",
  5171. "schema": {
  5172. "type": "string"
  5173. },
  5174. "required": false
  5175. },
  5176. {
  5177. "name": "workspace",
  5178. "in": "query",
  5179. "schema": {
  5180. "type": "string"
  5181. },
  5182. "required": false
  5183. }
  5184. ],
  5185. "responses": {
  5186. "200": {
  5187. "description": "Authorization URL and method",
  5188. "content": {
  5189. "application/json": {
  5190. "schema": {
  5191. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  5192. }
  5193. }
  5194. }
  5195. },
  5196. "400": {
  5197. "description": "ProviderAuthError | InvalidRequestError",
  5198. "content": {
  5199. "application/json": {
  5200. "schema": {
  5201. "anyOf": [
  5202. {
  5203. "$ref": "#/components/schemas/ProviderAuthError1"
  5204. },
  5205. {
  5206. "$ref": "#/components/schemas/InvalidRequestError"
  5207. }
  5208. ]
  5209. }
  5210. }
  5211. }
  5212. }
  5213. },
  5214. "description": "Start the OAuth authorization flow for a provider.",
  5215. "summary": "Start OAuth authorization",
  5216. "requestBody": {
  5217. "content": {
  5218. "application/json": {
  5219. "schema": {
  5220. "type": "object",
  5221. "properties": {
  5222. "method": {
  5223. "type": "number",
  5224. "description": "Auth method index"
  5225. },
  5226. "inputs": {
  5227. "type": "object",
  5228. "additionalProperties": {
  5229. "type": "string"
  5230. }
  5231. }
  5232. },
  5233. "required": ["method"],
  5234. "additionalProperties": false
  5235. }
  5236. }
  5237. }
  5238. },
  5239. "x-codeSamples": [
  5240. {
  5241. "lang": "js",
  5242. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  5243. }
  5244. ]
  5245. }
  5246. },
  5247. "/provider/{providerID}/oauth/callback": {
  5248. "post": {
  5249. "tags": ["provider"],
  5250. "operationId": "provider.oauth.callback",
  5251. "parameters": [
  5252. {
  5253. "name": "providerID",
  5254. "in": "path",
  5255. "schema": {
  5256. "type": "string"
  5257. },
  5258. "required": true
  5259. },
  5260. {
  5261. "name": "directory",
  5262. "in": "query",
  5263. "schema": {
  5264. "type": "string"
  5265. },
  5266. "required": false
  5267. },
  5268. {
  5269. "name": "workspace",
  5270. "in": "query",
  5271. "schema": {
  5272. "type": "string"
  5273. },
  5274. "required": false
  5275. }
  5276. ],
  5277. "responses": {
  5278. "200": {
  5279. "description": "OAuth callback processed successfully",
  5280. "content": {
  5281. "application/json": {
  5282. "schema": {
  5283. "type": "boolean",
  5284. "description": "OAuth callback processed successfully"
  5285. }
  5286. }
  5287. }
  5288. },
  5289. "400": {
  5290. "description": "ProviderAuthError | InvalidRequestError",
  5291. "content": {
  5292. "application/json": {
  5293. "schema": {
  5294. "anyOf": [
  5295. {
  5296. "$ref": "#/components/schemas/ProviderAuthError1"
  5297. },
  5298. {
  5299. "$ref": "#/components/schemas/InvalidRequestError"
  5300. }
  5301. ]
  5302. }
  5303. }
  5304. }
  5305. }
  5306. },
  5307. "description": "Handle the OAuth callback from a provider after user authorization.",
  5308. "summary": "Handle OAuth callback",
  5309. "requestBody": {
  5310. "content": {
  5311. "application/json": {
  5312. "schema": {
  5313. "type": "object",
  5314. "properties": {
  5315. "method": {
  5316. "type": "number",
  5317. "description": "Auth method index"
  5318. },
  5319. "code": {
  5320. "type": "string"
  5321. }
  5322. },
  5323. "required": ["method"],
  5324. "additionalProperties": false
  5325. }
  5326. }
  5327. }
  5328. },
  5329. "x-codeSamples": [
  5330. {
  5331. "lang": "js",
  5332. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  5333. }
  5334. ]
  5335. }
  5336. },
  5337. "/session": {
  5338. "get": {
  5339. "tags": ["session"],
  5340. "operationId": "session.list",
  5341. "parameters": [
  5342. {
  5343. "name": "directory",
  5344. "in": "query",
  5345. "schema": {
  5346. "type": "string"
  5347. },
  5348. "required": false
  5349. },
  5350. {
  5351. "name": "workspace",
  5352. "in": "query",
  5353. "schema": {
  5354. "type": "string"
  5355. },
  5356. "required": false
  5357. },
  5358. {
  5359. "name": "scope",
  5360. "in": "query",
  5361. "schema": {
  5362. "type": "string",
  5363. "enum": ["project"]
  5364. },
  5365. "required": false
  5366. },
  5367. {
  5368. "name": "path",
  5369. "in": "query",
  5370. "schema": {
  5371. "type": "string"
  5372. },
  5373. "required": false
  5374. },
  5375. {
  5376. "name": "roots",
  5377. "in": "query",
  5378. "schema": {
  5379. "anyOf": [
  5380. {
  5381. "type": "boolean"
  5382. },
  5383. {
  5384. "type": "string",
  5385. "enum": ["true", "false"]
  5386. }
  5387. ]
  5388. },
  5389. "required": false
  5390. },
  5391. {
  5392. "name": "start",
  5393. "in": "query",
  5394. "schema": {
  5395. "type": "number"
  5396. },
  5397. "required": false
  5398. },
  5399. {
  5400. "name": "search",
  5401. "in": "query",
  5402. "schema": {
  5403. "type": "string"
  5404. },
  5405. "required": false
  5406. },
  5407. {
  5408. "name": "limit",
  5409. "in": "query",
  5410. "schema": {
  5411. "type": "number"
  5412. },
  5413. "required": false
  5414. }
  5415. ],
  5416. "responses": {
  5417. "200": {
  5418. "description": "List of sessions",
  5419. "content": {
  5420. "application/json": {
  5421. "schema": {
  5422. "type": "array",
  5423. "items": {
  5424. "$ref": "#/components/schemas/Session"
  5425. },
  5426. "description": "List of sessions"
  5427. }
  5428. }
  5429. }
  5430. },
  5431. "400": {
  5432. "description": "Bad request",
  5433. "content": {
  5434. "application/json": {
  5435. "schema": {
  5436. "$ref": "#/components/schemas/BadRequestError"
  5437. }
  5438. }
  5439. }
  5440. }
  5441. },
  5442. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5443. "summary": "List sessions",
  5444. "x-codeSamples": [
  5445. {
  5446. "lang": "js",
  5447. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5448. }
  5449. ]
  5450. },
  5451. "post": {
  5452. "tags": ["session"],
  5453. "operationId": "session.create",
  5454. "parameters": [
  5455. {
  5456. "name": "directory",
  5457. "in": "query",
  5458. "schema": {
  5459. "type": "string"
  5460. },
  5461. "required": false
  5462. },
  5463. {
  5464. "name": "workspace",
  5465. "in": "query",
  5466. "schema": {
  5467. "type": "string"
  5468. },
  5469. "required": false
  5470. }
  5471. ],
  5472. "responses": {
  5473. "200": {
  5474. "description": "Successfully created session",
  5475. "content": {
  5476. "application/json": {
  5477. "schema": {
  5478. "$ref": "#/components/schemas/Session"
  5479. }
  5480. }
  5481. }
  5482. },
  5483. "400": {
  5484. "description": "BadRequest | InvalidRequestError",
  5485. "content": {
  5486. "application/json": {
  5487. "schema": {
  5488. "anyOf": [
  5489. {
  5490. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5491. },
  5492. {
  5493. "$ref": "#/components/schemas/InvalidRequestError"
  5494. }
  5495. ]
  5496. }
  5497. }
  5498. }
  5499. }
  5500. },
  5501. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5502. "summary": "Create session",
  5503. "requestBody": {
  5504. "content": {
  5505. "application/json": {
  5506. "schema": {
  5507. "type": "object",
  5508. "properties": {
  5509. "parentID": {
  5510. "type": "string",
  5511. "pattern": "^ses"
  5512. },
  5513. "title": {
  5514. "type": "string"
  5515. },
  5516. "agent": {
  5517. "type": "string"
  5518. },
  5519. "model": {
  5520. "type": "object",
  5521. "properties": {
  5522. "id": {
  5523. "type": "string"
  5524. },
  5525. "providerID": {
  5526. "type": "string"
  5527. },
  5528. "variant": {
  5529. "type": "string"
  5530. }
  5531. },
  5532. "required": ["id", "providerID"],
  5533. "additionalProperties": false
  5534. },
  5535. "metadata": {
  5536. "type": "object"
  5537. },
  5538. "permission": {
  5539. "$ref": "#/components/schemas/PermissionRuleset"
  5540. },
  5541. "workspaceID": {
  5542. "type": "string",
  5543. "pattern": "^wrk"
  5544. }
  5545. },
  5546. "additionalProperties": false
  5547. }
  5548. }
  5549. }
  5550. },
  5551. "x-codeSamples": [
  5552. {
  5553. "lang": "js",
  5554. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5555. }
  5556. ]
  5557. }
  5558. },
  5559. "/session/status": {
  5560. "get": {
  5561. "tags": ["session"],
  5562. "operationId": "session.status",
  5563. "parameters": [
  5564. {
  5565. "name": "directory",
  5566. "in": "query",
  5567. "schema": {
  5568. "type": "string"
  5569. },
  5570. "required": false
  5571. },
  5572. {
  5573. "name": "workspace",
  5574. "in": "query",
  5575. "schema": {
  5576. "type": "string"
  5577. },
  5578. "required": false
  5579. }
  5580. ],
  5581. "responses": {
  5582. "200": {
  5583. "description": "Get session status",
  5584. "content": {
  5585. "application/json": {
  5586. "schema": {
  5587. "type": "object",
  5588. "additionalProperties": {
  5589. "$ref": "#/components/schemas/SessionStatus"
  5590. },
  5591. "description": "Get session status"
  5592. }
  5593. }
  5594. }
  5595. },
  5596. "400": {
  5597. "description": "BadRequest | InvalidRequestError",
  5598. "content": {
  5599. "application/json": {
  5600. "schema": {
  5601. "anyOf": [
  5602. {
  5603. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5604. },
  5605. {
  5606. "$ref": "#/components/schemas/InvalidRequestError"
  5607. }
  5608. ]
  5609. }
  5610. }
  5611. }
  5612. }
  5613. },
  5614. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5615. "summary": "Get session status",
  5616. "x-codeSamples": [
  5617. {
  5618. "lang": "js",
  5619. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5620. }
  5621. ]
  5622. }
  5623. },
  5624. "/session/{sessionID}": {
  5625. "get": {
  5626. "tags": ["session"],
  5627. "operationId": "session.get",
  5628. "parameters": [
  5629. {
  5630. "name": "sessionID",
  5631. "in": "path",
  5632. "schema": {
  5633. "type": "string",
  5634. "pattern": "^ses"
  5635. },
  5636. "required": true
  5637. },
  5638. {
  5639. "name": "directory",
  5640. "in": "query",
  5641. "schema": {
  5642. "type": "string"
  5643. },
  5644. "required": false
  5645. },
  5646. {
  5647. "name": "workspace",
  5648. "in": "query",
  5649. "schema": {
  5650. "type": "string"
  5651. },
  5652. "required": false
  5653. }
  5654. ],
  5655. "responses": {
  5656. "200": {
  5657. "description": "Get session",
  5658. "content": {
  5659. "application/json": {
  5660. "schema": {
  5661. "$ref": "#/components/schemas/Session"
  5662. }
  5663. }
  5664. }
  5665. },
  5666. "400": {
  5667. "description": "BadRequest | InvalidRequestError",
  5668. "content": {
  5669. "application/json": {
  5670. "schema": {
  5671. "anyOf": [
  5672. {
  5673. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5674. },
  5675. {
  5676. "$ref": "#/components/schemas/InvalidRequestError"
  5677. }
  5678. ]
  5679. }
  5680. }
  5681. }
  5682. },
  5683. "404": {
  5684. "description": "NotFoundError",
  5685. "content": {
  5686. "application/json": {
  5687. "schema": {
  5688. "$ref": "#/components/schemas/NotFoundError"
  5689. }
  5690. }
  5691. }
  5692. }
  5693. },
  5694. "description": "Retrieve detailed information about a specific OpenCode session.",
  5695. "summary": "Get session",
  5696. "x-codeSamples": [
  5697. {
  5698. "lang": "js",
  5699. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5700. }
  5701. ]
  5702. },
  5703. "delete": {
  5704. "tags": ["session"],
  5705. "operationId": "session.delete",
  5706. "parameters": [
  5707. {
  5708. "name": "sessionID",
  5709. "in": "path",
  5710. "schema": {
  5711. "type": "string",
  5712. "pattern": "^ses"
  5713. },
  5714. "required": true
  5715. },
  5716. {
  5717. "name": "directory",
  5718. "in": "query",
  5719. "schema": {
  5720. "type": "string"
  5721. },
  5722. "required": false
  5723. },
  5724. {
  5725. "name": "workspace",
  5726. "in": "query",
  5727. "schema": {
  5728. "type": "string"
  5729. },
  5730. "required": false
  5731. }
  5732. ],
  5733. "responses": {
  5734. "200": {
  5735. "description": "Successfully deleted session",
  5736. "content": {
  5737. "application/json": {
  5738. "schema": {
  5739. "type": "boolean",
  5740. "description": "Successfully deleted session"
  5741. }
  5742. }
  5743. }
  5744. },
  5745. "400": {
  5746. "description": "BadRequest | InvalidRequestError",
  5747. "content": {
  5748. "application/json": {
  5749. "schema": {
  5750. "anyOf": [
  5751. {
  5752. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5753. },
  5754. {
  5755. "$ref": "#/components/schemas/InvalidRequestError"
  5756. }
  5757. ]
  5758. }
  5759. }
  5760. }
  5761. },
  5762. "404": {
  5763. "description": "NotFoundError",
  5764. "content": {
  5765. "application/json": {
  5766. "schema": {
  5767. "$ref": "#/components/schemas/NotFoundError"
  5768. }
  5769. }
  5770. }
  5771. }
  5772. },
  5773. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5774. "summary": "Delete session",
  5775. "x-codeSamples": [
  5776. {
  5777. "lang": "js",
  5778. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5779. }
  5780. ]
  5781. },
  5782. "patch": {
  5783. "tags": ["session"],
  5784. "operationId": "session.update",
  5785. "parameters": [
  5786. {
  5787. "name": "sessionID",
  5788. "in": "path",
  5789. "schema": {
  5790. "type": "string",
  5791. "pattern": "^ses"
  5792. },
  5793. "required": true
  5794. },
  5795. {
  5796. "name": "directory",
  5797. "in": "query",
  5798. "schema": {
  5799. "type": "string"
  5800. },
  5801. "required": false
  5802. },
  5803. {
  5804. "name": "workspace",
  5805. "in": "query",
  5806. "schema": {
  5807. "type": "string"
  5808. },
  5809. "required": false
  5810. }
  5811. ],
  5812. "responses": {
  5813. "200": {
  5814. "description": "Successfully updated session",
  5815. "content": {
  5816. "application/json": {
  5817. "schema": {
  5818. "$ref": "#/components/schemas/Session"
  5819. }
  5820. }
  5821. }
  5822. },
  5823. "400": {
  5824. "description": "BadRequest | InvalidRequestError",
  5825. "content": {
  5826. "application/json": {
  5827. "schema": {
  5828. "anyOf": [
  5829. {
  5830. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5831. },
  5832. {
  5833. "$ref": "#/components/schemas/InvalidRequestError"
  5834. }
  5835. ]
  5836. }
  5837. }
  5838. }
  5839. },
  5840. "404": {
  5841. "description": "NotFoundError",
  5842. "content": {
  5843. "application/json": {
  5844. "schema": {
  5845. "$ref": "#/components/schemas/NotFoundError"
  5846. }
  5847. }
  5848. }
  5849. }
  5850. },
  5851. "description": "Update properties of an existing session, such as title or other metadata.",
  5852. "summary": "Update session",
  5853. "requestBody": {
  5854. "content": {
  5855. "application/json": {
  5856. "schema": {
  5857. "type": "object",
  5858. "properties": {
  5859. "title": {
  5860. "type": "string"
  5861. },
  5862. "metadata": {
  5863. "type": "object"
  5864. },
  5865. "permission": {
  5866. "$ref": "#/components/schemas/PermissionRuleset"
  5867. },
  5868. "time": {
  5869. "type": "object",
  5870. "properties": {
  5871. "archived": {
  5872. "type": "number"
  5873. }
  5874. },
  5875. "additionalProperties": false
  5876. }
  5877. },
  5878. "additionalProperties": false
  5879. }
  5880. }
  5881. }
  5882. },
  5883. "x-codeSamples": [
  5884. {
  5885. "lang": "js",
  5886. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5887. }
  5888. ]
  5889. }
  5890. },
  5891. "/session/{sessionID}/children": {
  5892. "get": {
  5893. "tags": ["session"],
  5894. "operationId": "session.children",
  5895. "parameters": [
  5896. {
  5897. "name": "sessionID",
  5898. "in": "path",
  5899. "schema": {
  5900. "type": "string",
  5901. "pattern": "^ses"
  5902. },
  5903. "required": true
  5904. },
  5905. {
  5906. "name": "directory",
  5907. "in": "query",
  5908. "schema": {
  5909. "type": "string"
  5910. },
  5911. "required": false
  5912. },
  5913. {
  5914. "name": "workspace",
  5915. "in": "query",
  5916. "schema": {
  5917. "type": "string"
  5918. },
  5919. "required": false
  5920. }
  5921. ],
  5922. "responses": {
  5923. "200": {
  5924. "description": "List of children",
  5925. "content": {
  5926. "application/json": {
  5927. "schema": {
  5928. "type": "array",
  5929. "items": {
  5930. "$ref": "#/components/schemas/Session"
  5931. },
  5932. "description": "List of children"
  5933. }
  5934. }
  5935. }
  5936. },
  5937. "400": {
  5938. "description": "BadRequest | InvalidRequestError",
  5939. "content": {
  5940. "application/json": {
  5941. "schema": {
  5942. "anyOf": [
  5943. {
  5944. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5945. },
  5946. {
  5947. "$ref": "#/components/schemas/InvalidRequestError"
  5948. }
  5949. ]
  5950. }
  5951. }
  5952. }
  5953. },
  5954. "404": {
  5955. "description": "NotFoundError",
  5956. "content": {
  5957. "application/json": {
  5958. "schema": {
  5959. "$ref": "#/components/schemas/NotFoundError"
  5960. }
  5961. }
  5962. }
  5963. }
  5964. },
  5965. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  5966. "summary": "Get session children",
  5967. "x-codeSamples": [
  5968. {
  5969. "lang": "js",
  5970. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  5971. }
  5972. ]
  5973. }
  5974. },
  5975. "/session/{sessionID}/todo": {
  5976. "get": {
  5977. "tags": ["session"],
  5978. "operationId": "session.todo",
  5979. "parameters": [
  5980. {
  5981. "name": "sessionID",
  5982. "in": "path",
  5983. "schema": {
  5984. "type": "string",
  5985. "pattern": "^ses"
  5986. },
  5987. "required": true
  5988. },
  5989. {
  5990. "name": "directory",
  5991. "in": "query",
  5992. "schema": {
  5993. "type": "string"
  5994. },
  5995. "required": false
  5996. },
  5997. {
  5998. "name": "workspace",
  5999. "in": "query",
  6000. "schema": {
  6001. "type": "string"
  6002. },
  6003. "required": false
  6004. }
  6005. ],
  6006. "responses": {
  6007. "200": {
  6008. "description": "Todo list",
  6009. "content": {
  6010. "application/json": {
  6011. "schema": {
  6012. "type": "array",
  6013. "items": {
  6014. "$ref": "#/components/schemas/Todo"
  6015. },
  6016. "description": "Todo list"
  6017. }
  6018. }
  6019. }
  6020. },
  6021. "400": {
  6022. "description": "BadRequest | InvalidRequestError",
  6023. "content": {
  6024. "application/json": {
  6025. "schema": {
  6026. "anyOf": [
  6027. {
  6028. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6029. },
  6030. {
  6031. "$ref": "#/components/schemas/InvalidRequestError"
  6032. }
  6033. ]
  6034. }
  6035. }
  6036. }
  6037. },
  6038. "404": {
  6039. "description": "NotFoundError",
  6040. "content": {
  6041. "application/json": {
  6042. "schema": {
  6043. "$ref": "#/components/schemas/NotFoundError"
  6044. }
  6045. }
  6046. }
  6047. }
  6048. },
  6049. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  6050. "summary": "Get session todos",
  6051. "x-codeSamples": [
  6052. {
  6053. "lang": "js",
  6054. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  6055. }
  6056. ]
  6057. }
  6058. },
  6059. "/session/{sessionID}/diff": {
  6060. "get": {
  6061. "tags": ["session"],
  6062. "operationId": "session.diff",
  6063. "parameters": [
  6064. {
  6065. "name": "sessionID",
  6066. "in": "path",
  6067. "schema": {
  6068. "type": "string",
  6069. "pattern": "^ses"
  6070. },
  6071. "required": true
  6072. },
  6073. {
  6074. "name": "directory",
  6075. "in": "query",
  6076. "schema": {
  6077. "type": "string"
  6078. },
  6079. "required": false
  6080. },
  6081. {
  6082. "name": "workspace",
  6083. "in": "query",
  6084. "schema": {
  6085. "type": "string"
  6086. },
  6087. "required": false
  6088. },
  6089. {
  6090. "name": "messageID",
  6091. "in": "query",
  6092. "schema": {
  6093. "type": "string",
  6094. "pattern": "^msg"
  6095. },
  6096. "required": false
  6097. }
  6098. ],
  6099. "responses": {
  6100. "200": {
  6101. "description": "Successfully retrieved diff",
  6102. "content": {
  6103. "application/json": {
  6104. "schema": {
  6105. "type": "array",
  6106. "items": {
  6107. "$ref": "#/components/schemas/SnapshotFileDiff"
  6108. },
  6109. "description": "Successfully retrieved diff"
  6110. }
  6111. }
  6112. }
  6113. },
  6114. "400": {
  6115. "description": "Bad request",
  6116. "content": {
  6117. "application/json": {
  6118. "schema": {
  6119. "$ref": "#/components/schemas/BadRequestError"
  6120. }
  6121. }
  6122. }
  6123. }
  6124. },
  6125. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  6126. "summary": "Get message diff",
  6127. "x-codeSamples": [
  6128. {
  6129. "lang": "js",
  6130. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  6131. }
  6132. ]
  6133. }
  6134. },
  6135. "/session/{sessionID}/message": {
  6136. "get": {
  6137. "tags": ["session"],
  6138. "operationId": "session.messages",
  6139. "parameters": [
  6140. {
  6141. "name": "sessionID",
  6142. "in": "path",
  6143. "schema": {
  6144. "type": "string",
  6145. "pattern": "^ses"
  6146. },
  6147. "required": true
  6148. },
  6149. {
  6150. "name": "directory",
  6151. "in": "query",
  6152. "schema": {
  6153. "type": "string"
  6154. },
  6155. "required": false
  6156. },
  6157. {
  6158. "name": "workspace",
  6159. "in": "query",
  6160. "schema": {
  6161. "type": "string"
  6162. },
  6163. "required": false
  6164. },
  6165. {
  6166. "name": "limit",
  6167. "in": "query",
  6168. "schema": {
  6169. "type": "integer",
  6170. "minimum": 0,
  6171. "maximum": 9007199254740991
  6172. },
  6173. "required": false
  6174. },
  6175. {
  6176. "name": "before",
  6177. "in": "query",
  6178. "schema": {
  6179. "type": "string"
  6180. },
  6181. "required": false
  6182. }
  6183. ],
  6184. "responses": {
  6185. "200": {
  6186. "description": "List of messages",
  6187. "content": {
  6188. "application/json": {
  6189. "schema": {
  6190. "type": "array",
  6191. "items": {
  6192. "type": "object",
  6193. "properties": {
  6194. "info": {
  6195. "$ref": "#/components/schemas/Message"
  6196. },
  6197. "parts": {
  6198. "type": "array",
  6199. "items": {
  6200. "$ref": "#/components/schemas/Part"
  6201. }
  6202. }
  6203. },
  6204. "required": ["info", "parts"],
  6205. "additionalProperties": false
  6206. },
  6207. "description": "List of messages"
  6208. }
  6209. }
  6210. }
  6211. },
  6212. "400": {
  6213. "description": "BadRequest | InvalidRequestError",
  6214. "content": {
  6215. "application/json": {
  6216. "schema": {
  6217. "anyOf": [
  6218. {
  6219. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6220. },
  6221. {
  6222. "$ref": "#/components/schemas/InvalidRequestError"
  6223. }
  6224. ]
  6225. }
  6226. }
  6227. }
  6228. },
  6229. "404": {
  6230. "description": "NotFoundError",
  6231. "content": {
  6232. "application/json": {
  6233. "schema": {
  6234. "$ref": "#/components/schemas/NotFoundError"
  6235. }
  6236. }
  6237. }
  6238. }
  6239. },
  6240. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  6241. "summary": "Get session messages",
  6242. "x-codeSamples": [
  6243. {
  6244. "lang": "js",
  6245. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  6246. }
  6247. ]
  6248. },
  6249. "post": {
  6250. "tags": ["session"],
  6251. "operationId": "session.prompt",
  6252. "parameters": [
  6253. {
  6254. "name": "sessionID",
  6255. "in": "path",
  6256. "schema": {
  6257. "type": "string",
  6258. "pattern": "^ses"
  6259. },
  6260. "required": true
  6261. },
  6262. {
  6263. "name": "directory",
  6264. "in": "query",
  6265. "schema": {
  6266. "type": "string"
  6267. },
  6268. "required": false
  6269. },
  6270. {
  6271. "name": "workspace",
  6272. "in": "query",
  6273. "schema": {
  6274. "type": "string"
  6275. },
  6276. "required": false
  6277. }
  6278. ],
  6279. "responses": {
  6280. "200": {
  6281. "description": "Created message",
  6282. "content": {
  6283. "application/json": {
  6284. "schema": {
  6285. "type": "object",
  6286. "required": ["info", "parts"],
  6287. "properties": {
  6288. "info": {
  6289. "$ref": "#/components/schemas/AssistantMessage"
  6290. },
  6291. "parts": {
  6292. "type": "array",
  6293. "items": {
  6294. "$ref": "#/components/schemas/Part"
  6295. }
  6296. }
  6297. }
  6298. }
  6299. }
  6300. }
  6301. },
  6302. "400": {
  6303. "description": "BadRequest | InvalidRequestError",
  6304. "content": {
  6305. "application/json": {
  6306. "schema": {
  6307. "anyOf": [
  6308. {
  6309. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6310. },
  6311. {
  6312. "$ref": "#/components/schemas/InvalidRequestError"
  6313. }
  6314. ]
  6315. }
  6316. }
  6317. }
  6318. },
  6319. "404": {
  6320. "description": "NotFoundError",
  6321. "content": {
  6322. "application/json": {
  6323. "schema": {
  6324. "$ref": "#/components/schemas/NotFoundError"
  6325. }
  6326. }
  6327. }
  6328. }
  6329. },
  6330. "description": "Create and send a new message to a session, streaming the AI response.",
  6331. "summary": "Send message",
  6332. "requestBody": {
  6333. "content": {
  6334. "application/json": {
  6335. "schema": {
  6336. "type": "object",
  6337. "properties": {
  6338. "messageID": {
  6339. "type": "string",
  6340. "pattern": "^msg"
  6341. },
  6342. "model": {
  6343. "type": "object",
  6344. "properties": {
  6345. "providerID": {
  6346. "type": "string"
  6347. },
  6348. "modelID": {
  6349. "type": "string"
  6350. }
  6351. },
  6352. "required": ["providerID", "modelID"],
  6353. "additionalProperties": false
  6354. },
  6355. "agent": {
  6356. "type": "string"
  6357. },
  6358. "noReply": {
  6359. "type": "boolean"
  6360. },
  6361. "tools": {
  6362. "type": "object",
  6363. "additionalProperties": {
  6364. "type": "boolean"
  6365. }
  6366. },
  6367. "format": {
  6368. "$ref": "#/components/schemas/OutputFormat"
  6369. },
  6370. "system": {
  6371. "type": "string"
  6372. },
  6373. "variant": {
  6374. "type": "string"
  6375. },
  6376. "parts": {
  6377. "type": "array",
  6378. "items": {
  6379. "anyOf": [
  6380. {
  6381. "$ref": "#/components/schemas/TextPartInput"
  6382. },
  6383. {
  6384. "$ref": "#/components/schemas/FilePartInput"
  6385. },
  6386. {
  6387. "$ref": "#/components/schemas/AgentPartInput"
  6388. },
  6389. {
  6390. "$ref": "#/components/schemas/SubtaskPartInput"
  6391. }
  6392. ]
  6393. }
  6394. }
  6395. },
  6396. "required": ["parts"],
  6397. "additionalProperties": false
  6398. }
  6399. }
  6400. }
  6401. },
  6402. "x-codeSamples": [
  6403. {
  6404. "lang": "js",
  6405. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6406. }
  6407. ]
  6408. }
  6409. },
  6410. "/session/{sessionID}/message/{messageID}": {
  6411. "get": {
  6412. "tags": ["session"],
  6413. "operationId": "session.message",
  6414. "parameters": [
  6415. {
  6416. "name": "sessionID",
  6417. "in": "path",
  6418. "schema": {
  6419. "type": "string",
  6420. "pattern": "^ses"
  6421. },
  6422. "required": true
  6423. },
  6424. {
  6425. "name": "messageID",
  6426. "in": "path",
  6427. "schema": {
  6428. "type": "string",
  6429. "pattern": "^msg"
  6430. },
  6431. "required": true
  6432. },
  6433. {
  6434. "name": "directory",
  6435. "in": "query",
  6436. "schema": {
  6437. "type": "string"
  6438. },
  6439. "required": false
  6440. },
  6441. {
  6442. "name": "workspace",
  6443. "in": "query",
  6444. "schema": {
  6445. "type": "string"
  6446. },
  6447. "required": false
  6448. }
  6449. ],
  6450. "responses": {
  6451. "200": {
  6452. "description": "Message",
  6453. "content": {
  6454. "application/json": {
  6455. "schema": {
  6456. "type": "object",
  6457. "properties": {
  6458. "info": {
  6459. "$ref": "#/components/schemas/Message"
  6460. },
  6461. "parts": {
  6462. "type": "array",
  6463. "items": {
  6464. "$ref": "#/components/schemas/Part"
  6465. }
  6466. }
  6467. },
  6468. "required": ["info", "parts"],
  6469. "additionalProperties": false,
  6470. "description": "Message"
  6471. }
  6472. }
  6473. }
  6474. },
  6475. "400": {
  6476. "description": "BadRequest | InvalidRequestError",
  6477. "content": {
  6478. "application/json": {
  6479. "schema": {
  6480. "anyOf": [
  6481. {
  6482. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6483. },
  6484. {
  6485. "$ref": "#/components/schemas/InvalidRequestError"
  6486. }
  6487. ]
  6488. }
  6489. }
  6490. }
  6491. },
  6492. "404": {
  6493. "description": "NotFoundError",
  6494. "content": {
  6495. "application/json": {
  6496. "schema": {
  6497. "$ref": "#/components/schemas/NotFoundError"
  6498. }
  6499. }
  6500. }
  6501. }
  6502. },
  6503. "description": "Retrieve a specific message from a session by its message ID.",
  6504. "summary": "Get message",
  6505. "x-codeSamples": [
  6506. {
  6507. "lang": "js",
  6508. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6509. }
  6510. ]
  6511. },
  6512. "delete": {
  6513. "tags": ["session"],
  6514. "operationId": "session.deleteMessage",
  6515. "parameters": [
  6516. {
  6517. "name": "sessionID",
  6518. "in": "path",
  6519. "schema": {
  6520. "type": "string",
  6521. "pattern": "^ses"
  6522. },
  6523. "required": true
  6524. },
  6525. {
  6526. "name": "messageID",
  6527. "in": "path",
  6528. "schema": {
  6529. "type": "string",
  6530. "pattern": "^msg"
  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 deleted message",
  6554. "content": {
  6555. "application/json": {
  6556. "schema": {
  6557. "type": "boolean",
  6558. "description": "Successfully deleted message"
  6559. }
  6560. }
  6561. }
  6562. },
  6563. "400": {
  6564. "description": "BadRequest | InvalidRequestError",
  6565. "content": {
  6566. "application/json": {
  6567. "schema": {
  6568. "anyOf": [
  6569. {
  6570. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6571. },
  6572. {
  6573. "$ref": "#/components/schemas/InvalidRequestError"
  6574. }
  6575. ]
  6576. }
  6577. }
  6578. }
  6579. },
  6580. "404": {
  6581. "description": "NotFoundError",
  6582. "content": {
  6583. "application/json": {
  6584. "schema": {
  6585. "$ref": "#/components/schemas/NotFoundError"
  6586. }
  6587. }
  6588. }
  6589. },
  6590. "409": {
  6591. "description": "SessionBusyError",
  6592. "content": {
  6593. "application/json": {
  6594. "schema": {
  6595. "$ref": "#/components/schemas/SessionBusyError"
  6596. }
  6597. }
  6598. }
  6599. }
  6600. },
  6601. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6602. "summary": "Delete message",
  6603. "x-codeSamples": [
  6604. {
  6605. "lang": "js",
  6606. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6607. }
  6608. ]
  6609. }
  6610. },
  6611. "/session/{sessionID}/fork": {
  6612. "post": {
  6613. "tags": ["session"],
  6614. "operationId": "session.fork",
  6615. "parameters": [
  6616. {
  6617. "name": "sessionID",
  6618. "in": "path",
  6619. "schema": {
  6620. "type": "string",
  6621. "pattern": "^ses"
  6622. },
  6623. "required": true
  6624. },
  6625. {
  6626. "name": "directory",
  6627. "in": "query",
  6628. "schema": {
  6629. "type": "string"
  6630. },
  6631. "required": false
  6632. },
  6633. {
  6634. "name": "workspace",
  6635. "in": "query",
  6636. "schema": {
  6637. "type": "string"
  6638. },
  6639. "required": false
  6640. }
  6641. ],
  6642. "responses": {
  6643. "200": {
  6644. "description": "200",
  6645. "content": {
  6646. "application/json": {
  6647. "schema": {
  6648. "$ref": "#/components/schemas/Session"
  6649. }
  6650. }
  6651. }
  6652. },
  6653. "400": {
  6654. "description": "BadRequest | InvalidRequestError",
  6655. "content": {
  6656. "application/json": {
  6657. "schema": {
  6658. "anyOf": [
  6659. {
  6660. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6661. },
  6662. {
  6663. "$ref": "#/components/schemas/InvalidRequestError"
  6664. }
  6665. ]
  6666. }
  6667. }
  6668. }
  6669. },
  6670. "404": {
  6671. "description": "NotFoundError",
  6672. "content": {
  6673. "application/json": {
  6674. "schema": {
  6675. "$ref": "#/components/schemas/NotFoundError"
  6676. }
  6677. }
  6678. }
  6679. }
  6680. },
  6681. "description": "Create a new session by forking an existing session at a specific message point.",
  6682. "summary": "Fork session",
  6683. "requestBody": {
  6684. "content": {
  6685. "application/json": {
  6686. "schema": {
  6687. "type": "object",
  6688. "properties": {
  6689. "messageID": {
  6690. "type": "string",
  6691. "pattern": "^msg"
  6692. }
  6693. },
  6694. "additionalProperties": false
  6695. }
  6696. }
  6697. }
  6698. },
  6699. "x-codeSamples": [
  6700. {
  6701. "lang": "js",
  6702. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6703. }
  6704. ]
  6705. }
  6706. },
  6707. "/session/{sessionID}/abort": {
  6708. "post": {
  6709. "tags": ["session"],
  6710. "operationId": "session.abort",
  6711. "parameters": [
  6712. {
  6713. "name": "sessionID",
  6714. "in": "path",
  6715. "schema": {
  6716. "type": "string",
  6717. "pattern": "^ses"
  6718. },
  6719. "required": true
  6720. },
  6721. {
  6722. "name": "directory",
  6723. "in": "query",
  6724. "schema": {
  6725. "type": "string"
  6726. },
  6727. "required": false
  6728. },
  6729. {
  6730. "name": "workspace",
  6731. "in": "query",
  6732. "schema": {
  6733. "type": "string"
  6734. },
  6735. "required": false
  6736. }
  6737. ],
  6738. "responses": {
  6739. "200": {
  6740. "description": "Aborted session",
  6741. "content": {
  6742. "application/json": {
  6743. "schema": {
  6744. "type": "boolean",
  6745. "description": "Aborted session"
  6746. }
  6747. }
  6748. }
  6749. },
  6750. "400": {
  6751. "description": "BadRequest | InvalidRequestError",
  6752. "content": {
  6753. "application/json": {
  6754. "schema": {
  6755. "anyOf": [
  6756. {
  6757. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6758. },
  6759. {
  6760. "$ref": "#/components/schemas/InvalidRequestError"
  6761. }
  6762. ]
  6763. }
  6764. }
  6765. }
  6766. }
  6767. },
  6768. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6769. "summary": "Abort session",
  6770. "x-codeSamples": [
  6771. {
  6772. "lang": "js",
  6773. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6774. }
  6775. ]
  6776. }
  6777. },
  6778. "/session/{sessionID}/init": {
  6779. "post": {
  6780. "tags": ["session"],
  6781. "operationId": "session.init",
  6782. "parameters": [
  6783. {
  6784. "name": "sessionID",
  6785. "in": "path",
  6786. "schema": {
  6787. "type": "string",
  6788. "pattern": "^ses"
  6789. },
  6790. "required": true
  6791. },
  6792. {
  6793. "name": "directory",
  6794. "in": "query",
  6795. "schema": {
  6796. "type": "string"
  6797. },
  6798. "required": false
  6799. },
  6800. {
  6801. "name": "workspace",
  6802. "in": "query",
  6803. "schema": {
  6804. "type": "string"
  6805. },
  6806. "required": false
  6807. }
  6808. ],
  6809. "responses": {
  6810. "200": {
  6811. "description": "200",
  6812. "content": {
  6813. "application/json": {
  6814. "schema": {
  6815. "type": "boolean",
  6816. "description": "200"
  6817. }
  6818. }
  6819. }
  6820. },
  6821. "400": {
  6822. "description": "BadRequest | InvalidRequestError",
  6823. "content": {
  6824. "application/json": {
  6825. "schema": {
  6826. "anyOf": [
  6827. {
  6828. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6829. },
  6830. {
  6831. "$ref": "#/components/schemas/InvalidRequestError"
  6832. }
  6833. ]
  6834. }
  6835. }
  6836. }
  6837. },
  6838. "404": {
  6839. "description": "NotFoundError",
  6840. "content": {
  6841. "application/json": {
  6842. "schema": {
  6843. "$ref": "#/components/schemas/NotFoundError"
  6844. }
  6845. }
  6846. }
  6847. }
  6848. },
  6849. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6850. "summary": "Initialize session",
  6851. "requestBody": {
  6852. "content": {
  6853. "application/json": {
  6854. "schema": {
  6855. "type": "object",
  6856. "properties": {
  6857. "modelID": {
  6858. "type": "string"
  6859. },
  6860. "providerID": {
  6861. "type": "string"
  6862. },
  6863. "messageID": {
  6864. "type": "string",
  6865. "pattern": "^msg"
  6866. }
  6867. },
  6868. "required": ["modelID", "providerID", "messageID"],
  6869. "additionalProperties": false
  6870. }
  6871. }
  6872. }
  6873. },
  6874. "x-codeSamples": [
  6875. {
  6876. "lang": "js",
  6877. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6878. }
  6879. ]
  6880. }
  6881. },
  6882. "/session/{sessionID}/share": {
  6883. "post": {
  6884. "tags": ["session"],
  6885. "operationId": "session.share",
  6886. "parameters": [
  6887. {
  6888. "name": "sessionID",
  6889. "in": "path",
  6890. "schema": {
  6891. "type": "string",
  6892. "pattern": "^ses"
  6893. },
  6894. "required": true
  6895. },
  6896. {
  6897. "name": "directory",
  6898. "in": "query",
  6899. "schema": {
  6900. "type": "string"
  6901. },
  6902. "required": false
  6903. },
  6904. {
  6905. "name": "workspace",
  6906. "in": "query",
  6907. "schema": {
  6908. "type": "string"
  6909. },
  6910. "required": false
  6911. }
  6912. ],
  6913. "responses": {
  6914. "200": {
  6915. "description": "Successfully shared session",
  6916. "content": {
  6917. "application/json": {
  6918. "schema": {
  6919. "$ref": "#/components/schemas/Session"
  6920. }
  6921. }
  6922. }
  6923. },
  6924. "400": {
  6925. "description": "Bad request",
  6926. "content": {
  6927. "application/json": {
  6928. "schema": {
  6929. "$ref": "#/components/schemas/BadRequestError"
  6930. }
  6931. }
  6932. }
  6933. },
  6934. "404": {
  6935. "description": "NotFoundError",
  6936. "content": {
  6937. "application/json": {
  6938. "schema": {
  6939. "$ref": "#/components/schemas/NotFoundError"
  6940. }
  6941. }
  6942. }
  6943. },
  6944. "500": {
  6945. "description": "InternalServerError",
  6946. "content": {
  6947. "application/json": {
  6948. "schema": {
  6949. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6950. }
  6951. }
  6952. }
  6953. }
  6954. },
  6955. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  6956. "summary": "Share session",
  6957. "x-codeSamples": [
  6958. {
  6959. "lang": "js",
  6960. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  6961. }
  6962. ]
  6963. },
  6964. "delete": {
  6965. "tags": ["session"],
  6966. "operationId": "session.unshare",
  6967. "parameters": [
  6968. {
  6969. "name": "sessionID",
  6970. "in": "path",
  6971. "schema": {
  6972. "type": "string",
  6973. "pattern": "^ses"
  6974. },
  6975. "required": true
  6976. },
  6977. {
  6978. "name": "directory",
  6979. "in": "query",
  6980. "schema": {
  6981. "type": "string"
  6982. },
  6983. "required": false
  6984. },
  6985. {
  6986. "name": "workspace",
  6987. "in": "query",
  6988. "schema": {
  6989. "type": "string"
  6990. },
  6991. "required": false
  6992. }
  6993. ],
  6994. "responses": {
  6995. "200": {
  6996. "description": "Successfully unshared session",
  6997. "content": {
  6998. "application/json": {
  6999. "schema": {
  7000. "$ref": "#/components/schemas/Session"
  7001. }
  7002. }
  7003. }
  7004. },
  7005. "400": {
  7006. "description": "Bad request",
  7007. "content": {
  7008. "application/json": {
  7009. "schema": {
  7010. "$ref": "#/components/schemas/BadRequestError"
  7011. }
  7012. }
  7013. }
  7014. },
  7015. "404": {
  7016. "description": "NotFoundError",
  7017. "content": {
  7018. "application/json": {
  7019. "schema": {
  7020. "$ref": "#/components/schemas/NotFoundError"
  7021. }
  7022. }
  7023. }
  7024. },
  7025. "500": {
  7026. "description": "InternalServerError",
  7027. "content": {
  7028. "application/json": {
  7029. "schema": {
  7030. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  7031. }
  7032. }
  7033. }
  7034. }
  7035. },
  7036. "description": "Remove the shareable link for a session, making it private again.",
  7037. "summary": "Unshare session",
  7038. "x-codeSamples": [
  7039. {
  7040. "lang": "js",
  7041. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  7042. }
  7043. ]
  7044. }
  7045. },
  7046. "/session/{sessionID}/summarize": {
  7047. "post": {
  7048. "tags": ["session"],
  7049. "operationId": "session.summarize",
  7050. "parameters": [
  7051. {
  7052. "name": "sessionID",
  7053. "in": "path",
  7054. "schema": {
  7055. "type": "string",
  7056. "pattern": "^ses"
  7057. },
  7058. "required": true
  7059. },
  7060. {
  7061. "name": "directory",
  7062. "in": "query",
  7063. "schema": {
  7064. "type": "string"
  7065. },
  7066. "required": false
  7067. },
  7068. {
  7069. "name": "workspace",
  7070. "in": "query",
  7071. "schema": {
  7072. "type": "string"
  7073. },
  7074. "required": false
  7075. }
  7076. ],
  7077. "responses": {
  7078. "200": {
  7079. "description": "Summarized session",
  7080. "content": {
  7081. "application/json": {
  7082. "schema": {
  7083. "type": "boolean",
  7084. "description": "Summarized session"
  7085. }
  7086. }
  7087. }
  7088. },
  7089. "400": {
  7090. "description": "BadRequest | InvalidRequestError",
  7091. "content": {
  7092. "application/json": {
  7093. "schema": {
  7094. "anyOf": [
  7095. {
  7096. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7097. },
  7098. {
  7099. "$ref": "#/components/schemas/InvalidRequestError"
  7100. }
  7101. ]
  7102. }
  7103. }
  7104. }
  7105. },
  7106. "404": {
  7107. "description": "NotFoundError",
  7108. "content": {
  7109. "application/json": {
  7110. "schema": {
  7111. "$ref": "#/components/schemas/NotFoundError"
  7112. }
  7113. }
  7114. }
  7115. }
  7116. },
  7117. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  7118. "summary": "Summarize session",
  7119. "requestBody": {
  7120. "content": {
  7121. "application/json": {
  7122. "schema": {
  7123. "type": "object",
  7124. "properties": {
  7125. "providerID": {
  7126. "type": "string"
  7127. },
  7128. "modelID": {
  7129. "type": "string"
  7130. },
  7131. "auto": {
  7132. "type": "boolean"
  7133. }
  7134. },
  7135. "required": ["providerID", "modelID"],
  7136. "additionalProperties": false
  7137. }
  7138. }
  7139. }
  7140. },
  7141. "x-codeSamples": [
  7142. {
  7143. "lang": "js",
  7144. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  7145. }
  7146. ]
  7147. }
  7148. },
  7149. "/session/{sessionID}/prompt_async": {
  7150. "post": {
  7151. "tags": ["session"],
  7152. "operationId": "session.prompt_async",
  7153. "parameters": [
  7154. {
  7155. "name": "sessionID",
  7156. "in": "path",
  7157. "schema": {
  7158. "type": "string",
  7159. "pattern": "^ses"
  7160. },
  7161. "required": true
  7162. },
  7163. {
  7164. "name": "directory",
  7165. "in": "query",
  7166. "schema": {
  7167. "type": "string"
  7168. },
  7169. "required": false
  7170. },
  7171. {
  7172. "name": "workspace",
  7173. "in": "query",
  7174. "schema": {
  7175. "type": "string"
  7176. },
  7177. "required": false
  7178. }
  7179. ],
  7180. "responses": {
  7181. "204": {
  7182. "description": "Prompt accepted"
  7183. },
  7184. "400": {
  7185. "description": "BadRequest | InvalidRequestError",
  7186. "content": {
  7187. "application/json": {
  7188. "schema": {
  7189. "anyOf": [
  7190. {
  7191. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7192. },
  7193. {
  7194. "$ref": "#/components/schemas/InvalidRequestError"
  7195. }
  7196. ]
  7197. }
  7198. }
  7199. }
  7200. },
  7201. "404": {
  7202. "description": "NotFoundError",
  7203. "content": {
  7204. "application/json": {
  7205. "schema": {
  7206. "$ref": "#/components/schemas/NotFoundError"
  7207. }
  7208. }
  7209. }
  7210. }
  7211. },
  7212. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  7213. "summary": "Send async message",
  7214. "requestBody": {
  7215. "content": {
  7216. "application/json": {
  7217. "schema": {
  7218. "type": "object",
  7219. "properties": {
  7220. "messageID": {
  7221. "type": "string",
  7222. "pattern": "^msg"
  7223. },
  7224. "model": {
  7225. "type": "object",
  7226. "properties": {
  7227. "providerID": {
  7228. "type": "string"
  7229. },
  7230. "modelID": {
  7231. "type": "string"
  7232. }
  7233. },
  7234. "required": ["providerID", "modelID"],
  7235. "additionalProperties": false
  7236. },
  7237. "agent": {
  7238. "type": "string"
  7239. },
  7240. "noReply": {
  7241. "type": "boolean"
  7242. },
  7243. "tools": {
  7244. "type": "object",
  7245. "additionalProperties": {
  7246. "type": "boolean"
  7247. }
  7248. },
  7249. "format": {
  7250. "$ref": "#/components/schemas/OutputFormat"
  7251. },
  7252. "system": {
  7253. "type": "string"
  7254. },
  7255. "variant": {
  7256. "type": "string"
  7257. },
  7258. "parts": {
  7259. "type": "array",
  7260. "items": {
  7261. "anyOf": [
  7262. {
  7263. "$ref": "#/components/schemas/TextPartInput"
  7264. },
  7265. {
  7266. "$ref": "#/components/schemas/FilePartInput"
  7267. },
  7268. {
  7269. "$ref": "#/components/schemas/AgentPartInput"
  7270. },
  7271. {
  7272. "$ref": "#/components/schemas/SubtaskPartInput"
  7273. }
  7274. ]
  7275. }
  7276. }
  7277. },
  7278. "required": ["parts"],
  7279. "additionalProperties": false
  7280. }
  7281. }
  7282. }
  7283. },
  7284. "x-codeSamples": [
  7285. {
  7286. "lang": "js",
  7287. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  7288. }
  7289. ]
  7290. }
  7291. },
  7292. "/session/{sessionID}/command": {
  7293. "post": {
  7294. "tags": ["session"],
  7295. "operationId": "session.command",
  7296. "parameters": [
  7297. {
  7298. "name": "sessionID",
  7299. "in": "path",
  7300. "schema": {
  7301. "type": "string",
  7302. "pattern": "^ses"
  7303. },
  7304. "required": true
  7305. },
  7306. {
  7307. "name": "directory",
  7308. "in": "query",
  7309. "schema": {
  7310. "type": "string"
  7311. },
  7312. "required": false
  7313. },
  7314. {
  7315. "name": "workspace",
  7316. "in": "query",
  7317. "schema": {
  7318. "type": "string"
  7319. },
  7320. "required": false
  7321. }
  7322. ],
  7323. "responses": {
  7324. "200": {
  7325. "description": "Created message",
  7326. "content": {
  7327. "application/json": {
  7328. "schema": {
  7329. "type": "object",
  7330. "required": ["info", "parts"],
  7331. "properties": {
  7332. "info": {
  7333. "$ref": "#/components/schemas/AssistantMessage"
  7334. },
  7335. "parts": {
  7336. "type": "array",
  7337. "items": {
  7338. "$ref": "#/components/schemas/Part"
  7339. }
  7340. }
  7341. }
  7342. }
  7343. }
  7344. }
  7345. },
  7346. "400": {
  7347. "description": "BadRequest | InvalidRequestError",
  7348. "content": {
  7349. "application/json": {
  7350. "schema": {
  7351. "anyOf": [
  7352. {
  7353. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7354. },
  7355. {
  7356. "$ref": "#/components/schemas/InvalidRequestError"
  7357. }
  7358. ]
  7359. }
  7360. }
  7361. }
  7362. },
  7363. "404": {
  7364. "description": "NotFoundError",
  7365. "content": {
  7366. "application/json": {
  7367. "schema": {
  7368. "$ref": "#/components/schemas/NotFoundError"
  7369. }
  7370. }
  7371. }
  7372. }
  7373. },
  7374. "description": "Send a new command to a session for execution by the AI assistant.",
  7375. "summary": "Send command",
  7376. "requestBody": {
  7377. "content": {
  7378. "application/json": {
  7379. "schema": {
  7380. "type": "object",
  7381. "properties": {
  7382. "messageID": {
  7383. "type": "string",
  7384. "pattern": "^msg"
  7385. },
  7386. "agent": {
  7387. "type": "string"
  7388. },
  7389. "model": {
  7390. "type": "string"
  7391. },
  7392. "arguments": {
  7393. "type": "string"
  7394. },
  7395. "command": {
  7396. "type": "string"
  7397. },
  7398. "variant": {
  7399. "type": "string"
  7400. },
  7401. "parts": {
  7402. "type": "array",
  7403. "items": {
  7404. "type": "object",
  7405. "properties": {
  7406. "id": {
  7407. "type": "string",
  7408. "pattern": "^prt"
  7409. },
  7410. "type": {
  7411. "type": "string",
  7412. "enum": ["file"]
  7413. },
  7414. "mime": {
  7415. "type": "string"
  7416. },
  7417. "filename": {
  7418. "type": "string"
  7419. },
  7420. "url": {
  7421. "type": "string"
  7422. },
  7423. "source": {
  7424. "$ref": "#/components/schemas/FilePartSource"
  7425. }
  7426. },
  7427. "required": ["type", "mime", "url"],
  7428. "additionalProperties": false
  7429. }
  7430. }
  7431. },
  7432. "required": ["arguments", "command"],
  7433. "additionalProperties": false
  7434. }
  7435. }
  7436. }
  7437. },
  7438. "x-codeSamples": [
  7439. {
  7440. "lang": "js",
  7441. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7442. }
  7443. ]
  7444. }
  7445. },
  7446. "/session/{sessionID}/shell": {
  7447. "post": {
  7448. "tags": ["session"],
  7449. "operationId": "session.shell",
  7450. "parameters": [
  7451. {
  7452. "name": "sessionID",
  7453. "in": "path",
  7454. "schema": {
  7455. "type": "string",
  7456. "pattern": "^ses"
  7457. },
  7458. "required": true
  7459. },
  7460. {
  7461. "name": "directory",
  7462. "in": "query",
  7463. "schema": {
  7464. "type": "string"
  7465. },
  7466. "required": false
  7467. },
  7468. {
  7469. "name": "workspace",
  7470. "in": "query",
  7471. "schema": {
  7472. "type": "string"
  7473. },
  7474. "required": false
  7475. }
  7476. ],
  7477. "responses": {
  7478. "200": {
  7479. "description": "Created message",
  7480. "content": {
  7481. "application/json": {
  7482. "schema": {
  7483. "type": "object",
  7484. "properties": {
  7485. "info": {
  7486. "$ref": "#/components/schemas/Message"
  7487. },
  7488. "parts": {
  7489. "type": "array",
  7490. "items": {
  7491. "$ref": "#/components/schemas/Part"
  7492. }
  7493. }
  7494. },
  7495. "required": ["info", "parts"],
  7496. "additionalProperties": false,
  7497. "description": "Created message"
  7498. }
  7499. }
  7500. }
  7501. },
  7502. "400": {
  7503. "description": "BadRequest | InvalidRequestError",
  7504. "content": {
  7505. "application/json": {
  7506. "schema": {
  7507. "anyOf": [
  7508. {
  7509. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7510. },
  7511. {
  7512. "$ref": "#/components/schemas/InvalidRequestError"
  7513. }
  7514. ]
  7515. }
  7516. }
  7517. }
  7518. },
  7519. "404": {
  7520. "description": "NotFoundError",
  7521. "content": {
  7522. "application/json": {
  7523. "schema": {
  7524. "$ref": "#/components/schemas/NotFoundError"
  7525. }
  7526. }
  7527. }
  7528. },
  7529. "409": {
  7530. "description": "SessionBusyError",
  7531. "content": {
  7532. "application/json": {
  7533. "schema": {
  7534. "$ref": "#/components/schemas/SessionBusyError"
  7535. }
  7536. }
  7537. }
  7538. }
  7539. },
  7540. "description": "Execute a shell command within the session context and return the AI's response.",
  7541. "summary": "Run shell command",
  7542. "requestBody": {
  7543. "content": {
  7544. "application/json": {
  7545. "schema": {
  7546. "type": "object",
  7547. "properties": {
  7548. "messageID": {
  7549. "type": "string",
  7550. "pattern": "^msg"
  7551. },
  7552. "agent": {
  7553. "type": "string"
  7554. },
  7555. "model": {
  7556. "type": "object",
  7557. "properties": {
  7558. "providerID": {
  7559. "type": "string"
  7560. },
  7561. "modelID": {
  7562. "type": "string"
  7563. }
  7564. },
  7565. "required": ["providerID", "modelID"],
  7566. "additionalProperties": false
  7567. },
  7568. "command": {
  7569. "type": "string"
  7570. }
  7571. },
  7572. "required": ["agent", "command"],
  7573. "additionalProperties": false
  7574. }
  7575. }
  7576. }
  7577. },
  7578. "x-codeSamples": [
  7579. {
  7580. "lang": "js",
  7581. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7582. }
  7583. ]
  7584. }
  7585. },
  7586. "/session/{sessionID}/revert": {
  7587. "post": {
  7588. "tags": ["session"],
  7589. "operationId": "session.revert",
  7590. "parameters": [
  7591. {
  7592. "name": "sessionID",
  7593. "in": "path",
  7594. "schema": {
  7595. "type": "string",
  7596. "pattern": "^ses"
  7597. },
  7598. "required": true
  7599. },
  7600. {
  7601. "name": "directory",
  7602. "in": "query",
  7603. "schema": {
  7604. "type": "string"
  7605. },
  7606. "required": false
  7607. },
  7608. {
  7609. "name": "workspace",
  7610. "in": "query",
  7611. "schema": {
  7612. "type": "string"
  7613. },
  7614. "required": false
  7615. }
  7616. ],
  7617. "responses": {
  7618. "200": {
  7619. "description": "Updated session",
  7620. "content": {
  7621. "application/json": {
  7622. "schema": {
  7623. "$ref": "#/components/schemas/Session"
  7624. }
  7625. }
  7626. }
  7627. },
  7628. "400": {
  7629. "description": "BadRequest | InvalidRequestError",
  7630. "content": {
  7631. "application/json": {
  7632. "schema": {
  7633. "anyOf": [
  7634. {
  7635. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7636. },
  7637. {
  7638. "$ref": "#/components/schemas/InvalidRequestError"
  7639. }
  7640. ]
  7641. }
  7642. }
  7643. }
  7644. },
  7645. "404": {
  7646. "description": "NotFoundError",
  7647. "content": {
  7648. "application/json": {
  7649. "schema": {
  7650. "$ref": "#/components/schemas/NotFoundError"
  7651. }
  7652. }
  7653. }
  7654. },
  7655. "409": {
  7656. "description": "SessionBusyError",
  7657. "content": {
  7658. "application/json": {
  7659. "schema": {
  7660. "$ref": "#/components/schemas/SessionBusyError"
  7661. }
  7662. }
  7663. }
  7664. }
  7665. },
  7666. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7667. "summary": "Revert message",
  7668. "requestBody": {
  7669. "content": {
  7670. "application/json": {
  7671. "schema": {
  7672. "type": "object",
  7673. "properties": {
  7674. "messageID": {
  7675. "type": "string",
  7676. "pattern": "^msg"
  7677. },
  7678. "partID": {
  7679. "type": "string",
  7680. "pattern": "^prt"
  7681. }
  7682. },
  7683. "required": ["messageID"],
  7684. "additionalProperties": false
  7685. }
  7686. }
  7687. }
  7688. },
  7689. "x-codeSamples": [
  7690. {
  7691. "lang": "js",
  7692. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7693. }
  7694. ]
  7695. }
  7696. },
  7697. "/session/{sessionID}/unrevert": {
  7698. "post": {
  7699. "tags": ["session"],
  7700. "operationId": "session.unrevert",
  7701. "parameters": [
  7702. {
  7703. "name": "sessionID",
  7704. "in": "path",
  7705. "schema": {
  7706. "type": "string",
  7707. "pattern": "^ses"
  7708. },
  7709. "required": true
  7710. },
  7711. {
  7712. "name": "directory",
  7713. "in": "query",
  7714. "schema": {
  7715. "type": "string"
  7716. },
  7717. "required": false
  7718. },
  7719. {
  7720. "name": "workspace",
  7721. "in": "query",
  7722. "schema": {
  7723. "type": "string"
  7724. },
  7725. "required": false
  7726. }
  7727. ],
  7728. "responses": {
  7729. "200": {
  7730. "description": "Updated session",
  7731. "content": {
  7732. "application/json": {
  7733. "schema": {
  7734. "$ref": "#/components/schemas/Session"
  7735. }
  7736. }
  7737. }
  7738. },
  7739. "400": {
  7740. "description": "BadRequest | InvalidRequestError",
  7741. "content": {
  7742. "application/json": {
  7743. "schema": {
  7744. "anyOf": [
  7745. {
  7746. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7747. },
  7748. {
  7749. "$ref": "#/components/schemas/InvalidRequestError"
  7750. }
  7751. ]
  7752. }
  7753. }
  7754. }
  7755. },
  7756. "404": {
  7757. "description": "NotFoundError",
  7758. "content": {
  7759. "application/json": {
  7760. "schema": {
  7761. "$ref": "#/components/schemas/NotFoundError"
  7762. }
  7763. }
  7764. }
  7765. },
  7766. "409": {
  7767. "description": "SessionBusyError",
  7768. "content": {
  7769. "application/json": {
  7770. "schema": {
  7771. "$ref": "#/components/schemas/SessionBusyError"
  7772. }
  7773. }
  7774. }
  7775. }
  7776. },
  7777. "description": "Restore all previously reverted messages in a session.",
  7778. "summary": "Restore reverted messages",
  7779. "x-codeSamples": [
  7780. {
  7781. "lang": "js",
  7782. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7783. }
  7784. ]
  7785. }
  7786. },
  7787. "/session/{sessionID}/permissions/{permissionID}": {
  7788. "post": {
  7789. "tags": ["session"],
  7790. "operationId": "permission.respond",
  7791. "parameters": [
  7792. {
  7793. "name": "sessionID",
  7794. "in": "path",
  7795. "schema": {
  7796. "type": "string",
  7797. "pattern": "^ses"
  7798. },
  7799. "required": true
  7800. },
  7801. {
  7802. "name": "permissionID",
  7803. "in": "path",
  7804. "schema": {
  7805. "type": "string",
  7806. "pattern": "^per"
  7807. },
  7808. "required": true
  7809. },
  7810. {
  7811. "name": "directory",
  7812. "in": "query",
  7813. "schema": {
  7814. "type": "string"
  7815. },
  7816. "required": false
  7817. },
  7818. {
  7819. "name": "workspace",
  7820. "in": "query",
  7821. "schema": {
  7822. "type": "string"
  7823. },
  7824. "required": false
  7825. }
  7826. ],
  7827. "responses": {
  7828. "200": {
  7829. "description": "Permission processed successfully",
  7830. "content": {
  7831. "application/json": {
  7832. "schema": {
  7833. "type": "boolean",
  7834. "description": "Permission processed successfully"
  7835. }
  7836. }
  7837. }
  7838. },
  7839. "400": {
  7840. "description": "BadRequest | InvalidRequestError",
  7841. "content": {
  7842. "application/json": {
  7843. "schema": {
  7844. "anyOf": [
  7845. {
  7846. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7847. },
  7848. {
  7849. "$ref": "#/components/schemas/InvalidRequestError"
  7850. }
  7851. ]
  7852. }
  7853. }
  7854. }
  7855. },
  7856. "404": {
  7857. "description": "NotFoundError | PermissionNotFoundError",
  7858. "content": {
  7859. "application/json": {
  7860. "schema": {
  7861. "anyOf": [
  7862. {
  7863. "$ref": "#/components/schemas/NotFoundError"
  7864. },
  7865. {
  7866. "$ref": "#/components/schemas/PermissionNotFoundError"
  7867. }
  7868. ]
  7869. }
  7870. }
  7871. }
  7872. }
  7873. },
  7874. "description": "Approve or deny a permission request from the AI assistant.",
  7875. "summary": "Respond to permission",
  7876. "deprecated": true,
  7877. "requestBody": {
  7878. "content": {
  7879. "application/json": {
  7880. "schema": {
  7881. "type": "object",
  7882. "properties": {
  7883. "response": {
  7884. "type": "string",
  7885. "enum": ["once", "always", "reject"]
  7886. }
  7887. },
  7888. "required": ["response"],
  7889. "additionalProperties": false
  7890. }
  7891. }
  7892. }
  7893. },
  7894. "x-codeSamples": [
  7895. {
  7896. "lang": "js",
  7897. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7898. }
  7899. ]
  7900. }
  7901. },
  7902. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7903. "delete": {
  7904. "tags": ["session"],
  7905. "operationId": "part.delete",
  7906. "parameters": [
  7907. {
  7908. "name": "sessionID",
  7909. "in": "path",
  7910. "schema": {
  7911. "type": "string",
  7912. "pattern": "^ses"
  7913. },
  7914. "required": true
  7915. },
  7916. {
  7917. "name": "messageID",
  7918. "in": "path",
  7919. "schema": {
  7920. "type": "string",
  7921. "pattern": "^msg"
  7922. },
  7923. "required": true
  7924. },
  7925. {
  7926. "name": "partID",
  7927. "in": "path",
  7928. "schema": {
  7929. "type": "string",
  7930. "pattern": "^prt"
  7931. },
  7932. "required": true
  7933. },
  7934. {
  7935. "name": "directory",
  7936. "in": "query",
  7937. "schema": {
  7938. "type": "string"
  7939. },
  7940. "required": false
  7941. },
  7942. {
  7943. "name": "workspace",
  7944. "in": "query",
  7945. "schema": {
  7946. "type": "string"
  7947. },
  7948. "required": false
  7949. }
  7950. ],
  7951. "responses": {
  7952. "200": {
  7953. "description": "Successfully deleted part",
  7954. "content": {
  7955. "application/json": {
  7956. "schema": {
  7957. "type": "boolean",
  7958. "description": "Successfully deleted part"
  7959. }
  7960. }
  7961. }
  7962. },
  7963. "400": {
  7964. "description": "BadRequest | InvalidRequestError",
  7965. "content": {
  7966. "application/json": {
  7967. "schema": {
  7968. "anyOf": [
  7969. {
  7970. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7971. },
  7972. {
  7973. "$ref": "#/components/schemas/InvalidRequestError"
  7974. }
  7975. ]
  7976. }
  7977. }
  7978. }
  7979. },
  7980. "404": {
  7981. "description": "NotFoundError",
  7982. "content": {
  7983. "application/json": {
  7984. "schema": {
  7985. "$ref": "#/components/schemas/NotFoundError"
  7986. }
  7987. }
  7988. }
  7989. }
  7990. },
  7991. "description": "Delete a part from a message.",
  7992. "x-codeSamples": [
  7993. {
  7994. "lang": "js",
  7995. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  7996. }
  7997. ]
  7998. },
  7999. "patch": {
  8000. "tags": ["session"],
  8001. "operationId": "part.update",
  8002. "parameters": [
  8003. {
  8004. "name": "sessionID",
  8005. "in": "path",
  8006. "schema": {
  8007. "type": "string",
  8008. "pattern": "^ses"
  8009. },
  8010. "required": true
  8011. },
  8012. {
  8013. "name": "messageID",
  8014. "in": "path",
  8015. "schema": {
  8016. "type": "string",
  8017. "pattern": "^msg"
  8018. },
  8019. "required": true
  8020. },
  8021. {
  8022. "name": "partID",
  8023. "in": "path",
  8024. "schema": {
  8025. "type": "string",
  8026. "pattern": "^prt"
  8027. },
  8028. "required": true
  8029. },
  8030. {
  8031. "name": "directory",
  8032. "in": "query",
  8033. "schema": {
  8034. "type": "string"
  8035. },
  8036. "required": false
  8037. },
  8038. {
  8039. "name": "workspace",
  8040. "in": "query",
  8041. "schema": {
  8042. "type": "string"
  8043. },
  8044. "required": false
  8045. }
  8046. ],
  8047. "responses": {
  8048. "200": {
  8049. "description": "Successfully updated part",
  8050. "content": {
  8051. "application/json": {
  8052. "schema": {
  8053. "$ref": "#/components/schemas/Part"
  8054. }
  8055. }
  8056. }
  8057. },
  8058. "400": {
  8059. "description": "BadRequest | InvalidRequestError",
  8060. "content": {
  8061. "application/json": {
  8062. "schema": {
  8063. "anyOf": [
  8064. {
  8065. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8066. },
  8067. {
  8068. "$ref": "#/components/schemas/InvalidRequestError"
  8069. }
  8070. ]
  8071. }
  8072. }
  8073. }
  8074. },
  8075. "404": {
  8076. "description": "NotFoundError",
  8077. "content": {
  8078. "application/json": {
  8079. "schema": {
  8080. "$ref": "#/components/schemas/NotFoundError"
  8081. }
  8082. }
  8083. }
  8084. }
  8085. },
  8086. "description": "Update a part in a message.",
  8087. "requestBody": {
  8088. "content": {
  8089. "application/json": {
  8090. "schema": {
  8091. "$ref": "#/components/schemas/Part"
  8092. }
  8093. }
  8094. }
  8095. },
  8096. "x-codeSamples": [
  8097. {
  8098. "lang": "js",
  8099. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  8100. }
  8101. ]
  8102. }
  8103. },
  8104. "/sync/start": {
  8105. "post": {
  8106. "tags": ["sync"],
  8107. "operationId": "sync.start",
  8108. "parameters": [
  8109. {
  8110. "name": "directory",
  8111. "in": "query",
  8112. "schema": {
  8113. "type": "string"
  8114. },
  8115. "required": false
  8116. },
  8117. {
  8118. "name": "workspace",
  8119. "in": "query",
  8120. "schema": {
  8121. "type": "string"
  8122. },
  8123. "required": false
  8124. }
  8125. ],
  8126. "responses": {
  8127. "200": {
  8128. "description": "Workspace sync started",
  8129. "content": {
  8130. "application/json": {
  8131. "schema": {
  8132. "type": "boolean",
  8133. "description": "Workspace sync started"
  8134. }
  8135. }
  8136. }
  8137. },
  8138. "400": {
  8139. "description": "Bad request",
  8140. "content": {
  8141. "application/json": {
  8142. "schema": {
  8143. "$ref": "#/components/schemas/BadRequestError"
  8144. }
  8145. }
  8146. }
  8147. }
  8148. },
  8149. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  8150. "summary": "Start workspace sync",
  8151. "x-codeSamples": [
  8152. {
  8153. "lang": "js",
  8154. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  8155. }
  8156. ]
  8157. }
  8158. },
  8159. "/sync/replay": {
  8160. "post": {
  8161. "tags": ["sync"],
  8162. "operationId": "sync.replay",
  8163. "parameters": [
  8164. {
  8165. "name": "directory",
  8166. "in": "query",
  8167. "schema": {
  8168. "type": "string"
  8169. },
  8170. "required": false
  8171. },
  8172. {
  8173. "name": "workspace",
  8174. "in": "query",
  8175. "schema": {
  8176. "type": "string"
  8177. },
  8178. "required": false
  8179. }
  8180. ],
  8181. "responses": {
  8182. "200": {
  8183. "description": "Replayed sync events",
  8184. "content": {
  8185. "application/json": {
  8186. "schema": {
  8187. "type": "object",
  8188. "properties": {
  8189. "sessionID": {
  8190. "type": "string"
  8191. }
  8192. },
  8193. "required": ["sessionID"],
  8194. "additionalProperties": false,
  8195. "description": "Replayed sync events"
  8196. }
  8197. }
  8198. }
  8199. },
  8200. "400": {
  8201. "description": "BadRequest | InvalidRequestError",
  8202. "content": {
  8203. "application/json": {
  8204. "schema": {
  8205. "anyOf": [
  8206. {
  8207. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8208. },
  8209. {
  8210. "$ref": "#/components/schemas/InvalidRequestError"
  8211. }
  8212. ]
  8213. }
  8214. }
  8215. }
  8216. }
  8217. },
  8218. "description": "Validate and replay a complete sync event history.",
  8219. "summary": "Replay sync events",
  8220. "requestBody": {
  8221. "content": {
  8222. "application/json": {
  8223. "schema": {
  8224. "type": "object",
  8225. "properties": {
  8226. "directory": {
  8227. "type": "string"
  8228. },
  8229. "events": {
  8230. "type": "array",
  8231. "minItems": 1,
  8232. "items": {
  8233. "type": "object",
  8234. "properties": {
  8235. "id": {
  8236. "type": "string"
  8237. },
  8238. "aggregateID": {
  8239. "type": "string"
  8240. },
  8241. "seq": {
  8242. "type": "integer",
  8243. "minimum": 0
  8244. },
  8245. "type": {
  8246. "type": "string"
  8247. },
  8248. "data": {
  8249. "type": "object"
  8250. }
  8251. },
  8252. "required": ["id", "aggregateID", "seq", "type", "data"],
  8253. "additionalProperties": false
  8254. }
  8255. }
  8256. },
  8257. "required": ["directory", "events"],
  8258. "additionalProperties": false
  8259. }
  8260. }
  8261. }
  8262. },
  8263. "x-codeSamples": [
  8264. {
  8265. "lang": "js",
  8266. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  8267. }
  8268. ]
  8269. }
  8270. },
  8271. "/sync/steal": {
  8272. "post": {
  8273. "tags": ["sync"],
  8274. "operationId": "sync.steal",
  8275. "parameters": [
  8276. {
  8277. "name": "directory",
  8278. "in": "query",
  8279. "schema": {
  8280. "type": "string"
  8281. },
  8282. "required": false
  8283. },
  8284. {
  8285. "name": "workspace",
  8286. "in": "query",
  8287. "schema": {
  8288. "type": "string"
  8289. },
  8290. "required": false
  8291. }
  8292. ],
  8293. "responses": {
  8294. "200": {
  8295. "description": "Session stolen into workspace",
  8296. "content": {
  8297. "application/json": {
  8298. "schema": {
  8299. "type": "object",
  8300. "properties": {
  8301. "sessionID": {
  8302. "type": "string",
  8303. "pattern": "^ses"
  8304. }
  8305. },
  8306. "required": ["sessionID"],
  8307. "additionalProperties": false,
  8308. "description": "Session stolen into workspace"
  8309. }
  8310. }
  8311. }
  8312. },
  8313. "400": {
  8314. "description": "BadRequest | InvalidRequestError",
  8315. "content": {
  8316. "application/json": {
  8317. "schema": {
  8318. "anyOf": [
  8319. {
  8320. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8321. },
  8322. {
  8323. "$ref": "#/components/schemas/InvalidRequestError"
  8324. }
  8325. ]
  8326. }
  8327. }
  8328. }
  8329. }
  8330. },
  8331. "description": "Update a session to belong to the current workspace through the sync event system.",
  8332. "summary": "Steal session into workspace",
  8333. "requestBody": {
  8334. "content": {
  8335. "application/json": {
  8336. "schema": {
  8337. "type": "object",
  8338. "properties": {
  8339. "sessionID": {
  8340. "type": "string",
  8341. "pattern": "^ses"
  8342. }
  8343. },
  8344. "required": ["sessionID"],
  8345. "additionalProperties": false
  8346. }
  8347. }
  8348. }
  8349. },
  8350. "x-codeSamples": [
  8351. {
  8352. "lang": "js",
  8353. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  8354. }
  8355. ]
  8356. }
  8357. },
  8358. "/sync/history": {
  8359. "post": {
  8360. "tags": ["sync"],
  8361. "operationId": "sync.history.list",
  8362. "parameters": [
  8363. {
  8364. "name": "directory",
  8365. "in": "query",
  8366. "schema": {
  8367. "type": "string"
  8368. },
  8369. "required": false
  8370. },
  8371. {
  8372. "name": "workspace",
  8373. "in": "query",
  8374. "schema": {
  8375. "type": "string"
  8376. },
  8377. "required": false
  8378. }
  8379. ],
  8380. "responses": {
  8381. "200": {
  8382. "description": "Sync events",
  8383. "content": {
  8384. "application/json": {
  8385. "schema": {
  8386. "type": "array",
  8387. "items": {
  8388. "type": "object",
  8389. "properties": {
  8390. "id": {
  8391. "type": "string"
  8392. },
  8393. "aggregate_id": {
  8394. "type": "string"
  8395. },
  8396. "seq": {
  8397. "type": "integer",
  8398. "minimum": 0
  8399. },
  8400. "type": {
  8401. "type": "string"
  8402. },
  8403. "data": {
  8404. "type": "object"
  8405. }
  8406. },
  8407. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8408. "additionalProperties": false
  8409. },
  8410. "description": "Sync events"
  8411. }
  8412. }
  8413. }
  8414. },
  8415. "400": {
  8416. "description": "BadRequest | InvalidRequestError",
  8417. "content": {
  8418. "application/json": {
  8419. "schema": {
  8420. "anyOf": [
  8421. {
  8422. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8423. },
  8424. {
  8425. "$ref": "#/components/schemas/InvalidRequestError"
  8426. }
  8427. ]
  8428. }
  8429. }
  8430. }
  8431. }
  8432. },
  8433. "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.",
  8434. "summary": "List sync events",
  8435. "requestBody": {
  8436. "content": {
  8437. "application/json": {
  8438. "schema": {
  8439. "type": "object",
  8440. "additionalProperties": {
  8441. "type": "integer",
  8442. "minimum": 0
  8443. }
  8444. }
  8445. }
  8446. }
  8447. },
  8448. "x-codeSamples": [
  8449. {
  8450. "lang": "js",
  8451. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8452. }
  8453. ]
  8454. }
  8455. },
  8456. "/tui/append-prompt": {
  8457. "post": {
  8458. "tags": ["tui"],
  8459. "operationId": "tui.appendPrompt",
  8460. "parameters": [
  8461. {
  8462. "name": "directory",
  8463. "in": "query",
  8464. "schema": {
  8465. "type": "string"
  8466. },
  8467. "required": false
  8468. },
  8469. {
  8470. "name": "workspace",
  8471. "in": "query",
  8472. "schema": {
  8473. "type": "string"
  8474. },
  8475. "required": false
  8476. }
  8477. ],
  8478. "responses": {
  8479. "200": {
  8480. "description": "Prompt processed successfully",
  8481. "content": {
  8482. "application/json": {
  8483. "schema": {
  8484. "type": "boolean",
  8485. "description": "Prompt processed successfully"
  8486. }
  8487. }
  8488. }
  8489. },
  8490. "400": {
  8491. "description": "BadRequest | InvalidRequestError",
  8492. "content": {
  8493. "application/json": {
  8494. "schema": {
  8495. "anyOf": [
  8496. {
  8497. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8498. },
  8499. {
  8500. "$ref": "#/components/schemas/InvalidRequestError"
  8501. }
  8502. ]
  8503. }
  8504. }
  8505. }
  8506. }
  8507. },
  8508. "description": "Append prompt to the TUI.",
  8509. "summary": "Append TUI prompt",
  8510. "requestBody": {
  8511. "content": {
  8512. "application/json": {
  8513. "schema": {
  8514. "type": "object",
  8515. "properties": {
  8516. "text": {
  8517. "type": "string"
  8518. }
  8519. },
  8520. "required": ["text"],
  8521. "additionalProperties": false
  8522. }
  8523. }
  8524. }
  8525. },
  8526. "x-codeSamples": [
  8527. {
  8528. "lang": "js",
  8529. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  8530. }
  8531. ]
  8532. }
  8533. },
  8534. "/tui/open-help": {
  8535. "post": {
  8536. "tags": ["tui"],
  8537. "operationId": "tui.openHelp",
  8538. "parameters": [
  8539. {
  8540. "name": "directory",
  8541. "in": "query",
  8542. "schema": {
  8543. "type": "string"
  8544. },
  8545. "required": false
  8546. },
  8547. {
  8548. "name": "workspace",
  8549. "in": "query",
  8550. "schema": {
  8551. "type": "string"
  8552. },
  8553. "required": false
  8554. }
  8555. ],
  8556. "responses": {
  8557. "200": {
  8558. "description": "Help dialog opened successfully",
  8559. "content": {
  8560. "application/json": {
  8561. "schema": {
  8562. "type": "boolean",
  8563. "description": "Help dialog opened successfully"
  8564. }
  8565. }
  8566. }
  8567. },
  8568. "400": {
  8569. "description": "Bad request",
  8570. "content": {
  8571. "application/json": {
  8572. "schema": {
  8573. "$ref": "#/components/schemas/BadRequestError"
  8574. }
  8575. }
  8576. }
  8577. }
  8578. },
  8579. "description": "Open the help dialog in the TUI to display user assistance information.",
  8580. "summary": "Open help dialog",
  8581. "x-codeSamples": [
  8582. {
  8583. "lang": "js",
  8584. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  8585. }
  8586. ]
  8587. }
  8588. },
  8589. "/tui/open-sessions": {
  8590. "post": {
  8591. "tags": ["tui"],
  8592. "operationId": "tui.openSessions",
  8593. "parameters": [
  8594. {
  8595. "name": "directory",
  8596. "in": "query",
  8597. "schema": {
  8598. "type": "string"
  8599. },
  8600. "required": false
  8601. },
  8602. {
  8603. "name": "workspace",
  8604. "in": "query",
  8605. "schema": {
  8606. "type": "string"
  8607. },
  8608. "required": false
  8609. }
  8610. ],
  8611. "responses": {
  8612. "200": {
  8613. "description": "Session dialog opened successfully",
  8614. "content": {
  8615. "application/json": {
  8616. "schema": {
  8617. "type": "boolean",
  8618. "description": "Session dialog opened successfully"
  8619. }
  8620. }
  8621. }
  8622. },
  8623. "400": {
  8624. "description": "Bad request",
  8625. "content": {
  8626. "application/json": {
  8627. "schema": {
  8628. "$ref": "#/components/schemas/BadRequestError"
  8629. }
  8630. }
  8631. }
  8632. }
  8633. },
  8634. "description": "Open the session dialog.",
  8635. "summary": "Open sessions dialog",
  8636. "x-codeSamples": [
  8637. {
  8638. "lang": "js",
  8639. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  8640. }
  8641. ]
  8642. }
  8643. },
  8644. "/tui/open-themes": {
  8645. "post": {
  8646. "tags": ["tui"],
  8647. "operationId": "tui.openThemes",
  8648. "parameters": [
  8649. {
  8650. "name": "directory",
  8651. "in": "query",
  8652. "schema": {
  8653. "type": "string"
  8654. },
  8655. "required": false
  8656. },
  8657. {
  8658. "name": "workspace",
  8659. "in": "query",
  8660. "schema": {
  8661. "type": "string"
  8662. },
  8663. "required": false
  8664. }
  8665. ],
  8666. "responses": {
  8667. "200": {
  8668. "description": "Theme dialog opened successfully",
  8669. "content": {
  8670. "application/json": {
  8671. "schema": {
  8672. "type": "boolean",
  8673. "description": "Theme dialog opened successfully"
  8674. }
  8675. }
  8676. }
  8677. },
  8678. "400": {
  8679. "description": "Bad request",
  8680. "content": {
  8681. "application/json": {
  8682. "schema": {
  8683. "$ref": "#/components/schemas/BadRequestError"
  8684. }
  8685. }
  8686. }
  8687. }
  8688. },
  8689. "description": "Open the theme dialog.",
  8690. "summary": "Open themes dialog",
  8691. "x-codeSamples": [
  8692. {
  8693. "lang": "js",
  8694. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  8695. }
  8696. ]
  8697. }
  8698. },
  8699. "/tui/open-models": {
  8700. "post": {
  8701. "tags": ["tui"],
  8702. "operationId": "tui.openModels",
  8703. "parameters": [
  8704. {
  8705. "name": "directory",
  8706. "in": "query",
  8707. "schema": {
  8708. "type": "string"
  8709. },
  8710. "required": false
  8711. },
  8712. {
  8713. "name": "workspace",
  8714. "in": "query",
  8715. "schema": {
  8716. "type": "string"
  8717. },
  8718. "required": false
  8719. }
  8720. ],
  8721. "responses": {
  8722. "200": {
  8723. "description": "Model dialog opened successfully",
  8724. "content": {
  8725. "application/json": {
  8726. "schema": {
  8727. "type": "boolean",
  8728. "description": "Model dialog opened successfully"
  8729. }
  8730. }
  8731. }
  8732. },
  8733. "400": {
  8734. "description": "Bad request",
  8735. "content": {
  8736. "application/json": {
  8737. "schema": {
  8738. "$ref": "#/components/schemas/BadRequestError"
  8739. }
  8740. }
  8741. }
  8742. }
  8743. },
  8744. "description": "Open the model dialog.",
  8745. "summary": "Open models dialog",
  8746. "x-codeSamples": [
  8747. {
  8748. "lang": "js",
  8749. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  8750. }
  8751. ]
  8752. }
  8753. },
  8754. "/tui/submit-prompt": {
  8755. "post": {
  8756. "tags": ["tui"],
  8757. "operationId": "tui.submitPrompt",
  8758. "parameters": [
  8759. {
  8760. "name": "directory",
  8761. "in": "query",
  8762. "schema": {
  8763. "type": "string"
  8764. },
  8765. "required": false
  8766. },
  8767. {
  8768. "name": "workspace",
  8769. "in": "query",
  8770. "schema": {
  8771. "type": "string"
  8772. },
  8773. "required": false
  8774. }
  8775. ],
  8776. "responses": {
  8777. "200": {
  8778. "description": "Prompt submitted successfully",
  8779. "content": {
  8780. "application/json": {
  8781. "schema": {
  8782. "type": "boolean",
  8783. "description": "Prompt submitted successfully"
  8784. }
  8785. }
  8786. }
  8787. },
  8788. "400": {
  8789. "description": "Bad request",
  8790. "content": {
  8791. "application/json": {
  8792. "schema": {
  8793. "$ref": "#/components/schemas/BadRequestError"
  8794. }
  8795. }
  8796. }
  8797. }
  8798. },
  8799. "description": "Submit the prompt.",
  8800. "summary": "Submit TUI prompt",
  8801. "x-codeSamples": [
  8802. {
  8803. "lang": "js",
  8804. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  8805. }
  8806. ]
  8807. }
  8808. },
  8809. "/tui/clear-prompt": {
  8810. "post": {
  8811. "tags": ["tui"],
  8812. "operationId": "tui.clearPrompt",
  8813. "parameters": [
  8814. {
  8815. "name": "directory",
  8816. "in": "query",
  8817. "schema": {
  8818. "type": "string"
  8819. },
  8820. "required": false
  8821. },
  8822. {
  8823. "name": "workspace",
  8824. "in": "query",
  8825. "schema": {
  8826. "type": "string"
  8827. },
  8828. "required": false
  8829. }
  8830. ],
  8831. "responses": {
  8832. "200": {
  8833. "description": "Prompt cleared successfully",
  8834. "content": {
  8835. "application/json": {
  8836. "schema": {
  8837. "type": "boolean",
  8838. "description": "Prompt cleared successfully"
  8839. }
  8840. }
  8841. }
  8842. },
  8843. "400": {
  8844. "description": "Bad request",
  8845. "content": {
  8846. "application/json": {
  8847. "schema": {
  8848. "$ref": "#/components/schemas/BadRequestError"
  8849. }
  8850. }
  8851. }
  8852. }
  8853. },
  8854. "description": "Clear the prompt.",
  8855. "summary": "Clear TUI prompt",
  8856. "x-codeSamples": [
  8857. {
  8858. "lang": "js",
  8859. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  8860. }
  8861. ]
  8862. }
  8863. },
  8864. "/tui/execute-command": {
  8865. "post": {
  8866. "tags": ["tui"],
  8867. "operationId": "tui.executeCommand",
  8868. "parameters": [
  8869. {
  8870. "name": "directory",
  8871. "in": "query",
  8872. "schema": {
  8873. "type": "string"
  8874. },
  8875. "required": false
  8876. },
  8877. {
  8878. "name": "workspace",
  8879. "in": "query",
  8880. "schema": {
  8881. "type": "string"
  8882. },
  8883. "required": false
  8884. }
  8885. ],
  8886. "responses": {
  8887. "200": {
  8888. "description": "Command executed successfully",
  8889. "content": {
  8890. "application/json": {
  8891. "schema": {
  8892. "type": "boolean",
  8893. "description": "Command executed successfully"
  8894. }
  8895. }
  8896. }
  8897. },
  8898. "400": {
  8899. "description": "BadRequest | InvalidRequestError",
  8900. "content": {
  8901. "application/json": {
  8902. "schema": {
  8903. "anyOf": [
  8904. {
  8905. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8906. },
  8907. {
  8908. "$ref": "#/components/schemas/InvalidRequestError"
  8909. }
  8910. ]
  8911. }
  8912. }
  8913. }
  8914. }
  8915. },
  8916. "description": "Execute a TUI command.",
  8917. "summary": "Execute TUI command",
  8918. "requestBody": {
  8919. "content": {
  8920. "application/json": {
  8921. "schema": {
  8922. "type": "object",
  8923. "properties": {
  8924. "command": {
  8925. "type": "string"
  8926. }
  8927. },
  8928. "required": ["command"],
  8929. "additionalProperties": false
  8930. }
  8931. }
  8932. }
  8933. },
  8934. "x-codeSamples": [
  8935. {
  8936. "lang": "js",
  8937. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  8938. }
  8939. ]
  8940. }
  8941. },
  8942. "/tui/show-toast": {
  8943. "post": {
  8944. "tags": ["tui"],
  8945. "operationId": "tui.showToast",
  8946. "parameters": [
  8947. {
  8948. "name": "directory",
  8949. "in": "query",
  8950. "schema": {
  8951. "type": "string"
  8952. },
  8953. "required": false
  8954. },
  8955. {
  8956. "name": "workspace",
  8957. "in": "query",
  8958. "schema": {
  8959. "type": "string"
  8960. },
  8961. "required": false
  8962. }
  8963. ],
  8964. "responses": {
  8965. "200": {
  8966. "description": "Toast notification shown successfully",
  8967. "content": {
  8968. "application/json": {
  8969. "schema": {
  8970. "type": "boolean",
  8971. "description": "Toast notification shown successfully"
  8972. }
  8973. }
  8974. }
  8975. },
  8976. "400": {
  8977. "description": "Bad request",
  8978. "content": {
  8979. "application/json": {
  8980. "schema": {
  8981. "$ref": "#/components/schemas/BadRequestError"
  8982. }
  8983. }
  8984. }
  8985. }
  8986. },
  8987. "description": "Show a toast notification in the TUI.",
  8988. "summary": "Show TUI toast",
  8989. "requestBody": {
  8990. "content": {
  8991. "application/json": {
  8992. "schema": {
  8993. "type": "object",
  8994. "properties": {
  8995. "title": {
  8996. "type": "string"
  8997. },
  8998. "message": {
  8999. "type": "string"
  9000. },
  9001. "variant": {
  9002. "type": "string",
  9003. "enum": ["info", "success", "warning", "error"]
  9004. },
  9005. "duration": {
  9006. "type": "integer",
  9007. "exclusiveMinimum": 0
  9008. }
  9009. },
  9010. "required": ["message", "variant"],
  9011. "additionalProperties": false
  9012. }
  9013. }
  9014. }
  9015. },
  9016. "x-codeSamples": [
  9017. {
  9018. "lang": "js",
  9019. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  9020. }
  9021. ]
  9022. }
  9023. },
  9024. "/tui/publish": {
  9025. "post": {
  9026. "tags": ["tui"],
  9027. "operationId": "tui.publish",
  9028. "parameters": [
  9029. {
  9030. "name": "directory",
  9031. "in": "query",
  9032. "schema": {
  9033. "type": "string"
  9034. },
  9035. "required": false
  9036. },
  9037. {
  9038. "name": "workspace",
  9039. "in": "query",
  9040. "schema": {
  9041. "type": "string"
  9042. },
  9043. "required": false
  9044. }
  9045. ],
  9046. "responses": {
  9047. "200": {
  9048. "description": "Event published successfully",
  9049. "content": {
  9050. "application/json": {
  9051. "schema": {
  9052. "type": "boolean",
  9053. "description": "Event published successfully"
  9054. }
  9055. }
  9056. }
  9057. },
  9058. "400": {
  9059. "description": "BadRequest | InvalidRequestError",
  9060. "content": {
  9061. "application/json": {
  9062. "schema": {
  9063. "anyOf": [
  9064. {
  9065. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9066. },
  9067. {
  9068. "$ref": "#/components/schemas/InvalidRequestError"
  9069. }
  9070. ]
  9071. }
  9072. }
  9073. }
  9074. }
  9075. },
  9076. "description": "Publish a TUI event.",
  9077. "summary": "Publish TUI event",
  9078. "requestBody": {
  9079. "content": {
  9080. "application/json": {
  9081. "schema": {
  9082. "anyOf": [
  9083. {
  9084. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9085. },
  9086. {
  9087. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9088. },
  9089. {
  9090. "$ref": "#/components/schemas/EventTuiToastShow"
  9091. },
  9092. {
  9093. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9094. }
  9095. ]
  9096. }
  9097. }
  9098. }
  9099. },
  9100. "x-codeSamples": [
  9101. {
  9102. "lang": "js",
  9103. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9104. }
  9105. ]
  9106. }
  9107. },
  9108. "/tui/select-session": {
  9109. "post": {
  9110. "tags": ["tui"],
  9111. "operationId": "tui.selectSession",
  9112. "parameters": [
  9113. {
  9114. "name": "directory",
  9115. "in": "query",
  9116. "schema": {
  9117. "type": "string"
  9118. },
  9119. "required": false
  9120. },
  9121. {
  9122. "name": "workspace",
  9123. "in": "query",
  9124. "schema": {
  9125. "type": "string"
  9126. },
  9127. "required": false
  9128. }
  9129. ],
  9130. "responses": {
  9131. "200": {
  9132. "description": "Session selected successfully",
  9133. "content": {
  9134. "application/json": {
  9135. "schema": {
  9136. "type": "boolean",
  9137. "description": "Session selected successfully"
  9138. }
  9139. }
  9140. }
  9141. },
  9142. "400": {
  9143. "description": "BadRequest | InvalidRequestError",
  9144. "content": {
  9145. "application/json": {
  9146. "schema": {
  9147. "anyOf": [
  9148. {
  9149. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9150. },
  9151. {
  9152. "$ref": "#/components/schemas/InvalidRequestError"
  9153. }
  9154. ]
  9155. }
  9156. }
  9157. }
  9158. },
  9159. "404": {
  9160. "description": "NotFoundError",
  9161. "content": {
  9162. "application/json": {
  9163. "schema": {
  9164. "$ref": "#/components/schemas/NotFoundError"
  9165. }
  9166. }
  9167. }
  9168. }
  9169. },
  9170. "description": "Navigate the TUI to display the specified session.",
  9171. "summary": "Select session",
  9172. "requestBody": {
  9173. "content": {
  9174. "application/json": {
  9175. "schema": {
  9176. "type": "object",
  9177. "properties": {
  9178. "sessionID": {
  9179. "type": "string",
  9180. "pattern": "^ses",
  9181. "description": "Session ID to navigate to"
  9182. }
  9183. },
  9184. "required": ["sessionID"],
  9185. "additionalProperties": false
  9186. }
  9187. }
  9188. }
  9189. },
  9190. "x-codeSamples": [
  9191. {
  9192. "lang": "js",
  9193. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9194. }
  9195. ]
  9196. }
  9197. },
  9198. "/tui/control/next": {
  9199. "get": {
  9200. "tags": ["tui"],
  9201. "operationId": "tui.control.next",
  9202. "parameters": [
  9203. {
  9204. "name": "directory",
  9205. "in": "query",
  9206. "schema": {
  9207. "type": "string"
  9208. },
  9209. "required": false
  9210. },
  9211. {
  9212. "name": "workspace",
  9213. "in": "query",
  9214. "schema": {
  9215. "type": "string"
  9216. },
  9217. "required": false
  9218. }
  9219. ],
  9220. "responses": {
  9221. "200": {
  9222. "description": "Next TUI request",
  9223. "content": {
  9224. "application/json": {
  9225. "schema": {
  9226. "type": "object",
  9227. "properties": {
  9228. "path": {
  9229. "type": "string"
  9230. },
  9231. "body": {}
  9232. },
  9233. "required": ["path", "body"],
  9234. "additionalProperties": false,
  9235. "description": "Next TUI request"
  9236. }
  9237. }
  9238. }
  9239. },
  9240. "400": {
  9241. "description": "Bad request",
  9242. "content": {
  9243. "application/json": {
  9244. "schema": {
  9245. "$ref": "#/components/schemas/BadRequestError"
  9246. }
  9247. }
  9248. }
  9249. }
  9250. },
  9251. "description": "Retrieve the next TUI request from the queue for processing.",
  9252. "summary": "Get next TUI request",
  9253. "x-codeSamples": [
  9254. {
  9255. "lang": "js",
  9256. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9257. }
  9258. ]
  9259. }
  9260. },
  9261. "/tui/control/response": {
  9262. "post": {
  9263. "tags": ["tui"],
  9264. "operationId": "tui.control.response",
  9265. "parameters": [
  9266. {
  9267. "name": "directory",
  9268. "in": "query",
  9269. "schema": {
  9270. "type": "string"
  9271. },
  9272. "required": false
  9273. },
  9274. {
  9275. "name": "workspace",
  9276. "in": "query",
  9277. "schema": {
  9278. "type": "string"
  9279. },
  9280. "required": false
  9281. }
  9282. ],
  9283. "responses": {
  9284. "200": {
  9285. "description": "Response submitted successfully",
  9286. "content": {
  9287. "application/json": {
  9288. "schema": {
  9289. "type": "boolean",
  9290. "description": "Response submitted successfully"
  9291. }
  9292. }
  9293. }
  9294. },
  9295. "400": {
  9296. "description": "Bad request",
  9297. "content": {
  9298. "application/json": {
  9299. "schema": {
  9300. "$ref": "#/components/schemas/BadRequestError"
  9301. }
  9302. }
  9303. }
  9304. }
  9305. },
  9306. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9307. "summary": "Submit TUI response",
  9308. "requestBody": {
  9309. "content": {
  9310. "application/json": {
  9311. "schema": {}
  9312. }
  9313. }
  9314. },
  9315. "x-codeSamples": [
  9316. {
  9317. "lang": "js",
  9318. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9319. }
  9320. ]
  9321. }
  9322. },
  9323. "/experimental/workspace/adapter": {
  9324. "get": {
  9325. "tags": ["workspace"],
  9326. "operationId": "experimental.workspace.adapter.list",
  9327. "parameters": [
  9328. {
  9329. "name": "directory",
  9330. "in": "query",
  9331. "schema": {
  9332. "type": "string"
  9333. },
  9334. "required": false
  9335. },
  9336. {
  9337. "name": "workspace",
  9338. "in": "query",
  9339. "schema": {
  9340. "type": "string"
  9341. },
  9342. "required": false
  9343. }
  9344. ],
  9345. "responses": {
  9346. "200": {
  9347. "description": "Workspace adapters",
  9348. "content": {
  9349. "application/json": {
  9350. "schema": {
  9351. "type": "array",
  9352. "items": {
  9353. "type": "object",
  9354. "properties": {
  9355. "type": {
  9356. "type": "string"
  9357. },
  9358. "name": {
  9359. "type": "string"
  9360. },
  9361. "description": {
  9362. "type": "string"
  9363. }
  9364. },
  9365. "required": ["type", "name", "description"],
  9366. "additionalProperties": false
  9367. },
  9368. "description": "Workspace adapters"
  9369. }
  9370. }
  9371. }
  9372. },
  9373. "400": {
  9374. "description": "Bad request",
  9375. "content": {
  9376. "application/json": {
  9377. "schema": {
  9378. "$ref": "#/components/schemas/BadRequestError"
  9379. }
  9380. }
  9381. }
  9382. }
  9383. },
  9384. "description": "List all available workspace adapters for the current project.",
  9385. "summary": "List workspace adapters",
  9386. "x-codeSamples": [
  9387. {
  9388. "lang": "js",
  9389. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9390. }
  9391. ]
  9392. }
  9393. },
  9394. "/experimental/workspace": {
  9395. "get": {
  9396. "tags": ["workspace"],
  9397. "operationId": "experimental.workspace.list",
  9398. "parameters": [
  9399. {
  9400. "name": "directory",
  9401. "in": "query",
  9402. "schema": {
  9403. "type": "string"
  9404. },
  9405. "required": false
  9406. },
  9407. {
  9408. "name": "workspace",
  9409. "in": "query",
  9410. "schema": {
  9411. "type": "string"
  9412. },
  9413. "required": false
  9414. }
  9415. ],
  9416. "responses": {
  9417. "200": {
  9418. "description": "Workspaces",
  9419. "content": {
  9420. "application/json": {
  9421. "schema": {
  9422. "type": "array",
  9423. "items": {
  9424. "$ref": "#/components/schemas/Workspace"
  9425. },
  9426. "description": "Workspaces"
  9427. }
  9428. }
  9429. }
  9430. },
  9431. "400": {
  9432. "description": "Bad request",
  9433. "content": {
  9434. "application/json": {
  9435. "schema": {
  9436. "$ref": "#/components/schemas/BadRequestError"
  9437. }
  9438. }
  9439. }
  9440. }
  9441. },
  9442. "description": "List all workspaces.",
  9443. "summary": "List workspaces",
  9444. "x-codeSamples": [
  9445. {
  9446. "lang": "js",
  9447. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9448. }
  9449. ]
  9450. },
  9451. "post": {
  9452. "tags": ["workspace"],
  9453. "operationId": "experimental.workspace.create",
  9454. "parameters": [
  9455. {
  9456. "name": "directory",
  9457. "in": "query",
  9458. "schema": {
  9459. "type": "string"
  9460. },
  9461. "required": false
  9462. },
  9463. {
  9464. "name": "workspace",
  9465. "in": "query",
  9466. "schema": {
  9467. "type": "string"
  9468. },
  9469. "required": false
  9470. }
  9471. ],
  9472. "responses": {
  9473. "200": {
  9474. "description": "Workspace created",
  9475. "content": {
  9476. "application/json": {
  9477. "schema": {
  9478. "$ref": "#/components/schemas/Workspace"
  9479. }
  9480. }
  9481. }
  9482. },
  9483. "400": {
  9484. "description": "WorkspaceCreateError | BadRequest | InvalidRequestError",
  9485. "content": {
  9486. "application/json": {
  9487. "schema": {
  9488. "anyOf": [
  9489. {
  9490. "$ref": "#/components/schemas/WorkspaceCreateError"
  9491. },
  9492. {
  9493. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9494. },
  9495. {
  9496. "$ref": "#/components/schemas/InvalidRequestError"
  9497. }
  9498. ]
  9499. }
  9500. }
  9501. }
  9502. }
  9503. },
  9504. "description": "Create a workspace for the current project.",
  9505. "summary": "Create workspace",
  9506. "requestBody": {
  9507. "content": {
  9508. "application/json": {
  9509. "schema": {
  9510. "type": "object",
  9511. "properties": {
  9512. "id": {
  9513. "type": "string",
  9514. "pattern": "^wrk"
  9515. },
  9516. "type": {
  9517. "type": "string"
  9518. },
  9519. "branch": {
  9520. "anyOf": [
  9521. {
  9522. "type": "string"
  9523. },
  9524. {
  9525. "type": "null"
  9526. }
  9527. ]
  9528. },
  9529. "extra": {
  9530. "anyOf": [
  9531. {},
  9532. {
  9533. "type": "null"
  9534. }
  9535. ]
  9536. }
  9537. },
  9538. "required": ["type"],
  9539. "additionalProperties": false
  9540. }
  9541. }
  9542. }
  9543. },
  9544. "x-codeSamples": [
  9545. {
  9546. "lang": "js",
  9547. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  9548. }
  9549. ]
  9550. }
  9551. },
  9552. "/experimental/workspace/sync-list": {
  9553. "post": {
  9554. "tags": ["workspace"],
  9555. "operationId": "experimental.workspace.syncList",
  9556. "parameters": [
  9557. {
  9558. "name": "directory",
  9559. "in": "query",
  9560. "schema": {
  9561. "type": "string"
  9562. },
  9563. "required": false
  9564. },
  9565. {
  9566. "name": "workspace",
  9567. "in": "query",
  9568. "schema": {
  9569. "type": "string"
  9570. },
  9571. "required": false
  9572. }
  9573. ],
  9574. "responses": {
  9575. "204": {
  9576. "description": "Workspace list synced"
  9577. },
  9578. "400": {
  9579. "description": "Bad request",
  9580. "content": {
  9581. "application/json": {
  9582. "schema": {
  9583. "$ref": "#/components/schemas/BadRequestError"
  9584. }
  9585. }
  9586. }
  9587. }
  9588. },
  9589. "description": "Register missing workspaces returned by workspace adapters.",
  9590. "summary": "Sync workspace list",
  9591. "x-codeSamples": [
  9592. {
  9593. "lang": "js",
  9594. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  9595. }
  9596. ]
  9597. }
  9598. },
  9599. "/experimental/workspace/status": {
  9600. "get": {
  9601. "tags": ["workspace"],
  9602. "operationId": "experimental.workspace.status",
  9603. "parameters": [
  9604. {
  9605. "name": "directory",
  9606. "in": "query",
  9607. "schema": {
  9608. "type": "string"
  9609. },
  9610. "required": false
  9611. },
  9612. {
  9613. "name": "workspace",
  9614. "in": "query",
  9615. "schema": {
  9616. "type": "string"
  9617. },
  9618. "required": false
  9619. }
  9620. ],
  9621. "responses": {
  9622. "200": {
  9623. "description": "Workspace status",
  9624. "content": {
  9625. "application/json": {
  9626. "schema": {
  9627. "type": "array",
  9628. "items": {
  9629. "type": "object",
  9630. "properties": {
  9631. "workspaceID": {
  9632. "type": "string",
  9633. "pattern": "^wrk"
  9634. },
  9635. "status": {
  9636. "type": "string",
  9637. "enum": ["connected", "connecting", "disconnected", "error"]
  9638. }
  9639. },
  9640. "required": ["workspaceID", "status"],
  9641. "additionalProperties": false
  9642. },
  9643. "description": "Workspace status"
  9644. }
  9645. }
  9646. }
  9647. },
  9648. "400": {
  9649. "description": "Bad request",
  9650. "content": {
  9651. "application/json": {
  9652. "schema": {
  9653. "$ref": "#/components/schemas/BadRequestError"
  9654. }
  9655. }
  9656. }
  9657. }
  9658. },
  9659. "description": "Get connection status for workspaces in the current project.",
  9660. "summary": "Workspace status",
  9661. "x-codeSamples": [
  9662. {
  9663. "lang": "js",
  9664. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  9665. }
  9666. ]
  9667. }
  9668. },
  9669. "/experimental/workspace/{id}": {
  9670. "delete": {
  9671. "tags": ["workspace"],
  9672. "operationId": "experimental.workspace.remove",
  9673. "parameters": [
  9674. {
  9675. "name": "id",
  9676. "in": "path",
  9677. "schema": {
  9678. "type": "string",
  9679. "pattern": "^wrk"
  9680. },
  9681. "required": true
  9682. },
  9683. {
  9684. "name": "directory",
  9685. "in": "query",
  9686. "schema": {
  9687. "type": "string"
  9688. },
  9689. "required": false
  9690. },
  9691. {
  9692. "name": "workspace",
  9693. "in": "query",
  9694. "schema": {
  9695. "type": "string"
  9696. },
  9697. "required": false
  9698. }
  9699. ],
  9700. "responses": {
  9701. "200": {
  9702. "description": "Workspace removed",
  9703. "content": {
  9704. "application/json": {
  9705. "schema": {
  9706. "$ref": "#/components/schemas/Workspace"
  9707. }
  9708. }
  9709. }
  9710. },
  9711. "400": {
  9712. "description": "BadRequest | InvalidRequestError",
  9713. "content": {
  9714. "application/json": {
  9715. "schema": {
  9716. "anyOf": [
  9717. {
  9718. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9719. },
  9720. {
  9721. "$ref": "#/components/schemas/InvalidRequestError"
  9722. }
  9723. ]
  9724. }
  9725. }
  9726. }
  9727. }
  9728. },
  9729. "description": "Remove an existing workspace.",
  9730. "summary": "Remove workspace",
  9731. "x-codeSamples": [
  9732. {
  9733. "lang": "js",
  9734. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  9735. }
  9736. ]
  9737. }
  9738. },
  9739. "/experimental/workspace/warp": {
  9740. "post": {
  9741. "tags": ["workspace"],
  9742. "operationId": "experimental.workspace.warp",
  9743. "parameters": [
  9744. {
  9745. "name": "directory",
  9746. "in": "query",
  9747. "schema": {
  9748. "type": "string"
  9749. },
  9750. "required": false
  9751. },
  9752. {
  9753. "name": "workspace",
  9754. "in": "query",
  9755. "schema": {
  9756. "type": "string"
  9757. },
  9758. "required": false
  9759. }
  9760. ],
  9761. "responses": {
  9762. "204": {
  9763. "description": "Session warped"
  9764. },
  9765. "400": {
  9766. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  9767. "content": {
  9768. "application/json": {
  9769. "schema": {
  9770. "anyOf": [
  9771. {
  9772. "$ref": "#/components/schemas/WorkspaceWarpError"
  9773. },
  9774. {
  9775. "$ref": "#/components/schemas/VcsApplyError"
  9776. },
  9777. {
  9778. "$ref": "#/components/schemas/InvalidRequestError"
  9779. }
  9780. ]
  9781. }
  9782. }
  9783. }
  9784. },
  9785. "404": {
  9786. "description": "NotFoundError",
  9787. "content": {
  9788. "application/json": {
  9789. "schema": {
  9790. "$ref": "#/components/schemas/NotFoundError"
  9791. }
  9792. }
  9793. }
  9794. }
  9795. },
  9796. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  9797. "summary": "Warp session into workspace",
  9798. "requestBody": {
  9799. "content": {
  9800. "application/json": {
  9801. "schema": {
  9802. "type": "object",
  9803. "properties": {
  9804. "id": {
  9805. "anyOf": [
  9806. {
  9807. "type": "string",
  9808. "pattern": "^wrk"
  9809. },
  9810. {
  9811. "type": "null"
  9812. }
  9813. ]
  9814. },
  9815. "sessionID": {
  9816. "type": "string",
  9817. "pattern": "^ses"
  9818. },
  9819. "copyChanges": {
  9820. "type": "boolean"
  9821. }
  9822. },
  9823. "required": ["id", "sessionID"],
  9824. "additionalProperties": false
  9825. }
  9826. }
  9827. }
  9828. },
  9829. "x-codeSamples": [
  9830. {
  9831. "lang": "js",
  9832. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  9833. }
  9834. ]
  9835. }
  9836. },
  9837. "/api/health": {
  9838. "get": {
  9839. "tags": ["opencode experimental HttpApi"],
  9840. "operationId": "v2.health.get",
  9841. "parameters": [],
  9842. "security": [],
  9843. "responses": {
  9844. "200": {
  9845. "description": "Success",
  9846. "content": {
  9847. "application/json": {
  9848. "schema": {
  9849. "type": "object",
  9850. "properties": {
  9851. "healthy": {
  9852. "type": "boolean",
  9853. "enum": [true]
  9854. }
  9855. },
  9856. "required": ["healthy"],
  9857. "additionalProperties": false
  9858. }
  9859. }
  9860. }
  9861. },
  9862. "400": {
  9863. "description": "InvalidRequestError",
  9864. "content": {
  9865. "application/json": {
  9866. "schema": {
  9867. "$ref": "#/components/schemas/InvalidRequestError"
  9868. }
  9869. }
  9870. }
  9871. },
  9872. "401": {
  9873. "description": "UnauthorizedError",
  9874. "content": {
  9875. "application/json": {
  9876. "schema": {
  9877. "$ref": "#/components/schemas/UnauthorizedError"
  9878. }
  9879. }
  9880. }
  9881. }
  9882. },
  9883. "description": "Check whether the v2 API server is ready to accept requests.",
  9884. "summary": "Check v2 server health",
  9885. "x-codeSamples": [
  9886. {
  9887. "lang": "js",
  9888. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.health.get({\n ...\n})"
  9889. }
  9890. ]
  9891. }
  9892. },
  9893. "/api/agent": {
  9894. "get": {
  9895. "tags": ["opencode experimental HttpApi"],
  9896. "operationId": "v2.agent.list",
  9897. "parameters": [
  9898. {
  9899. "name": "location",
  9900. "in": "query",
  9901. "schema": {
  9902. "type": "object",
  9903. "properties": {
  9904. "directory": {
  9905. "type": "string"
  9906. },
  9907. "workspace": {
  9908. "type": "string"
  9909. }
  9910. },
  9911. "additionalProperties": false
  9912. },
  9913. "required": false,
  9914. "style": "deepObject",
  9915. "explode": true
  9916. }
  9917. ],
  9918. "security": [],
  9919. "responses": {
  9920. "200": {
  9921. "description": "Success",
  9922. "content": {
  9923. "application/json": {
  9924. "schema": {
  9925. "type": "object",
  9926. "properties": {
  9927. "location": {
  9928. "$ref": "#/components/schemas/LocationInfo"
  9929. },
  9930. "data": {
  9931. "type": "array",
  9932. "items": {
  9933. "$ref": "#/components/schemas/AgentV2Info"
  9934. }
  9935. }
  9936. },
  9937. "required": ["location", "data"],
  9938. "additionalProperties": false
  9939. }
  9940. }
  9941. }
  9942. },
  9943. "400": {
  9944. "description": "InvalidRequestError",
  9945. "content": {
  9946. "application/json": {
  9947. "schema": {
  9948. "$ref": "#/components/schemas/InvalidRequestError"
  9949. }
  9950. }
  9951. }
  9952. },
  9953. "401": {
  9954. "description": "UnauthorizedError",
  9955. "content": {
  9956. "application/json": {
  9957. "schema": {
  9958. "$ref": "#/components/schemas/UnauthorizedError"
  9959. }
  9960. }
  9961. }
  9962. }
  9963. },
  9964. "description": "Retrieve currently registered v2 agents.",
  9965. "summary": "List v2 agents",
  9966. "x-codeSamples": [
  9967. {
  9968. "lang": "js",
  9969. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.agent.list({\n ...\n})"
  9970. }
  9971. ]
  9972. }
  9973. },
  9974. "/api/session": {
  9975. "get": {
  9976. "tags": ["v2"],
  9977. "operationId": "v2.session.list",
  9978. "parameters": [
  9979. {
  9980. "name": "workspace",
  9981. "in": "query",
  9982. "schema": {
  9983. "type": "string",
  9984. "pattern": "^wrk"
  9985. },
  9986. "required": false
  9987. },
  9988. {
  9989. "name": "limit",
  9990. "in": "query",
  9991. "schema": {
  9992. "type": "number"
  9993. },
  9994. "required": false
  9995. },
  9996. {
  9997. "name": "order",
  9998. "in": "query",
  9999. "schema": {
  10000. "type": "string",
  10001. "enum": ["asc", "desc"]
  10002. },
  10003. "required": false
  10004. },
  10005. {
  10006. "name": "search",
  10007. "in": "query",
  10008. "schema": {
  10009. "type": "string"
  10010. },
  10011. "required": false
  10012. },
  10013. {
  10014. "name": "directory",
  10015. "in": "query",
  10016. "schema": {
  10017. "type": "string"
  10018. },
  10019. "required": false
  10020. },
  10021. {
  10022. "name": "project",
  10023. "in": "query",
  10024. "schema": {
  10025. "type": "string"
  10026. },
  10027. "required": false
  10028. },
  10029. {
  10030. "name": "subpath",
  10031. "in": "query",
  10032. "schema": {
  10033. "type": "string"
  10034. },
  10035. "required": false
  10036. },
  10037. {
  10038. "name": "cursor",
  10039. "in": "query",
  10040. "schema": {
  10041. "type": "string",
  10042. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response."
  10043. },
  10044. "required": false
  10045. }
  10046. ],
  10047. "security": [],
  10048. "responses": {
  10049. "200": {
  10050. "description": "V2SessionsResponse",
  10051. "content": {
  10052. "application/json": {
  10053. "schema": {
  10054. "$ref": "#/components/schemas/V2SessionsResponse"
  10055. }
  10056. }
  10057. }
  10058. },
  10059. "400": {
  10060. "description": "InvalidCursorError | InvalidRequestError",
  10061. "content": {
  10062. "application/json": {
  10063. "schema": {
  10064. "anyOf": [
  10065. {
  10066. "$ref": "#/components/schemas/InvalidCursorError"
  10067. },
  10068. {
  10069. "$ref": "#/components/schemas/InvalidRequestError"
  10070. },
  10071. {
  10072. "$ref": "#/components/schemas/InvalidRequestError"
  10073. }
  10074. ]
  10075. }
  10076. }
  10077. }
  10078. },
  10079. "401": {
  10080. "description": "UnauthorizedError",
  10081. "content": {
  10082. "application/json": {
  10083. "schema": {
  10084. "$ref": "#/components/schemas/UnauthorizedError"
  10085. }
  10086. }
  10087. }
  10088. }
  10089. },
  10090. "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.",
  10091. "summary": "List v2 sessions",
  10092. "x-codeSamples": [
  10093. {
  10094. "lang": "js",
  10095. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  10096. }
  10097. ]
  10098. }
  10099. },
  10100. "/api/session/{sessionID}/prompt": {
  10101. "post": {
  10102. "tags": ["v2"],
  10103. "operationId": "v2.session.prompt",
  10104. "parameters": [
  10105. {
  10106. "name": "sessionID",
  10107. "in": "path",
  10108. "schema": {
  10109. "type": "string",
  10110. "pattern": "^ses"
  10111. },
  10112. "required": true
  10113. }
  10114. ],
  10115. "security": [],
  10116. "responses": {
  10117. "200": {
  10118. "description": "Success",
  10119. "content": {
  10120. "application/json": {
  10121. "schema": {
  10122. "type": "object",
  10123. "properties": {
  10124. "data": {
  10125. "$ref": "#/components/schemas/SessionInputAdmitted"
  10126. }
  10127. },
  10128. "required": ["data"],
  10129. "additionalProperties": false
  10130. }
  10131. }
  10132. }
  10133. },
  10134. "400": {
  10135. "description": "InvalidRequestError",
  10136. "content": {
  10137. "application/json": {
  10138. "schema": {
  10139. "$ref": "#/components/schemas/InvalidRequestError"
  10140. }
  10141. }
  10142. }
  10143. },
  10144. "401": {
  10145. "description": "UnauthorizedError",
  10146. "content": {
  10147. "application/json": {
  10148. "schema": {
  10149. "$ref": "#/components/schemas/UnauthorizedError"
  10150. }
  10151. }
  10152. }
  10153. },
  10154. "404": {
  10155. "description": "SessionNotFoundError",
  10156. "content": {
  10157. "application/json": {
  10158. "schema": {
  10159. "$ref": "#/components/schemas/SessionNotFoundError"
  10160. }
  10161. }
  10162. }
  10163. },
  10164. "409": {
  10165. "description": "ConflictError",
  10166. "content": {
  10167. "application/json": {
  10168. "schema": {
  10169. "$ref": "#/components/schemas/ConflictError"
  10170. }
  10171. }
  10172. }
  10173. }
  10174. },
  10175. "description": "Durably admit one v2 session input and schedule agent-loop execution unless resume is false.",
  10176. "summary": "Send v2 message",
  10177. "requestBody": {
  10178. "content": {
  10179. "application/json": {
  10180. "schema": {
  10181. "type": "object",
  10182. "properties": {
  10183. "id": {
  10184. "type": "string",
  10185. "pattern": "^msg_"
  10186. },
  10187. "prompt": {
  10188. "$ref": "#/components/schemas/Prompt"
  10189. },
  10190. "delivery": {
  10191. "type": "string",
  10192. "enum": ["steer", "queue"]
  10193. },
  10194. "resume": {
  10195. "type": "boolean"
  10196. }
  10197. },
  10198. "required": ["prompt"],
  10199. "additionalProperties": false
  10200. }
  10201. }
  10202. },
  10203. "required": true
  10204. },
  10205. "x-codeSamples": [
  10206. {
  10207. "lang": "js",
  10208. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  10209. }
  10210. ]
  10211. }
  10212. },
  10213. "/api/session/{sessionID}/compact": {
  10214. "post": {
  10215. "tags": ["v2"],
  10216. "operationId": "v2.session.compact",
  10217. "parameters": [
  10218. {
  10219. "name": "sessionID",
  10220. "in": "path",
  10221. "schema": {
  10222. "type": "string",
  10223. "pattern": "^ses"
  10224. },
  10225. "required": true
  10226. }
  10227. ],
  10228. "security": [],
  10229. "responses": {
  10230. "204": {
  10231. "description": "<No Content>"
  10232. },
  10233. "400": {
  10234. "description": "InvalidRequestError",
  10235. "content": {
  10236. "application/json": {
  10237. "schema": {
  10238. "$ref": "#/components/schemas/InvalidRequestError"
  10239. }
  10240. }
  10241. }
  10242. },
  10243. "401": {
  10244. "description": "UnauthorizedError",
  10245. "content": {
  10246. "application/json": {
  10247. "schema": {
  10248. "$ref": "#/components/schemas/UnauthorizedError"
  10249. }
  10250. }
  10251. }
  10252. },
  10253. "404": {
  10254. "description": "SessionNotFoundError",
  10255. "content": {
  10256. "application/json": {
  10257. "schema": {
  10258. "$ref": "#/components/schemas/SessionNotFoundError"
  10259. }
  10260. }
  10261. }
  10262. },
  10263. "503": {
  10264. "description": "ServiceUnavailableError",
  10265. "content": {
  10266. "application/json": {
  10267. "schema": {
  10268. "$ref": "#/components/schemas/ServiceUnavailableError"
  10269. }
  10270. }
  10271. }
  10272. }
  10273. },
  10274. "description": "Compact a v2 session conversation.",
  10275. "summary": "Compact v2 session",
  10276. "x-codeSamples": [
  10277. {
  10278. "lang": "js",
  10279. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  10280. }
  10281. ]
  10282. }
  10283. },
  10284. "/api/session/{sessionID}/wait": {
  10285. "post": {
  10286. "tags": ["v2"],
  10287. "operationId": "v2.session.wait",
  10288. "parameters": [
  10289. {
  10290. "name": "sessionID",
  10291. "in": "path",
  10292. "schema": {
  10293. "type": "string",
  10294. "pattern": "^ses"
  10295. },
  10296. "required": true
  10297. }
  10298. ],
  10299. "security": [],
  10300. "responses": {
  10301. "204": {
  10302. "description": "<No Content>"
  10303. },
  10304. "400": {
  10305. "description": "InvalidRequestError",
  10306. "content": {
  10307. "application/json": {
  10308. "schema": {
  10309. "$ref": "#/components/schemas/InvalidRequestError"
  10310. }
  10311. }
  10312. }
  10313. },
  10314. "401": {
  10315. "description": "UnauthorizedError",
  10316. "content": {
  10317. "application/json": {
  10318. "schema": {
  10319. "$ref": "#/components/schemas/UnauthorizedError"
  10320. }
  10321. }
  10322. }
  10323. },
  10324. "404": {
  10325. "description": "SessionNotFoundError",
  10326. "content": {
  10327. "application/json": {
  10328. "schema": {
  10329. "$ref": "#/components/schemas/SessionNotFoundError"
  10330. }
  10331. }
  10332. }
  10333. },
  10334. "503": {
  10335. "description": "ServiceUnavailableError",
  10336. "content": {
  10337. "application/json": {
  10338. "schema": {
  10339. "$ref": "#/components/schemas/ServiceUnavailableError"
  10340. }
  10341. }
  10342. }
  10343. }
  10344. },
  10345. "description": "Wait for a v2 session agent loop to become idle.",
  10346. "summary": "Wait for v2 session",
  10347. "x-codeSamples": [
  10348. {
  10349. "lang": "js",
  10350. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  10351. }
  10352. ]
  10353. }
  10354. },
  10355. "/api/session/{sessionID}/context": {
  10356. "get": {
  10357. "tags": ["v2"],
  10358. "operationId": "v2.session.context",
  10359. "parameters": [
  10360. {
  10361. "name": "sessionID",
  10362. "in": "path",
  10363. "schema": {
  10364. "type": "string",
  10365. "pattern": "^ses"
  10366. },
  10367. "required": true
  10368. }
  10369. ],
  10370. "security": [],
  10371. "responses": {
  10372. "200": {
  10373. "description": "Success",
  10374. "content": {
  10375. "application/json": {
  10376. "schema": {
  10377. "type": "object",
  10378. "properties": {
  10379. "data": {
  10380. "type": "array",
  10381. "items": {
  10382. "$ref": "#/components/schemas/SessionMessage"
  10383. }
  10384. }
  10385. },
  10386. "required": ["data"],
  10387. "additionalProperties": false
  10388. }
  10389. }
  10390. }
  10391. },
  10392. "400": {
  10393. "description": "InvalidRequestError",
  10394. "content": {
  10395. "application/json": {
  10396. "schema": {
  10397. "$ref": "#/components/schemas/InvalidRequestError"
  10398. }
  10399. }
  10400. }
  10401. },
  10402. "401": {
  10403. "description": "UnauthorizedError",
  10404. "content": {
  10405. "application/json": {
  10406. "schema": {
  10407. "$ref": "#/components/schemas/UnauthorizedError"
  10408. }
  10409. }
  10410. }
  10411. },
  10412. "404": {
  10413. "description": "SessionNotFoundError",
  10414. "content": {
  10415. "application/json": {
  10416. "schema": {
  10417. "$ref": "#/components/schemas/SessionNotFoundError"
  10418. }
  10419. }
  10420. }
  10421. },
  10422. "500": {
  10423. "description": "UnknownError",
  10424. "content": {
  10425. "application/json": {
  10426. "schema": {
  10427. "$ref": "#/components/schemas/UnknownError1"
  10428. }
  10429. }
  10430. }
  10431. }
  10432. },
  10433. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  10434. "summary": "Get v2 session context",
  10435. "x-codeSamples": [
  10436. {
  10437. "lang": "js",
  10438. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  10439. }
  10440. ]
  10441. }
  10442. },
  10443. "/api/session/{sessionID}/message": {
  10444. "get": {
  10445. "tags": ["v2 messages"],
  10446. "operationId": "v2.session.messages",
  10447. "parameters": [
  10448. {
  10449. "name": "sessionID",
  10450. "in": "path",
  10451. "schema": {
  10452. "type": "string",
  10453. "pattern": "^ses"
  10454. },
  10455. "required": true
  10456. },
  10457. {
  10458. "name": "limit",
  10459. "in": "query",
  10460. "schema": {
  10461. "type": "number"
  10462. },
  10463. "required": false
  10464. },
  10465. {
  10466. "name": "order",
  10467. "in": "query",
  10468. "schema": {
  10469. "type": "string",
  10470. "enum": ["asc", "desc"]
  10471. },
  10472. "required": false
  10473. },
  10474. {
  10475. "name": "cursor",
  10476. "in": "query",
  10477. "schema": {
  10478. "type": "string",
  10479. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  10480. },
  10481. "required": false
  10482. }
  10483. ],
  10484. "security": [],
  10485. "responses": {
  10486. "200": {
  10487. "description": "V2SessionMessagesResponse",
  10488. "content": {
  10489. "application/json": {
  10490. "schema": {
  10491. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  10492. }
  10493. }
  10494. }
  10495. },
  10496. "400": {
  10497. "description": "InvalidCursorError | InvalidRequestError",
  10498. "content": {
  10499. "application/json": {
  10500. "schema": {
  10501. "anyOf": [
  10502. {
  10503. "$ref": "#/components/schemas/InvalidCursorError"
  10504. },
  10505. {
  10506. "$ref": "#/components/schemas/InvalidRequestError"
  10507. }
  10508. ]
  10509. }
  10510. }
  10511. }
  10512. },
  10513. "401": {
  10514. "description": "UnauthorizedError",
  10515. "content": {
  10516. "application/json": {
  10517. "schema": {
  10518. "$ref": "#/components/schemas/UnauthorizedError"
  10519. }
  10520. }
  10521. }
  10522. },
  10523. "404": {
  10524. "description": "SessionNotFoundError",
  10525. "content": {
  10526. "application/json": {
  10527. "schema": {
  10528. "$ref": "#/components/schemas/SessionNotFoundError"
  10529. }
  10530. }
  10531. }
  10532. },
  10533. "500": {
  10534. "description": "UnknownError",
  10535. "content": {
  10536. "application/json": {
  10537. "schema": {
  10538. "$ref": "#/components/schemas/UnknownError1"
  10539. }
  10540. }
  10541. }
  10542. }
  10543. },
  10544. "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.",
  10545. "summary": "Get v2 session messages",
  10546. "x-codeSamples": [
  10547. {
  10548. "lang": "js",
  10549. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  10550. }
  10551. ]
  10552. }
  10553. },
  10554. "/api/model": {
  10555. "get": {
  10556. "tags": ["v2 models"],
  10557. "operationId": "v2.model.list",
  10558. "parameters": [
  10559. {
  10560. "name": "location",
  10561. "in": "query",
  10562. "schema": {
  10563. "type": "object",
  10564. "properties": {
  10565. "directory": {
  10566. "type": "string"
  10567. },
  10568. "workspace": {
  10569. "type": "string"
  10570. }
  10571. },
  10572. "additionalProperties": false
  10573. },
  10574. "required": false,
  10575. "style": "deepObject",
  10576. "explode": true
  10577. }
  10578. ],
  10579. "security": [],
  10580. "responses": {
  10581. "200": {
  10582. "description": "Success",
  10583. "content": {
  10584. "application/json": {
  10585. "schema": {
  10586. "type": "object",
  10587. "properties": {
  10588. "location": {
  10589. "$ref": "#/components/schemas/LocationInfo"
  10590. },
  10591. "data": {
  10592. "type": "array",
  10593. "items": {
  10594. "$ref": "#/components/schemas/ModelV2Info"
  10595. }
  10596. }
  10597. },
  10598. "required": ["location", "data"],
  10599. "additionalProperties": false
  10600. }
  10601. }
  10602. }
  10603. },
  10604. "400": {
  10605. "description": "InvalidRequestError",
  10606. "content": {
  10607. "application/json": {
  10608. "schema": {
  10609. "$ref": "#/components/schemas/InvalidRequestError"
  10610. }
  10611. }
  10612. }
  10613. },
  10614. "401": {
  10615. "description": "UnauthorizedError",
  10616. "content": {
  10617. "application/json": {
  10618. "schema": {
  10619. "$ref": "#/components/schemas/UnauthorizedError"
  10620. }
  10621. }
  10622. }
  10623. },
  10624. "503": {
  10625. "description": "ServiceUnavailableError",
  10626. "content": {
  10627. "application/json": {
  10628. "schema": {
  10629. "$ref": "#/components/schemas/ServiceUnavailableError"
  10630. }
  10631. }
  10632. }
  10633. }
  10634. },
  10635. "description": "Retrieve available v2 models ordered by release date.",
  10636. "summary": "List v2 models",
  10637. "x-codeSamples": [
  10638. {
  10639. "lang": "js",
  10640. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  10641. }
  10642. ]
  10643. }
  10644. },
  10645. "/api/provider": {
  10646. "get": {
  10647. "tags": ["v2 providers"],
  10648. "operationId": "v2.provider.list",
  10649. "parameters": [
  10650. {
  10651. "name": "location",
  10652. "in": "query",
  10653. "schema": {
  10654. "type": "object",
  10655. "properties": {
  10656. "directory": {
  10657. "type": "string"
  10658. },
  10659. "workspace": {
  10660. "type": "string"
  10661. }
  10662. },
  10663. "additionalProperties": false
  10664. },
  10665. "required": false,
  10666. "style": "deepObject",
  10667. "explode": true
  10668. }
  10669. ],
  10670. "security": [],
  10671. "responses": {
  10672. "200": {
  10673. "description": "Success",
  10674. "content": {
  10675. "application/json": {
  10676. "schema": {
  10677. "type": "object",
  10678. "properties": {
  10679. "location": {
  10680. "$ref": "#/components/schemas/LocationInfo"
  10681. },
  10682. "data": {
  10683. "type": "array",
  10684. "items": {
  10685. "$ref": "#/components/schemas/ProviderV2Info"
  10686. }
  10687. }
  10688. },
  10689. "required": ["location", "data"],
  10690. "additionalProperties": false
  10691. }
  10692. }
  10693. }
  10694. },
  10695. "400": {
  10696. "description": "InvalidRequestError",
  10697. "content": {
  10698. "application/json": {
  10699. "schema": {
  10700. "$ref": "#/components/schemas/InvalidRequestError"
  10701. }
  10702. }
  10703. }
  10704. },
  10705. "401": {
  10706. "description": "UnauthorizedError",
  10707. "content": {
  10708. "application/json": {
  10709. "schema": {
  10710. "$ref": "#/components/schemas/UnauthorizedError"
  10711. }
  10712. }
  10713. }
  10714. },
  10715. "503": {
  10716. "description": "ServiceUnavailableError",
  10717. "content": {
  10718. "application/json": {
  10719. "schema": {
  10720. "$ref": "#/components/schemas/ServiceUnavailableError"
  10721. }
  10722. }
  10723. }
  10724. }
  10725. },
  10726. "description": "Retrieve active v2 AI providers so clients can show provider availability and configuration.",
  10727. "summary": "List v2 providers",
  10728. "x-codeSamples": [
  10729. {
  10730. "lang": "js",
  10731. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  10732. }
  10733. ]
  10734. }
  10735. },
  10736. "/api/provider/{providerID}": {
  10737. "get": {
  10738. "tags": ["v2 providers"],
  10739. "operationId": "v2.provider.get",
  10740. "parameters": [
  10741. {
  10742. "name": "providerID",
  10743. "in": "path",
  10744. "schema": {
  10745. "type": "string"
  10746. },
  10747. "required": true
  10748. },
  10749. {
  10750. "name": "location",
  10751. "in": "query",
  10752. "schema": {
  10753. "type": "object",
  10754. "properties": {
  10755. "directory": {
  10756. "type": "string"
  10757. },
  10758. "workspace": {
  10759. "type": "string"
  10760. }
  10761. },
  10762. "additionalProperties": false
  10763. },
  10764. "required": false,
  10765. "style": "deepObject",
  10766. "explode": true
  10767. }
  10768. ],
  10769. "security": [],
  10770. "responses": {
  10771. "200": {
  10772. "description": "Success",
  10773. "content": {
  10774. "application/json": {
  10775. "schema": {
  10776. "type": "object",
  10777. "properties": {
  10778. "location": {
  10779. "$ref": "#/components/schemas/LocationInfo"
  10780. },
  10781. "data": {
  10782. "$ref": "#/components/schemas/ProviderV2Info"
  10783. }
  10784. },
  10785. "required": ["location", "data"],
  10786. "additionalProperties": false
  10787. }
  10788. }
  10789. }
  10790. },
  10791. "400": {
  10792. "description": "InvalidRequestError",
  10793. "content": {
  10794. "application/json": {
  10795. "schema": {
  10796. "$ref": "#/components/schemas/InvalidRequestError"
  10797. }
  10798. }
  10799. }
  10800. },
  10801. "401": {
  10802. "description": "UnauthorizedError",
  10803. "content": {
  10804. "application/json": {
  10805. "schema": {
  10806. "$ref": "#/components/schemas/UnauthorizedError"
  10807. }
  10808. }
  10809. }
  10810. },
  10811. "404": {
  10812. "description": "ProviderNotFoundError",
  10813. "content": {
  10814. "application/json": {
  10815. "schema": {
  10816. "$ref": "#/components/schemas/ProviderNotFoundError"
  10817. }
  10818. }
  10819. }
  10820. },
  10821. "503": {
  10822. "description": "ServiceUnavailableError",
  10823. "content": {
  10824. "application/json": {
  10825. "schema": {
  10826. "$ref": "#/components/schemas/ServiceUnavailableError"
  10827. }
  10828. }
  10829. }
  10830. }
  10831. },
  10832. "description": "Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.",
  10833. "summary": "Get v2 provider",
  10834. "x-codeSamples": [
  10835. {
  10836. "lang": "js",
  10837. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  10838. }
  10839. ]
  10840. }
  10841. },
  10842. "/api/permission/request": {
  10843. "get": {
  10844. "tags": ["v2 permissions"],
  10845. "operationId": "v2.permission.request.list",
  10846. "parameters": [
  10847. {
  10848. "name": "location",
  10849. "in": "query",
  10850. "schema": {
  10851. "type": "object",
  10852. "properties": {
  10853. "directory": {
  10854. "type": "string"
  10855. },
  10856. "workspace": {
  10857. "type": "string"
  10858. }
  10859. },
  10860. "additionalProperties": false
  10861. },
  10862. "required": false,
  10863. "style": "deepObject",
  10864. "explode": true
  10865. }
  10866. ],
  10867. "security": [],
  10868. "responses": {
  10869. "200": {
  10870. "description": "Success",
  10871. "content": {
  10872. "application/json": {
  10873. "schema": {
  10874. "type": "object",
  10875. "properties": {
  10876. "location": {
  10877. "$ref": "#/components/schemas/LocationInfo"
  10878. },
  10879. "data": {
  10880. "type": "array",
  10881. "items": {
  10882. "$ref": "#/components/schemas/PermissionV2Request"
  10883. }
  10884. }
  10885. },
  10886. "required": ["location", "data"],
  10887. "additionalProperties": false
  10888. }
  10889. }
  10890. }
  10891. },
  10892. "400": {
  10893. "description": "InvalidRequestError",
  10894. "content": {
  10895. "application/json": {
  10896. "schema": {
  10897. "$ref": "#/components/schemas/InvalidRequestError"
  10898. }
  10899. }
  10900. }
  10901. },
  10902. "401": {
  10903. "description": "UnauthorizedError",
  10904. "content": {
  10905. "application/json": {
  10906. "schema": {
  10907. "$ref": "#/components/schemas/UnauthorizedError"
  10908. }
  10909. }
  10910. }
  10911. }
  10912. },
  10913. "description": "Retrieve pending permission requests for a location.",
  10914. "summary": "List pending permission requests",
  10915. "x-codeSamples": [
  10916. {
  10917. "lang": "js",
  10918. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.request.list({\n ...\n})"
  10919. }
  10920. ]
  10921. }
  10922. },
  10923. "/api/session/{sessionID}/permission/request": {
  10924. "get": {
  10925. "tags": ["v2 session permissions"],
  10926. "operationId": "v2.session.permission.list",
  10927. "parameters": [
  10928. {
  10929. "name": "sessionID",
  10930. "in": "path",
  10931. "schema": {
  10932. "type": "string",
  10933. "pattern": "^ses"
  10934. },
  10935. "required": true
  10936. }
  10937. ],
  10938. "security": [],
  10939. "responses": {
  10940. "200": {
  10941. "description": "Success",
  10942. "content": {
  10943. "application/json": {
  10944. "schema": {
  10945. "type": "object",
  10946. "properties": {
  10947. "data": {
  10948. "type": "array",
  10949. "items": {
  10950. "$ref": "#/components/schemas/PermissionV2Request"
  10951. }
  10952. }
  10953. },
  10954. "required": ["data"],
  10955. "additionalProperties": false
  10956. }
  10957. }
  10958. }
  10959. },
  10960. "400": {
  10961. "description": "InvalidRequestError",
  10962. "content": {
  10963. "application/json": {
  10964. "schema": {
  10965. "$ref": "#/components/schemas/InvalidRequestError"
  10966. }
  10967. }
  10968. }
  10969. },
  10970. "401": {
  10971. "description": "UnauthorizedError",
  10972. "content": {
  10973. "application/json": {
  10974. "schema": {
  10975. "$ref": "#/components/schemas/UnauthorizedError"
  10976. }
  10977. }
  10978. }
  10979. },
  10980. "404": {
  10981. "description": "SessionNotFoundError",
  10982. "content": {
  10983. "application/json": {
  10984. "schema": {
  10985. "$ref": "#/components/schemas/SessionNotFoundError"
  10986. }
  10987. }
  10988. }
  10989. }
  10990. },
  10991. "description": "Retrieve pending permission requests owned by a session.",
  10992. "summary": "List session permission requests",
  10993. "x-codeSamples": [
  10994. {
  10995. "lang": "js",
  10996. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  10997. }
  10998. ]
  10999. }
  11000. },
  11001. "/api/session/{sessionID}/permission/request/{requestID}/reply": {
  11002. "post": {
  11003. "tags": ["v2 session permissions"],
  11004. "operationId": "v2.session.permission.reply",
  11005. "parameters": [
  11006. {
  11007. "name": "sessionID",
  11008. "in": "path",
  11009. "schema": {
  11010. "type": "string",
  11011. "pattern": "^ses"
  11012. },
  11013. "required": true
  11014. },
  11015. {
  11016. "name": "requestID",
  11017. "in": "path",
  11018. "schema": {
  11019. "type": "string",
  11020. "pattern": "^per"
  11021. },
  11022. "required": true
  11023. }
  11024. ],
  11025. "security": [],
  11026. "responses": {
  11027. "204": {
  11028. "description": "<No Content>"
  11029. },
  11030. "400": {
  11031. "description": "InvalidRequestError",
  11032. "content": {
  11033. "application/json": {
  11034. "schema": {
  11035. "$ref": "#/components/schemas/InvalidRequestError"
  11036. }
  11037. }
  11038. }
  11039. },
  11040. "401": {
  11041. "description": "UnauthorizedError",
  11042. "content": {
  11043. "application/json": {
  11044. "schema": {
  11045. "$ref": "#/components/schemas/UnauthorizedError"
  11046. }
  11047. }
  11048. }
  11049. },
  11050. "404": {
  11051. "description": "SessionNotFoundError | PermissionNotFoundError",
  11052. "content": {
  11053. "application/json": {
  11054. "schema": {
  11055. "anyOf": [
  11056. {
  11057. "$ref": "#/components/schemas/SessionNotFoundError"
  11058. },
  11059. {
  11060. "$ref": "#/components/schemas/PermissionNotFoundError"
  11061. }
  11062. ]
  11063. }
  11064. }
  11065. }
  11066. }
  11067. },
  11068. "description": "Respond to a pending permission request owned by a session.",
  11069. "summary": "Reply to pending permission request",
  11070. "requestBody": {
  11071. "content": {
  11072. "application/json": {
  11073. "schema": {
  11074. "type": "object",
  11075. "properties": {
  11076. "reply": {
  11077. "$ref": "#/components/schemas/PermissionV2Reply"
  11078. },
  11079. "message": {
  11080. "type": "string"
  11081. }
  11082. },
  11083. "required": ["reply"],
  11084. "additionalProperties": false
  11085. }
  11086. }
  11087. },
  11088. "required": true
  11089. },
  11090. "x-codeSamples": [
  11091. {
  11092. "lang": "js",
  11093. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  11094. }
  11095. ]
  11096. }
  11097. },
  11098. "/api/permission/saved": {
  11099. "get": {
  11100. "tags": ["v2 saved permissions"],
  11101. "operationId": "v2.permission.saved.list",
  11102. "parameters": [
  11103. {
  11104. "name": "projectID",
  11105. "in": "query",
  11106. "schema": {
  11107. "type": "string"
  11108. },
  11109. "required": false
  11110. }
  11111. ],
  11112. "security": [],
  11113. "responses": {
  11114. "200": {
  11115. "description": "Success",
  11116. "content": {
  11117. "application/json": {
  11118. "schema": {
  11119. "type": "object",
  11120. "properties": {
  11121. "data": {
  11122. "type": "array",
  11123. "items": {
  11124. "$ref": "#/components/schemas/PermissionSavedInfo"
  11125. }
  11126. }
  11127. },
  11128. "required": ["data"],
  11129. "additionalProperties": false
  11130. }
  11131. }
  11132. }
  11133. },
  11134. "400": {
  11135. "description": "InvalidRequestError",
  11136. "content": {
  11137. "application/json": {
  11138. "schema": {
  11139. "$ref": "#/components/schemas/InvalidRequestError"
  11140. }
  11141. }
  11142. }
  11143. },
  11144. "401": {
  11145. "description": "UnauthorizedError",
  11146. "content": {
  11147. "application/json": {
  11148. "schema": {
  11149. "$ref": "#/components/schemas/UnauthorizedError"
  11150. }
  11151. }
  11152. }
  11153. }
  11154. },
  11155. "description": "Retrieve saved permissions, optionally filtered by project.",
  11156. "summary": "List saved permissions",
  11157. "x-codeSamples": [
  11158. {
  11159. "lang": "js",
  11160. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.list({\n ...\n})"
  11161. }
  11162. ]
  11163. }
  11164. },
  11165. "/api/permission/saved/{id}": {
  11166. "delete": {
  11167. "tags": ["v2 saved permissions"],
  11168. "operationId": "v2.permission.saved.remove",
  11169. "parameters": [
  11170. {
  11171. "name": "id",
  11172. "in": "path",
  11173. "schema": {
  11174. "type": "string"
  11175. },
  11176. "required": true
  11177. }
  11178. ],
  11179. "security": [],
  11180. "responses": {
  11181. "204": {
  11182. "description": "<No Content>"
  11183. },
  11184. "400": {
  11185. "description": "InvalidRequestError",
  11186. "content": {
  11187. "application/json": {
  11188. "schema": {
  11189. "$ref": "#/components/schemas/InvalidRequestError"
  11190. }
  11191. }
  11192. }
  11193. },
  11194. "401": {
  11195. "description": "UnauthorizedError",
  11196. "content": {
  11197. "application/json": {
  11198. "schema": {
  11199. "$ref": "#/components/schemas/UnauthorizedError"
  11200. }
  11201. }
  11202. }
  11203. }
  11204. },
  11205. "description": "Remove a saved permission by ID.",
  11206. "summary": "Remove saved permission",
  11207. "x-codeSamples": [
  11208. {
  11209. "lang": "js",
  11210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.remove({\n ...\n})"
  11211. }
  11212. ]
  11213. }
  11214. },
  11215. "/api/fs/read": {
  11216. "get": {
  11217. "tags": ["v2 filesystem"],
  11218. "operationId": "v2.fs.read",
  11219. "parameters": [
  11220. {
  11221. "name": "location",
  11222. "in": "query",
  11223. "schema": {
  11224. "type": "object",
  11225. "properties": {
  11226. "directory": {
  11227. "type": "string"
  11228. },
  11229. "workspace": {
  11230. "type": "string"
  11231. }
  11232. },
  11233. "additionalProperties": false
  11234. },
  11235. "required": false,
  11236. "style": "deepObject",
  11237. "explode": true
  11238. },
  11239. {
  11240. "name": "path",
  11241. "in": "query",
  11242. "schema": {
  11243. "type": "string"
  11244. },
  11245. "required": true
  11246. },
  11247. {
  11248. "name": "reference",
  11249. "in": "query",
  11250. "schema": {
  11251. "type": "string"
  11252. },
  11253. "required": false
  11254. }
  11255. ],
  11256. "security": [],
  11257. "responses": {
  11258. "200": {
  11259. "description": "Success",
  11260. "content": {
  11261. "application/json": {
  11262. "schema": {
  11263. "type": "object",
  11264. "properties": {
  11265. "location": {
  11266. "$ref": "#/components/schemas/LocationInfo"
  11267. },
  11268. "data": {
  11269. "anyOf": [
  11270. {
  11271. "$ref": "#/components/schemas/FileSystemTextContent"
  11272. },
  11273. {
  11274. "$ref": "#/components/schemas/FileSystemBinaryContent"
  11275. }
  11276. ]
  11277. }
  11278. },
  11279. "required": ["location", "data"],
  11280. "additionalProperties": false
  11281. }
  11282. }
  11283. }
  11284. },
  11285. "400": {
  11286. "description": "InvalidRequestError",
  11287. "content": {
  11288. "application/json": {
  11289. "schema": {
  11290. "$ref": "#/components/schemas/InvalidRequestError"
  11291. }
  11292. }
  11293. }
  11294. },
  11295. "401": {
  11296. "description": "UnauthorizedError",
  11297. "content": {
  11298. "application/json": {
  11299. "schema": {
  11300. "$ref": "#/components/schemas/UnauthorizedError"
  11301. }
  11302. }
  11303. }
  11304. }
  11305. },
  11306. "description": "Read one file relative to the requested location.",
  11307. "summary": "Read file",
  11308. "x-codeSamples": [
  11309. {
  11310. "lang": "js",
  11311. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.read({\n ...\n})"
  11312. }
  11313. ]
  11314. }
  11315. },
  11316. "/api/fs/list": {
  11317. "get": {
  11318. "tags": ["v2 filesystem"],
  11319. "operationId": "v2.fs.list",
  11320. "parameters": [
  11321. {
  11322. "name": "location",
  11323. "in": "query",
  11324. "schema": {
  11325. "type": "object",
  11326. "properties": {
  11327. "directory": {
  11328. "type": "string"
  11329. },
  11330. "workspace": {
  11331. "type": "string"
  11332. }
  11333. },
  11334. "additionalProperties": false
  11335. },
  11336. "required": false,
  11337. "style": "deepObject",
  11338. "explode": true
  11339. },
  11340. {
  11341. "name": "path",
  11342. "in": "query",
  11343. "schema": {
  11344. "type": "string"
  11345. },
  11346. "required": false
  11347. },
  11348. {
  11349. "name": "reference",
  11350. "in": "query",
  11351. "schema": {
  11352. "type": "string"
  11353. },
  11354. "required": false
  11355. }
  11356. ],
  11357. "security": [],
  11358. "responses": {
  11359. "200": {
  11360. "description": "Success",
  11361. "content": {
  11362. "application/json": {
  11363. "schema": {
  11364. "type": "object",
  11365. "properties": {
  11366. "location": {
  11367. "$ref": "#/components/schemas/LocationInfo"
  11368. },
  11369. "data": {
  11370. "type": "array",
  11371. "items": {
  11372. "$ref": "#/components/schemas/FileSystemEntry"
  11373. }
  11374. }
  11375. },
  11376. "required": ["location", "data"],
  11377. "additionalProperties": false
  11378. }
  11379. }
  11380. }
  11381. },
  11382. "400": {
  11383. "description": "InvalidRequestError",
  11384. "content": {
  11385. "application/json": {
  11386. "schema": {
  11387. "$ref": "#/components/schemas/InvalidRequestError"
  11388. }
  11389. }
  11390. }
  11391. },
  11392. "401": {
  11393. "description": "UnauthorizedError",
  11394. "content": {
  11395. "application/json": {
  11396. "schema": {
  11397. "$ref": "#/components/schemas/UnauthorizedError"
  11398. }
  11399. }
  11400. }
  11401. }
  11402. },
  11403. "description": "List direct children of one directory relative to the requested location.",
  11404. "summary": "List directory",
  11405. "x-codeSamples": [
  11406. {
  11407. "lang": "js",
  11408. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.list({\n ...\n})"
  11409. }
  11410. ]
  11411. }
  11412. },
  11413. "/api/command": {
  11414. "get": {
  11415. "tags": ["v2 commands"],
  11416. "operationId": "v2.command.list",
  11417. "parameters": [
  11418. {
  11419. "name": "location",
  11420. "in": "query",
  11421. "schema": {
  11422. "type": "object",
  11423. "properties": {
  11424. "directory": {
  11425. "type": "string"
  11426. },
  11427. "workspace": {
  11428. "type": "string"
  11429. }
  11430. },
  11431. "additionalProperties": false
  11432. },
  11433. "required": false,
  11434. "style": "deepObject",
  11435. "explode": true
  11436. }
  11437. ],
  11438. "security": [],
  11439. "responses": {
  11440. "200": {
  11441. "description": "Success",
  11442. "content": {
  11443. "application/json": {
  11444. "schema": {
  11445. "type": "object",
  11446. "properties": {
  11447. "location": {
  11448. "$ref": "#/components/schemas/LocationInfo"
  11449. },
  11450. "data": {
  11451. "type": "array",
  11452. "items": {
  11453. "$ref": "#/components/schemas/CommandV2Info"
  11454. }
  11455. }
  11456. },
  11457. "required": ["location", "data"],
  11458. "additionalProperties": false
  11459. }
  11460. }
  11461. }
  11462. },
  11463. "400": {
  11464. "description": "InvalidRequestError",
  11465. "content": {
  11466. "application/json": {
  11467. "schema": {
  11468. "$ref": "#/components/schemas/InvalidRequestError"
  11469. }
  11470. }
  11471. }
  11472. },
  11473. "401": {
  11474. "description": "UnauthorizedError",
  11475. "content": {
  11476. "application/json": {
  11477. "schema": {
  11478. "$ref": "#/components/schemas/UnauthorizedError"
  11479. }
  11480. }
  11481. }
  11482. }
  11483. },
  11484. "description": "Retrieve currently registered v2 commands.",
  11485. "summary": "List v2 commands",
  11486. "x-codeSamples": [
  11487. {
  11488. "lang": "js",
  11489. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.command.list({\n ...\n})"
  11490. }
  11491. ]
  11492. }
  11493. },
  11494. "/api/skill": {
  11495. "get": {
  11496. "tags": ["v2 skills"],
  11497. "operationId": "v2.skill.list",
  11498. "parameters": [
  11499. {
  11500. "name": "location",
  11501. "in": "query",
  11502. "schema": {
  11503. "type": "object",
  11504. "properties": {
  11505. "directory": {
  11506. "type": "string"
  11507. },
  11508. "workspace": {
  11509. "type": "string"
  11510. }
  11511. },
  11512. "additionalProperties": false
  11513. },
  11514. "required": false,
  11515. "style": "deepObject",
  11516. "explode": true
  11517. }
  11518. ],
  11519. "security": [],
  11520. "responses": {
  11521. "200": {
  11522. "description": "Success",
  11523. "content": {
  11524. "application/json": {
  11525. "schema": {
  11526. "type": "object",
  11527. "properties": {
  11528. "location": {
  11529. "$ref": "#/components/schemas/LocationInfo"
  11530. },
  11531. "data": {
  11532. "type": "array",
  11533. "items": {
  11534. "$ref": "#/components/schemas/SkillV2Info"
  11535. }
  11536. }
  11537. },
  11538. "required": ["location", "data"],
  11539. "additionalProperties": false
  11540. }
  11541. }
  11542. }
  11543. },
  11544. "400": {
  11545. "description": "InvalidRequestError",
  11546. "content": {
  11547. "application/json": {
  11548. "schema": {
  11549. "$ref": "#/components/schemas/InvalidRequestError"
  11550. }
  11551. }
  11552. }
  11553. },
  11554. "401": {
  11555. "description": "UnauthorizedError",
  11556. "content": {
  11557. "application/json": {
  11558. "schema": {
  11559. "$ref": "#/components/schemas/UnauthorizedError"
  11560. }
  11561. }
  11562. }
  11563. }
  11564. },
  11565. "description": "Retrieve currently registered v2 skills.",
  11566. "summary": "List v2 skills",
  11567. "x-codeSamples": [
  11568. {
  11569. "lang": "js",
  11570. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.skill.list({\n ...\n})"
  11571. }
  11572. ]
  11573. }
  11574. },
  11575. "/api/event": {
  11576. "get": {
  11577. "tags": ["v2 events"],
  11578. "operationId": "v2.event.subscribe",
  11579. "parameters": [
  11580. {
  11581. "name": "location",
  11582. "in": "query",
  11583. "schema": {
  11584. "type": "object",
  11585. "properties": {
  11586. "directory": {
  11587. "type": "string"
  11588. },
  11589. "workspace": {
  11590. "type": "string"
  11591. }
  11592. },
  11593. "additionalProperties": false
  11594. },
  11595. "required": false,
  11596. "style": "deepObject",
  11597. "explode": true
  11598. }
  11599. ],
  11600. "security": [],
  11601. "responses": {
  11602. "200": {
  11603. "description": "Success",
  11604. "content": {
  11605. "text/event-stream": {
  11606. "schema": {
  11607. "type": "string"
  11608. }
  11609. }
  11610. }
  11611. },
  11612. "400": {
  11613. "description": "InvalidRequestError",
  11614. "content": {
  11615. "application/json": {
  11616. "schema": {
  11617. "$ref": "#/components/schemas/InvalidRequestError"
  11618. }
  11619. }
  11620. }
  11621. },
  11622. "401": {
  11623. "description": "UnauthorizedError",
  11624. "content": {
  11625. "application/json": {
  11626. "schema": {
  11627. "$ref": "#/components/schemas/UnauthorizedError"
  11628. }
  11629. }
  11630. }
  11631. }
  11632. },
  11633. "description": "Subscribe to native EventV2 payloads for a location.",
  11634. "summary": "Subscribe to v2 events",
  11635. "x-codeSamples": [
  11636. {
  11637. "lang": "js",
  11638. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.event.subscribe({\n ...\n})"
  11639. }
  11640. ]
  11641. }
  11642. },
  11643. "/api/question/request": {
  11644. "get": {
  11645. "tags": ["v2 questions"],
  11646. "operationId": "v2.question.request.list",
  11647. "parameters": [
  11648. {
  11649. "name": "location",
  11650. "in": "query",
  11651. "schema": {
  11652. "type": "object",
  11653. "properties": {
  11654. "directory": {
  11655. "type": "string"
  11656. },
  11657. "workspace": {
  11658. "type": "string"
  11659. }
  11660. },
  11661. "additionalProperties": false
  11662. },
  11663. "required": false,
  11664. "style": "deepObject",
  11665. "explode": true
  11666. }
  11667. ],
  11668. "security": [],
  11669. "responses": {
  11670. "200": {
  11671. "description": "Success",
  11672. "content": {
  11673. "application/json": {
  11674. "schema": {
  11675. "type": "object",
  11676. "properties": {
  11677. "location": {
  11678. "$ref": "#/components/schemas/LocationInfo"
  11679. },
  11680. "data": {
  11681. "type": "array",
  11682. "items": {
  11683. "$ref": "#/components/schemas/QuestionV2Request"
  11684. }
  11685. }
  11686. },
  11687. "required": ["location", "data"],
  11688. "additionalProperties": false
  11689. }
  11690. }
  11691. }
  11692. },
  11693. "400": {
  11694. "description": "InvalidRequestError",
  11695. "content": {
  11696. "application/json": {
  11697. "schema": {
  11698. "$ref": "#/components/schemas/InvalidRequestError"
  11699. }
  11700. }
  11701. }
  11702. },
  11703. "401": {
  11704. "description": "UnauthorizedError",
  11705. "content": {
  11706. "application/json": {
  11707. "schema": {
  11708. "$ref": "#/components/schemas/UnauthorizedError"
  11709. }
  11710. }
  11711. }
  11712. }
  11713. },
  11714. "description": "Retrieve pending question requests for a location.",
  11715. "summary": "List pending question requests",
  11716. "x-codeSamples": [
  11717. {
  11718. "lang": "js",
  11719. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.question.request.list({\n ...\n})"
  11720. }
  11721. ]
  11722. }
  11723. },
  11724. "/api/session/{sessionID}/question/request/{requestID}/reply": {
  11725. "post": {
  11726. "tags": ["v2 session questions"],
  11727. "operationId": "v2.session.question.reply",
  11728. "parameters": [
  11729. {
  11730. "name": "sessionID",
  11731. "in": "path",
  11732. "schema": {
  11733. "type": "string",
  11734. "pattern": "^ses"
  11735. },
  11736. "required": true
  11737. },
  11738. {
  11739. "name": "requestID",
  11740. "in": "path",
  11741. "schema": {
  11742. "type": "string",
  11743. "pattern": "^que"
  11744. },
  11745. "required": true
  11746. }
  11747. ],
  11748. "security": [],
  11749. "responses": {
  11750. "204": {
  11751. "description": "<No Content>"
  11752. },
  11753. "400": {
  11754. "description": "InvalidRequestError",
  11755. "content": {
  11756. "application/json": {
  11757. "schema": {
  11758. "$ref": "#/components/schemas/InvalidRequestError"
  11759. }
  11760. }
  11761. }
  11762. },
  11763. "401": {
  11764. "description": "UnauthorizedError",
  11765. "content": {
  11766. "application/json": {
  11767. "schema": {
  11768. "$ref": "#/components/schemas/UnauthorizedError"
  11769. }
  11770. }
  11771. }
  11772. },
  11773. "404": {
  11774. "description": "SessionNotFoundError | QuestionNotFoundError",
  11775. "content": {
  11776. "application/json": {
  11777. "schema": {
  11778. "anyOf": [
  11779. {
  11780. "$ref": "#/components/schemas/SessionNotFoundError"
  11781. },
  11782. {
  11783. "$ref": "#/components/schemas/QuestionNotFoundError"
  11784. }
  11785. ]
  11786. }
  11787. }
  11788. }
  11789. }
  11790. },
  11791. "description": "Answer a pending question request owned by a session.",
  11792. "summary": "Reply to pending question request",
  11793. "requestBody": {
  11794. "content": {
  11795. "application/json": {
  11796. "schema": {
  11797. "$ref": "#/components/schemas/QuestionV2Reply"
  11798. }
  11799. }
  11800. },
  11801. "required": true
  11802. },
  11803. "x-codeSamples": [
  11804. {
  11805. "lang": "js",
  11806. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reply({\n ...\n})"
  11807. }
  11808. ]
  11809. }
  11810. },
  11811. "/api/session/{sessionID}/question/request/{requestID}/reject": {
  11812. "post": {
  11813. "tags": ["v2 session questions"],
  11814. "operationId": "v2.session.question.reject",
  11815. "parameters": [
  11816. {
  11817. "name": "sessionID",
  11818. "in": "path",
  11819. "schema": {
  11820. "type": "string",
  11821. "pattern": "^ses"
  11822. },
  11823. "required": true
  11824. },
  11825. {
  11826. "name": "requestID",
  11827. "in": "path",
  11828. "schema": {
  11829. "type": "string",
  11830. "pattern": "^que"
  11831. },
  11832. "required": true
  11833. }
  11834. ],
  11835. "security": [],
  11836. "responses": {
  11837. "204": {
  11838. "description": "<No Content>"
  11839. },
  11840. "400": {
  11841. "description": "InvalidRequestError",
  11842. "content": {
  11843. "application/json": {
  11844. "schema": {
  11845. "$ref": "#/components/schemas/InvalidRequestError"
  11846. }
  11847. }
  11848. }
  11849. },
  11850. "401": {
  11851. "description": "UnauthorizedError",
  11852. "content": {
  11853. "application/json": {
  11854. "schema": {
  11855. "$ref": "#/components/schemas/UnauthorizedError"
  11856. }
  11857. }
  11858. }
  11859. },
  11860. "404": {
  11861. "description": "SessionNotFoundError | QuestionNotFoundError",
  11862. "content": {
  11863. "application/json": {
  11864. "schema": {
  11865. "anyOf": [
  11866. {
  11867. "$ref": "#/components/schemas/SessionNotFoundError"
  11868. },
  11869. {
  11870. "$ref": "#/components/schemas/QuestionNotFoundError"
  11871. }
  11872. ]
  11873. }
  11874. }
  11875. }
  11876. }
  11877. },
  11878. "description": "Reject a pending question request owned by a session.",
  11879. "summary": "Reject pending question request",
  11880. "x-codeSamples": [
  11881. {
  11882. "lang": "js",
  11883. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reject({\n ...\n})"
  11884. }
  11885. ]
  11886. }
  11887. },
  11888. "/pty/{ptyID}/connect": {
  11889. "get": {
  11890. "tags": ["pty"],
  11891. "operationId": "pty.connect",
  11892. "parameters": [
  11893. {
  11894. "name": "ptyID",
  11895. "in": "path",
  11896. "schema": {
  11897. "type": "string",
  11898. "pattern": "^pty"
  11899. },
  11900. "required": true
  11901. },
  11902. {
  11903. "in": "query",
  11904. "name": "directory",
  11905. "schema": {
  11906. "type": "string"
  11907. }
  11908. },
  11909. {
  11910. "in": "query",
  11911. "name": "workspace",
  11912. "schema": {
  11913. "type": "string"
  11914. }
  11915. },
  11916. {
  11917. "in": "query",
  11918. "name": "cursor",
  11919. "schema": {
  11920. "type": "string"
  11921. }
  11922. },
  11923. {
  11924. "in": "query",
  11925. "name": "ticket",
  11926. "schema": {
  11927. "type": "string"
  11928. }
  11929. }
  11930. ],
  11931. "responses": {
  11932. "200": {
  11933. "description": "Connected session",
  11934. "content": {
  11935. "application/json": {
  11936. "schema": {
  11937. "type": "boolean",
  11938. "description": "Connected session"
  11939. }
  11940. }
  11941. }
  11942. },
  11943. "403": {
  11944. "description": "Forbidden",
  11945. "content": {
  11946. "application/json": {
  11947. "schema": {
  11948. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  11949. }
  11950. }
  11951. }
  11952. },
  11953. "404": {
  11954. "description": "Not found",
  11955. "content": {
  11956. "application/json": {
  11957. "schema": {
  11958. "$ref": "#/components/schemas/NotFoundError"
  11959. }
  11960. }
  11961. }
  11962. }
  11963. },
  11964. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  11965. "summary": "Connect to PTY session",
  11966. "x-codeSamples": [
  11967. {
  11968. "lang": "js",
  11969. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  11970. }
  11971. ]
  11972. }
  11973. }
  11974. },
  11975. "components": {
  11976. "schemas": {
  11977. "Event": {
  11978. "anyOf": [
  11979. {
  11980. "$ref": "#/components/schemas/EventModels-devRefreshed"
  11981. },
  11982. {
  11983. "$ref": "#/components/schemas/EventPluginAdded"
  11984. },
  11985. {
  11986. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  11987. },
  11988. {
  11989. "$ref": "#/components/schemas/EventSessionCreated"
  11990. },
  11991. {
  11992. "$ref": "#/components/schemas/EventSessionUpdated"
  11993. },
  11994. {
  11995. "$ref": "#/components/schemas/EventSessionDeleted"
  11996. },
  11997. {
  11998. "$ref": "#/components/schemas/EventMessageUpdated"
  11999. },
  12000. {
  12001. "$ref": "#/components/schemas/EventMessageRemoved"
  12002. },
  12003. {
  12004. "$ref": "#/components/schemas/EventMessagePartUpdated"
  12005. },
  12006. {
  12007. "$ref": "#/components/schemas/EventMessagePartRemoved"
  12008. },
  12009. {
  12010. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  12011. },
  12012. {
  12013. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  12014. },
  12015. {
  12016. "$ref": "#/components/schemas/EventSessionNextMoved"
  12017. },
  12018. {
  12019. "$ref": "#/components/schemas/EventSessionNextPrompted"
  12020. },
  12021. {
  12022. "$ref": "#/components/schemas/EventSessionNextPromptAdmitted"
  12023. },
  12024. {
  12025. "$ref": "#/components/schemas/EventSessionNextPromptPromoted"
  12026. },
  12027. {
  12028. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  12029. },
  12030. {
  12031. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  12032. },
  12033. {
  12034. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  12035. },
  12036. {
  12037. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  12038. },
  12039. {
  12040. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  12041. },
  12042. {
  12043. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  12044. },
  12045. {
  12046. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  12047. },
  12048. {
  12049. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  12050. },
  12051. {
  12052. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  12053. },
  12054. {
  12055. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  12056. },
  12057. {
  12058. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  12059. },
  12060. {
  12061. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  12062. },
  12063. {
  12064. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  12065. },
  12066. {
  12067. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  12068. },
  12069. {
  12070. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  12071. },
  12072. {
  12073. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  12074. },
  12075. {
  12076. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  12077. },
  12078. {
  12079. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  12080. },
  12081. {
  12082. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  12083. },
  12084. {
  12085. "$ref": "#/components/schemas/EventSessionNextRetried"
  12086. },
  12087. {
  12088. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  12089. },
  12090. {
  12091. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  12092. },
  12093. {
  12094. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  12095. },
  12096. {
  12097. "$ref": "#/components/schemas/EventMessagePartDelta"
  12098. },
  12099. {
  12100. "$ref": "#/components/schemas/EventSessionDiff"
  12101. },
  12102. {
  12103. "$ref": "#/components/schemas/EventSessionError"
  12104. },
  12105. {
  12106. "$ref": "#/components/schemas/EventInstallationUpdated"
  12107. },
  12108. {
  12109. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  12110. },
  12111. {
  12112. "$ref": "#/components/schemas/EventFileEdited"
  12113. },
  12114. {
  12115. "$ref": "#/components/schemas/EventAccountAdded"
  12116. },
  12117. {
  12118. "$ref": "#/components/schemas/EventAccountRemoved"
  12119. },
  12120. {
  12121. "$ref": "#/components/schemas/EventAccountSwitched"
  12122. },
  12123. {
  12124. "$ref": "#/components/schemas/EventPermissionV2Asked"
  12125. },
  12126. {
  12127. "$ref": "#/components/schemas/EventPermissionV2Replied"
  12128. },
  12129. {
  12130. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  12131. },
  12132. {
  12133. "$ref": "#/components/schemas/EventPtyCreated"
  12134. },
  12135. {
  12136. "$ref": "#/components/schemas/EventPtyUpdated"
  12137. },
  12138. {
  12139. "$ref": "#/components/schemas/EventPtyExited"
  12140. },
  12141. {
  12142. "$ref": "#/components/schemas/EventPtyDeleted"
  12143. },
  12144. {
  12145. "$ref": "#/components/schemas/EventQuestionV2Asked"
  12146. },
  12147. {
  12148. "$ref": "#/components/schemas/EventQuestionV2Replied"
  12149. },
  12150. {
  12151. "$ref": "#/components/schemas/EventQuestionV2Rejected"
  12152. },
  12153. {
  12154. "$ref": "#/components/schemas/EventTodoUpdated"
  12155. },
  12156. {
  12157. "$ref": "#/components/schemas/EventLspUpdated"
  12158. },
  12159. {
  12160. "$ref": "#/components/schemas/EventPermissionAsked"
  12161. },
  12162. {
  12163. "$ref": "#/components/schemas/EventPermissionReplied"
  12164. },
  12165. {
  12166. "$ref": "#/components/schemas/Event.tui.prompt.append"
  12167. },
  12168. {
  12169. "$ref": "#/components/schemas/Event.tui.command.execute"
  12170. },
  12171. {
  12172. "$ref": "#/components/schemas/Event.tui.toast.show"
  12173. },
  12174. {
  12175. "$ref": "#/components/schemas/Event.tui.session.select"
  12176. },
  12177. {
  12178. "$ref": "#/components/schemas/EventMcpToolsChanged"
  12179. },
  12180. {
  12181. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  12182. },
  12183. {
  12184. "$ref": "#/components/schemas/EventCommandExecuted"
  12185. },
  12186. {
  12187. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  12188. },
  12189. {
  12190. "$ref": "#/components/schemas/EventProjectUpdated"
  12191. },
  12192. {
  12193. "$ref": "#/components/schemas/EventQuestionAsked"
  12194. },
  12195. {
  12196. "$ref": "#/components/schemas/EventQuestionReplied"
  12197. },
  12198. {
  12199. "$ref": "#/components/schemas/EventQuestionRejected"
  12200. },
  12201. {
  12202. "$ref": "#/components/schemas/EventSessionStatus"
  12203. },
  12204. {
  12205. "$ref": "#/components/schemas/EventSessionIdle"
  12206. },
  12207. {
  12208. "$ref": "#/components/schemas/EventSessionCompacted"
  12209. },
  12210. {
  12211. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  12212. },
  12213. {
  12214. "$ref": "#/components/schemas/EventWorktreeReady"
  12215. },
  12216. {
  12217. "$ref": "#/components/schemas/EventWorktreeFailed"
  12218. },
  12219. {
  12220. "$ref": "#/components/schemas/EventWorkspaceReady"
  12221. },
  12222. {
  12223. "$ref": "#/components/schemas/EventWorkspaceFailed"
  12224. },
  12225. {
  12226. "$ref": "#/components/schemas/EventWorkspaceStatus"
  12227. },
  12228. {
  12229. "$ref": "#/components/schemas/EventServerConnected"
  12230. },
  12231. {
  12232. "$ref": "#/components/schemas/EventGlobalDisposed"
  12233. },
  12234. {
  12235. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  12236. }
  12237. ]
  12238. },
  12239. "QuestionReplied": {
  12240. "type": "object",
  12241. "properties": {
  12242. "sessionID": {
  12243. "type": "string",
  12244. "pattern": "^ses"
  12245. },
  12246. "requestID": {
  12247. "type": "string",
  12248. "pattern": "^que"
  12249. },
  12250. "answers": {
  12251. "type": "array",
  12252. "items": {
  12253. "$ref": "#/components/schemas/QuestionAnswer"
  12254. }
  12255. }
  12256. },
  12257. "required": ["sessionID", "requestID", "answers"],
  12258. "additionalProperties": false
  12259. },
  12260. "QuestionRejected": {
  12261. "type": "object",
  12262. "properties": {
  12263. "sessionID": {
  12264. "type": "string",
  12265. "pattern": "^ses"
  12266. },
  12267. "requestID": {
  12268. "type": "string",
  12269. "pattern": "^que"
  12270. }
  12271. },
  12272. "required": ["sessionID", "requestID"],
  12273. "additionalProperties": false
  12274. },
  12275. "OAuth": {
  12276. "type": "object",
  12277. "properties": {
  12278. "type": {
  12279. "type": "string",
  12280. "enum": ["oauth"]
  12281. },
  12282. "refresh": {
  12283. "type": "string"
  12284. },
  12285. "access": {
  12286. "type": "string"
  12287. },
  12288. "expires": {
  12289. "type": "integer",
  12290. "minimum": 0
  12291. },
  12292. "accountId": {
  12293. "type": "string"
  12294. },
  12295. "enterpriseUrl": {
  12296. "type": "string"
  12297. }
  12298. },
  12299. "required": ["type", "refresh", "access", "expires"],
  12300. "additionalProperties": false
  12301. },
  12302. "ApiAuth": {
  12303. "type": "object",
  12304. "properties": {
  12305. "type": {
  12306. "type": "string",
  12307. "enum": ["api"]
  12308. },
  12309. "key": {
  12310. "type": "string"
  12311. },
  12312. "metadata": {
  12313. "type": "object",
  12314. "additionalProperties": {
  12315. "type": "string"
  12316. }
  12317. }
  12318. },
  12319. "required": ["type", "key"],
  12320. "additionalProperties": false
  12321. },
  12322. "WellKnownAuth": {
  12323. "type": "object",
  12324. "properties": {
  12325. "type": {
  12326. "type": "string",
  12327. "enum": ["wellknown"]
  12328. },
  12329. "key": {
  12330. "type": "string"
  12331. },
  12332. "token": {
  12333. "type": "string"
  12334. }
  12335. },
  12336. "required": ["type", "key", "token"],
  12337. "additionalProperties": false
  12338. },
  12339. "Auth": {
  12340. "anyOf": [
  12341. {
  12342. "$ref": "#/components/schemas/OAuth"
  12343. },
  12344. {
  12345. "$ref": "#/components/schemas/ApiAuth"
  12346. },
  12347. {
  12348. "$ref": "#/components/schemas/WellKnownAuth"
  12349. }
  12350. ]
  12351. },
  12352. "effect_HttpApiError_BadRequest": {
  12353. "type": "object",
  12354. "properties": {
  12355. "_tag": {
  12356. "type": "string",
  12357. "enum": ["BadRequest"]
  12358. }
  12359. },
  12360. "required": ["_tag"],
  12361. "additionalProperties": false
  12362. },
  12363. "InvalidRequestError": {
  12364. "type": "object",
  12365. "properties": {
  12366. "_tag": {
  12367. "type": "string",
  12368. "enum": ["InvalidRequestError"]
  12369. },
  12370. "message": {
  12371. "type": "string"
  12372. },
  12373. "kind": {
  12374. "type": "string"
  12375. },
  12376. "field": {
  12377. "type": "string"
  12378. }
  12379. },
  12380. "required": ["_tag", "message"],
  12381. "additionalProperties": false
  12382. },
  12383. "MoveSessionError": {
  12384. "type": "object",
  12385. "properties": {
  12386. "name": {
  12387. "type": "string",
  12388. "enum": ["MoveSessionError"]
  12389. },
  12390. "data": {
  12391. "type": "object",
  12392. "properties": {
  12393. "message": {
  12394. "type": "string"
  12395. }
  12396. },
  12397. "required": ["message"],
  12398. "additionalProperties": false
  12399. }
  12400. },
  12401. "required": ["name", "data"],
  12402. "additionalProperties": false
  12403. },
  12404. "SnapshotFileDiff": {
  12405. "type": "object",
  12406. "properties": {
  12407. "file": {
  12408. "type": "string"
  12409. },
  12410. "patch": {
  12411. "type": "string"
  12412. },
  12413. "additions": {
  12414. "type": "number"
  12415. },
  12416. "deletions": {
  12417. "type": "number"
  12418. },
  12419. "status": {
  12420. "type": "string",
  12421. "enum": ["added", "deleted", "modified"]
  12422. }
  12423. },
  12424. "required": ["additions", "deletions"],
  12425. "additionalProperties": false
  12426. },
  12427. "PermissionAction": {
  12428. "type": "string",
  12429. "enum": ["allow", "deny", "ask"]
  12430. },
  12431. "PermissionRule": {
  12432. "type": "object",
  12433. "properties": {
  12434. "permission": {
  12435. "type": "string"
  12436. },
  12437. "pattern": {
  12438. "type": "string"
  12439. },
  12440. "action": {
  12441. "$ref": "#/components/schemas/PermissionAction"
  12442. }
  12443. },
  12444. "required": ["permission", "pattern", "action"],
  12445. "additionalProperties": false
  12446. },
  12447. "PermissionRuleset": {
  12448. "type": "array",
  12449. "items": {
  12450. "$ref": "#/components/schemas/PermissionRule"
  12451. }
  12452. },
  12453. "Session": {
  12454. "type": "object",
  12455. "properties": {
  12456. "id": {
  12457. "type": "string",
  12458. "pattern": "^ses"
  12459. },
  12460. "slug": {
  12461. "type": "string"
  12462. },
  12463. "projectID": {
  12464. "type": "string"
  12465. },
  12466. "workspaceID": {
  12467. "type": "string",
  12468. "pattern": "^wrk"
  12469. },
  12470. "directory": {
  12471. "type": "string"
  12472. },
  12473. "path": {
  12474. "type": "string"
  12475. },
  12476. "parentID": {
  12477. "type": "string",
  12478. "pattern": "^ses"
  12479. },
  12480. "summary": {
  12481. "type": "object",
  12482. "properties": {
  12483. "additions": {
  12484. "type": "number"
  12485. },
  12486. "deletions": {
  12487. "type": "number"
  12488. },
  12489. "files": {
  12490. "type": "number"
  12491. },
  12492. "diffs": {
  12493. "type": "array",
  12494. "items": {
  12495. "$ref": "#/components/schemas/SnapshotFileDiff"
  12496. }
  12497. }
  12498. },
  12499. "required": ["additions", "deletions", "files"],
  12500. "additionalProperties": false
  12501. },
  12502. "cost": {
  12503. "type": "number"
  12504. },
  12505. "tokens": {
  12506. "type": "object",
  12507. "properties": {
  12508. "input": {
  12509. "type": "number"
  12510. },
  12511. "output": {
  12512. "type": "number"
  12513. },
  12514. "reasoning": {
  12515. "type": "number"
  12516. },
  12517. "cache": {
  12518. "type": "object",
  12519. "properties": {
  12520. "read": {
  12521. "type": "number"
  12522. },
  12523. "write": {
  12524. "type": "number"
  12525. }
  12526. },
  12527. "required": ["read", "write"],
  12528. "additionalProperties": false
  12529. }
  12530. },
  12531. "required": ["input", "output", "reasoning", "cache"],
  12532. "additionalProperties": false
  12533. },
  12534. "share": {
  12535. "type": "object",
  12536. "properties": {
  12537. "url": {
  12538. "type": "string"
  12539. }
  12540. },
  12541. "required": ["url"],
  12542. "additionalProperties": false
  12543. },
  12544. "title": {
  12545. "type": "string"
  12546. },
  12547. "agent": {
  12548. "type": "string"
  12549. },
  12550. "model": {
  12551. "type": "object",
  12552. "properties": {
  12553. "id": {
  12554. "type": "string"
  12555. },
  12556. "providerID": {
  12557. "type": "string"
  12558. },
  12559. "variant": {
  12560. "type": "string"
  12561. }
  12562. },
  12563. "required": ["id", "providerID"],
  12564. "additionalProperties": false
  12565. },
  12566. "version": {
  12567. "type": "string"
  12568. },
  12569. "metadata": {
  12570. "type": "object"
  12571. },
  12572. "time": {
  12573. "type": "object",
  12574. "properties": {
  12575. "created": {
  12576. "type": "integer",
  12577. "minimum": 0
  12578. },
  12579. "updated": {
  12580. "type": "integer",
  12581. "minimum": 0
  12582. },
  12583. "compacting": {
  12584. "type": "integer",
  12585. "minimum": 0
  12586. },
  12587. "archived": {
  12588. "type": "number"
  12589. }
  12590. },
  12591. "required": ["created", "updated"],
  12592. "additionalProperties": false
  12593. },
  12594. "permission": {
  12595. "$ref": "#/components/schemas/PermissionRuleset"
  12596. },
  12597. "revert": {
  12598. "type": "object",
  12599. "properties": {
  12600. "messageID": {
  12601. "type": "string",
  12602. "pattern": "^msg"
  12603. },
  12604. "partID": {
  12605. "type": "string",
  12606. "pattern": "^prt"
  12607. },
  12608. "snapshot": {
  12609. "type": "string"
  12610. },
  12611. "diff": {
  12612. "type": "string"
  12613. }
  12614. },
  12615. "required": ["messageID"],
  12616. "additionalProperties": false
  12617. }
  12618. },
  12619. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  12620. "additionalProperties": false
  12621. },
  12622. "OutputFormatText": {
  12623. "type": "object",
  12624. "properties": {
  12625. "type": {
  12626. "type": "string",
  12627. "enum": ["text"]
  12628. }
  12629. },
  12630. "required": ["type"],
  12631. "additionalProperties": false
  12632. },
  12633. "JSONSchema": {
  12634. "type": "object"
  12635. },
  12636. "OutputFormatJsonSchema": {
  12637. "type": "object",
  12638. "properties": {
  12639. "type": {
  12640. "type": "string",
  12641. "enum": ["json_schema"]
  12642. },
  12643. "schema": {
  12644. "$ref": "#/components/schemas/JSONSchema"
  12645. },
  12646. "retryCount": {
  12647. "type": "integer",
  12648. "minimum": 0
  12649. }
  12650. },
  12651. "required": ["type", "schema"],
  12652. "additionalProperties": false
  12653. },
  12654. "OutputFormat": {
  12655. "anyOf": [
  12656. {
  12657. "$ref": "#/components/schemas/OutputFormatText"
  12658. },
  12659. {
  12660. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  12661. }
  12662. ]
  12663. },
  12664. "UserMessage": {
  12665. "type": "object",
  12666. "properties": {
  12667. "id": {
  12668. "type": "string",
  12669. "pattern": "^msg"
  12670. },
  12671. "sessionID": {
  12672. "type": "string",
  12673. "pattern": "^ses"
  12674. },
  12675. "role": {
  12676. "type": "string",
  12677. "enum": ["user"]
  12678. },
  12679. "time": {
  12680. "type": "object",
  12681. "properties": {
  12682. "created": {
  12683. "type": "number",
  12684. "minimum": 0
  12685. }
  12686. },
  12687. "required": ["created"],
  12688. "additionalProperties": false
  12689. },
  12690. "format": {
  12691. "$ref": "#/components/schemas/OutputFormat"
  12692. },
  12693. "summary": {
  12694. "type": "object",
  12695. "properties": {
  12696. "title": {
  12697. "type": "string"
  12698. },
  12699. "body": {
  12700. "type": "string"
  12701. },
  12702. "diffs": {
  12703. "type": "array",
  12704. "items": {
  12705. "$ref": "#/components/schemas/SnapshotFileDiff"
  12706. }
  12707. }
  12708. },
  12709. "required": ["diffs"],
  12710. "additionalProperties": false
  12711. },
  12712. "agent": {
  12713. "type": "string"
  12714. },
  12715. "model": {
  12716. "type": "object",
  12717. "properties": {
  12718. "providerID": {
  12719. "type": "string"
  12720. },
  12721. "modelID": {
  12722. "type": "string"
  12723. },
  12724. "variant": {
  12725. "type": "string"
  12726. }
  12727. },
  12728. "required": ["providerID", "modelID"],
  12729. "additionalProperties": false
  12730. },
  12731. "system": {
  12732. "type": "string"
  12733. },
  12734. "tools": {
  12735. "type": "object",
  12736. "additionalProperties": {
  12737. "type": "boolean"
  12738. }
  12739. }
  12740. },
  12741. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  12742. "additionalProperties": false
  12743. },
  12744. "ProviderAuthError": {
  12745. "type": "object",
  12746. "properties": {
  12747. "name": {
  12748. "type": "string",
  12749. "enum": ["ProviderAuthError"]
  12750. },
  12751. "data": {
  12752. "type": "object",
  12753. "properties": {
  12754. "providerID": {
  12755. "type": "string"
  12756. },
  12757. "message": {
  12758. "type": "string"
  12759. }
  12760. },
  12761. "required": ["providerID", "message"],
  12762. "additionalProperties": false
  12763. }
  12764. },
  12765. "required": ["name", "data"],
  12766. "additionalProperties": false
  12767. },
  12768. "UnknownError": {
  12769. "type": "object",
  12770. "properties": {
  12771. "name": {
  12772. "type": "string",
  12773. "enum": ["UnknownError"]
  12774. },
  12775. "data": {
  12776. "type": "object",
  12777. "properties": {
  12778. "message": {
  12779. "type": "string"
  12780. },
  12781. "ref": {
  12782. "type": "string"
  12783. }
  12784. },
  12785. "required": ["message"],
  12786. "additionalProperties": false
  12787. }
  12788. },
  12789. "required": ["name", "data"],
  12790. "additionalProperties": false
  12791. },
  12792. "MessageOutputLengthError": {
  12793. "type": "object",
  12794. "properties": {
  12795. "name": {
  12796. "type": "string",
  12797. "enum": ["MessageOutputLengthError"]
  12798. },
  12799. "data": {
  12800. "type": "object",
  12801. "properties": {}
  12802. }
  12803. },
  12804. "required": ["name", "data"],
  12805. "additionalProperties": false
  12806. },
  12807. "MessageAbortedError": {
  12808. "type": "object",
  12809. "properties": {
  12810. "name": {
  12811. "type": "string",
  12812. "enum": ["MessageAbortedError"]
  12813. },
  12814. "data": {
  12815. "type": "object",
  12816. "properties": {
  12817. "message": {
  12818. "type": "string"
  12819. }
  12820. },
  12821. "required": ["message"],
  12822. "additionalProperties": false
  12823. }
  12824. },
  12825. "required": ["name", "data"],
  12826. "additionalProperties": false
  12827. },
  12828. "StructuredOutputError": {
  12829. "type": "object",
  12830. "properties": {
  12831. "name": {
  12832. "type": "string",
  12833. "enum": ["StructuredOutputError"]
  12834. },
  12835. "data": {
  12836. "type": "object",
  12837. "properties": {
  12838. "message": {
  12839. "type": "string"
  12840. },
  12841. "retries": {
  12842. "type": "integer",
  12843. "minimum": 0
  12844. }
  12845. },
  12846. "required": ["message", "retries"],
  12847. "additionalProperties": false
  12848. }
  12849. },
  12850. "required": ["name", "data"],
  12851. "additionalProperties": false
  12852. },
  12853. "ContextOverflowError": {
  12854. "type": "object",
  12855. "properties": {
  12856. "name": {
  12857. "type": "string",
  12858. "enum": ["ContextOverflowError"]
  12859. },
  12860. "data": {
  12861. "type": "object",
  12862. "properties": {
  12863. "message": {
  12864. "type": "string"
  12865. },
  12866. "responseBody": {
  12867. "type": "string"
  12868. }
  12869. },
  12870. "required": ["message"],
  12871. "additionalProperties": false
  12872. }
  12873. },
  12874. "required": ["name", "data"],
  12875. "additionalProperties": false
  12876. },
  12877. "APIError": {
  12878. "type": "object",
  12879. "properties": {
  12880. "name": {
  12881. "type": "string",
  12882. "enum": ["APIError"]
  12883. },
  12884. "data": {
  12885. "type": "object",
  12886. "properties": {
  12887. "message": {
  12888. "type": "string"
  12889. },
  12890. "statusCode": {
  12891. "type": "integer",
  12892. "minimum": 0
  12893. },
  12894. "isRetryable": {
  12895. "type": "boolean"
  12896. },
  12897. "responseHeaders": {
  12898. "type": "object",
  12899. "additionalProperties": {
  12900. "type": "string"
  12901. }
  12902. },
  12903. "responseBody": {
  12904. "type": "string"
  12905. },
  12906. "metadata": {
  12907. "type": "object",
  12908. "additionalProperties": {
  12909. "type": "string"
  12910. }
  12911. }
  12912. },
  12913. "required": ["message", "isRetryable"],
  12914. "additionalProperties": false
  12915. }
  12916. },
  12917. "required": ["name", "data"],
  12918. "additionalProperties": false
  12919. },
  12920. "AssistantMessage": {
  12921. "type": "object",
  12922. "properties": {
  12923. "id": {
  12924. "type": "string",
  12925. "pattern": "^msg"
  12926. },
  12927. "sessionID": {
  12928. "type": "string",
  12929. "pattern": "^ses"
  12930. },
  12931. "role": {
  12932. "type": "string",
  12933. "enum": ["assistant"]
  12934. },
  12935. "time": {
  12936. "type": "object",
  12937. "properties": {
  12938. "created": {
  12939. "type": "integer",
  12940. "minimum": 0
  12941. },
  12942. "completed": {
  12943. "type": "integer",
  12944. "minimum": 0
  12945. }
  12946. },
  12947. "required": ["created"],
  12948. "additionalProperties": false
  12949. },
  12950. "error": {
  12951. "anyOf": [
  12952. {
  12953. "$ref": "#/components/schemas/ProviderAuthError"
  12954. },
  12955. {
  12956. "$ref": "#/components/schemas/UnknownError"
  12957. },
  12958. {
  12959. "$ref": "#/components/schemas/MessageOutputLengthError"
  12960. },
  12961. {
  12962. "$ref": "#/components/schemas/MessageAbortedError"
  12963. },
  12964. {
  12965. "$ref": "#/components/schemas/StructuredOutputError"
  12966. },
  12967. {
  12968. "$ref": "#/components/schemas/ContextOverflowError"
  12969. },
  12970. {
  12971. "$ref": "#/components/schemas/APIError"
  12972. }
  12973. ]
  12974. },
  12975. "parentID": {
  12976. "type": "string",
  12977. "pattern": "^msg"
  12978. },
  12979. "modelID": {
  12980. "type": "string"
  12981. },
  12982. "providerID": {
  12983. "type": "string"
  12984. },
  12985. "mode": {
  12986. "type": "string"
  12987. },
  12988. "agent": {
  12989. "type": "string"
  12990. },
  12991. "path": {
  12992. "type": "object",
  12993. "properties": {
  12994. "cwd": {
  12995. "type": "string"
  12996. },
  12997. "root": {
  12998. "type": "string"
  12999. }
  13000. },
  13001. "required": ["cwd", "root"],
  13002. "additionalProperties": false
  13003. },
  13004. "summary": {
  13005. "type": "boolean"
  13006. },
  13007. "cost": {
  13008. "type": "number"
  13009. },
  13010. "tokens": {
  13011. "type": "object",
  13012. "properties": {
  13013. "total": {
  13014. "type": "number"
  13015. },
  13016. "input": {
  13017. "type": "number"
  13018. },
  13019. "output": {
  13020. "type": "number"
  13021. },
  13022. "reasoning": {
  13023. "type": "number"
  13024. },
  13025. "cache": {
  13026. "type": "object",
  13027. "properties": {
  13028. "read": {
  13029. "type": "number"
  13030. },
  13031. "write": {
  13032. "type": "number"
  13033. }
  13034. },
  13035. "required": ["read", "write"],
  13036. "additionalProperties": false
  13037. }
  13038. },
  13039. "required": ["input", "output", "reasoning", "cache"],
  13040. "additionalProperties": false
  13041. },
  13042. "structured": {},
  13043. "variant": {
  13044. "type": "string"
  13045. },
  13046. "finish": {
  13047. "type": "string"
  13048. }
  13049. },
  13050. "required": [
  13051. "id",
  13052. "sessionID",
  13053. "role",
  13054. "time",
  13055. "parentID",
  13056. "modelID",
  13057. "providerID",
  13058. "mode",
  13059. "agent",
  13060. "path",
  13061. "cost",
  13062. "tokens"
  13063. ],
  13064. "additionalProperties": false
  13065. },
  13066. "Message": {
  13067. "anyOf": [
  13068. {
  13069. "$ref": "#/components/schemas/UserMessage"
  13070. },
  13071. {
  13072. "$ref": "#/components/schemas/AssistantMessage"
  13073. }
  13074. ]
  13075. },
  13076. "TextPart": {
  13077. "type": "object",
  13078. "properties": {
  13079. "id": {
  13080. "type": "string",
  13081. "pattern": "^prt"
  13082. },
  13083. "sessionID": {
  13084. "type": "string",
  13085. "pattern": "^ses"
  13086. },
  13087. "messageID": {
  13088. "type": "string",
  13089. "pattern": "^msg"
  13090. },
  13091. "type": {
  13092. "type": "string",
  13093. "enum": ["text"]
  13094. },
  13095. "text": {
  13096. "type": "string"
  13097. },
  13098. "synthetic": {
  13099. "type": "boolean"
  13100. },
  13101. "ignored": {
  13102. "type": "boolean"
  13103. },
  13104. "time": {
  13105. "type": "object",
  13106. "properties": {
  13107. "start": {
  13108. "type": "integer",
  13109. "minimum": 0
  13110. },
  13111. "end": {
  13112. "type": "integer",
  13113. "minimum": 0
  13114. }
  13115. },
  13116. "required": ["start"],
  13117. "additionalProperties": false
  13118. },
  13119. "metadata": {
  13120. "type": "object"
  13121. }
  13122. },
  13123. "required": ["id", "sessionID", "messageID", "type", "text"],
  13124. "additionalProperties": false
  13125. },
  13126. "SubtaskPart": {
  13127. "type": "object",
  13128. "properties": {
  13129. "id": {
  13130. "type": "string",
  13131. "pattern": "^prt"
  13132. },
  13133. "sessionID": {
  13134. "type": "string",
  13135. "pattern": "^ses"
  13136. },
  13137. "messageID": {
  13138. "type": "string",
  13139. "pattern": "^msg"
  13140. },
  13141. "type": {
  13142. "type": "string",
  13143. "enum": ["subtask"]
  13144. },
  13145. "prompt": {
  13146. "type": "string"
  13147. },
  13148. "description": {
  13149. "type": "string"
  13150. },
  13151. "agent": {
  13152. "type": "string"
  13153. },
  13154. "model": {
  13155. "type": "object",
  13156. "properties": {
  13157. "providerID": {
  13158. "type": "string"
  13159. },
  13160. "modelID": {
  13161. "type": "string"
  13162. }
  13163. },
  13164. "required": ["providerID", "modelID"],
  13165. "additionalProperties": false
  13166. },
  13167. "command": {
  13168. "type": "string"
  13169. }
  13170. },
  13171. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  13172. "additionalProperties": false
  13173. },
  13174. "ReasoningPart": {
  13175. "type": "object",
  13176. "properties": {
  13177. "id": {
  13178. "type": "string",
  13179. "pattern": "^prt"
  13180. },
  13181. "sessionID": {
  13182. "type": "string",
  13183. "pattern": "^ses"
  13184. },
  13185. "messageID": {
  13186. "type": "string",
  13187. "pattern": "^msg"
  13188. },
  13189. "type": {
  13190. "type": "string",
  13191. "enum": ["reasoning"]
  13192. },
  13193. "text": {
  13194. "type": "string"
  13195. },
  13196. "metadata": {
  13197. "type": "object"
  13198. },
  13199. "time": {
  13200. "type": "object",
  13201. "properties": {
  13202. "start": {
  13203. "type": "integer",
  13204. "minimum": 0
  13205. },
  13206. "end": {
  13207. "type": "integer",
  13208. "minimum": 0
  13209. }
  13210. },
  13211. "required": ["start"],
  13212. "additionalProperties": false
  13213. }
  13214. },
  13215. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  13216. "additionalProperties": false
  13217. },
  13218. "FilePartSourceText": {
  13219. "type": "object",
  13220. "properties": {
  13221. "value": {
  13222. "type": "string"
  13223. },
  13224. "start": {
  13225. "type": "number"
  13226. },
  13227. "end": {
  13228. "type": "number"
  13229. }
  13230. },
  13231. "required": ["value", "start", "end"],
  13232. "additionalProperties": false
  13233. },
  13234. "FileSource": {
  13235. "type": "object",
  13236. "properties": {
  13237. "text": {
  13238. "$ref": "#/components/schemas/FilePartSourceText"
  13239. },
  13240. "type": {
  13241. "type": "string",
  13242. "enum": ["file"]
  13243. },
  13244. "path": {
  13245. "type": "string"
  13246. }
  13247. },
  13248. "required": ["text", "type", "path"],
  13249. "additionalProperties": false
  13250. },
  13251. "Range": {
  13252. "type": "object",
  13253. "properties": {
  13254. "start": {
  13255. "type": "object",
  13256. "properties": {
  13257. "line": {
  13258. "type": "integer",
  13259. "minimum": 0
  13260. },
  13261. "character": {
  13262. "type": "integer",
  13263. "minimum": 0
  13264. }
  13265. },
  13266. "required": ["line", "character"],
  13267. "additionalProperties": false
  13268. },
  13269. "end": {
  13270. "type": "object",
  13271. "properties": {
  13272. "line": {
  13273. "type": "integer",
  13274. "minimum": 0
  13275. },
  13276. "character": {
  13277. "type": "integer",
  13278. "minimum": 0
  13279. }
  13280. },
  13281. "required": ["line", "character"],
  13282. "additionalProperties": false
  13283. }
  13284. },
  13285. "required": ["start", "end"],
  13286. "additionalProperties": false
  13287. },
  13288. "SymbolSource": {
  13289. "type": "object",
  13290. "properties": {
  13291. "text": {
  13292. "$ref": "#/components/schemas/FilePartSourceText"
  13293. },
  13294. "type": {
  13295. "type": "string",
  13296. "enum": ["symbol"]
  13297. },
  13298. "path": {
  13299. "type": "string"
  13300. },
  13301. "range": {
  13302. "$ref": "#/components/schemas/Range"
  13303. },
  13304. "name": {
  13305. "type": "string"
  13306. },
  13307. "kind": {
  13308. "type": "integer",
  13309. "minimum": 0
  13310. }
  13311. },
  13312. "required": ["text", "type", "path", "range", "name", "kind"],
  13313. "additionalProperties": false
  13314. },
  13315. "ResourceSource": {
  13316. "type": "object",
  13317. "properties": {
  13318. "text": {
  13319. "$ref": "#/components/schemas/FilePartSourceText"
  13320. },
  13321. "type": {
  13322. "type": "string",
  13323. "enum": ["resource"]
  13324. },
  13325. "clientName": {
  13326. "type": "string"
  13327. },
  13328. "uri": {
  13329. "type": "string"
  13330. }
  13331. },
  13332. "required": ["text", "type", "clientName", "uri"],
  13333. "additionalProperties": false
  13334. },
  13335. "FilePartSource": {
  13336. "anyOf": [
  13337. {
  13338. "$ref": "#/components/schemas/FileSource"
  13339. },
  13340. {
  13341. "$ref": "#/components/schemas/SymbolSource"
  13342. },
  13343. {
  13344. "$ref": "#/components/schemas/ResourceSource"
  13345. }
  13346. ]
  13347. },
  13348. "FilePart": {
  13349. "type": "object",
  13350. "properties": {
  13351. "id": {
  13352. "type": "string",
  13353. "pattern": "^prt"
  13354. },
  13355. "sessionID": {
  13356. "type": "string",
  13357. "pattern": "^ses"
  13358. },
  13359. "messageID": {
  13360. "type": "string",
  13361. "pattern": "^msg"
  13362. },
  13363. "type": {
  13364. "type": "string",
  13365. "enum": ["file"]
  13366. },
  13367. "mime": {
  13368. "type": "string"
  13369. },
  13370. "filename": {
  13371. "type": "string"
  13372. },
  13373. "url": {
  13374. "type": "string"
  13375. },
  13376. "source": {
  13377. "$ref": "#/components/schemas/FilePartSource"
  13378. }
  13379. },
  13380. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  13381. "additionalProperties": false
  13382. },
  13383. "ToolStatePending": {
  13384. "type": "object",
  13385. "properties": {
  13386. "status": {
  13387. "type": "string",
  13388. "enum": ["pending"]
  13389. },
  13390. "input": {
  13391. "type": "object"
  13392. },
  13393. "raw": {
  13394. "type": "string"
  13395. }
  13396. },
  13397. "required": ["status", "input", "raw"],
  13398. "additionalProperties": false
  13399. },
  13400. "ToolStateRunning": {
  13401. "type": "object",
  13402. "properties": {
  13403. "status": {
  13404. "type": "string",
  13405. "enum": ["running"]
  13406. },
  13407. "input": {
  13408. "type": "object"
  13409. },
  13410. "title": {
  13411. "type": "string"
  13412. },
  13413. "metadata": {
  13414. "type": "object"
  13415. },
  13416. "time": {
  13417. "type": "object",
  13418. "properties": {
  13419. "start": {
  13420. "type": "integer",
  13421. "minimum": 0
  13422. }
  13423. },
  13424. "required": ["start"],
  13425. "additionalProperties": false
  13426. }
  13427. },
  13428. "required": ["status", "input", "time"],
  13429. "additionalProperties": false
  13430. },
  13431. "ToolStateCompleted": {
  13432. "type": "object",
  13433. "properties": {
  13434. "status": {
  13435. "type": "string",
  13436. "enum": ["completed"]
  13437. },
  13438. "input": {
  13439. "type": "object"
  13440. },
  13441. "output": {
  13442. "type": "string"
  13443. },
  13444. "title": {
  13445. "type": "string"
  13446. },
  13447. "metadata": {
  13448. "type": "object"
  13449. },
  13450. "time": {
  13451. "type": "object",
  13452. "properties": {
  13453. "start": {
  13454. "type": "integer",
  13455. "minimum": 0
  13456. },
  13457. "end": {
  13458. "type": "integer",
  13459. "minimum": 0
  13460. },
  13461. "compacted": {
  13462. "type": "integer",
  13463. "minimum": 0
  13464. }
  13465. },
  13466. "required": ["start", "end"],
  13467. "additionalProperties": false
  13468. },
  13469. "attachments": {
  13470. "type": "array",
  13471. "items": {
  13472. "$ref": "#/components/schemas/FilePart"
  13473. }
  13474. }
  13475. },
  13476. "required": ["status", "input", "output", "title", "metadata", "time"],
  13477. "additionalProperties": false
  13478. },
  13479. "ToolStateError": {
  13480. "type": "object",
  13481. "properties": {
  13482. "status": {
  13483. "type": "string",
  13484. "enum": ["error"]
  13485. },
  13486. "input": {
  13487. "type": "object"
  13488. },
  13489. "error": {
  13490. "type": "string"
  13491. },
  13492. "metadata": {
  13493. "type": "object"
  13494. },
  13495. "time": {
  13496. "type": "object",
  13497. "properties": {
  13498. "start": {
  13499. "type": "integer",
  13500. "minimum": 0
  13501. },
  13502. "end": {
  13503. "type": "integer",
  13504. "minimum": 0
  13505. }
  13506. },
  13507. "required": ["start", "end"],
  13508. "additionalProperties": false
  13509. }
  13510. },
  13511. "required": ["status", "input", "error", "time"],
  13512. "additionalProperties": false
  13513. },
  13514. "ToolState": {
  13515. "anyOf": [
  13516. {
  13517. "$ref": "#/components/schemas/ToolStatePending"
  13518. },
  13519. {
  13520. "$ref": "#/components/schemas/ToolStateRunning"
  13521. },
  13522. {
  13523. "$ref": "#/components/schemas/ToolStateCompleted"
  13524. },
  13525. {
  13526. "$ref": "#/components/schemas/ToolStateError"
  13527. }
  13528. ]
  13529. },
  13530. "ToolPart": {
  13531. "type": "object",
  13532. "properties": {
  13533. "id": {
  13534. "type": "string",
  13535. "pattern": "^prt"
  13536. },
  13537. "sessionID": {
  13538. "type": "string",
  13539. "pattern": "^ses"
  13540. },
  13541. "messageID": {
  13542. "type": "string",
  13543. "pattern": "^msg"
  13544. },
  13545. "type": {
  13546. "type": "string",
  13547. "enum": ["tool"]
  13548. },
  13549. "callID": {
  13550. "type": "string"
  13551. },
  13552. "tool": {
  13553. "type": "string"
  13554. },
  13555. "state": {
  13556. "$ref": "#/components/schemas/ToolState"
  13557. },
  13558. "metadata": {
  13559. "type": "object"
  13560. }
  13561. },
  13562. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  13563. "additionalProperties": false
  13564. },
  13565. "StepStartPart": {
  13566. "type": "object",
  13567. "properties": {
  13568. "id": {
  13569. "type": "string",
  13570. "pattern": "^prt"
  13571. },
  13572. "sessionID": {
  13573. "type": "string",
  13574. "pattern": "^ses"
  13575. },
  13576. "messageID": {
  13577. "type": "string",
  13578. "pattern": "^msg"
  13579. },
  13580. "type": {
  13581. "type": "string",
  13582. "enum": ["step-start"]
  13583. },
  13584. "snapshot": {
  13585. "type": "string"
  13586. }
  13587. },
  13588. "required": ["id", "sessionID", "messageID", "type"],
  13589. "additionalProperties": false
  13590. },
  13591. "StepFinishPart": {
  13592. "type": "object",
  13593. "properties": {
  13594. "id": {
  13595. "type": "string",
  13596. "pattern": "^prt"
  13597. },
  13598. "sessionID": {
  13599. "type": "string",
  13600. "pattern": "^ses"
  13601. },
  13602. "messageID": {
  13603. "type": "string",
  13604. "pattern": "^msg"
  13605. },
  13606. "type": {
  13607. "type": "string",
  13608. "enum": ["step-finish"]
  13609. },
  13610. "reason": {
  13611. "type": "string"
  13612. },
  13613. "snapshot": {
  13614. "type": "string"
  13615. },
  13616. "cost": {
  13617. "type": "number"
  13618. },
  13619. "tokens": {
  13620. "type": "object",
  13621. "properties": {
  13622. "total": {
  13623. "type": "number"
  13624. },
  13625. "input": {
  13626. "type": "number"
  13627. },
  13628. "output": {
  13629. "type": "number"
  13630. },
  13631. "reasoning": {
  13632. "type": "number"
  13633. },
  13634. "cache": {
  13635. "type": "object",
  13636. "properties": {
  13637. "read": {
  13638. "type": "number"
  13639. },
  13640. "write": {
  13641. "type": "number"
  13642. }
  13643. },
  13644. "required": ["read", "write"],
  13645. "additionalProperties": false
  13646. }
  13647. },
  13648. "required": ["input", "output", "reasoning", "cache"],
  13649. "additionalProperties": false
  13650. }
  13651. },
  13652. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  13653. "additionalProperties": false
  13654. },
  13655. "SnapshotPart": {
  13656. "type": "object",
  13657. "properties": {
  13658. "id": {
  13659. "type": "string",
  13660. "pattern": "^prt"
  13661. },
  13662. "sessionID": {
  13663. "type": "string",
  13664. "pattern": "^ses"
  13665. },
  13666. "messageID": {
  13667. "type": "string",
  13668. "pattern": "^msg"
  13669. },
  13670. "type": {
  13671. "type": "string",
  13672. "enum": ["snapshot"]
  13673. },
  13674. "snapshot": {
  13675. "type": "string"
  13676. }
  13677. },
  13678. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  13679. "additionalProperties": false
  13680. },
  13681. "PatchPart": {
  13682. "type": "object",
  13683. "properties": {
  13684. "id": {
  13685. "type": "string",
  13686. "pattern": "^prt"
  13687. },
  13688. "sessionID": {
  13689. "type": "string",
  13690. "pattern": "^ses"
  13691. },
  13692. "messageID": {
  13693. "type": "string",
  13694. "pattern": "^msg"
  13695. },
  13696. "type": {
  13697. "type": "string",
  13698. "enum": ["patch"]
  13699. },
  13700. "hash": {
  13701. "type": "string"
  13702. },
  13703. "files": {
  13704. "type": "array",
  13705. "items": {
  13706. "type": "string"
  13707. }
  13708. }
  13709. },
  13710. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  13711. "additionalProperties": false
  13712. },
  13713. "AgentPart": {
  13714. "type": "object",
  13715. "properties": {
  13716. "id": {
  13717. "type": "string",
  13718. "pattern": "^prt"
  13719. },
  13720. "sessionID": {
  13721. "type": "string",
  13722. "pattern": "^ses"
  13723. },
  13724. "messageID": {
  13725. "type": "string",
  13726. "pattern": "^msg"
  13727. },
  13728. "type": {
  13729. "type": "string",
  13730. "enum": ["agent"]
  13731. },
  13732. "name": {
  13733. "type": "string"
  13734. },
  13735. "source": {
  13736. "type": "object",
  13737. "properties": {
  13738. "value": {
  13739. "type": "string"
  13740. },
  13741. "start": {
  13742. "type": "integer",
  13743. "minimum": 0
  13744. },
  13745. "end": {
  13746. "type": "integer",
  13747. "minimum": 0
  13748. }
  13749. },
  13750. "required": ["value", "start", "end"],
  13751. "additionalProperties": false
  13752. }
  13753. },
  13754. "required": ["id", "sessionID", "messageID", "type", "name"],
  13755. "additionalProperties": false
  13756. },
  13757. "RetryPart": {
  13758. "type": "object",
  13759. "properties": {
  13760. "id": {
  13761. "type": "string",
  13762. "pattern": "^prt"
  13763. },
  13764. "sessionID": {
  13765. "type": "string",
  13766. "pattern": "^ses"
  13767. },
  13768. "messageID": {
  13769. "type": "string",
  13770. "pattern": "^msg"
  13771. },
  13772. "type": {
  13773. "type": "string",
  13774. "enum": ["retry"]
  13775. },
  13776. "attempt": {
  13777. "type": "integer",
  13778. "minimum": 0
  13779. },
  13780. "error": {
  13781. "$ref": "#/components/schemas/APIError"
  13782. },
  13783. "time": {
  13784. "type": "object",
  13785. "properties": {
  13786. "created": {
  13787. "type": "integer",
  13788. "minimum": 0
  13789. }
  13790. },
  13791. "required": ["created"],
  13792. "additionalProperties": false
  13793. }
  13794. },
  13795. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  13796. "additionalProperties": false
  13797. },
  13798. "CompactionPart": {
  13799. "type": "object",
  13800. "properties": {
  13801. "id": {
  13802. "type": "string",
  13803. "pattern": "^prt"
  13804. },
  13805. "sessionID": {
  13806. "type": "string",
  13807. "pattern": "^ses"
  13808. },
  13809. "messageID": {
  13810. "type": "string",
  13811. "pattern": "^msg"
  13812. },
  13813. "type": {
  13814. "type": "string",
  13815. "enum": ["compaction"]
  13816. },
  13817. "auto": {
  13818. "type": "boolean"
  13819. },
  13820. "overflow": {
  13821. "type": "boolean"
  13822. },
  13823. "tail_start_id": {
  13824. "type": "string",
  13825. "pattern": "^msg"
  13826. }
  13827. },
  13828. "required": ["id", "sessionID", "messageID", "type", "auto"],
  13829. "additionalProperties": false
  13830. },
  13831. "Part": {
  13832. "anyOf": [
  13833. {
  13834. "$ref": "#/components/schemas/TextPart"
  13835. },
  13836. {
  13837. "$ref": "#/components/schemas/SubtaskPart"
  13838. },
  13839. {
  13840. "$ref": "#/components/schemas/ReasoningPart"
  13841. },
  13842. {
  13843. "$ref": "#/components/schemas/FilePart"
  13844. },
  13845. {
  13846. "$ref": "#/components/schemas/ToolPart"
  13847. },
  13848. {
  13849. "$ref": "#/components/schemas/StepStartPart"
  13850. },
  13851. {
  13852. "$ref": "#/components/schemas/StepFinishPart"
  13853. },
  13854. {
  13855. "$ref": "#/components/schemas/SnapshotPart"
  13856. },
  13857. {
  13858. "$ref": "#/components/schemas/PatchPart"
  13859. },
  13860. {
  13861. "$ref": "#/components/schemas/AgentPart"
  13862. },
  13863. {
  13864. "$ref": "#/components/schemas/RetryPart"
  13865. },
  13866. {
  13867. "$ref": "#/components/schemas/CompactionPart"
  13868. }
  13869. ]
  13870. },
  13871. "Prompt": {
  13872. "type": "object",
  13873. "properties": {
  13874. "text": {
  13875. "type": "string"
  13876. },
  13877. "files": {
  13878. "type": "array",
  13879. "items": {
  13880. "$ref": "#/components/schemas/PromptFileAttachment"
  13881. }
  13882. },
  13883. "agents": {
  13884. "type": "array",
  13885. "items": {
  13886. "$ref": "#/components/schemas/PromptAgentAttachment"
  13887. }
  13888. },
  13889. "references": {
  13890. "type": "array",
  13891. "items": {
  13892. "$ref": "#/components/schemas/PromptReferenceAttachment"
  13893. }
  13894. }
  13895. },
  13896. "required": ["text"],
  13897. "additionalProperties": false
  13898. },
  13899. "Pty": {
  13900. "type": "object",
  13901. "properties": {
  13902. "id": {
  13903. "type": "string",
  13904. "pattern": "^pty"
  13905. },
  13906. "title": {
  13907. "type": "string"
  13908. },
  13909. "command": {
  13910. "type": "string"
  13911. },
  13912. "args": {
  13913. "type": "array",
  13914. "items": {
  13915. "type": "string"
  13916. }
  13917. },
  13918. "cwd": {
  13919. "type": "string"
  13920. },
  13921. "status": {
  13922. "type": "string",
  13923. "enum": ["running", "exited"]
  13924. },
  13925. "pid": {
  13926. "type": "integer",
  13927. "minimum": 0
  13928. }
  13929. },
  13930. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  13931. "additionalProperties": false
  13932. },
  13933. "Todo": {
  13934. "type": "object",
  13935. "properties": {
  13936. "content": {
  13937. "type": "string",
  13938. "description": "Brief description of the task"
  13939. },
  13940. "status": {
  13941. "type": "string",
  13942. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  13943. },
  13944. "priority": {
  13945. "type": "string",
  13946. "description": "Priority level of the task: high, medium, low"
  13947. }
  13948. },
  13949. "required": ["content", "status", "priority"],
  13950. "additionalProperties": false
  13951. },
  13952. "QuestionOption": {
  13953. "type": "object",
  13954. "properties": {
  13955. "label": {
  13956. "type": "string",
  13957. "description": "Display text (1-5 words, concise)"
  13958. },
  13959. "description": {
  13960. "type": "string",
  13961. "description": "Explanation of choice"
  13962. }
  13963. },
  13964. "required": ["label", "description"],
  13965. "additionalProperties": false
  13966. },
  13967. "QuestionInfo": {
  13968. "type": "object",
  13969. "properties": {
  13970. "question": {
  13971. "type": "string",
  13972. "description": "Complete question"
  13973. },
  13974. "header": {
  13975. "type": "string",
  13976. "description": "Very short label (max 30 chars)"
  13977. },
  13978. "options": {
  13979. "type": "array",
  13980. "items": {
  13981. "$ref": "#/components/schemas/QuestionOption"
  13982. },
  13983. "description": "Available choices"
  13984. },
  13985. "multiple": {
  13986. "type": "boolean"
  13987. },
  13988. "custom": {
  13989. "type": "boolean"
  13990. }
  13991. },
  13992. "required": ["question", "header", "options"],
  13993. "additionalProperties": false
  13994. },
  13995. "QuestionTool": {
  13996. "type": "object",
  13997. "properties": {
  13998. "messageID": {
  13999. "type": "string",
  14000. "pattern": "^msg"
  14001. },
  14002. "callID": {
  14003. "type": "string"
  14004. }
  14005. },
  14006. "required": ["messageID", "callID"],
  14007. "additionalProperties": false
  14008. },
  14009. "QuestionAnswer": {
  14010. "type": "array",
  14011. "items": {
  14012. "type": "string"
  14013. }
  14014. },
  14015. "SessionStatus": {
  14016. "anyOf": [
  14017. {
  14018. "type": "object",
  14019. "properties": {
  14020. "type": {
  14021. "type": "string",
  14022. "enum": ["idle"]
  14023. }
  14024. },
  14025. "required": ["type"],
  14026. "additionalProperties": false
  14027. },
  14028. {
  14029. "type": "object",
  14030. "properties": {
  14031. "type": {
  14032. "type": "string",
  14033. "enum": ["retry"]
  14034. },
  14035. "attempt": {
  14036. "type": "integer",
  14037. "minimum": 0
  14038. },
  14039. "message": {
  14040. "type": "string"
  14041. },
  14042. "action": {
  14043. "type": "object",
  14044. "properties": {
  14045. "reason": {
  14046. "type": "string"
  14047. },
  14048. "provider": {
  14049. "type": "string"
  14050. },
  14051. "title": {
  14052. "type": "string"
  14053. },
  14054. "message": {
  14055. "type": "string"
  14056. },
  14057. "label": {
  14058. "type": "string"
  14059. },
  14060. "link": {
  14061. "type": "string"
  14062. }
  14063. },
  14064. "required": ["reason", "provider", "title", "message", "label"],
  14065. "additionalProperties": false
  14066. },
  14067. "next": {
  14068. "type": "integer",
  14069. "minimum": 0
  14070. }
  14071. },
  14072. "required": ["type", "attempt", "message", "next"],
  14073. "additionalProperties": false
  14074. },
  14075. {
  14076. "type": "object",
  14077. "properties": {
  14078. "type": {
  14079. "type": "string",
  14080. "enum": ["busy"]
  14081. }
  14082. },
  14083. "required": ["type"],
  14084. "additionalProperties": false
  14085. }
  14086. ]
  14087. },
  14088. "GlobalEvent": {
  14089. "type": "object",
  14090. "properties": {
  14091. "directory": {
  14092. "type": "string"
  14093. },
  14094. "project": {
  14095. "type": "string"
  14096. },
  14097. "workspace": {
  14098. "type": "string"
  14099. },
  14100. "payload": {
  14101. "anyOf": [
  14102. {
  14103. "type": "object",
  14104. "properties": {
  14105. "id": {
  14106. "type": "string"
  14107. },
  14108. "type": {
  14109. "type": "string",
  14110. "enum": ["models-dev.refreshed"]
  14111. },
  14112. "properties": {
  14113. "type": "object",
  14114. "properties": {}
  14115. }
  14116. },
  14117. "required": ["id", "type", "properties"],
  14118. "additionalProperties": false
  14119. },
  14120. {
  14121. "type": "object",
  14122. "properties": {
  14123. "id": {
  14124. "type": "string"
  14125. },
  14126. "type": {
  14127. "type": "string",
  14128. "enum": ["plugin.added"]
  14129. },
  14130. "properties": {
  14131. "type": "object",
  14132. "properties": {
  14133. "id": {
  14134. "type": "string"
  14135. }
  14136. },
  14137. "required": ["id"],
  14138. "additionalProperties": false
  14139. }
  14140. },
  14141. "required": ["id", "type", "properties"],
  14142. "additionalProperties": false
  14143. },
  14144. {
  14145. "type": "object",
  14146. "properties": {
  14147. "id": {
  14148. "type": "string"
  14149. },
  14150. "type": {
  14151. "type": "string",
  14152. "enum": ["catalog.model.updated"]
  14153. },
  14154. "properties": {
  14155. "type": "object",
  14156. "properties": {
  14157. "model": {
  14158. "$ref": "#/components/schemas/ModelV2Info"
  14159. }
  14160. },
  14161. "required": ["model"],
  14162. "additionalProperties": false
  14163. }
  14164. },
  14165. "required": ["id", "type", "properties"],
  14166. "additionalProperties": false
  14167. },
  14168. {
  14169. "type": "object",
  14170. "properties": {
  14171. "id": {
  14172. "type": "string"
  14173. },
  14174. "type": {
  14175. "type": "string",
  14176. "enum": ["session.created"]
  14177. },
  14178. "properties": {
  14179. "type": "object",
  14180. "properties": {
  14181. "sessionID": {
  14182. "type": "string",
  14183. "pattern": "^ses"
  14184. },
  14185. "info": {
  14186. "$ref": "#/components/schemas/Session"
  14187. }
  14188. },
  14189. "required": ["sessionID", "info"],
  14190. "additionalProperties": false
  14191. }
  14192. },
  14193. "required": ["id", "type", "properties"],
  14194. "additionalProperties": false
  14195. },
  14196. {
  14197. "type": "object",
  14198. "properties": {
  14199. "id": {
  14200. "type": "string"
  14201. },
  14202. "type": {
  14203. "type": "string",
  14204. "enum": ["session.updated"]
  14205. },
  14206. "properties": {
  14207. "type": "object",
  14208. "properties": {
  14209. "sessionID": {
  14210. "type": "string",
  14211. "pattern": "^ses"
  14212. },
  14213. "info": {
  14214. "$ref": "#/components/schemas/Session"
  14215. }
  14216. },
  14217. "required": ["sessionID", "info"],
  14218. "additionalProperties": false
  14219. }
  14220. },
  14221. "required": ["id", "type", "properties"],
  14222. "additionalProperties": false
  14223. },
  14224. {
  14225. "type": "object",
  14226. "properties": {
  14227. "id": {
  14228. "type": "string"
  14229. },
  14230. "type": {
  14231. "type": "string",
  14232. "enum": ["session.deleted"]
  14233. },
  14234. "properties": {
  14235. "type": "object",
  14236. "properties": {
  14237. "sessionID": {
  14238. "type": "string",
  14239. "pattern": "^ses"
  14240. },
  14241. "info": {
  14242. "$ref": "#/components/schemas/Session"
  14243. }
  14244. },
  14245. "required": ["sessionID", "info"],
  14246. "additionalProperties": false
  14247. }
  14248. },
  14249. "required": ["id", "type", "properties"],
  14250. "additionalProperties": false
  14251. },
  14252. {
  14253. "type": "object",
  14254. "properties": {
  14255. "id": {
  14256. "type": "string"
  14257. },
  14258. "type": {
  14259. "type": "string",
  14260. "enum": ["message.updated"]
  14261. },
  14262. "properties": {
  14263. "type": "object",
  14264. "properties": {
  14265. "sessionID": {
  14266. "type": "string",
  14267. "pattern": "^ses"
  14268. },
  14269. "info": {
  14270. "$ref": "#/components/schemas/Message"
  14271. }
  14272. },
  14273. "required": ["sessionID", "info"],
  14274. "additionalProperties": false
  14275. }
  14276. },
  14277. "required": ["id", "type", "properties"],
  14278. "additionalProperties": false
  14279. },
  14280. {
  14281. "type": "object",
  14282. "properties": {
  14283. "id": {
  14284. "type": "string"
  14285. },
  14286. "type": {
  14287. "type": "string",
  14288. "enum": ["message.removed"]
  14289. },
  14290. "properties": {
  14291. "type": "object",
  14292. "properties": {
  14293. "sessionID": {
  14294. "type": "string",
  14295. "pattern": "^ses"
  14296. },
  14297. "messageID": {
  14298. "type": "string",
  14299. "pattern": "^msg"
  14300. }
  14301. },
  14302. "required": ["sessionID", "messageID"],
  14303. "additionalProperties": false
  14304. }
  14305. },
  14306. "required": ["id", "type", "properties"],
  14307. "additionalProperties": false
  14308. },
  14309. {
  14310. "type": "object",
  14311. "properties": {
  14312. "id": {
  14313. "type": "string"
  14314. },
  14315. "type": {
  14316. "type": "string",
  14317. "enum": ["message.part.updated"]
  14318. },
  14319. "properties": {
  14320. "type": "object",
  14321. "properties": {
  14322. "sessionID": {
  14323. "type": "string",
  14324. "pattern": "^ses"
  14325. },
  14326. "part": {
  14327. "$ref": "#/components/schemas/Part"
  14328. },
  14329. "time": {
  14330. "type": "number"
  14331. }
  14332. },
  14333. "required": ["sessionID", "part", "time"],
  14334. "additionalProperties": false
  14335. }
  14336. },
  14337. "required": ["id", "type", "properties"],
  14338. "additionalProperties": false
  14339. },
  14340. {
  14341. "type": "object",
  14342. "properties": {
  14343. "id": {
  14344. "type": "string"
  14345. },
  14346. "type": {
  14347. "type": "string",
  14348. "enum": ["message.part.removed"]
  14349. },
  14350. "properties": {
  14351. "type": "object",
  14352. "properties": {
  14353. "sessionID": {
  14354. "type": "string",
  14355. "pattern": "^ses"
  14356. },
  14357. "messageID": {
  14358. "type": "string",
  14359. "pattern": "^msg"
  14360. },
  14361. "partID": {
  14362. "type": "string",
  14363. "pattern": "^prt"
  14364. }
  14365. },
  14366. "required": ["sessionID", "messageID", "partID"],
  14367. "additionalProperties": false
  14368. }
  14369. },
  14370. "required": ["id", "type", "properties"],
  14371. "additionalProperties": false
  14372. },
  14373. {
  14374. "type": "object",
  14375. "properties": {
  14376. "id": {
  14377. "type": "string"
  14378. },
  14379. "type": {
  14380. "type": "string",
  14381. "enum": ["session.next.agent.switched"]
  14382. },
  14383. "properties": {
  14384. "type": "object",
  14385. "properties": {
  14386. "timestamp": {
  14387. "type": "number"
  14388. },
  14389. "sessionID": {
  14390. "type": "string",
  14391. "pattern": "^ses"
  14392. },
  14393. "messageID": {
  14394. "type": "string",
  14395. "pattern": "^msg_"
  14396. },
  14397. "agent": {
  14398. "type": "string"
  14399. }
  14400. },
  14401. "required": ["timestamp", "sessionID", "messageID", "agent"],
  14402. "additionalProperties": false
  14403. }
  14404. },
  14405. "required": ["id", "type", "properties"],
  14406. "additionalProperties": false
  14407. },
  14408. {
  14409. "type": "object",
  14410. "properties": {
  14411. "id": {
  14412. "type": "string"
  14413. },
  14414. "type": {
  14415. "type": "string",
  14416. "enum": ["session.next.model.switched"]
  14417. },
  14418. "properties": {
  14419. "type": "object",
  14420. "properties": {
  14421. "timestamp": {
  14422. "type": "number"
  14423. },
  14424. "sessionID": {
  14425. "type": "string",
  14426. "pattern": "^ses"
  14427. },
  14428. "messageID": {
  14429. "type": "string",
  14430. "pattern": "^msg_"
  14431. },
  14432. "model": {
  14433. "type": "object",
  14434. "properties": {
  14435. "id": {
  14436. "type": "string"
  14437. },
  14438. "providerID": {
  14439. "type": "string"
  14440. },
  14441. "variant": {
  14442. "type": "string"
  14443. }
  14444. },
  14445. "required": ["id", "providerID"],
  14446. "additionalProperties": false
  14447. }
  14448. },
  14449. "required": ["timestamp", "sessionID", "messageID", "model"],
  14450. "additionalProperties": false
  14451. }
  14452. },
  14453. "required": ["id", "type", "properties"],
  14454. "additionalProperties": false
  14455. },
  14456. {
  14457. "type": "object",
  14458. "properties": {
  14459. "id": {
  14460. "type": "string"
  14461. },
  14462. "type": {
  14463. "type": "string",
  14464. "enum": ["session.next.moved"]
  14465. },
  14466. "properties": {
  14467. "type": "object",
  14468. "properties": {
  14469. "timestamp": {
  14470. "type": "number"
  14471. },
  14472. "sessionID": {
  14473. "type": "string",
  14474. "pattern": "^ses"
  14475. },
  14476. "location": {
  14477. "$ref": "#/components/schemas/LocationRef"
  14478. },
  14479. "subdirectory": {
  14480. "type": "string"
  14481. }
  14482. },
  14483. "required": ["timestamp", "sessionID", "location"],
  14484. "additionalProperties": false
  14485. }
  14486. },
  14487. "required": ["id", "type", "properties"],
  14488. "additionalProperties": false
  14489. },
  14490. {
  14491. "type": "object",
  14492. "properties": {
  14493. "id": {
  14494. "type": "string"
  14495. },
  14496. "type": {
  14497. "type": "string",
  14498. "enum": ["session.next.prompted"]
  14499. },
  14500. "properties": {
  14501. "type": "object",
  14502. "properties": {
  14503. "timestamp": {
  14504. "type": "number"
  14505. },
  14506. "sessionID": {
  14507. "type": "string",
  14508. "pattern": "^ses"
  14509. },
  14510. "messageID": {
  14511. "type": "string",
  14512. "pattern": "^msg_"
  14513. },
  14514. "prompt": {
  14515. "$ref": "#/components/schemas/Prompt"
  14516. },
  14517. "delivery": {
  14518. "type": "string",
  14519. "enum": ["steer", "queue"]
  14520. }
  14521. },
  14522. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  14523. "additionalProperties": false
  14524. }
  14525. },
  14526. "required": ["id", "type", "properties"],
  14527. "additionalProperties": false
  14528. },
  14529. {
  14530. "type": "object",
  14531. "properties": {
  14532. "id": {
  14533. "type": "string"
  14534. },
  14535. "type": {
  14536. "type": "string",
  14537. "enum": ["session.next.prompt.admitted"]
  14538. },
  14539. "properties": {
  14540. "type": "object",
  14541. "properties": {
  14542. "timestamp": {
  14543. "type": "number"
  14544. },
  14545. "sessionID": {
  14546. "type": "string",
  14547. "pattern": "^ses"
  14548. },
  14549. "messageID": {
  14550. "type": "string",
  14551. "pattern": "^msg_"
  14552. },
  14553. "prompt": {
  14554. "$ref": "#/components/schemas/Prompt"
  14555. },
  14556. "delivery": {
  14557. "type": "string",
  14558. "enum": ["steer", "queue"]
  14559. }
  14560. },
  14561. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  14562. "additionalProperties": false
  14563. }
  14564. },
  14565. "required": ["id", "type", "properties"],
  14566. "additionalProperties": false
  14567. },
  14568. {
  14569. "type": "object",
  14570. "properties": {
  14571. "id": {
  14572. "type": "string"
  14573. },
  14574. "type": {
  14575. "type": "string",
  14576. "enum": ["session.next.prompt.promoted"]
  14577. },
  14578. "properties": {
  14579. "type": "object",
  14580. "properties": {
  14581. "timestamp": {
  14582. "type": "number"
  14583. },
  14584. "sessionID": {
  14585. "type": "string",
  14586. "pattern": "^ses"
  14587. },
  14588. "messageID": {
  14589. "type": "string",
  14590. "pattern": "^msg_"
  14591. },
  14592. "prompt": {
  14593. "$ref": "#/components/schemas/Prompt"
  14594. },
  14595. "timeCreated": {
  14596. "type": "number"
  14597. }
  14598. },
  14599. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  14600. "additionalProperties": false
  14601. }
  14602. },
  14603. "required": ["id", "type", "properties"],
  14604. "additionalProperties": false
  14605. },
  14606. {
  14607. "type": "object",
  14608. "properties": {
  14609. "id": {
  14610. "type": "string"
  14611. },
  14612. "type": {
  14613. "type": "string",
  14614. "enum": ["session.next.synthetic"]
  14615. },
  14616. "properties": {
  14617. "type": "object",
  14618. "properties": {
  14619. "timestamp": {
  14620. "type": "number"
  14621. },
  14622. "sessionID": {
  14623. "type": "string",
  14624. "pattern": "^ses"
  14625. },
  14626. "messageID": {
  14627. "type": "string",
  14628. "pattern": "^msg_"
  14629. },
  14630. "text": {
  14631. "type": "string"
  14632. }
  14633. },
  14634. "required": ["timestamp", "sessionID", "messageID", "text"],
  14635. "additionalProperties": false
  14636. }
  14637. },
  14638. "required": ["id", "type", "properties"],
  14639. "additionalProperties": false
  14640. },
  14641. {
  14642. "type": "object",
  14643. "properties": {
  14644. "id": {
  14645. "type": "string"
  14646. },
  14647. "type": {
  14648. "type": "string",
  14649. "enum": ["session.next.shell.started"]
  14650. },
  14651. "properties": {
  14652. "type": "object",
  14653. "properties": {
  14654. "timestamp": {
  14655. "type": "number"
  14656. },
  14657. "sessionID": {
  14658. "type": "string",
  14659. "pattern": "^ses"
  14660. },
  14661. "messageID": {
  14662. "type": "string",
  14663. "pattern": "^msg_"
  14664. },
  14665. "callID": {
  14666. "type": "string"
  14667. },
  14668. "command": {
  14669. "type": "string"
  14670. }
  14671. },
  14672. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  14673. "additionalProperties": false
  14674. }
  14675. },
  14676. "required": ["id", "type", "properties"],
  14677. "additionalProperties": false
  14678. },
  14679. {
  14680. "type": "object",
  14681. "properties": {
  14682. "id": {
  14683. "type": "string"
  14684. },
  14685. "type": {
  14686. "type": "string",
  14687. "enum": ["session.next.shell.ended"]
  14688. },
  14689. "properties": {
  14690. "type": "object",
  14691. "properties": {
  14692. "timestamp": {
  14693. "type": "number"
  14694. },
  14695. "sessionID": {
  14696. "type": "string",
  14697. "pattern": "^ses"
  14698. },
  14699. "callID": {
  14700. "type": "string"
  14701. },
  14702. "output": {
  14703. "type": "string"
  14704. }
  14705. },
  14706. "required": ["timestamp", "sessionID", "callID", "output"],
  14707. "additionalProperties": false
  14708. }
  14709. },
  14710. "required": ["id", "type", "properties"],
  14711. "additionalProperties": false
  14712. },
  14713. {
  14714. "type": "object",
  14715. "properties": {
  14716. "id": {
  14717. "type": "string"
  14718. },
  14719. "type": {
  14720. "type": "string",
  14721. "enum": ["session.next.step.started"]
  14722. },
  14723. "properties": {
  14724. "type": "object",
  14725. "properties": {
  14726. "timestamp": {
  14727. "type": "number"
  14728. },
  14729. "sessionID": {
  14730. "type": "string",
  14731. "pattern": "^ses"
  14732. },
  14733. "assistantMessageID": {
  14734. "type": "string",
  14735. "pattern": "^msg_"
  14736. },
  14737. "agent": {
  14738. "type": "string"
  14739. },
  14740. "model": {
  14741. "type": "object",
  14742. "properties": {
  14743. "id": {
  14744. "type": "string"
  14745. },
  14746. "providerID": {
  14747. "type": "string"
  14748. },
  14749. "variant": {
  14750. "type": "string"
  14751. }
  14752. },
  14753. "required": ["id", "providerID"],
  14754. "additionalProperties": false
  14755. },
  14756. "snapshot": {
  14757. "type": "string"
  14758. }
  14759. },
  14760. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  14761. "additionalProperties": false
  14762. }
  14763. },
  14764. "required": ["id", "type", "properties"],
  14765. "additionalProperties": false
  14766. },
  14767. {
  14768. "type": "object",
  14769. "properties": {
  14770. "id": {
  14771. "type": "string"
  14772. },
  14773. "type": {
  14774. "type": "string",
  14775. "enum": ["session.next.step.ended"]
  14776. },
  14777. "properties": {
  14778. "type": "object",
  14779. "properties": {
  14780. "timestamp": {
  14781. "type": "number"
  14782. },
  14783. "sessionID": {
  14784. "type": "string",
  14785. "pattern": "^ses"
  14786. },
  14787. "assistantMessageID": {
  14788. "type": "string",
  14789. "pattern": "^msg_"
  14790. },
  14791. "finish": {
  14792. "type": "string"
  14793. },
  14794. "cost": {
  14795. "type": "number"
  14796. },
  14797. "tokens": {
  14798. "type": "object",
  14799. "properties": {
  14800. "input": {
  14801. "type": "number"
  14802. },
  14803. "output": {
  14804. "type": "number"
  14805. },
  14806. "reasoning": {
  14807. "type": "number"
  14808. },
  14809. "cache": {
  14810. "type": "object",
  14811. "properties": {
  14812. "read": {
  14813. "type": "number"
  14814. },
  14815. "write": {
  14816. "type": "number"
  14817. }
  14818. },
  14819. "required": ["read", "write"],
  14820. "additionalProperties": false
  14821. }
  14822. },
  14823. "required": ["input", "output", "reasoning", "cache"],
  14824. "additionalProperties": false
  14825. },
  14826. "snapshot": {
  14827. "type": "string"
  14828. }
  14829. },
  14830. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  14831. "additionalProperties": false
  14832. }
  14833. },
  14834. "required": ["id", "type", "properties"],
  14835. "additionalProperties": false
  14836. },
  14837. {
  14838. "type": "object",
  14839. "properties": {
  14840. "id": {
  14841. "type": "string"
  14842. },
  14843. "type": {
  14844. "type": "string",
  14845. "enum": ["session.next.step.failed"]
  14846. },
  14847. "properties": {
  14848. "type": "object",
  14849. "properties": {
  14850. "timestamp": {
  14851. "type": "number"
  14852. },
  14853. "sessionID": {
  14854. "type": "string",
  14855. "pattern": "^ses"
  14856. },
  14857. "assistantMessageID": {
  14858. "type": "string",
  14859. "pattern": "^msg_"
  14860. },
  14861. "error": {
  14862. "$ref": "#/components/schemas/SessionErrorUnknown"
  14863. }
  14864. },
  14865. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  14866. "additionalProperties": false
  14867. }
  14868. },
  14869. "required": ["id", "type", "properties"],
  14870. "additionalProperties": false
  14871. },
  14872. {
  14873. "type": "object",
  14874. "properties": {
  14875. "id": {
  14876. "type": "string"
  14877. },
  14878. "type": {
  14879. "type": "string",
  14880. "enum": ["session.next.text.started"]
  14881. },
  14882. "properties": {
  14883. "type": "object",
  14884. "properties": {
  14885. "timestamp": {
  14886. "type": "number"
  14887. },
  14888. "sessionID": {
  14889. "type": "string",
  14890. "pattern": "^ses"
  14891. },
  14892. "assistantMessageID": {
  14893. "type": "string",
  14894. "pattern": "^msg_"
  14895. },
  14896. "textID": {
  14897. "type": "string"
  14898. }
  14899. },
  14900. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  14901. "additionalProperties": false
  14902. }
  14903. },
  14904. "required": ["id", "type", "properties"],
  14905. "additionalProperties": false
  14906. },
  14907. {
  14908. "type": "object",
  14909. "properties": {
  14910. "id": {
  14911. "type": "string"
  14912. },
  14913. "type": {
  14914. "type": "string",
  14915. "enum": ["session.next.text.delta"]
  14916. },
  14917. "properties": {
  14918. "type": "object",
  14919. "properties": {
  14920. "timestamp": {
  14921. "type": "number"
  14922. },
  14923. "sessionID": {
  14924. "type": "string",
  14925. "pattern": "^ses"
  14926. },
  14927. "assistantMessageID": {
  14928. "type": "string",
  14929. "pattern": "^msg_"
  14930. },
  14931. "textID": {
  14932. "type": "string"
  14933. },
  14934. "delta": {
  14935. "type": "string"
  14936. }
  14937. },
  14938. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  14939. "additionalProperties": false
  14940. }
  14941. },
  14942. "required": ["id", "type", "properties"],
  14943. "additionalProperties": false
  14944. },
  14945. {
  14946. "type": "object",
  14947. "properties": {
  14948. "id": {
  14949. "type": "string"
  14950. },
  14951. "type": {
  14952. "type": "string",
  14953. "enum": ["session.next.text.ended"]
  14954. },
  14955. "properties": {
  14956. "type": "object",
  14957. "properties": {
  14958. "timestamp": {
  14959. "type": "number"
  14960. },
  14961. "sessionID": {
  14962. "type": "string",
  14963. "pattern": "^ses"
  14964. },
  14965. "assistantMessageID": {
  14966. "type": "string",
  14967. "pattern": "^msg_"
  14968. },
  14969. "textID": {
  14970. "type": "string"
  14971. },
  14972. "text": {
  14973. "type": "string"
  14974. }
  14975. },
  14976. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  14977. "additionalProperties": false
  14978. }
  14979. },
  14980. "required": ["id", "type", "properties"],
  14981. "additionalProperties": false
  14982. },
  14983. {
  14984. "type": "object",
  14985. "properties": {
  14986. "id": {
  14987. "type": "string"
  14988. },
  14989. "type": {
  14990. "type": "string",
  14991. "enum": ["session.next.reasoning.started"]
  14992. },
  14993. "properties": {
  14994. "type": "object",
  14995. "properties": {
  14996. "timestamp": {
  14997. "type": "number"
  14998. },
  14999. "sessionID": {
  15000. "type": "string",
  15001. "pattern": "^ses"
  15002. },
  15003. "assistantMessageID": {
  15004. "type": "string",
  15005. "pattern": "^msg_"
  15006. },
  15007. "reasoningID": {
  15008. "type": "string"
  15009. },
  15010. "providerMetadata": {
  15011. "type": "object",
  15012. "additionalProperties": {
  15013. "type": "object"
  15014. }
  15015. }
  15016. },
  15017. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  15018. "additionalProperties": false
  15019. }
  15020. },
  15021. "required": ["id", "type", "properties"],
  15022. "additionalProperties": false
  15023. },
  15024. {
  15025. "type": "object",
  15026. "properties": {
  15027. "id": {
  15028. "type": "string"
  15029. },
  15030. "type": {
  15031. "type": "string",
  15032. "enum": ["session.next.reasoning.delta"]
  15033. },
  15034. "properties": {
  15035. "type": "object",
  15036. "properties": {
  15037. "timestamp": {
  15038. "type": "number"
  15039. },
  15040. "sessionID": {
  15041. "type": "string",
  15042. "pattern": "^ses"
  15043. },
  15044. "assistantMessageID": {
  15045. "type": "string",
  15046. "pattern": "^msg_"
  15047. },
  15048. "reasoningID": {
  15049. "type": "string"
  15050. },
  15051. "delta": {
  15052. "type": "string"
  15053. }
  15054. },
  15055. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  15056. "additionalProperties": false
  15057. }
  15058. },
  15059. "required": ["id", "type", "properties"],
  15060. "additionalProperties": false
  15061. },
  15062. {
  15063. "type": "object",
  15064. "properties": {
  15065. "id": {
  15066. "type": "string"
  15067. },
  15068. "type": {
  15069. "type": "string",
  15070. "enum": ["session.next.reasoning.ended"]
  15071. },
  15072. "properties": {
  15073. "type": "object",
  15074. "properties": {
  15075. "timestamp": {
  15076. "type": "number"
  15077. },
  15078. "sessionID": {
  15079. "type": "string",
  15080. "pattern": "^ses"
  15081. },
  15082. "assistantMessageID": {
  15083. "type": "string",
  15084. "pattern": "^msg_"
  15085. },
  15086. "reasoningID": {
  15087. "type": "string"
  15088. },
  15089. "text": {
  15090. "type": "string"
  15091. },
  15092. "providerMetadata": {
  15093. "type": "object",
  15094. "additionalProperties": {
  15095. "type": "object"
  15096. }
  15097. }
  15098. },
  15099. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  15100. "additionalProperties": false
  15101. }
  15102. },
  15103. "required": ["id", "type", "properties"],
  15104. "additionalProperties": false
  15105. },
  15106. {
  15107. "type": "object",
  15108. "properties": {
  15109. "id": {
  15110. "type": "string"
  15111. },
  15112. "type": {
  15113. "type": "string",
  15114. "enum": ["session.next.tool.input.started"]
  15115. },
  15116. "properties": {
  15117. "type": "object",
  15118. "properties": {
  15119. "timestamp": {
  15120. "type": "number"
  15121. },
  15122. "sessionID": {
  15123. "type": "string",
  15124. "pattern": "^ses"
  15125. },
  15126. "assistantMessageID": {
  15127. "type": "string",
  15128. "pattern": "^msg_"
  15129. },
  15130. "callID": {
  15131. "type": "string"
  15132. },
  15133. "name": {
  15134. "type": "string"
  15135. }
  15136. },
  15137. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  15138. "additionalProperties": false
  15139. }
  15140. },
  15141. "required": ["id", "type", "properties"],
  15142. "additionalProperties": false
  15143. },
  15144. {
  15145. "type": "object",
  15146. "properties": {
  15147. "id": {
  15148. "type": "string"
  15149. },
  15150. "type": {
  15151. "type": "string",
  15152. "enum": ["session.next.tool.input.delta"]
  15153. },
  15154. "properties": {
  15155. "type": "object",
  15156. "properties": {
  15157. "timestamp": {
  15158. "type": "number"
  15159. },
  15160. "sessionID": {
  15161. "type": "string",
  15162. "pattern": "^ses"
  15163. },
  15164. "assistantMessageID": {
  15165. "type": "string",
  15166. "pattern": "^msg_"
  15167. },
  15168. "callID": {
  15169. "type": "string"
  15170. },
  15171. "delta": {
  15172. "type": "string"
  15173. }
  15174. },
  15175. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  15176. "additionalProperties": false
  15177. }
  15178. },
  15179. "required": ["id", "type", "properties"],
  15180. "additionalProperties": false
  15181. },
  15182. {
  15183. "type": "object",
  15184. "properties": {
  15185. "id": {
  15186. "type": "string"
  15187. },
  15188. "type": {
  15189. "type": "string",
  15190. "enum": ["session.next.tool.input.ended"]
  15191. },
  15192. "properties": {
  15193. "type": "object",
  15194. "properties": {
  15195. "timestamp": {
  15196. "type": "number"
  15197. },
  15198. "sessionID": {
  15199. "type": "string",
  15200. "pattern": "^ses"
  15201. },
  15202. "assistantMessageID": {
  15203. "type": "string",
  15204. "pattern": "^msg_"
  15205. },
  15206. "callID": {
  15207. "type": "string"
  15208. },
  15209. "text": {
  15210. "type": "string"
  15211. }
  15212. },
  15213. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  15214. "additionalProperties": false
  15215. }
  15216. },
  15217. "required": ["id", "type", "properties"],
  15218. "additionalProperties": false
  15219. },
  15220. {
  15221. "type": "object",
  15222. "properties": {
  15223. "id": {
  15224. "type": "string"
  15225. },
  15226. "type": {
  15227. "type": "string",
  15228. "enum": ["session.next.tool.called"]
  15229. },
  15230. "properties": {
  15231. "type": "object",
  15232. "properties": {
  15233. "timestamp": {
  15234. "type": "number"
  15235. },
  15236. "sessionID": {
  15237. "type": "string",
  15238. "pattern": "^ses"
  15239. },
  15240. "assistantMessageID": {
  15241. "type": "string",
  15242. "pattern": "^msg_"
  15243. },
  15244. "callID": {
  15245. "type": "string"
  15246. },
  15247. "tool": {
  15248. "type": "string"
  15249. },
  15250. "input": {
  15251. "type": "object"
  15252. },
  15253. "provider": {
  15254. "type": "object",
  15255. "properties": {
  15256. "executed": {
  15257. "type": "boolean"
  15258. },
  15259. "metadata": {
  15260. "type": "object",
  15261. "additionalProperties": {
  15262. "type": "object"
  15263. }
  15264. }
  15265. },
  15266. "required": ["executed"],
  15267. "additionalProperties": false
  15268. }
  15269. },
  15270. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  15271. "additionalProperties": false
  15272. }
  15273. },
  15274. "required": ["id", "type", "properties"],
  15275. "additionalProperties": false
  15276. },
  15277. {
  15278. "type": "object",
  15279. "properties": {
  15280. "id": {
  15281. "type": "string"
  15282. },
  15283. "type": {
  15284. "type": "string",
  15285. "enum": ["session.next.tool.progress"]
  15286. },
  15287. "properties": {
  15288. "type": "object",
  15289. "properties": {
  15290. "timestamp": {
  15291. "type": "number"
  15292. },
  15293. "sessionID": {
  15294. "type": "string",
  15295. "pattern": "^ses"
  15296. },
  15297. "assistantMessageID": {
  15298. "type": "string",
  15299. "pattern": "^msg_"
  15300. },
  15301. "callID": {
  15302. "type": "string"
  15303. },
  15304. "structured": {
  15305. "type": "object"
  15306. },
  15307. "content": {
  15308. "type": "array",
  15309. "items": {
  15310. "anyOf": [
  15311. {
  15312. "$ref": "#/components/schemas/ToolTextContent"
  15313. },
  15314. {
  15315. "$ref": "#/components/schemas/ToolFileContent"
  15316. }
  15317. ]
  15318. }
  15319. }
  15320. },
  15321. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  15322. "additionalProperties": false
  15323. }
  15324. },
  15325. "required": ["id", "type", "properties"],
  15326. "additionalProperties": false
  15327. },
  15328. {
  15329. "type": "object",
  15330. "properties": {
  15331. "id": {
  15332. "type": "string"
  15333. },
  15334. "type": {
  15335. "type": "string",
  15336. "enum": ["session.next.tool.success"]
  15337. },
  15338. "properties": {
  15339. "type": "object",
  15340. "properties": {
  15341. "timestamp": {
  15342. "type": "number"
  15343. },
  15344. "sessionID": {
  15345. "type": "string",
  15346. "pattern": "^ses"
  15347. },
  15348. "assistantMessageID": {
  15349. "type": "string",
  15350. "pattern": "^msg_"
  15351. },
  15352. "callID": {
  15353. "type": "string"
  15354. },
  15355. "structured": {
  15356. "type": "object"
  15357. },
  15358. "content": {
  15359. "type": "array",
  15360. "items": {
  15361. "anyOf": [
  15362. {
  15363. "$ref": "#/components/schemas/ToolTextContent"
  15364. },
  15365. {
  15366. "$ref": "#/components/schemas/ToolFileContent"
  15367. }
  15368. ]
  15369. }
  15370. },
  15371. "result": {},
  15372. "provider": {
  15373. "type": "object",
  15374. "properties": {
  15375. "executed": {
  15376. "type": "boolean"
  15377. },
  15378. "metadata": {
  15379. "type": "object",
  15380. "additionalProperties": {
  15381. "type": "object"
  15382. }
  15383. }
  15384. },
  15385. "required": ["executed"],
  15386. "additionalProperties": false
  15387. }
  15388. },
  15389. "required": [
  15390. "timestamp",
  15391. "sessionID",
  15392. "assistantMessageID",
  15393. "callID",
  15394. "structured",
  15395. "content",
  15396. "provider"
  15397. ],
  15398. "additionalProperties": false
  15399. }
  15400. },
  15401. "required": ["id", "type", "properties"],
  15402. "additionalProperties": false
  15403. },
  15404. {
  15405. "type": "object",
  15406. "properties": {
  15407. "id": {
  15408. "type": "string"
  15409. },
  15410. "type": {
  15411. "type": "string",
  15412. "enum": ["session.next.tool.failed"]
  15413. },
  15414. "properties": {
  15415. "type": "object",
  15416. "properties": {
  15417. "timestamp": {
  15418. "type": "number"
  15419. },
  15420. "sessionID": {
  15421. "type": "string",
  15422. "pattern": "^ses"
  15423. },
  15424. "assistantMessageID": {
  15425. "type": "string",
  15426. "pattern": "^msg_"
  15427. },
  15428. "callID": {
  15429. "type": "string"
  15430. },
  15431. "error": {
  15432. "$ref": "#/components/schemas/SessionErrorUnknown"
  15433. },
  15434. "result": {},
  15435. "provider": {
  15436. "type": "object",
  15437. "properties": {
  15438. "executed": {
  15439. "type": "boolean"
  15440. },
  15441. "metadata": {
  15442. "type": "object",
  15443. "additionalProperties": {
  15444. "type": "object"
  15445. }
  15446. }
  15447. },
  15448. "required": ["executed"],
  15449. "additionalProperties": false
  15450. }
  15451. },
  15452. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  15453. "additionalProperties": false
  15454. }
  15455. },
  15456. "required": ["id", "type", "properties"],
  15457. "additionalProperties": false
  15458. },
  15459. {
  15460. "type": "object",
  15461. "properties": {
  15462. "id": {
  15463. "type": "string"
  15464. },
  15465. "type": {
  15466. "type": "string",
  15467. "enum": ["session.next.retried"]
  15468. },
  15469. "properties": {
  15470. "type": "object",
  15471. "properties": {
  15472. "timestamp": {
  15473. "type": "number"
  15474. },
  15475. "sessionID": {
  15476. "type": "string",
  15477. "pattern": "^ses"
  15478. },
  15479. "attempt": {
  15480. "type": "number"
  15481. },
  15482. "error": {
  15483. "$ref": "#/components/schemas/SessionNextRetry_error"
  15484. }
  15485. },
  15486. "required": ["timestamp", "sessionID", "attempt", "error"],
  15487. "additionalProperties": false
  15488. }
  15489. },
  15490. "required": ["id", "type", "properties"],
  15491. "additionalProperties": false
  15492. },
  15493. {
  15494. "type": "object",
  15495. "properties": {
  15496. "id": {
  15497. "type": "string"
  15498. },
  15499. "type": {
  15500. "type": "string",
  15501. "enum": ["session.next.compaction.started"]
  15502. },
  15503. "properties": {
  15504. "type": "object",
  15505. "properties": {
  15506. "timestamp": {
  15507. "type": "number"
  15508. },
  15509. "sessionID": {
  15510. "type": "string",
  15511. "pattern": "^ses"
  15512. },
  15513. "messageID": {
  15514. "type": "string",
  15515. "pattern": "^msg_"
  15516. },
  15517. "reason": {
  15518. "type": "string",
  15519. "enum": ["auto", "manual"]
  15520. }
  15521. },
  15522. "required": ["timestamp", "sessionID", "messageID", "reason"],
  15523. "additionalProperties": false
  15524. }
  15525. },
  15526. "required": ["id", "type", "properties"],
  15527. "additionalProperties": false
  15528. },
  15529. {
  15530. "type": "object",
  15531. "properties": {
  15532. "id": {
  15533. "type": "string"
  15534. },
  15535. "type": {
  15536. "type": "string",
  15537. "enum": ["session.next.compaction.delta"]
  15538. },
  15539. "properties": {
  15540. "type": "object",
  15541. "properties": {
  15542. "timestamp": {
  15543. "type": "number"
  15544. },
  15545. "sessionID": {
  15546. "type": "string",
  15547. "pattern": "^ses"
  15548. },
  15549. "text": {
  15550. "type": "string"
  15551. }
  15552. },
  15553. "required": ["timestamp", "sessionID", "text"],
  15554. "additionalProperties": false
  15555. }
  15556. },
  15557. "required": ["id", "type", "properties"],
  15558. "additionalProperties": false
  15559. },
  15560. {
  15561. "type": "object",
  15562. "properties": {
  15563. "id": {
  15564. "type": "string"
  15565. },
  15566. "type": {
  15567. "type": "string",
  15568. "enum": ["session.next.compaction.ended"]
  15569. },
  15570. "properties": {
  15571. "type": "object",
  15572. "properties": {
  15573. "timestamp": {
  15574. "type": "number"
  15575. },
  15576. "sessionID": {
  15577. "type": "string",
  15578. "pattern": "^ses"
  15579. },
  15580. "text": {
  15581. "type": "string"
  15582. },
  15583. "include": {
  15584. "type": "string"
  15585. }
  15586. },
  15587. "required": ["timestamp", "sessionID", "text"],
  15588. "additionalProperties": false
  15589. }
  15590. },
  15591. "required": ["id", "type", "properties"],
  15592. "additionalProperties": false
  15593. },
  15594. {
  15595. "type": "object",
  15596. "properties": {
  15597. "id": {
  15598. "type": "string"
  15599. },
  15600. "type": {
  15601. "type": "string",
  15602. "enum": ["message.part.delta"]
  15603. },
  15604. "properties": {
  15605. "type": "object",
  15606. "properties": {
  15607. "sessionID": {
  15608. "type": "string",
  15609. "pattern": "^ses"
  15610. },
  15611. "messageID": {
  15612. "type": "string",
  15613. "pattern": "^msg"
  15614. },
  15615. "partID": {
  15616. "type": "string",
  15617. "pattern": "^prt"
  15618. },
  15619. "field": {
  15620. "type": "string"
  15621. },
  15622. "delta": {
  15623. "type": "string"
  15624. }
  15625. },
  15626. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  15627. "additionalProperties": false
  15628. }
  15629. },
  15630. "required": ["id", "type", "properties"],
  15631. "additionalProperties": false
  15632. },
  15633. {
  15634. "type": "object",
  15635. "properties": {
  15636. "id": {
  15637. "type": "string"
  15638. },
  15639. "type": {
  15640. "type": "string",
  15641. "enum": ["session.diff"]
  15642. },
  15643. "properties": {
  15644. "type": "object",
  15645. "properties": {
  15646. "sessionID": {
  15647. "type": "string",
  15648. "pattern": "^ses"
  15649. },
  15650. "diff": {
  15651. "type": "array",
  15652. "items": {
  15653. "$ref": "#/components/schemas/SnapshotFileDiff"
  15654. }
  15655. }
  15656. },
  15657. "required": ["sessionID", "diff"],
  15658. "additionalProperties": false
  15659. }
  15660. },
  15661. "required": ["id", "type", "properties"],
  15662. "additionalProperties": false
  15663. },
  15664. {
  15665. "type": "object",
  15666. "properties": {
  15667. "id": {
  15668. "type": "string"
  15669. },
  15670. "type": {
  15671. "type": "string",
  15672. "enum": ["session.error"]
  15673. },
  15674. "properties": {
  15675. "type": "object",
  15676. "properties": {
  15677. "sessionID": {
  15678. "type": "string",
  15679. "pattern": "^ses"
  15680. },
  15681. "error": {
  15682. "anyOf": [
  15683. {
  15684. "$ref": "#/components/schemas/ProviderAuthError"
  15685. },
  15686. {
  15687. "$ref": "#/components/schemas/UnknownError"
  15688. },
  15689. {
  15690. "$ref": "#/components/schemas/MessageOutputLengthError"
  15691. },
  15692. {
  15693. "$ref": "#/components/schemas/MessageAbortedError"
  15694. },
  15695. {
  15696. "$ref": "#/components/schemas/StructuredOutputError"
  15697. },
  15698. {
  15699. "$ref": "#/components/schemas/ContextOverflowError"
  15700. },
  15701. {
  15702. "$ref": "#/components/schemas/APIError"
  15703. }
  15704. ]
  15705. }
  15706. },
  15707. "additionalProperties": false
  15708. }
  15709. },
  15710. "required": ["id", "type", "properties"],
  15711. "additionalProperties": false
  15712. },
  15713. {
  15714. "type": "object",
  15715. "properties": {
  15716. "id": {
  15717. "type": "string"
  15718. },
  15719. "type": {
  15720. "type": "string",
  15721. "enum": ["installation.updated"]
  15722. },
  15723. "properties": {
  15724. "type": "object",
  15725. "properties": {
  15726. "version": {
  15727. "type": "string"
  15728. }
  15729. },
  15730. "required": ["version"],
  15731. "additionalProperties": false
  15732. }
  15733. },
  15734. "required": ["id", "type", "properties"],
  15735. "additionalProperties": false
  15736. },
  15737. {
  15738. "type": "object",
  15739. "properties": {
  15740. "id": {
  15741. "type": "string"
  15742. },
  15743. "type": {
  15744. "type": "string",
  15745. "enum": ["installation.update-available"]
  15746. },
  15747. "properties": {
  15748. "type": "object",
  15749. "properties": {
  15750. "version": {
  15751. "type": "string"
  15752. }
  15753. },
  15754. "required": ["version"],
  15755. "additionalProperties": false
  15756. }
  15757. },
  15758. "required": ["id", "type", "properties"],
  15759. "additionalProperties": false
  15760. },
  15761. {
  15762. "type": "object",
  15763. "properties": {
  15764. "id": {
  15765. "type": "string"
  15766. },
  15767. "type": {
  15768. "type": "string",
  15769. "enum": ["file.edited"]
  15770. },
  15771. "properties": {
  15772. "type": "object",
  15773. "properties": {
  15774. "file": {
  15775. "type": "string"
  15776. }
  15777. },
  15778. "required": ["file"],
  15779. "additionalProperties": false
  15780. }
  15781. },
  15782. "required": ["id", "type", "properties"],
  15783. "additionalProperties": false
  15784. },
  15785. {
  15786. "type": "object",
  15787. "properties": {
  15788. "id": {
  15789. "type": "string"
  15790. },
  15791. "type": {
  15792. "type": "string",
  15793. "enum": ["account.added"]
  15794. },
  15795. "properties": {
  15796. "type": "object",
  15797. "properties": {
  15798. "account": {
  15799. "$ref": "#/components/schemas/AuthInfo"
  15800. }
  15801. },
  15802. "required": ["account"],
  15803. "additionalProperties": false
  15804. }
  15805. },
  15806. "required": ["id", "type", "properties"],
  15807. "additionalProperties": false
  15808. },
  15809. {
  15810. "type": "object",
  15811. "properties": {
  15812. "id": {
  15813. "type": "string"
  15814. },
  15815. "type": {
  15816. "type": "string",
  15817. "enum": ["account.removed"]
  15818. },
  15819. "properties": {
  15820. "type": "object",
  15821. "properties": {
  15822. "account": {
  15823. "$ref": "#/components/schemas/AuthInfo"
  15824. }
  15825. },
  15826. "required": ["account"],
  15827. "additionalProperties": false
  15828. }
  15829. },
  15830. "required": ["id", "type", "properties"],
  15831. "additionalProperties": false
  15832. },
  15833. {
  15834. "type": "object",
  15835. "properties": {
  15836. "id": {
  15837. "type": "string"
  15838. },
  15839. "type": {
  15840. "type": "string",
  15841. "enum": ["account.switched"]
  15842. },
  15843. "properties": {
  15844. "type": "object",
  15845. "properties": {
  15846. "serviceID": {
  15847. "type": "string"
  15848. },
  15849. "from": {
  15850. "type": "string"
  15851. },
  15852. "to": {
  15853. "type": "string"
  15854. }
  15855. },
  15856. "required": ["serviceID"],
  15857. "additionalProperties": false
  15858. }
  15859. },
  15860. "required": ["id", "type", "properties"],
  15861. "additionalProperties": false
  15862. },
  15863. {
  15864. "type": "object",
  15865. "properties": {
  15866. "id": {
  15867. "type": "string"
  15868. },
  15869. "type": {
  15870. "type": "string",
  15871. "enum": ["permission.v2.asked"]
  15872. },
  15873. "properties": {
  15874. "type": "object",
  15875. "properties": {
  15876. "id": {
  15877. "type": "string",
  15878. "pattern": "^per"
  15879. },
  15880. "sessionID": {
  15881. "type": "string",
  15882. "pattern": "^ses"
  15883. },
  15884. "action": {
  15885. "type": "string"
  15886. },
  15887. "resources": {
  15888. "type": "array",
  15889. "items": {
  15890. "type": "string"
  15891. }
  15892. },
  15893. "save": {
  15894. "type": "array",
  15895. "items": {
  15896. "type": "string"
  15897. }
  15898. },
  15899. "metadata": {
  15900. "type": "object"
  15901. },
  15902. "source": {
  15903. "$ref": "#/components/schemas/PermissionV2Source"
  15904. }
  15905. },
  15906. "required": ["id", "sessionID", "action", "resources"],
  15907. "additionalProperties": false
  15908. }
  15909. },
  15910. "required": ["id", "type", "properties"],
  15911. "additionalProperties": false
  15912. },
  15913. {
  15914. "type": "object",
  15915. "properties": {
  15916. "id": {
  15917. "type": "string"
  15918. },
  15919. "type": {
  15920. "type": "string",
  15921. "enum": ["permission.v2.replied"]
  15922. },
  15923. "properties": {
  15924. "type": "object",
  15925. "properties": {
  15926. "sessionID": {
  15927. "type": "string",
  15928. "pattern": "^ses"
  15929. },
  15930. "requestID": {
  15931. "type": "string",
  15932. "pattern": "^per"
  15933. },
  15934. "reply": {
  15935. "$ref": "#/components/schemas/PermissionV2Reply"
  15936. }
  15937. },
  15938. "required": ["sessionID", "requestID", "reply"],
  15939. "additionalProperties": false
  15940. }
  15941. },
  15942. "required": ["id", "type", "properties"],
  15943. "additionalProperties": false
  15944. },
  15945. {
  15946. "type": "object",
  15947. "properties": {
  15948. "id": {
  15949. "type": "string"
  15950. },
  15951. "type": {
  15952. "type": "string",
  15953. "enum": ["file.watcher.updated"]
  15954. },
  15955. "properties": {
  15956. "type": "object",
  15957. "properties": {
  15958. "file": {
  15959. "type": "string"
  15960. },
  15961. "event": {
  15962. "type": "string",
  15963. "enum": ["add", "change", "unlink"]
  15964. }
  15965. },
  15966. "required": ["file", "event"],
  15967. "additionalProperties": false
  15968. }
  15969. },
  15970. "required": ["id", "type", "properties"],
  15971. "additionalProperties": false
  15972. },
  15973. {
  15974. "type": "object",
  15975. "properties": {
  15976. "id": {
  15977. "type": "string"
  15978. },
  15979. "type": {
  15980. "type": "string",
  15981. "enum": ["pty.created"]
  15982. },
  15983. "properties": {
  15984. "type": "object",
  15985. "properties": {
  15986. "info": {
  15987. "$ref": "#/components/schemas/Pty"
  15988. }
  15989. },
  15990. "required": ["info"],
  15991. "additionalProperties": false
  15992. }
  15993. },
  15994. "required": ["id", "type", "properties"],
  15995. "additionalProperties": false
  15996. },
  15997. {
  15998. "type": "object",
  15999. "properties": {
  16000. "id": {
  16001. "type": "string"
  16002. },
  16003. "type": {
  16004. "type": "string",
  16005. "enum": ["pty.updated"]
  16006. },
  16007. "properties": {
  16008. "type": "object",
  16009. "properties": {
  16010. "info": {
  16011. "$ref": "#/components/schemas/Pty"
  16012. }
  16013. },
  16014. "required": ["info"],
  16015. "additionalProperties": false
  16016. }
  16017. },
  16018. "required": ["id", "type", "properties"],
  16019. "additionalProperties": false
  16020. },
  16021. {
  16022. "type": "object",
  16023. "properties": {
  16024. "id": {
  16025. "type": "string"
  16026. },
  16027. "type": {
  16028. "type": "string",
  16029. "enum": ["pty.exited"]
  16030. },
  16031. "properties": {
  16032. "type": "object",
  16033. "properties": {
  16034. "id": {
  16035. "type": "string",
  16036. "pattern": "^pty"
  16037. },
  16038. "exitCode": {
  16039. "type": "integer",
  16040. "minimum": 0
  16041. }
  16042. },
  16043. "required": ["id", "exitCode"],
  16044. "additionalProperties": false
  16045. }
  16046. },
  16047. "required": ["id", "type", "properties"],
  16048. "additionalProperties": false
  16049. },
  16050. {
  16051. "type": "object",
  16052. "properties": {
  16053. "id": {
  16054. "type": "string"
  16055. },
  16056. "type": {
  16057. "type": "string",
  16058. "enum": ["pty.deleted"]
  16059. },
  16060. "properties": {
  16061. "type": "object",
  16062. "properties": {
  16063. "id": {
  16064. "type": "string",
  16065. "pattern": "^pty"
  16066. }
  16067. },
  16068. "required": ["id"],
  16069. "additionalProperties": false
  16070. }
  16071. },
  16072. "required": ["id", "type", "properties"],
  16073. "additionalProperties": false
  16074. },
  16075. {
  16076. "type": "object",
  16077. "properties": {
  16078. "id": {
  16079. "type": "string"
  16080. },
  16081. "type": {
  16082. "type": "string",
  16083. "enum": ["question.v2.asked"]
  16084. },
  16085. "properties": {
  16086. "type": "object",
  16087. "properties": {
  16088. "id": {
  16089. "type": "string",
  16090. "pattern": "^que"
  16091. },
  16092. "sessionID": {
  16093. "type": "string",
  16094. "pattern": "^ses"
  16095. },
  16096. "questions": {
  16097. "type": "array",
  16098. "items": {
  16099. "$ref": "#/components/schemas/QuestionV2Info"
  16100. },
  16101. "description": "Questions to ask"
  16102. },
  16103. "tool": {
  16104. "$ref": "#/components/schemas/QuestionV2Tool"
  16105. }
  16106. },
  16107. "required": ["id", "sessionID", "questions"],
  16108. "additionalProperties": false
  16109. }
  16110. },
  16111. "required": ["id", "type", "properties"],
  16112. "additionalProperties": false
  16113. },
  16114. {
  16115. "type": "object",
  16116. "properties": {
  16117. "id": {
  16118. "type": "string"
  16119. },
  16120. "type": {
  16121. "type": "string",
  16122. "enum": ["question.v2.replied"]
  16123. },
  16124. "properties": {
  16125. "type": "object",
  16126. "properties": {
  16127. "sessionID": {
  16128. "type": "string",
  16129. "pattern": "^ses"
  16130. },
  16131. "requestID": {
  16132. "type": "string",
  16133. "pattern": "^que"
  16134. },
  16135. "answers": {
  16136. "type": "array",
  16137. "items": {
  16138. "$ref": "#/components/schemas/QuestionV2Answer"
  16139. }
  16140. }
  16141. },
  16142. "required": ["sessionID", "requestID", "answers"],
  16143. "additionalProperties": false
  16144. }
  16145. },
  16146. "required": ["id", "type", "properties"],
  16147. "additionalProperties": false
  16148. },
  16149. {
  16150. "type": "object",
  16151. "properties": {
  16152. "id": {
  16153. "type": "string"
  16154. },
  16155. "type": {
  16156. "type": "string",
  16157. "enum": ["question.v2.rejected"]
  16158. },
  16159. "properties": {
  16160. "type": "object",
  16161. "properties": {
  16162. "sessionID": {
  16163. "type": "string",
  16164. "pattern": "^ses"
  16165. },
  16166. "requestID": {
  16167. "type": "string",
  16168. "pattern": "^que"
  16169. }
  16170. },
  16171. "required": ["sessionID", "requestID"],
  16172. "additionalProperties": false
  16173. }
  16174. },
  16175. "required": ["id", "type", "properties"],
  16176. "additionalProperties": false
  16177. },
  16178. {
  16179. "type": "object",
  16180. "properties": {
  16181. "id": {
  16182. "type": "string"
  16183. },
  16184. "type": {
  16185. "type": "string",
  16186. "enum": ["todo.updated"]
  16187. },
  16188. "properties": {
  16189. "type": "object",
  16190. "properties": {
  16191. "sessionID": {
  16192. "type": "string",
  16193. "pattern": "^ses"
  16194. },
  16195. "todos": {
  16196. "type": "array",
  16197. "items": {
  16198. "$ref": "#/components/schemas/Todo"
  16199. }
  16200. }
  16201. },
  16202. "required": ["sessionID", "todos"],
  16203. "additionalProperties": false
  16204. }
  16205. },
  16206. "required": ["id", "type", "properties"],
  16207. "additionalProperties": false
  16208. },
  16209. {
  16210. "type": "object",
  16211. "properties": {
  16212. "id": {
  16213. "type": "string"
  16214. },
  16215. "type": {
  16216. "type": "string",
  16217. "enum": ["lsp.updated"]
  16218. },
  16219. "properties": {
  16220. "type": "object",
  16221. "properties": {}
  16222. }
  16223. },
  16224. "required": ["id", "type", "properties"],
  16225. "additionalProperties": false
  16226. },
  16227. {
  16228. "type": "object",
  16229. "properties": {
  16230. "id": {
  16231. "type": "string"
  16232. },
  16233. "type": {
  16234. "type": "string",
  16235. "enum": ["permission.asked"]
  16236. },
  16237. "properties": {
  16238. "type": "object",
  16239. "properties": {
  16240. "id": {
  16241. "type": "string",
  16242. "pattern": "^per"
  16243. },
  16244. "sessionID": {
  16245. "type": "string",
  16246. "pattern": "^ses"
  16247. },
  16248. "permission": {
  16249. "type": "string"
  16250. },
  16251. "patterns": {
  16252. "type": "array",
  16253. "items": {
  16254. "type": "string"
  16255. }
  16256. },
  16257. "metadata": {
  16258. "type": "object"
  16259. },
  16260. "always": {
  16261. "type": "array",
  16262. "items": {
  16263. "type": "string"
  16264. }
  16265. },
  16266. "tool": {
  16267. "type": "object",
  16268. "properties": {
  16269. "messageID": {
  16270. "type": "string"
  16271. },
  16272. "callID": {
  16273. "type": "string"
  16274. }
  16275. },
  16276. "required": ["messageID", "callID"],
  16277. "additionalProperties": false
  16278. }
  16279. },
  16280. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  16281. "additionalProperties": false
  16282. }
  16283. },
  16284. "required": ["id", "type", "properties"],
  16285. "additionalProperties": false
  16286. },
  16287. {
  16288. "type": "object",
  16289. "properties": {
  16290. "id": {
  16291. "type": "string"
  16292. },
  16293. "type": {
  16294. "type": "string",
  16295. "enum": ["permission.replied"]
  16296. },
  16297. "properties": {
  16298. "type": "object",
  16299. "properties": {
  16300. "sessionID": {
  16301. "type": "string",
  16302. "pattern": "^ses"
  16303. },
  16304. "requestID": {
  16305. "type": "string",
  16306. "pattern": "^per"
  16307. },
  16308. "reply": {
  16309. "type": "string",
  16310. "enum": ["once", "always", "reject"]
  16311. }
  16312. },
  16313. "required": ["sessionID", "requestID", "reply"],
  16314. "additionalProperties": false
  16315. }
  16316. },
  16317. "required": ["id", "type", "properties"],
  16318. "additionalProperties": false
  16319. },
  16320. {
  16321. "type": "object",
  16322. "properties": {
  16323. "id": {
  16324. "type": "string"
  16325. },
  16326. "type": {
  16327. "type": "string",
  16328. "enum": ["tui.prompt.append"]
  16329. },
  16330. "properties": {
  16331. "type": "object",
  16332. "properties": {
  16333. "text": {
  16334. "type": "string"
  16335. }
  16336. },
  16337. "required": ["text"],
  16338. "additionalProperties": false
  16339. }
  16340. },
  16341. "required": ["id", "type", "properties"],
  16342. "additionalProperties": false
  16343. },
  16344. {
  16345. "type": "object",
  16346. "properties": {
  16347. "id": {
  16348. "type": "string"
  16349. },
  16350. "type": {
  16351. "type": "string",
  16352. "enum": ["tui.command.execute"]
  16353. },
  16354. "properties": {
  16355. "type": "object",
  16356. "properties": {
  16357. "command": {
  16358. "anyOf": [
  16359. {
  16360. "type": "string",
  16361. "enum": [
  16362. "session.list",
  16363. "session.new",
  16364. "session.share",
  16365. "session.interrupt",
  16366. "session.compact",
  16367. "session.page.up",
  16368. "session.page.down",
  16369. "session.line.up",
  16370. "session.line.down",
  16371. "session.half.page.up",
  16372. "session.half.page.down",
  16373. "session.first",
  16374. "session.last",
  16375. "prompt.clear",
  16376. "prompt.submit",
  16377. "agent.cycle"
  16378. ]
  16379. },
  16380. {
  16381. "type": "string"
  16382. }
  16383. ]
  16384. }
  16385. },
  16386. "required": ["command"],
  16387. "additionalProperties": false
  16388. }
  16389. },
  16390. "required": ["id", "type", "properties"],
  16391. "additionalProperties": false
  16392. },
  16393. {
  16394. "type": "object",
  16395. "properties": {
  16396. "id": {
  16397. "type": "string"
  16398. },
  16399. "type": {
  16400. "type": "string",
  16401. "enum": ["tui.toast.show"]
  16402. },
  16403. "properties": {
  16404. "type": "object",
  16405. "properties": {
  16406. "title": {
  16407. "type": "string"
  16408. },
  16409. "message": {
  16410. "type": "string"
  16411. },
  16412. "variant": {
  16413. "type": "string",
  16414. "enum": ["info", "success", "warning", "error"]
  16415. },
  16416. "duration": {
  16417. "type": "integer",
  16418. "exclusiveMinimum": 0
  16419. }
  16420. },
  16421. "required": ["message", "variant"],
  16422. "additionalProperties": false
  16423. }
  16424. },
  16425. "required": ["id", "type", "properties"],
  16426. "additionalProperties": false
  16427. },
  16428. {
  16429. "type": "object",
  16430. "properties": {
  16431. "id": {
  16432. "type": "string"
  16433. },
  16434. "type": {
  16435. "type": "string",
  16436. "enum": ["tui.session.select"]
  16437. },
  16438. "properties": {
  16439. "type": "object",
  16440. "properties": {
  16441. "sessionID": {
  16442. "type": "string",
  16443. "pattern": "^ses",
  16444. "description": "Session ID to navigate to"
  16445. }
  16446. },
  16447. "required": ["sessionID"],
  16448. "additionalProperties": false
  16449. }
  16450. },
  16451. "required": ["id", "type", "properties"],
  16452. "additionalProperties": false
  16453. },
  16454. {
  16455. "type": "object",
  16456. "properties": {
  16457. "id": {
  16458. "type": "string"
  16459. },
  16460. "type": {
  16461. "type": "string",
  16462. "enum": ["mcp.tools.changed"]
  16463. },
  16464. "properties": {
  16465. "type": "object",
  16466. "properties": {
  16467. "server": {
  16468. "type": "string"
  16469. }
  16470. },
  16471. "required": ["server"],
  16472. "additionalProperties": false
  16473. }
  16474. },
  16475. "required": ["id", "type", "properties"],
  16476. "additionalProperties": false
  16477. },
  16478. {
  16479. "type": "object",
  16480. "properties": {
  16481. "id": {
  16482. "type": "string"
  16483. },
  16484. "type": {
  16485. "type": "string",
  16486. "enum": ["mcp.browser.open.failed"]
  16487. },
  16488. "properties": {
  16489. "type": "object",
  16490. "properties": {
  16491. "mcpName": {
  16492. "type": "string"
  16493. },
  16494. "url": {
  16495. "type": "string"
  16496. }
  16497. },
  16498. "required": ["mcpName", "url"],
  16499. "additionalProperties": false
  16500. }
  16501. },
  16502. "required": ["id", "type", "properties"],
  16503. "additionalProperties": false
  16504. },
  16505. {
  16506. "type": "object",
  16507. "properties": {
  16508. "id": {
  16509. "type": "string"
  16510. },
  16511. "type": {
  16512. "type": "string",
  16513. "enum": ["command.executed"]
  16514. },
  16515. "properties": {
  16516. "type": "object",
  16517. "properties": {
  16518. "name": {
  16519. "type": "string"
  16520. },
  16521. "sessionID": {
  16522. "type": "string",
  16523. "pattern": "^ses"
  16524. },
  16525. "arguments": {
  16526. "type": "string"
  16527. },
  16528. "messageID": {
  16529. "type": "string",
  16530. "pattern": "^msg"
  16531. }
  16532. },
  16533. "required": ["name", "sessionID", "arguments", "messageID"],
  16534. "additionalProperties": false
  16535. }
  16536. },
  16537. "required": ["id", "type", "properties"],
  16538. "additionalProperties": false
  16539. },
  16540. {
  16541. "type": "object",
  16542. "properties": {
  16543. "id": {
  16544. "type": "string"
  16545. },
  16546. "type": {
  16547. "type": "string",
  16548. "enum": ["project.directories.updated"]
  16549. },
  16550. "properties": {
  16551. "type": "object",
  16552. "properties": {
  16553. "projectID": {
  16554. "type": "string"
  16555. }
  16556. },
  16557. "required": ["projectID"],
  16558. "additionalProperties": false
  16559. }
  16560. },
  16561. "required": ["id", "type", "properties"],
  16562. "additionalProperties": false
  16563. },
  16564. {
  16565. "type": "object",
  16566. "properties": {
  16567. "id": {
  16568. "type": "string"
  16569. },
  16570. "type": {
  16571. "type": "string",
  16572. "enum": ["project.updated"]
  16573. },
  16574. "properties": {
  16575. "type": "object",
  16576. "properties": {
  16577. "id": {
  16578. "type": "string"
  16579. },
  16580. "worktree": {
  16581. "type": "string"
  16582. },
  16583. "vcs": {
  16584. "type": "string",
  16585. "enum": ["git"]
  16586. },
  16587. "name": {
  16588. "type": "string"
  16589. },
  16590. "icon": {
  16591. "type": "object",
  16592. "properties": {
  16593. "url": {
  16594. "type": "string"
  16595. },
  16596. "override": {
  16597. "type": "string"
  16598. },
  16599. "color": {
  16600. "type": "string"
  16601. }
  16602. },
  16603. "additionalProperties": false
  16604. },
  16605. "commands": {
  16606. "type": "object",
  16607. "properties": {
  16608. "start": {
  16609. "type": "string",
  16610. "description": "Startup script to run when creating a new workspace (worktree)"
  16611. }
  16612. },
  16613. "additionalProperties": false
  16614. },
  16615. "time": {
  16616. "type": "object",
  16617. "properties": {
  16618. "created": {
  16619. "type": "integer",
  16620. "minimum": 0
  16621. },
  16622. "updated": {
  16623. "type": "integer",
  16624. "minimum": 0
  16625. },
  16626. "initialized": {
  16627. "type": "integer",
  16628. "minimum": 0
  16629. }
  16630. },
  16631. "required": ["created", "updated"],
  16632. "additionalProperties": false
  16633. },
  16634. "sandboxes": {
  16635. "type": "array",
  16636. "items": {
  16637. "type": "string"
  16638. }
  16639. }
  16640. },
  16641. "required": ["id", "worktree", "time", "sandboxes"],
  16642. "additionalProperties": false
  16643. }
  16644. },
  16645. "required": ["id", "type", "properties"],
  16646. "additionalProperties": false
  16647. },
  16648. {
  16649. "type": "object",
  16650. "properties": {
  16651. "id": {
  16652. "type": "string"
  16653. },
  16654. "type": {
  16655. "type": "string",
  16656. "enum": ["question.asked"]
  16657. },
  16658. "properties": {
  16659. "type": "object",
  16660. "properties": {
  16661. "id": {
  16662. "type": "string",
  16663. "pattern": "^que"
  16664. },
  16665. "sessionID": {
  16666. "type": "string",
  16667. "pattern": "^ses"
  16668. },
  16669. "questions": {
  16670. "type": "array",
  16671. "items": {
  16672. "$ref": "#/components/schemas/QuestionInfo"
  16673. },
  16674. "description": "Questions to ask"
  16675. },
  16676. "tool": {
  16677. "$ref": "#/components/schemas/QuestionTool"
  16678. }
  16679. },
  16680. "required": ["id", "sessionID", "questions"],
  16681. "additionalProperties": false
  16682. }
  16683. },
  16684. "required": ["id", "type", "properties"],
  16685. "additionalProperties": false
  16686. },
  16687. {
  16688. "type": "object",
  16689. "properties": {
  16690. "id": {
  16691. "type": "string"
  16692. },
  16693. "type": {
  16694. "type": "string",
  16695. "enum": ["question.replied"]
  16696. },
  16697. "properties": {
  16698. "type": "object",
  16699. "properties": {
  16700. "sessionID": {
  16701. "type": "string",
  16702. "pattern": "^ses"
  16703. },
  16704. "requestID": {
  16705. "type": "string",
  16706. "pattern": "^que"
  16707. },
  16708. "answers": {
  16709. "type": "array",
  16710. "items": {
  16711. "$ref": "#/components/schemas/QuestionAnswer"
  16712. }
  16713. }
  16714. },
  16715. "required": ["sessionID", "requestID", "answers"],
  16716. "additionalProperties": false
  16717. }
  16718. },
  16719. "required": ["id", "type", "properties"],
  16720. "additionalProperties": false
  16721. },
  16722. {
  16723. "type": "object",
  16724. "properties": {
  16725. "id": {
  16726. "type": "string"
  16727. },
  16728. "type": {
  16729. "type": "string",
  16730. "enum": ["question.rejected"]
  16731. },
  16732. "properties": {
  16733. "type": "object",
  16734. "properties": {
  16735. "sessionID": {
  16736. "type": "string",
  16737. "pattern": "^ses"
  16738. },
  16739. "requestID": {
  16740. "type": "string",
  16741. "pattern": "^que"
  16742. }
  16743. },
  16744. "required": ["sessionID", "requestID"],
  16745. "additionalProperties": false
  16746. }
  16747. },
  16748. "required": ["id", "type", "properties"],
  16749. "additionalProperties": false
  16750. },
  16751. {
  16752. "type": "object",
  16753. "properties": {
  16754. "id": {
  16755. "type": "string"
  16756. },
  16757. "type": {
  16758. "type": "string",
  16759. "enum": ["session.status"]
  16760. },
  16761. "properties": {
  16762. "type": "object",
  16763. "properties": {
  16764. "sessionID": {
  16765. "type": "string",
  16766. "pattern": "^ses"
  16767. },
  16768. "status": {
  16769. "$ref": "#/components/schemas/SessionStatus"
  16770. }
  16771. },
  16772. "required": ["sessionID", "status"],
  16773. "additionalProperties": false
  16774. }
  16775. },
  16776. "required": ["id", "type", "properties"],
  16777. "additionalProperties": false
  16778. },
  16779. {
  16780. "type": "object",
  16781. "properties": {
  16782. "id": {
  16783. "type": "string"
  16784. },
  16785. "type": {
  16786. "type": "string",
  16787. "enum": ["session.idle"]
  16788. },
  16789. "properties": {
  16790. "type": "object",
  16791. "properties": {
  16792. "sessionID": {
  16793. "type": "string",
  16794. "pattern": "^ses"
  16795. }
  16796. },
  16797. "required": ["sessionID"],
  16798. "additionalProperties": false
  16799. }
  16800. },
  16801. "required": ["id", "type", "properties"],
  16802. "additionalProperties": false
  16803. },
  16804. {
  16805. "type": "object",
  16806. "properties": {
  16807. "id": {
  16808. "type": "string"
  16809. },
  16810. "type": {
  16811. "type": "string",
  16812. "enum": ["session.compacted"]
  16813. },
  16814. "properties": {
  16815. "type": "object",
  16816. "properties": {
  16817. "sessionID": {
  16818. "type": "string",
  16819. "pattern": "^ses"
  16820. }
  16821. },
  16822. "required": ["sessionID"],
  16823. "additionalProperties": false
  16824. }
  16825. },
  16826. "required": ["id", "type", "properties"],
  16827. "additionalProperties": false
  16828. },
  16829. {
  16830. "type": "object",
  16831. "properties": {
  16832. "id": {
  16833. "type": "string"
  16834. },
  16835. "type": {
  16836. "type": "string",
  16837. "enum": ["vcs.branch.updated"]
  16838. },
  16839. "properties": {
  16840. "type": "object",
  16841. "properties": {
  16842. "branch": {
  16843. "type": "string"
  16844. }
  16845. },
  16846. "additionalProperties": false
  16847. }
  16848. },
  16849. "required": ["id", "type", "properties"],
  16850. "additionalProperties": false
  16851. },
  16852. {
  16853. "type": "object",
  16854. "properties": {
  16855. "id": {
  16856. "type": "string"
  16857. },
  16858. "type": {
  16859. "type": "string",
  16860. "enum": ["worktree.ready"]
  16861. },
  16862. "properties": {
  16863. "type": "object",
  16864. "properties": {
  16865. "name": {
  16866. "type": "string"
  16867. },
  16868. "branch": {
  16869. "type": "string"
  16870. }
  16871. },
  16872. "required": ["name"],
  16873. "additionalProperties": false
  16874. }
  16875. },
  16876. "required": ["id", "type", "properties"],
  16877. "additionalProperties": false
  16878. },
  16879. {
  16880. "type": "object",
  16881. "properties": {
  16882. "id": {
  16883. "type": "string"
  16884. },
  16885. "type": {
  16886. "type": "string",
  16887. "enum": ["worktree.failed"]
  16888. },
  16889. "properties": {
  16890. "type": "object",
  16891. "properties": {
  16892. "message": {
  16893. "type": "string"
  16894. }
  16895. },
  16896. "required": ["message"],
  16897. "additionalProperties": false
  16898. }
  16899. },
  16900. "required": ["id", "type", "properties"],
  16901. "additionalProperties": false
  16902. },
  16903. {
  16904. "type": "object",
  16905. "properties": {
  16906. "id": {
  16907. "type": "string"
  16908. },
  16909. "type": {
  16910. "type": "string",
  16911. "enum": ["workspace.ready"]
  16912. },
  16913. "properties": {
  16914. "type": "object",
  16915. "properties": {
  16916. "name": {
  16917. "type": "string"
  16918. }
  16919. },
  16920. "required": ["name"],
  16921. "additionalProperties": false
  16922. }
  16923. },
  16924. "required": ["id", "type", "properties"],
  16925. "additionalProperties": false
  16926. },
  16927. {
  16928. "type": "object",
  16929. "properties": {
  16930. "id": {
  16931. "type": "string"
  16932. },
  16933. "type": {
  16934. "type": "string",
  16935. "enum": ["workspace.failed"]
  16936. },
  16937. "properties": {
  16938. "type": "object",
  16939. "properties": {
  16940. "message": {
  16941. "type": "string"
  16942. }
  16943. },
  16944. "required": ["message"],
  16945. "additionalProperties": false
  16946. }
  16947. },
  16948. "required": ["id", "type", "properties"],
  16949. "additionalProperties": false
  16950. },
  16951. {
  16952. "type": "object",
  16953. "properties": {
  16954. "id": {
  16955. "type": "string"
  16956. },
  16957. "type": {
  16958. "type": "string",
  16959. "enum": ["workspace.status"]
  16960. },
  16961. "properties": {
  16962. "type": "object",
  16963. "properties": {
  16964. "workspaceID": {
  16965. "type": "string",
  16966. "pattern": "^wrk"
  16967. },
  16968. "status": {
  16969. "type": "string",
  16970. "enum": ["connected", "connecting", "disconnected", "error"]
  16971. }
  16972. },
  16973. "required": ["workspaceID", "status"],
  16974. "additionalProperties": false
  16975. }
  16976. },
  16977. "required": ["id", "type", "properties"],
  16978. "additionalProperties": false
  16979. },
  16980. {
  16981. "type": "object",
  16982. "properties": {
  16983. "id": {
  16984. "type": "string"
  16985. },
  16986. "type": {
  16987. "type": "string",
  16988. "enum": ["server.connected"]
  16989. },
  16990. "properties": {
  16991. "type": "object",
  16992. "properties": {}
  16993. }
  16994. },
  16995. "required": ["id", "type", "properties"],
  16996. "additionalProperties": false
  16997. },
  16998. {
  16999. "type": "object",
  17000. "properties": {
  17001. "id": {
  17002. "type": "string"
  17003. },
  17004. "type": {
  17005. "type": "string",
  17006. "enum": ["global.disposed"]
  17007. },
  17008. "properties": {
  17009. "type": "object",
  17010. "properties": {}
  17011. }
  17012. },
  17013. "required": ["id", "type", "properties"],
  17014. "additionalProperties": false
  17015. },
  17016. {
  17017. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  17018. },
  17019. {
  17020. "$ref": "#/components/schemas/SyncEventSessionCreated"
  17021. },
  17022. {
  17023. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  17024. },
  17025. {
  17026. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  17027. },
  17028. {
  17029. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  17030. },
  17031. {
  17032. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  17033. },
  17034. {
  17035. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  17036. },
  17037. {
  17038. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  17039. },
  17040. {
  17041. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  17042. },
  17043. {
  17044. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  17045. },
  17046. {
  17047. "$ref": "#/components/schemas/SyncEventSessionNextMoved"
  17048. },
  17049. {
  17050. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  17051. },
  17052. {
  17053. "$ref": "#/components/schemas/SyncEventSessionNextPromptAdmitted"
  17054. },
  17055. {
  17056. "$ref": "#/components/schemas/SyncEventSessionNextPromptPromoted"
  17057. },
  17058. {
  17059. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  17060. },
  17061. {
  17062. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  17063. },
  17064. {
  17065. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  17066. },
  17067. {
  17068. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  17069. },
  17070. {
  17071. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  17072. },
  17073. {
  17074. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  17075. },
  17076. {
  17077. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  17078. },
  17079. {
  17080. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  17081. },
  17082. {
  17083. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  17084. },
  17085. {
  17086. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  17087. },
  17088. {
  17089. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  17090. },
  17091. {
  17092. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  17093. },
  17094. {
  17095. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  17096. },
  17097. {
  17098. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  17099. },
  17100. {
  17101. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  17102. },
  17103. {
  17104. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  17105. },
  17106. {
  17107. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  17108. },
  17109. {
  17110. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  17111. },
  17112. {
  17113. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  17114. },
  17115. {
  17116. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  17117. }
  17118. ]
  17119. }
  17120. },
  17121. "required": ["directory", "payload"],
  17122. "additionalProperties": false
  17123. },
  17124. "LogLevel": {
  17125. "type": "string",
  17126. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  17127. "description": "Log level"
  17128. },
  17129. "ServerConfig": {
  17130. "type": "object",
  17131. "properties": {
  17132. "port": {
  17133. "type": "integer",
  17134. "exclusiveMinimum": 0
  17135. },
  17136. "hostname": {
  17137. "type": "string"
  17138. },
  17139. "mdns": {
  17140. "type": "boolean"
  17141. },
  17142. "mdnsDomain": {
  17143. "type": "string"
  17144. },
  17145. "cors": {
  17146. "type": "array",
  17147. "items": {
  17148. "type": "string"
  17149. }
  17150. }
  17151. },
  17152. "additionalProperties": false,
  17153. "description": "Server configuration for opencode serve and web commands"
  17154. },
  17155. "ReferenceConfigEntry": {
  17156. "anyOf": [
  17157. {
  17158. "type": "string"
  17159. },
  17160. {
  17161. "type": "object",
  17162. "properties": {
  17163. "repository": {
  17164. "type": "string",
  17165. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  17166. },
  17167. "branch": {
  17168. "type": "string"
  17169. }
  17170. },
  17171. "required": ["repository"],
  17172. "additionalProperties": false
  17173. },
  17174. {
  17175. "type": "object",
  17176. "properties": {
  17177. "path": {
  17178. "type": "string",
  17179. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  17180. }
  17181. },
  17182. "required": ["path"],
  17183. "additionalProperties": false
  17184. }
  17185. ]
  17186. },
  17187. "ReferenceConfig": {
  17188. "type": "object",
  17189. "additionalProperties": {
  17190. "$ref": "#/components/schemas/ReferenceConfigEntry"
  17191. }
  17192. },
  17193. "PermissionActionConfig": {
  17194. "type": "string",
  17195. "enum": ["ask", "allow", "deny"]
  17196. },
  17197. "PermissionObjectConfig": {
  17198. "type": "object",
  17199. "additionalProperties": {
  17200. "$ref": "#/components/schemas/PermissionActionConfig"
  17201. }
  17202. },
  17203. "PermissionRuleConfig": {
  17204. "anyOf": [
  17205. {
  17206. "$ref": "#/components/schemas/PermissionActionConfig"
  17207. },
  17208. {
  17209. "$ref": "#/components/schemas/PermissionObjectConfig"
  17210. }
  17211. ]
  17212. },
  17213. "PermissionConfig": {
  17214. "anyOf": [
  17215. {
  17216. "$ref": "#/components/schemas/PermissionActionConfig"
  17217. },
  17218. {
  17219. "type": "object",
  17220. "properties": {
  17221. "read": {
  17222. "$ref": "#/components/schemas/PermissionRuleConfig"
  17223. },
  17224. "edit": {
  17225. "$ref": "#/components/schemas/PermissionRuleConfig"
  17226. },
  17227. "glob": {
  17228. "$ref": "#/components/schemas/PermissionRuleConfig"
  17229. },
  17230. "grep": {
  17231. "$ref": "#/components/schemas/PermissionRuleConfig"
  17232. },
  17233. "list": {
  17234. "$ref": "#/components/schemas/PermissionRuleConfig"
  17235. },
  17236. "bash": {
  17237. "$ref": "#/components/schemas/PermissionRuleConfig"
  17238. },
  17239. "task": {
  17240. "$ref": "#/components/schemas/PermissionRuleConfig"
  17241. },
  17242. "external_directory": {
  17243. "$ref": "#/components/schemas/PermissionRuleConfig"
  17244. },
  17245. "todowrite": {
  17246. "$ref": "#/components/schemas/PermissionActionConfig"
  17247. },
  17248. "question": {
  17249. "$ref": "#/components/schemas/PermissionActionConfig"
  17250. },
  17251. "webfetch": {
  17252. "$ref": "#/components/schemas/PermissionActionConfig"
  17253. },
  17254. "websearch": {
  17255. "$ref": "#/components/schemas/PermissionActionConfig"
  17256. },
  17257. "lsp": {
  17258. "$ref": "#/components/schemas/PermissionRuleConfig"
  17259. },
  17260. "doom_loop": {
  17261. "$ref": "#/components/schemas/PermissionActionConfig"
  17262. },
  17263. "skill": {
  17264. "$ref": "#/components/schemas/PermissionRuleConfig"
  17265. }
  17266. },
  17267. "additionalProperties": {
  17268. "$ref": "#/components/schemas/PermissionRuleConfig"
  17269. }
  17270. }
  17271. ]
  17272. },
  17273. "AgentConfig": {
  17274. "type": "object",
  17275. "properties": {
  17276. "model": {
  17277. "type": "string"
  17278. },
  17279. "variant": {
  17280. "type": "string"
  17281. },
  17282. "temperature": {
  17283. "type": "number"
  17284. },
  17285. "top_p": {
  17286. "type": "number"
  17287. },
  17288. "prompt": {
  17289. "type": "string"
  17290. },
  17291. "tools": {
  17292. "type": "object",
  17293. "additionalProperties": {
  17294. "type": "boolean"
  17295. }
  17296. },
  17297. "disable": {
  17298. "type": "boolean"
  17299. },
  17300. "description": {
  17301. "type": "string"
  17302. },
  17303. "mode": {
  17304. "type": "string",
  17305. "enum": ["subagent", "primary", "all"]
  17306. },
  17307. "hidden": {
  17308. "type": "boolean"
  17309. },
  17310. "options": {
  17311. "type": "object"
  17312. },
  17313. "color": {
  17314. "anyOf": [
  17315. {
  17316. "type": "string",
  17317. "pattern": "^#[0-9a-fA-F]{6}$"
  17318. },
  17319. {
  17320. "type": "string",
  17321. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  17322. }
  17323. ],
  17324. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  17325. },
  17326. "steps": {
  17327. "type": "integer",
  17328. "exclusiveMinimum": 0
  17329. },
  17330. "maxSteps": {
  17331. "type": "integer",
  17332. "exclusiveMinimum": 0
  17333. },
  17334. "permission": {
  17335. "$ref": "#/components/schemas/PermissionConfig"
  17336. }
  17337. },
  17338. "additionalProperties": {}
  17339. },
  17340. "ProviderConfig": {
  17341. "type": "object",
  17342. "properties": {
  17343. "api": {
  17344. "type": "string"
  17345. },
  17346. "name": {
  17347. "type": "string"
  17348. },
  17349. "env": {
  17350. "type": "array",
  17351. "items": {
  17352. "type": "string"
  17353. }
  17354. },
  17355. "id": {
  17356. "type": "string"
  17357. },
  17358. "npm": {
  17359. "type": "string"
  17360. },
  17361. "whitelist": {
  17362. "type": "array",
  17363. "items": {
  17364. "type": "string"
  17365. }
  17366. },
  17367. "blacklist": {
  17368. "type": "array",
  17369. "items": {
  17370. "type": "string"
  17371. }
  17372. },
  17373. "options": {
  17374. "type": "object",
  17375. "properties": {
  17376. "apiKey": {
  17377. "type": "string"
  17378. },
  17379. "baseURL": {
  17380. "type": "string"
  17381. },
  17382. "enterpriseUrl": {
  17383. "type": "string"
  17384. },
  17385. "setCacheKey": {
  17386. "type": "boolean"
  17387. },
  17388. "timeout": {
  17389. "anyOf": [
  17390. {
  17391. "type": "integer",
  17392. "exclusiveMinimum": 0
  17393. },
  17394. {
  17395. "type": "boolean",
  17396. "enum": [false]
  17397. }
  17398. ],
  17399. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  17400. },
  17401. "headerTimeout": {
  17402. "anyOf": [
  17403. {
  17404. "type": "integer",
  17405. "exclusiveMinimum": 0
  17406. },
  17407. {
  17408. "type": "boolean",
  17409. "enum": [false]
  17410. }
  17411. ],
  17412. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  17413. },
  17414. "chunkTimeout": {
  17415. "type": "integer",
  17416. "exclusiveMinimum": 0
  17417. }
  17418. },
  17419. "additionalProperties": {}
  17420. },
  17421. "models": {
  17422. "type": "object",
  17423. "additionalProperties": {
  17424. "type": "object",
  17425. "properties": {
  17426. "id": {
  17427. "type": "string"
  17428. },
  17429. "name": {
  17430. "type": "string"
  17431. },
  17432. "family": {
  17433. "type": "string"
  17434. },
  17435. "release_date": {
  17436. "type": "string"
  17437. },
  17438. "attachment": {
  17439. "type": "boolean"
  17440. },
  17441. "reasoning": {
  17442. "type": "boolean"
  17443. },
  17444. "temperature": {
  17445. "type": "boolean"
  17446. },
  17447. "tool_call": {
  17448. "type": "boolean"
  17449. },
  17450. "interleaved": {
  17451. "anyOf": [
  17452. {
  17453. "type": "boolean",
  17454. "enum": [true]
  17455. },
  17456. {
  17457. "type": "object",
  17458. "properties": {
  17459. "field": {
  17460. "type": "string",
  17461. "enum": ["reasoning_content", "reasoning_details"]
  17462. }
  17463. },
  17464. "required": ["field"],
  17465. "additionalProperties": false
  17466. }
  17467. ]
  17468. },
  17469. "cost": {
  17470. "type": "object",
  17471. "properties": {
  17472. "input": {
  17473. "type": "number"
  17474. },
  17475. "output": {
  17476. "type": "number"
  17477. },
  17478. "cache_read": {
  17479. "type": "number"
  17480. },
  17481. "cache_write": {
  17482. "type": "number"
  17483. },
  17484. "context_over_200k": {
  17485. "type": "object",
  17486. "properties": {
  17487. "input": {
  17488. "type": "number"
  17489. },
  17490. "output": {
  17491. "type": "number"
  17492. },
  17493. "cache_read": {
  17494. "type": "number"
  17495. },
  17496. "cache_write": {
  17497. "type": "number"
  17498. }
  17499. },
  17500. "required": ["input", "output"],
  17501. "additionalProperties": false
  17502. }
  17503. },
  17504. "required": ["input", "output"],
  17505. "additionalProperties": false
  17506. },
  17507. "limit": {
  17508. "type": "object",
  17509. "properties": {
  17510. "context": {
  17511. "type": "number"
  17512. },
  17513. "input": {
  17514. "type": "number"
  17515. },
  17516. "output": {
  17517. "type": "number"
  17518. }
  17519. },
  17520. "required": ["context", "output"],
  17521. "additionalProperties": false
  17522. },
  17523. "modalities": {
  17524. "type": "object",
  17525. "properties": {
  17526. "input": {
  17527. "type": "array",
  17528. "items": {
  17529. "type": "string",
  17530. "enum": ["text", "audio", "image", "video", "pdf"]
  17531. }
  17532. },
  17533. "output": {
  17534. "type": "array",
  17535. "items": {
  17536. "type": "string",
  17537. "enum": ["text", "audio", "image", "video", "pdf"]
  17538. }
  17539. }
  17540. },
  17541. "additionalProperties": false
  17542. },
  17543. "experimental": {
  17544. "type": "boolean"
  17545. },
  17546. "status": {
  17547. "type": "string",
  17548. "enum": ["alpha", "beta", "deprecated", "active"]
  17549. },
  17550. "provider": {
  17551. "type": "object",
  17552. "properties": {
  17553. "npm": {
  17554. "type": "string"
  17555. },
  17556. "api": {
  17557. "type": "string"
  17558. }
  17559. },
  17560. "additionalProperties": false
  17561. },
  17562. "options": {
  17563. "type": "object"
  17564. },
  17565. "headers": {
  17566. "type": "object",
  17567. "additionalProperties": {
  17568. "type": "string"
  17569. }
  17570. },
  17571. "variants": {
  17572. "type": "object",
  17573. "additionalProperties": {
  17574. "type": "object",
  17575. "properties": {
  17576. "disabled": {
  17577. "type": "boolean"
  17578. }
  17579. },
  17580. "additionalProperties": {}
  17581. },
  17582. "description": "Variant-specific configuration"
  17583. }
  17584. },
  17585. "additionalProperties": false
  17586. }
  17587. }
  17588. },
  17589. "additionalProperties": false
  17590. },
  17591. "McpLocalConfig": {
  17592. "type": "object",
  17593. "properties": {
  17594. "type": {
  17595. "type": "string",
  17596. "enum": ["local"],
  17597. "description": "Type of MCP server connection"
  17598. },
  17599. "command": {
  17600. "type": "array",
  17601. "items": {
  17602. "type": "string"
  17603. },
  17604. "description": "Command and arguments to run the MCP server"
  17605. },
  17606. "environment": {
  17607. "type": "object",
  17608. "additionalProperties": {
  17609. "type": "string"
  17610. }
  17611. },
  17612. "enabled": {
  17613. "type": "boolean"
  17614. },
  17615. "timeout": {
  17616. "type": "integer",
  17617. "exclusiveMinimum": 0
  17618. }
  17619. },
  17620. "required": ["type", "command"],
  17621. "additionalProperties": false
  17622. },
  17623. "McpOAuthConfig": {
  17624. "type": "object",
  17625. "properties": {
  17626. "clientId": {
  17627. "type": "string"
  17628. },
  17629. "clientSecret": {
  17630. "type": "string"
  17631. },
  17632. "scope": {
  17633. "type": "string"
  17634. },
  17635. "callbackPort": {
  17636. "type": "integer",
  17637. "minimum": 1,
  17638. "maximum": 65535
  17639. },
  17640. "redirectUri": {
  17641. "type": "string"
  17642. }
  17643. },
  17644. "additionalProperties": false
  17645. },
  17646. "McpRemoteConfig": {
  17647. "type": "object",
  17648. "properties": {
  17649. "type": {
  17650. "type": "string",
  17651. "enum": ["remote"],
  17652. "description": "Type of MCP server connection"
  17653. },
  17654. "url": {
  17655. "type": "string",
  17656. "description": "URL of the remote MCP server"
  17657. },
  17658. "enabled": {
  17659. "type": "boolean"
  17660. },
  17661. "headers": {
  17662. "type": "object",
  17663. "additionalProperties": {
  17664. "type": "string"
  17665. }
  17666. },
  17667. "oauth": {
  17668. "anyOf": [
  17669. {
  17670. "$ref": "#/components/schemas/McpOAuthConfig"
  17671. },
  17672. {
  17673. "type": "boolean",
  17674. "enum": [false]
  17675. }
  17676. ],
  17677. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  17678. },
  17679. "timeout": {
  17680. "type": "integer",
  17681. "exclusiveMinimum": 0
  17682. }
  17683. },
  17684. "required": ["type", "url"],
  17685. "additionalProperties": false
  17686. },
  17687. "LayoutConfig": {
  17688. "type": "string",
  17689. "enum": ["auto", "stretch"],
  17690. "description": "@deprecated Always uses stretch layout."
  17691. },
  17692. "ImageAttachmentConfig": {
  17693. "type": "object",
  17694. "properties": {
  17695. "auto_resize": {
  17696. "type": "boolean"
  17697. },
  17698. "max_width": {
  17699. "type": "integer",
  17700. "exclusiveMinimum": 0
  17701. },
  17702. "max_height": {
  17703. "type": "integer",
  17704. "exclusiveMinimum": 0
  17705. },
  17706. "max_base64_bytes": {
  17707. "type": "integer",
  17708. "exclusiveMinimum": 0
  17709. }
  17710. },
  17711. "additionalProperties": false
  17712. },
  17713. "AttachmentConfig": {
  17714. "type": "object",
  17715. "properties": {
  17716. "image": {
  17717. "$ref": "#/components/schemas/ImageAttachmentConfig"
  17718. }
  17719. },
  17720. "additionalProperties": false
  17721. },
  17722. "Config": {
  17723. "type": "object",
  17724. "properties": {
  17725. "$schema": {
  17726. "type": "string"
  17727. },
  17728. "shell": {
  17729. "type": "string"
  17730. },
  17731. "logLevel": {
  17732. "$ref": "#/components/schemas/LogLevel"
  17733. },
  17734. "server": {
  17735. "$ref": "#/components/schemas/ServerConfig"
  17736. },
  17737. "command": {
  17738. "type": "object",
  17739. "additionalProperties": {
  17740. "type": "object",
  17741. "properties": {
  17742. "template": {
  17743. "type": "string"
  17744. },
  17745. "description": {
  17746. "type": "string"
  17747. },
  17748. "agent": {
  17749. "type": "string"
  17750. },
  17751. "model": {
  17752. "type": "string"
  17753. },
  17754. "variant": {
  17755. "type": "string"
  17756. },
  17757. "subtask": {
  17758. "type": "boolean"
  17759. }
  17760. },
  17761. "required": ["template"],
  17762. "additionalProperties": false
  17763. }
  17764. },
  17765. "skills": {
  17766. "type": "object",
  17767. "properties": {
  17768. "paths": {
  17769. "type": "array",
  17770. "items": {
  17771. "type": "string"
  17772. }
  17773. },
  17774. "urls": {
  17775. "type": "array",
  17776. "items": {
  17777. "type": "string"
  17778. }
  17779. }
  17780. },
  17781. "additionalProperties": false
  17782. },
  17783. "reference": {
  17784. "$ref": "#/components/schemas/ReferenceConfig"
  17785. },
  17786. "watcher": {
  17787. "type": "object",
  17788. "properties": {
  17789. "ignore": {
  17790. "type": "array",
  17791. "items": {
  17792. "type": "string"
  17793. }
  17794. }
  17795. },
  17796. "additionalProperties": false
  17797. },
  17798. "snapshot": {
  17799. "type": "boolean"
  17800. },
  17801. "plugin": {
  17802. "type": "array",
  17803. "items": {
  17804. "anyOf": [
  17805. {
  17806. "type": "string"
  17807. },
  17808. {
  17809. "type": "array",
  17810. "prefixItems": [
  17811. {
  17812. "type": "string"
  17813. },
  17814. {
  17815. "type": "object"
  17816. }
  17817. ],
  17818. "maxItems": 2,
  17819. "minItems": 2
  17820. }
  17821. ]
  17822. }
  17823. },
  17824. "share": {
  17825. "type": "string",
  17826. "enum": ["manual", "auto", "disabled"]
  17827. },
  17828. "autoshare": {
  17829. "type": "boolean"
  17830. },
  17831. "autoupdate": {
  17832. "anyOf": [
  17833. {
  17834. "type": "boolean"
  17835. },
  17836. {
  17837. "type": "string",
  17838. "enum": ["notify"]
  17839. }
  17840. ],
  17841. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  17842. },
  17843. "disabled_providers": {
  17844. "type": "array",
  17845. "items": {
  17846. "type": "string"
  17847. }
  17848. },
  17849. "enabled_providers": {
  17850. "type": "array",
  17851. "items": {
  17852. "type": "string"
  17853. }
  17854. },
  17855. "model": {
  17856. "type": "string"
  17857. },
  17858. "small_model": {
  17859. "type": "string"
  17860. },
  17861. "default_agent": {
  17862. "type": "string"
  17863. },
  17864. "username": {
  17865. "type": "string"
  17866. },
  17867. "mode": {
  17868. "type": "object",
  17869. "properties": {
  17870. "build": {
  17871. "$ref": "#/components/schemas/AgentConfig"
  17872. },
  17873. "plan": {
  17874. "$ref": "#/components/schemas/AgentConfig"
  17875. }
  17876. },
  17877. "additionalProperties": {
  17878. "$ref": "#/components/schemas/AgentConfig"
  17879. }
  17880. },
  17881. "agent": {
  17882. "type": "object",
  17883. "properties": {
  17884. "plan": {
  17885. "$ref": "#/components/schemas/AgentConfig"
  17886. },
  17887. "build": {
  17888. "$ref": "#/components/schemas/AgentConfig"
  17889. },
  17890. "general": {
  17891. "$ref": "#/components/schemas/AgentConfig"
  17892. },
  17893. "explore": {
  17894. "$ref": "#/components/schemas/AgentConfig"
  17895. },
  17896. "title": {
  17897. "$ref": "#/components/schemas/AgentConfig"
  17898. },
  17899. "summary": {
  17900. "$ref": "#/components/schemas/AgentConfig"
  17901. },
  17902. "compaction": {
  17903. "$ref": "#/components/schemas/AgentConfig"
  17904. }
  17905. },
  17906. "additionalProperties": {
  17907. "$ref": "#/components/schemas/AgentConfig"
  17908. }
  17909. },
  17910. "provider": {
  17911. "type": "object",
  17912. "additionalProperties": {
  17913. "$ref": "#/components/schemas/ProviderConfig"
  17914. }
  17915. },
  17916. "mcp": {
  17917. "type": "object",
  17918. "additionalProperties": {
  17919. "anyOf": [
  17920. {
  17921. "$ref": "#/components/schemas/McpLocalConfig"
  17922. },
  17923. {
  17924. "$ref": "#/components/schemas/McpRemoteConfig"
  17925. },
  17926. {
  17927. "type": "object",
  17928. "properties": {
  17929. "enabled": {
  17930. "type": "boolean"
  17931. }
  17932. },
  17933. "required": ["enabled"],
  17934. "additionalProperties": false
  17935. }
  17936. ]
  17937. }
  17938. },
  17939. "formatter": {
  17940. "anyOf": [
  17941. {
  17942. "type": "boolean"
  17943. },
  17944. {
  17945. "type": "object",
  17946. "additionalProperties": {
  17947. "type": "object",
  17948. "properties": {
  17949. "disabled": {
  17950. "type": "boolean"
  17951. },
  17952. "command": {
  17953. "type": "array",
  17954. "items": {
  17955. "type": "string"
  17956. }
  17957. },
  17958. "environment": {
  17959. "type": "object",
  17960. "additionalProperties": {
  17961. "type": "string"
  17962. }
  17963. },
  17964. "extensions": {
  17965. "type": "array",
  17966. "items": {
  17967. "type": "string"
  17968. }
  17969. }
  17970. },
  17971. "additionalProperties": false
  17972. }
  17973. }
  17974. ],
  17975. "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."
  17976. },
  17977. "lsp": {
  17978. "anyOf": [
  17979. {
  17980. "type": "boolean"
  17981. },
  17982. {
  17983. "type": "object",
  17984. "additionalProperties": {
  17985. "anyOf": [
  17986. {
  17987. "type": "object",
  17988. "properties": {
  17989. "disabled": {
  17990. "type": "boolean",
  17991. "enum": [true]
  17992. }
  17993. },
  17994. "required": ["disabled"],
  17995. "additionalProperties": false
  17996. },
  17997. {
  17998. "type": "object",
  17999. "properties": {
  18000. "command": {
  18001. "type": "array",
  18002. "items": {
  18003. "type": "string"
  18004. }
  18005. },
  18006. "extensions": {
  18007. "type": "array",
  18008. "items": {
  18009. "type": "string"
  18010. }
  18011. },
  18012. "disabled": {
  18013. "type": "boolean"
  18014. },
  18015. "env": {
  18016. "type": "object",
  18017. "additionalProperties": {
  18018. "type": "string"
  18019. }
  18020. },
  18021. "initialization": {
  18022. "type": "object"
  18023. }
  18024. },
  18025. "required": ["command"],
  18026. "additionalProperties": false
  18027. }
  18028. ]
  18029. }
  18030. }
  18031. ],
  18032. "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."
  18033. },
  18034. "instructions": {
  18035. "type": "array",
  18036. "items": {
  18037. "type": "string"
  18038. }
  18039. },
  18040. "layout": {
  18041. "$ref": "#/components/schemas/LayoutConfig"
  18042. },
  18043. "permission": {
  18044. "$ref": "#/components/schemas/PermissionConfig"
  18045. },
  18046. "tools": {
  18047. "type": "object",
  18048. "additionalProperties": {
  18049. "type": "boolean"
  18050. }
  18051. },
  18052. "attachment": {
  18053. "$ref": "#/components/schemas/AttachmentConfig"
  18054. },
  18055. "enterprise": {
  18056. "type": "object",
  18057. "properties": {
  18058. "url": {
  18059. "type": "string"
  18060. }
  18061. },
  18062. "additionalProperties": false
  18063. },
  18064. "tool_output": {
  18065. "type": "object",
  18066. "properties": {
  18067. "max_lines": {
  18068. "type": "integer",
  18069. "exclusiveMinimum": 0
  18070. },
  18071. "max_bytes": {
  18072. "type": "integer",
  18073. "exclusiveMinimum": 0
  18074. }
  18075. },
  18076. "additionalProperties": false
  18077. },
  18078. "compaction": {
  18079. "type": "object",
  18080. "properties": {
  18081. "auto": {
  18082. "type": "boolean"
  18083. },
  18084. "prune": {
  18085. "type": "boolean"
  18086. },
  18087. "tail_turns": {
  18088. "type": "integer",
  18089. "minimum": 0
  18090. },
  18091. "preserve_recent_tokens": {
  18092. "type": "integer",
  18093. "minimum": 0
  18094. },
  18095. "reserved": {
  18096. "type": "integer",
  18097. "minimum": 0
  18098. }
  18099. },
  18100. "additionalProperties": false
  18101. },
  18102. "experimental": {
  18103. "type": "object",
  18104. "properties": {
  18105. "disable_paste_summary": {
  18106. "type": "boolean"
  18107. },
  18108. "batch_tool": {
  18109. "type": "boolean"
  18110. },
  18111. "openTelemetry": {
  18112. "type": "boolean"
  18113. },
  18114. "primary_tools": {
  18115. "type": "array",
  18116. "items": {
  18117. "type": "string"
  18118. }
  18119. },
  18120. "continue_loop_on_deny": {
  18121. "type": "boolean"
  18122. },
  18123. "mcp_timeout": {
  18124. "type": "integer",
  18125. "exclusiveMinimum": 0
  18126. },
  18127. "policies": {
  18128. "type": "array",
  18129. "items": {
  18130. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  18131. }
  18132. }
  18133. },
  18134. "additionalProperties": false
  18135. }
  18136. },
  18137. "additionalProperties": false
  18138. },
  18139. "Model": {
  18140. "type": "object",
  18141. "properties": {
  18142. "id": {
  18143. "type": "string"
  18144. },
  18145. "providerID": {
  18146. "type": "string"
  18147. },
  18148. "api": {
  18149. "type": "object",
  18150. "properties": {
  18151. "id": {
  18152. "type": "string"
  18153. },
  18154. "url": {
  18155. "type": "string"
  18156. },
  18157. "npm": {
  18158. "type": "string"
  18159. }
  18160. },
  18161. "required": ["id", "url", "npm"],
  18162. "additionalProperties": false
  18163. },
  18164. "name": {
  18165. "type": "string"
  18166. },
  18167. "family": {
  18168. "type": "string"
  18169. },
  18170. "capabilities": {
  18171. "type": "object",
  18172. "properties": {
  18173. "temperature": {
  18174. "type": "boolean"
  18175. },
  18176. "reasoning": {
  18177. "type": "boolean"
  18178. },
  18179. "attachment": {
  18180. "type": "boolean"
  18181. },
  18182. "toolcall": {
  18183. "type": "boolean"
  18184. },
  18185. "input": {
  18186. "type": "object",
  18187. "properties": {
  18188. "text": {
  18189. "type": "boolean"
  18190. },
  18191. "audio": {
  18192. "type": "boolean"
  18193. },
  18194. "image": {
  18195. "type": "boolean"
  18196. },
  18197. "video": {
  18198. "type": "boolean"
  18199. },
  18200. "pdf": {
  18201. "type": "boolean"
  18202. }
  18203. },
  18204. "required": ["text", "audio", "image", "video", "pdf"],
  18205. "additionalProperties": false
  18206. },
  18207. "output": {
  18208. "type": "object",
  18209. "properties": {
  18210. "text": {
  18211. "type": "boolean"
  18212. },
  18213. "audio": {
  18214. "type": "boolean"
  18215. },
  18216. "image": {
  18217. "type": "boolean"
  18218. },
  18219. "video": {
  18220. "type": "boolean"
  18221. },
  18222. "pdf": {
  18223. "type": "boolean"
  18224. }
  18225. },
  18226. "required": ["text", "audio", "image", "video", "pdf"],
  18227. "additionalProperties": false
  18228. },
  18229. "interleaved": {
  18230. "anyOf": [
  18231. {
  18232. "type": "boolean"
  18233. },
  18234. {
  18235. "type": "object",
  18236. "properties": {
  18237. "field": {
  18238. "type": "string",
  18239. "enum": ["reasoning_content", "reasoning_details"]
  18240. }
  18241. },
  18242. "required": ["field"],
  18243. "additionalProperties": false
  18244. }
  18245. ]
  18246. }
  18247. },
  18248. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  18249. "additionalProperties": false
  18250. },
  18251. "cost": {
  18252. "type": "object",
  18253. "properties": {
  18254. "input": {
  18255. "type": "number"
  18256. },
  18257. "output": {
  18258. "type": "number"
  18259. },
  18260. "cache": {
  18261. "type": "object",
  18262. "properties": {
  18263. "read": {
  18264. "type": "number"
  18265. },
  18266. "write": {
  18267. "type": "number"
  18268. }
  18269. },
  18270. "required": ["read", "write"],
  18271. "additionalProperties": false
  18272. },
  18273. "tiers": {
  18274. "type": "array",
  18275. "items": {
  18276. "type": "object",
  18277. "properties": {
  18278. "input": {
  18279. "type": "number"
  18280. },
  18281. "output": {
  18282. "type": "number"
  18283. },
  18284. "cache": {
  18285. "type": "object",
  18286. "properties": {
  18287. "read": {
  18288. "type": "number"
  18289. },
  18290. "write": {
  18291. "type": "number"
  18292. }
  18293. },
  18294. "required": ["read", "write"],
  18295. "additionalProperties": false
  18296. },
  18297. "tier": {
  18298. "type": "object",
  18299. "properties": {
  18300. "type": {
  18301. "type": "string",
  18302. "enum": ["context"]
  18303. },
  18304. "size": {
  18305. "type": "number"
  18306. }
  18307. },
  18308. "required": ["type", "size"],
  18309. "additionalProperties": false
  18310. }
  18311. },
  18312. "required": ["input", "output", "cache", "tier"],
  18313. "additionalProperties": false
  18314. }
  18315. },
  18316. "experimentalOver200K": {
  18317. "type": "object",
  18318. "properties": {
  18319. "input": {
  18320. "type": "number"
  18321. },
  18322. "output": {
  18323. "type": "number"
  18324. },
  18325. "cache": {
  18326. "type": "object",
  18327. "properties": {
  18328. "read": {
  18329. "type": "number"
  18330. },
  18331. "write": {
  18332. "type": "number"
  18333. }
  18334. },
  18335. "required": ["read", "write"],
  18336. "additionalProperties": false
  18337. }
  18338. },
  18339. "required": ["input", "output", "cache"],
  18340. "additionalProperties": false
  18341. }
  18342. },
  18343. "required": ["input", "output", "cache"],
  18344. "additionalProperties": false
  18345. },
  18346. "limit": {
  18347. "type": "object",
  18348. "properties": {
  18349. "context": {
  18350. "type": "number"
  18351. },
  18352. "input": {
  18353. "type": "number"
  18354. },
  18355. "output": {
  18356. "type": "number"
  18357. }
  18358. },
  18359. "required": ["context", "output"],
  18360. "additionalProperties": false
  18361. },
  18362. "status": {
  18363. "type": "string",
  18364. "enum": ["alpha", "beta", "deprecated", "active"]
  18365. },
  18366. "options": {
  18367. "type": "object"
  18368. },
  18369. "headers": {
  18370. "type": "object",
  18371. "additionalProperties": {
  18372. "type": "string"
  18373. }
  18374. },
  18375. "release_date": {
  18376. "type": "string"
  18377. },
  18378. "variants": {
  18379. "type": "object",
  18380. "additionalProperties": {
  18381. "type": "object"
  18382. }
  18383. }
  18384. },
  18385. "required": [
  18386. "id",
  18387. "providerID",
  18388. "api",
  18389. "name",
  18390. "capabilities",
  18391. "cost",
  18392. "limit",
  18393. "status",
  18394. "options",
  18395. "headers",
  18396. "release_date"
  18397. ],
  18398. "additionalProperties": false
  18399. },
  18400. "Provider": {
  18401. "type": "object",
  18402. "properties": {
  18403. "id": {
  18404. "type": "string"
  18405. },
  18406. "name": {
  18407. "type": "string"
  18408. },
  18409. "source": {
  18410. "type": "string",
  18411. "enum": ["env", "config", "custom", "api"]
  18412. },
  18413. "env": {
  18414. "type": "array",
  18415. "items": {
  18416. "type": "string"
  18417. }
  18418. },
  18419. "key": {
  18420. "type": "string"
  18421. },
  18422. "options": {
  18423. "type": "object"
  18424. },
  18425. "models": {
  18426. "type": "object",
  18427. "additionalProperties": {
  18428. "$ref": "#/components/schemas/Model"
  18429. }
  18430. }
  18431. },
  18432. "required": ["id", "name", "source", "env", "options", "models"],
  18433. "additionalProperties": false
  18434. },
  18435. "ConsoleState": {
  18436. "type": "object",
  18437. "properties": {
  18438. "consoleManagedProviders": {
  18439. "type": "array",
  18440. "items": {
  18441. "type": "string"
  18442. }
  18443. },
  18444. "activeOrgName": {
  18445. "type": "string"
  18446. },
  18447. "switchableOrgCount": {
  18448. "type": "integer",
  18449. "minimum": 0
  18450. }
  18451. },
  18452. "required": ["consoleManagedProviders", "switchableOrgCount"],
  18453. "additionalProperties": false
  18454. },
  18455. "effect_HttpApiError_InternalServerError": {
  18456. "type": "object",
  18457. "properties": {
  18458. "_tag": {
  18459. "type": "string",
  18460. "enum": ["InternalServerError"]
  18461. }
  18462. },
  18463. "required": ["_tag"],
  18464. "additionalProperties": false
  18465. },
  18466. "ToolListItem": {
  18467. "type": "object",
  18468. "properties": {
  18469. "id": {
  18470. "type": "string"
  18471. },
  18472. "description": {
  18473. "type": "string"
  18474. },
  18475. "parameters": {}
  18476. },
  18477. "required": ["id", "description", "parameters"],
  18478. "additionalProperties": false
  18479. },
  18480. "ToolList": {
  18481. "type": "array",
  18482. "items": {
  18483. "$ref": "#/components/schemas/ToolListItem"
  18484. }
  18485. },
  18486. "ToolIDs": {
  18487. "type": "array",
  18488. "items": {
  18489. "type": "string"
  18490. }
  18491. },
  18492. "WorktreeError": {
  18493. "type": "object",
  18494. "properties": {
  18495. "name": {
  18496. "type": "string",
  18497. "enum": [
  18498. "WorktreeNotGitError",
  18499. "WorktreeNameGenerationFailedError",
  18500. "WorktreeCreateFailedError",
  18501. "WorktreeStartCommandFailedError",
  18502. "WorktreeRemoveFailedError",
  18503. "WorktreeResetFailedError",
  18504. "WorktreeListFailedError"
  18505. ]
  18506. },
  18507. "data": {
  18508. "type": "object",
  18509. "properties": {
  18510. "message": {
  18511. "type": "string"
  18512. }
  18513. },
  18514. "required": ["message"],
  18515. "additionalProperties": false
  18516. }
  18517. },
  18518. "required": ["name", "data"],
  18519. "additionalProperties": false
  18520. },
  18521. "WorktreeCreateInput": {
  18522. "type": "object",
  18523. "properties": {
  18524. "name": {
  18525. "type": "string"
  18526. },
  18527. "startCommand": {
  18528. "type": "string",
  18529. "description": "Additional startup script to run after the project's start command"
  18530. }
  18531. },
  18532. "additionalProperties": false
  18533. },
  18534. "Worktree": {
  18535. "type": "object",
  18536. "properties": {
  18537. "name": {
  18538. "type": "string"
  18539. },
  18540. "branch": {
  18541. "type": "string"
  18542. },
  18543. "directory": {
  18544. "type": "string"
  18545. }
  18546. },
  18547. "required": ["name", "directory"],
  18548. "additionalProperties": false
  18549. },
  18550. "WorktreeRemoveInput": {
  18551. "type": "object",
  18552. "properties": {
  18553. "directory": {
  18554. "type": "string"
  18555. }
  18556. },
  18557. "required": ["directory"],
  18558. "additionalProperties": false
  18559. },
  18560. "WorktreeResetInput": {
  18561. "type": "object",
  18562. "properties": {
  18563. "directory": {
  18564. "type": "string"
  18565. }
  18566. },
  18567. "required": ["directory"],
  18568. "additionalProperties": false
  18569. },
  18570. "ProjectSummary": {
  18571. "type": "object",
  18572. "properties": {
  18573. "id": {
  18574. "type": "string"
  18575. },
  18576. "name": {
  18577. "type": "string"
  18578. },
  18579. "worktree": {
  18580. "type": "string"
  18581. }
  18582. },
  18583. "required": ["id", "worktree"],
  18584. "additionalProperties": false
  18585. },
  18586. "GlobalSession": {
  18587. "type": "object",
  18588. "properties": {
  18589. "id": {
  18590. "type": "string",
  18591. "pattern": "^ses"
  18592. },
  18593. "slug": {
  18594. "type": "string"
  18595. },
  18596. "projectID": {
  18597. "type": "string"
  18598. },
  18599. "workspaceID": {
  18600. "type": "string",
  18601. "pattern": "^wrk"
  18602. },
  18603. "directory": {
  18604. "type": "string"
  18605. },
  18606. "path": {
  18607. "type": "string"
  18608. },
  18609. "parentID": {
  18610. "type": "string",
  18611. "pattern": "^ses"
  18612. },
  18613. "summary": {
  18614. "type": "object",
  18615. "properties": {
  18616. "additions": {
  18617. "type": "number"
  18618. },
  18619. "deletions": {
  18620. "type": "number"
  18621. },
  18622. "files": {
  18623. "type": "number"
  18624. },
  18625. "diffs": {
  18626. "type": "array",
  18627. "items": {
  18628. "$ref": "#/components/schemas/SnapshotFileDiff"
  18629. }
  18630. }
  18631. },
  18632. "required": ["additions", "deletions", "files"],
  18633. "additionalProperties": false
  18634. },
  18635. "cost": {
  18636. "type": "number"
  18637. },
  18638. "tokens": {
  18639. "type": "object",
  18640. "properties": {
  18641. "input": {
  18642. "type": "number"
  18643. },
  18644. "output": {
  18645. "type": "number"
  18646. },
  18647. "reasoning": {
  18648. "type": "number"
  18649. },
  18650. "cache": {
  18651. "type": "object",
  18652. "properties": {
  18653. "read": {
  18654. "type": "number"
  18655. },
  18656. "write": {
  18657. "type": "number"
  18658. }
  18659. },
  18660. "required": ["read", "write"],
  18661. "additionalProperties": false
  18662. }
  18663. },
  18664. "required": ["input", "output", "reasoning", "cache"],
  18665. "additionalProperties": false
  18666. },
  18667. "share": {
  18668. "type": "object",
  18669. "properties": {
  18670. "url": {
  18671. "type": "string"
  18672. }
  18673. },
  18674. "required": ["url"],
  18675. "additionalProperties": false
  18676. },
  18677. "title": {
  18678. "type": "string"
  18679. },
  18680. "agent": {
  18681. "type": "string"
  18682. },
  18683. "model": {
  18684. "type": "object",
  18685. "properties": {
  18686. "id": {
  18687. "type": "string"
  18688. },
  18689. "providerID": {
  18690. "type": "string"
  18691. },
  18692. "variant": {
  18693. "type": "string"
  18694. }
  18695. },
  18696. "required": ["id", "providerID"],
  18697. "additionalProperties": false
  18698. },
  18699. "version": {
  18700. "type": "string"
  18701. },
  18702. "metadata": {
  18703. "type": "object"
  18704. },
  18705. "time": {
  18706. "type": "object",
  18707. "properties": {
  18708. "created": {
  18709. "type": "integer",
  18710. "minimum": 0
  18711. },
  18712. "updated": {
  18713. "type": "integer",
  18714. "minimum": 0
  18715. },
  18716. "compacting": {
  18717. "type": "integer",
  18718. "minimum": 0
  18719. },
  18720. "archived": {
  18721. "type": "number"
  18722. }
  18723. },
  18724. "required": ["created", "updated"],
  18725. "additionalProperties": false
  18726. },
  18727. "permission": {
  18728. "$ref": "#/components/schemas/PermissionRuleset"
  18729. },
  18730. "revert": {
  18731. "type": "object",
  18732. "properties": {
  18733. "messageID": {
  18734. "type": "string",
  18735. "pattern": "^msg"
  18736. },
  18737. "partID": {
  18738. "type": "string",
  18739. "pattern": "^prt"
  18740. },
  18741. "snapshot": {
  18742. "type": "string"
  18743. },
  18744. "diff": {
  18745. "type": "string"
  18746. }
  18747. },
  18748. "required": ["messageID"],
  18749. "additionalProperties": false
  18750. },
  18751. "project": {
  18752. "anyOf": [
  18753. {
  18754. "$ref": "#/components/schemas/ProjectSummary"
  18755. },
  18756. {
  18757. "type": "null"
  18758. }
  18759. ]
  18760. }
  18761. },
  18762. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  18763. "additionalProperties": false
  18764. },
  18765. "McpResource": {
  18766. "type": "object",
  18767. "properties": {
  18768. "name": {
  18769. "type": "string"
  18770. },
  18771. "uri": {
  18772. "type": "string"
  18773. },
  18774. "description": {
  18775. "type": "string"
  18776. },
  18777. "mimeType": {
  18778. "type": "string"
  18779. },
  18780. "client": {
  18781. "type": "string"
  18782. }
  18783. },
  18784. "required": ["name", "uri", "client"],
  18785. "additionalProperties": false
  18786. },
  18787. "Symbol": {
  18788. "type": "object",
  18789. "properties": {
  18790. "name": {
  18791. "type": "string"
  18792. },
  18793. "kind": {
  18794. "type": "integer",
  18795. "minimum": 0
  18796. },
  18797. "location": {
  18798. "type": "object",
  18799. "properties": {
  18800. "uri": {
  18801. "type": "string"
  18802. },
  18803. "range": {
  18804. "$ref": "#/components/schemas/Range"
  18805. }
  18806. },
  18807. "required": ["uri", "range"],
  18808. "additionalProperties": false
  18809. }
  18810. },
  18811. "required": ["name", "kind", "location"],
  18812. "additionalProperties": false
  18813. },
  18814. "FileNode": {
  18815. "type": "object",
  18816. "properties": {
  18817. "name": {
  18818. "type": "string"
  18819. },
  18820. "path": {
  18821. "type": "string"
  18822. },
  18823. "absolute": {
  18824. "type": "string"
  18825. },
  18826. "type": {
  18827. "type": "string",
  18828. "enum": ["file", "directory"]
  18829. },
  18830. "ignored": {
  18831. "type": "boolean"
  18832. }
  18833. },
  18834. "required": ["name", "path", "absolute", "type", "ignored"],
  18835. "additionalProperties": false
  18836. },
  18837. "FileContent": {
  18838. "type": "object",
  18839. "properties": {
  18840. "type": {
  18841. "type": "string",
  18842. "enum": ["text", "binary"]
  18843. },
  18844. "content": {
  18845. "type": "string"
  18846. },
  18847. "diff": {
  18848. "type": "string"
  18849. },
  18850. "patch": {
  18851. "type": "object",
  18852. "properties": {
  18853. "oldFileName": {
  18854. "type": "string"
  18855. },
  18856. "newFileName": {
  18857. "type": "string"
  18858. },
  18859. "oldHeader": {
  18860. "type": "string"
  18861. },
  18862. "newHeader": {
  18863. "type": "string"
  18864. },
  18865. "hunks": {
  18866. "type": "array",
  18867. "items": {
  18868. "type": "object",
  18869. "properties": {
  18870. "oldStart": {
  18871. "type": "integer",
  18872. "minimum": 0
  18873. },
  18874. "oldLines": {
  18875. "type": "integer",
  18876. "minimum": 0
  18877. },
  18878. "newStart": {
  18879. "type": "integer",
  18880. "minimum": 0
  18881. },
  18882. "newLines": {
  18883. "type": "integer",
  18884. "minimum": 0
  18885. },
  18886. "lines": {
  18887. "type": "array",
  18888. "items": {
  18889. "type": "string"
  18890. }
  18891. }
  18892. },
  18893. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  18894. "additionalProperties": false
  18895. }
  18896. },
  18897. "index": {
  18898. "type": "string"
  18899. }
  18900. },
  18901. "required": ["oldFileName", "newFileName", "hunks"],
  18902. "additionalProperties": false
  18903. },
  18904. "encoding": {
  18905. "type": "string",
  18906. "enum": ["base64"]
  18907. },
  18908. "mimeType": {
  18909. "type": "string"
  18910. }
  18911. },
  18912. "required": ["type", "content"],
  18913. "additionalProperties": false
  18914. },
  18915. "File": {
  18916. "type": "object",
  18917. "properties": {
  18918. "path": {
  18919. "type": "string"
  18920. },
  18921. "added": {
  18922. "type": "integer",
  18923. "minimum": 0
  18924. },
  18925. "removed": {
  18926. "type": "integer",
  18927. "minimum": 0
  18928. },
  18929. "status": {
  18930. "type": "string",
  18931. "enum": ["added", "deleted", "modified"]
  18932. }
  18933. },
  18934. "required": ["path", "added", "removed", "status"],
  18935. "additionalProperties": false
  18936. },
  18937. "Path": {
  18938. "type": "object",
  18939. "properties": {
  18940. "home": {
  18941. "type": "string"
  18942. },
  18943. "state": {
  18944. "type": "string"
  18945. },
  18946. "config": {
  18947. "type": "string"
  18948. },
  18949. "worktree": {
  18950. "type": "string"
  18951. },
  18952. "directory": {
  18953. "type": "string"
  18954. }
  18955. },
  18956. "required": ["home", "state", "config", "worktree", "directory"],
  18957. "additionalProperties": false
  18958. },
  18959. "VcsInfo": {
  18960. "type": "object",
  18961. "properties": {
  18962. "branch": {
  18963. "type": "string"
  18964. },
  18965. "default_branch": {
  18966. "type": "string"
  18967. }
  18968. },
  18969. "additionalProperties": false
  18970. },
  18971. "VcsFileStatus": {
  18972. "type": "object",
  18973. "properties": {
  18974. "file": {
  18975. "type": "string"
  18976. },
  18977. "additions": {
  18978. "type": "number"
  18979. },
  18980. "deletions": {
  18981. "type": "number"
  18982. },
  18983. "status": {
  18984. "type": "string",
  18985. "enum": ["added", "deleted", "modified"]
  18986. }
  18987. },
  18988. "required": ["file", "additions", "deletions", "status"],
  18989. "additionalProperties": false
  18990. },
  18991. "VcsFileDiff": {
  18992. "type": "object",
  18993. "properties": {
  18994. "file": {
  18995. "type": "string"
  18996. },
  18997. "patch": {
  18998. "type": "string"
  18999. },
  19000. "additions": {
  19001. "type": "number"
  19002. },
  19003. "deletions": {
  19004. "type": "number"
  19005. },
  19006. "status": {
  19007. "type": "string",
  19008. "enum": ["added", "deleted", "modified"]
  19009. }
  19010. },
  19011. "required": ["file", "additions", "deletions"],
  19012. "additionalProperties": false
  19013. },
  19014. "VcsApplyError": {
  19015. "type": "object",
  19016. "properties": {
  19017. "name": {
  19018. "type": "string",
  19019. "enum": ["VcsApplyError"]
  19020. },
  19021. "data": {
  19022. "type": "object",
  19023. "properties": {
  19024. "message": {
  19025. "type": "string"
  19026. },
  19027. "reason": {
  19028. "type": "string",
  19029. "enum": ["non-git", "not-clean"]
  19030. }
  19031. },
  19032. "required": ["message", "reason"],
  19033. "additionalProperties": false
  19034. }
  19035. },
  19036. "required": ["name", "data"],
  19037. "additionalProperties": false
  19038. },
  19039. "Command": {
  19040. "type": "object",
  19041. "properties": {
  19042. "name": {
  19043. "type": "string"
  19044. },
  19045. "description": {
  19046. "type": "string"
  19047. },
  19048. "agent": {
  19049. "type": "string"
  19050. },
  19051. "model": {
  19052. "type": "string"
  19053. },
  19054. "source": {
  19055. "type": "string",
  19056. "enum": ["command", "mcp", "skill"]
  19057. },
  19058. "template": {
  19059. "type": "string"
  19060. },
  19061. "subtask": {
  19062. "type": "boolean"
  19063. },
  19064. "hints": {
  19065. "type": "array",
  19066. "items": {
  19067. "type": "string"
  19068. }
  19069. }
  19070. },
  19071. "required": ["name", "template", "hints"],
  19072. "additionalProperties": false
  19073. },
  19074. "Agent": {
  19075. "type": "object",
  19076. "properties": {
  19077. "name": {
  19078. "type": "string"
  19079. },
  19080. "description": {
  19081. "type": "string"
  19082. },
  19083. "mode": {
  19084. "type": "string",
  19085. "enum": ["subagent", "primary", "all"]
  19086. },
  19087. "native": {
  19088. "type": "boolean"
  19089. },
  19090. "hidden": {
  19091. "type": "boolean"
  19092. },
  19093. "topP": {
  19094. "type": "number"
  19095. },
  19096. "temperature": {
  19097. "type": "number"
  19098. },
  19099. "color": {
  19100. "type": "string"
  19101. },
  19102. "permission": {
  19103. "$ref": "#/components/schemas/PermissionRuleset"
  19104. },
  19105. "model": {
  19106. "type": "object",
  19107. "properties": {
  19108. "modelID": {
  19109. "type": "string"
  19110. },
  19111. "providerID": {
  19112. "type": "string"
  19113. }
  19114. },
  19115. "required": ["modelID", "providerID"],
  19116. "additionalProperties": false
  19117. },
  19118. "variant": {
  19119. "type": "string"
  19120. },
  19121. "prompt": {
  19122. "type": "string"
  19123. },
  19124. "options": {
  19125. "type": "object"
  19126. },
  19127. "steps": {
  19128. "type": "number"
  19129. }
  19130. },
  19131. "required": ["name", "mode", "permission", "options"],
  19132. "additionalProperties": false
  19133. },
  19134. "LSPStatus": {
  19135. "type": "object",
  19136. "properties": {
  19137. "id": {
  19138. "type": "string"
  19139. },
  19140. "name": {
  19141. "type": "string"
  19142. },
  19143. "root": {
  19144. "type": "string"
  19145. },
  19146. "status": {
  19147. "type": "string",
  19148. "enum": ["connected", "error"]
  19149. }
  19150. },
  19151. "required": ["id", "name", "root", "status"],
  19152. "additionalProperties": false
  19153. },
  19154. "FormatterStatus": {
  19155. "type": "object",
  19156. "properties": {
  19157. "name": {
  19158. "type": "string"
  19159. },
  19160. "extensions": {
  19161. "type": "array",
  19162. "items": {
  19163. "type": "string"
  19164. }
  19165. },
  19166. "enabled": {
  19167. "type": "boolean"
  19168. }
  19169. },
  19170. "required": ["name", "extensions", "enabled"],
  19171. "additionalProperties": false
  19172. },
  19173. "MCPStatusConnected": {
  19174. "type": "object",
  19175. "properties": {
  19176. "status": {
  19177. "type": "string",
  19178. "enum": ["connected"]
  19179. }
  19180. },
  19181. "required": ["status"],
  19182. "additionalProperties": false
  19183. },
  19184. "MCPStatusDisabled": {
  19185. "type": "object",
  19186. "properties": {
  19187. "status": {
  19188. "type": "string",
  19189. "enum": ["disabled"]
  19190. }
  19191. },
  19192. "required": ["status"],
  19193. "additionalProperties": false
  19194. },
  19195. "MCPStatusFailed": {
  19196. "type": "object",
  19197. "properties": {
  19198. "status": {
  19199. "type": "string",
  19200. "enum": ["failed"]
  19201. },
  19202. "error": {
  19203. "type": "string"
  19204. }
  19205. },
  19206. "required": ["status", "error"],
  19207. "additionalProperties": false
  19208. },
  19209. "MCPStatusNeedsAuth": {
  19210. "type": "object",
  19211. "properties": {
  19212. "status": {
  19213. "type": "string",
  19214. "enum": ["needs_auth"]
  19215. }
  19216. },
  19217. "required": ["status"],
  19218. "additionalProperties": false
  19219. },
  19220. "MCPStatusNeedsClientRegistration": {
  19221. "type": "object",
  19222. "properties": {
  19223. "status": {
  19224. "type": "string",
  19225. "enum": ["needs_client_registration"]
  19226. },
  19227. "error": {
  19228. "type": "string"
  19229. }
  19230. },
  19231. "required": ["status", "error"],
  19232. "additionalProperties": false
  19233. },
  19234. "MCPStatus": {
  19235. "anyOf": [
  19236. {
  19237. "$ref": "#/components/schemas/MCPStatusConnected"
  19238. },
  19239. {
  19240. "$ref": "#/components/schemas/MCPStatusDisabled"
  19241. },
  19242. {
  19243. "$ref": "#/components/schemas/MCPStatusFailed"
  19244. },
  19245. {
  19246. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  19247. },
  19248. {
  19249. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  19250. }
  19251. ]
  19252. },
  19253. "McpUnsupportedOAuthError": {
  19254. "type": "object",
  19255. "properties": {
  19256. "error": {
  19257. "type": "string"
  19258. }
  19259. },
  19260. "required": ["error"],
  19261. "additionalProperties": false
  19262. },
  19263. "McpServerNotFoundError": {
  19264. "type": "object",
  19265. "properties": {
  19266. "_tag": {
  19267. "type": "string",
  19268. "enum": ["McpServerNotFoundError"]
  19269. },
  19270. "name": {
  19271. "type": "string"
  19272. },
  19273. "message": {
  19274. "type": "string"
  19275. }
  19276. },
  19277. "required": ["_tag", "name", "message"],
  19278. "additionalProperties": false
  19279. },
  19280. "Project": {
  19281. "type": "object",
  19282. "properties": {
  19283. "id": {
  19284. "type": "string"
  19285. },
  19286. "worktree": {
  19287. "type": "string"
  19288. },
  19289. "vcs": {
  19290. "type": "string",
  19291. "enum": ["git"]
  19292. },
  19293. "name": {
  19294. "type": "string"
  19295. },
  19296. "icon": {
  19297. "type": "object",
  19298. "properties": {
  19299. "url": {
  19300. "type": "string"
  19301. },
  19302. "override": {
  19303. "type": "string"
  19304. },
  19305. "color": {
  19306. "type": "string"
  19307. }
  19308. },
  19309. "additionalProperties": false
  19310. },
  19311. "commands": {
  19312. "type": "object",
  19313. "properties": {
  19314. "start": {
  19315. "type": "string",
  19316. "description": "Startup script to run when creating a new workspace (worktree)"
  19317. }
  19318. },
  19319. "additionalProperties": false
  19320. },
  19321. "time": {
  19322. "type": "object",
  19323. "properties": {
  19324. "created": {
  19325. "type": "integer",
  19326. "minimum": 0
  19327. },
  19328. "updated": {
  19329. "type": "integer",
  19330. "minimum": 0
  19331. },
  19332. "initialized": {
  19333. "type": "integer",
  19334. "minimum": 0
  19335. }
  19336. },
  19337. "required": ["created", "updated"],
  19338. "additionalProperties": false
  19339. },
  19340. "sandboxes": {
  19341. "type": "array",
  19342. "items": {
  19343. "type": "string"
  19344. }
  19345. }
  19346. },
  19347. "required": ["id", "worktree", "time", "sandboxes"],
  19348. "additionalProperties": false
  19349. },
  19350. "ProjectNotFoundError": {
  19351. "type": "object",
  19352. "properties": {
  19353. "_tag": {
  19354. "type": "string",
  19355. "enum": ["ProjectNotFoundError"]
  19356. },
  19357. "projectID": {
  19358. "type": "string"
  19359. },
  19360. "message": {
  19361. "type": "string"
  19362. }
  19363. },
  19364. "required": ["_tag", "projectID", "message"],
  19365. "additionalProperties": false
  19366. },
  19367. "ProjectCopyError": {
  19368. "type": "object",
  19369. "properties": {
  19370. "name": {
  19371. "type": "string",
  19372. "enum": ["ProjectCopyError"]
  19373. },
  19374. "data": {
  19375. "type": "object",
  19376. "properties": {
  19377. "message": {
  19378. "type": "string"
  19379. }
  19380. },
  19381. "required": ["message"],
  19382. "additionalProperties": false
  19383. }
  19384. },
  19385. "required": ["name", "data"],
  19386. "additionalProperties": false
  19387. },
  19388. "PtyNotFoundError": {
  19389. "type": "object",
  19390. "properties": {
  19391. "_tag": {
  19392. "type": "string",
  19393. "enum": ["PtyNotFoundError"]
  19394. },
  19395. "ptyID": {
  19396. "type": "string"
  19397. },
  19398. "message": {
  19399. "type": "string"
  19400. }
  19401. },
  19402. "required": ["_tag", "ptyID", "message"],
  19403. "additionalProperties": false
  19404. },
  19405. "PtyForbiddenError": {
  19406. "type": "object",
  19407. "properties": {
  19408. "_tag": {
  19409. "type": "string",
  19410. "enum": ["PtyForbiddenError"]
  19411. },
  19412. "message": {
  19413. "type": "string"
  19414. }
  19415. },
  19416. "required": ["_tag", "message"],
  19417. "additionalProperties": false
  19418. },
  19419. "QuestionRequest": {
  19420. "type": "object",
  19421. "properties": {
  19422. "id": {
  19423. "type": "string",
  19424. "pattern": "^que"
  19425. },
  19426. "sessionID": {
  19427. "type": "string",
  19428. "pattern": "^ses"
  19429. },
  19430. "questions": {
  19431. "type": "array",
  19432. "items": {
  19433. "$ref": "#/components/schemas/QuestionInfo"
  19434. },
  19435. "description": "Questions to ask"
  19436. },
  19437. "tool": {
  19438. "$ref": "#/components/schemas/QuestionTool"
  19439. }
  19440. },
  19441. "required": ["id", "sessionID", "questions"],
  19442. "additionalProperties": false
  19443. },
  19444. "QuestionNotFoundError": {
  19445. "type": "object",
  19446. "properties": {
  19447. "_tag": {
  19448. "type": "string",
  19449. "enum": ["QuestionNotFoundError"]
  19450. },
  19451. "requestID": {
  19452. "type": "string"
  19453. },
  19454. "message": {
  19455. "type": "string"
  19456. }
  19457. },
  19458. "required": ["_tag", "requestID", "message"],
  19459. "additionalProperties": false
  19460. },
  19461. "PermissionRequest": {
  19462. "type": "object",
  19463. "properties": {
  19464. "id": {
  19465. "type": "string",
  19466. "pattern": "^per"
  19467. },
  19468. "sessionID": {
  19469. "type": "string",
  19470. "pattern": "^ses"
  19471. },
  19472. "permission": {
  19473. "type": "string"
  19474. },
  19475. "patterns": {
  19476. "type": "array",
  19477. "items": {
  19478. "type": "string"
  19479. }
  19480. },
  19481. "metadata": {
  19482. "type": "object"
  19483. },
  19484. "always": {
  19485. "type": "array",
  19486. "items": {
  19487. "type": "string"
  19488. }
  19489. },
  19490. "tool": {
  19491. "type": "object",
  19492. "properties": {
  19493. "messageID": {
  19494. "type": "string"
  19495. },
  19496. "callID": {
  19497. "type": "string"
  19498. }
  19499. },
  19500. "required": ["messageID", "callID"],
  19501. "additionalProperties": false
  19502. }
  19503. },
  19504. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  19505. "additionalProperties": false
  19506. },
  19507. "PermissionNotFoundError": {
  19508. "type": "object",
  19509. "properties": {
  19510. "_tag": {
  19511. "type": "string",
  19512. "enum": ["PermissionNotFoundError"]
  19513. },
  19514. "requestID": {
  19515. "type": "string"
  19516. },
  19517. "message": {
  19518. "type": "string"
  19519. }
  19520. },
  19521. "required": ["_tag", "requestID", "message"],
  19522. "additionalProperties": false
  19523. },
  19524. "ProviderAuthMethod": {
  19525. "type": "object",
  19526. "properties": {
  19527. "type": {
  19528. "type": "string",
  19529. "enum": ["oauth", "api"]
  19530. },
  19531. "label": {
  19532. "type": "string"
  19533. },
  19534. "prompts": {
  19535. "type": "array",
  19536. "items": {
  19537. "anyOf": [
  19538. {
  19539. "type": "object",
  19540. "properties": {
  19541. "type": {
  19542. "type": "string",
  19543. "enum": ["text"]
  19544. },
  19545. "key": {
  19546. "type": "string"
  19547. },
  19548. "message": {
  19549. "type": "string"
  19550. },
  19551. "placeholder": {
  19552. "type": "string"
  19553. },
  19554. "when": {
  19555. "type": "object",
  19556. "properties": {
  19557. "key": {
  19558. "type": "string"
  19559. },
  19560. "op": {
  19561. "type": "string",
  19562. "enum": ["eq", "neq"]
  19563. },
  19564. "value": {
  19565. "type": "string"
  19566. }
  19567. },
  19568. "required": ["key", "op", "value"],
  19569. "additionalProperties": false
  19570. }
  19571. },
  19572. "required": ["type", "key", "message"],
  19573. "additionalProperties": false
  19574. },
  19575. {
  19576. "type": "object",
  19577. "properties": {
  19578. "type": {
  19579. "type": "string",
  19580. "enum": ["select"]
  19581. },
  19582. "key": {
  19583. "type": "string"
  19584. },
  19585. "message": {
  19586. "type": "string"
  19587. },
  19588. "options": {
  19589. "type": "array",
  19590. "items": {
  19591. "type": "object",
  19592. "properties": {
  19593. "label": {
  19594. "type": "string"
  19595. },
  19596. "value": {
  19597. "type": "string"
  19598. },
  19599. "hint": {
  19600. "type": "string"
  19601. }
  19602. },
  19603. "required": ["label", "value"],
  19604. "additionalProperties": false
  19605. }
  19606. },
  19607. "when": {
  19608. "type": "object",
  19609. "properties": {
  19610. "key": {
  19611. "type": "string"
  19612. },
  19613. "op": {
  19614. "type": "string",
  19615. "enum": ["eq", "neq"]
  19616. },
  19617. "value": {
  19618. "type": "string"
  19619. }
  19620. },
  19621. "required": ["key", "op", "value"],
  19622. "additionalProperties": false
  19623. }
  19624. },
  19625. "required": ["type", "key", "message", "options"],
  19626. "additionalProperties": false
  19627. }
  19628. ]
  19629. }
  19630. }
  19631. },
  19632. "required": ["type", "label"],
  19633. "additionalProperties": false
  19634. },
  19635. "ProviderAuthAuthorization": {
  19636. "type": "object",
  19637. "properties": {
  19638. "url": {
  19639. "type": "string"
  19640. },
  19641. "method": {
  19642. "type": "string",
  19643. "enum": ["auto", "code"]
  19644. },
  19645. "instructions": {
  19646. "type": "string"
  19647. }
  19648. },
  19649. "required": ["url", "method", "instructions"],
  19650. "additionalProperties": false
  19651. },
  19652. "ProviderAuthError1": {
  19653. "type": "object",
  19654. "properties": {
  19655. "name": {
  19656. "type": "string",
  19657. "enum": [
  19658. "BadRequest",
  19659. "ProviderAuthOauthMissing",
  19660. "ProviderAuthOauthCodeMissing",
  19661. "ProviderAuthOauthCallbackFailed",
  19662. "ProviderAuthValidationFailed"
  19663. ]
  19664. },
  19665. "data": {
  19666. "type": "object",
  19667. "properties": {
  19668. "providerID": {
  19669. "type": "string"
  19670. },
  19671. "field": {
  19672. "type": "string"
  19673. },
  19674. "message": {
  19675. "type": "string"
  19676. },
  19677. "kind": {
  19678. "type": "string"
  19679. }
  19680. },
  19681. "additionalProperties": false
  19682. }
  19683. },
  19684. "required": ["name", "data"],
  19685. "additionalProperties": false
  19686. },
  19687. "NotFoundError": {
  19688. "type": "object",
  19689. "required": ["name", "data"],
  19690. "properties": {
  19691. "name": {
  19692. "type": "string",
  19693. "enum": ["NotFoundError"]
  19694. },
  19695. "data": {
  19696. "type": "object",
  19697. "required": ["message"],
  19698. "properties": {
  19699. "message": {
  19700. "type": "string"
  19701. }
  19702. }
  19703. }
  19704. }
  19705. },
  19706. "TextPartInput": {
  19707. "type": "object",
  19708. "properties": {
  19709. "id": {
  19710. "type": "string",
  19711. "pattern": "^prt"
  19712. },
  19713. "type": {
  19714. "type": "string",
  19715. "enum": ["text"]
  19716. },
  19717. "text": {
  19718. "type": "string"
  19719. },
  19720. "synthetic": {
  19721. "type": "boolean"
  19722. },
  19723. "ignored": {
  19724. "type": "boolean"
  19725. },
  19726. "time": {
  19727. "type": "object",
  19728. "properties": {
  19729. "start": {
  19730. "type": "integer",
  19731. "minimum": 0
  19732. },
  19733. "end": {
  19734. "type": "integer",
  19735. "minimum": 0
  19736. }
  19737. },
  19738. "required": ["start"],
  19739. "additionalProperties": false
  19740. },
  19741. "metadata": {
  19742. "type": "object"
  19743. }
  19744. },
  19745. "required": ["type", "text"],
  19746. "additionalProperties": false
  19747. },
  19748. "FilePartInput": {
  19749. "type": "object",
  19750. "properties": {
  19751. "id": {
  19752. "type": "string",
  19753. "pattern": "^prt"
  19754. },
  19755. "type": {
  19756. "type": "string",
  19757. "enum": ["file"]
  19758. },
  19759. "mime": {
  19760. "type": "string"
  19761. },
  19762. "filename": {
  19763. "type": "string"
  19764. },
  19765. "url": {
  19766. "type": "string"
  19767. },
  19768. "source": {
  19769. "$ref": "#/components/schemas/FilePartSource"
  19770. }
  19771. },
  19772. "required": ["type", "mime", "url"],
  19773. "additionalProperties": false
  19774. },
  19775. "AgentPartInput": {
  19776. "type": "object",
  19777. "properties": {
  19778. "id": {
  19779. "type": "string",
  19780. "pattern": "^prt"
  19781. },
  19782. "type": {
  19783. "type": "string",
  19784. "enum": ["agent"]
  19785. },
  19786. "name": {
  19787. "type": "string"
  19788. },
  19789. "source": {
  19790. "type": "object",
  19791. "properties": {
  19792. "value": {
  19793. "type": "string"
  19794. },
  19795. "start": {
  19796. "type": "integer",
  19797. "minimum": 0
  19798. },
  19799. "end": {
  19800. "type": "integer",
  19801. "minimum": 0
  19802. }
  19803. },
  19804. "required": ["value", "start", "end"],
  19805. "additionalProperties": false
  19806. }
  19807. },
  19808. "required": ["type", "name"],
  19809. "additionalProperties": false
  19810. },
  19811. "SubtaskPartInput": {
  19812. "type": "object",
  19813. "properties": {
  19814. "id": {
  19815. "type": "string",
  19816. "pattern": "^prt"
  19817. },
  19818. "type": {
  19819. "type": "string",
  19820. "enum": ["subtask"]
  19821. },
  19822. "prompt": {
  19823. "type": "string"
  19824. },
  19825. "description": {
  19826. "type": "string"
  19827. },
  19828. "agent": {
  19829. "type": "string"
  19830. },
  19831. "model": {
  19832. "type": "object",
  19833. "properties": {
  19834. "providerID": {
  19835. "type": "string"
  19836. },
  19837. "modelID": {
  19838. "type": "string"
  19839. }
  19840. },
  19841. "required": ["providerID", "modelID"],
  19842. "additionalProperties": false
  19843. },
  19844. "command": {
  19845. "type": "string"
  19846. }
  19847. },
  19848. "required": ["type", "prompt", "description", "agent"],
  19849. "additionalProperties": false
  19850. },
  19851. "SessionBusyError": {
  19852. "type": "object",
  19853. "properties": {
  19854. "_tag": {
  19855. "type": "string",
  19856. "enum": ["SessionBusyError"]
  19857. },
  19858. "sessionID": {
  19859. "type": "string"
  19860. },
  19861. "message": {
  19862. "type": "string"
  19863. }
  19864. },
  19865. "required": ["_tag", "sessionID", "message"],
  19866. "additionalProperties": false
  19867. },
  19868. "EventTuiPromptAppend": {
  19869. "type": "object",
  19870. "properties": {
  19871. "type": {
  19872. "type": "string",
  19873. "enum": ["tui.prompt.append"]
  19874. },
  19875. "properties": {
  19876. "type": "object",
  19877. "properties": {
  19878. "text": {
  19879. "type": "string"
  19880. }
  19881. },
  19882. "required": ["text"],
  19883. "additionalProperties": false
  19884. }
  19885. },
  19886. "required": ["type", "properties"],
  19887. "additionalProperties": false
  19888. },
  19889. "EventTuiCommandExecute": {
  19890. "type": "object",
  19891. "properties": {
  19892. "type": {
  19893. "type": "string",
  19894. "enum": ["tui.command.execute"]
  19895. },
  19896. "properties": {
  19897. "type": "object",
  19898. "properties": {
  19899. "command": {
  19900. "anyOf": [
  19901. {
  19902. "type": "string",
  19903. "enum": [
  19904. "session.list",
  19905. "session.new",
  19906. "session.share",
  19907. "session.interrupt",
  19908. "session.compact",
  19909. "session.page.up",
  19910. "session.page.down",
  19911. "session.line.up",
  19912. "session.line.down",
  19913. "session.half.page.up",
  19914. "session.half.page.down",
  19915. "session.first",
  19916. "session.last",
  19917. "prompt.clear",
  19918. "prompt.submit",
  19919. "agent.cycle"
  19920. ]
  19921. },
  19922. {
  19923. "type": "string"
  19924. }
  19925. ]
  19926. }
  19927. },
  19928. "required": ["command"],
  19929. "additionalProperties": false
  19930. }
  19931. },
  19932. "required": ["type", "properties"],
  19933. "additionalProperties": false
  19934. },
  19935. "EventTuiToastShow": {
  19936. "type": "object",
  19937. "properties": {
  19938. "type": {
  19939. "type": "string",
  19940. "enum": ["tui.toast.show"]
  19941. },
  19942. "properties": {
  19943. "type": "object",
  19944. "properties": {
  19945. "title": {
  19946. "type": "string"
  19947. },
  19948. "message": {
  19949. "type": "string"
  19950. },
  19951. "variant": {
  19952. "type": "string",
  19953. "enum": ["info", "success", "warning", "error"]
  19954. },
  19955. "duration": {
  19956. "type": "integer",
  19957. "exclusiveMinimum": 0
  19958. }
  19959. },
  19960. "required": ["message", "variant"],
  19961. "additionalProperties": false
  19962. }
  19963. },
  19964. "required": ["type", "properties"],
  19965. "additionalProperties": false
  19966. },
  19967. "EventTuiSessionSelect": {
  19968. "type": "object",
  19969. "properties": {
  19970. "type": {
  19971. "type": "string",
  19972. "enum": ["tui.session.select"]
  19973. },
  19974. "properties": {
  19975. "type": "object",
  19976. "properties": {
  19977. "sessionID": {
  19978. "type": "string",
  19979. "pattern": "^ses",
  19980. "description": "Session ID to navigate to"
  19981. }
  19982. },
  19983. "required": ["sessionID"],
  19984. "additionalProperties": false
  19985. }
  19986. },
  19987. "required": ["type", "properties"],
  19988. "additionalProperties": false
  19989. },
  19990. "Workspace": {
  19991. "type": "object",
  19992. "properties": {
  19993. "id": {
  19994. "type": "string",
  19995. "pattern": "^wrk"
  19996. },
  19997. "type": {
  19998. "type": "string"
  19999. },
  20000. "name": {
  20001. "type": "string"
  20002. },
  20003. "branch": {
  20004. "anyOf": [
  20005. {
  20006. "type": "string"
  20007. },
  20008. {
  20009. "type": "null"
  20010. }
  20011. ]
  20012. },
  20013. "directory": {
  20014. "anyOf": [
  20015. {
  20016. "type": "string"
  20017. },
  20018. {
  20019. "type": "null"
  20020. }
  20021. ]
  20022. },
  20023. "extra": {
  20024. "anyOf": [
  20025. {},
  20026. {
  20027. "type": "null"
  20028. }
  20029. ]
  20030. },
  20031. "projectID": {
  20032. "type": "string"
  20033. },
  20034. "timeUsed": {
  20035. "anyOf": [
  20036. {
  20037. "type": "number"
  20038. },
  20039. {
  20040. "type": "string",
  20041. "enum": ["NaN"]
  20042. },
  20043. {
  20044. "type": "string",
  20045. "enum": ["Infinity"]
  20046. },
  20047. {
  20048. "type": "string",
  20049. "enum": ["-Infinity"]
  20050. },
  20051. {
  20052. "type": "string",
  20053. "enum": ["Infinity", "-Infinity", "NaN"]
  20054. }
  20055. ]
  20056. }
  20057. },
  20058. "required": ["id", "type", "name", "projectID", "timeUsed"],
  20059. "additionalProperties": false
  20060. },
  20061. "WorkspaceCreateError": {
  20062. "type": "object",
  20063. "properties": {
  20064. "name": {
  20065. "type": "string",
  20066. "enum": ["WorkspaceCreateError"]
  20067. },
  20068. "data": {
  20069. "type": "object",
  20070. "properties": {
  20071. "message": {
  20072. "type": "string"
  20073. }
  20074. },
  20075. "required": ["message"],
  20076. "additionalProperties": false
  20077. }
  20078. },
  20079. "required": ["name", "data"],
  20080. "additionalProperties": false
  20081. },
  20082. "WorkspaceWarpError": {
  20083. "type": "object",
  20084. "properties": {
  20085. "name": {
  20086. "type": "string",
  20087. "enum": ["WorkspaceWarpError"]
  20088. },
  20089. "data": {
  20090. "type": "object",
  20091. "properties": {
  20092. "message": {
  20093. "type": "string"
  20094. }
  20095. },
  20096. "required": ["message"],
  20097. "additionalProperties": false
  20098. }
  20099. },
  20100. "required": ["name", "data"],
  20101. "additionalProperties": false
  20102. },
  20103. "UnauthorizedError": {
  20104. "type": "object",
  20105. "properties": {
  20106. "_tag": {
  20107. "type": "string",
  20108. "enum": ["UnauthorizedError"]
  20109. },
  20110. "message": {
  20111. "type": "string"
  20112. }
  20113. },
  20114. "required": ["_tag", "message"],
  20115. "additionalProperties": false
  20116. },
  20117. "V2SessionsResponse": {
  20118. "type": "object",
  20119. "properties": {
  20120. "data": {
  20121. "type": "array",
  20122. "items": {
  20123. "$ref": "#/components/schemas/SessionV2Info"
  20124. }
  20125. },
  20126. "cursor": {
  20127. "type": "object",
  20128. "properties": {
  20129. "previous": {
  20130. "type": "string"
  20131. },
  20132. "next": {
  20133. "type": "string"
  20134. }
  20135. },
  20136. "additionalProperties": false
  20137. }
  20138. },
  20139. "required": ["data", "cursor"],
  20140. "additionalProperties": false
  20141. },
  20142. "InvalidCursorError": {
  20143. "type": "object",
  20144. "properties": {
  20145. "_tag": {
  20146. "type": "string",
  20147. "enum": ["InvalidCursorError"]
  20148. },
  20149. "message": {
  20150. "type": "string"
  20151. }
  20152. },
  20153. "required": ["_tag", "message"],
  20154. "additionalProperties": false
  20155. },
  20156. "ConflictError": {
  20157. "type": "object",
  20158. "properties": {
  20159. "_tag": {
  20160. "type": "string",
  20161. "enum": ["ConflictError"]
  20162. },
  20163. "message": {
  20164. "type": "string"
  20165. },
  20166. "resource": {
  20167. "type": "string"
  20168. }
  20169. },
  20170. "required": ["_tag", "message"],
  20171. "additionalProperties": false
  20172. },
  20173. "SessionNotFoundError": {
  20174. "type": "object",
  20175. "properties": {
  20176. "_tag": {
  20177. "type": "string",
  20178. "enum": ["SessionNotFoundError"]
  20179. },
  20180. "sessionID": {
  20181. "type": "string"
  20182. },
  20183. "message": {
  20184. "type": "string"
  20185. }
  20186. },
  20187. "required": ["_tag", "sessionID", "message"],
  20188. "additionalProperties": false
  20189. },
  20190. "ServiceUnavailableError": {
  20191. "type": "object",
  20192. "properties": {
  20193. "_tag": {
  20194. "type": "string",
  20195. "enum": ["ServiceUnavailableError"]
  20196. },
  20197. "message": {
  20198. "type": "string"
  20199. },
  20200. "service": {
  20201. "type": "string"
  20202. }
  20203. },
  20204. "required": ["_tag", "message"],
  20205. "additionalProperties": false
  20206. },
  20207. "UnknownError1": {
  20208. "type": "object",
  20209. "properties": {
  20210. "_tag": {
  20211. "type": "string",
  20212. "enum": ["UnknownError"]
  20213. },
  20214. "message": {
  20215. "type": "string"
  20216. },
  20217. "ref": {
  20218. "type": "string"
  20219. }
  20220. },
  20221. "required": ["_tag", "message"],
  20222. "additionalProperties": false
  20223. },
  20224. "V2SessionMessagesResponse": {
  20225. "type": "object",
  20226. "properties": {
  20227. "data": {
  20228. "type": "array",
  20229. "items": {
  20230. "$ref": "#/components/schemas/SessionMessage"
  20231. }
  20232. },
  20233. "cursor": {
  20234. "type": "object",
  20235. "properties": {
  20236. "previous": {
  20237. "type": "string"
  20238. },
  20239. "next": {
  20240. "type": "string"
  20241. }
  20242. },
  20243. "additionalProperties": false
  20244. }
  20245. },
  20246. "required": ["data", "cursor"],
  20247. "additionalProperties": false
  20248. },
  20249. "ProviderNotFoundError": {
  20250. "type": "object",
  20251. "properties": {
  20252. "_tag": {
  20253. "type": "string",
  20254. "enum": ["ProviderNotFoundError"]
  20255. },
  20256. "providerID": {
  20257. "type": "string"
  20258. },
  20259. "message": {
  20260. "type": "string"
  20261. }
  20262. },
  20263. "required": ["_tag", "providerID", "message"],
  20264. "additionalProperties": false
  20265. },
  20266. "effect_HttpApiError_Forbidden": {
  20267. "type": "object",
  20268. "properties": {
  20269. "_tag": {
  20270. "type": "string",
  20271. "enum": ["Forbidden"]
  20272. }
  20273. },
  20274. "required": ["_tag"],
  20275. "additionalProperties": false
  20276. },
  20277. "Event.tui.prompt.append": {
  20278. "type": "object",
  20279. "properties": {
  20280. "id": {
  20281. "type": "string"
  20282. },
  20283. "type": {
  20284. "type": "string",
  20285. "enum": ["tui.prompt.append"]
  20286. },
  20287. "properties": {
  20288. "type": "object",
  20289. "properties": {
  20290. "text": {
  20291. "type": "string"
  20292. }
  20293. },
  20294. "required": ["text"],
  20295. "additionalProperties": false
  20296. }
  20297. },
  20298. "required": ["id", "type", "properties"],
  20299. "additionalProperties": false
  20300. },
  20301. "Event.tui.command.execute": {
  20302. "type": "object",
  20303. "properties": {
  20304. "id": {
  20305. "type": "string"
  20306. },
  20307. "type": {
  20308. "type": "string",
  20309. "enum": ["tui.command.execute"]
  20310. },
  20311. "properties": {
  20312. "type": "object",
  20313. "properties": {
  20314. "command": {
  20315. "anyOf": [
  20316. {
  20317. "type": "string",
  20318. "enum": [
  20319. "session.list",
  20320. "session.new",
  20321. "session.share",
  20322. "session.interrupt",
  20323. "session.compact",
  20324. "session.page.up",
  20325. "session.page.down",
  20326. "session.line.up",
  20327. "session.line.down",
  20328. "session.half.page.up",
  20329. "session.half.page.down",
  20330. "session.first",
  20331. "session.last",
  20332. "prompt.clear",
  20333. "prompt.submit",
  20334. "agent.cycle"
  20335. ]
  20336. },
  20337. {
  20338. "type": "string"
  20339. }
  20340. ]
  20341. }
  20342. },
  20343. "required": ["command"],
  20344. "additionalProperties": false
  20345. }
  20346. },
  20347. "required": ["id", "type", "properties"],
  20348. "additionalProperties": false
  20349. },
  20350. "Event.tui.toast.show": {
  20351. "type": "object",
  20352. "properties": {
  20353. "id": {
  20354. "type": "string"
  20355. },
  20356. "type": {
  20357. "type": "string",
  20358. "enum": ["tui.toast.show"]
  20359. },
  20360. "properties": {
  20361. "type": "object",
  20362. "properties": {
  20363. "title": {
  20364. "type": "string"
  20365. },
  20366. "message": {
  20367. "type": "string"
  20368. },
  20369. "variant": {
  20370. "type": "string",
  20371. "enum": ["info", "success", "warning", "error"]
  20372. },
  20373. "duration": {
  20374. "type": "integer",
  20375. "exclusiveMinimum": 0
  20376. }
  20377. },
  20378. "required": ["message", "variant"],
  20379. "additionalProperties": false
  20380. }
  20381. },
  20382. "required": ["id", "type", "properties"],
  20383. "additionalProperties": false
  20384. },
  20385. "Event.tui.session.select": {
  20386. "type": "object",
  20387. "properties": {
  20388. "id": {
  20389. "type": "string"
  20390. },
  20391. "type": {
  20392. "type": "string",
  20393. "enum": ["tui.session.select"]
  20394. },
  20395. "properties": {
  20396. "type": "object",
  20397. "properties": {
  20398. "sessionID": {
  20399. "type": "string",
  20400. "pattern": "^ses",
  20401. "description": "Session ID to navigate to"
  20402. }
  20403. },
  20404. "required": ["sessionID"],
  20405. "additionalProperties": false
  20406. }
  20407. },
  20408. "required": ["id", "type", "properties"],
  20409. "additionalProperties": false
  20410. },
  20411. "MoveSessionDestination": {
  20412. "type": "object",
  20413. "properties": {
  20414. "directory": {
  20415. "type": "string"
  20416. }
  20417. },
  20418. "required": ["directory"],
  20419. "additionalProperties": false
  20420. },
  20421. "ModelV2Info": {
  20422. "type": "object",
  20423. "properties": {
  20424. "id": {
  20425. "type": "string"
  20426. },
  20427. "providerID": {
  20428. "type": "string"
  20429. },
  20430. "family": {
  20431. "type": "string"
  20432. },
  20433. "name": {
  20434. "type": "string"
  20435. },
  20436. "api": {
  20437. "anyOf": [
  20438. {
  20439. "type": "object",
  20440. "properties": {
  20441. "id": {
  20442. "type": "string"
  20443. },
  20444. "type": {
  20445. "type": "string",
  20446. "enum": ["aisdk"]
  20447. },
  20448. "package": {
  20449. "type": "string"
  20450. },
  20451. "url": {
  20452. "type": "string"
  20453. },
  20454. "settings": {
  20455. "type": "object"
  20456. }
  20457. },
  20458. "required": ["id", "type", "package"],
  20459. "additionalProperties": false
  20460. },
  20461. {
  20462. "type": "object",
  20463. "properties": {
  20464. "id": {
  20465. "type": "string"
  20466. },
  20467. "type": {
  20468. "type": "string",
  20469. "enum": ["native"]
  20470. },
  20471. "url": {
  20472. "type": "string"
  20473. },
  20474. "settings": {
  20475. "type": "object"
  20476. }
  20477. },
  20478. "required": ["id", "type", "settings"],
  20479. "additionalProperties": false
  20480. }
  20481. ]
  20482. },
  20483. "capabilities": {
  20484. "type": "object",
  20485. "properties": {
  20486. "tools": {
  20487. "type": "boolean"
  20488. },
  20489. "input": {
  20490. "type": "array",
  20491. "items": {
  20492. "type": "string"
  20493. }
  20494. },
  20495. "output": {
  20496. "type": "array",
  20497. "items": {
  20498. "type": "string"
  20499. }
  20500. }
  20501. },
  20502. "required": ["tools", "input", "output"],
  20503. "additionalProperties": false
  20504. },
  20505. "request": {
  20506. "type": "object",
  20507. "properties": {
  20508. "headers": {
  20509. "type": "object",
  20510. "additionalProperties": {
  20511. "type": "string"
  20512. }
  20513. },
  20514. "body": {
  20515. "type": "object"
  20516. },
  20517. "variant": {
  20518. "type": "string"
  20519. }
  20520. },
  20521. "required": ["headers", "body"],
  20522. "additionalProperties": false
  20523. },
  20524. "variants": {
  20525. "type": "array",
  20526. "items": {
  20527. "type": "object",
  20528. "properties": {
  20529. "id": {
  20530. "type": "string"
  20531. },
  20532. "headers": {
  20533. "type": "object",
  20534. "additionalProperties": {
  20535. "type": "string"
  20536. }
  20537. },
  20538. "body": {
  20539. "type": "object"
  20540. }
  20541. },
  20542. "required": ["id", "headers", "body"],
  20543. "additionalProperties": false
  20544. }
  20545. },
  20546. "time": {
  20547. "type": "object",
  20548. "properties": {
  20549. "released": {
  20550. "anyOf": [
  20551. {
  20552. "type": "number"
  20553. },
  20554. {
  20555. "type": "string",
  20556. "enum": ["NaN"]
  20557. },
  20558. {
  20559. "type": "string",
  20560. "enum": ["Infinity"]
  20561. },
  20562. {
  20563. "type": "string",
  20564. "enum": ["-Infinity"]
  20565. },
  20566. {
  20567. "type": "string",
  20568. "enum": ["Infinity", "-Infinity", "NaN"]
  20569. }
  20570. ]
  20571. }
  20572. },
  20573. "required": ["released"],
  20574. "additionalProperties": false
  20575. },
  20576. "cost": {
  20577. "type": "array",
  20578. "items": {
  20579. "type": "object",
  20580. "properties": {
  20581. "tier": {
  20582. "type": "object",
  20583. "properties": {
  20584. "type": {
  20585. "type": "string",
  20586. "enum": ["context"]
  20587. },
  20588. "size": {
  20589. "type": "integer"
  20590. }
  20591. },
  20592. "required": ["type", "size"],
  20593. "additionalProperties": false
  20594. },
  20595. "input": {
  20596. "type": "number"
  20597. },
  20598. "output": {
  20599. "type": "number"
  20600. },
  20601. "cache": {
  20602. "type": "object",
  20603. "properties": {
  20604. "read": {
  20605. "type": "number"
  20606. },
  20607. "write": {
  20608. "type": "number"
  20609. }
  20610. },
  20611. "required": ["read", "write"],
  20612. "additionalProperties": false
  20613. }
  20614. },
  20615. "required": ["input", "output", "cache"],
  20616. "additionalProperties": false
  20617. }
  20618. },
  20619. "status": {
  20620. "type": "string",
  20621. "enum": ["alpha", "beta", "deprecated", "active"]
  20622. },
  20623. "enabled": {
  20624. "type": "boolean"
  20625. },
  20626. "limit": {
  20627. "type": "object",
  20628. "properties": {
  20629. "context": {
  20630. "type": "integer"
  20631. },
  20632. "input": {
  20633. "type": "integer"
  20634. },
  20635. "output": {
  20636. "type": "integer"
  20637. }
  20638. },
  20639. "required": ["context", "output"],
  20640. "additionalProperties": false
  20641. }
  20642. },
  20643. "required": [
  20644. "id",
  20645. "providerID",
  20646. "name",
  20647. "api",
  20648. "capabilities",
  20649. "request",
  20650. "variants",
  20651. "time",
  20652. "cost",
  20653. "status",
  20654. "enabled",
  20655. "limit"
  20656. ],
  20657. "additionalProperties": false
  20658. },
  20659. "LocationRef": {
  20660. "type": "object",
  20661. "properties": {
  20662. "directory": {
  20663. "type": "string"
  20664. },
  20665. "workspaceID": {
  20666. "type": "string",
  20667. "pattern": "^wrk"
  20668. }
  20669. },
  20670. "required": ["directory"],
  20671. "additionalProperties": false
  20672. },
  20673. "PromptSource": {
  20674. "type": "object",
  20675. "properties": {
  20676. "start": {
  20677. "type": "number"
  20678. },
  20679. "end": {
  20680. "type": "number"
  20681. },
  20682. "text": {
  20683. "type": "string"
  20684. }
  20685. },
  20686. "required": ["start", "end", "text"],
  20687. "additionalProperties": false
  20688. },
  20689. "PromptFileAttachment": {
  20690. "type": "object",
  20691. "properties": {
  20692. "uri": {
  20693. "type": "string"
  20694. },
  20695. "mime": {
  20696. "type": "string"
  20697. },
  20698. "name": {
  20699. "type": "string"
  20700. },
  20701. "description": {
  20702. "type": "string"
  20703. },
  20704. "source": {
  20705. "$ref": "#/components/schemas/PromptSource"
  20706. }
  20707. },
  20708. "required": ["uri", "mime"],
  20709. "additionalProperties": false
  20710. },
  20711. "PromptAgentAttachment": {
  20712. "type": "object",
  20713. "properties": {
  20714. "name": {
  20715. "type": "string"
  20716. },
  20717. "source": {
  20718. "$ref": "#/components/schemas/PromptSource"
  20719. }
  20720. },
  20721. "required": ["name"],
  20722. "additionalProperties": false
  20723. },
  20724. "PromptReferenceAttachment": {
  20725. "type": "object",
  20726. "properties": {
  20727. "name": {
  20728. "type": "string"
  20729. },
  20730. "kind": {
  20731. "type": "string",
  20732. "enum": ["local", "git", "invalid"]
  20733. },
  20734. "uri": {
  20735. "type": "string"
  20736. },
  20737. "repository": {
  20738. "type": "string"
  20739. },
  20740. "branch": {
  20741. "type": "string"
  20742. },
  20743. "target": {
  20744. "type": "string"
  20745. },
  20746. "targetUri": {
  20747. "type": "string"
  20748. },
  20749. "problem": {
  20750. "type": "string"
  20751. },
  20752. "source": {
  20753. "$ref": "#/components/schemas/PromptSource"
  20754. }
  20755. },
  20756. "required": ["name", "kind"],
  20757. "additionalProperties": false
  20758. },
  20759. "SessionErrorUnknown": {
  20760. "type": "object",
  20761. "properties": {
  20762. "type": {
  20763. "type": "string",
  20764. "enum": ["unknown"]
  20765. },
  20766. "message": {
  20767. "type": "string"
  20768. }
  20769. },
  20770. "required": ["type", "message"],
  20771. "additionalProperties": false
  20772. },
  20773. "ToolTextContent": {
  20774. "type": "object",
  20775. "properties": {
  20776. "type": {
  20777. "type": "string",
  20778. "enum": ["text"]
  20779. },
  20780. "text": {
  20781. "type": "string"
  20782. }
  20783. },
  20784. "required": ["type", "text"],
  20785. "additionalProperties": false
  20786. },
  20787. "ToolFileContent": {
  20788. "type": "object",
  20789. "properties": {
  20790. "type": {
  20791. "type": "string",
  20792. "enum": ["file"]
  20793. },
  20794. "source": {
  20795. "anyOf": [
  20796. {
  20797. "type": "object",
  20798. "properties": {
  20799. "type": {
  20800. "type": "string",
  20801. "enum": ["data"]
  20802. },
  20803. "data": {
  20804. "type": "string"
  20805. }
  20806. },
  20807. "required": ["type", "data"],
  20808. "additionalProperties": false
  20809. },
  20810. {
  20811. "type": "object",
  20812. "properties": {
  20813. "type": {
  20814. "type": "string",
  20815. "enum": ["url"]
  20816. },
  20817. "url": {
  20818. "type": "string"
  20819. }
  20820. },
  20821. "required": ["type", "url"],
  20822. "additionalProperties": false
  20823. },
  20824. {
  20825. "type": "object",
  20826. "properties": {
  20827. "type": {
  20828. "type": "string",
  20829. "enum": ["file"]
  20830. },
  20831. "uri": {
  20832. "type": "string"
  20833. }
  20834. },
  20835. "required": ["type", "uri"],
  20836. "additionalProperties": false
  20837. }
  20838. ]
  20839. },
  20840. "mime": {
  20841. "type": "string"
  20842. },
  20843. "name": {
  20844. "type": "string"
  20845. }
  20846. },
  20847. "required": ["type", "source", "mime"],
  20848. "additionalProperties": false
  20849. },
  20850. "SessionNextRetry_error": {
  20851. "type": "object",
  20852. "properties": {
  20853. "message": {
  20854. "type": "string"
  20855. },
  20856. "statusCode": {
  20857. "type": "number"
  20858. },
  20859. "isRetryable": {
  20860. "type": "boolean"
  20861. },
  20862. "responseHeaders": {
  20863. "type": "object",
  20864. "additionalProperties": {
  20865. "type": "string"
  20866. }
  20867. },
  20868. "responseBody": {
  20869. "type": "string"
  20870. },
  20871. "metadata": {
  20872. "type": "object",
  20873. "additionalProperties": {
  20874. "type": "string"
  20875. }
  20876. }
  20877. },
  20878. "required": ["message", "isRetryable"],
  20879. "additionalProperties": false
  20880. },
  20881. "AuthOAuthCredential": {
  20882. "type": "object",
  20883. "properties": {
  20884. "type": {
  20885. "type": "string",
  20886. "enum": ["oauth"]
  20887. },
  20888. "refresh": {
  20889. "type": "string"
  20890. },
  20891. "access": {
  20892. "type": "string"
  20893. },
  20894. "expires": {
  20895. "type": "integer",
  20896. "minimum": 0
  20897. }
  20898. },
  20899. "required": ["type", "refresh", "access", "expires"],
  20900. "additionalProperties": false
  20901. },
  20902. "AuthApiKeyCredential": {
  20903. "type": "object",
  20904. "properties": {
  20905. "type": {
  20906. "type": "string",
  20907. "enum": ["api"]
  20908. },
  20909. "key": {
  20910. "type": "string"
  20911. },
  20912. "metadata": {
  20913. "type": "object",
  20914. "additionalProperties": {
  20915. "type": "string"
  20916. }
  20917. }
  20918. },
  20919. "required": ["type", "key"],
  20920. "additionalProperties": false
  20921. },
  20922. "AuthCredential": {
  20923. "anyOf": [
  20924. {
  20925. "$ref": "#/components/schemas/AuthOAuthCredential"
  20926. },
  20927. {
  20928. "$ref": "#/components/schemas/AuthApiKeyCredential"
  20929. }
  20930. ]
  20931. },
  20932. "AuthInfo": {
  20933. "type": "object",
  20934. "properties": {
  20935. "id": {
  20936. "type": "string"
  20937. },
  20938. "serviceID": {
  20939. "type": "string"
  20940. },
  20941. "description": {
  20942. "type": "string"
  20943. },
  20944. "credential": {
  20945. "$ref": "#/components/schemas/AuthCredential"
  20946. }
  20947. },
  20948. "required": ["id", "serviceID", "description", "credential"],
  20949. "additionalProperties": false
  20950. },
  20951. "PermissionV2Source": {
  20952. "type": "object",
  20953. "properties": {
  20954. "type": {
  20955. "type": "string",
  20956. "enum": ["tool"]
  20957. },
  20958. "messageID": {
  20959. "type": "string"
  20960. },
  20961. "callID": {
  20962. "type": "string"
  20963. }
  20964. },
  20965. "required": ["type", "messageID", "callID"],
  20966. "additionalProperties": false
  20967. },
  20968. "PermissionV2Reply": {
  20969. "type": "string",
  20970. "enum": ["once", "always", "reject"]
  20971. },
  20972. "QuestionV2Option": {
  20973. "type": "object",
  20974. "properties": {
  20975. "label": {
  20976. "type": "string",
  20977. "description": "Display text (1-5 words, concise)"
  20978. },
  20979. "description": {
  20980. "type": "string",
  20981. "description": "Explanation of choice"
  20982. }
  20983. },
  20984. "required": ["label", "description"],
  20985. "additionalProperties": false
  20986. },
  20987. "QuestionV2Info": {
  20988. "type": "object",
  20989. "properties": {
  20990. "question": {
  20991. "type": "string",
  20992. "description": "Complete question"
  20993. },
  20994. "header": {
  20995. "type": "string",
  20996. "description": "Very short label (max 30 chars)"
  20997. },
  20998. "options": {
  20999. "type": "array",
  21000. "items": {
  21001. "$ref": "#/components/schemas/QuestionV2Option"
  21002. },
  21003. "description": "Available choices"
  21004. },
  21005. "multiple": {
  21006. "type": "boolean"
  21007. },
  21008. "custom": {
  21009. "type": "boolean"
  21010. }
  21011. },
  21012. "required": ["question", "header", "options"],
  21013. "additionalProperties": false
  21014. },
  21015. "QuestionV2Tool": {
  21016. "type": "object",
  21017. "properties": {
  21018. "messageID": {
  21019. "type": "string"
  21020. },
  21021. "callID": {
  21022. "type": "string"
  21023. }
  21024. },
  21025. "required": ["messageID", "callID"],
  21026. "additionalProperties": false
  21027. },
  21028. "QuestionV2Answer": {
  21029. "type": "array",
  21030. "items": {
  21031. "type": "string"
  21032. }
  21033. },
  21034. "EventServerInstanceDisposed": {
  21035. "type": "object",
  21036. "properties": {
  21037. "id": {
  21038. "type": "string"
  21039. },
  21040. "type": {
  21041. "type": "string",
  21042. "enum": ["server.instance.disposed"]
  21043. },
  21044. "properties": {
  21045. "type": "object",
  21046. "properties": {
  21047. "directory": {
  21048. "type": "string"
  21049. }
  21050. },
  21051. "required": ["directory"],
  21052. "additionalProperties": false
  21053. }
  21054. },
  21055. "required": ["id", "type", "properties"],
  21056. "additionalProperties": false
  21057. },
  21058. "SyncEventSessionCreated": {
  21059. "type": "object",
  21060. "properties": {
  21061. "type": {
  21062. "type": "string",
  21063. "enum": ["sync"]
  21064. },
  21065. "id": {
  21066. "type": "string"
  21067. },
  21068. "syncEvent": {
  21069. "type": "object",
  21070. "properties": {
  21071. "type": {
  21072. "type": "string",
  21073. "enum": ["session.created.1"]
  21074. },
  21075. "id": {
  21076. "type": "string"
  21077. },
  21078. "seq": {
  21079. "type": "number"
  21080. },
  21081. "aggregateID": {
  21082. "type": "string"
  21083. },
  21084. "data": {
  21085. "type": "object",
  21086. "properties": {
  21087. "sessionID": {
  21088. "type": "string",
  21089. "pattern": "^ses"
  21090. },
  21091. "info": {
  21092. "$ref": "#/components/schemas/Session"
  21093. }
  21094. },
  21095. "required": ["sessionID", "info"],
  21096. "additionalProperties": false
  21097. }
  21098. },
  21099. "required": ["type", "id", "seq", "aggregateID", "data"],
  21100. "additionalProperties": false
  21101. }
  21102. },
  21103. "required": ["type", "id", "syncEvent"],
  21104. "additionalProperties": false
  21105. },
  21106. "SyncEventSessionUpdated": {
  21107. "type": "object",
  21108. "properties": {
  21109. "type": {
  21110. "type": "string",
  21111. "enum": ["sync"]
  21112. },
  21113. "id": {
  21114. "type": "string"
  21115. },
  21116. "syncEvent": {
  21117. "type": "object",
  21118. "properties": {
  21119. "type": {
  21120. "type": "string",
  21121. "enum": ["session.updated.1"]
  21122. },
  21123. "id": {
  21124. "type": "string"
  21125. },
  21126. "seq": {
  21127. "type": "number"
  21128. },
  21129. "aggregateID": {
  21130. "type": "string"
  21131. },
  21132. "data": {
  21133. "type": "object",
  21134. "properties": {
  21135. "sessionID": {
  21136. "type": "string",
  21137. "pattern": "^ses"
  21138. },
  21139. "info": {
  21140. "$ref": "#/components/schemas/Session"
  21141. }
  21142. },
  21143. "required": ["sessionID", "info"],
  21144. "additionalProperties": false
  21145. }
  21146. },
  21147. "required": ["type", "id", "seq", "aggregateID", "data"],
  21148. "additionalProperties": false
  21149. }
  21150. },
  21151. "required": ["type", "id", "syncEvent"],
  21152. "additionalProperties": false
  21153. },
  21154. "SyncEventSessionDeleted": {
  21155. "type": "object",
  21156. "properties": {
  21157. "type": {
  21158. "type": "string",
  21159. "enum": ["sync"]
  21160. },
  21161. "id": {
  21162. "type": "string"
  21163. },
  21164. "syncEvent": {
  21165. "type": "object",
  21166. "properties": {
  21167. "type": {
  21168. "type": "string",
  21169. "enum": ["session.deleted.1"]
  21170. },
  21171. "id": {
  21172. "type": "string"
  21173. },
  21174. "seq": {
  21175. "type": "number"
  21176. },
  21177. "aggregateID": {
  21178. "type": "string"
  21179. },
  21180. "data": {
  21181. "type": "object",
  21182. "properties": {
  21183. "sessionID": {
  21184. "type": "string",
  21185. "pattern": "^ses"
  21186. },
  21187. "info": {
  21188. "$ref": "#/components/schemas/Session"
  21189. }
  21190. },
  21191. "required": ["sessionID", "info"],
  21192. "additionalProperties": false
  21193. }
  21194. },
  21195. "required": ["type", "id", "seq", "aggregateID", "data"],
  21196. "additionalProperties": false
  21197. }
  21198. },
  21199. "required": ["type", "id", "syncEvent"],
  21200. "additionalProperties": false
  21201. },
  21202. "SyncEventMessageUpdated": {
  21203. "type": "object",
  21204. "properties": {
  21205. "type": {
  21206. "type": "string",
  21207. "enum": ["sync"]
  21208. },
  21209. "id": {
  21210. "type": "string"
  21211. },
  21212. "syncEvent": {
  21213. "type": "object",
  21214. "properties": {
  21215. "type": {
  21216. "type": "string",
  21217. "enum": ["message.updated.1"]
  21218. },
  21219. "id": {
  21220. "type": "string"
  21221. },
  21222. "seq": {
  21223. "type": "number"
  21224. },
  21225. "aggregateID": {
  21226. "type": "string"
  21227. },
  21228. "data": {
  21229. "type": "object",
  21230. "properties": {
  21231. "sessionID": {
  21232. "type": "string",
  21233. "pattern": "^ses"
  21234. },
  21235. "info": {
  21236. "$ref": "#/components/schemas/Message"
  21237. }
  21238. },
  21239. "required": ["sessionID", "info"],
  21240. "additionalProperties": false
  21241. }
  21242. },
  21243. "required": ["type", "id", "seq", "aggregateID", "data"],
  21244. "additionalProperties": false
  21245. }
  21246. },
  21247. "required": ["type", "id", "syncEvent"],
  21248. "additionalProperties": false
  21249. },
  21250. "SyncEventMessageRemoved": {
  21251. "type": "object",
  21252. "properties": {
  21253. "type": {
  21254. "type": "string",
  21255. "enum": ["sync"]
  21256. },
  21257. "id": {
  21258. "type": "string"
  21259. },
  21260. "syncEvent": {
  21261. "type": "object",
  21262. "properties": {
  21263. "type": {
  21264. "type": "string",
  21265. "enum": ["message.removed.1"]
  21266. },
  21267. "id": {
  21268. "type": "string"
  21269. },
  21270. "seq": {
  21271. "type": "number"
  21272. },
  21273. "aggregateID": {
  21274. "type": "string"
  21275. },
  21276. "data": {
  21277. "type": "object",
  21278. "properties": {
  21279. "sessionID": {
  21280. "type": "string",
  21281. "pattern": "^ses"
  21282. },
  21283. "messageID": {
  21284. "type": "string",
  21285. "pattern": "^msg"
  21286. }
  21287. },
  21288. "required": ["sessionID", "messageID"],
  21289. "additionalProperties": false
  21290. }
  21291. },
  21292. "required": ["type", "id", "seq", "aggregateID", "data"],
  21293. "additionalProperties": false
  21294. }
  21295. },
  21296. "required": ["type", "id", "syncEvent"],
  21297. "additionalProperties": false
  21298. },
  21299. "SyncEventMessagePartUpdated": {
  21300. "type": "object",
  21301. "properties": {
  21302. "type": {
  21303. "type": "string",
  21304. "enum": ["sync"]
  21305. },
  21306. "id": {
  21307. "type": "string"
  21308. },
  21309. "syncEvent": {
  21310. "type": "object",
  21311. "properties": {
  21312. "type": {
  21313. "type": "string",
  21314. "enum": ["message.part.updated.1"]
  21315. },
  21316. "id": {
  21317. "type": "string"
  21318. },
  21319. "seq": {
  21320. "type": "number"
  21321. },
  21322. "aggregateID": {
  21323. "type": "string"
  21324. },
  21325. "data": {
  21326. "type": "object",
  21327. "properties": {
  21328. "sessionID": {
  21329. "type": "string",
  21330. "pattern": "^ses"
  21331. },
  21332. "part": {
  21333. "$ref": "#/components/schemas/Part"
  21334. },
  21335. "time": {
  21336. "type": "number"
  21337. }
  21338. },
  21339. "required": ["sessionID", "part", "time"],
  21340. "additionalProperties": false
  21341. }
  21342. },
  21343. "required": ["type", "id", "seq", "aggregateID", "data"],
  21344. "additionalProperties": false
  21345. }
  21346. },
  21347. "required": ["type", "id", "syncEvent"],
  21348. "additionalProperties": false
  21349. },
  21350. "SyncEventMessagePartRemoved": {
  21351. "type": "object",
  21352. "properties": {
  21353. "type": {
  21354. "type": "string",
  21355. "enum": ["sync"]
  21356. },
  21357. "id": {
  21358. "type": "string"
  21359. },
  21360. "syncEvent": {
  21361. "type": "object",
  21362. "properties": {
  21363. "type": {
  21364. "type": "string",
  21365. "enum": ["message.part.removed.1"]
  21366. },
  21367. "id": {
  21368. "type": "string"
  21369. },
  21370. "seq": {
  21371. "type": "number"
  21372. },
  21373. "aggregateID": {
  21374. "type": "string"
  21375. },
  21376. "data": {
  21377. "type": "object",
  21378. "properties": {
  21379. "sessionID": {
  21380. "type": "string",
  21381. "pattern": "^ses"
  21382. },
  21383. "messageID": {
  21384. "type": "string",
  21385. "pattern": "^msg"
  21386. },
  21387. "partID": {
  21388. "type": "string",
  21389. "pattern": "^prt"
  21390. }
  21391. },
  21392. "required": ["sessionID", "messageID", "partID"],
  21393. "additionalProperties": false
  21394. }
  21395. },
  21396. "required": ["type", "id", "seq", "aggregateID", "data"],
  21397. "additionalProperties": false
  21398. }
  21399. },
  21400. "required": ["type", "id", "syncEvent"],
  21401. "additionalProperties": false
  21402. },
  21403. "SyncEventSessionNextAgentSwitched": {
  21404. "type": "object",
  21405. "properties": {
  21406. "type": {
  21407. "type": "string",
  21408. "enum": ["sync"]
  21409. },
  21410. "id": {
  21411. "type": "string"
  21412. },
  21413. "syncEvent": {
  21414. "type": "object",
  21415. "properties": {
  21416. "type": {
  21417. "type": "string",
  21418. "enum": ["session.next.agent.switched.1"]
  21419. },
  21420. "id": {
  21421. "type": "string"
  21422. },
  21423. "seq": {
  21424. "type": "number"
  21425. },
  21426. "aggregateID": {
  21427. "type": "string"
  21428. },
  21429. "data": {
  21430. "type": "object",
  21431. "properties": {
  21432. "timestamp": {
  21433. "type": "number"
  21434. },
  21435. "sessionID": {
  21436. "type": "string",
  21437. "pattern": "^ses"
  21438. },
  21439. "messageID": {
  21440. "type": "string",
  21441. "pattern": "^msg_"
  21442. },
  21443. "agent": {
  21444. "type": "string"
  21445. }
  21446. },
  21447. "required": ["timestamp", "sessionID", "messageID", "agent"],
  21448. "additionalProperties": false
  21449. }
  21450. },
  21451. "required": ["type", "id", "seq", "aggregateID", "data"],
  21452. "additionalProperties": false
  21453. }
  21454. },
  21455. "required": ["type", "id", "syncEvent"],
  21456. "additionalProperties": false
  21457. },
  21458. "SyncEventSessionNextModelSwitched": {
  21459. "type": "object",
  21460. "properties": {
  21461. "type": {
  21462. "type": "string",
  21463. "enum": ["sync"]
  21464. },
  21465. "id": {
  21466. "type": "string"
  21467. },
  21468. "syncEvent": {
  21469. "type": "object",
  21470. "properties": {
  21471. "type": {
  21472. "type": "string",
  21473. "enum": ["session.next.model.switched.1"]
  21474. },
  21475. "id": {
  21476. "type": "string"
  21477. },
  21478. "seq": {
  21479. "type": "number"
  21480. },
  21481. "aggregateID": {
  21482. "type": "string"
  21483. },
  21484. "data": {
  21485. "type": "object",
  21486. "properties": {
  21487. "timestamp": {
  21488. "type": "number"
  21489. },
  21490. "sessionID": {
  21491. "type": "string",
  21492. "pattern": "^ses"
  21493. },
  21494. "messageID": {
  21495. "type": "string",
  21496. "pattern": "^msg_"
  21497. },
  21498. "model": {
  21499. "type": "object",
  21500. "properties": {
  21501. "id": {
  21502. "type": "string"
  21503. },
  21504. "providerID": {
  21505. "type": "string"
  21506. },
  21507. "variant": {
  21508. "type": "string"
  21509. }
  21510. },
  21511. "required": ["id", "providerID"],
  21512. "additionalProperties": false
  21513. }
  21514. },
  21515. "required": ["timestamp", "sessionID", "messageID", "model"],
  21516. "additionalProperties": false
  21517. }
  21518. },
  21519. "required": ["type", "id", "seq", "aggregateID", "data"],
  21520. "additionalProperties": false
  21521. }
  21522. },
  21523. "required": ["type", "id", "syncEvent"],
  21524. "additionalProperties": false
  21525. },
  21526. "SyncEventSessionNextMoved": {
  21527. "type": "object",
  21528. "properties": {
  21529. "type": {
  21530. "type": "string",
  21531. "enum": ["sync"]
  21532. },
  21533. "id": {
  21534. "type": "string"
  21535. },
  21536. "syncEvent": {
  21537. "type": "object",
  21538. "properties": {
  21539. "type": {
  21540. "type": "string",
  21541. "enum": ["session.next.moved.1"]
  21542. },
  21543. "id": {
  21544. "type": "string"
  21545. },
  21546. "seq": {
  21547. "type": "number"
  21548. },
  21549. "aggregateID": {
  21550. "type": "string"
  21551. },
  21552. "data": {
  21553. "type": "object",
  21554. "properties": {
  21555. "timestamp": {
  21556. "type": "number"
  21557. },
  21558. "sessionID": {
  21559. "type": "string",
  21560. "pattern": "^ses"
  21561. },
  21562. "location": {
  21563. "$ref": "#/components/schemas/LocationRef"
  21564. },
  21565. "subdirectory": {
  21566. "type": "string"
  21567. }
  21568. },
  21569. "required": ["timestamp", "sessionID", "location"],
  21570. "additionalProperties": false
  21571. }
  21572. },
  21573. "required": ["type", "id", "seq", "aggregateID", "data"],
  21574. "additionalProperties": false
  21575. }
  21576. },
  21577. "required": ["type", "id", "syncEvent"],
  21578. "additionalProperties": false
  21579. },
  21580. "SyncEventSessionNextPrompted": {
  21581. "type": "object",
  21582. "properties": {
  21583. "type": {
  21584. "type": "string",
  21585. "enum": ["sync"]
  21586. },
  21587. "id": {
  21588. "type": "string"
  21589. },
  21590. "syncEvent": {
  21591. "type": "object",
  21592. "properties": {
  21593. "type": {
  21594. "type": "string",
  21595. "enum": ["session.next.prompted.1"]
  21596. },
  21597. "id": {
  21598. "type": "string"
  21599. },
  21600. "seq": {
  21601. "type": "number"
  21602. },
  21603. "aggregateID": {
  21604. "type": "string"
  21605. },
  21606. "data": {
  21607. "type": "object",
  21608. "properties": {
  21609. "timestamp": {
  21610. "type": "number"
  21611. },
  21612. "sessionID": {
  21613. "type": "string",
  21614. "pattern": "^ses"
  21615. },
  21616. "messageID": {
  21617. "type": "string",
  21618. "pattern": "^msg_"
  21619. },
  21620. "prompt": {
  21621. "$ref": "#/components/schemas/Prompt"
  21622. },
  21623. "delivery": {
  21624. "type": "string",
  21625. "enum": ["steer", "queue"]
  21626. }
  21627. },
  21628. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  21629. "additionalProperties": false
  21630. }
  21631. },
  21632. "required": ["type", "id", "seq", "aggregateID", "data"],
  21633. "additionalProperties": false
  21634. }
  21635. },
  21636. "required": ["type", "id", "syncEvent"],
  21637. "additionalProperties": false
  21638. },
  21639. "SyncEventSessionNextPromptAdmitted": {
  21640. "type": "object",
  21641. "properties": {
  21642. "type": {
  21643. "type": "string",
  21644. "enum": ["sync"]
  21645. },
  21646. "id": {
  21647. "type": "string"
  21648. },
  21649. "syncEvent": {
  21650. "type": "object",
  21651. "properties": {
  21652. "type": {
  21653. "type": "string",
  21654. "enum": ["session.next.prompt.admitted.1"]
  21655. },
  21656. "id": {
  21657. "type": "string"
  21658. },
  21659. "seq": {
  21660. "type": "number"
  21661. },
  21662. "aggregateID": {
  21663. "type": "string"
  21664. },
  21665. "data": {
  21666. "type": "object",
  21667. "properties": {
  21668. "timestamp": {
  21669. "type": "number"
  21670. },
  21671. "sessionID": {
  21672. "type": "string",
  21673. "pattern": "^ses"
  21674. },
  21675. "messageID": {
  21676. "type": "string",
  21677. "pattern": "^msg_"
  21678. },
  21679. "prompt": {
  21680. "$ref": "#/components/schemas/Prompt"
  21681. },
  21682. "delivery": {
  21683. "type": "string",
  21684. "enum": ["steer", "queue"]
  21685. }
  21686. },
  21687. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  21688. "additionalProperties": false
  21689. }
  21690. },
  21691. "required": ["type", "id", "seq", "aggregateID", "data"],
  21692. "additionalProperties": false
  21693. }
  21694. },
  21695. "required": ["type", "id", "syncEvent"],
  21696. "additionalProperties": false
  21697. },
  21698. "SyncEventSessionNextPromptPromoted": {
  21699. "type": "object",
  21700. "properties": {
  21701. "type": {
  21702. "type": "string",
  21703. "enum": ["sync"]
  21704. },
  21705. "id": {
  21706. "type": "string"
  21707. },
  21708. "syncEvent": {
  21709. "type": "object",
  21710. "properties": {
  21711. "type": {
  21712. "type": "string",
  21713. "enum": ["session.next.prompt.promoted.1"]
  21714. },
  21715. "id": {
  21716. "type": "string"
  21717. },
  21718. "seq": {
  21719. "type": "number"
  21720. },
  21721. "aggregateID": {
  21722. "type": "string"
  21723. },
  21724. "data": {
  21725. "type": "object",
  21726. "properties": {
  21727. "timestamp": {
  21728. "type": "number"
  21729. },
  21730. "sessionID": {
  21731. "type": "string",
  21732. "pattern": "^ses"
  21733. },
  21734. "messageID": {
  21735. "type": "string",
  21736. "pattern": "^msg_"
  21737. },
  21738. "prompt": {
  21739. "$ref": "#/components/schemas/Prompt"
  21740. },
  21741. "timeCreated": {
  21742. "type": "number"
  21743. }
  21744. },
  21745. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  21746. "additionalProperties": false
  21747. }
  21748. },
  21749. "required": ["type", "id", "seq", "aggregateID", "data"],
  21750. "additionalProperties": false
  21751. }
  21752. },
  21753. "required": ["type", "id", "syncEvent"],
  21754. "additionalProperties": false
  21755. },
  21756. "SyncEventSessionNextSynthetic": {
  21757. "type": "object",
  21758. "properties": {
  21759. "type": {
  21760. "type": "string",
  21761. "enum": ["sync"]
  21762. },
  21763. "id": {
  21764. "type": "string"
  21765. },
  21766. "syncEvent": {
  21767. "type": "object",
  21768. "properties": {
  21769. "type": {
  21770. "type": "string",
  21771. "enum": ["session.next.synthetic.1"]
  21772. },
  21773. "id": {
  21774. "type": "string"
  21775. },
  21776. "seq": {
  21777. "type": "number"
  21778. },
  21779. "aggregateID": {
  21780. "type": "string"
  21781. },
  21782. "data": {
  21783. "type": "object",
  21784. "properties": {
  21785. "timestamp": {
  21786. "type": "number"
  21787. },
  21788. "sessionID": {
  21789. "type": "string",
  21790. "pattern": "^ses"
  21791. },
  21792. "messageID": {
  21793. "type": "string",
  21794. "pattern": "^msg_"
  21795. },
  21796. "text": {
  21797. "type": "string"
  21798. }
  21799. },
  21800. "required": ["timestamp", "sessionID", "messageID", "text"],
  21801. "additionalProperties": false
  21802. }
  21803. },
  21804. "required": ["type", "id", "seq", "aggregateID", "data"],
  21805. "additionalProperties": false
  21806. }
  21807. },
  21808. "required": ["type", "id", "syncEvent"],
  21809. "additionalProperties": false
  21810. },
  21811. "SyncEventSessionNextShellStarted": {
  21812. "type": "object",
  21813. "properties": {
  21814. "type": {
  21815. "type": "string",
  21816. "enum": ["sync"]
  21817. },
  21818. "id": {
  21819. "type": "string"
  21820. },
  21821. "syncEvent": {
  21822. "type": "object",
  21823. "properties": {
  21824. "type": {
  21825. "type": "string",
  21826. "enum": ["session.next.shell.started.1"]
  21827. },
  21828. "id": {
  21829. "type": "string"
  21830. },
  21831. "seq": {
  21832. "type": "number"
  21833. },
  21834. "aggregateID": {
  21835. "type": "string"
  21836. },
  21837. "data": {
  21838. "type": "object",
  21839. "properties": {
  21840. "timestamp": {
  21841. "type": "number"
  21842. },
  21843. "sessionID": {
  21844. "type": "string",
  21845. "pattern": "^ses"
  21846. },
  21847. "messageID": {
  21848. "type": "string",
  21849. "pattern": "^msg_"
  21850. },
  21851. "callID": {
  21852. "type": "string"
  21853. },
  21854. "command": {
  21855. "type": "string"
  21856. }
  21857. },
  21858. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  21859. "additionalProperties": false
  21860. }
  21861. },
  21862. "required": ["type", "id", "seq", "aggregateID", "data"],
  21863. "additionalProperties": false
  21864. }
  21865. },
  21866. "required": ["type", "id", "syncEvent"],
  21867. "additionalProperties": false
  21868. },
  21869. "SyncEventSessionNextShellEnded": {
  21870. "type": "object",
  21871. "properties": {
  21872. "type": {
  21873. "type": "string",
  21874. "enum": ["sync"]
  21875. },
  21876. "id": {
  21877. "type": "string"
  21878. },
  21879. "syncEvent": {
  21880. "type": "object",
  21881. "properties": {
  21882. "type": {
  21883. "type": "string",
  21884. "enum": ["session.next.shell.ended.1"]
  21885. },
  21886. "id": {
  21887. "type": "string"
  21888. },
  21889. "seq": {
  21890. "type": "number"
  21891. },
  21892. "aggregateID": {
  21893. "type": "string"
  21894. },
  21895. "data": {
  21896. "type": "object",
  21897. "properties": {
  21898. "timestamp": {
  21899. "type": "number"
  21900. },
  21901. "sessionID": {
  21902. "type": "string",
  21903. "pattern": "^ses"
  21904. },
  21905. "callID": {
  21906. "type": "string"
  21907. },
  21908. "output": {
  21909. "type": "string"
  21910. }
  21911. },
  21912. "required": ["timestamp", "sessionID", "callID", "output"],
  21913. "additionalProperties": false
  21914. }
  21915. },
  21916. "required": ["type", "id", "seq", "aggregateID", "data"],
  21917. "additionalProperties": false
  21918. }
  21919. },
  21920. "required": ["type", "id", "syncEvent"],
  21921. "additionalProperties": false
  21922. },
  21923. "SyncEventSessionNextStepStarted": {
  21924. "type": "object",
  21925. "properties": {
  21926. "type": {
  21927. "type": "string",
  21928. "enum": ["sync"]
  21929. },
  21930. "id": {
  21931. "type": "string"
  21932. },
  21933. "syncEvent": {
  21934. "type": "object",
  21935. "properties": {
  21936. "type": {
  21937. "type": "string",
  21938. "enum": ["session.next.step.started.1"]
  21939. },
  21940. "id": {
  21941. "type": "string"
  21942. },
  21943. "seq": {
  21944. "type": "number"
  21945. },
  21946. "aggregateID": {
  21947. "type": "string"
  21948. },
  21949. "data": {
  21950. "type": "object",
  21951. "properties": {
  21952. "timestamp": {
  21953. "type": "number"
  21954. },
  21955. "sessionID": {
  21956. "type": "string",
  21957. "pattern": "^ses"
  21958. },
  21959. "assistantMessageID": {
  21960. "type": "string",
  21961. "pattern": "^msg_"
  21962. },
  21963. "agent": {
  21964. "type": "string"
  21965. },
  21966. "model": {
  21967. "type": "object",
  21968. "properties": {
  21969. "id": {
  21970. "type": "string"
  21971. },
  21972. "providerID": {
  21973. "type": "string"
  21974. },
  21975. "variant": {
  21976. "type": "string"
  21977. }
  21978. },
  21979. "required": ["id", "providerID"],
  21980. "additionalProperties": false
  21981. },
  21982. "snapshot": {
  21983. "type": "string"
  21984. }
  21985. },
  21986. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  21987. "additionalProperties": false
  21988. }
  21989. },
  21990. "required": ["type", "id", "seq", "aggregateID", "data"],
  21991. "additionalProperties": false
  21992. }
  21993. },
  21994. "required": ["type", "id", "syncEvent"],
  21995. "additionalProperties": false
  21996. },
  21997. "SyncEventSessionNextStepEnded": {
  21998. "type": "object",
  21999. "properties": {
  22000. "type": {
  22001. "type": "string",
  22002. "enum": ["sync"]
  22003. },
  22004. "id": {
  22005. "type": "string"
  22006. },
  22007. "syncEvent": {
  22008. "type": "object",
  22009. "properties": {
  22010. "type": {
  22011. "type": "string",
  22012. "enum": ["session.next.step.ended.2"]
  22013. },
  22014. "id": {
  22015. "type": "string"
  22016. },
  22017. "seq": {
  22018. "type": "number"
  22019. },
  22020. "aggregateID": {
  22021. "type": "string"
  22022. },
  22023. "data": {
  22024. "type": "object",
  22025. "properties": {
  22026. "timestamp": {
  22027. "type": "number"
  22028. },
  22029. "sessionID": {
  22030. "type": "string",
  22031. "pattern": "^ses"
  22032. },
  22033. "assistantMessageID": {
  22034. "type": "string",
  22035. "pattern": "^msg_"
  22036. },
  22037. "finish": {
  22038. "type": "string"
  22039. },
  22040. "cost": {
  22041. "type": "number"
  22042. },
  22043. "tokens": {
  22044. "type": "object",
  22045. "properties": {
  22046. "input": {
  22047. "type": "number"
  22048. },
  22049. "output": {
  22050. "type": "number"
  22051. },
  22052. "reasoning": {
  22053. "type": "number"
  22054. },
  22055. "cache": {
  22056. "type": "object",
  22057. "properties": {
  22058. "read": {
  22059. "type": "number"
  22060. },
  22061. "write": {
  22062. "type": "number"
  22063. }
  22064. },
  22065. "required": ["read", "write"],
  22066. "additionalProperties": false
  22067. }
  22068. },
  22069. "required": ["input", "output", "reasoning", "cache"],
  22070. "additionalProperties": false
  22071. },
  22072. "snapshot": {
  22073. "type": "string"
  22074. }
  22075. },
  22076. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  22077. "additionalProperties": false
  22078. }
  22079. },
  22080. "required": ["type", "id", "seq", "aggregateID", "data"],
  22081. "additionalProperties": false
  22082. }
  22083. },
  22084. "required": ["type", "id", "syncEvent"],
  22085. "additionalProperties": false
  22086. },
  22087. "SyncEventSessionNextStepFailed": {
  22088. "type": "object",
  22089. "properties": {
  22090. "type": {
  22091. "type": "string",
  22092. "enum": ["sync"]
  22093. },
  22094. "id": {
  22095. "type": "string"
  22096. },
  22097. "syncEvent": {
  22098. "type": "object",
  22099. "properties": {
  22100. "type": {
  22101. "type": "string",
  22102. "enum": ["session.next.step.failed.2"]
  22103. },
  22104. "id": {
  22105. "type": "string"
  22106. },
  22107. "seq": {
  22108. "type": "number"
  22109. },
  22110. "aggregateID": {
  22111. "type": "string"
  22112. },
  22113. "data": {
  22114. "type": "object",
  22115. "properties": {
  22116. "timestamp": {
  22117. "type": "number"
  22118. },
  22119. "sessionID": {
  22120. "type": "string",
  22121. "pattern": "^ses"
  22122. },
  22123. "assistantMessageID": {
  22124. "type": "string",
  22125. "pattern": "^msg_"
  22126. },
  22127. "error": {
  22128. "$ref": "#/components/schemas/SessionErrorUnknown"
  22129. }
  22130. },
  22131. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  22132. "additionalProperties": false
  22133. }
  22134. },
  22135. "required": ["type", "id", "seq", "aggregateID", "data"],
  22136. "additionalProperties": false
  22137. }
  22138. },
  22139. "required": ["type", "id", "syncEvent"],
  22140. "additionalProperties": false
  22141. },
  22142. "SyncEventSessionNextTextStarted": {
  22143. "type": "object",
  22144. "properties": {
  22145. "type": {
  22146. "type": "string",
  22147. "enum": ["sync"]
  22148. },
  22149. "id": {
  22150. "type": "string"
  22151. },
  22152. "syncEvent": {
  22153. "type": "object",
  22154. "properties": {
  22155. "type": {
  22156. "type": "string",
  22157. "enum": ["session.next.text.started.1"]
  22158. },
  22159. "id": {
  22160. "type": "string"
  22161. },
  22162. "seq": {
  22163. "type": "number"
  22164. },
  22165. "aggregateID": {
  22166. "type": "string"
  22167. },
  22168. "data": {
  22169. "type": "object",
  22170. "properties": {
  22171. "timestamp": {
  22172. "type": "number"
  22173. },
  22174. "sessionID": {
  22175. "type": "string",
  22176. "pattern": "^ses"
  22177. },
  22178. "assistantMessageID": {
  22179. "type": "string",
  22180. "pattern": "^msg_"
  22181. },
  22182. "textID": {
  22183. "type": "string"
  22184. }
  22185. },
  22186. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  22187. "additionalProperties": false
  22188. }
  22189. },
  22190. "required": ["type", "id", "seq", "aggregateID", "data"],
  22191. "additionalProperties": false
  22192. }
  22193. },
  22194. "required": ["type", "id", "syncEvent"],
  22195. "additionalProperties": false
  22196. },
  22197. "SyncEventSessionNextTextEnded": {
  22198. "type": "object",
  22199. "properties": {
  22200. "type": {
  22201. "type": "string",
  22202. "enum": ["sync"]
  22203. },
  22204. "id": {
  22205. "type": "string"
  22206. },
  22207. "syncEvent": {
  22208. "type": "object",
  22209. "properties": {
  22210. "type": {
  22211. "type": "string",
  22212. "enum": ["session.next.text.ended.1"]
  22213. },
  22214. "id": {
  22215. "type": "string"
  22216. },
  22217. "seq": {
  22218. "type": "number"
  22219. },
  22220. "aggregateID": {
  22221. "type": "string"
  22222. },
  22223. "data": {
  22224. "type": "object",
  22225. "properties": {
  22226. "timestamp": {
  22227. "type": "number"
  22228. },
  22229. "sessionID": {
  22230. "type": "string",
  22231. "pattern": "^ses"
  22232. },
  22233. "assistantMessageID": {
  22234. "type": "string",
  22235. "pattern": "^msg_"
  22236. },
  22237. "textID": {
  22238. "type": "string"
  22239. },
  22240. "text": {
  22241. "type": "string"
  22242. }
  22243. },
  22244. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  22245. "additionalProperties": false
  22246. }
  22247. },
  22248. "required": ["type", "id", "seq", "aggregateID", "data"],
  22249. "additionalProperties": false
  22250. }
  22251. },
  22252. "required": ["type", "id", "syncEvent"],
  22253. "additionalProperties": false
  22254. },
  22255. "SyncEventSessionNextReasoningStarted": {
  22256. "type": "object",
  22257. "properties": {
  22258. "type": {
  22259. "type": "string",
  22260. "enum": ["sync"]
  22261. },
  22262. "id": {
  22263. "type": "string"
  22264. },
  22265. "syncEvent": {
  22266. "type": "object",
  22267. "properties": {
  22268. "type": {
  22269. "type": "string",
  22270. "enum": ["session.next.reasoning.started.1"]
  22271. },
  22272. "id": {
  22273. "type": "string"
  22274. },
  22275. "seq": {
  22276. "type": "number"
  22277. },
  22278. "aggregateID": {
  22279. "type": "string"
  22280. },
  22281. "data": {
  22282. "type": "object",
  22283. "properties": {
  22284. "timestamp": {
  22285. "type": "number"
  22286. },
  22287. "sessionID": {
  22288. "type": "string",
  22289. "pattern": "^ses"
  22290. },
  22291. "assistantMessageID": {
  22292. "type": "string",
  22293. "pattern": "^msg_"
  22294. },
  22295. "reasoningID": {
  22296. "type": "string"
  22297. },
  22298. "providerMetadata": {
  22299. "type": "object",
  22300. "additionalProperties": {
  22301. "type": "object"
  22302. }
  22303. }
  22304. },
  22305. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  22306. "additionalProperties": false
  22307. }
  22308. },
  22309. "required": ["type", "id", "seq", "aggregateID", "data"],
  22310. "additionalProperties": false
  22311. }
  22312. },
  22313. "required": ["type", "id", "syncEvent"],
  22314. "additionalProperties": false
  22315. },
  22316. "SyncEventSessionNextReasoningEnded": {
  22317. "type": "object",
  22318. "properties": {
  22319. "type": {
  22320. "type": "string",
  22321. "enum": ["sync"]
  22322. },
  22323. "id": {
  22324. "type": "string"
  22325. },
  22326. "syncEvent": {
  22327. "type": "object",
  22328. "properties": {
  22329. "type": {
  22330. "type": "string",
  22331. "enum": ["session.next.reasoning.ended.1"]
  22332. },
  22333. "id": {
  22334. "type": "string"
  22335. },
  22336. "seq": {
  22337. "type": "number"
  22338. },
  22339. "aggregateID": {
  22340. "type": "string"
  22341. },
  22342. "data": {
  22343. "type": "object",
  22344. "properties": {
  22345. "timestamp": {
  22346. "type": "number"
  22347. },
  22348. "sessionID": {
  22349. "type": "string",
  22350. "pattern": "^ses"
  22351. },
  22352. "assistantMessageID": {
  22353. "type": "string",
  22354. "pattern": "^msg_"
  22355. },
  22356. "reasoningID": {
  22357. "type": "string"
  22358. },
  22359. "text": {
  22360. "type": "string"
  22361. },
  22362. "providerMetadata": {
  22363. "type": "object",
  22364. "additionalProperties": {
  22365. "type": "object"
  22366. }
  22367. }
  22368. },
  22369. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  22370. "additionalProperties": false
  22371. }
  22372. },
  22373. "required": ["type", "id", "seq", "aggregateID", "data"],
  22374. "additionalProperties": false
  22375. }
  22376. },
  22377. "required": ["type", "id", "syncEvent"],
  22378. "additionalProperties": false
  22379. },
  22380. "SyncEventSessionNextToolInputStarted": {
  22381. "type": "object",
  22382. "properties": {
  22383. "type": {
  22384. "type": "string",
  22385. "enum": ["sync"]
  22386. },
  22387. "id": {
  22388. "type": "string"
  22389. },
  22390. "syncEvent": {
  22391. "type": "object",
  22392. "properties": {
  22393. "type": {
  22394. "type": "string",
  22395. "enum": ["session.next.tool.input.started.1"]
  22396. },
  22397. "id": {
  22398. "type": "string"
  22399. },
  22400. "seq": {
  22401. "type": "number"
  22402. },
  22403. "aggregateID": {
  22404. "type": "string"
  22405. },
  22406. "data": {
  22407. "type": "object",
  22408. "properties": {
  22409. "timestamp": {
  22410. "type": "number"
  22411. },
  22412. "sessionID": {
  22413. "type": "string",
  22414. "pattern": "^ses"
  22415. },
  22416. "assistantMessageID": {
  22417. "type": "string",
  22418. "pattern": "^msg_"
  22419. },
  22420. "callID": {
  22421. "type": "string"
  22422. },
  22423. "name": {
  22424. "type": "string"
  22425. }
  22426. },
  22427. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  22428. "additionalProperties": false
  22429. }
  22430. },
  22431. "required": ["type", "id", "seq", "aggregateID", "data"],
  22432. "additionalProperties": false
  22433. }
  22434. },
  22435. "required": ["type", "id", "syncEvent"],
  22436. "additionalProperties": false
  22437. },
  22438. "SyncEventSessionNextToolInputEnded": {
  22439. "type": "object",
  22440. "properties": {
  22441. "type": {
  22442. "type": "string",
  22443. "enum": ["sync"]
  22444. },
  22445. "id": {
  22446. "type": "string"
  22447. },
  22448. "syncEvent": {
  22449. "type": "object",
  22450. "properties": {
  22451. "type": {
  22452. "type": "string",
  22453. "enum": ["session.next.tool.input.ended.1"]
  22454. },
  22455. "id": {
  22456. "type": "string"
  22457. },
  22458. "seq": {
  22459. "type": "number"
  22460. },
  22461. "aggregateID": {
  22462. "type": "string"
  22463. },
  22464. "data": {
  22465. "type": "object",
  22466. "properties": {
  22467. "timestamp": {
  22468. "type": "number"
  22469. },
  22470. "sessionID": {
  22471. "type": "string",
  22472. "pattern": "^ses"
  22473. },
  22474. "assistantMessageID": {
  22475. "type": "string",
  22476. "pattern": "^msg_"
  22477. },
  22478. "callID": {
  22479. "type": "string"
  22480. },
  22481. "text": {
  22482. "type": "string"
  22483. }
  22484. },
  22485. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  22486. "additionalProperties": false
  22487. }
  22488. },
  22489. "required": ["type", "id", "seq", "aggregateID", "data"],
  22490. "additionalProperties": false
  22491. }
  22492. },
  22493. "required": ["type", "id", "syncEvent"],
  22494. "additionalProperties": false
  22495. },
  22496. "SyncEventSessionNextToolCalled": {
  22497. "type": "object",
  22498. "properties": {
  22499. "type": {
  22500. "type": "string",
  22501. "enum": ["sync"]
  22502. },
  22503. "id": {
  22504. "type": "string"
  22505. },
  22506. "syncEvent": {
  22507. "type": "object",
  22508. "properties": {
  22509. "type": {
  22510. "type": "string",
  22511. "enum": ["session.next.tool.called.1"]
  22512. },
  22513. "id": {
  22514. "type": "string"
  22515. },
  22516. "seq": {
  22517. "type": "number"
  22518. },
  22519. "aggregateID": {
  22520. "type": "string"
  22521. },
  22522. "data": {
  22523. "type": "object",
  22524. "properties": {
  22525. "timestamp": {
  22526. "type": "number"
  22527. },
  22528. "sessionID": {
  22529. "type": "string",
  22530. "pattern": "^ses"
  22531. },
  22532. "assistantMessageID": {
  22533. "type": "string",
  22534. "pattern": "^msg_"
  22535. },
  22536. "callID": {
  22537. "type": "string"
  22538. },
  22539. "tool": {
  22540. "type": "string"
  22541. },
  22542. "input": {
  22543. "type": "object"
  22544. },
  22545. "provider": {
  22546. "type": "object",
  22547. "properties": {
  22548. "executed": {
  22549. "type": "boolean"
  22550. },
  22551. "metadata": {
  22552. "type": "object",
  22553. "additionalProperties": {
  22554. "type": "object"
  22555. }
  22556. }
  22557. },
  22558. "required": ["executed"],
  22559. "additionalProperties": false
  22560. }
  22561. },
  22562. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  22563. "additionalProperties": false
  22564. }
  22565. },
  22566. "required": ["type", "id", "seq", "aggregateID", "data"],
  22567. "additionalProperties": false
  22568. }
  22569. },
  22570. "required": ["type", "id", "syncEvent"],
  22571. "additionalProperties": false
  22572. },
  22573. "SyncEventSessionNextToolProgress": {
  22574. "type": "object",
  22575. "properties": {
  22576. "type": {
  22577. "type": "string",
  22578. "enum": ["sync"]
  22579. },
  22580. "id": {
  22581. "type": "string"
  22582. },
  22583. "syncEvent": {
  22584. "type": "object",
  22585. "properties": {
  22586. "type": {
  22587. "type": "string",
  22588. "enum": ["session.next.tool.progress.1"]
  22589. },
  22590. "id": {
  22591. "type": "string"
  22592. },
  22593. "seq": {
  22594. "type": "number"
  22595. },
  22596. "aggregateID": {
  22597. "type": "string"
  22598. },
  22599. "data": {
  22600. "type": "object",
  22601. "properties": {
  22602. "timestamp": {
  22603. "type": "number"
  22604. },
  22605. "sessionID": {
  22606. "type": "string",
  22607. "pattern": "^ses"
  22608. },
  22609. "assistantMessageID": {
  22610. "type": "string",
  22611. "pattern": "^msg_"
  22612. },
  22613. "callID": {
  22614. "type": "string"
  22615. },
  22616. "structured": {
  22617. "type": "object"
  22618. },
  22619. "content": {
  22620. "type": "array",
  22621. "items": {
  22622. "anyOf": [
  22623. {
  22624. "$ref": "#/components/schemas/ToolTextContent"
  22625. },
  22626. {
  22627. "$ref": "#/components/schemas/ToolFileContent"
  22628. }
  22629. ]
  22630. }
  22631. }
  22632. },
  22633. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  22634. "additionalProperties": false
  22635. }
  22636. },
  22637. "required": ["type", "id", "seq", "aggregateID", "data"],
  22638. "additionalProperties": false
  22639. }
  22640. },
  22641. "required": ["type", "id", "syncEvent"],
  22642. "additionalProperties": false
  22643. },
  22644. "SyncEventSessionNextToolSuccess": {
  22645. "type": "object",
  22646. "properties": {
  22647. "type": {
  22648. "type": "string",
  22649. "enum": ["sync"]
  22650. },
  22651. "id": {
  22652. "type": "string"
  22653. },
  22654. "syncEvent": {
  22655. "type": "object",
  22656. "properties": {
  22657. "type": {
  22658. "type": "string",
  22659. "enum": ["session.next.tool.success.1"]
  22660. },
  22661. "id": {
  22662. "type": "string"
  22663. },
  22664. "seq": {
  22665. "type": "number"
  22666. },
  22667. "aggregateID": {
  22668. "type": "string"
  22669. },
  22670. "data": {
  22671. "type": "object",
  22672. "properties": {
  22673. "timestamp": {
  22674. "type": "number"
  22675. },
  22676. "sessionID": {
  22677. "type": "string",
  22678. "pattern": "^ses"
  22679. },
  22680. "assistantMessageID": {
  22681. "type": "string",
  22682. "pattern": "^msg_"
  22683. },
  22684. "callID": {
  22685. "type": "string"
  22686. },
  22687. "structured": {
  22688. "type": "object"
  22689. },
  22690. "content": {
  22691. "type": "array",
  22692. "items": {
  22693. "anyOf": [
  22694. {
  22695. "$ref": "#/components/schemas/ToolTextContent"
  22696. },
  22697. {
  22698. "$ref": "#/components/schemas/ToolFileContent"
  22699. }
  22700. ]
  22701. }
  22702. },
  22703. "result": {},
  22704. "provider": {
  22705. "type": "object",
  22706. "properties": {
  22707. "executed": {
  22708. "type": "boolean"
  22709. },
  22710. "metadata": {
  22711. "type": "object",
  22712. "additionalProperties": {
  22713. "type": "object"
  22714. }
  22715. }
  22716. },
  22717. "required": ["executed"],
  22718. "additionalProperties": false
  22719. }
  22720. },
  22721. "required": [
  22722. "timestamp",
  22723. "sessionID",
  22724. "assistantMessageID",
  22725. "callID",
  22726. "structured",
  22727. "content",
  22728. "provider"
  22729. ],
  22730. "additionalProperties": false
  22731. }
  22732. },
  22733. "required": ["type", "id", "seq", "aggregateID", "data"],
  22734. "additionalProperties": false
  22735. }
  22736. },
  22737. "required": ["type", "id", "syncEvent"],
  22738. "additionalProperties": false
  22739. },
  22740. "SyncEventSessionNextToolFailed": {
  22741. "type": "object",
  22742. "properties": {
  22743. "type": {
  22744. "type": "string",
  22745. "enum": ["sync"]
  22746. },
  22747. "id": {
  22748. "type": "string"
  22749. },
  22750. "syncEvent": {
  22751. "type": "object",
  22752. "properties": {
  22753. "type": {
  22754. "type": "string",
  22755. "enum": ["session.next.tool.failed.1"]
  22756. },
  22757. "id": {
  22758. "type": "string"
  22759. },
  22760. "seq": {
  22761. "type": "number"
  22762. },
  22763. "aggregateID": {
  22764. "type": "string"
  22765. },
  22766. "data": {
  22767. "type": "object",
  22768. "properties": {
  22769. "timestamp": {
  22770. "type": "number"
  22771. },
  22772. "sessionID": {
  22773. "type": "string",
  22774. "pattern": "^ses"
  22775. },
  22776. "assistantMessageID": {
  22777. "type": "string",
  22778. "pattern": "^msg_"
  22779. },
  22780. "callID": {
  22781. "type": "string"
  22782. },
  22783. "error": {
  22784. "$ref": "#/components/schemas/SessionErrorUnknown"
  22785. },
  22786. "result": {},
  22787. "provider": {
  22788. "type": "object",
  22789. "properties": {
  22790. "executed": {
  22791. "type": "boolean"
  22792. },
  22793. "metadata": {
  22794. "type": "object",
  22795. "additionalProperties": {
  22796. "type": "object"
  22797. }
  22798. }
  22799. },
  22800. "required": ["executed"],
  22801. "additionalProperties": false
  22802. }
  22803. },
  22804. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  22805. "additionalProperties": false
  22806. }
  22807. },
  22808. "required": ["type", "id", "seq", "aggregateID", "data"],
  22809. "additionalProperties": false
  22810. }
  22811. },
  22812. "required": ["type", "id", "syncEvent"],
  22813. "additionalProperties": false
  22814. },
  22815. "SyncEventSessionNextRetried": {
  22816. "type": "object",
  22817. "properties": {
  22818. "type": {
  22819. "type": "string",
  22820. "enum": ["sync"]
  22821. },
  22822. "id": {
  22823. "type": "string"
  22824. },
  22825. "syncEvent": {
  22826. "type": "object",
  22827. "properties": {
  22828. "type": {
  22829. "type": "string",
  22830. "enum": ["session.next.retried.1"]
  22831. },
  22832. "id": {
  22833. "type": "string"
  22834. },
  22835. "seq": {
  22836. "type": "number"
  22837. },
  22838. "aggregateID": {
  22839. "type": "string"
  22840. },
  22841. "data": {
  22842. "type": "object",
  22843. "properties": {
  22844. "timestamp": {
  22845. "type": "number"
  22846. },
  22847. "sessionID": {
  22848. "type": "string",
  22849. "pattern": "^ses"
  22850. },
  22851. "attempt": {
  22852. "type": "number"
  22853. },
  22854. "error": {
  22855. "$ref": "#/components/schemas/SessionNextRetry_error"
  22856. }
  22857. },
  22858. "required": ["timestamp", "sessionID", "attempt", "error"],
  22859. "additionalProperties": false
  22860. }
  22861. },
  22862. "required": ["type", "id", "seq", "aggregateID", "data"],
  22863. "additionalProperties": false
  22864. }
  22865. },
  22866. "required": ["type", "id", "syncEvent"],
  22867. "additionalProperties": false
  22868. },
  22869. "SyncEventSessionNextCompactionStarted": {
  22870. "type": "object",
  22871. "properties": {
  22872. "type": {
  22873. "type": "string",
  22874. "enum": ["sync"]
  22875. },
  22876. "id": {
  22877. "type": "string"
  22878. },
  22879. "syncEvent": {
  22880. "type": "object",
  22881. "properties": {
  22882. "type": {
  22883. "type": "string",
  22884. "enum": ["session.next.compaction.started.1"]
  22885. },
  22886. "id": {
  22887. "type": "string"
  22888. },
  22889. "seq": {
  22890. "type": "number"
  22891. },
  22892. "aggregateID": {
  22893. "type": "string"
  22894. },
  22895. "data": {
  22896. "type": "object",
  22897. "properties": {
  22898. "timestamp": {
  22899. "type": "number"
  22900. },
  22901. "sessionID": {
  22902. "type": "string",
  22903. "pattern": "^ses"
  22904. },
  22905. "messageID": {
  22906. "type": "string",
  22907. "pattern": "^msg_"
  22908. },
  22909. "reason": {
  22910. "type": "string",
  22911. "enum": ["auto", "manual"]
  22912. }
  22913. },
  22914. "required": ["timestamp", "sessionID", "messageID", "reason"],
  22915. "additionalProperties": false
  22916. }
  22917. },
  22918. "required": ["type", "id", "seq", "aggregateID", "data"],
  22919. "additionalProperties": false
  22920. }
  22921. },
  22922. "required": ["type", "id", "syncEvent"],
  22923. "additionalProperties": false
  22924. },
  22925. "SyncEventSessionNextCompactionDelta": {
  22926. "type": "object",
  22927. "properties": {
  22928. "type": {
  22929. "type": "string",
  22930. "enum": ["sync"]
  22931. },
  22932. "id": {
  22933. "type": "string"
  22934. },
  22935. "syncEvent": {
  22936. "type": "object",
  22937. "properties": {
  22938. "type": {
  22939. "type": "string",
  22940. "enum": ["session.next.compaction.delta.1"]
  22941. },
  22942. "id": {
  22943. "type": "string"
  22944. },
  22945. "seq": {
  22946. "type": "number"
  22947. },
  22948. "aggregateID": {
  22949. "type": "string"
  22950. },
  22951. "data": {
  22952. "type": "object",
  22953. "properties": {
  22954. "timestamp": {
  22955. "type": "number"
  22956. },
  22957. "sessionID": {
  22958. "type": "string",
  22959. "pattern": "^ses"
  22960. },
  22961. "text": {
  22962. "type": "string"
  22963. }
  22964. },
  22965. "required": ["timestamp", "sessionID", "text"],
  22966. "additionalProperties": false
  22967. }
  22968. },
  22969. "required": ["type", "id", "seq", "aggregateID", "data"],
  22970. "additionalProperties": false
  22971. }
  22972. },
  22973. "required": ["type", "id", "syncEvent"],
  22974. "additionalProperties": false
  22975. },
  22976. "SyncEventSessionNextCompactionEnded": {
  22977. "type": "object",
  22978. "properties": {
  22979. "type": {
  22980. "type": "string",
  22981. "enum": ["sync"]
  22982. },
  22983. "id": {
  22984. "type": "string"
  22985. },
  22986. "syncEvent": {
  22987. "type": "object",
  22988. "properties": {
  22989. "type": {
  22990. "type": "string",
  22991. "enum": ["session.next.compaction.ended.1"]
  22992. },
  22993. "id": {
  22994. "type": "string"
  22995. },
  22996. "seq": {
  22997. "type": "number"
  22998. },
  22999. "aggregateID": {
  23000. "type": "string"
  23001. },
  23002. "data": {
  23003. "type": "object",
  23004. "properties": {
  23005. "timestamp": {
  23006. "type": "number"
  23007. },
  23008. "sessionID": {
  23009. "type": "string",
  23010. "pattern": "^ses"
  23011. },
  23012. "text": {
  23013. "type": "string"
  23014. },
  23015. "include": {
  23016. "type": "string"
  23017. }
  23018. },
  23019. "required": ["timestamp", "sessionID", "text"],
  23020. "additionalProperties": false
  23021. }
  23022. },
  23023. "required": ["type", "id", "seq", "aggregateID", "data"],
  23024. "additionalProperties": false
  23025. }
  23026. },
  23027. "required": ["type", "id", "syncEvent"],
  23028. "additionalProperties": false
  23029. },
  23030. "PolicyEffect": {
  23031. "type": "string",
  23032. "enum": ["allow", "deny"]
  23033. },
  23034. "ConfigV2ExperimentalPolicy": {
  23035. "type": "object",
  23036. "properties": {
  23037. "action": {
  23038. "type": "string",
  23039. "enum": ["provider.use"]
  23040. },
  23041. "effect": {
  23042. "$ref": "#/components/schemas/PolicyEffect"
  23043. },
  23044. "resource": {
  23045. "type": "string"
  23046. }
  23047. },
  23048. "required": ["action", "effect", "resource"],
  23049. "additionalProperties": false
  23050. },
  23051. "ProjectDirectories": {
  23052. "type": "array",
  23053. "items": {
  23054. "type": "string"
  23055. }
  23056. },
  23057. "ProjectCopyCopy": {
  23058. "type": "object",
  23059. "properties": {
  23060. "directory": {
  23061. "type": "string"
  23062. }
  23063. },
  23064. "required": ["directory"],
  23065. "additionalProperties": false
  23066. },
  23067. "LocationInfo": {
  23068. "type": "object",
  23069. "properties": {
  23070. "directory": {
  23071. "type": "string"
  23072. },
  23073. "workspaceID": {
  23074. "type": "string",
  23075. "pattern": "^wrk"
  23076. },
  23077. "project": {
  23078. "type": "object",
  23079. "properties": {
  23080. "id": {
  23081. "type": "string"
  23082. },
  23083. "directory": {
  23084. "type": "string"
  23085. }
  23086. },
  23087. "required": ["id", "directory"],
  23088. "additionalProperties": false
  23089. }
  23090. },
  23091. "required": ["directory", "project"],
  23092. "additionalProperties": false
  23093. },
  23094. "PermissionV2Effect": {
  23095. "type": "string",
  23096. "enum": ["allow", "deny", "ask"]
  23097. },
  23098. "PermissionV2Rule": {
  23099. "type": "object",
  23100. "properties": {
  23101. "action": {
  23102. "type": "string"
  23103. },
  23104. "resource": {
  23105. "type": "string"
  23106. },
  23107. "effect": {
  23108. "$ref": "#/components/schemas/PermissionV2Effect"
  23109. }
  23110. },
  23111. "required": ["action", "resource", "effect"],
  23112. "additionalProperties": false
  23113. },
  23114. "PermissionV2Ruleset": {
  23115. "type": "array",
  23116. "items": {
  23117. "$ref": "#/components/schemas/PermissionV2Rule"
  23118. }
  23119. },
  23120. "AgentV2Info": {
  23121. "type": "object",
  23122. "properties": {
  23123. "id": {
  23124. "type": "string"
  23125. },
  23126. "model": {
  23127. "type": "object",
  23128. "properties": {
  23129. "id": {
  23130. "type": "string"
  23131. },
  23132. "providerID": {
  23133. "type": "string"
  23134. },
  23135. "variant": {
  23136. "type": "string"
  23137. }
  23138. },
  23139. "required": ["id", "providerID"],
  23140. "additionalProperties": false
  23141. },
  23142. "request": {
  23143. "type": "object",
  23144. "properties": {
  23145. "headers": {
  23146. "type": "object",
  23147. "additionalProperties": {
  23148. "type": "string"
  23149. }
  23150. },
  23151. "body": {
  23152. "type": "object"
  23153. }
  23154. },
  23155. "required": ["headers", "body"],
  23156. "additionalProperties": false
  23157. },
  23158. "system": {
  23159. "type": "string"
  23160. },
  23161. "description": {
  23162. "type": "string"
  23163. },
  23164. "mode": {
  23165. "type": "string",
  23166. "enum": ["subagent", "primary", "all"]
  23167. },
  23168. "hidden": {
  23169. "type": "boolean"
  23170. },
  23171. "color": {
  23172. "anyOf": [
  23173. {
  23174. "type": "string",
  23175. "pattern": "^#[0-9a-fA-F]{6}$"
  23176. },
  23177. {
  23178. "type": "string",
  23179. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  23180. }
  23181. ]
  23182. },
  23183. "steps": {
  23184. "type": "integer",
  23185. "exclusiveMinimum": 0
  23186. },
  23187. "permissions": {
  23188. "$ref": "#/components/schemas/PermissionV2Ruleset"
  23189. }
  23190. },
  23191. "required": ["id", "request", "mode", "hidden", "permissions"],
  23192. "additionalProperties": false
  23193. },
  23194. "SessionV2Info": {
  23195. "type": "object",
  23196. "properties": {
  23197. "id": {
  23198. "type": "string",
  23199. "pattern": "^ses"
  23200. },
  23201. "parentID": {
  23202. "type": "string",
  23203. "pattern": "^ses"
  23204. },
  23205. "projectID": {
  23206. "type": "string"
  23207. },
  23208. "agent": {
  23209. "type": "string"
  23210. },
  23211. "model": {
  23212. "type": "object",
  23213. "properties": {
  23214. "id": {
  23215. "type": "string"
  23216. },
  23217. "providerID": {
  23218. "type": "string"
  23219. },
  23220. "variant": {
  23221. "type": "string"
  23222. }
  23223. },
  23224. "required": ["id", "providerID"],
  23225. "additionalProperties": false
  23226. },
  23227. "cost": {
  23228. "type": "number"
  23229. },
  23230. "tokens": {
  23231. "type": "object",
  23232. "properties": {
  23233. "input": {
  23234. "type": "number"
  23235. },
  23236. "output": {
  23237. "type": "number"
  23238. },
  23239. "reasoning": {
  23240. "type": "number"
  23241. },
  23242. "cache": {
  23243. "type": "object",
  23244. "properties": {
  23245. "read": {
  23246. "type": "number"
  23247. },
  23248. "write": {
  23249. "type": "number"
  23250. }
  23251. },
  23252. "required": ["read", "write"],
  23253. "additionalProperties": false
  23254. }
  23255. },
  23256. "required": ["input", "output", "reasoning", "cache"],
  23257. "additionalProperties": false
  23258. },
  23259. "time": {
  23260. "type": "object",
  23261. "properties": {
  23262. "created": {
  23263. "type": "number"
  23264. },
  23265. "updated": {
  23266. "type": "number"
  23267. },
  23268. "archived": {
  23269. "type": "number"
  23270. }
  23271. },
  23272. "required": ["created", "updated"],
  23273. "additionalProperties": false
  23274. },
  23275. "title": {
  23276. "type": "string"
  23277. },
  23278. "location": {
  23279. "$ref": "#/components/schemas/LocationRef"
  23280. },
  23281. "subpath": {
  23282. "type": "string"
  23283. }
  23284. },
  23285. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  23286. "additionalProperties": false
  23287. },
  23288. "SessionInputAdmitted": {
  23289. "type": "object",
  23290. "properties": {
  23291. "admittedSeq": {
  23292. "type": "integer",
  23293. "minimum": 0
  23294. },
  23295. "id": {
  23296. "type": "string",
  23297. "pattern": "^msg_"
  23298. },
  23299. "sessionID": {
  23300. "type": "string",
  23301. "pattern": "^ses"
  23302. },
  23303. "prompt": {
  23304. "$ref": "#/components/schemas/Prompt"
  23305. },
  23306. "delivery": {
  23307. "type": "string",
  23308. "enum": ["steer", "queue"]
  23309. },
  23310. "timeCreated": {
  23311. "type": "number"
  23312. },
  23313. "promotedSeq": {
  23314. "type": "integer",
  23315. "minimum": 0
  23316. }
  23317. },
  23318. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  23319. "additionalProperties": false
  23320. },
  23321. "SessionMessageAgentSwitched": {
  23322. "type": "object",
  23323. "properties": {
  23324. "id": {
  23325. "type": "string",
  23326. "pattern": "^msg_"
  23327. },
  23328. "metadata": {
  23329. "type": "object"
  23330. },
  23331. "time": {
  23332. "type": "object",
  23333. "properties": {
  23334. "created": {
  23335. "type": "number"
  23336. }
  23337. },
  23338. "required": ["created"],
  23339. "additionalProperties": false
  23340. },
  23341. "type": {
  23342. "type": "string",
  23343. "enum": ["agent-switched"]
  23344. },
  23345. "agent": {
  23346. "type": "string"
  23347. }
  23348. },
  23349. "required": ["id", "time", "type", "agent"],
  23350. "additionalProperties": false
  23351. },
  23352. "SessionMessageModelSwitched": {
  23353. "type": "object",
  23354. "properties": {
  23355. "id": {
  23356. "type": "string",
  23357. "pattern": "^msg_"
  23358. },
  23359. "metadata": {
  23360. "type": "object"
  23361. },
  23362. "time": {
  23363. "type": "object",
  23364. "properties": {
  23365. "created": {
  23366. "type": "number"
  23367. }
  23368. },
  23369. "required": ["created"],
  23370. "additionalProperties": false
  23371. },
  23372. "type": {
  23373. "type": "string",
  23374. "enum": ["model-switched"]
  23375. },
  23376. "model": {
  23377. "type": "object",
  23378. "properties": {
  23379. "id": {
  23380. "type": "string"
  23381. },
  23382. "providerID": {
  23383. "type": "string"
  23384. },
  23385. "variant": {
  23386. "type": "string"
  23387. }
  23388. },
  23389. "required": ["id", "providerID"],
  23390. "additionalProperties": false
  23391. }
  23392. },
  23393. "required": ["id", "time", "type", "model"],
  23394. "additionalProperties": false
  23395. },
  23396. "SessionMessageUser": {
  23397. "type": "object",
  23398. "properties": {
  23399. "id": {
  23400. "type": "string",
  23401. "pattern": "^msg_"
  23402. },
  23403. "metadata": {
  23404. "type": "object"
  23405. },
  23406. "time": {
  23407. "type": "object",
  23408. "properties": {
  23409. "created": {
  23410. "type": "number"
  23411. }
  23412. },
  23413. "required": ["created"],
  23414. "additionalProperties": false
  23415. },
  23416. "text": {
  23417. "type": "string"
  23418. },
  23419. "files": {
  23420. "type": "array",
  23421. "items": {
  23422. "$ref": "#/components/schemas/PromptFileAttachment"
  23423. }
  23424. },
  23425. "agents": {
  23426. "type": "array",
  23427. "items": {
  23428. "$ref": "#/components/schemas/PromptAgentAttachment"
  23429. }
  23430. },
  23431. "references": {
  23432. "type": "array",
  23433. "items": {
  23434. "$ref": "#/components/schemas/PromptReferenceAttachment"
  23435. }
  23436. },
  23437. "type": {
  23438. "type": "string",
  23439. "enum": ["user"]
  23440. }
  23441. },
  23442. "required": ["id", "time", "text", "type"],
  23443. "additionalProperties": false
  23444. },
  23445. "SessionMessageSynthetic": {
  23446. "type": "object",
  23447. "properties": {
  23448. "id": {
  23449. "type": "string",
  23450. "pattern": "^msg_"
  23451. },
  23452. "metadata": {
  23453. "type": "object"
  23454. },
  23455. "time": {
  23456. "type": "object",
  23457. "properties": {
  23458. "created": {
  23459. "type": "number"
  23460. }
  23461. },
  23462. "required": ["created"],
  23463. "additionalProperties": false
  23464. },
  23465. "sessionID": {
  23466. "type": "string",
  23467. "pattern": "^ses"
  23468. },
  23469. "text": {
  23470. "type": "string"
  23471. },
  23472. "type": {
  23473. "type": "string",
  23474. "enum": ["synthetic"]
  23475. }
  23476. },
  23477. "required": ["id", "time", "sessionID", "text", "type"],
  23478. "additionalProperties": false
  23479. },
  23480. "SessionMessageShell": {
  23481. "type": "object",
  23482. "properties": {
  23483. "id": {
  23484. "type": "string",
  23485. "pattern": "^msg_"
  23486. },
  23487. "metadata": {
  23488. "type": "object"
  23489. },
  23490. "time": {
  23491. "type": "object",
  23492. "properties": {
  23493. "created": {
  23494. "type": "number"
  23495. },
  23496. "completed": {
  23497. "type": "number"
  23498. }
  23499. },
  23500. "required": ["created"],
  23501. "additionalProperties": false
  23502. },
  23503. "type": {
  23504. "type": "string",
  23505. "enum": ["shell"]
  23506. },
  23507. "callID": {
  23508. "type": "string"
  23509. },
  23510. "command": {
  23511. "type": "string"
  23512. },
  23513. "output": {
  23514. "type": "string"
  23515. }
  23516. },
  23517. "required": ["id", "time", "type", "callID", "command", "output"],
  23518. "additionalProperties": false
  23519. },
  23520. "SessionMessageAssistantText": {
  23521. "type": "object",
  23522. "properties": {
  23523. "type": {
  23524. "type": "string",
  23525. "enum": ["text"]
  23526. },
  23527. "id": {
  23528. "type": "string"
  23529. },
  23530. "text": {
  23531. "type": "string"
  23532. }
  23533. },
  23534. "required": ["type", "id", "text"],
  23535. "additionalProperties": false
  23536. },
  23537. "SessionMessageAssistantReasoning": {
  23538. "type": "object",
  23539. "properties": {
  23540. "type": {
  23541. "type": "string",
  23542. "enum": ["reasoning"]
  23543. },
  23544. "id": {
  23545. "type": "string"
  23546. },
  23547. "text": {
  23548. "type": "string"
  23549. },
  23550. "providerMetadata": {
  23551. "type": "object",
  23552. "additionalProperties": {
  23553. "type": "object"
  23554. }
  23555. }
  23556. },
  23557. "required": ["type", "id", "text"],
  23558. "additionalProperties": false
  23559. },
  23560. "SessionMessageToolStatePending": {
  23561. "type": "object",
  23562. "properties": {
  23563. "status": {
  23564. "type": "string",
  23565. "enum": ["pending"]
  23566. },
  23567. "input": {
  23568. "type": "string"
  23569. }
  23570. },
  23571. "required": ["status", "input"],
  23572. "additionalProperties": false
  23573. },
  23574. "SessionMessageToolStateRunning": {
  23575. "type": "object",
  23576. "properties": {
  23577. "status": {
  23578. "type": "string",
  23579. "enum": ["running"]
  23580. },
  23581. "input": {
  23582. "type": "object"
  23583. },
  23584. "structured": {
  23585. "type": "object"
  23586. },
  23587. "content": {
  23588. "type": "array",
  23589. "items": {
  23590. "anyOf": [
  23591. {
  23592. "$ref": "#/components/schemas/ToolTextContent"
  23593. },
  23594. {
  23595. "$ref": "#/components/schemas/ToolFileContent"
  23596. }
  23597. ]
  23598. }
  23599. }
  23600. },
  23601. "required": ["status", "input", "structured", "content"],
  23602. "additionalProperties": false
  23603. },
  23604. "SessionMessageToolStateCompleted": {
  23605. "type": "object",
  23606. "properties": {
  23607. "status": {
  23608. "type": "string",
  23609. "enum": ["completed"]
  23610. },
  23611. "input": {
  23612. "type": "object"
  23613. },
  23614. "attachments": {
  23615. "type": "array",
  23616. "items": {
  23617. "$ref": "#/components/schemas/PromptFileAttachment"
  23618. }
  23619. },
  23620. "content": {
  23621. "type": "array",
  23622. "items": {
  23623. "anyOf": [
  23624. {
  23625. "$ref": "#/components/schemas/ToolTextContent"
  23626. },
  23627. {
  23628. "$ref": "#/components/schemas/ToolFileContent"
  23629. }
  23630. ]
  23631. }
  23632. },
  23633. "structured": {
  23634. "type": "object"
  23635. },
  23636. "result": {}
  23637. },
  23638. "required": ["status", "input", "content", "structured"],
  23639. "additionalProperties": false
  23640. },
  23641. "SessionMessageToolStateError": {
  23642. "type": "object",
  23643. "properties": {
  23644. "status": {
  23645. "type": "string",
  23646. "enum": ["error"]
  23647. },
  23648. "input": {
  23649. "type": "object"
  23650. },
  23651. "content": {
  23652. "type": "array",
  23653. "items": {
  23654. "anyOf": [
  23655. {
  23656. "$ref": "#/components/schemas/ToolTextContent"
  23657. },
  23658. {
  23659. "$ref": "#/components/schemas/ToolFileContent"
  23660. }
  23661. ]
  23662. }
  23663. },
  23664. "structured": {
  23665. "type": "object"
  23666. },
  23667. "error": {
  23668. "$ref": "#/components/schemas/SessionErrorUnknown"
  23669. },
  23670. "result": {}
  23671. },
  23672. "required": ["status", "input", "content", "structured", "error"],
  23673. "additionalProperties": false
  23674. },
  23675. "SessionMessageAssistantTool": {
  23676. "type": "object",
  23677. "properties": {
  23678. "type": {
  23679. "type": "string",
  23680. "enum": ["tool"]
  23681. },
  23682. "id": {
  23683. "type": "string"
  23684. },
  23685. "name": {
  23686. "type": "string"
  23687. },
  23688. "provider": {
  23689. "type": "object",
  23690. "properties": {
  23691. "executed": {
  23692. "type": "boolean"
  23693. },
  23694. "metadata": {
  23695. "type": "object",
  23696. "additionalProperties": {
  23697. "type": "object"
  23698. }
  23699. },
  23700. "resultMetadata": {
  23701. "type": "object",
  23702. "additionalProperties": {
  23703. "type": "object"
  23704. }
  23705. }
  23706. },
  23707. "required": ["executed"],
  23708. "additionalProperties": false
  23709. },
  23710. "state": {
  23711. "anyOf": [
  23712. {
  23713. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  23714. },
  23715. {
  23716. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  23717. },
  23718. {
  23719. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  23720. },
  23721. {
  23722. "$ref": "#/components/schemas/SessionMessageToolStateError"
  23723. }
  23724. ]
  23725. },
  23726. "time": {
  23727. "type": "object",
  23728. "properties": {
  23729. "created": {
  23730. "type": "number"
  23731. },
  23732. "ran": {
  23733. "type": "number"
  23734. },
  23735. "completed": {
  23736. "type": "number"
  23737. },
  23738. "pruned": {
  23739. "type": "number"
  23740. }
  23741. },
  23742. "required": ["created"],
  23743. "additionalProperties": false
  23744. }
  23745. },
  23746. "required": ["type", "id", "name", "state", "time"],
  23747. "additionalProperties": false
  23748. },
  23749. "SessionMessageAssistant": {
  23750. "type": "object",
  23751. "properties": {
  23752. "id": {
  23753. "type": "string",
  23754. "pattern": "^msg_"
  23755. },
  23756. "metadata": {
  23757. "type": "object"
  23758. },
  23759. "time": {
  23760. "type": "object",
  23761. "properties": {
  23762. "created": {
  23763. "type": "number"
  23764. },
  23765. "completed": {
  23766. "type": "number"
  23767. }
  23768. },
  23769. "required": ["created"],
  23770. "additionalProperties": false
  23771. },
  23772. "type": {
  23773. "type": "string",
  23774. "enum": ["assistant"]
  23775. },
  23776. "agent": {
  23777. "type": "string"
  23778. },
  23779. "model": {
  23780. "type": "object",
  23781. "properties": {
  23782. "id": {
  23783. "type": "string"
  23784. },
  23785. "providerID": {
  23786. "type": "string"
  23787. },
  23788. "variant": {
  23789. "type": "string"
  23790. }
  23791. },
  23792. "required": ["id", "providerID"],
  23793. "additionalProperties": false
  23794. },
  23795. "content": {
  23796. "type": "array",
  23797. "items": {
  23798. "anyOf": [
  23799. {
  23800. "$ref": "#/components/schemas/SessionMessageAssistantText"
  23801. },
  23802. {
  23803. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  23804. },
  23805. {
  23806. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  23807. }
  23808. ]
  23809. }
  23810. },
  23811. "snapshot": {
  23812. "type": "object",
  23813. "properties": {
  23814. "start": {
  23815. "type": "string"
  23816. },
  23817. "end": {
  23818. "type": "string"
  23819. }
  23820. },
  23821. "additionalProperties": false
  23822. },
  23823. "finish": {
  23824. "type": "string"
  23825. },
  23826. "cost": {
  23827. "type": "number"
  23828. },
  23829. "tokens": {
  23830. "type": "object",
  23831. "properties": {
  23832. "input": {
  23833. "type": "number"
  23834. },
  23835. "output": {
  23836. "type": "number"
  23837. },
  23838. "reasoning": {
  23839. "type": "number"
  23840. },
  23841. "cache": {
  23842. "type": "object",
  23843. "properties": {
  23844. "read": {
  23845. "type": "number"
  23846. },
  23847. "write": {
  23848. "type": "number"
  23849. }
  23850. },
  23851. "required": ["read", "write"],
  23852. "additionalProperties": false
  23853. }
  23854. },
  23855. "required": ["input", "output", "reasoning", "cache"],
  23856. "additionalProperties": false
  23857. },
  23858. "error": {
  23859. "$ref": "#/components/schemas/SessionErrorUnknown"
  23860. }
  23861. },
  23862. "required": ["id", "time", "type", "agent", "model", "content"],
  23863. "additionalProperties": false
  23864. },
  23865. "SessionMessageCompaction": {
  23866. "type": "object",
  23867. "properties": {
  23868. "type": {
  23869. "type": "string",
  23870. "enum": ["compaction"]
  23871. },
  23872. "reason": {
  23873. "type": "string",
  23874. "enum": ["auto", "manual"]
  23875. },
  23876. "summary": {
  23877. "type": "string"
  23878. },
  23879. "include": {
  23880. "type": "string"
  23881. },
  23882. "id": {
  23883. "type": "string",
  23884. "pattern": "^msg_"
  23885. },
  23886. "metadata": {
  23887. "type": "object"
  23888. },
  23889. "time": {
  23890. "type": "object",
  23891. "properties": {
  23892. "created": {
  23893. "type": "number"
  23894. }
  23895. },
  23896. "required": ["created"],
  23897. "additionalProperties": false
  23898. }
  23899. },
  23900. "required": ["type", "reason", "summary", "id", "time"],
  23901. "additionalProperties": false
  23902. },
  23903. "SessionMessage": {
  23904. "anyOf": [
  23905. {
  23906. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  23907. },
  23908. {
  23909. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  23910. },
  23911. {
  23912. "$ref": "#/components/schemas/SessionMessageUser"
  23913. },
  23914. {
  23915. "$ref": "#/components/schemas/SessionMessageSynthetic"
  23916. },
  23917. {
  23918. "$ref": "#/components/schemas/SessionMessageShell"
  23919. },
  23920. {
  23921. "$ref": "#/components/schemas/SessionMessageAssistant"
  23922. },
  23923. {
  23924. "$ref": "#/components/schemas/SessionMessageCompaction"
  23925. }
  23926. ]
  23927. },
  23928. "ProviderV2Info": {
  23929. "type": "object",
  23930. "properties": {
  23931. "id": {
  23932. "type": "string"
  23933. },
  23934. "name": {
  23935. "type": "string"
  23936. },
  23937. "enabled": {
  23938. "anyOf": [
  23939. {
  23940. "type": "boolean",
  23941. "enum": [false]
  23942. },
  23943. {
  23944. "type": "object",
  23945. "properties": {
  23946. "via": {
  23947. "type": "string",
  23948. "enum": ["env"]
  23949. },
  23950. "name": {
  23951. "type": "string"
  23952. }
  23953. },
  23954. "required": ["via", "name"],
  23955. "additionalProperties": false
  23956. },
  23957. {
  23958. "type": "object",
  23959. "properties": {
  23960. "via": {
  23961. "type": "string",
  23962. "enum": ["account"]
  23963. },
  23964. "service": {
  23965. "type": "string"
  23966. }
  23967. },
  23968. "required": ["via", "service"],
  23969. "additionalProperties": false
  23970. },
  23971. {
  23972. "type": "object",
  23973. "properties": {
  23974. "via": {
  23975. "type": "string",
  23976. "enum": ["custom"]
  23977. },
  23978. "data": {
  23979. "type": "object"
  23980. }
  23981. },
  23982. "required": ["via", "data"],
  23983. "additionalProperties": false
  23984. }
  23985. ]
  23986. },
  23987. "env": {
  23988. "type": "array",
  23989. "items": {
  23990. "type": "string"
  23991. }
  23992. },
  23993. "api": {
  23994. "anyOf": [
  23995. {
  23996. "type": "object",
  23997. "properties": {
  23998. "type": {
  23999. "type": "string",
  24000. "enum": ["aisdk"]
  24001. },
  24002. "package": {
  24003. "type": "string"
  24004. },
  24005. "url": {
  24006. "type": "string"
  24007. },
  24008. "settings": {
  24009. "type": "object"
  24010. }
  24011. },
  24012. "required": ["type", "package"],
  24013. "additionalProperties": false
  24014. },
  24015. {
  24016. "type": "object",
  24017. "properties": {
  24018. "type": {
  24019. "type": "string",
  24020. "enum": ["native"]
  24021. },
  24022. "url": {
  24023. "type": "string"
  24024. },
  24025. "settings": {
  24026. "type": "object"
  24027. }
  24028. },
  24029. "required": ["type", "settings"],
  24030. "additionalProperties": false
  24031. }
  24032. ]
  24033. },
  24034. "request": {
  24035. "type": "object",
  24036. "properties": {
  24037. "headers": {
  24038. "type": "object",
  24039. "additionalProperties": {
  24040. "type": "string"
  24041. }
  24042. },
  24043. "body": {
  24044. "type": "object"
  24045. }
  24046. },
  24047. "required": ["headers", "body"],
  24048. "additionalProperties": false
  24049. }
  24050. },
  24051. "required": ["id", "name", "enabled", "env", "api", "request"],
  24052. "additionalProperties": false
  24053. },
  24054. "PermissionV2Request": {
  24055. "type": "object",
  24056. "properties": {
  24057. "id": {
  24058. "type": "string",
  24059. "pattern": "^per"
  24060. },
  24061. "sessionID": {
  24062. "type": "string",
  24063. "pattern": "^ses"
  24064. },
  24065. "action": {
  24066. "type": "string"
  24067. },
  24068. "resources": {
  24069. "type": "array",
  24070. "items": {
  24071. "type": "string"
  24072. }
  24073. },
  24074. "save": {
  24075. "type": "array",
  24076. "items": {
  24077. "type": "string"
  24078. }
  24079. },
  24080. "metadata": {
  24081. "type": "object"
  24082. },
  24083. "source": {
  24084. "$ref": "#/components/schemas/PermissionV2Source"
  24085. }
  24086. },
  24087. "required": ["id", "sessionID", "action", "resources"],
  24088. "additionalProperties": false
  24089. },
  24090. "PermissionSavedInfo": {
  24091. "type": "object",
  24092. "properties": {
  24093. "id": {
  24094. "type": "string"
  24095. },
  24096. "projectID": {
  24097. "type": "string"
  24098. },
  24099. "action": {
  24100. "type": "string"
  24101. },
  24102. "resource": {
  24103. "type": "string"
  24104. }
  24105. },
  24106. "required": ["id", "projectID", "action", "resource"],
  24107. "additionalProperties": false
  24108. },
  24109. "FileSystemTextContent": {
  24110. "type": "object",
  24111. "properties": {
  24112. "type": {
  24113. "type": "string",
  24114. "enum": ["text"]
  24115. },
  24116. "content": {
  24117. "type": "string"
  24118. },
  24119. "mime": {
  24120. "type": "string"
  24121. }
  24122. },
  24123. "required": ["type", "content", "mime"],
  24124. "additionalProperties": false
  24125. },
  24126. "FileSystemBinaryContent": {
  24127. "type": "object",
  24128. "properties": {
  24129. "type": {
  24130. "type": "string",
  24131. "enum": ["binary"]
  24132. },
  24133. "content": {
  24134. "type": "string"
  24135. },
  24136. "encoding": {
  24137. "type": "string",
  24138. "enum": ["base64"]
  24139. },
  24140. "mime": {
  24141. "type": "string"
  24142. }
  24143. },
  24144. "required": ["type", "content", "encoding", "mime"],
  24145. "additionalProperties": false
  24146. },
  24147. "FileSystemEntry": {
  24148. "type": "object",
  24149. "properties": {
  24150. "path": {
  24151. "type": "string"
  24152. },
  24153. "uri": {
  24154. "type": "string"
  24155. },
  24156. "type": {
  24157. "type": "string",
  24158. "enum": ["file", "directory"]
  24159. },
  24160. "mime": {
  24161. "type": "string"
  24162. }
  24163. },
  24164. "required": ["path", "uri", "type", "mime"],
  24165. "additionalProperties": false
  24166. },
  24167. "CommandV2Info": {
  24168. "type": "object",
  24169. "properties": {
  24170. "name": {
  24171. "type": "string"
  24172. },
  24173. "template": {
  24174. "type": "string"
  24175. },
  24176. "description": {
  24177. "type": "string"
  24178. },
  24179. "agent": {
  24180. "type": "string"
  24181. },
  24182. "model": {
  24183. "type": "object",
  24184. "properties": {
  24185. "id": {
  24186. "type": "string"
  24187. },
  24188. "providerID": {
  24189. "type": "string"
  24190. },
  24191. "variant": {
  24192. "type": "string"
  24193. }
  24194. },
  24195. "required": ["id", "providerID"],
  24196. "additionalProperties": false
  24197. },
  24198. "subtask": {
  24199. "type": "boolean"
  24200. }
  24201. },
  24202. "required": ["name", "template"],
  24203. "additionalProperties": false
  24204. },
  24205. "SkillV2Info": {
  24206. "type": "object",
  24207. "properties": {
  24208. "name": {
  24209. "type": "string"
  24210. },
  24211. "description": {
  24212. "type": "string"
  24213. },
  24214. "slash": {
  24215. "type": "boolean"
  24216. },
  24217. "location": {
  24218. "type": "string"
  24219. },
  24220. "content": {
  24221. "type": "string"
  24222. }
  24223. },
  24224. "required": ["name", "location", "content"],
  24225. "additionalProperties": false
  24226. },
  24227. "QuestionV2Request": {
  24228. "type": "object",
  24229. "properties": {
  24230. "id": {
  24231. "type": "string",
  24232. "pattern": "^que"
  24233. },
  24234. "sessionID": {
  24235. "type": "string",
  24236. "pattern": "^ses"
  24237. },
  24238. "questions": {
  24239. "type": "array",
  24240. "items": {
  24241. "$ref": "#/components/schemas/QuestionV2Info"
  24242. },
  24243. "description": "Questions to ask"
  24244. },
  24245. "tool": {
  24246. "$ref": "#/components/schemas/QuestionV2Tool"
  24247. }
  24248. },
  24249. "required": ["id", "sessionID", "questions"],
  24250. "additionalProperties": false
  24251. },
  24252. "QuestionV2Reply": {
  24253. "type": "object",
  24254. "properties": {
  24255. "answers": {
  24256. "type": "array",
  24257. "items": {
  24258. "$ref": "#/components/schemas/QuestionV2Answer"
  24259. },
  24260. "description": "User answers in order of questions (each answer is an array of selected labels)"
  24261. }
  24262. },
  24263. "required": ["answers"],
  24264. "additionalProperties": false
  24265. },
  24266. "EventModels-devRefreshed": {
  24267. "type": "object",
  24268. "properties": {
  24269. "id": {
  24270. "type": "string"
  24271. },
  24272. "type": {
  24273. "type": "string",
  24274. "enum": ["models-dev.refreshed"]
  24275. },
  24276. "properties": {
  24277. "type": "object",
  24278. "properties": {}
  24279. }
  24280. },
  24281. "required": ["id", "type", "properties"],
  24282. "additionalProperties": false
  24283. },
  24284. "EventPluginAdded": {
  24285. "type": "object",
  24286. "properties": {
  24287. "id": {
  24288. "type": "string"
  24289. },
  24290. "type": {
  24291. "type": "string",
  24292. "enum": ["plugin.added"]
  24293. },
  24294. "properties": {
  24295. "type": "object",
  24296. "properties": {
  24297. "id": {
  24298. "type": "string"
  24299. }
  24300. },
  24301. "required": ["id"],
  24302. "additionalProperties": false
  24303. }
  24304. },
  24305. "required": ["id", "type", "properties"],
  24306. "additionalProperties": false
  24307. },
  24308. "ModelV2Info1": {
  24309. "type": "object",
  24310. "properties": {
  24311. "id": {
  24312. "type": "string"
  24313. },
  24314. "providerID": {
  24315. "type": "string"
  24316. },
  24317. "family": {
  24318. "type": "string"
  24319. },
  24320. "name": {
  24321. "type": "string"
  24322. },
  24323. "api": {
  24324. "anyOf": [
  24325. {
  24326. "type": "object",
  24327. "properties": {
  24328. "id": {
  24329. "type": "string"
  24330. },
  24331. "type": {
  24332. "type": "string",
  24333. "enum": ["aisdk"]
  24334. },
  24335. "package": {
  24336. "type": "string"
  24337. },
  24338. "url": {
  24339. "type": "string"
  24340. },
  24341. "settings": {
  24342. "type": "object"
  24343. }
  24344. },
  24345. "required": ["id", "type", "package"],
  24346. "additionalProperties": false
  24347. },
  24348. {
  24349. "type": "object",
  24350. "properties": {
  24351. "id": {
  24352. "type": "string"
  24353. },
  24354. "type": {
  24355. "type": "string",
  24356. "enum": ["native"]
  24357. },
  24358. "url": {
  24359. "type": "string"
  24360. },
  24361. "settings": {
  24362. "type": "object"
  24363. }
  24364. },
  24365. "required": ["id", "type", "settings"],
  24366. "additionalProperties": false
  24367. }
  24368. ]
  24369. },
  24370. "capabilities": {
  24371. "type": "object",
  24372. "properties": {
  24373. "tools": {
  24374. "type": "boolean"
  24375. },
  24376. "input": {
  24377. "type": "array",
  24378. "items": {
  24379. "type": "string"
  24380. }
  24381. },
  24382. "output": {
  24383. "type": "array",
  24384. "items": {
  24385. "type": "string"
  24386. }
  24387. }
  24388. },
  24389. "required": ["tools", "input", "output"],
  24390. "additionalProperties": false
  24391. },
  24392. "request": {
  24393. "type": "object",
  24394. "properties": {
  24395. "headers": {
  24396. "type": "object",
  24397. "additionalProperties": {
  24398. "type": "string"
  24399. }
  24400. },
  24401. "body": {
  24402. "type": "object"
  24403. },
  24404. "variant": {
  24405. "type": "string"
  24406. }
  24407. },
  24408. "required": ["headers", "body"],
  24409. "additionalProperties": false
  24410. },
  24411. "variants": {
  24412. "type": "array",
  24413. "items": {
  24414. "type": "object",
  24415. "properties": {
  24416. "id": {
  24417. "type": "string"
  24418. },
  24419. "headers": {
  24420. "type": "object",
  24421. "additionalProperties": {
  24422. "type": "string"
  24423. }
  24424. },
  24425. "body": {
  24426. "type": "object"
  24427. }
  24428. },
  24429. "required": ["id", "headers", "body"],
  24430. "additionalProperties": false
  24431. }
  24432. },
  24433. "time": {
  24434. "type": "object",
  24435. "properties": {
  24436. "released": {
  24437. "anyOf": [
  24438. {
  24439. "type": "number"
  24440. },
  24441. {
  24442. "type": "string",
  24443. "enum": ["NaN"]
  24444. },
  24445. {
  24446. "type": "string",
  24447. "enum": ["Infinity"]
  24448. },
  24449. {
  24450. "type": "string",
  24451. "enum": ["-Infinity"]
  24452. }
  24453. ]
  24454. }
  24455. },
  24456. "required": ["released"],
  24457. "additionalProperties": false
  24458. },
  24459. "cost": {
  24460. "type": "array",
  24461. "items": {
  24462. "type": "object",
  24463. "properties": {
  24464. "tier": {
  24465. "type": "object",
  24466. "properties": {
  24467. "type": {
  24468. "type": "string",
  24469. "enum": ["context"]
  24470. },
  24471. "size": {
  24472. "type": "integer"
  24473. }
  24474. },
  24475. "required": ["type", "size"],
  24476. "additionalProperties": false
  24477. },
  24478. "input": {
  24479. "type": "number"
  24480. },
  24481. "output": {
  24482. "type": "number"
  24483. },
  24484. "cache": {
  24485. "type": "object",
  24486. "properties": {
  24487. "read": {
  24488. "type": "number"
  24489. },
  24490. "write": {
  24491. "type": "number"
  24492. }
  24493. },
  24494. "required": ["read", "write"],
  24495. "additionalProperties": false
  24496. }
  24497. },
  24498. "required": ["input", "output", "cache"],
  24499. "additionalProperties": false
  24500. }
  24501. },
  24502. "status": {
  24503. "type": "string",
  24504. "enum": ["alpha", "beta", "deprecated", "active"]
  24505. },
  24506. "enabled": {
  24507. "type": "boolean"
  24508. },
  24509. "limit": {
  24510. "type": "object",
  24511. "properties": {
  24512. "context": {
  24513. "type": "integer"
  24514. },
  24515. "input": {
  24516. "type": "integer"
  24517. },
  24518. "output": {
  24519. "type": "integer"
  24520. }
  24521. },
  24522. "required": ["context", "output"],
  24523. "additionalProperties": false
  24524. }
  24525. },
  24526. "required": [
  24527. "id",
  24528. "providerID",
  24529. "name",
  24530. "api",
  24531. "capabilities",
  24532. "request",
  24533. "variants",
  24534. "time",
  24535. "cost",
  24536. "status",
  24537. "enabled",
  24538. "limit"
  24539. ],
  24540. "additionalProperties": false
  24541. },
  24542. "EventCatalogModelUpdated": {
  24543. "type": "object",
  24544. "properties": {
  24545. "id": {
  24546. "type": "string"
  24547. },
  24548. "type": {
  24549. "type": "string",
  24550. "enum": ["catalog.model.updated"]
  24551. },
  24552. "properties": {
  24553. "type": "object",
  24554. "properties": {
  24555. "model": {
  24556. "$ref": "#/components/schemas/ModelV2Info1"
  24557. }
  24558. },
  24559. "required": ["model"],
  24560. "additionalProperties": false
  24561. }
  24562. },
  24563. "required": ["id", "type", "properties"],
  24564. "additionalProperties": false
  24565. },
  24566. "EventSessionCreated": {
  24567. "type": "object",
  24568. "properties": {
  24569. "id": {
  24570. "type": "string"
  24571. },
  24572. "type": {
  24573. "type": "string",
  24574. "enum": ["session.created"]
  24575. },
  24576. "properties": {
  24577. "type": "object",
  24578. "properties": {
  24579. "sessionID": {
  24580. "type": "string",
  24581. "pattern": "^ses"
  24582. },
  24583. "info": {
  24584. "$ref": "#/components/schemas/Session"
  24585. }
  24586. },
  24587. "required": ["sessionID", "info"],
  24588. "additionalProperties": false
  24589. }
  24590. },
  24591. "required": ["id", "type", "properties"],
  24592. "additionalProperties": false
  24593. },
  24594. "EventSessionUpdated": {
  24595. "type": "object",
  24596. "properties": {
  24597. "id": {
  24598. "type": "string"
  24599. },
  24600. "type": {
  24601. "type": "string",
  24602. "enum": ["session.updated"]
  24603. },
  24604. "properties": {
  24605. "type": "object",
  24606. "properties": {
  24607. "sessionID": {
  24608. "type": "string",
  24609. "pattern": "^ses"
  24610. },
  24611. "info": {
  24612. "$ref": "#/components/schemas/Session"
  24613. }
  24614. },
  24615. "required": ["sessionID", "info"],
  24616. "additionalProperties": false
  24617. }
  24618. },
  24619. "required": ["id", "type", "properties"],
  24620. "additionalProperties": false
  24621. },
  24622. "EventSessionDeleted": {
  24623. "type": "object",
  24624. "properties": {
  24625. "id": {
  24626. "type": "string"
  24627. },
  24628. "type": {
  24629. "type": "string",
  24630. "enum": ["session.deleted"]
  24631. },
  24632. "properties": {
  24633. "type": "object",
  24634. "properties": {
  24635. "sessionID": {
  24636. "type": "string",
  24637. "pattern": "^ses"
  24638. },
  24639. "info": {
  24640. "$ref": "#/components/schemas/Session"
  24641. }
  24642. },
  24643. "required": ["sessionID", "info"],
  24644. "additionalProperties": false
  24645. }
  24646. },
  24647. "required": ["id", "type", "properties"],
  24648. "additionalProperties": false
  24649. },
  24650. "EventMessageUpdated": {
  24651. "type": "object",
  24652. "properties": {
  24653. "id": {
  24654. "type": "string"
  24655. },
  24656. "type": {
  24657. "type": "string",
  24658. "enum": ["message.updated"]
  24659. },
  24660. "properties": {
  24661. "type": "object",
  24662. "properties": {
  24663. "sessionID": {
  24664. "type": "string",
  24665. "pattern": "^ses"
  24666. },
  24667. "info": {
  24668. "$ref": "#/components/schemas/Message"
  24669. }
  24670. },
  24671. "required": ["sessionID", "info"],
  24672. "additionalProperties": false
  24673. }
  24674. },
  24675. "required": ["id", "type", "properties"],
  24676. "additionalProperties": false
  24677. },
  24678. "EventMessageRemoved": {
  24679. "type": "object",
  24680. "properties": {
  24681. "id": {
  24682. "type": "string"
  24683. },
  24684. "type": {
  24685. "type": "string",
  24686. "enum": ["message.removed"]
  24687. },
  24688. "properties": {
  24689. "type": "object",
  24690. "properties": {
  24691. "sessionID": {
  24692. "type": "string",
  24693. "pattern": "^ses"
  24694. },
  24695. "messageID": {
  24696. "type": "string",
  24697. "pattern": "^msg"
  24698. }
  24699. },
  24700. "required": ["sessionID", "messageID"],
  24701. "additionalProperties": false
  24702. }
  24703. },
  24704. "required": ["id", "type", "properties"],
  24705. "additionalProperties": false
  24706. },
  24707. "EventMessagePartUpdated": {
  24708. "type": "object",
  24709. "properties": {
  24710. "id": {
  24711. "type": "string"
  24712. },
  24713. "type": {
  24714. "type": "string",
  24715. "enum": ["message.part.updated"]
  24716. },
  24717. "properties": {
  24718. "type": "object",
  24719. "properties": {
  24720. "sessionID": {
  24721. "type": "string",
  24722. "pattern": "^ses"
  24723. },
  24724. "part": {
  24725. "$ref": "#/components/schemas/Part"
  24726. },
  24727. "time": {
  24728. "type": "number"
  24729. }
  24730. },
  24731. "required": ["sessionID", "part", "time"],
  24732. "additionalProperties": false
  24733. }
  24734. },
  24735. "required": ["id", "type", "properties"],
  24736. "additionalProperties": false
  24737. },
  24738. "EventMessagePartRemoved": {
  24739. "type": "object",
  24740. "properties": {
  24741. "id": {
  24742. "type": "string"
  24743. },
  24744. "type": {
  24745. "type": "string",
  24746. "enum": ["message.part.removed"]
  24747. },
  24748. "properties": {
  24749. "type": "object",
  24750. "properties": {
  24751. "sessionID": {
  24752. "type": "string",
  24753. "pattern": "^ses"
  24754. },
  24755. "messageID": {
  24756. "type": "string",
  24757. "pattern": "^msg"
  24758. },
  24759. "partID": {
  24760. "type": "string",
  24761. "pattern": "^prt"
  24762. }
  24763. },
  24764. "required": ["sessionID", "messageID", "partID"],
  24765. "additionalProperties": false
  24766. }
  24767. },
  24768. "required": ["id", "type", "properties"],
  24769. "additionalProperties": false
  24770. },
  24771. "EventSessionNextAgentSwitched": {
  24772. "type": "object",
  24773. "properties": {
  24774. "id": {
  24775. "type": "string"
  24776. },
  24777. "type": {
  24778. "type": "string",
  24779. "enum": ["session.next.agent.switched"]
  24780. },
  24781. "properties": {
  24782. "type": "object",
  24783. "properties": {
  24784. "timestamp": {
  24785. "type": "number"
  24786. },
  24787. "sessionID": {
  24788. "type": "string",
  24789. "pattern": "^ses"
  24790. },
  24791. "messageID": {
  24792. "type": "string",
  24793. "pattern": "^msg_"
  24794. },
  24795. "agent": {
  24796. "type": "string"
  24797. }
  24798. },
  24799. "required": ["timestamp", "sessionID", "messageID", "agent"],
  24800. "additionalProperties": false
  24801. }
  24802. },
  24803. "required": ["id", "type", "properties"],
  24804. "additionalProperties": false
  24805. },
  24806. "EventSessionNextModelSwitched": {
  24807. "type": "object",
  24808. "properties": {
  24809. "id": {
  24810. "type": "string"
  24811. },
  24812. "type": {
  24813. "type": "string",
  24814. "enum": ["session.next.model.switched"]
  24815. },
  24816. "properties": {
  24817. "type": "object",
  24818. "properties": {
  24819. "timestamp": {
  24820. "type": "number"
  24821. },
  24822. "sessionID": {
  24823. "type": "string",
  24824. "pattern": "^ses"
  24825. },
  24826. "messageID": {
  24827. "type": "string",
  24828. "pattern": "^msg_"
  24829. },
  24830. "model": {
  24831. "type": "object",
  24832. "properties": {
  24833. "id": {
  24834. "type": "string"
  24835. },
  24836. "providerID": {
  24837. "type": "string"
  24838. },
  24839. "variant": {
  24840. "type": "string"
  24841. }
  24842. },
  24843. "required": ["id", "providerID"],
  24844. "additionalProperties": false
  24845. }
  24846. },
  24847. "required": ["timestamp", "sessionID", "messageID", "model"],
  24848. "additionalProperties": false
  24849. }
  24850. },
  24851. "required": ["id", "type", "properties"],
  24852. "additionalProperties": false
  24853. },
  24854. "EventSessionNextMoved": {
  24855. "type": "object",
  24856. "properties": {
  24857. "id": {
  24858. "type": "string"
  24859. },
  24860. "type": {
  24861. "type": "string",
  24862. "enum": ["session.next.moved"]
  24863. },
  24864. "properties": {
  24865. "type": "object",
  24866. "properties": {
  24867. "timestamp": {
  24868. "type": "number"
  24869. },
  24870. "sessionID": {
  24871. "type": "string",
  24872. "pattern": "^ses"
  24873. },
  24874. "location": {
  24875. "$ref": "#/components/schemas/LocationRef"
  24876. },
  24877. "subdirectory": {
  24878. "type": "string"
  24879. }
  24880. },
  24881. "required": ["timestamp", "sessionID", "location"],
  24882. "additionalProperties": false
  24883. }
  24884. },
  24885. "required": ["id", "type", "properties"],
  24886. "additionalProperties": false
  24887. },
  24888. "EventSessionNextPrompted": {
  24889. "type": "object",
  24890. "properties": {
  24891. "id": {
  24892. "type": "string"
  24893. },
  24894. "type": {
  24895. "type": "string",
  24896. "enum": ["session.next.prompted"]
  24897. },
  24898. "properties": {
  24899. "type": "object",
  24900. "properties": {
  24901. "timestamp": {
  24902. "type": "number"
  24903. },
  24904. "sessionID": {
  24905. "type": "string",
  24906. "pattern": "^ses"
  24907. },
  24908. "messageID": {
  24909. "type": "string",
  24910. "pattern": "^msg_"
  24911. },
  24912. "prompt": {
  24913. "$ref": "#/components/schemas/Prompt"
  24914. },
  24915. "delivery": {
  24916. "type": "string",
  24917. "enum": ["steer", "queue"]
  24918. }
  24919. },
  24920. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  24921. "additionalProperties": false
  24922. }
  24923. },
  24924. "required": ["id", "type", "properties"],
  24925. "additionalProperties": false
  24926. },
  24927. "EventSessionNextPromptAdmitted": {
  24928. "type": "object",
  24929. "properties": {
  24930. "id": {
  24931. "type": "string"
  24932. },
  24933. "type": {
  24934. "type": "string",
  24935. "enum": ["session.next.prompt.admitted"]
  24936. },
  24937. "properties": {
  24938. "type": "object",
  24939. "properties": {
  24940. "timestamp": {
  24941. "type": "number"
  24942. },
  24943. "sessionID": {
  24944. "type": "string",
  24945. "pattern": "^ses"
  24946. },
  24947. "messageID": {
  24948. "type": "string",
  24949. "pattern": "^msg_"
  24950. },
  24951. "prompt": {
  24952. "$ref": "#/components/schemas/Prompt"
  24953. },
  24954. "delivery": {
  24955. "type": "string",
  24956. "enum": ["steer", "queue"]
  24957. }
  24958. },
  24959. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  24960. "additionalProperties": false
  24961. }
  24962. },
  24963. "required": ["id", "type", "properties"],
  24964. "additionalProperties": false
  24965. },
  24966. "EventSessionNextPromptPromoted": {
  24967. "type": "object",
  24968. "properties": {
  24969. "id": {
  24970. "type": "string"
  24971. },
  24972. "type": {
  24973. "type": "string",
  24974. "enum": ["session.next.prompt.promoted"]
  24975. },
  24976. "properties": {
  24977. "type": "object",
  24978. "properties": {
  24979. "timestamp": {
  24980. "type": "number"
  24981. },
  24982. "sessionID": {
  24983. "type": "string",
  24984. "pattern": "^ses"
  24985. },
  24986. "messageID": {
  24987. "type": "string",
  24988. "pattern": "^msg_"
  24989. },
  24990. "prompt": {
  24991. "$ref": "#/components/schemas/Prompt"
  24992. },
  24993. "timeCreated": {
  24994. "type": "number"
  24995. }
  24996. },
  24997. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  24998. "additionalProperties": false
  24999. }
  25000. },
  25001. "required": ["id", "type", "properties"],
  25002. "additionalProperties": false
  25003. },
  25004. "EventSessionNextSynthetic": {
  25005. "type": "object",
  25006. "properties": {
  25007. "id": {
  25008. "type": "string"
  25009. },
  25010. "type": {
  25011. "type": "string",
  25012. "enum": ["session.next.synthetic"]
  25013. },
  25014. "properties": {
  25015. "type": "object",
  25016. "properties": {
  25017. "timestamp": {
  25018. "type": "number"
  25019. },
  25020. "sessionID": {
  25021. "type": "string",
  25022. "pattern": "^ses"
  25023. },
  25024. "messageID": {
  25025. "type": "string",
  25026. "pattern": "^msg_"
  25027. },
  25028. "text": {
  25029. "type": "string"
  25030. }
  25031. },
  25032. "required": ["timestamp", "sessionID", "messageID", "text"],
  25033. "additionalProperties": false
  25034. }
  25035. },
  25036. "required": ["id", "type", "properties"],
  25037. "additionalProperties": false
  25038. },
  25039. "EventSessionNextShellStarted": {
  25040. "type": "object",
  25041. "properties": {
  25042. "id": {
  25043. "type": "string"
  25044. },
  25045. "type": {
  25046. "type": "string",
  25047. "enum": ["session.next.shell.started"]
  25048. },
  25049. "properties": {
  25050. "type": "object",
  25051. "properties": {
  25052. "timestamp": {
  25053. "type": "number"
  25054. },
  25055. "sessionID": {
  25056. "type": "string",
  25057. "pattern": "^ses"
  25058. },
  25059. "messageID": {
  25060. "type": "string",
  25061. "pattern": "^msg_"
  25062. },
  25063. "callID": {
  25064. "type": "string"
  25065. },
  25066. "command": {
  25067. "type": "string"
  25068. }
  25069. },
  25070. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  25071. "additionalProperties": false
  25072. }
  25073. },
  25074. "required": ["id", "type", "properties"],
  25075. "additionalProperties": false
  25076. },
  25077. "EventSessionNextShellEnded": {
  25078. "type": "object",
  25079. "properties": {
  25080. "id": {
  25081. "type": "string"
  25082. },
  25083. "type": {
  25084. "type": "string",
  25085. "enum": ["session.next.shell.ended"]
  25086. },
  25087. "properties": {
  25088. "type": "object",
  25089. "properties": {
  25090. "timestamp": {
  25091. "type": "number"
  25092. },
  25093. "sessionID": {
  25094. "type": "string",
  25095. "pattern": "^ses"
  25096. },
  25097. "callID": {
  25098. "type": "string"
  25099. },
  25100. "output": {
  25101. "type": "string"
  25102. }
  25103. },
  25104. "required": ["timestamp", "sessionID", "callID", "output"],
  25105. "additionalProperties": false
  25106. }
  25107. },
  25108. "required": ["id", "type", "properties"],
  25109. "additionalProperties": false
  25110. },
  25111. "EventSessionNextStepStarted": {
  25112. "type": "object",
  25113. "properties": {
  25114. "id": {
  25115. "type": "string"
  25116. },
  25117. "type": {
  25118. "type": "string",
  25119. "enum": ["session.next.step.started"]
  25120. },
  25121. "properties": {
  25122. "type": "object",
  25123. "properties": {
  25124. "timestamp": {
  25125. "type": "number"
  25126. },
  25127. "sessionID": {
  25128. "type": "string",
  25129. "pattern": "^ses"
  25130. },
  25131. "assistantMessageID": {
  25132. "type": "string",
  25133. "pattern": "^msg_"
  25134. },
  25135. "agent": {
  25136. "type": "string"
  25137. },
  25138. "model": {
  25139. "type": "object",
  25140. "properties": {
  25141. "id": {
  25142. "type": "string"
  25143. },
  25144. "providerID": {
  25145. "type": "string"
  25146. },
  25147. "variant": {
  25148. "type": "string"
  25149. }
  25150. },
  25151. "required": ["id", "providerID"],
  25152. "additionalProperties": false
  25153. },
  25154. "snapshot": {
  25155. "type": "string"
  25156. }
  25157. },
  25158. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  25159. "additionalProperties": false
  25160. }
  25161. },
  25162. "required": ["id", "type", "properties"],
  25163. "additionalProperties": false
  25164. },
  25165. "EventSessionNextStepEnded": {
  25166. "type": "object",
  25167. "properties": {
  25168. "id": {
  25169. "type": "string"
  25170. },
  25171. "type": {
  25172. "type": "string",
  25173. "enum": ["session.next.step.ended"]
  25174. },
  25175. "properties": {
  25176. "type": "object",
  25177. "properties": {
  25178. "timestamp": {
  25179. "type": "number"
  25180. },
  25181. "sessionID": {
  25182. "type": "string",
  25183. "pattern": "^ses"
  25184. },
  25185. "assistantMessageID": {
  25186. "type": "string",
  25187. "pattern": "^msg_"
  25188. },
  25189. "finish": {
  25190. "type": "string"
  25191. },
  25192. "cost": {
  25193. "type": "number"
  25194. },
  25195. "tokens": {
  25196. "type": "object",
  25197. "properties": {
  25198. "input": {
  25199. "type": "number"
  25200. },
  25201. "output": {
  25202. "type": "number"
  25203. },
  25204. "reasoning": {
  25205. "type": "number"
  25206. },
  25207. "cache": {
  25208. "type": "object",
  25209. "properties": {
  25210. "read": {
  25211. "type": "number"
  25212. },
  25213. "write": {
  25214. "type": "number"
  25215. }
  25216. },
  25217. "required": ["read", "write"],
  25218. "additionalProperties": false
  25219. }
  25220. },
  25221. "required": ["input", "output", "reasoning", "cache"],
  25222. "additionalProperties": false
  25223. },
  25224. "snapshot": {
  25225. "type": "string"
  25226. }
  25227. },
  25228. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  25229. "additionalProperties": false
  25230. }
  25231. },
  25232. "required": ["id", "type", "properties"],
  25233. "additionalProperties": false
  25234. },
  25235. "EventSessionNextStepFailed": {
  25236. "type": "object",
  25237. "properties": {
  25238. "id": {
  25239. "type": "string"
  25240. },
  25241. "type": {
  25242. "type": "string",
  25243. "enum": ["session.next.step.failed"]
  25244. },
  25245. "properties": {
  25246. "type": "object",
  25247. "properties": {
  25248. "timestamp": {
  25249. "type": "number"
  25250. },
  25251. "sessionID": {
  25252. "type": "string",
  25253. "pattern": "^ses"
  25254. },
  25255. "assistantMessageID": {
  25256. "type": "string",
  25257. "pattern": "^msg_"
  25258. },
  25259. "error": {
  25260. "$ref": "#/components/schemas/SessionErrorUnknown"
  25261. }
  25262. },
  25263. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  25264. "additionalProperties": false
  25265. }
  25266. },
  25267. "required": ["id", "type", "properties"],
  25268. "additionalProperties": false
  25269. },
  25270. "EventSessionNextTextStarted": {
  25271. "type": "object",
  25272. "properties": {
  25273. "id": {
  25274. "type": "string"
  25275. },
  25276. "type": {
  25277. "type": "string",
  25278. "enum": ["session.next.text.started"]
  25279. },
  25280. "properties": {
  25281. "type": "object",
  25282. "properties": {
  25283. "timestamp": {
  25284. "type": "number"
  25285. },
  25286. "sessionID": {
  25287. "type": "string",
  25288. "pattern": "^ses"
  25289. },
  25290. "assistantMessageID": {
  25291. "type": "string",
  25292. "pattern": "^msg_"
  25293. },
  25294. "textID": {
  25295. "type": "string"
  25296. }
  25297. },
  25298. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  25299. "additionalProperties": false
  25300. }
  25301. },
  25302. "required": ["id", "type", "properties"],
  25303. "additionalProperties": false
  25304. },
  25305. "EventSessionNextTextDelta": {
  25306. "type": "object",
  25307. "properties": {
  25308. "id": {
  25309. "type": "string"
  25310. },
  25311. "type": {
  25312. "type": "string",
  25313. "enum": ["session.next.text.delta"]
  25314. },
  25315. "properties": {
  25316. "type": "object",
  25317. "properties": {
  25318. "timestamp": {
  25319. "type": "number"
  25320. },
  25321. "sessionID": {
  25322. "type": "string",
  25323. "pattern": "^ses"
  25324. },
  25325. "assistantMessageID": {
  25326. "type": "string",
  25327. "pattern": "^msg_"
  25328. },
  25329. "textID": {
  25330. "type": "string"
  25331. },
  25332. "delta": {
  25333. "type": "string"
  25334. }
  25335. },
  25336. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  25337. "additionalProperties": false
  25338. }
  25339. },
  25340. "required": ["id", "type", "properties"],
  25341. "additionalProperties": false
  25342. },
  25343. "EventSessionNextTextEnded": {
  25344. "type": "object",
  25345. "properties": {
  25346. "id": {
  25347. "type": "string"
  25348. },
  25349. "type": {
  25350. "type": "string",
  25351. "enum": ["session.next.text.ended"]
  25352. },
  25353. "properties": {
  25354. "type": "object",
  25355. "properties": {
  25356. "timestamp": {
  25357. "type": "number"
  25358. },
  25359. "sessionID": {
  25360. "type": "string",
  25361. "pattern": "^ses"
  25362. },
  25363. "assistantMessageID": {
  25364. "type": "string",
  25365. "pattern": "^msg_"
  25366. },
  25367. "textID": {
  25368. "type": "string"
  25369. },
  25370. "text": {
  25371. "type": "string"
  25372. }
  25373. },
  25374. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  25375. "additionalProperties": false
  25376. }
  25377. },
  25378. "required": ["id", "type", "properties"],
  25379. "additionalProperties": false
  25380. },
  25381. "EventSessionNextReasoningStarted": {
  25382. "type": "object",
  25383. "properties": {
  25384. "id": {
  25385. "type": "string"
  25386. },
  25387. "type": {
  25388. "type": "string",
  25389. "enum": ["session.next.reasoning.started"]
  25390. },
  25391. "properties": {
  25392. "type": "object",
  25393. "properties": {
  25394. "timestamp": {
  25395. "type": "number"
  25396. },
  25397. "sessionID": {
  25398. "type": "string",
  25399. "pattern": "^ses"
  25400. },
  25401. "assistantMessageID": {
  25402. "type": "string",
  25403. "pattern": "^msg_"
  25404. },
  25405. "reasoningID": {
  25406. "type": "string"
  25407. },
  25408. "providerMetadata": {
  25409. "type": "object",
  25410. "additionalProperties": {
  25411. "type": "object"
  25412. }
  25413. }
  25414. },
  25415. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  25416. "additionalProperties": false
  25417. }
  25418. },
  25419. "required": ["id", "type", "properties"],
  25420. "additionalProperties": false
  25421. },
  25422. "EventSessionNextReasoningDelta": {
  25423. "type": "object",
  25424. "properties": {
  25425. "id": {
  25426. "type": "string"
  25427. },
  25428. "type": {
  25429. "type": "string",
  25430. "enum": ["session.next.reasoning.delta"]
  25431. },
  25432. "properties": {
  25433. "type": "object",
  25434. "properties": {
  25435. "timestamp": {
  25436. "type": "number"
  25437. },
  25438. "sessionID": {
  25439. "type": "string",
  25440. "pattern": "^ses"
  25441. },
  25442. "assistantMessageID": {
  25443. "type": "string",
  25444. "pattern": "^msg_"
  25445. },
  25446. "reasoningID": {
  25447. "type": "string"
  25448. },
  25449. "delta": {
  25450. "type": "string"
  25451. }
  25452. },
  25453. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  25454. "additionalProperties": false
  25455. }
  25456. },
  25457. "required": ["id", "type", "properties"],
  25458. "additionalProperties": false
  25459. },
  25460. "EventSessionNextReasoningEnded": {
  25461. "type": "object",
  25462. "properties": {
  25463. "id": {
  25464. "type": "string"
  25465. },
  25466. "type": {
  25467. "type": "string",
  25468. "enum": ["session.next.reasoning.ended"]
  25469. },
  25470. "properties": {
  25471. "type": "object",
  25472. "properties": {
  25473. "timestamp": {
  25474. "type": "number"
  25475. },
  25476. "sessionID": {
  25477. "type": "string",
  25478. "pattern": "^ses"
  25479. },
  25480. "assistantMessageID": {
  25481. "type": "string",
  25482. "pattern": "^msg_"
  25483. },
  25484. "reasoningID": {
  25485. "type": "string"
  25486. },
  25487. "text": {
  25488. "type": "string"
  25489. },
  25490. "providerMetadata": {
  25491. "type": "object",
  25492. "additionalProperties": {
  25493. "type": "object"
  25494. }
  25495. }
  25496. },
  25497. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  25498. "additionalProperties": false
  25499. }
  25500. },
  25501. "required": ["id", "type", "properties"],
  25502. "additionalProperties": false
  25503. },
  25504. "EventSessionNextToolInputStarted": {
  25505. "type": "object",
  25506. "properties": {
  25507. "id": {
  25508. "type": "string"
  25509. },
  25510. "type": {
  25511. "type": "string",
  25512. "enum": ["session.next.tool.input.started"]
  25513. },
  25514. "properties": {
  25515. "type": "object",
  25516. "properties": {
  25517. "timestamp": {
  25518. "type": "number"
  25519. },
  25520. "sessionID": {
  25521. "type": "string",
  25522. "pattern": "^ses"
  25523. },
  25524. "assistantMessageID": {
  25525. "type": "string",
  25526. "pattern": "^msg_"
  25527. },
  25528. "callID": {
  25529. "type": "string"
  25530. },
  25531. "name": {
  25532. "type": "string"
  25533. }
  25534. },
  25535. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  25536. "additionalProperties": false
  25537. }
  25538. },
  25539. "required": ["id", "type", "properties"],
  25540. "additionalProperties": false
  25541. },
  25542. "EventSessionNextToolInputDelta": {
  25543. "type": "object",
  25544. "properties": {
  25545. "id": {
  25546. "type": "string"
  25547. },
  25548. "type": {
  25549. "type": "string",
  25550. "enum": ["session.next.tool.input.delta"]
  25551. },
  25552. "properties": {
  25553. "type": "object",
  25554. "properties": {
  25555. "timestamp": {
  25556. "type": "number"
  25557. },
  25558. "sessionID": {
  25559. "type": "string",
  25560. "pattern": "^ses"
  25561. },
  25562. "assistantMessageID": {
  25563. "type": "string",
  25564. "pattern": "^msg_"
  25565. },
  25566. "callID": {
  25567. "type": "string"
  25568. },
  25569. "delta": {
  25570. "type": "string"
  25571. }
  25572. },
  25573. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  25574. "additionalProperties": false
  25575. }
  25576. },
  25577. "required": ["id", "type", "properties"],
  25578. "additionalProperties": false
  25579. },
  25580. "EventSessionNextToolInputEnded": {
  25581. "type": "object",
  25582. "properties": {
  25583. "id": {
  25584. "type": "string"
  25585. },
  25586. "type": {
  25587. "type": "string",
  25588. "enum": ["session.next.tool.input.ended"]
  25589. },
  25590. "properties": {
  25591. "type": "object",
  25592. "properties": {
  25593. "timestamp": {
  25594. "type": "number"
  25595. },
  25596. "sessionID": {
  25597. "type": "string",
  25598. "pattern": "^ses"
  25599. },
  25600. "assistantMessageID": {
  25601. "type": "string",
  25602. "pattern": "^msg_"
  25603. },
  25604. "callID": {
  25605. "type": "string"
  25606. },
  25607. "text": {
  25608. "type": "string"
  25609. }
  25610. },
  25611. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  25612. "additionalProperties": false
  25613. }
  25614. },
  25615. "required": ["id", "type", "properties"],
  25616. "additionalProperties": false
  25617. },
  25618. "EventSessionNextToolCalled": {
  25619. "type": "object",
  25620. "properties": {
  25621. "id": {
  25622. "type": "string"
  25623. },
  25624. "type": {
  25625. "type": "string",
  25626. "enum": ["session.next.tool.called"]
  25627. },
  25628. "properties": {
  25629. "type": "object",
  25630. "properties": {
  25631. "timestamp": {
  25632. "type": "number"
  25633. },
  25634. "sessionID": {
  25635. "type": "string",
  25636. "pattern": "^ses"
  25637. },
  25638. "assistantMessageID": {
  25639. "type": "string",
  25640. "pattern": "^msg_"
  25641. },
  25642. "callID": {
  25643. "type": "string"
  25644. },
  25645. "tool": {
  25646. "type": "string"
  25647. },
  25648. "input": {
  25649. "type": "object"
  25650. },
  25651. "provider": {
  25652. "type": "object",
  25653. "properties": {
  25654. "executed": {
  25655. "type": "boolean"
  25656. },
  25657. "metadata": {
  25658. "type": "object",
  25659. "additionalProperties": {
  25660. "type": "object"
  25661. }
  25662. }
  25663. },
  25664. "required": ["executed"],
  25665. "additionalProperties": false
  25666. }
  25667. },
  25668. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  25669. "additionalProperties": false
  25670. }
  25671. },
  25672. "required": ["id", "type", "properties"],
  25673. "additionalProperties": false
  25674. },
  25675. "EventSessionNextToolProgress": {
  25676. "type": "object",
  25677. "properties": {
  25678. "id": {
  25679. "type": "string"
  25680. },
  25681. "type": {
  25682. "type": "string",
  25683. "enum": ["session.next.tool.progress"]
  25684. },
  25685. "properties": {
  25686. "type": "object",
  25687. "properties": {
  25688. "timestamp": {
  25689. "type": "number"
  25690. },
  25691. "sessionID": {
  25692. "type": "string",
  25693. "pattern": "^ses"
  25694. },
  25695. "assistantMessageID": {
  25696. "type": "string",
  25697. "pattern": "^msg_"
  25698. },
  25699. "callID": {
  25700. "type": "string"
  25701. },
  25702. "structured": {
  25703. "type": "object"
  25704. },
  25705. "content": {
  25706. "type": "array",
  25707. "items": {
  25708. "anyOf": [
  25709. {
  25710. "$ref": "#/components/schemas/ToolTextContent"
  25711. },
  25712. {
  25713. "$ref": "#/components/schemas/ToolFileContent"
  25714. }
  25715. ]
  25716. }
  25717. }
  25718. },
  25719. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  25720. "additionalProperties": false
  25721. }
  25722. },
  25723. "required": ["id", "type", "properties"],
  25724. "additionalProperties": false
  25725. },
  25726. "EventSessionNextToolSuccess": {
  25727. "type": "object",
  25728. "properties": {
  25729. "id": {
  25730. "type": "string"
  25731. },
  25732. "type": {
  25733. "type": "string",
  25734. "enum": ["session.next.tool.success"]
  25735. },
  25736. "properties": {
  25737. "type": "object",
  25738. "properties": {
  25739. "timestamp": {
  25740. "type": "number"
  25741. },
  25742. "sessionID": {
  25743. "type": "string",
  25744. "pattern": "^ses"
  25745. },
  25746. "assistantMessageID": {
  25747. "type": "string",
  25748. "pattern": "^msg_"
  25749. },
  25750. "callID": {
  25751. "type": "string"
  25752. },
  25753. "structured": {
  25754. "type": "object"
  25755. },
  25756. "content": {
  25757. "type": "array",
  25758. "items": {
  25759. "anyOf": [
  25760. {
  25761. "$ref": "#/components/schemas/ToolTextContent"
  25762. },
  25763. {
  25764. "$ref": "#/components/schemas/ToolFileContent"
  25765. }
  25766. ]
  25767. }
  25768. },
  25769. "result": {},
  25770. "provider": {
  25771. "type": "object",
  25772. "properties": {
  25773. "executed": {
  25774. "type": "boolean"
  25775. },
  25776. "metadata": {
  25777. "type": "object",
  25778. "additionalProperties": {
  25779. "type": "object"
  25780. }
  25781. }
  25782. },
  25783. "required": ["executed"],
  25784. "additionalProperties": false
  25785. }
  25786. },
  25787. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  25788. "additionalProperties": false
  25789. }
  25790. },
  25791. "required": ["id", "type", "properties"],
  25792. "additionalProperties": false
  25793. },
  25794. "EventSessionNextToolFailed": {
  25795. "type": "object",
  25796. "properties": {
  25797. "id": {
  25798. "type": "string"
  25799. },
  25800. "type": {
  25801. "type": "string",
  25802. "enum": ["session.next.tool.failed"]
  25803. },
  25804. "properties": {
  25805. "type": "object",
  25806. "properties": {
  25807. "timestamp": {
  25808. "type": "number"
  25809. },
  25810. "sessionID": {
  25811. "type": "string",
  25812. "pattern": "^ses"
  25813. },
  25814. "assistantMessageID": {
  25815. "type": "string",
  25816. "pattern": "^msg_"
  25817. },
  25818. "callID": {
  25819. "type": "string"
  25820. },
  25821. "error": {
  25822. "$ref": "#/components/schemas/SessionErrorUnknown"
  25823. },
  25824. "result": {},
  25825. "provider": {
  25826. "type": "object",
  25827. "properties": {
  25828. "executed": {
  25829. "type": "boolean"
  25830. },
  25831. "metadata": {
  25832. "type": "object",
  25833. "additionalProperties": {
  25834. "type": "object"
  25835. }
  25836. }
  25837. },
  25838. "required": ["executed"],
  25839. "additionalProperties": false
  25840. }
  25841. },
  25842. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  25843. "additionalProperties": false
  25844. }
  25845. },
  25846. "required": ["id", "type", "properties"],
  25847. "additionalProperties": false
  25848. },
  25849. "EventSessionNextRetried": {
  25850. "type": "object",
  25851. "properties": {
  25852. "id": {
  25853. "type": "string"
  25854. },
  25855. "type": {
  25856. "type": "string",
  25857. "enum": ["session.next.retried"]
  25858. },
  25859. "properties": {
  25860. "type": "object",
  25861. "properties": {
  25862. "timestamp": {
  25863. "type": "number"
  25864. },
  25865. "sessionID": {
  25866. "type": "string",
  25867. "pattern": "^ses"
  25868. },
  25869. "attempt": {
  25870. "type": "number"
  25871. },
  25872. "error": {
  25873. "$ref": "#/components/schemas/SessionNextRetry_error"
  25874. }
  25875. },
  25876. "required": ["timestamp", "sessionID", "attempt", "error"],
  25877. "additionalProperties": false
  25878. }
  25879. },
  25880. "required": ["id", "type", "properties"],
  25881. "additionalProperties": false
  25882. },
  25883. "EventSessionNextCompactionStarted": {
  25884. "type": "object",
  25885. "properties": {
  25886. "id": {
  25887. "type": "string"
  25888. },
  25889. "type": {
  25890. "type": "string",
  25891. "enum": ["session.next.compaction.started"]
  25892. },
  25893. "properties": {
  25894. "type": "object",
  25895. "properties": {
  25896. "timestamp": {
  25897. "type": "number"
  25898. },
  25899. "sessionID": {
  25900. "type": "string",
  25901. "pattern": "^ses"
  25902. },
  25903. "messageID": {
  25904. "type": "string",
  25905. "pattern": "^msg_"
  25906. },
  25907. "reason": {
  25908. "type": "string",
  25909. "enum": ["auto", "manual"]
  25910. }
  25911. },
  25912. "required": ["timestamp", "sessionID", "messageID", "reason"],
  25913. "additionalProperties": false
  25914. }
  25915. },
  25916. "required": ["id", "type", "properties"],
  25917. "additionalProperties": false
  25918. },
  25919. "EventSessionNextCompactionDelta": {
  25920. "type": "object",
  25921. "properties": {
  25922. "id": {
  25923. "type": "string"
  25924. },
  25925. "type": {
  25926. "type": "string",
  25927. "enum": ["session.next.compaction.delta"]
  25928. },
  25929. "properties": {
  25930. "type": "object",
  25931. "properties": {
  25932. "timestamp": {
  25933. "type": "number"
  25934. },
  25935. "sessionID": {
  25936. "type": "string",
  25937. "pattern": "^ses"
  25938. },
  25939. "text": {
  25940. "type": "string"
  25941. }
  25942. },
  25943. "required": ["timestamp", "sessionID", "text"],
  25944. "additionalProperties": false
  25945. }
  25946. },
  25947. "required": ["id", "type", "properties"],
  25948. "additionalProperties": false
  25949. },
  25950. "EventSessionNextCompactionEnded": {
  25951. "type": "object",
  25952. "properties": {
  25953. "id": {
  25954. "type": "string"
  25955. },
  25956. "type": {
  25957. "type": "string",
  25958. "enum": ["session.next.compaction.ended"]
  25959. },
  25960. "properties": {
  25961. "type": "object",
  25962. "properties": {
  25963. "timestamp": {
  25964. "type": "number"
  25965. },
  25966. "sessionID": {
  25967. "type": "string",
  25968. "pattern": "^ses"
  25969. },
  25970. "text": {
  25971. "type": "string"
  25972. },
  25973. "include": {
  25974. "type": "string"
  25975. }
  25976. },
  25977. "required": ["timestamp", "sessionID", "text"],
  25978. "additionalProperties": false
  25979. }
  25980. },
  25981. "required": ["id", "type", "properties"],
  25982. "additionalProperties": false
  25983. },
  25984. "EventMessagePartDelta": {
  25985. "type": "object",
  25986. "properties": {
  25987. "id": {
  25988. "type": "string"
  25989. },
  25990. "type": {
  25991. "type": "string",
  25992. "enum": ["message.part.delta"]
  25993. },
  25994. "properties": {
  25995. "type": "object",
  25996. "properties": {
  25997. "sessionID": {
  25998. "type": "string",
  25999. "pattern": "^ses"
  26000. },
  26001. "messageID": {
  26002. "type": "string",
  26003. "pattern": "^msg"
  26004. },
  26005. "partID": {
  26006. "type": "string",
  26007. "pattern": "^prt"
  26008. },
  26009. "field": {
  26010. "type": "string"
  26011. },
  26012. "delta": {
  26013. "type": "string"
  26014. }
  26015. },
  26016. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  26017. "additionalProperties": false
  26018. }
  26019. },
  26020. "required": ["id", "type", "properties"],
  26021. "additionalProperties": false
  26022. },
  26023. "EventSessionDiff": {
  26024. "type": "object",
  26025. "properties": {
  26026. "id": {
  26027. "type": "string"
  26028. },
  26029. "type": {
  26030. "type": "string",
  26031. "enum": ["session.diff"]
  26032. },
  26033. "properties": {
  26034. "type": "object",
  26035. "properties": {
  26036. "sessionID": {
  26037. "type": "string",
  26038. "pattern": "^ses"
  26039. },
  26040. "diff": {
  26041. "type": "array",
  26042. "items": {
  26043. "$ref": "#/components/schemas/SnapshotFileDiff"
  26044. }
  26045. }
  26046. },
  26047. "required": ["sessionID", "diff"],
  26048. "additionalProperties": false
  26049. }
  26050. },
  26051. "required": ["id", "type", "properties"],
  26052. "additionalProperties": false
  26053. },
  26054. "EventSessionError": {
  26055. "type": "object",
  26056. "properties": {
  26057. "id": {
  26058. "type": "string"
  26059. },
  26060. "type": {
  26061. "type": "string",
  26062. "enum": ["session.error"]
  26063. },
  26064. "properties": {
  26065. "type": "object",
  26066. "properties": {
  26067. "sessionID": {
  26068. "type": "string",
  26069. "pattern": "^ses"
  26070. },
  26071. "error": {
  26072. "anyOf": [
  26073. {
  26074. "$ref": "#/components/schemas/ProviderAuthError"
  26075. },
  26076. {
  26077. "$ref": "#/components/schemas/UnknownError"
  26078. },
  26079. {
  26080. "$ref": "#/components/schemas/MessageOutputLengthError"
  26081. },
  26082. {
  26083. "$ref": "#/components/schemas/MessageAbortedError"
  26084. },
  26085. {
  26086. "$ref": "#/components/schemas/StructuredOutputError"
  26087. },
  26088. {
  26089. "$ref": "#/components/schemas/ContextOverflowError"
  26090. },
  26091. {
  26092. "$ref": "#/components/schemas/APIError"
  26093. }
  26094. ]
  26095. }
  26096. },
  26097. "additionalProperties": false
  26098. }
  26099. },
  26100. "required": ["id", "type", "properties"],
  26101. "additionalProperties": false
  26102. },
  26103. "EventInstallationUpdated": {
  26104. "type": "object",
  26105. "properties": {
  26106. "id": {
  26107. "type": "string"
  26108. },
  26109. "type": {
  26110. "type": "string",
  26111. "enum": ["installation.updated"]
  26112. },
  26113. "properties": {
  26114. "type": "object",
  26115. "properties": {
  26116. "version": {
  26117. "type": "string"
  26118. }
  26119. },
  26120. "required": ["version"],
  26121. "additionalProperties": false
  26122. }
  26123. },
  26124. "required": ["id", "type", "properties"],
  26125. "additionalProperties": false
  26126. },
  26127. "EventInstallationUpdate-available": {
  26128. "type": "object",
  26129. "properties": {
  26130. "id": {
  26131. "type": "string"
  26132. },
  26133. "type": {
  26134. "type": "string",
  26135. "enum": ["installation.update-available"]
  26136. },
  26137. "properties": {
  26138. "type": "object",
  26139. "properties": {
  26140. "version": {
  26141. "type": "string"
  26142. }
  26143. },
  26144. "required": ["version"],
  26145. "additionalProperties": false
  26146. }
  26147. },
  26148. "required": ["id", "type", "properties"],
  26149. "additionalProperties": false
  26150. },
  26151. "EventFileEdited": {
  26152. "type": "object",
  26153. "properties": {
  26154. "id": {
  26155. "type": "string"
  26156. },
  26157. "type": {
  26158. "type": "string",
  26159. "enum": ["file.edited"]
  26160. },
  26161. "properties": {
  26162. "type": "object",
  26163. "properties": {
  26164. "file": {
  26165. "type": "string"
  26166. }
  26167. },
  26168. "required": ["file"],
  26169. "additionalProperties": false
  26170. }
  26171. },
  26172. "required": ["id", "type", "properties"],
  26173. "additionalProperties": false
  26174. },
  26175. "EventAccountAdded": {
  26176. "type": "object",
  26177. "properties": {
  26178. "id": {
  26179. "type": "string"
  26180. },
  26181. "type": {
  26182. "type": "string",
  26183. "enum": ["account.added"]
  26184. },
  26185. "properties": {
  26186. "type": "object",
  26187. "properties": {
  26188. "account": {
  26189. "$ref": "#/components/schemas/AuthInfo"
  26190. }
  26191. },
  26192. "required": ["account"],
  26193. "additionalProperties": false
  26194. }
  26195. },
  26196. "required": ["id", "type", "properties"],
  26197. "additionalProperties": false
  26198. },
  26199. "EventAccountRemoved": {
  26200. "type": "object",
  26201. "properties": {
  26202. "id": {
  26203. "type": "string"
  26204. },
  26205. "type": {
  26206. "type": "string",
  26207. "enum": ["account.removed"]
  26208. },
  26209. "properties": {
  26210. "type": "object",
  26211. "properties": {
  26212. "account": {
  26213. "$ref": "#/components/schemas/AuthInfo"
  26214. }
  26215. },
  26216. "required": ["account"],
  26217. "additionalProperties": false
  26218. }
  26219. },
  26220. "required": ["id", "type", "properties"],
  26221. "additionalProperties": false
  26222. },
  26223. "EventAccountSwitched": {
  26224. "type": "object",
  26225. "properties": {
  26226. "id": {
  26227. "type": "string"
  26228. },
  26229. "type": {
  26230. "type": "string",
  26231. "enum": ["account.switched"]
  26232. },
  26233. "properties": {
  26234. "type": "object",
  26235. "properties": {
  26236. "serviceID": {
  26237. "type": "string"
  26238. },
  26239. "from": {
  26240. "type": "string"
  26241. },
  26242. "to": {
  26243. "type": "string"
  26244. }
  26245. },
  26246. "required": ["serviceID"],
  26247. "additionalProperties": false
  26248. }
  26249. },
  26250. "required": ["id", "type", "properties"],
  26251. "additionalProperties": false
  26252. },
  26253. "EventPermissionV2Asked": {
  26254. "type": "object",
  26255. "properties": {
  26256. "id": {
  26257. "type": "string"
  26258. },
  26259. "type": {
  26260. "type": "string",
  26261. "enum": ["permission.v2.asked"]
  26262. },
  26263. "properties": {
  26264. "type": "object",
  26265. "properties": {
  26266. "id": {
  26267. "type": "string",
  26268. "pattern": "^per"
  26269. },
  26270. "sessionID": {
  26271. "type": "string",
  26272. "pattern": "^ses"
  26273. },
  26274. "action": {
  26275. "type": "string"
  26276. },
  26277. "resources": {
  26278. "type": "array",
  26279. "items": {
  26280. "type": "string"
  26281. }
  26282. },
  26283. "save": {
  26284. "type": "array",
  26285. "items": {
  26286. "type": "string"
  26287. }
  26288. },
  26289. "metadata": {
  26290. "type": "object"
  26291. },
  26292. "source": {
  26293. "$ref": "#/components/schemas/PermissionV2Source"
  26294. }
  26295. },
  26296. "required": ["id", "sessionID", "action", "resources"],
  26297. "additionalProperties": false
  26298. }
  26299. },
  26300. "required": ["id", "type", "properties"],
  26301. "additionalProperties": false
  26302. },
  26303. "EventPermissionV2Replied": {
  26304. "type": "object",
  26305. "properties": {
  26306. "id": {
  26307. "type": "string"
  26308. },
  26309. "type": {
  26310. "type": "string",
  26311. "enum": ["permission.v2.replied"]
  26312. },
  26313. "properties": {
  26314. "type": "object",
  26315. "properties": {
  26316. "sessionID": {
  26317. "type": "string",
  26318. "pattern": "^ses"
  26319. },
  26320. "requestID": {
  26321. "type": "string",
  26322. "pattern": "^per"
  26323. },
  26324. "reply": {
  26325. "$ref": "#/components/schemas/PermissionV2Reply"
  26326. }
  26327. },
  26328. "required": ["sessionID", "requestID", "reply"],
  26329. "additionalProperties": false
  26330. }
  26331. },
  26332. "required": ["id", "type", "properties"],
  26333. "additionalProperties": false
  26334. },
  26335. "EventFileWatcherUpdated": {
  26336. "type": "object",
  26337. "properties": {
  26338. "id": {
  26339. "type": "string"
  26340. },
  26341. "type": {
  26342. "type": "string",
  26343. "enum": ["file.watcher.updated"]
  26344. },
  26345. "properties": {
  26346. "type": "object",
  26347. "properties": {
  26348. "file": {
  26349. "type": "string"
  26350. },
  26351. "event": {
  26352. "type": "string",
  26353. "enum": ["add", "change", "unlink"]
  26354. }
  26355. },
  26356. "required": ["file", "event"],
  26357. "additionalProperties": false
  26358. }
  26359. },
  26360. "required": ["id", "type", "properties"],
  26361. "additionalProperties": false
  26362. },
  26363. "EventPtyCreated": {
  26364. "type": "object",
  26365. "properties": {
  26366. "id": {
  26367. "type": "string"
  26368. },
  26369. "type": {
  26370. "type": "string",
  26371. "enum": ["pty.created"]
  26372. },
  26373. "properties": {
  26374. "type": "object",
  26375. "properties": {
  26376. "info": {
  26377. "$ref": "#/components/schemas/Pty"
  26378. }
  26379. },
  26380. "required": ["info"],
  26381. "additionalProperties": false
  26382. }
  26383. },
  26384. "required": ["id", "type", "properties"],
  26385. "additionalProperties": false
  26386. },
  26387. "EventPtyUpdated": {
  26388. "type": "object",
  26389. "properties": {
  26390. "id": {
  26391. "type": "string"
  26392. },
  26393. "type": {
  26394. "type": "string",
  26395. "enum": ["pty.updated"]
  26396. },
  26397. "properties": {
  26398. "type": "object",
  26399. "properties": {
  26400. "info": {
  26401. "$ref": "#/components/schemas/Pty"
  26402. }
  26403. },
  26404. "required": ["info"],
  26405. "additionalProperties": false
  26406. }
  26407. },
  26408. "required": ["id", "type", "properties"],
  26409. "additionalProperties": false
  26410. },
  26411. "EventPtyExited": {
  26412. "type": "object",
  26413. "properties": {
  26414. "id": {
  26415. "type": "string"
  26416. },
  26417. "type": {
  26418. "type": "string",
  26419. "enum": ["pty.exited"]
  26420. },
  26421. "properties": {
  26422. "type": "object",
  26423. "properties": {
  26424. "id": {
  26425. "type": "string",
  26426. "pattern": "^pty"
  26427. },
  26428. "exitCode": {
  26429. "type": "integer",
  26430. "minimum": 0
  26431. }
  26432. },
  26433. "required": ["id", "exitCode"],
  26434. "additionalProperties": false
  26435. }
  26436. },
  26437. "required": ["id", "type", "properties"],
  26438. "additionalProperties": false
  26439. },
  26440. "EventPtyDeleted": {
  26441. "type": "object",
  26442. "properties": {
  26443. "id": {
  26444. "type": "string"
  26445. },
  26446. "type": {
  26447. "type": "string",
  26448. "enum": ["pty.deleted"]
  26449. },
  26450. "properties": {
  26451. "type": "object",
  26452. "properties": {
  26453. "id": {
  26454. "type": "string",
  26455. "pattern": "^pty"
  26456. }
  26457. },
  26458. "required": ["id"],
  26459. "additionalProperties": false
  26460. }
  26461. },
  26462. "required": ["id", "type", "properties"],
  26463. "additionalProperties": false
  26464. },
  26465. "EventQuestionV2Asked": {
  26466. "type": "object",
  26467. "properties": {
  26468. "id": {
  26469. "type": "string"
  26470. },
  26471. "type": {
  26472. "type": "string",
  26473. "enum": ["question.v2.asked"]
  26474. },
  26475. "properties": {
  26476. "type": "object",
  26477. "properties": {
  26478. "id": {
  26479. "type": "string",
  26480. "pattern": "^que"
  26481. },
  26482. "sessionID": {
  26483. "type": "string",
  26484. "pattern": "^ses"
  26485. },
  26486. "questions": {
  26487. "type": "array",
  26488. "items": {
  26489. "$ref": "#/components/schemas/QuestionV2Info"
  26490. },
  26491. "description": "Questions to ask"
  26492. },
  26493. "tool": {
  26494. "$ref": "#/components/schemas/QuestionV2Tool"
  26495. }
  26496. },
  26497. "required": ["id", "sessionID", "questions"],
  26498. "additionalProperties": false
  26499. }
  26500. },
  26501. "required": ["id", "type", "properties"],
  26502. "additionalProperties": false
  26503. },
  26504. "EventQuestionV2Replied": {
  26505. "type": "object",
  26506. "properties": {
  26507. "id": {
  26508. "type": "string"
  26509. },
  26510. "type": {
  26511. "type": "string",
  26512. "enum": ["question.v2.replied"]
  26513. },
  26514. "properties": {
  26515. "type": "object",
  26516. "properties": {
  26517. "sessionID": {
  26518. "type": "string",
  26519. "pattern": "^ses"
  26520. },
  26521. "requestID": {
  26522. "type": "string",
  26523. "pattern": "^que"
  26524. },
  26525. "answers": {
  26526. "type": "array",
  26527. "items": {
  26528. "$ref": "#/components/schemas/QuestionV2Answer"
  26529. }
  26530. }
  26531. },
  26532. "required": ["sessionID", "requestID", "answers"],
  26533. "additionalProperties": false
  26534. }
  26535. },
  26536. "required": ["id", "type", "properties"],
  26537. "additionalProperties": false
  26538. },
  26539. "EventQuestionV2Rejected": {
  26540. "type": "object",
  26541. "properties": {
  26542. "id": {
  26543. "type": "string"
  26544. },
  26545. "type": {
  26546. "type": "string",
  26547. "enum": ["question.v2.rejected"]
  26548. },
  26549. "properties": {
  26550. "type": "object",
  26551. "properties": {
  26552. "sessionID": {
  26553. "type": "string",
  26554. "pattern": "^ses"
  26555. },
  26556. "requestID": {
  26557. "type": "string",
  26558. "pattern": "^que"
  26559. }
  26560. },
  26561. "required": ["sessionID", "requestID"],
  26562. "additionalProperties": false
  26563. }
  26564. },
  26565. "required": ["id", "type", "properties"],
  26566. "additionalProperties": false
  26567. },
  26568. "EventTodoUpdated": {
  26569. "type": "object",
  26570. "properties": {
  26571. "id": {
  26572. "type": "string"
  26573. },
  26574. "type": {
  26575. "type": "string",
  26576. "enum": ["todo.updated"]
  26577. },
  26578. "properties": {
  26579. "type": "object",
  26580. "properties": {
  26581. "sessionID": {
  26582. "type": "string",
  26583. "pattern": "^ses"
  26584. },
  26585. "todos": {
  26586. "type": "array",
  26587. "items": {
  26588. "$ref": "#/components/schemas/Todo"
  26589. }
  26590. }
  26591. },
  26592. "required": ["sessionID", "todos"],
  26593. "additionalProperties": false
  26594. }
  26595. },
  26596. "required": ["id", "type", "properties"],
  26597. "additionalProperties": false
  26598. },
  26599. "EventLspUpdated": {
  26600. "type": "object",
  26601. "properties": {
  26602. "id": {
  26603. "type": "string"
  26604. },
  26605. "type": {
  26606. "type": "string",
  26607. "enum": ["lsp.updated"]
  26608. },
  26609. "properties": {
  26610. "type": "object",
  26611. "properties": {}
  26612. }
  26613. },
  26614. "required": ["id", "type", "properties"],
  26615. "additionalProperties": false
  26616. },
  26617. "EventPermissionAsked": {
  26618. "type": "object",
  26619. "properties": {
  26620. "id": {
  26621. "type": "string"
  26622. },
  26623. "type": {
  26624. "type": "string",
  26625. "enum": ["permission.asked"]
  26626. },
  26627. "properties": {
  26628. "type": "object",
  26629. "properties": {
  26630. "id": {
  26631. "type": "string",
  26632. "pattern": "^per"
  26633. },
  26634. "sessionID": {
  26635. "type": "string",
  26636. "pattern": "^ses"
  26637. },
  26638. "permission": {
  26639. "type": "string"
  26640. },
  26641. "patterns": {
  26642. "type": "array",
  26643. "items": {
  26644. "type": "string"
  26645. }
  26646. },
  26647. "metadata": {
  26648. "type": "object"
  26649. },
  26650. "always": {
  26651. "type": "array",
  26652. "items": {
  26653. "type": "string"
  26654. }
  26655. },
  26656. "tool": {
  26657. "type": "object",
  26658. "properties": {
  26659. "messageID": {
  26660. "type": "string"
  26661. },
  26662. "callID": {
  26663. "type": "string"
  26664. }
  26665. },
  26666. "required": ["messageID", "callID"],
  26667. "additionalProperties": false
  26668. }
  26669. },
  26670. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  26671. "additionalProperties": false
  26672. }
  26673. },
  26674. "required": ["id", "type", "properties"],
  26675. "additionalProperties": false
  26676. },
  26677. "EventPermissionReplied": {
  26678. "type": "object",
  26679. "properties": {
  26680. "id": {
  26681. "type": "string"
  26682. },
  26683. "type": {
  26684. "type": "string",
  26685. "enum": ["permission.replied"]
  26686. },
  26687. "properties": {
  26688. "type": "object",
  26689. "properties": {
  26690. "sessionID": {
  26691. "type": "string",
  26692. "pattern": "^ses"
  26693. },
  26694. "requestID": {
  26695. "type": "string",
  26696. "pattern": "^per"
  26697. },
  26698. "reply": {
  26699. "type": "string",
  26700. "enum": ["once", "always", "reject"]
  26701. }
  26702. },
  26703. "required": ["sessionID", "requestID", "reply"],
  26704. "additionalProperties": false
  26705. }
  26706. },
  26707. "required": ["id", "type", "properties"],
  26708. "additionalProperties": false
  26709. },
  26710. "EventMcpToolsChanged": {
  26711. "type": "object",
  26712. "properties": {
  26713. "id": {
  26714. "type": "string"
  26715. },
  26716. "type": {
  26717. "type": "string",
  26718. "enum": ["mcp.tools.changed"]
  26719. },
  26720. "properties": {
  26721. "type": "object",
  26722. "properties": {
  26723. "server": {
  26724. "type": "string"
  26725. }
  26726. },
  26727. "required": ["server"],
  26728. "additionalProperties": false
  26729. }
  26730. },
  26731. "required": ["id", "type", "properties"],
  26732. "additionalProperties": false
  26733. },
  26734. "EventMcpBrowserOpenFailed": {
  26735. "type": "object",
  26736. "properties": {
  26737. "id": {
  26738. "type": "string"
  26739. },
  26740. "type": {
  26741. "type": "string",
  26742. "enum": ["mcp.browser.open.failed"]
  26743. },
  26744. "properties": {
  26745. "type": "object",
  26746. "properties": {
  26747. "mcpName": {
  26748. "type": "string"
  26749. },
  26750. "url": {
  26751. "type": "string"
  26752. }
  26753. },
  26754. "required": ["mcpName", "url"],
  26755. "additionalProperties": false
  26756. }
  26757. },
  26758. "required": ["id", "type", "properties"],
  26759. "additionalProperties": false
  26760. },
  26761. "EventCommandExecuted": {
  26762. "type": "object",
  26763. "properties": {
  26764. "id": {
  26765. "type": "string"
  26766. },
  26767. "type": {
  26768. "type": "string",
  26769. "enum": ["command.executed"]
  26770. },
  26771. "properties": {
  26772. "type": "object",
  26773. "properties": {
  26774. "name": {
  26775. "type": "string"
  26776. },
  26777. "sessionID": {
  26778. "type": "string",
  26779. "pattern": "^ses"
  26780. },
  26781. "arguments": {
  26782. "type": "string"
  26783. },
  26784. "messageID": {
  26785. "type": "string",
  26786. "pattern": "^msg"
  26787. }
  26788. },
  26789. "required": ["name", "sessionID", "arguments", "messageID"],
  26790. "additionalProperties": false
  26791. }
  26792. },
  26793. "required": ["id", "type", "properties"],
  26794. "additionalProperties": false
  26795. },
  26796. "EventProjectDirectoriesUpdated": {
  26797. "type": "object",
  26798. "properties": {
  26799. "id": {
  26800. "type": "string"
  26801. },
  26802. "type": {
  26803. "type": "string",
  26804. "enum": ["project.directories.updated"]
  26805. },
  26806. "properties": {
  26807. "type": "object",
  26808. "properties": {
  26809. "projectID": {
  26810. "type": "string"
  26811. }
  26812. },
  26813. "required": ["projectID"],
  26814. "additionalProperties": false
  26815. }
  26816. },
  26817. "required": ["id", "type", "properties"],
  26818. "additionalProperties": false
  26819. },
  26820. "EventProjectUpdated": {
  26821. "type": "object",
  26822. "properties": {
  26823. "id": {
  26824. "type": "string"
  26825. },
  26826. "type": {
  26827. "type": "string",
  26828. "enum": ["project.updated"]
  26829. },
  26830. "properties": {
  26831. "type": "object",
  26832. "properties": {
  26833. "id": {
  26834. "type": "string"
  26835. },
  26836. "worktree": {
  26837. "type": "string"
  26838. },
  26839. "vcs": {
  26840. "type": "string",
  26841. "enum": ["git"]
  26842. },
  26843. "name": {
  26844. "type": "string"
  26845. },
  26846. "icon": {
  26847. "type": "object",
  26848. "properties": {
  26849. "url": {
  26850. "type": "string"
  26851. },
  26852. "override": {
  26853. "type": "string"
  26854. },
  26855. "color": {
  26856. "type": "string"
  26857. }
  26858. },
  26859. "additionalProperties": false
  26860. },
  26861. "commands": {
  26862. "type": "object",
  26863. "properties": {
  26864. "start": {
  26865. "type": "string",
  26866. "description": "Startup script to run when creating a new workspace (worktree)"
  26867. }
  26868. },
  26869. "additionalProperties": false
  26870. },
  26871. "time": {
  26872. "type": "object",
  26873. "properties": {
  26874. "created": {
  26875. "type": "integer",
  26876. "minimum": 0
  26877. },
  26878. "updated": {
  26879. "type": "integer",
  26880. "minimum": 0
  26881. },
  26882. "initialized": {
  26883. "type": "integer",
  26884. "minimum": 0
  26885. }
  26886. },
  26887. "required": ["created", "updated"],
  26888. "additionalProperties": false
  26889. },
  26890. "sandboxes": {
  26891. "type": "array",
  26892. "items": {
  26893. "type": "string"
  26894. }
  26895. }
  26896. },
  26897. "required": ["id", "worktree", "time", "sandboxes"],
  26898. "additionalProperties": false
  26899. }
  26900. },
  26901. "required": ["id", "type", "properties"],
  26902. "additionalProperties": false
  26903. },
  26904. "EventQuestionAsked": {
  26905. "type": "object",
  26906. "properties": {
  26907. "id": {
  26908. "type": "string"
  26909. },
  26910. "type": {
  26911. "type": "string",
  26912. "enum": ["question.asked"]
  26913. },
  26914. "properties": {
  26915. "type": "object",
  26916. "properties": {
  26917. "id": {
  26918. "type": "string",
  26919. "pattern": "^que"
  26920. },
  26921. "sessionID": {
  26922. "type": "string",
  26923. "pattern": "^ses"
  26924. },
  26925. "questions": {
  26926. "type": "array",
  26927. "items": {
  26928. "$ref": "#/components/schemas/QuestionInfo"
  26929. },
  26930. "description": "Questions to ask"
  26931. },
  26932. "tool": {
  26933. "$ref": "#/components/schemas/QuestionTool"
  26934. }
  26935. },
  26936. "required": ["id", "sessionID", "questions"],
  26937. "additionalProperties": false
  26938. }
  26939. },
  26940. "required": ["id", "type", "properties"],
  26941. "additionalProperties": false
  26942. },
  26943. "EventQuestionReplied": {
  26944. "type": "object",
  26945. "properties": {
  26946. "id": {
  26947. "type": "string"
  26948. },
  26949. "type": {
  26950. "type": "string",
  26951. "enum": ["question.replied"]
  26952. },
  26953. "properties": {
  26954. "type": "object",
  26955. "properties": {
  26956. "sessionID": {
  26957. "type": "string",
  26958. "pattern": "^ses"
  26959. },
  26960. "requestID": {
  26961. "type": "string",
  26962. "pattern": "^que"
  26963. },
  26964. "answers": {
  26965. "type": "array",
  26966. "items": {
  26967. "$ref": "#/components/schemas/QuestionAnswer"
  26968. }
  26969. }
  26970. },
  26971. "required": ["sessionID", "requestID", "answers"],
  26972. "additionalProperties": false
  26973. }
  26974. },
  26975. "required": ["id", "type", "properties"],
  26976. "additionalProperties": false
  26977. },
  26978. "EventQuestionRejected": {
  26979. "type": "object",
  26980. "properties": {
  26981. "id": {
  26982. "type": "string"
  26983. },
  26984. "type": {
  26985. "type": "string",
  26986. "enum": ["question.rejected"]
  26987. },
  26988. "properties": {
  26989. "type": "object",
  26990. "properties": {
  26991. "sessionID": {
  26992. "type": "string",
  26993. "pattern": "^ses"
  26994. },
  26995. "requestID": {
  26996. "type": "string",
  26997. "pattern": "^que"
  26998. }
  26999. },
  27000. "required": ["sessionID", "requestID"],
  27001. "additionalProperties": false
  27002. }
  27003. },
  27004. "required": ["id", "type", "properties"],
  27005. "additionalProperties": false
  27006. },
  27007. "EventSessionStatus": {
  27008. "type": "object",
  27009. "properties": {
  27010. "id": {
  27011. "type": "string"
  27012. },
  27013. "type": {
  27014. "type": "string",
  27015. "enum": ["session.status"]
  27016. },
  27017. "properties": {
  27018. "type": "object",
  27019. "properties": {
  27020. "sessionID": {
  27021. "type": "string",
  27022. "pattern": "^ses"
  27023. },
  27024. "status": {
  27025. "$ref": "#/components/schemas/SessionStatus"
  27026. }
  27027. },
  27028. "required": ["sessionID", "status"],
  27029. "additionalProperties": false
  27030. }
  27031. },
  27032. "required": ["id", "type", "properties"],
  27033. "additionalProperties": false
  27034. },
  27035. "EventSessionIdle": {
  27036. "type": "object",
  27037. "properties": {
  27038. "id": {
  27039. "type": "string"
  27040. },
  27041. "type": {
  27042. "type": "string",
  27043. "enum": ["session.idle"]
  27044. },
  27045. "properties": {
  27046. "type": "object",
  27047. "properties": {
  27048. "sessionID": {
  27049. "type": "string",
  27050. "pattern": "^ses"
  27051. }
  27052. },
  27053. "required": ["sessionID"],
  27054. "additionalProperties": false
  27055. }
  27056. },
  27057. "required": ["id", "type", "properties"],
  27058. "additionalProperties": false
  27059. },
  27060. "EventSessionCompacted": {
  27061. "type": "object",
  27062. "properties": {
  27063. "id": {
  27064. "type": "string"
  27065. },
  27066. "type": {
  27067. "type": "string",
  27068. "enum": ["session.compacted"]
  27069. },
  27070. "properties": {
  27071. "type": "object",
  27072. "properties": {
  27073. "sessionID": {
  27074. "type": "string",
  27075. "pattern": "^ses"
  27076. }
  27077. },
  27078. "required": ["sessionID"],
  27079. "additionalProperties": false
  27080. }
  27081. },
  27082. "required": ["id", "type", "properties"],
  27083. "additionalProperties": false
  27084. },
  27085. "EventVcsBranchUpdated": {
  27086. "type": "object",
  27087. "properties": {
  27088. "id": {
  27089. "type": "string"
  27090. },
  27091. "type": {
  27092. "type": "string",
  27093. "enum": ["vcs.branch.updated"]
  27094. },
  27095. "properties": {
  27096. "type": "object",
  27097. "properties": {
  27098. "branch": {
  27099. "type": "string"
  27100. }
  27101. },
  27102. "additionalProperties": false
  27103. }
  27104. },
  27105. "required": ["id", "type", "properties"],
  27106. "additionalProperties": false
  27107. },
  27108. "EventWorktreeReady": {
  27109. "type": "object",
  27110. "properties": {
  27111. "id": {
  27112. "type": "string"
  27113. },
  27114. "type": {
  27115. "type": "string",
  27116. "enum": ["worktree.ready"]
  27117. },
  27118. "properties": {
  27119. "type": "object",
  27120. "properties": {
  27121. "name": {
  27122. "type": "string"
  27123. },
  27124. "branch": {
  27125. "type": "string"
  27126. }
  27127. },
  27128. "required": ["name"],
  27129. "additionalProperties": false
  27130. }
  27131. },
  27132. "required": ["id", "type", "properties"],
  27133. "additionalProperties": false
  27134. },
  27135. "EventWorktreeFailed": {
  27136. "type": "object",
  27137. "properties": {
  27138. "id": {
  27139. "type": "string"
  27140. },
  27141. "type": {
  27142. "type": "string",
  27143. "enum": ["worktree.failed"]
  27144. },
  27145. "properties": {
  27146. "type": "object",
  27147. "properties": {
  27148. "message": {
  27149. "type": "string"
  27150. }
  27151. },
  27152. "required": ["message"],
  27153. "additionalProperties": false
  27154. }
  27155. },
  27156. "required": ["id", "type", "properties"],
  27157. "additionalProperties": false
  27158. },
  27159. "EventWorkspaceReady": {
  27160. "type": "object",
  27161. "properties": {
  27162. "id": {
  27163. "type": "string"
  27164. },
  27165. "type": {
  27166. "type": "string",
  27167. "enum": ["workspace.ready"]
  27168. },
  27169. "properties": {
  27170. "type": "object",
  27171. "properties": {
  27172. "name": {
  27173. "type": "string"
  27174. }
  27175. },
  27176. "required": ["name"],
  27177. "additionalProperties": false
  27178. }
  27179. },
  27180. "required": ["id", "type", "properties"],
  27181. "additionalProperties": false
  27182. },
  27183. "EventWorkspaceFailed": {
  27184. "type": "object",
  27185. "properties": {
  27186. "id": {
  27187. "type": "string"
  27188. },
  27189. "type": {
  27190. "type": "string",
  27191. "enum": ["workspace.failed"]
  27192. },
  27193. "properties": {
  27194. "type": "object",
  27195. "properties": {
  27196. "message": {
  27197. "type": "string"
  27198. }
  27199. },
  27200. "required": ["message"],
  27201. "additionalProperties": false
  27202. }
  27203. },
  27204. "required": ["id", "type", "properties"],
  27205. "additionalProperties": false
  27206. },
  27207. "EventWorkspaceStatus": {
  27208. "type": "object",
  27209. "properties": {
  27210. "id": {
  27211. "type": "string"
  27212. },
  27213. "type": {
  27214. "type": "string",
  27215. "enum": ["workspace.status"]
  27216. },
  27217. "properties": {
  27218. "type": "object",
  27219. "properties": {
  27220. "workspaceID": {
  27221. "type": "string",
  27222. "pattern": "^wrk"
  27223. },
  27224. "status": {
  27225. "type": "string",
  27226. "enum": ["connected", "connecting", "disconnected", "error"]
  27227. }
  27228. },
  27229. "required": ["workspaceID", "status"],
  27230. "additionalProperties": false
  27231. }
  27232. },
  27233. "required": ["id", "type", "properties"],
  27234. "additionalProperties": false
  27235. },
  27236. "EventServerConnected": {
  27237. "type": "object",
  27238. "properties": {
  27239. "id": {
  27240. "type": "string"
  27241. },
  27242. "type": {
  27243. "type": "string",
  27244. "enum": ["server.connected"]
  27245. },
  27246. "properties": {
  27247. "type": "object",
  27248. "properties": {}
  27249. }
  27250. },
  27251. "required": ["id", "type", "properties"],
  27252. "additionalProperties": false
  27253. },
  27254. "EventGlobalDisposed": {
  27255. "type": "object",
  27256. "properties": {
  27257. "id": {
  27258. "type": "string"
  27259. },
  27260. "type": {
  27261. "type": "string",
  27262. "enum": ["global.disposed"]
  27263. },
  27264. "properties": {
  27265. "type": "object",
  27266. "properties": {}
  27267. }
  27268. },
  27269. "required": ["id", "type", "properties"],
  27270. "additionalProperties": false
  27271. },
  27272. "BadRequestError": {
  27273. "type": "object",
  27274. "required": ["name", "data"],
  27275. "properties": {
  27276. "name": {
  27277. "type": "string",
  27278. "enum": ["BadRequest"]
  27279. },
  27280. "data": {
  27281. "type": "object",
  27282. "required": ["message"],
  27283. "properties": {
  27284. "message": {
  27285. "type": "string"
  27286. },
  27287. "kind": {
  27288. "type": "string",
  27289. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  27290. }
  27291. }
  27292. }
  27293. }
  27294. }
  27295. }
  27296. },
  27297. "security": [],
  27298. "tags": [
  27299. {
  27300. "name": "control",
  27301. "description": "Control plane routes."
  27302. },
  27303. {
  27304. "name": "controlPlane",
  27305. "description": "Control-plane orchestration routes."
  27306. },
  27307. {
  27308. "name": "global",
  27309. "description": "Global server routes."
  27310. },
  27311. {
  27312. "name": "event",
  27313. "description": "Instance event stream route."
  27314. },
  27315. {
  27316. "name": "config",
  27317. "description": "Experimental HttpApi config routes."
  27318. },
  27319. {
  27320. "name": "experimental",
  27321. "description": "Experimental HttpApi read-only routes."
  27322. },
  27323. {
  27324. "name": "file",
  27325. "description": "Experimental HttpApi file routes."
  27326. },
  27327. {
  27328. "name": "instance",
  27329. "description": "Experimental HttpApi instance read routes."
  27330. },
  27331. {
  27332. "name": "mcp",
  27333. "description": "Experimental HttpApi MCP routes."
  27334. },
  27335. {
  27336. "name": "project",
  27337. "description": "Experimental HttpApi project routes."
  27338. },
  27339. {
  27340. "name": "projectCopy",
  27341. "description": "Project copy management routes."
  27342. },
  27343. {
  27344. "name": "pty",
  27345. "description": "Experimental HttpApi PTY routes."
  27346. },
  27347. {
  27348. "name": "question",
  27349. "description": "Question routes."
  27350. },
  27351. {
  27352. "name": "permission",
  27353. "description": "Experimental HttpApi permission routes."
  27354. },
  27355. {
  27356. "name": "provider",
  27357. "description": "Experimental HttpApi provider routes."
  27358. },
  27359. {
  27360. "name": "session",
  27361. "description": "Experimental HttpApi session routes."
  27362. },
  27363. {
  27364. "name": "sync",
  27365. "description": "Experimental HttpApi sync routes."
  27366. },
  27367. {
  27368. "name": "tui",
  27369. "description": "Experimental HttpApi TUI routes."
  27370. },
  27371. {
  27372. "name": "workspace",
  27373. "description": "Experimental HttpApi workspace routes."
  27374. },
  27375. {
  27376. "name": "opencode experimental HttpApi",
  27377. "description": "Experimental HttpApi surface for selected instance routes."
  27378. },
  27379. {
  27380. "name": "opencode experimental HttpApi",
  27381. "description": "Experimental HttpApi surface for selected instance routes."
  27382. },
  27383. {
  27384. "name": "v2",
  27385. "description": "Experimental v2 routes."
  27386. },
  27387. {
  27388. "name": "v2 messages",
  27389. "description": "Experimental v2 message routes."
  27390. },
  27391. {
  27392. "name": "v2 models",
  27393. "description": "Experimental v2 model routes."
  27394. },
  27395. {
  27396. "name": "v2 providers",
  27397. "description": "Experimental v2 provider routes."
  27398. },
  27399. {
  27400. "name": "v2 permissions",
  27401. "description": "Experimental v2 permission routes."
  27402. },
  27403. {
  27404. "name": "v2 session permissions",
  27405. "description": "Experimental v2 session permission routes."
  27406. },
  27407. {
  27408. "name": "v2 saved permissions",
  27409. "description": "Experimental v2 saved permission routes."
  27410. },
  27411. {
  27412. "name": "v2 filesystem",
  27413. "description": "Experimental v2 location-scoped filesystem routes."
  27414. },
  27415. {
  27416. "name": "v2 commands",
  27417. "description": "Experimental v2 command routes."
  27418. },
  27419. {
  27420. "name": "v2 skills",
  27421. "description": "Experimental v2 skill routes."
  27422. },
  27423. {
  27424. "name": "v2 events",
  27425. "description": "Experimental v2 event stream route."
  27426. },
  27427. {
  27428. "name": "v2 questions",
  27429. "description": "Experimental v2 question routes."
  27430. },
  27431. {
  27432. "name": "v2 session questions",
  27433. "description": "Experimental v2 session question routes."
  27434. },
  27435. {
  27436. "name": "pty",
  27437. "description": "PTY websocket route."
  27438. }
  27439. ]
  27440. }