openapi.json 873 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677
  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/EventIntegrationUpdated"
  14486. },
  14487. {
  14488. "$ref": "#/components/schemas/EventCatalogUpdated"
  14489. },
  14490. {
  14491. "$ref": "#/components/schemas/EventSessionCreated"
  14492. },
  14493. {
  14494. "$ref": "#/components/schemas/EventSessionUpdated"
  14495. },
  14496. {
  14497. "$ref": "#/components/schemas/EventSessionDeleted"
  14498. },
  14499. {
  14500. "$ref": "#/components/schemas/EventMessageUpdated"
  14501. },
  14502. {
  14503. "$ref": "#/components/schemas/EventMessageRemoved"
  14504. },
  14505. {
  14506. "$ref": "#/components/schemas/EventMessagePartUpdated"
  14507. },
  14508. {
  14509. "$ref": "#/components/schemas/EventMessagePartRemoved"
  14510. },
  14511. {
  14512. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  14513. },
  14514. {
  14515. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  14516. },
  14517. {
  14518. "$ref": "#/components/schemas/EventSessionNextMoved"
  14519. },
  14520. {
  14521. "$ref": "#/components/schemas/EventSessionNextPrompted"
  14522. },
  14523. {
  14524. "$ref": "#/components/schemas/EventSessionNextPromptAdmitted"
  14525. },
  14526. {
  14527. "$ref": "#/components/schemas/EventSessionNextPromptPromoted"
  14528. },
  14529. {
  14530. "$ref": "#/components/schemas/EventSessionNextInterruptRequested"
  14531. },
  14532. {
  14533. "$ref": "#/components/schemas/EventSessionNextContextUpdated"
  14534. },
  14535. {
  14536. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  14537. },
  14538. {
  14539. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  14540. },
  14541. {
  14542. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  14543. },
  14544. {
  14545. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  14546. },
  14547. {
  14548. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  14549. },
  14550. {
  14551. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  14552. },
  14553. {
  14554. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  14555. },
  14556. {
  14557. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  14558. },
  14559. {
  14560. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  14561. },
  14562. {
  14563. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  14564. },
  14565. {
  14566. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  14567. },
  14568. {
  14569. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  14570. },
  14571. {
  14572. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  14573. },
  14574. {
  14575. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  14576. },
  14577. {
  14578. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  14579. },
  14580. {
  14581. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  14582. },
  14583. {
  14584. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  14585. },
  14586. {
  14587. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  14588. },
  14589. {
  14590. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  14591. },
  14592. {
  14593. "$ref": "#/components/schemas/EventSessionNextRetried"
  14594. },
  14595. {
  14596. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  14597. },
  14598. {
  14599. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  14600. },
  14601. {
  14602. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  14603. },
  14604. {
  14605. "$ref": "#/components/schemas/EventMessagePartDelta"
  14606. },
  14607. {
  14608. "$ref": "#/components/schemas/EventSessionDiff"
  14609. },
  14610. {
  14611. "$ref": "#/components/schemas/EventSessionError"
  14612. },
  14613. {
  14614. "$ref": "#/components/schemas/EventInstallationUpdated"
  14615. },
  14616. {
  14617. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  14618. },
  14619. {
  14620. "$ref": "#/components/schemas/EventFileEdited"
  14621. },
  14622. {
  14623. "$ref": "#/components/schemas/EventPluginAdded"
  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": ["integration.updated"]
  16658. },
  16659. "properties": {
  16660. "type": "object",
  16661. "properties": {}
  16662. }
  16663. },
  16664. "required": ["id", "type", "properties"],
  16665. "additionalProperties": false
  16666. },
  16667. {
  16668. "type": "object",
  16669. "properties": {
  16670. "id": {
  16671. "type": "string",
  16672. "pattern": "^evt_"
  16673. },
  16674. "type": {
  16675. "type": "string",
  16676. "enum": ["catalog.updated"]
  16677. },
  16678. "properties": {
  16679. "type": "object",
  16680. "properties": {}
  16681. }
  16682. },
  16683. "required": ["id", "type", "properties"],
  16684. "additionalProperties": false
  16685. },
  16686. {
  16687. "type": "object",
  16688. "properties": {
  16689. "id": {
  16690. "type": "string",
  16691. "pattern": "^evt_"
  16692. },
  16693. "type": {
  16694. "type": "string",
  16695. "enum": ["session.created"]
  16696. },
  16697. "properties": {
  16698. "type": "object",
  16699. "properties": {
  16700. "sessionID": {
  16701. "type": "string",
  16702. "pattern": "^ses"
  16703. },
  16704. "info": {
  16705. "$ref": "#/components/schemas/Session"
  16706. }
  16707. },
  16708. "required": ["sessionID", "info"],
  16709. "additionalProperties": false
  16710. }
  16711. },
  16712. "required": ["id", "type", "properties"],
  16713. "additionalProperties": false
  16714. },
  16715. {
  16716. "type": "object",
  16717. "properties": {
  16718. "id": {
  16719. "type": "string",
  16720. "pattern": "^evt_"
  16721. },
  16722. "type": {
  16723. "type": "string",
  16724. "enum": ["session.updated"]
  16725. },
  16726. "properties": {
  16727. "type": "object",
  16728. "properties": {
  16729. "sessionID": {
  16730. "type": "string",
  16731. "pattern": "^ses"
  16732. },
  16733. "info": {
  16734. "$ref": "#/components/schemas/Session"
  16735. }
  16736. },
  16737. "required": ["sessionID", "info"],
  16738. "additionalProperties": false
  16739. }
  16740. },
  16741. "required": ["id", "type", "properties"],
  16742. "additionalProperties": false
  16743. },
  16744. {
  16745. "type": "object",
  16746. "properties": {
  16747. "id": {
  16748. "type": "string",
  16749. "pattern": "^evt_"
  16750. },
  16751. "type": {
  16752. "type": "string",
  16753. "enum": ["session.deleted"]
  16754. },
  16755. "properties": {
  16756. "type": "object",
  16757. "properties": {
  16758. "sessionID": {
  16759. "type": "string",
  16760. "pattern": "^ses"
  16761. },
  16762. "info": {
  16763. "$ref": "#/components/schemas/Session"
  16764. }
  16765. },
  16766. "required": ["sessionID", "info"],
  16767. "additionalProperties": false
  16768. }
  16769. },
  16770. "required": ["id", "type", "properties"],
  16771. "additionalProperties": false
  16772. },
  16773. {
  16774. "type": "object",
  16775. "properties": {
  16776. "id": {
  16777. "type": "string",
  16778. "pattern": "^evt_"
  16779. },
  16780. "type": {
  16781. "type": "string",
  16782. "enum": ["message.updated"]
  16783. },
  16784. "properties": {
  16785. "type": "object",
  16786. "properties": {
  16787. "sessionID": {
  16788. "type": "string",
  16789. "pattern": "^ses"
  16790. },
  16791. "info": {
  16792. "$ref": "#/components/schemas/Message"
  16793. }
  16794. },
  16795. "required": ["sessionID", "info"],
  16796. "additionalProperties": false
  16797. }
  16798. },
  16799. "required": ["id", "type", "properties"],
  16800. "additionalProperties": false
  16801. },
  16802. {
  16803. "type": "object",
  16804. "properties": {
  16805. "id": {
  16806. "type": "string",
  16807. "pattern": "^evt_"
  16808. },
  16809. "type": {
  16810. "type": "string",
  16811. "enum": ["message.removed"]
  16812. },
  16813. "properties": {
  16814. "type": "object",
  16815. "properties": {
  16816. "sessionID": {
  16817. "type": "string",
  16818. "pattern": "^ses"
  16819. },
  16820. "messageID": {
  16821. "type": "string",
  16822. "pattern": "^msg"
  16823. }
  16824. },
  16825. "required": ["sessionID", "messageID"],
  16826. "additionalProperties": false
  16827. }
  16828. },
  16829. "required": ["id", "type", "properties"],
  16830. "additionalProperties": false
  16831. },
  16832. {
  16833. "type": "object",
  16834. "properties": {
  16835. "id": {
  16836. "type": "string",
  16837. "pattern": "^evt_"
  16838. },
  16839. "type": {
  16840. "type": "string",
  16841. "enum": ["message.part.updated"]
  16842. },
  16843. "properties": {
  16844. "type": "object",
  16845. "properties": {
  16846. "sessionID": {
  16847. "type": "string",
  16848. "pattern": "^ses"
  16849. },
  16850. "part": {
  16851. "$ref": "#/components/schemas/Part"
  16852. },
  16853. "time": {
  16854. "type": "number"
  16855. }
  16856. },
  16857. "required": ["sessionID", "part", "time"],
  16858. "additionalProperties": false
  16859. }
  16860. },
  16861. "required": ["id", "type", "properties"],
  16862. "additionalProperties": false
  16863. },
  16864. {
  16865. "type": "object",
  16866. "properties": {
  16867. "id": {
  16868. "type": "string",
  16869. "pattern": "^evt_"
  16870. },
  16871. "type": {
  16872. "type": "string",
  16873. "enum": ["message.part.removed"]
  16874. },
  16875. "properties": {
  16876. "type": "object",
  16877. "properties": {
  16878. "sessionID": {
  16879. "type": "string",
  16880. "pattern": "^ses"
  16881. },
  16882. "messageID": {
  16883. "type": "string",
  16884. "pattern": "^msg"
  16885. },
  16886. "partID": {
  16887. "type": "string",
  16888. "pattern": "^prt"
  16889. }
  16890. },
  16891. "required": ["sessionID", "messageID", "partID"],
  16892. "additionalProperties": false
  16893. }
  16894. },
  16895. "required": ["id", "type", "properties"],
  16896. "additionalProperties": false
  16897. },
  16898. {
  16899. "type": "object",
  16900. "properties": {
  16901. "id": {
  16902. "type": "string",
  16903. "pattern": "^evt_"
  16904. },
  16905. "type": {
  16906. "type": "string",
  16907. "enum": ["session.next.agent.switched"]
  16908. },
  16909. "properties": {
  16910. "type": "object",
  16911. "properties": {
  16912. "timestamp": {
  16913. "type": "number"
  16914. },
  16915. "sessionID": {
  16916. "type": "string",
  16917. "pattern": "^ses"
  16918. },
  16919. "messageID": {
  16920. "type": "string",
  16921. "pattern": "^msg_"
  16922. },
  16923. "agent": {
  16924. "type": "string"
  16925. }
  16926. },
  16927. "required": ["timestamp", "sessionID", "messageID", "agent"],
  16928. "additionalProperties": false
  16929. }
  16930. },
  16931. "required": ["id", "type", "properties"],
  16932. "additionalProperties": false
  16933. },
  16934. {
  16935. "type": "object",
  16936. "properties": {
  16937. "id": {
  16938. "type": "string",
  16939. "pattern": "^evt_"
  16940. },
  16941. "type": {
  16942. "type": "string",
  16943. "enum": ["session.next.model.switched"]
  16944. },
  16945. "properties": {
  16946. "type": "object",
  16947. "properties": {
  16948. "timestamp": {
  16949. "type": "number"
  16950. },
  16951. "sessionID": {
  16952. "type": "string",
  16953. "pattern": "^ses"
  16954. },
  16955. "messageID": {
  16956. "type": "string",
  16957. "pattern": "^msg_"
  16958. },
  16959. "model": {
  16960. "type": "object",
  16961. "properties": {
  16962. "id": {
  16963. "type": "string"
  16964. },
  16965. "providerID": {
  16966. "type": "string"
  16967. },
  16968. "variant": {
  16969. "type": "string"
  16970. }
  16971. },
  16972. "required": ["id", "providerID"],
  16973. "additionalProperties": false
  16974. }
  16975. },
  16976. "required": ["timestamp", "sessionID", "messageID", "model"],
  16977. "additionalProperties": false
  16978. }
  16979. },
  16980. "required": ["id", "type", "properties"],
  16981. "additionalProperties": false
  16982. },
  16983. {
  16984. "type": "object",
  16985. "properties": {
  16986. "id": {
  16987. "type": "string",
  16988. "pattern": "^evt_"
  16989. },
  16990. "type": {
  16991. "type": "string",
  16992. "enum": ["session.next.moved"]
  16993. },
  16994. "properties": {
  16995. "type": "object",
  16996. "properties": {
  16997. "timestamp": {
  16998. "type": "number"
  16999. },
  17000. "sessionID": {
  17001. "type": "string",
  17002. "pattern": "^ses"
  17003. },
  17004. "location": {
  17005. "$ref": "#/components/schemas/LocationRef"
  17006. },
  17007. "subdirectory": {
  17008. "type": "string"
  17009. }
  17010. },
  17011. "required": ["timestamp", "sessionID", "location"],
  17012. "additionalProperties": false
  17013. }
  17014. },
  17015. "required": ["id", "type", "properties"],
  17016. "additionalProperties": false
  17017. },
  17018. {
  17019. "type": "object",
  17020. "properties": {
  17021. "id": {
  17022. "type": "string",
  17023. "pattern": "^evt_"
  17024. },
  17025. "type": {
  17026. "type": "string",
  17027. "enum": ["session.next.prompted"]
  17028. },
  17029. "properties": {
  17030. "type": "object",
  17031. "properties": {
  17032. "timestamp": {
  17033. "type": "number"
  17034. },
  17035. "sessionID": {
  17036. "type": "string",
  17037. "pattern": "^ses"
  17038. },
  17039. "messageID": {
  17040. "type": "string",
  17041. "pattern": "^msg_"
  17042. },
  17043. "prompt": {
  17044. "$ref": "#/components/schemas/Prompt"
  17045. },
  17046. "delivery": {
  17047. "type": "string",
  17048. "enum": ["steer", "queue"]
  17049. }
  17050. },
  17051. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17052. "additionalProperties": false
  17053. }
  17054. },
  17055. "required": ["id", "type", "properties"],
  17056. "additionalProperties": false
  17057. },
  17058. {
  17059. "type": "object",
  17060. "properties": {
  17061. "id": {
  17062. "type": "string",
  17063. "pattern": "^evt_"
  17064. },
  17065. "type": {
  17066. "type": "string",
  17067. "enum": ["session.next.prompt.admitted"]
  17068. },
  17069. "properties": {
  17070. "type": "object",
  17071. "properties": {
  17072. "timestamp": {
  17073. "type": "number"
  17074. },
  17075. "sessionID": {
  17076. "type": "string",
  17077. "pattern": "^ses"
  17078. },
  17079. "messageID": {
  17080. "type": "string",
  17081. "pattern": "^msg_"
  17082. },
  17083. "prompt": {
  17084. "$ref": "#/components/schemas/Prompt"
  17085. },
  17086. "delivery": {
  17087. "type": "string",
  17088. "enum": ["steer", "queue"]
  17089. }
  17090. },
  17091. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  17092. "additionalProperties": false
  17093. }
  17094. },
  17095. "required": ["id", "type", "properties"],
  17096. "additionalProperties": false
  17097. },
  17098. {
  17099. "type": "object",
  17100. "properties": {
  17101. "id": {
  17102. "type": "string",
  17103. "pattern": "^evt_"
  17104. },
  17105. "type": {
  17106. "type": "string",
  17107. "enum": ["session.next.prompt.promoted"]
  17108. },
  17109. "properties": {
  17110. "type": "object",
  17111. "properties": {
  17112. "timestamp": {
  17113. "type": "number"
  17114. },
  17115. "sessionID": {
  17116. "type": "string",
  17117. "pattern": "^ses"
  17118. },
  17119. "messageID": {
  17120. "type": "string",
  17121. "pattern": "^msg_"
  17122. },
  17123. "prompt": {
  17124. "$ref": "#/components/schemas/Prompt"
  17125. },
  17126. "timeCreated": {
  17127. "type": "number"
  17128. }
  17129. },
  17130. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  17131. "additionalProperties": false
  17132. }
  17133. },
  17134. "required": ["id", "type", "properties"],
  17135. "additionalProperties": false
  17136. },
  17137. {
  17138. "type": "object",
  17139. "properties": {
  17140. "id": {
  17141. "type": "string",
  17142. "pattern": "^evt_"
  17143. },
  17144. "type": {
  17145. "type": "string",
  17146. "enum": ["session.next.interrupt.requested"]
  17147. },
  17148. "properties": {
  17149. "type": "object",
  17150. "properties": {
  17151. "timestamp": {
  17152. "type": "number"
  17153. },
  17154. "sessionID": {
  17155. "type": "string",
  17156. "pattern": "^ses"
  17157. }
  17158. },
  17159. "required": ["timestamp", "sessionID"],
  17160. "additionalProperties": false
  17161. }
  17162. },
  17163. "required": ["id", "type", "properties"],
  17164. "additionalProperties": false
  17165. },
  17166. {
  17167. "type": "object",
  17168. "properties": {
  17169. "id": {
  17170. "type": "string",
  17171. "pattern": "^evt_"
  17172. },
  17173. "type": {
  17174. "type": "string",
  17175. "enum": ["session.next.context.updated"]
  17176. },
  17177. "properties": {
  17178. "type": "object",
  17179. "properties": {
  17180. "timestamp": {
  17181. "type": "number"
  17182. },
  17183. "sessionID": {
  17184. "type": "string",
  17185. "pattern": "^ses"
  17186. },
  17187. "messageID": {
  17188. "type": "string",
  17189. "pattern": "^msg_"
  17190. },
  17191. "text": {
  17192. "type": "string"
  17193. }
  17194. },
  17195. "required": ["timestamp", "sessionID", "messageID", "text"],
  17196. "additionalProperties": false
  17197. }
  17198. },
  17199. "required": ["id", "type", "properties"],
  17200. "additionalProperties": false
  17201. },
  17202. {
  17203. "type": "object",
  17204. "properties": {
  17205. "id": {
  17206. "type": "string",
  17207. "pattern": "^evt_"
  17208. },
  17209. "type": {
  17210. "type": "string",
  17211. "enum": ["session.next.synthetic"]
  17212. },
  17213. "properties": {
  17214. "type": "object",
  17215. "properties": {
  17216. "timestamp": {
  17217. "type": "number"
  17218. },
  17219. "sessionID": {
  17220. "type": "string",
  17221. "pattern": "^ses"
  17222. },
  17223. "messageID": {
  17224. "type": "string",
  17225. "pattern": "^msg_"
  17226. },
  17227. "text": {
  17228. "type": "string"
  17229. }
  17230. },
  17231. "required": ["timestamp", "sessionID", "messageID", "text"],
  17232. "additionalProperties": false
  17233. }
  17234. },
  17235. "required": ["id", "type", "properties"],
  17236. "additionalProperties": false
  17237. },
  17238. {
  17239. "type": "object",
  17240. "properties": {
  17241. "id": {
  17242. "type": "string",
  17243. "pattern": "^evt_"
  17244. },
  17245. "type": {
  17246. "type": "string",
  17247. "enum": ["session.next.shell.started"]
  17248. },
  17249. "properties": {
  17250. "type": "object",
  17251. "properties": {
  17252. "timestamp": {
  17253. "type": "number"
  17254. },
  17255. "sessionID": {
  17256. "type": "string",
  17257. "pattern": "^ses"
  17258. },
  17259. "messageID": {
  17260. "type": "string",
  17261. "pattern": "^msg_"
  17262. },
  17263. "callID": {
  17264. "type": "string"
  17265. },
  17266. "command": {
  17267. "type": "string"
  17268. }
  17269. },
  17270. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  17271. "additionalProperties": false
  17272. }
  17273. },
  17274. "required": ["id", "type", "properties"],
  17275. "additionalProperties": false
  17276. },
  17277. {
  17278. "type": "object",
  17279. "properties": {
  17280. "id": {
  17281. "type": "string",
  17282. "pattern": "^evt_"
  17283. },
  17284. "type": {
  17285. "type": "string",
  17286. "enum": ["session.next.shell.ended"]
  17287. },
  17288. "properties": {
  17289. "type": "object",
  17290. "properties": {
  17291. "timestamp": {
  17292. "type": "number"
  17293. },
  17294. "sessionID": {
  17295. "type": "string",
  17296. "pattern": "^ses"
  17297. },
  17298. "callID": {
  17299. "type": "string"
  17300. },
  17301. "output": {
  17302. "type": "string"
  17303. }
  17304. },
  17305. "required": ["timestamp", "sessionID", "callID", "output"],
  17306. "additionalProperties": false
  17307. }
  17308. },
  17309. "required": ["id", "type", "properties"],
  17310. "additionalProperties": false
  17311. },
  17312. {
  17313. "type": "object",
  17314. "properties": {
  17315. "id": {
  17316. "type": "string",
  17317. "pattern": "^evt_"
  17318. },
  17319. "type": {
  17320. "type": "string",
  17321. "enum": ["session.next.step.started"]
  17322. },
  17323. "properties": {
  17324. "type": "object",
  17325. "properties": {
  17326. "timestamp": {
  17327. "type": "number"
  17328. },
  17329. "sessionID": {
  17330. "type": "string",
  17331. "pattern": "^ses"
  17332. },
  17333. "assistantMessageID": {
  17334. "type": "string",
  17335. "pattern": "^msg_"
  17336. },
  17337. "agent": {
  17338. "type": "string"
  17339. },
  17340. "model": {
  17341. "type": "object",
  17342. "properties": {
  17343. "id": {
  17344. "type": "string"
  17345. },
  17346. "providerID": {
  17347. "type": "string"
  17348. },
  17349. "variant": {
  17350. "type": "string"
  17351. }
  17352. },
  17353. "required": ["id", "providerID"],
  17354. "additionalProperties": false
  17355. },
  17356. "snapshot": {
  17357. "type": "string"
  17358. }
  17359. },
  17360. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  17361. "additionalProperties": false
  17362. }
  17363. },
  17364. "required": ["id", "type", "properties"],
  17365. "additionalProperties": false
  17366. },
  17367. {
  17368. "type": "object",
  17369. "properties": {
  17370. "id": {
  17371. "type": "string",
  17372. "pattern": "^evt_"
  17373. },
  17374. "type": {
  17375. "type": "string",
  17376. "enum": ["session.next.step.ended"]
  17377. },
  17378. "properties": {
  17379. "type": "object",
  17380. "properties": {
  17381. "timestamp": {
  17382. "type": "number"
  17383. },
  17384. "sessionID": {
  17385. "type": "string",
  17386. "pattern": "^ses"
  17387. },
  17388. "assistantMessageID": {
  17389. "type": "string",
  17390. "pattern": "^msg_"
  17391. },
  17392. "finish": {
  17393. "type": "string"
  17394. },
  17395. "cost": {
  17396. "type": "number"
  17397. },
  17398. "tokens": {
  17399. "type": "object",
  17400. "properties": {
  17401. "input": {
  17402. "type": "number"
  17403. },
  17404. "output": {
  17405. "type": "number"
  17406. },
  17407. "reasoning": {
  17408. "type": "number"
  17409. },
  17410. "cache": {
  17411. "type": "object",
  17412. "properties": {
  17413. "read": {
  17414. "type": "number"
  17415. },
  17416. "write": {
  17417. "type": "number"
  17418. }
  17419. },
  17420. "required": ["read", "write"],
  17421. "additionalProperties": false
  17422. }
  17423. },
  17424. "required": ["input", "output", "reasoning", "cache"],
  17425. "additionalProperties": false
  17426. },
  17427. "snapshot": {
  17428. "type": "string"
  17429. }
  17430. },
  17431. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  17432. "additionalProperties": false
  17433. }
  17434. },
  17435. "required": ["id", "type", "properties"],
  17436. "additionalProperties": false
  17437. },
  17438. {
  17439. "type": "object",
  17440. "properties": {
  17441. "id": {
  17442. "type": "string",
  17443. "pattern": "^evt_"
  17444. },
  17445. "type": {
  17446. "type": "string",
  17447. "enum": ["session.next.step.failed"]
  17448. },
  17449. "properties": {
  17450. "type": "object",
  17451. "properties": {
  17452. "timestamp": {
  17453. "type": "number"
  17454. },
  17455. "sessionID": {
  17456. "type": "string",
  17457. "pattern": "^ses"
  17458. },
  17459. "assistantMessageID": {
  17460. "type": "string",
  17461. "pattern": "^msg_"
  17462. },
  17463. "error": {
  17464. "$ref": "#/components/schemas/SessionErrorUnknown"
  17465. }
  17466. },
  17467. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  17468. "additionalProperties": false
  17469. }
  17470. },
  17471. "required": ["id", "type", "properties"],
  17472. "additionalProperties": false
  17473. },
  17474. {
  17475. "type": "object",
  17476. "properties": {
  17477. "id": {
  17478. "type": "string",
  17479. "pattern": "^evt_"
  17480. },
  17481. "type": {
  17482. "type": "string",
  17483. "enum": ["session.next.text.started"]
  17484. },
  17485. "properties": {
  17486. "type": "object",
  17487. "properties": {
  17488. "timestamp": {
  17489. "type": "number"
  17490. },
  17491. "sessionID": {
  17492. "type": "string",
  17493. "pattern": "^ses"
  17494. },
  17495. "assistantMessageID": {
  17496. "type": "string",
  17497. "pattern": "^msg_"
  17498. },
  17499. "textID": {
  17500. "type": "string"
  17501. }
  17502. },
  17503. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  17504. "additionalProperties": false
  17505. }
  17506. },
  17507. "required": ["id", "type", "properties"],
  17508. "additionalProperties": false
  17509. },
  17510. {
  17511. "type": "object",
  17512. "properties": {
  17513. "id": {
  17514. "type": "string",
  17515. "pattern": "^evt_"
  17516. },
  17517. "type": {
  17518. "type": "string",
  17519. "enum": ["session.next.text.delta"]
  17520. },
  17521. "properties": {
  17522. "type": "object",
  17523. "properties": {
  17524. "timestamp": {
  17525. "type": "number"
  17526. },
  17527. "sessionID": {
  17528. "type": "string",
  17529. "pattern": "^ses"
  17530. },
  17531. "assistantMessageID": {
  17532. "type": "string",
  17533. "pattern": "^msg_"
  17534. },
  17535. "textID": {
  17536. "type": "string"
  17537. },
  17538. "delta": {
  17539. "type": "string"
  17540. }
  17541. },
  17542. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  17543. "additionalProperties": false
  17544. }
  17545. },
  17546. "required": ["id", "type", "properties"],
  17547. "additionalProperties": false
  17548. },
  17549. {
  17550. "type": "object",
  17551. "properties": {
  17552. "id": {
  17553. "type": "string",
  17554. "pattern": "^evt_"
  17555. },
  17556. "type": {
  17557. "type": "string",
  17558. "enum": ["session.next.text.ended"]
  17559. },
  17560. "properties": {
  17561. "type": "object",
  17562. "properties": {
  17563. "timestamp": {
  17564. "type": "number"
  17565. },
  17566. "sessionID": {
  17567. "type": "string",
  17568. "pattern": "^ses"
  17569. },
  17570. "assistantMessageID": {
  17571. "type": "string",
  17572. "pattern": "^msg_"
  17573. },
  17574. "textID": {
  17575. "type": "string"
  17576. },
  17577. "text": {
  17578. "type": "string"
  17579. }
  17580. },
  17581. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  17582. "additionalProperties": false
  17583. }
  17584. },
  17585. "required": ["id", "type", "properties"],
  17586. "additionalProperties": false
  17587. },
  17588. {
  17589. "type": "object",
  17590. "properties": {
  17591. "id": {
  17592. "type": "string",
  17593. "pattern": "^evt_"
  17594. },
  17595. "type": {
  17596. "type": "string",
  17597. "enum": ["session.next.reasoning.started"]
  17598. },
  17599. "properties": {
  17600. "type": "object",
  17601. "properties": {
  17602. "timestamp": {
  17603. "type": "number"
  17604. },
  17605. "sessionID": {
  17606. "type": "string",
  17607. "pattern": "^ses"
  17608. },
  17609. "assistantMessageID": {
  17610. "type": "string",
  17611. "pattern": "^msg_"
  17612. },
  17613. "reasoningID": {
  17614. "type": "string"
  17615. },
  17616. "providerMetadata": {
  17617. "type": "object",
  17618. "additionalProperties": {
  17619. "type": "object"
  17620. }
  17621. }
  17622. },
  17623. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  17624. "additionalProperties": false
  17625. }
  17626. },
  17627. "required": ["id", "type", "properties"],
  17628. "additionalProperties": false
  17629. },
  17630. {
  17631. "type": "object",
  17632. "properties": {
  17633. "id": {
  17634. "type": "string",
  17635. "pattern": "^evt_"
  17636. },
  17637. "type": {
  17638. "type": "string",
  17639. "enum": ["session.next.reasoning.delta"]
  17640. },
  17641. "properties": {
  17642. "type": "object",
  17643. "properties": {
  17644. "timestamp": {
  17645. "type": "number"
  17646. },
  17647. "sessionID": {
  17648. "type": "string",
  17649. "pattern": "^ses"
  17650. },
  17651. "assistantMessageID": {
  17652. "type": "string",
  17653. "pattern": "^msg_"
  17654. },
  17655. "reasoningID": {
  17656. "type": "string"
  17657. },
  17658. "delta": {
  17659. "type": "string"
  17660. }
  17661. },
  17662. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  17663. "additionalProperties": false
  17664. }
  17665. },
  17666. "required": ["id", "type", "properties"],
  17667. "additionalProperties": false
  17668. },
  17669. {
  17670. "type": "object",
  17671. "properties": {
  17672. "id": {
  17673. "type": "string",
  17674. "pattern": "^evt_"
  17675. },
  17676. "type": {
  17677. "type": "string",
  17678. "enum": ["session.next.reasoning.ended"]
  17679. },
  17680. "properties": {
  17681. "type": "object",
  17682. "properties": {
  17683. "timestamp": {
  17684. "type": "number"
  17685. },
  17686. "sessionID": {
  17687. "type": "string",
  17688. "pattern": "^ses"
  17689. },
  17690. "assistantMessageID": {
  17691. "type": "string",
  17692. "pattern": "^msg_"
  17693. },
  17694. "reasoningID": {
  17695. "type": "string"
  17696. },
  17697. "text": {
  17698. "type": "string"
  17699. },
  17700. "providerMetadata": {
  17701. "type": "object",
  17702. "additionalProperties": {
  17703. "type": "object"
  17704. }
  17705. }
  17706. },
  17707. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  17708. "additionalProperties": false
  17709. }
  17710. },
  17711. "required": ["id", "type", "properties"],
  17712. "additionalProperties": false
  17713. },
  17714. {
  17715. "type": "object",
  17716. "properties": {
  17717. "id": {
  17718. "type": "string",
  17719. "pattern": "^evt_"
  17720. },
  17721. "type": {
  17722. "type": "string",
  17723. "enum": ["session.next.tool.input.started"]
  17724. },
  17725. "properties": {
  17726. "type": "object",
  17727. "properties": {
  17728. "timestamp": {
  17729. "type": "number"
  17730. },
  17731. "sessionID": {
  17732. "type": "string",
  17733. "pattern": "^ses"
  17734. },
  17735. "assistantMessageID": {
  17736. "type": "string",
  17737. "pattern": "^msg_"
  17738. },
  17739. "callID": {
  17740. "type": "string"
  17741. },
  17742. "name": {
  17743. "type": "string"
  17744. }
  17745. },
  17746. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  17747. "additionalProperties": false
  17748. }
  17749. },
  17750. "required": ["id", "type", "properties"],
  17751. "additionalProperties": false
  17752. },
  17753. {
  17754. "type": "object",
  17755. "properties": {
  17756. "id": {
  17757. "type": "string",
  17758. "pattern": "^evt_"
  17759. },
  17760. "type": {
  17761. "type": "string",
  17762. "enum": ["session.next.tool.input.delta"]
  17763. },
  17764. "properties": {
  17765. "type": "object",
  17766. "properties": {
  17767. "timestamp": {
  17768. "type": "number"
  17769. },
  17770. "sessionID": {
  17771. "type": "string",
  17772. "pattern": "^ses"
  17773. },
  17774. "assistantMessageID": {
  17775. "type": "string",
  17776. "pattern": "^msg_"
  17777. },
  17778. "callID": {
  17779. "type": "string"
  17780. },
  17781. "delta": {
  17782. "type": "string"
  17783. }
  17784. },
  17785. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  17786. "additionalProperties": false
  17787. }
  17788. },
  17789. "required": ["id", "type", "properties"],
  17790. "additionalProperties": false
  17791. },
  17792. {
  17793. "type": "object",
  17794. "properties": {
  17795. "id": {
  17796. "type": "string",
  17797. "pattern": "^evt_"
  17798. },
  17799. "type": {
  17800. "type": "string",
  17801. "enum": ["session.next.tool.input.ended"]
  17802. },
  17803. "properties": {
  17804. "type": "object",
  17805. "properties": {
  17806. "timestamp": {
  17807. "type": "number"
  17808. },
  17809. "sessionID": {
  17810. "type": "string",
  17811. "pattern": "^ses"
  17812. },
  17813. "assistantMessageID": {
  17814. "type": "string",
  17815. "pattern": "^msg_"
  17816. },
  17817. "callID": {
  17818. "type": "string"
  17819. },
  17820. "text": {
  17821. "type": "string"
  17822. }
  17823. },
  17824. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  17825. "additionalProperties": false
  17826. }
  17827. },
  17828. "required": ["id", "type", "properties"],
  17829. "additionalProperties": false
  17830. },
  17831. {
  17832. "type": "object",
  17833. "properties": {
  17834. "id": {
  17835. "type": "string",
  17836. "pattern": "^evt_"
  17837. },
  17838. "type": {
  17839. "type": "string",
  17840. "enum": ["session.next.tool.called"]
  17841. },
  17842. "properties": {
  17843. "type": "object",
  17844. "properties": {
  17845. "timestamp": {
  17846. "type": "number"
  17847. },
  17848. "sessionID": {
  17849. "type": "string",
  17850. "pattern": "^ses"
  17851. },
  17852. "assistantMessageID": {
  17853. "type": "string",
  17854. "pattern": "^msg_"
  17855. },
  17856. "callID": {
  17857. "type": "string"
  17858. },
  17859. "tool": {
  17860. "type": "string"
  17861. },
  17862. "input": {
  17863. "type": "object"
  17864. },
  17865. "provider": {
  17866. "type": "object",
  17867. "properties": {
  17868. "executed": {
  17869. "type": "boolean"
  17870. },
  17871. "metadata": {
  17872. "type": "object",
  17873. "additionalProperties": {
  17874. "type": "object"
  17875. }
  17876. }
  17877. },
  17878. "required": ["executed"],
  17879. "additionalProperties": false
  17880. }
  17881. },
  17882. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  17883. "additionalProperties": false
  17884. }
  17885. },
  17886. "required": ["id", "type", "properties"],
  17887. "additionalProperties": false
  17888. },
  17889. {
  17890. "type": "object",
  17891. "properties": {
  17892. "id": {
  17893. "type": "string",
  17894. "pattern": "^evt_"
  17895. },
  17896. "type": {
  17897. "type": "string",
  17898. "enum": ["session.next.tool.progress"]
  17899. },
  17900. "properties": {
  17901. "type": "object",
  17902. "properties": {
  17903. "timestamp": {
  17904. "type": "number"
  17905. },
  17906. "sessionID": {
  17907. "type": "string",
  17908. "pattern": "^ses"
  17909. },
  17910. "assistantMessageID": {
  17911. "type": "string",
  17912. "pattern": "^msg_"
  17913. },
  17914. "callID": {
  17915. "type": "string"
  17916. },
  17917. "structured": {
  17918. "type": "object"
  17919. },
  17920. "content": {
  17921. "type": "array",
  17922. "items": {
  17923. "anyOf": [
  17924. {
  17925. "$ref": "#/components/schemas/ToolTextContent"
  17926. },
  17927. {
  17928. "$ref": "#/components/schemas/ToolFileContent"
  17929. }
  17930. ]
  17931. }
  17932. }
  17933. },
  17934. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  17935. "additionalProperties": false
  17936. }
  17937. },
  17938. "required": ["id", "type", "properties"],
  17939. "additionalProperties": false
  17940. },
  17941. {
  17942. "type": "object",
  17943. "properties": {
  17944. "id": {
  17945. "type": "string",
  17946. "pattern": "^evt_"
  17947. },
  17948. "type": {
  17949. "type": "string",
  17950. "enum": ["session.next.tool.success"]
  17951. },
  17952. "properties": {
  17953. "type": "object",
  17954. "properties": {
  17955. "timestamp": {
  17956. "type": "number"
  17957. },
  17958. "sessionID": {
  17959. "type": "string",
  17960. "pattern": "^ses"
  17961. },
  17962. "assistantMessageID": {
  17963. "type": "string",
  17964. "pattern": "^msg_"
  17965. },
  17966. "callID": {
  17967. "type": "string"
  17968. },
  17969. "structured": {
  17970. "type": "object"
  17971. },
  17972. "content": {
  17973. "type": "array",
  17974. "items": {
  17975. "anyOf": [
  17976. {
  17977. "$ref": "#/components/schemas/ToolTextContent"
  17978. },
  17979. {
  17980. "$ref": "#/components/schemas/ToolFileContent"
  17981. }
  17982. ]
  17983. }
  17984. },
  17985. "outputPaths": {
  17986. "type": "array",
  17987. "items": {
  17988. "type": "string"
  17989. }
  17990. },
  17991. "result": {},
  17992. "provider": {
  17993. "type": "object",
  17994. "properties": {
  17995. "executed": {
  17996. "type": "boolean"
  17997. },
  17998. "metadata": {
  17999. "type": "object",
  18000. "additionalProperties": {
  18001. "type": "object"
  18002. }
  18003. }
  18004. },
  18005. "required": ["executed"],
  18006. "additionalProperties": false
  18007. }
  18008. },
  18009. "required": [
  18010. "timestamp",
  18011. "sessionID",
  18012. "assistantMessageID",
  18013. "callID",
  18014. "structured",
  18015. "content",
  18016. "provider"
  18017. ],
  18018. "additionalProperties": false
  18019. }
  18020. },
  18021. "required": ["id", "type", "properties"],
  18022. "additionalProperties": false
  18023. },
  18024. {
  18025. "type": "object",
  18026. "properties": {
  18027. "id": {
  18028. "type": "string",
  18029. "pattern": "^evt_"
  18030. },
  18031. "type": {
  18032. "type": "string",
  18033. "enum": ["session.next.tool.failed"]
  18034. },
  18035. "properties": {
  18036. "type": "object",
  18037. "properties": {
  18038. "timestamp": {
  18039. "type": "number"
  18040. },
  18041. "sessionID": {
  18042. "type": "string",
  18043. "pattern": "^ses"
  18044. },
  18045. "assistantMessageID": {
  18046. "type": "string",
  18047. "pattern": "^msg_"
  18048. },
  18049. "callID": {
  18050. "type": "string"
  18051. },
  18052. "error": {
  18053. "$ref": "#/components/schemas/SessionErrorUnknown"
  18054. },
  18055. "result": {},
  18056. "provider": {
  18057. "type": "object",
  18058. "properties": {
  18059. "executed": {
  18060. "type": "boolean"
  18061. },
  18062. "metadata": {
  18063. "type": "object",
  18064. "additionalProperties": {
  18065. "type": "object"
  18066. }
  18067. }
  18068. },
  18069. "required": ["executed"],
  18070. "additionalProperties": false
  18071. }
  18072. },
  18073. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  18074. "additionalProperties": false
  18075. }
  18076. },
  18077. "required": ["id", "type", "properties"],
  18078. "additionalProperties": false
  18079. },
  18080. {
  18081. "type": "object",
  18082. "properties": {
  18083. "id": {
  18084. "type": "string",
  18085. "pattern": "^evt_"
  18086. },
  18087. "type": {
  18088. "type": "string",
  18089. "enum": ["session.next.retried"]
  18090. },
  18091. "properties": {
  18092. "type": "object",
  18093. "properties": {
  18094. "timestamp": {
  18095. "type": "number"
  18096. },
  18097. "sessionID": {
  18098. "type": "string",
  18099. "pattern": "^ses"
  18100. },
  18101. "attempt": {
  18102. "type": "number"
  18103. },
  18104. "error": {
  18105. "$ref": "#/components/schemas/SessionNextRetry_error"
  18106. }
  18107. },
  18108. "required": ["timestamp", "sessionID", "attempt", "error"],
  18109. "additionalProperties": false
  18110. }
  18111. },
  18112. "required": ["id", "type", "properties"],
  18113. "additionalProperties": false
  18114. },
  18115. {
  18116. "type": "object",
  18117. "properties": {
  18118. "id": {
  18119. "type": "string",
  18120. "pattern": "^evt_"
  18121. },
  18122. "type": {
  18123. "type": "string",
  18124. "enum": ["session.next.compaction.started"]
  18125. },
  18126. "properties": {
  18127. "type": "object",
  18128. "properties": {
  18129. "timestamp": {
  18130. "type": "number"
  18131. },
  18132. "sessionID": {
  18133. "type": "string",
  18134. "pattern": "^ses"
  18135. },
  18136. "messageID": {
  18137. "type": "string",
  18138. "pattern": "^msg_"
  18139. },
  18140. "reason": {
  18141. "type": "string",
  18142. "enum": ["auto", "manual"]
  18143. }
  18144. },
  18145. "required": ["timestamp", "sessionID", "messageID", "reason"],
  18146. "additionalProperties": false
  18147. }
  18148. },
  18149. "required": ["id", "type", "properties"],
  18150. "additionalProperties": false
  18151. },
  18152. {
  18153. "type": "object",
  18154. "properties": {
  18155. "id": {
  18156. "type": "string",
  18157. "pattern": "^evt_"
  18158. },
  18159. "type": {
  18160. "type": "string",
  18161. "enum": ["session.next.compaction.delta"]
  18162. },
  18163. "properties": {
  18164. "type": "object",
  18165. "properties": {
  18166. "timestamp": {
  18167. "type": "number"
  18168. },
  18169. "sessionID": {
  18170. "type": "string",
  18171. "pattern": "^ses"
  18172. },
  18173. "messageID": {
  18174. "type": "string",
  18175. "pattern": "^msg_"
  18176. },
  18177. "text": {
  18178. "type": "string"
  18179. }
  18180. },
  18181. "required": ["timestamp", "sessionID", "messageID", "text"],
  18182. "additionalProperties": false
  18183. }
  18184. },
  18185. "required": ["id", "type", "properties"],
  18186. "additionalProperties": false
  18187. },
  18188. {
  18189. "type": "object",
  18190. "properties": {
  18191. "id": {
  18192. "type": "string",
  18193. "pattern": "^evt_"
  18194. },
  18195. "type": {
  18196. "type": "string",
  18197. "enum": ["session.next.compaction.ended"]
  18198. },
  18199. "properties": {
  18200. "type": "object",
  18201. "properties": {
  18202. "timestamp": {
  18203. "type": "number"
  18204. },
  18205. "sessionID": {
  18206. "type": "string",
  18207. "pattern": "^ses"
  18208. },
  18209. "messageID": {
  18210. "type": "string",
  18211. "pattern": "^msg_"
  18212. },
  18213. "reason": {
  18214. "type": "string",
  18215. "enum": ["auto", "manual"]
  18216. },
  18217. "text": {
  18218. "type": "string"
  18219. },
  18220. "recent": {
  18221. "type": "string"
  18222. }
  18223. },
  18224. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  18225. "additionalProperties": false
  18226. }
  18227. },
  18228. "required": ["id", "type", "properties"],
  18229. "additionalProperties": false
  18230. },
  18231. {
  18232. "type": "object",
  18233. "properties": {
  18234. "id": {
  18235. "type": "string",
  18236. "pattern": "^evt_"
  18237. },
  18238. "type": {
  18239. "type": "string",
  18240. "enum": ["message.part.delta"]
  18241. },
  18242. "properties": {
  18243. "type": "object",
  18244. "properties": {
  18245. "sessionID": {
  18246. "type": "string",
  18247. "pattern": "^ses"
  18248. },
  18249. "messageID": {
  18250. "type": "string",
  18251. "pattern": "^msg"
  18252. },
  18253. "partID": {
  18254. "type": "string",
  18255. "pattern": "^prt"
  18256. },
  18257. "field": {
  18258. "type": "string"
  18259. },
  18260. "delta": {
  18261. "type": "string"
  18262. }
  18263. },
  18264. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  18265. "additionalProperties": false
  18266. }
  18267. },
  18268. "required": ["id", "type", "properties"],
  18269. "additionalProperties": false
  18270. },
  18271. {
  18272. "type": "object",
  18273. "properties": {
  18274. "id": {
  18275. "type": "string",
  18276. "pattern": "^evt_"
  18277. },
  18278. "type": {
  18279. "type": "string",
  18280. "enum": ["session.diff"]
  18281. },
  18282. "properties": {
  18283. "type": "object",
  18284. "properties": {
  18285. "sessionID": {
  18286. "type": "string",
  18287. "pattern": "^ses"
  18288. },
  18289. "diff": {
  18290. "type": "array",
  18291. "items": {
  18292. "$ref": "#/components/schemas/SnapshotFileDiff"
  18293. }
  18294. }
  18295. },
  18296. "required": ["sessionID", "diff"],
  18297. "additionalProperties": false
  18298. }
  18299. },
  18300. "required": ["id", "type", "properties"],
  18301. "additionalProperties": false
  18302. },
  18303. {
  18304. "type": "object",
  18305. "properties": {
  18306. "id": {
  18307. "type": "string",
  18308. "pattern": "^evt_"
  18309. },
  18310. "type": {
  18311. "type": "string",
  18312. "enum": ["session.error"]
  18313. },
  18314. "properties": {
  18315. "type": "object",
  18316. "properties": {
  18317. "sessionID": {
  18318. "type": "string",
  18319. "pattern": "^ses"
  18320. },
  18321. "error": {
  18322. "anyOf": [
  18323. {
  18324. "$ref": "#/components/schemas/ProviderAuthError"
  18325. },
  18326. {
  18327. "$ref": "#/components/schemas/UnknownError"
  18328. },
  18329. {
  18330. "$ref": "#/components/schemas/MessageOutputLengthError"
  18331. },
  18332. {
  18333. "$ref": "#/components/schemas/MessageAbortedError"
  18334. },
  18335. {
  18336. "$ref": "#/components/schemas/StructuredOutputError"
  18337. },
  18338. {
  18339. "$ref": "#/components/schemas/ContextOverflowError"
  18340. },
  18341. {
  18342. "$ref": "#/components/schemas/ContentFilterError"
  18343. },
  18344. {
  18345. "$ref": "#/components/schemas/APIError"
  18346. }
  18347. ]
  18348. }
  18349. },
  18350. "additionalProperties": false
  18351. }
  18352. },
  18353. "required": ["id", "type", "properties"],
  18354. "additionalProperties": false
  18355. },
  18356. {
  18357. "type": "object",
  18358. "properties": {
  18359. "id": {
  18360. "type": "string",
  18361. "pattern": "^evt_"
  18362. },
  18363. "type": {
  18364. "type": "string",
  18365. "enum": ["installation.updated"]
  18366. },
  18367. "properties": {
  18368. "type": "object",
  18369. "properties": {
  18370. "version": {
  18371. "type": "string"
  18372. }
  18373. },
  18374. "required": ["version"],
  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.update-available"]
  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": ["file.edited"]
  18416. },
  18417. "properties": {
  18418. "type": "object",
  18419. "properties": {
  18420. "file": {
  18421. "type": "string"
  18422. }
  18423. },
  18424. "required": ["file"],
  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": ["plugin.added"]
  18441. },
  18442. "properties": {
  18443. "type": "object",
  18444. "properties": {
  18445. "id": {
  18446. "type": "string"
  18447. }
  18448. },
  18449. "required": ["id"],
  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. "type": "number"
  26904. }
  26905. },
  26906. "required": ["released"],
  26907. "additionalProperties": false
  26908. },
  26909. "cost": {
  26910. "type": "array",
  26911. "items": {
  26912. "type": "object",
  26913. "properties": {
  26914. "tier": {
  26915. "type": "object",
  26916. "properties": {
  26917. "type": {
  26918. "type": "string",
  26919. "enum": ["context"]
  26920. },
  26921. "size": {
  26922. "type": "integer"
  26923. }
  26924. },
  26925. "required": ["type", "size"],
  26926. "additionalProperties": false
  26927. },
  26928. "input": {
  26929. "type": "number"
  26930. },
  26931. "output": {
  26932. "type": "number"
  26933. },
  26934. "cache": {
  26935. "type": "object",
  26936. "properties": {
  26937. "read": {
  26938. "type": "number"
  26939. },
  26940. "write": {
  26941. "type": "number"
  26942. }
  26943. },
  26944. "required": ["read", "write"],
  26945. "additionalProperties": false
  26946. }
  26947. },
  26948. "required": ["input", "output", "cache"],
  26949. "additionalProperties": false
  26950. }
  26951. },
  26952. "status": {
  26953. "type": "string",
  26954. "enum": ["alpha", "beta", "deprecated", "active"]
  26955. },
  26956. "enabled": {
  26957. "type": "boolean"
  26958. },
  26959. "limit": {
  26960. "type": "object",
  26961. "properties": {
  26962. "context": {
  26963. "type": "integer"
  26964. },
  26965. "input": {
  26966. "type": "integer"
  26967. },
  26968. "output": {
  26969. "type": "integer"
  26970. }
  26971. },
  26972. "required": ["context", "output"],
  26973. "additionalProperties": false
  26974. }
  26975. },
  26976. "required": [
  26977. "id",
  26978. "providerID",
  26979. "name",
  26980. "api",
  26981. "capabilities",
  26982. "request",
  26983. "variants",
  26984. "time",
  26985. "cost",
  26986. "status",
  26987. "enabled",
  26988. "limit"
  26989. ],
  26990. "additionalProperties": false
  26991. },
  26992. "ProviderV2Info": {
  26993. "type": "object",
  26994. "properties": {
  26995. "id": {
  26996. "type": "string"
  26997. },
  26998. "name": {
  26999. "type": "string"
  27000. },
  27001. "disabled": {
  27002. "type": "boolean"
  27003. },
  27004. "api": {
  27005. "anyOf": [
  27006. {
  27007. "type": "object",
  27008. "properties": {
  27009. "type": {
  27010. "type": "string",
  27011. "enum": ["aisdk"]
  27012. },
  27013. "package": {
  27014. "type": "string"
  27015. },
  27016. "url": {
  27017. "type": "string"
  27018. },
  27019. "settings": {
  27020. "type": "object"
  27021. }
  27022. },
  27023. "required": ["type", "package"],
  27024. "additionalProperties": false
  27025. },
  27026. {
  27027. "type": "object",
  27028. "properties": {
  27029. "type": {
  27030. "type": "string",
  27031. "enum": ["native"]
  27032. },
  27033. "url": {
  27034. "type": "string"
  27035. },
  27036. "settings": {
  27037. "type": "object"
  27038. }
  27039. },
  27040. "required": ["type", "settings"],
  27041. "additionalProperties": false
  27042. }
  27043. ]
  27044. },
  27045. "request": {
  27046. "type": "object",
  27047. "properties": {
  27048. "headers": {
  27049. "type": "object",
  27050. "additionalProperties": {
  27051. "type": "string"
  27052. }
  27053. },
  27054. "body": {
  27055. "type": "object"
  27056. }
  27057. },
  27058. "required": ["headers", "body"],
  27059. "additionalProperties": false
  27060. }
  27061. },
  27062. "required": ["id", "name", "api", "request"],
  27063. "additionalProperties": false
  27064. },
  27065. "IntegrationWhen": {
  27066. "type": "object",
  27067. "properties": {
  27068. "key": {
  27069. "type": "string"
  27070. },
  27071. "op": {
  27072. "type": "string",
  27073. "enum": ["eq", "neq"]
  27074. },
  27075. "value": {
  27076. "type": "string"
  27077. }
  27078. },
  27079. "required": ["key", "op", "value"],
  27080. "additionalProperties": false
  27081. },
  27082. "IntegrationTextPrompt": {
  27083. "type": "object",
  27084. "properties": {
  27085. "type": {
  27086. "type": "string",
  27087. "enum": ["text"]
  27088. },
  27089. "key": {
  27090. "type": "string"
  27091. },
  27092. "message": {
  27093. "type": "string"
  27094. },
  27095. "placeholder": {
  27096. "type": "string"
  27097. },
  27098. "when": {
  27099. "$ref": "#/components/schemas/IntegrationWhen"
  27100. }
  27101. },
  27102. "required": ["type", "key", "message"],
  27103. "additionalProperties": false
  27104. },
  27105. "IntegrationSelectPrompt": {
  27106. "type": "object",
  27107. "properties": {
  27108. "type": {
  27109. "type": "string",
  27110. "enum": ["select"]
  27111. },
  27112. "key": {
  27113. "type": "string"
  27114. },
  27115. "message": {
  27116. "type": "string"
  27117. },
  27118. "options": {
  27119. "type": "array",
  27120. "items": {
  27121. "type": "object",
  27122. "properties": {
  27123. "label": {
  27124. "type": "string"
  27125. },
  27126. "value": {
  27127. "type": "string"
  27128. },
  27129. "hint": {
  27130. "type": "string"
  27131. }
  27132. },
  27133. "required": ["label", "value"],
  27134. "additionalProperties": false
  27135. }
  27136. },
  27137. "when": {
  27138. "$ref": "#/components/schemas/IntegrationWhen"
  27139. }
  27140. },
  27141. "required": ["type", "key", "message", "options"],
  27142. "additionalProperties": false
  27143. },
  27144. "IntegrationOAuthMethod": {
  27145. "type": "object",
  27146. "properties": {
  27147. "id": {
  27148. "type": "string"
  27149. },
  27150. "type": {
  27151. "type": "string",
  27152. "enum": ["oauth"]
  27153. },
  27154. "label": {
  27155. "type": "string"
  27156. },
  27157. "prompts": {
  27158. "type": "array",
  27159. "items": {
  27160. "anyOf": [
  27161. {
  27162. "$ref": "#/components/schemas/IntegrationTextPrompt"
  27163. },
  27164. {
  27165. "$ref": "#/components/schemas/IntegrationSelectPrompt"
  27166. }
  27167. ]
  27168. }
  27169. }
  27170. },
  27171. "required": ["id", "type", "label"],
  27172. "additionalProperties": false
  27173. },
  27174. "IntegrationKeyMethod": {
  27175. "type": "object",
  27176. "properties": {
  27177. "type": {
  27178. "type": "string",
  27179. "enum": ["key"]
  27180. },
  27181. "label": {
  27182. "type": "string"
  27183. }
  27184. },
  27185. "required": ["type"],
  27186. "additionalProperties": false
  27187. },
  27188. "IntegrationEnvMethod": {
  27189. "type": "object",
  27190. "properties": {
  27191. "type": {
  27192. "type": "string",
  27193. "enum": ["env"]
  27194. },
  27195. "names": {
  27196. "type": "array",
  27197. "items": {
  27198. "type": "string"
  27199. }
  27200. }
  27201. },
  27202. "required": ["type", "names"],
  27203. "additionalProperties": false
  27204. },
  27205. "ConnectionCredentialInfo": {
  27206. "type": "object",
  27207. "properties": {
  27208. "type": {
  27209. "type": "string",
  27210. "enum": ["credential"]
  27211. },
  27212. "id": {
  27213. "type": "string"
  27214. },
  27215. "label": {
  27216. "type": "string"
  27217. }
  27218. },
  27219. "required": ["type", "id", "label"],
  27220. "additionalProperties": false
  27221. },
  27222. "ConnectionEnvInfo": {
  27223. "type": "object",
  27224. "properties": {
  27225. "type": {
  27226. "type": "string",
  27227. "enum": ["env"]
  27228. },
  27229. "name": {
  27230. "type": "string"
  27231. }
  27232. },
  27233. "required": ["type", "name"],
  27234. "additionalProperties": false
  27235. },
  27236. "ConnectionInfo": {
  27237. "anyOf": [
  27238. {
  27239. "$ref": "#/components/schemas/ConnectionCredentialInfo"
  27240. },
  27241. {
  27242. "$ref": "#/components/schemas/ConnectionEnvInfo"
  27243. }
  27244. ]
  27245. },
  27246. "IntegrationInfo": {
  27247. "type": "object",
  27248. "properties": {
  27249. "id": {
  27250. "type": "string"
  27251. },
  27252. "name": {
  27253. "type": "string"
  27254. },
  27255. "methods": {
  27256. "type": "array",
  27257. "items": {
  27258. "anyOf": [
  27259. {
  27260. "$ref": "#/components/schemas/IntegrationOAuthMethod"
  27261. },
  27262. {
  27263. "$ref": "#/components/schemas/IntegrationKeyMethod"
  27264. },
  27265. {
  27266. "$ref": "#/components/schemas/IntegrationEnvMethod"
  27267. }
  27268. ]
  27269. }
  27270. },
  27271. "connections": {
  27272. "type": "array",
  27273. "items": {
  27274. "$ref": "#/components/schemas/ConnectionInfo"
  27275. }
  27276. }
  27277. },
  27278. "required": ["id", "name", "methods", "connections"],
  27279. "additionalProperties": false
  27280. },
  27281. "IntegrationAttempt": {
  27282. "type": "object",
  27283. "properties": {
  27284. "attemptID": {
  27285. "type": "string"
  27286. },
  27287. "url": {
  27288. "type": "string"
  27289. },
  27290. "instructions": {
  27291. "type": "string"
  27292. },
  27293. "mode": {
  27294. "type": "string",
  27295. "enum": ["auto", "code"]
  27296. },
  27297. "time": {
  27298. "type": "object",
  27299. "properties": {
  27300. "created": {
  27301. "anyOf": [
  27302. {
  27303. "type": "number"
  27304. },
  27305. {
  27306. "type": "string",
  27307. "enum": ["NaN"]
  27308. },
  27309. {
  27310. "type": "string",
  27311. "enum": ["Infinity"]
  27312. },
  27313. {
  27314. "type": "string",
  27315. "enum": ["-Infinity"]
  27316. },
  27317. {
  27318. "type": "string",
  27319. "enum": ["Infinity", "-Infinity", "NaN"]
  27320. }
  27321. ]
  27322. },
  27323. "expires": {
  27324. "anyOf": [
  27325. {
  27326. "type": "number"
  27327. },
  27328. {
  27329. "type": "string",
  27330. "enum": ["NaN"]
  27331. },
  27332. {
  27333. "type": "string",
  27334. "enum": ["Infinity"]
  27335. },
  27336. {
  27337. "type": "string",
  27338. "enum": ["-Infinity"]
  27339. },
  27340. {
  27341. "type": "string",
  27342. "enum": ["Infinity", "-Infinity", "NaN"]
  27343. }
  27344. ]
  27345. }
  27346. },
  27347. "required": ["created", "expires"],
  27348. "additionalProperties": false
  27349. }
  27350. },
  27351. "required": ["attemptID", "url", "instructions", "mode", "time"],
  27352. "additionalProperties": false
  27353. },
  27354. "PermissionV2Request": {
  27355. "type": "object",
  27356. "properties": {
  27357. "id": {
  27358. "type": "string",
  27359. "pattern": "^per"
  27360. },
  27361. "sessionID": {
  27362. "type": "string",
  27363. "pattern": "^ses"
  27364. },
  27365. "action": {
  27366. "type": "string"
  27367. },
  27368. "resources": {
  27369. "type": "array",
  27370. "items": {
  27371. "type": "string"
  27372. }
  27373. },
  27374. "save": {
  27375. "type": "array",
  27376. "items": {
  27377. "type": "string"
  27378. }
  27379. },
  27380. "metadata": {
  27381. "type": "object"
  27382. },
  27383. "source": {
  27384. "$ref": "#/components/schemas/PermissionV2Source"
  27385. }
  27386. },
  27387. "required": ["id", "sessionID", "action", "resources"],
  27388. "additionalProperties": false
  27389. },
  27390. "PermissionSavedInfo": {
  27391. "type": "object",
  27392. "properties": {
  27393. "id": {
  27394. "type": "string"
  27395. },
  27396. "projectID": {
  27397. "type": "string"
  27398. },
  27399. "action": {
  27400. "type": "string"
  27401. },
  27402. "resource": {
  27403. "type": "string"
  27404. }
  27405. },
  27406. "required": ["id", "projectID", "action", "resource"],
  27407. "additionalProperties": false
  27408. },
  27409. "FileSystemEntry": {
  27410. "type": "object",
  27411. "properties": {
  27412. "path": {
  27413. "type": "string"
  27414. },
  27415. "type": {
  27416. "type": "string",
  27417. "enum": ["file", "directory"]
  27418. },
  27419. "mime": {
  27420. "type": "string"
  27421. }
  27422. },
  27423. "required": ["path", "type", "mime"],
  27424. "additionalProperties": false
  27425. },
  27426. "CommandV2Info": {
  27427. "type": "object",
  27428. "properties": {
  27429. "name": {
  27430. "type": "string"
  27431. },
  27432. "template": {
  27433. "type": "string"
  27434. },
  27435. "description": {
  27436. "type": "string"
  27437. },
  27438. "agent": {
  27439. "type": "string"
  27440. },
  27441. "model": {
  27442. "type": "object",
  27443. "properties": {
  27444. "id": {
  27445. "type": "string"
  27446. },
  27447. "providerID": {
  27448. "type": "string"
  27449. },
  27450. "variant": {
  27451. "type": "string"
  27452. }
  27453. },
  27454. "required": ["id", "providerID"],
  27455. "additionalProperties": false
  27456. },
  27457. "subtask": {
  27458. "type": "boolean"
  27459. }
  27460. },
  27461. "required": ["name", "template"],
  27462. "additionalProperties": false
  27463. },
  27464. "SkillV2Info": {
  27465. "type": "object",
  27466. "properties": {
  27467. "name": {
  27468. "type": "string"
  27469. },
  27470. "description": {
  27471. "type": "string"
  27472. },
  27473. "slash": {
  27474. "type": "boolean"
  27475. },
  27476. "location": {
  27477. "type": "string"
  27478. },
  27479. "content": {
  27480. "type": "string"
  27481. }
  27482. },
  27483. "required": ["name", "location", "content"],
  27484. "additionalProperties": false
  27485. },
  27486. "QuestionV2Request": {
  27487. "type": "object",
  27488. "properties": {
  27489. "id": {
  27490. "type": "string",
  27491. "pattern": "^que"
  27492. },
  27493. "sessionID": {
  27494. "type": "string",
  27495. "pattern": "^ses"
  27496. },
  27497. "questions": {
  27498. "type": "array",
  27499. "items": {
  27500. "$ref": "#/components/schemas/QuestionV2Info"
  27501. },
  27502. "description": "Questions to ask"
  27503. },
  27504. "tool": {
  27505. "$ref": "#/components/schemas/QuestionV2Tool"
  27506. }
  27507. },
  27508. "required": ["id", "sessionID", "questions"],
  27509. "additionalProperties": false
  27510. },
  27511. "QuestionV2Reply": {
  27512. "type": "object",
  27513. "properties": {
  27514. "answers": {
  27515. "type": "array",
  27516. "items": {
  27517. "$ref": "#/components/schemas/QuestionV2Answer"
  27518. },
  27519. "description": "User answers in order of questions (each answer is an array of selected labels)"
  27520. }
  27521. },
  27522. "required": ["answers"],
  27523. "additionalProperties": false
  27524. },
  27525. "ReferenceLocalSource": {
  27526. "type": "object",
  27527. "properties": {
  27528. "type": {
  27529. "type": "string",
  27530. "enum": ["local"]
  27531. },
  27532. "path": {
  27533. "type": "string"
  27534. },
  27535. "description": {
  27536. "type": "string"
  27537. },
  27538. "hidden": {
  27539. "type": "boolean"
  27540. }
  27541. },
  27542. "required": ["type", "path"],
  27543. "additionalProperties": false
  27544. },
  27545. "ReferenceGitSource": {
  27546. "type": "object",
  27547. "properties": {
  27548. "type": {
  27549. "type": "string",
  27550. "enum": ["git"]
  27551. },
  27552. "repository": {
  27553. "type": "string"
  27554. },
  27555. "branch": {
  27556. "type": "string"
  27557. },
  27558. "description": {
  27559. "type": "string"
  27560. },
  27561. "hidden": {
  27562. "type": "boolean"
  27563. }
  27564. },
  27565. "required": ["type", "repository"],
  27566. "additionalProperties": false
  27567. },
  27568. "ReferenceInfo": {
  27569. "type": "object",
  27570. "properties": {
  27571. "name": {
  27572. "type": "string"
  27573. },
  27574. "path": {
  27575. "type": "string"
  27576. },
  27577. "description": {
  27578. "type": "string"
  27579. },
  27580. "hidden": {
  27581. "type": "boolean"
  27582. },
  27583. "source": {
  27584. "anyOf": [
  27585. {
  27586. "$ref": "#/components/schemas/ReferenceLocalSource"
  27587. },
  27588. {
  27589. "$ref": "#/components/schemas/ReferenceGitSource"
  27590. }
  27591. ]
  27592. }
  27593. },
  27594. "required": ["name", "path", "source"],
  27595. "additionalProperties": false
  27596. },
  27597. "ProjectCopyCopy": {
  27598. "type": "object",
  27599. "properties": {
  27600. "directory": {
  27601. "type": "string"
  27602. }
  27603. },
  27604. "required": ["directory"],
  27605. "additionalProperties": false
  27606. },
  27607. "EventModels-devRefreshed": {
  27608. "type": "object",
  27609. "properties": {
  27610. "id": {
  27611. "type": "string",
  27612. "pattern": "^evt_"
  27613. },
  27614. "type": {
  27615. "type": "string",
  27616. "enum": ["models-dev.refreshed"]
  27617. },
  27618. "properties": {
  27619. "type": "object",
  27620. "properties": {}
  27621. }
  27622. },
  27623. "required": ["id", "type", "properties"],
  27624. "additionalProperties": false
  27625. },
  27626. "EventIntegrationUpdated": {
  27627. "type": "object",
  27628. "properties": {
  27629. "id": {
  27630. "type": "string",
  27631. "pattern": "^evt_"
  27632. },
  27633. "type": {
  27634. "type": "string",
  27635. "enum": ["integration.updated"]
  27636. },
  27637. "properties": {
  27638. "type": "object",
  27639. "properties": {}
  27640. }
  27641. },
  27642. "required": ["id", "type", "properties"],
  27643. "additionalProperties": false
  27644. },
  27645. "EventCatalogUpdated": {
  27646. "type": "object",
  27647. "properties": {
  27648. "id": {
  27649. "type": "string",
  27650. "pattern": "^evt_"
  27651. },
  27652. "type": {
  27653. "type": "string",
  27654. "enum": ["catalog.updated"]
  27655. },
  27656. "properties": {
  27657. "type": "object",
  27658. "properties": {}
  27659. }
  27660. },
  27661. "required": ["id", "type", "properties"],
  27662. "additionalProperties": false
  27663. },
  27664. "EventSessionCreated": {
  27665. "type": "object",
  27666. "properties": {
  27667. "id": {
  27668. "type": "string",
  27669. "pattern": "^evt_"
  27670. },
  27671. "type": {
  27672. "type": "string",
  27673. "enum": ["session.created"]
  27674. },
  27675. "properties": {
  27676. "type": "object",
  27677. "properties": {
  27678. "sessionID": {
  27679. "type": "string",
  27680. "pattern": "^ses"
  27681. },
  27682. "info": {
  27683. "$ref": "#/components/schemas/Session"
  27684. }
  27685. },
  27686. "required": ["sessionID", "info"],
  27687. "additionalProperties": false
  27688. }
  27689. },
  27690. "required": ["id", "type", "properties"],
  27691. "additionalProperties": false
  27692. },
  27693. "EventSessionUpdated": {
  27694. "type": "object",
  27695. "properties": {
  27696. "id": {
  27697. "type": "string",
  27698. "pattern": "^evt_"
  27699. },
  27700. "type": {
  27701. "type": "string",
  27702. "enum": ["session.updated"]
  27703. },
  27704. "properties": {
  27705. "type": "object",
  27706. "properties": {
  27707. "sessionID": {
  27708. "type": "string",
  27709. "pattern": "^ses"
  27710. },
  27711. "info": {
  27712. "$ref": "#/components/schemas/Session"
  27713. }
  27714. },
  27715. "required": ["sessionID", "info"],
  27716. "additionalProperties": false
  27717. }
  27718. },
  27719. "required": ["id", "type", "properties"],
  27720. "additionalProperties": false
  27721. },
  27722. "EventSessionDeleted": {
  27723. "type": "object",
  27724. "properties": {
  27725. "id": {
  27726. "type": "string",
  27727. "pattern": "^evt_"
  27728. },
  27729. "type": {
  27730. "type": "string",
  27731. "enum": ["session.deleted"]
  27732. },
  27733. "properties": {
  27734. "type": "object",
  27735. "properties": {
  27736. "sessionID": {
  27737. "type": "string",
  27738. "pattern": "^ses"
  27739. },
  27740. "info": {
  27741. "$ref": "#/components/schemas/Session"
  27742. }
  27743. },
  27744. "required": ["sessionID", "info"],
  27745. "additionalProperties": false
  27746. }
  27747. },
  27748. "required": ["id", "type", "properties"],
  27749. "additionalProperties": false
  27750. },
  27751. "EventMessageUpdated": {
  27752. "type": "object",
  27753. "properties": {
  27754. "id": {
  27755. "type": "string",
  27756. "pattern": "^evt_"
  27757. },
  27758. "type": {
  27759. "type": "string",
  27760. "enum": ["message.updated"]
  27761. },
  27762. "properties": {
  27763. "type": "object",
  27764. "properties": {
  27765. "sessionID": {
  27766. "type": "string",
  27767. "pattern": "^ses"
  27768. },
  27769. "info": {
  27770. "$ref": "#/components/schemas/Message"
  27771. }
  27772. },
  27773. "required": ["sessionID", "info"],
  27774. "additionalProperties": false
  27775. }
  27776. },
  27777. "required": ["id", "type", "properties"],
  27778. "additionalProperties": false
  27779. },
  27780. "EventMessageRemoved": {
  27781. "type": "object",
  27782. "properties": {
  27783. "id": {
  27784. "type": "string",
  27785. "pattern": "^evt_"
  27786. },
  27787. "type": {
  27788. "type": "string",
  27789. "enum": ["message.removed"]
  27790. },
  27791. "properties": {
  27792. "type": "object",
  27793. "properties": {
  27794. "sessionID": {
  27795. "type": "string",
  27796. "pattern": "^ses"
  27797. },
  27798. "messageID": {
  27799. "type": "string",
  27800. "pattern": "^msg"
  27801. }
  27802. },
  27803. "required": ["sessionID", "messageID"],
  27804. "additionalProperties": false
  27805. }
  27806. },
  27807. "required": ["id", "type", "properties"],
  27808. "additionalProperties": false
  27809. },
  27810. "EventMessagePartUpdated": {
  27811. "type": "object",
  27812. "properties": {
  27813. "id": {
  27814. "type": "string",
  27815. "pattern": "^evt_"
  27816. },
  27817. "type": {
  27818. "type": "string",
  27819. "enum": ["message.part.updated"]
  27820. },
  27821. "properties": {
  27822. "type": "object",
  27823. "properties": {
  27824. "sessionID": {
  27825. "type": "string",
  27826. "pattern": "^ses"
  27827. },
  27828. "part": {
  27829. "$ref": "#/components/schemas/Part"
  27830. },
  27831. "time": {
  27832. "type": "number"
  27833. }
  27834. },
  27835. "required": ["sessionID", "part", "time"],
  27836. "additionalProperties": false
  27837. }
  27838. },
  27839. "required": ["id", "type", "properties"],
  27840. "additionalProperties": false
  27841. },
  27842. "EventMessagePartRemoved": {
  27843. "type": "object",
  27844. "properties": {
  27845. "id": {
  27846. "type": "string",
  27847. "pattern": "^evt_"
  27848. },
  27849. "type": {
  27850. "type": "string",
  27851. "enum": ["message.part.removed"]
  27852. },
  27853. "properties": {
  27854. "type": "object",
  27855. "properties": {
  27856. "sessionID": {
  27857. "type": "string",
  27858. "pattern": "^ses"
  27859. },
  27860. "messageID": {
  27861. "type": "string",
  27862. "pattern": "^msg"
  27863. },
  27864. "partID": {
  27865. "type": "string",
  27866. "pattern": "^prt"
  27867. }
  27868. },
  27869. "required": ["sessionID", "messageID", "partID"],
  27870. "additionalProperties": false
  27871. }
  27872. },
  27873. "required": ["id", "type", "properties"],
  27874. "additionalProperties": false
  27875. },
  27876. "EventSessionNextAgentSwitched": {
  27877. "type": "object",
  27878. "properties": {
  27879. "id": {
  27880. "type": "string",
  27881. "pattern": "^evt_"
  27882. },
  27883. "type": {
  27884. "type": "string",
  27885. "enum": ["session.next.agent.switched"]
  27886. },
  27887. "properties": {
  27888. "type": "object",
  27889. "properties": {
  27890. "timestamp": {
  27891. "type": "number"
  27892. },
  27893. "sessionID": {
  27894. "type": "string",
  27895. "pattern": "^ses"
  27896. },
  27897. "messageID": {
  27898. "type": "string",
  27899. "pattern": "^msg_"
  27900. },
  27901. "agent": {
  27902. "type": "string"
  27903. }
  27904. },
  27905. "required": ["timestamp", "sessionID", "messageID", "agent"],
  27906. "additionalProperties": false
  27907. }
  27908. },
  27909. "required": ["id", "type", "properties"],
  27910. "additionalProperties": false
  27911. },
  27912. "EventSessionNextModelSwitched": {
  27913. "type": "object",
  27914. "properties": {
  27915. "id": {
  27916. "type": "string",
  27917. "pattern": "^evt_"
  27918. },
  27919. "type": {
  27920. "type": "string",
  27921. "enum": ["session.next.model.switched"]
  27922. },
  27923. "properties": {
  27924. "type": "object",
  27925. "properties": {
  27926. "timestamp": {
  27927. "type": "number"
  27928. },
  27929. "sessionID": {
  27930. "type": "string",
  27931. "pattern": "^ses"
  27932. },
  27933. "messageID": {
  27934. "type": "string",
  27935. "pattern": "^msg_"
  27936. },
  27937. "model": {
  27938. "type": "object",
  27939. "properties": {
  27940. "id": {
  27941. "type": "string"
  27942. },
  27943. "providerID": {
  27944. "type": "string"
  27945. },
  27946. "variant": {
  27947. "type": "string"
  27948. }
  27949. },
  27950. "required": ["id", "providerID"],
  27951. "additionalProperties": false
  27952. }
  27953. },
  27954. "required": ["timestamp", "sessionID", "messageID", "model"],
  27955. "additionalProperties": false
  27956. }
  27957. },
  27958. "required": ["id", "type", "properties"],
  27959. "additionalProperties": false
  27960. },
  27961. "EventSessionNextMoved": {
  27962. "type": "object",
  27963. "properties": {
  27964. "id": {
  27965. "type": "string",
  27966. "pattern": "^evt_"
  27967. },
  27968. "type": {
  27969. "type": "string",
  27970. "enum": ["session.next.moved"]
  27971. },
  27972. "properties": {
  27973. "type": "object",
  27974. "properties": {
  27975. "timestamp": {
  27976. "type": "number"
  27977. },
  27978. "sessionID": {
  27979. "type": "string",
  27980. "pattern": "^ses"
  27981. },
  27982. "location": {
  27983. "$ref": "#/components/schemas/LocationRef"
  27984. },
  27985. "subdirectory": {
  27986. "type": "string"
  27987. }
  27988. },
  27989. "required": ["timestamp", "sessionID", "location"],
  27990. "additionalProperties": false
  27991. }
  27992. },
  27993. "required": ["id", "type", "properties"],
  27994. "additionalProperties": false
  27995. },
  27996. "EventSessionNextPrompted": {
  27997. "type": "object",
  27998. "properties": {
  27999. "id": {
  28000. "type": "string",
  28001. "pattern": "^evt_"
  28002. },
  28003. "type": {
  28004. "type": "string",
  28005. "enum": ["session.next.prompted"]
  28006. },
  28007. "properties": {
  28008. "type": "object",
  28009. "properties": {
  28010. "timestamp": {
  28011. "type": "number"
  28012. },
  28013. "sessionID": {
  28014. "type": "string",
  28015. "pattern": "^ses"
  28016. },
  28017. "messageID": {
  28018. "type": "string",
  28019. "pattern": "^msg_"
  28020. },
  28021. "prompt": {
  28022. "$ref": "#/components/schemas/Prompt"
  28023. },
  28024. "delivery": {
  28025. "type": "string",
  28026. "enum": ["steer", "queue"]
  28027. }
  28028. },
  28029. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28030. "additionalProperties": false
  28031. }
  28032. },
  28033. "required": ["id", "type", "properties"],
  28034. "additionalProperties": false
  28035. },
  28036. "EventSessionNextPromptAdmitted": {
  28037. "type": "object",
  28038. "properties": {
  28039. "id": {
  28040. "type": "string",
  28041. "pattern": "^evt_"
  28042. },
  28043. "type": {
  28044. "type": "string",
  28045. "enum": ["session.next.prompt.admitted"]
  28046. },
  28047. "properties": {
  28048. "type": "object",
  28049. "properties": {
  28050. "timestamp": {
  28051. "type": "number"
  28052. },
  28053. "sessionID": {
  28054. "type": "string",
  28055. "pattern": "^ses"
  28056. },
  28057. "messageID": {
  28058. "type": "string",
  28059. "pattern": "^msg_"
  28060. },
  28061. "prompt": {
  28062. "$ref": "#/components/schemas/Prompt"
  28063. },
  28064. "delivery": {
  28065. "type": "string",
  28066. "enum": ["steer", "queue"]
  28067. }
  28068. },
  28069. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28070. "additionalProperties": false
  28071. }
  28072. },
  28073. "required": ["id", "type", "properties"],
  28074. "additionalProperties": false
  28075. },
  28076. "EventSessionNextPromptPromoted": {
  28077. "type": "object",
  28078. "properties": {
  28079. "id": {
  28080. "type": "string",
  28081. "pattern": "^evt_"
  28082. },
  28083. "type": {
  28084. "type": "string",
  28085. "enum": ["session.next.prompt.promoted"]
  28086. },
  28087. "properties": {
  28088. "type": "object",
  28089. "properties": {
  28090. "timestamp": {
  28091. "type": "number"
  28092. },
  28093. "sessionID": {
  28094. "type": "string",
  28095. "pattern": "^ses"
  28096. },
  28097. "messageID": {
  28098. "type": "string",
  28099. "pattern": "^msg_"
  28100. },
  28101. "prompt": {
  28102. "$ref": "#/components/schemas/Prompt"
  28103. },
  28104. "timeCreated": {
  28105. "type": "number"
  28106. }
  28107. },
  28108. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  28109. "additionalProperties": false
  28110. }
  28111. },
  28112. "required": ["id", "type", "properties"],
  28113. "additionalProperties": false
  28114. },
  28115. "EventSessionNextInterruptRequested": {
  28116. "type": "object",
  28117. "properties": {
  28118. "id": {
  28119. "type": "string",
  28120. "pattern": "^evt_"
  28121. },
  28122. "type": {
  28123. "type": "string",
  28124. "enum": ["session.next.interrupt.requested"]
  28125. },
  28126. "properties": {
  28127. "type": "object",
  28128. "properties": {
  28129. "timestamp": {
  28130. "type": "number"
  28131. },
  28132. "sessionID": {
  28133. "type": "string",
  28134. "pattern": "^ses"
  28135. }
  28136. },
  28137. "required": ["timestamp", "sessionID"],
  28138. "additionalProperties": false
  28139. }
  28140. },
  28141. "required": ["id", "type", "properties"],
  28142. "additionalProperties": false
  28143. },
  28144. "EventSessionNextContextUpdated": {
  28145. "type": "object",
  28146. "properties": {
  28147. "id": {
  28148. "type": "string",
  28149. "pattern": "^evt_"
  28150. },
  28151. "type": {
  28152. "type": "string",
  28153. "enum": ["session.next.context.updated"]
  28154. },
  28155. "properties": {
  28156. "type": "object",
  28157. "properties": {
  28158. "timestamp": {
  28159. "type": "number"
  28160. },
  28161. "sessionID": {
  28162. "type": "string",
  28163. "pattern": "^ses"
  28164. },
  28165. "messageID": {
  28166. "type": "string",
  28167. "pattern": "^msg_"
  28168. },
  28169. "text": {
  28170. "type": "string"
  28171. }
  28172. },
  28173. "required": ["timestamp", "sessionID", "messageID", "text"],
  28174. "additionalProperties": false
  28175. }
  28176. },
  28177. "required": ["id", "type", "properties"],
  28178. "additionalProperties": false
  28179. },
  28180. "EventSessionNextSynthetic": {
  28181. "type": "object",
  28182. "properties": {
  28183. "id": {
  28184. "type": "string",
  28185. "pattern": "^evt_"
  28186. },
  28187. "type": {
  28188. "type": "string",
  28189. "enum": ["session.next.synthetic"]
  28190. },
  28191. "properties": {
  28192. "type": "object",
  28193. "properties": {
  28194. "timestamp": {
  28195. "type": "number"
  28196. },
  28197. "sessionID": {
  28198. "type": "string",
  28199. "pattern": "^ses"
  28200. },
  28201. "messageID": {
  28202. "type": "string",
  28203. "pattern": "^msg_"
  28204. },
  28205. "text": {
  28206. "type": "string"
  28207. }
  28208. },
  28209. "required": ["timestamp", "sessionID", "messageID", "text"],
  28210. "additionalProperties": false
  28211. }
  28212. },
  28213. "required": ["id", "type", "properties"],
  28214. "additionalProperties": false
  28215. },
  28216. "EventSessionNextShellStarted": {
  28217. "type": "object",
  28218. "properties": {
  28219. "id": {
  28220. "type": "string",
  28221. "pattern": "^evt_"
  28222. },
  28223. "type": {
  28224. "type": "string",
  28225. "enum": ["session.next.shell.started"]
  28226. },
  28227. "properties": {
  28228. "type": "object",
  28229. "properties": {
  28230. "timestamp": {
  28231. "type": "number"
  28232. },
  28233. "sessionID": {
  28234. "type": "string",
  28235. "pattern": "^ses"
  28236. },
  28237. "messageID": {
  28238. "type": "string",
  28239. "pattern": "^msg_"
  28240. },
  28241. "callID": {
  28242. "type": "string"
  28243. },
  28244. "command": {
  28245. "type": "string"
  28246. }
  28247. },
  28248. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  28249. "additionalProperties": false
  28250. }
  28251. },
  28252. "required": ["id", "type", "properties"],
  28253. "additionalProperties": false
  28254. },
  28255. "EventSessionNextShellEnded": {
  28256. "type": "object",
  28257. "properties": {
  28258. "id": {
  28259. "type": "string",
  28260. "pattern": "^evt_"
  28261. },
  28262. "type": {
  28263. "type": "string",
  28264. "enum": ["session.next.shell.ended"]
  28265. },
  28266. "properties": {
  28267. "type": "object",
  28268. "properties": {
  28269. "timestamp": {
  28270. "type": "number"
  28271. },
  28272. "sessionID": {
  28273. "type": "string",
  28274. "pattern": "^ses"
  28275. },
  28276. "callID": {
  28277. "type": "string"
  28278. },
  28279. "output": {
  28280. "type": "string"
  28281. }
  28282. },
  28283. "required": ["timestamp", "sessionID", "callID", "output"],
  28284. "additionalProperties": false
  28285. }
  28286. },
  28287. "required": ["id", "type", "properties"],
  28288. "additionalProperties": false
  28289. },
  28290. "EventSessionNextStepStarted": {
  28291. "type": "object",
  28292. "properties": {
  28293. "id": {
  28294. "type": "string",
  28295. "pattern": "^evt_"
  28296. },
  28297. "type": {
  28298. "type": "string",
  28299. "enum": ["session.next.step.started"]
  28300. },
  28301. "properties": {
  28302. "type": "object",
  28303. "properties": {
  28304. "timestamp": {
  28305. "type": "number"
  28306. },
  28307. "sessionID": {
  28308. "type": "string",
  28309. "pattern": "^ses"
  28310. },
  28311. "assistantMessageID": {
  28312. "type": "string",
  28313. "pattern": "^msg_"
  28314. },
  28315. "agent": {
  28316. "type": "string"
  28317. },
  28318. "model": {
  28319. "type": "object",
  28320. "properties": {
  28321. "id": {
  28322. "type": "string"
  28323. },
  28324. "providerID": {
  28325. "type": "string"
  28326. },
  28327. "variant": {
  28328. "type": "string"
  28329. }
  28330. },
  28331. "required": ["id", "providerID"],
  28332. "additionalProperties": false
  28333. },
  28334. "snapshot": {
  28335. "type": "string"
  28336. }
  28337. },
  28338. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  28339. "additionalProperties": false
  28340. }
  28341. },
  28342. "required": ["id", "type", "properties"],
  28343. "additionalProperties": false
  28344. },
  28345. "EventSessionNextStepEnded": {
  28346. "type": "object",
  28347. "properties": {
  28348. "id": {
  28349. "type": "string",
  28350. "pattern": "^evt_"
  28351. },
  28352. "type": {
  28353. "type": "string",
  28354. "enum": ["session.next.step.ended"]
  28355. },
  28356. "properties": {
  28357. "type": "object",
  28358. "properties": {
  28359. "timestamp": {
  28360. "type": "number"
  28361. },
  28362. "sessionID": {
  28363. "type": "string",
  28364. "pattern": "^ses"
  28365. },
  28366. "assistantMessageID": {
  28367. "type": "string",
  28368. "pattern": "^msg_"
  28369. },
  28370. "finish": {
  28371. "type": "string"
  28372. },
  28373. "cost": {
  28374. "type": "number"
  28375. },
  28376. "tokens": {
  28377. "type": "object",
  28378. "properties": {
  28379. "input": {
  28380. "type": "number"
  28381. },
  28382. "output": {
  28383. "type": "number"
  28384. },
  28385. "reasoning": {
  28386. "type": "number"
  28387. },
  28388. "cache": {
  28389. "type": "object",
  28390. "properties": {
  28391. "read": {
  28392. "type": "number"
  28393. },
  28394. "write": {
  28395. "type": "number"
  28396. }
  28397. },
  28398. "required": ["read", "write"],
  28399. "additionalProperties": false
  28400. }
  28401. },
  28402. "required": ["input", "output", "reasoning", "cache"],
  28403. "additionalProperties": false
  28404. },
  28405. "snapshot": {
  28406. "type": "string"
  28407. }
  28408. },
  28409. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  28410. "additionalProperties": false
  28411. }
  28412. },
  28413. "required": ["id", "type", "properties"],
  28414. "additionalProperties": false
  28415. },
  28416. "EventSessionNextStepFailed": {
  28417. "type": "object",
  28418. "properties": {
  28419. "id": {
  28420. "type": "string",
  28421. "pattern": "^evt_"
  28422. },
  28423. "type": {
  28424. "type": "string",
  28425. "enum": ["session.next.step.failed"]
  28426. },
  28427. "properties": {
  28428. "type": "object",
  28429. "properties": {
  28430. "timestamp": {
  28431. "type": "number"
  28432. },
  28433. "sessionID": {
  28434. "type": "string",
  28435. "pattern": "^ses"
  28436. },
  28437. "assistantMessageID": {
  28438. "type": "string",
  28439. "pattern": "^msg_"
  28440. },
  28441. "error": {
  28442. "$ref": "#/components/schemas/SessionErrorUnknown"
  28443. }
  28444. },
  28445. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  28446. "additionalProperties": false
  28447. }
  28448. },
  28449. "required": ["id", "type", "properties"],
  28450. "additionalProperties": false
  28451. },
  28452. "EventSessionNextTextStarted": {
  28453. "type": "object",
  28454. "properties": {
  28455. "id": {
  28456. "type": "string",
  28457. "pattern": "^evt_"
  28458. },
  28459. "type": {
  28460. "type": "string",
  28461. "enum": ["session.next.text.started"]
  28462. },
  28463. "properties": {
  28464. "type": "object",
  28465. "properties": {
  28466. "timestamp": {
  28467. "type": "number"
  28468. },
  28469. "sessionID": {
  28470. "type": "string",
  28471. "pattern": "^ses"
  28472. },
  28473. "assistantMessageID": {
  28474. "type": "string",
  28475. "pattern": "^msg_"
  28476. },
  28477. "textID": {
  28478. "type": "string"
  28479. }
  28480. },
  28481. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  28482. "additionalProperties": false
  28483. }
  28484. },
  28485. "required": ["id", "type", "properties"],
  28486. "additionalProperties": false
  28487. },
  28488. "EventSessionNextTextDelta": {
  28489. "type": "object",
  28490. "properties": {
  28491. "id": {
  28492. "type": "string",
  28493. "pattern": "^evt_"
  28494. },
  28495. "type": {
  28496. "type": "string",
  28497. "enum": ["session.next.text.delta"]
  28498. },
  28499. "properties": {
  28500. "type": "object",
  28501. "properties": {
  28502. "timestamp": {
  28503. "type": "number"
  28504. },
  28505. "sessionID": {
  28506. "type": "string",
  28507. "pattern": "^ses"
  28508. },
  28509. "assistantMessageID": {
  28510. "type": "string",
  28511. "pattern": "^msg_"
  28512. },
  28513. "textID": {
  28514. "type": "string"
  28515. },
  28516. "delta": {
  28517. "type": "string"
  28518. }
  28519. },
  28520. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  28521. "additionalProperties": false
  28522. }
  28523. },
  28524. "required": ["id", "type", "properties"],
  28525. "additionalProperties": false
  28526. },
  28527. "EventSessionNextTextEnded": {
  28528. "type": "object",
  28529. "properties": {
  28530. "id": {
  28531. "type": "string",
  28532. "pattern": "^evt_"
  28533. },
  28534. "type": {
  28535. "type": "string",
  28536. "enum": ["session.next.text.ended"]
  28537. },
  28538. "properties": {
  28539. "type": "object",
  28540. "properties": {
  28541. "timestamp": {
  28542. "type": "number"
  28543. },
  28544. "sessionID": {
  28545. "type": "string",
  28546. "pattern": "^ses"
  28547. },
  28548. "assistantMessageID": {
  28549. "type": "string",
  28550. "pattern": "^msg_"
  28551. },
  28552. "textID": {
  28553. "type": "string"
  28554. },
  28555. "text": {
  28556. "type": "string"
  28557. }
  28558. },
  28559. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  28560. "additionalProperties": false
  28561. }
  28562. },
  28563. "required": ["id", "type", "properties"],
  28564. "additionalProperties": false
  28565. },
  28566. "EventSessionNextReasoningStarted": {
  28567. "type": "object",
  28568. "properties": {
  28569. "id": {
  28570. "type": "string",
  28571. "pattern": "^evt_"
  28572. },
  28573. "type": {
  28574. "type": "string",
  28575. "enum": ["session.next.reasoning.started"]
  28576. },
  28577. "properties": {
  28578. "type": "object",
  28579. "properties": {
  28580. "timestamp": {
  28581. "type": "number"
  28582. },
  28583. "sessionID": {
  28584. "type": "string",
  28585. "pattern": "^ses"
  28586. },
  28587. "assistantMessageID": {
  28588. "type": "string",
  28589. "pattern": "^msg_"
  28590. },
  28591. "reasoningID": {
  28592. "type": "string"
  28593. },
  28594. "providerMetadata": {
  28595. "type": "object",
  28596. "additionalProperties": {
  28597. "type": "object"
  28598. }
  28599. }
  28600. },
  28601. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  28602. "additionalProperties": false
  28603. }
  28604. },
  28605. "required": ["id", "type", "properties"],
  28606. "additionalProperties": false
  28607. },
  28608. "EventSessionNextReasoningDelta": {
  28609. "type": "object",
  28610. "properties": {
  28611. "id": {
  28612. "type": "string",
  28613. "pattern": "^evt_"
  28614. },
  28615. "type": {
  28616. "type": "string",
  28617. "enum": ["session.next.reasoning.delta"]
  28618. },
  28619. "properties": {
  28620. "type": "object",
  28621. "properties": {
  28622. "timestamp": {
  28623. "type": "number"
  28624. },
  28625. "sessionID": {
  28626. "type": "string",
  28627. "pattern": "^ses"
  28628. },
  28629. "assistantMessageID": {
  28630. "type": "string",
  28631. "pattern": "^msg_"
  28632. },
  28633. "reasoningID": {
  28634. "type": "string"
  28635. },
  28636. "delta": {
  28637. "type": "string"
  28638. }
  28639. },
  28640. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  28641. "additionalProperties": false
  28642. }
  28643. },
  28644. "required": ["id", "type", "properties"],
  28645. "additionalProperties": false
  28646. },
  28647. "EventSessionNextReasoningEnded": {
  28648. "type": "object",
  28649. "properties": {
  28650. "id": {
  28651. "type": "string",
  28652. "pattern": "^evt_"
  28653. },
  28654. "type": {
  28655. "type": "string",
  28656. "enum": ["session.next.reasoning.ended"]
  28657. },
  28658. "properties": {
  28659. "type": "object",
  28660. "properties": {
  28661. "timestamp": {
  28662. "type": "number"
  28663. },
  28664. "sessionID": {
  28665. "type": "string",
  28666. "pattern": "^ses"
  28667. },
  28668. "assistantMessageID": {
  28669. "type": "string",
  28670. "pattern": "^msg_"
  28671. },
  28672. "reasoningID": {
  28673. "type": "string"
  28674. },
  28675. "text": {
  28676. "type": "string"
  28677. },
  28678. "providerMetadata": {
  28679. "type": "object",
  28680. "additionalProperties": {
  28681. "type": "object"
  28682. }
  28683. }
  28684. },
  28685. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  28686. "additionalProperties": false
  28687. }
  28688. },
  28689. "required": ["id", "type", "properties"],
  28690. "additionalProperties": false
  28691. },
  28692. "EventSessionNextToolInputStarted": {
  28693. "type": "object",
  28694. "properties": {
  28695. "id": {
  28696. "type": "string",
  28697. "pattern": "^evt_"
  28698. },
  28699. "type": {
  28700. "type": "string",
  28701. "enum": ["session.next.tool.input.started"]
  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. "callID": {
  28718. "type": "string"
  28719. },
  28720. "name": {
  28721. "type": "string"
  28722. }
  28723. },
  28724. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  28725. "additionalProperties": false
  28726. }
  28727. },
  28728. "required": ["id", "type", "properties"],
  28729. "additionalProperties": false
  28730. },
  28731. "EventSessionNextToolInputDelta": {
  28732. "type": "object",
  28733. "properties": {
  28734. "id": {
  28735. "type": "string",
  28736. "pattern": "^evt_"
  28737. },
  28738. "type": {
  28739. "type": "string",
  28740. "enum": ["session.next.tool.input.delta"]
  28741. },
  28742. "properties": {
  28743. "type": "object",
  28744. "properties": {
  28745. "timestamp": {
  28746. "type": "number"
  28747. },
  28748. "sessionID": {
  28749. "type": "string",
  28750. "pattern": "^ses"
  28751. },
  28752. "assistantMessageID": {
  28753. "type": "string",
  28754. "pattern": "^msg_"
  28755. },
  28756. "callID": {
  28757. "type": "string"
  28758. },
  28759. "delta": {
  28760. "type": "string"
  28761. }
  28762. },
  28763. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  28764. "additionalProperties": false
  28765. }
  28766. },
  28767. "required": ["id", "type", "properties"],
  28768. "additionalProperties": false
  28769. },
  28770. "EventSessionNextToolInputEnded": {
  28771. "type": "object",
  28772. "properties": {
  28773. "id": {
  28774. "type": "string",
  28775. "pattern": "^evt_"
  28776. },
  28777. "type": {
  28778. "type": "string",
  28779. "enum": ["session.next.tool.input.ended"]
  28780. },
  28781. "properties": {
  28782. "type": "object",
  28783. "properties": {
  28784. "timestamp": {
  28785. "type": "number"
  28786. },
  28787. "sessionID": {
  28788. "type": "string",
  28789. "pattern": "^ses"
  28790. },
  28791. "assistantMessageID": {
  28792. "type": "string",
  28793. "pattern": "^msg_"
  28794. },
  28795. "callID": {
  28796. "type": "string"
  28797. },
  28798. "text": {
  28799. "type": "string"
  28800. }
  28801. },
  28802. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  28803. "additionalProperties": false
  28804. }
  28805. },
  28806. "required": ["id", "type", "properties"],
  28807. "additionalProperties": false
  28808. },
  28809. "EventSessionNextToolCalled": {
  28810. "type": "object",
  28811. "properties": {
  28812. "id": {
  28813. "type": "string",
  28814. "pattern": "^evt_"
  28815. },
  28816. "type": {
  28817. "type": "string",
  28818. "enum": ["session.next.tool.called"]
  28819. },
  28820. "properties": {
  28821. "type": "object",
  28822. "properties": {
  28823. "timestamp": {
  28824. "type": "number"
  28825. },
  28826. "sessionID": {
  28827. "type": "string",
  28828. "pattern": "^ses"
  28829. },
  28830. "assistantMessageID": {
  28831. "type": "string",
  28832. "pattern": "^msg_"
  28833. },
  28834. "callID": {
  28835. "type": "string"
  28836. },
  28837. "tool": {
  28838. "type": "string"
  28839. },
  28840. "input": {
  28841. "type": "object"
  28842. },
  28843. "provider": {
  28844. "type": "object",
  28845. "properties": {
  28846. "executed": {
  28847. "type": "boolean"
  28848. },
  28849. "metadata": {
  28850. "type": "object",
  28851. "additionalProperties": {
  28852. "type": "object"
  28853. }
  28854. }
  28855. },
  28856. "required": ["executed"],
  28857. "additionalProperties": false
  28858. }
  28859. },
  28860. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  28861. "additionalProperties": false
  28862. }
  28863. },
  28864. "required": ["id", "type", "properties"],
  28865. "additionalProperties": false
  28866. },
  28867. "EventSessionNextToolProgress": {
  28868. "type": "object",
  28869. "properties": {
  28870. "id": {
  28871. "type": "string",
  28872. "pattern": "^evt_"
  28873. },
  28874. "type": {
  28875. "type": "string",
  28876. "enum": ["session.next.tool.progress"]
  28877. },
  28878. "properties": {
  28879. "type": "object",
  28880. "properties": {
  28881. "timestamp": {
  28882. "type": "number"
  28883. },
  28884. "sessionID": {
  28885. "type": "string",
  28886. "pattern": "^ses"
  28887. },
  28888. "assistantMessageID": {
  28889. "type": "string",
  28890. "pattern": "^msg_"
  28891. },
  28892. "callID": {
  28893. "type": "string"
  28894. },
  28895. "structured": {
  28896. "type": "object"
  28897. },
  28898. "content": {
  28899. "type": "array",
  28900. "items": {
  28901. "anyOf": [
  28902. {
  28903. "$ref": "#/components/schemas/ToolTextContent"
  28904. },
  28905. {
  28906. "$ref": "#/components/schemas/ToolFileContent"
  28907. }
  28908. ]
  28909. }
  28910. }
  28911. },
  28912. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  28913. "additionalProperties": false
  28914. }
  28915. },
  28916. "required": ["id", "type", "properties"],
  28917. "additionalProperties": false
  28918. },
  28919. "EventSessionNextToolSuccess": {
  28920. "type": "object",
  28921. "properties": {
  28922. "id": {
  28923. "type": "string",
  28924. "pattern": "^evt_"
  28925. },
  28926. "type": {
  28927. "type": "string",
  28928. "enum": ["session.next.tool.success"]
  28929. },
  28930. "properties": {
  28931. "type": "object",
  28932. "properties": {
  28933. "timestamp": {
  28934. "type": "number"
  28935. },
  28936. "sessionID": {
  28937. "type": "string",
  28938. "pattern": "^ses"
  28939. },
  28940. "assistantMessageID": {
  28941. "type": "string",
  28942. "pattern": "^msg_"
  28943. },
  28944. "callID": {
  28945. "type": "string"
  28946. },
  28947. "structured": {
  28948. "type": "object"
  28949. },
  28950. "content": {
  28951. "type": "array",
  28952. "items": {
  28953. "anyOf": [
  28954. {
  28955. "$ref": "#/components/schemas/ToolTextContent"
  28956. },
  28957. {
  28958. "$ref": "#/components/schemas/ToolFileContent"
  28959. }
  28960. ]
  28961. }
  28962. },
  28963. "outputPaths": {
  28964. "type": "array",
  28965. "items": {
  28966. "type": "string"
  28967. }
  28968. },
  28969. "result": {},
  28970. "provider": {
  28971. "type": "object",
  28972. "properties": {
  28973. "executed": {
  28974. "type": "boolean"
  28975. },
  28976. "metadata": {
  28977. "type": "object",
  28978. "additionalProperties": {
  28979. "type": "object"
  28980. }
  28981. }
  28982. },
  28983. "required": ["executed"],
  28984. "additionalProperties": false
  28985. }
  28986. },
  28987. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  28988. "additionalProperties": false
  28989. }
  28990. },
  28991. "required": ["id", "type", "properties"],
  28992. "additionalProperties": false
  28993. },
  28994. "EventSessionNextToolFailed": {
  28995. "type": "object",
  28996. "properties": {
  28997. "id": {
  28998. "type": "string",
  28999. "pattern": "^evt_"
  29000. },
  29001. "type": {
  29002. "type": "string",
  29003. "enum": ["session.next.tool.failed"]
  29004. },
  29005. "properties": {
  29006. "type": "object",
  29007. "properties": {
  29008. "timestamp": {
  29009. "type": "number"
  29010. },
  29011. "sessionID": {
  29012. "type": "string",
  29013. "pattern": "^ses"
  29014. },
  29015. "assistantMessageID": {
  29016. "type": "string",
  29017. "pattern": "^msg_"
  29018. },
  29019. "callID": {
  29020. "type": "string"
  29021. },
  29022. "error": {
  29023. "$ref": "#/components/schemas/SessionErrorUnknown"
  29024. },
  29025. "result": {},
  29026. "provider": {
  29027. "type": "object",
  29028. "properties": {
  29029. "executed": {
  29030. "type": "boolean"
  29031. },
  29032. "metadata": {
  29033. "type": "object",
  29034. "additionalProperties": {
  29035. "type": "object"
  29036. }
  29037. }
  29038. },
  29039. "required": ["executed"],
  29040. "additionalProperties": false
  29041. }
  29042. },
  29043. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  29044. "additionalProperties": false
  29045. }
  29046. },
  29047. "required": ["id", "type", "properties"],
  29048. "additionalProperties": false
  29049. },
  29050. "EventSessionNextRetried": {
  29051. "type": "object",
  29052. "properties": {
  29053. "id": {
  29054. "type": "string",
  29055. "pattern": "^evt_"
  29056. },
  29057. "type": {
  29058. "type": "string",
  29059. "enum": ["session.next.retried"]
  29060. },
  29061. "properties": {
  29062. "type": "object",
  29063. "properties": {
  29064. "timestamp": {
  29065. "type": "number"
  29066. },
  29067. "sessionID": {
  29068. "type": "string",
  29069. "pattern": "^ses"
  29070. },
  29071. "attempt": {
  29072. "type": "number"
  29073. },
  29074. "error": {
  29075. "$ref": "#/components/schemas/SessionNextRetry_error"
  29076. }
  29077. },
  29078. "required": ["timestamp", "sessionID", "attempt", "error"],
  29079. "additionalProperties": false
  29080. }
  29081. },
  29082. "required": ["id", "type", "properties"],
  29083. "additionalProperties": false
  29084. },
  29085. "EventSessionNextCompactionStarted": {
  29086. "type": "object",
  29087. "properties": {
  29088. "id": {
  29089. "type": "string",
  29090. "pattern": "^evt_"
  29091. },
  29092. "type": {
  29093. "type": "string",
  29094. "enum": ["session.next.compaction.started"]
  29095. },
  29096. "properties": {
  29097. "type": "object",
  29098. "properties": {
  29099. "timestamp": {
  29100. "type": "number"
  29101. },
  29102. "sessionID": {
  29103. "type": "string",
  29104. "pattern": "^ses"
  29105. },
  29106. "messageID": {
  29107. "type": "string",
  29108. "pattern": "^msg_"
  29109. },
  29110. "reason": {
  29111. "type": "string",
  29112. "enum": ["auto", "manual"]
  29113. }
  29114. },
  29115. "required": ["timestamp", "sessionID", "messageID", "reason"],
  29116. "additionalProperties": false
  29117. }
  29118. },
  29119. "required": ["id", "type", "properties"],
  29120. "additionalProperties": false
  29121. },
  29122. "EventSessionNextCompactionDelta": {
  29123. "type": "object",
  29124. "properties": {
  29125. "id": {
  29126. "type": "string",
  29127. "pattern": "^evt_"
  29128. },
  29129. "type": {
  29130. "type": "string",
  29131. "enum": ["session.next.compaction.delta"]
  29132. },
  29133. "properties": {
  29134. "type": "object",
  29135. "properties": {
  29136. "timestamp": {
  29137. "type": "number"
  29138. },
  29139. "sessionID": {
  29140. "type": "string",
  29141. "pattern": "^ses"
  29142. },
  29143. "messageID": {
  29144. "type": "string",
  29145. "pattern": "^msg_"
  29146. },
  29147. "text": {
  29148. "type": "string"
  29149. }
  29150. },
  29151. "required": ["timestamp", "sessionID", "messageID", "text"],
  29152. "additionalProperties": false
  29153. }
  29154. },
  29155. "required": ["id", "type", "properties"],
  29156. "additionalProperties": false
  29157. },
  29158. "EventSessionNextCompactionEnded": {
  29159. "type": "object",
  29160. "properties": {
  29161. "id": {
  29162. "type": "string",
  29163. "pattern": "^evt_"
  29164. },
  29165. "type": {
  29166. "type": "string",
  29167. "enum": ["session.next.compaction.ended"]
  29168. },
  29169. "properties": {
  29170. "type": "object",
  29171. "properties": {
  29172. "timestamp": {
  29173. "type": "number"
  29174. },
  29175. "sessionID": {
  29176. "type": "string",
  29177. "pattern": "^ses"
  29178. },
  29179. "messageID": {
  29180. "type": "string",
  29181. "pattern": "^msg_"
  29182. },
  29183. "reason": {
  29184. "type": "string",
  29185. "enum": ["auto", "manual"]
  29186. },
  29187. "text": {
  29188. "type": "string"
  29189. },
  29190. "recent": {
  29191. "type": "string"
  29192. }
  29193. },
  29194. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  29195. "additionalProperties": false
  29196. }
  29197. },
  29198. "required": ["id", "type", "properties"],
  29199. "additionalProperties": false
  29200. },
  29201. "EventMessagePartDelta": {
  29202. "type": "object",
  29203. "properties": {
  29204. "id": {
  29205. "type": "string",
  29206. "pattern": "^evt_"
  29207. },
  29208. "type": {
  29209. "type": "string",
  29210. "enum": ["message.part.delta"]
  29211. },
  29212. "properties": {
  29213. "type": "object",
  29214. "properties": {
  29215. "sessionID": {
  29216. "type": "string",
  29217. "pattern": "^ses"
  29218. },
  29219. "messageID": {
  29220. "type": "string",
  29221. "pattern": "^msg"
  29222. },
  29223. "partID": {
  29224. "type": "string",
  29225. "pattern": "^prt"
  29226. },
  29227. "field": {
  29228. "type": "string"
  29229. },
  29230. "delta": {
  29231. "type": "string"
  29232. }
  29233. },
  29234. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  29235. "additionalProperties": false
  29236. }
  29237. },
  29238. "required": ["id", "type", "properties"],
  29239. "additionalProperties": false
  29240. },
  29241. "EventSessionDiff": {
  29242. "type": "object",
  29243. "properties": {
  29244. "id": {
  29245. "type": "string",
  29246. "pattern": "^evt_"
  29247. },
  29248. "type": {
  29249. "type": "string",
  29250. "enum": ["session.diff"]
  29251. },
  29252. "properties": {
  29253. "type": "object",
  29254. "properties": {
  29255. "sessionID": {
  29256. "type": "string",
  29257. "pattern": "^ses"
  29258. },
  29259. "diff": {
  29260. "type": "array",
  29261. "items": {
  29262. "$ref": "#/components/schemas/SnapshotFileDiff"
  29263. }
  29264. }
  29265. },
  29266. "required": ["sessionID", "diff"],
  29267. "additionalProperties": false
  29268. }
  29269. },
  29270. "required": ["id", "type", "properties"],
  29271. "additionalProperties": false
  29272. },
  29273. "EventSessionError": {
  29274. "type": "object",
  29275. "properties": {
  29276. "id": {
  29277. "type": "string",
  29278. "pattern": "^evt_"
  29279. },
  29280. "type": {
  29281. "type": "string",
  29282. "enum": ["session.error"]
  29283. },
  29284. "properties": {
  29285. "type": "object",
  29286. "properties": {
  29287. "sessionID": {
  29288. "type": "string",
  29289. "pattern": "^ses"
  29290. },
  29291. "error": {
  29292. "anyOf": [
  29293. {
  29294. "$ref": "#/components/schemas/ProviderAuthError"
  29295. },
  29296. {
  29297. "$ref": "#/components/schemas/UnknownError"
  29298. },
  29299. {
  29300. "$ref": "#/components/schemas/MessageOutputLengthError"
  29301. },
  29302. {
  29303. "$ref": "#/components/schemas/MessageAbortedError"
  29304. },
  29305. {
  29306. "$ref": "#/components/schemas/StructuredOutputError"
  29307. },
  29308. {
  29309. "$ref": "#/components/schemas/ContextOverflowError"
  29310. },
  29311. {
  29312. "$ref": "#/components/schemas/ContentFilterError"
  29313. },
  29314. {
  29315. "$ref": "#/components/schemas/APIError"
  29316. }
  29317. ]
  29318. }
  29319. },
  29320. "additionalProperties": false
  29321. }
  29322. },
  29323. "required": ["id", "type", "properties"],
  29324. "additionalProperties": false
  29325. },
  29326. "EventInstallationUpdated": {
  29327. "type": "object",
  29328. "properties": {
  29329. "id": {
  29330. "type": "string",
  29331. "pattern": "^evt_"
  29332. },
  29333. "type": {
  29334. "type": "string",
  29335. "enum": ["installation.updated"]
  29336. },
  29337. "properties": {
  29338. "type": "object",
  29339. "properties": {
  29340. "version": {
  29341. "type": "string"
  29342. }
  29343. },
  29344. "required": ["version"],
  29345. "additionalProperties": false
  29346. }
  29347. },
  29348. "required": ["id", "type", "properties"],
  29349. "additionalProperties": false
  29350. },
  29351. "EventInstallationUpdate-available": {
  29352. "type": "object",
  29353. "properties": {
  29354. "id": {
  29355. "type": "string",
  29356. "pattern": "^evt_"
  29357. },
  29358. "type": {
  29359. "type": "string",
  29360. "enum": ["installation.update-available"]
  29361. },
  29362. "properties": {
  29363. "type": "object",
  29364. "properties": {
  29365. "version": {
  29366. "type": "string"
  29367. }
  29368. },
  29369. "required": ["version"],
  29370. "additionalProperties": false
  29371. }
  29372. },
  29373. "required": ["id", "type", "properties"],
  29374. "additionalProperties": false
  29375. },
  29376. "EventFileEdited": {
  29377. "type": "object",
  29378. "properties": {
  29379. "id": {
  29380. "type": "string",
  29381. "pattern": "^evt_"
  29382. },
  29383. "type": {
  29384. "type": "string",
  29385. "enum": ["file.edited"]
  29386. },
  29387. "properties": {
  29388. "type": "object",
  29389. "properties": {
  29390. "file": {
  29391. "type": "string"
  29392. }
  29393. },
  29394. "required": ["file"],
  29395. "additionalProperties": false
  29396. }
  29397. },
  29398. "required": ["id", "type", "properties"],
  29399. "additionalProperties": false
  29400. },
  29401. "EventPluginAdded": {
  29402. "type": "object",
  29403. "properties": {
  29404. "id": {
  29405. "type": "string",
  29406. "pattern": "^evt_"
  29407. },
  29408. "type": {
  29409. "type": "string",
  29410. "enum": ["plugin.added"]
  29411. },
  29412. "properties": {
  29413. "type": "object",
  29414. "properties": {
  29415. "id": {
  29416. "type": "string"
  29417. }
  29418. },
  29419. "required": ["id"],
  29420. "additionalProperties": false
  29421. }
  29422. },
  29423. "required": ["id", "type", "properties"],
  29424. "additionalProperties": false
  29425. },
  29426. "EventPermissionV2Asked": {
  29427. "type": "object",
  29428. "properties": {
  29429. "id": {
  29430. "type": "string",
  29431. "pattern": "^evt_"
  29432. },
  29433. "type": {
  29434. "type": "string",
  29435. "enum": ["permission.v2.asked"]
  29436. },
  29437. "properties": {
  29438. "type": "object",
  29439. "properties": {
  29440. "id": {
  29441. "type": "string",
  29442. "pattern": "^per"
  29443. },
  29444. "sessionID": {
  29445. "type": "string",
  29446. "pattern": "^ses"
  29447. },
  29448. "action": {
  29449. "type": "string"
  29450. },
  29451. "resources": {
  29452. "type": "array",
  29453. "items": {
  29454. "type": "string"
  29455. }
  29456. },
  29457. "save": {
  29458. "type": "array",
  29459. "items": {
  29460. "type": "string"
  29461. }
  29462. },
  29463. "metadata": {
  29464. "type": "object"
  29465. },
  29466. "source": {
  29467. "$ref": "#/components/schemas/PermissionV2Source"
  29468. }
  29469. },
  29470. "required": ["id", "sessionID", "action", "resources"],
  29471. "additionalProperties": false
  29472. }
  29473. },
  29474. "required": ["id", "type", "properties"],
  29475. "additionalProperties": false
  29476. },
  29477. "EventPermissionV2Replied": {
  29478. "type": "object",
  29479. "properties": {
  29480. "id": {
  29481. "type": "string",
  29482. "pattern": "^evt_"
  29483. },
  29484. "type": {
  29485. "type": "string",
  29486. "enum": ["permission.v2.replied"]
  29487. },
  29488. "properties": {
  29489. "type": "object",
  29490. "properties": {
  29491. "sessionID": {
  29492. "type": "string",
  29493. "pattern": "^ses"
  29494. },
  29495. "requestID": {
  29496. "type": "string",
  29497. "pattern": "^per"
  29498. },
  29499. "reply": {
  29500. "$ref": "#/components/schemas/PermissionV2Reply"
  29501. }
  29502. },
  29503. "required": ["sessionID", "requestID", "reply"],
  29504. "additionalProperties": false
  29505. }
  29506. },
  29507. "required": ["id", "type", "properties"],
  29508. "additionalProperties": false
  29509. },
  29510. "EventReferenceUpdated": {
  29511. "type": "object",
  29512. "properties": {
  29513. "id": {
  29514. "type": "string",
  29515. "pattern": "^evt_"
  29516. },
  29517. "type": {
  29518. "type": "string",
  29519. "enum": ["reference.updated"]
  29520. },
  29521. "properties": {
  29522. "type": "object",
  29523. "properties": {}
  29524. }
  29525. },
  29526. "required": ["id", "type", "properties"],
  29527. "additionalProperties": false
  29528. },
  29529. "EventProjectDirectoriesUpdated": {
  29530. "type": "object",
  29531. "properties": {
  29532. "id": {
  29533. "type": "string",
  29534. "pattern": "^evt_"
  29535. },
  29536. "type": {
  29537. "type": "string",
  29538. "enum": ["project.directories.updated"]
  29539. },
  29540. "properties": {
  29541. "type": "object",
  29542. "properties": {
  29543. "projectID": {
  29544. "type": "string"
  29545. }
  29546. },
  29547. "required": ["projectID"],
  29548. "additionalProperties": false
  29549. }
  29550. },
  29551. "required": ["id", "type", "properties"],
  29552. "additionalProperties": false
  29553. },
  29554. "EventFileWatcherUpdated": {
  29555. "type": "object",
  29556. "properties": {
  29557. "id": {
  29558. "type": "string",
  29559. "pattern": "^evt_"
  29560. },
  29561. "type": {
  29562. "type": "string",
  29563. "enum": ["file.watcher.updated"]
  29564. },
  29565. "properties": {
  29566. "type": "object",
  29567. "properties": {
  29568. "file": {
  29569. "type": "string"
  29570. },
  29571. "event": {
  29572. "type": "string",
  29573. "enum": ["add", "change", "unlink"]
  29574. }
  29575. },
  29576. "required": ["file", "event"],
  29577. "additionalProperties": false
  29578. }
  29579. },
  29580. "required": ["id", "type", "properties"],
  29581. "additionalProperties": false
  29582. },
  29583. "EventPtyCreated": {
  29584. "type": "object",
  29585. "properties": {
  29586. "id": {
  29587. "type": "string",
  29588. "pattern": "^evt_"
  29589. },
  29590. "type": {
  29591. "type": "string",
  29592. "enum": ["pty.created"]
  29593. },
  29594. "properties": {
  29595. "type": "object",
  29596. "properties": {
  29597. "info": {
  29598. "$ref": "#/components/schemas/Pty"
  29599. }
  29600. },
  29601. "required": ["info"],
  29602. "additionalProperties": false
  29603. }
  29604. },
  29605. "required": ["id", "type", "properties"],
  29606. "additionalProperties": false
  29607. },
  29608. "EventPtyUpdated": {
  29609. "type": "object",
  29610. "properties": {
  29611. "id": {
  29612. "type": "string",
  29613. "pattern": "^evt_"
  29614. },
  29615. "type": {
  29616. "type": "string",
  29617. "enum": ["pty.updated"]
  29618. },
  29619. "properties": {
  29620. "type": "object",
  29621. "properties": {
  29622. "info": {
  29623. "$ref": "#/components/schemas/Pty"
  29624. }
  29625. },
  29626. "required": ["info"],
  29627. "additionalProperties": false
  29628. }
  29629. },
  29630. "required": ["id", "type", "properties"],
  29631. "additionalProperties": false
  29632. },
  29633. "EventPtyExited": {
  29634. "type": "object",
  29635. "properties": {
  29636. "id": {
  29637. "type": "string",
  29638. "pattern": "^evt_"
  29639. },
  29640. "type": {
  29641. "type": "string",
  29642. "enum": ["pty.exited"]
  29643. },
  29644. "properties": {
  29645. "type": "object",
  29646. "properties": {
  29647. "id": {
  29648. "type": "string",
  29649. "pattern": "^pty"
  29650. },
  29651. "exitCode": {
  29652. "type": "integer",
  29653. "minimum": 0
  29654. }
  29655. },
  29656. "required": ["id", "exitCode"],
  29657. "additionalProperties": false
  29658. }
  29659. },
  29660. "required": ["id", "type", "properties"],
  29661. "additionalProperties": false
  29662. },
  29663. "EventPtyDeleted": {
  29664. "type": "object",
  29665. "properties": {
  29666. "id": {
  29667. "type": "string",
  29668. "pattern": "^evt_"
  29669. },
  29670. "type": {
  29671. "type": "string",
  29672. "enum": ["pty.deleted"]
  29673. },
  29674. "properties": {
  29675. "type": "object",
  29676. "properties": {
  29677. "id": {
  29678. "type": "string",
  29679. "pattern": "^pty"
  29680. }
  29681. },
  29682. "required": ["id"],
  29683. "additionalProperties": false
  29684. }
  29685. },
  29686. "required": ["id", "type", "properties"],
  29687. "additionalProperties": false
  29688. },
  29689. "EventQuestionV2Asked": {
  29690. "type": "object",
  29691. "properties": {
  29692. "id": {
  29693. "type": "string",
  29694. "pattern": "^evt_"
  29695. },
  29696. "type": {
  29697. "type": "string",
  29698. "enum": ["question.v2.asked"]
  29699. },
  29700. "properties": {
  29701. "type": "object",
  29702. "properties": {
  29703. "id": {
  29704. "type": "string",
  29705. "pattern": "^que"
  29706. },
  29707. "sessionID": {
  29708. "type": "string",
  29709. "pattern": "^ses"
  29710. },
  29711. "questions": {
  29712. "type": "array",
  29713. "items": {
  29714. "$ref": "#/components/schemas/QuestionV2Info"
  29715. },
  29716. "description": "Questions to ask"
  29717. },
  29718. "tool": {
  29719. "$ref": "#/components/schemas/QuestionV2Tool"
  29720. }
  29721. },
  29722. "required": ["id", "sessionID", "questions"],
  29723. "additionalProperties": false
  29724. }
  29725. },
  29726. "required": ["id", "type", "properties"],
  29727. "additionalProperties": false
  29728. },
  29729. "EventQuestionV2Replied": {
  29730. "type": "object",
  29731. "properties": {
  29732. "id": {
  29733. "type": "string",
  29734. "pattern": "^evt_"
  29735. },
  29736. "type": {
  29737. "type": "string",
  29738. "enum": ["question.v2.replied"]
  29739. },
  29740. "properties": {
  29741. "type": "object",
  29742. "properties": {
  29743. "sessionID": {
  29744. "type": "string",
  29745. "pattern": "^ses"
  29746. },
  29747. "requestID": {
  29748. "type": "string",
  29749. "pattern": "^que"
  29750. },
  29751. "answers": {
  29752. "type": "array",
  29753. "items": {
  29754. "$ref": "#/components/schemas/QuestionV2Answer"
  29755. }
  29756. }
  29757. },
  29758. "required": ["sessionID", "requestID", "answers"],
  29759. "additionalProperties": false
  29760. }
  29761. },
  29762. "required": ["id", "type", "properties"],
  29763. "additionalProperties": false
  29764. },
  29765. "EventQuestionV2Rejected": {
  29766. "type": "object",
  29767. "properties": {
  29768. "id": {
  29769. "type": "string",
  29770. "pattern": "^evt_"
  29771. },
  29772. "type": {
  29773. "type": "string",
  29774. "enum": ["question.v2.rejected"]
  29775. },
  29776. "properties": {
  29777. "type": "object",
  29778. "properties": {
  29779. "sessionID": {
  29780. "type": "string",
  29781. "pattern": "^ses"
  29782. },
  29783. "requestID": {
  29784. "type": "string",
  29785. "pattern": "^que"
  29786. }
  29787. },
  29788. "required": ["sessionID", "requestID"],
  29789. "additionalProperties": false
  29790. }
  29791. },
  29792. "required": ["id", "type", "properties"],
  29793. "additionalProperties": false
  29794. },
  29795. "EventTodoUpdated": {
  29796. "type": "object",
  29797. "properties": {
  29798. "id": {
  29799. "type": "string",
  29800. "pattern": "^evt_"
  29801. },
  29802. "type": {
  29803. "type": "string",
  29804. "enum": ["todo.updated"]
  29805. },
  29806. "properties": {
  29807. "type": "object",
  29808. "properties": {
  29809. "sessionID": {
  29810. "type": "string",
  29811. "pattern": "^ses"
  29812. },
  29813. "todos": {
  29814. "type": "array",
  29815. "items": {
  29816. "$ref": "#/components/schemas/Todo"
  29817. }
  29818. }
  29819. },
  29820. "required": ["sessionID", "todos"],
  29821. "additionalProperties": false
  29822. }
  29823. },
  29824. "required": ["id", "type", "properties"],
  29825. "additionalProperties": false
  29826. },
  29827. "EventLspUpdated": {
  29828. "type": "object",
  29829. "properties": {
  29830. "id": {
  29831. "type": "string",
  29832. "pattern": "^evt_"
  29833. },
  29834. "type": {
  29835. "type": "string",
  29836. "enum": ["lsp.updated"]
  29837. },
  29838. "properties": {
  29839. "type": "object",
  29840. "properties": {}
  29841. }
  29842. },
  29843. "required": ["id", "type", "properties"],
  29844. "additionalProperties": false
  29845. },
  29846. "EventPermissionAsked": {
  29847. "type": "object",
  29848. "properties": {
  29849. "id": {
  29850. "type": "string",
  29851. "pattern": "^evt_"
  29852. },
  29853. "type": {
  29854. "type": "string",
  29855. "enum": ["permission.asked"]
  29856. },
  29857. "properties": {
  29858. "type": "object",
  29859. "properties": {
  29860. "id": {
  29861. "type": "string",
  29862. "pattern": "^per"
  29863. },
  29864. "sessionID": {
  29865. "type": "string",
  29866. "pattern": "^ses"
  29867. },
  29868. "permission": {
  29869. "type": "string"
  29870. },
  29871. "patterns": {
  29872. "type": "array",
  29873. "items": {
  29874. "type": "string"
  29875. }
  29876. },
  29877. "metadata": {
  29878. "type": "object"
  29879. },
  29880. "always": {
  29881. "type": "array",
  29882. "items": {
  29883. "type": "string"
  29884. }
  29885. },
  29886. "tool": {
  29887. "type": "object",
  29888. "properties": {
  29889. "messageID": {
  29890. "type": "string"
  29891. },
  29892. "callID": {
  29893. "type": "string"
  29894. }
  29895. },
  29896. "required": ["messageID", "callID"],
  29897. "additionalProperties": false
  29898. }
  29899. },
  29900. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  29901. "additionalProperties": false
  29902. }
  29903. },
  29904. "required": ["id", "type", "properties"],
  29905. "additionalProperties": false
  29906. },
  29907. "EventPermissionReplied": {
  29908. "type": "object",
  29909. "properties": {
  29910. "id": {
  29911. "type": "string",
  29912. "pattern": "^evt_"
  29913. },
  29914. "type": {
  29915. "type": "string",
  29916. "enum": ["permission.replied"]
  29917. },
  29918. "properties": {
  29919. "type": "object",
  29920. "properties": {
  29921. "sessionID": {
  29922. "type": "string",
  29923. "pattern": "^ses"
  29924. },
  29925. "requestID": {
  29926. "type": "string",
  29927. "pattern": "^per"
  29928. },
  29929. "reply": {
  29930. "type": "string",
  29931. "enum": ["once", "always", "reject"]
  29932. }
  29933. },
  29934. "required": ["sessionID", "requestID", "reply"],
  29935. "additionalProperties": false
  29936. }
  29937. },
  29938. "required": ["id", "type", "properties"],
  29939. "additionalProperties": false
  29940. },
  29941. "EventMcpToolsChanged": {
  29942. "type": "object",
  29943. "properties": {
  29944. "id": {
  29945. "type": "string",
  29946. "pattern": "^evt_"
  29947. },
  29948. "type": {
  29949. "type": "string",
  29950. "enum": ["mcp.tools.changed"]
  29951. },
  29952. "properties": {
  29953. "type": "object",
  29954. "properties": {
  29955. "server": {
  29956. "type": "string"
  29957. }
  29958. },
  29959. "required": ["server"],
  29960. "additionalProperties": false
  29961. }
  29962. },
  29963. "required": ["id", "type", "properties"],
  29964. "additionalProperties": false
  29965. },
  29966. "EventMcpBrowserOpenFailed": {
  29967. "type": "object",
  29968. "properties": {
  29969. "id": {
  29970. "type": "string",
  29971. "pattern": "^evt_"
  29972. },
  29973. "type": {
  29974. "type": "string",
  29975. "enum": ["mcp.browser.open.failed"]
  29976. },
  29977. "properties": {
  29978. "type": "object",
  29979. "properties": {
  29980. "mcpName": {
  29981. "type": "string"
  29982. },
  29983. "url": {
  29984. "type": "string"
  29985. }
  29986. },
  29987. "required": ["mcpName", "url"],
  29988. "additionalProperties": false
  29989. }
  29990. },
  29991. "required": ["id", "type", "properties"],
  29992. "additionalProperties": false
  29993. },
  29994. "EventCommandExecuted": {
  29995. "type": "object",
  29996. "properties": {
  29997. "id": {
  29998. "type": "string",
  29999. "pattern": "^evt_"
  30000. },
  30001. "type": {
  30002. "type": "string",
  30003. "enum": ["command.executed"]
  30004. },
  30005. "properties": {
  30006. "type": "object",
  30007. "properties": {
  30008. "name": {
  30009. "type": "string"
  30010. },
  30011. "sessionID": {
  30012. "type": "string",
  30013. "pattern": "^ses"
  30014. },
  30015. "arguments": {
  30016. "type": "string"
  30017. },
  30018. "messageID": {
  30019. "type": "string",
  30020. "pattern": "^msg"
  30021. }
  30022. },
  30023. "required": ["name", "sessionID", "arguments", "messageID"],
  30024. "additionalProperties": false
  30025. }
  30026. },
  30027. "required": ["id", "type", "properties"],
  30028. "additionalProperties": false
  30029. },
  30030. "EventProjectUpdated": {
  30031. "type": "object",
  30032. "properties": {
  30033. "id": {
  30034. "type": "string",
  30035. "pattern": "^evt_"
  30036. },
  30037. "type": {
  30038. "type": "string",
  30039. "enum": ["project.updated"]
  30040. },
  30041. "properties": {
  30042. "type": "object",
  30043. "properties": {
  30044. "id": {
  30045. "type": "string"
  30046. },
  30047. "worktree": {
  30048. "type": "string"
  30049. },
  30050. "vcs": {
  30051. "type": "string",
  30052. "enum": ["git"]
  30053. },
  30054. "name": {
  30055. "type": "string"
  30056. },
  30057. "icon": {
  30058. "type": "object",
  30059. "properties": {
  30060. "url": {
  30061. "type": "string"
  30062. },
  30063. "override": {
  30064. "type": "string"
  30065. },
  30066. "color": {
  30067. "type": "string"
  30068. }
  30069. },
  30070. "additionalProperties": false
  30071. },
  30072. "commands": {
  30073. "type": "object",
  30074. "properties": {
  30075. "start": {
  30076. "type": "string",
  30077. "description": "Startup script to run when creating a new workspace (worktree)"
  30078. }
  30079. },
  30080. "additionalProperties": false
  30081. },
  30082. "time": {
  30083. "type": "object",
  30084. "properties": {
  30085. "created": {
  30086. "type": "integer",
  30087. "minimum": 0
  30088. },
  30089. "updated": {
  30090. "type": "integer",
  30091. "minimum": 0
  30092. },
  30093. "initialized": {
  30094. "type": "integer",
  30095. "minimum": 0
  30096. }
  30097. },
  30098. "required": ["created", "updated"],
  30099. "additionalProperties": false
  30100. },
  30101. "sandboxes": {
  30102. "type": "array",
  30103. "items": {
  30104. "type": "string"
  30105. }
  30106. }
  30107. },
  30108. "required": ["id", "worktree", "time", "sandboxes"],
  30109. "additionalProperties": false
  30110. }
  30111. },
  30112. "required": ["id", "type", "properties"],
  30113. "additionalProperties": false
  30114. },
  30115. "EventSessionStatus": {
  30116. "type": "object",
  30117. "properties": {
  30118. "id": {
  30119. "type": "string",
  30120. "pattern": "^evt_"
  30121. },
  30122. "type": {
  30123. "type": "string",
  30124. "enum": ["session.status"]
  30125. },
  30126. "properties": {
  30127. "type": "object",
  30128. "properties": {
  30129. "sessionID": {
  30130. "type": "string",
  30131. "pattern": "^ses"
  30132. },
  30133. "status": {
  30134. "$ref": "#/components/schemas/SessionStatus"
  30135. }
  30136. },
  30137. "required": ["sessionID", "status"],
  30138. "additionalProperties": false
  30139. }
  30140. },
  30141. "required": ["id", "type", "properties"],
  30142. "additionalProperties": false
  30143. },
  30144. "EventSessionIdle": {
  30145. "type": "object",
  30146. "properties": {
  30147. "id": {
  30148. "type": "string",
  30149. "pattern": "^evt_"
  30150. },
  30151. "type": {
  30152. "type": "string",
  30153. "enum": ["session.idle"]
  30154. },
  30155. "properties": {
  30156. "type": "object",
  30157. "properties": {
  30158. "sessionID": {
  30159. "type": "string",
  30160. "pattern": "^ses"
  30161. }
  30162. },
  30163. "required": ["sessionID"],
  30164. "additionalProperties": false
  30165. }
  30166. },
  30167. "required": ["id", "type", "properties"],
  30168. "additionalProperties": false
  30169. },
  30170. "EventQuestionAsked": {
  30171. "type": "object",
  30172. "properties": {
  30173. "id": {
  30174. "type": "string",
  30175. "pattern": "^evt_"
  30176. },
  30177. "type": {
  30178. "type": "string",
  30179. "enum": ["question.asked"]
  30180. },
  30181. "properties": {
  30182. "type": "object",
  30183. "properties": {
  30184. "id": {
  30185. "type": "string",
  30186. "pattern": "^que"
  30187. },
  30188. "sessionID": {
  30189. "type": "string",
  30190. "pattern": "^ses"
  30191. },
  30192. "questions": {
  30193. "type": "array",
  30194. "items": {
  30195. "$ref": "#/components/schemas/QuestionInfo"
  30196. },
  30197. "description": "Questions to ask"
  30198. },
  30199. "tool": {
  30200. "$ref": "#/components/schemas/QuestionTool"
  30201. }
  30202. },
  30203. "required": ["id", "sessionID", "questions"],
  30204. "additionalProperties": false
  30205. }
  30206. },
  30207. "required": ["id", "type", "properties"],
  30208. "additionalProperties": false
  30209. },
  30210. "EventQuestionReplied": {
  30211. "type": "object",
  30212. "properties": {
  30213. "id": {
  30214. "type": "string",
  30215. "pattern": "^evt_"
  30216. },
  30217. "type": {
  30218. "type": "string",
  30219. "enum": ["question.replied"]
  30220. },
  30221. "properties": {
  30222. "type": "object",
  30223. "properties": {
  30224. "sessionID": {
  30225. "type": "string",
  30226. "pattern": "^ses"
  30227. },
  30228. "requestID": {
  30229. "type": "string",
  30230. "pattern": "^que"
  30231. },
  30232. "answers": {
  30233. "type": "array",
  30234. "items": {
  30235. "$ref": "#/components/schemas/QuestionAnswer"
  30236. }
  30237. }
  30238. },
  30239. "required": ["sessionID", "requestID", "answers"],
  30240. "additionalProperties": false
  30241. }
  30242. },
  30243. "required": ["id", "type", "properties"],
  30244. "additionalProperties": false
  30245. },
  30246. "EventQuestionRejected": {
  30247. "type": "object",
  30248. "properties": {
  30249. "id": {
  30250. "type": "string",
  30251. "pattern": "^evt_"
  30252. },
  30253. "type": {
  30254. "type": "string",
  30255. "enum": ["question.rejected"]
  30256. },
  30257. "properties": {
  30258. "type": "object",
  30259. "properties": {
  30260. "sessionID": {
  30261. "type": "string",
  30262. "pattern": "^ses"
  30263. },
  30264. "requestID": {
  30265. "type": "string",
  30266. "pattern": "^que"
  30267. }
  30268. },
  30269. "required": ["sessionID", "requestID"],
  30270. "additionalProperties": false
  30271. }
  30272. },
  30273. "required": ["id", "type", "properties"],
  30274. "additionalProperties": false
  30275. },
  30276. "EventSessionCompacted": {
  30277. "type": "object",
  30278. "properties": {
  30279. "id": {
  30280. "type": "string",
  30281. "pattern": "^evt_"
  30282. },
  30283. "type": {
  30284. "type": "string",
  30285. "enum": ["session.compacted"]
  30286. },
  30287. "properties": {
  30288. "type": "object",
  30289. "properties": {
  30290. "sessionID": {
  30291. "type": "string",
  30292. "pattern": "^ses"
  30293. }
  30294. },
  30295. "required": ["sessionID"],
  30296. "additionalProperties": false
  30297. }
  30298. },
  30299. "required": ["id", "type", "properties"],
  30300. "additionalProperties": false
  30301. },
  30302. "EventVcsBranchUpdated": {
  30303. "type": "object",
  30304. "properties": {
  30305. "id": {
  30306. "type": "string",
  30307. "pattern": "^evt_"
  30308. },
  30309. "type": {
  30310. "type": "string",
  30311. "enum": ["vcs.branch.updated"]
  30312. },
  30313. "properties": {
  30314. "type": "object",
  30315. "properties": {
  30316. "branch": {
  30317. "type": "string"
  30318. }
  30319. },
  30320. "additionalProperties": false
  30321. }
  30322. },
  30323. "required": ["id", "type", "properties"],
  30324. "additionalProperties": false
  30325. },
  30326. "EventWorkspaceReady": {
  30327. "type": "object",
  30328. "properties": {
  30329. "id": {
  30330. "type": "string",
  30331. "pattern": "^evt_"
  30332. },
  30333. "type": {
  30334. "type": "string",
  30335. "enum": ["workspace.ready"]
  30336. },
  30337. "properties": {
  30338. "type": "object",
  30339. "properties": {
  30340. "name": {
  30341. "type": "string"
  30342. }
  30343. },
  30344. "required": ["name"],
  30345. "additionalProperties": false
  30346. }
  30347. },
  30348. "required": ["id", "type", "properties"],
  30349. "additionalProperties": false
  30350. },
  30351. "EventWorkspaceFailed": {
  30352. "type": "object",
  30353. "properties": {
  30354. "id": {
  30355. "type": "string",
  30356. "pattern": "^evt_"
  30357. },
  30358. "type": {
  30359. "type": "string",
  30360. "enum": ["workspace.failed"]
  30361. },
  30362. "properties": {
  30363. "type": "object",
  30364. "properties": {
  30365. "message": {
  30366. "type": "string"
  30367. }
  30368. },
  30369. "required": ["message"],
  30370. "additionalProperties": false
  30371. }
  30372. },
  30373. "required": ["id", "type", "properties"],
  30374. "additionalProperties": false
  30375. },
  30376. "EventWorkspaceStatus": {
  30377. "type": "object",
  30378. "properties": {
  30379. "id": {
  30380. "type": "string",
  30381. "pattern": "^evt_"
  30382. },
  30383. "type": {
  30384. "type": "string",
  30385. "enum": ["workspace.status"]
  30386. },
  30387. "properties": {
  30388. "type": "object",
  30389. "properties": {
  30390. "workspaceID": {
  30391. "type": "string",
  30392. "pattern": "^wrk"
  30393. },
  30394. "status": {
  30395. "type": "string",
  30396. "enum": ["connected", "connecting", "disconnected", "error"]
  30397. }
  30398. },
  30399. "required": ["workspaceID", "status"],
  30400. "additionalProperties": false
  30401. }
  30402. },
  30403. "required": ["id", "type", "properties"],
  30404. "additionalProperties": false
  30405. },
  30406. "EventWorktreeReady": {
  30407. "type": "object",
  30408. "properties": {
  30409. "id": {
  30410. "type": "string",
  30411. "pattern": "^evt_"
  30412. },
  30413. "type": {
  30414. "type": "string",
  30415. "enum": ["worktree.ready"]
  30416. },
  30417. "properties": {
  30418. "type": "object",
  30419. "properties": {
  30420. "name": {
  30421. "type": "string"
  30422. },
  30423. "branch": {
  30424. "type": "string"
  30425. }
  30426. },
  30427. "required": ["name"],
  30428. "additionalProperties": false
  30429. }
  30430. },
  30431. "required": ["id", "type", "properties"],
  30432. "additionalProperties": false
  30433. },
  30434. "EventWorktreeFailed": {
  30435. "type": "object",
  30436. "properties": {
  30437. "id": {
  30438. "type": "string",
  30439. "pattern": "^evt_"
  30440. },
  30441. "type": {
  30442. "type": "string",
  30443. "enum": ["worktree.failed"]
  30444. },
  30445. "properties": {
  30446. "type": "object",
  30447. "properties": {
  30448. "message": {
  30449. "type": "string"
  30450. }
  30451. },
  30452. "required": ["message"],
  30453. "additionalProperties": false
  30454. }
  30455. },
  30456. "required": ["id", "type", "properties"],
  30457. "additionalProperties": false
  30458. },
  30459. "EventServerConnected": {
  30460. "type": "object",
  30461. "properties": {
  30462. "id": {
  30463. "type": "string",
  30464. "pattern": "^evt_"
  30465. },
  30466. "type": {
  30467. "type": "string",
  30468. "enum": ["server.connected"]
  30469. },
  30470. "properties": {
  30471. "type": "object",
  30472. "properties": {}
  30473. }
  30474. },
  30475. "required": ["id", "type", "properties"],
  30476. "additionalProperties": false
  30477. },
  30478. "EventGlobalDisposed": {
  30479. "type": "object",
  30480. "properties": {
  30481. "id": {
  30482. "type": "string",
  30483. "pattern": "^evt_"
  30484. },
  30485. "type": {
  30486. "type": "string",
  30487. "enum": ["global.disposed"]
  30488. },
  30489. "properties": {
  30490. "type": "object",
  30491. "properties": {}
  30492. }
  30493. },
  30494. "required": ["id", "type", "properties"],
  30495. "additionalProperties": false
  30496. },
  30497. "BadRequestError": {
  30498. "type": "object",
  30499. "required": ["name", "data"],
  30500. "properties": {
  30501. "name": {
  30502. "type": "string",
  30503. "enum": ["BadRequest"]
  30504. },
  30505. "data": {
  30506. "type": "object",
  30507. "required": ["message"],
  30508. "properties": {
  30509. "message": {
  30510. "type": "string"
  30511. },
  30512. "kind": {
  30513. "type": "string",
  30514. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  30515. }
  30516. }
  30517. }
  30518. }
  30519. }
  30520. }
  30521. },
  30522. "security": [],
  30523. "tags": [
  30524. {
  30525. "name": "control",
  30526. "description": "Control plane routes."
  30527. },
  30528. {
  30529. "name": "controlPlane",
  30530. "description": "Control-plane orchestration routes."
  30531. },
  30532. {
  30533. "name": "global",
  30534. "description": "Global server routes."
  30535. },
  30536. {
  30537. "name": "event",
  30538. "description": "Instance event stream route."
  30539. },
  30540. {
  30541. "name": "config",
  30542. "description": "Experimental HttpApi config routes."
  30543. },
  30544. {
  30545. "name": "experimental",
  30546. "description": "Experimental HttpApi read-only routes."
  30547. },
  30548. {
  30549. "name": "file",
  30550. "description": "Experimental HttpApi file routes."
  30551. },
  30552. {
  30553. "name": "instance",
  30554. "description": "Experimental HttpApi instance read routes."
  30555. },
  30556. {
  30557. "name": "mcp",
  30558. "description": "Experimental HttpApi MCP routes."
  30559. },
  30560. {
  30561. "name": "project",
  30562. "description": "Experimental HttpApi project routes."
  30563. },
  30564. {
  30565. "name": "projectCopy",
  30566. "description": "Project copy naming routes."
  30567. },
  30568. {
  30569. "name": "pty",
  30570. "description": "Experimental HttpApi PTY routes."
  30571. },
  30572. {
  30573. "name": "question",
  30574. "description": "Question routes."
  30575. },
  30576. {
  30577. "name": "permission",
  30578. "description": "Experimental HttpApi permission routes."
  30579. },
  30580. {
  30581. "name": "provider",
  30582. "description": "Experimental HttpApi provider routes."
  30583. },
  30584. {
  30585. "name": "session",
  30586. "description": "Experimental HttpApi session routes."
  30587. },
  30588. {
  30589. "name": "sync",
  30590. "description": "Experimental HttpApi sync routes."
  30591. },
  30592. {
  30593. "name": "tui",
  30594. "description": "Experimental HttpApi TUI routes."
  30595. },
  30596. {
  30597. "name": "workspace",
  30598. "description": "Experimental HttpApi workspace routes."
  30599. },
  30600. {
  30601. "name": "opencode HttpApi",
  30602. "description": "Experimental HttpApi surface for selected instance routes."
  30603. },
  30604. {
  30605. "name": "opencode HttpApi",
  30606. "description": "Experimental HttpApi surface for selected instance routes."
  30607. },
  30608. {
  30609. "name": "opencode HttpApi",
  30610. "description": "Experimental HttpApi surface for selected instance routes."
  30611. },
  30612. {
  30613. "name": "sessions",
  30614. "description": "Experimental session routes."
  30615. },
  30616. {
  30617. "name": "messages",
  30618. "description": "Experimental message routes."
  30619. },
  30620. {
  30621. "name": "models",
  30622. "description": "Experimental model routes."
  30623. },
  30624. {
  30625. "name": "providers",
  30626. "description": "Experimental provider routes."
  30627. },
  30628. {
  30629. "name": "integrations",
  30630. "description": "Integration discovery and authentication routes."
  30631. },
  30632. {
  30633. "name": "opencode HttpApi",
  30634. "description": "Experimental HttpApi surface for selected instance routes."
  30635. },
  30636. {
  30637. "name": "permissions",
  30638. "description": "Experimental permission routes."
  30639. },
  30640. {
  30641. "name": "filesystem",
  30642. "description": "Experimental location-scoped filesystem routes."
  30643. },
  30644. {
  30645. "name": "commands",
  30646. "description": "Experimental command routes."
  30647. },
  30648. {
  30649. "name": "skills",
  30650. "description": "Experimental skill routes."
  30651. },
  30652. {
  30653. "name": "events",
  30654. "description": "Experimental event stream route."
  30655. },
  30656. {
  30657. "name": "pty",
  30658. "description": "Experimental location-scoped PTY routes."
  30659. },
  30660. {
  30661. "name": "session questions",
  30662. "description": "Experimental session question routes."
  30663. },
  30664. {
  30665. "name": "reference",
  30666. "description": "Location-scoped project references."
  30667. },
  30668. {
  30669. "name": "projectCopy",
  30670. "description": "Project copy management routes."
  30671. },
  30672. {
  30673. "name": "pty",
  30674. "description": "PTY websocket route."
  30675. }
  30676. ]
  30677. }