openapi.json 874 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391273922739327394273952739627397273982739927400274012740227403274042740527406274072740827409274102741127412274132741427415274162741727418274192742027421274222742327424274252742627427274282742927430274312743227433274342743527436274372743827439274402744127442274432744427445274462744727448274492745027451274522745327454274552745627457274582745927460274612746227463274642746527466274672746827469274702747127472274732747427475274762747727478274792748027481274822748327484274852748627487274882748927490274912749227493274942749527496274972749827499275002750127502275032750427505275062750727508275092751027511275122751327514275152751627517275182751927520275212752227523275242752527526275272752827529275302753127532275332753427535275362753727538275392754027541275422754327544275452754627547275482754927550275512755227553275542755527556275572755827559275602756127562275632756427565275662756727568275692757027571275722757327574275752757627577275782757927580275812758227583275842758527586275872758827589275902759127592275932759427595275962759727598275992760027601276022760327604276052760627607276082760927610276112761227613276142761527616276172761827619276202762127622276232762427625276262762727628276292763027631276322763327634276352763627637276382763927640276412764227643276442764527646276472764827649276502765127652276532765427655276562765727658276592766027661276622766327664276652766627667276682766927670276712767227673276742767527676276772767827679276802768127682276832768427685276862768727688276892769027691276922769327694276952769627697276982769927700277012770227703277042770527706277072770827709277102771127712277132771427715277162771727718277192772027721277222772327724277252772627727277282772927730277312773227733277342773527736277372773827739277402774127742277432774427745277462774727748277492775027751277522775327754277552775627757277582775927760277612776227763277642776527766277672776827769277702777127772277732777427775277762777727778277792778027781277822778327784277852778627787277882778927790277912779227793277942779527796277972779827799278002780127802278032780427805278062780727808278092781027811278122781327814278152781627817278182781927820278212782227823278242782527826278272782827829278302783127832278332783427835278362783727838278392784027841278422784327844278452784627847278482784927850278512785227853278542785527856278572785827859278602786127862278632786427865278662786727868278692787027871278722787327874278752787627877278782787927880278812788227883278842788527886278872788827889278902789127892278932789427895278962789727898278992790027901279022790327904279052790627907279082790927910279112791227913279142791527916279172791827919279202792127922279232792427925279262792727928279292793027931279322793327934279352793627937279382793927940279412794227943279442794527946279472794827949279502795127952279532795427955279562795727958279592796027961279622796327964279652796627967279682796927970279712797227973279742797527976279772797827979279802798127982279832798427985279862798727988279892799027991279922799327994279952799627997279982799928000280012800228003280042800528006280072800828009280102801128012280132801428015280162801728018280192802028021280222802328024280252802628027280282802928030280312803228033280342803528036280372803828039280402804128042280432804428045280462804728048280492805028051280522805328054280552805628057280582805928060280612806228063280642806528066280672806828069280702807128072280732807428075280762807728078280792808028081280822808328084280852808628087280882808928090280912809228093280942809528096280972809828099281002810128102281032810428105281062810728108281092811028111281122811328114281152811628117281182811928120281212812228123281242812528126281272812828129281302813128132281332813428135281362813728138281392814028141281422814328144281452814628147281482814928150281512815228153281542815528156281572815828159281602816128162281632816428165281662816728168281692817028171281722817328174281752817628177281782817928180281812818228183281842818528186281872818828189281902819128192281932819428195281962819728198281992820028201282022820328204282052820628207282082820928210282112821228213282142821528216282172821828219282202822128222282232822428225282262822728228282292823028231282322823328234282352823628237282382823928240282412824228243282442824528246282472824828249282502825128252282532825428255282562825728258282592826028261282622826328264282652826628267282682826928270282712827228273282742827528276282772827828279282802828128282282832828428285282862828728288282892829028291282922829328294282952829628297282982829928300283012830228303283042830528306283072830828309283102831128312283132831428315283162831728318283192832028321283222832328324283252832628327283282832928330283312833228333283342833528336283372833828339283402834128342283432834428345283462834728348283492835028351283522835328354283552835628357283582835928360283612836228363283642836528366283672836828369283702837128372283732837428375283762837728378283792838028381283822838328384283852838628387283882838928390283912839228393283942839528396283972839828399284002840128402284032840428405284062840728408284092841028411284122841328414284152841628417284182841928420284212842228423284242842528426284272842828429284302843128432284332843428435284362843728438284392844028441284422844328444284452844628447284482844928450284512845228453284542845528456284572845828459284602846128462284632846428465284662846728468284692847028471284722847328474284752847628477284782847928480284812848228483284842848528486284872848828489284902849128492284932849428495284962849728498284992850028501285022850328504285052850628507285082850928510285112851228513285142851528516285172851828519285202852128522285232852428525285262852728528285292853028531285322853328534285352853628537285382853928540285412854228543285442854528546285472854828549285502855128552285532855428555285562855728558285592856028561285622856328564285652856628567285682856928570285712857228573285742857528576285772857828579285802858128582285832858428585285862858728588285892859028591285922859328594285952859628597285982859928600286012860228603286042860528606286072860828609286102861128612286132861428615286162861728618286192862028621286222862328624286252862628627286282862928630286312863228633286342863528636286372863828639286402864128642286432864428645286462864728648286492865028651286522865328654286552865628657286582865928660286612866228663286642866528666286672866828669286702867128672286732867428675286762867728678286792868028681286822868328684286852868628687286882868928690286912869228693286942869528696286972869828699287002870128702287032870428705287062870728708287092871028711287122871328714287152871628717287182871928720287212872228723287242872528726287272872828729287302873128732287332873428735287362873728738287392874028741287422874328744287452874628747287482874928750287512875228753287542875528756287572875828759287602876128762287632876428765287662876728768287692877028771287722877328774287752877628777287782877928780287812878228783287842878528786287872878828789287902879128792287932879428795287962879728798287992880028801288022880328804288052880628807288082880928810288112881228813288142881528816288172881828819288202882128822288232882428825288262882728828288292883028831288322883328834288352883628837288382883928840288412884228843288442884528846288472884828849288502885128852288532885428855288562885728858288592886028861288622886328864288652886628867288682886928870288712887228873288742887528876288772887828879288802888128882288832888428885288862888728888288892889028891288922889328894288952889628897288982889928900289012890228903289042890528906289072890828909289102891128912289132891428915289162891728918289192892028921289222892328924289252892628927289282892928930289312893228933289342893528936289372893828939289402894128942289432894428945289462894728948289492895028951289522895328954289552895628957289582895928960289612896228963289642896528966289672896828969289702897128972289732897428975289762897728978289792898028981289822898328984289852898628987289882898928990289912899228993289942899528996289972899828999290002900129002290032900429005290062900729008290092901029011290122901329014290152901629017290182901929020290212902229023290242902529026290272902829029290302903129032290332903429035290362903729038290392904029041290422904329044290452904629047290482904929050290512905229053290542905529056290572905829059290602906129062290632906429065290662906729068290692907029071290722907329074290752907629077290782907929080290812908229083290842908529086290872908829089290902909129092290932909429095290962909729098290992910029101291022910329104291052910629107291082910929110291112911229113291142911529116291172911829119291202912129122291232912429125291262912729128291292913029131291322913329134291352913629137291382913929140291412914229143291442914529146291472914829149291502915129152291532915429155291562915729158291592916029161291622916329164291652916629167291682916929170291712917229173291742917529176291772917829179291802918129182291832918429185291862918729188291892919029191291922919329194291952919629197291982919929200292012920229203292042920529206292072920829209292102921129212292132921429215292162921729218292192922029221292222922329224292252922629227292282922929230292312923229233292342923529236292372923829239292402924129242292432924429245292462924729248292492925029251292522925329254292552925629257292582925929260292612926229263292642926529266292672926829269292702927129272292732927429275292762927729278292792928029281292822928329284292852928629287292882928929290292912929229293292942929529296292972929829299293002930129302293032930429305293062930729308293092931029311293122931329314293152931629317293182931929320293212932229323293242932529326293272932829329293302933129332293332933429335293362933729338293392934029341293422934329344293452934629347293482934929350293512935229353293542935529356293572935829359293602936129362293632936429365293662936729368293692937029371293722937329374293752937629377293782937929380293812938229383293842938529386293872938829389293902939129392293932939429395293962939729398293992940029401294022940329404294052940629407294082940929410294112941229413294142941529416294172941829419294202942129422294232942429425294262942729428294292943029431294322943329434294352943629437294382943929440294412944229443294442944529446294472944829449294502945129452294532945429455294562945729458294592946029461294622946329464294652946629467294682946929470294712947229473294742947529476294772947829479294802948129482294832948429485294862948729488294892949029491294922949329494294952949629497294982949929500295012950229503295042950529506295072950829509295102951129512295132951429515295162951729518295192952029521295222952329524295252952629527295282952929530295312953229533295342953529536295372953829539295402954129542295432954429545295462954729548295492955029551295522955329554295552955629557295582955929560295612956229563295642956529566295672956829569295702957129572295732957429575295762957729578295792958029581295822958329584295852958629587295882958929590295912959229593295942959529596295972959829599296002960129602296032960429605296062960729608296092961029611296122961329614296152961629617296182961929620296212962229623296242962529626296272962829629296302963129632296332963429635296362963729638296392964029641296422964329644296452964629647296482964929650296512965229653296542965529656296572965829659296602966129662296632966429665296662966729668296692967029671296722967329674296752967629677296782967929680296812968229683296842968529686296872968829689296902969129692296932969429695296962969729698296992970029701297022970329704297052970629707297082970929710297112971229713297142971529716297172971829719297202972129722297232972429725297262972729728297292973029731297322973329734297352973629737297382973929740297412974229743297442974529746297472974829749297502975129752297532975429755297562975729758297592976029761297622976329764297652976629767297682976929770297712977229773297742977529776297772977829779297802978129782297832978429785297862978729788297892979029791297922979329794297952979629797297982979929800298012980229803298042980529806298072980829809298102981129812298132981429815298162981729818298192982029821298222982329824298252982629827298282982929830298312983229833298342983529836298372983829839298402984129842298432984429845298462984729848298492985029851298522985329854298552985629857298582985929860298612986229863298642986529866298672986829869298702987129872298732987429875298762987729878298792988029881298822988329884298852988629887298882988929890298912989229893298942989529896298972989829899299002990129902299032990429905299062990729908299092991029911299122991329914299152991629917299182991929920299212992229923299242992529926299272992829929299302993129932299332993429935299362993729938299392994029941299422994329944299452994629947299482994929950299512995229953299542995529956299572995829959299602996129962299632996429965299662996729968299692997029971299722997329974299752997629977299782997929980299812998229983299842998529986299872998829989299902999129992299932999429995299962999729998299993000030001300023000330004300053000630007300083000930010300113001230013300143001530016300173001830019300203002130022300233002430025300263002730028300293003030031300323003330034300353003630037300383003930040300413004230043300443004530046300473004830049300503005130052300533005430055300563005730058300593006030061300623006330064300653006630067300683006930070300713007230073300743007530076300773007830079300803008130082300833008430085300863008730088300893009030091300923009330094300953009630097300983009930100301013010230103301043010530106301073010830109301103011130112301133011430115301163011730118301193012030121301223012330124301253012630127301283012930130301313013230133301343013530136301373013830139301403014130142301433014430145301463014730148301493015030151301523015330154301553015630157301583015930160301613016230163301643016530166301673016830169301703017130172301733017430175301763017730178301793018030181301823018330184301853018630187301883018930190301913019230193301943019530196301973019830199302003020130202302033020430205302063020730208302093021030211302123021330214302153021630217302183021930220302213022230223302243022530226302273022830229302303023130232302333023430235302363023730238302393024030241302423024330244302453024630247302483024930250302513025230253302543025530256302573025830259302603026130262302633026430265302663026730268302693027030271302723027330274302753027630277302783027930280302813028230283302843028530286302873028830289302903029130292302933029430295302963029730298302993030030301303023030330304303053030630307303083030930310303113031230313303143031530316303173031830319303203032130322303233032430325303263032730328303293033030331303323033330334303353033630337303383033930340303413034230343303443034530346303473034830349303503035130352303533035430355303563035730358303593036030361303623036330364303653036630367303683036930370303713037230373303743037530376303773037830379303803038130382303833038430385303863038730388303893039030391303923039330394303953039630397303983039930400304013040230403304043040530406304073040830409304103041130412304133041430415304163041730418304193042030421304223042330424304253042630427304283042930430304313043230433304343043530436304373043830439304403044130442304433044430445304463044730448304493045030451304523045330454304553045630457304583045930460304613046230463304643046530466304673046830469304703047130472304733047430475304763047730478304793048030481304823048330484304853048630487304883048930490304913049230493304943049530496304973049830499305003050130502305033050430505305063050730508305093051030511305123051330514305153051630517305183051930520305213052230523305243052530526305273052830529305303053130532305333053430535305363053730538305393054030541305423054330544305453054630547305483054930550305513055230553305543055530556305573055830559305603056130562305633056430565305663056730568305693057030571305723057330574305753057630577305783057930580305813058230583305843058530586305873058830589305903059130592305933059430595305963059730598305993060030601306023060330604306053060630607306083060930610306113061230613306143061530616306173061830619306203062130622306233062430625306263062730628306293063030631306323063330634306353063630637306383063930640306413064230643306443064530646306473064830649306503065130652306533065430655306563065730658306593066030661306623066330664306653066630667306683066930670306713067230673306743067530676306773067830679306803068130682306833068430685306863068730688306893069030691306923069330694306953069630697
  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/capabilities": {
  814. "get": {
  815. "tags": ["experimental"],
  816. "operationId": "experimental.capabilities.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": "Experimental capabilities",
  838. "content": {
  839. "application/json": {
  840. "schema": {
  841. "$ref": "#/components/schemas/ExperimentalCapabilities"
  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. },
  857. "description": "Get experimental features enabled on the OpenCode server.",
  858. "summary": "Get experimental capabilities",
  859. "x-codeSamples": [
  860. {
  861. "lang": "js",
  862. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.capabilities.get({\n ...\n})"
  863. }
  864. ]
  865. }
  866. },
  867. "/experimental/console": {
  868. "get": {
  869. "tags": ["experimental"],
  870. "operationId": "experimental.console.get",
  871. "parameters": [
  872. {
  873. "name": "directory",
  874. "in": "query",
  875. "schema": {
  876. "type": "string"
  877. },
  878. "required": false
  879. },
  880. {
  881. "name": "workspace",
  882. "in": "query",
  883. "schema": {
  884. "type": "string"
  885. },
  886. "required": false
  887. }
  888. ],
  889. "responses": {
  890. "200": {
  891. "description": "Active Console provider metadata",
  892. "content": {
  893. "application/json": {
  894. "schema": {
  895. "$ref": "#/components/schemas/ConsoleState"
  896. }
  897. }
  898. }
  899. },
  900. "400": {
  901. "description": "Bad request",
  902. "content": {
  903. "application/json": {
  904. "schema": {
  905. "$ref": "#/components/schemas/BadRequestError"
  906. }
  907. }
  908. }
  909. },
  910. "500": {
  911. "description": "InternalServerError",
  912. "content": {
  913. "application/json": {
  914. "schema": {
  915. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  916. }
  917. }
  918. }
  919. }
  920. },
  921. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  922. "summary": "Get active Console provider metadata",
  923. "x-codeSamples": [
  924. {
  925. "lang": "js",
  926. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  927. }
  928. ]
  929. }
  930. },
  931. "/experimental/console/orgs": {
  932. "get": {
  933. "tags": ["experimental"],
  934. "operationId": "experimental.console.listOrgs",
  935. "parameters": [
  936. {
  937. "name": "directory",
  938. "in": "query",
  939. "schema": {
  940. "type": "string"
  941. },
  942. "required": false
  943. },
  944. {
  945. "name": "workspace",
  946. "in": "query",
  947. "schema": {
  948. "type": "string"
  949. },
  950. "required": false
  951. }
  952. ],
  953. "responses": {
  954. "200": {
  955. "description": "Switchable Console orgs",
  956. "content": {
  957. "application/json": {
  958. "schema": {
  959. "type": "object",
  960. "properties": {
  961. "orgs": {
  962. "type": "array",
  963. "items": {
  964. "type": "object",
  965. "properties": {
  966. "accountID": {
  967. "type": "string"
  968. },
  969. "accountEmail": {
  970. "type": "string"
  971. },
  972. "accountUrl": {
  973. "type": "string"
  974. },
  975. "orgID": {
  976. "type": "string"
  977. },
  978. "orgName": {
  979. "type": "string"
  980. },
  981. "active": {
  982. "type": "boolean"
  983. }
  984. },
  985. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  986. "additionalProperties": false
  987. }
  988. }
  989. },
  990. "required": ["orgs"],
  991. "additionalProperties": false,
  992. "description": "Switchable Console orgs"
  993. }
  994. }
  995. }
  996. },
  997. "400": {
  998. "description": "Bad request",
  999. "content": {
  1000. "application/json": {
  1001. "schema": {
  1002. "$ref": "#/components/schemas/BadRequestError"
  1003. }
  1004. }
  1005. }
  1006. },
  1007. "500": {
  1008. "description": "InternalServerError",
  1009. "content": {
  1010. "application/json": {
  1011. "schema": {
  1012. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  1013. }
  1014. }
  1015. }
  1016. }
  1017. },
  1018. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  1019. "summary": "List switchable Console orgs",
  1020. "x-codeSamples": [
  1021. {
  1022. "lang": "js",
  1023. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  1024. }
  1025. ]
  1026. }
  1027. },
  1028. "/experimental/console/switch": {
  1029. "post": {
  1030. "tags": ["experimental"],
  1031. "operationId": "experimental.console.switchOrg",
  1032. "parameters": [
  1033. {
  1034. "name": "directory",
  1035. "in": "query",
  1036. "schema": {
  1037. "type": "string"
  1038. },
  1039. "required": false
  1040. },
  1041. {
  1042. "name": "workspace",
  1043. "in": "query",
  1044. "schema": {
  1045. "type": "string"
  1046. },
  1047. "required": false
  1048. }
  1049. ],
  1050. "responses": {
  1051. "200": {
  1052. "description": "Switch success",
  1053. "content": {
  1054. "application/json": {
  1055. "schema": {
  1056. "type": "boolean",
  1057. "description": "Switch success"
  1058. }
  1059. }
  1060. }
  1061. }
  1062. },
  1063. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  1064. "summary": "Switch active Console org",
  1065. "requestBody": {
  1066. "content": {
  1067. "application/json": {
  1068. "schema": {
  1069. "type": "object",
  1070. "properties": {
  1071. "accountID": {
  1072. "type": "string"
  1073. },
  1074. "orgID": {
  1075. "type": "string"
  1076. }
  1077. },
  1078. "required": ["accountID", "orgID"],
  1079. "additionalProperties": false
  1080. }
  1081. }
  1082. }
  1083. },
  1084. "x-codeSamples": [
  1085. {
  1086. "lang": "js",
  1087. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  1088. }
  1089. ]
  1090. }
  1091. },
  1092. "/experimental/tool": {
  1093. "get": {
  1094. "tags": ["experimental"],
  1095. "operationId": "tool.list",
  1096. "parameters": [
  1097. {
  1098. "name": "directory",
  1099. "in": "query",
  1100. "schema": {
  1101. "type": "string"
  1102. },
  1103. "required": false
  1104. },
  1105. {
  1106. "name": "workspace",
  1107. "in": "query",
  1108. "schema": {
  1109. "type": "string"
  1110. },
  1111. "required": false
  1112. },
  1113. {
  1114. "name": "provider",
  1115. "in": "query",
  1116. "schema": {
  1117. "type": "string"
  1118. },
  1119. "required": true
  1120. },
  1121. {
  1122. "name": "model",
  1123. "in": "query",
  1124. "schema": {
  1125. "type": "string"
  1126. },
  1127. "required": true
  1128. }
  1129. ],
  1130. "responses": {
  1131. "200": {
  1132. "description": "Tools",
  1133. "content": {
  1134. "application/json": {
  1135. "schema": {
  1136. "$ref": "#/components/schemas/ToolList"
  1137. }
  1138. }
  1139. }
  1140. },
  1141. "400": {
  1142. "description": "BadRequest | InvalidRequestError",
  1143. "content": {
  1144. "application/json": {
  1145. "schema": {
  1146. "anyOf": [
  1147. {
  1148. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1149. },
  1150. {
  1151. "$ref": "#/components/schemas/InvalidRequestError"
  1152. }
  1153. ]
  1154. }
  1155. }
  1156. }
  1157. }
  1158. },
  1159. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1160. "summary": "List tools",
  1161. "x-codeSamples": [
  1162. {
  1163. "lang": "js",
  1164. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1165. }
  1166. ]
  1167. }
  1168. },
  1169. "/experimental/tool/ids": {
  1170. "get": {
  1171. "tags": ["experimental"],
  1172. "operationId": "tool.ids",
  1173. "parameters": [
  1174. {
  1175. "name": "directory",
  1176. "in": "query",
  1177. "schema": {
  1178. "type": "string"
  1179. },
  1180. "required": false
  1181. },
  1182. {
  1183. "name": "workspace",
  1184. "in": "query",
  1185. "schema": {
  1186. "type": "string"
  1187. },
  1188. "required": false
  1189. }
  1190. ],
  1191. "responses": {
  1192. "200": {
  1193. "description": "Tool IDs",
  1194. "content": {
  1195. "application/json": {
  1196. "schema": {
  1197. "$ref": "#/components/schemas/ToolIDs"
  1198. }
  1199. }
  1200. }
  1201. },
  1202. "400": {
  1203. "description": "BadRequest | InvalidRequestError",
  1204. "content": {
  1205. "application/json": {
  1206. "schema": {
  1207. "anyOf": [
  1208. {
  1209. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1210. },
  1211. {
  1212. "$ref": "#/components/schemas/InvalidRequestError"
  1213. }
  1214. ]
  1215. }
  1216. }
  1217. }
  1218. }
  1219. },
  1220. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1221. "summary": "List tool IDs",
  1222. "x-codeSamples": [
  1223. {
  1224. "lang": "js",
  1225. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1226. }
  1227. ]
  1228. }
  1229. },
  1230. "/experimental/worktree": {
  1231. "get": {
  1232. "tags": ["experimental"],
  1233. "operationId": "worktree.list",
  1234. "parameters": [
  1235. {
  1236. "name": "directory",
  1237. "in": "query",
  1238. "schema": {
  1239. "type": "string"
  1240. },
  1241. "required": false
  1242. },
  1243. {
  1244. "name": "workspace",
  1245. "in": "query",
  1246. "schema": {
  1247. "type": "string"
  1248. },
  1249. "required": false
  1250. }
  1251. ],
  1252. "responses": {
  1253. "200": {
  1254. "description": "List of worktree directories",
  1255. "content": {
  1256. "application/json": {
  1257. "schema": {
  1258. "type": "array",
  1259. "items": {
  1260. "type": "string"
  1261. },
  1262. "description": "List of worktree directories"
  1263. }
  1264. }
  1265. }
  1266. },
  1267. "400": {
  1268. "description": "WorktreeError | InvalidRequestError",
  1269. "content": {
  1270. "application/json": {
  1271. "schema": {
  1272. "anyOf": [
  1273. {
  1274. "$ref": "#/components/schemas/WorktreeError"
  1275. },
  1276. {
  1277. "$ref": "#/components/schemas/InvalidRequestError"
  1278. }
  1279. ]
  1280. }
  1281. }
  1282. }
  1283. }
  1284. },
  1285. "description": "List all sandbox worktrees for the current project.",
  1286. "summary": "List worktrees",
  1287. "x-codeSamples": [
  1288. {
  1289. "lang": "js",
  1290. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1291. }
  1292. ]
  1293. },
  1294. "post": {
  1295. "tags": ["experimental"],
  1296. "operationId": "worktree.create",
  1297. "parameters": [
  1298. {
  1299. "name": "directory",
  1300. "in": "query",
  1301. "schema": {
  1302. "type": "string"
  1303. },
  1304. "required": false
  1305. },
  1306. {
  1307. "name": "workspace",
  1308. "in": "query",
  1309. "schema": {
  1310. "type": "string"
  1311. },
  1312. "required": false
  1313. }
  1314. ],
  1315. "responses": {
  1316. "200": {
  1317. "description": "Worktree created",
  1318. "content": {
  1319. "application/json": {
  1320. "schema": {
  1321. "$ref": "#/components/schemas/Worktree"
  1322. }
  1323. }
  1324. }
  1325. },
  1326. "400": {
  1327. "description": "WorktreeError | InvalidRequestError",
  1328. "content": {
  1329. "application/json": {
  1330. "schema": {
  1331. "anyOf": [
  1332. {
  1333. "$ref": "#/components/schemas/WorktreeError"
  1334. },
  1335. {
  1336. "$ref": "#/components/schemas/InvalidRequestError"
  1337. }
  1338. ]
  1339. }
  1340. }
  1341. }
  1342. }
  1343. },
  1344. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1345. "summary": "Create worktree",
  1346. "requestBody": {
  1347. "content": {
  1348. "application/json": {
  1349. "schema": {
  1350. "$ref": "#/components/schemas/WorktreeCreateInput"
  1351. }
  1352. }
  1353. }
  1354. },
  1355. "x-codeSamples": [
  1356. {
  1357. "lang": "js",
  1358. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1359. }
  1360. ]
  1361. },
  1362. "delete": {
  1363. "tags": ["experimental"],
  1364. "operationId": "worktree.remove",
  1365. "parameters": [
  1366. {
  1367. "name": "directory",
  1368. "in": "query",
  1369. "schema": {
  1370. "type": "string"
  1371. },
  1372. "required": false
  1373. },
  1374. {
  1375. "name": "workspace",
  1376. "in": "query",
  1377. "schema": {
  1378. "type": "string"
  1379. },
  1380. "required": false
  1381. }
  1382. ],
  1383. "responses": {
  1384. "200": {
  1385. "description": "Worktree removed",
  1386. "content": {
  1387. "application/json": {
  1388. "schema": {
  1389. "type": "boolean",
  1390. "description": "Worktree removed"
  1391. }
  1392. }
  1393. }
  1394. },
  1395. "400": {
  1396. "description": "WorktreeError | InvalidRequestError",
  1397. "content": {
  1398. "application/json": {
  1399. "schema": {
  1400. "anyOf": [
  1401. {
  1402. "$ref": "#/components/schemas/WorktreeError"
  1403. },
  1404. {
  1405. "$ref": "#/components/schemas/InvalidRequestError"
  1406. }
  1407. ]
  1408. }
  1409. }
  1410. }
  1411. }
  1412. },
  1413. "description": "Remove a git worktree and delete its branch.",
  1414. "summary": "Remove worktree",
  1415. "requestBody": {
  1416. "content": {
  1417. "application/json": {
  1418. "schema": {
  1419. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1420. }
  1421. }
  1422. }
  1423. },
  1424. "x-codeSamples": [
  1425. {
  1426. "lang": "js",
  1427. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1428. }
  1429. ]
  1430. }
  1431. },
  1432. "/experimental/worktree/reset": {
  1433. "post": {
  1434. "tags": ["experimental"],
  1435. "operationId": "worktree.reset",
  1436. "parameters": [
  1437. {
  1438. "name": "directory",
  1439. "in": "query",
  1440. "schema": {
  1441. "type": "string"
  1442. },
  1443. "required": false
  1444. },
  1445. {
  1446. "name": "workspace",
  1447. "in": "query",
  1448. "schema": {
  1449. "type": "string"
  1450. },
  1451. "required": false
  1452. }
  1453. ],
  1454. "responses": {
  1455. "200": {
  1456. "description": "Worktree reset",
  1457. "content": {
  1458. "application/json": {
  1459. "schema": {
  1460. "type": "boolean",
  1461. "description": "Worktree reset"
  1462. }
  1463. }
  1464. }
  1465. },
  1466. "400": {
  1467. "description": "WorktreeError | InvalidRequestError",
  1468. "content": {
  1469. "application/json": {
  1470. "schema": {
  1471. "anyOf": [
  1472. {
  1473. "$ref": "#/components/schemas/WorktreeError"
  1474. },
  1475. {
  1476. "$ref": "#/components/schemas/InvalidRequestError"
  1477. }
  1478. ]
  1479. }
  1480. }
  1481. }
  1482. }
  1483. },
  1484. "description": "Reset a worktree branch to the primary default branch.",
  1485. "summary": "Reset worktree",
  1486. "requestBody": {
  1487. "content": {
  1488. "application/json": {
  1489. "schema": {
  1490. "$ref": "#/components/schemas/WorktreeResetInput"
  1491. }
  1492. }
  1493. }
  1494. },
  1495. "x-codeSamples": [
  1496. {
  1497. "lang": "js",
  1498. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1499. }
  1500. ]
  1501. }
  1502. },
  1503. "/experimental/session": {
  1504. "get": {
  1505. "tags": ["experimental"],
  1506. "operationId": "experimental.session.list",
  1507. "parameters": [
  1508. {
  1509. "name": "directory",
  1510. "in": "query",
  1511. "schema": {
  1512. "type": "string"
  1513. },
  1514. "required": false
  1515. },
  1516. {
  1517. "name": "workspace",
  1518. "in": "query",
  1519. "schema": {
  1520. "type": "string"
  1521. },
  1522. "required": false
  1523. },
  1524. {
  1525. "name": "roots",
  1526. "in": "query",
  1527. "schema": {
  1528. "anyOf": [
  1529. {
  1530. "type": "boolean"
  1531. },
  1532. {
  1533. "type": "string",
  1534. "enum": ["true", "false"]
  1535. }
  1536. ]
  1537. },
  1538. "required": false
  1539. },
  1540. {
  1541. "name": "start",
  1542. "in": "query",
  1543. "schema": {
  1544. "type": "number"
  1545. },
  1546. "required": false
  1547. },
  1548. {
  1549. "name": "cursor",
  1550. "in": "query",
  1551. "schema": {
  1552. "type": "number"
  1553. },
  1554. "required": false
  1555. },
  1556. {
  1557. "name": "search",
  1558. "in": "query",
  1559. "schema": {
  1560. "type": "string"
  1561. },
  1562. "required": false
  1563. },
  1564. {
  1565. "name": "limit",
  1566. "in": "query",
  1567. "schema": {
  1568. "type": "number"
  1569. },
  1570. "required": false
  1571. },
  1572. {
  1573. "name": "archived",
  1574. "in": "query",
  1575. "schema": {
  1576. "anyOf": [
  1577. {
  1578. "type": "boolean"
  1579. },
  1580. {
  1581. "type": "string",
  1582. "enum": ["true", "false"]
  1583. }
  1584. ]
  1585. },
  1586. "required": false
  1587. }
  1588. ],
  1589. "responses": {
  1590. "200": {
  1591. "description": "List of sessions",
  1592. "content": {
  1593. "application/json": {
  1594. "schema": {
  1595. "type": "array",
  1596. "items": {
  1597. "$ref": "#/components/schemas/GlobalSession"
  1598. },
  1599. "description": "List of sessions"
  1600. }
  1601. }
  1602. }
  1603. },
  1604. "400": {
  1605. "description": "Bad request",
  1606. "content": {
  1607. "application/json": {
  1608. "schema": {
  1609. "$ref": "#/components/schemas/BadRequestError"
  1610. }
  1611. }
  1612. }
  1613. }
  1614. },
  1615. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1616. "summary": "List sessions",
  1617. "x-codeSamples": [
  1618. {
  1619. "lang": "js",
  1620. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1621. }
  1622. ]
  1623. }
  1624. },
  1625. "/experimental/session/{sessionID}/background": {
  1626. "post": {
  1627. "tags": ["experimental"],
  1628. "operationId": "experimental.session.background",
  1629. "parameters": [
  1630. {
  1631. "name": "sessionID",
  1632. "in": "path",
  1633. "schema": {
  1634. "type": "string",
  1635. "pattern": "^ses"
  1636. },
  1637. "required": true
  1638. },
  1639. {
  1640. "name": "directory",
  1641. "in": "query",
  1642. "schema": {
  1643. "type": "string"
  1644. },
  1645. "required": false
  1646. },
  1647. {
  1648. "name": "workspace",
  1649. "in": "query",
  1650. "schema": {
  1651. "type": "string"
  1652. },
  1653. "required": false
  1654. }
  1655. ],
  1656. "responses": {
  1657. "200": {
  1658. "description": "Backgrounded subagents",
  1659. "content": {
  1660. "application/json": {
  1661. "schema": {
  1662. "type": "boolean",
  1663. "description": "Backgrounded subagents"
  1664. }
  1665. }
  1666. }
  1667. },
  1668. "400": {
  1669. "description": "BadRequest | InvalidRequestError",
  1670. "content": {
  1671. "application/json": {
  1672. "schema": {
  1673. "anyOf": [
  1674. {
  1675. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1676. },
  1677. {
  1678. "$ref": "#/components/schemas/InvalidRequestError"
  1679. }
  1680. ]
  1681. }
  1682. }
  1683. }
  1684. }
  1685. },
  1686. "description": "Detach any synchronous subagents currently blocking the session and continue them in the background.",
  1687. "summary": "Background subagents",
  1688. "x-codeSamples": [
  1689. {
  1690. "lang": "js",
  1691. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.background({\n ...\n})"
  1692. }
  1693. ]
  1694. }
  1695. },
  1696. "/experimental/resource": {
  1697. "get": {
  1698. "tags": ["experimental"],
  1699. "operationId": "experimental.resource.list",
  1700. "parameters": [
  1701. {
  1702. "name": "directory",
  1703. "in": "query",
  1704. "schema": {
  1705. "type": "string"
  1706. },
  1707. "required": false
  1708. },
  1709. {
  1710. "name": "workspace",
  1711. "in": "query",
  1712. "schema": {
  1713. "type": "string"
  1714. },
  1715. "required": false
  1716. }
  1717. ],
  1718. "responses": {
  1719. "200": {
  1720. "description": "MCP resources",
  1721. "content": {
  1722. "application/json": {
  1723. "schema": {
  1724. "type": "object",
  1725. "additionalProperties": {
  1726. "$ref": "#/components/schemas/McpResource"
  1727. },
  1728. "description": "MCP resources"
  1729. }
  1730. }
  1731. }
  1732. },
  1733. "400": {
  1734. "description": "Bad request",
  1735. "content": {
  1736. "application/json": {
  1737. "schema": {
  1738. "$ref": "#/components/schemas/BadRequestError"
  1739. }
  1740. }
  1741. }
  1742. }
  1743. },
  1744. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1745. "summary": "Get MCP resources",
  1746. "x-codeSamples": [
  1747. {
  1748. "lang": "js",
  1749. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1750. }
  1751. ]
  1752. }
  1753. },
  1754. "/find": {
  1755. "get": {
  1756. "tags": ["file"],
  1757. "operationId": "find.text",
  1758. "parameters": [
  1759. {
  1760. "name": "directory",
  1761. "in": "query",
  1762. "schema": {
  1763. "type": "string"
  1764. },
  1765. "required": false
  1766. },
  1767. {
  1768. "name": "workspace",
  1769. "in": "query",
  1770. "schema": {
  1771. "type": "string"
  1772. },
  1773. "required": false
  1774. },
  1775. {
  1776. "name": "pattern",
  1777. "in": "query",
  1778. "schema": {
  1779. "type": "string"
  1780. },
  1781. "required": true
  1782. }
  1783. ],
  1784. "responses": {
  1785. "200": {
  1786. "description": "Matches",
  1787. "content": {
  1788. "application/json": {
  1789. "schema": {
  1790. "type": "array",
  1791. "items": {
  1792. "type": "object",
  1793. "properties": {
  1794. "path": {
  1795. "type": "object",
  1796. "properties": {
  1797. "text": {
  1798. "type": "string"
  1799. }
  1800. },
  1801. "required": ["text"],
  1802. "additionalProperties": false
  1803. },
  1804. "lines": {
  1805. "type": "object",
  1806. "properties": {
  1807. "text": {
  1808. "type": "string"
  1809. }
  1810. },
  1811. "required": ["text"],
  1812. "additionalProperties": false
  1813. },
  1814. "line_number": {
  1815. "type": "integer",
  1816. "minimum": 0
  1817. },
  1818. "absolute_offset": {
  1819. "type": "integer",
  1820. "minimum": 0
  1821. },
  1822. "submatches": {
  1823. "type": "array",
  1824. "items": {
  1825. "type": "object",
  1826. "properties": {
  1827. "match": {
  1828. "type": "object",
  1829. "properties": {
  1830. "text": {
  1831. "type": "string"
  1832. }
  1833. },
  1834. "required": ["text"],
  1835. "additionalProperties": false
  1836. },
  1837. "start": {
  1838. "type": "integer",
  1839. "minimum": 0
  1840. },
  1841. "end": {
  1842. "type": "integer",
  1843. "minimum": 0
  1844. }
  1845. },
  1846. "required": ["match", "start", "end"],
  1847. "additionalProperties": false
  1848. }
  1849. }
  1850. },
  1851. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1852. "additionalProperties": false
  1853. },
  1854. "description": "Matches"
  1855. }
  1856. }
  1857. }
  1858. },
  1859. "400": {
  1860. "description": "Bad request",
  1861. "content": {
  1862. "application/json": {
  1863. "schema": {
  1864. "$ref": "#/components/schemas/BadRequestError"
  1865. }
  1866. }
  1867. }
  1868. }
  1869. },
  1870. "description": "Search for text patterns across files in the project using ripgrep.",
  1871. "summary": "Find text",
  1872. "x-codeSamples": [
  1873. {
  1874. "lang": "js",
  1875. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1876. }
  1877. ]
  1878. }
  1879. },
  1880. "/find/file": {
  1881. "get": {
  1882. "tags": ["file"],
  1883. "operationId": "find.files",
  1884. "parameters": [
  1885. {
  1886. "name": "directory",
  1887. "in": "query",
  1888. "schema": {
  1889. "type": "string"
  1890. },
  1891. "required": false
  1892. },
  1893. {
  1894. "name": "workspace",
  1895. "in": "query",
  1896. "schema": {
  1897. "type": "string"
  1898. },
  1899. "required": false
  1900. },
  1901. {
  1902. "name": "query",
  1903. "in": "query",
  1904. "schema": {
  1905. "type": "string"
  1906. },
  1907. "required": true
  1908. },
  1909. {
  1910. "name": "dirs",
  1911. "in": "query",
  1912. "schema": {
  1913. "type": "string",
  1914. "enum": ["true", "false"]
  1915. },
  1916. "required": false
  1917. },
  1918. {
  1919. "name": "type",
  1920. "in": "query",
  1921. "schema": {
  1922. "type": "string",
  1923. "enum": ["file", "directory"]
  1924. },
  1925. "required": false
  1926. },
  1927. {
  1928. "name": "limit",
  1929. "in": "query",
  1930. "schema": {
  1931. "type": "integer",
  1932. "minimum": 1,
  1933. "maximum": 200
  1934. },
  1935. "required": false
  1936. }
  1937. ],
  1938. "responses": {
  1939. "200": {
  1940. "description": "File paths",
  1941. "content": {
  1942. "application/json": {
  1943. "schema": {
  1944. "type": "array",
  1945. "items": {
  1946. "type": "string"
  1947. },
  1948. "description": "File paths"
  1949. }
  1950. }
  1951. }
  1952. },
  1953. "400": {
  1954. "description": "Bad request",
  1955. "content": {
  1956. "application/json": {
  1957. "schema": {
  1958. "$ref": "#/components/schemas/BadRequestError"
  1959. }
  1960. }
  1961. }
  1962. }
  1963. },
  1964. "description": "Search for files or directories by name or pattern in the project directory.",
  1965. "summary": "Find files",
  1966. "x-codeSamples": [
  1967. {
  1968. "lang": "js",
  1969. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1970. }
  1971. ]
  1972. }
  1973. },
  1974. "/find/symbol": {
  1975. "get": {
  1976. "tags": ["file"],
  1977. "operationId": "find.symbols",
  1978. "parameters": [
  1979. {
  1980. "name": "directory",
  1981. "in": "query",
  1982. "schema": {
  1983. "type": "string"
  1984. },
  1985. "required": false
  1986. },
  1987. {
  1988. "name": "workspace",
  1989. "in": "query",
  1990. "schema": {
  1991. "type": "string"
  1992. },
  1993. "required": false
  1994. },
  1995. {
  1996. "name": "query",
  1997. "in": "query",
  1998. "schema": {
  1999. "type": "string"
  2000. },
  2001. "required": true
  2002. }
  2003. ],
  2004. "responses": {
  2005. "200": {
  2006. "description": "Symbols",
  2007. "content": {
  2008. "application/json": {
  2009. "schema": {
  2010. "type": "array",
  2011. "items": {
  2012. "$ref": "#/components/schemas/Symbol"
  2013. },
  2014. "description": "Symbols"
  2015. }
  2016. }
  2017. }
  2018. },
  2019. "400": {
  2020. "description": "Bad request",
  2021. "content": {
  2022. "application/json": {
  2023. "schema": {
  2024. "$ref": "#/components/schemas/BadRequestError"
  2025. }
  2026. }
  2027. }
  2028. }
  2029. },
  2030. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  2031. "summary": "Find symbols",
  2032. "x-codeSamples": [
  2033. {
  2034. "lang": "js",
  2035. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  2036. }
  2037. ]
  2038. }
  2039. },
  2040. "/file": {
  2041. "get": {
  2042. "tags": ["file"],
  2043. "operationId": "file.list",
  2044. "parameters": [
  2045. {
  2046. "name": "directory",
  2047. "in": "query",
  2048. "schema": {
  2049. "type": "string"
  2050. },
  2051. "required": false
  2052. },
  2053. {
  2054. "name": "workspace",
  2055. "in": "query",
  2056. "schema": {
  2057. "type": "string"
  2058. },
  2059. "required": false
  2060. },
  2061. {
  2062. "name": "path",
  2063. "in": "query",
  2064. "schema": {
  2065. "type": "string"
  2066. },
  2067. "required": true
  2068. }
  2069. ],
  2070. "responses": {
  2071. "200": {
  2072. "description": "Files and directories",
  2073. "content": {
  2074. "application/json": {
  2075. "schema": {
  2076. "type": "array",
  2077. "items": {
  2078. "$ref": "#/components/schemas/FileNode"
  2079. },
  2080. "description": "Files and directories"
  2081. }
  2082. }
  2083. }
  2084. },
  2085. "400": {
  2086. "description": "Bad request",
  2087. "content": {
  2088. "application/json": {
  2089. "schema": {
  2090. "$ref": "#/components/schemas/BadRequestError"
  2091. }
  2092. }
  2093. }
  2094. }
  2095. },
  2096. "description": "List files and directories in a specified path.",
  2097. "summary": "List files",
  2098. "x-codeSamples": [
  2099. {
  2100. "lang": "js",
  2101. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  2102. }
  2103. ]
  2104. }
  2105. },
  2106. "/file/content": {
  2107. "get": {
  2108. "tags": ["file"],
  2109. "operationId": "file.read",
  2110. "parameters": [
  2111. {
  2112. "name": "directory",
  2113. "in": "query",
  2114. "schema": {
  2115. "type": "string"
  2116. },
  2117. "required": false
  2118. },
  2119. {
  2120. "name": "workspace",
  2121. "in": "query",
  2122. "schema": {
  2123. "type": "string"
  2124. },
  2125. "required": false
  2126. },
  2127. {
  2128. "name": "path",
  2129. "in": "query",
  2130. "schema": {
  2131. "type": "string"
  2132. },
  2133. "required": true
  2134. }
  2135. ],
  2136. "responses": {
  2137. "200": {
  2138. "description": "File content",
  2139. "content": {
  2140. "application/json": {
  2141. "schema": {
  2142. "$ref": "#/components/schemas/FileContent"
  2143. }
  2144. }
  2145. }
  2146. },
  2147. "400": {
  2148. "description": "Bad request",
  2149. "content": {
  2150. "application/json": {
  2151. "schema": {
  2152. "$ref": "#/components/schemas/BadRequestError"
  2153. }
  2154. }
  2155. }
  2156. }
  2157. },
  2158. "description": "Read the content of a specified file.",
  2159. "summary": "Read file",
  2160. "x-codeSamples": [
  2161. {
  2162. "lang": "js",
  2163. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  2164. }
  2165. ]
  2166. }
  2167. },
  2168. "/file/status": {
  2169. "get": {
  2170. "tags": ["file"],
  2171. "operationId": "file.status",
  2172. "parameters": [
  2173. {
  2174. "name": "directory",
  2175. "in": "query",
  2176. "schema": {
  2177. "type": "string"
  2178. },
  2179. "required": false
  2180. },
  2181. {
  2182. "name": "workspace",
  2183. "in": "query",
  2184. "schema": {
  2185. "type": "string"
  2186. },
  2187. "required": false
  2188. }
  2189. ],
  2190. "responses": {
  2191. "200": {
  2192. "description": "File status",
  2193. "content": {
  2194. "application/json": {
  2195. "schema": {
  2196. "type": "array",
  2197. "items": {
  2198. "$ref": "#/components/schemas/File"
  2199. },
  2200. "description": "File status"
  2201. }
  2202. }
  2203. }
  2204. },
  2205. "400": {
  2206. "description": "Bad request",
  2207. "content": {
  2208. "application/json": {
  2209. "schema": {
  2210. "$ref": "#/components/schemas/BadRequestError"
  2211. }
  2212. }
  2213. }
  2214. }
  2215. },
  2216. "description": "Get the git status of all files in the project.",
  2217. "summary": "Get file status",
  2218. "x-codeSamples": [
  2219. {
  2220. "lang": "js",
  2221. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  2222. }
  2223. ]
  2224. }
  2225. },
  2226. "/instance/dispose": {
  2227. "post": {
  2228. "tags": ["instance"],
  2229. "operationId": "instance.dispose",
  2230. "parameters": [
  2231. {
  2232. "name": "directory",
  2233. "in": "query",
  2234. "schema": {
  2235. "type": "string"
  2236. },
  2237. "required": false
  2238. },
  2239. {
  2240. "name": "workspace",
  2241. "in": "query",
  2242. "schema": {
  2243. "type": "string"
  2244. },
  2245. "required": false
  2246. }
  2247. ],
  2248. "responses": {
  2249. "200": {
  2250. "description": "Instance disposed",
  2251. "content": {
  2252. "application/json": {
  2253. "schema": {
  2254. "type": "boolean",
  2255. "description": "Instance disposed"
  2256. }
  2257. }
  2258. }
  2259. },
  2260. "400": {
  2261. "description": "Bad request",
  2262. "content": {
  2263. "application/json": {
  2264. "schema": {
  2265. "$ref": "#/components/schemas/BadRequestError"
  2266. }
  2267. }
  2268. }
  2269. }
  2270. },
  2271. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  2272. "summary": "Dispose instance",
  2273. "x-codeSamples": [
  2274. {
  2275. "lang": "js",
  2276. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  2277. }
  2278. ]
  2279. }
  2280. },
  2281. "/path": {
  2282. "get": {
  2283. "tags": ["instance"],
  2284. "operationId": "path.get",
  2285. "parameters": [
  2286. {
  2287. "name": "directory",
  2288. "in": "query",
  2289. "schema": {
  2290. "type": "string"
  2291. },
  2292. "required": false
  2293. },
  2294. {
  2295. "name": "workspace",
  2296. "in": "query",
  2297. "schema": {
  2298. "type": "string"
  2299. },
  2300. "required": false
  2301. }
  2302. ],
  2303. "responses": {
  2304. "200": {
  2305. "description": "Path",
  2306. "content": {
  2307. "application/json": {
  2308. "schema": {
  2309. "$ref": "#/components/schemas/Path"
  2310. }
  2311. }
  2312. }
  2313. },
  2314. "400": {
  2315. "description": "Bad request",
  2316. "content": {
  2317. "application/json": {
  2318. "schema": {
  2319. "$ref": "#/components/schemas/BadRequestError"
  2320. }
  2321. }
  2322. }
  2323. }
  2324. },
  2325. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  2326. "summary": "Get paths",
  2327. "x-codeSamples": [
  2328. {
  2329. "lang": "js",
  2330. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  2331. }
  2332. ]
  2333. }
  2334. },
  2335. "/vcs": {
  2336. "get": {
  2337. "tags": ["instance"],
  2338. "operationId": "vcs.get",
  2339. "parameters": [
  2340. {
  2341. "name": "directory",
  2342. "in": "query",
  2343. "schema": {
  2344. "type": "string"
  2345. },
  2346. "required": false
  2347. },
  2348. {
  2349. "name": "workspace",
  2350. "in": "query",
  2351. "schema": {
  2352. "type": "string"
  2353. },
  2354. "required": false
  2355. }
  2356. ],
  2357. "responses": {
  2358. "200": {
  2359. "description": "VCS info",
  2360. "content": {
  2361. "application/json": {
  2362. "schema": {
  2363. "$ref": "#/components/schemas/VcsInfo"
  2364. }
  2365. }
  2366. }
  2367. },
  2368. "400": {
  2369. "description": "Bad request",
  2370. "content": {
  2371. "application/json": {
  2372. "schema": {
  2373. "$ref": "#/components/schemas/BadRequestError"
  2374. }
  2375. }
  2376. }
  2377. }
  2378. },
  2379. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  2380. "summary": "Get VCS info",
  2381. "x-codeSamples": [
  2382. {
  2383. "lang": "js",
  2384. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  2385. }
  2386. ]
  2387. }
  2388. },
  2389. "/vcs/status": {
  2390. "get": {
  2391. "tags": ["instance"],
  2392. "operationId": "vcs.status",
  2393. "parameters": [
  2394. {
  2395. "name": "directory",
  2396. "in": "query",
  2397. "schema": {
  2398. "type": "string"
  2399. },
  2400. "required": false
  2401. },
  2402. {
  2403. "name": "workspace",
  2404. "in": "query",
  2405. "schema": {
  2406. "type": "string"
  2407. },
  2408. "required": false
  2409. }
  2410. ],
  2411. "responses": {
  2412. "200": {
  2413. "description": "VCS status",
  2414. "content": {
  2415. "application/json": {
  2416. "schema": {
  2417. "type": "array",
  2418. "items": {
  2419. "$ref": "#/components/schemas/VcsFileStatus"
  2420. },
  2421. "description": "VCS status"
  2422. }
  2423. }
  2424. }
  2425. },
  2426. "400": {
  2427. "description": "Bad request",
  2428. "content": {
  2429. "application/json": {
  2430. "schema": {
  2431. "$ref": "#/components/schemas/BadRequestError"
  2432. }
  2433. }
  2434. }
  2435. }
  2436. },
  2437. "description": "Retrieve changed files in the current working tree without patches.",
  2438. "summary": "Get VCS status",
  2439. "x-codeSamples": [
  2440. {
  2441. "lang": "js",
  2442. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  2443. }
  2444. ]
  2445. }
  2446. },
  2447. "/vcs/diff": {
  2448. "get": {
  2449. "tags": ["instance"],
  2450. "operationId": "vcs.diff",
  2451. "parameters": [
  2452. {
  2453. "name": "directory",
  2454. "in": "query",
  2455. "schema": {
  2456. "type": "string"
  2457. },
  2458. "required": false
  2459. },
  2460. {
  2461. "name": "workspace",
  2462. "in": "query",
  2463. "schema": {
  2464. "type": "string"
  2465. },
  2466. "required": false
  2467. },
  2468. {
  2469. "name": "mode",
  2470. "in": "query",
  2471. "schema": {
  2472. "type": "string",
  2473. "enum": ["git", "branch"]
  2474. },
  2475. "required": true
  2476. },
  2477. {
  2478. "name": "context",
  2479. "in": "query",
  2480. "schema": {
  2481. "type": "integer",
  2482. "minimum": 0
  2483. },
  2484. "required": false
  2485. }
  2486. ],
  2487. "responses": {
  2488. "200": {
  2489. "description": "VCS diff",
  2490. "content": {
  2491. "application/json": {
  2492. "schema": {
  2493. "type": "array",
  2494. "items": {
  2495. "$ref": "#/components/schemas/VcsFileDiff"
  2496. },
  2497. "description": "VCS diff"
  2498. }
  2499. }
  2500. }
  2501. },
  2502. "400": {
  2503. "description": "Bad request",
  2504. "content": {
  2505. "application/json": {
  2506. "schema": {
  2507. "$ref": "#/components/schemas/BadRequestError"
  2508. }
  2509. }
  2510. }
  2511. }
  2512. },
  2513. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2514. "summary": "Get VCS diff",
  2515. "x-codeSamples": [
  2516. {
  2517. "lang": "js",
  2518. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2519. }
  2520. ]
  2521. }
  2522. },
  2523. "/vcs/diff/raw": {
  2524. "get": {
  2525. "tags": ["instance"],
  2526. "operationId": "vcs.diff.raw",
  2527. "parameters": [
  2528. {
  2529. "name": "directory",
  2530. "in": "query",
  2531. "schema": {
  2532. "type": "string"
  2533. },
  2534. "required": false
  2535. },
  2536. {
  2537. "name": "workspace",
  2538. "in": "query",
  2539. "schema": {
  2540. "type": "string"
  2541. },
  2542. "required": false
  2543. }
  2544. ],
  2545. "responses": {
  2546. "200": {
  2547. "description": "Raw VCS diff",
  2548. "content": {
  2549. "text/x-diff; charset=utf-8": {
  2550. "schema": {
  2551. "type": "string"
  2552. }
  2553. }
  2554. }
  2555. },
  2556. "400": {
  2557. "description": "Bad request",
  2558. "content": {
  2559. "application/json": {
  2560. "schema": {
  2561. "$ref": "#/components/schemas/BadRequestError"
  2562. }
  2563. }
  2564. }
  2565. }
  2566. },
  2567. "description": "Retrieve a raw patch for current uncommitted changes.",
  2568. "summary": "Get raw VCS diff",
  2569. "x-codeSamples": [
  2570. {
  2571. "lang": "js",
  2572. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2573. }
  2574. ]
  2575. }
  2576. },
  2577. "/vcs/apply": {
  2578. "post": {
  2579. "tags": ["instance"],
  2580. "operationId": "vcs.apply",
  2581. "parameters": [
  2582. {
  2583. "name": "directory",
  2584. "in": "query",
  2585. "schema": {
  2586. "type": "string"
  2587. },
  2588. "required": false
  2589. },
  2590. {
  2591. "name": "workspace",
  2592. "in": "query",
  2593. "schema": {
  2594. "type": "string"
  2595. },
  2596. "required": false
  2597. }
  2598. ],
  2599. "responses": {
  2600. "200": {
  2601. "description": "VCS patch applied",
  2602. "content": {
  2603. "application/json": {
  2604. "schema": {
  2605. "type": "object",
  2606. "properties": {
  2607. "applied": {
  2608. "type": "boolean"
  2609. }
  2610. },
  2611. "required": ["applied"],
  2612. "additionalProperties": false,
  2613. "description": "VCS patch applied"
  2614. }
  2615. }
  2616. }
  2617. },
  2618. "400": {
  2619. "description": "VcsApplyError | InvalidRequestError",
  2620. "content": {
  2621. "application/json": {
  2622. "schema": {
  2623. "anyOf": [
  2624. {
  2625. "$ref": "#/components/schemas/VcsApplyError"
  2626. },
  2627. {
  2628. "$ref": "#/components/schemas/InvalidRequestError"
  2629. }
  2630. ]
  2631. }
  2632. }
  2633. }
  2634. }
  2635. },
  2636. "description": "Apply a raw patch to the current working tree.",
  2637. "summary": "Apply VCS patch",
  2638. "requestBody": {
  2639. "content": {
  2640. "application/json": {
  2641. "schema": {
  2642. "type": "object",
  2643. "properties": {
  2644. "patch": {
  2645. "type": "string"
  2646. }
  2647. },
  2648. "required": ["patch"],
  2649. "additionalProperties": false
  2650. }
  2651. }
  2652. }
  2653. },
  2654. "x-codeSamples": [
  2655. {
  2656. "lang": "js",
  2657. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2658. }
  2659. ]
  2660. }
  2661. },
  2662. "/command": {
  2663. "get": {
  2664. "tags": ["instance"],
  2665. "operationId": "command.list",
  2666. "parameters": [
  2667. {
  2668. "name": "directory",
  2669. "in": "query",
  2670. "schema": {
  2671. "type": "string"
  2672. },
  2673. "required": false
  2674. },
  2675. {
  2676. "name": "workspace",
  2677. "in": "query",
  2678. "schema": {
  2679. "type": "string"
  2680. },
  2681. "required": false
  2682. }
  2683. ],
  2684. "responses": {
  2685. "200": {
  2686. "description": "List of commands",
  2687. "content": {
  2688. "application/json": {
  2689. "schema": {
  2690. "type": "array",
  2691. "items": {
  2692. "$ref": "#/components/schemas/Command"
  2693. },
  2694. "description": "List of commands"
  2695. }
  2696. }
  2697. }
  2698. },
  2699. "400": {
  2700. "description": "Bad request",
  2701. "content": {
  2702. "application/json": {
  2703. "schema": {
  2704. "$ref": "#/components/schemas/BadRequestError"
  2705. }
  2706. }
  2707. }
  2708. }
  2709. },
  2710. "description": "Get a list of all available commands in the OpenCode system.",
  2711. "summary": "List commands",
  2712. "x-codeSamples": [
  2713. {
  2714. "lang": "js",
  2715. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2716. }
  2717. ]
  2718. }
  2719. },
  2720. "/agent": {
  2721. "get": {
  2722. "tags": ["instance"],
  2723. "operationId": "app.agents",
  2724. "parameters": [
  2725. {
  2726. "name": "directory",
  2727. "in": "query",
  2728. "schema": {
  2729. "type": "string"
  2730. },
  2731. "required": false
  2732. },
  2733. {
  2734. "name": "workspace",
  2735. "in": "query",
  2736. "schema": {
  2737. "type": "string"
  2738. },
  2739. "required": false
  2740. }
  2741. ],
  2742. "responses": {
  2743. "200": {
  2744. "description": "List of agents",
  2745. "content": {
  2746. "application/json": {
  2747. "schema": {
  2748. "type": "array",
  2749. "items": {
  2750. "$ref": "#/components/schemas/Agent"
  2751. },
  2752. "description": "List of agents"
  2753. }
  2754. }
  2755. }
  2756. },
  2757. "400": {
  2758. "description": "Bad request",
  2759. "content": {
  2760. "application/json": {
  2761. "schema": {
  2762. "$ref": "#/components/schemas/BadRequestError"
  2763. }
  2764. }
  2765. }
  2766. }
  2767. },
  2768. "description": "Get a list of all available AI agents in the OpenCode system.",
  2769. "summary": "List agents",
  2770. "x-codeSamples": [
  2771. {
  2772. "lang": "js",
  2773. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2774. }
  2775. ]
  2776. }
  2777. },
  2778. "/skill": {
  2779. "get": {
  2780. "tags": ["instance"],
  2781. "operationId": "app.skills",
  2782. "parameters": [
  2783. {
  2784. "name": "directory",
  2785. "in": "query",
  2786. "schema": {
  2787. "type": "string"
  2788. },
  2789. "required": false
  2790. },
  2791. {
  2792. "name": "workspace",
  2793. "in": "query",
  2794. "schema": {
  2795. "type": "string"
  2796. },
  2797. "required": false
  2798. }
  2799. ],
  2800. "responses": {
  2801. "200": {
  2802. "description": "List of skills",
  2803. "content": {
  2804. "application/json": {
  2805. "schema": {
  2806. "type": "array",
  2807. "items": {
  2808. "type": "object",
  2809. "properties": {
  2810. "name": {
  2811. "type": "string"
  2812. },
  2813. "description": {
  2814. "type": "string"
  2815. },
  2816. "location": {
  2817. "type": "string"
  2818. },
  2819. "content": {
  2820. "type": "string"
  2821. }
  2822. },
  2823. "required": ["name", "location", "content"],
  2824. "additionalProperties": false
  2825. },
  2826. "description": "List of skills"
  2827. }
  2828. }
  2829. }
  2830. },
  2831. "400": {
  2832. "description": "Bad request",
  2833. "content": {
  2834. "application/json": {
  2835. "schema": {
  2836. "$ref": "#/components/schemas/BadRequestError"
  2837. }
  2838. }
  2839. }
  2840. }
  2841. },
  2842. "description": "Get a list of all available skills in the OpenCode system.",
  2843. "summary": "List skills",
  2844. "x-codeSamples": [
  2845. {
  2846. "lang": "js",
  2847. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2848. }
  2849. ]
  2850. }
  2851. },
  2852. "/lsp": {
  2853. "get": {
  2854. "tags": ["instance"],
  2855. "operationId": "lsp.status",
  2856. "parameters": [
  2857. {
  2858. "name": "directory",
  2859. "in": "query",
  2860. "schema": {
  2861. "type": "string"
  2862. },
  2863. "required": false
  2864. },
  2865. {
  2866. "name": "workspace",
  2867. "in": "query",
  2868. "schema": {
  2869. "type": "string"
  2870. },
  2871. "required": false
  2872. }
  2873. ],
  2874. "responses": {
  2875. "200": {
  2876. "description": "LSP server status",
  2877. "content": {
  2878. "application/json": {
  2879. "schema": {
  2880. "type": "array",
  2881. "items": {
  2882. "$ref": "#/components/schemas/LSPStatus"
  2883. },
  2884. "description": "LSP server status"
  2885. }
  2886. }
  2887. }
  2888. },
  2889. "400": {
  2890. "description": "Bad request",
  2891. "content": {
  2892. "application/json": {
  2893. "schema": {
  2894. "$ref": "#/components/schemas/BadRequestError"
  2895. }
  2896. }
  2897. }
  2898. }
  2899. },
  2900. "description": "Get LSP server status",
  2901. "summary": "Get LSP status",
  2902. "x-codeSamples": [
  2903. {
  2904. "lang": "js",
  2905. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2906. }
  2907. ]
  2908. }
  2909. },
  2910. "/formatter": {
  2911. "get": {
  2912. "tags": ["instance"],
  2913. "operationId": "formatter.status",
  2914. "parameters": [
  2915. {
  2916. "name": "directory",
  2917. "in": "query",
  2918. "schema": {
  2919. "type": "string"
  2920. },
  2921. "required": false
  2922. },
  2923. {
  2924. "name": "workspace",
  2925. "in": "query",
  2926. "schema": {
  2927. "type": "string"
  2928. },
  2929. "required": false
  2930. }
  2931. ],
  2932. "responses": {
  2933. "200": {
  2934. "description": "Formatter status",
  2935. "content": {
  2936. "application/json": {
  2937. "schema": {
  2938. "type": "array",
  2939. "items": {
  2940. "$ref": "#/components/schemas/FormatterStatus"
  2941. },
  2942. "description": "Formatter status"
  2943. }
  2944. }
  2945. }
  2946. },
  2947. "400": {
  2948. "description": "Bad request",
  2949. "content": {
  2950. "application/json": {
  2951. "schema": {
  2952. "$ref": "#/components/schemas/BadRequestError"
  2953. }
  2954. }
  2955. }
  2956. }
  2957. },
  2958. "description": "Get formatter status",
  2959. "summary": "Get formatter status",
  2960. "x-codeSamples": [
  2961. {
  2962. "lang": "js",
  2963. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2964. }
  2965. ]
  2966. }
  2967. },
  2968. "/mcp": {
  2969. "get": {
  2970. "tags": ["mcp"],
  2971. "operationId": "mcp.status",
  2972. "parameters": [
  2973. {
  2974. "name": "directory",
  2975. "in": "query",
  2976. "schema": {
  2977. "type": "string"
  2978. },
  2979. "required": false
  2980. },
  2981. {
  2982. "name": "workspace",
  2983. "in": "query",
  2984. "schema": {
  2985. "type": "string"
  2986. },
  2987. "required": false
  2988. }
  2989. ],
  2990. "responses": {
  2991. "200": {
  2992. "description": "MCP server status",
  2993. "content": {
  2994. "application/json": {
  2995. "schema": {
  2996. "type": "object",
  2997. "additionalProperties": {
  2998. "$ref": "#/components/schemas/MCPStatus"
  2999. },
  3000. "description": "MCP server status"
  3001. }
  3002. }
  3003. }
  3004. },
  3005. "400": {
  3006. "description": "Bad request",
  3007. "content": {
  3008. "application/json": {
  3009. "schema": {
  3010. "$ref": "#/components/schemas/BadRequestError"
  3011. }
  3012. }
  3013. }
  3014. }
  3015. },
  3016. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  3017. "summary": "Get MCP status",
  3018. "x-codeSamples": [
  3019. {
  3020. "lang": "js",
  3021. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  3022. }
  3023. ]
  3024. },
  3025. "post": {
  3026. "tags": ["mcp"],
  3027. "operationId": "mcp.add",
  3028. "parameters": [
  3029. {
  3030. "name": "directory",
  3031. "in": "query",
  3032. "schema": {
  3033. "type": "string"
  3034. },
  3035. "required": false
  3036. },
  3037. {
  3038. "name": "workspace",
  3039. "in": "query",
  3040. "schema": {
  3041. "type": "string"
  3042. },
  3043. "required": false
  3044. }
  3045. ],
  3046. "responses": {
  3047. "200": {
  3048. "description": "MCP server added successfully",
  3049. "content": {
  3050. "application/json": {
  3051. "schema": {
  3052. "type": "object",
  3053. "additionalProperties": {
  3054. "$ref": "#/components/schemas/MCPStatus"
  3055. },
  3056. "description": "MCP server added successfully"
  3057. }
  3058. }
  3059. }
  3060. },
  3061. "400": {
  3062. "description": "BadRequest | InvalidRequestError",
  3063. "content": {
  3064. "application/json": {
  3065. "schema": {
  3066. "anyOf": [
  3067. {
  3068. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3069. },
  3070. {
  3071. "$ref": "#/components/schemas/InvalidRequestError"
  3072. }
  3073. ]
  3074. }
  3075. }
  3076. }
  3077. }
  3078. },
  3079. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  3080. "summary": "Add MCP server",
  3081. "requestBody": {
  3082. "content": {
  3083. "application/json": {
  3084. "schema": {
  3085. "type": "object",
  3086. "properties": {
  3087. "name": {
  3088. "type": "string"
  3089. },
  3090. "config": {
  3091. "anyOf": [
  3092. {
  3093. "$ref": "#/components/schemas/McpLocalConfig"
  3094. },
  3095. {
  3096. "$ref": "#/components/schemas/McpRemoteConfig"
  3097. }
  3098. ]
  3099. }
  3100. },
  3101. "required": ["name", "config"],
  3102. "additionalProperties": false
  3103. }
  3104. }
  3105. }
  3106. },
  3107. "x-codeSamples": [
  3108. {
  3109. "lang": "js",
  3110. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  3111. }
  3112. ]
  3113. }
  3114. },
  3115. "/mcp/{name}/auth": {
  3116. "post": {
  3117. "tags": ["mcp"],
  3118. "operationId": "mcp.auth.start",
  3119. "parameters": [
  3120. {
  3121. "name": "name",
  3122. "in": "path",
  3123. "schema": {
  3124. "type": "string"
  3125. },
  3126. "required": true
  3127. },
  3128. {
  3129. "name": "directory",
  3130. "in": "query",
  3131. "schema": {
  3132. "type": "string"
  3133. },
  3134. "required": false
  3135. },
  3136. {
  3137. "name": "workspace",
  3138. "in": "query",
  3139. "schema": {
  3140. "type": "string"
  3141. },
  3142. "required": false
  3143. }
  3144. ],
  3145. "responses": {
  3146. "200": {
  3147. "description": "OAuth flow started",
  3148. "content": {
  3149. "application/json": {
  3150. "schema": {
  3151. "type": "object",
  3152. "properties": {
  3153. "authorizationUrl": {
  3154. "type": "string"
  3155. },
  3156. "oauthState": {
  3157. "type": "string"
  3158. }
  3159. },
  3160. "required": ["authorizationUrl", "oauthState"],
  3161. "additionalProperties": false,
  3162. "description": "OAuth flow started"
  3163. }
  3164. }
  3165. }
  3166. },
  3167. "400": {
  3168. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3169. "content": {
  3170. "application/json": {
  3171. "schema": {
  3172. "anyOf": [
  3173. {
  3174. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3175. },
  3176. {
  3177. "$ref": "#/components/schemas/InvalidRequestError"
  3178. }
  3179. ]
  3180. }
  3181. }
  3182. }
  3183. },
  3184. "404": {
  3185. "description": "McpServerNotFoundError",
  3186. "content": {
  3187. "application/json": {
  3188. "schema": {
  3189. "$ref": "#/components/schemas/McpServerNotFoundError"
  3190. }
  3191. }
  3192. }
  3193. }
  3194. },
  3195. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3196. "summary": "Start MCP OAuth",
  3197. "x-codeSamples": [
  3198. {
  3199. "lang": "js",
  3200. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3201. }
  3202. ]
  3203. },
  3204. "delete": {
  3205. "tags": ["mcp"],
  3206. "operationId": "mcp.auth.remove",
  3207. "parameters": [
  3208. {
  3209. "name": "name",
  3210. "in": "path",
  3211. "schema": {
  3212. "type": "string"
  3213. },
  3214. "required": true
  3215. },
  3216. {
  3217. "name": "directory",
  3218. "in": "query",
  3219. "schema": {
  3220. "type": "string"
  3221. },
  3222. "required": false
  3223. },
  3224. {
  3225. "name": "workspace",
  3226. "in": "query",
  3227. "schema": {
  3228. "type": "string"
  3229. },
  3230. "required": false
  3231. }
  3232. ],
  3233. "responses": {
  3234. "200": {
  3235. "description": "OAuth credentials removed",
  3236. "content": {
  3237. "application/json": {
  3238. "schema": {
  3239. "type": "object",
  3240. "properties": {
  3241. "success": {
  3242. "type": "boolean",
  3243. "enum": [true]
  3244. }
  3245. },
  3246. "required": ["success"],
  3247. "additionalProperties": false,
  3248. "description": "OAuth credentials removed"
  3249. }
  3250. }
  3251. }
  3252. },
  3253. "400": {
  3254. "description": "Bad request",
  3255. "content": {
  3256. "application/json": {
  3257. "schema": {
  3258. "$ref": "#/components/schemas/BadRequestError"
  3259. }
  3260. }
  3261. }
  3262. },
  3263. "404": {
  3264. "description": "McpServerNotFoundError",
  3265. "content": {
  3266. "application/json": {
  3267. "schema": {
  3268. "$ref": "#/components/schemas/McpServerNotFoundError"
  3269. }
  3270. }
  3271. }
  3272. }
  3273. },
  3274. "description": "Remove OAuth credentials for an MCP server.",
  3275. "summary": "Remove MCP OAuth",
  3276. "x-codeSamples": [
  3277. {
  3278. "lang": "js",
  3279. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3280. }
  3281. ]
  3282. }
  3283. },
  3284. "/mcp/{name}/auth/callback": {
  3285. "post": {
  3286. "tags": ["mcp"],
  3287. "operationId": "mcp.auth.callback",
  3288. "parameters": [
  3289. {
  3290. "name": "name",
  3291. "in": "path",
  3292. "schema": {
  3293. "type": "string"
  3294. },
  3295. "required": true
  3296. },
  3297. {
  3298. "name": "directory",
  3299. "in": "query",
  3300. "schema": {
  3301. "type": "string"
  3302. },
  3303. "required": false
  3304. },
  3305. {
  3306. "name": "workspace",
  3307. "in": "query",
  3308. "schema": {
  3309. "type": "string"
  3310. },
  3311. "required": false
  3312. }
  3313. ],
  3314. "responses": {
  3315. "200": {
  3316. "description": "OAuth authentication completed",
  3317. "content": {
  3318. "application/json": {
  3319. "schema": {
  3320. "$ref": "#/components/schemas/MCPStatus"
  3321. }
  3322. }
  3323. }
  3324. },
  3325. "400": {
  3326. "description": "BadRequest | InvalidRequestError",
  3327. "content": {
  3328. "application/json": {
  3329. "schema": {
  3330. "anyOf": [
  3331. {
  3332. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3333. },
  3334. {
  3335. "$ref": "#/components/schemas/InvalidRequestError"
  3336. }
  3337. ]
  3338. }
  3339. }
  3340. }
  3341. },
  3342. "404": {
  3343. "description": "McpServerNotFoundError",
  3344. "content": {
  3345. "application/json": {
  3346. "schema": {
  3347. "$ref": "#/components/schemas/McpServerNotFoundError"
  3348. }
  3349. }
  3350. }
  3351. }
  3352. },
  3353. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3354. "summary": "Complete MCP OAuth",
  3355. "requestBody": {
  3356. "content": {
  3357. "application/json": {
  3358. "schema": {
  3359. "type": "object",
  3360. "properties": {
  3361. "code": {
  3362. "type": "string"
  3363. }
  3364. },
  3365. "required": ["code"],
  3366. "additionalProperties": false
  3367. }
  3368. }
  3369. }
  3370. },
  3371. "x-codeSamples": [
  3372. {
  3373. "lang": "js",
  3374. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3375. }
  3376. ]
  3377. }
  3378. },
  3379. "/mcp/{name}/auth/authenticate": {
  3380. "post": {
  3381. "tags": ["mcp"],
  3382. "operationId": "mcp.auth.authenticate",
  3383. "parameters": [
  3384. {
  3385. "name": "name",
  3386. "in": "path",
  3387. "schema": {
  3388. "type": "string"
  3389. },
  3390. "required": true
  3391. },
  3392. {
  3393. "name": "directory",
  3394. "in": "query",
  3395. "schema": {
  3396. "type": "string"
  3397. },
  3398. "required": false
  3399. },
  3400. {
  3401. "name": "workspace",
  3402. "in": "query",
  3403. "schema": {
  3404. "type": "string"
  3405. },
  3406. "required": false
  3407. }
  3408. ],
  3409. "responses": {
  3410. "200": {
  3411. "description": "OAuth authentication completed",
  3412. "content": {
  3413. "application/json": {
  3414. "schema": {
  3415. "$ref": "#/components/schemas/MCPStatus"
  3416. }
  3417. }
  3418. }
  3419. },
  3420. "400": {
  3421. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3422. "content": {
  3423. "application/json": {
  3424. "schema": {
  3425. "anyOf": [
  3426. {
  3427. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3428. },
  3429. {
  3430. "$ref": "#/components/schemas/InvalidRequestError"
  3431. }
  3432. ]
  3433. }
  3434. }
  3435. }
  3436. },
  3437. "404": {
  3438. "description": "McpServerNotFoundError",
  3439. "content": {
  3440. "application/json": {
  3441. "schema": {
  3442. "$ref": "#/components/schemas/McpServerNotFoundError"
  3443. }
  3444. }
  3445. }
  3446. }
  3447. },
  3448. "description": "Start OAuth flow and wait for callback (opens browser).",
  3449. "summary": "Authenticate MCP OAuth",
  3450. "x-codeSamples": [
  3451. {
  3452. "lang": "js",
  3453. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3454. }
  3455. ]
  3456. }
  3457. },
  3458. "/mcp/{name}/connect": {
  3459. "post": {
  3460. "tags": ["mcp"],
  3461. "operationId": "mcp.connect",
  3462. "parameters": [
  3463. {
  3464. "name": "name",
  3465. "in": "path",
  3466. "schema": {
  3467. "type": "string"
  3468. },
  3469. "required": true
  3470. },
  3471. {
  3472. "name": "directory",
  3473. "in": "query",
  3474. "schema": {
  3475. "type": "string"
  3476. },
  3477. "required": false
  3478. },
  3479. {
  3480. "name": "workspace",
  3481. "in": "query",
  3482. "schema": {
  3483. "type": "string"
  3484. },
  3485. "required": false
  3486. }
  3487. ],
  3488. "responses": {
  3489. "200": {
  3490. "description": "MCP server connected successfully",
  3491. "content": {
  3492. "application/json": {
  3493. "schema": {
  3494. "type": "boolean",
  3495. "description": "MCP server connected successfully"
  3496. }
  3497. }
  3498. }
  3499. },
  3500. "400": {
  3501. "description": "Bad request",
  3502. "content": {
  3503. "application/json": {
  3504. "schema": {
  3505. "$ref": "#/components/schemas/BadRequestError"
  3506. }
  3507. }
  3508. }
  3509. },
  3510. "404": {
  3511. "description": "McpServerNotFoundError",
  3512. "content": {
  3513. "application/json": {
  3514. "schema": {
  3515. "$ref": "#/components/schemas/McpServerNotFoundError"
  3516. }
  3517. }
  3518. }
  3519. }
  3520. },
  3521. "description": "Connect an MCP server.",
  3522. "x-codeSamples": [
  3523. {
  3524. "lang": "js",
  3525. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3526. }
  3527. ]
  3528. }
  3529. },
  3530. "/mcp/{name}/disconnect": {
  3531. "post": {
  3532. "tags": ["mcp"],
  3533. "operationId": "mcp.disconnect",
  3534. "parameters": [
  3535. {
  3536. "name": "name",
  3537. "in": "path",
  3538. "schema": {
  3539. "type": "string"
  3540. },
  3541. "required": true
  3542. },
  3543. {
  3544. "name": "directory",
  3545. "in": "query",
  3546. "schema": {
  3547. "type": "string"
  3548. },
  3549. "required": false
  3550. },
  3551. {
  3552. "name": "workspace",
  3553. "in": "query",
  3554. "schema": {
  3555. "type": "string"
  3556. },
  3557. "required": false
  3558. }
  3559. ],
  3560. "responses": {
  3561. "200": {
  3562. "description": "MCP server disconnected successfully",
  3563. "content": {
  3564. "application/json": {
  3565. "schema": {
  3566. "type": "boolean",
  3567. "description": "MCP server disconnected successfully"
  3568. }
  3569. }
  3570. }
  3571. },
  3572. "400": {
  3573. "description": "Bad request",
  3574. "content": {
  3575. "application/json": {
  3576. "schema": {
  3577. "$ref": "#/components/schemas/BadRequestError"
  3578. }
  3579. }
  3580. }
  3581. },
  3582. "404": {
  3583. "description": "McpServerNotFoundError",
  3584. "content": {
  3585. "application/json": {
  3586. "schema": {
  3587. "$ref": "#/components/schemas/McpServerNotFoundError"
  3588. }
  3589. }
  3590. }
  3591. }
  3592. },
  3593. "description": "Disconnect an MCP server.",
  3594. "x-codeSamples": [
  3595. {
  3596. "lang": "js",
  3597. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3598. }
  3599. ]
  3600. }
  3601. },
  3602. "/project": {
  3603. "get": {
  3604. "tags": ["project"],
  3605. "operationId": "project.list",
  3606. "parameters": [
  3607. {
  3608. "name": "directory",
  3609. "in": "query",
  3610. "schema": {
  3611. "type": "string"
  3612. },
  3613. "required": false
  3614. },
  3615. {
  3616. "name": "workspace",
  3617. "in": "query",
  3618. "schema": {
  3619. "type": "string"
  3620. },
  3621. "required": false
  3622. }
  3623. ],
  3624. "responses": {
  3625. "200": {
  3626. "description": "List of projects",
  3627. "content": {
  3628. "application/json": {
  3629. "schema": {
  3630. "type": "array",
  3631. "items": {
  3632. "$ref": "#/components/schemas/Project"
  3633. },
  3634. "description": "List of projects"
  3635. }
  3636. }
  3637. }
  3638. },
  3639. "400": {
  3640. "description": "Bad request",
  3641. "content": {
  3642. "application/json": {
  3643. "schema": {
  3644. "$ref": "#/components/schemas/BadRequestError"
  3645. }
  3646. }
  3647. }
  3648. }
  3649. },
  3650. "description": "Get a list of projects that have been opened with OpenCode.",
  3651. "summary": "List all projects",
  3652. "x-codeSamples": [
  3653. {
  3654. "lang": "js",
  3655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3656. }
  3657. ]
  3658. }
  3659. },
  3660. "/project/current": {
  3661. "get": {
  3662. "tags": ["project"],
  3663. "operationId": "project.current",
  3664. "parameters": [
  3665. {
  3666. "name": "directory",
  3667. "in": "query",
  3668. "schema": {
  3669. "type": "string"
  3670. },
  3671. "required": false
  3672. },
  3673. {
  3674. "name": "workspace",
  3675. "in": "query",
  3676. "schema": {
  3677. "type": "string"
  3678. },
  3679. "required": false
  3680. }
  3681. ],
  3682. "responses": {
  3683. "200": {
  3684. "description": "Current project information",
  3685. "content": {
  3686. "application/json": {
  3687. "schema": {
  3688. "$ref": "#/components/schemas/Project"
  3689. }
  3690. }
  3691. }
  3692. },
  3693. "400": {
  3694. "description": "Bad request",
  3695. "content": {
  3696. "application/json": {
  3697. "schema": {
  3698. "$ref": "#/components/schemas/BadRequestError"
  3699. }
  3700. }
  3701. }
  3702. }
  3703. },
  3704. "description": "Retrieve the currently active project that OpenCode is working with.",
  3705. "summary": "Get current project",
  3706. "x-codeSamples": [
  3707. {
  3708. "lang": "js",
  3709. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3710. }
  3711. ]
  3712. }
  3713. },
  3714. "/project/git/init": {
  3715. "post": {
  3716. "tags": ["project"],
  3717. "operationId": "project.initGit",
  3718. "parameters": [
  3719. {
  3720. "name": "directory",
  3721. "in": "query",
  3722. "schema": {
  3723. "type": "string"
  3724. },
  3725. "required": false
  3726. },
  3727. {
  3728. "name": "workspace",
  3729. "in": "query",
  3730. "schema": {
  3731. "type": "string"
  3732. },
  3733. "required": false
  3734. }
  3735. ],
  3736. "responses": {
  3737. "200": {
  3738. "description": "Project information after git initialization",
  3739. "content": {
  3740. "application/json": {
  3741. "schema": {
  3742. "$ref": "#/components/schemas/Project"
  3743. }
  3744. }
  3745. }
  3746. },
  3747. "400": {
  3748. "description": "Bad request",
  3749. "content": {
  3750. "application/json": {
  3751. "schema": {
  3752. "$ref": "#/components/schemas/BadRequestError"
  3753. }
  3754. }
  3755. }
  3756. }
  3757. },
  3758. "description": "Create a git repository for the current project and return the refreshed project info.",
  3759. "summary": "Initialize git repository",
  3760. "x-codeSamples": [
  3761. {
  3762. "lang": "js",
  3763. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3764. }
  3765. ]
  3766. }
  3767. },
  3768. "/project/{projectID}": {
  3769. "patch": {
  3770. "tags": ["project"],
  3771. "operationId": "project.update",
  3772. "parameters": [
  3773. {
  3774. "name": "projectID",
  3775. "in": "path",
  3776. "schema": {
  3777. "type": "string"
  3778. },
  3779. "required": true
  3780. },
  3781. {
  3782. "name": "directory",
  3783. "in": "query",
  3784. "schema": {
  3785. "type": "string"
  3786. },
  3787. "required": false
  3788. },
  3789. {
  3790. "name": "workspace",
  3791. "in": "query",
  3792. "schema": {
  3793. "type": "string"
  3794. },
  3795. "required": false
  3796. }
  3797. ],
  3798. "responses": {
  3799. "200": {
  3800. "description": "Updated project information",
  3801. "content": {
  3802. "application/json": {
  3803. "schema": {
  3804. "$ref": "#/components/schemas/Project"
  3805. }
  3806. }
  3807. }
  3808. },
  3809. "400": {
  3810. "description": "BadRequest | InvalidRequestError",
  3811. "content": {
  3812. "application/json": {
  3813. "schema": {
  3814. "anyOf": [
  3815. {
  3816. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3817. },
  3818. {
  3819. "$ref": "#/components/schemas/InvalidRequestError"
  3820. }
  3821. ]
  3822. }
  3823. }
  3824. }
  3825. },
  3826. "404": {
  3827. "description": "ProjectNotFoundError",
  3828. "content": {
  3829. "application/json": {
  3830. "schema": {
  3831. "$ref": "#/components/schemas/ProjectNotFoundError"
  3832. }
  3833. }
  3834. }
  3835. }
  3836. },
  3837. "description": "Update project properties such as name, icon, and commands.",
  3838. "summary": "Update project",
  3839. "requestBody": {
  3840. "content": {
  3841. "application/json": {
  3842. "schema": {
  3843. "type": "object",
  3844. "properties": {
  3845. "name": {
  3846. "type": "string"
  3847. },
  3848. "icon": {
  3849. "type": "object",
  3850. "properties": {
  3851. "url": {
  3852. "type": "string"
  3853. },
  3854. "override": {
  3855. "type": "string"
  3856. },
  3857. "color": {
  3858. "type": "string"
  3859. }
  3860. },
  3861. "additionalProperties": false
  3862. },
  3863. "commands": {
  3864. "type": "object",
  3865. "properties": {
  3866. "start": {
  3867. "type": "string",
  3868. "description": "Startup script to run when creating a new workspace (worktree)"
  3869. }
  3870. },
  3871. "additionalProperties": false
  3872. }
  3873. },
  3874. "additionalProperties": false
  3875. }
  3876. }
  3877. }
  3878. },
  3879. "x-codeSamples": [
  3880. {
  3881. "lang": "js",
  3882. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3883. }
  3884. ]
  3885. }
  3886. },
  3887. "/project/{projectID}/directories": {
  3888. "get": {
  3889. "tags": ["project"],
  3890. "operationId": "project.directories",
  3891. "parameters": [
  3892. {
  3893. "name": "projectID",
  3894. "in": "path",
  3895. "schema": {
  3896. "type": "string"
  3897. },
  3898. "required": true
  3899. },
  3900. {
  3901. "name": "directory",
  3902. "in": "query",
  3903. "schema": {
  3904. "type": "string"
  3905. },
  3906. "required": false
  3907. },
  3908. {
  3909. "name": "workspace",
  3910. "in": "query",
  3911. "schema": {
  3912. "type": "string"
  3913. },
  3914. "required": false
  3915. }
  3916. ],
  3917. "responses": {
  3918. "200": {
  3919. "description": "Project directories",
  3920. "content": {
  3921. "application/json": {
  3922. "schema": {
  3923. "$ref": "#/components/schemas/ProjectDirectories"
  3924. }
  3925. }
  3926. }
  3927. },
  3928. "400": {
  3929. "description": "Bad request",
  3930. "content": {
  3931. "application/json": {
  3932. "schema": {
  3933. "$ref": "#/components/schemas/BadRequestError"
  3934. }
  3935. }
  3936. }
  3937. }
  3938. },
  3939. "description": "List known local absolute directories for a project.",
  3940. "summary": "List project directories",
  3941. "x-codeSamples": [
  3942. {
  3943. "lang": "js",
  3944. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.directories({\n ...\n})"
  3945. }
  3946. ]
  3947. }
  3948. },
  3949. "/experimental/project/{projectID}/copy/generate-name": {
  3950. "post": {
  3951. "tags": ["projectCopy"],
  3952. "operationId": "experimental.projectCopy.generateName",
  3953. "parameters": [
  3954. {
  3955. "name": "projectID",
  3956. "in": "path",
  3957. "schema": {
  3958. "type": "string"
  3959. },
  3960. "required": true
  3961. },
  3962. {
  3963. "name": "directory",
  3964. "in": "query",
  3965. "schema": {
  3966. "type": "string"
  3967. },
  3968. "required": false
  3969. },
  3970. {
  3971. "name": "workspace",
  3972. "in": "query",
  3973. "schema": {
  3974. "type": "string"
  3975. },
  3976. "required": false
  3977. }
  3978. ],
  3979. "responses": {
  3980. "200": {
  3981. "description": "Success",
  3982. "content": {
  3983. "application/json": {
  3984. "schema": {
  3985. "type": "object",
  3986. "properties": {
  3987. "name": {
  3988. "type": "string"
  3989. }
  3990. },
  3991. "required": ["name"],
  3992. "additionalProperties": false
  3993. }
  3994. }
  3995. }
  3996. },
  3997. "400": {
  3998. "description": "Bad request",
  3999. "content": {
  4000. "application/json": {
  4001. "schema": {
  4002. "$ref": "#/components/schemas/BadRequestError"
  4003. }
  4004. }
  4005. }
  4006. }
  4007. },
  4008. "description": "Generate a short name for a project copy from task context.",
  4009. "summary": "Generate project copy name",
  4010. "requestBody": {
  4011. "content": {
  4012. "application/json": {
  4013. "schema": {
  4014. "type": "object",
  4015. "properties": {
  4016. "context": {
  4017. "type": "string"
  4018. }
  4019. },
  4020. "additionalProperties": false
  4021. }
  4022. }
  4023. }
  4024. },
  4025. "x-codeSamples": [
  4026. {
  4027. "lang": "js",
  4028. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.generateName({\n ...\n})"
  4029. }
  4030. ]
  4031. }
  4032. },
  4033. "/pty/shells": {
  4034. "get": {
  4035. "tags": ["pty"],
  4036. "operationId": "pty.shells",
  4037. "parameters": [
  4038. {
  4039. "name": "directory",
  4040. "in": "query",
  4041. "schema": {
  4042. "type": "string"
  4043. },
  4044. "required": false
  4045. },
  4046. {
  4047. "name": "workspace",
  4048. "in": "query",
  4049. "schema": {
  4050. "type": "string"
  4051. },
  4052. "required": false
  4053. }
  4054. ],
  4055. "responses": {
  4056. "200": {
  4057. "description": "List of shells",
  4058. "content": {
  4059. "application/json": {
  4060. "schema": {
  4061. "type": "array",
  4062. "items": {
  4063. "type": "object",
  4064. "properties": {
  4065. "path": {
  4066. "type": "string"
  4067. },
  4068. "name": {
  4069. "type": "string"
  4070. },
  4071. "acceptable": {
  4072. "type": "boolean"
  4073. }
  4074. },
  4075. "required": ["path", "name", "acceptable"],
  4076. "additionalProperties": false
  4077. },
  4078. "description": "List of shells"
  4079. }
  4080. }
  4081. }
  4082. },
  4083. "400": {
  4084. "description": "Bad request",
  4085. "content": {
  4086. "application/json": {
  4087. "schema": {
  4088. "$ref": "#/components/schemas/BadRequestError"
  4089. }
  4090. }
  4091. }
  4092. }
  4093. },
  4094. "description": "Get a list of available shells on the system.",
  4095. "summary": "List available shells",
  4096. "x-codeSamples": [
  4097. {
  4098. "lang": "js",
  4099. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  4100. }
  4101. ]
  4102. }
  4103. },
  4104. "/pty": {
  4105. "get": {
  4106. "tags": ["pty"],
  4107. "operationId": "pty.list",
  4108. "parameters": [
  4109. {
  4110. "name": "directory",
  4111. "in": "query",
  4112. "schema": {
  4113. "type": "string"
  4114. },
  4115. "required": false
  4116. },
  4117. {
  4118. "name": "workspace",
  4119. "in": "query",
  4120. "schema": {
  4121. "type": "string"
  4122. },
  4123. "required": false
  4124. }
  4125. ],
  4126. "responses": {
  4127. "200": {
  4128. "description": "List of sessions",
  4129. "content": {
  4130. "application/json": {
  4131. "schema": {
  4132. "type": "array",
  4133. "items": {
  4134. "$ref": "#/components/schemas/Pty"
  4135. },
  4136. "description": "List of sessions"
  4137. }
  4138. }
  4139. }
  4140. },
  4141. "400": {
  4142. "description": "Bad request",
  4143. "content": {
  4144. "application/json": {
  4145. "schema": {
  4146. "$ref": "#/components/schemas/BadRequestError"
  4147. }
  4148. }
  4149. }
  4150. }
  4151. },
  4152. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  4153. "summary": "List PTY sessions",
  4154. "x-codeSamples": [
  4155. {
  4156. "lang": "js",
  4157. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  4158. }
  4159. ]
  4160. },
  4161. "post": {
  4162. "tags": ["pty"],
  4163. "operationId": "pty.create",
  4164. "parameters": [
  4165. {
  4166. "name": "directory",
  4167. "in": "query",
  4168. "schema": {
  4169. "type": "string"
  4170. },
  4171. "required": false
  4172. },
  4173. {
  4174. "name": "workspace",
  4175. "in": "query",
  4176. "schema": {
  4177. "type": "string"
  4178. },
  4179. "required": false
  4180. }
  4181. ],
  4182. "responses": {
  4183. "200": {
  4184. "description": "Created session",
  4185. "content": {
  4186. "application/json": {
  4187. "schema": {
  4188. "$ref": "#/components/schemas/Pty"
  4189. }
  4190. }
  4191. }
  4192. },
  4193. "400": {
  4194. "description": "BadRequest | InvalidRequestError",
  4195. "content": {
  4196. "application/json": {
  4197. "schema": {
  4198. "anyOf": [
  4199. {
  4200. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4201. },
  4202. {
  4203. "$ref": "#/components/schemas/InvalidRequestError"
  4204. }
  4205. ]
  4206. }
  4207. }
  4208. }
  4209. }
  4210. },
  4211. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  4212. "summary": "Create PTY session",
  4213. "requestBody": {
  4214. "content": {
  4215. "application/json": {
  4216. "schema": {
  4217. "type": "object",
  4218. "properties": {
  4219. "command": {
  4220. "type": "string"
  4221. },
  4222. "args": {
  4223. "type": "array",
  4224. "items": {
  4225. "type": "string"
  4226. }
  4227. },
  4228. "cwd": {
  4229. "type": "string"
  4230. },
  4231. "title": {
  4232. "type": "string"
  4233. },
  4234. "env": {
  4235. "type": "object",
  4236. "additionalProperties": {
  4237. "type": "string"
  4238. }
  4239. }
  4240. },
  4241. "additionalProperties": false
  4242. }
  4243. }
  4244. }
  4245. },
  4246. "x-codeSamples": [
  4247. {
  4248. "lang": "js",
  4249. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  4250. }
  4251. ]
  4252. }
  4253. },
  4254. "/pty/{ptyID}": {
  4255. "get": {
  4256. "tags": ["pty"],
  4257. "operationId": "pty.get",
  4258. "parameters": [
  4259. {
  4260. "name": "ptyID",
  4261. "in": "path",
  4262. "schema": {
  4263. "type": "string",
  4264. "pattern": "^pty"
  4265. },
  4266. "required": true
  4267. },
  4268. {
  4269. "name": "directory",
  4270. "in": "query",
  4271. "schema": {
  4272. "type": "string"
  4273. },
  4274. "required": false
  4275. },
  4276. {
  4277. "name": "workspace",
  4278. "in": "query",
  4279. "schema": {
  4280. "type": "string"
  4281. },
  4282. "required": false
  4283. }
  4284. ],
  4285. "responses": {
  4286. "200": {
  4287. "description": "Session info",
  4288. "content": {
  4289. "application/json": {
  4290. "schema": {
  4291. "$ref": "#/components/schemas/Pty"
  4292. }
  4293. }
  4294. }
  4295. },
  4296. "400": {
  4297. "description": "Bad request",
  4298. "content": {
  4299. "application/json": {
  4300. "schema": {
  4301. "$ref": "#/components/schemas/BadRequestError"
  4302. }
  4303. }
  4304. }
  4305. },
  4306. "404": {
  4307. "description": "PtyNotFoundError",
  4308. "content": {
  4309. "application/json": {
  4310. "schema": {
  4311. "$ref": "#/components/schemas/PtyNotFoundError"
  4312. }
  4313. }
  4314. }
  4315. }
  4316. },
  4317. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  4318. "summary": "Get PTY session",
  4319. "x-codeSamples": [
  4320. {
  4321. "lang": "js",
  4322. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  4323. }
  4324. ]
  4325. },
  4326. "put": {
  4327. "tags": ["pty"],
  4328. "operationId": "pty.update",
  4329. "parameters": [
  4330. {
  4331. "name": "ptyID",
  4332. "in": "path",
  4333. "schema": {
  4334. "type": "string",
  4335. "pattern": "^pty"
  4336. },
  4337. "required": true
  4338. },
  4339. {
  4340. "name": "directory",
  4341. "in": "query",
  4342. "schema": {
  4343. "type": "string"
  4344. },
  4345. "required": false
  4346. },
  4347. {
  4348. "name": "workspace",
  4349. "in": "query",
  4350. "schema": {
  4351. "type": "string"
  4352. },
  4353. "required": false
  4354. }
  4355. ],
  4356. "responses": {
  4357. "200": {
  4358. "description": "Updated session",
  4359. "content": {
  4360. "application/json": {
  4361. "schema": {
  4362. "$ref": "#/components/schemas/Pty"
  4363. }
  4364. }
  4365. }
  4366. },
  4367. "400": {
  4368. "description": "BadRequest | InvalidRequestError",
  4369. "content": {
  4370. "application/json": {
  4371. "schema": {
  4372. "anyOf": [
  4373. {
  4374. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4375. },
  4376. {
  4377. "$ref": "#/components/schemas/InvalidRequestError"
  4378. }
  4379. ]
  4380. }
  4381. }
  4382. }
  4383. },
  4384. "404": {
  4385. "description": "PtyNotFoundError",
  4386. "content": {
  4387. "application/json": {
  4388. "schema": {
  4389. "$ref": "#/components/schemas/PtyNotFoundError"
  4390. }
  4391. }
  4392. }
  4393. }
  4394. },
  4395. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4396. "summary": "Update PTY session",
  4397. "requestBody": {
  4398. "content": {
  4399. "application/json": {
  4400. "schema": {
  4401. "type": "object",
  4402. "properties": {
  4403. "title": {
  4404. "type": "string"
  4405. },
  4406. "size": {
  4407. "type": "object",
  4408. "properties": {
  4409. "rows": {
  4410. "type": "integer",
  4411. "exclusiveMinimum": 0
  4412. },
  4413. "cols": {
  4414. "type": "integer",
  4415. "exclusiveMinimum": 0
  4416. }
  4417. },
  4418. "required": ["rows", "cols"],
  4419. "additionalProperties": false
  4420. }
  4421. },
  4422. "additionalProperties": false
  4423. }
  4424. }
  4425. }
  4426. },
  4427. "x-codeSamples": [
  4428. {
  4429. "lang": "js",
  4430. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4431. }
  4432. ]
  4433. },
  4434. "delete": {
  4435. "tags": ["pty"],
  4436. "operationId": "pty.remove",
  4437. "parameters": [
  4438. {
  4439. "name": "ptyID",
  4440. "in": "path",
  4441. "schema": {
  4442. "type": "string",
  4443. "pattern": "^pty"
  4444. },
  4445. "required": true
  4446. },
  4447. {
  4448. "name": "directory",
  4449. "in": "query",
  4450. "schema": {
  4451. "type": "string"
  4452. },
  4453. "required": false
  4454. },
  4455. {
  4456. "name": "workspace",
  4457. "in": "query",
  4458. "schema": {
  4459. "type": "string"
  4460. },
  4461. "required": false
  4462. }
  4463. ],
  4464. "responses": {
  4465. "200": {
  4466. "description": "Session removed",
  4467. "content": {
  4468. "application/json": {
  4469. "schema": {
  4470. "type": "boolean",
  4471. "description": "Session removed"
  4472. }
  4473. }
  4474. }
  4475. },
  4476. "400": {
  4477. "description": "Bad request",
  4478. "content": {
  4479. "application/json": {
  4480. "schema": {
  4481. "$ref": "#/components/schemas/BadRequestError"
  4482. }
  4483. }
  4484. }
  4485. },
  4486. "404": {
  4487. "description": "PtyNotFoundError",
  4488. "content": {
  4489. "application/json": {
  4490. "schema": {
  4491. "$ref": "#/components/schemas/PtyNotFoundError"
  4492. }
  4493. }
  4494. }
  4495. }
  4496. },
  4497. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4498. "summary": "Remove PTY session",
  4499. "x-codeSamples": [
  4500. {
  4501. "lang": "js",
  4502. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4503. }
  4504. ]
  4505. }
  4506. },
  4507. "/pty/{ptyID}/connect-token": {
  4508. "post": {
  4509. "tags": ["pty"],
  4510. "operationId": "pty.connectToken",
  4511. "parameters": [
  4512. {
  4513. "name": "ptyID",
  4514. "in": "path",
  4515. "schema": {
  4516. "type": "string",
  4517. "pattern": "^pty"
  4518. },
  4519. "required": true
  4520. },
  4521. {
  4522. "name": "directory",
  4523. "in": "query",
  4524. "schema": {
  4525. "type": "string"
  4526. },
  4527. "required": false
  4528. },
  4529. {
  4530. "name": "workspace",
  4531. "in": "query",
  4532. "schema": {
  4533. "type": "string"
  4534. },
  4535. "required": false
  4536. }
  4537. ],
  4538. "responses": {
  4539. "200": {
  4540. "description": "WebSocket connect token",
  4541. "content": {
  4542. "application/json": {
  4543. "schema": {
  4544. "type": "object",
  4545. "properties": {
  4546. "ticket": {
  4547. "type": "string"
  4548. },
  4549. "expires_in": {
  4550. "type": "integer",
  4551. "exclusiveMinimum": 0
  4552. }
  4553. },
  4554. "required": ["ticket", "expires_in"],
  4555. "additionalProperties": false,
  4556. "description": "WebSocket connect token"
  4557. }
  4558. }
  4559. }
  4560. },
  4561. "400": {
  4562. "description": "Bad request",
  4563. "content": {
  4564. "application/json": {
  4565. "schema": {
  4566. "$ref": "#/components/schemas/BadRequestError"
  4567. }
  4568. }
  4569. }
  4570. },
  4571. "403": {
  4572. "description": "PtyForbiddenError",
  4573. "content": {
  4574. "application/json": {
  4575. "schema": {
  4576. "$ref": "#/components/schemas/PtyForbiddenError"
  4577. }
  4578. }
  4579. }
  4580. },
  4581. "404": {
  4582. "description": "PtyNotFoundError",
  4583. "content": {
  4584. "application/json": {
  4585. "schema": {
  4586. "$ref": "#/components/schemas/PtyNotFoundError"
  4587. }
  4588. }
  4589. }
  4590. }
  4591. },
  4592. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4593. "summary": "Create PTY WebSocket token",
  4594. "x-codeSamples": [
  4595. {
  4596. "lang": "js",
  4597. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4598. }
  4599. ]
  4600. }
  4601. },
  4602. "/question": {
  4603. "get": {
  4604. "tags": ["question"],
  4605. "operationId": "question.list",
  4606. "parameters": [
  4607. {
  4608. "name": "directory",
  4609. "in": "query",
  4610. "schema": {
  4611. "type": "string"
  4612. },
  4613. "required": false
  4614. },
  4615. {
  4616. "name": "workspace",
  4617. "in": "query",
  4618. "schema": {
  4619. "type": "string"
  4620. },
  4621. "required": false
  4622. }
  4623. ],
  4624. "responses": {
  4625. "200": {
  4626. "description": "List of pending questions",
  4627. "content": {
  4628. "application/json": {
  4629. "schema": {
  4630. "type": "array",
  4631. "items": {
  4632. "$ref": "#/components/schemas/QuestionRequest"
  4633. },
  4634. "description": "List of pending questions"
  4635. }
  4636. }
  4637. }
  4638. },
  4639. "400": {
  4640. "description": "Bad request",
  4641. "content": {
  4642. "application/json": {
  4643. "schema": {
  4644. "$ref": "#/components/schemas/BadRequestError"
  4645. }
  4646. }
  4647. }
  4648. }
  4649. },
  4650. "description": "Get all pending question requests across all sessions.",
  4651. "summary": "List pending questions",
  4652. "x-codeSamples": [
  4653. {
  4654. "lang": "js",
  4655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4656. }
  4657. ]
  4658. }
  4659. },
  4660. "/question/{requestID}/reply": {
  4661. "post": {
  4662. "tags": ["question"],
  4663. "operationId": "question.reply",
  4664. "parameters": [
  4665. {
  4666. "name": "requestID",
  4667. "in": "path",
  4668. "schema": {
  4669. "type": "string",
  4670. "pattern": "^que"
  4671. },
  4672. "required": true
  4673. },
  4674. {
  4675. "name": "directory",
  4676. "in": "query",
  4677. "schema": {
  4678. "type": "string"
  4679. },
  4680. "required": false
  4681. },
  4682. {
  4683. "name": "workspace",
  4684. "in": "query",
  4685. "schema": {
  4686. "type": "string"
  4687. },
  4688. "required": false
  4689. }
  4690. ],
  4691. "responses": {
  4692. "200": {
  4693. "description": "Question answered successfully",
  4694. "content": {
  4695. "application/json": {
  4696. "schema": {
  4697. "type": "boolean",
  4698. "description": "Question answered successfully"
  4699. }
  4700. }
  4701. }
  4702. },
  4703. "400": {
  4704. "description": "BadRequest | InvalidRequestError",
  4705. "content": {
  4706. "application/json": {
  4707. "schema": {
  4708. "anyOf": [
  4709. {
  4710. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4711. },
  4712. {
  4713. "$ref": "#/components/schemas/InvalidRequestError"
  4714. }
  4715. ]
  4716. }
  4717. }
  4718. }
  4719. },
  4720. "404": {
  4721. "description": "QuestionNotFoundError",
  4722. "content": {
  4723. "application/json": {
  4724. "schema": {
  4725. "$ref": "#/components/schemas/QuestionNotFoundError"
  4726. }
  4727. }
  4728. }
  4729. }
  4730. },
  4731. "description": "Provide answers to a question request from the AI assistant.",
  4732. "summary": "Reply to question request",
  4733. "requestBody": {
  4734. "content": {
  4735. "application/json": {
  4736. "schema": {
  4737. "type": "object",
  4738. "properties": {
  4739. "answers": {
  4740. "type": "array",
  4741. "items": {
  4742. "$ref": "#/components/schemas/QuestionAnswer"
  4743. },
  4744. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4745. }
  4746. },
  4747. "required": ["answers"],
  4748. "additionalProperties": false
  4749. }
  4750. }
  4751. }
  4752. },
  4753. "x-codeSamples": [
  4754. {
  4755. "lang": "js",
  4756. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4757. }
  4758. ]
  4759. }
  4760. },
  4761. "/question/{requestID}/reject": {
  4762. "post": {
  4763. "tags": ["question"],
  4764. "operationId": "question.reject",
  4765. "parameters": [
  4766. {
  4767. "name": "requestID",
  4768. "in": "path",
  4769. "schema": {
  4770. "type": "string",
  4771. "pattern": "^que"
  4772. },
  4773. "required": true
  4774. },
  4775. {
  4776. "name": "directory",
  4777. "in": "query",
  4778. "schema": {
  4779. "type": "string"
  4780. },
  4781. "required": false
  4782. },
  4783. {
  4784. "name": "workspace",
  4785. "in": "query",
  4786. "schema": {
  4787. "type": "string"
  4788. },
  4789. "required": false
  4790. }
  4791. ],
  4792. "responses": {
  4793. "200": {
  4794. "description": "Question rejected successfully",
  4795. "content": {
  4796. "application/json": {
  4797. "schema": {
  4798. "type": "boolean",
  4799. "description": "Question rejected successfully"
  4800. }
  4801. }
  4802. }
  4803. },
  4804. "400": {
  4805. "description": "BadRequest | InvalidRequestError",
  4806. "content": {
  4807. "application/json": {
  4808. "schema": {
  4809. "anyOf": [
  4810. {
  4811. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4812. },
  4813. {
  4814. "$ref": "#/components/schemas/InvalidRequestError"
  4815. }
  4816. ]
  4817. }
  4818. }
  4819. }
  4820. },
  4821. "404": {
  4822. "description": "QuestionNotFoundError",
  4823. "content": {
  4824. "application/json": {
  4825. "schema": {
  4826. "$ref": "#/components/schemas/QuestionNotFoundError"
  4827. }
  4828. }
  4829. }
  4830. }
  4831. },
  4832. "description": "Reject a question request from the AI assistant.",
  4833. "summary": "Reject question request",
  4834. "x-codeSamples": [
  4835. {
  4836. "lang": "js",
  4837. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4838. }
  4839. ]
  4840. }
  4841. },
  4842. "/permission": {
  4843. "get": {
  4844. "tags": ["permission"],
  4845. "operationId": "permission.list",
  4846. "parameters": [
  4847. {
  4848. "name": "directory",
  4849. "in": "query",
  4850. "schema": {
  4851. "type": "string"
  4852. },
  4853. "required": false
  4854. },
  4855. {
  4856. "name": "workspace",
  4857. "in": "query",
  4858. "schema": {
  4859. "type": "string"
  4860. },
  4861. "required": false
  4862. }
  4863. ],
  4864. "responses": {
  4865. "200": {
  4866. "description": "List of pending permissions",
  4867. "content": {
  4868. "application/json": {
  4869. "schema": {
  4870. "type": "array",
  4871. "items": {
  4872. "$ref": "#/components/schemas/PermissionRequest"
  4873. },
  4874. "description": "List of pending permissions"
  4875. }
  4876. }
  4877. }
  4878. },
  4879. "400": {
  4880. "description": "Bad request",
  4881. "content": {
  4882. "application/json": {
  4883. "schema": {
  4884. "$ref": "#/components/schemas/BadRequestError"
  4885. }
  4886. }
  4887. }
  4888. }
  4889. },
  4890. "description": "Get all pending permission requests across all sessions.",
  4891. "summary": "List pending permissions",
  4892. "x-codeSamples": [
  4893. {
  4894. "lang": "js",
  4895. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4896. }
  4897. ]
  4898. }
  4899. },
  4900. "/permission/{requestID}/reply": {
  4901. "post": {
  4902. "tags": ["permission"],
  4903. "operationId": "permission.reply",
  4904. "parameters": [
  4905. {
  4906. "name": "requestID",
  4907. "in": "path",
  4908. "schema": {
  4909. "type": "string",
  4910. "pattern": "^per"
  4911. },
  4912. "required": true
  4913. },
  4914. {
  4915. "name": "directory",
  4916. "in": "query",
  4917. "schema": {
  4918. "type": "string"
  4919. },
  4920. "required": false
  4921. },
  4922. {
  4923. "name": "workspace",
  4924. "in": "query",
  4925. "schema": {
  4926. "type": "string"
  4927. },
  4928. "required": false
  4929. }
  4930. ],
  4931. "responses": {
  4932. "200": {
  4933. "description": "Permission processed successfully",
  4934. "content": {
  4935. "application/json": {
  4936. "schema": {
  4937. "type": "boolean",
  4938. "description": "Permission processed successfully"
  4939. }
  4940. }
  4941. }
  4942. },
  4943. "400": {
  4944. "description": "BadRequest | InvalidRequestError",
  4945. "content": {
  4946. "application/json": {
  4947. "schema": {
  4948. "anyOf": [
  4949. {
  4950. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4951. },
  4952. {
  4953. "$ref": "#/components/schemas/InvalidRequestError"
  4954. }
  4955. ]
  4956. }
  4957. }
  4958. }
  4959. },
  4960. "404": {
  4961. "description": "PermissionNotFoundError",
  4962. "content": {
  4963. "application/json": {
  4964. "schema": {
  4965. "$ref": "#/components/schemas/PermissionNotFoundError"
  4966. }
  4967. }
  4968. }
  4969. }
  4970. },
  4971. "description": "Approve or deny a permission request from the AI assistant.",
  4972. "summary": "Respond to permission request",
  4973. "requestBody": {
  4974. "content": {
  4975. "application/json": {
  4976. "schema": {
  4977. "type": "object",
  4978. "properties": {
  4979. "reply": {
  4980. "type": "string",
  4981. "enum": ["once", "always", "reject"]
  4982. },
  4983. "message": {
  4984. "type": "string"
  4985. }
  4986. },
  4987. "required": ["reply"],
  4988. "additionalProperties": false
  4989. }
  4990. }
  4991. }
  4992. },
  4993. "x-codeSamples": [
  4994. {
  4995. "lang": "js",
  4996. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4997. }
  4998. ]
  4999. }
  5000. },
  5001. "/provider": {
  5002. "get": {
  5003. "tags": ["provider"],
  5004. "operationId": "provider.list",
  5005. "parameters": [
  5006. {
  5007. "name": "directory",
  5008. "in": "query",
  5009. "schema": {
  5010. "type": "string"
  5011. },
  5012. "required": false
  5013. },
  5014. {
  5015. "name": "workspace",
  5016. "in": "query",
  5017. "schema": {
  5018. "type": "string"
  5019. },
  5020. "required": false
  5021. }
  5022. ],
  5023. "responses": {
  5024. "200": {
  5025. "description": "List of providers",
  5026. "content": {
  5027. "application/json": {
  5028. "schema": {
  5029. "type": "object",
  5030. "properties": {
  5031. "all": {
  5032. "type": "array",
  5033. "items": {
  5034. "$ref": "#/components/schemas/Provider"
  5035. }
  5036. },
  5037. "default": {
  5038. "type": "object",
  5039. "additionalProperties": {
  5040. "type": "string"
  5041. }
  5042. },
  5043. "connected": {
  5044. "type": "array",
  5045. "items": {
  5046. "type": "string"
  5047. }
  5048. }
  5049. },
  5050. "required": ["all", "default", "connected"],
  5051. "additionalProperties": false,
  5052. "description": "List of providers"
  5053. }
  5054. }
  5055. }
  5056. },
  5057. "400": {
  5058. "description": "Bad request",
  5059. "content": {
  5060. "application/json": {
  5061. "schema": {
  5062. "$ref": "#/components/schemas/BadRequestError"
  5063. }
  5064. }
  5065. }
  5066. }
  5067. },
  5068. "description": "Get a list of all available AI providers, including both available and connected ones.",
  5069. "summary": "List providers",
  5070. "x-codeSamples": [
  5071. {
  5072. "lang": "js",
  5073. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  5074. }
  5075. ]
  5076. }
  5077. },
  5078. "/provider/auth": {
  5079. "get": {
  5080. "tags": ["provider"],
  5081. "operationId": "provider.auth",
  5082. "parameters": [
  5083. {
  5084. "name": "directory",
  5085. "in": "query",
  5086. "schema": {
  5087. "type": "string"
  5088. },
  5089. "required": false
  5090. },
  5091. {
  5092. "name": "workspace",
  5093. "in": "query",
  5094. "schema": {
  5095. "type": "string"
  5096. },
  5097. "required": false
  5098. }
  5099. ],
  5100. "responses": {
  5101. "200": {
  5102. "description": "Provider auth methods",
  5103. "content": {
  5104. "application/json": {
  5105. "schema": {
  5106. "type": "object",
  5107. "additionalProperties": {
  5108. "type": "array",
  5109. "items": {
  5110. "$ref": "#/components/schemas/ProviderAuthMethod"
  5111. }
  5112. },
  5113. "description": "Provider auth methods"
  5114. }
  5115. }
  5116. }
  5117. },
  5118. "400": {
  5119. "description": "Bad request",
  5120. "content": {
  5121. "application/json": {
  5122. "schema": {
  5123. "$ref": "#/components/schemas/BadRequestError"
  5124. }
  5125. }
  5126. }
  5127. }
  5128. },
  5129. "description": "Retrieve available authentication methods for all AI providers.",
  5130. "summary": "Get provider auth methods",
  5131. "x-codeSamples": [
  5132. {
  5133. "lang": "js",
  5134. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  5135. }
  5136. ]
  5137. }
  5138. },
  5139. "/provider/{providerID}/oauth/authorize": {
  5140. "post": {
  5141. "tags": ["provider"],
  5142. "operationId": "provider.oauth.authorize",
  5143. "parameters": [
  5144. {
  5145. "name": "providerID",
  5146. "in": "path",
  5147. "schema": {
  5148. "type": "string"
  5149. },
  5150. "required": true
  5151. },
  5152. {
  5153. "name": "directory",
  5154. "in": "query",
  5155. "schema": {
  5156. "type": "string"
  5157. },
  5158. "required": false
  5159. },
  5160. {
  5161. "name": "workspace",
  5162. "in": "query",
  5163. "schema": {
  5164. "type": "string"
  5165. },
  5166. "required": false
  5167. }
  5168. ],
  5169. "responses": {
  5170. "200": {
  5171. "description": "Authorization URL and method",
  5172. "content": {
  5173. "application/json": {
  5174. "schema": {
  5175. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  5176. }
  5177. }
  5178. }
  5179. },
  5180. "400": {
  5181. "description": "ProviderAuthError | InvalidRequestError",
  5182. "content": {
  5183. "application/json": {
  5184. "schema": {
  5185. "anyOf": [
  5186. {
  5187. "$ref": "#/components/schemas/ProviderAuthError1"
  5188. },
  5189. {
  5190. "$ref": "#/components/schemas/InvalidRequestError"
  5191. }
  5192. ]
  5193. }
  5194. }
  5195. }
  5196. }
  5197. },
  5198. "description": "Start the OAuth authorization flow for a provider.",
  5199. "summary": "Start OAuth authorization",
  5200. "requestBody": {
  5201. "content": {
  5202. "application/json": {
  5203. "schema": {
  5204. "type": "object",
  5205. "properties": {
  5206. "method": {
  5207. "type": "number",
  5208. "description": "Auth method index"
  5209. },
  5210. "inputs": {
  5211. "type": "object",
  5212. "additionalProperties": {
  5213. "type": "string"
  5214. }
  5215. }
  5216. },
  5217. "required": ["method"],
  5218. "additionalProperties": false
  5219. }
  5220. }
  5221. }
  5222. },
  5223. "x-codeSamples": [
  5224. {
  5225. "lang": "js",
  5226. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  5227. }
  5228. ]
  5229. }
  5230. },
  5231. "/provider/{providerID}/oauth/callback": {
  5232. "post": {
  5233. "tags": ["provider"],
  5234. "operationId": "provider.oauth.callback",
  5235. "parameters": [
  5236. {
  5237. "name": "providerID",
  5238. "in": "path",
  5239. "schema": {
  5240. "type": "string"
  5241. },
  5242. "required": true
  5243. },
  5244. {
  5245. "name": "directory",
  5246. "in": "query",
  5247. "schema": {
  5248. "type": "string"
  5249. },
  5250. "required": false
  5251. },
  5252. {
  5253. "name": "workspace",
  5254. "in": "query",
  5255. "schema": {
  5256. "type": "string"
  5257. },
  5258. "required": false
  5259. }
  5260. ],
  5261. "responses": {
  5262. "200": {
  5263. "description": "OAuth callback processed successfully",
  5264. "content": {
  5265. "application/json": {
  5266. "schema": {
  5267. "type": "boolean",
  5268. "description": "OAuth callback processed successfully"
  5269. }
  5270. }
  5271. }
  5272. },
  5273. "400": {
  5274. "description": "ProviderAuthError | InvalidRequestError",
  5275. "content": {
  5276. "application/json": {
  5277. "schema": {
  5278. "anyOf": [
  5279. {
  5280. "$ref": "#/components/schemas/ProviderAuthError1"
  5281. },
  5282. {
  5283. "$ref": "#/components/schemas/InvalidRequestError"
  5284. }
  5285. ]
  5286. }
  5287. }
  5288. }
  5289. }
  5290. },
  5291. "description": "Handle the OAuth callback from a provider after user authorization.",
  5292. "summary": "Handle OAuth callback",
  5293. "requestBody": {
  5294. "content": {
  5295. "application/json": {
  5296. "schema": {
  5297. "type": "object",
  5298. "properties": {
  5299. "method": {
  5300. "type": "number",
  5301. "description": "Auth method index"
  5302. },
  5303. "code": {
  5304. "type": "string"
  5305. }
  5306. },
  5307. "required": ["method"],
  5308. "additionalProperties": false
  5309. }
  5310. }
  5311. }
  5312. },
  5313. "x-codeSamples": [
  5314. {
  5315. "lang": "js",
  5316. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  5317. }
  5318. ]
  5319. }
  5320. },
  5321. "/session": {
  5322. "get": {
  5323. "tags": ["session"],
  5324. "operationId": "session.list",
  5325. "parameters": [
  5326. {
  5327. "name": "directory",
  5328. "in": "query",
  5329. "schema": {
  5330. "type": "string"
  5331. },
  5332. "required": false
  5333. },
  5334. {
  5335. "name": "workspace",
  5336. "in": "query",
  5337. "schema": {
  5338. "type": "string"
  5339. },
  5340. "required": false
  5341. },
  5342. {
  5343. "name": "scope",
  5344. "in": "query",
  5345. "schema": {
  5346. "type": "string",
  5347. "enum": ["project"]
  5348. },
  5349. "required": false
  5350. },
  5351. {
  5352. "name": "path",
  5353. "in": "query",
  5354. "schema": {
  5355. "type": "string"
  5356. },
  5357. "required": false
  5358. },
  5359. {
  5360. "name": "roots",
  5361. "in": "query",
  5362. "schema": {
  5363. "anyOf": [
  5364. {
  5365. "type": "boolean"
  5366. },
  5367. {
  5368. "type": "string",
  5369. "enum": ["true", "false"]
  5370. }
  5371. ]
  5372. },
  5373. "required": false
  5374. },
  5375. {
  5376. "name": "start",
  5377. "in": "query",
  5378. "schema": {
  5379. "type": "number"
  5380. },
  5381. "required": false
  5382. },
  5383. {
  5384. "name": "search",
  5385. "in": "query",
  5386. "schema": {
  5387. "type": "string"
  5388. },
  5389. "required": false
  5390. },
  5391. {
  5392. "name": "limit",
  5393. "in": "query",
  5394. "schema": {
  5395. "type": "number"
  5396. },
  5397. "required": false
  5398. }
  5399. ],
  5400. "responses": {
  5401. "200": {
  5402. "description": "List of sessions",
  5403. "content": {
  5404. "application/json": {
  5405. "schema": {
  5406. "type": "array",
  5407. "items": {
  5408. "$ref": "#/components/schemas/Session"
  5409. },
  5410. "description": "List of sessions"
  5411. }
  5412. }
  5413. }
  5414. },
  5415. "400": {
  5416. "description": "Bad request",
  5417. "content": {
  5418. "application/json": {
  5419. "schema": {
  5420. "$ref": "#/components/schemas/BadRequestError"
  5421. }
  5422. }
  5423. }
  5424. }
  5425. },
  5426. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5427. "summary": "List sessions",
  5428. "x-codeSamples": [
  5429. {
  5430. "lang": "js",
  5431. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5432. }
  5433. ]
  5434. },
  5435. "post": {
  5436. "tags": ["session"],
  5437. "operationId": "session.create",
  5438. "parameters": [
  5439. {
  5440. "name": "directory",
  5441. "in": "query",
  5442. "schema": {
  5443. "type": "string"
  5444. },
  5445. "required": false
  5446. },
  5447. {
  5448. "name": "workspace",
  5449. "in": "query",
  5450. "schema": {
  5451. "type": "string"
  5452. },
  5453. "required": false
  5454. }
  5455. ],
  5456. "responses": {
  5457. "200": {
  5458. "description": "Successfully created session",
  5459. "content": {
  5460. "application/json": {
  5461. "schema": {
  5462. "$ref": "#/components/schemas/Session"
  5463. }
  5464. }
  5465. }
  5466. },
  5467. "400": {
  5468. "description": "BadRequest | InvalidRequestError",
  5469. "content": {
  5470. "application/json": {
  5471. "schema": {
  5472. "anyOf": [
  5473. {
  5474. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5475. },
  5476. {
  5477. "$ref": "#/components/schemas/InvalidRequestError"
  5478. }
  5479. ]
  5480. }
  5481. }
  5482. }
  5483. }
  5484. },
  5485. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5486. "summary": "Create session",
  5487. "requestBody": {
  5488. "content": {
  5489. "application/json": {
  5490. "schema": {
  5491. "type": "object",
  5492. "properties": {
  5493. "parentID": {
  5494. "type": "string",
  5495. "pattern": "^ses"
  5496. },
  5497. "title": {
  5498. "type": "string"
  5499. },
  5500. "agent": {
  5501. "type": "string"
  5502. },
  5503. "model": {
  5504. "type": "object",
  5505. "properties": {
  5506. "id": {
  5507. "type": "string"
  5508. },
  5509. "providerID": {
  5510. "type": "string"
  5511. },
  5512. "variant": {
  5513. "type": "string"
  5514. }
  5515. },
  5516. "required": ["id", "providerID"],
  5517. "additionalProperties": false
  5518. },
  5519. "metadata": {
  5520. "type": "object"
  5521. },
  5522. "permission": {
  5523. "$ref": "#/components/schemas/PermissionRuleset"
  5524. },
  5525. "workspaceID": {
  5526. "type": "string",
  5527. "pattern": "^wrk"
  5528. }
  5529. },
  5530. "additionalProperties": false
  5531. }
  5532. }
  5533. }
  5534. },
  5535. "x-codeSamples": [
  5536. {
  5537. "lang": "js",
  5538. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5539. }
  5540. ]
  5541. }
  5542. },
  5543. "/session/status": {
  5544. "get": {
  5545. "tags": ["session"],
  5546. "operationId": "session.status",
  5547. "parameters": [
  5548. {
  5549. "name": "directory",
  5550. "in": "query",
  5551. "schema": {
  5552. "type": "string"
  5553. },
  5554. "required": false
  5555. },
  5556. {
  5557. "name": "workspace",
  5558. "in": "query",
  5559. "schema": {
  5560. "type": "string"
  5561. },
  5562. "required": false
  5563. }
  5564. ],
  5565. "responses": {
  5566. "200": {
  5567. "description": "Get session status",
  5568. "content": {
  5569. "application/json": {
  5570. "schema": {
  5571. "type": "object",
  5572. "additionalProperties": {
  5573. "$ref": "#/components/schemas/SessionStatus"
  5574. },
  5575. "description": "Get session status"
  5576. }
  5577. }
  5578. }
  5579. },
  5580. "400": {
  5581. "description": "BadRequest | InvalidRequestError",
  5582. "content": {
  5583. "application/json": {
  5584. "schema": {
  5585. "anyOf": [
  5586. {
  5587. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5588. },
  5589. {
  5590. "$ref": "#/components/schemas/InvalidRequestError"
  5591. }
  5592. ]
  5593. }
  5594. }
  5595. }
  5596. }
  5597. },
  5598. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5599. "summary": "Get session status",
  5600. "x-codeSamples": [
  5601. {
  5602. "lang": "js",
  5603. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5604. }
  5605. ]
  5606. }
  5607. },
  5608. "/session/{sessionID}": {
  5609. "get": {
  5610. "tags": ["session"],
  5611. "operationId": "session.get",
  5612. "parameters": [
  5613. {
  5614. "name": "sessionID",
  5615. "in": "path",
  5616. "schema": {
  5617. "type": "string",
  5618. "pattern": "^ses"
  5619. },
  5620. "required": true
  5621. },
  5622. {
  5623. "name": "directory",
  5624. "in": "query",
  5625. "schema": {
  5626. "type": "string"
  5627. },
  5628. "required": false
  5629. },
  5630. {
  5631. "name": "workspace",
  5632. "in": "query",
  5633. "schema": {
  5634. "type": "string"
  5635. },
  5636. "required": false
  5637. }
  5638. ],
  5639. "responses": {
  5640. "200": {
  5641. "description": "Get session",
  5642. "content": {
  5643. "application/json": {
  5644. "schema": {
  5645. "$ref": "#/components/schemas/Session"
  5646. }
  5647. }
  5648. }
  5649. },
  5650. "400": {
  5651. "description": "BadRequest | InvalidRequestError",
  5652. "content": {
  5653. "application/json": {
  5654. "schema": {
  5655. "anyOf": [
  5656. {
  5657. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5658. },
  5659. {
  5660. "$ref": "#/components/schemas/InvalidRequestError"
  5661. }
  5662. ]
  5663. }
  5664. }
  5665. }
  5666. },
  5667. "404": {
  5668. "description": "NotFoundError",
  5669. "content": {
  5670. "application/json": {
  5671. "schema": {
  5672. "$ref": "#/components/schemas/NotFoundError"
  5673. }
  5674. }
  5675. }
  5676. }
  5677. },
  5678. "description": "Retrieve detailed information about a specific OpenCode session.",
  5679. "summary": "Get session",
  5680. "x-codeSamples": [
  5681. {
  5682. "lang": "js",
  5683. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5684. }
  5685. ]
  5686. },
  5687. "delete": {
  5688. "tags": ["session"],
  5689. "operationId": "session.delete",
  5690. "parameters": [
  5691. {
  5692. "name": "sessionID",
  5693. "in": "path",
  5694. "schema": {
  5695. "type": "string",
  5696. "pattern": "^ses"
  5697. },
  5698. "required": true
  5699. },
  5700. {
  5701. "name": "directory",
  5702. "in": "query",
  5703. "schema": {
  5704. "type": "string"
  5705. },
  5706. "required": false
  5707. },
  5708. {
  5709. "name": "workspace",
  5710. "in": "query",
  5711. "schema": {
  5712. "type": "string"
  5713. },
  5714. "required": false
  5715. }
  5716. ],
  5717. "responses": {
  5718. "200": {
  5719. "description": "Successfully deleted session",
  5720. "content": {
  5721. "application/json": {
  5722. "schema": {
  5723. "type": "boolean",
  5724. "description": "Successfully deleted session"
  5725. }
  5726. }
  5727. }
  5728. },
  5729. "400": {
  5730. "description": "BadRequest | InvalidRequestError",
  5731. "content": {
  5732. "application/json": {
  5733. "schema": {
  5734. "anyOf": [
  5735. {
  5736. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5737. },
  5738. {
  5739. "$ref": "#/components/schemas/InvalidRequestError"
  5740. }
  5741. ]
  5742. }
  5743. }
  5744. }
  5745. },
  5746. "404": {
  5747. "description": "NotFoundError",
  5748. "content": {
  5749. "application/json": {
  5750. "schema": {
  5751. "$ref": "#/components/schemas/NotFoundError"
  5752. }
  5753. }
  5754. }
  5755. }
  5756. },
  5757. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5758. "summary": "Delete session",
  5759. "x-codeSamples": [
  5760. {
  5761. "lang": "js",
  5762. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5763. }
  5764. ]
  5765. },
  5766. "patch": {
  5767. "tags": ["session"],
  5768. "operationId": "session.update",
  5769. "parameters": [
  5770. {
  5771. "name": "sessionID",
  5772. "in": "path",
  5773. "schema": {
  5774. "type": "string",
  5775. "pattern": "^ses"
  5776. },
  5777. "required": true
  5778. },
  5779. {
  5780. "name": "directory",
  5781. "in": "query",
  5782. "schema": {
  5783. "type": "string"
  5784. },
  5785. "required": false
  5786. },
  5787. {
  5788. "name": "workspace",
  5789. "in": "query",
  5790. "schema": {
  5791. "type": "string"
  5792. },
  5793. "required": false
  5794. }
  5795. ],
  5796. "responses": {
  5797. "200": {
  5798. "description": "Successfully updated session",
  5799. "content": {
  5800. "application/json": {
  5801. "schema": {
  5802. "$ref": "#/components/schemas/Session"
  5803. }
  5804. }
  5805. }
  5806. },
  5807. "400": {
  5808. "description": "BadRequest | InvalidRequestError",
  5809. "content": {
  5810. "application/json": {
  5811. "schema": {
  5812. "anyOf": [
  5813. {
  5814. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5815. },
  5816. {
  5817. "$ref": "#/components/schemas/InvalidRequestError"
  5818. }
  5819. ]
  5820. }
  5821. }
  5822. }
  5823. },
  5824. "404": {
  5825. "description": "NotFoundError",
  5826. "content": {
  5827. "application/json": {
  5828. "schema": {
  5829. "$ref": "#/components/schemas/NotFoundError"
  5830. }
  5831. }
  5832. }
  5833. }
  5834. },
  5835. "description": "Update properties of an existing session, such as title or other metadata.",
  5836. "summary": "Update session",
  5837. "requestBody": {
  5838. "content": {
  5839. "application/json": {
  5840. "schema": {
  5841. "type": "object",
  5842. "properties": {
  5843. "title": {
  5844. "type": "string"
  5845. },
  5846. "metadata": {
  5847. "type": "object"
  5848. },
  5849. "permission": {
  5850. "$ref": "#/components/schemas/PermissionRuleset"
  5851. },
  5852. "time": {
  5853. "type": "object",
  5854. "properties": {
  5855. "archived": {
  5856. "type": "number"
  5857. }
  5858. },
  5859. "additionalProperties": false
  5860. }
  5861. },
  5862. "additionalProperties": false
  5863. }
  5864. }
  5865. }
  5866. },
  5867. "x-codeSamples": [
  5868. {
  5869. "lang": "js",
  5870. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5871. }
  5872. ]
  5873. }
  5874. },
  5875. "/session/{sessionID}/children": {
  5876. "get": {
  5877. "tags": ["session"],
  5878. "operationId": "session.children",
  5879. "parameters": [
  5880. {
  5881. "name": "sessionID",
  5882. "in": "path",
  5883. "schema": {
  5884. "type": "string",
  5885. "pattern": "^ses"
  5886. },
  5887. "required": true
  5888. },
  5889. {
  5890. "name": "directory",
  5891. "in": "query",
  5892. "schema": {
  5893. "type": "string"
  5894. },
  5895. "required": false
  5896. },
  5897. {
  5898. "name": "workspace",
  5899. "in": "query",
  5900. "schema": {
  5901. "type": "string"
  5902. },
  5903. "required": false
  5904. }
  5905. ],
  5906. "responses": {
  5907. "200": {
  5908. "description": "List of children",
  5909. "content": {
  5910. "application/json": {
  5911. "schema": {
  5912. "type": "array",
  5913. "items": {
  5914. "$ref": "#/components/schemas/Session"
  5915. },
  5916. "description": "List of children"
  5917. }
  5918. }
  5919. }
  5920. },
  5921. "400": {
  5922. "description": "BadRequest | InvalidRequestError",
  5923. "content": {
  5924. "application/json": {
  5925. "schema": {
  5926. "anyOf": [
  5927. {
  5928. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5929. },
  5930. {
  5931. "$ref": "#/components/schemas/InvalidRequestError"
  5932. }
  5933. ]
  5934. }
  5935. }
  5936. }
  5937. },
  5938. "404": {
  5939. "description": "NotFoundError",
  5940. "content": {
  5941. "application/json": {
  5942. "schema": {
  5943. "$ref": "#/components/schemas/NotFoundError"
  5944. }
  5945. }
  5946. }
  5947. }
  5948. },
  5949. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  5950. "summary": "Get session children",
  5951. "x-codeSamples": [
  5952. {
  5953. "lang": "js",
  5954. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  5955. }
  5956. ]
  5957. }
  5958. },
  5959. "/session/{sessionID}/todo": {
  5960. "get": {
  5961. "tags": ["session"],
  5962. "operationId": "session.todo",
  5963. "parameters": [
  5964. {
  5965. "name": "sessionID",
  5966. "in": "path",
  5967. "schema": {
  5968. "type": "string",
  5969. "pattern": "^ses"
  5970. },
  5971. "required": true
  5972. },
  5973. {
  5974. "name": "directory",
  5975. "in": "query",
  5976. "schema": {
  5977. "type": "string"
  5978. },
  5979. "required": false
  5980. },
  5981. {
  5982. "name": "workspace",
  5983. "in": "query",
  5984. "schema": {
  5985. "type": "string"
  5986. },
  5987. "required": false
  5988. }
  5989. ],
  5990. "responses": {
  5991. "200": {
  5992. "description": "Todo list",
  5993. "content": {
  5994. "application/json": {
  5995. "schema": {
  5996. "type": "array",
  5997. "items": {
  5998. "$ref": "#/components/schemas/Todo"
  5999. },
  6000. "description": "Todo list"
  6001. }
  6002. }
  6003. }
  6004. },
  6005. "400": {
  6006. "description": "BadRequest | InvalidRequestError",
  6007. "content": {
  6008. "application/json": {
  6009. "schema": {
  6010. "anyOf": [
  6011. {
  6012. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6013. },
  6014. {
  6015. "$ref": "#/components/schemas/InvalidRequestError"
  6016. }
  6017. ]
  6018. }
  6019. }
  6020. }
  6021. },
  6022. "404": {
  6023. "description": "NotFoundError",
  6024. "content": {
  6025. "application/json": {
  6026. "schema": {
  6027. "$ref": "#/components/schemas/NotFoundError"
  6028. }
  6029. }
  6030. }
  6031. }
  6032. },
  6033. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  6034. "summary": "Get session todos",
  6035. "x-codeSamples": [
  6036. {
  6037. "lang": "js",
  6038. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  6039. }
  6040. ]
  6041. }
  6042. },
  6043. "/session/{sessionID}/diff": {
  6044. "get": {
  6045. "tags": ["session"],
  6046. "operationId": "session.diff",
  6047. "parameters": [
  6048. {
  6049. "name": "sessionID",
  6050. "in": "path",
  6051. "schema": {
  6052. "type": "string",
  6053. "pattern": "^ses"
  6054. },
  6055. "required": true
  6056. },
  6057. {
  6058. "name": "directory",
  6059. "in": "query",
  6060. "schema": {
  6061. "type": "string"
  6062. },
  6063. "required": false
  6064. },
  6065. {
  6066. "name": "workspace",
  6067. "in": "query",
  6068. "schema": {
  6069. "type": "string"
  6070. },
  6071. "required": false
  6072. },
  6073. {
  6074. "name": "messageID",
  6075. "in": "query",
  6076. "schema": {
  6077. "type": "string",
  6078. "pattern": "^msg"
  6079. },
  6080. "required": false
  6081. }
  6082. ],
  6083. "responses": {
  6084. "200": {
  6085. "description": "Successfully retrieved diff",
  6086. "content": {
  6087. "application/json": {
  6088. "schema": {
  6089. "type": "array",
  6090. "items": {
  6091. "$ref": "#/components/schemas/SnapshotFileDiff"
  6092. },
  6093. "description": "Successfully retrieved diff"
  6094. }
  6095. }
  6096. }
  6097. },
  6098. "400": {
  6099. "description": "Bad request",
  6100. "content": {
  6101. "application/json": {
  6102. "schema": {
  6103. "$ref": "#/components/schemas/BadRequestError"
  6104. }
  6105. }
  6106. }
  6107. }
  6108. },
  6109. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  6110. "summary": "Get message diff",
  6111. "x-codeSamples": [
  6112. {
  6113. "lang": "js",
  6114. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  6115. }
  6116. ]
  6117. }
  6118. },
  6119. "/session/{sessionID}/message": {
  6120. "get": {
  6121. "tags": ["session"],
  6122. "operationId": "session.messages",
  6123. "parameters": [
  6124. {
  6125. "name": "sessionID",
  6126. "in": "path",
  6127. "schema": {
  6128. "type": "string",
  6129. "pattern": "^ses"
  6130. },
  6131. "required": true
  6132. },
  6133. {
  6134. "name": "directory",
  6135. "in": "query",
  6136. "schema": {
  6137. "type": "string"
  6138. },
  6139. "required": false
  6140. },
  6141. {
  6142. "name": "workspace",
  6143. "in": "query",
  6144. "schema": {
  6145. "type": "string"
  6146. },
  6147. "required": false
  6148. },
  6149. {
  6150. "name": "limit",
  6151. "in": "query",
  6152. "schema": {
  6153. "type": "integer",
  6154. "minimum": 0,
  6155. "maximum": 9007199254740991
  6156. },
  6157. "required": false
  6158. },
  6159. {
  6160. "name": "before",
  6161. "in": "query",
  6162. "schema": {
  6163. "type": "string"
  6164. },
  6165. "required": false
  6166. }
  6167. ],
  6168. "responses": {
  6169. "200": {
  6170. "description": "List of messages",
  6171. "content": {
  6172. "application/json": {
  6173. "schema": {
  6174. "type": "array",
  6175. "items": {
  6176. "type": "object",
  6177. "properties": {
  6178. "info": {
  6179. "$ref": "#/components/schemas/Message"
  6180. },
  6181. "parts": {
  6182. "type": "array",
  6183. "items": {
  6184. "$ref": "#/components/schemas/Part"
  6185. }
  6186. }
  6187. },
  6188. "required": ["info", "parts"],
  6189. "additionalProperties": false
  6190. },
  6191. "description": "List of messages"
  6192. }
  6193. }
  6194. }
  6195. },
  6196. "400": {
  6197. "description": "BadRequest | InvalidRequestError",
  6198. "content": {
  6199. "application/json": {
  6200. "schema": {
  6201. "anyOf": [
  6202. {
  6203. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6204. },
  6205. {
  6206. "$ref": "#/components/schemas/InvalidRequestError"
  6207. }
  6208. ]
  6209. }
  6210. }
  6211. }
  6212. },
  6213. "404": {
  6214. "description": "NotFoundError",
  6215. "content": {
  6216. "application/json": {
  6217. "schema": {
  6218. "$ref": "#/components/schemas/NotFoundError"
  6219. }
  6220. }
  6221. }
  6222. }
  6223. },
  6224. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  6225. "summary": "Get session messages",
  6226. "x-codeSamples": [
  6227. {
  6228. "lang": "js",
  6229. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  6230. }
  6231. ]
  6232. },
  6233. "post": {
  6234. "tags": ["session"],
  6235. "operationId": "session.prompt",
  6236. "parameters": [
  6237. {
  6238. "name": "sessionID",
  6239. "in": "path",
  6240. "schema": {
  6241. "type": "string",
  6242. "pattern": "^ses"
  6243. },
  6244. "required": true
  6245. },
  6246. {
  6247. "name": "directory",
  6248. "in": "query",
  6249. "schema": {
  6250. "type": "string"
  6251. },
  6252. "required": false
  6253. },
  6254. {
  6255. "name": "workspace",
  6256. "in": "query",
  6257. "schema": {
  6258. "type": "string"
  6259. },
  6260. "required": false
  6261. }
  6262. ],
  6263. "responses": {
  6264. "200": {
  6265. "description": "Created message",
  6266. "content": {
  6267. "application/json": {
  6268. "schema": {
  6269. "type": "object",
  6270. "required": ["info", "parts"],
  6271. "properties": {
  6272. "info": {
  6273. "$ref": "#/components/schemas/AssistantMessage"
  6274. },
  6275. "parts": {
  6276. "type": "array",
  6277. "items": {
  6278. "$ref": "#/components/schemas/Part"
  6279. }
  6280. }
  6281. }
  6282. }
  6283. }
  6284. }
  6285. },
  6286. "400": {
  6287. "description": "BadRequest | InvalidRequestError",
  6288. "content": {
  6289. "application/json": {
  6290. "schema": {
  6291. "anyOf": [
  6292. {
  6293. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6294. },
  6295. {
  6296. "$ref": "#/components/schemas/InvalidRequestError"
  6297. }
  6298. ]
  6299. }
  6300. }
  6301. }
  6302. },
  6303. "404": {
  6304. "description": "NotFoundError",
  6305. "content": {
  6306. "application/json": {
  6307. "schema": {
  6308. "$ref": "#/components/schemas/NotFoundError"
  6309. }
  6310. }
  6311. }
  6312. }
  6313. },
  6314. "description": "Create and send a new message to a session, streaming the AI response.",
  6315. "summary": "Send message",
  6316. "requestBody": {
  6317. "content": {
  6318. "application/json": {
  6319. "schema": {
  6320. "type": "object",
  6321. "properties": {
  6322. "messageID": {
  6323. "type": "string",
  6324. "pattern": "^msg"
  6325. },
  6326. "model": {
  6327. "type": "object",
  6328. "properties": {
  6329. "providerID": {
  6330. "type": "string"
  6331. },
  6332. "modelID": {
  6333. "type": "string"
  6334. }
  6335. },
  6336. "required": ["providerID", "modelID"],
  6337. "additionalProperties": false
  6338. },
  6339. "agent": {
  6340. "type": "string"
  6341. },
  6342. "noReply": {
  6343. "type": "boolean"
  6344. },
  6345. "tools": {
  6346. "type": "object",
  6347. "additionalProperties": {
  6348. "type": "boolean"
  6349. }
  6350. },
  6351. "format": {
  6352. "$ref": "#/components/schemas/OutputFormat"
  6353. },
  6354. "system": {
  6355. "type": "string"
  6356. },
  6357. "variant": {
  6358. "type": "string"
  6359. },
  6360. "parts": {
  6361. "type": "array",
  6362. "items": {
  6363. "anyOf": [
  6364. {
  6365. "$ref": "#/components/schemas/TextPartInput"
  6366. },
  6367. {
  6368. "$ref": "#/components/schemas/FilePartInput"
  6369. },
  6370. {
  6371. "$ref": "#/components/schemas/AgentPartInput"
  6372. },
  6373. {
  6374. "$ref": "#/components/schemas/SubtaskPartInput"
  6375. }
  6376. ]
  6377. }
  6378. }
  6379. },
  6380. "required": ["parts"],
  6381. "additionalProperties": false
  6382. }
  6383. }
  6384. }
  6385. },
  6386. "x-codeSamples": [
  6387. {
  6388. "lang": "js",
  6389. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6390. }
  6391. ]
  6392. }
  6393. },
  6394. "/session/{sessionID}/message/{messageID}": {
  6395. "get": {
  6396. "tags": ["session"],
  6397. "operationId": "session.message",
  6398. "parameters": [
  6399. {
  6400. "name": "sessionID",
  6401. "in": "path",
  6402. "schema": {
  6403. "type": "string",
  6404. "pattern": "^ses"
  6405. },
  6406. "required": true
  6407. },
  6408. {
  6409. "name": "messageID",
  6410. "in": "path",
  6411. "schema": {
  6412. "type": "string",
  6413. "pattern": "^msg"
  6414. },
  6415. "required": true
  6416. },
  6417. {
  6418. "name": "directory",
  6419. "in": "query",
  6420. "schema": {
  6421. "type": "string"
  6422. },
  6423. "required": false
  6424. },
  6425. {
  6426. "name": "workspace",
  6427. "in": "query",
  6428. "schema": {
  6429. "type": "string"
  6430. },
  6431. "required": false
  6432. }
  6433. ],
  6434. "responses": {
  6435. "200": {
  6436. "description": "Message",
  6437. "content": {
  6438. "application/json": {
  6439. "schema": {
  6440. "type": "object",
  6441. "properties": {
  6442. "info": {
  6443. "$ref": "#/components/schemas/Message"
  6444. },
  6445. "parts": {
  6446. "type": "array",
  6447. "items": {
  6448. "$ref": "#/components/schemas/Part"
  6449. }
  6450. }
  6451. },
  6452. "required": ["info", "parts"],
  6453. "additionalProperties": false,
  6454. "description": "Message"
  6455. }
  6456. }
  6457. }
  6458. },
  6459. "400": {
  6460. "description": "BadRequest | InvalidRequestError",
  6461. "content": {
  6462. "application/json": {
  6463. "schema": {
  6464. "anyOf": [
  6465. {
  6466. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6467. },
  6468. {
  6469. "$ref": "#/components/schemas/InvalidRequestError"
  6470. }
  6471. ]
  6472. }
  6473. }
  6474. }
  6475. },
  6476. "404": {
  6477. "description": "NotFoundError",
  6478. "content": {
  6479. "application/json": {
  6480. "schema": {
  6481. "$ref": "#/components/schemas/NotFoundError"
  6482. }
  6483. }
  6484. }
  6485. }
  6486. },
  6487. "description": "Retrieve a specific message from a session by its message ID.",
  6488. "summary": "Get message",
  6489. "x-codeSamples": [
  6490. {
  6491. "lang": "js",
  6492. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6493. }
  6494. ]
  6495. },
  6496. "delete": {
  6497. "tags": ["session"],
  6498. "operationId": "session.deleteMessage",
  6499. "parameters": [
  6500. {
  6501. "name": "sessionID",
  6502. "in": "path",
  6503. "schema": {
  6504. "type": "string",
  6505. "pattern": "^ses"
  6506. },
  6507. "required": true
  6508. },
  6509. {
  6510. "name": "messageID",
  6511. "in": "path",
  6512. "schema": {
  6513. "type": "string",
  6514. "pattern": "^msg"
  6515. },
  6516. "required": true
  6517. },
  6518. {
  6519. "name": "directory",
  6520. "in": "query",
  6521. "schema": {
  6522. "type": "string"
  6523. },
  6524. "required": false
  6525. },
  6526. {
  6527. "name": "workspace",
  6528. "in": "query",
  6529. "schema": {
  6530. "type": "string"
  6531. },
  6532. "required": false
  6533. }
  6534. ],
  6535. "responses": {
  6536. "200": {
  6537. "description": "Successfully deleted message",
  6538. "content": {
  6539. "application/json": {
  6540. "schema": {
  6541. "type": "boolean",
  6542. "description": "Successfully deleted message"
  6543. }
  6544. }
  6545. }
  6546. },
  6547. "400": {
  6548. "description": "BadRequest | InvalidRequestError",
  6549. "content": {
  6550. "application/json": {
  6551. "schema": {
  6552. "anyOf": [
  6553. {
  6554. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6555. },
  6556. {
  6557. "$ref": "#/components/schemas/InvalidRequestError"
  6558. }
  6559. ]
  6560. }
  6561. }
  6562. }
  6563. },
  6564. "404": {
  6565. "description": "NotFoundError",
  6566. "content": {
  6567. "application/json": {
  6568. "schema": {
  6569. "$ref": "#/components/schemas/NotFoundError"
  6570. }
  6571. }
  6572. }
  6573. },
  6574. "409": {
  6575. "description": "SessionBusyError",
  6576. "content": {
  6577. "application/json": {
  6578. "schema": {
  6579. "$ref": "#/components/schemas/SessionBusyError"
  6580. }
  6581. }
  6582. }
  6583. }
  6584. },
  6585. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6586. "summary": "Delete message",
  6587. "x-codeSamples": [
  6588. {
  6589. "lang": "js",
  6590. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6591. }
  6592. ]
  6593. }
  6594. },
  6595. "/session/{sessionID}/fork": {
  6596. "post": {
  6597. "tags": ["session"],
  6598. "operationId": "session.fork",
  6599. "parameters": [
  6600. {
  6601. "name": "sessionID",
  6602. "in": "path",
  6603. "schema": {
  6604. "type": "string",
  6605. "pattern": "^ses"
  6606. },
  6607. "required": true
  6608. },
  6609. {
  6610. "name": "directory",
  6611. "in": "query",
  6612. "schema": {
  6613. "type": "string"
  6614. },
  6615. "required": false
  6616. },
  6617. {
  6618. "name": "workspace",
  6619. "in": "query",
  6620. "schema": {
  6621. "type": "string"
  6622. },
  6623. "required": false
  6624. }
  6625. ],
  6626. "responses": {
  6627. "200": {
  6628. "description": "200",
  6629. "content": {
  6630. "application/json": {
  6631. "schema": {
  6632. "$ref": "#/components/schemas/Session"
  6633. }
  6634. }
  6635. }
  6636. },
  6637. "400": {
  6638. "description": "BadRequest | InvalidRequestError",
  6639. "content": {
  6640. "application/json": {
  6641. "schema": {
  6642. "anyOf": [
  6643. {
  6644. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6645. },
  6646. {
  6647. "$ref": "#/components/schemas/InvalidRequestError"
  6648. }
  6649. ]
  6650. }
  6651. }
  6652. }
  6653. },
  6654. "404": {
  6655. "description": "NotFoundError",
  6656. "content": {
  6657. "application/json": {
  6658. "schema": {
  6659. "$ref": "#/components/schemas/NotFoundError"
  6660. }
  6661. }
  6662. }
  6663. }
  6664. },
  6665. "description": "Create a new session by forking an existing session at a specific message point.",
  6666. "summary": "Fork session",
  6667. "requestBody": {
  6668. "content": {
  6669. "application/json": {
  6670. "schema": {
  6671. "type": "object",
  6672. "properties": {
  6673. "messageID": {
  6674. "type": "string",
  6675. "pattern": "^msg"
  6676. }
  6677. },
  6678. "additionalProperties": false
  6679. }
  6680. }
  6681. }
  6682. },
  6683. "x-codeSamples": [
  6684. {
  6685. "lang": "js",
  6686. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6687. }
  6688. ]
  6689. }
  6690. },
  6691. "/session/{sessionID}/abort": {
  6692. "post": {
  6693. "tags": ["session"],
  6694. "operationId": "session.abort",
  6695. "parameters": [
  6696. {
  6697. "name": "sessionID",
  6698. "in": "path",
  6699. "schema": {
  6700. "type": "string",
  6701. "pattern": "^ses"
  6702. },
  6703. "required": true
  6704. },
  6705. {
  6706. "name": "directory",
  6707. "in": "query",
  6708. "schema": {
  6709. "type": "string"
  6710. },
  6711. "required": false
  6712. },
  6713. {
  6714. "name": "workspace",
  6715. "in": "query",
  6716. "schema": {
  6717. "type": "string"
  6718. },
  6719. "required": false
  6720. }
  6721. ],
  6722. "responses": {
  6723. "200": {
  6724. "description": "Aborted session",
  6725. "content": {
  6726. "application/json": {
  6727. "schema": {
  6728. "type": "boolean",
  6729. "description": "Aborted session"
  6730. }
  6731. }
  6732. }
  6733. },
  6734. "400": {
  6735. "description": "BadRequest | InvalidRequestError",
  6736. "content": {
  6737. "application/json": {
  6738. "schema": {
  6739. "anyOf": [
  6740. {
  6741. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6742. },
  6743. {
  6744. "$ref": "#/components/schemas/InvalidRequestError"
  6745. }
  6746. ]
  6747. }
  6748. }
  6749. }
  6750. }
  6751. },
  6752. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6753. "summary": "Abort session",
  6754. "x-codeSamples": [
  6755. {
  6756. "lang": "js",
  6757. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6758. }
  6759. ]
  6760. }
  6761. },
  6762. "/session/{sessionID}/init": {
  6763. "post": {
  6764. "tags": ["session"],
  6765. "operationId": "session.init",
  6766. "parameters": [
  6767. {
  6768. "name": "sessionID",
  6769. "in": "path",
  6770. "schema": {
  6771. "type": "string",
  6772. "pattern": "^ses"
  6773. },
  6774. "required": true
  6775. },
  6776. {
  6777. "name": "directory",
  6778. "in": "query",
  6779. "schema": {
  6780. "type": "string"
  6781. },
  6782. "required": false
  6783. },
  6784. {
  6785. "name": "workspace",
  6786. "in": "query",
  6787. "schema": {
  6788. "type": "string"
  6789. },
  6790. "required": false
  6791. }
  6792. ],
  6793. "responses": {
  6794. "200": {
  6795. "description": "200",
  6796. "content": {
  6797. "application/json": {
  6798. "schema": {
  6799. "type": "boolean",
  6800. "description": "200"
  6801. }
  6802. }
  6803. }
  6804. },
  6805. "400": {
  6806. "description": "BadRequest | InvalidRequestError",
  6807. "content": {
  6808. "application/json": {
  6809. "schema": {
  6810. "anyOf": [
  6811. {
  6812. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6813. },
  6814. {
  6815. "$ref": "#/components/schemas/InvalidRequestError"
  6816. }
  6817. ]
  6818. }
  6819. }
  6820. }
  6821. },
  6822. "404": {
  6823. "description": "NotFoundError",
  6824. "content": {
  6825. "application/json": {
  6826. "schema": {
  6827. "$ref": "#/components/schemas/NotFoundError"
  6828. }
  6829. }
  6830. }
  6831. }
  6832. },
  6833. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6834. "summary": "Initialize session",
  6835. "requestBody": {
  6836. "content": {
  6837. "application/json": {
  6838. "schema": {
  6839. "type": "object",
  6840. "properties": {
  6841. "modelID": {
  6842. "type": "string"
  6843. },
  6844. "providerID": {
  6845. "type": "string"
  6846. },
  6847. "messageID": {
  6848. "type": "string",
  6849. "pattern": "^msg"
  6850. }
  6851. },
  6852. "required": ["modelID", "providerID", "messageID"],
  6853. "additionalProperties": false
  6854. }
  6855. }
  6856. }
  6857. },
  6858. "x-codeSamples": [
  6859. {
  6860. "lang": "js",
  6861. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6862. }
  6863. ]
  6864. }
  6865. },
  6866. "/session/{sessionID}/share": {
  6867. "post": {
  6868. "tags": ["session"],
  6869. "operationId": "session.share",
  6870. "parameters": [
  6871. {
  6872. "name": "sessionID",
  6873. "in": "path",
  6874. "schema": {
  6875. "type": "string",
  6876. "pattern": "^ses"
  6877. },
  6878. "required": true
  6879. },
  6880. {
  6881. "name": "directory",
  6882. "in": "query",
  6883. "schema": {
  6884. "type": "string"
  6885. },
  6886. "required": false
  6887. },
  6888. {
  6889. "name": "workspace",
  6890. "in": "query",
  6891. "schema": {
  6892. "type": "string"
  6893. },
  6894. "required": false
  6895. }
  6896. ],
  6897. "responses": {
  6898. "200": {
  6899. "description": "Successfully shared session",
  6900. "content": {
  6901. "application/json": {
  6902. "schema": {
  6903. "$ref": "#/components/schemas/Session"
  6904. }
  6905. }
  6906. }
  6907. },
  6908. "400": {
  6909. "description": "Bad request",
  6910. "content": {
  6911. "application/json": {
  6912. "schema": {
  6913. "$ref": "#/components/schemas/BadRequestError"
  6914. }
  6915. }
  6916. }
  6917. },
  6918. "404": {
  6919. "description": "NotFoundError",
  6920. "content": {
  6921. "application/json": {
  6922. "schema": {
  6923. "$ref": "#/components/schemas/NotFoundError"
  6924. }
  6925. }
  6926. }
  6927. },
  6928. "500": {
  6929. "description": "InternalServerError",
  6930. "content": {
  6931. "application/json": {
  6932. "schema": {
  6933. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6934. }
  6935. }
  6936. }
  6937. }
  6938. },
  6939. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  6940. "summary": "Share session",
  6941. "x-codeSamples": [
  6942. {
  6943. "lang": "js",
  6944. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  6945. }
  6946. ]
  6947. },
  6948. "delete": {
  6949. "tags": ["session"],
  6950. "operationId": "session.unshare",
  6951. "parameters": [
  6952. {
  6953. "name": "sessionID",
  6954. "in": "path",
  6955. "schema": {
  6956. "type": "string",
  6957. "pattern": "^ses"
  6958. },
  6959. "required": true
  6960. },
  6961. {
  6962. "name": "directory",
  6963. "in": "query",
  6964. "schema": {
  6965. "type": "string"
  6966. },
  6967. "required": false
  6968. },
  6969. {
  6970. "name": "workspace",
  6971. "in": "query",
  6972. "schema": {
  6973. "type": "string"
  6974. },
  6975. "required": false
  6976. }
  6977. ],
  6978. "responses": {
  6979. "200": {
  6980. "description": "Successfully unshared session",
  6981. "content": {
  6982. "application/json": {
  6983. "schema": {
  6984. "$ref": "#/components/schemas/Session"
  6985. }
  6986. }
  6987. }
  6988. },
  6989. "400": {
  6990. "description": "Bad request",
  6991. "content": {
  6992. "application/json": {
  6993. "schema": {
  6994. "$ref": "#/components/schemas/BadRequestError"
  6995. }
  6996. }
  6997. }
  6998. },
  6999. "404": {
  7000. "description": "NotFoundError",
  7001. "content": {
  7002. "application/json": {
  7003. "schema": {
  7004. "$ref": "#/components/schemas/NotFoundError"
  7005. }
  7006. }
  7007. }
  7008. },
  7009. "500": {
  7010. "description": "InternalServerError",
  7011. "content": {
  7012. "application/json": {
  7013. "schema": {
  7014. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  7015. }
  7016. }
  7017. }
  7018. }
  7019. },
  7020. "description": "Remove the shareable link for a session, making it private again.",
  7021. "summary": "Unshare session",
  7022. "x-codeSamples": [
  7023. {
  7024. "lang": "js",
  7025. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  7026. }
  7027. ]
  7028. }
  7029. },
  7030. "/session/{sessionID}/summarize": {
  7031. "post": {
  7032. "tags": ["session"],
  7033. "operationId": "session.summarize",
  7034. "parameters": [
  7035. {
  7036. "name": "sessionID",
  7037. "in": "path",
  7038. "schema": {
  7039. "type": "string",
  7040. "pattern": "^ses"
  7041. },
  7042. "required": true
  7043. },
  7044. {
  7045. "name": "directory",
  7046. "in": "query",
  7047. "schema": {
  7048. "type": "string"
  7049. },
  7050. "required": false
  7051. },
  7052. {
  7053. "name": "workspace",
  7054. "in": "query",
  7055. "schema": {
  7056. "type": "string"
  7057. },
  7058. "required": false
  7059. }
  7060. ],
  7061. "responses": {
  7062. "200": {
  7063. "description": "Summarized session",
  7064. "content": {
  7065. "application/json": {
  7066. "schema": {
  7067. "type": "boolean",
  7068. "description": "Summarized session"
  7069. }
  7070. }
  7071. }
  7072. },
  7073. "400": {
  7074. "description": "BadRequest | InvalidRequestError",
  7075. "content": {
  7076. "application/json": {
  7077. "schema": {
  7078. "anyOf": [
  7079. {
  7080. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7081. },
  7082. {
  7083. "$ref": "#/components/schemas/InvalidRequestError"
  7084. }
  7085. ]
  7086. }
  7087. }
  7088. }
  7089. },
  7090. "404": {
  7091. "description": "NotFoundError",
  7092. "content": {
  7093. "application/json": {
  7094. "schema": {
  7095. "$ref": "#/components/schemas/NotFoundError"
  7096. }
  7097. }
  7098. }
  7099. }
  7100. },
  7101. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  7102. "summary": "Summarize session",
  7103. "requestBody": {
  7104. "content": {
  7105. "application/json": {
  7106. "schema": {
  7107. "type": "object",
  7108. "properties": {
  7109. "providerID": {
  7110. "type": "string"
  7111. },
  7112. "modelID": {
  7113. "type": "string"
  7114. },
  7115. "auto": {
  7116. "type": "boolean"
  7117. }
  7118. },
  7119. "required": ["providerID", "modelID"],
  7120. "additionalProperties": false
  7121. }
  7122. }
  7123. }
  7124. },
  7125. "x-codeSamples": [
  7126. {
  7127. "lang": "js",
  7128. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  7129. }
  7130. ]
  7131. }
  7132. },
  7133. "/session/{sessionID}/prompt_async": {
  7134. "post": {
  7135. "tags": ["session"],
  7136. "operationId": "session.prompt_async",
  7137. "parameters": [
  7138. {
  7139. "name": "sessionID",
  7140. "in": "path",
  7141. "schema": {
  7142. "type": "string",
  7143. "pattern": "^ses"
  7144. },
  7145. "required": true
  7146. },
  7147. {
  7148. "name": "directory",
  7149. "in": "query",
  7150. "schema": {
  7151. "type": "string"
  7152. },
  7153. "required": false
  7154. },
  7155. {
  7156. "name": "workspace",
  7157. "in": "query",
  7158. "schema": {
  7159. "type": "string"
  7160. },
  7161. "required": false
  7162. }
  7163. ],
  7164. "responses": {
  7165. "204": {
  7166. "description": "Prompt accepted"
  7167. },
  7168. "400": {
  7169. "description": "BadRequest | InvalidRequestError",
  7170. "content": {
  7171. "application/json": {
  7172. "schema": {
  7173. "anyOf": [
  7174. {
  7175. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7176. },
  7177. {
  7178. "$ref": "#/components/schemas/InvalidRequestError"
  7179. }
  7180. ]
  7181. }
  7182. }
  7183. }
  7184. },
  7185. "404": {
  7186. "description": "NotFoundError",
  7187. "content": {
  7188. "application/json": {
  7189. "schema": {
  7190. "$ref": "#/components/schemas/NotFoundError"
  7191. }
  7192. }
  7193. }
  7194. }
  7195. },
  7196. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  7197. "summary": "Send async message",
  7198. "requestBody": {
  7199. "content": {
  7200. "application/json": {
  7201. "schema": {
  7202. "type": "object",
  7203. "properties": {
  7204. "messageID": {
  7205. "type": "string",
  7206. "pattern": "^msg"
  7207. },
  7208. "model": {
  7209. "type": "object",
  7210. "properties": {
  7211. "providerID": {
  7212. "type": "string"
  7213. },
  7214. "modelID": {
  7215. "type": "string"
  7216. }
  7217. },
  7218. "required": ["providerID", "modelID"],
  7219. "additionalProperties": false
  7220. },
  7221. "agent": {
  7222. "type": "string"
  7223. },
  7224. "noReply": {
  7225. "type": "boolean"
  7226. },
  7227. "tools": {
  7228. "type": "object",
  7229. "additionalProperties": {
  7230. "type": "boolean"
  7231. }
  7232. },
  7233. "format": {
  7234. "$ref": "#/components/schemas/OutputFormat"
  7235. },
  7236. "system": {
  7237. "type": "string"
  7238. },
  7239. "variant": {
  7240. "type": "string"
  7241. },
  7242. "parts": {
  7243. "type": "array",
  7244. "items": {
  7245. "anyOf": [
  7246. {
  7247. "$ref": "#/components/schemas/TextPartInput"
  7248. },
  7249. {
  7250. "$ref": "#/components/schemas/FilePartInput"
  7251. },
  7252. {
  7253. "$ref": "#/components/schemas/AgentPartInput"
  7254. },
  7255. {
  7256. "$ref": "#/components/schemas/SubtaskPartInput"
  7257. }
  7258. ]
  7259. }
  7260. }
  7261. },
  7262. "required": ["parts"],
  7263. "additionalProperties": false
  7264. }
  7265. }
  7266. }
  7267. },
  7268. "x-codeSamples": [
  7269. {
  7270. "lang": "js",
  7271. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  7272. }
  7273. ]
  7274. }
  7275. },
  7276. "/session/{sessionID}/command": {
  7277. "post": {
  7278. "tags": ["session"],
  7279. "operationId": "session.command",
  7280. "parameters": [
  7281. {
  7282. "name": "sessionID",
  7283. "in": "path",
  7284. "schema": {
  7285. "type": "string",
  7286. "pattern": "^ses"
  7287. },
  7288. "required": true
  7289. },
  7290. {
  7291. "name": "directory",
  7292. "in": "query",
  7293. "schema": {
  7294. "type": "string"
  7295. },
  7296. "required": false
  7297. },
  7298. {
  7299. "name": "workspace",
  7300. "in": "query",
  7301. "schema": {
  7302. "type": "string"
  7303. },
  7304. "required": false
  7305. }
  7306. ],
  7307. "responses": {
  7308. "200": {
  7309. "description": "Created message",
  7310. "content": {
  7311. "application/json": {
  7312. "schema": {
  7313. "type": "object",
  7314. "required": ["info", "parts"],
  7315. "properties": {
  7316. "info": {
  7317. "$ref": "#/components/schemas/AssistantMessage"
  7318. },
  7319. "parts": {
  7320. "type": "array",
  7321. "items": {
  7322. "$ref": "#/components/schemas/Part"
  7323. }
  7324. }
  7325. }
  7326. }
  7327. }
  7328. }
  7329. },
  7330. "400": {
  7331. "description": "BadRequest | InvalidRequestError",
  7332. "content": {
  7333. "application/json": {
  7334. "schema": {
  7335. "anyOf": [
  7336. {
  7337. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7338. },
  7339. {
  7340. "$ref": "#/components/schemas/InvalidRequestError"
  7341. }
  7342. ]
  7343. }
  7344. }
  7345. }
  7346. },
  7347. "404": {
  7348. "description": "NotFoundError",
  7349. "content": {
  7350. "application/json": {
  7351. "schema": {
  7352. "$ref": "#/components/schemas/NotFoundError"
  7353. }
  7354. }
  7355. }
  7356. }
  7357. },
  7358. "description": "Send a new command to a session for execution by the AI assistant.",
  7359. "summary": "Send command",
  7360. "requestBody": {
  7361. "content": {
  7362. "application/json": {
  7363. "schema": {
  7364. "type": "object",
  7365. "properties": {
  7366. "messageID": {
  7367. "type": "string",
  7368. "pattern": "^msg"
  7369. },
  7370. "agent": {
  7371. "type": "string"
  7372. },
  7373. "model": {
  7374. "type": "string"
  7375. },
  7376. "arguments": {
  7377. "type": "string"
  7378. },
  7379. "command": {
  7380. "type": "string"
  7381. },
  7382. "variant": {
  7383. "type": "string"
  7384. },
  7385. "parts": {
  7386. "type": "array",
  7387. "items": {
  7388. "type": "object",
  7389. "properties": {
  7390. "id": {
  7391. "type": "string",
  7392. "pattern": "^prt"
  7393. },
  7394. "type": {
  7395. "type": "string",
  7396. "enum": ["file"]
  7397. },
  7398. "mime": {
  7399. "type": "string"
  7400. },
  7401. "filename": {
  7402. "type": "string"
  7403. },
  7404. "url": {
  7405. "type": "string"
  7406. },
  7407. "source": {
  7408. "$ref": "#/components/schemas/FilePartSource"
  7409. }
  7410. },
  7411. "required": ["type", "mime", "url"],
  7412. "additionalProperties": false
  7413. }
  7414. }
  7415. },
  7416. "required": ["arguments", "command"],
  7417. "additionalProperties": false
  7418. }
  7419. }
  7420. }
  7421. },
  7422. "x-codeSamples": [
  7423. {
  7424. "lang": "js",
  7425. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7426. }
  7427. ]
  7428. }
  7429. },
  7430. "/session/{sessionID}/shell": {
  7431. "post": {
  7432. "tags": ["session"],
  7433. "operationId": "session.shell",
  7434. "parameters": [
  7435. {
  7436. "name": "sessionID",
  7437. "in": "path",
  7438. "schema": {
  7439. "type": "string",
  7440. "pattern": "^ses"
  7441. },
  7442. "required": true
  7443. },
  7444. {
  7445. "name": "directory",
  7446. "in": "query",
  7447. "schema": {
  7448. "type": "string"
  7449. },
  7450. "required": false
  7451. },
  7452. {
  7453. "name": "workspace",
  7454. "in": "query",
  7455. "schema": {
  7456. "type": "string"
  7457. },
  7458. "required": false
  7459. }
  7460. ],
  7461. "responses": {
  7462. "200": {
  7463. "description": "Created message",
  7464. "content": {
  7465. "application/json": {
  7466. "schema": {
  7467. "type": "object",
  7468. "properties": {
  7469. "info": {
  7470. "$ref": "#/components/schemas/Message"
  7471. },
  7472. "parts": {
  7473. "type": "array",
  7474. "items": {
  7475. "$ref": "#/components/schemas/Part"
  7476. }
  7477. }
  7478. },
  7479. "required": ["info", "parts"],
  7480. "additionalProperties": false,
  7481. "description": "Created message"
  7482. }
  7483. }
  7484. }
  7485. },
  7486. "400": {
  7487. "description": "BadRequest | InvalidRequestError",
  7488. "content": {
  7489. "application/json": {
  7490. "schema": {
  7491. "anyOf": [
  7492. {
  7493. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7494. },
  7495. {
  7496. "$ref": "#/components/schemas/InvalidRequestError"
  7497. }
  7498. ]
  7499. }
  7500. }
  7501. }
  7502. },
  7503. "404": {
  7504. "description": "NotFoundError",
  7505. "content": {
  7506. "application/json": {
  7507. "schema": {
  7508. "$ref": "#/components/schemas/NotFoundError"
  7509. }
  7510. }
  7511. }
  7512. },
  7513. "409": {
  7514. "description": "SessionBusyError",
  7515. "content": {
  7516. "application/json": {
  7517. "schema": {
  7518. "$ref": "#/components/schemas/SessionBusyError"
  7519. }
  7520. }
  7521. }
  7522. }
  7523. },
  7524. "description": "Execute a shell command within the session context and return the AI's response.",
  7525. "summary": "Run shell command",
  7526. "requestBody": {
  7527. "content": {
  7528. "application/json": {
  7529. "schema": {
  7530. "type": "object",
  7531. "properties": {
  7532. "messageID": {
  7533. "type": "string",
  7534. "pattern": "^msg"
  7535. },
  7536. "agent": {
  7537. "type": "string"
  7538. },
  7539. "model": {
  7540. "type": "object",
  7541. "properties": {
  7542. "providerID": {
  7543. "type": "string"
  7544. },
  7545. "modelID": {
  7546. "type": "string"
  7547. }
  7548. },
  7549. "required": ["providerID", "modelID"],
  7550. "additionalProperties": false
  7551. },
  7552. "command": {
  7553. "type": "string"
  7554. }
  7555. },
  7556. "required": ["agent", "command"],
  7557. "additionalProperties": false
  7558. }
  7559. }
  7560. }
  7561. },
  7562. "x-codeSamples": [
  7563. {
  7564. "lang": "js",
  7565. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7566. }
  7567. ]
  7568. }
  7569. },
  7570. "/session/{sessionID}/revert": {
  7571. "post": {
  7572. "tags": ["session"],
  7573. "operationId": "session.revert",
  7574. "parameters": [
  7575. {
  7576. "name": "sessionID",
  7577. "in": "path",
  7578. "schema": {
  7579. "type": "string",
  7580. "pattern": "^ses"
  7581. },
  7582. "required": true
  7583. },
  7584. {
  7585. "name": "directory",
  7586. "in": "query",
  7587. "schema": {
  7588. "type": "string"
  7589. },
  7590. "required": false
  7591. },
  7592. {
  7593. "name": "workspace",
  7594. "in": "query",
  7595. "schema": {
  7596. "type": "string"
  7597. },
  7598. "required": false
  7599. }
  7600. ],
  7601. "responses": {
  7602. "200": {
  7603. "description": "Updated session",
  7604. "content": {
  7605. "application/json": {
  7606. "schema": {
  7607. "$ref": "#/components/schemas/Session"
  7608. }
  7609. }
  7610. }
  7611. },
  7612. "400": {
  7613. "description": "BadRequest | InvalidRequestError",
  7614. "content": {
  7615. "application/json": {
  7616. "schema": {
  7617. "anyOf": [
  7618. {
  7619. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7620. },
  7621. {
  7622. "$ref": "#/components/schemas/InvalidRequestError"
  7623. }
  7624. ]
  7625. }
  7626. }
  7627. }
  7628. },
  7629. "404": {
  7630. "description": "NotFoundError",
  7631. "content": {
  7632. "application/json": {
  7633. "schema": {
  7634. "$ref": "#/components/schemas/NotFoundError"
  7635. }
  7636. }
  7637. }
  7638. },
  7639. "409": {
  7640. "description": "SessionBusyError",
  7641. "content": {
  7642. "application/json": {
  7643. "schema": {
  7644. "$ref": "#/components/schemas/SessionBusyError"
  7645. }
  7646. }
  7647. }
  7648. }
  7649. },
  7650. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7651. "summary": "Revert message",
  7652. "requestBody": {
  7653. "content": {
  7654. "application/json": {
  7655. "schema": {
  7656. "type": "object",
  7657. "properties": {
  7658. "messageID": {
  7659. "type": "string",
  7660. "pattern": "^msg"
  7661. },
  7662. "partID": {
  7663. "type": "string",
  7664. "pattern": "^prt"
  7665. }
  7666. },
  7667. "required": ["messageID"],
  7668. "additionalProperties": false
  7669. }
  7670. }
  7671. }
  7672. },
  7673. "x-codeSamples": [
  7674. {
  7675. "lang": "js",
  7676. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7677. }
  7678. ]
  7679. }
  7680. },
  7681. "/session/{sessionID}/unrevert": {
  7682. "post": {
  7683. "tags": ["session"],
  7684. "operationId": "session.unrevert",
  7685. "parameters": [
  7686. {
  7687. "name": "sessionID",
  7688. "in": "path",
  7689. "schema": {
  7690. "type": "string",
  7691. "pattern": "^ses"
  7692. },
  7693. "required": true
  7694. },
  7695. {
  7696. "name": "directory",
  7697. "in": "query",
  7698. "schema": {
  7699. "type": "string"
  7700. },
  7701. "required": false
  7702. },
  7703. {
  7704. "name": "workspace",
  7705. "in": "query",
  7706. "schema": {
  7707. "type": "string"
  7708. },
  7709. "required": false
  7710. }
  7711. ],
  7712. "responses": {
  7713. "200": {
  7714. "description": "Updated session",
  7715. "content": {
  7716. "application/json": {
  7717. "schema": {
  7718. "$ref": "#/components/schemas/Session"
  7719. }
  7720. }
  7721. }
  7722. },
  7723. "400": {
  7724. "description": "BadRequest | InvalidRequestError",
  7725. "content": {
  7726. "application/json": {
  7727. "schema": {
  7728. "anyOf": [
  7729. {
  7730. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7731. },
  7732. {
  7733. "$ref": "#/components/schemas/InvalidRequestError"
  7734. }
  7735. ]
  7736. }
  7737. }
  7738. }
  7739. },
  7740. "404": {
  7741. "description": "NotFoundError",
  7742. "content": {
  7743. "application/json": {
  7744. "schema": {
  7745. "$ref": "#/components/schemas/NotFoundError"
  7746. }
  7747. }
  7748. }
  7749. },
  7750. "409": {
  7751. "description": "SessionBusyError",
  7752. "content": {
  7753. "application/json": {
  7754. "schema": {
  7755. "$ref": "#/components/schemas/SessionBusyError"
  7756. }
  7757. }
  7758. }
  7759. }
  7760. },
  7761. "description": "Restore all previously reverted messages in a session.",
  7762. "summary": "Restore reverted messages",
  7763. "x-codeSamples": [
  7764. {
  7765. "lang": "js",
  7766. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7767. }
  7768. ]
  7769. }
  7770. },
  7771. "/session/{sessionID}/permissions/{permissionID}": {
  7772. "post": {
  7773. "tags": ["session"],
  7774. "operationId": "permission.respond",
  7775. "parameters": [
  7776. {
  7777. "name": "sessionID",
  7778. "in": "path",
  7779. "schema": {
  7780. "type": "string",
  7781. "pattern": "^ses"
  7782. },
  7783. "required": true
  7784. },
  7785. {
  7786. "name": "permissionID",
  7787. "in": "path",
  7788. "schema": {
  7789. "type": "string",
  7790. "pattern": "^per"
  7791. },
  7792. "required": true
  7793. },
  7794. {
  7795. "name": "directory",
  7796. "in": "query",
  7797. "schema": {
  7798. "type": "string"
  7799. },
  7800. "required": false
  7801. },
  7802. {
  7803. "name": "workspace",
  7804. "in": "query",
  7805. "schema": {
  7806. "type": "string"
  7807. },
  7808. "required": false
  7809. }
  7810. ],
  7811. "responses": {
  7812. "200": {
  7813. "description": "Permission processed successfully",
  7814. "content": {
  7815. "application/json": {
  7816. "schema": {
  7817. "type": "boolean",
  7818. "description": "Permission processed successfully"
  7819. }
  7820. }
  7821. }
  7822. },
  7823. "400": {
  7824. "description": "BadRequest | InvalidRequestError",
  7825. "content": {
  7826. "application/json": {
  7827. "schema": {
  7828. "anyOf": [
  7829. {
  7830. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7831. },
  7832. {
  7833. "$ref": "#/components/schemas/InvalidRequestError"
  7834. }
  7835. ]
  7836. }
  7837. }
  7838. }
  7839. },
  7840. "404": {
  7841. "description": "NotFoundError | PermissionNotFoundError",
  7842. "content": {
  7843. "application/json": {
  7844. "schema": {
  7845. "anyOf": [
  7846. {
  7847. "$ref": "#/components/schemas/NotFoundError"
  7848. },
  7849. {
  7850. "$ref": "#/components/schemas/PermissionNotFoundError"
  7851. }
  7852. ]
  7853. }
  7854. }
  7855. }
  7856. }
  7857. },
  7858. "description": "Approve or deny a permission request from the AI assistant.",
  7859. "summary": "Respond to permission",
  7860. "deprecated": true,
  7861. "requestBody": {
  7862. "content": {
  7863. "application/json": {
  7864. "schema": {
  7865. "type": "object",
  7866. "properties": {
  7867. "response": {
  7868. "type": "string",
  7869. "enum": ["once", "always", "reject"]
  7870. }
  7871. },
  7872. "required": ["response"],
  7873. "additionalProperties": false
  7874. }
  7875. }
  7876. }
  7877. },
  7878. "x-codeSamples": [
  7879. {
  7880. "lang": "js",
  7881. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7882. }
  7883. ]
  7884. }
  7885. },
  7886. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7887. "delete": {
  7888. "tags": ["session"],
  7889. "operationId": "part.delete",
  7890. "parameters": [
  7891. {
  7892. "name": "sessionID",
  7893. "in": "path",
  7894. "schema": {
  7895. "type": "string",
  7896. "pattern": "^ses"
  7897. },
  7898. "required": true
  7899. },
  7900. {
  7901. "name": "messageID",
  7902. "in": "path",
  7903. "schema": {
  7904. "type": "string",
  7905. "pattern": "^msg"
  7906. },
  7907. "required": true
  7908. },
  7909. {
  7910. "name": "partID",
  7911. "in": "path",
  7912. "schema": {
  7913. "type": "string",
  7914. "pattern": "^prt"
  7915. },
  7916. "required": true
  7917. },
  7918. {
  7919. "name": "directory",
  7920. "in": "query",
  7921. "schema": {
  7922. "type": "string"
  7923. },
  7924. "required": false
  7925. },
  7926. {
  7927. "name": "workspace",
  7928. "in": "query",
  7929. "schema": {
  7930. "type": "string"
  7931. },
  7932. "required": false
  7933. }
  7934. ],
  7935. "responses": {
  7936. "200": {
  7937. "description": "Successfully deleted part",
  7938. "content": {
  7939. "application/json": {
  7940. "schema": {
  7941. "type": "boolean",
  7942. "description": "Successfully deleted part"
  7943. }
  7944. }
  7945. }
  7946. },
  7947. "400": {
  7948. "description": "BadRequest | InvalidRequestError",
  7949. "content": {
  7950. "application/json": {
  7951. "schema": {
  7952. "anyOf": [
  7953. {
  7954. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7955. },
  7956. {
  7957. "$ref": "#/components/schemas/InvalidRequestError"
  7958. }
  7959. ]
  7960. }
  7961. }
  7962. }
  7963. },
  7964. "404": {
  7965. "description": "NotFoundError",
  7966. "content": {
  7967. "application/json": {
  7968. "schema": {
  7969. "$ref": "#/components/schemas/NotFoundError"
  7970. }
  7971. }
  7972. }
  7973. }
  7974. },
  7975. "description": "Delete a part from a message.",
  7976. "x-codeSamples": [
  7977. {
  7978. "lang": "js",
  7979. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  7980. }
  7981. ]
  7982. },
  7983. "patch": {
  7984. "tags": ["session"],
  7985. "operationId": "part.update",
  7986. "parameters": [
  7987. {
  7988. "name": "sessionID",
  7989. "in": "path",
  7990. "schema": {
  7991. "type": "string",
  7992. "pattern": "^ses"
  7993. },
  7994. "required": true
  7995. },
  7996. {
  7997. "name": "messageID",
  7998. "in": "path",
  7999. "schema": {
  8000. "type": "string",
  8001. "pattern": "^msg"
  8002. },
  8003. "required": true
  8004. },
  8005. {
  8006. "name": "partID",
  8007. "in": "path",
  8008. "schema": {
  8009. "type": "string",
  8010. "pattern": "^prt"
  8011. },
  8012. "required": true
  8013. },
  8014. {
  8015. "name": "directory",
  8016. "in": "query",
  8017. "schema": {
  8018. "type": "string"
  8019. },
  8020. "required": false
  8021. },
  8022. {
  8023. "name": "workspace",
  8024. "in": "query",
  8025. "schema": {
  8026. "type": "string"
  8027. },
  8028. "required": false
  8029. }
  8030. ],
  8031. "responses": {
  8032. "200": {
  8033. "description": "Successfully updated part",
  8034. "content": {
  8035. "application/json": {
  8036. "schema": {
  8037. "$ref": "#/components/schemas/Part"
  8038. }
  8039. }
  8040. }
  8041. },
  8042. "400": {
  8043. "description": "BadRequest | InvalidRequestError",
  8044. "content": {
  8045. "application/json": {
  8046. "schema": {
  8047. "anyOf": [
  8048. {
  8049. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8050. },
  8051. {
  8052. "$ref": "#/components/schemas/InvalidRequestError"
  8053. }
  8054. ]
  8055. }
  8056. }
  8057. }
  8058. },
  8059. "404": {
  8060. "description": "NotFoundError",
  8061. "content": {
  8062. "application/json": {
  8063. "schema": {
  8064. "$ref": "#/components/schemas/NotFoundError"
  8065. }
  8066. }
  8067. }
  8068. }
  8069. },
  8070. "description": "Update a part in a message.",
  8071. "requestBody": {
  8072. "content": {
  8073. "application/json": {
  8074. "schema": {
  8075. "$ref": "#/components/schemas/Part"
  8076. }
  8077. }
  8078. }
  8079. },
  8080. "x-codeSamples": [
  8081. {
  8082. "lang": "js",
  8083. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  8084. }
  8085. ]
  8086. }
  8087. },
  8088. "/sync/start": {
  8089. "post": {
  8090. "tags": ["sync"],
  8091. "operationId": "sync.start",
  8092. "parameters": [
  8093. {
  8094. "name": "directory",
  8095. "in": "query",
  8096. "schema": {
  8097. "type": "string"
  8098. },
  8099. "required": false
  8100. },
  8101. {
  8102. "name": "workspace",
  8103. "in": "query",
  8104. "schema": {
  8105. "type": "string"
  8106. },
  8107. "required": false
  8108. }
  8109. ],
  8110. "responses": {
  8111. "200": {
  8112. "description": "Workspace sync started",
  8113. "content": {
  8114. "application/json": {
  8115. "schema": {
  8116. "type": "boolean",
  8117. "description": "Workspace sync started"
  8118. }
  8119. }
  8120. }
  8121. },
  8122. "400": {
  8123. "description": "Bad request",
  8124. "content": {
  8125. "application/json": {
  8126. "schema": {
  8127. "$ref": "#/components/schemas/BadRequestError"
  8128. }
  8129. }
  8130. }
  8131. }
  8132. },
  8133. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  8134. "summary": "Start workspace sync",
  8135. "x-codeSamples": [
  8136. {
  8137. "lang": "js",
  8138. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  8139. }
  8140. ]
  8141. }
  8142. },
  8143. "/sync/replay": {
  8144. "post": {
  8145. "tags": ["sync"],
  8146. "operationId": "sync.replay",
  8147. "parameters": [
  8148. {
  8149. "name": "directory",
  8150. "in": "query",
  8151. "schema": {
  8152. "type": "string"
  8153. },
  8154. "required": false
  8155. },
  8156. {
  8157. "name": "workspace",
  8158. "in": "query",
  8159. "schema": {
  8160. "type": "string"
  8161. },
  8162. "required": false
  8163. }
  8164. ],
  8165. "responses": {
  8166. "200": {
  8167. "description": "Replayed sync events",
  8168. "content": {
  8169. "application/json": {
  8170. "schema": {
  8171. "type": "object",
  8172. "properties": {
  8173. "sessionID": {
  8174. "type": "string"
  8175. }
  8176. },
  8177. "required": ["sessionID"],
  8178. "additionalProperties": false,
  8179. "description": "Replayed sync events"
  8180. }
  8181. }
  8182. }
  8183. },
  8184. "400": {
  8185. "description": "BadRequest | InvalidRequestError",
  8186. "content": {
  8187. "application/json": {
  8188. "schema": {
  8189. "anyOf": [
  8190. {
  8191. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8192. },
  8193. {
  8194. "$ref": "#/components/schemas/InvalidRequestError"
  8195. }
  8196. ]
  8197. }
  8198. }
  8199. }
  8200. }
  8201. },
  8202. "description": "Validate and replay a complete sync event history.",
  8203. "summary": "Replay sync events",
  8204. "requestBody": {
  8205. "content": {
  8206. "application/json": {
  8207. "schema": {
  8208. "type": "object",
  8209. "properties": {
  8210. "directory": {
  8211. "type": "string"
  8212. },
  8213. "events": {
  8214. "type": "array",
  8215. "minItems": 1,
  8216. "items": {
  8217. "type": "object",
  8218. "properties": {
  8219. "id": {
  8220. "type": "string",
  8221. "pattern": "^evt_"
  8222. },
  8223. "aggregateID": {
  8224. "type": "string"
  8225. },
  8226. "seq": {
  8227. "type": "integer",
  8228. "minimum": 0
  8229. },
  8230. "type": {
  8231. "type": "string"
  8232. },
  8233. "data": {
  8234. "type": "object"
  8235. }
  8236. },
  8237. "required": ["id", "aggregateID", "seq", "type", "data"],
  8238. "additionalProperties": false
  8239. }
  8240. }
  8241. },
  8242. "required": ["directory", "events"],
  8243. "additionalProperties": false
  8244. }
  8245. }
  8246. }
  8247. },
  8248. "x-codeSamples": [
  8249. {
  8250. "lang": "js",
  8251. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  8252. }
  8253. ]
  8254. }
  8255. },
  8256. "/sync/steal": {
  8257. "post": {
  8258. "tags": ["sync"],
  8259. "operationId": "sync.steal",
  8260. "parameters": [
  8261. {
  8262. "name": "directory",
  8263. "in": "query",
  8264. "schema": {
  8265. "type": "string"
  8266. },
  8267. "required": false
  8268. },
  8269. {
  8270. "name": "workspace",
  8271. "in": "query",
  8272. "schema": {
  8273. "type": "string"
  8274. },
  8275. "required": false
  8276. }
  8277. ],
  8278. "responses": {
  8279. "200": {
  8280. "description": "Session stolen into workspace",
  8281. "content": {
  8282. "application/json": {
  8283. "schema": {
  8284. "type": "object",
  8285. "properties": {
  8286. "sessionID": {
  8287. "type": "string",
  8288. "pattern": "^ses"
  8289. }
  8290. },
  8291. "required": ["sessionID"],
  8292. "additionalProperties": false,
  8293. "description": "Session stolen into workspace"
  8294. }
  8295. }
  8296. }
  8297. },
  8298. "400": {
  8299. "description": "BadRequest | InvalidRequestError",
  8300. "content": {
  8301. "application/json": {
  8302. "schema": {
  8303. "anyOf": [
  8304. {
  8305. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8306. },
  8307. {
  8308. "$ref": "#/components/schemas/InvalidRequestError"
  8309. }
  8310. ]
  8311. }
  8312. }
  8313. }
  8314. }
  8315. },
  8316. "description": "Update a session to belong to the current workspace through the sync event system.",
  8317. "summary": "Steal session into workspace",
  8318. "requestBody": {
  8319. "content": {
  8320. "application/json": {
  8321. "schema": {
  8322. "type": "object",
  8323. "properties": {
  8324. "sessionID": {
  8325. "type": "string",
  8326. "pattern": "^ses"
  8327. }
  8328. },
  8329. "required": ["sessionID"],
  8330. "additionalProperties": false
  8331. }
  8332. }
  8333. }
  8334. },
  8335. "x-codeSamples": [
  8336. {
  8337. "lang": "js",
  8338. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  8339. }
  8340. ]
  8341. }
  8342. },
  8343. "/sync/history": {
  8344. "post": {
  8345. "tags": ["sync"],
  8346. "operationId": "sync.history.list",
  8347. "parameters": [
  8348. {
  8349. "name": "directory",
  8350. "in": "query",
  8351. "schema": {
  8352. "type": "string"
  8353. },
  8354. "required": false
  8355. },
  8356. {
  8357. "name": "workspace",
  8358. "in": "query",
  8359. "schema": {
  8360. "type": "string"
  8361. },
  8362. "required": false
  8363. }
  8364. ],
  8365. "responses": {
  8366. "200": {
  8367. "description": "Sync events",
  8368. "content": {
  8369. "application/json": {
  8370. "schema": {
  8371. "type": "array",
  8372. "items": {
  8373. "type": "object",
  8374. "properties": {
  8375. "id": {
  8376. "type": "string",
  8377. "pattern": "^evt_"
  8378. },
  8379. "aggregate_id": {
  8380. "type": "string"
  8381. },
  8382. "seq": {
  8383. "type": "integer",
  8384. "minimum": 0
  8385. },
  8386. "type": {
  8387. "type": "string"
  8388. },
  8389. "data": {
  8390. "type": "object"
  8391. }
  8392. },
  8393. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8394. "additionalProperties": false
  8395. },
  8396. "description": "Sync events"
  8397. }
  8398. }
  8399. }
  8400. },
  8401. "400": {
  8402. "description": "BadRequest | InvalidRequestError",
  8403. "content": {
  8404. "application/json": {
  8405. "schema": {
  8406. "anyOf": [
  8407. {
  8408. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8409. },
  8410. {
  8411. "$ref": "#/components/schemas/InvalidRequestError"
  8412. }
  8413. ]
  8414. }
  8415. }
  8416. }
  8417. }
  8418. },
  8419. "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.",
  8420. "summary": "List sync events",
  8421. "requestBody": {
  8422. "content": {
  8423. "application/json": {
  8424. "schema": {
  8425. "type": "object",
  8426. "additionalProperties": {
  8427. "type": "integer",
  8428. "minimum": 0
  8429. }
  8430. }
  8431. }
  8432. }
  8433. },
  8434. "x-codeSamples": [
  8435. {
  8436. "lang": "js",
  8437. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8438. }
  8439. ]
  8440. }
  8441. },
  8442. "/tui/append-prompt": {
  8443. "post": {
  8444. "tags": ["tui"],
  8445. "operationId": "tui.appendPrompt",
  8446. "parameters": [
  8447. {
  8448. "name": "directory",
  8449. "in": "query",
  8450. "schema": {
  8451. "type": "string"
  8452. },
  8453. "required": false
  8454. },
  8455. {
  8456. "name": "workspace",
  8457. "in": "query",
  8458. "schema": {
  8459. "type": "string"
  8460. },
  8461. "required": false
  8462. }
  8463. ],
  8464. "responses": {
  8465. "200": {
  8466. "description": "Prompt processed successfully",
  8467. "content": {
  8468. "application/json": {
  8469. "schema": {
  8470. "type": "boolean",
  8471. "description": "Prompt processed successfully"
  8472. }
  8473. }
  8474. }
  8475. },
  8476. "400": {
  8477. "description": "BadRequest | InvalidRequestError",
  8478. "content": {
  8479. "application/json": {
  8480. "schema": {
  8481. "anyOf": [
  8482. {
  8483. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8484. },
  8485. {
  8486. "$ref": "#/components/schemas/InvalidRequestError"
  8487. }
  8488. ]
  8489. }
  8490. }
  8491. }
  8492. }
  8493. },
  8494. "description": "Append prompt to the TUI.",
  8495. "summary": "Append TUI prompt",
  8496. "requestBody": {
  8497. "content": {
  8498. "application/json": {
  8499. "schema": {
  8500. "type": "object",
  8501. "properties": {
  8502. "text": {
  8503. "type": "string"
  8504. }
  8505. },
  8506. "required": ["text"],
  8507. "additionalProperties": false
  8508. }
  8509. }
  8510. }
  8511. },
  8512. "x-codeSamples": [
  8513. {
  8514. "lang": "js",
  8515. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  8516. }
  8517. ]
  8518. }
  8519. },
  8520. "/tui/open-help": {
  8521. "post": {
  8522. "tags": ["tui"],
  8523. "operationId": "tui.openHelp",
  8524. "parameters": [
  8525. {
  8526. "name": "directory",
  8527. "in": "query",
  8528. "schema": {
  8529. "type": "string"
  8530. },
  8531. "required": false
  8532. },
  8533. {
  8534. "name": "workspace",
  8535. "in": "query",
  8536. "schema": {
  8537. "type": "string"
  8538. },
  8539. "required": false
  8540. }
  8541. ],
  8542. "responses": {
  8543. "200": {
  8544. "description": "Help dialog opened successfully",
  8545. "content": {
  8546. "application/json": {
  8547. "schema": {
  8548. "type": "boolean",
  8549. "description": "Help dialog opened successfully"
  8550. }
  8551. }
  8552. }
  8553. },
  8554. "400": {
  8555. "description": "Bad request",
  8556. "content": {
  8557. "application/json": {
  8558. "schema": {
  8559. "$ref": "#/components/schemas/BadRequestError"
  8560. }
  8561. }
  8562. }
  8563. }
  8564. },
  8565. "description": "Open the help dialog in the TUI to display user assistance information.",
  8566. "summary": "Open help dialog",
  8567. "x-codeSamples": [
  8568. {
  8569. "lang": "js",
  8570. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  8571. }
  8572. ]
  8573. }
  8574. },
  8575. "/tui/open-sessions": {
  8576. "post": {
  8577. "tags": ["tui"],
  8578. "operationId": "tui.openSessions",
  8579. "parameters": [
  8580. {
  8581. "name": "directory",
  8582. "in": "query",
  8583. "schema": {
  8584. "type": "string"
  8585. },
  8586. "required": false
  8587. },
  8588. {
  8589. "name": "workspace",
  8590. "in": "query",
  8591. "schema": {
  8592. "type": "string"
  8593. },
  8594. "required": false
  8595. }
  8596. ],
  8597. "responses": {
  8598. "200": {
  8599. "description": "Session dialog opened successfully",
  8600. "content": {
  8601. "application/json": {
  8602. "schema": {
  8603. "type": "boolean",
  8604. "description": "Session dialog opened successfully"
  8605. }
  8606. }
  8607. }
  8608. },
  8609. "400": {
  8610. "description": "Bad request",
  8611. "content": {
  8612. "application/json": {
  8613. "schema": {
  8614. "$ref": "#/components/schemas/BadRequestError"
  8615. }
  8616. }
  8617. }
  8618. }
  8619. },
  8620. "description": "Open the session dialog.",
  8621. "summary": "Open sessions dialog",
  8622. "x-codeSamples": [
  8623. {
  8624. "lang": "js",
  8625. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  8626. }
  8627. ]
  8628. }
  8629. },
  8630. "/tui/open-themes": {
  8631. "post": {
  8632. "tags": ["tui"],
  8633. "operationId": "tui.openThemes",
  8634. "parameters": [
  8635. {
  8636. "name": "directory",
  8637. "in": "query",
  8638. "schema": {
  8639. "type": "string"
  8640. },
  8641. "required": false
  8642. },
  8643. {
  8644. "name": "workspace",
  8645. "in": "query",
  8646. "schema": {
  8647. "type": "string"
  8648. },
  8649. "required": false
  8650. }
  8651. ],
  8652. "responses": {
  8653. "200": {
  8654. "description": "Theme dialog opened successfully",
  8655. "content": {
  8656. "application/json": {
  8657. "schema": {
  8658. "type": "boolean",
  8659. "description": "Theme dialog opened successfully"
  8660. }
  8661. }
  8662. }
  8663. },
  8664. "400": {
  8665. "description": "Bad request",
  8666. "content": {
  8667. "application/json": {
  8668. "schema": {
  8669. "$ref": "#/components/schemas/BadRequestError"
  8670. }
  8671. }
  8672. }
  8673. }
  8674. },
  8675. "description": "Open the theme dialog.",
  8676. "summary": "Open themes dialog",
  8677. "x-codeSamples": [
  8678. {
  8679. "lang": "js",
  8680. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  8681. }
  8682. ]
  8683. }
  8684. },
  8685. "/tui/open-models": {
  8686. "post": {
  8687. "tags": ["tui"],
  8688. "operationId": "tui.openModels",
  8689. "parameters": [
  8690. {
  8691. "name": "directory",
  8692. "in": "query",
  8693. "schema": {
  8694. "type": "string"
  8695. },
  8696. "required": false
  8697. },
  8698. {
  8699. "name": "workspace",
  8700. "in": "query",
  8701. "schema": {
  8702. "type": "string"
  8703. },
  8704. "required": false
  8705. }
  8706. ],
  8707. "responses": {
  8708. "200": {
  8709. "description": "Model dialog opened successfully",
  8710. "content": {
  8711. "application/json": {
  8712. "schema": {
  8713. "type": "boolean",
  8714. "description": "Model dialog opened successfully"
  8715. }
  8716. }
  8717. }
  8718. },
  8719. "400": {
  8720. "description": "Bad request",
  8721. "content": {
  8722. "application/json": {
  8723. "schema": {
  8724. "$ref": "#/components/schemas/BadRequestError"
  8725. }
  8726. }
  8727. }
  8728. }
  8729. },
  8730. "description": "Open the model dialog.",
  8731. "summary": "Open models dialog",
  8732. "x-codeSamples": [
  8733. {
  8734. "lang": "js",
  8735. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  8736. }
  8737. ]
  8738. }
  8739. },
  8740. "/tui/submit-prompt": {
  8741. "post": {
  8742. "tags": ["tui"],
  8743. "operationId": "tui.submitPrompt",
  8744. "parameters": [
  8745. {
  8746. "name": "directory",
  8747. "in": "query",
  8748. "schema": {
  8749. "type": "string"
  8750. },
  8751. "required": false
  8752. },
  8753. {
  8754. "name": "workspace",
  8755. "in": "query",
  8756. "schema": {
  8757. "type": "string"
  8758. },
  8759. "required": false
  8760. }
  8761. ],
  8762. "responses": {
  8763. "200": {
  8764. "description": "Prompt submitted successfully",
  8765. "content": {
  8766. "application/json": {
  8767. "schema": {
  8768. "type": "boolean",
  8769. "description": "Prompt submitted successfully"
  8770. }
  8771. }
  8772. }
  8773. },
  8774. "400": {
  8775. "description": "Bad request",
  8776. "content": {
  8777. "application/json": {
  8778. "schema": {
  8779. "$ref": "#/components/schemas/BadRequestError"
  8780. }
  8781. }
  8782. }
  8783. }
  8784. },
  8785. "description": "Submit the prompt.",
  8786. "summary": "Submit TUI prompt",
  8787. "x-codeSamples": [
  8788. {
  8789. "lang": "js",
  8790. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  8791. }
  8792. ]
  8793. }
  8794. },
  8795. "/tui/clear-prompt": {
  8796. "post": {
  8797. "tags": ["tui"],
  8798. "operationId": "tui.clearPrompt",
  8799. "parameters": [
  8800. {
  8801. "name": "directory",
  8802. "in": "query",
  8803. "schema": {
  8804. "type": "string"
  8805. },
  8806. "required": false
  8807. },
  8808. {
  8809. "name": "workspace",
  8810. "in": "query",
  8811. "schema": {
  8812. "type": "string"
  8813. },
  8814. "required": false
  8815. }
  8816. ],
  8817. "responses": {
  8818. "200": {
  8819. "description": "Prompt cleared successfully",
  8820. "content": {
  8821. "application/json": {
  8822. "schema": {
  8823. "type": "boolean",
  8824. "description": "Prompt cleared successfully"
  8825. }
  8826. }
  8827. }
  8828. },
  8829. "400": {
  8830. "description": "Bad request",
  8831. "content": {
  8832. "application/json": {
  8833. "schema": {
  8834. "$ref": "#/components/schemas/BadRequestError"
  8835. }
  8836. }
  8837. }
  8838. }
  8839. },
  8840. "description": "Clear the prompt.",
  8841. "summary": "Clear TUI prompt",
  8842. "x-codeSamples": [
  8843. {
  8844. "lang": "js",
  8845. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  8846. }
  8847. ]
  8848. }
  8849. },
  8850. "/tui/execute-command": {
  8851. "post": {
  8852. "tags": ["tui"],
  8853. "operationId": "tui.executeCommand",
  8854. "parameters": [
  8855. {
  8856. "name": "directory",
  8857. "in": "query",
  8858. "schema": {
  8859. "type": "string"
  8860. },
  8861. "required": false
  8862. },
  8863. {
  8864. "name": "workspace",
  8865. "in": "query",
  8866. "schema": {
  8867. "type": "string"
  8868. },
  8869. "required": false
  8870. }
  8871. ],
  8872. "responses": {
  8873. "200": {
  8874. "description": "Command executed successfully",
  8875. "content": {
  8876. "application/json": {
  8877. "schema": {
  8878. "type": "boolean",
  8879. "description": "Command executed successfully"
  8880. }
  8881. }
  8882. }
  8883. },
  8884. "400": {
  8885. "description": "BadRequest | InvalidRequestError",
  8886. "content": {
  8887. "application/json": {
  8888. "schema": {
  8889. "anyOf": [
  8890. {
  8891. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8892. },
  8893. {
  8894. "$ref": "#/components/schemas/InvalidRequestError"
  8895. }
  8896. ]
  8897. }
  8898. }
  8899. }
  8900. }
  8901. },
  8902. "description": "Execute a TUI command.",
  8903. "summary": "Execute TUI command",
  8904. "requestBody": {
  8905. "content": {
  8906. "application/json": {
  8907. "schema": {
  8908. "type": "object",
  8909. "properties": {
  8910. "command": {
  8911. "type": "string"
  8912. }
  8913. },
  8914. "required": ["command"],
  8915. "additionalProperties": false
  8916. }
  8917. }
  8918. }
  8919. },
  8920. "x-codeSamples": [
  8921. {
  8922. "lang": "js",
  8923. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  8924. }
  8925. ]
  8926. }
  8927. },
  8928. "/tui/show-toast": {
  8929. "post": {
  8930. "tags": ["tui"],
  8931. "operationId": "tui.showToast",
  8932. "parameters": [
  8933. {
  8934. "name": "directory",
  8935. "in": "query",
  8936. "schema": {
  8937. "type": "string"
  8938. },
  8939. "required": false
  8940. },
  8941. {
  8942. "name": "workspace",
  8943. "in": "query",
  8944. "schema": {
  8945. "type": "string"
  8946. },
  8947. "required": false
  8948. }
  8949. ],
  8950. "responses": {
  8951. "200": {
  8952. "description": "Toast notification shown successfully",
  8953. "content": {
  8954. "application/json": {
  8955. "schema": {
  8956. "type": "boolean",
  8957. "description": "Toast notification shown successfully"
  8958. }
  8959. }
  8960. }
  8961. },
  8962. "400": {
  8963. "description": "Bad request",
  8964. "content": {
  8965. "application/json": {
  8966. "schema": {
  8967. "$ref": "#/components/schemas/BadRequestError"
  8968. }
  8969. }
  8970. }
  8971. }
  8972. },
  8973. "description": "Show a toast notification in the TUI.",
  8974. "summary": "Show TUI toast",
  8975. "requestBody": {
  8976. "content": {
  8977. "application/json": {
  8978. "schema": {
  8979. "type": "object",
  8980. "properties": {
  8981. "title": {
  8982. "type": "string"
  8983. },
  8984. "message": {
  8985. "type": "string"
  8986. },
  8987. "variant": {
  8988. "type": "string",
  8989. "enum": ["info", "success", "warning", "error"]
  8990. },
  8991. "duration": {
  8992. "type": "integer",
  8993. "exclusiveMinimum": 0
  8994. }
  8995. },
  8996. "required": ["message", "variant"],
  8997. "additionalProperties": false
  8998. }
  8999. }
  9000. }
  9001. },
  9002. "x-codeSamples": [
  9003. {
  9004. "lang": "js",
  9005. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  9006. }
  9007. ]
  9008. }
  9009. },
  9010. "/tui/publish": {
  9011. "post": {
  9012. "tags": ["tui"],
  9013. "operationId": "tui.publish",
  9014. "parameters": [
  9015. {
  9016. "name": "directory",
  9017. "in": "query",
  9018. "schema": {
  9019. "type": "string"
  9020. },
  9021. "required": false
  9022. },
  9023. {
  9024. "name": "workspace",
  9025. "in": "query",
  9026. "schema": {
  9027. "type": "string"
  9028. },
  9029. "required": false
  9030. }
  9031. ],
  9032. "responses": {
  9033. "200": {
  9034. "description": "Event published successfully",
  9035. "content": {
  9036. "application/json": {
  9037. "schema": {
  9038. "type": "boolean",
  9039. "description": "Event published successfully"
  9040. }
  9041. }
  9042. }
  9043. },
  9044. "400": {
  9045. "description": "BadRequest | InvalidRequestError",
  9046. "content": {
  9047. "application/json": {
  9048. "schema": {
  9049. "anyOf": [
  9050. {
  9051. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9052. },
  9053. {
  9054. "$ref": "#/components/schemas/InvalidRequestError"
  9055. }
  9056. ]
  9057. }
  9058. }
  9059. }
  9060. }
  9061. },
  9062. "description": "Publish a TUI event.",
  9063. "summary": "Publish TUI event",
  9064. "requestBody": {
  9065. "content": {
  9066. "application/json": {
  9067. "schema": {
  9068. "anyOf": [
  9069. {
  9070. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9071. },
  9072. {
  9073. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9074. },
  9075. {
  9076. "$ref": "#/components/schemas/EventTuiToastShow"
  9077. },
  9078. {
  9079. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9080. }
  9081. ]
  9082. }
  9083. }
  9084. }
  9085. },
  9086. "x-codeSamples": [
  9087. {
  9088. "lang": "js",
  9089. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9090. }
  9091. ]
  9092. }
  9093. },
  9094. "/tui/select-session": {
  9095. "post": {
  9096. "tags": ["tui"],
  9097. "operationId": "tui.selectSession",
  9098. "parameters": [
  9099. {
  9100. "name": "directory",
  9101. "in": "query",
  9102. "schema": {
  9103. "type": "string"
  9104. },
  9105. "required": false
  9106. },
  9107. {
  9108. "name": "workspace",
  9109. "in": "query",
  9110. "schema": {
  9111. "type": "string"
  9112. },
  9113. "required": false
  9114. }
  9115. ],
  9116. "responses": {
  9117. "200": {
  9118. "description": "Session selected successfully",
  9119. "content": {
  9120. "application/json": {
  9121. "schema": {
  9122. "type": "boolean",
  9123. "description": "Session selected successfully"
  9124. }
  9125. }
  9126. }
  9127. },
  9128. "400": {
  9129. "description": "BadRequest | InvalidRequestError",
  9130. "content": {
  9131. "application/json": {
  9132. "schema": {
  9133. "anyOf": [
  9134. {
  9135. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9136. },
  9137. {
  9138. "$ref": "#/components/schemas/InvalidRequestError"
  9139. }
  9140. ]
  9141. }
  9142. }
  9143. }
  9144. },
  9145. "404": {
  9146. "description": "NotFoundError",
  9147. "content": {
  9148. "application/json": {
  9149. "schema": {
  9150. "$ref": "#/components/schemas/NotFoundError"
  9151. }
  9152. }
  9153. }
  9154. }
  9155. },
  9156. "description": "Navigate the TUI to display the specified session.",
  9157. "summary": "Select session",
  9158. "requestBody": {
  9159. "content": {
  9160. "application/json": {
  9161. "schema": {
  9162. "type": "object",
  9163. "properties": {
  9164. "sessionID": {
  9165. "type": "string",
  9166. "pattern": "^ses",
  9167. "description": "Session ID to navigate to"
  9168. }
  9169. },
  9170. "required": ["sessionID"],
  9171. "additionalProperties": false
  9172. }
  9173. }
  9174. }
  9175. },
  9176. "x-codeSamples": [
  9177. {
  9178. "lang": "js",
  9179. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9180. }
  9181. ]
  9182. }
  9183. },
  9184. "/tui/control/next": {
  9185. "get": {
  9186. "tags": ["tui"],
  9187. "operationId": "tui.control.next",
  9188. "parameters": [
  9189. {
  9190. "name": "directory",
  9191. "in": "query",
  9192. "schema": {
  9193. "type": "string"
  9194. },
  9195. "required": false
  9196. },
  9197. {
  9198. "name": "workspace",
  9199. "in": "query",
  9200. "schema": {
  9201. "type": "string"
  9202. },
  9203. "required": false
  9204. }
  9205. ],
  9206. "responses": {
  9207. "200": {
  9208. "description": "Next TUI request",
  9209. "content": {
  9210. "application/json": {
  9211. "schema": {
  9212. "type": "object",
  9213. "properties": {
  9214. "path": {
  9215. "type": "string"
  9216. },
  9217. "body": {}
  9218. },
  9219. "required": ["path", "body"],
  9220. "additionalProperties": false,
  9221. "description": "Next TUI request"
  9222. }
  9223. }
  9224. }
  9225. },
  9226. "400": {
  9227. "description": "Bad request",
  9228. "content": {
  9229. "application/json": {
  9230. "schema": {
  9231. "$ref": "#/components/schemas/BadRequestError"
  9232. }
  9233. }
  9234. }
  9235. }
  9236. },
  9237. "description": "Retrieve the next TUI request from the queue for processing.",
  9238. "summary": "Get next TUI request",
  9239. "x-codeSamples": [
  9240. {
  9241. "lang": "js",
  9242. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9243. }
  9244. ]
  9245. }
  9246. },
  9247. "/tui/control/response": {
  9248. "post": {
  9249. "tags": ["tui"],
  9250. "operationId": "tui.control.response",
  9251. "parameters": [
  9252. {
  9253. "name": "directory",
  9254. "in": "query",
  9255. "schema": {
  9256. "type": "string"
  9257. },
  9258. "required": false
  9259. },
  9260. {
  9261. "name": "workspace",
  9262. "in": "query",
  9263. "schema": {
  9264. "type": "string"
  9265. },
  9266. "required": false
  9267. }
  9268. ],
  9269. "responses": {
  9270. "200": {
  9271. "description": "Response submitted successfully",
  9272. "content": {
  9273. "application/json": {
  9274. "schema": {
  9275. "type": "boolean",
  9276. "description": "Response submitted successfully"
  9277. }
  9278. }
  9279. }
  9280. },
  9281. "400": {
  9282. "description": "Bad request",
  9283. "content": {
  9284. "application/json": {
  9285. "schema": {
  9286. "$ref": "#/components/schemas/BadRequestError"
  9287. }
  9288. }
  9289. }
  9290. }
  9291. },
  9292. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9293. "summary": "Submit TUI response",
  9294. "requestBody": {
  9295. "content": {
  9296. "application/json": {
  9297. "schema": {}
  9298. }
  9299. }
  9300. },
  9301. "x-codeSamples": [
  9302. {
  9303. "lang": "js",
  9304. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9305. }
  9306. ]
  9307. }
  9308. },
  9309. "/experimental/workspace/adapter": {
  9310. "get": {
  9311. "tags": ["workspace"],
  9312. "operationId": "experimental.workspace.adapter.list",
  9313. "parameters": [
  9314. {
  9315. "name": "directory",
  9316. "in": "query",
  9317. "schema": {
  9318. "type": "string"
  9319. },
  9320. "required": false
  9321. },
  9322. {
  9323. "name": "workspace",
  9324. "in": "query",
  9325. "schema": {
  9326. "type": "string"
  9327. },
  9328. "required": false
  9329. }
  9330. ],
  9331. "responses": {
  9332. "200": {
  9333. "description": "Workspace adapters",
  9334. "content": {
  9335. "application/json": {
  9336. "schema": {
  9337. "type": "array",
  9338. "items": {
  9339. "type": "object",
  9340. "properties": {
  9341. "type": {
  9342. "type": "string"
  9343. },
  9344. "name": {
  9345. "type": "string"
  9346. },
  9347. "description": {
  9348. "type": "string"
  9349. }
  9350. },
  9351. "required": ["type", "name", "description"],
  9352. "additionalProperties": false
  9353. },
  9354. "description": "Workspace adapters"
  9355. }
  9356. }
  9357. }
  9358. },
  9359. "400": {
  9360. "description": "Bad request",
  9361. "content": {
  9362. "application/json": {
  9363. "schema": {
  9364. "$ref": "#/components/schemas/BadRequestError"
  9365. }
  9366. }
  9367. }
  9368. }
  9369. },
  9370. "description": "List all available workspace adapters for the current project.",
  9371. "summary": "List workspace adapters",
  9372. "x-codeSamples": [
  9373. {
  9374. "lang": "js",
  9375. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9376. }
  9377. ]
  9378. }
  9379. },
  9380. "/experimental/workspace": {
  9381. "get": {
  9382. "tags": ["workspace"],
  9383. "operationId": "experimental.workspace.list",
  9384. "parameters": [
  9385. {
  9386. "name": "directory",
  9387. "in": "query",
  9388. "schema": {
  9389. "type": "string"
  9390. },
  9391. "required": false
  9392. },
  9393. {
  9394. "name": "workspace",
  9395. "in": "query",
  9396. "schema": {
  9397. "type": "string"
  9398. },
  9399. "required": false
  9400. }
  9401. ],
  9402. "responses": {
  9403. "200": {
  9404. "description": "Workspaces",
  9405. "content": {
  9406. "application/json": {
  9407. "schema": {
  9408. "type": "array",
  9409. "items": {
  9410. "$ref": "#/components/schemas/Workspace"
  9411. },
  9412. "description": "Workspaces"
  9413. }
  9414. }
  9415. }
  9416. },
  9417. "400": {
  9418. "description": "Bad request",
  9419. "content": {
  9420. "application/json": {
  9421. "schema": {
  9422. "$ref": "#/components/schemas/BadRequestError"
  9423. }
  9424. }
  9425. }
  9426. }
  9427. },
  9428. "description": "List all workspaces.",
  9429. "summary": "List workspaces",
  9430. "x-codeSamples": [
  9431. {
  9432. "lang": "js",
  9433. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9434. }
  9435. ]
  9436. },
  9437. "post": {
  9438. "tags": ["workspace"],
  9439. "operationId": "experimental.workspace.create",
  9440. "parameters": [
  9441. {
  9442. "name": "directory",
  9443. "in": "query",
  9444. "schema": {
  9445. "type": "string"
  9446. },
  9447. "required": false
  9448. },
  9449. {
  9450. "name": "workspace",
  9451. "in": "query",
  9452. "schema": {
  9453. "type": "string"
  9454. },
  9455. "required": false
  9456. }
  9457. ],
  9458. "responses": {
  9459. "200": {
  9460. "description": "Workspace created",
  9461. "content": {
  9462. "application/json": {
  9463. "schema": {
  9464. "$ref": "#/components/schemas/Workspace"
  9465. }
  9466. }
  9467. }
  9468. },
  9469. "400": {
  9470. "description": "WorkspaceCreateError | BadRequest | InvalidRequestError",
  9471. "content": {
  9472. "application/json": {
  9473. "schema": {
  9474. "anyOf": [
  9475. {
  9476. "$ref": "#/components/schemas/WorkspaceCreateError"
  9477. },
  9478. {
  9479. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9480. },
  9481. {
  9482. "$ref": "#/components/schemas/InvalidRequestError"
  9483. }
  9484. ]
  9485. }
  9486. }
  9487. }
  9488. }
  9489. },
  9490. "description": "Create a workspace for the current project.",
  9491. "summary": "Create workspace",
  9492. "requestBody": {
  9493. "content": {
  9494. "application/json": {
  9495. "schema": {
  9496. "type": "object",
  9497. "properties": {
  9498. "id": {
  9499. "type": "string",
  9500. "pattern": "^wrk"
  9501. },
  9502. "type": {
  9503. "type": "string"
  9504. },
  9505. "branch": {
  9506. "anyOf": [
  9507. {
  9508. "type": "string"
  9509. },
  9510. {
  9511. "type": "null"
  9512. }
  9513. ]
  9514. },
  9515. "extra": {
  9516. "anyOf": [
  9517. {},
  9518. {
  9519. "type": "null"
  9520. }
  9521. ]
  9522. }
  9523. },
  9524. "required": ["type"],
  9525. "additionalProperties": false
  9526. }
  9527. }
  9528. }
  9529. },
  9530. "x-codeSamples": [
  9531. {
  9532. "lang": "js",
  9533. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  9534. }
  9535. ]
  9536. }
  9537. },
  9538. "/experimental/workspace/sync-list": {
  9539. "post": {
  9540. "tags": ["workspace"],
  9541. "operationId": "experimental.workspace.syncList",
  9542. "parameters": [
  9543. {
  9544. "name": "directory",
  9545. "in": "query",
  9546. "schema": {
  9547. "type": "string"
  9548. },
  9549. "required": false
  9550. },
  9551. {
  9552. "name": "workspace",
  9553. "in": "query",
  9554. "schema": {
  9555. "type": "string"
  9556. },
  9557. "required": false
  9558. }
  9559. ],
  9560. "responses": {
  9561. "204": {
  9562. "description": "Workspace list synced"
  9563. },
  9564. "400": {
  9565. "description": "Bad request",
  9566. "content": {
  9567. "application/json": {
  9568. "schema": {
  9569. "$ref": "#/components/schemas/BadRequestError"
  9570. }
  9571. }
  9572. }
  9573. }
  9574. },
  9575. "description": "Register missing workspaces returned by workspace adapters.",
  9576. "summary": "Sync workspace list",
  9577. "x-codeSamples": [
  9578. {
  9579. "lang": "js",
  9580. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  9581. }
  9582. ]
  9583. }
  9584. },
  9585. "/experimental/workspace/status": {
  9586. "get": {
  9587. "tags": ["workspace"],
  9588. "operationId": "experimental.workspace.status",
  9589. "parameters": [
  9590. {
  9591. "name": "directory",
  9592. "in": "query",
  9593. "schema": {
  9594. "type": "string"
  9595. },
  9596. "required": false
  9597. },
  9598. {
  9599. "name": "workspace",
  9600. "in": "query",
  9601. "schema": {
  9602. "type": "string"
  9603. },
  9604. "required": false
  9605. }
  9606. ],
  9607. "responses": {
  9608. "200": {
  9609. "description": "Workspace status",
  9610. "content": {
  9611. "application/json": {
  9612. "schema": {
  9613. "type": "array",
  9614. "items": {
  9615. "type": "object",
  9616. "properties": {
  9617. "workspaceID": {
  9618. "type": "string",
  9619. "pattern": "^wrk"
  9620. },
  9621. "status": {
  9622. "type": "string",
  9623. "enum": ["connected", "connecting", "disconnected", "error"]
  9624. }
  9625. },
  9626. "required": ["workspaceID", "status"],
  9627. "additionalProperties": false
  9628. },
  9629. "description": "Workspace status"
  9630. }
  9631. }
  9632. }
  9633. },
  9634. "400": {
  9635. "description": "Bad request",
  9636. "content": {
  9637. "application/json": {
  9638. "schema": {
  9639. "$ref": "#/components/schemas/BadRequestError"
  9640. }
  9641. }
  9642. }
  9643. }
  9644. },
  9645. "description": "Get connection status for workspaces in the current project.",
  9646. "summary": "Workspace status",
  9647. "x-codeSamples": [
  9648. {
  9649. "lang": "js",
  9650. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  9651. }
  9652. ]
  9653. }
  9654. },
  9655. "/experimental/workspace/{id}": {
  9656. "delete": {
  9657. "tags": ["workspace"],
  9658. "operationId": "experimental.workspace.remove",
  9659. "parameters": [
  9660. {
  9661. "name": "id",
  9662. "in": "path",
  9663. "schema": {
  9664. "type": "string",
  9665. "pattern": "^wrk"
  9666. },
  9667. "required": true
  9668. },
  9669. {
  9670. "name": "directory",
  9671. "in": "query",
  9672. "schema": {
  9673. "type": "string"
  9674. },
  9675. "required": false
  9676. },
  9677. {
  9678. "name": "workspace",
  9679. "in": "query",
  9680. "schema": {
  9681. "type": "string"
  9682. },
  9683. "required": false
  9684. }
  9685. ],
  9686. "responses": {
  9687. "200": {
  9688. "description": "Workspace removed",
  9689. "content": {
  9690. "application/json": {
  9691. "schema": {
  9692. "$ref": "#/components/schemas/Workspace"
  9693. }
  9694. }
  9695. }
  9696. },
  9697. "400": {
  9698. "description": "BadRequest | InvalidRequestError",
  9699. "content": {
  9700. "application/json": {
  9701. "schema": {
  9702. "anyOf": [
  9703. {
  9704. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9705. },
  9706. {
  9707. "$ref": "#/components/schemas/InvalidRequestError"
  9708. }
  9709. ]
  9710. }
  9711. }
  9712. }
  9713. }
  9714. },
  9715. "description": "Remove an existing workspace.",
  9716. "summary": "Remove workspace",
  9717. "x-codeSamples": [
  9718. {
  9719. "lang": "js",
  9720. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  9721. }
  9722. ]
  9723. }
  9724. },
  9725. "/experimental/workspace/warp": {
  9726. "post": {
  9727. "tags": ["workspace"],
  9728. "operationId": "experimental.workspace.warp",
  9729. "parameters": [
  9730. {
  9731. "name": "directory",
  9732. "in": "query",
  9733. "schema": {
  9734. "type": "string"
  9735. },
  9736. "required": false
  9737. },
  9738. {
  9739. "name": "workspace",
  9740. "in": "query",
  9741. "schema": {
  9742. "type": "string"
  9743. },
  9744. "required": false
  9745. }
  9746. ],
  9747. "responses": {
  9748. "204": {
  9749. "description": "Session warped"
  9750. },
  9751. "400": {
  9752. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  9753. "content": {
  9754. "application/json": {
  9755. "schema": {
  9756. "anyOf": [
  9757. {
  9758. "$ref": "#/components/schemas/WorkspaceWarpError"
  9759. },
  9760. {
  9761. "$ref": "#/components/schemas/VcsApplyError"
  9762. },
  9763. {
  9764. "$ref": "#/components/schemas/InvalidRequestError"
  9765. }
  9766. ]
  9767. }
  9768. }
  9769. }
  9770. },
  9771. "404": {
  9772. "description": "NotFoundError",
  9773. "content": {
  9774. "application/json": {
  9775. "schema": {
  9776. "$ref": "#/components/schemas/NotFoundError"
  9777. }
  9778. }
  9779. }
  9780. }
  9781. },
  9782. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  9783. "summary": "Warp session into workspace",
  9784. "requestBody": {
  9785. "content": {
  9786. "application/json": {
  9787. "schema": {
  9788. "type": "object",
  9789. "properties": {
  9790. "id": {
  9791. "anyOf": [
  9792. {
  9793. "type": "string",
  9794. "pattern": "^wrk"
  9795. },
  9796. {
  9797. "type": "null"
  9798. }
  9799. ]
  9800. },
  9801. "sessionID": {
  9802. "type": "string",
  9803. "pattern": "^ses"
  9804. },
  9805. "copyChanges": {
  9806. "type": "boolean"
  9807. }
  9808. },
  9809. "required": ["id", "sessionID"],
  9810. "additionalProperties": false
  9811. }
  9812. }
  9813. }
  9814. },
  9815. "x-codeSamples": [
  9816. {
  9817. "lang": "js",
  9818. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  9819. }
  9820. ]
  9821. }
  9822. },
  9823. "/api/health": {
  9824. "get": {
  9825. "tags": ["opencode HttpApi"],
  9826. "operationId": "v2.health.get",
  9827. "parameters": [],
  9828. "security": [],
  9829. "responses": {
  9830. "200": {
  9831. "description": "Success",
  9832. "content": {
  9833. "application/json": {
  9834. "schema": {
  9835. "type": "object",
  9836. "properties": {
  9837. "healthy": {
  9838. "type": "boolean",
  9839. "enum": [true]
  9840. }
  9841. },
  9842. "required": ["healthy"],
  9843. "additionalProperties": false
  9844. }
  9845. }
  9846. }
  9847. },
  9848. "400": {
  9849. "description": "InvalidRequestError",
  9850. "content": {
  9851. "application/json": {
  9852. "schema": {
  9853. "$ref": "#/components/schemas/InvalidRequestError"
  9854. }
  9855. }
  9856. }
  9857. },
  9858. "401": {
  9859. "description": "UnauthorizedError",
  9860. "content": {
  9861. "application/json": {
  9862. "schema": {
  9863. "$ref": "#/components/schemas/UnauthorizedError"
  9864. }
  9865. }
  9866. }
  9867. }
  9868. },
  9869. "description": "Check whether the API server is ready to accept requests.",
  9870. "summary": "Check server health",
  9871. "x-codeSamples": [
  9872. {
  9873. "lang": "js",
  9874. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.health.get({\n ...\n})"
  9875. }
  9876. ]
  9877. }
  9878. },
  9879. "/api/location": {
  9880. "get": {
  9881. "tags": ["opencode HttpApi"],
  9882. "operationId": "v2.location.get",
  9883. "parameters": [
  9884. {
  9885. "name": "location",
  9886. "in": "query",
  9887. "schema": {
  9888. "type": "object",
  9889. "properties": {
  9890. "directory": {
  9891. "type": "string"
  9892. },
  9893. "workspace": {
  9894. "type": "string"
  9895. }
  9896. },
  9897. "additionalProperties": false
  9898. },
  9899. "required": false,
  9900. "style": "deepObject",
  9901. "explode": true
  9902. }
  9903. ],
  9904. "security": [],
  9905. "responses": {
  9906. "200": {
  9907. "description": "Location.Info",
  9908. "content": {
  9909. "application/json": {
  9910. "schema": {
  9911. "$ref": "#/components/schemas/LocationInfo"
  9912. }
  9913. }
  9914. }
  9915. },
  9916. "400": {
  9917. "description": "InvalidRequestError",
  9918. "content": {
  9919. "application/json": {
  9920. "schema": {
  9921. "$ref": "#/components/schemas/InvalidRequestError"
  9922. }
  9923. }
  9924. }
  9925. },
  9926. "401": {
  9927. "description": "UnauthorizedError",
  9928. "content": {
  9929. "application/json": {
  9930. "schema": {
  9931. "$ref": "#/components/schemas/UnauthorizedError"
  9932. }
  9933. }
  9934. }
  9935. }
  9936. },
  9937. "description": "Resolve the requested location or the server default location.",
  9938. "summary": "Get location",
  9939. "x-codeSamples": [
  9940. {
  9941. "lang": "js",
  9942. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.location.get({\n ...\n})"
  9943. }
  9944. ]
  9945. }
  9946. },
  9947. "/api/agent": {
  9948. "get": {
  9949. "tags": ["opencode HttpApi"],
  9950. "operationId": "v2.agent.list",
  9951. "parameters": [
  9952. {
  9953. "name": "location",
  9954. "in": "query",
  9955. "schema": {
  9956. "type": "object",
  9957. "properties": {
  9958. "directory": {
  9959. "type": "string"
  9960. },
  9961. "workspace": {
  9962. "type": "string"
  9963. }
  9964. },
  9965. "additionalProperties": false
  9966. },
  9967. "required": false,
  9968. "style": "deepObject",
  9969. "explode": true
  9970. }
  9971. ],
  9972. "security": [],
  9973. "responses": {
  9974. "200": {
  9975. "description": "Success",
  9976. "content": {
  9977. "application/json": {
  9978. "schema": {
  9979. "type": "object",
  9980. "properties": {
  9981. "location": {
  9982. "$ref": "#/components/schemas/LocationInfo"
  9983. },
  9984. "data": {
  9985. "type": "array",
  9986. "items": {
  9987. "$ref": "#/components/schemas/AgentV2Info"
  9988. }
  9989. }
  9990. },
  9991. "required": ["location", "data"],
  9992. "additionalProperties": false
  9993. }
  9994. }
  9995. }
  9996. },
  9997. "400": {
  9998. "description": "InvalidRequestError",
  9999. "content": {
  10000. "application/json": {
  10001. "schema": {
  10002. "$ref": "#/components/schemas/InvalidRequestError"
  10003. }
  10004. }
  10005. }
  10006. },
  10007. "401": {
  10008. "description": "UnauthorizedError",
  10009. "content": {
  10010. "application/json": {
  10011. "schema": {
  10012. "$ref": "#/components/schemas/UnauthorizedError"
  10013. }
  10014. }
  10015. }
  10016. }
  10017. },
  10018. "description": "Retrieve currently registered agents.",
  10019. "summary": "List agents",
  10020. "x-codeSamples": [
  10021. {
  10022. "lang": "js",
  10023. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.agent.list({\n ...\n})"
  10024. }
  10025. ]
  10026. }
  10027. },
  10028. "/api/session": {
  10029. "get": {
  10030. "tags": ["sessions"],
  10031. "operationId": "v2.session.list",
  10032. "parameters": [
  10033. {
  10034. "name": "workspace",
  10035. "in": "query",
  10036. "schema": {
  10037. "type": "string",
  10038. "pattern": "^wrk"
  10039. },
  10040. "required": false
  10041. },
  10042. {
  10043. "name": "limit",
  10044. "in": "query",
  10045. "schema": {
  10046. "type": "number"
  10047. },
  10048. "required": false
  10049. },
  10050. {
  10051. "name": "order",
  10052. "in": "query",
  10053. "schema": {
  10054. "type": "string",
  10055. "enum": ["asc", "desc"]
  10056. },
  10057. "required": false
  10058. },
  10059. {
  10060. "name": "search",
  10061. "in": "query",
  10062. "schema": {
  10063. "type": "string"
  10064. },
  10065. "required": false
  10066. },
  10067. {
  10068. "name": "directory",
  10069. "in": "query",
  10070. "schema": {
  10071. "type": "string"
  10072. },
  10073. "required": false
  10074. },
  10075. {
  10076. "name": "project",
  10077. "in": "query",
  10078. "schema": {
  10079. "type": "string"
  10080. },
  10081. "required": false
  10082. },
  10083. {
  10084. "name": "subpath",
  10085. "in": "query",
  10086. "schema": {
  10087. "type": "string"
  10088. },
  10089. "required": false
  10090. },
  10091. {
  10092. "name": "cursor",
  10093. "in": "query",
  10094. "schema": {
  10095. "type": "string",
  10096. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response."
  10097. },
  10098. "required": false
  10099. }
  10100. ],
  10101. "security": [],
  10102. "responses": {
  10103. "200": {
  10104. "description": "SessionsResponse",
  10105. "content": {
  10106. "application/json": {
  10107. "schema": {
  10108. "$ref": "#/components/schemas/SessionsResponse"
  10109. }
  10110. }
  10111. }
  10112. },
  10113. "400": {
  10114. "description": "InvalidCursorError | InvalidRequestError",
  10115. "content": {
  10116. "application/json": {
  10117. "schema": {
  10118. "anyOf": [
  10119. {
  10120. "$ref": "#/components/schemas/InvalidCursorError"
  10121. },
  10122. {
  10123. "$ref": "#/components/schemas/InvalidRequestError"
  10124. },
  10125. {
  10126. "$ref": "#/components/schemas/InvalidRequestError"
  10127. }
  10128. ]
  10129. }
  10130. }
  10131. }
  10132. },
  10133. "401": {
  10134. "description": "UnauthorizedError",
  10135. "content": {
  10136. "application/json": {
  10137. "schema": {
  10138. "$ref": "#/components/schemas/UnauthorizedError"
  10139. }
  10140. }
  10141. }
  10142. }
  10143. },
  10144. "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.",
  10145. "summary": "List sessions",
  10146. "x-codeSamples": [
  10147. {
  10148. "lang": "js",
  10149. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  10150. }
  10151. ]
  10152. },
  10153. "post": {
  10154. "tags": ["sessions"],
  10155. "operationId": "v2.session.create",
  10156. "parameters": [],
  10157. "security": [],
  10158. "responses": {
  10159. "200": {
  10160. "description": "Success",
  10161. "content": {
  10162. "application/json": {
  10163. "schema": {
  10164. "type": "object",
  10165. "properties": {
  10166. "data": {
  10167. "$ref": "#/components/schemas/SessionV2Info"
  10168. }
  10169. },
  10170. "required": ["data"],
  10171. "additionalProperties": false
  10172. }
  10173. }
  10174. }
  10175. },
  10176. "400": {
  10177. "description": "InvalidRequestError",
  10178. "content": {
  10179. "application/json": {
  10180. "schema": {
  10181. "$ref": "#/components/schemas/InvalidRequestError"
  10182. }
  10183. }
  10184. }
  10185. },
  10186. "401": {
  10187. "description": "UnauthorizedError",
  10188. "content": {
  10189. "application/json": {
  10190. "schema": {
  10191. "$ref": "#/components/schemas/UnauthorizedError"
  10192. }
  10193. }
  10194. }
  10195. }
  10196. },
  10197. "description": "Create a session at the requested location.",
  10198. "summary": "Create session",
  10199. "requestBody": {
  10200. "content": {
  10201. "application/json": {
  10202. "schema": {
  10203. "type": "object",
  10204. "properties": {
  10205. "id": {
  10206. "type": "string",
  10207. "pattern": "^ses"
  10208. },
  10209. "agent": {
  10210. "type": "string"
  10211. },
  10212. "model": {
  10213. "type": "object",
  10214. "properties": {
  10215. "id": {
  10216. "type": "string"
  10217. },
  10218. "providerID": {
  10219. "type": "string"
  10220. },
  10221. "variant": {
  10222. "type": "string"
  10223. }
  10224. },
  10225. "required": ["id", "providerID"],
  10226. "additionalProperties": false
  10227. },
  10228. "location": {
  10229. "$ref": "#/components/schemas/LocationRef"
  10230. }
  10231. },
  10232. "additionalProperties": false
  10233. }
  10234. }
  10235. },
  10236. "required": true
  10237. },
  10238. "x-codeSamples": [
  10239. {
  10240. "lang": "js",
  10241. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.create({\n ...\n})"
  10242. }
  10243. ]
  10244. }
  10245. },
  10246. "/api/session/{sessionID}": {
  10247. "get": {
  10248. "tags": ["sessions"],
  10249. "operationId": "v2.session.get",
  10250. "parameters": [
  10251. {
  10252. "name": "sessionID",
  10253. "in": "path",
  10254. "schema": {
  10255. "type": "string",
  10256. "pattern": "^ses"
  10257. },
  10258. "required": true
  10259. }
  10260. ],
  10261. "security": [],
  10262. "responses": {
  10263. "200": {
  10264. "description": "Success",
  10265. "content": {
  10266. "application/json": {
  10267. "schema": {
  10268. "type": "object",
  10269. "properties": {
  10270. "data": {
  10271. "$ref": "#/components/schemas/SessionV2Info"
  10272. }
  10273. },
  10274. "required": ["data"],
  10275. "additionalProperties": false
  10276. }
  10277. }
  10278. }
  10279. },
  10280. "400": {
  10281. "description": "InvalidRequestError",
  10282. "content": {
  10283. "application/json": {
  10284. "schema": {
  10285. "$ref": "#/components/schemas/InvalidRequestError"
  10286. }
  10287. }
  10288. }
  10289. },
  10290. "401": {
  10291. "description": "UnauthorizedError",
  10292. "content": {
  10293. "application/json": {
  10294. "schema": {
  10295. "$ref": "#/components/schemas/UnauthorizedError"
  10296. }
  10297. }
  10298. }
  10299. },
  10300. "404": {
  10301. "description": "SessionNotFoundError",
  10302. "content": {
  10303. "application/json": {
  10304. "schema": {
  10305. "anyOf": [
  10306. {
  10307. "$ref": "#/components/schemas/SessionNotFoundError"
  10308. },
  10309. {
  10310. "$ref": "#/components/schemas/SessionNotFoundError"
  10311. }
  10312. ]
  10313. }
  10314. }
  10315. }
  10316. }
  10317. },
  10318. "description": "Retrieve a session by ID.",
  10319. "summary": "Get session",
  10320. "x-codeSamples": [
  10321. {
  10322. "lang": "js",
  10323. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.get({\n ...\n})"
  10324. }
  10325. ]
  10326. }
  10327. },
  10328. "/api/session/{sessionID}/prompt": {
  10329. "post": {
  10330. "tags": ["sessions"],
  10331. "operationId": "v2.session.prompt",
  10332. "parameters": [
  10333. {
  10334. "name": "sessionID",
  10335. "in": "path",
  10336. "schema": {
  10337. "type": "string",
  10338. "pattern": "^ses"
  10339. },
  10340. "required": true
  10341. }
  10342. ],
  10343. "security": [],
  10344. "responses": {
  10345. "200": {
  10346. "description": "Success",
  10347. "content": {
  10348. "application/json": {
  10349. "schema": {
  10350. "type": "object",
  10351. "properties": {
  10352. "data": {
  10353. "$ref": "#/components/schemas/SessionInputAdmitted"
  10354. }
  10355. },
  10356. "required": ["data"],
  10357. "additionalProperties": false
  10358. }
  10359. }
  10360. }
  10361. },
  10362. "400": {
  10363. "description": "InvalidRequestError",
  10364. "content": {
  10365. "application/json": {
  10366. "schema": {
  10367. "$ref": "#/components/schemas/InvalidRequestError"
  10368. }
  10369. }
  10370. }
  10371. },
  10372. "401": {
  10373. "description": "UnauthorizedError",
  10374. "content": {
  10375. "application/json": {
  10376. "schema": {
  10377. "$ref": "#/components/schemas/UnauthorizedError"
  10378. }
  10379. }
  10380. }
  10381. },
  10382. "404": {
  10383. "description": "SessionNotFoundError",
  10384. "content": {
  10385. "application/json": {
  10386. "schema": {
  10387. "anyOf": [
  10388. {
  10389. "$ref": "#/components/schemas/SessionNotFoundError"
  10390. },
  10391. {
  10392. "$ref": "#/components/schemas/SessionNotFoundError"
  10393. }
  10394. ]
  10395. }
  10396. }
  10397. }
  10398. },
  10399. "409": {
  10400. "description": "ConflictError",
  10401. "content": {
  10402. "application/json": {
  10403. "schema": {
  10404. "$ref": "#/components/schemas/ConflictError"
  10405. }
  10406. }
  10407. }
  10408. }
  10409. },
  10410. "description": "Durably admit one session input and schedule agent-loop execution unless resume is false.",
  10411. "summary": "Send message",
  10412. "requestBody": {
  10413. "content": {
  10414. "application/json": {
  10415. "schema": {
  10416. "type": "object",
  10417. "properties": {
  10418. "id": {
  10419. "type": "string",
  10420. "pattern": "^msg_"
  10421. },
  10422. "prompt": {
  10423. "$ref": "#/components/schemas/Prompt"
  10424. },
  10425. "delivery": {
  10426. "type": "string",
  10427. "enum": ["steer", "queue"]
  10428. },
  10429. "resume": {
  10430. "type": "boolean"
  10431. }
  10432. },
  10433. "required": ["prompt"],
  10434. "additionalProperties": false
  10435. }
  10436. }
  10437. },
  10438. "required": true
  10439. },
  10440. "x-codeSamples": [
  10441. {
  10442. "lang": "js",
  10443. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  10444. }
  10445. ]
  10446. }
  10447. },
  10448. "/api/session/{sessionID}/compact": {
  10449. "post": {
  10450. "tags": ["sessions"],
  10451. "operationId": "v2.session.compact",
  10452. "parameters": [
  10453. {
  10454. "name": "sessionID",
  10455. "in": "path",
  10456. "schema": {
  10457. "type": "string",
  10458. "pattern": "^ses"
  10459. },
  10460. "required": true
  10461. }
  10462. ],
  10463. "security": [],
  10464. "responses": {
  10465. "204": {
  10466. "description": "<No Content>"
  10467. },
  10468. "400": {
  10469. "description": "InvalidRequestError",
  10470. "content": {
  10471. "application/json": {
  10472. "schema": {
  10473. "$ref": "#/components/schemas/InvalidRequestError"
  10474. }
  10475. }
  10476. }
  10477. },
  10478. "401": {
  10479. "description": "UnauthorizedError",
  10480. "content": {
  10481. "application/json": {
  10482. "schema": {
  10483. "$ref": "#/components/schemas/UnauthorizedError"
  10484. }
  10485. }
  10486. }
  10487. },
  10488. "404": {
  10489. "description": "SessionNotFoundError",
  10490. "content": {
  10491. "application/json": {
  10492. "schema": {
  10493. "anyOf": [
  10494. {
  10495. "$ref": "#/components/schemas/SessionNotFoundError"
  10496. },
  10497. {
  10498. "$ref": "#/components/schemas/SessionNotFoundError"
  10499. }
  10500. ]
  10501. }
  10502. }
  10503. }
  10504. },
  10505. "503": {
  10506. "description": "ServiceUnavailableError",
  10507. "content": {
  10508. "application/json": {
  10509. "schema": {
  10510. "$ref": "#/components/schemas/ServiceUnavailableError"
  10511. }
  10512. }
  10513. }
  10514. }
  10515. },
  10516. "description": "Compact a session conversation.",
  10517. "summary": "Compact session",
  10518. "x-codeSamples": [
  10519. {
  10520. "lang": "js",
  10521. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  10522. }
  10523. ]
  10524. }
  10525. },
  10526. "/api/session/{sessionID}/wait": {
  10527. "post": {
  10528. "tags": ["sessions"],
  10529. "operationId": "v2.session.wait",
  10530. "parameters": [
  10531. {
  10532. "name": "sessionID",
  10533. "in": "path",
  10534. "schema": {
  10535. "type": "string",
  10536. "pattern": "^ses"
  10537. },
  10538. "required": true
  10539. }
  10540. ],
  10541. "security": [],
  10542. "responses": {
  10543. "204": {
  10544. "description": "<No Content>"
  10545. },
  10546. "400": {
  10547. "description": "InvalidRequestError",
  10548. "content": {
  10549. "application/json": {
  10550. "schema": {
  10551. "$ref": "#/components/schemas/InvalidRequestError"
  10552. }
  10553. }
  10554. }
  10555. },
  10556. "401": {
  10557. "description": "UnauthorizedError",
  10558. "content": {
  10559. "application/json": {
  10560. "schema": {
  10561. "$ref": "#/components/schemas/UnauthorizedError"
  10562. }
  10563. }
  10564. }
  10565. },
  10566. "404": {
  10567. "description": "SessionNotFoundError",
  10568. "content": {
  10569. "application/json": {
  10570. "schema": {
  10571. "anyOf": [
  10572. {
  10573. "$ref": "#/components/schemas/SessionNotFoundError"
  10574. },
  10575. {
  10576. "$ref": "#/components/schemas/SessionNotFoundError"
  10577. }
  10578. ]
  10579. }
  10580. }
  10581. }
  10582. },
  10583. "503": {
  10584. "description": "ServiceUnavailableError",
  10585. "content": {
  10586. "application/json": {
  10587. "schema": {
  10588. "$ref": "#/components/schemas/ServiceUnavailableError"
  10589. }
  10590. }
  10591. }
  10592. }
  10593. },
  10594. "description": "Wait for a session agent loop to become idle.",
  10595. "summary": "Wait for session",
  10596. "x-codeSamples": [
  10597. {
  10598. "lang": "js",
  10599. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  10600. }
  10601. ]
  10602. }
  10603. },
  10604. "/api/session/{sessionID}/context": {
  10605. "get": {
  10606. "tags": ["sessions"],
  10607. "operationId": "v2.session.context",
  10608. "parameters": [
  10609. {
  10610. "name": "sessionID",
  10611. "in": "path",
  10612. "schema": {
  10613. "type": "string",
  10614. "pattern": "^ses"
  10615. },
  10616. "required": true
  10617. }
  10618. ],
  10619. "security": [],
  10620. "responses": {
  10621. "200": {
  10622. "description": "Success",
  10623. "content": {
  10624. "application/json": {
  10625. "schema": {
  10626. "type": "object",
  10627. "properties": {
  10628. "data": {
  10629. "type": "array",
  10630. "items": {
  10631. "$ref": "#/components/schemas/SessionMessage"
  10632. }
  10633. }
  10634. },
  10635. "required": ["data"],
  10636. "additionalProperties": false
  10637. }
  10638. }
  10639. }
  10640. },
  10641. "400": {
  10642. "description": "InvalidRequestError",
  10643. "content": {
  10644. "application/json": {
  10645. "schema": {
  10646. "$ref": "#/components/schemas/InvalidRequestError"
  10647. }
  10648. }
  10649. }
  10650. },
  10651. "401": {
  10652. "description": "UnauthorizedError",
  10653. "content": {
  10654. "application/json": {
  10655. "schema": {
  10656. "$ref": "#/components/schemas/UnauthorizedError"
  10657. }
  10658. }
  10659. }
  10660. },
  10661. "404": {
  10662. "description": "SessionNotFoundError",
  10663. "content": {
  10664. "application/json": {
  10665. "schema": {
  10666. "anyOf": [
  10667. {
  10668. "$ref": "#/components/schemas/SessionNotFoundError"
  10669. },
  10670. {
  10671. "$ref": "#/components/schemas/SessionNotFoundError"
  10672. }
  10673. ]
  10674. }
  10675. }
  10676. }
  10677. },
  10678. "500": {
  10679. "description": "UnknownError",
  10680. "content": {
  10681. "application/json": {
  10682. "schema": {
  10683. "$ref": "#/components/schemas/UnknownError1"
  10684. }
  10685. }
  10686. }
  10687. }
  10688. },
  10689. "description": "Retrieve the active context messages for a session (all messages after the last compaction).",
  10690. "summary": "Get session context",
  10691. "x-codeSamples": [
  10692. {
  10693. "lang": "js",
  10694. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  10695. }
  10696. ]
  10697. }
  10698. },
  10699. "/api/session/{sessionID}/message": {
  10700. "get": {
  10701. "tags": ["messages"],
  10702. "operationId": "v2.session.messages",
  10703. "parameters": [
  10704. {
  10705. "name": "sessionID",
  10706. "in": "path",
  10707. "schema": {
  10708. "type": "string",
  10709. "pattern": "^ses"
  10710. },
  10711. "required": true
  10712. },
  10713. {
  10714. "name": "limit",
  10715. "in": "query",
  10716. "schema": {
  10717. "type": "number"
  10718. },
  10719. "required": false
  10720. },
  10721. {
  10722. "name": "order",
  10723. "in": "query",
  10724. "schema": {
  10725. "type": "string",
  10726. "enum": ["asc", "desc"]
  10727. },
  10728. "required": false
  10729. },
  10730. {
  10731. "name": "cursor",
  10732. "in": "query",
  10733. "schema": {
  10734. "type": "string",
  10735. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  10736. },
  10737. "required": false
  10738. }
  10739. ],
  10740. "security": [],
  10741. "responses": {
  10742. "200": {
  10743. "description": "SessionMessagesResponse",
  10744. "content": {
  10745. "application/json": {
  10746. "schema": {
  10747. "$ref": "#/components/schemas/SessionMessagesResponse"
  10748. }
  10749. }
  10750. }
  10751. },
  10752. "400": {
  10753. "description": "InvalidCursorError | InvalidRequestError",
  10754. "content": {
  10755. "application/json": {
  10756. "schema": {
  10757. "anyOf": [
  10758. {
  10759. "$ref": "#/components/schemas/InvalidCursorError"
  10760. },
  10761. {
  10762. "$ref": "#/components/schemas/InvalidRequestError"
  10763. }
  10764. ]
  10765. }
  10766. }
  10767. }
  10768. },
  10769. "401": {
  10770. "description": "UnauthorizedError",
  10771. "content": {
  10772. "application/json": {
  10773. "schema": {
  10774. "$ref": "#/components/schemas/UnauthorizedError"
  10775. }
  10776. }
  10777. }
  10778. },
  10779. "404": {
  10780. "description": "SessionNotFoundError",
  10781. "content": {
  10782. "application/json": {
  10783. "schema": {
  10784. "anyOf": [
  10785. {
  10786. "$ref": "#/components/schemas/SessionNotFoundError"
  10787. },
  10788. {
  10789. "$ref": "#/components/schemas/SessionNotFoundError"
  10790. }
  10791. ]
  10792. }
  10793. }
  10794. }
  10795. },
  10796. "500": {
  10797. "description": "UnknownError",
  10798. "content": {
  10799. "application/json": {
  10800. "schema": {
  10801. "$ref": "#/components/schemas/UnknownError1"
  10802. }
  10803. }
  10804. }
  10805. }
  10806. },
  10807. "description": "Retrieve projected messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.",
  10808. "summary": "Get session messages",
  10809. "x-codeSamples": [
  10810. {
  10811. "lang": "js",
  10812. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  10813. }
  10814. ]
  10815. }
  10816. },
  10817. "/api/model": {
  10818. "get": {
  10819. "tags": ["models"],
  10820. "operationId": "v2.model.list",
  10821. "parameters": [
  10822. {
  10823. "name": "location",
  10824. "in": "query",
  10825. "schema": {
  10826. "type": "object",
  10827. "properties": {
  10828. "directory": {
  10829. "type": "string"
  10830. },
  10831. "workspace": {
  10832. "type": "string"
  10833. }
  10834. },
  10835. "additionalProperties": false
  10836. },
  10837. "required": false,
  10838. "style": "deepObject",
  10839. "explode": true
  10840. }
  10841. ],
  10842. "security": [],
  10843. "responses": {
  10844. "200": {
  10845. "description": "Success",
  10846. "content": {
  10847. "application/json": {
  10848. "schema": {
  10849. "type": "object",
  10850. "properties": {
  10851. "location": {
  10852. "$ref": "#/components/schemas/LocationInfo"
  10853. },
  10854. "data": {
  10855. "type": "array",
  10856. "items": {
  10857. "$ref": "#/components/schemas/ModelV2Info"
  10858. }
  10859. }
  10860. },
  10861. "required": ["location", "data"],
  10862. "additionalProperties": false
  10863. }
  10864. }
  10865. }
  10866. },
  10867. "400": {
  10868. "description": "InvalidRequestError",
  10869. "content": {
  10870. "application/json": {
  10871. "schema": {
  10872. "$ref": "#/components/schemas/InvalidRequestError"
  10873. }
  10874. }
  10875. }
  10876. },
  10877. "401": {
  10878. "description": "UnauthorizedError",
  10879. "content": {
  10880. "application/json": {
  10881. "schema": {
  10882. "$ref": "#/components/schemas/UnauthorizedError"
  10883. }
  10884. }
  10885. }
  10886. },
  10887. "503": {
  10888. "description": "ServiceUnavailableError",
  10889. "content": {
  10890. "application/json": {
  10891. "schema": {
  10892. "$ref": "#/components/schemas/ServiceUnavailableError"
  10893. }
  10894. }
  10895. }
  10896. }
  10897. },
  10898. "description": "Retrieve available models ordered by release date.",
  10899. "summary": "List models",
  10900. "x-codeSamples": [
  10901. {
  10902. "lang": "js",
  10903. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  10904. }
  10905. ]
  10906. }
  10907. },
  10908. "/api/provider": {
  10909. "get": {
  10910. "tags": ["providers"],
  10911. "operationId": "v2.provider.list",
  10912. "parameters": [
  10913. {
  10914. "name": "location",
  10915. "in": "query",
  10916. "schema": {
  10917. "type": "object",
  10918. "properties": {
  10919. "directory": {
  10920. "type": "string"
  10921. },
  10922. "workspace": {
  10923. "type": "string"
  10924. }
  10925. },
  10926. "additionalProperties": false
  10927. },
  10928. "required": false,
  10929. "style": "deepObject",
  10930. "explode": true
  10931. }
  10932. ],
  10933. "security": [],
  10934. "responses": {
  10935. "200": {
  10936. "description": "Success",
  10937. "content": {
  10938. "application/json": {
  10939. "schema": {
  10940. "type": "object",
  10941. "properties": {
  10942. "location": {
  10943. "$ref": "#/components/schemas/LocationInfo"
  10944. },
  10945. "data": {
  10946. "type": "array",
  10947. "items": {
  10948. "$ref": "#/components/schemas/ProviderV2Info"
  10949. }
  10950. }
  10951. },
  10952. "required": ["location", "data"],
  10953. "additionalProperties": false
  10954. }
  10955. }
  10956. }
  10957. },
  10958. "400": {
  10959. "description": "InvalidRequestError",
  10960. "content": {
  10961. "application/json": {
  10962. "schema": {
  10963. "$ref": "#/components/schemas/InvalidRequestError"
  10964. }
  10965. }
  10966. }
  10967. },
  10968. "401": {
  10969. "description": "UnauthorizedError",
  10970. "content": {
  10971. "application/json": {
  10972. "schema": {
  10973. "$ref": "#/components/schemas/UnauthorizedError"
  10974. }
  10975. }
  10976. }
  10977. },
  10978. "503": {
  10979. "description": "ServiceUnavailableError",
  10980. "content": {
  10981. "application/json": {
  10982. "schema": {
  10983. "$ref": "#/components/schemas/ServiceUnavailableError"
  10984. }
  10985. }
  10986. }
  10987. }
  10988. },
  10989. "description": "Retrieve active AI providers so clients can show provider availability and configuration.",
  10990. "summary": "List providers",
  10991. "x-codeSamples": [
  10992. {
  10993. "lang": "js",
  10994. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  10995. }
  10996. ]
  10997. }
  10998. },
  10999. "/api/provider/{providerID}": {
  11000. "get": {
  11001. "tags": ["providers"],
  11002. "operationId": "v2.provider.get",
  11003. "parameters": [
  11004. {
  11005. "name": "providerID",
  11006. "in": "path",
  11007. "schema": {
  11008. "type": "string"
  11009. },
  11010. "required": true
  11011. },
  11012. {
  11013. "name": "location",
  11014. "in": "query",
  11015. "schema": {
  11016. "type": "object",
  11017. "properties": {
  11018. "directory": {
  11019. "type": "string"
  11020. },
  11021. "workspace": {
  11022. "type": "string"
  11023. }
  11024. },
  11025. "additionalProperties": false
  11026. },
  11027. "required": false,
  11028. "style": "deepObject",
  11029. "explode": true
  11030. }
  11031. ],
  11032. "security": [],
  11033. "responses": {
  11034. "200": {
  11035. "description": "Success",
  11036. "content": {
  11037. "application/json": {
  11038. "schema": {
  11039. "type": "object",
  11040. "properties": {
  11041. "location": {
  11042. "$ref": "#/components/schemas/LocationInfo"
  11043. },
  11044. "data": {
  11045. "$ref": "#/components/schemas/ProviderV2Info"
  11046. }
  11047. },
  11048. "required": ["location", "data"],
  11049. "additionalProperties": false
  11050. }
  11051. }
  11052. }
  11053. },
  11054. "400": {
  11055. "description": "InvalidRequestError",
  11056. "content": {
  11057. "application/json": {
  11058. "schema": {
  11059. "$ref": "#/components/schemas/InvalidRequestError"
  11060. }
  11061. }
  11062. }
  11063. },
  11064. "401": {
  11065. "description": "UnauthorizedError",
  11066. "content": {
  11067. "application/json": {
  11068. "schema": {
  11069. "$ref": "#/components/schemas/UnauthorizedError"
  11070. }
  11071. }
  11072. }
  11073. },
  11074. "404": {
  11075. "description": "ProviderNotFoundError",
  11076. "content": {
  11077. "application/json": {
  11078. "schema": {
  11079. "$ref": "#/components/schemas/ProviderNotFoundError"
  11080. }
  11081. }
  11082. }
  11083. },
  11084. "503": {
  11085. "description": "ServiceUnavailableError",
  11086. "content": {
  11087. "application/json": {
  11088. "schema": {
  11089. "$ref": "#/components/schemas/ServiceUnavailableError"
  11090. }
  11091. }
  11092. }
  11093. }
  11094. },
  11095. "description": "Retrieve a single AI provider so clients can inspect its availability and endpoint settings.",
  11096. "summary": "Get provider",
  11097. "x-codeSamples": [
  11098. {
  11099. "lang": "js",
  11100. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  11101. }
  11102. ]
  11103. }
  11104. },
  11105. "/api/integration": {
  11106. "get": {
  11107. "tags": ["integrations"],
  11108. "operationId": "v2.integration.list",
  11109. "parameters": [
  11110. {
  11111. "name": "location",
  11112. "in": "query",
  11113. "schema": {
  11114. "type": "object",
  11115. "properties": {
  11116. "directory": {
  11117. "type": "string"
  11118. },
  11119. "workspace": {
  11120. "type": "string"
  11121. }
  11122. },
  11123. "additionalProperties": false
  11124. },
  11125. "required": false,
  11126. "style": "deepObject",
  11127. "explode": true
  11128. }
  11129. ],
  11130. "security": [],
  11131. "responses": {
  11132. "200": {
  11133. "description": "Success",
  11134. "content": {
  11135. "application/json": {
  11136. "schema": {
  11137. "type": "object",
  11138. "properties": {
  11139. "location": {
  11140. "$ref": "#/components/schemas/LocationInfo"
  11141. },
  11142. "data": {
  11143. "type": "array",
  11144. "items": {
  11145. "$ref": "#/components/schemas/IntegrationInfo"
  11146. }
  11147. }
  11148. },
  11149. "required": ["location", "data"],
  11150. "additionalProperties": false
  11151. }
  11152. }
  11153. }
  11154. },
  11155. "400": {
  11156. "description": "InvalidRequestError",
  11157. "content": {
  11158. "application/json": {
  11159. "schema": {
  11160. "$ref": "#/components/schemas/InvalidRequestError"
  11161. }
  11162. }
  11163. }
  11164. },
  11165. "401": {
  11166. "description": "UnauthorizedError",
  11167. "content": {
  11168. "application/json": {
  11169. "schema": {
  11170. "$ref": "#/components/schemas/UnauthorizedError"
  11171. }
  11172. }
  11173. }
  11174. }
  11175. },
  11176. "description": "Retrieve available integrations and their authentication methods.",
  11177. "summary": "List integrations",
  11178. "x-codeSamples": [
  11179. {
  11180. "lang": "js",
  11181. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.list({\n ...\n})"
  11182. }
  11183. ]
  11184. }
  11185. },
  11186. "/api/integration/{integrationID}": {
  11187. "get": {
  11188. "tags": ["integrations"],
  11189. "operationId": "v2.integration.get",
  11190. "parameters": [
  11191. {
  11192. "name": "integrationID",
  11193. "in": "path",
  11194. "schema": {
  11195. "type": "string"
  11196. },
  11197. "required": true
  11198. },
  11199. {
  11200. "name": "location",
  11201. "in": "query",
  11202. "schema": {
  11203. "type": "object",
  11204. "properties": {
  11205. "directory": {
  11206. "type": "string"
  11207. },
  11208. "workspace": {
  11209. "type": "string"
  11210. }
  11211. },
  11212. "additionalProperties": false
  11213. },
  11214. "required": false,
  11215. "style": "deepObject",
  11216. "explode": true
  11217. }
  11218. ],
  11219. "security": [],
  11220. "responses": {
  11221. "200": {
  11222. "description": "Success",
  11223. "content": {
  11224. "application/json": {
  11225. "schema": {
  11226. "type": "object",
  11227. "properties": {
  11228. "location": {
  11229. "$ref": "#/components/schemas/LocationInfo"
  11230. },
  11231. "data": {
  11232. "$ref": "#/components/schemas/IntegrationInfo"
  11233. }
  11234. },
  11235. "required": ["location", "data"],
  11236. "additionalProperties": false
  11237. }
  11238. }
  11239. }
  11240. },
  11241. "400": {
  11242. "description": "InvalidRequestError",
  11243. "content": {
  11244. "application/json": {
  11245. "schema": {
  11246. "$ref": "#/components/schemas/InvalidRequestError"
  11247. }
  11248. }
  11249. }
  11250. },
  11251. "401": {
  11252. "description": "UnauthorizedError",
  11253. "content": {
  11254. "application/json": {
  11255. "schema": {
  11256. "$ref": "#/components/schemas/UnauthorizedError"
  11257. }
  11258. }
  11259. }
  11260. }
  11261. },
  11262. "description": "Retrieve one integration and its authentication methods.",
  11263. "summary": "Get integration",
  11264. "x-codeSamples": [
  11265. {
  11266. "lang": "js",
  11267. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.get({\n ...\n})"
  11268. }
  11269. ]
  11270. }
  11271. },
  11272. "/api/integration/{integrationID}/connect/key": {
  11273. "post": {
  11274. "tags": ["integrations"],
  11275. "operationId": "v2.integration.connect.key",
  11276. "parameters": [
  11277. {
  11278. "name": "integrationID",
  11279. "in": "path",
  11280. "schema": {
  11281. "type": "string"
  11282. },
  11283. "required": true
  11284. },
  11285. {
  11286. "name": "location",
  11287. "in": "query",
  11288. "schema": {
  11289. "type": "object",
  11290. "properties": {
  11291. "directory": {
  11292. "type": "string"
  11293. },
  11294. "workspace": {
  11295. "type": "string"
  11296. }
  11297. },
  11298. "additionalProperties": false
  11299. },
  11300. "required": false,
  11301. "style": "deepObject",
  11302. "explode": true
  11303. }
  11304. ],
  11305. "security": [],
  11306. "responses": {
  11307. "204": {
  11308. "description": "<No Content>"
  11309. },
  11310. "400": {
  11311. "description": "InvalidRequestError",
  11312. "content": {
  11313. "application/json": {
  11314. "schema": {
  11315. "anyOf": [
  11316. {
  11317. "$ref": "#/components/schemas/InvalidRequestError"
  11318. },
  11319. {
  11320. "$ref": "#/components/schemas/InvalidRequestError"
  11321. }
  11322. ]
  11323. }
  11324. }
  11325. }
  11326. },
  11327. "401": {
  11328. "description": "UnauthorizedError",
  11329. "content": {
  11330. "application/json": {
  11331. "schema": {
  11332. "$ref": "#/components/schemas/UnauthorizedError"
  11333. }
  11334. }
  11335. }
  11336. }
  11337. },
  11338. "description": "Run a key authentication method and store the resulting credential.",
  11339. "summary": "Connect with key",
  11340. "requestBody": {
  11341. "content": {
  11342. "application/json": {
  11343. "schema": {
  11344. "type": "object",
  11345. "properties": {
  11346. "key": {
  11347. "type": "string"
  11348. },
  11349. "label": {
  11350. "type": "string"
  11351. }
  11352. },
  11353. "required": ["key"],
  11354. "additionalProperties": false
  11355. }
  11356. }
  11357. },
  11358. "required": true
  11359. },
  11360. "x-codeSamples": [
  11361. {
  11362. "lang": "js",
  11363. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.key({\n ...\n})"
  11364. }
  11365. ]
  11366. }
  11367. },
  11368. "/api/integration/{integrationID}/connect/oauth": {
  11369. "post": {
  11370. "tags": ["integrations"],
  11371. "operationId": "v2.integration.connect.oauth",
  11372. "parameters": [
  11373. {
  11374. "name": "integrationID",
  11375. "in": "path",
  11376. "schema": {
  11377. "type": "string"
  11378. },
  11379. "required": true
  11380. },
  11381. {
  11382. "name": "location",
  11383. "in": "query",
  11384. "schema": {
  11385. "type": "object",
  11386. "properties": {
  11387. "directory": {
  11388. "type": "string"
  11389. },
  11390. "workspace": {
  11391. "type": "string"
  11392. }
  11393. },
  11394. "additionalProperties": false
  11395. },
  11396. "required": false,
  11397. "style": "deepObject",
  11398. "explode": true
  11399. }
  11400. ],
  11401. "security": [],
  11402. "responses": {
  11403. "200": {
  11404. "description": "Success",
  11405. "content": {
  11406. "application/json": {
  11407. "schema": {
  11408. "type": "object",
  11409. "properties": {
  11410. "location": {
  11411. "$ref": "#/components/schemas/LocationInfo"
  11412. },
  11413. "data": {
  11414. "$ref": "#/components/schemas/IntegrationAttempt"
  11415. }
  11416. },
  11417. "required": ["location", "data"],
  11418. "additionalProperties": false
  11419. }
  11420. }
  11421. }
  11422. },
  11423. "400": {
  11424. "description": "InvalidRequestError",
  11425. "content": {
  11426. "application/json": {
  11427. "schema": {
  11428. "anyOf": [
  11429. {
  11430. "$ref": "#/components/schemas/InvalidRequestError"
  11431. },
  11432. {
  11433. "$ref": "#/components/schemas/InvalidRequestError"
  11434. }
  11435. ]
  11436. }
  11437. }
  11438. }
  11439. },
  11440. "401": {
  11441. "description": "UnauthorizedError",
  11442. "content": {
  11443. "application/json": {
  11444. "schema": {
  11445. "$ref": "#/components/schemas/UnauthorizedError"
  11446. }
  11447. }
  11448. }
  11449. }
  11450. },
  11451. "description": "Start an OAuth attempt and return the authorization details.",
  11452. "summary": "Begin OAuth connection",
  11453. "requestBody": {
  11454. "content": {
  11455. "application/json": {
  11456. "schema": {
  11457. "type": "object",
  11458. "properties": {
  11459. "methodID": {
  11460. "type": "string"
  11461. },
  11462. "inputs": {
  11463. "type": "object",
  11464. "additionalProperties": {
  11465. "type": "string"
  11466. }
  11467. },
  11468. "label": {
  11469. "type": "string"
  11470. }
  11471. },
  11472. "required": ["methodID", "inputs"],
  11473. "additionalProperties": false
  11474. }
  11475. }
  11476. },
  11477. "required": true
  11478. },
  11479. "x-codeSamples": [
  11480. {
  11481. "lang": "js",
  11482. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.oauth({\n ...\n})"
  11483. }
  11484. ]
  11485. }
  11486. },
  11487. "/api/integration/attempt/{attemptID}": {
  11488. "get": {
  11489. "tags": ["integrations"],
  11490. "operationId": "v2.integration.attempt.status",
  11491. "parameters": [
  11492. {
  11493. "name": "attemptID",
  11494. "in": "path",
  11495. "schema": {
  11496. "type": "string"
  11497. },
  11498. "required": true
  11499. },
  11500. {
  11501. "name": "location",
  11502. "in": "query",
  11503. "schema": {
  11504. "type": "object",
  11505. "properties": {
  11506. "directory": {
  11507. "type": "string"
  11508. },
  11509. "workspace": {
  11510. "type": "string"
  11511. }
  11512. },
  11513. "additionalProperties": false
  11514. },
  11515. "required": false,
  11516. "style": "deepObject",
  11517. "explode": true
  11518. }
  11519. ],
  11520. "security": [],
  11521. "responses": {
  11522. "200": {
  11523. "description": "Success",
  11524. "content": {
  11525. "application/json": {
  11526. "schema": {
  11527. "type": "object",
  11528. "properties": {
  11529. "location": {
  11530. "$ref": "#/components/schemas/LocationInfo"
  11531. },
  11532. "data": {
  11533. "anyOf": [
  11534. {
  11535. "type": "object",
  11536. "properties": {
  11537. "status": {
  11538. "type": "string",
  11539. "enum": ["pending"]
  11540. },
  11541. "time": {
  11542. "type": "object",
  11543. "properties": {
  11544. "created": {
  11545. "anyOf": [
  11546. {
  11547. "type": "number"
  11548. },
  11549. {
  11550. "type": "string",
  11551. "enum": ["NaN"]
  11552. },
  11553. {
  11554. "type": "string",
  11555. "enum": ["Infinity"]
  11556. },
  11557. {
  11558. "type": "string",
  11559. "enum": ["-Infinity"]
  11560. },
  11561. {
  11562. "type": "string",
  11563. "enum": ["Infinity", "-Infinity", "NaN"]
  11564. }
  11565. ]
  11566. },
  11567. "expires": {
  11568. "anyOf": [
  11569. {
  11570. "type": "number"
  11571. },
  11572. {
  11573. "type": "string",
  11574. "enum": ["NaN"]
  11575. },
  11576. {
  11577. "type": "string",
  11578. "enum": ["Infinity"]
  11579. },
  11580. {
  11581. "type": "string",
  11582. "enum": ["-Infinity"]
  11583. },
  11584. {
  11585. "type": "string",
  11586. "enum": ["Infinity", "-Infinity", "NaN"]
  11587. }
  11588. ]
  11589. }
  11590. },
  11591. "required": ["created", "expires"],
  11592. "additionalProperties": false
  11593. }
  11594. },
  11595. "required": ["status", "time"],
  11596. "additionalProperties": false
  11597. },
  11598. {
  11599. "type": "object",
  11600. "properties": {
  11601. "status": {
  11602. "type": "string",
  11603. "enum": ["complete"]
  11604. },
  11605. "time": {
  11606. "type": "object",
  11607. "properties": {
  11608. "created": {
  11609. "anyOf": [
  11610. {
  11611. "type": "number"
  11612. },
  11613. {
  11614. "type": "string",
  11615. "enum": ["NaN"]
  11616. },
  11617. {
  11618. "type": "string",
  11619. "enum": ["Infinity"]
  11620. },
  11621. {
  11622. "type": "string",
  11623. "enum": ["-Infinity"]
  11624. },
  11625. {
  11626. "type": "string",
  11627. "enum": ["Infinity", "-Infinity", "NaN"]
  11628. }
  11629. ]
  11630. },
  11631. "expires": {
  11632. "anyOf": [
  11633. {
  11634. "type": "number"
  11635. },
  11636. {
  11637. "type": "string",
  11638. "enum": ["NaN"]
  11639. },
  11640. {
  11641. "type": "string",
  11642. "enum": ["Infinity"]
  11643. },
  11644. {
  11645. "type": "string",
  11646. "enum": ["-Infinity"]
  11647. },
  11648. {
  11649. "type": "string",
  11650. "enum": ["Infinity", "-Infinity", "NaN"]
  11651. }
  11652. ]
  11653. }
  11654. },
  11655. "required": ["created", "expires"],
  11656. "additionalProperties": false
  11657. }
  11658. },
  11659. "required": ["status", "time"],
  11660. "additionalProperties": false
  11661. },
  11662. {
  11663. "type": "object",
  11664. "properties": {
  11665. "status": {
  11666. "type": "string",
  11667. "enum": ["failed"]
  11668. },
  11669. "message": {
  11670. "type": "string"
  11671. },
  11672. "time": {
  11673. "type": "object",
  11674. "properties": {
  11675. "created": {
  11676. "anyOf": [
  11677. {
  11678. "type": "number"
  11679. },
  11680. {
  11681. "type": "string",
  11682. "enum": ["NaN"]
  11683. },
  11684. {
  11685. "type": "string",
  11686. "enum": ["Infinity"]
  11687. },
  11688. {
  11689. "type": "string",
  11690. "enum": ["-Infinity"]
  11691. },
  11692. {
  11693. "type": "string",
  11694. "enum": ["Infinity", "-Infinity", "NaN"]
  11695. }
  11696. ]
  11697. },
  11698. "expires": {
  11699. "anyOf": [
  11700. {
  11701. "type": "number"
  11702. },
  11703. {
  11704. "type": "string",
  11705. "enum": ["NaN"]
  11706. },
  11707. {
  11708. "type": "string",
  11709. "enum": ["Infinity"]
  11710. },
  11711. {
  11712. "type": "string",
  11713. "enum": ["-Infinity"]
  11714. },
  11715. {
  11716. "type": "string",
  11717. "enum": ["Infinity", "-Infinity", "NaN"]
  11718. }
  11719. ]
  11720. }
  11721. },
  11722. "required": ["created", "expires"],
  11723. "additionalProperties": false
  11724. }
  11725. },
  11726. "required": ["status", "message", "time"],
  11727. "additionalProperties": false
  11728. },
  11729. {
  11730. "type": "object",
  11731. "properties": {
  11732. "status": {
  11733. "type": "string",
  11734. "enum": ["expired"]
  11735. },
  11736. "time": {
  11737. "type": "object",
  11738. "properties": {
  11739. "created": {
  11740. "anyOf": [
  11741. {
  11742. "type": "number"
  11743. },
  11744. {
  11745. "type": "string",
  11746. "enum": ["NaN"]
  11747. },
  11748. {
  11749. "type": "string",
  11750. "enum": ["Infinity"]
  11751. },
  11752. {
  11753. "type": "string",
  11754. "enum": ["-Infinity"]
  11755. },
  11756. {
  11757. "type": "string",
  11758. "enum": ["Infinity", "-Infinity", "NaN"]
  11759. }
  11760. ]
  11761. },
  11762. "expires": {
  11763. "anyOf": [
  11764. {
  11765. "type": "number"
  11766. },
  11767. {
  11768. "type": "string",
  11769. "enum": ["NaN"]
  11770. },
  11771. {
  11772. "type": "string",
  11773. "enum": ["Infinity"]
  11774. },
  11775. {
  11776. "type": "string",
  11777. "enum": ["-Infinity"]
  11778. },
  11779. {
  11780. "type": "string",
  11781. "enum": ["Infinity", "-Infinity", "NaN"]
  11782. }
  11783. ]
  11784. }
  11785. },
  11786. "required": ["created", "expires"],
  11787. "additionalProperties": false
  11788. }
  11789. },
  11790. "required": ["status", "time"],
  11791. "additionalProperties": false
  11792. }
  11793. ]
  11794. }
  11795. },
  11796. "required": ["location", "data"],
  11797. "additionalProperties": false
  11798. }
  11799. }
  11800. }
  11801. },
  11802. "400": {
  11803. "description": "InvalidRequestError",
  11804. "content": {
  11805. "application/json": {
  11806. "schema": {
  11807. "$ref": "#/components/schemas/InvalidRequestError"
  11808. }
  11809. }
  11810. }
  11811. },
  11812. "401": {
  11813. "description": "UnauthorizedError",
  11814. "content": {
  11815. "application/json": {
  11816. "schema": {
  11817. "$ref": "#/components/schemas/UnauthorizedError"
  11818. }
  11819. }
  11820. }
  11821. }
  11822. },
  11823. "description": "Poll the current status of an OAuth attempt.",
  11824. "summary": "Get OAuth attempt status",
  11825. "x-codeSamples": [
  11826. {
  11827. "lang": "js",
  11828. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.status({\n ...\n})"
  11829. }
  11830. ]
  11831. },
  11832. "delete": {
  11833. "tags": ["integrations"],
  11834. "operationId": "v2.integration.attempt.cancel",
  11835. "parameters": [
  11836. {
  11837. "name": "attemptID",
  11838. "in": "path",
  11839. "schema": {
  11840. "type": "string"
  11841. },
  11842. "required": true
  11843. },
  11844. {
  11845. "name": "location",
  11846. "in": "query",
  11847. "schema": {
  11848. "type": "object",
  11849. "properties": {
  11850. "directory": {
  11851. "type": "string"
  11852. },
  11853. "workspace": {
  11854. "type": "string"
  11855. }
  11856. },
  11857. "additionalProperties": false
  11858. },
  11859. "required": false,
  11860. "style": "deepObject",
  11861. "explode": true
  11862. }
  11863. ],
  11864. "security": [],
  11865. "responses": {
  11866. "204": {
  11867. "description": "<No Content>"
  11868. },
  11869. "400": {
  11870. "description": "InvalidRequestError",
  11871. "content": {
  11872. "application/json": {
  11873. "schema": {
  11874. "$ref": "#/components/schemas/InvalidRequestError"
  11875. }
  11876. }
  11877. }
  11878. },
  11879. "401": {
  11880. "description": "UnauthorizedError",
  11881. "content": {
  11882. "application/json": {
  11883. "schema": {
  11884. "$ref": "#/components/schemas/UnauthorizedError"
  11885. }
  11886. }
  11887. }
  11888. }
  11889. },
  11890. "description": "Cancel an OAuth attempt and release its resources.",
  11891. "summary": "Cancel OAuth connection",
  11892. "x-codeSamples": [
  11893. {
  11894. "lang": "js",
  11895. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.cancel({\n ...\n})"
  11896. }
  11897. ]
  11898. }
  11899. },
  11900. "/api/integration/attempt/{attemptID}/complete": {
  11901. "post": {
  11902. "tags": ["integrations"],
  11903. "operationId": "v2.integration.attempt.complete",
  11904. "parameters": [
  11905. {
  11906. "name": "attemptID",
  11907. "in": "path",
  11908. "schema": {
  11909. "type": "string"
  11910. },
  11911. "required": true
  11912. },
  11913. {
  11914. "name": "location",
  11915. "in": "query",
  11916. "schema": {
  11917. "type": "object",
  11918. "properties": {
  11919. "directory": {
  11920. "type": "string"
  11921. },
  11922. "workspace": {
  11923. "type": "string"
  11924. }
  11925. },
  11926. "additionalProperties": false
  11927. },
  11928. "required": false,
  11929. "style": "deepObject",
  11930. "explode": true
  11931. }
  11932. ],
  11933. "security": [],
  11934. "responses": {
  11935. "204": {
  11936. "description": "<No Content>"
  11937. },
  11938. "400": {
  11939. "description": "InvalidRequestError",
  11940. "content": {
  11941. "application/json": {
  11942. "schema": {
  11943. "anyOf": [
  11944. {
  11945. "$ref": "#/components/schemas/InvalidRequestError"
  11946. },
  11947. {
  11948. "$ref": "#/components/schemas/InvalidRequestError"
  11949. }
  11950. ]
  11951. }
  11952. }
  11953. }
  11954. },
  11955. "401": {
  11956. "description": "UnauthorizedError",
  11957. "content": {
  11958. "application/json": {
  11959. "schema": {
  11960. "$ref": "#/components/schemas/UnauthorizedError"
  11961. }
  11962. }
  11963. }
  11964. }
  11965. },
  11966. "description": "Complete a code-based OAuth attempt and store the resulting credential.",
  11967. "summary": "Complete OAuth connection",
  11968. "requestBody": {
  11969. "content": {
  11970. "application/json": {
  11971. "schema": {
  11972. "type": "object",
  11973. "properties": {
  11974. "code": {
  11975. "type": "string"
  11976. }
  11977. },
  11978. "additionalProperties": false
  11979. }
  11980. }
  11981. },
  11982. "required": true
  11983. },
  11984. "x-codeSamples": [
  11985. {
  11986. "lang": "js",
  11987. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.complete({\n ...\n})"
  11988. }
  11989. ]
  11990. }
  11991. },
  11992. "/api/credential/{credentialID}": {
  11993. "patch": {
  11994. "tags": ["opencode HttpApi"],
  11995. "operationId": "v2.credential.update",
  11996. "parameters": [
  11997. {
  11998. "name": "credentialID",
  11999. "in": "path",
  12000. "schema": {
  12001. "type": "string"
  12002. },
  12003. "required": true
  12004. },
  12005. {
  12006. "name": "location",
  12007. "in": "query",
  12008. "schema": {
  12009. "type": "object",
  12010. "properties": {
  12011. "directory": {
  12012. "type": "string"
  12013. },
  12014. "workspace": {
  12015. "type": "string"
  12016. }
  12017. },
  12018. "additionalProperties": false
  12019. },
  12020. "required": false,
  12021. "style": "deepObject",
  12022. "explode": true
  12023. }
  12024. ],
  12025. "security": [],
  12026. "responses": {
  12027. "204": {
  12028. "description": "<No Content>"
  12029. },
  12030. "400": {
  12031. "description": "InvalidRequestError",
  12032. "content": {
  12033. "application/json": {
  12034. "schema": {
  12035. "$ref": "#/components/schemas/InvalidRequestError"
  12036. }
  12037. }
  12038. }
  12039. },
  12040. "401": {
  12041. "description": "UnauthorizedError",
  12042. "content": {
  12043. "application/json": {
  12044. "schema": {
  12045. "$ref": "#/components/schemas/UnauthorizedError"
  12046. }
  12047. }
  12048. }
  12049. }
  12050. },
  12051. "description": "Update a stored credential label.",
  12052. "summary": "Update credential",
  12053. "requestBody": {
  12054. "content": {
  12055. "application/json": {
  12056. "schema": {
  12057. "type": "object",
  12058. "properties": {
  12059. "label": {
  12060. "type": "string"
  12061. }
  12062. },
  12063. "required": ["label"],
  12064. "additionalProperties": false
  12065. }
  12066. }
  12067. },
  12068. "required": true
  12069. },
  12070. "x-codeSamples": [
  12071. {
  12072. "lang": "js",
  12073. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.update({\n ...\n})"
  12074. }
  12075. ]
  12076. },
  12077. "delete": {
  12078. "tags": ["opencode HttpApi"],
  12079. "operationId": "v2.credential.remove",
  12080. "parameters": [
  12081. {
  12082. "name": "credentialID",
  12083. "in": "path",
  12084. "schema": {
  12085. "type": "string"
  12086. },
  12087. "required": true
  12088. },
  12089. {
  12090. "name": "location",
  12091. "in": "query",
  12092. "schema": {
  12093. "type": "object",
  12094. "properties": {
  12095. "directory": {
  12096. "type": "string"
  12097. },
  12098. "workspace": {
  12099. "type": "string"
  12100. }
  12101. },
  12102. "additionalProperties": false
  12103. },
  12104. "required": false,
  12105. "style": "deepObject",
  12106. "explode": true
  12107. }
  12108. ],
  12109. "security": [],
  12110. "responses": {
  12111. "204": {
  12112. "description": "<No Content>"
  12113. },
  12114. "400": {
  12115. "description": "InvalidRequestError",
  12116. "content": {
  12117. "application/json": {
  12118. "schema": {
  12119. "$ref": "#/components/schemas/InvalidRequestError"
  12120. }
  12121. }
  12122. }
  12123. },
  12124. "401": {
  12125. "description": "UnauthorizedError",
  12126. "content": {
  12127. "application/json": {
  12128. "schema": {
  12129. "$ref": "#/components/schemas/UnauthorizedError"
  12130. }
  12131. }
  12132. }
  12133. }
  12134. },
  12135. "description": "Remove a stored integration credential.",
  12136. "summary": "Remove credential",
  12137. "x-codeSamples": [
  12138. {
  12139. "lang": "js",
  12140. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.remove({\n ...\n})"
  12141. }
  12142. ]
  12143. }
  12144. },
  12145. "/api/permission/request": {
  12146. "get": {
  12147. "tags": ["permissions"],
  12148. "operationId": "v2.permission.request.list",
  12149. "parameters": [
  12150. {
  12151. "name": "location",
  12152. "in": "query",
  12153. "schema": {
  12154. "type": "object",
  12155. "properties": {
  12156. "directory": {
  12157. "type": "string"
  12158. },
  12159. "workspace": {
  12160. "type": "string"
  12161. }
  12162. },
  12163. "additionalProperties": false
  12164. },
  12165. "required": false,
  12166. "style": "deepObject",
  12167. "explode": true
  12168. }
  12169. ],
  12170. "security": [],
  12171. "responses": {
  12172. "200": {
  12173. "description": "Success",
  12174. "content": {
  12175. "application/json": {
  12176. "schema": {
  12177. "type": "object",
  12178. "properties": {
  12179. "location": {
  12180. "$ref": "#/components/schemas/LocationInfo"
  12181. },
  12182. "data": {
  12183. "type": "array",
  12184. "items": {
  12185. "$ref": "#/components/schemas/PermissionV2Request"
  12186. }
  12187. }
  12188. },
  12189. "required": ["location", "data"],
  12190. "additionalProperties": false
  12191. }
  12192. }
  12193. }
  12194. },
  12195. "400": {
  12196. "description": "InvalidRequestError",
  12197. "content": {
  12198. "application/json": {
  12199. "schema": {
  12200. "$ref": "#/components/schemas/InvalidRequestError"
  12201. }
  12202. }
  12203. }
  12204. },
  12205. "401": {
  12206. "description": "UnauthorizedError",
  12207. "content": {
  12208. "application/json": {
  12209. "schema": {
  12210. "$ref": "#/components/schemas/UnauthorizedError"
  12211. }
  12212. }
  12213. }
  12214. }
  12215. },
  12216. "description": "Retrieve pending permission requests for a location.",
  12217. "summary": "List pending permission requests",
  12218. "x-codeSamples": [
  12219. {
  12220. "lang": "js",
  12221. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.request.list({\n ...\n})"
  12222. }
  12223. ]
  12224. }
  12225. },
  12226. "/api/permission/saved": {
  12227. "get": {
  12228. "tags": ["permissions"],
  12229. "operationId": "v2.permission.saved.list",
  12230. "parameters": [
  12231. {
  12232. "name": "projectID",
  12233. "in": "query",
  12234. "schema": {
  12235. "type": "string"
  12236. },
  12237. "required": false
  12238. }
  12239. ],
  12240. "security": [],
  12241. "responses": {
  12242. "200": {
  12243. "description": "Success",
  12244. "content": {
  12245. "application/json": {
  12246. "schema": {
  12247. "type": "object",
  12248. "properties": {
  12249. "data": {
  12250. "type": "array",
  12251. "items": {
  12252. "$ref": "#/components/schemas/PermissionSavedInfo"
  12253. }
  12254. }
  12255. },
  12256. "required": ["data"],
  12257. "additionalProperties": false
  12258. }
  12259. }
  12260. }
  12261. },
  12262. "400": {
  12263. "description": "InvalidRequestError",
  12264. "content": {
  12265. "application/json": {
  12266. "schema": {
  12267. "$ref": "#/components/schemas/InvalidRequestError"
  12268. }
  12269. }
  12270. }
  12271. },
  12272. "401": {
  12273. "description": "UnauthorizedError",
  12274. "content": {
  12275. "application/json": {
  12276. "schema": {
  12277. "$ref": "#/components/schemas/UnauthorizedError"
  12278. }
  12279. }
  12280. }
  12281. }
  12282. },
  12283. "description": "Retrieve saved permissions, optionally filtered by project.",
  12284. "summary": "List saved permissions",
  12285. "x-codeSamples": [
  12286. {
  12287. "lang": "js",
  12288. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.list({\n ...\n})"
  12289. }
  12290. ]
  12291. }
  12292. },
  12293. "/api/permission/saved/{id}": {
  12294. "delete": {
  12295. "tags": ["permissions"],
  12296. "operationId": "v2.permission.saved.remove",
  12297. "parameters": [
  12298. {
  12299. "name": "id",
  12300. "in": "path",
  12301. "schema": {
  12302. "type": "string"
  12303. },
  12304. "required": true
  12305. }
  12306. ],
  12307. "security": [],
  12308. "responses": {
  12309. "204": {
  12310. "description": "<No Content>"
  12311. },
  12312. "400": {
  12313. "description": "InvalidRequestError",
  12314. "content": {
  12315. "application/json": {
  12316. "schema": {
  12317. "$ref": "#/components/schemas/InvalidRequestError"
  12318. }
  12319. }
  12320. }
  12321. },
  12322. "401": {
  12323. "description": "UnauthorizedError",
  12324. "content": {
  12325. "application/json": {
  12326. "schema": {
  12327. "$ref": "#/components/schemas/UnauthorizedError"
  12328. }
  12329. }
  12330. }
  12331. }
  12332. },
  12333. "description": "Remove a saved permission by ID.",
  12334. "summary": "Remove saved permission",
  12335. "x-codeSamples": [
  12336. {
  12337. "lang": "js",
  12338. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.remove({\n ...\n})"
  12339. }
  12340. ]
  12341. }
  12342. },
  12343. "/api/session/{sessionID}/permission": {
  12344. "get": {
  12345. "tags": ["permissions"],
  12346. "operationId": "v2.session.permission.list",
  12347. "parameters": [
  12348. {
  12349. "name": "sessionID",
  12350. "in": "path",
  12351. "schema": {
  12352. "type": "string",
  12353. "pattern": "^ses"
  12354. },
  12355. "required": true
  12356. }
  12357. ],
  12358. "security": [],
  12359. "responses": {
  12360. "200": {
  12361. "description": "Success",
  12362. "content": {
  12363. "application/json": {
  12364. "schema": {
  12365. "type": "object",
  12366. "properties": {
  12367. "data": {
  12368. "type": "array",
  12369. "items": {
  12370. "$ref": "#/components/schemas/PermissionV2Request"
  12371. }
  12372. }
  12373. },
  12374. "required": ["data"],
  12375. "additionalProperties": false
  12376. }
  12377. }
  12378. }
  12379. },
  12380. "400": {
  12381. "description": "InvalidRequestError",
  12382. "content": {
  12383. "application/json": {
  12384. "schema": {
  12385. "$ref": "#/components/schemas/InvalidRequestError"
  12386. }
  12387. }
  12388. }
  12389. },
  12390. "401": {
  12391. "description": "UnauthorizedError",
  12392. "content": {
  12393. "application/json": {
  12394. "schema": {
  12395. "$ref": "#/components/schemas/UnauthorizedError"
  12396. }
  12397. }
  12398. }
  12399. },
  12400. "404": {
  12401. "description": "SessionNotFoundError",
  12402. "content": {
  12403. "application/json": {
  12404. "schema": {
  12405. "anyOf": [
  12406. {
  12407. "$ref": "#/components/schemas/SessionNotFoundError"
  12408. },
  12409. {
  12410. "$ref": "#/components/schemas/SessionNotFoundError"
  12411. }
  12412. ]
  12413. }
  12414. }
  12415. }
  12416. }
  12417. },
  12418. "description": "Retrieve pending permission requests owned by a session.",
  12419. "summary": "List session permission requests",
  12420. "x-codeSamples": [
  12421. {
  12422. "lang": "js",
  12423. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  12424. }
  12425. ]
  12426. }
  12427. },
  12428. "/api/session/{sessionID}/permission/{requestID}/reply": {
  12429. "post": {
  12430. "tags": ["permissions"],
  12431. "operationId": "v2.session.permission.reply",
  12432. "parameters": [
  12433. {
  12434. "name": "sessionID",
  12435. "in": "path",
  12436. "schema": {
  12437. "type": "string",
  12438. "pattern": "^ses"
  12439. },
  12440. "required": true
  12441. },
  12442. {
  12443. "name": "requestID",
  12444. "in": "path",
  12445. "schema": {
  12446. "type": "string",
  12447. "pattern": "^per"
  12448. },
  12449. "required": true
  12450. }
  12451. ],
  12452. "security": [],
  12453. "responses": {
  12454. "204": {
  12455. "description": "<No Content>"
  12456. },
  12457. "400": {
  12458. "description": "InvalidRequestError",
  12459. "content": {
  12460. "application/json": {
  12461. "schema": {
  12462. "$ref": "#/components/schemas/InvalidRequestError"
  12463. }
  12464. }
  12465. }
  12466. },
  12467. "401": {
  12468. "description": "UnauthorizedError",
  12469. "content": {
  12470. "application/json": {
  12471. "schema": {
  12472. "$ref": "#/components/schemas/UnauthorizedError"
  12473. }
  12474. }
  12475. }
  12476. },
  12477. "404": {
  12478. "description": "SessionNotFoundError | PermissionNotFoundError",
  12479. "content": {
  12480. "application/json": {
  12481. "schema": {
  12482. "anyOf": [
  12483. {
  12484. "$ref": "#/components/schemas/PermissionNotFoundError"
  12485. },
  12486. {
  12487. "$ref": "#/components/schemas/SessionNotFoundError"
  12488. },
  12489. {
  12490. "$ref": "#/components/schemas/SessionNotFoundError"
  12491. }
  12492. ]
  12493. }
  12494. }
  12495. }
  12496. }
  12497. },
  12498. "description": "Respond to a pending permission request owned by a session.",
  12499. "summary": "Reply to pending permission request",
  12500. "requestBody": {
  12501. "content": {
  12502. "application/json": {
  12503. "schema": {
  12504. "type": "object",
  12505. "properties": {
  12506. "reply": {
  12507. "$ref": "#/components/schemas/PermissionV2Reply"
  12508. },
  12509. "message": {
  12510. "type": "string"
  12511. }
  12512. },
  12513. "required": ["reply"],
  12514. "additionalProperties": false
  12515. }
  12516. }
  12517. },
  12518. "required": true
  12519. },
  12520. "x-codeSamples": [
  12521. {
  12522. "lang": "js",
  12523. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  12524. }
  12525. ]
  12526. }
  12527. },
  12528. "/api/fs/read/*": {
  12529. "get": {
  12530. "tags": ["filesystem"],
  12531. "operationId": "v2.fs.read",
  12532. "parameters": [
  12533. {
  12534. "name": "location",
  12535. "in": "query",
  12536. "schema": {
  12537. "type": "object",
  12538. "properties": {
  12539. "directory": {
  12540. "type": "string"
  12541. },
  12542. "workspace": {
  12543. "type": "string"
  12544. }
  12545. },
  12546. "additionalProperties": false
  12547. },
  12548. "required": false,
  12549. "style": "deepObject",
  12550. "explode": true
  12551. }
  12552. ],
  12553. "security": [],
  12554. "responses": {
  12555. "200": {
  12556. "description": "Success",
  12557. "content": {
  12558. "application/octet-stream": {
  12559. "schema": {
  12560. "type": "string",
  12561. "format": "binary"
  12562. }
  12563. }
  12564. }
  12565. },
  12566. "400": {
  12567. "description": "InvalidRequestError",
  12568. "content": {
  12569. "application/json": {
  12570. "schema": {
  12571. "$ref": "#/components/schemas/InvalidRequestError"
  12572. }
  12573. }
  12574. }
  12575. },
  12576. "401": {
  12577. "description": "UnauthorizedError",
  12578. "content": {
  12579. "application/json": {
  12580. "schema": {
  12581. "$ref": "#/components/schemas/UnauthorizedError"
  12582. }
  12583. }
  12584. }
  12585. }
  12586. },
  12587. "description": "Serve one file relative to the requested location.",
  12588. "summary": "Read file",
  12589. "x-codeSamples": [
  12590. {
  12591. "lang": "js",
  12592. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.read({\n ...\n})"
  12593. }
  12594. ]
  12595. }
  12596. },
  12597. "/api/fs/list": {
  12598. "get": {
  12599. "tags": ["filesystem"],
  12600. "operationId": "v2.fs.list",
  12601. "parameters": [
  12602. {
  12603. "name": "location",
  12604. "in": "query",
  12605. "schema": {
  12606. "type": "object",
  12607. "properties": {
  12608. "directory": {
  12609. "type": "string"
  12610. },
  12611. "workspace": {
  12612. "type": "string"
  12613. }
  12614. },
  12615. "additionalProperties": false
  12616. },
  12617. "required": false,
  12618. "style": "deepObject",
  12619. "explode": true
  12620. },
  12621. {
  12622. "name": "path",
  12623. "in": "query",
  12624. "schema": {
  12625. "type": "string"
  12626. },
  12627. "required": false
  12628. }
  12629. ],
  12630. "security": [],
  12631. "responses": {
  12632. "200": {
  12633. "description": "Success",
  12634. "content": {
  12635. "application/json": {
  12636. "schema": {
  12637. "type": "object",
  12638. "properties": {
  12639. "location": {
  12640. "$ref": "#/components/schemas/LocationInfo"
  12641. },
  12642. "data": {
  12643. "type": "array",
  12644. "items": {
  12645. "$ref": "#/components/schemas/FileSystemEntry"
  12646. }
  12647. }
  12648. },
  12649. "required": ["location", "data"],
  12650. "additionalProperties": false
  12651. }
  12652. }
  12653. }
  12654. },
  12655. "400": {
  12656. "description": "InvalidRequestError",
  12657. "content": {
  12658. "application/json": {
  12659. "schema": {
  12660. "$ref": "#/components/schemas/InvalidRequestError"
  12661. }
  12662. }
  12663. }
  12664. },
  12665. "401": {
  12666. "description": "UnauthorizedError",
  12667. "content": {
  12668. "application/json": {
  12669. "schema": {
  12670. "$ref": "#/components/schemas/UnauthorizedError"
  12671. }
  12672. }
  12673. }
  12674. }
  12675. },
  12676. "description": "List direct children of one directory relative to the requested location.",
  12677. "summary": "List directory",
  12678. "x-codeSamples": [
  12679. {
  12680. "lang": "js",
  12681. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.list({\n ...\n})"
  12682. }
  12683. ]
  12684. }
  12685. },
  12686. "/api/fs/find": {
  12687. "get": {
  12688. "tags": ["filesystem"],
  12689. "operationId": "v2.fs.find",
  12690. "parameters": [
  12691. {
  12692. "name": "location",
  12693. "in": "query",
  12694. "schema": {
  12695. "type": "object",
  12696. "properties": {
  12697. "directory": {
  12698. "type": "string"
  12699. },
  12700. "workspace": {
  12701. "type": "string"
  12702. }
  12703. },
  12704. "additionalProperties": false
  12705. },
  12706. "required": false,
  12707. "style": "deepObject",
  12708. "explode": true
  12709. },
  12710. {
  12711. "name": "query",
  12712. "in": "query",
  12713. "schema": {
  12714. "type": "string"
  12715. },
  12716. "required": true
  12717. },
  12718. {
  12719. "name": "type",
  12720. "in": "query",
  12721. "schema": {
  12722. "type": "string",
  12723. "enum": ["file", "directory"]
  12724. },
  12725. "required": false
  12726. },
  12727. {
  12728. "name": "limit",
  12729. "in": "query",
  12730. "schema": {
  12731. "type": "string"
  12732. },
  12733. "required": false
  12734. }
  12735. ],
  12736. "security": [],
  12737. "responses": {
  12738. "200": {
  12739. "description": "Success",
  12740. "content": {
  12741. "application/json": {
  12742. "schema": {
  12743. "type": "object",
  12744. "properties": {
  12745. "location": {
  12746. "$ref": "#/components/schemas/LocationInfo"
  12747. },
  12748. "data": {
  12749. "type": "array",
  12750. "items": {
  12751. "$ref": "#/components/schemas/FileSystemEntry"
  12752. }
  12753. }
  12754. },
  12755. "required": ["location", "data"],
  12756. "additionalProperties": false
  12757. }
  12758. }
  12759. }
  12760. },
  12761. "400": {
  12762. "description": "InvalidRequestError",
  12763. "content": {
  12764. "application/json": {
  12765. "schema": {
  12766. "$ref": "#/components/schemas/InvalidRequestError"
  12767. }
  12768. }
  12769. }
  12770. },
  12771. "401": {
  12772. "description": "UnauthorizedError",
  12773. "content": {
  12774. "application/json": {
  12775. "schema": {
  12776. "$ref": "#/components/schemas/UnauthorizedError"
  12777. }
  12778. }
  12779. }
  12780. }
  12781. },
  12782. "description": "Find recursively ranked filesystem entries relative to the requested location.",
  12783. "summary": "Find files",
  12784. "x-codeSamples": [
  12785. {
  12786. "lang": "js",
  12787. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.find({\n ...\n})"
  12788. }
  12789. ]
  12790. }
  12791. },
  12792. "/api/command": {
  12793. "get": {
  12794. "tags": ["commands"],
  12795. "operationId": "v2.command.list",
  12796. "parameters": [
  12797. {
  12798. "name": "location",
  12799. "in": "query",
  12800. "schema": {
  12801. "type": "object",
  12802. "properties": {
  12803. "directory": {
  12804. "type": "string"
  12805. },
  12806. "workspace": {
  12807. "type": "string"
  12808. }
  12809. },
  12810. "additionalProperties": false
  12811. },
  12812. "required": false,
  12813. "style": "deepObject",
  12814. "explode": true
  12815. }
  12816. ],
  12817. "security": [],
  12818. "responses": {
  12819. "200": {
  12820. "description": "Success",
  12821. "content": {
  12822. "application/json": {
  12823. "schema": {
  12824. "type": "object",
  12825. "properties": {
  12826. "location": {
  12827. "$ref": "#/components/schemas/LocationInfo"
  12828. },
  12829. "data": {
  12830. "type": "array",
  12831. "items": {
  12832. "$ref": "#/components/schemas/CommandV2Info"
  12833. }
  12834. }
  12835. },
  12836. "required": ["location", "data"],
  12837. "additionalProperties": false
  12838. }
  12839. }
  12840. }
  12841. },
  12842. "400": {
  12843. "description": "InvalidRequestError",
  12844. "content": {
  12845. "application/json": {
  12846. "schema": {
  12847. "$ref": "#/components/schemas/InvalidRequestError"
  12848. }
  12849. }
  12850. }
  12851. },
  12852. "401": {
  12853. "description": "UnauthorizedError",
  12854. "content": {
  12855. "application/json": {
  12856. "schema": {
  12857. "$ref": "#/components/schemas/UnauthorizedError"
  12858. }
  12859. }
  12860. }
  12861. }
  12862. },
  12863. "description": "Retrieve currently registered commands.",
  12864. "summary": "List commands",
  12865. "x-codeSamples": [
  12866. {
  12867. "lang": "js",
  12868. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.command.list({\n ...\n})"
  12869. }
  12870. ]
  12871. }
  12872. },
  12873. "/api/skill": {
  12874. "get": {
  12875. "tags": ["skills"],
  12876. "operationId": "v2.skill.list",
  12877. "parameters": [
  12878. {
  12879. "name": "location",
  12880. "in": "query",
  12881. "schema": {
  12882. "type": "object",
  12883. "properties": {
  12884. "directory": {
  12885. "type": "string"
  12886. },
  12887. "workspace": {
  12888. "type": "string"
  12889. }
  12890. },
  12891. "additionalProperties": false
  12892. },
  12893. "required": false,
  12894. "style": "deepObject",
  12895. "explode": true
  12896. }
  12897. ],
  12898. "security": [],
  12899. "responses": {
  12900. "200": {
  12901. "description": "Success",
  12902. "content": {
  12903. "application/json": {
  12904. "schema": {
  12905. "type": "object",
  12906. "properties": {
  12907. "location": {
  12908. "$ref": "#/components/schemas/LocationInfo"
  12909. },
  12910. "data": {
  12911. "type": "array",
  12912. "items": {
  12913. "$ref": "#/components/schemas/SkillV2Info"
  12914. }
  12915. }
  12916. },
  12917. "required": ["location", "data"],
  12918. "additionalProperties": false
  12919. }
  12920. }
  12921. }
  12922. },
  12923. "400": {
  12924. "description": "InvalidRequestError",
  12925. "content": {
  12926. "application/json": {
  12927. "schema": {
  12928. "$ref": "#/components/schemas/InvalidRequestError"
  12929. }
  12930. }
  12931. }
  12932. },
  12933. "401": {
  12934. "description": "UnauthorizedError",
  12935. "content": {
  12936. "application/json": {
  12937. "schema": {
  12938. "$ref": "#/components/schemas/UnauthorizedError"
  12939. }
  12940. }
  12941. }
  12942. }
  12943. },
  12944. "description": "Retrieve currently registered skills.",
  12945. "summary": "List skills",
  12946. "x-codeSamples": [
  12947. {
  12948. "lang": "js",
  12949. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.skill.list({\n ...\n})"
  12950. }
  12951. ]
  12952. }
  12953. },
  12954. "/api/event": {
  12955. "get": {
  12956. "tags": ["events"],
  12957. "operationId": "v2.event.subscribe",
  12958. "parameters": [
  12959. {
  12960. "name": "location",
  12961. "in": "query",
  12962. "schema": {
  12963. "type": "object",
  12964. "properties": {
  12965. "directory": {
  12966. "type": "string"
  12967. },
  12968. "workspace": {
  12969. "type": "string"
  12970. }
  12971. },
  12972. "additionalProperties": false
  12973. },
  12974. "required": false,
  12975. "style": "deepObject",
  12976. "explode": true
  12977. }
  12978. ],
  12979. "security": [],
  12980. "responses": {
  12981. "200": {
  12982. "description": "Success",
  12983. "content": {
  12984. "text/event-stream": {
  12985. "schema": {
  12986. "type": "string"
  12987. }
  12988. }
  12989. }
  12990. },
  12991. "400": {
  12992. "description": "InvalidRequestError",
  12993. "content": {
  12994. "application/json": {
  12995. "schema": {
  12996. "$ref": "#/components/schemas/InvalidRequestError"
  12997. }
  12998. }
  12999. }
  13000. },
  13001. "401": {
  13002. "description": "UnauthorizedError",
  13003. "content": {
  13004. "application/json": {
  13005. "schema": {
  13006. "$ref": "#/components/schemas/UnauthorizedError"
  13007. }
  13008. }
  13009. }
  13010. }
  13011. },
  13012. "description": "Subscribe to native event payloads for a location.",
  13013. "summary": "Subscribe to events",
  13014. "x-codeSamples": [
  13015. {
  13016. "lang": "js",
  13017. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.event.subscribe({\n ...\n})"
  13018. }
  13019. ]
  13020. }
  13021. },
  13022. "/api/pty": {
  13023. "get": {
  13024. "tags": ["pty"],
  13025. "operationId": "v2.pty.list",
  13026. "parameters": [
  13027. {
  13028. "name": "location",
  13029. "in": "query",
  13030. "schema": {
  13031. "type": "object",
  13032. "properties": {
  13033. "directory": {
  13034. "type": "string"
  13035. },
  13036. "workspace": {
  13037. "type": "string"
  13038. }
  13039. },
  13040. "additionalProperties": false
  13041. },
  13042. "required": false,
  13043. "style": "deepObject",
  13044. "explode": true
  13045. }
  13046. ],
  13047. "security": [],
  13048. "responses": {
  13049. "200": {
  13050. "description": "Success",
  13051. "content": {
  13052. "application/json": {
  13053. "schema": {
  13054. "type": "object",
  13055. "properties": {
  13056. "location": {
  13057. "$ref": "#/components/schemas/LocationInfo"
  13058. },
  13059. "data": {
  13060. "type": "array",
  13061. "items": {
  13062. "$ref": "#/components/schemas/Pty"
  13063. }
  13064. }
  13065. },
  13066. "required": ["location", "data"],
  13067. "additionalProperties": false
  13068. }
  13069. }
  13070. }
  13071. },
  13072. "400": {
  13073. "description": "InvalidRequestError",
  13074. "content": {
  13075. "application/json": {
  13076. "schema": {
  13077. "$ref": "#/components/schemas/InvalidRequestError"
  13078. }
  13079. }
  13080. }
  13081. },
  13082. "401": {
  13083. "description": "UnauthorizedError",
  13084. "content": {
  13085. "application/json": {
  13086. "schema": {
  13087. "$ref": "#/components/schemas/UnauthorizedError"
  13088. }
  13089. }
  13090. }
  13091. }
  13092. },
  13093. "description": "List PTY sessions for a location, including exited sessions retained until removal.",
  13094. "summary": "List PTY sessions",
  13095. "x-codeSamples": [
  13096. {
  13097. "lang": "js",
  13098. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.list({\n ...\n})"
  13099. }
  13100. ]
  13101. },
  13102. "post": {
  13103. "tags": ["pty"],
  13104. "operationId": "v2.pty.create",
  13105. "parameters": [
  13106. {
  13107. "name": "location",
  13108. "in": "query",
  13109. "schema": {
  13110. "type": "object",
  13111. "properties": {
  13112. "directory": {
  13113. "type": "string"
  13114. },
  13115. "workspace": {
  13116. "type": "string"
  13117. }
  13118. },
  13119. "additionalProperties": false
  13120. },
  13121. "required": false,
  13122. "style": "deepObject",
  13123. "explode": true
  13124. }
  13125. ],
  13126. "security": [],
  13127. "responses": {
  13128. "200": {
  13129. "description": "Success",
  13130. "content": {
  13131. "application/json": {
  13132. "schema": {
  13133. "type": "object",
  13134. "properties": {
  13135. "location": {
  13136. "$ref": "#/components/schemas/LocationInfo"
  13137. },
  13138. "data": {
  13139. "$ref": "#/components/schemas/Pty"
  13140. }
  13141. },
  13142. "required": ["location", "data"],
  13143. "additionalProperties": false
  13144. }
  13145. }
  13146. }
  13147. },
  13148. "400": {
  13149. "description": "InvalidRequestError",
  13150. "content": {
  13151. "application/json": {
  13152. "schema": {
  13153. "$ref": "#/components/schemas/InvalidRequestError"
  13154. }
  13155. }
  13156. }
  13157. },
  13158. "401": {
  13159. "description": "UnauthorizedError",
  13160. "content": {
  13161. "application/json": {
  13162. "schema": {
  13163. "$ref": "#/components/schemas/UnauthorizedError"
  13164. }
  13165. }
  13166. }
  13167. }
  13168. },
  13169. "description": "Create a pseudo-terminal session for a location.",
  13170. "summary": "Create PTY session",
  13171. "requestBody": {
  13172. "content": {
  13173. "application/json": {
  13174. "schema": {
  13175. "type": "object",
  13176. "properties": {
  13177. "command": {
  13178. "type": "string"
  13179. },
  13180. "args": {
  13181. "type": "array",
  13182. "items": {
  13183. "type": "string"
  13184. }
  13185. },
  13186. "cwd": {
  13187. "type": "string"
  13188. },
  13189. "title": {
  13190. "type": "string"
  13191. },
  13192. "env": {
  13193. "type": "object",
  13194. "additionalProperties": {
  13195. "type": "string"
  13196. }
  13197. }
  13198. },
  13199. "additionalProperties": false
  13200. }
  13201. }
  13202. },
  13203. "required": true
  13204. },
  13205. "x-codeSamples": [
  13206. {
  13207. "lang": "js",
  13208. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.create({\n ...\n})"
  13209. }
  13210. ]
  13211. }
  13212. },
  13213. "/api/pty/{ptyID}": {
  13214. "get": {
  13215. "tags": ["pty"],
  13216. "operationId": "v2.pty.get",
  13217. "parameters": [
  13218. {
  13219. "name": "ptyID",
  13220. "in": "path",
  13221. "schema": {
  13222. "type": "string",
  13223. "pattern": "^pty"
  13224. },
  13225. "required": true
  13226. },
  13227. {
  13228. "name": "location",
  13229. "in": "query",
  13230. "schema": {
  13231. "type": "object",
  13232. "properties": {
  13233. "directory": {
  13234. "type": "string"
  13235. },
  13236. "workspace": {
  13237. "type": "string"
  13238. }
  13239. },
  13240. "additionalProperties": false
  13241. },
  13242. "required": false,
  13243. "style": "deepObject",
  13244. "explode": true
  13245. }
  13246. ],
  13247. "security": [],
  13248. "responses": {
  13249. "200": {
  13250. "description": "Success",
  13251. "content": {
  13252. "application/json": {
  13253. "schema": {
  13254. "type": "object",
  13255. "properties": {
  13256. "location": {
  13257. "$ref": "#/components/schemas/LocationInfo"
  13258. },
  13259. "data": {
  13260. "$ref": "#/components/schemas/Pty"
  13261. }
  13262. },
  13263. "required": ["location", "data"],
  13264. "additionalProperties": false
  13265. }
  13266. }
  13267. }
  13268. },
  13269. "400": {
  13270. "description": "InvalidRequestError",
  13271. "content": {
  13272. "application/json": {
  13273. "schema": {
  13274. "$ref": "#/components/schemas/InvalidRequestError"
  13275. }
  13276. }
  13277. }
  13278. },
  13279. "401": {
  13280. "description": "UnauthorizedError",
  13281. "content": {
  13282. "application/json": {
  13283. "schema": {
  13284. "$ref": "#/components/schemas/UnauthorizedError"
  13285. }
  13286. }
  13287. }
  13288. },
  13289. "404": {
  13290. "description": "PtyNotFoundError",
  13291. "content": {
  13292. "application/json": {
  13293. "schema": {
  13294. "$ref": "#/components/schemas/PtyNotFoundError"
  13295. }
  13296. }
  13297. }
  13298. }
  13299. },
  13300. "description": "Get one PTY session, including its exit code once exited.",
  13301. "summary": "Get PTY session",
  13302. "x-codeSamples": [
  13303. {
  13304. "lang": "js",
  13305. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.get({\n ...\n})"
  13306. }
  13307. ]
  13308. },
  13309. "put": {
  13310. "tags": ["pty"],
  13311. "operationId": "v2.pty.update",
  13312. "parameters": [
  13313. {
  13314. "name": "ptyID",
  13315. "in": "path",
  13316. "schema": {
  13317. "type": "string",
  13318. "pattern": "^pty"
  13319. },
  13320. "required": true
  13321. },
  13322. {
  13323. "name": "location",
  13324. "in": "query",
  13325. "schema": {
  13326. "type": "object",
  13327. "properties": {
  13328. "directory": {
  13329. "type": "string"
  13330. },
  13331. "workspace": {
  13332. "type": "string"
  13333. }
  13334. },
  13335. "additionalProperties": false
  13336. },
  13337. "required": false,
  13338. "style": "deepObject",
  13339. "explode": true
  13340. }
  13341. ],
  13342. "security": [],
  13343. "responses": {
  13344. "200": {
  13345. "description": "Success",
  13346. "content": {
  13347. "application/json": {
  13348. "schema": {
  13349. "type": "object",
  13350. "properties": {
  13351. "location": {
  13352. "$ref": "#/components/schemas/LocationInfo"
  13353. },
  13354. "data": {
  13355. "$ref": "#/components/schemas/Pty"
  13356. }
  13357. },
  13358. "required": ["location", "data"],
  13359. "additionalProperties": false
  13360. }
  13361. }
  13362. }
  13363. },
  13364. "400": {
  13365. "description": "InvalidRequestError",
  13366. "content": {
  13367. "application/json": {
  13368. "schema": {
  13369. "$ref": "#/components/schemas/InvalidRequestError"
  13370. }
  13371. }
  13372. }
  13373. },
  13374. "401": {
  13375. "description": "UnauthorizedError",
  13376. "content": {
  13377. "application/json": {
  13378. "schema": {
  13379. "$ref": "#/components/schemas/UnauthorizedError"
  13380. }
  13381. }
  13382. }
  13383. },
  13384. "404": {
  13385. "description": "PtyNotFoundError",
  13386. "content": {
  13387. "application/json": {
  13388. "schema": {
  13389. "$ref": "#/components/schemas/PtyNotFoundError"
  13390. }
  13391. }
  13392. }
  13393. }
  13394. },
  13395. "description": "Update the title or viewport size of one PTY session.",
  13396. "summary": "Update PTY session",
  13397. "requestBody": {
  13398. "content": {
  13399. "application/json": {
  13400. "schema": {
  13401. "type": "object",
  13402. "properties": {
  13403. "title": {
  13404. "type": "string"
  13405. },
  13406. "size": {
  13407. "type": "object",
  13408. "properties": {
  13409. "rows": {
  13410. "type": "integer",
  13411. "exclusiveMinimum": 0
  13412. },
  13413. "cols": {
  13414. "type": "integer",
  13415. "exclusiveMinimum": 0
  13416. }
  13417. },
  13418. "required": ["rows", "cols"],
  13419. "additionalProperties": false
  13420. }
  13421. },
  13422. "additionalProperties": false
  13423. }
  13424. }
  13425. },
  13426. "required": true
  13427. },
  13428. "x-codeSamples": [
  13429. {
  13430. "lang": "js",
  13431. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.update({\n ...\n})"
  13432. }
  13433. ]
  13434. },
  13435. "delete": {
  13436. "tags": ["pty"],
  13437. "operationId": "v2.pty.remove",
  13438. "parameters": [
  13439. {
  13440. "name": "ptyID",
  13441. "in": "path",
  13442. "schema": {
  13443. "type": "string",
  13444. "pattern": "^pty"
  13445. },
  13446. "required": true
  13447. },
  13448. {
  13449. "name": "location",
  13450. "in": "query",
  13451. "schema": {
  13452. "type": "object",
  13453. "properties": {
  13454. "directory": {
  13455. "type": "string"
  13456. },
  13457. "workspace": {
  13458. "type": "string"
  13459. }
  13460. },
  13461. "additionalProperties": false
  13462. },
  13463. "required": false,
  13464. "style": "deepObject",
  13465. "explode": true
  13466. }
  13467. ],
  13468. "security": [],
  13469. "responses": {
  13470. "204": {
  13471. "description": "<No Content>"
  13472. },
  13473. "400": {
  13474. "description": "InvalidRequestError",
  13475. "content": {
  13476. "application/json": {
  13477. "schema": {
  13478. "$ref": "#/components/schemas/InvalidRequestError"
  13479. }
  13480. }
  13481. }
  13482. },
  13483. "401": {
  13484. "description": "UnauthorizedError",
  13485. "content": {
  13486. "application/json": {
  13487. "schema": {
  13488. "$ref": "#/components/schemas/UnauthorizedError"
  13489. }
  13490. }
  13491. }
  13492. },
  13493. "404": {
  13494. "description": "PtyNotFoundError",
  13495. "content": {
  13496. "application/json": {
  13497. "schema": {
  13498. "$ref": "#/components/schemas/PtyNotFoundError"
  13499. }
  13500. }
  13501. }
  13502. }
  13503. },
  13504. "description": "Terminate and remove one PTY session.",
  13505. "summary": "Remove PTY session",
  13506. "x-codeSamples": [
  13507. {
  13508. "lang": "js",
  13509. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.remove({\n ...\n})"
  13510. }
  13511. ]
  13512. }
  13513. },
  13514. "/api/pty/{ptyID}/connect-token": {
  13515. "post": {
  13516. "tags": ["pty"],
  13517. "operationId": "v2.pty.connectToken",
  13518. "parameters": [
  13519. {
  13520. "name": "ptyID",
  13521. "in": "path",
  13522. "schema": {
  13523. "type": "string",
  13524. "pattern": "^pty"
  13525. },
  13526. "required": true
  13527. },
  13528. {
  13529. "name": "location",
  13530. "in": "query",
  13531. "schema": {
  13532. "type": "object",
  13533. "properties": {
  13534. "directory": {
  13535. "type": "string"
  13536. },
  13537. "workspace": {
  13538. "type": "string"
  13539. }
  13540. },
  13541. "additionalProperties": false
  13542. },
  13543. "required": false,
  13544. "style": "deepObject",
  13545. "explode": true
  13546. }
  13547. ],
  13548. "security": [],
  13549. "responses": {
  13550. "200": {
  13551. "description": "Success",
  13552. "content": {
  13553. "application/json": {
  13554. "schema": {
  13555. "type": "object",
  13556. "properties": {
  13557. "location": {
  13558. "$ref": "#/components/schemas/LocationInfo"
  13559. },
  13560. "data": {
  13561. "type": "object",
  13562. "properties": {
  13563. "ticket": {
  13564. "type": "string"
  13565. },
  13566. "expires_in": {
  13567. "type": "integer",
  13568. "exclusiveMinimum": 0
  13569. }
  13570. },
  13571. "required": ["ticket", "expires_in"],
  13572. "additionalProperties": false
  13573. }
  13574. },
  13575. "required": ["location", "data"],
  13576. "additionalProperties": false
  13577. }
  13578. }
  13579. }
  13580. },
  13581. "400": {
  13582. "description": "InvalidRequestError",
  13583. "content": {
  13584. "application/json": {
  13585. "schema": {
  13586. "$ref": "#/components/schemas/InvalidRequestError"
  13587. }
  13588. }
  13589. }
  13590. },
  13591. "401": {
  13592. "description": "UnauthorizedError",
  13593. "content": {
  13594. "application/json": {
  13595. "schema": {
  13596. "$ref": "#/components/schemas/UnauthorizedError"
  13597. }
  13598. }
  13599. }
  13600. },
  13601. "403": {
  13602. "description": "ForbiddenError",
  13603. "content": {
  13604. "application/json": {
  13605. "schema": {
  13606. "$ref": "#/components/schemas/ForbiddenError"
  13607. }
  13608. }
  13609. }
  13610. },
  13611. "404": {
  13612. "description": "PtyNotFoundError",
  13613. "content": {
  13614. "application/json": {
  13615. "schema": {
  13616. "$ref": "#/components/schemas/PtyNotFoundError"
  13617. }
  13618. }
  13619. }
  13620. }
  13621. },
  13622. "description": "Create a short-lived single-use ticket for opening a PTY WebSocket connection.",
  13623. "summary": "Create PTY WebSocket token",
  13624. "x-codeSamples": [
  13625. {
  13626. "lang": "js",
  13627. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connectToken({\n ...\n})"
  13628. }
  13629. ]
  13630. }
  13631. },
  13632. "/api/pty/{ptyID}/connect": {
  13633. "get": {
  13634. "tags": ["pty"],
  13635. "operationId": "v2.pty.connect",
  13636. "parameters": [
  13637. {
  13638. "name": "ptyID",
  13639. "in": "path",
  13640. "schema": {
  13641. "type": "string",
  13642. "pattern": "^pty"
  13643. },
  13644. "required": true
  13645. },
  13646. {
  13647. "in": "query",
  13648. "name": "location[directory]",
  13649. "schema": {
  13650. "type": "string"
  13651. }
  13652. },
  13653. {
  13654. "in": "query",
  13655. "name": "location[workspace]",
  13656. "schema": {
  13657. "type": "string"
  13658. }
  13659. },
  13660. {
  13661. "in": "query",
  13662. "name": "cursor",
  13663. "schema": {
  13664. "type": "string"
  13665. }
  13666. },
  13667. {
  13668. "in": "query",
  13669. "name": "ticket",
  13670. "schema": {
  13671. "type": "string"
  13672. }
  13673. }
  13674. ],
  13675. "security": [],
  13676. "responses": {
  13677. "200": {
  13678. "description": "Success",
  13679. "content": {
  13680. "application/json": {
  13681. "schema": {
  13682. "type": "boolean"
  13683. }
  13684. }
  13685. }
  13686. },
  13687. "400": {
  13688. "description": "InvalidRequestError",
  13689. "content": {
  13690. "application/json": {
  13691. "schema": {
  13692. "$ref": "#/components/schemas/InvalidRequestError"
  13693. }
  13694. }
  13695. }
  13696. },
  13697. "401": {
  13698. "description": "UnauthorizedError",
  13699. "content": {
  13700. "application/json": {
  13701. "schema": {
  13702. "$ref": "#/components/schemas/UnauthorizedError"
  13703. }
  13704. }
  13705. }
  13706. },
  13707. "403": {
  13708. "description": "ForbiddenError",
  13709. "content": {
  13710. "application/json": {
  13711. "schema": {
  13712. "$ref": "#/components/schemas/ForbiddenError"
  13713. }
  13714. }
  13715. }
  13716. },
  13717. "404": {
  13718. "description": "PtyNotFoundError",
  13719. "content": {
  13720. "application/json": {
  13721. "schema": {
  13722. "$ref": "#/components/schemas/PtyNotFoundError"
  13723. }
  13724. }
  13725. }
  13726. }
  13727. },
  13728. "description": "Establish a WebSocket connection streaming PTY output and accepting terminal input.",
  13729. "summary": "Connect to PTY session",
  13730. "x-codeSamples": [
  13731. {
  13732. "lang": "js",
  13733. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connect({\n ...\n})"
  13734. }
  13735. ]
  13736. }
  13737. },
  13738. "/api/question/request": {
  13739. "get": {
  13740. "tags": ["session questions"],
  13741. "operationId": "v2.question.request.list",
  13742. "parameters": [
  13743. {
  13744. "name": "location",
  13745. "in": "query",
  13746. "schema": {
  13747. "type": "object",
  13748. "properties": {
  13749. "directory": {
  13750. "type": "string"
  13751. },
  13752. "workspace": {
  13753. "type": "string"
  13754. }
  13755. },
  13756. "additionalProperties": false
  13757. },
  13758. "required": false,
  13759. "style": "deepObject",
  13760. "explode": true
  13761. }
  13762. ],
  13763. "security": [],
  13764. "responses": {
  13765. "200": {
  13766. "description": "Success",
  13767. "content": {
  13768. "application/json": {
  13769. "schema": {
  13770. "type": "object",
  13771. "properties": {
  13772. "location": {
  13773. "$ref": "#/components/schemas/LocationInfo"
  13774. },
  13775. "data": {
  13776. "type": "array",
  13777. "items": {
  13778. "$ref": "#/components/schemas/QuestionV2Request"
  13779. }
  13780. }
  13781. },
  13782. "required": ["location", "data"],
  13783. "additionalProperties": false
  13784. }
  13785. }
  13786. }
  13787. },
  13788. "400": {
  13789. "description": "InvalidRequestError",
  13790. "content": {
  13791. "application/json": {
  13792. "schema": {
  13793. "$ref": "#/components/schemas/InvalidRequestError"
  13794. }
  13795. }
  13796. }
  13797. },
  13798. "401": {
  13799. "description": "UnauthorizedError",
  13800. "content": {
  13801. "application/json": {
  13802. "schema": {
  13803. "$ref": "#/components/schemas/UnauthorizedError"
  13804. }
  13805. }
  13806. }
  13807. }
  13808. },
  13809. "description": "Retrieve pending question requests for a location.",
  13810. "summary": "List pending question requests",
  13811. "x-codeSamples": [
  13812. {
  13813. "lang": "js",
  13814. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.question.request.list({\n ...\n})"
  13815. }
  13816. ]
  13817. }
  13818. },
  13819. "/api/session/{sessionID}/question": {
  13820. "get": {
  13821. "tags": ["session questions"],
  13822. "operationId": "v2.session.question.list",
  13823. "parameters": [
  13824. {
  13825. "name": "sessionID",
  13826. "in": "path",
  13827. "schema": {
  13828. "type": "string",
  13829. "pattern": "^ses"
  13830. },
  13831. "required": true
  13832. }
  13833. ],
  13834. "security": [],
  13835. "responses": {
  13836. "200": {
  13837. "description": "Success",
  13838. "content": {
  13839. "application/json": {
  13840. "schema": {
  13841. "type": "object",
  13842. "properties": {
  13843. "data": {
  13844. "type": "array",
  13845. "items": {
  13846. "$ref": "#/components/schemas/QuestionV2Request"
  13847. }
  13848. }
  13849. },
  13850. "required": ["data"],
  13851. "additionalProperties": false
  13852. }
  13853. }
  13854. }
  13855. },
  13856. "400": {
  13857. "description": "InvalidRequestError",
  13858. "content": {
  13859. "application/json": {
  13860. "schema": {
  13861. "$ref": "#/components/schemas/InvalidRequestError"
  13862. }
  13863. }
  13864. }
  13865. },
  13866. "401": {
  13867. "description": "UnauthorizedError",
  13868. "content": {
  13869. "application/json": {
  13870. "schema": {
  13871. "$ref": "#/components/schemas/UnauthorizedError"
  13872. }
  13873. }
  13874. }
  13875. },
  13876. "404": {
  13877. "description": "SessionNotFoundError",
  13878. "content": {
  13879. "application/json": {
  13880. "schema": {
  13881. "anyOf": [
  13882. {
  13883. "$ref": "#/components/schemas/SessionNotFoundError"
  13884. },
  13885. {
  13886. "$ref": "#/components/schemas/SessionNotFoundError"
  13887. }
  13888. ]
  13889. }
  13890. }
  13891. }
  13892. }
  13893. },
  13894. "description": "Retrieve pending question requests owned by a session.",
  13895. "summary": "List session question requests",
  13896. "x-codeSamples": [
  13897. {
  13898. "lang": "js",
  13899. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.list({\n ...\n})"
  13900. }
  13901. ]
  13902. }
  13903. },
  13904. "/api/session/{sessionID}/question/{requestID}/reply": {
  13905. "post": {
  13906. "tags": ["session questions"],
  13907. "operationId": "v2.session.question.reply",
  13908. "parameters": [
  13909. {
  13910. "name": "sessionID",
  13911. "in": "path",
  13912. "schema": {
  13913. "type": "string",
  13914. "pattern": "^ses"
  13915. },
  13916. "required": true
  13917. },
  13918. {
  13919. "name": "requestID",
  13920. "in": "path",
  13921. "schema": {
  13922. "type": "string",
  13923. "pattern": "^que"
  13924. },
  13925. "required": true
  13926. }
  13927. ],
  13928. "security": [],
  13929. "responses": {
  13930. "204": {
  13931. "description": "<No Content>"
  13932. },
  13933. "400": {
  13934. "description": "InvalidRequestError",
  13935. "content": {
  13936. "application/json": {
  13937. "schema": {
  13938. "$ref": "#/components/schemas/InvalidRequestError"
  13939. }
  13940. }
  13941. }
  13942. },
  13943. "401": {
  13944. "description": "UnauthorizedError",
  13945. "content": {
  13946. "application/json": {
  13947. "schema": {
  13948. "$ref": "#/components/schemas/UnauthorizedError"
  13949. }
  13950. }
  13951. }
  13952. },
  13953. "404": {
  13954. "description": "SessionNotFoundError | QuestionNotFoundError",
  13955. "content": {
  13956. "application/json": {
  13957. "schema": {
  13958. "anyOf": [
  13959. {
  13960. "$ref": "#/components/schemas/QuestionNotFoundError"
  13961. },
  13962. {
  13963. "$ref": "#/components/schemas/SessionNotFoundError"
  13964. },
  13965. {
  13966. "$ref": "#/components/schemas/SessionNotFoundError"
  13967. }
  13968. ]
  13969. }
  13970. }
  13971. }
  13972. }
  13973. },
  13974. "description": "Answer a pending question request owned by a session.",
  13975. "summary": "Reply to pending question request",
  13976. "requestBody": {
  13977. "content": {
  13978. "application/json": {
  13979. "schema": {
  13980. "$ref": "#/components/schemas/QuestionV2Reply"
  13981. }
  13982. }
  13983. },
  13984. "required": true
  13985. },
  13986. "x-codeSamples": [
  13987. {
  13988. "lang": "js",
  13989. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reply({\n ...\n})"
  13990. }
  13991. ]
  13992. }
  13993. },
  13994. "/api/session/{sessionID}/question/{requestID}/reject": {
  13995. "post": {
  13996. "tags": ["session questions"],
  13997. "operationId": "v2.session.question.reject",
  13998. "parameters": [
  13999. {
  14000. "name": "sessionID",
  14001. "in": "path",
  14002. "schema": {
  14003. "type": "string",
  14004. "pattern": "^ses"
  14005. },
  14006. "required": true
  14007. },
  14008. {
  14009. "name": "requestID",
  14010. "in": "path",
  14011. "schema": {
  14012. "type": "string",
  14013. "pattern": "^que"
  14014. },
  14015. "required": true
  14016. }
  14017. ],
  14018. "security": [],
  14019. "responses": {
  14020. "204": {
  14021. "description": "<No Content>"
  14022. },
  14023. "400": {
  14024. "description": "InvalidRequestError",
  14025. "content": {
  14026. "application/json": {
  14027. "schema": {
  14028. "$ref": "#/components/schemas/InvalidRequestError"
  14029. }
  14030. }
  14031. }
  14032. },
  14033. "401": {
  14034. "description": "UnauthorizedError",
  14035. "content": {
  14036. "application/json": {
  14037. "schema": {
  14038. "$ref": "#/components/schemas/UnauthorizedError"
  14039. }
  14040. }
  14041. }
  14042. },
  14043. "404": {
  14044. "description": "SessionNotFoundError | QuestionNotFoundError",
  14045. "content": {
  14046. "application/json": {
  14047. "schema": {
  14048. "anyOf": [
  14049. {
  14050. "$ref": "#/components/schemas/QuestionNotFoundError"
  14051. },
  14052. {
  14053. "$ref": "#/components/schemas/SessionNotFoundError"
  14054. },
  14055. {
  14056. "$ref": "#/components/schemas/SessionNotFoundError"
  14057. }
  14058. ]
  14059. }
  14060. }
  14061. }
  14062. }
  14063. },
  14064. "description": "Reject a pending question request owned by a session.",
  14065. "summary": "Reject pending question request",
  14066. "x-codeSamples": [
  14067. {
  14068. "lang": "js",
  14069. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reject({\n ...\n})"
  14070. }
  14071. ]
  14072. }
  14073. },
  14074. "/api/reference": {
  14075. "get": {
  14076. "tags": ["reference"],
  14077. "operationId": "v2.reference.list",
  14078. "parameters": [
  14079. {
  14080. "name": "location",
  14081. "in": "query",
  14082. "schema": {
  14083. "type": "object",
  14084. "properties": {
  14085. "directory": {
  14086. "type": "string"
  14087. },
  14088. "workspace": {
  14089. "type": "string"
  14090. }
  14091. },
  14092. "additionalProperties": false
  14093. },
  14094. "required": false,
  14095. "style": "deepObject",
  14096. "explode": true
  14097. }
  14098. ],
  14099. "security": [],
  14100. "responses": {
  14101. "200": {
  14102. "description": "Success",
  14103. "content": {
  14104. "application/json": {
  14105. "schema": {
  14106. "type": "object",
  14107. "properties": {
  14108. "location": {
  14109. "$ref": "#/components/schemas/LocationInfo"
  14110. },
  14111. "data": {
  14112. "type": "array",
  14113. "items": {
  14114. "$ref": "#/components/schemas/ReferenceInfo"
  14115. }
  14116. }
  14117. },
  14118. "required": ["location", "data"],
  14119. "additionalProperties": false
  14120. }
  14121. }
  14122. }
  14123. },
  14124. "400": {
  14125. "description": "InvalidRequestError",
  14126. "content": {
  14127. "application/json": {
  14128. "schema": {
  14129. "$ref": "#/components/schemas/InvalidRequestError"
  14130. }
  14131. }
  14132. }
  14133. },
  14134. "401": {
  14135. "description": "UnauthorizedError",
  14136. "content": {
  14137. "application/json": {
  14138. "schema": {
  14139. "$ref": "#/components/schemas/UnauthorizedError"
  14140. }
  14141. }
  14142. }
  14143. }
  14144. },
  14145. "description": "List references available in the requested location.",
  14146. "summary": "List references",
  14147. "x-codeSamples": [
  14148. {
  14149. "lang": "js",
  14150. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.reference.list({\n ...\n})"
  14151. }
  14152. ]
  14153. }
  14154. },
  14155. "/experimental/project/{projectID}/copy": {
  14156. "post": {
  14157. "tags": ["projectCopy"],
  14158. "operationId": "v2.projectCopy.create",
  14159. "parameters": [
  14160. {
  14161. "name": "projectID",
  14162. "in": "path",
  14163. "schema": {
  14164. "type": "string"
  14165. },
  14166. "required": true
  14167. },
  14168. {
  14169. "name": "location",
  14170. "in": "query",
  14171. "schema": {
  14172. "type": "object",
  14173. "properties": {
  14174. "directory": {
  14175. "type": "string"
  14176. },
  14177. "workspace": {
  14178. "type": "string"
  14179. }
  14180. },
  14181. "additionalProperties": false
  14182. },
  14183. "required": false,
  14184. "style": "deepObject",
  14185. "explode": true
  14186. }
  14187. ],
  14188. "responses": {
  14189. "200": {
  14190. "description": "ProjectCopy.Copy",
  14191. "content": {
  14192. "application/json": {
  14193. "schema": {
  14194. "$ref": "#/components/schemas/ProjectCopyCopy"
  14195. }
  14196. }
  14197. }
  14198. },
  14199. "400": {
  14200. "description": "ProjectCopyError | InvalidRequestError",
  14201. "content": {
  14202. "application/json": {
  14203. "schema": {
  14204. "anyOf": [
  14205. {
  14206. "$ref": "#/components/schemas/ProjectCopyError"
  14207. },
  14208. {
  14209. "$ref": "#/components/schemas/InvalidRequestError"
  14210. }
  14211. ]
  14212. }
  14213. }
  14214. }
  14215. }
  14216. },
  14217. "requestBody": {
  14218. "content": {
  14219. "application/json": {
  14220. "schema": {
  14221. "type": "object",
  14222. "properties": {
  14223. "strategy": {
  14224. "type": "string"
  14225. },
  14226. "directory": {
  14227. "type": "string"
  14228. },
  14229. "name": {
  14230. "type": "string"
  14231. }
  14232. },
  14233. "required": ["strategy", "directory"],
  14234. "additionalProperties": false
  14235. }
  14236. }
  14237. }
  14238. },
  14239. "x-codeSamples": [
  14240. {
  14241. "lang": "js",
  14242. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.create({\n ...\n})"
  14243. }
  14244. ]
  14245. },
  14246. "delete": {
  14247. "tags": ["projectCopy"],
  14248. "operationId": "v2.projectCopy.remove",
  14249. "parameters": [
  14250. {
  14251. "name": "projectID",
  14252. "in": "path",
  14253. "schema": {
  14254. "type": "string"
  14255. },
  14256. "required": true
  14257. },
  14258. {
  14259. "name": "location",
  14260. "in": "query",
  14261. "schema": {
  14262. "type": "object",
  14263. "properties": {
  14264. "directory": {
  14265. "type": "string"
  14266. },
  14267. "workspace": {
  14268. "type": "string"
  14269. }
  14270. },
  14271. "additionalProperties": false
  14272. },
  14273. "required": false,
  14274. "style": "deepObject",
  14275. "explode": true
  14276. }
  14277. ],
  14278. "responses": {
  14279. "204": {
  14280. "description": "<No Content>"
  14281. },
  14282. "400": {
  14283. "description": "ProjectCopyError | InvalidRequestError",
  14284. "content": {
  14285. "application/json": {
  14286. "schema": {
  14287. "anyOf": [
  14288. {
  14289. "$ref": "#/components/schemas/ProjectCopyError"
  14290. },
  14291. {
  14292. "$ref": "#/components/schemas/InvalidRequestError"
  14293. }
  14294. ]
  14295. }
  14296. }
  14297. }
  14298. }
  14299. },
  14300. "requestBody": {
  14301. "content": {
  14302. "application/json": {
  14303. "schema": {
  14304. "type": "object",
  14305. "properties": {
  14306. "directory": {
  14307. "type": "string"
  14308. },
  14309. "force": {
  14310. "type": "boolean"
  14311. }
  14312. },
  14313. "required": ["directory", "force"],
  14314. "additionalProperties": false
  14315. }
  14316. }
  14317. }
  14318. },
  14319. "x-codeSamples": [
  14320. {
  14321. "lang": "js",
  14322. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.remove({\n ...\n})"
  14323. }
  14324. ]
  14325. }
  14326. },
  14327. "/experimental/project/{projectID}/copy/refresh": {
  14328. "post": {
  14329. "tags": ["projectCopy"],
  14330. "operationId": "v2.projectCopy.refresh",
  14331. "parameters": [
  14332. {
  14333. "name": "projectID",
  14334. "in": "path",
  14335. "schema": {
  14336. "type": "string"
  14337. },
  14338. "required": true
  14339. },
  14340. {
  14341. "name": "location",
  14342. "in": "query",
  14343. "schema": {
  14344. "type": "object",
  14345. "properties": {
  14346. "directory": {
  14347. "type": "string"
  14348. },
  14349. "workspace": {
  14350. "type": "string"
  14351. }
  14352. },
  14353. "additionalProperties": false
  14354. },
  14355. "required": false,
  14356. "style": "deepObject",
  14357. "explode": true
  14358. }
  14359. ],
  14360. "responses": {
  14361. "204": {
  14362. "description": "<No Content>"
  14363. },
  14364. "400": {
  14365. "description": "ProjectCopyError | InvalidRequestError",
  14366. "content": {
  14367. "application/json": {
  14368. "schema": {
  14369. "anyOf": [
  14370. {
  14371. "$ref": "#/components/schemas/ProjectCopyError"
  14372. },
  14373. {
  14374. "$ref": "#/components/schemas/InvalidRequestError"
  14375. }
  14376. ]
  14377. }
  14378. }
  14379. }
  14380. }
  14381. },
  14382. "x-codeSamples": [
  14383. {
  14384. "lang": "js",
  14385. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.refresh({\n ...\n})"
  14386. }
  14387. ]
  14388. }
  14389. },
  14390. "/pty/{ptyID}/connect": {
  14391. "get": {
  14392. "tags": ["pty"],
  14393. "operationId": "pty.connect",
  14394. "parameters": [
  14395. {
  14396. "name": "ptyID",
  14397. "in": "path",
  14398. "schema": {
  14399. "type": "string",
  14400. "pattern": "^pty"
  14401. },
  14402. "required": true
  14403. },
  14404. {
  14405. "in": "query",
  14406. "name": "directory",
  14407. "schema": {
  14408. "type": "string"
  14409. }
  14410. },
  14411. {
  14412. "in": "query",
  14413. "name": "workspace",
  14414. "schema": {
  14415. "type": "string"
  14416. }
  14417. },
  14418. {
  14419. "in": "query",
  14420. "name": "cursor",
  14421. "schema": {
  14422. "type": "string"
  14423. }
  14424. },
  14425. {
  14426. "in": "query",
  14427. "name": "ticket",
  14428. "schema": {
  14429. "type": "string"
  14430. }
  14431. }
  14432. ],
  14433. "responses": {
  14434. "200": {
  14435. "description": "Connected session",
  14436. "content": {
  14437. "application/json": {
  14438. "schema": {
  14439. "type": "boolean",
  14440. "description": "Connected session"
  14441. }
  14442. }
  14443. }
  14444. },
  14445. "403": {
  14446. "description": "Forbidden",
  14447. "content": {
  14448. "application/json": {
  14449. "schema": {
  14450. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  14451. }
  14452. }
  14453. }
  14454. },
  14455. "404": {
  14456. "description": "Not found",
  14457. "content": {
  14458. "application/json": {
  14459. "schema": {
  14460. "$ref": "#/components/schemas/NotFoundError"
  14461. }
  14462. }
  14463. }
  14464. }
  14465. },
  14466. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  14467. "summary": "Connect to PTY session",
  14468. "x-codeSamples": [
  14469. {
  14470. "lang": "js",
  14471. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  14472. }
  14473. ]
  14474. }
  14475. }
  14476. },
  14477. "components": {
  14478. "schemas": {
  14479. "Event": {
  14480. "anyOf": [
  14481. {
  14482. "$ref": "#/components/schemas/EventModels-devRefreshed"
  14483. },
  14484. {
  14485. "$ref": "#/components/schemas/EventPluginAdded"
  14486. },
  14487. {
  14488. "$ref": "#/components/schemas/EventIntegrationUpdated"
  14489. },
  14490. {
  14491. "$ref": "#/components/schemas/EventCatalogUpdated"
  14492. },
  14493. {
  14494. "$ref": "#/components/schemas/EventSessionCreated"
  14495. },
  14496. {
  14497. "$ref": "#/components/schemas/EventSessionUpdated"
  14498. },
  14499. {
  14500. "$ref": "#/components/schemas/EventSessionDeleted"
  14501. },
  14502. {
  14503. "$ref": "#/components/schemas/EventMessageUpdated"
  14504. },
  14505. {
  14506. "$ref": "#/components/schemas/EventMessageRemoved"
  14507. },
  14508. {
  14509. "$ref": "#/components/schemas/EventMessagePartUpdated"
  14510. },
  14511. {
  14512. "$ref": "#/components/schemas/EventMessagePartRemoved"
  14513. },
  14514. {
  14515. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  14516. },
  14517. {
  14518. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  14519. },
  14520. {
  14521. "$ref": "#/components/schemas/EventSessionNextMoved"
  14522. },
  14523. {
  14524. "$ref": "#/components/schemas/EventSessionNextPrompted"
  14525. },
  14526. {
  14527. "$ref": "#/components/schemas/EventSessionNextPromptAdmitted"
  14528. },
  14529. {
  14530. "$ref": "#/components/schemas/EventSessionNextPromptPromoted"
  14531. },
  14532. {
  14533. "$ref": "#/components/schemas/EventSessionNextInterruptRequested"
  14534. },
  14535. {
  14536. "$ref": "#/components/schemas/EventSessionNextContextUpdated"
  14537. },
  14538. {
  14539. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  14540. },
  14541. {
  14542. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  14543. },
  14544. {
  14545. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  14546. },
  14547. {
  14548. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  14549. },
  14550. {
  14551. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  14552. },
  14553. {
  14554. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  14555. },
  14556. {
  14557. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  14558. },
  14559. {
  14560. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  14561. },
  14562. {
  14563. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  14564. },
  14565. {
  14566. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  14567. },
  14568. {
  14569. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  14570. },
  14571. {
  14572. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  14573. },
  14574. {
  14575. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  14576. },
  14577. {
  14578. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  14579. },
  14580. {
  14581. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  14582. },
  14583. {
  14584. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  14585. },
  14586. {
  14587. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  14588. },
  14589. {
  14590. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  14591. },
  14592. {
  14593. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  14594. },
  14595. {
  14596. "$ref": "#/components/schemas/EventSessionNextRetried"
  14597. },
  14598. {
  14599. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  14600. },
  14601. {
  14602. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  14603. },
  14604. {
  14605. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  14606. },
  14607. {
  14608. "$ref": "#/components/schemas/EventMessagePartDelta"
  14609. },
  14610. {
  14611. "$ref": "#/components/schemas/EventSessionDiff"
  14612. },
  14613. {
  14614. "$ref": "#/components/schemas/EventSessionError"
  14615. },
  14616. {
  14617. "$ref": "#/components/schemas/EventInstallationUpdated"
  14618. },
  14619. {
  14620. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  14621. },
  14622. {
  14623. "$ref": "#/components/schemas/EventFileEdited"
  14624. },
  14625. {
  14626. "$ref": "#/components/schemas/EventPermissionV2Asked"
  14627. },
  14628. {
  14629. "$ref": "#/components/schemas/EventPermissionV2Replied"
  14630. },
  14631. {
  14632. "$ref": "#/components/schemas/EventReferenceUpdated"
  14633. },
  14634. {
  14635. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  14636. },
  14637. {
  14638. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  14639. },
  14640. {
  14641. "$ref": "#/components/schemas/EventPtyCreated"
  14642. },
  14643. {
  14644. "$ref": "#/components/schemas/EventPtyUpdated"
  14645. },
  14646. {
  14647. "$ref": "#/components/schemas/EventPtyExited"
  14648. },
  14649. {
  14650. "$ref": "#/components/schemas/EventPtyDeleted"
  14651. },
  14652. {
  14653. "$ref": "#/components/schemas/EventQuestionV2Asked"
  14654. },
  14655. {
  14656. "$ref": "#/components/schemas/EventQuestionV2Replied"
  14657. },
  14658. {
  14659. "$ref": "#/components/schemas/EventQuestionV2Rejected"
  14660. },
  14661. {
  14662. "$ref": "#/components/schemas/EventTodoUpdated"
  14663. },
  14664. {
  14665. "$ref": "#/components/schemas/EventLspUpdated"
  14666. },
  14667. {
  14668. "$ref": "#/components/schemas/EventPermissionAsked"
  14669. },
  14670. {
  14671. "$ref": "#/components/schemas/EventPermissionReplied"
  14672. },
  14673. {
  14674. "$ref": "#/components/schemas/Event.tui.prompt.append"
  14675. },
  14676. {
  14677. "$ref": "#/components/schemas/Event.tui.command.execute"
  14678. },
  14679. {
  14680. "$ref": "#/components/schemas/Event.tui.toast.show"
  14681. },
  14682. {
  14683. "$ref": "#/components/schemas/Event.tui.session.select"
  14684. },
  14685. {
  14686. "$ref": "#/components/schemas/EventMcpToolsChanged"
  14687. },
  14688. {
  14689. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  14690. },
  14691. {
  14692. "$ref": "#/components/schemas/EventCommandExecuted"
  14693. },
  14694. {
  14695. "$ref": "#/components/schemas/EventProjectUpdated"
  14696. },
  14697. {
  14698. "$ref": "#/components/schemas/EventSessionStatus"
  14699. },
  14700. {
  14701. "$ref": "#/components/schemas/EventSessionIdle"
  14702. },
  14703. {
  14704. "$ref": "#/components/schemas/EventQuestionAsked"
  14705. },
  14706. {
  14707. "$ref": "#/components/schemas/EventQuestionReplied"
  14708. },
  14709. {
  14710. "$ref": "#/components/schemas/EventQuestionRejected"
  14711. },
  14712. {
  14713. "$ref": "#/components/schemas/EventSessionCompacted"
  14714. },
  14715. {
  14716. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  14717. },
  14718. {
  14719. "$ref": "#/components/schemas/EventWorkspaceReady"
  14720. },
  14721. {
  14722. "$ref": "#/components/schemas/EventWorkspaceFailed"
  14723. },
  14724. {
  14725. "$ref": "#/components/schemas/EventWorkspaceStatus"
  14726. },
  14727. {
  14728. "$ref": "#/components/schemas/EventWorktreeReady"
  14729. },
  14730. {
  14731. "$ref": "#/components/schemas/EventWorktreeFailed"
  14732. },
  14733. {
  14734. "$ref": "#/components/schemas/EventServerConnected"
  14735. },
  14736. {
  14737. "$ref": "#/components/schemas/EventGlobalDisposed"
  14738. },
  14739. {
  14740. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  14741. }
  14742. ]
  14743. },
  14744. "QuestionReplied": {
  14745. "type": "object",
  14746. "properties": {
  14747. "sessionID": {
  14748. "type": "string",
  14749. "pattern": "^ses"
  14750. },
  14751. "requestID": {
  14752. "type": "string",
  14753. "pattern": "^que"
  14754. },
  14755. "answers": {
  14756. "type": "array",
  14757. "items": {
  14758. "$ref": "#/components/schemas/QuestionAnswer"
  14759. }
  14760. }
  14761. },
  14762. "required": ["sessionID", "requestID", "answers"],
  14763. "additionalProperties": false
  14764. },
  14765. "QuestionRejected": {
  14766. "type": "object",
  14767. "properties": {
  14768. "sessionID": {
  14769. "type": "string",
  14770. "pattern": "^ses"
  14771. },
  14772. "requestID": {
  14773. "type": "string",
  14774. "pattern": "^que"
  14775. }
  14776. },
  14777. "required": ["sessionID", "requestID"],
  14778. "additionalProperties": false
  14779. },
  14780. "OAuth": {
  14781. "type": "object",
  14782. "properties": {
  14783. "type": {
  14784. "type": "string",
  14785. "enum": ["oauth"]
  14786. },
  14787. "refresh": {
  14788. "type": "string"
  14789. },
  14790. "access": {
  14791. "type": "string"
  14792. },
  14793. "expires": {
  14794. "type": "integer",
  14795. "minimum": 0
  14796. },
  14797. "accountId": {
  14798. "type": "string"
  14799. },
  14800. "enterpriseUrl": {
  14801. "type": "string"
  14802. }
  14803. },
  14804. "required": ["type", "refresh", "access", "expires"],
  14805. "additionalProperties": false
  14806. },
  14807. "ApiAuth": {
  14808. "type": "object",
  14809. "properties": {
  14810. "type": {
  14811. "type": "string",
  14812. "enum": ["api"]
  14813. },
  14814. "key": {
  14815. "type": "string"
  14816. },
  14817. "metadata": {
  14818. "type": "object",
  14819. "additionalProperties": {
  14820. "type": "string"
  14821. }
  14822. }
  14823. },
  14824. "required": ["type", "key"],
  14825. "additionalProperties": false
  14826. },
  14827. "WellKnownAuth": {
  14828. "type": "object",
  14829. "properties": {
  14830. "type": {
  14831. "type": "string",
  14832. "enum": ["wellknown"]
  14833. },
  14834. "key": {
  14835. "type": "string"
  14836. },
  14837. "token": {
  14838. "type": "string"
  14839. }
  14840. },
  14841. "required": ["type", "key", "token"],
  14842. "additionalProperties": false
  14843. },
  14844. "Auth": {
  14845. "anyOf": [
  14846. {
  14847. "$ref": "#/components/schemas/OAuth"
  14848. },
  14849. {
  14850. "$ref": "#/components/schemas/ApiAuth"
  14851. },
  14852. {
  14853. "$ref": "#/components/schemas/WellKnownAuth"
  14854. }
  14855. ]
  14856. },
  14857. "effect_HttpApiError_BadRequest": {
  14858. "type": "object",
  14859. "properties": {
  14860. "_tag": {
  14861. "type": "string",
  14862. "enum": ["BadRequest"]
  14863. }
  14864. },
  14865. "required": ["_tag"],
  14866. "additionalProperties": false
  14867. },
  14868. "InvalidRequestError": {
  14869. "type": "object",
  14870. "properties": {
  14871. "_tag": {
  14872. "type": "string",
  14873. "enum": ["InvalidRequestError"]
  14874. },
  14875. "message": {
  14876. "type": "string"
  14877. },
  14878. "kind": {
  14879. "type": "string"
  14880. },
  14881. "field": {
  14882. "type": "string"
  14883. }
  14884. },
  14885. "required": ["_tag", "message"],
  14886. "additionalProperties": false
  14887. },
  14888. "MoveSessionError": {
  14889. "type": "object",
  14890. "properties": {
  14891. "name": {
  14892. "type": "string",
  14893. "enum": ["MoveSessionError"]
  14894. },
  14895. "data": {
  14896. "type": "object",
  14897. "properties": {
  14898. "message": {
  14899. "type": "string"
  14900. }
  14901. },
  14902. "required": ["message"],
  14903. "additionalProperties": false
  14904. }
  14905. },
  14906. "required": ["name", "data"],
  14907. "additionalProperties": false
  14908. },
  14909. "SnapshotFileDiff": {
  14910. "type": "object",
  14911. "properties": {
  14912. "file": {
  14913. "type": "string"
  14914. },
  14915. "patch": {
  14916. "type": "string"
  14917. },
  14918. "additions": {
  14919. "type": "number"
  14920. },
  14921. "deletions": {
  14922. "type": "number"
  14923. },
  14924. "status": {
  14925. "type": "string",
  14926. "enum": ["added", "deleted", "modified"]
  14927. }
  14928. },
  14929. "required": ["additions", "deletions"],
  14930. "additionalProperties": false
  14931. },
  14932. "PermissionAction": {
  14933. "type": "string",
  14934. "enum": ["allow", "deny", "ask"]
  14935. },
  14936. "PermissionRule": {
  14937. "type": "object",
  14938. "properties": {
  14939. "permission": {
  14940. "type": "string"
  14941. },
  14942. "pattern": {
  14943. "type": "string"
  14944. },
  14945. "action": {
  14946. "$ref": "#/components/schemas/PermissionAction"
  14947. }
  14948. },
  14949. "required": ["permission", "pattern", "action"],
  14950. "additionalProperties": false
  14951. },
  14952. "PermissionRuleset": {
  14953. "type": "array",
  14954. "items": {
  14955. "$ref": "#/components/schemas/PermissionRule"
  14956. }
  14957. },
  14958. "Session": {
  14959. "type": "object",
  14960. "properties": {
  14961. "id": {
  14962. "type": "string",
  14963. "pattern": "^ses"
  14964. },
  14965. "slug": {
  14966. "type": "string"
  14967. },
  14968. "projectID": {
  14969. "type": "string"
  14970. },
  14971. "workspaceID": {
  14972. "type": "string",
  14973. "pattern": "^wrk"
  14974. },
  14975. "directory": {
  14976. "type": "string"
  14977. },
  14978. "path": {
  14979. "type": "string"
  14980. },
  14981. "parentID": {
  14982. "type": "string",
  14983. "pattern": "^ses"
  14984. },
  14985. "summary": {
  14986. "type": "object",
  14987. "properties": {
  14988. "additions": {
  14989. "type": "number"
  14990. },
  14991. "deletions": {
  14992. "type": "number"
  14993. },
  14994. "files": {
  14995. "type": "number"
  14996. },
  14997. "diffs": {
  14998. "type": "array",
  14999. "items": {
  15000. "$ref": "#/components/schemas/SnapshotFileDiff"
  15001. }
  15002. }
  15003. },
  15004. "required": ["additions", "deletions", "files"],
  15005. "additionalProperties": false
  15006. },
  15007. "cost": {
  15008. "type": "number"
  15009. },
  15010. "tokens": {
  15011. "type": "object",
  15012. "properties": {
  15013. "input": {
  15014. "type": "number"
  15015. },
  15016. "output": {
  15017. "type": "number"
  15018. },
  15019. "reasoning": {
  15020. "type": "number"
  15021. },
  15022. "cache": {
  15023. "type": "object",
  15024. "properties": {
  15025. "read": {
  15026. "type": "number"
  15027. },
  15028. "write": {
  15029. "type": "number"
  15030. }
  15031. },
  15032. "required": ["read", "write"],
  15033. "additionalProperties": false
  15034. }
  15035. },
  15036. "required": ["input", "output", "reasoning", "cache"],
  15037. "additionalProperties": false
  15038. },
  15039. "share": {
  15040. "type": "object",
  15041. "properties": {
  15042. "url": {
  15043. "type": "string"
  15044. }
  15045. },
  15046. "required": ["url"],
  15047. "additionalProperties": false
  15048. },
  15049. "title": {
  15050. "type": "string"
  15051. },
  15052. "agent": {
  15053. "type": "string"
  15054. },
  15055. "model": {
  15056. "type": "object",
  15057. "properties": {
  15058. "id": {
  15059. "type": "string"
  15060. },
  15061. "providerID": {
  15062. "type": "string"
  15063. },
  15064. "variant": {
  15065. "type": "string"
  15066. }
  15067. },
  15068. "required": ["id", "providerID"],
  15069. "additionalProperties": false
  15070. },
  15071. "version": {
  15072. "type": "string"
  15073. },
  15074. "metadata": {
  15075. "type": "object"
  15076. },
  15077. "time": {
  15078. "type": "object",
  15079. "properties": {
  15080. "created": {
  15081. "type": "integer",
  15082. "minimum": 0
  15083. },
  15084. "updated": {
  15085. "type": "integer",
  15086. "minimum": 0
  15087. },
  15088. "compacting": {
  15089. "type": "integer",
  15090. "minimum": 0
  15091. },
  15092. "archived": {
  15093. "type": "number"
  15094. }
  15095. },
  15096. "required": ["created", "updated"],
  15097. "additionalProperties": false
  15098. },
  15099. "permission": {
  15100. "$ref": "#/components/schemas/PermissionRuleset"
  15101. },
  15102. "revert": {
  15103. "type": "object",
  15104. "properties": {
  15105. "messageID": {
  15106. "type": "string",
  15107. "pattern": "^msg"
  15108. },
  15109. "partID": {
  15110. "type": "string",
  15111. "pattern": "^prt"
  15112. },
  15113. "snapshot": {
  15114. "type": "string"
  15115. },
  15116. "diff": {
  15117. "type": "string"
  15118. }
  15119. },
  15120. "required": ["messageID"],
  15121. "additionalProperties": false
  15122. }
  15123. },
  15124. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  15125. "additionalProperties": false
  15126. },
  15127. "OutputFormatText": {
  15128. "type": "object",
  15129. "properties": {
  15130. "type": {
  15131. "type": "string",
  15132. "enum": ["text"]
  15133. }
  15134. },
  15135. "required": ["type"],
  15136. "additionalProperties": false
  15137. },
  15138. "JSONSchema": {
  15139. "type": "object"
  15140. },
  15141. "OutputFormatJsonSchema": {
  15142. "type": "object",
  15143. "properties": {
  15144. "type": {
  15145. "type": "string",
  15146. "enum": ["json_schema"]
  15147. },
  15148. "schema": {
  15149. "$ref": "#/components/schemas/JSONSchema"
  15150. },
  15151. "retryCount": {
  15152. "type": "integer",
  15153. "minimum": 0
  15154. }
  15155. },
  15156. "required": ["type", "schema"],
  15157. "additionalProperties": false
  15158. },
  15159. "OutputFormat": {
  15160. "anyOf": [
  15161. {
  15162. "$ref": "#/components/schemas/OutputFormatText"
  15163. },
  15164. {
  15165. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  15166. }
  15167. ]
  15168. },
  15169. "UserMessage": {
  15170. "type": "object",
  15171. "properties": {
  15172. "id": {
  15173. "type": "string",
  15174. "pattern": "^msg"
  15175. },
  15176. "sessionID": {
  15177. "type": "string",
  15178. "pattern": "^ses"
  15179. },
  15180. "role": {
  15181. "type": "string",
  15182. "enum": ["user"]
  15183. },
  15184. "time": {
  15185. "type": "object",
  15186. "properties": {
  15187. "created": {
  15188. "type": "number",
  15189. "minimum": 0
  15190. }
  15191. },
  15192. "required": ["created"],
  15193. "additionalProperties": false
  15194. },
  15195. "format": {
  15196. "$ref": "#/components/schemas/OutputFormat"
  15197. },
  15198. "summary": {
  15199. "type": "object",
  15200. "properties": {
  15201. "title": {
  15202. "type": "string"
  15203. },
  15204. "body": {
  15205. "type": "string"
  15206. },
  15207. "diffs": {
  15208. "type": "array",
  15209. "items": {
  15210. "$ref": "#/components/schemas/SnapshotFileDiff"
  15211. }
  15212. }
  15213. },
  15214. "required": ["diffs"],
  15215. "additionalProperties": false
  15216. },
  15217. "agent": {
  15218. "type": "string"
  15219. },
  15220. "model": {
  15221. "type": "object",
  15222. "properties": {
  15223. "providerID": {
  15224. "type": "string"
  15225. },
  15226. "modelID": {
  15227. "type": "string"
  15228. },
  15229. "variant": {
  15230. "type": "string"
  15231. }
  15232. },
  15233. "required": ["providerID", "modelID"],
  15234. "additionalProperties": false
  15235. },
  15236. "system": {
  15237. "type": "string"
  15238. },
  15239. "tools": {
  15240. "type": "object",
  15241. "additionalProperties": {
  15242. "type": "boolean"
  15243. }
  15244. }
  15245. },
  15246. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  15247. "additionalProperties": false
  15248. },
  15249. "ProviderAuthError": {
  15250. "type": "object",
  15251. "properties": {
  15252. "name": {
  15253. "type": "string",
  15254. "enum": ["ProviderAuthError"]
  15255. },
  15256. "data": {
  15257. "type": "object",
  15258. "properties": {
  15259. "providerID": {
  15260. "type": "string"
  15261. },
  15262. "message": {
  15263. "type": "string"
  15264. }
  15265. },
  15266. "required": ["providerID", "message"],
  15267. "additionalProperties": false
  15268. }
  15269. },
  15270. "required": ["name", "data"],
  15271. "additionalProperties": false
  15272. },
  15273. "UnknownError": {
  15274. "type": "object",
  15275. "properties": {
  15276. "name": {
  15277. "type": "string",
  15278. "enum": ["UnknownError"]
  15279. },
  15280. "data": {
  15281. "type": "object",
  15282. "properties": {
  15283. "message": {
  15284. "type": "string"
  15285. },
  15286. "ref": {
  15287. "type": "string"
  15288. }
  15289. },
  15290. "required": ["message"],
  15291. "additionalProperties": false
  15292. }
  15293. },
  15294. "required": ["name", "data"],
  15295. "additionalProperties": false
  15296. },
  15297. "MessageOutputLengthError": {
  15298. "type": "object",
  15299. "properties": {
  15300. "name": {
  15301. "type": "string",
  15302. "enum": ["MessageOutputLengthError"]
  15303. },
  15304. "data": {
  15305. "type": "object",
  15306. "properties": {}
  15307. }
  15308. },
  15309. "required": ["name", "data"],
  15310. "additionalProperties": false
  15311. },
  15312. "MessageAbortedError": {
  15313. "type": "object",
  15314. "properties": {
  15315. "name": {
  15316. "type": "string",
  15317. "enum": ["MessageAbortedError"]
  15318. },
  15319. "data": {
  15320. "type": "object",
  15321. "properties": {
  15322. "message": {
  15323. "type": "string"
  15324. }
  15325. },
  15326. "required": ["message"],
  15327. "additionalProperties": false
  15328. }
  15329. },
  15330. "required": ["name", "data"],
  15331. "additionalProperties": false
  15332. },
  15333. "StructuredOutputError": {
  15334. "type": "object",
  15335. "properties": {
  15336. "name": {
  15337. "type": "string",
  15338. "enum": ["StructuredOutputError"]
  15339. },
  15340. "data": {
  15341. "type": "object",
  15342. "properties": {
  15343. "message": {
  15344. "type": "string"
  15345. },
  15346. "retries": {
  15347. "type": "integer",
  15348. "minimum": 0
  15349. }
  15350. },
  15351. "required": ["message", "retries"],
  15352. "additionalProperties": false
  15353. }
  15354. },
  15355. "required": ["name", "data"],
  15356. "additionalProperties": false
  15357. },
  15358. "ContextOverflowError": {
  15359. "type": "object",
  15360. "properties": {
  15361. "name": {
  15362. "type": "string",
  15363. "enum": ["ContextOverflowError"]
  15364. },
  15365. "data": {
  15366. "type": "object",
  15367. "properties": {
  15368. "message": {
  15369. "type": "string"
  15370. },
  15371. "responseBody": {
  15372. "type": "string"
  15373. }
  15374. },
  15375. "required": ["message"],
  15376. "additionalProperties": false
  15377. }
  15378. },
  15379. "required": ["name", "data"],
  15380. "additionalProperties": false
  15381. },
  15382. "ContentFilterError": {
  15383. "type": "object",
  15384. "properties": {
  15385. "name": {
  15386. "type": "string",
  15387. "enum": ["ContentFilterError"]
  15388. },
  15389. "data": {
  15390. "type": "object",
  15391. "properties": {
  15392. "message": {
  15393. "type": "string"
  15394. }
  15395. },
  15396. "required": ["message"],
  15397. "additionalProperties": false
  15398. }
  15399. },
  15400. "required": ["name", "data"],
  15401. "additionalProperties": false
  15402. },
  15403. "APIError": {
  15404. "type": "object",
  15405. "properties": {
  15406. "name": {
  15407. "type": "string",
  15408. "enum": ["APIError"]
  15409. },
  15410. "data": {
  15411. "type": "object",
  15412. "properties": {
  15413. "message": {
  15414. "type": "string"
  15415. },
  15416. "statusCode": {
  15417. "type": "integer",
  15418. "minimum": 0
  15419. },
  15420. "isRetryable": {
  15421. "type": "boolean"
  15422. },
  15423. "responseHeaders": {
  15424. "type": "object",
  15425. "additionalProperties": {
  15426. "type": "string"
  15427. }
  15428. },
  15429. "responseBody": {
  15430. "type": "string"
  15431. },
  15432. "metadata": {
  15433. "type": "object",
  15434. "additionalProperties": {
  15435. "type": "string"
  15436. }
  15437. }
  15438. },
  15439. "required": ["message", "isRetryable"],
  15440. "additionalProperties": false
  15441. }
  15442. },
  15443. "required": ["name", "data"],
  15444. "additionalProperties": false
  15445. },
  15446. "AssistantMessage": {
  15447. "type": "object",
  15448. "properties": {
  15449. "id": {
  15450. "type": "string",
  15451. "pattern": "^msg"
  15452. },
  15453. "sessionID": {
  15454. "type": "string",
  15455. "pattern": "^ses"
  15456. },
  15457. "role": {
  15458. "type": "string",
  15459. "enum": ["assistant"]
  15460. },
  15461. "time": {
  15462. "type": "object",
  15463. "properties": {
  15464. "created": {
  15465. "type": "integer",
  15466. "minimum": 0
  15467. },
  15468. "completed": {
  15469. "type": "integer",
  15470. "minimum": 0
  15471. }
  15472. },
  15473. "required": ["created"],
  15474. "additionalProperties": false
  15475. },
  15476. "error": {
  15477. "anyOf": [
  15478. {
  15479. "$ref": "#/components/schemas/ProviderAuthError"
  15480. },
  15481. {
  15482. "$ref": "#/components/schemas/UnknownError"
  15483. },
  15484. {
  15485. "$ref": "#/components/schemas/MessageOutputLengthError"
  15486. },
  15487. {
  15488. "$ref": "#/components/schemas/MessageAbortedError"
  15489. },
  15490. {
  15491. "$ref": "#/components/schemas/StructuredOutputError"
  15492. },
  15493. {
  15494. "$ref": "#/components/schemas/ContextOverflowError"
  15495. },
  15496. {
  15497. "$ref": "#/components/schemas/ContentFilterError"
  15498. },
  15499. {
  15500. "$ref": "#/components/schemas/APIError"
  15501. }
  15502. ]
  15503. },
  15504. "parentID": {
  15505. "type": "string",
  15506. "pattern": "^msg"
  15507. },
  15508. "modelID": {
  15509. "type": "string"
  15510. },
  15511. "providerID": {
  15512. "type": "string"
  15513. },
  15514. "mode": {
  15515. "type": "string"
  15516. },
  15517. "agent": {
  15518. "type": "string"
  15519. },
  15520. "path": {
  15521. "type": "object",
  15522. "properties": {
  15523. "cwd": {
  15524. "type": "string"
  15525. },
  15526. "root": {
  15527. "type": "string"
  15528. }
  15529. },
  15530. "required": ["cwd", "root"],
  15531. "additionalProperties": false
  15532. },
  15533. "summary": {
  15534. "type": "boolean"
  15535. },
  15536. "cost": {
  15537. "type": "number"
  15538. },
  15539. "tokens": {
  15540. "type": "object",
  15541. "properties": {
  15542. "total": {
  15543. "type": "number"
  15544. },
  15545. "input": {
  15546. "type": "number"
  15547. },
  15548. "output": {
  15549. "type": "number"
  15550. },
  15551. "reasoning": {
  15552. "type": "number"
  15553. },
  15554. "cache": {
  15555. "type": "object",
  15556. "properties": {
  15557. "read": {
  15558. "type": "number"
  15559. },
  15560. "write": {
  15561. "type": "number"
  15562. }
  15563. },
  15564. "required": ["read", "write"],
  15565. "additionalProperties": false
  15566. }
  15567. },
  15568. "required": ["input", "output", "reasoning", "cache"],
  15569. "additionalProperties": false
  15570. },
  15571. "structured": {},
  15572. "variant": {
  15573. "type": "string"
  15574. },
  15575. "finish": {
  15576. "type": "string"
  15577. }
  15578. },
  15579. "required": [
  15580. "id",
  15581. "sessionID",
  15582. "role",
  15583. "time",
  15584. "parentID",
  15585. "modelID",
  15586. "providerID",
  15587. "mode",
  15588. "agent",
  15589. "path",
  15590. "cost",
  15591. "tokens"
  15592. ],
  15593. "additionalProperties": false
  15594. },
  15595. "Message": {
  15596. "anyOf": [
  15597. {
  15598. "$ref": "#/components/schemas/UserMessage"
  15599. },
  15600. {
  15601. "$ref": "#/components/schemas/AssistantMessage"
  15602. }
  15603. ]
  15604. },
  15605. "TextPart": {
  15606. "type": "object",
  15607. "properties": {
  15608. "id": {
  15609. "type": "string",
  15610. "pattern": "^prt"
  15611. },
  15612. "sessionID": {
  15613. "type": "string",
  15614. "pattern": "^ses"
  15615. },
  15616. "messageID": {
  15617. "type": "string",
  15618. "pattern": "^msg"
  15619. },
  15620. "type": {
  15621. "type": "string",
  15622. "enum": ["text"]
  15623. },
  15624. "text": {
  15625. "type": "string"
  15626. },
  15627. "synthetic": {
  15628. "type": "boolean"
  15629. },
  15630. "ignored": {
  15631. "type": "boolean"
  15632. },
  15633. "time": {
  15634. "type": "object",
  15635. "properties": {
  15636. "start": {
  15637. "type": "integer",
  15638. "minimum": 0
  15639. },
  15640. "end": {
  15641. "type": "integer",
  15642. "minimum": 0
  15643. }
  15644. },
  15645. "required": ["start"],
  15646. "additionalProperties": false
  15647. },
  15648. "metadata": {
  15649. "type": "object"
  15650. }
  15651. },
  15652. "required": ["id", "sessionID", "messageID", "type", "text"],
  15653. "additionalProperties": false
  15654. },
  15655. "SubtaskPart": {
  15656. "type": "object",
  15657. "properties": {
  15658. "id": {
  15659. "type": "string",
  15660. "pattern": "^prt"
  15661. },
  15662. "sessionID": {
  15663. "type": "string",
  15664. "pattern": "^ses"
  15665. },
  15666. "messageID": {
  15667. "type": "string",
  15668. "pattern": "^msg"
  15669. },
  15670. "type": {
  15671. "type": "string",
  15672. "enum": ["subtask"]
  15673. },
  15674. "prompt": {
  15675. "type": "string"
  15676. },
  15677. "description": {
  15678. "type": "string"
  15679. },
  15680. "agent": {
  15681. "type": "string"
  15682. },
  15683. "model": {
  15684. "type": "object",
  15685. "properties": {
  15686. "providerID": {
  15687. "type": "string"
  15688. },
  15689. "modelID": {
  15690. "type": "string"
  15691. }
  15692. },
  15693. "required": ["providerID", "modelID"],
  15694. "additionalProperties": false
  15695. },
  15696. "command": {
  15697. "type": "string"
  15698. }
  15699. },
  15700. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  15701. "additionalProperties": false
  15702. },
  15703. "ReasoningPart": {
  15704. "type": "object",
  15705. "properties": {
  15706. "id": {
  15707. "type": "string",
  15708. "pattern": "^prt"
  15709. },
  15710. "sessionID": {
  15711. "type": "string",
  15712. "pattern": "^ses"
  15713. },
  15714. "messageID": {
  15715. "type": "string",
  15716. "pattern": "^msg"
  15717. },
  15718. "type": {
  15719. "type": "string",
  15720. "enum": ["reasoning"]
  15721. },
  15722. "text": {
  15723. "type": "string"
  15724. },
  15725. "metadata": {
  15726. "type": "object"
  15727. },
  15728. "time": {
  15729. "type": "object",
  15730. "properties": {
  15731. "start": {
  15732. "type": "integer",
  15733. "minimum": 0
  15734. },
  15735. "end": {
  15736. "type": "integer",
  15737. "minimum": 0
  15738. }
  15739. },
  15740. "required": ["start"],
  15741. "additionalProperties": false
  15742. }
  15743. },
  15744. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  15745. "additionalProperties": false
  15746. },
  15747. "FilePartSourceText": {
  15748. "type": "object",
  15749. "properties": {
  15750. "value": {
  15751. "type": "string"
  15752. },
  15753. "start": {
  15754. "type": "number"
  15755. },
  15756. "end": {
  15757. "type": "number"
  15758. }
  15759. },
  15760. "required": ["value", "start", "end"],
  15761. "additionalProperties": false
  15762. },
  15763. "FileSource": {
  15764. "type": "object",
  15765. "properties": {
  15766. "text": {
  15767. "$ref": "#/components/schemas/FilePartSourceText"
  15768. },
  15769. "type": {
  15770. "type": "string",
  15771. "enum": ["file"]
  15772. },
  15773. "path": {
  15774. "type": "string"
  15775. }
  15776. },
  15777. "required": ["text", "type", "path"],
  15778. "additionalProperties": false
  15779. },
  15780. "Range": {
  15781. "type": "object",
  15782. "properties": {
  15783. "start": {
  15784. "type": "object",
  15785. "properties": {
  15786. "line": {
  15787. "type": "integer",
  15788. "minimum": 0
  15789. },
  15790. "character": {
  15791. "type": "integer",
  15792. "minimum": 0
  15793. }
  15794. },
  15795. "required": ["line", "character"],
  15796. "additionalProperties": false
  15797. },
  15798. "end": {
  15799. "type": "object",
  15800. "properties": {
  15801. "line": {
  15802. "type": "integer",
  15803. "minimum": 0
  15804. },
  15805. "character": {
  15806. "type": "integer",
  15807. "minimum": 0
  15808. }
  15809. },
  15810. "required": ["line", "character"],
  15811. "additionalProperties": false
  15812. }
  15813. },
  15814. "required": ["start", "end"],
  15815. "additionalProperties": false
  15816. },
  15817. "SymbolSource": {
  15818. "type": "object",
  15819. "properties": {
  15820. "text": {
  15821. "$ref": "#/components/schemas/FilePartSourceText"
  15822. },
  15823. "type": {
  15824. "type": "string",
  15825. "enum": ["symbol"]
  15826. },
  15827. "path": {
  15828. "type": "string"
  15829. },
  15830. "range": {
  15831. "$ref": "#/components/schemas/Range"
  15832. },
  15833. "name": {
  15834. "type": "string"
  15835. },
  15836. "kind": {
  15837. "type": "integer",
  15838. "minimum": 0
  15839. }
  15840. },
  15841. "required": ["text", "type", "path", "range", "name", "kind"],
  15842. "additionalProperties": false
  15843. },
  15844. "ResourceSource": {
  15845. "type": "object",
  15846. "properties": {
  15847. "text": {
  15848. "$ref": "#/components/schemas/FilePartSourceText"
  15849. },
  15850. "type": {
  15851. "type": "string",
  15852. "enum": ["resource"]
  15853. },
  15854. "clientName": {
  15855. "type": "string"
  15856. },
  15857. "uri": {
  15858. "type": "string"
  15859. }
  15860. },
  15861. "required": ["text", "type", "clientName", "uri"],
  15862. "additionalProperties": false
  15863. },
  15864. "FilePartSource": {
  15865. "anyOf": [
  15866. {
  15867. "$ref": "#/components/schemas/FileSource"
  15868. },
  15869. {
  15870. "$ref": "#/components/schemas/SymbolSource"
  15871. },
  15872. {
  15873. "$ref": "#/components/schemas/ResourceSource"
  15874. }
  15875. ]
  15876. },
  15877. "FilePart": {
  15878. "type": "object",
  15879. "properties": {
  15880. "id": {
  15881. "type": "string",
  15882. "pattern": "^prt"
  15883. },
  15884. "sessionID": {
  15885. "type": "string",
  15886. "pattern": "^ses"
  15887. },
  15888. "messageID": {
  15889. "type": "string",
  15890. "pattern": "^msg"
  15891. },
  15892. "type": {
  15893. "type": "string",
  15894. "enum": ["file"]
  15895. },
  15896. "mime": {
  15897. "type": "string"
  15898. },
  15899. "filename": {
  15900. "type": "string"
  15901. },
  15902. "url": {
  15903. "type": "string"
  15904. },
  15905. "source": {
  15906. "$ref": "#/components/schemas/FilePartSource"
  15907. }
  15908. },
  15909. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  15910. "additionalProperties": false
  15911. },
  15912. "ToolStatePending": {
  15913. "type": "object",
  15914. "properties": {
  15915. "status": {
  15916. "type": "string",
  15917. "enum": ["pending"]
  15918. },
  15919. "input": {
  15920. "type": "object"
  15921. },
  15922. "raw": {
  15923. "type": "string"
  15924. }
  15925. },
  15926. "required": ["status", "input", "raw"],
  15927. "additionalProperties": false
  15928. },
  15929. "ToolStateRunning": {
  15930. "type": "object",
  15931. "properties": {
  15932. "status": {
  15933. "type": "string",
  15934. "enum": ["running"]
  15935. },
  15936. "input": {
  15937. "type": "object"
  15938. },
  15939. "title": {
  15940. "type": "string"
  15941. },
  15942. "metadata": {
  15943. "type": "object"
  15944. },
  15945. "time": {
  15946. "type": "object",
  15947. "properties": {
  15948. "start": {
  15949. "type": "integer",
  15950. "minimum": 0
  15951. }
  15952. },
  15953. "required": ["start"],
  15954. "additionalProperties": false
  15955. }
  15956. },
  15957. "required": ["status", "input", "time"],
  15958. "additionalProperties": false
  15959. },
  15960. "ToolStateCompleted": {
  15961. "type": "object",
  15962. "properties": {
  15963. "status": {
  15964. "type": "string",
  15965. "enum": ["completed"]
  15966. },
  15967. "input": {
  15968. "type": "object"
  15969. },
  15970. "output": {
  15971. "type": "string"
  15972. },
  15973. "title": {
  15974. "type": "string"
  15975. },
  15976. "metadata": {
  15977. "type": "object"
  15978. },
  15979. "time": {
  15980. "type": "object",
  15981. "properties": {
  15982. "start": {
  15983. "type": "integer",
  15984. "minimum": 0
  15985. },
  15986. "end": {
  15987. "type": "integer",
  15988. "minimum": 0
  15989. },
  15990. "compacted": {
  15991. "type": "integer",
  15992. "minimum": 0
  15993. }
  15994. },
  15995. "required": ["start", "end"],
  15996. "additionalProperties": false
  15997. },
  15998. "attachments": {
  15999. "type": "array",
  16000. "items": {
  16001. "$ref": "#/components/schemas/FilePart"
  16002. }
  16003. }
  16004. },
  16005. "required": ["status", "input", "output", "title", "metadata", "time"],
  16006. "additionalProperties": false
  16007. },
  16008. "ToolStateError": {
  16009. "type": "object",
  16010. "properties": {
  16011. "status": {
  16012. "type": "string",
  16013. "enum": ["error"]
  16014. },
  16015. "input": {
  16016. "type": "object"
  16017. },
  16018. "error": {
  16019. "type": "string"
  16020. },
  16021. "metadata": {
  16022. "type": "object"
  16023. },
  16024. "time": {
  16025. "type": "object",
  16026. "properties": {
  16027. "start": {
  16028. "type": "integer",
  16029. "minimum": 0
  16030. },
  16031. "end": {
  16032. "type": "integer",
  16033. "minimum": 0
  16034. }
  16035. },
  16036. "required": ["start", "end"],
  16037. "additionalProperties": false
  16038. }
  16039. },
  16040. "required": ["status", "input", "error", "time"],
  16041. "additionalProperties": false
  16042. },
  16043. "ToolState": {
  16044. "anyOf": [
  16045. {
  16046. "$ref": "#/components/schemas/ToolStatePending"
  16047. },
  16048. {
  16049. "$ref": "#/components/schemas/ToolStateRunning"
  16050. },
  16051. {
  16052. "$ref": "#/components/schemas/ToolStateCompleted"
  16053. },
  16054. {
  16055. "$ref": "#/components/schemas/ToolStateError"
  16056. }
  16057. ]
  16058. },
  16059. "ToolPart": {
  16060. "type": "object",
  16061. "properties": {
  16062. "id": {
  16063. "type": "string",
  16064. "pattern": "^prt"
  16065. },
  16066. "sessionID": {
  16067. "type": "string",
  16068. "pattern": "^ses"
  16069. },
  16070. "messageID": {
  16071. "type": "string",
  16072. "pattern": "^msg"
  16073. },
  16074. "type": {
  16075. "type": "string",
  16076. "enum": ["tool"]
  16077. },
  16078. "callID": {
  16079. "type": "string"
  16080. },
  16081. "tool": {
  16082. "type": "string"
  16083. },
  16084. "state": {
  16085. "$ref": "#/components/schemas/ToolState"
  16086. },
  16087. "metadata": {
  16088. "type": "object"
  16089. }
  16090. },
  16091. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  16092. "additionalProperties": false
  16093. },
  16094. "StepStartPart": {
  16095. "type": "object",
  16096. "properties": {
  16097. "id": {
  16098. "type": "string",
  16099. "pattern": "^prt"
  16100. },
  16101. "sessionID": {
  16102. "type": "string",
  16103. "pattern": "^ses"
  16104. },
  16105. "messageID": {
  16106. "type": "string",
  16107. "pattern": "^msg"
  16108. },
  16109. "type": {
  16110. "type": "string",
  16111. "enum": ["step-start"]
  16112. },
  16113. "snapshot": {
  16114. "type": "string"
  16115. }
  16116. },
  16117. "required": ["id", "sessionID", "messageID", "type"],
  16118. "additionalProperties": false
  16119. },
  16120. "StepFinishPart": {
  16121. "type": "object",
  16122. "properties": {
  16123. "id": {
  16124. "type": "string",
  16125. "pattern": "^prt"
  16126. },
  16127. "sessionID": {
  16128. "type": "string",
  16129. "pattern": "^ses"
  16130. },
  16131. "messageID": {
  16132. "type": "string",
  16133. "pattern": "^msg"
  16134. },
  16135. "type": {
  16136. "type": "string",
  16137. "enum": ["step-finish"]
  16138. },
  16139. "reason": {
  16140. "type": "string"
  16141. },
  16142. "snapshot": {
  16143. "type": "string"
  16144. },
  16145. "cost": {
  16146. "type": "number"
  16147. },
  16148. "tokens": {
  16149. "type": "object",
  16150. "properties": {
  16151. "total": {
  16152. "type": "number"
  16153. },
  16154. "input": {
  16155. "type": "number"
  16156. },
  16157. "output": {
  16158. "type": "number"
  16159. },
  16160. "reasoning": {
  16161. "type": "number"
  16162. },
  16163. "cache": {
  16164. "type": "object",
  16165. "properties": {
  16166. "read": {
  16167. "type": "number"
  16168. },
  16169. "write": {
  16170. "type": "number"
  16171. }
  16172. },
  16173. "required": ["read", "write"],
  16174. "additionalProperties": false
  16175. }
  16176. },
  16177. "required": ["input", "output", "reasoning", "cache"],
  16178. "additionalProperties": false
  16179. }
  16180. },
  16181. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  16182. "additionalProperties": false
  16183. },
  16184. "SnapshotPart": {
  16185. "type": "object",
  16186. "properties": {
  16187. "id": {
  16188. "type": "string",
  16189. "pattern": "^prt"
  16190. },
  16191. "sessionID": {
  16192. "type": "string",
  16193. "pattern": "^ses"
  16194. },
  16195. "messageID": {
  16196. "type": "string",
  16197. "pattern": "^msg"
  16198. },
  16199. "type": {
  16200. "type": "string",
  16201. "enum": ["snapshot"]
  16202. },
  16203. "snapshot": {
  16204. "type": "string"
  16205. }
  16206. },
  16207. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  16208. "additionalProperties": false
  16209. },
  16210. "PatchPart": {
  16211. "type": "object",
  16212. "properties": {
  16213. "id": {
  16214. "type": "string",
  16215. "pattern": "^prt"
  16216. },
  16217. "sessionID": {
  16218. "type": "string",
  16219. "pattern": "^ses"
  16220. },
  16221. "messageID": {
  16222. "type": "string",
  16223. "pattern": "^msg"
  16224. },
  16225. "type": {
  16226. "type": "string",
  16227. "enum": ["patch"]
  16228. },
  16229. "hash": {
  16230. "type": "string"
  16231. },
  16232. "files": {
  16233. "type": "array",
  16234. "items": {
  16235. "type": "string"
  16236. }
  16237. }
  16238. },
  16239. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  16240. "additionalProperties": false
  16241. },
  16242. "AgentPart": {
  16243. "type": "object",
  16244. "properties": {
  16245. "id": {
  16246. "type": "string",
  16247. "pattern": "^prt"
  16248. },
  16249. "sessionID": {
  16250. "type": "string",
  16251. "pattern": "^ses"
  16252. },
  16253. "messageID": {
  16254. "type": "string",
  16255. "pattern": "^msg"
  16256. },
  16257. "type": {
  16258. "type": "string",
  16259. "enum": ["agent"]
  16260. },
  16261. "name": {
  16262. "type": "string"
  16263. },
  16264. "source": {
  16265. "type": "object",
  16266. "properties": {
  16267. "value": {
  16268. "type": "string"
  16269. },
  16270. "start": {
  16271. "type": "integer",
  16272. "minimum": 0
  16273. },
  16274. "end": {
  16275. "type": "integer",
  16276. "minimum": 0
  16277. }
  16278. },
  16279. "required": ["value", "start", "end"],
  16280. "additionalProperties": false
  16281. }
  16282. },
  16283. "required": ["id", "sessionID", "messageID", "type", "name"],
  16284. "additionalProperties": false
  16285. },
  16286. "RetryPart": {
  16287. "type": "object",
  16288. "properties": {
  16289. "id": {
  16290. "type": "string",
  16291. "pattern": "^prt"
  16292. },
  16293. "sessionID": {
  16294. "type": "string",
  16295. "pattern": "^ses"
  16296. },
  16297. "messageID": {
  16298. "type": "string",
  16299. "pattern": "^msg"
  16300. },
  16301. "type": {
  16302. "type": "string",
  16303. "enum": ["retry"]
  16304. },
  16305. "attempt": {
  16306. "type": "integer",
  16307. "minimum": 0
  16308. },
  16309. "error": {
  16310. "$ref": "#/components/schemas/APIError"
  16311. },
  16312. "time": {
  16313. "type": "object",
  16314. "properties": {
  16315. "created": {
  16316. "type": "integer",
  16317. "minimum": 0
  16318. }
  16319. },
  16320. "required": ["created"],
  16321. "additionalProperties": false
  16322. }
  16323. },
  16324. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  16325. "additionalProperties": false
  16326. },
  16327. "CompactionPart": {
  16328. "type": "object",
  16329. "properties": {
  16330. "id": {
  16331. "type": "string",
  16332. "pattern": "^prt"
  16333. },
  16334. "sessionID": {
  16335. "type": "string",
  16336. "pattern": "^ses"
  16337. },
  16338. "messageID": {
  16339. "type": "string",
  16340. "pattern": "^msg"
  16341. },
  16342. "type": {
  16343. "type": "string",
  16344. "enum": ["compaction"]
  16345. },
  16346. "auto": {
  16347. "type": "boolean"
  16348. },
  16349. "overflow": {
  16350. "type": "boolean"
  16351. },
  16352. "tail_start_id": {
  16353. "type": "string",
  16354. "pattern": "^msg"
  16355. }
  16356. },
  16357. "required": ["id", "sessionID", "messageID", "type", "auto"],
  16358. "additionalProperties": false
  16359. },
  16360. "Part": {
  16361. "anyOf": [
  16362. {
  16363. "$ref": "#/components/schemas/TextPart"
  16364. },
  16365. {
  16366. "$ref": "#/components/schemas/SubtaskPart"
  16367. },
  16368. {
  16369. "$ref": "#/components/schemas/ReasoningPart"
  16370. },
  16371. {
  16372. "$ref": "#/components/schemas/FilePart"
  16373. },
  16374. {
  16375. "$ref": "#/components/schemas/ToolPart"
  16376. },
  16377. {
  16378. "$ref": "#/components/schemas/StepStartPart"
  16379. },
  16380. {
  16381. "$ref": "#/components/schemas/StepFinishPart"
  16382. },
  16383. {
  16384. "$ref": "#/components/schemas/SnapshotPart"
  16385. },
  16386. {
  16387. "$ref": "#/components/schemas/PatchPart"
  16388. },
  16389. {
  16390. "$ref": "#/components/schemas/AgentPart"
  16391. },
  16392. {
  16393. "$ref": "#/components/schemas/RetryPart"
  16394. },
  16395. {
  16396. "$ref": "#/components/schemas/CompactionPart"
  16397. }
  16398. ]
  16399. },
  16400. "Prompt": {
  16401. "type": "object",
  16402. "properties": {
  16403. "text": {
  16404. "type": "string"
  16405. },
  16406. "files": {
  16407. "type": "array",
  16408. "items": {
  16409. "$ref": "#/components/schemas/PromptFileAttachment"
  16410. }
  16411. },
  16412. "agents": {
  16413. "type": "array",
  16414. "items": {
  16415. "$ref": "#/components/schemas/PromptAgentAttachment"
  16416. }
  16417. }
  16418. },
  16419. "required": ["text"],
  16420. "additionalProperties": false
  16421. },
  16422. "Pty": {
  16423. "type": "object",
  16424. "properties": {
  16425. "id": {
  16426. "type": "string",
  16427. "pattern": "^pty"
  16428. },
  16429. "title": {
  16430. "type": "string"
  16431. },
  16432. "command": {
  16433. "type": "string"
  16434. },
  16435. "args": {
  16436. "type": "array",
  16437. "items": {
  16438. "type": "string"
  16439. }
  16440. },
  16441. "cwd": {
  16442. "type": "string"
  16443. },
  16444. "status": {
  16445. "type": "string",
  16446. "enum": ["running", "exited"]
  16447. },
  16448. "pid": {
  16449. "type": "integer",
  16450. "minimum": 0
  16451. },
  16452. "exitCode": {
  16453. "type": "integer",
  16454. "minimum": 0
  16455. }
  16456. },
  16457. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  16458. "additionalProperties": false
  16459. },
  16460. "Todo": {
  16461. "type": "object",
  16462. "properties": {
  16463. "content": {
  16464. "type": "string",
  16465. "description": "Brief description of the task"
  16466. },
  16467. "status": {
  16468. "type": "string",
  16469. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  16470. },
  16471. "priority": {
  16472. "type": "string",
  16473. "description": "Priority level of the task: high, medium, low"
  16474. }
  16475. },
  16476. "required": ["content", "status", "priority"],
  16477. "additionalProperties": false
  16478. },
  16479. "SessionStatus": {
  16480. "anyOf": [
  16481. {
  16482. "type": "object",
  16483. "properties": {
  16484. "type": {
  16485. "type": "string",
  16486. "enum": ["idle"]
  16487. }
  16488. },
  16489. "required": ["type"],
  16490. "additionalProperties": false
  16491. },
  16492. {
  16493. "type": "object",
  16494. "properties": {
  16495. "type": {
  16496. "type": "string",
  16497. "enum": ["retry"]
  16498. },
  16499. "attempt": {
  16500. "type": "integer",
  16501. "minimum": 0
  16502. },
  16503. "message": {
  16504. "type": "string"
  16505. },
  16506. "action": {
  16507. "type": "object",
  16508. "properties": {
  16509. "reason": {
  16510. "type": "string"
  16511. },
  16512. "provider": {
  16513. "type": "string"
  16514. },
  16515. "title": {
  16516. "type": "string"
  16517. },
  16518. "message": {
  16519. "type": "string"
  16520. },
  16521. "label": {
  16522. "type": "string"
  16523. },
  16524. "link": {
  16525. "type": "string"
  16526. }
  16527. },
  16528. "required": ["reason", "provider", "title", "message", "label"],
  16529. "additionalProperties": false
  16530. },
  16531. "next": {
  16532. "type": "integer",
  16533. "minimum": 0
  16534. }
  16535. },
  16536. "required": ["type", "attempt", "message", "next"],
  16537. "additionalProperties": false
  16538. },
  16539. {
  16540. "type": "object",
  16541. "properties": {
  16542. "type": {
  16543. "type": "string",
  16544. "enum": ["busy"]
  16545. }
  16546. },
  16547. "required": ["type"],
  16548. "additionalProperties": false
  16549. }
  16550. ]
  16551. },
  16552. "QuestionOption": {
  16553. "type": "object",
  16554. "properties": {
  16555. "label": {
  16556. "type": "string",
  16557. "description": "Display text (1-5 words, concise)"
  16558. },
  16559. "description": {
  16560. "type": "string",
  16561. "description": "Explanation of choice"
  16562. }
  16563. },
  16564. "required": ["label", "description"],
  16565. "additionalProperties": false
  16566. },
  16567. "QuestionInfo": {
  16568. "type": "object",
  16569. "properties": {
  16570. "question": {
  16571. "type": "string",
  16572. "description": "Complete question"
  16573. },
  16574. "header": {
  16575. "type": "string",
  16576. "description": "Very short label (max 30 chars)"
  16577. },
  16578. "options": {
  16579. "type": "array",
  16580. "items": {
  16581. "$ref": "#/components/schemas/QuestionOption"
  16582. },
  16583. "description": "Available choices"
  16584. },
  16585. "multiple": {
  16586. "type": "boolean"
  16587. },
  16588. "custom": {
  16589. "type": "boolean"
  16590. }
  16591. },
  16592. "required": ["question", "header", "options"],
  16593. "additionalProperties": false
  16594. },
  16595. "QuestionTool": {
  16596. "type": "object",
  16597. "properties": {
  16598. "messageID": {
  16599. "type": "string",
  16600. "pattern": "^msg"
  16601. },
  16602. "callID": {
  16603. "type": "string"
  16604. }
  16605. },
  16606. "required": ["messageID", "callID"],
  16607. "additionalProperties": false
  16608. },
  16609. "QuestionAnswer": {
  16610. "type": "array",
  16611. "items": {
  16612. "type": "string"
  16613. }
  16614. },
  16615. "GlobalEvent": {
  16616. "type": "object",
  16617. "properties": {
  16618. "directory": {
  16619. "type": "string"
  16620. },
  16621. "project": {
  16622. "type": "string"
  16623. },
  16624. "workspace": {
  16625. "type": "string"
  16626. },
  16627. "payload": {
  16628. "anyOf": [
  16629. {
  16630. "type": "object",
  16631. "properties": {
  16632. "id": {
  16633. "type": "string",
  16634. "pattern": "^evt_"
  16635. },
  16636. "type": {
  16637. "type": "string",
  16638. "enum": ["models-dev.refreshed"]
  16639. },
  16640. "properties": {
  16641. "type": "object",
  16642. "properties": {}
  16643. }
  16644. },
  16645. "required": ["id", "type", "properties"],
  16646. "additionalProperties": false
  16647. },
  16648. {
  16649. "type": "object",
  16650. "properties": {
  16651. "id": {
  16652. "type": "string",
  16653. "pattern": "^evt_"
  16654. },
  16655. "type": {
  16656. "type": "string",
  16657. "enum": ["plugin.added"]
  16658. },
  16659. "properties": {
  16660. "type": "object",
  16661. "properties": {
  16662. "id": {
  16663. "type": "string"
  16664. }
  16665. },
  16666. "required": ["id"],
  16667. "additionalProperties": false
  16668. }
  16669. },
  16670. "required": ["id", "type", "properties"],
  16671. "additionalProperties": false
  16672. },
  16673. {
  16674. "type": "object",
  16675. "properties": {
  16676. "id": {
  16677. "type": "string",
  16678. "pattern": "^evt_"
  16679. },
  16680. "type": {
  16681. "type": "string",
  16682. "enum": ["integration.updated"]
  16683. },
  16684. "properties": {
  16685. "type": "object",
  16686. "properties": {}
  16687. }
  16688. },
  16689. "required": ["id", "type", "properties"],
  16690. "additionalProperties": false
  16691. },
  16692. {
  16693. "type": "object",
  16694. "properties": {
  16695. "id": {
  16696. "type": "string",
  16697. "pattern": "^evt_"
  16698. },
  16699. "type": {
  16700. "type": "string",
  16701. "enum": ["catalog.updated"]
  16702. },
  16703. "properties": {
  16704. "type": "object",
  16705. "properties": {}
  16706. }
  16707. },
  16708. "required": ["id", "type", "properties"],
  16709. "additionalProperties": false
  16710. },
  16711. {
  16712. "type": "object",
  16713. "properties": {
  16714. "id": {
  16715. "type": "string",
  16716. "pattern": "^evt_"
  16717. },
  16718. "type": {
  16719. "type": "string",
  16720. "enum": ["session.created"]
  16721. },
  16722. "properties": {
  16723. "type": "object",
  16724. "properties": {
  16725. "sessionID": {
  16726. "type": "string",
  16727. "pattern": "^ses"
  16728. },
  16729. "info": {
  16730. "$ref": "#/components/schemas/Session"
  16731. }
  16732. },
  16733. "required": ["sessionID", "info"],
  16734. "additionalProperties": false
  16735. }
  16736. },
  16737. "required": ["id", "type", "properties"],
  16738. "additionalProperties": false
  16739. },
  16740. {
  16741. "type": "object",
  16742. "properties": {
  16743. "id": {
  16744. "type": "string",
  16745. "pattern": "^evt_"
  16746. },
  16747. "type": {
  16748. "type": "string",
  16749. "enum": ["session.updated"]
  16750. },
  16751. "properties": {
  16752. "type": "object",
  16753. "properties": {
  16754. "sessionID": {
  16755. "type": "string",
  16756. "pattern": "^ses"
  16757. },
  16758. "info": {
  16759. "$ref": "#/components/schemas/Session"
  16760. }
  16761. },
  16762. "required": ["sessionID", "info"],
  16763. "additionalProperties": false
  16764. }
  16765. },
  16766. "required": ["id", "type", "properties"],
  16767. "additionalProperties": false
  16768. },
  16769. {
  16770. "type": "object",
  16771. "properties": {
  16772. "id": {
  16773. "type": "string",
  16774. "pattern": "^evt_"
  16775. },
  16776. "type": {
  16777. "type": "string",
  16778. "enum": ["session.deleted"]
  16779. },
  16780. "properties": {
  16781. "type": "object",
  16782. "properties": {
  16783. "sessionID": {
  16784. "type": "string",
  16785. "pattern": "^ses"
  16786. },
  16787. "info": {
  16788. "$ref": "#/components/schemas/Session"
  16789. }
  16790. },
  16791. "required": ["sessionID", "info"],
  16792. "additionalProperties": false
  16793. }
  16794. },
  16795. "required": ["id", "type", "properties"],
  16796. "additionalProperties": false
  16797. },
  16798. {
  16799. "type": "object",
  16800. "properties": {
  16801. "id": {
  16802. "type": "string",
  16803. "pattern": "^evt_"
  16804. },
  16805. "type": {
  16806. "type": "string",
  16807. "enum": ["message.updated"]
  16808. },
  16809. "properties": {
  16810. "type": "object",
  16811. "properties": {
  16812. "sessionID": {
  16813. "type": "string",
  16814. "pattern": "^ses"
  16815. },
  16816. "info": {
  16817. "$ref": "#/components/schemas/Message"
  16818. }
  16819. },
  16820. "required": ["sessionID", "info"],
  16821. "additionalProperties": false
  16822. }
  16823. },
  16824. "required": ["id", "type", "properties"],
  16825. "additionalProperties": false
  16826. },
  16827. {
  16828. "type": "object",
  16829. "properties": {
  16830. "id": {
  16831. "type": "string",
  16832. "pattern": "^evt_"
  16833. },
  16834. "type": {
  16835. "type": "string",
  16836. "enum": ["message.removed"]
  16837. },
  16838. "properties": {
  16839. "type": "object",
  16840. "properties": {
  16841. "sessionID": {
  16842. "type": "string",
  16843. "pattern": "^ses"
  16844. },
  16845. "messageID": {
  16846. "type": "string",
  16847. "pattern": "^msg"
  16848. }
  16849. },
  16850. "required": ["sessionID", "messageID"],
  16851. "additionalProperties": false
  16852. }
  16853. },
  16854. "required": ["id", "type", "properties"],
  16855. "additionalProperties": false
  16856. },
  16857. {
  16858. "type": "object",
  16859. "properties": {
  16860. "id": {
  16861. "type": "string",
  16862. "pattern": "^evt_"
  16863. },
  16864. "type": {
  16865. "type": "string",
  16866. "enum": ["message.part.updated"]
  16867. },
  16868. "properties": {
  16869. "type": "object",
  16870. "properties": {
  16871. "sessionID": {
  16872. "type": "string",
  16873. "pattern": "^ses"
  16874. },
  16875. "part": {
  16876. "$ref": "#/components/schemas/Part"
  16877. },
  16878. "time": {
  16879. "type": "number"
  16880. }
  16881. },
  16882. "required": ["sessionID", "part", "time"],
  16883. "additionalProperties": false
  16884. }
  16885. },
  16886. "required": ["id", "type", "properties"],
  16887. "additionalProperties": false
  16888. },
  16889. {
  16890. "type": "object",
  16891. "properties": {
  16892. "id": {
  16893. "type": "string",
  16894. "pattern": "^evt_"
  16895. },
  16896. "type": {
  16897. "type": "string",
  16898. "enum": ["message.part.removed"]
  16899. },
  16900. "properties": {
  16901. "type": "object",
  16902. "properties": {
  16903. "sessionID": {
  16904. "type": "string",
  16905. "pattern": "^ses"
  16906. },
  16907. "messageID": {
  16908. "type": "string",
  16909. "pattern": "^msg"
  16910. },
  16911. "partID": {
  16912. "type": "string",
  16913. "pattern": "^prt"
  16914. }
  16915. },
  16916. "required": ["sessionID", "messageID", "partID"],
  16917. "additionalProperties": false
  16918. }
  16919. },
  16920. "required": ["id", "type", "properties"],
  16921. "additionalProperties": false
  16922. },
  16923. {
  16924. "type": "object",
  16925. "properties": {
  16926. "id": {
  16927. "type": "string",
  16928. "pattern": "^evt_"
  16929. },
  16930. "type": {
  16931. "type": "string",
  16932. "enum": ["session.next.agent.switched"]
  16933. },
  16934. "properties": {
  16935. "type": "object",
  16936. "properties": {
  16937. "timestamp": {
  16938. "type": "number"
  16939. },
  16940. "sessionID": {
  16941. "type": "string",
  16942. "pattern": "^ses"
  16943. },
  16944. "messageID": {
  16945. "type": "string",
  16946. "pattern": "^msg_"
  16947. },
  16948. "agent": {
  16949. "type": "string"
  16950. }
  16951. },
  16952. "required": ["timestamp", "sessionID", "messageID", "agent"],
  16953. "additionalProperties": false
  16954. }
  16955. },
  16956. "required": ["id", "type", "properties"],
  16957. "additionalProperties": false
  16958. },
  16959. {
  16960. "type": "object",
  16961. "properties": {
  16962. "id": {
  16963. "type": "string",
  16964. "pattern": "^evt_"
  16965. },
  16966. "type": {
  16967. "type": "string",
  16968. "enum": ["session.next.model.switched"]
  16969. },
  16970. "properties": {
  16971. "type": "object",
  16972. "properties": {
  16973. "timestamp": {
  16974. "type": "number"
  16975. },
  16976. "sessionID": {
  16977. "type": "string",
  16978. "pattern": "^ses"
  16979. },
  16980. "messageID": {
  16981. "type": "string",
  16982. "pattern": "^msg_"
  16983. },
  16984. "model": {
  16985. "type": "object",
  16986. "properties": {
  16987. "id": {
  16988. "type": "string"
  16989. },
  16990. "providerID": {
  16991. "type": "string"
  16992. },
  16993. "variant": {
  16994. "type": "string"
  16995. }
  16996. },
  16997. "required": ["id", "providerID"],
  16998. "additionalProperties": false
  16999. }
  17000. },
  17001. "required": ["timestamp", "sessionID", "messageID", "model"],
  17002. "additionalProperties": false
  17003. }
  17004. },
  17005. "required": ["id", "type", "properties"],
  17006. "additionalProperties": false
  17007. },
  17008. {
  17009. "type": "object",
  17010. "properties": {
  17011. "id": {
  17012. "type": "string",
  17013. "pattern": "^evt_"
  17014. },
  17015. "type": {
  17016. "type": "string",
  17017. "enum": ["session.next.moved"]
  17018. },
  17019. "properties": {
  17020. "type": "object",
  17021. "properties": {
  17022. "timestamp": {
  17023. "type": "number"
  17024. },
  17025. "sessionID": {
  17026. "type": "string",
  17027. "pattern": "^ses"
  17028. },
  17029. "location": {
  17030. "$ref": "#/components/schemas/LocationRef"
  17031. },
  17032. "subdirectory": {
  17033. "type": "string"
  17034. }
  17035. },
  17036. "required": ["timestamp", "sessionID", "location"],
  17037. "additionalProperties": false
  17038. }
  17039. },
  17040. "required": ["id", "type", "properties"],
  17041. "additionalProperties": false
  17042. },
  17043. {
  17044. "type": "object",
  17045. "properties": {
  17046. "id": {
  17047. "type": "string",
  17048. "pattern": "^evt_"
  17049. },
  17050. "type": {
  17051. "type": "string",
  17052. "enum": ["session.next.prompted"]
  17053. },
  17054. "properties": {
  17055. "type": "object",
  17056. "properties": {
  17057. "timestamp": {
  17058. "type": "number"
  17059. },
  17060. "sessionID": {
  17061. "type": "string",
  17062. "pattern": "^ses"
  17063. },
  17064. "messageID": {
  17065. "type": "string",
  17066. "pattern": "^msg_"
  17067. },
  17068. "prompt": {
  17069. "$ref": "#/components/schemas/Prompt"
  17070. },
  17071. "delivery": {
  17072. "type": "string",
  17073. "enum": ["steer", "queue"]
  17074. }
  17075. },
  17076. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17077. "additionalProperties": false
  17078. }
  17079. },
  17080. "required": ["id", "type", "properties"],
  17081. "additionalProperties": false
  17082. },
  17083. {
  17084. "type": "object",
  17085. "properties": {
  17086. "id": {
  17087. "type": "string",
  17088. "pattern": "^evt_"
  17089. },
  17090. "type": {
  17091. "type": "string",
  17092. "enum": ["session.next.prompt.admitted"]
  17093. },
  17094. "properties": {
  17095. "type": "object",
  17096. "properties": {
  17097. "timestamp": {
  17098. "type": "number"
  17099. },
  17100. "sessionID": {
  17101. "type": "string",
  17102. "pattern": "^ses"
  17103. },
  17104. "messageID": {
  17105. "type": "string",
  17106. "pattern": "^msg_"
  17107. },
  17108. "prompt": {
  17109. "$ref": "#/components/schemas/Prompt"
  17110. },
  17111. "delivery": {
  17112. "type": "string",
  17113. "enum": ["steer", "queue"]
  17114. }
  17115. },
  17116. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17117. "additionalProperties": false
  17118. }
  17119. },
  17120. "required": ["id", "type", "properties"],
  17121. "additionalProperties": false
  17122. },
  17123. {
  17124. "type": "object",
  17125. "properties": {
  17126. "id": {
  17127. "type": "string",
  17128. "pattern": "^evt_"
  17129. },
  17130. "type": {
  17131. "type": "string",
  17132. "enum": ["session.next.prompt.promoted"]
  17133. },
  17134. "properties": {
  17135. "type": "object",
  17136. "properties": {
  17137. "timestamp": {
  17138. "type": "number"
  17139. },
  17140. "sessionID": {
  17141. "type": "string",
  17142. "pattern": "^ses"
  17143. },
  17144. "messageID": {
  17145. "type": "string",
  17146. "pattern": "^msg_"
  17147. },
  17148. "prompt": {
  17149. "$ref": "#/components/schemas/Prompt"
  17150. },
  17151. "timeCreated": {
  17152. "type": "number"
  17153. }
  17154. },
  17155. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  17156. "additionalProperties": false
  17157. }
  17158. },
  17159. "required": ["id", "type", "properties"],
  17160. "additionalProperties": false
  17161. },
  17162. {
  17163. "type": "object",
  17164. "properties": {
  17165. "id": {
  17166. "type": "string",
  17167. "pattern": "^evt_"
  17168. },
  17169. "type": {
  17170. "type": "string",
  17171. "enum": ["session.next.interrupt.requested"]
  17172. },
  17173. "properties": {
  17174. "type": "object",
  17175. "properties": {
  17176. "timestamp": {
  17177. "type": "number"
  17178. },
  17179. "sessionID": {
  17180. "type": "string",
  17181. "pattern": "^ses"
  17182. }
  17183. },
  17184. "required": ["timestamp", "sessionID"],
  17185. "additionalProperties": false
  17186. }
  17187. },
  17188. "required": ["id", "type", "properties"],
  17189. "additionalProperties": false
  17190. },
  17191. {
  17192. "type": "object",
  17193. "properties": {
  17194. "id": {
  17195. "type": "string",
  17196. "pattern": "^evt_"
  17197. },
  17198. "type": {
  17199. "type": "string",
  17200. "enum": ["session.next.context.updated"]
  17201. },
  17202. "properties": {
  17203. "type": "object",
  17204. "properties": {
  17205. "timestamp": {
  17206. "type": "number"
  17207. },
  17208. "sessionID": {
  17209. "type": "string",
  17210. "pattern": "^ses"
  17211. },
  17212. "messageID": {
  17213. "type": "string",
  17214. "pattern": "^msg_"
  17215. },
  17216. "text": {
  17217. "type": "string"
  17218. }
  17219. },
  17220. "required": ["timestamp", "sessionID", "messageID", "text"],
  17221. "additionalProperties": false
  17222. }
  17223. },
  17224. "required": ["id", "type", "properties"],
  17225. "additionalProperties": false
  17226. },
  17227. {
  17228. "type": "object",
  17229. "properties": {
  17230. "id": {
  17231. "type": "string",
  17232. "pattern": "^evt_"
  17233. },
  17234. "type": {
  17235. "type": "string",
  17236. "enum": ["session.next.synthetic"]
  17237. },
  17238. "properties": {
  17239. "type": "object",
  17240. "properties": {
  17241. "timestamp": {
  17242. "type": "number"
  17243. },
  17244. "sessionID": {
  17245. "type": "string",
  17246. "pattern": "^ses"
  17247. },
  17248. "messageID": {
  17249. "type": "string",
  17250. "pattern": "^msg_"
  17251. },
  17252. "text": {
  17253. "type": "string"
  17254. }
  17255. },
  17256. "required": ["timestamp", "sessionID", "messageID", "text"],
  17257. "additionalProperties": false
  17258. }
  17259. },
  17260. "required": ["id", "type", "properties"],
  17261. "additionalProperties": false
  17262. },
  17263. {
  17264. "type": "object",
  17265. "properties": {
  17266. "id": {
  17267. "type": "string",
  17268. "pattern": "^evt_"
  17269. },
  17270. "type": {
  17271. "type": "string",
  17272. "enum": ["session.next.shell.started"]
  17273. },
  17274. "properties": {
  17275. "type": "object",
  17276. "properties": {
  17277. "timestamp": {
  17278. "type": "number"
  17279. },
  17280. "sessionID": {
  17281. "type": "string",
  17282. "pattern": "^ses"
  17283. },
  17284. "messageID": {
  17285. "type": "string",
  17286. "pattern": "^msg_"
  17287. },
  17288. "callID": {
  17289. "type": "string"
  17290. },
  17291. "command": {
  17292. "type": "string"
  17293. }
  17294. },
  17295. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  17296. "additionalProperties": false
  17297. }
  17298. },
  17299. "required": ["id", "type", "properties"],
  17300. "additionalProperties": false
  17301. },
  17302. {
  17303. "type": "object",
  17304. "properties": {
  17305. "id": {
  17306. "type": "string",
  17307. "pattern": "^evt_"
  17308. },
  17309. "type": {
  17310. "type": "string",
  17311. "enum": ["session.next.shell.ended"]
  17312. },
  17313. "properties": {
  17314. "type": "object",
  17315. "properties": {
  17316. "timestamp": {
  17317. "type": "number"
  17318. },
  17319. "sessionID": {
  17320. "type": "string",
  17321. "pattern": "^ses"
  17322. },
  17323. "callID": {
  17324. "type": "string"
  17325. },
  17326. "output": {
  17327. "type": "string"
  17328. }
  17329. },
  17330. "required": ["timestamp", "sessionID", "callID", "output"],
  17331. "additionalProperties": false
  17332. }
  17333. },
  17334. "required": ["id", "type", "properties"],
  17335. "additionalProperties": false
  17336. },
  17337. {
  17338. "type": "object",
  17339. "properties": {
  17340. "id": {
  17341. "type": "string",
  17342. "pattern": "^evt_"
  17343. },
  17344. "type": {
  17345. "type": "string",
  17346. "enum": ["session.next.step.started"]
  17347. },
  17348. "properties": {
  17349. "type": "object",
  17350. "properties": {
  17351. "timestamp": {
  17352. "type": "number"
  17353. },
  17354. "sessionID": {
  17355. "type": "string",
  17356. "pattern": "^ses"
  17357. },
  17358. "assistantMessageID": {
  17359. "type": "string",
  17360. "pattern": "^msg_"
  17361. },
  17362. "agent": {
  17363. "type": "string"
  17364. },
  17365. "model": {
  17366. "type": "object",
  17367. "properties": {
  17368. "id": {
  17369. "type": "string"
  17370. },
  17371. "providerID": {
  17372. "type": "string"
  17373. },
  17374. "variant": {
  17375. "type": "string"
  17376. }
  17377. },
  17378. "required": ["id", "providerID"],
  17379. "additionalProperties": false
  17380. },
  17381. "snapshot": {
  17382. "type": "string"
  17383. }
  17384. },
  17385. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  17386. "additionalProperties": false
  17387. }
  17388. },
  17389. "required": ["id", "type", "properties"],
  17390. "additionalProperties": false
  17391. },
  17392. {
  17393. "type": "object",
  17394. "properties": {
  17395. "id": {
  17396. "type": "string",
  17397. "pattern": "^evt_"
  17398. },
  17399. "type": {
  17400. "type": "string",
  17401. "enum": ["session.next.step.ended"]
  17402. },
  17403. "properties": {
  17404. "type": "object",
  17405. "properties": {
  17406. "timestamp": {
  17407. "type": "number"
  17408. },
  17409. "sessionID": {
  17410. "type": "string",
  17411. "pattern": "^ses"
  17412. },
  17413. "assistantMessageID": {
  17414. "type": "string",
  17415. "pattern": "^msg_"
  17416. },
  17417. "finish": {
  17418. "type": "string"
  17419. },
  17420. "cost": {
  17421. "type": "number"
  17422. },
  17423. "tokens": {
  17424. "type": "object",
  17425. "properties": {
  17426. "input": {
  17427. "type": "number"
  17428. },
  17429. "output": {
  17430. "type": "number"
  17431. },
  17432. "reasoning": {
  17433. "type": "number"
  17434. },
  17435. "cache": {
  17436. "type": "object",
  17437. "properties": {
  17438. "read": {
  17439. "type": "number"
  17440. },
  17441. "write": {
  17442. "type": "number"
  17443. }
  17444. },
  17445. "required": ["read", "write"],
  17446. "additionalProperties": false
  17447. }
  17448. },
  17449. "required": ["input", "output", "reasoning", "cache"],
  17450. "additionalProperties": false
  17451. },
  17452. "snapshot": {
  17453. "type": "string"
  17454. }
  17455. },
  17456. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  17457. "additionalProperties": false
  17458. }
  17459. },
  17460. "required": ["id", "type", "properties"],
  17461. "additionalProperties": false
  17462. },
  17463. {
  17464. "type": "object",
  17465. "properties": {
  17466. "id": {
  17467. "type": "string",
  17468. "pattern": "^evt_"
  17469. },
  17470. "type": {
  17471. "type": "string",
  17472. "enum": ["session.next.step.failed"]
  17473. },
  17474. "properties": {
  17475. "type": "object",
  17476. "properties": {
  17477. "timestamp": {
  17478. "type": "number"
  17479. },
  17480. "sessionID": {
  17481. "type": "string",
  17482. "pattern": "^ses"
  17483. },
  17484. "assistantMessageID": {
  17485. "type": "string",
  17486. "pattern": "^msg_"
  17487. },
  17488. "error": {
  17489. "$ref": "#/components/schemas/SessionErrorUnknown"
  17490. }
  17491. },
  17492. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  17493. "additionalProperties": false
  17494. }
  17495. },
  17496. "required": ["id", "type", "properties"],
  17497. "additionalProperties": false
  17498. },
  17499. {
  17500. "type": "object",
  17501. "properties": {
  17502. "id": {
  17503. "type": "string",
  17504. "pattern": "^evt_"
  17505. },
  17506. "type": {
  17507. "type": "string",
  17508. "enum": ["session.next.text.started"]
  17509. },
  17510. "properties": {
  17511. "type": "object",
  17512. "properties": {
  17513. "timestamp": {
  17514. "type": "number"
  17515. },
  17516. "sessionID": {
  17517. "type": "string",
  17518. "pattern": "^ses"
  17519. },
  17520. "assistantMessageID": {
  17521. "type": "string",
  17522. "pattern": "^msg_"
  17523. },
  17524. "textID": {
  17525. "type": "string"
  17526. }
  17527. },
  17528. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  17529. "additionalProperties": false
  17530. }
  17531. },
  17532. "required": ["id", "type", "properties"],
  17533. "additionalProperties": false
  17534. },
  17535. {
  17536. "type": "object",
  17537. "properties": {
  17538. "id": {
  17539. "type": "string",
  17540. "pattern": "^evt_"
  17541. },
  17542. "type": {
  17543. "type": "string",
  17544. "enum": ["session.next.text.delta"]
  17545. },
  17546. "properties": {
  17547. "type": "object",
  17548. "properties": {
  17549. "timestamp": {
  17550. "type": "number"
  17551. },
  17552. "sessionID": {
  17553. "type": "string",
  17554. "pattern": "^ses"
  17555. },
  17556. "assistantMessageID": {
  17557. "type": "string",
  17558. "pattern": "^msg_"
  17559. },
  17560. "textID": {
  17561. "type": "string"
  17562. },
  17563. "delta": {
  17564. "type": "string"
  17565. }
  17566. },
  17567. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  17568. "additionalProperties": false
  17569. }
  17570. },
  17571. "required": ["id", "type", "properties"],
  17572. "additionalProperties": false
  17573. },
  17574. {
  17575. "type": "object",
  17576. "properties": {
  17577. "id": {
  17578. "type": "string",
  17579. "pattern": "^evt_"
  17580. },
  17581. "type": {
  17582. "type": "string",
  17583. "enum": ["session.next.text.ended"]
  17584. },
  17585. "properties": {
  17586. "type": "object",
  17587. "properties": {
  17588. "timestamp": {
  17589. "type": "number"
  17590. },
  17591. "sessionID": {
  17592. "type": "string",
  17593. "pattern": "^ses"
  17594. },
  17595. "assistantMessageID": {
  17596. "type": "string",
  17597. "pattern": "^msg_"
  17598. },
  17599. "textID": {
  17600. "type": "string"
  17601. },
  17602. "text": {
  17603. "type": "string"
  17604. }
  17605. },
  17606. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  17607. "additionalProperties": false
  17608. }
  17609. },
  17610. "required": ["id", "type", "properties"],
  17611. "additionalProperties": false
  17612. },
  17613. {
  17614. "type": "object",
  17615. "properties": {
  17616. "id": {
  17617. "type": "string",
  17618. "pattern": "^evt_"
  17619. },
  17620. "type": {
  17621. "type": "string",
  17622. "enum": ["session.next.reasoning.started"]
  17623. },
  17624. "properties": {
  17625. "type": "object",
  17626. "properties": {
  17627. "timestamp": {
  17628. "type": "number"
  17629. },
  17630. "sessionID": {
  17631. "type": "string",
  17632. "pattern": "^ses"
  17633. },
  17634. "assistantMessageID": {
  17635. "type": "string",
  17636. "pattern": "^msg_"
  17637. },
  17638. "reasoningID": {
  17639. "type": "string"
  17640. },
  17641. "providerMetadata": {
  17642. "type": "object",
  17643. "additionalProperties": {
  17644. "type": "object"
  17645. }
  17646. }
  17647. },
  17648. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  17649. "additionalProperties": false
  17650. }
  17651. },
  17652. "required": ["id", "type", "properties"],
  17653. "additionalProperties": false
  17654. },
  17655. {
  17656. "type": "object",
  17657. "properties": {
  17658. "id": {
  17659. "type": "string",
  17660. "pattern": "^evt_"
  17661. },
  17662. "type": {
  17663. "type": "string",
  17664. "enum": ["session.next.reasoning.delta"]
  17665. },
  17666. "properties": {
  17667. "type": "object",
  17668. "properties": {
  17669. "timestamp": {
  17670. "type": "number"
  17671. },
  17672. "sessionID": {
  17673. "type": "string",
  17674. "pattern": "^ses"
  17675. },
  17676. "assistantMessageID": {
  17677. "type": "string",
  17678. "pattern": "^msg_"
  17679. },
  17680. "reasoningID": {
  17681. "type": "string"
  17682. },
  17683. "delta": {
  17684. "type": "string"
  17685. }
  17686. },
  17687. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  17688. "additionalProperties": false
  17689. }
  17690. },
  17691. "required": ["id", "type", "properties"],
  17692. "additionalProperties": false
  17693. },
  17694. {
  17695. "type": "object",
  17696. "properties": {
  17697. "id": {
  17698. "type": "string",
  17699. "pattern": "^evt_"
  17700. },
  17701. "type": {
  17702. "type": "string",
  17703. "enum": ["session.next.reasoning.ended"]
  17704. },
  17705. "properties": {
  17706. "type": "object",
  17707. "properties": {
  17708. "timestamp": {
  17709. "type": "number"
  17710. },
  17711. "sessionID": {
  17712. "type": "string",
  17713. "pattern": "^ses"
  17714. },
  17715. "assistantMessageID": {
  17716. "type": "string",
  17717. "pattern": "^msg_"
  17718. },
  17719. "reasoningID": {
  17720. "type": "string"
  17721. },
  17722. "text": {
  17723. "type": "string"
  17724. },
  17725. "providerMetadata": {
  17726. "type": "object",
  17727. "additionalProperties": {
  17728. "type": "object"
  17729. }
  17730. }
  17731. },
  17732. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  17733. "additionalProperties": false
  17734. }
  17735. },
  17736. "required": ["id", "type", "properties"],
  17737. "additionalProperties": false
  17738. },
  17739. {
  17740. "type": "object",
  17741. "properties": {
  17742. "id": {
  17743. "type": "string",
  17744. "pattern": "^evt_"
  17745. },
  17746. "type": {
  17747. "type": "string",
  17748. "enum": ["session.next.tool.input.started"]
  17749. },
  17750. "properties": {
  17751. "type": "object",
  17752. "properties": {
  17753. "timestamp": {
  17754. "type": "number"
  17755. },
  17756. "sessionID": {
  17757. "type": "string",
  17758. "pattern": "^ses"
  17759. },
  17760. "assistantMessageID": {
  17761. "type": "string",
  17762. "pattern": "^msg_"
  17763. },
  17764. "callID": {
  17765. "type": "string"
  17766. },
  17767. "name": {
  17768. "type": "string"
  17769. }
  17770. },
  17771. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  17772. "additionalProperties": false
  17773. }
  17774. },
  17775. "required": ["id", "type", "properties"],
  17776. "additionalProperties": false
  17777. },
  17778. {
  17779. "type": "object",
  17780. "properties": {
  17781. "id": {
  17782. "type": "string",
  17783. "pattern": "^evt_"
  17784. },
  17785. "type": {
  17786. "type": "string",
  17787. "enum": ["session.next.tool.input.delta"]
  17788. },
  17789. "properties": {
  17790. "type": "object",
  17791. "properties": {
  17792. "timestamp": {
  17793. "type": "number"
  17794. },
  17795. "sessionID": {
  17796. "type": "string",
  17797. "pattern": "^ses"
  17798. },
  17799. "assistantMessageID": {
  17800. "type": "string",
  17801. "pattern": "^msg_"
  17802. },
  17803. "callID": {
  17804. "type": "string"
  17805. },
  17806. "delta": {
  17807. "type": "string"
  17808. }
  17809. },
  17810. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  17811. "additionalProperties": false
  17812. }
  17813. },
  17814. "required": ["id", "type", "properties"],
  17815. "additionalProperties": false
  17816. },
  17817. {
  17818. "type": "object",
  17819. "properties": {
  17820. "id": {
  17821. "type": "string",
  17822. "pattern": "^evt_"
  17823. },
  17824. "type": {
  17825. "type": "string",
  17826. "enum": ["session.next.tool.input.ended"]
  17827. },
  17828. "properties": {
  17829. "type": "object",
  17830. "properties": {
  17831. "timestamp": {
  17832. "type": "number"
  17833. },
  17834. "sessionID": {
  17835. "type": "string",
  17836. "pattern": "^ses"
  17837. },
  17838. "assistantMessageID": {
  17839. "type": "string",
  17840. "pattern": "^msg_"
  17841. },
  17842. "callID": {
  17843. "type": "string"
  17844. },
  17845. "text": {
  17846. "type": "string"
  17847. }
  17848. },
  17849. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  17850. "additionalProperties": false
  17851. }
  17852. },
  17853. "required": ["id", "type", "properties"],
  17854. "additionalProperties": false
  17855. },
  17856. {
  17857. "type": "object",
  17858. "properties": {
  17859. "id": {
  17860. "type": "string",
  17861. "pattern": "^evt_"
  17862. },
  17863. "type": {
  17864. "type": "string",
  17865. "enum": ["session.next.tool.called"]
  17866. },
  17867. "properties": {
  17868. "type": "object",
  17869. "properties": {
  17870. "timestamp": {
  17871. "type": "number"
  17872. },
  17873. "sessionID": {
  17874. "type": "string",
  17875. "pattern": "^ses"
  17876. },
  17877. "assistantMessageID": {
  17878. "type": "string",
  17879. "pattern": "^msg_"
  17880. },
  17881. "callID": {
  17882. "type": "string"
  17883. },
  17884. "tool": {
  17885. "type": "string"
  17886. },
  17887. "input": {
  17888. "type": "object"
  17889. },
  17890. "provider": {
  17891. "type": "object",
  17892. "properties": {
  17893. "executed": {
  17894. "type": "boolean"
  17895. },
  17896. "metadata": {
  17897. "type": "object",
  17898. "additionalProperties": {
  17899. "type": "object"
  17900. }
  17901. }
  17902. },
  17903. "required": ["executed"],
  17904. "additionalProperties": false
  17905. }
  17906. },
  17907. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  17908. "additionalProperties": false
  17909. }
  17910. },
  17911. "required": ["id", "type", "properties"],
  17912. "additionalProperties": false
  17913. },
  17914. {
  17915. "type": "object",
  17916. "properties": {
  17917. "id": {
  17918. "type": "string",
  17919. "pattern": "^evt_"
  17920. },
  17921. "type": {
  17922. "type": "string",
  17923. "enum": ["session.next.tool.progress"]
  17924. },
  17925. "properties": {
  17926. "type": "object",
  17927. "properties": {
  17928. "timestamp": {
  17929. "type": "number"
  17930. },
  17931. "sessionID": {
  17932. "type": "string",
  17933. "pattern": "^ses"
  17934. },
  17935. "assistantMessageID": {
  17936. "type": "string",
  17937. "pattern": "^msg_"
  17938. },
  17939. "callID": {
  17940. "type": "string"
  17941. },
  17942. "structured": {
  17943. "type": "object"
  17944. },
  17945. "content": {
  17946. "type": "array",
  17947. "items": {
  17948. "anyOf": [
  17949. {
  17950. "$ref": "#/components/schemas/ToolTextContent"
  17951. },
  17952. {
  17953. "$ref": "#/components/schemas/ToolFileContent"
  17954. }
  17955. ]
  17956. }
  17957. }
  17958. },
  17959. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  17960. "additionalProperties": false
  17961. }
  17962. },
  17963. "required": ["id", "type", "properties"],
  17964. "additionalProperties": false
  17965. },
  17966. {
  17967. "type": "object",
  17968. "properties": {
  17969. "id": {
  17970. "type": "string",
  17971. "pattern": "^evt_"
  17972. },
  17973. "type": {
  17974. "type": "string",
  17975. "enum": ["session.next.tool.success"]
  17976. },
  17977. "properties": {
  17978. "type": "object",
  17979. "properties": {
  17980. "timestamp": {
  17981. "type": "number"
  17982. },
  17983. "sessionID": {
  17984. "type": "string",
  17985. "pattern": "^ses"
  17986. },
  17987. "assistantMessageID": {
  17988. "type": "string",
  17989. "pattern": "^msg_"
  17990. },
  17991. "callID": {
  17992. "type": "string"
  17993. },
  17994. "structured": {
  17995. "type": "object"
  17996. },
  17997. "content": {
  17998. "type": "array",
  17999. "items": {
  18000. "anyOf": [
  18001. {
  18002. "$ref": "#/components/schemas/ToolTextContent"
  18003. },
  18004. {
  18005. "$ref": "#/components/schemas/ToolFileContent"
  18006. }
  18007. ]
  18008. }
  18009. },
  18010. "outputPaths": {
  18011. "type": "array",
  18012. "items": {
  18013. "type": "string"
  18014. }
  18015. },
  18016. "result": {},
  18017. "provider": {
  18018. "type": "object",
  18019. "properties": {
  18020. "executed": {
  18021. "type": "boolean"
  18022. },
  18023. "metadata": {
  18024. "type": "object",
  18025. "additionalProperties": {
  18026. "type": "object"
  18027. }
  18028. }
  18029. },
  18030. "required": ["executed"],
  18031. "additionalProperties": false
  18032. }
  18033. },
  18034. "required": [
  18035. "timestamp",
  18036. "sessionID",
  18037. "assistantMessageID",
  18038. "callID",
  18039. "structured",
  18040. "content",
  18041. "provider"
  18042. ],
  18043. "additionalProperties": false
  18044. }
  18045. },
  18046. "required": ["id", "type", "properties"],
  18047. "additionalProperties": false
  18048. },
  18049. {
  18050. "type": "object",
  18051. "properties": {
  18052. "id": {
  18053. "type": "string",
  18054. "pattern": "^evt_"
  18055. },
  18056. "type": {
  18057. "type": "string",
  18058. "enum": ["session.next.tool.failed"]
  18059. },
  18060. "properties": {
  18061. "type": "object",
  18062. "properties": {
  18063. "timestamp": {
  18064. "type": "number"
  18065. },
  18066. "sessionID": {
  18067. "type": "string",
  18068. "pattern": "^ses"
  18069. },
  18070. "assistantMessageID": {
  18071. "type": "string",
  18072. "pattern": "^msg_"
  18073. },
  18074. "callID": {
  18075. "type": "string"
  18076. },
  18077. "error": {
  18078. "$ref": "#/components/schemas/SessionErrorUnknown"
  18079. },
  18080. "result": {},
  18081. "provider": {
  18082. "type": "object",
  18083. "properties": {
  18084. "executed": {
  18085. "type": "boolean"
  18086. },
  18087. "metadata": {
  18088. "type": "object",
  18089. "additionalProperties": {
  18090. "type": "object"
  18091. }
  18092. }
  18093. },
  18094. "required": ["executed"],
  18095. "additionalProperties": false
  18096. }
  18097. },
  18098. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  18099. "additionalProperties": false
  18100. }
  18101. },
  18102. "required": ["id", "type", "properties"],
  18103. "additionalProperties": false
  18104. },
  18105. {
  18106. "type": "object",
  18107. "properties": {
  18108. "id": {
  18109. "type": "string",
  18110. "pattern": "^evt_"
  18111. },
  18112. "type": {
  18113. "type": "string",
  18114. "enum": ["session.next.retried"]
  18115. },
  18116. "properties": {
  18117. "type": "object",
  18118. "properties": {
  18119. "timestamp": {
  18120. "type": "number"
  18121. },
  18122. "sessionID": {
  18123. "type": "string",
  18124. "pattern": "^ses"
  18125. },
  18126. "attempt": {
  18127. "type": "number"
  18128. },
  18129. "error": {
  18130. "$ref": "#/components/schemas/SessionNextRetry_error"
  18131. }
  18132. },
  18133. "required": ["timestamp", "sessionID", "attempt", "error"],
  18134. "additionalProperties": false
  18135. }
  18136. },
  18137. "required": ["id", "type", "properties"],
  18138. "additionalProperties": false
  18139. },
  18140. {
  18141. "type": "object",
  18142. "properties": {
  18143. "id": {
  18144. "type": "string",
  18145. "pattern": "^evt_"
  18146. },
  18147. "type": {
  18148. "type": "string",
  18149. "enum": ["session.next.compaction.started"]
  18150. },
  18151. "properties": {
  18152. "type": "object",
  18153. "properties": {
  18154. "timestamp": {
  18155. "type": "number"
  18156. },
  18157. "sessionID": {
  18158. "type": "string",
  18159. "pattern": "^ses"
  18160. },
  18161. "messageID": {
  18162. "type": "string",
  18163. "pattern": "^msg_"
  18164. },
  18165. "reason": {
  18166. "type": "string",
  18167. "enum": ["auto", "manual"]
  18168. }
  18169. },
  18170. "required": ["timestamp", "sessionID", "messageID", "reason"],
  18171. "additionalProperties": false
  18172. }
  18173. },
  18174. "required": ["id", "type", "properties"],
  18175. "additionalProperties": false
  18176. },
  18177. {
  18178. "type": "object",
  18179. "properties": {
  18180. "id": {
  18181. "type": "string",
  18182. "pattern": "^evt_"
  18183. },
  18184. "type": {
  18185. "type": "string",
  18186. "enum": ["session.next.compaction.delta"]
  18187. },
  18188. "properties": {
  18189. "type": "object",
  18190. "properties": {
  18191. "timestamp": {
  18192. "type": "number"
  18193. },
  18194. "sessionID": {
  18195. "type": "string",
  18196. "pattern": "^ses"
  18197. },
  18198. "messageID": {
  18199. "type": "string",
  18200. "pattern": "^msg_"
  18201. },
  18202. "text": {
  18203. "type": "string"
  18204. }
  18205. },
  18206. "required": ["timestamp", "sessionID", "messageID", "text"],
  18207. "additionalProperties": false
  18208. }
  18209. },
  18210. "required": ["id", "type", "properties"],
  18211. "additionalProperties": false
  18212. },
  18213. {
  18214. "type": "object",
  18215. "properties": {
  18216. "id": {
  18217. "type": "string",
  18218. "pattern": "^evt_"
  18219. },
  18220. "type": {
  18221. "type": "string",
  18222. "enum": ["session.next.compaction.ended"]
  18223. },
  18224. "properties": {
  18225. "type": "object",
  18226. "properties": {
  18227. "timestamp": {
  18228. "type": "number"
  18229. },
  18230. "sessionID": {
  18231. "type": "string",
  18232. "pattern": "^ses"
  18233. },
  18234. "messageID": {
  18235. "type": "string",
  18236. "pattern": "^msg_"
  18237. },
  18238. "reason": {
  18239. "type": "string",
  18240. "enum": ["auto", "manual"]
  18241. },
  18242. "text": {
  18243. "type": "string"
  18244. },
  18245. "recent": {
  18246. "type": "string"
  18247. }
  18248. },
  18249. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  18250. "additionalProperties": false
  18251. }
  18252. },
  18253. "required": ["id", "type", "properties"],
  18254. "additionalProperties": false
  18255. },
  18256. {
  18257. "type": "object",
  18258. "properties": {
  18259. "id": {
  18260. "type": "string",
  18261. "pattern": "^evt_"
  18262. },
  18263. "type": {
  18264. "type": "string",
  18265. "enum": ["message.part.delta"]
  18266. },
  18267. "properties": {
  18268. "type": "object",
  18269. "properties": {
  18270. "sessionID": {
  18271. "type": "string",
  18272. "pattern": "^ses"
  18273. },
  18274. "messageID": {
  18275. "type": "string",
  18276. "pattern": "^msg"
  18277. },
  18278. "partID": {
  18279. "type": "string",
  18280. "pattern": "^prt"
  18281. },
  18282. "field": {
  18283. "type": "string"
  18284. },
  18285. "delta": {
  18286. "type": "string"
  18287. }
  18288. },
  18289. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  18290. "additionalProperties": false
  18291. }
  18292. },
  18293. "required": ["id", "type", "properties"],
  18294. "additionalProperties": false
  18295. },
  18296. {
  18297. "type": "object",
  18298. "properties": {
  18299. "id": {
  18300. "type": "string",
  18301. "pattern": "^evt_"
  18302. },
  18303. "type": {
  18304. "type": "string",
  18305. "enum": ["session.diff"]
  18306. },
  18307. "properties": {
  18308. "type": "object",
  18309. "properties": {
  18310. "sessionID": {
  18311. "type": "string",
  18312. "pattern": "^ses"
  18313. },
  18314. "diff": {
  18315. "type": "array",
  18316. "items": {
  18317. "$ref": "#/components/schemas/SnapshotFileDiff"
  18318. }
  18319. }
  18320. },
  18321. "required": ["sessionID", "diff"],
  18322. "additionalProperties": false
  18323. }
  18324. },
  18325. "required": ["id", "type", "properties"],
  18326. "additionalProperties": false
  18327. },
  18328. {
  18329. "type": "object",
  18330. "properties": {
  18331. "id": {
  18332. "type": "string",
  18333. "pattern": "^evt_"
  18334. },
  18335. "type": {
  18336. "type": "string",
  18337. "enum": ["session.error"]
  18338. },
  18339. "properties": {
  18340. "type": "object",
  18341. "properties": {
  18342. "sessionID": {
  18343. "type": "string",
  18344. "pattern": "^ses"
  18345. },
  18346. "error": {
  18347. "anyOf": [
  18348. {
  18349. "$ref": "#/components/schemas/ProviderAuthError"
  18350. },
  18351. {
  18352. "$ref": "#/components/schemas/UnknownError"
  18353. },
  18354. {
  18355. "$ref": "#/components/schemas/MessageOutputLengthError"
  18356. },
  18357. {
  18358. "$ref": "#/components/schemas/MessageAbortedError"
  18359. },
  18360. {
  18361. "$ref": "#/components/schemas/StructuredOutputError"
  18362. },
  18363. {
  18364. "$ref": "#/components/schemas/ContextOverflowError"
  18365. },
  18366. {
  18367. "$ref": "#/components/schemas/ContentFilterError"
  18368. },
  18369. {
  18370. "$ref": "#/components/schemas/APIError"
  18371. }
  18372. ]
  18373. }
  18374. },
  18375. "additionalProperties": false
  18376. }
  18377. },
  18378. "required": ["id", "type", "properties"],
  18379. "additionalProperties": false
  18380. },
  18381. {
  18382. "type": "object",
  18383. "properties": {
  18384. "id": {
  18385. "type": "string",
  18386. "pattern": "^evt_"
  18387. },
  18388. "type": {
  18389. "type": "string",
  18390. "enum": ["installation.updated"]
  18391. },
  18392. "properties": {
  18393. "type": "object",
  18394. "properties": {
  18395. "version": {
  18396. "type": "string"
  18397. }
  18398. },
  18399. "required": ["version"],
  18400. "additionalProperties": false
  18401. }
  18402. },
  18403. "required": ["id", "type", "properties"],
  18404. "additionalProperties": false
  18405. },
  18406. {
  18407. "type": "object",
  18408. "properties": {
  18409. "id": {
  18410. "type": "string",
  18411. "pattern": "^evt_"
  18412. },
  18413. "type": {
  18414. "type": "string",
  18415. "enum": ["installation.update-available"]
  18416. },
  18417. "properties": {
  18418. "type": "object",
  18419. "properties": {
  18420. "version": {
  18421. "type": "string"
  18422. }
  18423. },
  18424. "required": ["version"],
  18425. "additionalProperties": false
  18426. }
  18427. },
  18428. "required": ["id", "type", "properties"],
  18429. "additionalProperties": false
  18430. },
  18431. {
  18432. "type": "object",
  18433. "properties": {
  18434. "id": {
  18435. "type": "string",
  18436. "pattern": "^evt_"
  18437. },
  18438. "type": {
  18439. "type": "string",
  18440. "enum": ["file.edited"]
  18441. },
  18442. "properties": {
  18443. "type": "object",
  18444. "properties": {
  18445. "file": {
  18446. "type": "string"
  18447. }
  18448. },
  18449. "required": ["file"],
  18450. "additionalProperties": false
  18451. }
  18452. },
  18453. "required": ["id", "type", "properties"],
  18454. "additionalProperties": false
  18455. },
  18456. {
  18457. "type": "object",
  18458. "properties": {
  18459. "id": {
  18460. "type": "string",
  18461. "pattern": "^evt_"
  18462. },
  18463. "type": {
  18464. "type": "string",
  18465. "enum": ["permission.v2.asked"]
  18466. },
  18467. "properties": {
  18468. "type": "object",
  18469. "properties": {
  18470. "id": {
  18471. "type": "string",
  18472. "pattern": "^per"
  18473. },
  18474. "sessionID": {
  18475. "type": "string",
  18476. "pattern": "^ses"
  18477. },
  18478. "action": {
  18479. "type": "string"
  18480. },
  18481. "resources": {
  18482. "type": "array",
  18483. "items": {
  18484. "type": "string"
  18485. }
  18486. },
  18487. "save": {
  18488. "type": "array",
  18489. "items": {
  18490. "type": "string"
  18491. }
  18492. },
  18493. "metadata": {
  18494. "type": "object"
  18495. },
  18496. "source": {
  18497. "$ref": "#/components/schemas/PermissionV2Source"
  18498. }
  18499. },
  18500. "required": ["id", "sessionID", "action", "resources"],
  18501. "additionalProperties": false
  18502. }
  18503. },
  18504. "required": ["id", "type", "properties"],
  18505. "additionalProperties": false
  18506. },
  18507. {
  18508. "type": "object",
  18509. "properties": {
  18510. "id": {
  18511. "type": "string",
  18512. "pattern": "^evt_"
  18513. },
  18514. "type": {
  18515. "type": "string",
  18516. "enum": ["permission.v2.replied"]
  18517. },
  18518. "properties": {
  18519. "type": "object",
  18520. "properties": {
  18521. "sessionID": {
  18522. "type": "string",
  18523. "pattern": "^ses"
  18524. },
  18525. "requestID": {
  18526. "type": "string",
  18527. "pattern": "^per"
  18528. },
  18529. "reply": {
  18530. "$ref": "#/components/schemas/PermissionV2Reply"
  18531. }
  18532. },
  18533. "required": ["sessionID", "requestID", "reply"],
  18534. "additionalProperties": false
  18535. }
  18536. },
  18537. "required": ["id", "type", "properties"],
  18538. "additionalProperties": false
  18539. },
  18540. {
  18541. "type": "object",
  18542. "properties": {
  18543. "id": {
  18544. "type": "string",
  18545. "pattern": "^evt_"
  18546. },
  18547. "type": {
  18548. "type": "string",
  18549. "enum": ["reference.updated"]
  18550. },
  18551. "properties": {
  18552. "type": "object",
  18553. "properties": {}
  18554. }
  18555. },
  18556. "required": ["id", "type", "properties"],
  18557. "additionalProperties": false
  18558. },
  18559. {
  18560. "type": "object",
  18561. "properties": {
  18562. "id": {
  18563. "type": "string",
  18564. "pattern": "^evt_"
  18565. },
  18566. "type": {
  18567. "type": "string",
  18568. "enum": ["project.directories.updated"]
  18569. },
  18570. "properties": {
  18571. "type": "object",
  18572. "properties": {
  18573. "projectID": {
  18574. "type": "string"
  18575. }
  18576. },
  18577. "required": ["projectID"],
  18578. "additionalProperties": false
  18579. }
  18580. },
  18581. "required": ["id", "type", "properties"],
  18582. "additionalProperties": false
  18583. },
  18584. {
  18585. "type": "object",
  18586. "properties": {
  18587. "id": {
  18588. "type": "string",
  18589. "pattern": "^evt_"
  18590. },
  18591. "type": {
  18592. "type": "string",
  18593. "enum": ["file.watcher.updated"]
  18594. },
  18595. "properties": {
  18596. "type": "object",
  18597. "properties": {
  18598. "file": {
  18599. "type": "string"
  18600. },
  18601. "event": {
  18602. "type": "string",
  18603. "enum": ["add", "change", "unlink"]
  18604. }
  18605. },
  18606. "required": ["file", "event"],
  18607. "additionalProperties": false
  18608. }
  18609. },
  18610. "required": ["id", "type", "properties"],
  18611. "additionalProperties": false
  18612. },
  18613. {
  18614. "type": "object",
  18615. "properties": {
  18616. "id": {
  18617. "type": "string",
  18618. "pattern": "^evt_"
  18619. },
  18620. "type": {
  18621. "type": "string",
  18622. "enum": ["pty.created"]
  18623. },
  18624. "properties": {
  18625. "type": "object",
  18626. "properties": {
  18627. "info": {
  18628. "$ref": "#/components/schemas/Pty"
  18629. }
  18630. },
  18631. "required": ["info"],
  18632. "additionalProperties": false
  18633. }
  18634. },
  18635. "required": ["id", "type", "properties"],
  18636. "additionalProperties": false
  18637. },
  18638. {
  18639. "type": "object",
  18640. "properties": {
  18641. "id": {
  18642. "type": "string",
  18643. "pattern": "^evt_"
  18644. },
  18645. "type": {
  18646. "type": "string",
  18647. "enum": ["pty.updated"]
  18648. },
  18649. "properties": {
  18650. "type": "object",
  18651. "properties": {
  18652. "info": {
  18653. "$ref": "#/components/schemas/Pty"
  18654. }
  18655. },
  18656. "required": ["info"],
  18657. "additionalProperties": false
  18658. }
  18659. },
  18660. "required": ["id", "type", "properties"],
  18661. "additionalProperties": false
  18662. },
  18663. {
  18664. "type": "object",
  18665. "properties": {
  18666. "id": {
  18667. "type": "string",
  18668. "pattern": "^evt_"
  18669. },
  18670. "type": {
  18671. "type": "string",
  18672. "enum": ["pty.exited"]
  18673. },
  18674. "properties": {
  18675. "type": "object",
  18676. "properties": {
  18677. "id": {
  18678. "type": "string",
  18679. "pattern": "^pty"
  18680. },
  18681. "exitCode": {
  18682. "type": "integer",
  18683. "minimum": 0
  18684. }
  18685. },
  18686. "required": ["id", "exitCode"],
  18687. "additionalProperties": false
  18688. }
  18689. },
  18690. "required": ["id", "type", "properties"],
  18691. "additionalProperties": false
  18692. },
  18693. {
  18694. "type": "object",
  18695. "properties": {
  18696. "id": {
  18697. "type": "string",
  18698. "pattern": "^evt_"
  18699. },
  18700. "type": {
  18701. "type": "string",
  18702. "enum": ["pty.deleted"]
  18703. },
  18704. "properties": {
  18705. "type": "object",
  18706. "properties": {
  18707. "id": {
  18708. "type": "string",
  18709. "pattern": "^pty"
  18710. }
  18711. },
  18712. "required": ["id"],
  18713. "additionalProperties": false
  18714. }
  18715. },
  18716. "required": ["id", "type", "properties"],
  18717. "additionalProperties": false
  18718. },
  18719. {
  18720. "type": "object",
  18721. "properties": {
  18722. "id": {
  18723. "type": "string",
  18724. "pattern": "^evt_"
  18725. },
  18726. "type": {
  18727. "type": "string",
  18728. "enum": ["question.v2.asked"]
  18729. },
  18730. "properties": {
  18731. "type": "object",
  18732. "properties": {
  18733. "id": {
  18734. "type": "string",
  18735. "pattern": "^que"
  18736. },
  18737. "sessionID": {
  18738. "type": "string",
  18739. "pattern": "^ses"
  18740. },
  18741. "questions": {
  18742. "type": "array",
  18743. "items": {
  18744. "$ref": "#/components/schemas/QuestionV2Info"
  18745. },
  18746. "description": "Questions to ask"
  18747. },
  18748. "tool": {
  18749. "$ref": "#/components/schemas/QuestionV2Tool"
  18750. }
  18751. },
  18752. "required": ["id", "sessionID", "questions"],
  18753. "additionalProperties": false
  18754. }
  18755. },
  18756. "required": ["id", "type", "properties"],
  18757. "additionalProperties": false
  18758. },
  18759. {
  18760. "type": "object",
  18761. "properties": {
  18762. "id": {
  18763. "type": "string",
  18764. "pattern": "^evt_"
  18765. },
  18766. "type": {
  18767. "type": "string",
  18768. "enum": ["question.v2.replied"]
  18769. },
  18770. "properties": {
  18771. "type": "object",
  18772. "properties": {
  18773. "sessionID": {
  18774. "type": "string",
  18775. "pattern": "^ses"
  18776. },
  18777. "requestID": {
  18778. "type": "string",
  18779. "pattern": "^que"
  18780. },
  18781. "answers": {
  18782. "type": "array",
  18783. "items": {
  18784. "$ref": "#/components/schemas/QuestionV2Answer"
  18785. }
  18786. }
  18787. },
  18788. "required": ["sessionID", "requestID", "answers"],
  18789. "additionalProperties": false
  18790. }
  18791. },
  18792. "required": ["id", "type", "properties"],
  18793. "additionalProperties": false
  18794. },
  18795. {
  18796. "type": "object",
  18797. "properties": {
  18798. "id": {
  18799. "type": "string",
  18800. "pattern": "^evt_"
  18801. },
  18802. "type": {
  18803. "type": "string",
  18804. "enum": ["question.v2.rejected"]
  18805. },
  18806. "properties": {
  18807. "type": "object",
  18808. "properties": {
  18809. "sessionID": {
  18810. "type": "string",
  18811. "pattern": "^ses"
  18812. },
  18813. "requestID": {
  18814. "type": "string",
  18815. "pattern": "^que"
  18816. }
  18817. },
  18818. "required": ["sessionID", "requestID"],
  18819. "additionalProperties": false
  18820. }
  18821. },
  18822. "required": ["id", "type", "properties"],
  18823. "additionalProperties": false
  18824. },
  18825. {
  18826. "type": "object",
  18827. "properties": {
  18828. "id": {
  18829. "type": "string",
  18830. "pattern": "^evt_"
  18831. },
  18832. "type": {
  18833. "type": "string",
  18834. "enum": ["todo.updated"]
  18835. },
  18836. "properties": {
  18837. "type": "object",
  18838. "properties": {
  18839. "sessionID": {
  18840. "type": "string",
  18841. "pattern": "^ses"
  18842. },
  18843. "todos": {
  18844. "type": "array",
  18845. "items": {
  18846. "$ref": "#/components/schemas/Todo"
  18847. }
  18848. }
  18849. },
  18850. "required": ["sessionID", "todos"],
  18851. "additionalProperties": false
  18852. }
  18853. },
  18854. "required": ["id", "type", "properties"],
  18855. "additionalProperties": false
  18856. },
  18857. {
  18858. "type": "object",
  18859. "properties": {
  18860. "id": {
  18861. "type": "string",
  18862. "pattern": "^evt_"
  18863. },
  18864. "type": {
  18865. "type": "string",
  18866. "enum": ["lsp.updated"]
  18867. },
  18868. "properties": {
  18869. "type": "object",
  18870. "properties": {}
  18871. }
  18872. },
  18873. "required": ["id", "type", "properties"],
  18874. "additionalProperties": false
  18875. },
  18876. {
  18877. "type": "object",
  18878. "properties": {
  18879. "id": {
  18880. "type": "string",
  18881. "pattern": "^evt_"
  18882. },
  18883. "type": {
  18884. "type": "string",
  18885. "enum": ["permission.asked"]
  18886. },
  18887. "properties": {
  18888. "type": "object",
  18889. "properties": {
  18890. "id": {
  18891. "type": "string",
  18892. "pattern": "^per"
  18893. },
  18894. "sessionID": {
  18895. "type": "string",
  18896. "pattern": "^ses"
  18897. },
  18898. "permission": {
  18899. "type": "string"
  18900. },
  18901. "patterns": {
  18902. "type": "array",
  18903. "items": {
  18904. "type": "string"
  18905. }
  18906. },
  18907. "metadata": {
  18908. "type": "object"
  18909. },
  18910. "always": {
  18911. "type": "array",
  18912. "items": {
  18913. "type": "string"
  18914. }
  18915. },
  18916. "tool": {
  18917. "type": "object",
  18918. "properties": {
  18919. "messageID": {
  18920. "type": "string"
  18921. },
  18922. "callID": {
  18923. "type": "string"
  18924. }
  18925. },
  18926. "required": ["messageID", "callID"],
  18927. "additionalProperties": false
  18928. }
  18929. },
  18930. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  18931. "additionalProperties": false
  18932. }
  18933. },
  18934. "required": ["id", "type", "properties"],
  18935. "additionalProperties": false
  18936. },
  18937. {
  18938. "type": "object",
  18939. "properties": {
  18940. "id": {
  18941. "type": "string",
  18942. "pattern": "^evt_"
  18943. },
  18944. "type": {
  18945. "type": "string",
  18946. "enum": ["permission.replied"]
  18947. },
  18948. "properties": {
  18949. "type": "object",
  18950. "properties": {
  18951. "sessionID": {
  18952. "type": "string",
  18953. "pattern": "^ses"
  18954. },
  18955. "requestID": {
  18956. "type": "string",
  18957. "pattern": "^per"
  18958. },
  18959. "reply": {
  18960. "type": "string",
  18961. "enum": ["once", "always", "reject"]
  18962. }
  18963. },
  18964. "required": ["sessionID", "requestID", "reply"],
  18965. "additionalProperties": false
  18966. }
  18967. },
  18968. "required": ["id", "type", "properties"],
  18969. "additionalProperties": false
  18970. },
  18971. {
  18972. "type": "object",
  18973. "properties": {
  18974. "id": {
  18975. "type": "string",
  18976. "pattern": "^evt_"
  18977. },
  18978. "type": {
  18979. "type": "string",
  18980. "enum": ["tui.prompt.append"]
  18981. },
  18982. "properties": {
  18983. "type": "object",
  18984. "properties": {
  18985. "text": {
  18986. "type": "string"
  18987. }
  18988. },
  18989. "required": ["text"],
  18990. "additionalProperties": false
  18991. }
  18992. },
  18993. "required": ["id", "type", "properties"],
  18994. "additionalProperties": false
  18995. },
  18996. {
  18997. "type": "object",
  18998. "properties": {
  18999. "id": {
  19000. "type": "string",
  19001. "pattern": "^evt_"
  19002. },
  19003. "type": {
  19004. "type": "string",
  19005. "enum": ["tui.command.execute"]
  19006. },
  19007. "properties": {
  19008. "type": "object",
  19009. "properties": {
  19010. "command": {
  19011. "anyOf": [
  19012. {
  19013. "type": "string",
  19014. "enum": [
  19015. "session.list",
  19016. "session.new",
  19017. "session.share",
  19018. "session.interrupt",
  19019. "session.compact",
  19020. "session.page.up",
  19021. "session.page.down",
  19022. "session.line.up",
  19023. "session.line.down",
  19024. "session.half.page.up",
  19025. "session.half.page.down",
  19026. "session.first",
  19027. "session.last",
  19028. "prompt.clear",
  19029. "prompt.submit",
  19030. "agent.cycle"
  19031. ]
  19032. },
  19033. {
  19034. "type": "string"
  19035. }
  19036. ]
  19037. }
  19038. },
  19039. "required": ["command"],
  19040. "additionalProperties": false
  19041. }
  19042. },
  19043. "required": ["id", "type", "properties"],
  19044. "additionalProperties": false
  19045. },
  19046. {
  19047. "type": "object",
  19048. "properties": {
  19049. "id": {
  19050. "type": "string",
  19051. "pattern": "^evt_"
  19052. },
  19053. "type": {
  19054. "type": "string",
  19055. "enum": ["tui.toast.show"]
  19056. },
  19057. "properties": {
  19058. "type": "object",
  19059. "properties": {
  19060. "title": {
  19061. "type": "string"
  19062. },
  19063. "message": {
  19064. "type": "string"
  19065. },
  19066. "variant": {
  19067. "type": "string",
  19068. "enum": ["info", "success", "warning", "error"]
  19069. },
  19070. "duration": {
  19071. "type": "integer",
  19072. "exclusiveMinimum": 0
  19073. }
  19074. },
  19075. "required": ["message", "variant"],
  19076. "additionalProperties": false
  19077. }
  19078. },
  19079. "required": ["id", "type", "properties"],
  19080. "additionalProperties": false
  19081. },
  19082. {
  19083. "type": "object",
  19084. "properties": {
  19085. "id": {
  19086. "type": "string",
  19087. "pattern": "^evt_"
  19088. },
  19089. "type": {
  19090. "type": "string",
  19091. "enum": ["tui.session.select"]
  19092. },
  19093. "properties": {
  19094. "type": "object",
  19095. "properties": {
  19096. "sessionID": {
  19097. "type": "string",
  19098. "pattern": "^ses",
  19099. "description": "Session ID to navigate to"
  19100. }
  19101. },
  19102. "required": ["sessionID"],
  19103. "additionalProperties": false
  19104. }
  19105. },
  19106. "required": ["id", "type", "properties"],
  19107. "additionalProperties": false
  19108. },
  19109. {
  19110. "type": "object",
  19111. "properties": {
  19112. "id": {
  19113. "type": "string",
  19114. "pattern": "^evt_"
  19115. },
  19116. "type": {
  19117. "type": "string",
  19118. "enum": ["mcp.tools.changed"]
  19119. },
  19120. "properties": {
  19121. "type": "object",
  19122. "properties": {
  19123. "server": {
  19124. "type": "string"
  19125. }
  19126. },
  19127. "required": ["server"],
  19128. "additionalProperties": false
  19129. }
  19130. },
  19131. "required": ["id", "type", "properties"],
  19132. "additionalProperties": false
  19133. },
  19134. {
  19135. "type": "object",
  19136. "properties": {
  19137. "id": {
  19138. "type": "string",
  19139. "pattern": "^evt_"
  19140. },
  19141. "type": {
  19142. "type": "string",
  19143. "enum": ["mcp.browser.open.failed"]
  19144. },
  19145. "properties": {
  19146. "type": "object",
  19147. "properties": {
  19148. "mcpName": {
  19149. "type": "string"
  19150. },
  19151. "url": {
  19152. "type": "string"
  19153. }
  19154. },
  19155. "required": ["mcpName", "url"],
  19156. "additionalProperties": false
  19157. }
  19158. },
  19159. "required": ["id", "type", "properties"],
  19160. "additionalProperties": false
  19161. },
  19162. {
  19163. "type": "object",
  19164. "properties": {
  19165. "id": {
  19166. "type": "string",
  19167. "pattern": "^evt_"
  19168. },
  19169. "type": {
  19170. "type": "string",
  19171. "enum": ["command.executed"]
  19172. },
  19173. "properties": {
  19174. "type": "object",
  19175. "properties": {
  19176. "name": {
  19177. "type": "string"
  19178. },
  19179. "sessionID": {
  19180. "type": "string",
  19181. "pattern": "^ses"
  19182. },
  19183. "arguments": {
  19184. "type": "string"
  19185. },
  19186. "messageID": {
  19187. "type": "string",
  19188. "pattern": "^msg"
  19189. }
  19190. },
  19191. "required": ["name", "sessionID", "arguments", "messageID"],
  19192. "additionalProperties": false
  19193. }
  19194. },
  19195. "required": ["id", "type", "properties"],
  19196. "additionalProperties": false
  19197. },
  19198. {
  19199. "type": "object",
  19200. "properties": {
  19201. "id": {
  19202. "type": "string",
  19203. "pattern": "^evt_"
  19204. },
  19205. "type": {
  19206. "type": "string",
  19207. "enum": ["project.updated"]
  19208. },
  19209. "properties": {
  19210. "type": "object",
  19211. "properties": {
  19212. "id": {
  19213. "type": "string"
  19214. },
  19215. "worktree": {
  19216. "type": "string"
  19217. },
  19218. "vcs": {
  19219. "type": "string",
  19220. "enum": ["git"]
  19221. },
  19222. "name": {
  19223. "type": "string"
  19224. },
  19225. "icon": {
  19226. "type": "object",
  19227. "properties": {
  19228. "url": {
  19229. "type": "string"
  19230. },
  19231. "override": {
  19232. "type": "string"
  19233. },
  19234. "color": {
  19235. "type": "string"
  19236. }
  19237. },
  19238. "additionalProperties": false
  19239. },
  19240. "commands": {
  19241. "type": "object",
  19242. "properties": {
  19243. "start": {
  19244. "type": "string",
  19245. "description": "Startup script to run when creating a new workspace (worktree)"
  19246. }
  19247. },
  19248. "additionalProperties": false
  19249. },
  19250. "time": {
  19251. "type": "object",
  19252. "properties": {
  19253. "created": {
  19254. "type": "integer",
  19255. "minimum": 0
  19256. },
  19257. "updated": {
  19258. "type": "integer",
  19259. "minimum": 0
  19260. },
  19261. "initialized": {
  19262. "type": "integer",
  19263. "minimum": 0
  19264. }
  19265. },
  19266. "required": ["created", "updated"],
  19267. "additionalProperties": false
  19268. },
  19269. "sandboxes": {
  19270. "type": "array",
  19271. "items": {
  19272. "type": "string"
  19273. }
  19274. }
  19275. },
  19276. "required": ["id", "worktree", "time", "sandboxes"],
  19277. "additionalProperties": false
  19278. }
  19279. },
  19280. "required": ["id", "type", "properties"],
  19281. "additionalProperties": false
  19282. },
  19283. {
  19284. "type": "object",
  19285. "properties": {
  19286. "id": {
  19287. "type": "string",
  19288. "pattern": "^evt_"
  19289. },
  19290. "type": {
  19291. "type": "string",
  19292. "enum": ["session.status"]
  19293. },
  19294. "properties": {
  19295. "type": "object",
  19296. "properties": {
  19297. "sessionID": {
  19298. "type": "string",
  19299. "pattern": "^ses"
  19300. },
  19301. "status": {
  19302. "$ref": "#/components/schemas/SessionStatus"
  19303. }
  19304. },
  19305. "required": ["sessionID", "status"],
  19306. "additionalProperties": false
  19307. }
  19308. },
  19309. "required": ["id", "type", "properties"],
  19310. "additionalProperties": false
  19311. },
  19312. {
  19313. "type": "object",
  19314. "properties": {
  19315. "id": {
  19316. "type": "string",
  19317. "pattern": "^evt_"
  19318. },
  19319. "type": {
  19320. "type": "string",
  19321. "enum": ["session.idle"]
  19322. },
  19323. "properties": {
  19324. "type": "object",
  19325. "properties": {
  19326. "sessionID": {
  19327. "type": "string",
  19328. "pattern": "^ses"
  19329. }
  19330. },
  19331. "required": ["sessionID"],
  19332. "additionalProperties": false
  19333. }
  19334. },
  19335. "required": ["id", "type", "properties"],
  19336. "additionalProperties": false
  19337. },
  19338. {
  19339. "type": "object",
  19340. "properties": {
  19341. "id": {
  19342. "type": "string",
  19343. "pattern": "^evt_"
  19344. },
  19345. "type": {
  19346. "type": "string",
  19347. "enum": ["question.asked"]
  19348. },
  19349. "properties": {
  19350. "type": "object",
  19351. "properties": {
  19352. "id": {
  19353. "type": "string",
  19354. "pattern": "^que"
  19355. },
  19356. "sessionID": {
  19357. "type": "string",
  19358. "pattern": "^ses"
  19359. },
  19360. "questions": {
  19361. "type": "array",
  19362. "items": {
  19363. "$ref": "#/components/schemas/QuestionInfo"
  19364. },
  19365. "description": "Questions to ask"
  19366. },
  19367. "tool": {
  19368. "$ref": "#/components/schemas/QuestionTool"
  19369. }
  19370. },
  19371. "required": ["id", "sessionID", "questions"],
  19372. "additionalProperties": false
  19373. }
  19374. },
  19375. "required": ["id", "type", "properties"],
  19376. "additionalProperties": false
  19377. },
  19378. {
  19379. "type": "object",
  19380. "properties": {
  19381. "id": {
  19382. "type": "string",
  19383. "pattern": "^evt_"
  19384. },
  19385. "type": {
  19386. "type": "string",
  19387. "enum": ["question.replied"]
  19388. },
  19389. "properties": {
  19390. "type": "object",
  19391. "properties": {
  19392. "sessionID": {
  19393. "type": "string",
  19394. "pattern": "^ses"
  19395. },
  19396. "requestID": {
  19397. "type": "string",
  19398. "pattern": "^que"
  19399. },
  19400. "answers": {
  19401. "type": "array",
  19402. "items": {
  19403. "$ref": "#/components/schemas/QuestionAnswer"
  19404. }
  19405. }
  19406. },
  19407. "required": ["sessionID", "requestID", "answers"],
  19408. "additionalProperties": false
  19409. }
  19410. },
  19411. "required": ["id", "type", "properties"],
  19412. "additionalProperties": false
  19413. },
  19414. {
  19415. "type": "object",
  19416. "properties": {
  19417. "id": {
  19418. "type": "string",
  19419. "pattern": "^evt_"
  19420. },
  19421. "type": {
  19422. "type": "string",
  19423. "enum": ["question.rejected"]
  19424. },
  19425. "properties": {
  19426. "type": "object",
  19427. "properties": {
  19428. "sessionID": {
  19429. "type": "string",
  19430. "pattern": "^ses"
  19431. },
  19432. "requestID": {
  19433. "type": "string",
  19434. "pattern": "^que"
  19435. }
  19436. },
  19437. "required": ["sessionID", "requestID"],
  19438. "additionalProperties": false
  19439. }
  19440. },
  19441. "required": ["id", "type", "properties"],
  19442. "additionalProperties": false
  19443. },
  19444. {
  19445. "type": "object",
  19446. "properties": {
  19447. "id": {
  19448. "type": "string",
  19449. "pattern": "^evt_"
  19450. },
  19451. "type": {
  19452. "type": "string",
  19453. "enum": ["session.compacted"]
  19454. },
  19455. "properties": {
  19456. "type": "object",
  19457. "properties": {
  19458. "sessionID": {
  19459. "type": "string",
  19460. "pattern": "^ses"
  19461. }
  19462. },
  19463. "required": ["sessionID"],
  19464. "additionalProperties": false
  19465. }
  19466. },
  19467. "required": ["id", "type", "properties"],
  19468. "additionalProperties": false
  19469. },
  19470. {
  19471. "type": "object",
  19472. "properties": {
  19473. "id": {
  19474. "type": "string",
  19475. "pattern": "^evt_"
  19476. },
  19477. "type": {
  19478. "type": "string",
  19479. "enum": ["vcs.branch.updated"]
  19480. },
  19481. "properties": {
  19482. "type": "object",
  19483. "properties": {
  19484. "branch": {
  19485. "type": "string"
  19486. }
  19487. },
  19488. "additionalProperties": false
  19489. }
  19490. },
  19491. "required": ["id", "type", "properties"],
  19492. "additionalProperties": false
  19493. },
  19494. {
  19495. "type": "object",
  19496. "properties": {
  19497. "id": {
  19498. "type": "string",
  19499. "pattern": "^evt_"
  19500. },
  19501. "type": {
  19502. "type": "string",
  19503. "enum": ["workspace.ready"]
  19504. },
  19505. "properties": {
  19506. "type": "object",
  19507. "properties": {
  19508. "name": {
  19509. "type": "string"
  19510. }
  19511. },
  19512. "required": ["name"],
  19513. "additionalProperties": false
  19514. }
  19515. },
  19516. "required": ["id", "type", "properties"],
  19517. "additionalProperties": false
  19518. },
  19519. {
  19520. "type": "object",
  19521. "properties": {
  19522. "id": {
  19523. "type": "string",
  19524. "pattern": "^evt_"
  19525. },
  19526. "type": {
  19527. "type": "string",
  19528. "enum": ["workspace.failed"]
  19529. },
  19530. "properties": {
  19531. "type": "object",
  19532. "properties": {
  19533. "message": {
  19534. "type": "string"
  19535. }
  19536. },
  19537. "required": ["message"],
  19538. "additionalProperties": false
  19539. }
  19540. },
  19541. "required": ["id", "type", "properties"],
  19542. "additionalProperties": false
  19543. },
  19544. {
  19545. "type": "object",
  19546. "properties": {
  19547. "id": {
  19548. "type": "string",
  19549. "pattern": "^evt_"
  19550. },
  19551. "type": {
  19552. "type": "string",
  19553. "enum": ["workspace.status"]
  19554. },
  19555. "properties": {
  19556. "type": "object",
  19557. "properties": {
  19558. "workspaceID": {
  19559. "type": "string",
  19560. "pattern": "^wrk"
  19561. },
  19562. "status": {
  19563. "type": "string",
  19564. "enum": ["connected", "connecting", "disconnected", "error"]
  19565. }
  19566. },
  19567. "required": ["workspaceID", "status"],
  19568. "additionalProperties": false
  19569. }
  19570. },
  19571. "required": ["id", "type", "properties"],
  19572. "additionalProperties": false
  19573. },
  19574. {
  19575. "type": "object",
  19576. "properties": {
  19577. "id": {
  19578. "type": "string",
  19579. "pattern": "^evt_"
  19580. },
  19581. "type": {
  19582. "type": "string",
  19583. "enum": ["worktree.ready"]
  19584. },
  19585. "properties": {
  19586. "type": "object",
  19587. "properties": {
  19588. "name": {
  19589. "type": "string"
  19590. },
  19591. "branch": {
  19592. "type": "string"
  19593. }
  19594. },
  19595. "required": ["name"],
  19596. "additionalProperties": false
  19597. }
  19598. },
  19599. "required": ["id", "type", "properties"],
  19600. "additionalProperties": false
  19601. },
  19602. {
  19603. "type": "object",
  19604. "properties": {
  19605. "id": {
  19606. "type": "string",
  19607. "pattern": "^evt_"
  19608. },
  19609. "type": {
  19610. "type": "string",
  19611. "enum": ["worktree.failed"]
  19612. },
  19613. "properties": {
  19614. "type": "object",
  19615. "properties": {
  19616. "message": {
  19617. "type": "string"
  19618. }
  19619. },
  19620. "required": ["message"],
  19621. "additionalProperties": false
  19622. }
  19623. },
  19624. "required": ["id", "type", "properties"],
  19625. "additionalProperties": false
  19626. },
  19627. {
  19628. "type": "object",
  19629. "properties": {
  19630. "id": {
  19631. "type": "string",
  19632. "pattern": "^evt_"
  19633. },
  19634. "type": {
  19635. "type": "string",
  19636. "enum": ["server.connected"]
  19637. },
  19638. "properties": {
  19639. "type": "object",
  19640. "properties": {}
  19641. }
  19642. },
  19643. "required": ["id", "type", "properties"],
  19644. "additionalProperties": false
  19645. },
  19646. {
  19647. "type": "object",
  19648. "properties": {
  19649. "id": {
  19650. "type": "string",
  19651. "pattern": "^evt_"
  19652. },
  19653. "type": {
  19654. "type": "string",
  19655. "enum": ["global.disposed"]
  19656. },
  19657. "properties": {
  19658. "type": "object",
  19659. "properties": {}
  19660. }
  19661. },
  19662. "required": ["id", "type", "properties"],
  19663. "additionalProperties": false
  19664. },
  19665. {
  19666. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  19667. },
  19668. {
  19669. "$ref": "#/components/schemas/SyncEventSessionCreated"
  19670. },
  19671. {
  19672. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  19673. },
  19674. {
  19675. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  19676. },
  19677. {
  19678. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  19679. },
  19680. {
  19681. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  19682. },
  19683. {
  19684. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  19685. },
  19686. {
  19687. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  19688. },
  19689. {
  19690. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  19691. },
  19692. {
  19693. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  19694. },
  19695. {
  19696. "$ref": "#/components/schemas/SyncEventSessionNextMoved"
  19697. },
  19698. {
  19699. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  19700. },
  19701. {
  19702. "$ref": "#/components/schemas/SyncEventSessionNextPromptAdmitted"
  19703. },
  19704. {
  19705. "$ref": "#/components/schemas/SyncEventSessionNextPromptPromoted"
  19706. },
  19707. {
  19708. "$ref": "#/components/schemas/SyncEventSessionNextInterruptRequested"
  19709. },
  19710. {
  19711. "$ref": "#/components/schemas/SyncEventSessionNextContextUpdated"
  19712. },
  19713. {
  19714. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  19715. },
  19716. {
  19717. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  19718. },
  19719. {
  19720. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  19721. },
  19722. {
  19723. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  19724. },
  19725. {
  19726. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  19727. },
  19728. {
  19729. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  19730. },
  19731. {
  19732. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  19733. },
  19734. {
  19735. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  19736. },
  19737. {
  19738. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  19739. },
  19740. {
  19741. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  19742. },
  19743. {
  19744. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  19745. },
  19746. {
  19747. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  19748. },
  19749. {
  19750. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  19751. },
  19752. {
  19753. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  19754. },
  19755. {
  19756. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  19757. },
  19758. {
  19759. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  19760. },
  19761. {
  19762. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  19763. },
  19764. {
  19765. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  19766. },
  19767. {
  19768. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  19769. }
  19770. ]
  19771. }
  19772. },
  19773. "required": ["directory", "payload"],
  19774. "additionalProperties": false
  19775. },
  19776. "LogLevel": {
  19777. "type": "string",
  19778. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  19779. "description": "Log level"
  19780. },
  19781. "ServerConfig": {
  19782. "type": "object",
  19783. "properties": {
  19784. "port": {
  19785. "type": "integer",
  19786. "exclusiveMinimum": 0
  19787. },
  19788. "hostname": {
  19789. "type": "string"
  19790. },
  19791. "mdns": {
  19792. "type": "boolean"
  19793. },
  19794. "mdnsDomain": {
  19795. "type": "string"
  19796. },
  19797. "cors": {
  19798. "type": "array",
  19799. "items": {
  19800. "type": "string"
  19801. }
  19802. }
  19803. },
  19804. "additionalProperties": false,
  19805. "description": "Server configuration for opencode serve and web commands"
  19806. },
  19807. "PermissionActionConfig": {
  19808. "type": "string",
  19809. "enum": ["ask", "allow", "deny"]
  19810. },
  19811. "PermissionObjectConfig": {
  19812. "type": "object",
  19813. "additionalProperties": {
  19814. "$ref": "#/components/schemas/PermissionActionConfig"
  19815. }
  19816. },
  19817. "PermissionRuleConfig": {
  19818. "anyOf": [
  19819. {
  19820. "$ref": "#/components/schemas/PermissionActionConfig"
  19821. },
  19822. {
  19823. "$ref": "#/components/schemas/PermissionObjectConfig"
  19824. }
  19825. ]
  19826. },
  19827. "PermissionConfig": {
  19828. "anyOf": [
  19829. {
  19830. "$ref": "#/components/schemas/PermissionActionConfig"
  19831. },
  19832. {
  19833. "type": "object",
  19834. "properties": {
  19835. "read": {
  19836. "$ref": "#/components/schemas/PermissionRuleConfig"
  19837. },
  19838. "edit": {
  19839. "$ref": "#/components/schemas/PermissionRuleConfig"
  19840. },
  19841. "glob": {
  19842. "$ref": "#/components/schemas/PermissionRuleConfig"
  19843. },
  19844. "grep": {
  19845. "$ref": "#/components/schemas/PermissionRuleConfig"
  19846. },
  19847. "list": {
  19848. "$ref": "#/components/schemas/PermissionRuleConfig"
  19849. },
  19850. "bash": {
  19851. "$ref": "#/components/schemas/PermissionRuleConfig"
  19852. },
  19853. "task": {
  19854. "$ref": "#/components/schemas/PermissionRuleConfig"
  19855. },
  19856. "external_directory": {
  19857. "$ref": "#/components/schemas/PermissionRuleConfig"
  19858. },
  19859. "todowrite": {
  19860. "$ref": "#/components/schemas/PermissionActionConfig"
  19861. },
  19862. "question": {
  19863. "$ref": "#/components/schemas/PermissionActionConfig"
  19864. },
  19865. "webfetch": {
  19866. "$ref": "#/components/schemas/PermissionActionConfig"
  19867. },
  19868. "websearch": {
  19869. "$ref": "#/components/schemas/PermissionActionConfig"
  19870. },
  19871. "lsp": {
  19872. "$ref": "#/components/schemas/PermissionRuleConfig"
  19873. },
  19874. "doom_loop": {
  19875. "$ref": "#/components/schemas/PermissionActionConfig"
  19876. },
  19877. "skill": {
  19878. "$ref": "#/components/schemas/PermissionRuleConfig"
  19879. }
  19880. },
  19881. "additionalProperties": {
  19882. "$ref": "#/components/schemas/PermissionRuleConfig"
  19883. }
  19884. }
  19885. ]
  19886. },
  19887. "AgentConfig": {
  19888. "type": "object",
  19889. "properties": {
  19890. "model": {
  19891. "type": "string"
  19892. },
  19893. "variant": {
  19894. "type": "string"
  19895. },
  19896. "temperature": {
  19897. "type": "number"
  19898. },
  19899. "top_p": {
  19900. "type": "number"
  19901. },
  19902. "prompt": {
  19903. "type": "string"
  19904. },
  19905. "tools": {
  19906. "type": "object",
  19907. "additionalProperties": {
  19908. "type": "boolean"
  19909. }
  19910. },
  19911. "disable": {
  19912. "type": "boolean"
  19913. },
  19914. "description": {
  19915. "type": "string"
  19916. },
  19917. "mode": {
  19918. "type": "string",
  19919. "enum": ["subagent", "primary", "all"]
  19920. },
  19921. "hidden": {
  19922. "type": "boolean"
  19923. },
  19924. "options": {
  19925. "type": "object"
  19926. },
  19927. "color": {
  19928. "anyOf": [
  19929. {
  19930. "type": "string",
  19931. "pattern": "^#[0-9a-fA-F]{6}$"
  19932. },
  19933. {
  19934. "type": "string",
  19935. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  19936. }
  19937. ],
  19938. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  19939. },
  19940. "steps": {
  19941. "type": "integer",
  19942. "exclusiveMinimum": 0
  19943. },
  19944. "maxSteps": {
  19945. "type": "integer",
  19946. "exclusiveMinimum": 0
  19947. },
  19948. "permission": {
  19949. "$ref": "#/components/schemas/PermissionConfig"
  19950. }
  19951. },
  19952. "additionalProperties": {}
  19953. },
  19954. "ProviderConfig": {
  19955. "type": "object",
  19956. "properties": {
  19957. "api": {
  19958. "type": "string"
  19959. },
  19960. "name": {
  19961. "type": "string"
  19962. },
  19963. "env": {
  19964. "type": "array",
  19965. "items": {
  19966. "type": "string"
  19967. }
  19968. },
  19969. "id": {
  19970. "type": "string"
  19971. },
  19972. "npm": {
  19973. "type": "string"
  19974. },
  19975. "whitelist": {
  19976. "type": "array",
  19977. "items": {
  19978. "type": "string"
  19979. }
  19980. },
  19981. "blacklist": {
  19982. "type": "array",
  19983. "items": {
  19984. "type": "string"
  19985. }
  19986. },
  19987. "options": {
  19988. "type": "object",
  19989. "properties": {
  19990. "apiKey": {
  19991. "type": "string"
  19992. },
  19993. "baseURL": {
  19994. "type": "string"
  19995. },
  19996. "enterpriseUrl": {
  19997. "type": "string"
  19998. },
  19999. "setCacheKey": {
  20000. "type": "boolean"
  20001. },
  20002. "timeout": {
  20003. "anyOf": [
  20004. {
  20005. "type": "integer",
  20006. "exclusiveMinimum": 0
  20007. },
  20008. {
  20009. "type": "boolean",
  20010. "enum": [false]
  20011. }
  20012. ],
  20013. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  20014. },
  20015. "headerTimeout": {
  20016. "anyOf": [
  20017. {
  20018. "type": "integer",
  20019. "exclusiveMinimum": 0
  20020. },
  20021. {
  20022. "type": "boolean",
  20023. "enum": [false]
  20024. }
  20025. ],
  20026. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  20027. },
  20028. "chunkTimeout": {
  20029. "type": "integer",
  20030. "exclusiveMinimum": 0
  20031. }
  20032. },
  20033. "additionalProperties": {}
  20034. },
  20035. "models": {
  20036. "type": "object",
  20037. "additionalProperties": {
  20038. "type": "object",
  20039. "properties": {
  20040. "id": {
  20041. "type": "string"
  20042. },
  20043. "name": {
  20044. "type": "string"
  20045. },
  20046. "family": {
  20047. "type": "string"
  20048. },
  20049. "release_date": {
  20050. "type": "string"
  20051. },
  20052. "attachment": {
  20053. "type": "boolean"
  20054. },
  20055. "reasoning": {
  20056. "type": "boolean"
  20057. },
  20058. "temperature": {
  20059. "type": "boolean"
  20060. },
  20061. "tool_call": {
  20062. "type": "boolean"
  20063. },
  20064. "interleaved": {
  20065. "anyOf": [
  20066. {
  20067. "type": "boolean",
  20068. "enum": [true]
  20069. },
  20070. {
  20071. "type": "object",
  20072. "properties": {
  20073. "field": {
  20074. "type": "string",
  20075. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  20076. }
  20077. },
  20078. "required": ["field"],
  20079. "additionalProperties": false
  20080. }
  20081. ]
  20082. },
  20083. "cost": {
  20084. "type": "object",
  20085. "properties": {
  20086. "input": {
  20087. "type": "number"
  20088. },
  20089. "output": {
  20090. "type": "number"
  20091. },
  20092. "cache_read": {
  20093. "type": "number"
  20094. },
  20095. "cache_write": {
  20096. "type": "number"
  20097. },
  20098. "context_over_200k": {
  20099. "type": "object",
  20100. "properties": {
  20101. "input": {
  20102. "type": "number"
  20103. },
  20104. "output": {
  20105. "type": "number"
  20106. },
  20107. "cache_read": {
  20108. "type": "number"
  20109. },
  20110. "cache_write": {
  20111. "type": "number"
  20112. }
  20113. },
  20114. "required": ["input", "output"],
  20115. "additionalProperties": false
  20116. }
  20117. },
  20118. "required": ["input", "output"],
  20119. "additionalProperties": false
  20120. },
  20121. "limit": {
  20122. "type": "object",
  20123. "properties": {
  20124. "context": {
  20125. "type": "number"
  20126. },
  20127. "input": {
  20128. "type": "number"
  20129. },
  20130. "output": {
  20131. "type": "number"
  20132. }
  20133. },
  20134. "required": ["context", "output"],
  20135. "additionalProperties": false
  20136. },
  20137. "modalities": {
  20138. "type": "object",
  20139. "properties": {
  20140. "input": {
  20141. "type": "array",
  20142. "items": {
  20143. "type": "string",
  20144. "enum": ["text", "audio", "image", "video", "pdf"]
  20145. }
  20146. },
  20147. "output": {
  20148. "type": "array",
  20149. "items": {
  20150. "type": "string",
  20151. "enum": ["text", "audio", "image", "video", "pdf"]
  20152. }
  20153. }
  20154. },
  20155. "additionalProperties": false
  20156. },
  20157. "experimental": {
  20158. "type": "boolean"
  20159. },
  20160. "status": {
  20161. "type": "string",
  20162. "enum": ["alpha", "beta", "deprecated", "active"]
  20163. },
  20164. "provider": {
  20165. "type": "object",
  20166. "properties": {
  20167. "npm": {
  20168. "type": "string"
  20169. },
  20170. "api": {
  20171. "type": "string"
  20172. }
  20173. },
  20174. "additionalProperties": false
  20175. },
  20176. "options": {
  20177. "type": "object"
  20178. },
  20179. "headers": {
  20180. "type": "object",
  20181. "additionalProperties": {
  20182. "type": "string"
  20183. }
  20184. },
  20185. "variants": {
  20186. "type": "object",
  20187. "additionalProperties": {
  20188. "type": "object",
  20189. "properties": {
  20190. "disabled": {
  20191. "type": "boolean"
  20192. }
  20193. },
  20194. "additionalProperties": {}
  20195. },
  20196. "description": "Variant-specific configuration"
  20197. }
  20198. },
  20199. "additionalProperties": false
  20200. }
  20201. }
  20202. },
  20203. "additionalProperties": false
  20204. },
  20205. "McpLocalConfig": {
  20206. "type": "object",
  20207. "properties": {
  20208. "type": {
  20209. "type": "string",
  20210. "enum": ["local"],
  20211. "description": "Type of MCP server connection"
  20212. },
  20213. "command": {
  20214. "type": "array",
  20215. "items": {
  20216. "type": "string"
  20217. },
  20218. "description": "Command and arguments to run the MCP server"
  20219. },
  20220. "cwd": {
  20221. "type": "string"
  20222. },
  20223. "environment": {
  20224. "type": "object",
  20225. "additionalProperties": {
  20226. "type": "string"
  20227. }
  20228. },
  20229. "enabled": {
  20230. "type": "boolean"
  20231. },
  20232. "timeout": {
  20233. "type": "integer",
  20234. "exclusiveMinimum": 0
  20235. }
  20236. },
  20237. "required": ["type", "command"],
  20238. "additionalProperties": false
  20239. },
  20240. "McpOAuthConfig": {
  20241. "type": "object",
  20242. "properties": {
  20243. "clientId": {
  20244. "type": "string"
  20245. },
  20246. "clientSecret": {
  20247. "type": "string"
  20248. },
  20249. "scope": {
  20250. "type": "string"
  20251. },
  20252. "callbackPort": {
  20253. "type": "integer",
  20254. "minimum": 1,
  20255. "maximum": 65535
  20256. },
  20257. "redirectUri": {
  20258. "type": "string"
  20259. }
  20260. },
  20261. "additionalProperties": false
  20262. },
  20263. "McpRemoteConfig": {
  20264. "type": "object",
  20265. "properties": {
  20266. "type": {
  20267. "type": "string",
  20268. "enum": ["remote"],
  20269. "description": "Type of MCP server connection"
  20270. },
  20271. "url": {
  20272. "type": "string",
  20273. "description": "URL of the remote MCP server"
  20274. },
  20275. "enabled": {
  20276. "type": "boolean"
  20277. },
  20278. "headers": {
  20279. "type": "object",
  20280. "additionalProperties": {
  20281. "type": "string"
  20282. }
  20283. },
  20284. "oauth": {
  20285. "anyOf": [
  20286. {
  20287. "$ref": "#/components/schemas/McpOAuthConfig"
  20288. },
  20289. {
  20290. "type": "boolean",
  20291. "enum": [false]
  20292. }
  20293. ],
  20294. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  20295. },
  20296. "timeout": {
  20297. "type": "integer",
  20298. "exclusiveMinimum": 0
  20299. }
  20300. },
  20301. "required": ["type", "url"],
  20302. "additionalProperties": false
  20303. },
  20304. "LayoutConfig": {
  20305. "type": "string",
  20306. "enum": ["auto", "stretch"],
  20307. "description": "@deprecated Always uses stretch layout."
  20308. },
  20309. "ImageAttachmentConfig": {
  20310. "type": "object",
  20311. "properties": {
  20312. "auto_resize": {
  20313. "type": "boolean"
  20314. },
  20315. "max_width": {
  20316. "type": "integer",
  20317. "exclusiveMinimum": 0
  20318. },
  20319. "max_height": {
  20320. "type": "integer",
  20321. "exclusiveMinimum": 0
  20322. },
  20323. "max_base64_bytes": {
  20324. "type": "integer",
  20325. "exclusiveMinimum": 0
  20326. }
  20327. },
  20328. "additionalProperties": false
  20329. },
  20330. "AttachmentConfig": {
  20331. "type": "object",
  20332. "properties": {
  20333. "image": {
  20334. "$ref": "#/components/schemas/ImageAttachmentConfig"
  20335. }
  20336. },
  20337. "additionalProperties": false
  20338. },
  20339. "Config": {
  20340. "type": "object",
  20341. "properties": {
  20342. "$schema": {
  20343. "type": "string"
  20344. },
  20345. "shell": {
  20346. "type": "string"
  20347. },
  20348. "logLevel": {
  20349. "$ref": "#/components/schemas/LogLevel"
  20350. },
  20351. "server": {
  20352. "$ref": "#/components/schemas/ServerConfig"
  20353. },
  20354. "command": {
  20355. "type": "object",
  20356. "additionalProperties": {
  20357. "type": "object",
  20358. "properties": {
  20359. "template": {
  20360. "type": "string"
  20361. },
  20362. "description": {
  20363. "type": "string"
  20364. },
  20365. "agent": {
  20366. "type": "string"
  20367. },
  20368. "model": {
  20369. "type": "string"
  20370. },
  20371. "variant": {
  20372. "type": "string"
  20373. },
  20374. "subtask": {
  20375. "type": "boolean"
  20376. }
  20377. },
  20378. "required": ["template"],
  20379. "additionalProperties": false
  20380. }
  20381. },
  20382. "skills": {
  20383. "type": "object",
  20384. "properties": {
  20385. "paths": {
  20386. "type": "array",
  20387. "items": {
  20388. "type": "string"
  20389. }
  20390. },
  20391. "urls": {
  20392. "type": "array",
  20393. "items": {
  20394. "type": "string"
  20395. }
  20396. }
  20397. },
  20398. "additionalProperties": false
  20399. },
  20400. "references": {
  20401. "type": "object",
  20402. "additionalProperties": {
  20403. "anyOf": [
  20404. {
  20405. "type": "string"
  20406. },
  20407. {
  20408. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  20409. },
  20410. {
  20411. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  20412. }
  20413. ]
  20414. }
  20415. },
  20416. "reference": {
  20417. "type": "object",
  20418. "additionalProperties": {
  20419. "anyOf": [
  20420. {
  20421. "type": "string"
  20422. },
  20423. {
  20424. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  20425. },
  20426. {
  20427. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  20428. }
  20429. ]
  20430. }
  20431. },
  20432. "watcher": {
  20433. "type": "object",
  20434. "properties": {
  20435. "ignore": {
  20436. "type": "array",
  20437. "items": {
  20438. "type": "string"
  20439. }
  20440. }
  20441. },
  20442. "additionalProperties": false
  20443. },
  20444. "snapshot": {
  20445. "type": "boolean"
  20446. },
  20447. "plugin": {
  20448. "type": "array",
  20449. "items": {
  20450. "anyOf": [
  20451. {
  20452. "type": "string"
  20453. },
  20454. {
  20455. "type": "array",
  20456. "prefixItems": [
  20457. {
  20458. "type": "string"
  20459. },
  20460. {
  20461. "type": "object"
  20462. }
  20463. ],
  20464. "maxItems": 2,
  20465. "minItems": 2
  20466. }
  20467. ]
  20468. }
  20469. },
  20470. "share": {
  20471. "type": "string",
  20472. "enum": ["manual", "auto", "disabled"]
  20473. },
  20474. "autoshare": {
  20475. "type": "boolean"
  20476. },
  20477. "autoupdate": {
  20478. "anyOf": [
  20479. {
  20480. "type": "boolean"
  20481. },
  20482. {
  20483. "type": "string",
  20484. "enum": ["notify"]
  20485. }
  20486. ],
  20487. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  20488. },
  20489. "disabled_providers": {
  20490. "type": "array",
  20491. "items": {
  20492. "type": "string"
  20493. }
  20494. },
  20495. "enabled_providers": {
  20496. "type": "array",
  20497. "items": {
  20498. "type": "string"
  20499. }
  20500. },
  20501. "model": {
  20502. "type": "string"
  20503. },
  20504. "small_model": {
  20505. "type": "string"
  20506. },
  20507. "default_agent": {
  20508. "type": "string"
  20509. },
  20510. "username": {
  20511. "type": "string"
  20512. },
  20513. "mode": {
  20514. "type": "object",
  20515. "properties": {
  20516. "build": {
  20517. "$ref": "#/components/schemas/AgentConfig"
  20518. },
  20519. "plan": {
  20520. "$ref": "#/components/schemas/AgentConfig"
  20521. }
  20522. },
  20523. "additionalProperties": {
  20524. "$ref": "#/components/schemas/AgentConfig"
  20525. }
  20526. },
  20527. "agent": {
  20528. "type": "object",
  20529. "properties": {
  20530. "plan": {
  20531. "$ref": "#/components/schemas/AgentConfig"
  20532. },
  20533. "build": {
  20534. "$ref": "#/components/schemas/AgentConfig"
  20535. },
  20536. "general": {
  20537. "$ref": "#/components/schemas/AgentConfig"
  20538. },
  20539. "explore": {
  20540. "$ref": "#/components/schemas/AgentConfig"
  20541. },
  20542. "title": {
  20543. "$ref": "#/components/schemas/AgentConfig"
  20544. },
  20545. "summary": {
  20546. "$ref": "#/components/schemas/AgentConfig"
  20547. },
  20548. "compaction": {
  20549. "$ref": "#/components/schemas/AgentConfig"
  20550. }
  20551. },
  20552. "additionalProperties": {
  20553. "$ref": "#/components/schemas/AgentConfig"
  20554. }
  20555. },
  20556. "provider": {
  20557. "type": "object",
  20558. "additionalProperties": {
  20559. "$ref": "#/components/schemas/ProviderConfig"
  20560. }
  20561. },
  20562. "mcp": {
  20563. "type": "object",
  20564. "additionalProperties": {
  20565. "anyOf": [
  20566. {
  20567. "$ref": "#/components/schemas/McpLocalConfig"
  20568. },
  20569. {
  20570. "$ref": "#/components/schemas/McpRemoteConfig"
  20571. },
  20572. {
  20573. "type": "object",
  20574. "properties": {
  20575. "enabled": {
  20576. "type": "boolean"
  20577. }
  20578. },
  20579. "required": ["enabled"],
  20580. "additionalProperties": false
  20581. }
  20582. ]
  20583. }
  20584. },
  20585. "formatter": {
  20586. "anyOf": [
  20587. {
  20588. "type": "boolean"
  20589. },
  20590. {
  20591. "type": "object",
  20592. "additionalProperties": {
  20593. "type": "object",
  20594. "properties": {
  20595. "disabled": {
  20596. "type": "boolean"
  20597. },
  20598. "command": {
  20599. "type": "array",
  20600. "items": {
  20601. "type": "string"
  20602. }
  20603. },
  20604. "environment": {
  20605. "type": "object",
  20606. "additionalProperties": {
  20607. "type": "string"
  20608. }
  20609. },
  20610. "extensions": {
  20611. "type": "array",
  20612. "items": {
  20613. "type": "string"
  20614. }
  20615. }
  20616. },
  20617. "additionalProperties": false
  20618. }
  20619. }
  20620. ],
  20621. "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."
  20622. },
  20623. "lsp": {
  20624. "anyOf": [
  20625. {
  20626. "type": "boolean"
  20627. },
  20628. {
  20629. "type": "object",
  20630. "additionalProperties": {
  20631. "anyOf": [
  20632. {
  20633. "type": "object",
  20634. "properties": {
  20635. "disabled": {
  20636. "type": "boolean",
  20637. "enum": [true]
  20638. }
  20639. },
  20640. "required": ["disabled"],
  20641. "additionalProperties": false
  20642. },
  20643. {
  20644. "type": "object",
  20645. "properties": {
  20646. "command": {
  20647. "type": "array",
  20648. "items": {
  20649. "type": "string"
  20650. }
  20651. },
  20652. "extensions": {
  20653. "type": "array",
  20654. "items": {
  20655. "type": "string"
  20656. }
  20657. },
  20658. "disabled": {
  20659. "type": "boolean"
  20660. },
  20661. "env": {
  20662. "type": "object",
  20663. "additionalProperties": {
  20664. "type": "string"
  20665. }
  20666. },
  20667. "initialization": {
  20668. "type": "object"
  20669. }
  20670. },
  20671. "required": ["command"],
  20672. "additionalProperties": false
  20673. }
  20674. ]
  20675. }
  20676. }
  20677. ],
  20678. "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."
  20679. },
  20680. "instructions": {
  20681. "type": "array",
  20682. "items": {
  20683. "type": "string"
  20684. }
  20685. },
  20686. "layout": {
  20687. "$ref": "#/components/schemas/LayoutConfig"
  20688. },
  20689. "permission": {
  20690. "$ref": "#/components/schemas/PermissionConfig"
  20691. },
  20692. "tools": {
  20693. "type": "object",
  20694. "additionalProperties": {
  20695. "type": "boolean"
  20696. }
  20697. },
  20698. "attachment": {
  20699. "$ref": "#/components/schemas/AttachmentConfig"
  20700. },
  20701. "enterprise": {
  20702. "type": "object",
  20703. "properties": {
  20704. "url": {
  20705. "type": "string"
  20706. }
  20707. },
  20708. "additionalProperties": false
  20709. },
  20710. "tool_output": {
  20711. "type": "object",
  20712. "properties": {
  20713. "max_lines": {
  20714. "type": "integer",
  20715. "exclusiveMinimum": 0
  20716. },
  20717. "max_bytes": {
  20718. "type": "integer",
  20719. "exclusiveMinimum": 0
  20720. }
  20721. },
  20722. "additionalProperties": false
  20723. },
  20724. "compaction": {
  20725. "type": "object",
  20726. "properties": {
  20727. "auto": {
  20728. "type": "boolean"
  20729. },
  20730. "prune": {
  20731. "type": "boolean"
  20732. },
  20733. "tail_turns": {
  20734. "type": "integer",
  20735. "minimum": 0
  20736. },
  20737. "preserve_recent_tokens": {
  20738. "type": "integer",
  20739. "minimum": 0
  20740. },
  20741. "reserved": {
  20742. "type": "integer",
  20743. "minimum": 0
  20744. }
  20745. },
  20746. "additionalProperties": false
  20747. },
  20748. "experimental": {
  20749. "type": "object",
  20750. "properties": {
  20751. "disable_paste_summary": {
  20752. "type": "boolean"
  20753. },
  20754. "batch_tool": {
  20755. "type": "boolean"
  20756. },
  20757. "openTelemetry": {
  20758. "type": "boolean"
  20759. },
  20760. "primary_tools": {
  20761. "type": "array",
  20762. "items": {
  20763. "type": "string"
  20764. }
  20765. },
  20766. "continue_loop_on_deny": {
  20767. "type": "boolean"
  20768. },
  20769. "mcp_timeout": {
  20770. "type": "integer",
  20771. "exclusiveMinimum": 0
  20772. },
  20773. "policies": {
  20774. "type": "array",
  20775. "items": {
  20776. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  20777. }
  20778. }
  20779. },
  20780. "additionalProperties": false
  20781. }
  20782. },
  20783. "additionalProperties": false
  20784. },
  20785. "Model": {
  20786. "type": "object",
  20787. "properties": {
  20788. "id": {
  20789. "type": "string"
  20790. },
  20791. "providerID": {
  20792. "type": "string"
  20793. },
  20794. "api": {
  20795. "type": "object",
  20796. "properties": {
  20797. "id": {
  20798. "type": "string"
  20799. },
  20800. "url": {
  20801. "type": "string"
  20802. },
  20803. "npm": {
  20804. "type": "string"
  20805. }
  20806. },
  20807. "required": ["id", "url", "npm"],
  20808. "additionalProperties": false
  20809. },
  20810. "name": {
  20811. "type": "string"
  20812. },
  20813. "family": {
  20814. "type": "string"
  20815. },
  20816. "capabilities": {
  20817. "type": "object",
  20818. "properties": {
  20819. "temperature": {
  20820. "type": "boolean"
  20821. },
  20822. "reasoning": {
  20823. "type": "boolean"
  20824. },
  20825. "attachment": {
  20826. "type": "boolean"
  20827. },
  20828. "toolcall": {
  20829. "type": "boolean"
  20830. },
  20831. "input": {
  20832. "type": "object",
  20833. "properties": {
  20834. "text": {
  20835. "type": "boolean"
  20836. },
  20837. "audio": {
  20838. "type": "boolean"
  20839. },
  20840. "image": {
  20841. "type": "boolean"
  20842. },
  20843. "video": {
  20844. "type": "boolean"
  20845. },
  20846. "pdf": {
  20847. "type": "boolean"
  20848. }
  20849. },
  20850. "required": ["text", "audio", "image", "video", "pdf"],
  20851. "additionalProperties": false
  20852. },
  20853. "output": {
  20854. "type": "object",
  20855. "properties": {
  20856. "text": {
  20857. "type": "boolean"
  20858. },
  20859. "audio": {
  20860. "type": "boolean"
  20861. },
  20862. "image": {
  20863. "type": "boolean"
  20864. },
  20865. "video": {
  20866. "type": "boolean"
  20867. },
  20868. "pdf": {
  20869. "type": "boolean"
  20870. }
  20871. },
  20872. "required": ["text", "audio", "image", "video", "pdf"],
  20873. "additionalProperties": false
  20874. },
  20875. "interleaved": {
  20876. "anyOf": [
  20877. {
  20878. "type": "boolean"
  20879. },
  20880. {
  20881. "type": "object",
  20882. "properties": {
  20883. "field": {
  20884. "type": "string",
  20885. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  20886. }
  20887. },
  20888. "required": ["field"],
  20889. "additionalProperties": false
  20890. }
  20891. ]
  20892. }
  20893. },
  20894. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  20895. "additionalProperties": false
  20896. },
  20897. "cost": {
  20898. "type": "object",
  20899. "properties": {
  20900. "input": {
  20901. "type": "number"
  20902. },
  20903. "output": {
  20904. "type": "number"
  20905. },
  20906. "cache": {
  20907. "type": "object",
  20908. "properties": {
  20909. "read": {
  20910. "type": "number"
  20911. },
  20912. "write": {
  20913. "type": "number"
  20914. }
  20915. },
  20916. "required": ["read", "write"],
  20917. "additionalProperties": false
  20918. },
  20919. "tiers": {
  20920. "type": "array",
  20921. "items": {
  20922. "type": "object",
  20923. "properties": {
  20924. "input": {
  20925. "type": "number"
  20926. },
  20927. "output": {
  20928. "type": "number"
  20929. },
  20930. "cache": {
  20931. "type": "object",
  20932. "properties": {
  20933. "read": {
  20934. "type": "number"
  20935. },
  20936. "write": {
  20937. "type": "number"
  20938. }
  20939. },
  20940. "required": ["read", "write"],
  20941. "additionalProperties": false
  20942. },
  20943. "tier": {
  20944. "type": "object",
  20945. "properties": {
  20946. "type": {
  20947. "type": "string",
  20948. "enum": ["context"]
  20949. },
  20950. "size": {
  20951. "type": "number"
  20952. }
  20953. },
  20954. "required": ["type", "size"],
  20955. "additionalProperties": false
  20956. }
  20957. },
  20958. "required": ["input", "output", "cache", "tier"],
  20959. "additionalProperties": false
  20960. }
  20961. },
  20962. "experimentalOver200K": {
  20963. "type": "object",
  20964. "properties": {
  20965. "input": {
  20966. "type": "number"
  20967. },
  20968. "output": {
  20969. "type": "number"
  20970. },
  20971. "cache": {
  20972. "type": "object",
  20973. "properties": {
  20974. "read": {
  20975. "type": "number"
  20976. },
  20977. "write": {
  20978. "type": "number"
  20979. }
  20980. },
  20981. "required": ["read", "write"],
  20982. "additionalProperties": false
  20983. }
  20984. },
  20985. "required": ["input", "output", "cache"],
  20986. "additionalProperties": false
  20987. }
  20988. },
  20989. "required": ["input", "output", "cache"],
  20990. "additionalProperties": false
  20991. },
  20992. "limit": {
  20993. "type": "object",
  20994. "properties": {
  20995. "context": {
  20996. "type": "number"
  20997. },
  20998. "input": {
  20999. "type": "number"
  21000. },
  21001. "output": {
  21002. "type": "number"
  21003. }
  21004. },
  21005. "required": ["context", "output"],
  21006. "additionalProperties": false
  21007. },
  21008. "status": {
  21009. "type": "string",
  21010. "enum": ["alpha", "beta", "deprecated", "active"]
  21011. },
  21012. "options": {
  21013. "type": "object"
  21014. },
  21015. "headers": {
  21016. "type": "object",
  21017. "additionalProperties": {
  21018. "type": "string"
  21019. }
  21020. },
  21021. "release_date": {
  21022. "type": "string"
  21023. },
  21024. "variants": {
  21025. "type": "object",
  21026. "additionalProperties": {
  21027. "type": "object"
  21028. }
  21029. }
  21030. },
  21031. "required": [
  21032. "id",
  21033. "providerID",
  21034. "api",
  21035. "name",
  21036. "capabilities",
  21037. "cost",
  21038. "limit",
  21039. "status",
  21040. "options",
  21041. "headers",
  21042. "release_date"
  21043. ],
  21044. "additionalProperties": false
  21045. },
  21046. "Provider": {
  21047. "type": "object",
  21048. "properties": {
  21049. "id": {
  21050. "type": "string"
  21051. },
  21052. "name": {
  21053. "type": "string"
  21054. },
  21055. "source": {
  21056. "type": "string",
  21057. "enum": ["env", "config", "custom", "api"]
  21058. },
  21059. "env": {
  21060. "type": "array",
  21061. "items": {
  21062. "type": "string"
  21063. }
  21064. },
  21065. "key": {
  21066. "type": "string"
  21067. },
  21068. "options": {
  21069. "type": "object"
  21070. },
  21071. "models": {
  21072. "type": "object",
  21073. "additionalProperties": {
  21074. "$ref": "#/components/schemas/Model"
  21075. }
  21076. }
  21077. },
  21078. "required": ["id", "name", "source", "env", "options", "models"],
  21079. "additionalProperties": false
  21080. },
  21081. "ExperimentalCapabilities": {
  21082. "type": "object",
  21083. "properties": {
  21084. "backgroundSubagents": {
  21085. "type": "boolean"
  21086. }
  21087. },
  21088. "required": ["backgroundSubagents"],
  21089. "additionalProperties": false
  21090. },
  21091. "ConsoleState": {
  21092. "type": "object",
  21093. "properties": {
  21094. "consoleManagedProviders": {
  21095. "type": "array",
  21096. "items": {
  21097. "type": "string"
  21098. }
  21099. },
  21100. "activeOrgName": {
  21101. "type": "string"
  21102. },
  21103. "switchableOrgCount": {
  21104. "type": "integer",
  21105. "minimum": 0
  21106. }
  21107. },
  21108. "required": ["consoleManagedProviders", "switchableOrgCount"],
  21109. "additionalProperties": false
  21110. },
  21111. "effect_HttpApiError_InternalServerError": {
  21112. "type": "object",
  21113. "properties": {
  21114. "_tag": {
  21115. "type": "string",
  21116. "enum": ["InternalServerError"]
  21117. }
  21118. },
  21119. "required": ["_tag"],
  21120. "additionalProperties": false
  21121. },
  21122. "ToolListItem": {
  21123. "type": "object",
  21124. "properties": {
  21125. "id": {
  21126. "type": "string"
  21127. },
  21128. "description": {
  21129. "type": "string"
  21130. },
  21131. "parameters": {}
  21132. },
  21133. "required": ["id", "description", "parameters"],
  21134. "additionalProperties": false
  21135. },
  21136. "ToolList": {
  21137. "type": "array",
  21138. "items": {
  21139. "$ref": "#/components/schemas/ToolListItem"
  21140. }
  21141. },
  21142. "ToolIDs": {
  21143. "type": "array",
  21144. "items": {
  21145. "type": "string"
  21146. }
  21147. },
  21148. "WorktreeError": {
  21149. "type": "object",
  21150. "properties": {
  21151. "name": {
  21152. "type": "string",
  21153. "enum": [
  21154. "WorktreeNotGitError",
  21155. "WorktreeNameGenerationFailedError",
  21156. "WorktreeCreateFailedError",
  21157. "WorktreeStartCommandFailedError",
  21158. "WorktreeRemoveFailedError",
  21159. "WorktreeResetFailedError",
  21160. "WorktreeListFailedError"
  21161. ]
  21162. },
  21163. "data": {
  21164. "type": "object",
  21165. "properties": {
  21166. "message": {
  21167. "type": "string"
  21168. }
  21169. },
  21170. "required": ["message"],
  21171. "additionalProperties": false
  21172. }
  21173. },
  21174. "required": ["name", "data"],
  21175. "additionalProperties": false
  21176. },
  21177. "WorktreeCreateInput": {
  21178. "type": "object",
  21179. "properties": {
  21180. "name": {
  21181. "type": "string"
  21182. },
  21183. "startCommand": {
  21184. "type": "string",
  21185. "description": "Additional startup script to run after the project's start command"
  21186. }
  21187. },
  21188. "additionalProperties": false
  21189. },
  21190. "Worktree": {
  21191. "type": "object",
  21192. "properties": {
  21193. "name": {
  21194. "type": "string"
  21195. },
  21196. "branch": {
  21197. "type": "string"
  21198. },
  21199. "directory": {
  21200. "type": "string"
  21201. }
  21202. },
  21203. "required": ["name", "directory"],
  21204. "additionalProperties": false
  21205. },
  21206. "WorktreeRemoveInput": {
  21207. "type": "object",
  21208. "properties": {
  21209. "directory": {
  21210. "type": "string"
  21211. }
  21212. },
  21213. "required": ["directory"],
  21214. "additionalProperties": false
  21215. },
  21216. "WorktreeResetInput": {
  21217. "type": "object",
  21218. "properties": {
  21219. "directory": {
  21220. "type": "string"
  21221. }
  21222. },
  21223. "required": ["directory"],
  21224. "additionalProperties": false
  21225. },
  21226. "ProjectSummary": {
  21227. "type": "object",
  21228. "properties": {
  21229. "id": {
  21230. "type": "string"
  21231. },
  21232. "name": {
  21233. "type": "string"
  21234. },
  21235. "worktree": {
  21236. "type": "string"
  21237. }
  21238. },
  21239. "required": ["id", "worktree"],
  21240. "additionalProperties": false
  21241. },
  21242. "GlobalSession": {
  21243. "type": "object",
  21244. "properties": {
  21245. "id": {
  21246. "type": "string",
  21247. "pattern": "^ses"
  21248. },
  21249. "slug": {
  21250. "type": "string"
  21251. },
  21252. "projectID": {
  21253. "type": "string"
  21254. },
  21255. "workspaceID": {
  21256. "type": "string",
  21257. "pattern": "^wrk"
  21258. },
  21259. "directory": {
  21260. "type": "string"
  21261. },
  21262. "path": {
  21263. "type": "string"
  21264. },
  21265. "parentID": {
  21266. "type": "string",
  21267. "pattern": "^ses"
  21268. },
  21269. "summary": {
  21270. "type": "object",
  21271. "properties": {
  21272. "additions": {
  21273. "type": "number"
  21274. },
  21275. "deletions": {
  21276. "type": "number"
  21277. },
  21278. "files": {
  21279. "type": "number"
  21280. },
  21281. "diffs": {
  21282. "type": "array",
  21283. "items": {
  21284. "$ref": "#/components/schemas/SnapshotFileDiff"
  21285. }
  21286. }
  21287. },
  21288. "required": ["additions", "deletions", "files"],
  21289. "additionalProperties": false
  21290. },
  21291. "cost": {
  21292. "type": "number"
  21293. },
  21294. "tokens": {
  21295. "type": "object",
  21296. "properties": {
  21297. "input": {
  21298. "type": "number"
  21299. },
  21300. "output": {
  21301. "type": "number"
  21302. },
  21303. "reasoning": {
  21304. "type": "number"
  21305. },
  21306. "cache": {
  21307. "type": "object",
  21308. "properties": {
  21309. "read": {
  21310. "type": "number"
  21311. },
  21312. "write": {
  21313. "type": "number"
  21314. }
  21315. },
  21316. "required": ["read", "write"],
  21317. "additionalProperties": false
  21318. }
  21319. },
  21320. "required": ["input", "output", "reasoning", "cache"],
  21321. "additionalProperties": false
  21322. },
  21323. "share": {
  21324. "type": "object",
  21325. "properties": {
  21326. "url": {
  21327. "type": "string"
  21328. }
  21329. },
  21330. "required": ["url"],
  21331. "additionalProperties": false
  21332. },
  21333. "title": {
  21334. "type": "string"
  21335. },
  21336. "agent": {
  21337. "type": "string"
  21338. },
  21339. "model": {
  21340. "type": "object",
  21341. "properties": {
  21342. "id": {
  21343. "type": "string"
  21344. },
  21345. "providerID": {
  21346. "type": "string"
  21347. },
  21348. "variant": {
  21349. "type": "string"
  21350. }
  21351. },
  21352. "required": ["id", "providerID"],
  21353. "additionalProperties": false
  21354. },
  21355. "version": {
  21356. "type": "string"
  21357. },
  21358. "metadata": {
  21359. "type": "object"
  21360. },
  21361. "time": {
  21362. "type": "object",
  21363. "properties": {
  21364. "created": {
  21365. "type": "integer",
  21366. "minimum": 0
  21367. },
  21368. "updated": {
  21369. "type": "integer",
  21370. "minimum": 0
  21371. },
  21372. "compacting": {
  21373. "type": "integer",
  21374. "minimum": 0
  21375. },
  21376. "archived": {
  21377. "type": "number"
  21378. }
  21379. },
  21380. "required": ["created", "updated"],
  21381. "additionalProperties": false
  21382. },
  21383. "permission": {
  21384. "$ref": "#/components/schemas/PermissionRuleset"
  21385. },
  21386. "revert": {
  21387. "type": "object",
  21388. "properties": {
  21389. "messageID": {
  21390. "type": "string",
  21391. "pattern": "^msg"
  21392. },
  21393. "partID": {
  21394. "type": "string",
  21395. "pattern": "^prt"
  21396. },
  21397. "snapshot": {
  21398. "type": "string"
  21399. },
  21400. "diff": {
  21401. "type": "string"
  21402. }
  21403. },
  21404. "required": ["messageID"],
  21405. "additionalProperties": false
  21406. },
  21407. "project": {
  21408. "anyOf": [
  21409. {
  21410. "$ref": "#/components/schemas/ProjectSummary"
  21411. },
  21412. {
  21413. "type": "null"
  21414. }
  21415. ]
  21416. }
  21417. },
  21418. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  21419. "additionalProperties": false
  21420. },
  21421. "McpResource": {
  21422. "type": "object",
  21423. "properties": {
  21424. "name": {
  21425. "type": "string"
  21426. },
  21427. "uri": {
  21428. "type": "string"
  21429. },
  21430. "description": {
  21431. "type": "string"
  21432. },
  21433. "mimeType": {
  21434. "type": "string"
  21435. },
  21436. "client": {
  21437. "type": "string"
  21438. }
  21439. },
  21440. "required": ["name", "uri", "client"],
  21441. "additionalProperties": false
  21442. },
  21443. "Symbol": {
  21444. "type": "object",
  21445. "properties": {
  21446. "name": {
  21447. "type": "string"
  21448. },
  21449. "kind": {
  21450. "type": "integer",
  21451. "minimum": 0
  21452. },
  21453. "location": {
  21454. "type": "object",
  21455. "properties": {
  21456. "uri": {
  21457. "type": "string"
  21458. },
  21459. "range": {
  21460. "$ref": "#/components/schemas/Range"
  21461. }
  21462. },
  21463. "required": ["uri", "range"],
  21464. "additionalProperties": false
  21465. }
  21466. },
  21467. "required": ["name", "kind", "location"],
  21468. "additionalProperties": false
  21469. },
  21470. "FileNode": {
  21471. "type": "object",
  21472. "properties": {
  21473. "name": {
  21474. "type": "string"
  21475. },
  21476. "path": {
  21477. "type": "string"
  21478. },
  21479. "absolute": {
  21480. "type": "string"
  21481. },
  21482. "type": {
  21483. "type": "string",
  21484. "enum": ["file", "directory"]
  21485. },
  21486. "ignored": {
  21487. "type": "boolean"
  21488. }
  21489. },
  21490. "required": ["name", "path", "absolute", "type", "ignored"],
  21491. "additionalProperties": false
  21492. },
  21493. "FileContent": {
  21494. "type": "object",
  21495. "properties": {
  21496. "type": {
  21497. "type": "string",
  21498. "enum": ["text", "binary"]
  21499. },
  21500. "content": {
  21501. "type": "string"
  21502. },
  21503. "diff": {
  21504. "type": "string"
  21505. },
  21506. "patch": {
  21507. "type": "object",
  21508. "properties": {
  21509. "oldFileName": {
  21510. "type": "string"
  21511. },
  21512. "newFileName": {
  21513. "type": "string"
  21514. },
  21515. "oldHeader": {
  21516. "type": "string"
  21517. },
  21518. "newHeader": {
  21519. "type": "string"
  21520. },
  21521. "hunks": {
  21522. "type": "array",
  21523. "items": {
  21524. "type": "object",
  21525. "properties": {
  21526. "oldStart": {
  21527. "type": "integer",
  21528. "minimum": 0
  21529. },
  21530. "oldLines": {
  21531. "type": "integer",
  21532. "minimum": 0
  21533. },
  21534. "newStart": {
  21535. "type": "integer",
  21536. "minimum": 0
  21537. },
  21538. "newLines": {
  21539. "type": "integer",
  21540. "minimum": 0
  21541. },
  21542. "lines": {
  21543. "type": "array",
  21544. "items": {
  21545. "type": "string"
  21546. }
  21547. }
  21548. },
  21549. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  21550. "additionalProperties": false
  21551. }
  21552. },
  21553. "index": {
  21554. "type": "string"
  21555. }
  21556. },
  21557. "required": ["oldFileName", "newFileName", "hunks"],
  21558. "additionalProperties": false
  21559. },
  21560. "encoding": {
  21561. "type": "string",
  21562. "enum": ["base64"]
  21563. },
  21564. "mimeType": {
  21565. "type": "string"
  21566. }
  21567. },
  21568. "required": ["type", "content"],
  21569. "additionalProperties": false
  21570. },
  21571. "File": {
  21572. "type": "object",
  21573. "properties": {
  21574. "path": {
  21575. "type": "string"
  21576. },
  21577. "added": {
  21578. "type": "integer",
  21579. "minimum": 0
  21580. },
  21581. "removed": {
  21582. "type": "integer",
  21583. "minimum": 0
  21584. },
  21585. "status": {
  21586. "type": "string",
  21587. "enum": ["added", "deleted", "modified"]
  21588. }
  21589. },
  21590. "required": ["path", "added", "removed", "status"],
  21591. "additionalProperties": false
  21592. },
  21593. "Path": {
  21594. "type": "object",
  21595. "properties": {
  21596. "home": {
  21597. "type": "string"
  21598. },
  21599. "state": {
  21600. "type": "string"
  21601. },
  21602. "config": {
  21603. "type": "string"
  21604. },
  21605. "worktree": {
  21606. "type": "string"
  21607. },
  21608. "directory": {
  21609. "type": "string"
  21610. }
  21611. },
  21612. "required": ["home", "state", "config", "worktree", "directory"],
  21613. "additionalProperties": false
  21614. },
  21615. "VcsInfo": {
  21616. "type": "object",
  21617. "properties": {
  21618. "branch": {
  21619. "type": "string"
  21620. },
  21621. "default_branch": {
  21622. "type": "string"
  21623. }
  21624. },
  21625. "additionalProperties": false
  21626. },
  21627. "VcsFileStatus": {
  21628. "type": "object",
  21629. "properties": {
  21630. "file": {
  21631. "type": "string"
  21632. },
  21633. "additions": {
  21634. "type": "number"
  21635. },
  21636. "deletions": {
  21637. "type": "number"
  21638. },
  21639. "status": {
  21640. "type": "string",
  21641. "enum": ["added", "deleted", "modified"]
  21642. }
  21643. },
  21644. "required": ["file", "additions", "deletions", "status"],
  21645. "additionalProperties": false
  21646. },
  21647. "VcsFileDiff": {
  21648. "type": "object",
  21649. "properties": {
  21650. "file": {
  21651. "type": "string"
  21652. },
  21653. "patch": {
  21654. "type": "string"
  21655. },
  21656. "additions": {
  21657. "type": "number"
  21658. },
  21659. "deletions": {
  21660. "type": "number"
  21661. },
  21662. "status": {
  21663. "type": "string",
  21664. "enum": ["added", "deleted", "modified"]
  21665. }
  21666. },
  21667. "required": ["file", "additions", "deletions"],
  21668. "additionalProperties": false
  21669. },
  21670. "VcsApplyError": {
  21671. "type": "object",
  21672. "properties": {
  21673. "name": {
  21674. "type": "string",
  21675. "enum": ["VcsApplyError"]
  21676. },
  21677. "data": {
  21678. "type": "object",
  21679. "properties": {
  21680. "message": {
  21681. "type": "string"
  21682. },
  21683. "reason": {
  21684. "type": "string",
  21685. "enum": ["non-git", "not-clean"]
  21686. }
  21687. },
  21688. "required": ["message", "reason"],
  21689. "additionalProperties": false
  21690. }
  21691. },
  21692. "required": ["name", "data"],
  21693. "additionalProperties": false
  21694. },
  21695. "Command": {
  21696. "type": "object",
  21697. "properties": {
  21698. "name": {
  21699. "type": "string"
  21700. },
  21701. "description": {
  21702. "type": "string"
  21703. },
  21704. "agent": {
  21705. "type": "string"
  21706. },
  21707. "model": {
  21708. "type": "string"
  21709. },
  21710. "source": {
  21711. "type": "string",
  21712. "enum": ["command", "mcp", "skill"]
  21713. },
  21714. "template": {
  21715. "type": "string"
  21716. },
  21717. "subtask": {
  21718. "type": "boolean"
  21719. },
  21720. "hints": {
  21721. "type": "array",
  21722. "items": {
  21723. "type": "string"
  21724. }
  21725. }
  21726. },
  21727. "required": ["name", "template", "hints"],
  21728. "additionalProperties": false
  21729. },
  21730. "Agent": {
  21731. "type": "object",
  21732. "properties": {
  21733. "name": {
  21734. "type": "string"
  21735. },
  21736. "description": {
  21737. "type": "string"
  21738. },
  21739. "mode": {
  21740. "type": "string",
  21741. "enum": ["subagent", "primary", "all"]
  21742. },
  21743. "native": {
  21744. "type": "boolean"
  21745. },
  21746. "hidden": {
  21747. "type": "boolean"
  21748. },
  21749. "topP": {
  21750. "type": "number"
  21751. },
  21752. "temperature": {
  21753. "type": "number"
  21754. },
  21755. "color": {
  21756. "type": "string"
  21757. },
  21758. "permission": {
  21759. "$ref": "#/components/schemas/PermissionRuleset"
  21760. },
  21761. "model": {
  21762. "type": "object",
  21763. "properties": {
  21764. "modelID": {
  21765. "type": "string"
  21766. },
  21767. "providerID": {
  21768. "type": "string"
  21769. }
  21770. },
  21771. "required": ["modelID", "providerID"],
  21772. "additionalProperties": false
  21773. },
  21774. "variant": {
  21775. "type": "string"
  21776. },
  21777. "prompt": {
  21778. "type": "string"
  21779. },
  21780. "options": {
  21781. "type": "object"
  21782. },
  21783. "steps": {
  21784. "type": "number"
  21785. }
  21786. },
  21787. "required": ["name", "mode", "permission", "options"],
  21788. "additionalProperties": false
  21789. },
  21790. "LSPStatus": {
  21791. "type": "object",
  21792. "properties": {
  21793. "id": {
  21794. "type": "string"
  21795. },
  21796. "name": {
  21797. "type": "string"
  21798. },
  21799. "root": {
  21800. "type": "string"
  21801. },
  21802. "status": {
  21803. "type": "string",
  21804. "enum": ["connected", "error"]
  21805. }
  21806. },
  21807. "required": ["id", "name", "root", "status"],
  21808. "additionalProperties": false
  21809. },
  21810. "FormatterStatus": {
  21811. "type": "object",
  21812. "properties": {
  21813. "name": {
  21814. "type": "string"
  21815. },
  21816. "extensions": {
  21817. "type": "array",
  21818. "items": {
  21819. "type": "string"
  21820. }
  21821. },
  21822. "enabled": {
  21823. "type": "boolean"
  21824. }
  21825. },
  21826. "required": ["name", "extensions", "enabled"],
  21827. "additionalProperties": false
  21828. },
  21829. "MCPStatusConnected": {
  21830. "type": "object",
  21831. "properties": {
  21832. "status": {
  21833. "type": "string",
  21834. "enum": ["connected"]
  21835. }
  21836. },
  21837. "required": ["status"],
  21838. "additionalProperties": false
  21839. },
  21840. "MCPStatusDisabled": {
  21841. "type": "object",
  21842. "properties": {
  21843. "status": {
  21844. "type": "string",
  21845. "enum": ["disabled"]
  21846. }
  21847. },
  21848. "required": ["status"],
  21849. "additionalProperties": false
  21850. },
  21851. "MCPStatusFailed": {
  21852. "type": "object",
  21853. "properties": {
  21854. "status": {
  21855. "type": "string",
  21856. "enum": ["failed"]
  21857. },
  21858. "error": {
  21859. "type": "string"
  21860. }
  21861. },
  21862. "required": ["status", "error"],
  21863. "additionalProperties": false
  21864. },
  21865. "MCPStatusNeedsAuth": {
  21866. "type": "object",
  21867. "properties": {
  21868. "status": {
  21869. "type": "string",
  21870. "enum": ["needs_auth"]
  21871. }
  21872. },
  21873. "required": ["status"],
  21874. "additionalProperties": false
  21875. },
  21876. "MCPStatusNeedsClientRegistration": {
  21877. "type": "object",
  21878. "properties": {
  21879. "status": {
  21880. "type": "string",
  21881. "enum": ["needs_client_registration"]
  21882. },
  21883. "error": {
  21884. "type": "string"
  21885. }
  21886. },
  21887. "required": ["status", "error"],
  21888. "additionalProperties": false
  21889. },
  21890. "MCPStatus": {
  21891. "anyOf": [
  21892. {
  21893. "$ref": "#/components/schemas/MCPStatusConnected"
  21894. },
  21895. {
  21896. "$ref": "#/components/schemas/MCPStatusDisabled"
  21897. },
  21898. {
  21899. "$ref": "#/components/schemas/MCPStatusFailed"
  21900. },
  21901. {
  21902. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  21903. },
  21904. {
  21905. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  21906. }
  21907. ]
  21908. },
  21909. "McpUnsupportedOAuthError": {
  21910. "type": "object",
  21911. "properties": {
  21912. "error": {
  21913. "type": "string"
  21914. }
  21915. },
  21916. "required": ["error"],
  21917. "additionalProperties": false
  21918. },
  21919. "McpServerNotFoundError": {
  21920. "type": "object",
  21921. "properties": {
  21922. "_tag": {
  21923. "type": "string",
  21924. "enum": ["McpServerNotFoundError"]
  21925. },
  21926. "name": {
  21927. "type": "string"
  21928. },
  21929. "message": {
  21930. "type": "string"
  21931. }
  21932. },
  21933. "required": ["_tag", "name", "message"],
  21934. "additionalProperties": false
  21935. },
  21936. "Project": {
  21937. "type": "object",
  21938. "properties": {
  21939. "id": {
  21940. "type": "string"
  21941. },
  21942. "worktree": {
  21943. "type": "string"
  21944. },
  21945. "vcs": {
  21946. "type": "string",
  21947. "enum": ["git"]
  21948. },
  21949. "name": {
  21950. "type": "string"
  21951. },
  21952. "icon": {
  21953. "type": "object",
  21954. "properties": {
  21955. "url": {
  21956. "type": "string"
  21957. },
  21958. "override": {
  21959. "type": "string"
  21960. },
  21961. "color": {
  21962. "type": "string"
  21963. }
  21964. },
  21965. "additionalProperties": false
  21966. },
  21967. "commands": {
  21968. "type": "object",
  21969. "properties": {
  21970. "start": {
  21971. "type": "string",
  21972. "description": "Startup script to run when creating a new workspace (worktree)"
  21973. }
  21974. },
  21975. "additionalProperties": false
  21976. },
  21977. "time": {
  21978. "type": "object",
  21979. "properties": {
  21980. "created": {
  21981. "type": "integer",
  21982. "minimum": 0
  21983. },
  21984. "updated": {
  21985. "type": "integer",
  21986. "minimum": 0
  21987. },
  21988. "initialized": {
  21989. "type": "integer",
  21990. "minimum": 0
  21991. }
  21992. },
  21993. "required": ["created", "updated"],
  21994. "additionalProperties": false
  21995. },
  21996. "sandboxes": {
  21997. "type": "array",
  21998. "items": {
  21999. "type": "string"
  22000. }
  22001. }
  22002. },
  22003. "required": ["id", "worktree", "time", "sandboxes"],
  22004. "additionalProperties": false
  22005. },
  22006. "ProjectNotFoundError": {
  22007. "type": "object",
  22008. "properties": {
  22009. "_tag": {
  22010. "type": "string",
  22011. "enum": ["ProjectNotFoundError"]
  22012. },
  22013. "projectID": {
  22014. "type": "string"
  22015. },
  22016. "message": {
  22017. "type": "string"
  22018. }
  22019. },
  22020. "required": ["_tag", "projectID", "message"],
  22021. "additionalProperties": false
  22022. },
  22023. "PtyNotFoundError": {
  22024. "type": "object",
  22025. "properties": {
  22026. "_tag": {
  22027. "type": "string",
  22028. "enum": ["PtyNotFoundError"]
  22029. },
  22030. "ptyID": {
  22031. "type": "string"
  22032. },
  22033. "message": {
  22034. "type": "string"
  22035. }
  22036. },
  22037. "required": ["_tag", "ptyID", "message"],
  22038. "additionalProperties": false
  22039. },
  22040. "PtyForbiddenError": {
  22041. "type": "object",
  22042. "properties": {
  22043. "_tag": {
  22044. "type": "string",
  22045. "enum": ["PtyForbiddenError"]
  22046. },
  22047. "message": {
  22048. "type": "string"
  22049. }
  22050. },
  22051. "required": ["_tag", "message"],
  22052. "additionalProperties": false
  22053. },
  22054. "QuestionRequest": {
  22055. "type": "object",
  22056. "properties": {
  22057. "id": {
  22058. "type": "string",
  22059. "pattern": "^que"
  22060. },
  22061. "sessionID": {
  22062. "type": "string",
  22063. "pattern": "^ses"
  22064. },
  22065. "questions": {
  22066. "type": "array",
  22067. "items": {
  22068. "$ref": "#/components/schemas/QuestionInfo"
  22069. },
  22070. "description": "Questions to ask"
  22071. },
  22072. "tool": {
  22073. "$ref": "#/components/schemas/QuestionTool"
  22074. }
  22075. },
  22076. "required": ["id", "sessionID", "questions"],
  22077. "additionalProperties": false
  22078. },
  22079. "QuestionNotFoundError": {
  22080. "type": "object",
  22081. "properties": {
  22082. "_tag": {
  22083. "type": "string",
  22084. "enum": ["QuestionNotFoundError"]
  22085. },
  22086. "requestID": {
  22087. "type": "string"
  22088. },
  22089. "message": {
  22090. "type": "string"
  22091. }
  22092. },
  22093. "required": ["_tag", "requestID", "message"],
  22094. "additionalProperties": false
  22095. },
  22096. "PermissionRequest": {
  22097. "type": "object",
  22098. "properties": {
  22099. "id": {
  22100. "type": "string",
  22101. "pattern": "^per"
  22102. },
  22103. "sessionID": {
  22104. "type": "string",
  22105. "pattern": "^ses"
  22106. },
  22107. "permission": {
  22108. "type": "string"
  22109. },
  22110. "patterns": {
  22111. "type": "array",
  22112. "items": {
  22113. "type": "string"
  22114. }
  22115. },
  22116. "metadata": {
  22117. "type": "object"
  22118. },
  22119. "always": {
  22120. "type": "array",
  22121. "items": {
  22122. "type": "string"
  22123. }
  22124. },
  22125. "tool": {
  22126. "type": "object",
  22127. "properties": {
  22128. "messageID": {
  22129. "type": "string"
  22130. },
  22131. "callID": {
  22132. "type": "string"
  22133. }
  22134. },
  22135. "required": ["messageID", "callID"],
  22136. "additionalProperties": false
  22137. }
  22138. },
  22139. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  22140. "additionalProperties": false
  22141. },
  22142. "PermissionNotFoundError": {
  22143. "type": "object",
  22144. "properties": {
  22145. "_tag": {
  22146. "type": "string",
  22147. "enum": ["PermissionNotFoundError"]
  22148. },
  22149. "requestID": {
  22150. "type": "string"
  22151. },
  22152. "message": {
  22153. "type": "string"
  22154. }
  22155. },
  22156. "required": ["_tag", "requestID", "message"],
  22157. "additionalProperties": false
  22158. },
  22159. "ProviderAuthMethod": {
  22160. "type": "object",
  22161. "properties": {
  22162. "type": {
  22163. "type": "string",
  22164. "enum": ["oauth", "api"]
  22165. },
  22166. "label": {
  22167. "type": "string"
  22168. },
  22169. "prompts": {
  22170. "type": "array",
  22171. "items": {
  22172. "anyOf": [
  22173. {
  22174. "type": "object",
  22175. "properties": {
  22176. "type": {
  22177. "type": "string",
  22178. "enum": ["text"]
  22179. },
  22180. "key": {
  22181. "type": "string"
  22182. },
  22183. "message": {
  22184. "type": "string"
  22185. },
  22186. "placeholder": {
  22187. "type": "string"
  22188. },
  22189. "when": {
  22190. "type": "object",
  22191. "properties": {
  22192. "key": {
  22193. "type": "string"
  22194. },
  22195. "op": {
  22196. "type": "string",
  22197. "enum": ["eq", "neq"]
  22198. },
  22199. "value": {
  22200. "type": "string"
  22201. }
  22202. },
  22203. "required": ["key", "op", "value"],
  22204. "additionalProperties": false
  22205. }
  22206. },
  22207. "required": ["type", "key", "message"],
  22208. "additionalProperties": false
  22209. },
  22210. {
  22211. "type": "object",
  22212. "properties": {
  22213. "type": {
  22214. "type": "string",
  22215. "enum": ["select"]
  22216. },
  22217. "key": {
  22218. "type": "string"
  22219. },
  22220. "message": {
  22221. "type": "string"
  22222. },
  22223. "options": {
  22224. "type": "array",
  22225. "items": {
  22226. "type": "object",
  22227. "properties": {
  22228. "label": {
  22229. "type": "string"
  22230. },
  22231. "value": {
  22232. "type": "string"
  22233. },
  22234. "hint": {
  22235. "type": "string"
  22236. }
  22237. },
  22238. "required": ["label", "value"],
  22239. "additionalProperties": false
  22240. }
  22241. },
  22242. "when": {
  22243. "type": "object",
  22244. "properties": {
  22245. "key": {
  22246. "type": "string"
  22247. },
  22248. "op": {
  22249. "type": "string",
  22250. "enum": ["eq", "neq"]
  22251. },
  22252. "value": {
  22253. "type": "string"
  22254. }
  22255. },
  22256. "required": ["key", "op", "value"],
  22257. "additionalProperties": false
  22258. }
  22259. },
  22260. "required": ["type", "key", "message", "options"],
  22261. "additionalProperties": false
  22262. }
  22263. ]
  22264. }
  22265. }
  22266. },
  22267. "required": ["type", "label"],
  22268. "additionalProperties": false
  22269. },
  22270. "ProviderAuthAuthorization": {
  22271. "type": "object",
  22272. "properties": {
  22273. "url": {
  22274. "type": "string"
  22275. },
  22276. "method": {
  22277. "type": "string",
  22278. "enum": ["auto", "code"]
  22279. },
  22280. "instructions": {
  22281. "type": "string"
  22282. }
  22283. },
  22284. "required": ["url", "method", "instructions"],
  22285. "additionalProperties": false
  22286. },
  22287. "ProviderAuthError1": {
  22288. "type": "object",
  22289. "properties": {
  22290. "name": {
  22291. "type": "string",
  22292. "enum": [
  22293. "BadRequest",
  22294. "ProviderAuthOauthMissing",
  22295. "ProviderAuthOauthCodeMissing",
  22296. "ProviderAuthOauthCallbackFailed",
  22297. "ProviderAuthValidationFailed"
  22298. ]
  22299. },
  22300. "data": {
  22301. "type": "object",
  22302. "properties": {
  22303. "providerID": {
  22304. "type": "string"
  22305. },
  22306. "field": {
  22307. "type": "string"
  22308. },
  22309. "message": {
  22310. "type": "string"
  22311. },
  22312. "kind": {
  22313. "type": "string"
  22314. }
  22315. },
  22316. "additionalProperties": false
  22317. }
  22318. },
  22319. "required": ["name", "data"],
  22320. "additionalProperties": false
  22321. },
  22322. "NotFoundError": {
  22323. "type": "object",
  22324. "required": ["name", "data"],
  22325. "properties": {
  22326. "name": {
  22327. "type": "string",
  22328. "enum": ["NotFoundError"]
  22329. },
  22330. "data": {
  22331. "type": "object",
  22332. "required": ["message"],
  22333. "properties": {
  22334. "message": {
  22335. "type": "string"
  22336. }
  22337. }
  22338. }
  22339. }
  22340. },
  22341. "TextPartInput": {
  22342. "type": "object",
  22343. "properties": {
  22344. "id": {
  22345. "type": "string",
  22346. "pattern": "^prt"
  22347. },
  22348. "type": {
  22349. "type": "string",
  22350. "enum": ["text"]
  22351. },
  22352. "text": {
  22353. "type": "string"
  22354. },
  22355. "synthetic": {
  22356. "type": "boolean"
  22357. },
  22358. "ignored": {
  22359. "type": "boolean"
  22360. },
  22361. "time": {
  22362. "type": "object",
  22363. "properties": {
  22364. "start": {
  22365. "type": "integer",
  22366. "minimum": 0
  22367. },
  22368. "end": {
  22369. "type": "integer",
  22370. "minimum": 0
  22371. }
  22372. },
  22373. "required": ["start"],
  22374. "additionalProperties": false
  22375. },
  22376. "metadata": {
  22377. "type": "object"
  22378. }
  22379. },
  22380. "required": ["type", "text"],
  22381. "additionalProperties": false
  22382. },
  22383. "FilePartInput": {
  22384. "type": "object",
  22385. "properties": {
  22386. "id": {
  22387. "type": "string",
  22388. "pattern": "^prt"
  22389. },
  22390. "type": {
  22391. "type": "string",
  22392. "enum": ["file"]
  22393. },
  22394. "mime": {
  22395. "type": "string"
  22396. },
  22397. "filename": {
  22398. "type": "string"
  22399. },
  22400. "url": {
  22401. "type": "string"
  22402. },
  22403. "source": {
  22404. "$ref": "#/components/schemas/FilePartSource"
  22405. }
  22406. },
  22407. "required": ["type", "mime", "url"],
  22408. "additionalProperties": false
  22409. },
  22410. "AgentPartInput": {
  22411. "type": "object",
  22412. "properties": {
  22413. "id": {
  22414. "type": "string",
  22415. "pattern": "^prt"
  22416. },
  22417. "type": {
  22418. "type": "string",
  22419. "enum": ["agent"]
  22420. },
  22421. "name": {
  22422. "type": "string"
  22423. },
  22424. "source": {
  22425. "type": "object",
  22426. "properties": {
  22427. "value": {
  22428. "type": "string"
  22429. },
  22430. "start": {
  22431. "type": "integer",
  22432. "minimum": 0
  22433. },
  22434. "end": {
  22435. "type": "integer",
  22436. "minimum": 0
  22437. }
  22438. },
  22439. "required": ["value", "start", "end"],
  22440. "additionalProperties": false
  22441. }
  22442. },
  22443. "required": ["type", "name"],
  22444. "additionalProperties": false
  22445. },
  22446. "SubtaskPartInput": {
  22447. "type": "object",
  22448. "properties": {
  22449. "id": {
  22450. "type": "string",
  22451. "pattern": "^prt"
  22452. },
  22453. "type": {
  22454. "type": "string",
  22455. "enum": ["subtask"]
  22456. },
  22457. "prompt": {
  22458. "type": "string"
  22459. },
  22460. "description": {
  22461. "type": "string"
  22462. },
  22463. "agent": {
  22464. "type": "string"
  22465. },
  22466. "model": {
  22467. "type": "object",
  22468. "properties": {
  22469. "providerID": {
  22470. "type": "string"
  22471. },
  22472. "modelID": {
  22473. "type": "string"
  22474. }
  22475. },
  22476. "required": ["providerID", "modelID"],
  22477. "additionalProperties": false
  22478. },
  22479. "command": {
  22480. "type": "string"
  22481. }
  22482. },
  22483. "required": ["type", "prompt", "description", "agent"],
  22484. "additionalProperties": false
  22485. },
  22486. "SessionBusyError": {
  22487. "type": "object",
  22488. "properties": {
  22489. "_tag": {
  22490. "type": "string",
  22491. "enum": ["SessionBusyError"]
  22492. },
  22493. "sessionID": {
  22494. "type": "string"
  22495. },
  22496. "message": {
  22497. "type": "string"
  22498. }
  22499. },
  22500. "required": ["_tag", "sessionID", "message"],
  22501. "additionalProperties": false
  22502. },
  22503. "EventTuiPromptAppend": {
  22504. "type": "object",
  22505. "properties": {
  22506. "type": {
  22507. "type": "string",
  22508. "enum": ["tui.prompt.append"]
  22509. },
  22510. "properties": {
  22511. "type": "object",
  22512. "properties": {
  22513. "text": {
  22514. "type": "string"
  22515. }
  22516. },
  22517. "required": ["text"],
  22518. "additionalProperties": false
  22519. }
  22520. },
  22521. "required": ["type", "properties"],
  22522. "additionalProperties": false
  22523. },
  22524. "EventTuiCommandExecute": {
  22525. "type": "object",
  22526. "properties": {
  22527. "type": {
  22528. "type": "string",
  22529. "enum": ["tui.command.execute"]
  22530. },
  22531. "properties": {
  22532. "type": "object",
  22533. "properties": {
  22534. "command": {
  22535. "anyOf": [
  22536. {
  22537. "type": "string",
  22538. "enum": [
  22539. "session.list",
  22540. "session.new",
  22541. "session.share",
  22542. "session.interrupt",
  22543. "session.compact",
  22544. "session.page.up",
  22545. "session.page.down",
  22546. "session.line.up",
  22547. "session.line.down",
  22548. "session.half.page.up",
  22549. "session.half.page.down",
  22550. "session.first",
  22551. "session.last",
  22552. "prompt.clear",
  22553. "prompt.submit",
  22554. "agent.cycle"
  22555. ]
  22556. },
  22557. {
  22558. "type": "string"
  22559. }
  22560. ]
  22561. }
  22562. },
  22563. "required": ["command"],
  22564. "additionalProperties": false
  22565. }
  22566. },
  22567. "required": ["type", "properties"],
  22568. "additionalProperties": false
  22569. },
  22570. "EventTuiToastShow": {
  22571. "type": "object",
  22572. "properties": {
  22573. "type": {
  22574. "type": "string",
  22575. "enum": ["tui.toast.show"]
  22576. },
  22577. "properties": {
  22578. "type": "object",
  22579. "properties": {
  22580. "title": {
  22581. "type": "string"
  22582. },
  22583. "message": {
  22584. "type": "string"
  22585. },
  22586. "variant": {
  22587. "type": "string",
  22588. "enum": ["info", "success", "warning", "error"]
  22589. },
  22590. "duration": {
  22591. "type": "integer",
  22592. "exclusiveMinimum": 0
  22593. }
  22594. },
  22595. "required": ["message", "variant"],
  22596. "additionalProperties": false
  22597. }
  22598. },
  22599. "required": ["type", "properties"],
  22600. "additionalProperties": false
  22601. },
  22602. "EventTuiSessionSelect": {
  22603. "type": "object",
  22604. "properties": {
  22605. "type": {
  22606. "type": "string",
  22607. "enum": ["tui.session.select"]
  22608. },
  22609. "properties": {
  22610. "type": "object",
  22611. "properties": {
  22612. "sessionID": {
  22613. "type": "string",
  22614. "pattern": "^ses",
  22615. "description": "Session ID to navigate to"
  22616. }
  22617. },
  22618. "required": ["sessionID"],
  22619. "additionalProperties": false
  22620. }
  22621. },
  22622. "required": ["type", "properties"],
  22623. "additionalProperties": false
  22624. },
  22625. "Workspace": {
  22626. "type": "object",
  22627. "properties": {
  22628. "id": {
  22629. "type": "string",
  22630. "pattern": "^wrk"
  22631. },
  22632. "type": {
  22633. "type": "string"
  22634. },
  22635. "name": {
  22636. "type": "string"
  22637. },
  22638. "branch": {
  22639. "anyOf": [
  22640. {
  22641. "type": "string"
  22642. },
  22643. {
  22644. "type": "null"
  22645. }
  22646. ]
  22647. },
  22648. "directory": {
  22649. "anyOf": [
  22650. {
  22651. "type": "string"
  22652. },
  22653. {
  22654. "type": "null"
  22655. }
  22656. ]
  22657. },
  22658. "extra": {
  22659. "anyOf": [
  22660. {},
  22661. {
  22662. "type": "null"
  22663. }
  22664. ]
  22665. },
  22666. "projectID": {
  22667. "type": "string"
  22668. },
  22669. "timeUsed": {
  22670. "anyOf": [
  22671. {
  22672. "type": "number"
  22673. },
  22674. {
  22675. "type": "string",
  22676. "enum": ["NaN"]
  22677. },
  22678. {
  22679. "type": "string",
  22680. "enum": ["Infinity"]
  22681. },
  22682. {
  22683. "type": "string",
  22684. "enum": ["-Infinity"]
  22685. },
  22686. {
  22687. "type": "string",
  22688. "enum": ["Infinity", "-Infinity", "NaN"]
  22689. }
  22690. ]
  22691. }
  22692. },
  22693. "required": ["id", "type", "name", "projectID", "timeUsed"],
  22694. "additionalProperties": false
  22695. },
  22696. "WorkspaceCreateError": {
  22697. "type": "object",
  22698. "properties": {
  22699. "name": {
  22700. "type": "string",
  22701. "enum": ["WorkspaceCreateError"]
  22702. },
  22703. "data": {
  22704. "type": "object",
  22705. "properties": {
  22706. "message": {
  22707. "type": "string"
  22708. }
  22709. },
  22710. "required": ["message"],
  22711. "additionalProperties": false
  22712. }
  22713. },
  22714. "required": ["name", "data"],
  22715. "additionalProperties": false
  22716. },
  22717. "WorkspaceWarpError": {
  22718. "type": "object",
  22719. "properties": {
  22720. "name": {
  22721. "type": "string",
  22722. "enum": ["WorkspaceWarpError"]
  22723. },
  22724. "data": {
  22725. "type": "object",
  22726. "properties": {
  22727. "message": {
  22728. "type": "string"
  22729. }
  22730. },
  22731. "required": ["message"],
  22732. "additionalProperties": false
  22733. }
  22734. },
  22735. "required": ["name", "data"],
  22736. "additionalProperties": false
  22737. },
  22738. "UnauthorizedError": {
  22739. "type": "object",
  22740. "properties": {
  22741. "_tag": {
  22742. "type": "string",
  22743. "enum": ["UnauthorizedError"]
  22744. },
  22745. "message": {
  22746. "type": "string"
  22747. }
  22748. },
  22749. "required": ["_tag", "message"],
  22750. "additionalProperties": false
  22751. },
  22752. "SessionsResponse": {
  22753. "type": "object",
  22754. "properties": {
  22755. "data": {
  22756. "type": "array",
  22757. "items": {
  22758. "$ref": "#/components/schemas/SessionV2Info"
  22759. }
  22760. },
  22761. "cursor": {
  22762. "type": "object",
  22763. "properties": {
  22764. "previous": {
  22765. "type": "string"
  22766. },
  22767. "next": {
  22768. "type": "string"
  22769. }
  22770. },
  22771. "additionalProperties": false
  22772. }
  22773. },
  22774. "required": ["data", "cursor"],
  22775. "additionalProperties": false
  22776. },
  22777. "InvalidCursorError": {
  22778. "type": "object",
  22779. "properties": {
  22780. "_tag": {
  22781. "type": "string",
  22782. "enum": ["InvalidCursorError"]
  22783. },
  22784. "message": {
  22785. "type": "string"
  22786. }
  22787. },
  22788. "required": ["_tag", "message"],
  22789. "additionalProperties": false
  22790. },
  22791. "SessionNotFoundError": {
  22792. "type": "object",
  22793. "properties": {
  22794. "_tag": {
  22795. "type": "string",
  22796. "enum": ["SessionNotFoundError"]
  22797. },
  22798. "sessionID": {
  22799. "type": "string"
  22800. },
  22801. "message": {
  22802. "type": "string"
  22803. }
  22804. },
  22805. "required": ["_tag", "sessionID", "message"],
  22806. "additionalProperties": false
  22807. },
  22808. "ConflictError": {
  22809. "type": "object",
  22810. "properties": {
  22811. "_tag": {
  22812. "type": "string",
  22813. "enum": ["ConflictError"]
  22814. },
  22815. "message": {
  22816. "type": "string"
  22817. },
  22818. "resource": {
  22819. "type": "string"
  22820. }
  22821. },
  22822. "required": ["_tag", "message"],
  22823. "additionalProperties": false
  22824. },
  22825. "ServiceUnavailableError": {
  22826. "type": "object",
  22827. "properties": {
  22828. "_tag": {
  22829. "type": "string",
  22830. "enum": ["ServiceUnavailableError"]
  22831. },
  22832. "message": {
  22833. "type": "string"
  22834. },
  22835. "service": {
  22836. "type": "string"
  22837. }
  22838. },
  22839. "required": ["_tag", "message"],
  22840. "additionalProperties": false
  22841. },
  22842. "UnknownError1": {
  22843. "type": "object",
  22844. "properties": {
  22845. "_tag": {
  22846. "type": "string",
  22847. "enum": ["UnknownError"]
  22848. },
  22849. "message": {
  22850. "type": "string"
  22851. },
  22852. "ref": {
  22853. "type": "string"
  22854. }
  22855. },
  22856. "required": ["_tag", "message"],
  22857. "additionalProperties": false
  22858. },
  22859. "SessionMessagesResponse": {
  22860. "type": "object",
  22861. "properties": {
  22862. "data": {
  22863. "type": "array",
  22864. "items": {
  22865. "$ref": "#/components/schemas/SessionMessage"
  22866. }
  22867. },
  22868. "cursor": {
  22869. "type": "object",
  22870. "properties": {
  22871. "previous": {
  22872. "type": "string"
  22873. },
  22874. "next": {
  22875. "type": "string"
  22876. }
  22877. },
  22878. "additionalProperties": false
  22879. }
  22880. },
  22881. "required": ["data", "cursor"],
  22882. "additionalProperties": false
  22883. },
  22884. "ProviderNotFoundError": {
  22885. "type": "object",
  22886. "properties": {
  22887. "_tag": {
  22888. "type": "string",
  22889. "enum": ["ProviderNotFoundError"]
  22890. },
  22891. "providerID": {
  22892. "type": "string"
  22893. },
  22894. "message": {
  22895. "type": "string"
  22896. }
  22897. },
  22898. "required": ["_tag", "providerID", "message"],
  22899. "additionalProperties": false
  22900. },
  22901. "ForbiddenError": {
  22902. "type": "object",
  22903. "properties": {
  22904. "_tag": {
  22905. "type": "string",
  22906. "enum": ["ForbiddenError"]
  22907. },
  22908. "message": {
  22909. "type": "string"
  22910. }
  22911. },
  22912. "required": ["_tag", "message"],
  22913. "additionalProperties": false
  22914. },
  22915. "ProjectCopyError": {
  22916. "type": "object",
  22917. "properties": {
  22918. "name": {
  22919. "type": "string",
  22920. "enum": ["ProjectCopyError"]
  22921. },
  22922. "data": {
  22923. "type": "object",
  22924. "properties": {
  22925. "message": {
  22926. "type": "string"
  22927. },
  22928. "forceRequired": {
  22929. "type": "boolean"
  22930. }
  22931. },
  22932. "required": ["message"],
  22933. "additionalProperties": false
  22934. }
  22935. },
  22936. "required": ["name", "data"],
  22937. "additionalProperties": false
  22938. },
  22939. "effect_HttpApiError_Forbidden": {
  22940. "type": "object",
  22941. "properties": {
  22942. "_tag": {
  22943. "type": "string",
  22944. "enum": ["Forbidden"]
  22945. }
  22946. },
  22947. "required": ["_tag"],
  22948. "additionalProperties": false
  22949. },
  22950. "Event.tui.prompt.append": {
  22951. "type": "object",
  22952. "properties": {
  22953. "id": {
  22954. "type": "string",
  22955. "pattern": "^evt_"
  22956. },
  22957. "type": {
  22958. "type": "string",
  22959. "enum": ["tui.prompt.append"]
  22960. },
  22961. "properties": {
  22962. "type": "object",
  22963. "properties": {
  22964. "text": {
  22965. "type": "string"
  22966. }
  22967. },
  22968. "required": ["text"],
  22969. "additionalProperties": false
  22970. }
  22971. },
  22972. "required": ["id", "type", "properties"],
  22973. "additionalProperties": false
  22974. },
  22975. "Event.tui.command.execute": {
  22976. "type": "object",
  22977. "properties": {
  22978. "id": {
  22979. "type": "string",
  22980. "pattern": "^evt_"
  22981. },
  22982. "type": {
  22983. "type": "string",
  22984. "enum": ["tui.command.execute"]
  22985. },
  22986. "properties": {
  22987. "type": "object",
  22988. "properties": {
  22989. "command": {
  22990. "anyOf": [
  22991. {
  22992. "type": "string",
  22993. "enum": [
  22994. "session.list",
  22995. "session.new",
  22996. "session.share",
  22997. "session.interrupt",
  22998. "session.compact",
  22999. "session.page.up",
  23000. "session.page.down",
  23001. "session.line.up",
  23002. "session.line.down",
  23003. "session.half.page.up",
  23004. "session.half.page.down",
  23005. "session.first",
  23006. "session.last",
  23007. "prompt.clear",
  23008. "prompt.submit",
  23009. "agent.cycle"
  23010. ]
  23011. },
  23012. {
  23013. "type": "string"
  23014. }
  23015. ]
  23016. }
  23017. },
  23018. "required": ["command"],
  23019. "additionalProperties": false
  23020. }
  23021. },
  23022. "required": ["id", "type", "properties"],
  23023. "additionalProperties": false
  23024. },
  23025. "Event.tui.toast.show": {
  23026. "type": "object",
  23027. "properties": {
  23028. "id": {
  23029. "type": "string",
  23030. "pattern": "^evt_"
  23031. },
  23032. "type": {
  23033. "type": "string",
  23034. "enum": ["tui.toast.show"]
  23035. },
  23036. "properties": {
  23037. "type": "object",
  23038. "properties": {
  23039. "title": {
  23040. "type": "string"
  23041. },
  23042. "message": {
  23043. "type": "string"
  23044. },
  23045. "variant": {
  23046. "type": "string",
  23047. "enum": ["info", "success", "warning", "error"]
  23048. },
  23049. "duration": {
  23050. "type": "integer",
  23051. "exclusiveMinimum": 0
  23052. }
  23053. },
  23054. "required": ["message", "variant"],
  23055. "additionalProperties": false
  23056. }
  23057. },
  23058. "required": ["id", "type", "properties"],
  23059. "additionalProperties": false
  23060. },
  23061. "Event.tui.session.select": {
  23062. "type": "object",
  23063. "properties": {
  23064. "id": {
  23065. "type": "string",
  23066. "pattern": "^evt_"
  23067. },
  23068. "type": {
  23069. "type": "string",
  23070. "enum": ["tui.session.select"]
  23071. },
  23072. "properties": {
  23073. "type": "object",
  23074. "properties": {
  23075. "sessionID": {
  23076. "type": "string",
  23077. "pattern": "^ses",
  23078. "description": "Session ID to navigate to"
  23079. }
  23080. },
  23081. "required": ["sessionID"],
  23082. "additionalProperties": false
  23083. }
  23084. },
  23085. "required": ["id", "type", "properties"],
  23086. "additionalProperties": false
  23087. },
  23088. "MoveSessionDestination": {
  23089. "type": "object",
  23090. "properties": {
  23091. "directory": {
  23092. "type": "string"
  23093. }
  23094. },
  23095. "required": ["directory"],
  23096. "additionalProperties": false
  23097. },
  23098. "LocationRef": {
  23099. "type": "object",
  23100. "properties": {
  23101. "directory": {
  23102. "type": "string"
  23103. },
  23104. "workspaceID": {
  23105. "type": "string",
  23106. "pattern": "^wrk"
  23107. }
  23108. },
  23109. "required": ["directory"],
  23110. "additionalProperties": false
  23111. },
  23112. "PromptSource": {
  23113. "type": "object",
  23114. "properties": {
  23115. "start": {
  23116. "type": "number"
  23117. },
  23118. "end": {
  23119. "type": "number"
  23120. },
  23121. "text": {
  23122. "type": "string"
  23123. }
  23124. },
  23125. "required": ["start", "end", "text"],
  23126. "additionalProperties": false
  23127. },
  23128. "PromptFileAttachment": {
  23129. "type": "object",
  23130. "properties": {
  23131. "uri": {
  23132. "type": "string"
  23133. },
  23134. "mime": {
  23135. "type": "string"
  23136. },
  23137. "name": {
  23138. "type": "string"
  23139. },
  23140. "description": {
  23141. "type": "string"
  23142. },
  23143. "source": {
  23144. "$ref": "#/components/schemas/PromptSource"
  23145. }
  23146. },
  23147. "required": ["uri", "mime"],
  23148. "additionalProperties": false
  23149. },
  23150. "PromptAgentAttachment": {
  23151. "type": "object",
  23152. "properties": {
  23153. "name": {
  23154. "type": "string"
  23155. },
  23156. "source": {
  23157. "$ref": "#/components/schemas/PromptSource"
  23158. }
  23159. },
  23160. "required": ["name"],
  23161. "additionalProperties": false
  23162. },
  23163. "SessionErrorUnknown": {
  23164. "type": "object",
  23165. "properties": {
  23166. "type": {
  23167. "type": "string",
  23168. "enum": ["unknown"]
  23169. },
  23170. "message": {
  23171. "type": "string"
  23172. }
  23173. },
  23174. "required": ["type", "message"],
  23175. "additionalProperties": false
  23176. },
  23177. "ToolTextContent": {
  23178. "type": "object",
  23179. "properties": {
  23180. "type": {
  23181. "type": "string",
  23182. "enum": ["text"]
  23183. },
  23184. "text": {
  23185. "type": "string"
  23186. }
  23187. },
  23188. "required": ["type", "text"],
  23189. "additionalProperties": false
  23190. },
  23191. "ToolFileContent": {
  23192. "type": "object",
  23193. "properties": {
  23194. "type": {
  23195. "type": "string",
  23196. "enum": ["file"]
  23197. },
  23198. "uri": {
  23199. "type": "string"
  23200. },
  23201. "mime": {
  23202. "type": "string"
  23203. },
  23204. "name": {
  23205. "type": "string"
  23206. }
  23207. },
  23208. "required": ["type", "uri", "mime"],
  23209. "additionalProperties": false
  23210. },
  23211. "SessionNextRetry_error": {
  23212. "type": "object",
  23213. "properties": {
  23214. "message": {
  23215. "type": "string"
  23216. },
  23217. "statusCode": {
  23218. "type": "number"
  23219. },
  23220. "isRetryable": {
  23221. "type": "boolean"
  23222. },
  23223. "responseHeaders": {
  23224. "type": "object",
  23225. "additionalProperties": {
  23226. "type": "string"
  23227. }
  23228. },
  23229. "responseBody": {
  23230. "type": "string"
  23231. },
  23232. "metadata": {
  23233. "type": "object",
  23234. "additionalProperties": {
  23235. "type": "string"
  23236. }
  23237. }
  23238. },
  23239. "required": ["message", "isRetryable"],
  23240. "additionalProperties": false
  23241. },
  23242. "PermissionV2Source": {
  23243. "type": "object",
  23244. "properties": {
  23245. "type": {
  23246. "type": "string",
  23247. "enum": ["tool"]
  23248. },
  23249. "messageID": {
  23250. "type": "string"
  23251. },
  23252. "callID": {
  23253. "type": "string"
  23254. }
  23255. },
  23256. "required": ["type", "messageID", "callID"],
  23257. "additionalProperties": false
  23258. },
  23259. "PermissionV2Reply": {
  23260. "type": "string",
  23261. "enum": ["once", "always", "reject"]
  23262. },
  23263. "QuestionV2Option": {
  23264. "type": "object",
  23265. "properties": {
  23266. "label": {
  23267. "type": "string",
  23268. "description": "Display text (1-5 words, concise)"
  23269. },
  23270. "description": {
  23271. "type": "string",
  23272. "description": "Explanation of choice"
  23273. }
  23274. },
  23275. "required": ["label", "description"],
  23276. "additionalProperties": false
  23277. },
  23278. "QuestionV2Info": {
  23279. "type": "object",
  23280. "properties": {
  23281. "question": {
  23282. "type": "string",
  23283. "description": "Complete question"
  23284. },
  23285. "header": {
  23286. "type": "string",
  23287. "description": "Very short label (max 30 chars)"
  23288. },
  23289. "options": {
  23290. "type": "array",
  23291. "items": {
  23292. "$ref": "#/components/schemas/QuestionV2Option"
  23293. },
  23294. "description": "Available choices"
  23295. },
  23296. "multiple": {
  23297. "type": "boolean"
  23298. },
  23299. "custom": {
  23300. "type": "boolean"
  23301. }
  23302. },
  23303. "required": ["question", "header", "options"],
  23304. "additionalProperties": false
  23305. },
  23306. "QuestionV2Tool": {
  23307. "type": "object",
  23308. "properties": {
  23309. "messageID": {
  23310. "type": "string"
  23311. },
  23312. "callID": {
  23313. "type": "string"
  23314. }
  23315. },
  23316. "required": ["messageID", "callID"],
  23317. "additionalProperties": false
  23318. },
  23319. "QuestionV2Answer": {
  23320. "type": "array",
  23321. "items": {
  23322. "type": "string"
  23323. }
  23324. },
  23325. "EventServerInstanceDisposed": {
  23326. "type": "object",
  23327. "properties": {
  23328. "id": {
  23329. "type": "string"
  23330. },
  23331. "type": {
  23332. "type": "string",
  23333. "enum": ["server.instance.disposed"]
  23334. },
  23335. "properties": {
  23336. "type": "object",
  23337. "properties": {
  23338. "directory": {
  23339. "type": "string"
  23340. }
  23341. },
  23342. "required": ["directory"],
  23343. "additionalProperties": false
  23344. }
  23345. },
  23346. "required": ["id", "type", "properties"],
  23347. "additionalProperties": false
  23348. },
  23349. "SyncEventSessionCreated": {
  23350. "type": "object",
  23351. "properties": {
  23352. "type": {
  23353. "type": "string",
  23354. "enum": ["sync"]
  23355. },
  23356. "id": {
  23357. "type": "string",
  23358. "pattern": "^evt_"
  23359. },
  23360. "syncEvent": {
  23361. "type": "object",
  23362. "properties": {
  23363. "type": {
  23364. "type": "string",
  23365. "enum": ["session.created.1"]
  23366. },
  23367. "id": {
  23368. "type": "string",
  23369. "pattern": "^evt_"
  23370. },
  23371. "seq": {
  23372. "type": "number"
  23373. },
  23374. "aggregateID": {
  23375. "type": "string"
  23376. },
  23377. "data": {
  23378. "type": "object",
  23379. "properties": {
  23380. "sessionID": {
  23381. "type": "string",
  23382. "pattern": "^ses"
  23383. },
  23384. "info": {
  23385. "$ref": "#/components/schemas/Session"
  23386. }
  23387. },
  23388. "required": ["sessionID", "info"],
  23389. "additionalProperties": false
  23390. }
  23391. },
  23392. "required": ["type", "id", "seq", "aggregateID", "data"],
  23393. "additionalProperties": false
  23394. }
  23395. },
  23396. "required": ["type", "id", "syncEvent"],
  23397. "additionalProperties": false
  23398. },
  23399. "SyncEventSessionUpdated": {
  23400. "type": "object",
  23401. "properties": {
  23402. "type": {
  23403. "type": "string",
  23404. "enum": ["sync"]
  23405. },
  23406. "id": {
  23407. "type": "string",
  23408. "pattern": "^evt_"
  23409. },
  23410. "syncEvent": {
  23411. "type": "object",
  23412. "properties": {
  23413. "type": {
  23414. "type": "string",
  23415. "enum": ["session.updated.1"]
  23416. },
  23417. "id": {
  23418. "type": "string",
  23419. "pattern": "^evt_"
  23420. },
  23421. "seq": {
  23422. "type": "number"
  23423. },
  23424. "aggregateID": {
  23425. "type": "string"
  23426. },
  23427. "data": {
  23428. "type": "object",
  23429. "properties": {
  23430. "sessionID": {
  23431. "type": "string",
  23432. "pattern": "^ses"
  23433. },
  23434. "info": {
  23435. "$ref": "#/components/schemas/Session"
  23436. }
  23437. },
  23438. "required": ["sessionID", "info"],
  23439. "additionalProperties": false
  23440. }
  23441. },
  23442. "required": ["type", "id", "seq", "aggregateID", "data"],
  23443. "additionalProperties": false
  23444. }
  23445. },
  23446. "required": ["type", "id", "syncEvent"],
  23447. "additionalProperties": false
  23448. },
  23449. "SyncEventSessionDeleted": {
  23450. "type": "object",
  23451. "properties": {
  23452. "type": {
  23453. "type": "string",
  23454. "enum": ["sync"]
  23455. },
  23456. "id": {
  23457. "type": "string",
  23458. "pattern": "^evt_"
  23459. },
  23460. "syncEvent": {
  23461. "type": "object",
  23462. "properties": {
  23463. "type": {
  23464. "type": "string",
  23465. "enum": ["session.deleted.1"]
  23466. },
  23467. "id": {
  23468. "type": "string",
  23469. "pattern": "^evt_"
  23470. },
  23471. "seq": {
  23472. "type": "number"
  23473. },
  23474. "aggregateID": {
  23475. "type": "string"
  23476. },
  23477. "data": {
  23478. "type": "object",
  23479. "properties": {
  23480. "sessionID": {
  23481. "type": "string",
  23482. "pattern": "^ses"
  23483. },
  23484. "info": {
  23485. "$ref": "#/components/schemas/Session"
  23486. }
  23487. },
  23488. "required": ["sessionID", "info"],
  23489. "additionalProperties": false
  23490. }
  23491. },
  23492. "required": ["type", "id", "seq", "aggregateID", "data"],
  23493. "additionalProperties": false
  23494. }
  23495. },
  23496. "required": ["type", "id", "syncEvent"],
  23497. "additionalProperties": false
  23498. },
  23499. "SyncEventMessageUpdated": {
  23500. "type": "object",
  23501. "properties": {
  23502. "type": {
  23503. "type": "string",
  23504. "enum": ["sync"]
  23505. },
  23506. "id": {
  23507. "type": "string",
  23508. "pattern": "^evt_"
  23509. },
  23510. "syncEvent": {
  23511. "type": "object",
  23512. "properties": {
  23513. "type": {
  23514. "type": "string",
  23515. "enum": ["message.updated.1"]
  23516. },
  23517. "id": {
  23518. "type": "string",
  23519. "pattern": "^evt_"
  23520. },
  23521. "seq": {
  23522. "type": "number"
  23523. },
  23524. "aggregateID": {
  23525. "type": "string"
  23526. },
  23527. "data": {
  23528. "type": "object",
  23529. "properties": {
  23530. "sessionID": {
  23531. "type": "string",
  23532. "pattern": "^ses"
  23533. },
  23534. "info": {
  23535. "$ref": "#/components/schemas/Message"
  23536. }
  23537. },
  23538. "required": ["sessionID", "info"],
  23539. "additionalProperties": false
  23540. }
  23541. },
  23542. "required": ["type", "id", "seq", "aggregateID", "data"],
  23543. "additionalProperties": false
  23544. }
  23545. },
  23546. "required": ["type", "id", "syncEvent"],
  23547. "additionalProperties": false
  23548. },
  23549. "SyncEventMessageRemoved": {
  23550. "type": "object",
  23551. "properties": {
  23552. "type": {
  23553. "type": "string",
  23554. "enum": ["sync"]
  23555. },
  23556. "id": {
  23557. "type": "string",
  23558. "pattern": "^evt_"
  23559. },
  23560. "syncEvent": {
  23561. "type": "object",
  23562. "properties": {
  23563. "type": {
  23564. "type": "string",
  23565. "enum": ["message.removed.1"]
  23566. },
  23567. "id": {
  23568. "type": "string",
  23569. "pattern": "^evt_"
  23570. },
  23571. "seq": {
  23572. "type": "number"
  23573. },
  23574. "aggregateID": {
  23575. "type": "string"
  23576. },
  23577. "data": {
  23578. "type": "object",
  23579. "properties": {
  23580. "sessionID": {
  23581. "type": "string",
  23582. "pattern": "^ses"
  23583. },
  23584. "messageID": {
  23585. "type": "string",
  23586. "pattern": "^msg"
  23587. }
  23588. },
  23589. "required": ["sessionID", "messageID"],
  23590. "additionalProperties": false
  23591. }
  23592. },
  23593. "required": ["type", "id", "seq", "aggregateID", "data"],
  23594. "additionalProperties": false
  23595. }
  23596. },
  23597. "required": ["type", "id", "syncEvent"],
  23598. "additionalProperties": false
  23599. },
  23600. "SyncEventMessagePartUpdated": {
  23601. "type": "object",
  23602. "properties": {
  23603. "type": {
  23604. "type": "string",
  23605. "enum": ["sync"]
  23606. },
  23607. "id": {
  23608. "type": "string",
  23609. "pattern": "^evt_"
  23610. },
  23611. "syncEvent": {
  23612. "type": "object",
  23613. "properties": {
  23614. "type": {
  23615. "type": "string",
  23616. "enum": ["message.part.updated.1"]
  23617. },
  23618. "id": {
  23619. "type": "string",
  23620. "pattern": "^evt_"
  23621. },
  23622. "seq": {
  23623. "type": "number"
  23624. },
  23625. "aggregateID": {
  23626. "type": "string"
  23627. },
  23628. "data": {
  23629. "type": "object",
  23630. "properties": {
  23631. "sessionID": {
  23632. "type": "string",
  23633. "pattern": "^ses"
  23634. },
  23635. "part": {
  23636. "$ref": "#/components/schemas/Part"
  23637. },
  23638. "time": {
  23639. "type": "number"
  23640. }
  23641. },
  23642. "required": ["sessionID", "part", "time"],
  23643. "additionalProperties": false
  23644. }
  23645. },
  23646. "required": ["type", "id", "seq", "aggregateID", "data"],
  23647. "additionalProperties": false
  23648. }
  23649. },
  23650. "required": ["type", "id", "syncEvent"],
  23651. "additionalProperties": false
  23652. },
  23653. "SyncEventMessagePartRemoved": {
  23654. "type": "object",
  23655. "properties": {
  23656. "type": {
  23657. "type": "string",
  23658. "enum": ["sync"]
  23659. },
  23660. "id": {
  23661. "type": "string",
  23662. "pattern": "^evt_"
  23663. },
  23664. "syncEvent": {
  23665. "type": "object",
  23666. "properties": {
  23667. "type": {
  23668. "type": "string",
  23669. "enum": ["message.part.removed.1"]
  23670. },
  23671. "id": {
  23672. "type": "string",
  23673. "pattern": "^evt_"
  23674. },
  23675. "seq": {
  23676. "type": "number"
  23677. },
  23678. "aggregateID": {
  23679. "type": "string"
  23680. },
  23681. "data": {
  23682. "type": "object",
  23683. "properties": {
  23684. "sessionID": {
  23685. "type": "string",
  23686. "pattern": "^ses"
  23687. },
  23688. "messageID": {
  23689. "type": "string",
  23690. "pattern": "^msg"
  23691. },
  23692. "partID": {
  23693. "type": "string",
  23694. "pattern": "^prt"
  23695. }
  23696. },
  23697. "required": ["sessionID", "messageID", "partID"],
  23698. "additionalProperties": false
  23699. }
  23700. },
  23701. "required": ["type", "id", "seq", "aggregateID", "data"],
  23702. "additionalProperties": false
  23703. }
  23704. },
  23705. "required": ["type", "id", "syncEvent"],
  23706. "additionalProperties": false
  23707. },
  23708. "SyncEventSessionNextAgentSwitched": {
  23709. "type": "object",
  23710. "properties": {
  23711. "type": {
  23712. "type": "string",
  23713. "enum": ["sync"]
  23714. },
  23715. "id": {
  23716. "type": "string",
  23717. "pattern": "^evt_"
  23718. },
  23719. "syncEvent": {
  23720. "type": "object",
  23721. "properties": {
  23722. "type": {
  23723. "type": "string",
  23724. "enum": ["session.next.agent.switched.1"]
  23725. },
  23726. "id": {
  23727. "type": "string",
  23728. "pattern": "^evt_"
  23729. },
  23730. "seq": {
  23731. "type": "number"
  23732. },
  23733. "aggregateID": {
  23734. "type": "string"
  23735. },
  23736. "data": {
  23737. "type": "object",
  23738. "properties": {
  23739. "timestamp": {
  23740. "type": "number"
  23741. },
  23742. "sessionID": {
  23743. "type": "string",
  23744. "pattern": "^ses"
  23745. },
  23746. "messageID": {
  23747. "type": "string",
  23748. "pattern": "^msg_"
  23749. },
  23750. "agent": {
  23751. "type": "string"
  23752. }
  23753. },
  23754. "required": ["timestamp", "sessionID", "messageID", "agent"],
  23755. "additionalProperties": false
  23756. }
  23757. },
  23758. "required": ["type", "id", "seq", "aggregateID", "data"],
  23759. "additionalProperties": false
  23760. }
  23761. },
  23762. "required": ["type", "id", "syncEvent"],
  23763. "additionalProperties": false
  23764. },
  23765. "SyncEventSessionNextModelSwitched": {
  23766. "type": "object",
  23767. "properties": {
  23768. "type": {
  23769. "type": "string",
  23770. "enum": ["sync"]
  23771. },
  23772. "id": {
  23773. "type": "string",
  23774. "pattern": "^evt_"
  23775. },
  23776. "syncEvent": {
  23777. "type": "object",
  23778. "properties": {
  23779. "type": {
  23780. "type": "string",
  23781. "enum": ["session.next.model.switched.1"]
  23782. },
  23783. "id": {
  23784. "type": "string",
  23785. "pattern": "^evt_"
  23786. },
  23787. "seq": {
  23788. "type": "number"
  23789. },
  23790. "aggregateID": {
  23791. "type": "string"
  23792. },
  23793. "data": {
  23794. "type": "object",
  23795. "properties": {
  23796. "timestamp": {
  23797. "type": "number"
  23798. },
  23799. "sessionID": {
  23800. "type": "string",
  23801. "pattern": "^ses"
  23802. },
  23803. "messageID": {
  23804. "type": "string",
  23805. "pattern": "^msg_"
  23806. },
  23807. "model": {
  23808. "type": "object",
  23809. "properties": {
  23810. "id": {
  23811. "type": "string"
  23812. },
  23813. "providerID": {
  23814. "type": "string"
  23815. },
  23816. "variant": {
  23817. "type": "string"
  23818. }
  23819. },
  23820. "required": ["id", "providerID"],
  23821. "additionalProperties": false
  23822. }
  23823. },
  23824. "required": ["timestamp", "sessionID", "messageID", "model"],
  23825. "additionalProperties": false
  23826. }
  23827. },
  23828. "required": ["type", "id", "seq", "aggregateID", "data"],
  23829. "additionalProperties": false
  23830. }
  23831. },
  23832. "required": ["type", "id", "syncEvent"],
  23833. "additionalProperties": false
  23834. },
  23835. "SyncEventSessionNextMoved": {
  23836. "type": "object",
  23837. "properties": {
  23838. "type": {
  23839. "type": "string",
  23840. "enum": ["sync"]
  23841. },
  23842. "id": {
  23843. "type": "string",
  23844. "pattern": "^evt_"
  23845. },
  23846. "syncEvent": {
  23847. "type": "object",
  23848. "properties": {
  23849. "type": {
  23850. "type": "string",
  23851. "enum": ["session.next.moved.1"]
  23852. },
  23853. "id": {
  23854. "type": "string",
  23855. "pattern": "^evt_"
  23856. },
  23857. "seq": {
  23858. "type": "number"
  23859. },
  23860. "aggregateID": {
  23861. "type": "string"
  23862. },
  23863. "data": {
  23864. "type": "object",
  23865. "properties": {
  23866. "timestamp": {
  23867. "type": "number"
  23868. },
  23869. "sessionID": {
  23870. "type": "string",
  23871. "pattern": "^ses"
  23872. },
  23873. "location": {
  23874. "$ref": "#/components/schemas/LocationRef"
  23875. },
  23876. "subdirectory": {
  23877. "type": "string"
  23878. }
  23879. },
  23880. "required": ["timestamp", "sessionID", "location"],
  23881. "additionalProperties": false
  23882. }
  23883. },
  23884. "required": ["type", "id", "seq", "aggregateID", "data"],
  23885. "additionalProperties": false
  23886. }
  23887. },
  23888. "required": ["type", "id", "syncEvent"],
  23889. "additionalProperties": false
  23890. },
  23891. "SyncEventSessionNextPrompted": {
  23892. "type": "object",
  23893. "properties": {
  23894. "type": {
  23895. "type": "string",
  23896. "enum": ["sync"]
  23897. },
  23898. "id": {
  23899. "type": "string",
  23900. "pattern": "^evt_"
  23901. },
  23902. "syncEvent": {
  23903. "type": "object",
  23904. "properties": {
  23905. "type": {
  23906. "type": "string",
  23907. "enum": ["session.next.prompted.1"]
  23908. },
  23909. "id": {
  23910. "type": "string",
  23911. "pattern": "^evt_"
  23912. },
  23913. "seq": {
  23914. "type": "number"
  23915. },
  23916. "aggregateID": {
  23917. "type": "string"
  23918. },
  23919. "data": {
  23920. "type": "object",
  23921. "properties": {
  23922. "timestamp": {
  23923. "type": "number"
  23924. },
  23925. "sessionID": {
  23926. "type": "string",
  23927. "pattern": "^ses"
  23928. },
  23929. "messageID": {
  23930. "type": "string",
  23931. "pattern": "^msg_"
  23932. },
  23933. "prompt": {
  23934. "$ref": "#/components/schemas/Prompt"
  23935. },
  23936. "delivery": {
  23937. "type": "string",
  23938. "enum": ["steer", "queue"]
  23939. }
  23940. },
  23941. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  23942. "additionalProperties": false
  23943. }
  23944. },
  23945. "required": ["type", "id", "seq", "aggregateID", "data"],
  23946. "additionalProperties": false
  23947. }
  23948. },
  23949. "required": ["type", "id", "syncEvent"],
  23950. "additionalProperties": false
  23951. },
  23952. "SyncEventSessionNextPromptAdmitted": {
  23953. "type": "object",
  23954. "properties": {
  23955. "type": {
  23956. "type": "string",
  23957. "enum": ["sync"]
  23958. },
  23959. "id": {
  23960. "type": "string",
  23961. "pattern": "^evt_"
  23962. },
  23963. "syncEvent": {
  23964. "type": "object",
  23965. "properties": {
  23966. "type": {
  23967. "type": "string",
  23968. "enum": ["session.next.prompt.admitted.1"]
  23969. },
  23970. "id": {
  23971. "type": "string",
  23972. "pattern": "^evt_"
  23973. },
  23974. "seq": {
  23975. "type": "number"
  23976. },
  23977. "aggregateID": {
  23978. "type": "string"
  23979. },
  23980. "data": {
  23981. "type": "object",
  23982. "properties": {
  23983. "timestamp": {
  23984. "type": "number"
  23985. },
  23986. "sessionID": {
  23987. "type": "string",
  23988. "pattern": "^ses"
  23989. },
  23990. "messageID": {
  23991. "type": "string",
  23992. "pattern": "^msg_"
  23993. },
  23994. "prompt": {
  23995. "$ref": "#/components/schemas/Prompt"
  23996. },
  23997. "delivery": {
  23998. "type": "string",
  23999. "enum": ["steer", "queue"]
  24000. }
  24001. },
  24002. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  24003. "additionalProperties": false
  24004. }
  24005. },
  24006. "required": ["type", "id", "seq", "aggregateID", "data"],
  24007. "additionalProperties": false
  24008. }
  24009. },
  24010. "required": ["type", "id", "syncEvent"],
  24011. "additionalProperties": false
  24012. },
  24013. "SyncEventSessionNextPromptPromoted": {
  24014. "type": "object",
  24015. "properties": {
  24016. "type": {
  24017. "type": "string",
  24018. "enum": ["sync"]
  24019. },
  24020. "id": {
  24021. "type": "string",
  24022. "pattern": "^evt_"
  24023. },
  24024. "syncEvent": {
  24025. "type": "object",
  24026. "properties": {
  24027. "type": {
  24028. "type": "string",
  24029. "enum": ["session.next.prompt.promoted.1"]
  24030. },
  24031. "id": {
  24032. "type": "string",
  24033. "pattern": "^evt_"
  24034. },
  24035. "seq": {
  24036. "type": "number"
  24037. },
  24038. "aggregateID": {
  24039. "type": "string"
  24040. },
  24041. "data": {
  24042. "type": "object",
  24043. "properties": {
  24044. "timestamp": {
  24045. "type": "number"
  24046. },
  24047. "sessionID": {
  24048. "type": "string",
  24049. "pattern": "^ses"
  24050. },
  24051. "messageID": {
  24052. "type": "string",
  24053. "pattern": "^msg_"
  24054. },
  24055. "prompt": {
  24056. "$ref": "#/components/schemas/Prompt"
  24057. },
  24058. "timeCreated": {
  24059. "type": "number"
  24060. }
  24061. },
  24062. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  24063. "additionalProperties": false
  24064. }
  24065. },
  24066. "required": ["type", "id", "seq", "aggregateID", "data"],
  24067. "additionalProperties": false
  24068. }
  24069. },
  24070. "required": ["type", "id", "syncEvent"],
  24071. "additionalProperties": false
  24072. },
  24073. "SyncEventSessionNextInterruptRequested": {
  24074. "type": "object",
  24075. "properties": {
  24076. "type": {
  24077. "type": "string",
  24078. "enum": ["sync"]
  24079. },
  24080. "id": {
  24081. "type": "string",
  24082. "pattern": "^evt_"
  24083. },
  24084. "syncEvent": {
  24085. "type": "object",
  24086. "properties": {
  24087. "type": {
  24088. "type": "string",
  24089. "enum": ["session.next.interrupt.requested.1"]
  24090. },
  24091. "id": {
  24092. "type": "string",
  24093. "pattern": "^evt_"
  24094. },
  24095. "seq": {
  24096. "type": "number"
  24097. },
  24098. "aggregateID": {
  24099. "type": "string"
  24100. },
  24101. "data": {
  24102. "type": "object",
  24103. "properties": {
  24104. "timestamp": {
  24105. "type": "number"
  24106. },
  24107. "sessionID": {
  24108. "type": "string",
  24109. "pattern": "^ses"
  24110. }
  24111. },
  24112. "required": ["timestamp", "sessionID"],
  24113. "additionalProperties": false
  24114. }
  24115. },
  24116. "required": ["type", "id", "seq", "aggregateID", "data"],
  24117. "additionalProperties": false
  24118. }
  24119. },
  24120. "required": ["type", "id", "syncEvent"],
  24121. "additionalProperties": false
  24122. },
  24123. "SyncEventSessionNextContextUpdated": {
  24124. "type": "object",
  24125. "properties": {
  24126. "type": {
  24127. "type": "string",
  24128. "enum": ["sync"]
  24129. },
  24130. "id": {
  24131. "type": "string",
  24132. "pattern": "^evt_"
  24133. },
  24134. "syncEvent": {
  24135. "type": "object",
  24136. "properties": {
  24137. "type": {
  24138. "type": "string",
  24139. "enum": ["session.next.context.updated.1"]
  24140. },
  24141. "id": {
  24142. "type": "string",
  24143. "pattern": "^evt_"
  24144. },
  24145. "seq": {
  24146. "type": "number"
  24147. },
  24148. "aggregateID": {
  24149. "type": "string"
  24150. },
  24151. "data": {
  24152. "type": "object",
  24153. "properties": {
  24154. "timestamp": {
  24155. "type": "number"
  24156. },
  24157. "sessionID": {
  24158. "type": "string",
  24159. "pattern": "^ses"
  24160. },
  24161. "messageID": {
  24162. "type": "string",
  24163. "pattern": "^msg_"
  24164. },
  24165. "text": {
  24166. "type": "string"
  24167. }
  24168. },
  24169. "required": ["timestamp", "sessionID", "messageID", "text"],
  24170. "additionalProperties": false
  24171. }
  24172. },
  24173. "required": ["type", "id", "seq", "aggregateID", "data"],
  24174. "additionalProperties": false
  24175. }
  24176. },
  24177. "required": ["type", "id", "syncEvent"],
  24178. "additionalProperties": false
  24179. },
  24180. "SyncEventSessionNextSynthetic": {
  24181. "type": "object",
  24182. "properties": {
  24183. "type": {
  24184. "type": "string",
  24185. "enum": ["sync"]
  24186. },
  24187. "id": {
  24188. "type": "string",
  24189. "pattern": "^evt_"
  24190. },
  24191. "syncEvent": {
  24192. "type": "object",
  24193. "properties": {
  24194. "type": {
  24195. "type": "string",
  24196. "enum": ["session.next.synthetic.1"]
  24197. },
  24198. "id": {
  24199. "type": "string",
  24200. "pattern": "^evt_"
  24201. },
  24202. "seq": {
  24203. "type": "number"
  24204. },
  24205. "aggregateID": {
  24206. "type": "string"
  24207. },
  24208. "data": {
  24209. "type": "object",
  24210. "properties": {
  24211. "timestamp": {
  24212. "type": "number"
  24213. },
  24214. "sessionID": {
  24215. "type": "string",
  24216. "pattern": "^ses"
  24217. },
  24218. "messageID": {
  24219. "type": "string",
  24220. "pattern": "^msg_"
  24221. },
  24222. "text": {
  24223. "type": "string"
  24224. }
  24225. },
  24226. "required": ["timestamp", "sessionID", "messageID", "text"],
  24227. "additionalProperties": false
  24228. }
  24229. },
  24230. "required": ["type", "id", "seq", "aggregateID", "data"],
  24231. "additionalProperties": false
  24232. }
  24233. },
  24234. "required": ["type", "id", "syncEvent"],
  24235. "additionalProperties": false
  24236. },
  24237. "SyncEventSessionNextShellStarted": {
  24238. "type": "object",
  24239. "properties": {
  24240. "type": {
  24241. "type": "string",
  24242. "enum": ["sync"]
  24243. },
  24244. "id": {
  24245. "type": "string",
  24246. "pattern": "^evt_"
  24247. },
  24248. "syncEvent": {
  24249. "type": "object",
  24250. "properties": {
  24251. "type": {
  24252. "type": "string",
  24253. "enum": ["session.next.shell.started.1"]
  24254. },
  24255. "id": {
  24256. "type": "string",
  24257. "pattern": "^evt_"
  24258. },
  24259. "seq": {
  24260. "type": "number"
  24261. },
  24262. "aggregateID": {
  24263. "type": "string"
  24264. },
  24265. "data": {
  24266. "type": "object",
  24267. "properties": {
  24268. "timestamp": {
  24269. "type": "number"
  24270. },
  24271. "sessionID": {
  24272. "type": "string",
  24273. "pattern": "^ses"
  24274. },
  24275. "messageID": {
  24276. "type": "string",
  24277. "pattern": "^msg_"
  24278. },
  24279. "callID": {
  24280. "type": "string"
  24281. },
  24282. "command": {
  24283. "type": "string"
  24284. }
  24285. },
  24286. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  24287. "additionalProperties": false
  24288. }
  24289. },
  24290. "required": ["type", "id", "seq", "aggregateID", "data"],
  24291. "additionalProperties": false
  24292. }
  24293. },
  24294. "required": ["type", "id", "syncEvent"],
  24295. "additionalProperties": false
  24296. },
  24297. "SyncEventSessionNextShellEnded": {
  24298. "type": "object",
  24299. "properties": {
  24300. "type": {
  24301. "type": "string",
  24302. "enum": ["sync"]
  24303. },
  24304. "id": {
  24305. "type": "string",
  24306. "pattern": "^evt_"
  24307. },
  24308. "syncEvent": {
  24309. "type": "object",
  24310. "properties": {
  24311. "type": {
  24312. "type": "string",
  24313. "enum": ["session.next.shell.ended.1"]
  24314. },
  24315. "id": {
  24316. "type": "string",
  24317. "pattern": "^evt_"
  24318. },
  24319. "seq": {
  24320. "type": "number"
  24321. },
  24322. "aggregateID": {
  24323. "type": "string"
  24324. },
  24325. "data": {
  24326. "type": "object",
  24327. "properties": {
  24328. "timestamp": {
  24329. "type": "number"
  24330. },
  24331. "sessionID": {
  24332. "type": "string",
  24333. "pattern": "^ses"
  24334. },
  24335. "callID": {
  24336. "type": "string"
  24337. },
  24338. "output": {
  24339. "type": "string"
  24340. }
  24341. },
  24342. "required": ["timestamp", "sessionID", "callID", "output"],
  24343. "additionalProperties": false
  24344. }
  24345. },
  24346. "required": ["type", "id", "seq", "aggregateID", "data"],
  24347. "additionalProperties": false
  24348. }
  24349. },
  24350. "required": ["type", "id", "syncEvent"],
  24351. "additionalProperties": false
  24352. },
  24353. "SyncEventSessionNextStepStarted": {
  24354. "type": "object",
  24355. "properties": {
  24356. "type": {
  24357. "type": "string",
  24358. "enum": ["sync"]
  24359. },
  24360. "id": {
  24361. "type": "string",
  24362. "pattern": "^evt_"
  24363. },
  24364. "syncEvent": {
  24365. "type": "object",
  24366. "properties": {
  24367. "type": {
  24368. "type": "string",
  24369. "enum": ["session.next.step.started.1"]
  24370. },
  24371. "id": {
  24372. "type": "string",
  24373. "pattern": "^evt_"
  24374. },
  24375. "seq": {
  24376. "type": "number"
  24377. },
  24378. "aggregateID": {
  24379. "type": "string"
  24380. },
  24381. "data": {
  24382. "type": "object",
  24383. "properties": {
  24384. "timestamp": {
  24385. "type": "number"
  24386. },
  24387. "sessionID": {
  24388. "type": "string",
  24389. "pattern": "^ses"
  24390. },
  24391. "assistantMessageID": {
  24392. "type": "string",
  24393. "pattern": "^msg_"
  24394. },
  24395. "agent": {
  24396. "type": "string"
  24397. },
  24398. "model": {
  24399. "type": "object",
  24400. "properties": {
  24401. "id": {
  24402. "type": "string"
  24403. },
  24404. "providerID": {
  24405. "type": "string"
  24406. },
  24407. "variant": {
  24408. "type": "string"
  24409. }
  24410. },
  24411. "required": ["id", "providerID"],
  24412. "additionalProperties": false
  24413. },
  24414. "snapshot": {
  24415. "type": "string"
  24416. }
  24417. },
  24418. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  24419. "additionalProperties": false
  24420. }
  24421. },
  24422. "required": ["type", "id", "seq", "aggregateID", "data"],
  24423. "additionalProperties": false
  24424. }
  24425. },
  24426. "required": ["type", "id", "syncEvent"],
  24427. "additionalProperties": false
  24428. },
  24429. "SyncEventSessionNextStepEnded": {
  24430. "type": "object",
  24431. "properties": {
  24432. "type": {
  24433. "type": "string",
  24434. "enum": ["sync"]
  24435. },
  24436. "id": {
  24437. "type": "string",
  24438. "pattern": "^evt_"
  24439. },
  24440. "syncEvent": {
  24441. "type": "object",
  24442. "properties": {
  24443. "type": {
  24444. "type": "string",
  24445. "enum": ["session.next.step.ended.2"]
  24446. },
  24447. "id": {
  24448. "type": "string",
  24449. "pattern": "^evt_"
  24450. },
  24451. "seq": {
  24452. "type": "number"
  24453. },
  24454. "aggregateID": {
  24455. "type": "string"
  24456. },
  24457. "data": {
  24458. "type": "object",
  24459. "properties": {
  24460. "timestamp": {
  24461. "type": "number"
  24462. },
  24463. "sessionID": {
  24464. "type": "string",
  24465. "pattern": "^ses"
  24466. },
  24467. "assistantMessageID": {
  24468. "type": "string",
  24469. "pattern": "^msg_"
  24470. },
  24471. "finish": {
  24472. "type": "string"
  24473. },
  24474. "cost": {
  24475. "type": "number"
  24476. },
  24477. "tokens": {
  24478. "type": "object",
  24479. "properties": {
  24480. "input": {
  24481. "type": "number"
  24482. },
  24483. "output": {
  24484. "type": "number"
  24485. },
  24486. "reasoning": {
  24487. "type": "number"
  24488. },
  24489. "cache": {
  24490. "type": "object",
  24491. "properties": {
  24492. "read": {
  24493. "type": "number"
  24494. },
  24495. "write": {
  24496. "type": "number"
  24497. }
  24498. },
  24499. "required": ["read", "write"],
  24500. "additionalProperties": false
  24501. }
  24502. },
  24503. "required": ["input", "output", "reasoning", "cache"],
  24504. "additionalProperties": false
  24505. },
  24506. "snapshot": {
  24507. "type": "string"
  24508. }
  24509. },
  24510. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  24511. "additionalProperties": false
  24512. }
  24513. },
  24514. "required": ["type", "id", "seq", "aggregateID", "data"],
  24515. "additionalProperties": false
  24516. }
  24517. },
  24518. "required": ["type", "id", "syncEvent"],
  24519. "additionalProperties": false
  24520. },
  24521. "SyncEventSessionNextStepFailed": {
  24522. "type": "object",
  24523. "properties": {
  24524. "type": {
  24525. "type": "string",
  24526. "enum": ["sync"]
  24527. },
  24528. "id": {
  24529. "type": "string",
  24530. "pattern": "^evt_"
  24531. },
  24532. "syncEvent": {
  24533. "type": "object",
  24534. "properties": {
  24535. "type": {
  24536. "type": "string",
  24537. "enum": ["session.next.step.failed.2"]
  24538. },
  24539. "id": {
  24540. "type": "string",
  24541. "pattern": "^evt_"
  24542. },
  24543. "seq": {
  24544. "type": "number"
  24545. },
  24546. "aggregateID": {
  24547. "type": "string"
  24548. },
  24549. "data": {
  24550. "type": "object",
  24551. "properties": {
  24552. "timestamp": {
  24553. "type": "number"
  24554. },
  24555. "sessionID": {
  24556. "type": "string",
  24557. "pattern": "^ses"
  24558. },
  24559. "assistantMessageID": {
  24560. "type": "string",
  24561. "pattern": "^msg_"
  24562. },
  24563. "error": {
  24564. "$ref": "#/components/schemas/SessionErrorUnknown"
  24565. }
  24566. },
  24567. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  24568. "additionalProperties": false
  24569. }
  24570. },
  24571. "required": ["type", "id", "seq", "aggregateID", "data"],
  24572. "additionalProperties": false
  24573. }
  24574. },
  24575. "required": ["type", "id", "syncEvent"],
  24576. "additionalProperties": false
  24577. },
  24578. "SyncEventSessionNextTextStarted": {
  24579. "type": "object",
  24580. "properties": {
  24581. "type": {
  24582. "type": "string",
  24583. "enum": ["sync"]
  24584. },
  24585. "id": {
  24586. "type": "string",
  24587. "pattern": "^evt_"
  24588. },
  24589. "syncEvent": {
  24590. "type": "object",
  24591. "properties": {
  24592. "type": {
  24593. "type": "string",
  24594. "enum": ["session.next.text.started.1"]
  24595. },
  24596. "id": {
  24597. "type": "string",
  24598. "pattern": "^evt_"
  24599. },
  24600. "seq": {
  24601. "type": "number"
  24602. },
  24603. "aggregateID": {
  24604. "type": "string"
  24605. },
  24606. "data": {
  24607. "type": "object",
  24608. "properties": {
  24609. "timestamp": {
  24610. "type": "number"
  24611. },
  24612. "sessionID": {
  24613. "type": "string",
  24614. "pattern": "^ses"
  24615. },
  24616. "assistantMessageID": {
  24617. "type": "string",
  24618. "pattern": "^msg_"
  24619. },
  24620. "textID": {
  24621. "type": "string"
  24622. }
  24623. },
  24624. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  24625. "additionalProperties": false
  24626. }
  24627. },
  24628. "required": ["type", "id", "seq", "aggregateID", "data"],
  24629. "additionalProperties": false
  24630. }
  24631. },
  24632. "required": ["type", "id", "syncEvent"],
  24633. "additionalProperties": false
  24634. },
  24635. "SyncEventSessionNextTextEnded": {
  24636. "type": "object",
  24637. "properties": {
  24638. "type": {
  24639. "type": "string",
  24640. "enum": ["sync"]
  24641. },
  24642. "id": {
  24643. "type": "string",
  24644. "pattern": "^evt_"
  24645. },
  24646. "syncEvent": {
  24647. "type": "object",
  24648. "properties": {
  24649. "type": {
  24650. "type": "string",
  24651. "enum": ["session.next.text.ended.1"]
  24652. },
  24653. "id": {
  24654. "type": "string",
  24655. "pattern": "^evt_"
  24656. },
  24657. "seq": {
  24658. "type": "number"
  24659. },
  24660. "aggregateID": {
  24661. "type": "string"
  24662. },
  24663. "data": {
  24664. "type": "object",
  24665. "properties": {
  24666. "timestamp": {
  24667. "type": "number"
  24668. },
  24669. "sessionID": {
  24670. "type": "string",
  24671. "pattern": "^ses"
  24672. },
  24673. "assistantMessageID": {
  24674. "type": "string",
  24675. "pattern": "^msg_"
  24676. },
  24677. "textID": {
  24678. "type": "string"
  24679. },
  24680. "text": {
  24681. "type": "string"
  24682. }
  24683. },
  24684. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  24685. "additionalProperties": false
  24686. }
  24687. },
  24688. "required": ["type", "id", "seq", "aggregateID", "data"],
  24689. "additionalProperties": false
  24690. }
  24691. },
  24692. "required": ["type", "id", "syncEvent"],
  24693. "additionalProperties": false
  24694. },
  24695. "SyncEventSessionNextReasoningStarted": {
  24696. "type": "object",
  24697. "properties": {
  24698. "type": {
  24699. "type": "string",
  24700. "enum": ["sync"]
  24701. },
  24702. "id": {
  24703. "type": "string",
  24704. "pattern": "^evt_"
  24705. },
  24706. "syncEvent": {
  24707. "type": "object",
  24708. "properties": {
  24709. "type": {
  24710. "type": "string",
  24711. "enum": ["session.next.reasoning.started.1"]
  24712. },
  24713. "id": {
  24714. "type": "string",
  24715. "pattern": "^evt_"
  24716. },
  24717. "seq": {
  24718. "type": "number"
  24719. },
  24720. "aggregateID": {
  24721. "type": "string"
  24722. },
  24723. "data": {
  24724. "type": "object",
  24725. "properties": {
  24726. "timestamp": {
  24727. "type": "number"
  24728. },
  24729. "sessionID": {
  24730. "type": "string",
  24731. "pattern": "^ses"
  24732. },
  24733. "assistantMessageID": {
  24734. "type": "string",
  24735. "pattern": "^msg_"
  24736. },
  24737. "reasoningID": {
  24738. "type": "string"
  24739. },
  24740. "providerMetadata": {
  24741. "type": "object",
  24742. "additionalProperties": {
  24743. "type": "object"
  24744. }
  24745. }
  24746. },
  24747. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  24748. "additionalProperties": false
  24749. }
  24750. },
  24751. "required": ["type", "id", "seq", "aggregateID", "data"],
  24752. "additionalProperties": false
  24753. }
  24754. },
  24755. "required": ["type", "id", "syncEvent"],
  24756. "additionalProperties": false
  24757. },
  24758. "SyncEventSessionNextReasoningEnded": {
  24759. "type": "object",
  24760. "properties": {
  24761. "type": {
  24762. "type": "string",
  24763. "enum": ["sync"]
  24764. },
  24765. "id": {
  24766. "type": "string",
  24767. "pattern": "^evt_"
  24768. },
  24769. "syncEvent": {
  24770. "type": "object",
  24771. "properties": {
  24772. "type": {
  24773. "type": "string",
  24774. "enum": ["session.next.reasoning.ended.1"]
  24775. },
  24776. "id": {
  24777. "type": "string",
  24778. "pattern": "^evt_"
  24779. },
  24780. "seq": {
  24781. "type": "number"
  24782. },
  24783. "aggregateID": {
  24784. "type": "string"
  24785. },
  24786. "data": {
  24787. "type": "object",
  24788. "properties": {
  24789. "timestamp": {
  24790. "type": "number"
  24791. },
  24792. "sessionID": {
  24793. "type": "string",
  24794. "pattern": "^ses"
  24795. },
  24796. "assistantMessageID": {
  24797. "type": "string",
  24798. "pattern": "^msg_"
  24799. },
  24800. "reasoningID": {
  24801. "type": "string"
  24802. },
  24803. "text": {
  24804. "type": "string"
  24805. },
  24806. "providerMetadata": {
  24807. "type": "object",
  24808. "additionalProperties": {
  24809. "type": "object"
  24810. }
  24811. }
  24812. },
  24813. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  24814. "additionalProperties": false
  24815. }
  24816. },
  24817. "required": ["type", "id", "seq", "aggregateID", "data"],
  24818. "additionalProperties": false
  24819. }
  24820. },
  24821. "required": ["type", "id", "syncEvent"],
  24822. "additionalProperties": false
  24823. },
  24824. "SyncEventSessionNextToolInputStarted": {
  24825. "type": "object",
  24826. "properties": {
  24827. "type": {
  24828. "type": "string",
  24829. "enum": ["sync"]
  24830. },
  24831. "id": {
  24832. "type": "string",
  24833. "pattern": "^evt_"
  24834. },
  24835. "syncEvent": {
  24836. "type": "object",
  24837. "properties": {
  24838. "type": {
  24839. "type": "string",
  24840. "enum": ["session.next.tool.input.started.1"]
  24841. },
  24842. "id": {
  24843. "type": "string",
  24844. "pattern": "^evt_"
  24845. },
  24846. "seq": {
  24847. "type": "number"
  24848. },
  24849. "aggregateID": {
  24850. "type": "string"
  24851. },
  24852. "data": {
  24853. "type": "object",
  24854. "properties": {
  24855. "timestamp": {
  24856. "type": "number"
  24857. },
  24858. "sessionID": {
  24859. "type": "string",
  24860. "pattern": "^ses"
  24861. },
  24862. "assistantMessageID": {
  24863. "type": "string",
  24864. "pattern": "^msg_"
  24865. },
  24866. "callID": {
  24867. "type": "string"
  24868. },
  24869. "name": {
  24870. "type": "string"
  24871. }
  24872. },
  24873. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  24874. "additionalProperties": false
  24875. }
  24876. },
  24877. "required": ["type", "id", "seq", "aggregateID", "data"],
  24878. "additionalProperties": false
  24879. }
  24880. },
  24881. "required": ["type", "id", "syncEvent"],
  24882. "additionalProperties": false
  24883. },
  24884. "SyncEventSessionNextToolInputEnded": {
  24885. "type": "object",
  24886. "properties": {
  24887. "type": {
  24888. "type": "string",
  24889. "enum": ["sync"]
  24890. },
  24891. "id": {
  24892. "type": "string",
  24893. "pattern": "^evt_"
  24894. },
  24895. "syncEvent": {
  24896. "type": "object",
  24897. "properties": {
  24898. "type": {
  24899. "type": "string",
  24900. "enum": ["session.next.tool.input.ended.1"]
  24901. },
  24902. "id": {
  24903. "type": "string",
  24904. "pattern": "^evt_"
  24905. },
  24906. "seq": {
  24907. "type": "number"
  24908. },
  24909. "aggregateID": {
  24910. "type": "string"
  24911. },
  24912. "data": {
  24913. "type": "object",
  24914. "properties": {
  24915. "timestamp": {
  24916. "type": "number"
  24917. },
  24918. "sessionID": {
  24919. "type": "string",
  24920. "pattern": "^ses"
  24921. },
  24922. "assistantMessageID": {
  24923. "type": "string",
  24924. "pattern": "^msg_"
  24925. },
  24926. "callID": {
  24927. "type": "string"
  24928. },
  24929. "text": {
  24930. "type": "string"
  24931. }
  24932. },
  24933. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  24934. "additionalProperties": false
  24935. }
  24936. },
  24937. "required": ["type", "id", "seq", "aggregateID", "data"],
  24938. "additionalProperties": false
  24939. }
  24940. },
  24941. "required": ["type", "id", "syncEvent"],
  24942. "additionalProperties": false
  24943. },
  24944. "SyncEventSessionNextToolCalled": {
  24945. "type": "object",
  24946. "properties": {
  24947. "type": {
  24948. "type": "string",
  24949. "enum": ["sync"]
  24950. },
  24951. "id": {
  24952. "type": "string",
  24953. "pattern": "^evt_"
  24954. },
  24955. "syncEvent": {
  24956. "type": "object",
  24957. "properties": {
  24958. "type": {
  24959. "type": "string",
  24960. "enum": ["session.next.tool.called.1"]
  24961. },
  24962. "id": {
  24963. "type": "string",
  24964. "pattern": "^evt_"
  24965. },
  24966. "seq": {
  24967. "type": "number"
  24968. },
  24969. "aggregateID": {
  24970. "type": "string"
  24971. },
  24972. "data": {
  24973. "type": "object",
  24974. "properties": {
  24975. "timestamp": {
  24976. "type": "number"
  24977. },
  24978. "sessionID": {
  24979. "type": "string",
  24980. "pattern": "^ses"
  24981. },
  24982. "assistantMessageID": {
  24983. "type": "string",
  24984. "pattern": "^msg_"
  24985. },
  24986. "callID": {
  24987. "type": "string"
  24988. },
  24989. "tool": {
  24990. "type": "string"
  24991. },
  24992. "input": {
  24993. "type": "object"
  24994. },
  24995. "provider": {
  24996. "type": "object",
  24997. "properties": {
  24998. "executed": {
  24999. "type": "boolean"
  25000. },
  25001. "metadata": {
  25002. "type": "object",
  25003. "additionalProperties": {
  25004. "type": "object"
  25005. }
  25006. }
  25007. },
  25008. "required": ["executed"],
  25009. "additionalProperties": false
  25010. }
  25011. },
  25012. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  25013. "additionalProperties": false
  25014. }
  25015. },
  25016. "required": ["type", "id", "seq", "aggregateID", "data"],
  25017. "additionalProperties": false
  25018. }
  25019. },
  25020. "required": ["type", "id", "syncEvent"],
  25021. "additionalProperties": false
  25022. },
  25023. "SyncEventSessionNextToolProgress": {
  25024. "type": "object",
  25025. "properties": {
  25026. "type": {
  25027. "type": "string",
  25028. "enum": ["sync"]
  25029. },
  25030. "id": {
  25031. "type": "string",
  25032. "pattern": "^evt_"
  25033. },
  25034. "syncEvent": {
  25035. "type": "object",
  25036. "properties": {
  25037. "type": {
  25038. "type": "string",
  25039. "enum": ["session.next.tool.progress.1"]
  25040. },
  25041. "id": {
  25042. "type": "string",
  25043. "pattern": "^evt_"
  25044. },
  25045. "seq": {
  25046. "type": "number"
  25047. },
  25048. "aggregateID": {
  25049. "type": "string"
  25050. },
  25051. "data": {
  25052. "type": "object",
  25053. "properties": {
  25054. "timestamp": {
  25055. "type": "number"
  25056. },
  25057. "sessionID": {
  25058. "type": "string",
  25059. "pattern": "^ses"
  25060. },
  25061. "assistantMessageID": {
  25062. "type": "string",
  25063. "pattern": "^msg_"
  25064. },
  25065. "callID": {
  25066. "type": "string"
  25067. },
  25068. "structured": {
  25069. "type": "object"
  25070. },
  25071. "content": {
  25072. "type": "array",
  25073. "items": {
  25074. "anyOf": [
  25075. {
  25076. "$ref": "#/components/schemas/ToolTextContent"
  25077. },
  25078. {
  25079. "$ref": "#/components/schemas/ToolFileContent"
  25080. }
  25081. ]
  25082. }
  25083. }
  25084. },
  25085. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  25086. "additionalProperties": false
  25087. }
  25088. },
  25089. "required": ["type", "id", "seq", "aggregateID", "data"],
  25090. "additionalProperties": false
  25091. }
  25092. },
  25093. "required": ["type", "id", "syncEvent"],
  25094. "additionalProperties": false
  25095. },
  25096. "SyncEventSessionNextToolSuccess": {
  25097. "type": "object",
  25098. "properties": {
  25099. "type": {
  25100. "type": "string",
  25101. "enum": ["sync"]
  25102. },
  25103. "id": {
  25104. "type": "string",
  25105. "pattern": "^evt_"
  25106. },
  25107. "syncEvent": {
  25108. "type": "object",
  25109. "properties": {
  25110. "type": {
  25111. "type": "string",
  25112. "enum": ["session.next.tool.success.1"]
  25113. },
  25114. "id": {
  25115. "type": "string",
  25116. "pattern": "^evt_"
  25117. },
  25118. "seq": {
  25119. "type": "number"
  25120. },
  25121. "aggregateID": {
  25122. "type": "string"
  25123. },
  25124. "data": {
  25125. "type": "object",
  25126. "properties": {
  25127. "timestamp": {
  25128. "type": "number"
  25129. },
  25130. "sessionID": {
  25131. "type": "string",
  25132. "pattern": "^ses"
  25133. },
  25134. "assistantMessageID": {
  25135. "type": "string",
  25136. "pattern": "^msg_"
  25137. },
  25138. "callID": {
  25139. "type": "string"
  25140. },
  25141. "structured": {
  25142. "type": "object"
  25143. },
  25144. "content": {
  25145. "type": "array",
  25146. "items": {
  25147. "anyOf": [
  25148. {
  25149. "$ref": "#/components/schemas/ToolTextContent"
  25150. },
  25151. {
  25152. "$ref": "#/components/schemas/ToolFileContent"
  25153. }
  25154. ]
  25155. }
  25156. },
  25157. "outputPaths": {
  25158. "type": "array",
  25159. "items": {
  25160. "type": "string"
  25161. }
  25162. },
  25163. "result": {},
  25164. "provider": {
  25165. "type": "object",
  25166. "properties": {
  25167. "executed": {
  25168. "type": "boolean"
  25169. },
  25170. "metadata": {
  25171. "type": "object",
  25172. "additionalProperties": {
  25173. "type": "object"
  25174. }
  25175. }
  25176. },
  25177. "required": ["executed"],
  25178. "additionalProperties": false
  25179. }
  25180. },
  25181. "required": [
  25182. "timestamp",
  25183. "sessionID",
  25184. "assistantMessageID",
  25185. "callID",
  25186. "structured",
  25187. "content",
  25188. "provider"
  25189. ],
  25190. "additionalProperties": false
  25191. }
  25192. },
  25193. "required": ["type", "id", "seq", "aggregateID", "data"],
  25194. "additionalProperties": false
  25195. }
  25196. },
  25197. "required": ["type", "id", "syncEvent"],
  25198. "additionalProperties": false
  25199. },
  25200. "SyncEventSessionNextToolFailed": {
  25201. "type": "object",
  25202. "properties": {
  25203. "type": {
  25204. "type": "string",
  25205. "enum": ["sync"]
  25206. },
  25207. "id": {
  25208. "type": "string",
  25209. "pattern": "^evt_"
  25210. },
  25211. "syncEvent": {
  25212. "type": "object",
  25213. "properties": {
  25214. "type": {
  25215. "type": "string",
  25216. "enum": ["session.next.tool.failed.1"]
  25217. },
  25218. "id": {
  25219. "type": "string",
  25220. "pattern": "^evt_"
  25221. },
  25222. "seq": {
  25223. "type": "number"
  25224. },
  25225. "aggregateID": {
  25226. "type": "string"
  25227. },
  25228. "data": {
  25229. "type": "object",
  25230. "properties": {
  25231. "timestamp": {
  25232. "type": "number"
  25233. },
  25234. "sessionID": {
  25235. "type": "string",
  25236. "pattern": "^ses"
  25237. },
  25238. "assistantMessageID": {
  25239. "type": "string",
  25240. "pattern": "^msg_"
  25241. },
  25242. "callID": {
  25243. "type": "string"
  25244. },
  25245. "error": {
  25246. "$ref": "#/components/schemas/SessionErrorUnknown"
  25247. },
  25248. "result": {},
  25249. "provider": {
  25250. "type": "object",
  25251. "properties": {
  25252. "executed": {
  25253. "type": "boolean"
  25254. },
  25255. "metadata": {
  25256. "type": "object",
  25257. "additionalProperties": {
  25258. "type": "object"
  25259. }
  25260. }
  25261. },
  25262. "required": ["executed"],
  25263. "additionalProperties": false
  25264. }
  25265. },
  25266. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  25267. "additionalProperties": false
  25268. }
  25269. },
  25270. "required": ["type", "id", "seq", "aggregateID", "data"],
  25271. "additionalProperties": false
  25272. }
  25273. },
  25274. "required": ["type", "id", "syncEvent"],
  25275. "additionalProperties": false
  25276. },
  25277. "SyncEventSessionNextRetried": {
  25278. "type": "object",
  25279. "properties": {
  25280. "type": {
  25281. "type": "string",
  25282. "enum": ["sync"]
  25283. },
  25284. "id": {
  25285. "type": "string",
  25286. "pattern": "^evt_"
  25287. },
  25288. "syncEvent": {
  25289. "type": "object",
  25290. "properties": {
  25291. "type": {
  25292. "type": "string",
  25293. "enum": ["session.next.retried.1"]
  25294. },
  25295. "id": {
  25296. "type": "string",
  25297. "pattern": "^evt_"
  25298. },
  25299. "seq": {
  25300. "type": "number"
  25301. },
  25302. "aggregateID": {
  25303. "type": "string"
  25304. },
  25305. "data": {
  25306. "type": "object",
  25307. "properties": {
  25308. "timestamp": {
  25309. "type": "number"
  25310. },
  25311. "sessionID": {
  25312. "type": "string",
  25313. "pattern": "^ses"
  25314. },
  25315. "attempt": {
  25316. "type": "number"
  25317. },
  25318. "error": {
  25319. "$ref": "#/components/schemas/SessionNextRetry_error"
  25320. }
  25321. },
  25322. "required": ["timestamp", "sessionID", "attempt", "error"],
  25323. "additionalProperties": false
  25324. }
  25325. },
  25326. "required": ["type", "id", "seq", "aggregateID", "data"],
  25327. "additionalProperties": false
  25328. }
  25329. },
  25330. "required": ["type", "id", "syncEvent"],
  25331. "additionalProperties": false
  25332. },
  25333. "SyncEventSessionNextCompactionStarted": {
  25334. "type": "object",
  25335. "properties": {
  25336. "type": {
  25337. "type": "string",
  25338. "enum": ["sync"]
  25339. },
  25340. "id": {
  25341. "type": "string",
  25342. "pattern": "^evt_"
  25343. },
  25344. "syncEvent": {
  25345. "type": "object",
  25346. "properties": {
  25347. "type": {
  25348. "type": "string",
  25349. "enum": ["session.next.compaction.started.1"]
  25350. },
  25351. "id": {
  25352. "type": "string",
  25353. "pattern": "^evt_"
  25354. },
  25355. "seq": {
  25356. "type": "number"
  25357. },
  25358. "aggregateID": {
  25359. "type": "string"
  25360. },
  25361. "data": {
  25362. "type": "object",
  25363. "properties": {
  25364. "timestamp": {
  25365. "type": "number"
  25366. },
  25367. "sessionID": {
  25368. "type": "string",
  25369. "pattern": "^ses"
  25370. },
  25371. "messageID": {
  25372. "type": "string",
  25373. "pattern": "^msg_"
  25374. },
  25375. "reason": {
  25376. "type": "string",
  25377. "enum": ["auto", "manual"]
  25378. }
  25379. },
  25380. "required": ["timestamp", "sessionID", "messageID", "reason"],
  25381. "additionalProperties": false
  25382. }
  25383. },
  25384. "required": ["type", "id", "seq", "aggregateID", "data"],
  25385. "additionalProperties": false
  25386. }
  25387. },
  25388. "required": ["type", "id", "syncEvent"],
  25389. "additionalProperties": false
  25390. },
  25391. "SyncEventSessionNextCompactionEnded": {
  25392. "type": "object",
  25393. "properties": {
  25394. "type": {
  25395. "type": "string",
  25396. "enum": ["sync"]
  25397. },
  25398. "id": {
  25399. "type": "string",
  25400. "pattern": "^evt_"
  25401. },
  25402. "syncEvent": {
  25403. "type": "object",
  25404. "properties": {
  25405. "type": {
  25406. "type": "string",
  25407. "enum": ["session.next.compaction.ended.2"]
  25408. },
  25409. "id": {
  25410. "type": "string",
  25411. "pattern": "^evt_"
  25412. },
  25413. "seq": {
  25414. "type": "number"
  25415. },
  25416. "aggregateID": {
  25417. "type": "string"
  25418. },
  25419. "data": {
  25420. "type": "object",
  25421. "properties": {
  25422. "timestamp": {
  25423. "type": "number"
  25424. },
  25425. "sessionID": {
  25426. "type": "string",
  25427. "pattern": "^ses"
  25428. },
  25429. "messageID": {
  25430. "type": "string",
  25431. "pattern": "^msg_"
  25432. },
  25433. "reason": {
  25434. "type": "string",
  25435. "enum": ["auto", "manual"]
  25436. },
  25437. "text": {
  25438. "type": "string"
  25439. },
  25440. "recent": {
  25441. "type": "string"
  25442. }
  25443. },
  25444. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  25445. "additionalProperties": false
  25446. }
  25447. },
  25448. "required": ["type", "id", "seq", "aggregateID", "data"],
  25449. "additionalProperties": false
  25450. }
  25451. },
  25452. "required": ["type", "id", "syncEvent"],
  25453. "additionalProperties": false
  25454. },
  25455. "ConfigV2ReferenceGit": {
  25456. "type": "object",
  25457. "properties": {
  25458. "repository": {
  25459. "type": "string"
  25460. },
  25461. "branch": {
  25462. "type": "string"
  25463. },
  25464. "description": {
  25465. "type": "string"
  25466. },
  25467. "hidden": {
  25468. "type": "boolean"
  25469. }
  25470. },
  25471. "required": ["repository"],
  25472. "additionalProperties": false
  25473. },
  25474. "ConfigV2ReferenceLocal": {
  25475. "type": "object",
  25476. "properties": {
  25477. "path": {
  25478. "type": "string"
  25479. },
  25480. "description": {
  25481. "type": "string"
  25482. },
  25483. "hidden": {
  25484. "type": "boolean"
  25485. }
  25486. },
  25487. "required": ["path"],
  25488. "additionalProperties": false
  25489. },
  25490. "PolicyEffect": {
  25491. "type": "string",
  25492. "enum": ["allow", "deny"]
  25493. },
  25494. "ConfigV2ExperimentalPolicy": {
  25495. "type": "object",
  25496. "properties": {
  25497. "action": {
  25498. "type": "string",
  25499. "enum": ["provider.use"]
  25500. },
  25501. "effect": {
  25502. "$ref": "#/components/schemas/PolicyEffect"
  25503. },
  25504. "resource": {
  25505. "type": "string"
  25506. }
  25507. },
  25508. "required": ["action", "effect", "resource"],
  25509. "additionalProperties": false
  25510. },
  25511. "ProjectDirectories": {
  25512. "type": "array",
  25513. "items": {
  25514. "type": "object",
  25515. "properties": {
  25516. "directory": {
  25517. "type": "string"
  25518. },
  25519. "strategy": {
  25520. "type": "string"
  25521. }
  25522. },
  25523. "required": ["directory"],
  25524. "additionalProperties": false
  25525. }
  25526. },
  25527. "LocationInfo": {
  25528. "type": "object",
  25529. "properties": {
  25530. "directory": {
  25531. "type": "string"
  25532. },
  25533. "workspaceID": {
  25534. "type": "string",
  25535. "pattern": "^wrk"
  25536. },
  25537. "project": {
  25538. "type": "object",
  25539. "properties": {
  25540. "id": {
  25541. "type": "string"
  25542. },
  25543. "directory": {
  25544. "type": "string"
  25545. }
  25546. },
  25547. "required": ["id", "directory"],
  25548. "additionalProperties": false
  25549. }
  25550. },
  25551. "required": ["directory", "project"],
  25552. "additionalProperties": false
  25553. },
  25554. "PermissionV2Effect": {
  25555. "type": "string",
  25556. "enum": ["allow", "deny", "ask"]
  25557. },
  25558. "PermissionV2Rule": {
  25559. "type": "object",
  25560. "properties": {
  25561. "action": {
  25562. "type": "string"
  25563. },
  25564. "resource": {
  25565. "type": "string"
  25566. },
  25567. "effect": {
  25568. "$ref": "#/components/schemas/PermissionV2Effect"
  25569. }
  25570. },
  25571. "required": ["action", "resource", "effect"],
  25572. "additionalProperties": false
  25573. },
  25574. "PermissionV2Ruleset": {
  25575. "type": "array",
  25576. "items": {
  25577. "$ref": "#/components/schemas/PermissionV2Rule"
  25578. }
  25579. },
  25580. "AgentV2Info": {
  25581. "type": "object",
  25582. "properties": {
  25583. "id": {
  25584. "type": "string"
  25585. },
  25586. "model": {
  25587. "type": "object",
  25588. "properties": {
  25589. "id": {
  25590. "type": "string"
  25591. },
  25592. "providerID": {
  25593. "type": "string"
  25594. },
  25595. "variant": {
  25596. "type": "string"
  25597. }
  25598. },
  25599. "required": ["id", "providerID"],
  25600. "additionalProperties": false
  25601. },
  25602. "request": {
  25603. "type": "object",
  25604. "properties": {
  25605. "headers": {
  25606. "type": "object",
  25607. "additionalProperties": {
  25608. "type": "string"
  25609. }
  25610. },
  25611. "body": {
  25612. "type": "object"
  25613. }
  25614. },
  25615. "required": ["headers", "body"],
  25616. "additionalProperties": false
  25617. },
  25618. "system": {
  25619. "type": "string"
  25620. },
  25621. "description": {
  25622. "type": "string"
  25623. },
  25624. "mode": {
  25625. "type": "string",
  25626. "enum": ["subagent", "primary", "all"]
  25627. },
  25628. "hidden": {
  25629. "type": "boolean"
  25630. },
  25631. "color": {
  25632. "anyOf": [
  25633. {
  25634. "type": "string",
  25635. "pattern": "^#[0-9a-fA-F]{6}$"
  25636. },
  25637. {
  25638. "type": "string",
  25639. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  25640. }
  25641. ]
  25642. },
  25643. "steps": {
  25644. "type": "integer",
  25645. "exclusiveMinimum": 0
  25646. },
  25647. "permissions": {
  25648. "$ref": "#/components/schemas/PermissionV2Ruleset"
  25649. }
  25650. },
  25651. "required": ["id", "request", "mode", "hidden", "permissions"],
  25652. "additionalProperties": false
  25653. },
  25654. "SessionV2Info": {
  25655. "type": "object",
  25656. "properties": {
  25657. "id": {
  25658. "type": "string",
  25659. "pattern": "^ses"
  25660. },
  25661. "parentID": {
  25662. "type": "string",
  25663. "pattern": "^ses"
  25664. },
  25665. "projectID": {
  25666. "type": "string"
  25667. },
  25668. "agent": {
  25669. "type": "string"
  25670. },
  25671. "model": {
  25672. "type": "object",
  25673. "properties": {
  25674. "id": {
  25675. "type": "string"
  25676. },
  25677. "providerID": {
  25678. "type": "string"
  25679. },
  25680. "variant": {
  25681. "type": "string"
  25682. }
  25683. },
  25684. "required": ["id", "providerID"],
  25685. "additionalProperties": false
  25686. },
  25687. "cost": {
  25688. "type": "number"
  25689. },
  25690. "tokens": {
  25691. "type": "object",
  25692. "properties": {
  25693. "input": {
  25694. "type": "number"
  25695. },
  25696. "output": {
  25697. "type": "number"
  25698. },
  25699. "reasoning": {
  25700. "type": "number"
  25701. },
  25702. "cache": {
  25703. "type": "object",
  25704. "properties": {
  25705. "read": {
  25706. "type": "number"
  25707. },
  25708. "write": {
  25709. "type": "number"
  25710. }
  25711. },
  25712. "required": ["read", "write"],
  25713. "additionalProperties": false
  25714. }
  25715. },
  25716. "required": ["input", "output", "reasoning", "cache"],
  25717. "additionalProperties": false
  25718. },
  25719. "time": {
  25720. "type": "object",
  25721. "properties": {
  25722. "created": {
  25723. "type": "number"
  25724. },
  25725. "updated": {
  25726. "type": "number"
  25727. },
  25728. "archived": {
  25729. "type": "number"
  25730. }
  25731. },
  25732. "required": ["created", "updated"],
  25733. "additionalProperties": false
  25734. },
  25735. "title": {
  25736. "type": "string"
  25737. },
  25738. "location": {
  25739. "$ref": "#/components/schemas/LocationRef"
  25740. },
  25741. "subpath": {
  25742. "type": "string"
  25743. }
  25744. },
  25745. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  25746. "additionalProperties": false
  25747. },
  25748. "SessionInputAdmitted": {
  25749. "type": "object",
  25750. "properties": {
  25751. "admittedSeq": {
  25752. "type": "integer",
  25753. "minimum": 0
  25754. },
  25755. "id": {
  25756. "type": "string",
  25757. "pattern": "^msg_"
  25758. },
  25759. "sessionID": {
  25760. "type": "string",
  25761. "pattern": "^ses"
  25762. },
  25763. "prompt": {
  25764. "$ref": "#/components/schemas/Prompt"
  25765. },
  25766. "delivery": {
  25767. "type": "string",
  25768. "enum": ["steer", "queue"]
  25769. },
  25770. "timeCreated": {
  25771. "type": "number"
  25772. },
  25773. "promotedSeq": {
  25774. "type": "integer",
  25775. "minimum": 0
  25776. }
  25777. },
  25778. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  25779. "additionalProperties": false
  25780. },
  25781. "SessionMessageAgentSwitched": {
  25782. "type": "object",
  25783. "properties": {
  25784. "id": {
  25785. "type": "string",
  25786. "pattern": "^msg_"
  25787. },
  25788. "metadata": {
  25789. "type": "object"
  25790. },
  25791. "time": {
  25792. "type": "object",
  25793. "properties": {
  25794. "created": {
  25795. "type": "number"
  25796. }
  25797. },
  25798. "required": ["created"],
  25799. "additionalProperties": false
  25800. },
  25801. "type": {
  25802. "type": "string",
  25803. "enum": ["agent-switched"]
  25804. },
  25805. "agent": {
  25806. "type": "string"
  25807. }
  25808. },
  25809. "required": ["id", "time", "type", "agent"],
  25810. "additionalProperties": false
  25811. },
  25812. "SessionMessageModelSwitched": {
  25813. "type": "object",
  25814. "properties": {
  25815. "id": {
  25816. "type": "string",
  25817. "pattern": "^msg_"
  25818. },
  25819. "metadata": {
  25820. "type": "object"
  25821. },
  25822. "time": {
  25823. "type": "object",
  25824. "properties": {
  25825. "created": {
  25826. "type": "number"
  25827. }
  25828. },
  25829. "required": ["created"],
  25830. "additionalProperties": false
  25831. },
  25832. "type": {
  25833. "type": "string",
  25834. "enum": ["model-switched"]
  25835. },
  25836. "model": {
  25837. "type": "object",
  25838. "properties": {
  25839. "id": {
  25840. "type": "string"
  25841. },
  25842. "providerID": {
  25843. "type": "string"
  25844. },
  25845. "variant": {
  25846. "type": "string"
  25847. }
  25848. },
  25849. "required": ["id", "providerID"],
  25850. "additionalProperties": false
  25851. }
  25852. },
  25853. "required": ["id", "time", "type", "model"],
  25854. "additionalProperties": false
  25855. },
  25856. "SessionMessageUser": {
  25857. "type": "object",
  25858. "properties": {
  25859. "id": {
  25860. "type": "string",
  25861. "pattern": "^msg_"
  25862. },
  25863. "metadata": {
  25864. "type": "object"
  25865. },
  25866. "time": {
  25867. "type": "object",
  25868. "properties": {
  25869. "created": {
  25870. "type": "number"
  25871. }
  25872. },
  25873. "required": ["created"],
  25874. "additionalProperties": false
  25875. },
  25876. "text": {
  25877. "type": "string"
  25878. },
  25879. "files": {
  25880. "type": "array",
  25881. "items": {
  25882. "$ref": "#/components/schemas/PromptFileAttachment"
  25883. }
  25884. },
  25885. "agents": {
  25886. "type": "array",
  25887. "items": {
  25888. "$ref": "#/components/schemas/PromptAgentAttachment"
  25889. }
  25890. },
  25891. "type": {
  25892. "type": "string",
  25893. "enum": ["user"]
  25894. }
  25895. },
  25896. "required": ["id", "time", "text", "type"],
  25897. "additionalProperties": false
  25898. },
  25899. "SessionMessageSynthetic": {
  25900. "type": "object",
  25901. "properties": {
  25902. "id": {
  25903. "type": "string",
  25904. "pattern": "^msg_"
  25905. },
  25906. "metadata": {
  25907. "type": "object"
  25908. },
  25909. "time": {
  25910. "type": "object",
  25911. "properties": {
  25912. "created": {
  25913. "type": "number"
  25914. }
  25915. },
  25916. "required": ["created"],
  25917. "additionalProperties": false
  25918. },
  25919. "sessionID": {
  25920. "type": "string",
  25921. "pattern": "^ses"
  25922. },
  25923. "text": {
  25924. "type": "string"
  25925. },
  25926. "type": {
  25927. "type": "string",
  25928. "enum": ["synthetic"]
  25929. }
  25930. },
  25931. "required": ["id", "time", "sessionID", "text", "type"],
  25932. "additionalProperties": false
  25933. },
  25934. "SessionMessageSystem": {
  25935. "type": "object",
  25936. "properties": {
  25937. "id": {
  25938. "type": "string",
  25939. "pattern": "^msg_"
  25940. },
  25941. "metadata": {
  25942. "type": "object"
  25943. },
  25944. "time": {
  25945. "type": "object",
  25946. "properties": {
  25947. "created": {
  25948. "type": "number"
  25949. }
  25950. },
  25951. "required": ["created"],
  25952. "additionalProperties": false
  25953. },
  25954. "type": {
  25955. "type": "string",
  25956. "enum": ["system"]
  25957. },
  25958. "text": {
  25959. "type": "string"
  25960. }
  25961. },
  25962. "required": ["id", "time", "type", "text"],
  25963. "additionalProperties": false
  25964. },
  25965. "SessionMessageShell": {
  25966. "type": "object",
  25967. "properties": {
  25968. "id": {
  25969. "type": "string",
  25970. "pattern": "^msg_"
  25971. },
  25972. "metadata": {
  25973. "type": "object"
  25974. },
  25975. "time": {
  25976. "type": "object",
  25977. "properties": {
  25978. "created": {
  25979. "type": "number"
  25980. },
  25981. "completed": {
  25982. "type": "number"
  25983. }
  25984. },
  25985. "required": ["created"],
  25986. "additionalProperties": false
  25987. },
  25988. "type": {
  25989. "type": "string",
  25990. "enum": ["shell"]
  25991. },
  25992. "callID": {
  25993. "type": "string"
  25994. },
  25995. "command": {
  25996. "type": "string"
  25997. },
  25998. "output": {
  25999. "type": "string"
  26000. }
  26001. },
  26002. "required": ["id", "time", "type", "callID", "command", "output"],
  26003. "additionalProperties": false
  26004. },
  26005. "SessionMessageAssistantText": {
  26006. "type": "object",
  26007. "properties": {
  26008. "type": {
  26009. "type": "string",
  26010. "enum": ["text"]
  26011. },
  26012. "id": {
  26013. "type": "string"
  26014. },
  26015. "text": {
  26016. "type": "string"
  26017. }
  26018. },
  26019. "required": ["type", "id", "text"],
  26020. "additionalProperties": false
  26021. },
  26022. "SessionMessageAssistantReasoning": {
  26023. "type": "object",
  26024. "properties": {
  26025. "type": {
  26026. "type": "string",
  26027. "enum": ["reasoning"]
  26028. },
  26029. "id": {
  26030. "type": "string"
  26031. },
  26032. "text": {
  26033. "type": "string"
  26034. },
  26035. "providerMetadata": {
  26036. "type": "object",
  26037. "additionalProperties": {
  26038. "type": "object"
  26039. }
  26040. }
  26041. },
  26042. "required": ["type", "id", "text"],
  26043. "additionalProperties": false
  26044. },
  26045. "SessionMessageToolStatePending": {
  26046. "type": "object",
  26047. "properties": {
  26048. "status": {
  26049. "type": "string",
  26050. "enum": ["pending"]
  26051. },
  26052. "input": {
  26053. "type": "string"
  26054. }
  26055. },
  26056. "required": ["status", "input"],
  26057. "additionalProperties": false
  26058. },
  26059. "SessionMessageToolStateRunning": {
  26060. "type": "object",
  26061. "properties": {
  26062. "status": {
  26063. "type": "string",
  26064. "enum": ["running"]
  26065. },
  26066. "input": {
  26067. "type": "object"
  26068. },
  26069. "structured": {
  26070. "type": "object"
  26071. },
  26072. "content": {
  26073. "type": "array",
  26074. "items": {
  26075. "anyOf": [
  26076. {
  26077. "$ref": "#/components/schemas/ToolTextContent"
  26078. },
  26079. {
  26080. "$ref": "#/components/schemas/ToolFileContent"
  26081. }
  26082. ]
  26083. }
  26084. }
  26085. },
  26086. "required": ["status", "input", "structured", "content"],
  26087. "additionalProperties": false
  26088. },
  26089. "SessionMessageToolStateCompleted": {
  26090. "type": "object",
  26091. "properties": {
  26092. "status": {
  26093. "type": "string",
  26094. "enum": ["completed"]
  26095. },
  26096. "input": {
  26097. "type": "object"
  26098. },
  26099. "attachments": {
  26100. "type": "array",
  26101. "items": {
  26102. "$ref": "#/components/schemas/PromptFileAttachment"
  26103. }
  26104. },
  26105. "content": {
  26106. "type": "array",
  26107. "items": {
  26108. "anyOf": [
  26109. {
  26110. "$ref": "#/components/schemas/ToolTextContent"
  26111. },
  26112. {
  26113. "$ref": "#/components/schemas/ToolFileContent"
  26114. }
  26115. ]
  26116. }
  26117. },
  26118. "outputPaths": {
  26119. "type": "array",
  26120. "items": {
  26121. "type": "string"
  26122. }
  26123. },
  26124. "structured": {
  26125. "type": "object"
  26126. },
  26127. "result": {}
  26128. },
  26129. "required": ["status", "input", "content", "structured"],
  26130. "additionalProperties": false
  26131. },
  26132. "SessionMessageToolStateError": {
  26133. "type": "object",
  26134. "properties": {
  26135. "status": {
  26136. "type": "string",
  26137. "enum": ["error"]
  26138. },
  26139. "input": {
  26140. "type": "object"
  26141. },
  26142. "content": {
  26143. "type": "array",
  26144. "items": {
  26145. "anyOf": [
  26146. {
  26147. "$ref": "#/components/schemas/ToolTextContent"
  26148. },
  26149. {
  26150. "$ref": "#/components/schemas/ToolFileContent"
  26151. }
  26152. ]
  26153. }
  26154. },
  26155. "structured": {
  26156. "type": "object"
  26157. },
  26158. "error": {
  26159. "$ref": "#/components/schemas/SessionErrorUnknown"
  26160. },
  26161. "result": {}
  26162. },
  26163. "required": ["status", "input", "content", "structured", "error"],
  26164. "additionalProperties": false
  26165. },
  26166. "SessionMessageAssistantTool": {
  26167. "type": "object",
  26168. "properties": {
  26169. "type": {
  26170. "type": "string",
  26171. "enum": ["tool"]
  26172. },
  26173. "id": {
  26174. "type": "string"
  26175. },
  26176. "name": {
  26177. "type": "string"
  26178. },
  26179. "provider": {
  26180. "type": "object",
  26181. "properties": {
  26182. "executed": {
  26183. "type": "boolean"
  26184. },
  26185. "metadata": {
  26186. "type": "object",
  26187. "additionalProperties": {
  26188. "type": "object"
  26189. }
  26190. },
  26191. "resultMetadata": {
  26192. "type": "object",
  26193. "additionalProperties": {
  26194. "type": "object"
  26195. }
  26196. }
  26197. },
  26198. "required": ["executed"],
  26199. "additionalProperties": false
  26200. },
  26201. "state": {
  26202. "anyOf": [
  26203. {
  26204. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  26205. },
  26206. {
  26207. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  26208. },
  26209. {
  26210. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  26211. },
  26212. {
  26213. "$ref": "#/components/schemas/SessionMessageToolStateError"
  26214. }
  26215. ]
  26216. },
  26217. "time": {
  26218. "type": "object",
  26219. "properties": {
  26220. "created": {
  26221. "type": "number"
  26222. },
  26223. "ran": {
  26224. "type": "number"
  26225. },
  26226. "completed": {
  26227. "type": "number"
  26228. },
  26229. "pruned": {
  26230. "type": "number"
  26231. }
  26232. },
  26233. "required": ["created"],
  26234. "additionalProperties": false
  26235. }
  26236. },
  26237. "required": ["type", "id", "name", "state", "time"],
  26238. "additionalProperties": false
  26239. },
  26240. "SessionMessageAssistant": {
  26241. "type": "object",
  26242. "properties": {
  26243. "id": {
  26244. "type": "string",
  26245. "pattern": "^msg_"
  26246. },
  26247. "metadata": {
  26248. "type": "object"
  26249. },
  26250. "time": {
  26251. "type": "object",
  26252. "properties": {
  26253. "created": {
  26254. "type": "number"
  26255. },
  26256. "completed": {
  26257. "type": "number"
  26258. }
  26259. },
  26260. "required": ["created"],
  26261. "additionalProperties": false
  26262. },
  26263. "type": {
  26264. "type": "string",
  26265. "enum": ["assistant"]
  26266. },
  26267. "agent": {
  26268. "type": "string"
  26269. },
  26270. "model": {
  26271. "type": "object",
  26272. "properties": {
  26273. "id": {
  26274. "type": "string"
  26275. },
  26276. "providerID": {
  26277. "type": "string"
  26278. },
  26279. "variant": {
  26280. "type": "string"
  26281. }
  26282. },
  26283. "required": ["id", "providerID"],
  26284. "additionalProperties": false
  26285. },
  26286. "content": {
  26287. "type": "array",
  26288. "items": {
  26289. "anyOf": [
  26290. {
  26291. "$ref": "#/components/schemas/SessionMessageAssistantText"
  26292. },
  26293. {
  26294. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  26295. },
  26296. {
  26297. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  26298. }
  26299. ]
  26300. }
  26301. },
  26302. "snapshot": {
  26303. "type": "object",
  26304. "properties": {
  26305. "start": {
  26306. "type": "string"
  26307. },
  26308. "end": {
  26309. "type": "string"
  26310. }
  26311. },
  26312. "additionalProperties": false
  26313. },
  26314. "finish": {
  26315. "type": "string"
  26316. },
  26317. "cost": {
  26318. "type": "number"
  26319. },
  26320. "tokens": {
  26321. "type": "object",
  26322. "properties": {
  26323. "input": {
  26324. "type": "number"
  26325. },
  26326. "output": {
  26327. "type": "number"
  26328. },
  26329. "reasoning": {
  26330. "type": "number"
  26331. },
  26332. "cache": {
  26333. "type": "object",
  26334. "properties": {
  26335. "read": {
  26336. "type": "number"
  26337. },
  26338. "write": {
  26339. "type": "number"
  26340. }
  26341. },
  26342. "required": ["read", "write"],
  26343. "additionalProperties": false
  26344. }
  26345. },
  26346. "required": ["input", "output", "reasoning", "cache"],
  26347. "additionalProperties": false
  26348. },
  26349. "error": {
  26350. "$ref": "#/components/schemas/SessionErrorUnknown"
  26351. }
  26352. },
  26353. "required": ["id", "time", "type", "agent", "model", "content"],
  26354. "additionalProperties": false
  26355. },
  26356. "SessionMessageCompaction": {
  26357. "type": "object",
  26358. "properties": {
  26359. "type": {
  26360. "type": "string",
  26361. "enum": ["compaction"]
  26362. },
  26363. "reason": {
  26364. "type": "string",
  26365. "enum": ["auto", "manual"]
  26366. },
  26367. "summary": {
  26368. "type": "string"
  26369. },
  26370. "recent": {
  26371. "type": "string"
  26372. },
  26373. "id": {
  26374. "type": "string",
  26375. "pattern": "^msg_"
  26376. },
  26377. "metadata": {
  26378. "type": "object"
  26379. },
  26380. "time": {
  26381. "type": "object",
  26382. "properties": {
  26383. "created": {
  26384. "type": "number"
  26385. }
  26386. },
  26387. "required": ["created"],
  26388. "additionalProperties": false
  26389. }
  26390. },
  26391. "required": ["type", "reason", "summary", "recent", "id", "time"],
  26392. "additionalProperties": false
  26393. },
  26394. "SessionMessage": {
  26395. "anyOf": [
  26396. {
  26397. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  26398. },
  26399. {
  26400. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  26401. },
  26402. {
  26403. "$ref": "#/components/schemas/SessionMessageUser"
  26404. },
  26405. {
  26406. "$ref": "#/components/schemas/SessionMessageSynthetic"
  26407. },
  26408. {
  26409. "$ref": "#/components/schemas/SessionMessageSystem"
  26410. },
  26411. {
  26412. "$ref": "#/components/schemas/SessionMessageShell"
  26413. },
  26414. {
  26415. "$ref": "#/components/schemas/SessionMessageAssistant"
  26416. },
  26417. {
  26418. "$ref": "#/components/schemas/SessionMessageCompaction"
  26419. }
  26420. ]
  26421. },
  26422. "ModelV2Info": {
  26423. "type": "object",
  26424. "properties": {
  26425. "id": {
  26426. "type": "string"
  26427. },
  26428. "providerID": {
  26429. "type": "string"
  26430. },
  26431. "family": {
  26432. "type": "string"
  26433. },
  26434. "name": {
  26435. "type": "string"
  26436. },
  26437. "api": {
  26438. "anyOf": [
  26439. {
  26440. "type": "object",
  26441. "properties": {
  26442. "id": {
  26443. "type": "string"
  26444. },
  26445. "type": {
  26446. "type": "string",
  26447. "enum": ["aisdk"]
  26448. },
  26449. "package": {
  26450. "type": "string"
  26451. },
  26452. "url": {
  26453. "type": "string"
  26454. },
  26455. "settings": {
  26456. "type": "object"
  26457. }
  26458. },
  26459. "required": ["id", "type", "package"],
  26460. "additionalProperties": false
  26461. },
  26462. {
  26463. "type": "object",
  26464. "properties": {
  26465. "id": {
  26466. "type": "string"
  26467. },
  26468. "type": {
  26469. "type": "string",
  26470. "enum": ["native"]
  26471. },
  26472. "url": {
  26473. "type": "string"
  26474. },
  26475. "settings": {
  26476. "type": "object"
  26477. }
  26478. },
  26479. "required": ["id", "type", "settings"],
  26480. "additionalProperties": false
  26481. }
  26482. ]
  26483. },
  26484. "capabilities": {
  26485. "type": "object",
  26486. "properties": {
  26487. "tools": {
  26488. "type": "boolean"
  26489. },
  26490. "input": {
  26491. "type": "array",
  26492. "items": {
  26493. "type": "string"
  26494. }
  26495. },
  26496. "output": {
  26497. "type": "array",
  26498. "items": {
  26499. "type": "string"
  26500. }
  26501. }
  26502. },
  26503. "required": ["tools", "input", "output"],
  26504. "additionalProperties": false
  26505. },
  26506. "request": {
  26507. "type": "object",
  26508. "properties": {
  26509. "headers": {
  26510. "type": "object",
  26511. "additionalProperties": {
  26512. "type": "string"
  26513. }
  26514. },
  26515. "body": {
  26516. "type": "object"
  26517. },
  26518. "generation": {
  26519. "type": "object",
  26520. "properties": {
  26521. "maxTokens": {
  26522. "anyOf": [
  26523. {
  26524. "type": "number"
  26525. },
  26526. {
  26527. "type": "string",
  26528. "enum": ["NaN"]
  26529. },
  26530. {
  26531. "type": "string",
  26532. "enum": ["Infinity"]
  26533. },
  26534. {
  26535. "type": "string",
  26536. "enum": ["-Infinity"]
  26537. },
  26538. {
  26539. "type": "string",
  26540. "enum": ["Infinity", "-Infinity", "NaN"]
  26541. }
  26542. ]
  26543. },
  26544. "temperature": {
  26545. "anyOf": [
  26546. {
  26547. "type": "number"
  26548. },
  26549. {
  26550. "type": "string",
  26551. "enum": ["NaN"]
  26552. },
  26553. {
  26554. "type": "string",
  26555. "enum": ["Infinity"]
  26556. },
  26557. {
  26558. "type": "string",
  26559. "enum": ["-Infinity"]
  26560. },
  26561. {
  26562. "type": "string",
  26563. "enum": ["Infinity", "-Infinity", "NaN"]
  26564. }
  26565. ]
  26566. },
  26567. "topP": {
  26568. "anyOf": [
  26569. {
  26570. "type": "number"
  26571. },
  26572. {
  26573. "type": "string",
  26574. "enum": ["NaN"]
  26575. },
  26576. {
  26577. "type": "string",
  26578. "enum": ["Infinity"]
  26579. },
  26580. {
  26581. "type": "string",
  26582. "enum": ["-Infinity"]
  26583. },
  26584. {
  26585. "type": "string",
  26586. "enum": ["Infinity", "-Infinity", "NaN"]
  26587. }
  26588. ]
  26589. },
  26590. "topK": {
  26591. "anyOf": [
  26592. {
  26593. "type": "number"
  26594. },
  26595. {
  26596. "type": "string",
  26597. "enum": ["NaN"]
  26598. },
  26599. {
  26600. "type": "string",
  26601. "enum": ["Infinity"]
  26602. },
  26603. {
  26604. "type": "string",
  26605. "enum": ["-Infinity"]
  26606. },
  26607. {
  26608. "type": "string",
  26609. "enum": ["Infinity", "-Infinity", "NaN"]
  26610. }
  26611. ]
  26612. },
  26613. "frequencyPenalty": {
  26614. "anyOf": [
  26615. {
  26616. "type": "number"
  26617. },
  26618. {
  26619. "type": "string",
  26620. "enum": ["NaN"]
  26621. },
  26622. {
  26623. "type": "string",
  26624. "enum": ["Infinity"]
  26625. },
  26626. {
  26627. "type": "string",
  26628. "enum": ["-Infinity"]
  26629. },
  26630. {
  26631. "type": "string",
  26632. "enum": ["Infinity", "-Infinity", "NaN"]
  26633. }
  26634. ]
  26635. },
  26636. "presencePenalty": {
  26637. "anyOf": [
  26638. {
  26639. "type": "number"
  26640. },
  26641. {
  26642. "type": "string",
  26643. "enum": ["NaN"]
  26644. },
  26645. {
  26646. "type": "string",
  26647. "enum": ["Infinity"]
  26648. },
  26649. {
  26650. "type": "string",
  26651. "enum": ["-Infinity"]
  26652. },
  26653. {
  26654. "type": "string",
  26655. "enum": ["Infinity", "-Infinity", "NaN"]
  26656. }
  26657. ]
  26658. },
  26659. "seed": {
  26660. "anyOf": [
  26661. {
  26662. "type": "number"
  26663. },
  26664. {
  26665. "type": "string",
  26666. "enum": ["NaN"]
  26667. },
  26668. {
  26669. "type": "string",
  26670. "enum": ["Infinity"]
  26671. },
  26672. {
  26673. "type": "string",
  26674. "enum": ["-Infinity"]
  26675. },
  26676. {
  26677. "type": "string",
  26678. "enum": ["Infinity", "-Infinity", "NaN"]
  26679. }
  26680. ]
  26681. },
  26682. "stop": {
  26683. "type": "array",
  26684. "items": {
  26685. "type": "string"
  26686. }
  26687. }
  26688. },
  26689. "additionalProperties": false
  26690. },
  26691. "options": {
  26692. "type": "object"
  26693. },
  26694. "variant": {
  26695. "type": "string"
  26696. }
  26697. },
  26698. "required": ["headers", "body"],
  26699. "additionalProperties": false
  26700. },
  26701. "variants": {
  26702. "type": "array",
  26703. "items": {
  26704. "type": "object",
  26705. "properties": {
  26706. "id": {
  26707. "type": "string"
  26708. },
  26709. "headers": {
  26710. "type": "object",
  26711. "additionalProperties": {
  26712. "type": "string"
  26713. }
  26714. },
  26715. "body": {
  26716. "type": "object"
  26717. },
  26718. "generation": {
  26719. "type": "object",
  26720. "properties": {
  26721. "maxTokens": {
  26722. "anyOf": [
  26723. {
  26724. "type": "number"
  26725. },
  26726. {
  26727. "type": "string",
  26728. "enum": ["NaN"]
  26729. },
  26730. {
  26731. "type": "string",
  26732. "enum": ["Infinity"]
  26733. },
  26734. {
  26735. "type": "string",
  26736. "enum": ["-Infinity"]
  26737. },
  26738. {
  26739. "type": "string",
  26740. "enum": ["Infinity", "-Infinity", "NaN"]
  26741. }
  26742. ]
  26743. },
  26744. "temperature": {
  26745. "anyOf": [
  26746. {
  26747. "type": "number"
  26748. },
  26749. {
  26750. "type": "string",
  26751. "enum": ["NaN"]
  26752. },
  26753. {
  26754. "type": "string",
  26755. "enum": ["Infinity"]
  26756. },
  26757. {
  26758. "type": "string",
  26759. "enum": ["-Infinity"]
  26760. },
  26761. {
  26762. "type": "string",
  26763. "enum": ["Infinity", "-Infinity", "NaN"]
  26764. }
  26765. ]
  26766. },
  26767. "topP": {
  26768. "anyOf": [
  26769. {
  26770. "type": "number"
  26771. },
  26772. {
  26773. "type": "string",
  26774. "enum": ["NaN"]
  26775. },
  26776. {
  26777. "type": "string",
  26778. "enum": ["Infinity"]
  26779. },
  26780. {
  26781. "type": "string",
  26782. "enum": ["-Infinity"]
  26783. },
  26784. {
  26785. "type": "string",
  26786. "enum": ["Infinity", "-Infinity", "NaN"]
  26787. }
  26788. ]
  26789. },
  26790. "topK": {
  26791. "anyOf": [
  26792. {
  26793. "type": "number"
  26794. },
  26795. {
  26796. "type": "string",
  26797. "enum": ["NaN"]
  26798. },
  26799. {
  26800. "type": "string",
  26801. "enum": ["Infinity"]
  26802. },
  26803. {
  26804. "type": "string",
  26805. "enum": ["-Infinity"]
  26806. },
  26807. {
  26808. "type": "string",
  26809. "enum": ["Infinity", "-Infinity", "NaN"]
  26810. }
  26811. ]
  26812. },
  26813. "frequencyPenalty": {
  26814. "anyOf": [
  26815. {
  26816. "type": "number"
  26817. },
  26818. {
  26819. "type": "string",
  26820. "enum": ["NaN"]
  26821. },
  26822. {
  26823. "type": "string",
  26824. "enum": ["Infinity"]
  26825. },
  26826. {
  26827. "type": "string",
  26828. "enum": ["-Infinity"]
  26829. },
  26830. {
  26831. "type": "string",
  26832. "enum": ["Infinity", "-Infinity", "NaN"]
  26833. }
  26834. ]
  26835. },
  26836. "presencePenalty": {
  26837. "anyOf": [
  26838. {
  26839. "type": "number"
  26840. },
  26841. {
  26842. "type": "string",
  26843. "enum": ["NaN"]
  26844. },
  26845. {
  26846. "type": "string",
  26847. "enum": ["Infinity"]
  26848. },
  26849. {
  26850. "type": "string",
  26851. "enum": ["-Infinity"]
  26852. },
  26853. {
  26854. "type": "string",
  26855. "enum": ["Infinity", "-Infinity", "NaN"]
  26856. }
  26857. ]
  26858. },
  26859. "seed": {
  26860. "anyOf": [
  26861. {
  26862. "type": "number"
  26863. },
  26864. {
  26865. "type": "string",
  26866. "enum": ["NaN"]
  26867. },
  26868. {
  26869. "type": "string",
  26870. "enum": ["Infinity"]
  26871. },
  26872. {
  26873. "type": "string",
  26874. "enum": ["-Infinity"]
  26875. },
  26876. {
  26877. "type": "string",
  26878. "enum": ["Infinity", "-Infinity", "NaN"]
  26879. }
  26880. ]
  26881. },
  26882. "stop": {
  26883. "type": "array",
  26884. "items": {
  26885. "type": "string"
  26886. }
  26887. }
  26888. },
  26889. "additionalProperties": false
  26890. },
  26891. "options": {
  26892. "type": "object"
  26893. }
  26894. },
  26895. "required": ["id", "headers", "body"],
  26896. "additionalProperties": false
  26897. }
  26898. },
  26899. "time": {
  26900. "type": "object",
  26901. "properties": {
  26902. "released": {
  26903. "anyOf": [
  26904. {
  26905. "type": "number"
  26906. },
  26907. {
  26908. "type": "string",
  26909. "enum": ["NaN"]
  26910. },
  26911. {
  26912. "type": "string",
  26913. "enum": ["Infinity"]
  26914. },
  26915. {
  26916. "type": "string",
  26917. "enum": ["-Infinity"]
  26918. },
  26919. {
  26920. "type": "string",
  26921. "enum": ["Infinity", "-Infinity", "NaN"]
  26922. }
  26923. ]
  26924. }
  26925. },
  26926. "required": ["released"],
  26927. "additionalProperties": false
  26928. },
  26929. "cost": {
  26930. "type": "array",
  26931. "items": {
  26932. "type": "object",
  26933. "properties": {
  26934. "tier": {
  26935. "type": "object",
  26936. "properties": {
  26937. "type": {
  26938. "type": "string",
  26939. "enum": ["context"]
  26940. },
  26941. "size": {
  26942. "type": "integer"
  26943. }
  26944. },
  26945. "required": ["type", "size"],
  26946. "additionalProperties": false
  26947. },
  26948. "input": {
  26949. "type": "number"
  26950. },
  26951. "output": {
  26952. "type": "number"
  26953. },
  26954. "cache": {
  26955. "type": "object",
  26956. "properties": {
  26957. "read": {
  26958. "type": "number"
  26959. },
  26960. "write": {
  26961. "type": "number"
  26962. }
  26963. },
  26964. "required": ["read", "write"],
  26965. "additionalProperties": false
  26966. }
  26967. },
  26968. "required": ["input", "output", "cache"],
  26969. "additionalProperties": false
  26970. }
  26971. },
  26972. "status": {
  26973. "type": "string",
  26974. "enum": ["alpha", "beta", "deprecated", "active"]
  26975. },
  26976. "enabled": {
  26977. "type": "boolean"
  26978. },
  26979. "limit": {
  26980. "type": "object",
  26981. "properties": {
  26982. "context": {
  26983. "type": "integer"
  26984. },
  26985. "input": {
  26986. "type": "integer"
  26987. },
  26988. "output": {
  26989. "type": "integer"
  26990. }
  26991. },
  26992. "required": ["context", "output"],
  26993. "additionalProperties": false
  26994. }
  26995. },
  26996. "required": [
  26997. "id",
  26998. "providerID",
  26999. "name",
  27000. "api",
  27001. "capabilities",
  27002. "request",
  27003. "variants",
  27004. "time",
  27005. "cost",
  27006. "status",
  27007. "enabled",
  27008. "limit"
  27009. ],
  27010. "additionalProperties": false
  27011. },
  27012. "ProviderV2Info": {
  27013. "type": "object",
  27014. "properties": {
  27015. "id": {
  27016. "type": "string"
  27017. },
  27018. "name": {
  27019. "type": "string"
  27020. },
  27021. "disabled": {
  27022. "type": "boolean"
  27023. },
  27024. "api": {
  27025. "anyOf": [
  27026. {
  27027. "type": "object",
  27028. "properties": {
  27029. "type": {
  27030. "type": "string",
  27031. "enum": ["aisdk"]
  27032. },
  27033. "package": {
  27034. "type": "string"
  27035. },
  27036. "url": {
  27037. "type": "string"
  27038. },
  27039. "settings": {
  27040. "type": "object"
  27041. }
  27042. },
  27043. "required": ["type", "package"],
  27044. "additionalProperties": false
  27045. },
  27046. {
  27047. "type": "object",
  27048. "properties": {
  27049. "type": {
  27050. "type": "string",
  27051. "enum": ["native"]
  27052. },
  27053. "url": {
  27054. "type": "string"
  27055. },
  27056. "settings": {
  27057. "type": "object"
  27058. }
  27059. },
  27060. "required": ["type", "settings"],
  27061. "additionalProperties": false
  27062. }
  27063. ]
  27064. },
  27065. "request": {
  27066. "type": "object",
  27067. "properties": {
  27068. "headers": {
  27069. "type": "object",
  27070. "additionalProperties": {
  27071. "type": "string"
  27072. }
  27073. },
  27074. "body": {
  27075. "type": "object"
  27076. }
  27077. },
  27078. "required": ["headers", "body"],
  27079. "additionalProperties": false
  27080. }
  27081. },
  27082. "required": ["id", "name", "api", "request"],
  27083. "additionalProperties": false
  27084. },
  27085. "IntegrationWhen": {
  27086. "type": "object",
  27087. "properties": {
  27088. "key": {
  27089. "type": "string"
  27090. },
  27091. "op": {
  27092. "type": "string",
  27093. "enum": ["eq", "neq"]
  27094. },
  27095. "value": {
  27096. "type": "string"
  27097. }
  27098. },
  27099. "required": ["key", "op", "value"],
  27100. "additionalProperties": false
  27101. },
  27102. "IntegrationTextPrompt": {
  27103. "type": "object",
  27104. "properties": {
  27105. "type": {
  27106. "type": "string",
  27107. "enum": ["text"]
  27108. },
  27109. "key": {
  27110. "type": "string"
  27111. },
  27112. "message": {
  27113. "type": "string"
  27114. },
  27115. "placeholder": {
  27116. "type": "string"
  27117. },
  27118. "when": {
  27119. "$ref": "#/components/schemas/IntegrationWhen"
  27120. }
  27121. },
  27122. "required": ["type", "key", "message"],
  27123. "additionalProperties": false
  27124. },
  27125. "IntegrationSelectPrompt": {
  27126. "type": "object",
  27127. "properties": {
  27128. "type": {
  27129. "type": "string",
  27130. "enum": ["select"]
  27131. },
  27132. "key": {
  27133. "type": "string"
  27134. },
  27135. "message": {
  27136. "type": "string"
  27137. },
  27138. "options": {
  27139. "type": "array",
  27140. "items": {
  27141. "type": "object",
  27142. "properties": {
  27143. "label": {
  27144. "type": "string"
  27145. },
  27146. "value": {
  27147. "type": "string"
  27148. },
  27149. "hint": {
  27150. "type": "string"
  27151. }
  27152. },
  27153. "required": ["label", "value"],
  27154. "additionalProperties": false
  27155. }
  27156. },
  27157. "when": {
  27158. "$ref": "#/components/schemas/IntegrationWhen"
  27159. }
  27160. },
  27161. "required": ["type", "key", "message", "options"],
  27162. "additionalProperties": false
  27163. },
  27164. "IntegrationOAuthMethod": {
  27165. "type": "object",
  27166. "properties": {
  27167. "id": {
  27168. "type": "string"
  27169. },
  27170. "type": {
  27171. "type": "string",
  27172. "enum": ["oauth"]
  27173. },
  27174. "label": {
  27175. "type": "string"
  27176. },
  27177. "prompts": {
  27178. "type": "array",
  27179. "items": {
  27180. "anyOf": [
  27181. {
  27182. "$ref": "#/components/schemas/IntegrationTextPrompt"
  27183. },
  27184. {
  27185. "$ref": "#/components/schemas/IntegrationSelectPrompt"
  27186. }
  27187. ]
  27188. }
  27189. }
  27190. },
  27191. "required": ["id", "type", "label"],
  27192. "additionalProperties": false
  27193. },
  27194. "IntegrationKeyMethod": {
  27195. "type": "object",
  27196. "properties": {
  27197. "type": {
  27198. "type": "string",
  27199. "enum": ["key"]
  27200. },
  27201. "label": {
  27202. "type": "string"
  27203. }
  27204. },
  27205. "required": ["type"],
  27206. "additionalProperties": false
  27207. },
  27208. "IntegrationEnvMethod": {
  27209. "type": "object",
  27210. "properties": {
  27211. "type": {
  27212. "type": "string",
  27213. "enum": ["env"]
  27214. },
  27215. "names": {
  27216. "type": "array",
  27217. "items": {
  27218. "type": "string"
  27219. }
  27220. }
  27221. },
  27222. "required": ["type", "names"],
  27223. "additionalProperties": false
  27224. },
  27225. "ConnectionCredentialInfo": {
  27226. "type": "object",
  27227. "properties": {
  27228. "type": {
  27229. "type": "string",
  27230. "enum": ["credential"]
  27231. },
  27232. "id": {
  27233. "type": "string"
  27234. },
  27235. "label": {
  27236. "type": "string"
  27237. }
  27238. },
  27239. "required": ["type", "id", "label"],
  27240. "additionalProperties": false
  27241. },
  27242. "ConnectionEnvInfo": {
  27243. "type": "object",
  27244. "properties": {
  27245. "type": {
  27246. "type": "string",
  27247. "enum": ["env"]
  27248. },
  27249. "name": {
  27250. "type": "string"
  27251. }
  27252. },
  27253. "required": ["type", "name"],
  27254. "additionalProperties": false
  27255. },
  27256. "ConnectionInfo": {
  27257. "anyOf": [
  27258. {
  27259. "$ref": "#/components/schemas/ConnectionCredentialInfo"
  27260. },
  27261. {
  27262. "$ref": "#/components/schemas/ConnectionEnvInfo"
  27263. }
  27264. ]
  27265. },
  27266. "IntegrationInfo": {
  27267. "type": "object",
  27268. "properties": {
  27269. "id": {
  27270. "type": "string"
  27271. },
  27272. "name": {
  27273. "type": "string"
  27274. },
  27275. "methods": {
  27276. "type": "array",
  27277. "items": {
  27278. "anyOf": [
  27279. {
  27280. "$ref": "#/components/schemas/IntegrationOAuthMethod"
  27281. },
  27282. {
  27283. "$ref": "#/components/schemas/IntegrationKeyMethod"
  27284. },
  27285. {
  27286. "$ref": "#/components/schemas/IntegrationEnvMethod"
  27287. }
  27288. ]
  27289. }
  27290. },
  27291. "connections": {
  27292. "type": "array",
  27293. "items": {
  27294. "$ref": "#/components/schemas/ConnectionInfo"
  27295. }
  27296. }
  27297. },
  27298. "required": ["id", "name", "methods", "connections"],
  27299. "additionalProperties": false
  27300. },
  27301. "IntegrationAttempt": {
  27302. "type": "object",
  27303. "properties": {
  27304. "attemptID": {
  27305. "type": "string"
  27306. },
  27307. "url": {
  27308. "type": "string"
  27309. },
  27310. "instructions": {
  27311. "type": "string"
  27312. },
  27313. "mode": {
  27314. "type": "string",
  27315. "enum": ["auto", "code"]
  27316. },
  27317. "time": {
  27318. "type": "object",
  27319. "properties": {
  27320. "created": {
  27321. "anyOf": [
  27322. {
  27323. "type": "number"
  27324. },
  27325. {
  27326. "type": "string",
  27327. "enum": ["NaN"]
  27328. },
  27329. {
  27330. "type": "string",
  27331. "enum": ["Infinity"]
  27332. },
  27333. {
  27334. "type": "string",
  27335. "enum": ["-Infinity"]
  27336. },
  27337. {
  27338. "type": "string",
  27339. "enum": ["Infinity", "-Infinity", "NaN"]
  27340. }
  27341. ]
  27342. },
  27343. "expires": {
  27344. "anyOf": [
  27345. {
  27346. "type": "number"
  27347. },
  27348. {
  27349. "type": "string",
  27350. "enum": ["NaN"]
  27351. },
  27352. {
  27353. "type": "string",
  27354. "enum": ["Infinity"]
  27355. },
  27356. {
  27357. "type": "string",
  27358. "enum": ["-Infinity"]
  27359. },
  27360. {
  27361. "type": "string",
  27362. "enum": ["Infinity", "-Infinity", "NaN"]
  27363. }
  27364. ]
  27365. }
  27366. },
  27367. "required": ["created", "expires"],
  27368. "additionalProperties": false
  27369. }
  27370. },
  27371. "required": ["attemptID", "url", "instructions", "mode", "time"],
  27372. "additionalProperties": false
  27373. },
  27374. "PermissionV2Request": {
  27375. "type": "object",
  27376. "properties": {
  27377. "id": {
  27378. "type": "string",
  27379. "pattern": "^per"
  27380. },
  27381. "sessionID": {
  27382. "type": "string",
  27383. "pattern": "^ses"
  27384. },
  27385. "action": {
  27386. "type": "string"
  27387. },
  27388. "resources": {
  27389. "type": "array",
  27390. "items": {
  27391. "type": "string"
  27392. }
  27393. },
  27394. "save": {
  27395. "type": "array",
  27396. "items": {
  27397. "type": "string"
  27398. }
  27399. },
  27400. "metadata": {
  27401. "type": "object"
  27402. },
  27403. "source": {
  27404. "$ref": "#/components/schemas/PermissionV2Source"
  27405. }
  27406. },
  27407. "required": ["id", "sessionID", "action", "resources"],
  27408. "additionalProperties": false
  27409. },
  27410. "PermissionSavedInfo": {
  27411. "type": "object",
  27412. "properties": {
  27413. "id": {
  27414. "type": "string"
  27415. },
  27416. "projectID": {
  27417. "type": "string"
  27418. },
  27419. "action": {
  27420. "type": "string"
  27421. },
  27422. "resource": {
  27423. "type": "string"
  27424. }
  27425. },
  27426. "required": ["id", "projectID", "action", "resource"],
  27427. "additionalProperties": false
  27428. },
  27429. "FileSystemEntry": {
  27430. "type": "object",
  27431. "properties": {
  27432. "path": {
  27433. "type": "string"
  27434. },
  27435. "type": {
  27436. "type": "string",
  27437. "enum": ["file", "directory"]
  27438. },
  27439. "mime": {
  27440. "type": "string"
  27441. }
  27442. },
  27443. "required": ["path", "type", "mime"],
  27444. "additionalProperties": false
  27445. },
  27446. "CommandV2Info": {
  27447. "type": "object",
  27448. "properties": {
  27449. "name": {
  27450. "type": "string"
  27451. },
  27452. "template": {
  27453. "type": "string"
  27454. },
  27455. "description": {
  27456. "type": "string"
  27457. },
  27458. "agent": {
  27459. "type": "string"
  27460. },
  27461. "model": {
  27462. "type": "object",
  27463. "properties": {
  27464. "id": {
  27465. "type": "string"
  27466. },
  27467. "providerID": {
  27468. "type": "string"
  27469. },
  27470. "variant": {
  27471. "type": "string"
  27472. }
  27473. },
  27474. "required": ["id", "providerID"],
  27475. "additionalProperties": false
  27476. },
  27477. "subtask": {
  27478. "type": "boolean"
  27479. }
  27480. },
  27481. "required": ["name", "template"],
  27482. "additionalProperties": false
  27483. },
  27484. "SkillV2Info": {
  27485. "type": "object",
  27486. "properties": {
  27487. "name": {
  27488. "type": "string"
  27489. },
  27490. "description": {
  27491. "type": "string"
  27492. },
  27493. "slash": {
  27494. "type": "boolean"
  27495. },
  27496. "location": {
  27497. "type": "string"
  27498. },
  27499. "content": {
  27500. "type": "string"
  27501. }
  27502. },
  27503. "required": ["name", "location", "content"],
  27504. "additionalProperties": false
  27505. },
  27506. "QuestionV2Request": {
  27507. "type": "object",
  27508. "properties": {
  27509. "id": {
  27510. "type": "string",
  27511. "pattern": "^que"
  27512. },
  27513. "sessionID": {
  27514. "type": "string",
  27515. "pattern": "^ses"
  27516. },
  27517. "questions": {
  27518. "type": "array",
  27519. "items": {
  27520. "$ref": "#/components/schemas/QuestionV2Info"
  27521. },
  27522. "description": "Questions to ask"
  27523. },
  27524. "tool": {
  27525. "$ref": "#/components/schemas/QuestionV2Tool"
  27526. }
  27527. },
  27528. "required": ["id", "sessionID", "questions"],
  27529. "additionalProperties": false
  27530. },
  27531. "QuestionV2Reply": {
  27532. "type": "object",
  27533. "properties": {
  27534. "answers": {
  27535. "type": "array",
  27536. "items": {
  27537. "$ref": "#/components/schemas/QuestionV2Answer"
  27538. },
  27539. "description": "User answers in order of questions (each answer is an array of selected labels)"
  27540. }
  27541. },
  27542. "required": ["answers"],
  27543. "additionalProperties": false
  27544. },
  27545. "ReferenceLocalSource": {
  27546. "type": "object",
  27547. "properties": {
  27548. "type": {
  27549. "type": "string",
  27550. "enum": ["local"]
  27551. },
  27552. "path": {
  27553. "type": "string"
  27554. },
  27555. "description": {
  27556. "type": "string"
  27557. },
  27558. "hidden": {
  27559. "type": "boolean"
  27560. }
  27561. },
  27562. "required": ["type", "path"],
  27563. "additionalProperties": false
  27564. },
  27565. "ReferenceGitSource": {
  27566. "type": "object",
  27567. "properties": {
  27568. "type": {
  27569. "type": "string",
  27570. "enum": ["git"]
  27571. },
  27572. "repository": {
  27573. "type": "string"
  27574. },
  27575. "branch": {
  27576. "type": "string"
  27577. },
  27578. "description": {
  27579. "type": "string"
  27580. },
  27581. "hidden": {
  27582. "type": "boolean"
  27583. }
  27584. },
  27585. "required": ["type", "repository"],
  27586. "additionalProperties": false
  27587. },
  27588. "ReferenceInfo": {
  27589. "type": "object",
  27590. "properties": {
  27591. "name": {
  27592. "type": "string"
  27593. },
  27594. "path": {
  27595. "type": "string"
  27596. },
  27597. "description": {
  27598. "type": "string"
  27599. },
  27600. "hidden": {
  27601. "type": "boolean"
  27602. },
  27603. "source": {
  27604. "anyOf": [
  27605. {
  27606. "$ref": "#/components/schemas/ReferenceLocalSource"
  27607. },
  27608. {
  27609. "$ref": "#/components/schemas/ReferenceGitSource"
  27610. }
  27611. ]
  27612. }
  27613. },
  27614. "required": ["name", "path", "source"],
  27615. "additionalProperties": false
  27616. },
  27617. "ProjectCopyCopy": {
  27618. "type": "object",
  27619. "properties": {
  27620. "directory": {
  27621. "type": "string"
  27622. }
  27623. },
  27624. "required": ["directory"],
  27625. "additionalProperties": false
  27626. },
  27627. "EventModels-devRefreshed": {
  27628. "type": "object",
  27629. "properties": {
  27630. "id": {
  27631. "type": "string",
  27632. "pattern": "^evt_"
  27633. },
  27634. "type": {
  27635. "type": "string",
  27636. "enum": ["models-dev.refreshed"]
  27637. },
  27638. "properties": {
  27639. "type": "object",
  27640. "properties": {}
  27641. }
  27642. },
  27643. "required": ["id", "type", "properties"],
  27644. "additionalProperties": false
  27645. },
  27646. "EventPluginAdded": {
  27647. "type": "object",
  27648. "properties": {
  27649. "id": {
  27650. "type": "string",
  27651. "pattern": "^evt_"
  27652. },
  27653. "type": {
  27654. "type": "string",
  27655. "enum": ["plugin.added"]
  27656. },
  27657. "properties": {
  27658. "type": "object",
  27659. "properties": {
  27660. "id": {
  27661. "type": "string"
  27662. }
  27663. },
  27664. "required": ["id"],
  27665. "additionalProperties": false
  27666. }
  27667. },
  27668. "required": ["id", "type", "properties"],
  27669. "additionalProperties": false
  27670. },
  27671. "EventIntegrationUpdated": {
  27672. "type": "object",
  27673. "properties": {
  27674. "id": {
  27675. "type": "string",
  27676. "pattern": "^evt_"
  27677. },
  27678. "type": {
  27679. "type": "string",
  27680. "enum": ["integration.updated"]
  27681. },
  27682. "properties": {
  27683. "type": "object",
  27684. "properties": {}
  27685. }
  27686. },
  27687. "required": ["id", "type", "properties"],
  27688. "additionalProperties": false
  27689. },
  27690. "EventCatalogUpdated": {
  27691. "type": "object",
  27692. "properties": {
  27693. "id": {
  27694. "type": "string",
  27695. "pattern": "^evt_"
  27696. },
  27697. "type": {
  27698. "type": "string",
  27699. "enum": ["catalog.updated"]
  27700. },
  27701. "properties": {
  27702. "type": "object",
  27703. "properties": {}
  27704. }
  27705. },
  27706. "required": ["id", "type", "properties"],
  27707. "additionalProperties": false
  27708. },
  27709. "EventSessionCreated": {
  27710. "type": "object",
  27711. "properties": {
  27712. "id": {
  27713. "type": "string",
  27714. "pattern": "^evt_"
  27715. },
  27716. "type": {
  27717. "type": "string",
  27718. "enum": ["session.created"]
  27719. },
  27720. "properties": {
  27721. "type": "object",
  27722. "properties": {
  27723. "sessionID": {
  27724. "type": "string",
  27725. "pattern": "^ses"
  27726. },
  27727. "info": {
  27728. "$ref": "#/components/schemas/Session"
  27729. }
  27730. },
  27731. "required": ["sessionID", "info"],
  27732. "additionalProperties": false
  27733. }
  27734. },
  27735. "required": ["id", "type", "properties"],
  27736. "additionalProperties": false
  27737. },
  27738. "EventSessionUpdated": {
  27739. "type": "object",
  27740. "properties": {
  27741. "id": {
  27742. "type": "string",
  27743. "pattern": "^evt_"
  27744. },
  27745. "type": {
  27746. "type": "string",
  27747. "enum": ["session.updated"]
  27748. },
  27749. "properties": {
  27750. "type": "object",
  27751. "properties": {
  27752. "sessionID": {
  27753. "type": "string",
  27754. "pattern": "^ses"
  27755. },
  27756. "info": {
  27757. "$ref": "#/components/schemas/Session"
  27758. }
  27759. },
  27760. "required": ["sessionID", "info"],
  27761. "additionalProperties": false
  27762. }
  27763. },
  27764. "required": ["id", "type", "properties"],
  27765. "additionalProperties": false
  27766. },
  27767. "EventSessionDeleted": {
  27768. "type": "object",
  27769. "properties": {
  27770. "id": {
  27771. "type": "string",
  27772. "pattern": "^evt_"
  27773. },
  27774. "type": {
  27775. "type": "string",
  27776. "enum": ["session.deleted"]
  27777. },
  27778. "properties": {
  27779. "type": "object",
  27780. "properties": {
  27781. "sessionID": {
  27782. "type": "string",
  27783. "pattern": "^ses"
  27784. },
  27785. "info": {
  27786. "$ref": "#/components/schemas/Session"
  27787. }
  27788. },
  27789. "required": ["sessionID", "info"],
  27790. "additionalProperties": false
  27791. }
  27792. },
  27793. "required": ["id", "type", "properties"],
  27794. "additionalProperties": false
  27795. },
  27796. "EventMessageUpdated": {
  27797. "type": "object",
  27798. "properties": {
  27799. "id": {
  27800. "type": "string",
  27801. "pattern": "^evt_"
  27802. },
  27803. "type": {
  27804. "type": "string",
  27805. "enum": ["message.updated"]
  27806. },
  27807. "properties": {
  27808. "type": "object",
  27809. "properties": {
  27810. "sessionID": {
  27811. "type": "string",
  27812. "pattern": "^ses"
  27813. },
  27814. "info": {
  27815. "$ref": "#/components/schemas/Message"
  27816. }
  27817. },
  27818. "required": ["sessionID", "info"],
  27819. "additionalProperties": false
  27820. }
  27821. },
  27822. "required": ["id", "type", "properties"],
  27823. "additionalProperties": false
  27824. },
  27825. "EventMessageRemoved": {
  27826. "type": "object",
  27827. "properties": {
  27828. "id": {
  27829. "type": "string",
  27830. "pattern": "^evt_"
  27831. },
  27832. "type": {
  27833. "type": "string",
  27834. "enum": ["message.removed"]
  27835. },
  27836. "properties": {
  27837. "type": "object",
  27838. "properties": {
  27839. "sessionID": {
  27840. "type": "string",
  27841. "pattern": "^ses"
  27842. },
  27843. "messageID": {
  27844. "type": "string",
  27845. "pattern": "^msg"
  27846. }
  27847. },
  27848. "required": ["sessionID", "messageID"],
  27849. "additionalProperties": false
  27850. }
  27851. },
  27852. "required": ["id", "type", "properties"],
  27853. "additionalProperties": false
  27854. },
  27855. "EventMessagePartUpdated": {
  27856. "type": "object",
  27857. "properties": {
  27858. "id": {
  27859. "type": "string",
  27860. "pattern": "^evt_"
  27861. },
  27862. "type": {
  27863. "type": "string",
  27864. "enum": ["message.part.updated"]
  27865. },
  27866. "properties": {
  27867. "type": "object",
  27868. "properties": {
  27869. "sessionID": {
  27870. "type": "string",
  27871. "pattern": "^ses"
  27872. },
  27873. "part": {
  27874. "$ref": "#/components/schemas/Part"
  27875. },
  27876. "time": {
  27877. "type": "number"
  27878. }
  27879. },
  27880. "required": ["sessionID", "part", "time"],
  27881. "additionalProperties": false
  27882. }
  27883. },
  27884. "required": ["id", "type", "properties"],
  27885. "additionalProperties": false
  27886. },
  27887. "EventMessagePartRemoved": {
  27888. "type": "object",
  27889. "properties": {
  27890. "id": {
  27891. "type": "string",
  27892. "pattern": "^evt_"
  27893. },
  27894. "type": {
  27895. "type": "string",
  27896. "enum": ["message.part.removed"]
  27897. },
  27898. "properties": {
  27899. "type": "object",
  27900. "properties": {
  27901. "sessionID": {
  27902. "type": "string",
  27903. "pattern": "^ses"
  27904. },
  27905. "messageID": {
  27906. "type": "string",
  27907. "pattern": "^msg"
  27908. },
  27909. "partID": {
  27910. "type": "string",
  27911. "pattern": "^prt"
  27912. }
  27913. },
  27914. "required": ["sessionID", "messageID", "partID"],
  27915. "additionalProperties": false
  27916. }
  27917. },
  27918. "required": ["id", "type", "properties"],
  27919. "additionalProperties": false
  27920. },
  27921. "EventSessionNextAgentSwitched": {
  27922. "type": "object",
  27923. "properties": {
  27924. "id": {
  27925. "type": "string",
  27926. "pattern": "^evt_"
  27927. },
  27928. "type": {
  27929. "type": "string",
  27930. "enum": ["session.next.agent.switched"]
  27931. },
  27932. "properties": {
  27933. "type": "object",
  27934. "properties": {
  27935. "timestamp": {
  27936. "type": "number"
  27937. },
  27938. "sessionID": {
  27939. "type": "string",
  27940. "pattern": "^ses"
  27941. },
  27942. "messageID": {
  27943. "type": "string",
  27944. "pattern": "^msg_"
  27945. },
  27946. "agent": {
  27947. "type": "string"
  27948. }
  27949. },
  27950. "required": ["timestamp", "sessionID", "messageID", "agent"],
  27951. "additionalProperties": false
  27952. }
  27953. },
  27954. "required": ["id", "type", "properties"],
  27955. "additionalProperties": false
  27956. },
  27957. "EventSessionNextModelSwitched": {
  27958. "type": "object",
  27959. "properties": {
  27960. "id": {
  27961. "type": "string",
  27962. "pattern": "^evt_"
  27963. },
  27964. "type": {
  27965. "type": "string",
  27966. "enum": ["session.next.model.switched"]
  27967. },
  27968. "properties": {
  27969. "type": "object",
  27970. "properties": {
  27971. "timestamp": {
  27972. "type": "number"
  27973. },
  27974. "sessionID": {
  27975. "type": "string",
  27976. "pattern": "^ses"
  27977. },
  27978. "messageID": {
  27979. "type": "string",
  27980. "pattern": "^msg_"
  27981. },
  27982. "model": {
  27983. "type": "object",
  27984. "properties": {
  27985. "id": {
  27986. "type": "string"
  27987. },
  27988. "providerID": {
  27989. "type": "string"
  27990. },
  27991. "variant": {
  27992. "type": "string"
  27993. }
  27994. },
  27995. "required": ["id", "providerID"],
  27996. "additionalProperties": false
  27997. }
  27998. },
  27999. "required": ["timestamp", "sessionID", "messageID", "model"],
  28000. "additionalProperties": false
  28001. }
  28002. },
  28003. "required": ["id", "type", "properties"],
  28004. "additionalProperties": false
  28005. },
  28006. "EventSessionNextMoved": {
  28007. "type": "object",
  28008. "properties": {
  28009. "id": {
  28010. "type": "string",
  28011. "pattern": "^evt_"
  28012. },
  28013. "type": {
  28014. "type": "string",
  28015. "enum": ["session.next.moved"]
  28016. },
  28017. "properties": {
  28018. "type": "object",
  28019. "properties": {
  28020. "timestamp": {
  28021. "type": "number"
  28022. },
  28023. "sessionID": {
  28024. "type": "string",
  28025. "pattern": "^ses"
  28026. },
  28027. "location": {
  28028. "$ref": "#/components/schemas/LocationRef"
  28029. },
  28030. "subdirectory": {
  28031. "type": "string"
  28032. }
  28033. },
  28034. "required": ["timestamp", "sessionID", "location"],
  28035. "additionalProperties": false
  28036. }
  28037. },
  28038. "required": ["id", "type", "properties"],
  28039. "additionalProperties": false
  28040. },
  28041. "EventSessionNextPrompted": {
  28042. "type": "object",
  28043. "properties": {
  28044. "id": {
  28045. "type": "string",
  28046. "pattern": "^evt_"
  28047. },
  28048. "type": {
  28049. "type": "string",
  28050. "enum": ["session.next.prompted"]
  28051. },
  28052. "properties": {
  28053. "type": "object",
  28054. "properties": {
  28055. "timestamp": {
  28056. "type": "number"
  28057. },
  28058. "sessionID": {
  28059. "type": "string",
  28060. "pattern": "^ses"
  28061. },
  28062. "messageID": {
  28063. "type": "string",
  28064. "pattern": "^msg_"
  28065. },
  28066. "prompt": {
  28067. "$ref": "#/components/schemas/Prompt"
  28068. },
  28069. "delivery": {
  28070. "type": "string",
  28071. "enum": ["steer", "queue"]
  28072. }
  28073. },
  28074. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28075. "additionalProperties": false
  28076. }
  28077. },
  28078. "required": ["id", "type", "properties"],
  28079. "additionalProperties": false
  28080. },
  28081. "EventSessionNextPromptAdmitted": {
  28082. "type": "object",
  28083. "properties": {
  28084. "id": {
  28085. "type": "string",
  28086. "pattern": "^evt_"
  28087. },
  28088. "type": {
  28089. "type": "string",
  28090. "enum": ["session.next.prompt.admitted"]
  28091. },
  28092. "properties": {
  28093. "type": "object",
  28094. "properties": {
  28095. "timestamp": {
  28096. "type": "number"
  28097. },
  28098. "sessionID": {
  28099. "type": "string",
  28100. "pattern": "^ses"
  28101. },
  28102. "messageID": {
  28103. "type": "string",
  28104. "pattern": "^msg_"
  28105. },
  28106. "prompt": {
  28107. "$ref": "#/components/schemas/Prompt"
  28108. },
  28109. "delivery": {
  28110. "type": "string",
  28111. "enum": ["steer", "queue"]
  28112. }
  28113. },
  28114. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28115. "additionalProperties": false
  28116. }
  28117. },
  28118. "required": ["id", "type", "properties"],
  28119. "additionalProperties": false
  28120. },
  28121. "EventSessionNextPromptPromoted": {
  28122. "type": "object",
  28123. "properties": {
  28124. "id": {
  28125. "type": "string",
  28126. "pattern": "^evt_"
  28127. },
  28128. "type": {
  28129. "type": "string",
  28130. "enum": ["session.next.prompt.promoted"]
  28131. },
  28132. "properties": {
  28133. "type": "object",
  28134. "properties": {
  28135. "timestamp": {
  28136. "type": "number"
  28137. },
  28138. "sessionID": {
  28139. "type": "string",
  28140. "pattern": "^ses"
  28141. },
  28142. "messageID": {
  28143. "type": "string",
  28144. "pattern": "^msg_"
  28145. },
  28146. "prompt": {
  28147. "$ref": "#/components/schemas/Prompt"
  28148. },
  28149. "timeCreated": {
  28150. "type": "number"
  28151. }
  28152. },
  28153. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  28154. "additionalProperties": false
  28155. }
  28156. },
  28157. "required": ["id", "type", "properties"],
  28158. "additionalProperties": false
  28159. },
  28160. "EventSessionNextInterruptRequested": {
  28161. "type": "object",
  28162. "properties": {
  28163. "id": {
  28164. "type": "string",
  28165. "pattern": "^evt_"
  28166. },
  28167. "type": {
  28168. "type": "string",
  28169. "enum": ["session.next.interrupt.requested"]
  28170. },
  28171. "properties": {
  28172. "type": "object",
  28173. "properties": {
  28174. "timestamp": {
  28175. "type": "number"
  28176. },
  28177. "sessionID": {
  28178. "type": "string",
  28179. "pattern": "^ses"
  28180. }
  28181. },
  28182. "required": ["timestamp", "sessionID"],
  28183. "additionalProperties": false
  28184. }
  28185. },
  28186. "required": ["id", "type", "properties"],
  28187. "additionalProperties": false
  28188. },
  28189. "EventSessionNextContextUpdated": {
  28190. "type": "object",
  28191. "properties": {
  28192. "id": {
  28193. "type": "string",
  28194. "pattern": "^evt_"
  28195. },
  28196. "type": {
  28197. "type": "string",
  28198. "enum": ["session.next.context.updated"]
  28199. },
  28200. "properties": {
  28201. "type": "object",
  28202. "properties": {
  28203. "timestamp": {
  28204. "type": "number"
  28205. },
  28206. "sessionID": {
  28207. "type": "string",
  28208. "pattern": "^ses"
  28209. },
  28210. "messageID": {
  28211. "type": "string",
  28212. "pattern": "^msg_"
  28213. },
  28214. "text": {
  28215. "type": "string"
  28216. }
  28217. },
  28218. "required": ["timestamp", "sessionID", "messageID", "text"],
  28219. "additionalProperties": false
  28220. }
  28221. },
  28222. "required": ["id", "type", "properties"],
  28223. "additionalProperties": false
  28224. },
  28225. "EventSessionNextSynthetic": {
  28226. "type": "object",
  28227. "properties": {
  28228. "id": {
  28229. "type": "string",
  28230. "pattern": "^evt_"
  28231. },
  28232. "type": {
  28233. "type": "string",
  28234. "enum": ["session.next.synthetic"]
  28235. },
  28236. "properties": {
  28237. "type": "object",
  28238. "properties": {
  28239. "timestamp": {
  28240. "type": "number"
  28241. },
  28242. "sessionID": {
  28243. "type": "string",
  28244. "pattern": "^ses"
  28245. },
  28246. "messageID": {
  28247. "type": "string",
  28248. "pattern": "^msg_"
  28249. },
  28250. "text": {
  28251. "type": "string"
  28252. }
  28253. },
  28254. "required": ["timestamp", "sessionID", "messageID", "text"],
  28255. "additionalProperties": false
  28256. }
  28257. },
  28258. "required": ["id", "type", "properties"],
  28259. "additionalProperties": false
  28260. },
  28261. "EventSessionNextShellStarted": {
  28262. "type": "object",
  28263. "properties": {
  28264. "id": {
  28265. "type": "string",
  28266. "pattern": "^evt_"
  28267. },
  28268. "type": {
  28269. "type": "string",
  28270. "enum": ["session.next.shell.started"]
  28271. },
  28272. "properties": {
  28273. "type": "object",
  28274. "properties": {
  28275. "timestamp": {
  28276. "type": "number"
  28277. },
  28278. "sessionID": {
  28279. "type": "string",
  28280. "pattern": "^ses"
  28281. },
  28282. "messageID": {
  28283. "type": "string",
  28284. "pattern": "^msg_"
  28285. },
  28286. "callID": {
  28287. "type": "string"
  28288. },
  28289. "command": {
  28290. "type": "string"
  28291. }
  28292. },
  28293. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  28294. "additionalProperties": false
  28295. }
  28296. },
  28297. "required": ["id", "type", "properties"],
  28298. "additionalProperties": false
  28299. },
  28300. "EventSessionNextShellEnded": {
  28301. "type": "object",
  28302. "properties": {
  28303. "id": {
  28304. "type": "string",
  28305. "pattern": "^evt_"
  28306. },
  28307. "type": {
  28308. "type": "string",
  28309. "enum": ["session.next.shell.ended"]
  28310. },
  28311. "properties": {
  28312. "type": "object",
  28313. "properties": {
  28314. "timestamp": {
  28315. "type": "number"
  28316. },
  28317. "sessionID": {
  28318. "type": "string",
  28319. "pattern": "^ses"
  28320. },
  28321. "callID": {
  28322. "type": "string"
  28323. },
  28324. "output": {
  28325. "type": "string"
  28326. }
  28327. },
  28328. "required": ["timestamp", "sessionID", "callID", "output"],
  28329. "additionalProperties": false
  28330. }
  28331. },
  28332. "required": ["id", "type", "properties"],
  28333. "additionalProperties": false
  28334. },
  28335. "EventSessionNextStepStarted": {
  28336. "type": "object",
  28337. "properties": {
  28338. "id": {
  28339. "type": "string",
  28340. "pattern": "^evt_"
  28341. },
  28342. "type": {
  28343. "type": "string",
  28344. "enum": ["session.next.step.started"]
  28345. },
  28346. "properties": {
  28347. "type": "object",
  28348. "properties": {
  28349. "timestamp": {
  28350. "type": "number"
  28351. },
  28352. "sessionID": {
  28353. "type": "string",
  28354. "pattern": "^ses"
  28355. },
  28356. "assistantMessageID": {
  28357. "type": "string",
  28358. "pattern": "^msg_"
  28359. },
  28360. "agent": {
  28361. "type": "string"
  28362. },
  28363. "model": {
  28364. "type": "object",
  28365. "properties": {
  28366. "id": {
  28367. "type": "string"
  28368. },
  28369. "providerID": {
  28370. "type": "string"
  28371. },
  28372. "variant": {
  28373. "type": "string"
  28374. }
  28375. },
  28376. "required": ["id", "providerID"],
  28377. "additionalProperties": false
  28378. },
  28379. "snapshot": {
  28380. "type": "string"
  28381. }
  28382. },
  28383. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  28384. "additionalProperties": false
  28385. }
  28386. },
  28387. "required": ["id", "type", "properties"],
  28388. "additionalProperties": false
  28389. },
  28390. "EventSessionNextStepEnded": {
  28391. "type": "object",
  28392. "properties": {
  28393. "id": {
  28394. "type": "string",
  28395. "pattern": "^evt_"
  28396. },
  28397. "type": {
  28398. "type": "string",
  28399. "enum": ["session.next.step.ended"]
  28400. },
  28401. "properties": {
  28402. "type": "object",
  28403. "properties": {
  28404. "timestamp": {
  28405. "type": "number"
  28406. },
  28407. "sessionID": {
  28408. "type": "string",
  28409. "pattern": "^ses"
  28410. },
  28411. "assistantMessageID": {
  28412. "type": "string",
  28413. "pattern": "^msg_"
  28414. },
  28415. "finish": {
  28416. "type": "string"
  28417. },
  28418. "cost": {
  28419. "type": "number"
  28420. },
  28421. "tokens": {
  28422. "type": "object",
  28423. "properties": {
  28424. "input": {
  28425. "type": "number"
  28426. },
  28427. "output": {
  28428. "type": "number"
  28429. },
  28430. "reasoning": {
  28431. "type": "number"
  28432. },
  28433. "cache": {
  28434. "type": "object",
  28435. "properties": {
  28436. "read": {
  28437. "type": "number"
  28438. },
  28439. "write": {
  28440. "type": "number"
  28441. }
  28442. },
  28443. "required": ["read", "write"],
  28444. "additionalProperties": false
  28445. }
  28446. },
  28447. "required": ["input", "output", "reasoning", "cache"],
  28448. "additionalProperties": false
  28449. },
  28450. "snapshot": {
  28451. "type": "string"
  28452. }
  28453. },
  28454. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  28455. "additionalProperties": false
  28456. }
  28457. },
  28458. "required": ["id", "type", "properties"],
  28459. "additionalProperties": false
  28460. },
  28461. "EventSessionNextStepFailed": {
  28462. "type": "object",
  28463. "properties": {
  28464. "id": {
  28465. "type": "string",
  28466. "pattern": "^evt_"
  28467. },
  28468. "type": {
  28469. "type": "string",
  28470. "enum": ["session.next.step.failed"]
  28471. },
  28472. "properties": {
  28473. "type": "object",
  28474. "properties": {
  28475. "timestamp": {
  28476. "type": "number"
  28477. },
  28478. "sessionID": {
  28479. "type": "string",
  28480. "pattern": "^ses"
  28481. },
  28482. "assistantMessageID": {
  28483. "type": "string",
  28484. "pattern": "^msg_"
  28485. },
  28486. "error": {
  28487. "$ref": "#/components/schemas/SessionErrorUnknown"
  28488. }
  28489. },
  28490. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  28491. "additionalProperties": false
  28492. }
  28493. },
  28494. "required": ["id", "type", "properties"],
  28495. "additionalProperties": false
  28496. },
  28497. "EventSessionNextTextStarted": {
  28498. "type": "object",
  28499. "properties": {
  28500. "id": {
  28501. "type": "string",
  28502. "pattern": "^evt_"
  28503. },
  28504. "type": {
  28505. "type": "string",
  28506. "enum": ["session.next.text.started"]
  28507. },
  28508. "properties": {
  28509. "type": "object",
  28510. "properties": {
  28511. "timestamp": {
  28512. "type": "number"
  28513. },
  28514. "sessionID": {
  28515. "type": "string",
  28516. "pattern": "^ses"
  28517. },
  28518. "assistantMessageID": {
  28519. "type": "string",
  28520. "pattern": "^msg_"
  28521. },
  28522. "textID": {
  28523. "type": "string"
  28524. }
  28525. },
  28526. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  28527. "additionalProperties": false
  28528. }
  28529. },
  28530. "required": ["id", "type", "properties"],
  28531. "additionalProperties": false
  28532. },
  28533. "EventSessionNextTextDelta": {
  28534. "type": "object",
  28535. "properties": {
  28536. "id": {
  28537. "type": "string",
  28538. "pattern": "^evt_"
  28539. },
  28540. "type": {
  28541. "type": "string",
  28542. "enum": ["session.next.text.delta"]
  28543. },
  28544. "properties": {
  28545. "type": "object",
  28546. "properties": {
  28547. "timestamp": {
  28548. "type": "number"
  28549. },
  28550. "sessionID": {
  28551. "type": "string",
  28552. "pattern": "^ses"
  28553. },
  28554. "assistantMessageID": {
  28555. "type": "string",
  28556. "pattern": "^msg_"
  28557. },
  28558. "textID": {
  28559. "type": "string"
  28560. },
  28561. "delta": {
  28562. "type": "string"
  28563. }
  28564. },
  28565. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  28566. "additionalProperties": false
  28567. }
  28568. },
  28569. "required": ["id", "type", "properties"],
  28570. "additionalProperties": false
  28571. },
  28572. "EventSessionNextTextEnded": {
  28573. "type": "object",
  28574. "properties": {
  28575. "id": {
  28576. "type": "string",
  28577. "pattern": "^evt_"
  28578. },
  28579. "type": {
  28580. "type": "string",
  28581. "enum": ["session.next.text.ended"]
  28582. },
  28583. "properties": {
  28584. "type": "object",
  28585. "properties": {
  28586. "timestamp": {
  28587. "type": "number"
  28588. },
  28589. "sessionID": {
  28590. "type": "string",
  28591. "pattern": "^ses"
  28592. },
  28593. "assistantMessageID": {
  28594. "type": "string",
  28595. "pattern": "^msg_"
  28596. },
  28597. "textID": {
  28598. "type": "string"
  28599. },
  28600. "text": {
  28601. "type": "string"
  28602. }
  28603. },
  28604. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  28605. "additionalProperties": false
  28606. }
  28607. },
  28608. "required": ["id", "type", "properties"],
  28609. "additionalProperties": false
  28610. },
  28611. "EventSessionNextReasoningStarted": {
  28612. "type": "object",
  28613. "properties": {
  28614. "id": {
  28615. "type": "string",
  28616. "pattern": "^evt_"
  28617. },
  28618. "type": {
  28619. "type": "string",
  28620. "enum": ["session.next.reasoning.started"]
  28621. },
  28622. "properties": {
  28623. "type": "object",
  28624. "properties": {
  28625. "timestamp": {
  28626. "type": "number"
  28627. },
  28628. "sessionID": {
  28629. "type": "string",
  28630. "pattern": "^ses"
  28631. },
  28632. "assistantMessageID": {
  28633. "type": "string",
  28634. "pattern": "^msg_"
  28635. },
  28636. "reasoningID": {
  28637. "type": "string"
  28638. },
  28639. "providerMetadata": {
  28640. "type": "object",
  28641. "additionalProperties": {
  28642. "type": "object"
  28643. }
  28644. }
  28645. },
  28646. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  28647. "additionalProperties": false
  28648. }
  28649. },
  28650. "required": ["id", "type", "properties"],
  28651. "additionalProperties": false
  28652. },
  28653. "EventSessionNextReasoningDelta": {
  28654. "type": "object",
  28655. "properties": {
  28656. "id": {
  28657. "type": "string",
  28658. "pattern": "^evt_"
  28659. },
  28660. "type": {
  28661. "type": "string",
  28662. "enum": ["session.next.reasoning.delta"]
  28663. },
  28664. "properties": {
  28665. "type": "object",
  28666. "properties": {
  28667. "timestamp": {
  28668. "type": "number"
  28669. },
  28670. "sessionID": {
  28671. "type": "string",
  28672. "pattern": "^ses"
  28673. },
  28674. "assistantMessageID": {
  28675. "type": "string",
  28676. "pattern": "^msg_"
  28677. },
  28678. "reasoningID": {
  28679. "type": "string"
  28680. },
  28681. "delta": {
  28682. "type": "string"
  28683. }
  28684. },
  28685. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  28686. "additionalProperties": false
  28687. }
  28688. },
  28689. "required": ["id", "type", "properties"],
  28690. "additionalProperties": false
  28691. },
  28692. "EventSessionNextReasoningEnded": {
  28693. "type": "object",
  28694. "properties": {
  28695. "id": {
  28696. "type": "string",
  28697. "pattern": "^evt_"
  28698. },
  28699. "type": {
  28700. "type": "string",
  28701. "enum": ["session.next.reasoning.ended"]
  28702. },
  28703. "properties": {
  28704. "type": "object",
  28705. "properties": {
  28706. "timestamp": {
  28707. "type": "number"
  28708. },
  28709. "sessionID": {
  28710. "type": "string",
  28711. "pattern": "^ses"
  28712. },
  28713. "assistantMessageID": {
  28714. "type": "string",
  28715. "pattern": "^msg_"
  28716. },
  28717. "reasoningID": {
  28718. "type": "string"
  28719. },
  28720. "text": {
  28721. "type": "string"
  28722. },
  28723. "providerMetadata": {
  28724. "type": "object",
  28725. "additionalProperties": {
  28726. "type": "object"
  28727. }
  28728. }
  28729. },
  28730. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  28731. "additionalProperties": false
  28732. }
  28733. },
  28734. "required": ["id", "type", "properties"],
  28735. "additionalProperties": false
  28736. },
  28737. "EventSessionNextToolInputStarted": {
  28738. "type": "object",
  28739. "properties": {
  28740. "id": {
  28741. "type": "string",
  28742. "pattern": "^evt_"
  28743. },
  28744. "type": {
  28745. "type": "string",
  28746. "enum": ["session.next.tool.input.started"]
  28747. },
  28748. "properties": {
  28749. "type": "object",
  28750. "properties": {
  28751. "timestamp": {
  28752. "type": "number"
  28753. },
  28754. "sessionID": {
  28755. "type": "string",
  28756. "pattern": "^ses"
  28757. },
  28758. "assistantMessageID": {
  28759. "type": "string",
  28760. "pattern": "^msg_"
  28761. },
  28762. "callID": {
  28763. "type": "string"
  28764. },
  28765. "name": {
  28766. "type": "string"
  28767. }
  28768. },
  28769. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  28770. "additionalProperties": false
  28771. }
  28772. },
  28773. "required": ["id", "type", "properties"],
  28774. "additionalProperties": false
  28775. },
  28776. "EventSessionNextToolInputDelta": {
  28777. "type": "object",
  28778. "properties": {
  28779. "id": {
  28780. "type": "string",
  28781. "pattern": "^evt_"
  28782. },
  28783. "type": {
  28784. "type": "string",
  28785. "enum": ["session.next.tool.input.delta"]
  28786. },
  28787. "properties": {
  28788. "type": "object",
  28789. "properties": {
  28790. "timestamp": {
  28791. "type": "number"
  28792. },
  28793. "sessionID": {
  28794. "type": "string",
  28795. "pattern": "^ses"
  28796. },
  28797. "assistantMessageID": {
  28798. "type": "string",
  28799. "pattern": "^msg_"
  28800. },
  28801. "callID": {
  28802. "type": "string"
  28803. },
  28804. "delta": {
  28805. "type": "string"
  28806. }
  28807. },
  28808. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  28809. "additionalProperties": false
  28810. }
  28811. },
  28812. "required": ["id", "type", "properties"],
  28813. "additionalProperties": false
  28814. },
  28815. "EventSessionNextToolInputEnded": {
  28816. "type": "object",
  28817. "properties": {
  28818. "id": {
  28819. "type": "string",
  28820. "pattern": "^evt_"
  28821. },
  28822. "type": {
  28823. "type": "string",
  28824. "enum": ["session.next.tool.input.ended"]
  28825. },
  28826. "properties": {
  28827. "type": "object",
  28828. "properties": {
  28829. "timestamp": {
  28830. "type": "number"
  28831. },
  28832. "sessionID": {
  28833. "type": "string",
  28834. "pattern": "^ses"
  28835. },
  28836. "assistantMessageID": {
  28837. "type": "string",
  28838. "pattern": "^msg_"
  28839. },
  28840. "callID": {
  28841. "type": "string"
  28842. },
  28843. "text": {
  28844. "type": "string"
  28845. }
  28846. },
  28847. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  28848. "additionalProperties": false
  28849. }
  28850. },
  28851. "required": ["id", "type", "properties"],
  28852. "additionalProperties": false
  28853. },
  28854. "EventSessionNextToolCalled": {
  28855. "type": "object",
  28856. "properties": {
  28857. "id": {
  28858. "type": "string",
  28859. "pattern": "^evt_"
  28860. },
  28861. "type": {
  28862. "type": "string",
  28863. "enum": ["session.next.tool.called"]
  28864. },
  28865. "properties": {
  28866. "type": "object",
  28867. "properties": {
  28868. "timestamp": {
  28869. "type": "number"
  28870. },
  28871. "sessionID": {
  28872. "type": "string",
  28873. "pattern": "^ses"
  28874. },
  28875. "assistantMessageID": {
  28876. "type": "string",
  28877. "pattern": "^msg_"
  28878. },
  28879. "callID": {
  28880. "type": "string"
  28881. },
  28882. "tool": {
  28883. "type": "string"
  28884. },
  28885. "input": {
  28886. "type": "object"
  28887. },
  28888. "provider": {
  28889. "type": "object",
  28890. "properties": {
  28891. "executed": {
  28892. "type": "boolean"
  28893. },
  28894. "metadata": {
  28895. "type": "object",
  28896. "additionalProperties": {
  28897. "type": "object"
  28898. }
  28899. }
  28900. },
  28901. "required": ["executed"],
  28902. "additionalProperties": false
  28903. }
  28904. },
  28905. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  28906. "additionalProperties": false
  28907. }
  28908. },
  28909. "required": ["id", "type", "properties"],
  28910. "additionalProperties": false
  28911. },
  28912. "EventSessionNextToolProgress": {
  28913. "type": "object",
  28914. "properties": {
  28915. "id": {
  28916. "type": "string",
  28917. "pattern": "^evt_"
  28918. },
  28919. "type": {
  28920. "type": "string",
  28921. "enum": ["session.next.tool.progress"]
  28922. },
  28923. "properties": {
  28924. "type": "object",
  28925. "properties": {
  28926. "timestamp": {
  28927. "type": "number"
  28928. },
  28929. "sessionID": {
  28930. "type": "string",
  28931. "pattern": "^ses"
  28932. },
  28933. "assistantMessageID": {
  28934. "type": "string",
  28935. "pattern": "^msg_"
  28936. },
  28937. "callID": {
  28938. "type": "string"
  28939. },
  28940. "structured": {
  28941. "type": "object"
  28942. },
  28943. "content": {
  28944. "type": "array",
  28945. "items": {
  28946. "anyOf": [
  28947. {
  28948. "$ref": "#/components/schemas/ToolTextContent"
  28949. },
  28950. {
  28951. "$ref": "#/components/schemas/ToolFileContent"
  28952. }
  28953. ]
  28954. }
  28955. }
  28956. },
  28957. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  28958. "additionalProperties": false
  28959. }
  28960. },
  28961. "required": ["id", "type", "properties"],
  28962. "additionalProperties": false
  28963. },
  28964. "EventSessionNextToolSuccess": {
  28965. "type": "object",
  28966. "properties": {
  28967. "id": {
  28968. "type": "string",
  28969. "pattern": "^evt_"
  28970. },
  28971. "type": {
  28972. "type": "string",
  28973. "enum": ["session.next.tool.success"]
  28974. },
  28975. "properties": {
  28976. "type": "object",
  28977. "properties": {
  28978. "timestamp": {
  28979. "type": "number"
  28980. },
  28981. "sessionID": {
  28982. "type": "string",
  28983. "pattern": "^ses"
  28984. },
  28985. "assistantMessageID": {
  28986. "type": "string",
  28987. "pattern": "^msg_"
  28988. },
  28989. "callID": {
  28990. "type": "string"
  28991. },
  28992. "structured": {
  28993. "type": "object"
  28994. },
  28995. "content": {
  28996. "type": "array",
  28997. "items": {
  28998. "anyOf": [
  28999. {
  29000. "$ref": "#/components/schemas/ToolTextContent"
  29001. },
  29002. {
  29003. "$ref": "#/components/schemas/ToolFileContent"
  29004. }
  29005. ]
  29006. }
  29007. },
  29008. "outputPaths": {
  29009. "type": "array",
  29010. "items": {
  29011. "type": "string"
  29012. }
  29013. },
  29014. "result": {},
  29015. "provider": {
  29016. "type": "object",
  29017. "properties": {
  29018. "executed": {
  29019. "type": "boolean"
  29020. },
  29021. "metadata": {
  29022. "type": "object",
  29023. "additionalProperties": {
  29024. "type": "object"
  29025. }
  29026. }
  29027. },
  29028. "required": ["executed"],
  29029. "additionalProperties": false
  29030. }
  29031. },
  29032. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  29033. "additionalProperties": false
  29034. }
  29035. },
  29036. "required": ["id", "type", "properties"],
  29037. "additionalProperties": false
  29038. },
  29039. "EventSessionNextToolFailed": {
  29040. "type": "object",
  29041. "properties": {
  29042. "id": {
  29043. "type": "string",
  29044. "pattern": "^evt_"
  29045. },
  29046. "type": {
  29047. "type": "string",
  29048. "enum": ["session.next.tool.failed"]
  29049. },
  29050. "properties": {
  29051. "type": "object",
  29052. "properties": {
  29053. "timestamp": {
  29054. "type": "number"
  29055. },
  29056. "sessionID": {
  29057. "type": "string",
  29058. "pattern": "^ses"
  29059. },
  29060. "assistantMessageID": {
  29061. "type": "string",
  29062. "pattern": "^msg_"
  29063. },
  29064. "callID": {
  29065. "type": "string"
  29066. },
  29067. "error": {
  29068. "$ref": "#/components/schemas/SessionErrorUnknown"
  29069. },
  29070. "result": {},
  29071. "provider": {
  29072. "type": "object",
  29073. "properties": {
  29074. "executed": {
  29075. "type": "boolean"
  29076. },
  29077. "metadata": {
  29078. "type": "object",
  29079. "additionalProperties": {
  29080. "type": "object"
  29081. }
  29082. }
  29083. },
  29084. "required": ["executed"],
  29085. "additionalProperties": false
  29086. }
  29087. },
  29088. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  29089. "additionalProperties": false
  29090. }
  29091. },
  29092. "required": ["id", "type", "properties"],
  29093. "additionalProperties": false
  29094. },
  29095. "EventSessionNextRetried": {
  29096. "type": "object",
  29097. "properties": {
  29098. "id": {
  29099. "type": "string",
  29100. "pattern": "^evt_"
  29101. },
  29102. "type": {
  29103. "type": "string",
  29104. "enum": ["session.next.retried"]
  29105. },
  29106. "properties": {
  29107. "type": "object",
  29108. "properties": {
  29109. "timestamp": {
  29110. "type": "number"
  29111. },
  29112. "sessionID": {
  29113. "type": "string",
  29114. "pattern": "^ses"
  29115. },
  29116. "attempt": {
  29117. "type": "number"
  29118. },
  29119. "error": {
  29120. "$ref": "#/components/schemas/SessionNextRetry_error"
  29121. }
  29122. },
  29123. "required": ["timestamp", "sessionID", "attempt", "error"],
  29124. "additionalProperties": false
  29125. }
  29126. },
  29127. "required": ["id", "type", "properties"],
  29128. "additionalProperties": false
  29129. },
  29130. "EventSessionNextCompactionStarted": {
  29131. "type": "object",
  29132. "properties": {
  29133. "id": {
  29134. "type": "string",
  29135. "pattern": "^evt_"
  29136. },
  29137. "type": {
  29138. "type": "string",
  29139. "enum": ["session.next.compaction.started"]
  29140. },
  29141. "properties": {
  29142. "type": "object",
  29143. "properties": {
  29144. "timestamp": {
  29145. "type": "number"
  29146. },
  29147. "sessionID": {
  29148. "type": "string",
  29149. "pattern": "^ses"
  29150. },
  29151. "messageID": {
  29152. "type": "string",
  29153. "pattern": "^msg_"
  29154. },
  29155. "reason": {
  29156. "type": "string",
  29157. "enum": ["auto", "manual"]
  29158. }
  29159. },
  29160. "required": ["timestamp", "sessionID", "messageID", "reason"],
  29161. "additionalProperties": false
  29162. }
  29163. },
  29164. "required": ["id", "type", "properties"],
  29165. "additionalProperties": false
  29166. },
  29167. "EventSessionNextCompactionDelta": {
  29168. "type": "object",
  29169. "properties": {
  29170. "id": {
  29171. "type": "string",
  29172. "pattern": "^evt_"
  29173. },
  29174. "type": {
  29175. "type": "string",
  29176. "enum": ["session.next.compaction.delta"]
  29177. },
  29178. "properties": {
  29179. "type": "object",
  29180. "properties": {
  29181. "timestamp": {
  29182. "type": "number"
  29183. },
  29184. "sessionID": {
  29185. "type": "string",
  29186. "pattern": "^ses"
  29187. },
  29188. "messageID": {
  29189. "type": "string",
  29190. "pattern": "^msg_"
  29191. },
  29192. "text": {
  29193. "type": "string"
  29194. }
  29195. },
  29196. "required": ["timestamp", "sessionID", "messageID", "text"],
  29197. "additionalProperties": false
  29198. }
  29199. },
  29200. "required": ["id", "type", "properties"],
  29201. "additionalProperties": false
  29202. },
  29203. "EventSessionNextCompactionEnded": {
  29204. "type": "object",
  29205. "properties": {
  29206. "id": {
  29207. "type": "string",
  29208. "pattern": "^evt_"
  29209. },
  29210. "type": {
  29211. "type": "string",
  29212. "enum": ["session.next.compaction.ended"]
  29213. },
  29214. "properties": {
  29215. "type": "object",
  29216. "properties": {
  29217. "timestamp": {
  29218. "type": "number"
  29219. },
  29220. "sessionID": {
  29221. "type": "string",
  29222. "pattern": "^ses"
  29223. },
  29224. "messageID": {
  29225. "type": "string",
  29226. "pattern": "^msg_"
  29227. },
  29228. "reason": {
  29229. "type": "string",
  29230. "enum": ["auto", "manual"]
  29231. },
  29232. "text": {
  29233. "type": "string"
  29234. },
  29235. "recent": {
  29236. "type": "string"
  29237. }
  29238. },
  29239. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  29240. "additionalProperties": false
  29241. }
  29242. },
  29243. "required": ["id", "type", "properties"],
  29244. "additionalProperties": false
  29245. },
  29246. "EventMessagePartDelta": {
  29247. "type": "object",
  29248. "properties": {
  29249. "id": {
  29250. "type": "string",
  29251. "pattern": "^evt_"
  29252. },
  29253. "type": {
  29254. "type": "string",
  29255. "enum": ["message.part.delta"]
  29256. },
  29257. "properties": {
  29258. "type": "object",
  29259. "properties": {
  29260. "sessionID": {
  29261. "type": "string",
  29262. "pattern": "^ses"
  29263. },
  29264. "messageID": {
  29265. "type": "string",
  29266. "pattern": "^msg"
  29267. },
  29268. "partID": {
  29269. "type": "string",
  29270. "pattern": "^prt"
  29271. },
  29272. "field": {
  29273. "type": "string"
  29274. },
  29275. "delta": {
  29276. "type": "string"
  29277. }
  29278. },
  29279. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  29280. "additionalProperties": false
  29281. }
  29282. },
  29283. "required": ["id", "type", "properties"],
  29284. "additionalProperties": false
  29285. },
  29286. "EventSessionDiff": {
  29287. "type": "object",
  29288. "properties": {
  29289. "id": {
  29290. "type": "string",
  29291. "pattern": "^evt_"
  29292. },
  29293. "type": {
  29294. "type": "string",
  29295. "enum": ["session.diff"]
  29296. },
  29297. "properties": {
  29298. "type": "object",
  29299. "properties": {
  29300. "sessionID": {
  29301. "type": "string",
  29302. "pattern": "^ses"
  29303. },
  29304. "diff": {
  29305. "type": "array",
  29306. "items": {
  29307. "$ref": "#/components/schemas/SnapshotFileDiff"
  29308. }
  29309. }
  29310. },
  29311. "required": ["sessionID", "diff"],
  29312. "additionalProperties": false
  29313. }
  29314. },
  29315. "required": ["id", "type", "properties"],
  29316. "additionalProperties": false
  29317. },
  29318. "EventSessionError": {
  29319. "type": "object",
  29320. "properties": {
  29321. "id": {
  29322. "type": "string",
  29323. "pattern": "^evt_"
  29324. },
  29325. "type": {
  29326. "type": "string",
  29327. "enum": ["session.error"]
  29328. },
  29329. "properties": {
  29330. "type": "object",
  29331. "properties": {
  29332. "sessionID": {
  29333. "type": "string",
  29334. "pattern": "^ses"
  29335. },
  29336. "error": {
  29337. "anyOf": [
  29338. {
  29339. "$ref": "#/components/schemas/ProviderAuthError"
  29340. },
  29341. {
  29342. "$ref": "#/components/schemas/UnknownError"
  29343. },
  29344. {
  29345. "$ref": "#/components/schemas/MessageOutputLengthError"
  29346. },
  29347. {
  29348. "$ref": "#/components/schemas/MessageAbortedError"
  29349. },
  29350. {
  29351. "$ref": "#/components/schemas/StructuredOutputError"
  29352. },
  29353. {
  29354. "$ref": "#/components/schemas/ContextOverflowError"
  29355. },
  29356. {
  29357. "$ref": "#/components/schemas/ContentFilterError"
  29358. },
  29359. {
  29360. "$ref": "#/components/schemas/APIError"
  29361. }
  29362. ]
  29363. }
  29364. },
  29365. "additionalProperties": false
  29366. }
  29367. },
  29368. "required": ["id", "type", "properties"],
  29369. "additionalProperties": false
  29370. },
  29371. "EventInstallationUpdated": {
  29372. "type": "object",
  29373. "properties": {
  29374. "id": {
  29375. "type": "string",
  29376. "pattern": "^evt_"
  29377. },
  29378. "type": {
  29379. "type": "string",
  29380. "enum": ["installation.updated"]
  29381. },
  29382. "properties": {
  29383. "type": "object",
  29384. "properties": {
  29385. "version": {
  29386. "type": "string"
  29387. }
  29388. },
  29389. "required": ["version"],
  29390. "additionalProperties": false
  29391. }
  29392. },
  29393. "required": ["id", "type", "properties"],
  29394. "additionalProperties": false
  29395. },
  29396. "EventInstallationUpdate-available": {
  29397. "type": "object",
  29398. "properties": {
  29399. "id": {
  29400. "type": "string",
  29401. "pattern": "^evt_"
  29402. },
  29403. "type": {
  29404. "type": "string",
  29405. "enum": ["installation.update-available"]
  29406. },
  29407. "properties": {
  29408. "type": "object",
  29409. "properties": {
  29410. "version": {
  29411. "type": "string"
  29412. }
  29413. },
  29414. "required": ["version"],
  29415. "additionalProperties": false
  29416. }
  29417. },
  29418. "required": ["id", "type", "properties"],
  29419. "additionalProperties": false
  29420. },
  29421. "EventFileEdited": {
  29422. "type": "object",
  29423. "properties": {
  29424. "id": {
  29425. "type": "string",
  29426. "pattern": "^evt_"
  29427. },
  29428. "type": {
  29429. "type": "string",
  29430. "enum": ["file.edited"]
  29431. },
  29432. "properties": {
  29433. "type": "object",
  29434. "properties": {
  29435. "file": {
  29436. "type": "string"
  29437. }
  29438. },
  29439. "required": ["file"],
  29440. "additionalProperties": false
  29441. }
  29442. },
  29443. "required": ["id", "type", "properties"],
  29444. "additionalProperties": false
  29445. },
  29446. "EventPermissionV2Asked": {
  29447. "type": "object",
  29448. "properties": {
  29449. "id": {
  29450. "type": "string",
  29451. "pattern": "^evt_"
  29452. },
  29453. "type": {
  29454. "type": "string",
  29455. "enum": ["permission.v2.asked"]
  29456. },
  29457. "properties": {
  29458. "type": "object",
  29459. "properties": {
  29460. "id": {
  29461. "type": "string",
  29462. "pattern": "^per"
  29463. },
  29464. "sessionID": {
  29465. "type": "string",
  29466. "pattern": "^ses"
  29467. },
  29468. "action": {
  29469. "type": "string"
  29470. },
  29471. "resources": {
  29472. "type": "array",
  29473. "items": {
  29474. "type": "string"
  29475. }
  29476. },
  29477. "save": {
  29478. "type": "array",
  29479. "items": {
  29480. "type": "string"
  29481. }
  29482. },
  29483. "metadata": {
  29484. "type": "object"
  29485. },
  29486. "source": {
  29487. "$ref": "#/components/schemas/PermissionV2Source"
  29488. }
  29489. },
  29490. "required": ["id", "sessionID", "action", "resources"],
  29491. "additionalProperties": false
  29492. }
  29493. },
  29494. "required": ["id", "type", "properties"],
  29495. "additionalProperties": false
  29496. },
  29497. "EventPermissionV2Replied": {
  29498. "type": "object",
  29499. "properties": {
  29500. "id": {
  29501. "type": "string",
  29502. "pattern": "^evt_"
  29503. },
  29504. "type": {
  29505. "type": "string",
  29506. "enum": ["permission.v2.replied"]
  29507. },
  29508. "properties": {
  29509. "type": "object",
  29510. "properties": {
  29511. "sessionID": {
  29512. "type": "string",
  29513. "pattern": "^ses"
  29514. },
  29515. "requestID": {
  29516. "type": "string",
  29517. "pattern": "^per"
  29518. },
  29519. "reply": {
  29520. "$ref": "#/components/schemas/PermissionV2Reply"
  29521. }
  29522. },
  29523. "required": ["sessionID", "requestID", "reply"],
  29524. "additionalProperties": false
  29525. }
  29526. },
  29527. "required": ["id", "type", "properties"],
  29528. "additionalProperties": false
  29529. },
  29530. "EventReferenceUpdated": {
  29531. "type": "object",
  29532. "properties": {
  29533. "id": {
  29534. "type": "string",
  29535. "pattern": "^evt_"
  29536. },
  29537. "type": {
  29538. "type": "string",
  29539. "enum": ["reference.updated"]
  29540. },
  29541. "properties": {
  29542. "type": "object",
  29543. "properties": {}
  29544. }
  29545. },
  29546. "required": ["id", "type", "properties"],
  29547. "additionalProperties": false
  29548. },
  29549. "EventProjectDirectoriesUpdated": {
  29550. "type": "object",
  29551. "properties": {
  29552. "id": {
  29553. "type": "string",
  29554. "pattern": "^evt_"
  29555. },
  29556. "type": {
  29557. "type": "string",
  29558. "enum": ["project.directories.updated"]
  29559. },
  29560. "properties": {
  29561. "type": "object",
  29562. "properties": {
  29563. "projectID": {
  29564. "type": "string"
  29565. }
  29566. },
  29567. "required": ["projectID"],
  29568. "additionalProperties": false
  29569. }
  29570. },
  29571. "required": ["id", "type", "properties"],
  29572. "additionalProperties": false
  29573. },
  29574. "EventFileWatcherUpdated": {
  29575. "type": "object",
  29576. "properties": {
  29577. "id": {
  29578. "type": "string",
  29579. "pattern": "^evt_"
  29580. },
  29581. "type": {
  29582. "type": "string",
  29583. "enum": ["file.watcher.updated"]
  29584. },
  29585. "properties": {
  29586. "type": "object",
  29587. "properties": {
  29588. "file": {
  29589. "type": "string"
  29590. },
  29591. "event": {
  29592. "type": "string",
  29593. "enum": ["add", "change", "unlink"]
  29594. }
  29595. },
  29596. "required": ["file", "event"],
  29597. "additionalProperties": false
  29598. }
  29599. },
  29600. "required": ["id", "type", "properties"],
  29601. "additionalProperties": false
  29602. },
  29603. "EventPtyCreated": {
  29604. "type": "object",
  29605. "properties": {
  29606. "id": {
  29607. "type": "string",
  29608. "pattern": "^evt_"
  29609. },
  29610. "type": {
  29611. "type": "string",
  29612. "enum": ["pty.created"]
  29613. },
  29614. "properties": {
  29615. "type": "object",
  29616. "properties": {
  29617. "info": {
  29618. "$ref": "#/components/schemas/Pty"
  29619. }
  29620. },
  29621. "required": ["info"],
  29622. "additionalProperties": false
  29623. }
  29624. },
  29625. "required": ["id", "type", "properties"],
  29626. "additionalProperties": false
  29627. },
  29628. "EventPtyUpdated": {
  29629. "type": "object",
  29630. "properties": {
  29631. "id": {
  29632. "type": "string",
  29633. "pattern": "^evt_"
  29634. },
  29635. "type": {
  29636. "type": "string",
  29637. "enum": ["pty.updated"]
  29638. },
  29639. "properties": {
  29640. "type": "object",
  29641. "properties": {
  29642. "info": {
  29643. "$ref": "#/components/schemas/Pty"
  29644. }
  29645. },
  29646. "required": ["info"],
  29647. "additionalProperties": false
  29648. }
  29649. },
  29650. "required": ["id", "type", "properties"],
  29651. "additionalProperties": false
  29652. },
  29653. "EventPtyExited": {
  29654. "type": "object",
  29655. "properties": {
  29656. "id": {
  29657. "type": "string",
  29658. "pattern": "^evt_"
  29659. },
  29660. "type": {
  29661. "type": "string",
  29662. "enum": ["pty.exited"]
  29663. },
  29664. "properties": {
  29665. "type": "object",
  29666. "properties": {
  29667. "id": {
  29668. "type": "string",
  29669. "pattern": "^pty"
  29670. },
  29671. "exitCode": {
  29672. "type": "integer",
  29673. "minimum": 0
  29674. }
  29675. },
  29676. "required": ["id", "exitCode"],
  29677. "additionalProperties": false
  29678. }
  29679. },
  29680. "required": ["id", "type", "properties"],
  29681. "additionalProperties": false
  29682. },
  29683. "EventPtyDeleted": {
  29684. "type": "object",
  29685. "properties": {
  29686. "id": {
  29687. "type": "string",
  29688. "pattern": "^evt_"
  29689. },
  29690. "type": {
  29691. "type": "string",
  29692. "enum": ["pty.deleted"]
  29693. },
  29694. "properties": {
  29695. "type": "object",
  29696. "properties": {
  29697. "id": {
  29698. "type": "string",
  29699. "pattern": "^pty"
  29700. }
  29701. },
  29702. "required": ["id"],
  29703. "additionalProperties": false
  29704. }
  29705. },
  29706. "required": ["id", "type", "properties"],
  29707. "additionalProperties": false
  29708. },
  29709. "EventQuestionV2Asked": {
  29710. "type": "object",
  29711. "properties": {
  29712. "id": {
  29713. "type": "string",
  29714. "pattern": "^evt_"
  29715. },
  29716. "type": {
  29717. "type": "string",
  29718. "enum": ["question.v2.asked"]
  29719. },
  29720. "properties": {
  29721. "type": "object",
  29722. "properties": {
  29723. "id": {
  29724. "type": "string",
  29725. "pattern": "^que"
  29726. },
  29727. "sessionID": {
  29728. "type": "string",
  29729. "pattern": "^ses"
  29730. },
  29731. "questions": {
  29732. "type": "array",
  29733. "items": {
  29734. "$ref": "#/components/schemas/QuestionV2Info"
  29735. },
  29736. "description": "Questions to ask"
  29737. },
  29738. "tool": {
  29739. "$ref": "#/components/schemas/QuestionV2Tool"
  29740. }
  29741. },
  29742. "required": ["id", "sessionID", "questions"],
  29743. "additionalProperties": false
  29744. }
  29745. },
  29746. "required": ["id", "type", "properties"],
  29747. "additionalProperties": false
  29748. },
  29749. "EventQuestionV2Replied": {
  29750. "type": "object",
  29751. "properties": {
  29752. "id": {
  29753. "type": "string",
  29754. "pattern": "^evt_"
  29755. },
  29756. "type": {
  29757. "type": "string",
  29758. "enum": ["question.v2.replied"]
  29759. },
  29760. "properties": {
  29761. "type": "object",
  29762. "properties": {
  29763. "sessionID": {
  29764. "type": "string",
  29765. "pattern": "^ses"
  29766. },
  29767. "requestID": {
  29768. "type": "string",
  29769. "pattern": "^que"
  29770. },
  29771. "answers": {
  29772. "type": "array",
  29773. "items": {
  29774. "$ref": "#/components/schemas/QuestionV2Answer"
  29775. }
  29776. }
  29777. },
  29778. "required": ["sessionID", "requestID", "answers"],
  29779. "additionalProperties": false
  29780. }
  29781. },
  29782. "required": ["id", "type", "properties"],
  29783. "additionalProperties": false
  29784. },
  29785. "EventQuestionV2Rejected": {
  29786. "type": "object",
  29787. "properties": {
  29788. "id": {
  29789. "type": "string",
  29790. "pattern": "^evt_"
  29791. },
  29792. "type": {
  29793. "type": "string",
  29794. "enum": ["question.v2.rejected"]
  29795. },
  29796. "properties": {
  29797. "type": "object",
  29798. "properties": {
  29799. "sessionID": {
  29800. "type": "string",
  29801. "pattern": "^ses"
  29802. },
  29803. "requestID": {
  29804. "type": "string",
  29805. "pattern": "^que"
  29806. }
  29807. },
  29808. "required": ["sessionID", "requestID"],
  29809. "additionalProperties": false
  29810. }
  29811. },
  29812. "required": ["id", "type", "properties"],
  29813. "additionalProperties": false
  29814. },
  29815. "EventTodoUpdated": {
  29816. "type": "object",
  29817. "properties": {
  29818. "id": {
  29819. "type": "string",
  29820. "pattern": "^evt_"
  29821. },
  29822. "type": {
  29823. "type": "string",
  29824. "enum": ["todo.updated"]
  29825. },
  29826. "properties": {
  29827. "type": "object",
  29828. "properties": {
  29829. "sessionID": {
  29830. "type": "string",
  29831. "pattern": "^ses"
  29832. },
  29833. "todos": {
  29834. "type": "array",
  29835. "items": {
  29836. "$ref": "#/components/schemas/Todo"
  29837. }
  29838. }
  29839. },
  29840. "required": ["sessionID", "todos"],
  29841. "additionalProperties": false
  29842. }
  29843. },
  29844. "required": ["id", "type", "properties"],
  29845. "additionalProperties": false
  29846. },
  29847. "EventLspUpdated": {
  29848. "type": "object",
  29849. "properties": {
  29850. "id": {
  29851. "type": "string",
  29852. "pattern": "^evt_"
  29853. },
  29854. "type": {
  29855. "type": "string",
  29856. "enum": ["lsp.updated"]
  29857. },
  29858. "properties": {
  29859. "type": "object",
  29860. "properties": {}
  29861. }
  29862. },
  29863. "required": ["id", "type", "properties"],
  29864. "additionalProperties": false
  29865. },
  29866. "EventPermissionAsked": {
  29867. "type": "object",
  29868. "properties": {
  29869. "id": {
  29870. "type": "string",
  29871. "pattern": "^evt_"
  29872. },
  29873. "type": {
  29874. "type": "string",
  29875. "enum": ["permission.asked"]
  29876. },
  29877. "properties": {
  29878. "type": "object",
  29879. "properties": {
  29880. "id": {
  29881. "type": "string",
  29882. "pattern": "^per"
  29883. },
  29884. "sessionID": {
  29885. "type": "string",
  29886. "pattern": "^ses"
  29887. },
  29888. "permission": {
  29889. "type": "string"
  29890. },
  29891. "patterns": {
  29892. "type": "array",
  29893. "items": {
  29894. "type": "string"
  29895. }
  29896. },
  29897. "metadata": {
  29898. "type": "object"
  29899. },
  29900. "always": {
  29901. "type": "array",
  29902. "items": {
  29903. "type": "string"
  29904. }
  29905. },
  29906. "tool": {
  29907. "type": "object",
  29908. "properties": {
  29909. "messageID": {
  29910. "type": "string"
  29911. },
  29912. "callID": {
  29913. "type": "string"
  29914. }
  29915. },
  29916. "required": ["messageID", "callID"],
  29917. "additionalProperties": false
  29918. }
  29919. },
  29920. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  29921. "additionalProperties": false
  29922. }
  29923. },
  29924. "required": ["id", "type", "properties"],
  29925. "additionalProperties": false
  29926. },
  29927. "EventPermissionReplied": {
  29928. "type": "object",
  29929. "properties": {
  29930. "id": {
  29931. "type": "string",
  29932. "pattern": "^evt_"
  29933. },
  29934. "type": {
  29935. "type": "string",
  29936. "enum": ["permission.replied"]
  29937. },
  29938. "properties": {
  29939. "type": "object",
  29940. "properties": {
  29941. "sessionID": {
  29942. "type": "string",
  29943. "pattern": "^ses"
  29944. },
  29945. "requestID": {
  29946. "type": "string",
  29947. "pattern": "^per"
  29948. },
  29949. "reply": {
  29950. "type": "string",
  29951. "enum": ["once", "always", "reject"]
  29952. }
  29953. },
  29954. "required": ["sessionID", "requestID", "reply"],
  29955. "additionalProperties": false
  29956. }
  29957. },
  29958. "required": ["id", "type", "properties"],
  29959. "additionalProperties": false
  29960. },
  29961. "EventMcpToolsChanged": {
  29962. "type": "object",
  29963. "properties": {
  29964. "id": {
  29965. "type": "string",
  29966. "pattern": "^evt_"
  29967. },
  29968. "type": {
  29969. "type": "string",
  29970. "enum": ["mcp.tools.changed"]
  29971. },
  29972. "properties": {
  29973. "type": "object",
  29974. "properties": {
  29975. "server": {
  29976. "type": "string"
  29977. }
  29978. },
  29979. "required": ["server"],
  29980. "additionalProperties": false
  29981. }
  29982. },
  29983. "required": ["id", "type", "properties"],
  29984. "additionalProperties": false
  29985. },
  29986. "EventMcpBrowserOpenFailed": {
  29987. "type": "object",
  29988. "properties": {
  29989. "id": {
  29990. "type": "string",
  29991. "pattern": "^evt_"
  29992. },
  29993. "type": {
  29994. "type": "string",
  29995. "enum": ["mcp.browser.open.failed"]
  29996. },
  29997. "properties": {
  29998. "type": "object",
  29999. "properties": {
  30000. "mcpName": {
  30001. "type": "string"
  30002. },
  30003. "url": {
  30004. "type": "string"
  30005. }
  30006. },
  30007. "required": ["mcpName", "url"],
  30008. "additionalProperties": false
  30009. }
  30010. },
  30011. "required": ["id", "type", "properties"],
  30012. "additionalProperties": false
  30013. },
  30014. "EventCommandExecuted": {
  30015. "type": "object",
  30016. "properties": {
  30017. "id": {
  30018. "type": "string",
  30019. "pattern": "^evt_"
  30020. },
  30021. "type": {
  30022. "type": "string",
  30023. "enum": ["command.executed"]
  30024. },
  30025. "properties": {
  30026. "type": "object",
  30027. "properties": {
  30028. "name": {
  30029. "type": "string"
  30030. },
  30031. "sessionID": {
  30032. "type": "string",
  30033. "pattern": "^ses"
  30034. },
  30035. "arguments": {
  30036. "type": "string"
  30037. },
  30038. "messageID": {
  30039. "type": "string",
  30040. "pattern": "^msg"
  30041. }
  30042. },
  30043. "required": ["name", "sessionID", "arguments", "messageID"],
  30044. "additionalProperties": false
  30045. }
  30046. },
  30047. "required": ["id", "type", "properties"],
  30048. "additionalProperties": false
  30049. },
  30050. "EventProjectUpdated": {
  30051. "type": "object",
  30052. "properties": {
  30053. "id": {
  30054. "type": "string",
  30055. "pattern": "^evt_"
  30056. },
  30057. "type": {
  30058. "type": "string",
  30059. "enum": ["project.updated"]
  30060. },
  30061. "properties": {
  30062. "type": "object",
  30063. "properties": {
  30064. "id": {
  30065. "type": "string"
  30066. },
  30067. "worktree": {
  30068. "type": "string"
  30069. },
  30070. "vcs": {
  30071. "type": "string",
  30072. "enum": ["git"]
  30073. },
  30074. "name": {
  30075. "type": "string"
  30076. },
  30077. "icon": {
  30078. "type": "object",
  30079. "properties": {
  30080. "url": {
  30081. "type": "string"
  30082. },
  30083. "override": {
  30084. "type": "string"
  30085. },
  30086. "color": {
  30087. "type": "string"
  30088. }
  30089. },
  30090. "additionalProperties": false
  30091. },
  30092. "commands": {
  30093. "type": "object",
  30094. "properties": {
  30095. "start": {
  30096. "type": "string",
  30097. "description": "Startup script to run when creating a new workspace (worktree)"
  30098. }
  30099. },
  30100. "additionalProperties": false
  30101. },
  30102. "time": {
  30103. "type": "object",
  30104. "properties": {
  30105. "created": {
  30106. "type": "integer",
  30107. "minimum": 0
  30108. },
  30109. "updated": {
  30110. "type": "integer",
  30111. "minimum": 0
  30112. },
  30113. "initialized": {
  30114. "type": "integer",
  30115. "minimum": 0
  30116. }
  30117. },
  30118. "required": ["created", "updated"],
  30119. "additionalProperties": false
  30120. },
  30121. "sandboxes": {
  30122. "type": "array",
  30123. "items": {
  30124. "type": "string"
  30125. }
  30126. }
  30127. },
  30128. "required": ["id", "worktree", "time", "sandboxes"],
  30129. "additionalProperties": false
  30130. }
  30131. },
  30132. "required": ["id", "type", "properties"],
  30133. "additionalProperties": false
  30134. },
  30135. "EventSessionStatus": {
  30136. "type": "object",
  30137. "properties": {
  30138. "id": {
  30139. "type": "string",
  30140. "pattern": "^evt_"
  30141. },
  30142. "type": {
  30143. "type": "string",
  30144. "enum": ["session.status"]
  30145. },
  30146. "properties": {
  30147. "type": "object",
  30148. "properties": {
  30149. "sessionID": {
  30150. "type": "string",
  30151. "pattern": "^ses"
  30152. },
  30153. "status": {
  30154. "$ref": "#/components/schemas/SessionStatus"
  30155. }
  30156. },
  30157. "required": ["sessionID", "status"],
  30158. "additionalProperties": false
  30159. }
  30160. },
  30161. "required": ["id", "type", "properties"],
  30162. "additionalProperties": false
  30163. },
  30164. "EventSessionIdle": {
  30165. "type": "object",
  30166. "properties": {
  30167. "id": {
  30168. "type": "string",
  30169. "pattern": "^evt_"
  30170. },
  30171. "type": {
  30172. "type": "string",
  30173. "enum": ["session.idle"]
  30174. },
  30175. "properties": {
  30176. "type": "object",
  30177. "properties": {
  30178. "sessionID": {
  30179. "type": "string",
  30180. "pattern": "^ses"
  30181. }
  30182. },
  30183. "required": ["sessionID"],
  30184. "additionalProperties": false
  30185. }
  30186. },
  30187. "required": ["id", "type", "properties"],
  30188. "additionalProperties": false
  30189. },
  30190. "EventQuestionAsked": {
  30191. "type": "object",
  30192. "properties": {
  30193. "id": {
  30194. "type": "string",
  30195. "pattern": "^evt_"
  30196. },
  30197. "type": {
  30198. "type": "string",
  30199. "enum": ["question.asked"]
  30200. },
  30201. "properties": {
  30202. "type": "object",
  30203. "properties": {
  30204. "id": {
  30205. "type": "string",
  30206. "pattern": "^que"
  30207. },
  30208. "sessionID": {
  30209. "type": "string",
  30210. "pattern": "^ses"
  30211. },
  30212. "questions": {
  30213. "type": "array",
  30214. "items": {
  30215. "$ref": "#/components/schemas/QuestionInfo"
  30216. },
  30217. "description": "Questions to ask"
  30218. },
  30219. "tool": {
  30220. "$ref": "#/components/schemas/QuestionTool"
  30221. }
  30222. },
  30223. "required": ["id", "sessionID", "questions"],
  30224. "additionalProperties": false
  30225. }
  30226. },
  30227. "required": ["id", "type", "properties"],
  30228. "additionalProperties": false
  30229. },
  30230. "EventQuestionReplied": {
  30231. "type": "object",
  30232. "properties": {
  30233. "id": {
  30234. "type": "string",
  30235. "pattern": "^evt_"
  30236. },
  30237. "type": {
  30238. "type": "string",
  30239. "enum": ["question.replied"]
  30240. },
  30241. "properties": {
  30242. "type": "object",
  30243. "properties": {
  30244. "sessionID": {
  30245. "type": "string",
  30246. "pattern": "^ses"
  30247. },
  30248. "requestID": {
  30249. "type": "string",
  30250. "pattern": "^que"
  30251. },
  30252. "answers": {
  30253. "type": "array",
  30254. "items": {
  30255. "$ref": "#/components/schemas/QuestionAnswer"
  30256. }
  30257. }
  30258. },
  30259. "required": ["sessionID", "requestID", "answers"],
  30260. "additionalProperties": false
  30261. }
  30262. },
  30263. "required": ["id", "type", "properties"],
  30264. "additionalProperties": false
  30265. },
  30266. "EventQuestionRejected": {
  30267. "type": "object",
  30268. "properties": {
  30269. "id": {
  30270. "type": "string",
  30271. "pattern": "^evt_"
  30272. },
  30273. "type": {
  30274. "type": "string",
  30275. "enum": ["question.rejected"]
  30276. },
  30277. "properties": {
  30278. "type": "object",
  30279. "properties": {
  30280. "sessionID": {
  30281. "type": "string",
  30282. "pattern": "^ses"
  30283. },
  30284. "requestID": {
  30285. "type": "string",
  30286. "pattern": "^que"
  30287. }
  30288. },
  30289. "required": ["sessionID", "requestID"],
  30290. "additionalProperties": false
  30291. }
  30292. },
  30293. "required": ["id", "type", "properties"],
  30294. "additionalProperties": false
  30295. },
  30296. "EventSessionCompacted": {
  30297. "type": "object",
  30298. "properties": {
  30299. "id": {
  30300. "type": "string",
  30301. "pattern": "^evt_"
  30302. },
  30303. "type": {
  30304. "type": "string",
  30305. "enum": ["session.compacted"]
  30306. },
  30307. "properties": {
  30308. "type": "object",
  30309. "properties": {
  30310. "sessionID": {
  30311. "type": "string",
  30312. "pattern": "^ses"
  30313. }
  30314. },
  30315. "required": ["sessionID"],
  30316. "additionalProperties": false
  30317. }
  30318. },
  30319. "required": ["id", "type", "properties"],
  30320. "additionalProperties": false
  30321. },
  30322. "EventVcsBranchUpdated": {
  30323. "type": "object",
  30324. "properties": {
  30325. "id": {
  30326. "type": "string",
  30327. "pattern": "^evt_"
  30328. },
  30329. "type": {
  30330. "type": "string",
  30331. "enum": ["vcs.branch.updated"]
  30332. },
  30333. "properties": {
  30334. "type": "object",
  30335. "properties": {
  30336. "branch": {
  30337. "type": "string"
  30338. }
  30339. },
  30340. "additionalProperties": false
  30341. }
  30342. },
  30343. "required": ["id", "type", "properties"],
  30344. "additionalProperties": false
  30345. },
  30346. "EventWorkspaceReady": {
  30347. "type": "object",
  30348. "properties": {
  30349. "id": {
  30350. "type": "string",
  30351. "pattern": "^evt_"
  30352. },
  30353. "type": {
  30354. "type": "string",
  30355. "enum": ["workspace.ready"]
  30356. },
  30357. "properties": {
  30358. "type": "object",
  30359. "properties": {
  30360. "name": {
  30361. "type": "string"
  30362. }
  30363. },
  30364. "required": ["name"],
  30365. "additionalProperties": false
  30366. }
  30367. },
  30368. "required": ["id", "type", "properties"],
  30369. "additionalProperties": false
  30370. },
  30371. "EventWorkspaceFailed": {
  30372. "type": "object",
  30373. "properties": {
  30374. "id": {
  30375. "type": "string",
  30376. "pattern": "^evt_"
  30377. },
  30378. "type": {
  30379. "type": "string",
  30380. "enum": ["workspace.failed"]
  30381. },
  30382. "properties": {
  30383. "type": "object",
  30384. "properties": {
  30385. "message": {
  30386. "type": "string"
  30387. }
  30388. },
  30389. "required": ["message"],
  30390. "additionalProperties": false
  30391. }
  30392. },
  30393. "required": ["id", "type", "properties"],
  30394. "additionalProperties": false
  30395. },
  30396. "EventWorkspaceStatus": {
  30397. "type": "object",
  30398. "properties": {
  30399. "id": {
  30400. "type": "string",
  30401. "pattern": "^evt_"
  30402. },
  30403. "type": {
  30404. "type": "string",
  30405. "enum": ["workspace.status"]
  30406. },
  30407. "properties": {
  30408. "type": "object",
  30409. "properties": {
  30410. "workspaceID": {
  30411. "type": "string",
  30412. "pattern": "^wrk"
  30413. },
  30414. "status": {
  30415. "type": "string",
  30416. "enum": ["connected", "connecting", "disconnected", "error"]
  30417. }
  30418. },
  30419. "required": ["workspaceID", "status"],
  30420. "additionalProperties": false
  30421. }
  30422. },
  30423. "required": ["id", "type", "properties"],
  30424. "additionalProperties": false
  30425. },
  30426. "EventWorktreeReady": {
  30427. "type": "object",
  30428. "properties": {
  30429. "id": {
  30430. "type": "string",
  30431. "pattern": "^evt_"
  30432. },
  30433. "type": {
  30434. "type": "string",
  30435. "enum": ["worktree.ready"]
  30436. },
  30437. "properties": {
  30438. "type": "object",
  30439. "properties": {
  30440. "name": {
  30441. "type": "string"
  30442. },
  30443. "branch": {
  30444. "type": "string"
  30445. }
  30446. },
  30447. "required": ["name"],
  30448. "additionalProperties": false
  30449. }
  30450. },
  30451. "required": ["id", "type", "properties"],
  30452. "additionalProperties": false
  30453. },
  30454. "EventWorktreeFailed": {
  30455. "type": "object",
  30456. "properties": {
  30457. "id": {
  30458. "type": "string",
  30459. "pattern": "^evt_"
  30460. },
  30461. "type": {
  30462. "type": "string",
  30463. "enum": ["worktree.failed"]
  30464. },
  30465. "properties": {
  30466. "type": "object",
  30467. "properties": {
  30468. "message": {
  30469. "type": "string"
  30470. }
  30471. },
  30472. "required": ["message"],
  30473. "additionalProperties": false
  30474. }
  30475. },
  30476. "required": ["id", "type", "properties"],
  30477. "additionalProperties": false
  30478. },
  30479. "EventServerConnected": {
  30480. "type": "object",
  30481. "properties": {
  30482. "id": {
  30483. "type": "string",
  30484. "pattern": "^evt_"
  30485. },
  30486. "type": {
  30487. "type": "string",
  30488. "enum": ["server.connected"]
  30489. },
  30490. "properties": {
  30491. "type": "object",
  30492. "properties": {}
  30493. }
  30494. },
  30495. "required": ["id", "type", "properties"],
  30496. "additionalProperties": false
  30497. },
  30498. "EventGlobalDisposed": {
  30499. "type": "object",
  30500. "properties": {
  30501. "id": {
  30502. "type": "string",
  30503. "pattern": "^evt_"
  30504. },
  30505. "type": {
  30506. "type": "string",
  30507. "enum": ["global.disposed"]
  30508. },
  30509. "properties": {
  30510. "type": "object",
  30511. "properties": {}
  30512. }
  30513. },
  30514. "required": ["id", "type", "properties"],
  30515. "additionalProperties": false
  30516. },
  30517. "BadRequestError": {
  30518. "type": "object",
  30519. "required": ["name", "data"],
  30520. "properties": {
  30521. "name": {
  30522. "type": "string",
  30523. "enum": ["BadRequest"]
  30524. },
  30525. "data": {
  30526. "type": "object",
  30527. "required": ["message"],
  30528. "properties": {
  30529. "message": {
  30530. "type": "string"
  30531. },
  30532. "kind": {
  30533. "type": "string",
  30534. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  30535. }
  30536. }
  30537. }
  30538. }
  30539. }
  30540. }
  30541. },
  30542. "security": [],
  30543. "tags": [
  30544. {
  30545. "name": "control",
  30546. "description": "Control plane routes."
  30547. },
  30548. {
  30549. "name": "controlPlane",
  30550. "description": "Control-plane orchestration routes."
  30551. },
  30552. {
  30553. "name": "global",
  30554. "description": "Global server routes."
  30555. },
  30556. {
  30557. "name": "event",
  30558. "description": "Instance event stream route."
  30559. },
  30560. {
  30561. "name": "config",
  30562. "description": "Experimental HttpApi config routes."
  30563. },
  30564. {
  30565. "name": "experimental",
  30566. "description": "Experimental HttpApi read-only routes."
  30567. },
  30568. {
  30569. "name": "file",
  30570. "description": "Experimental HttpApi file routes."
  30571. },
  30572. {
  30573. "name": "instance",
  30574. "description": "Experimental HttpApi instance read routes."
  30575. },
  30576. {
  30577. "name": "mcp",
  30578. "description": "Experimental HttpApi MCP routes."
  30579. },
  30580. {
  30581. "name": "project",
  30582. "description": "Experimental HttpApi project routes."
  30583. },
  30584. {
  30585. "name": "projectCopy",
  30586. "description": "Project copy naming routes."
  30587. },
  30588. {
  30589. "name": "pty",
  30590. "description": "Experimental HttpApi PTY routes."
  30591. },
  30592. {
  30593. "name": "question",
  30594. "description": "Question routes."
  30595. },
  30596. {
  30597. "name": "permission",
  30598. "description": "Experimental HttpApi permission routes."
  30599. },
  30600. {
  30601. "name": "provider",
  30602. "description": "Experimental HttpApi provider routes."
  30603. },
  30604. {
  30605. "name": "session",
  30606. "description": "Experimental HttpApi session routes."
  30607. },
  30608. {
  30609. "name": "sync",
  30610. "description": "Experimental HttpApi sync routes."
  30611. },
  30612. {
  30613. "name": "tui",
  30614. "description": "Experimental HttpApi TUI routes."
  30615. },
  30616. {
  30617. "name": "workspace",
  30618. "description": "Experimental HttpApi workspace routes."
  30619. },
  30620. {
  30621. "name": "opencode HttpApi",
  30622. "description": "Experimental HttpApi surface for selected instance routes."
  30623. },
  30624. {
  30625. "name": "opencode HttpApi",
  30626. "description": "Experimental HttpApi surface for selected instance routes."
  30627. },
  30628. {
  30629. "name": "opencode HttpApi",
  30630. "description": "Experimental HttpApi surface for selected instance routes."
  30631. },
  30632. {
  30633. "name": "sessions",
  30634. "description": "Experimental session routes."
  30635. },
  30636. {
  30637. "name": "messages",
  30638. "description": "Experimental message routes."
  30639. },
  30640. {
  30641. "name": "models",
  30642. "description": "Experimental model routes."
  30643. },
  30644. {
  30645. "name": "providers",
  30646. "description": "Experimental provider routes."
  30647. },
  30648. {
  30649. "name": "integrations",
  30650. "description": "Integration discovery and authentication routes."
  30651. },
  30652. {
  30653. "name": "opencode HttpApi",
  30654. "description": "Experimental HttpApi surface for selected instance routes."
  30655. },
  30656. {
  30657. "name": "permissions",
  30658. "description": "Experimental permission routes."
  30659. },
  30660. {
  30661. "name": "filesystem",
  30662. "description": "Experimental location-scoped filesystem routes."
  30663. },
  30664. {
  30665. "name": "commands",
  30666. "description": "Experimental command routes."
  30667. },
  30668. {
  30669. "name": "skills",
  30670. "description": "Experimental skill routes."
  30671. },
  30672. {
  30673. "name": "events",
  30674. "description": "Experimental event stream route."
  30675. },
  30676. {
  30677. "name": "pty",
  30678. "description": "Experimental location-scoped PTY routes."
  30679. },
  30680. {
  30681. "name": "session questions",
  30682. "description": "Experimental session question routes."
  30683. },
  30684. {
  30685. "name": "reference",
  30686. "description": "Location-scoped project references."
  30687. },
  30688. {
  30689. "name": "projectCopy",
  30690. "description": "Project copy management routes."
  30691. },
  30692. {
  30693. "name": "pty",
  30694. "description": "PTY websocket route."
  30695. }
  30696. ]
  30697. }