openapi.json 888 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190
  1. {
  2. "openapi": "3.1.0",
  3. "info": {
  4. "title": "opencode",
  5. "version": "1.0.0",
  6. "description": "opencode api"
  7. },
  8. "paths": {
  9. "/auth/{providerID}": {
  10. "put": {
  11. "tags": ["control"],
  12. "operationId": "auth.set",
  13. "parameters": [
  14. {
  15. "name": "providerID",
  16. "in": "path",
  17. "schema": {
  18. "type": "string"
  19. },
  20. "required": true
  21. }
  22. ],
  23. "responses": {
  24. "200": {
  25. "description": "Successfully set authentication credentials",
  26. "content": {
  27. "application/json": {
  28. "schema": {
  29. "type": "boolean",
  30. "description": "Successfully set authentication credentials"
  31. }
  32. }
  33. }
  34. },
  35. "400": {
  36. "description": "BadRequest | InvalidRequestError",
  37. "content": {
  38. "application/json": {
  39. "schema": {
  40. "anyOf": [
  41. {
  42. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  43. },
  44. {
  45. "$ref": "#/components/schemas/InvalidRequestError"
  46. }
  47. ]
  48. }
  49. }
  50. }
  51. }
  52. },
  53. "description": "Set authentication credentials",
  54. "summary": "Set auth credentials",
  55. "requestBody": {
  56. "content": {
  57. "application/json": {
  58. "schema": {
  59. "$ref": "#/components/schemas/Auth"
  60. }
  61. }
  62. }
  63. },
  64. "x-codeSamples": [
  65. {
  66. "lang": "js",
  67. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  68. }
  69. ]
  70. },
  71. "delete": {
  72. "tags": ["control"],
  73. "operationId": "auth.remove",
  74. "parameters": [
  75. {
  76. "name": "providerID",
  77. "in": "path",
  78. "schema": {
  79. "type": "string"
  80. },
  81. "required": true
  82. }
  83. ],
  84. "responses": {
  85. "200": {
  86. "description": "Successfully removed authentication credentials",
  87. "content": {
  88. "application/json": {
  89. "schema": {
  90. "type": "boolean",
  91. "description": "Successfully removed authentication credentials"
  92. }
  93. }
  94. }
  95. },
  96. "400": {
  97. "description": "BadRequest | InvalidRequestError",
  98. "content": {
  99. "application/json": {
  100. "schema": {
  101. "anyOf": [
  102. {
  103. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  104. },
  105. {
  106. "$ref": "#/components/schemas/InvalidRequestError"
  107. }
  108. ]
  109. }
  110. }
  111. }
  112. }
  113. },
  114. "description": "Remove authentication credentials",
  115. "summary": "Remove auth credentials",
  116. "x-codeSamples": [
  117. {
  118. "lang": "js",
  119. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  120. }
  121. ]
  122. }
  123. },
  124. "/log": {
  125. "post": {
  126. "tags": ["control"],
  127. "operationId": "app.log",
  128. "parameters": [
  129. {
  130. "name": "directory",
  131. "in": "query",
  132. "schema": {
  133. "type": "string"
  134. },
  135. "required": false
  136. },
  137. {
  138. "name": "workspace",
  139. "in": "query",
  140. "schema": {
  141. "type": "string"
  142. },
  143. "required": false
  144. }
  145. ],
  146. "responses": {
  147. "200": {
  148. "description": "Log entry written successfully",
  149. "content": {
  150. "application/json": {
  151. "schema": {
  152. "type": "boolean",
  153. "description": "Log entry written successfully"
  154. }
  155. }
  156. }
  157. },
  158. "400": {
  159. "description": "BadRequest | InvalidRequestError",
  160. "content": {
  161. "application/json": {
  162. "schema": {
  163. "anyOf": [
  164. {
  165. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  166. },
  167. {
  168. "$ref": "#/components/schemas/InvalidRequestError"
  169. }
  170. ]
  171. }
  172. }
  173. }
  174. }
  175. },
  176. "description": "Write a log entry to the server logs with specified level and metadata.",
  177. "summary": "Write log",
  178. "requestBody": {
  179. "content": {
  180. "application/json": {
  181. "schema": {
  182. "type": "object",
  183. "properties": {
  184. "service": {
  185. "type": "string",
  186. "description": "Service name for the log entry"
  187. },
  188. "level": {
  189. "type": "string",
  190. "enum": ["debug", "info", "error", "warn"],
  191. "description": "Log level"
  192. },
  193. "message": {
  194. "type": "string",
  195. "description": "Log message"
  196. },
  197. "extra": {
  198. "type": "object"
  199. }
  200. },
  201. "required": ["service", "level", "message"],
  202. "additionalProperties": false
  203. }
  204. }
  205. }
  206. },
  207. "x-codeSamples": [
  208. {
  209. "lang": "js",
  210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  211. }
  212. ]
  213. }
  214. },
  215. "/experimental/control-plane/move-session": {
  216. "post": {
  217. "tags": ["controlPlane"],
  218. "operationId": "experimental.controlPlane.moveSession",
  219. "parameters": [],
  220. "responses": {
  221. "204": {
  222. "description": "Session moved"
  223. },
  224. "400": {
  225. "description": "MoveSessionError | InvalidRequestError",
  226. "content": {
  227. "application/json": {
  228. "schema": {
  229. "anyOf": [
  230. {
  231. "$ref": "#/components/schemas/MoveSessionError"
  232. },
  233. {
  234. "$ref": "#/components/schemas/InvalidRequestError"
  235. }
  236. ]
  237. }
  238. }
  239. }
  240. }
  241. },
  242. "description": "Move a session to another project directory, optionally transferring local changes.",
  243. "summary": "Move session",
  244. "requestBody": {
  245. "content": {
  246. "application/json": {
  247. "schema": {
  248. "type": "object",
  249. "properties": {
  250. "sessionID": {
  251. "type": "string",
  252. "pattern": "^ses"
  253. },
  254. "destination": {
  255. "$ref": "#/components/schemas/MoveSessionDestination"
  256. },
  257. "moveChanges": {
  258. "type": "boolean"
  259. }
  260. },
  261. "required": ["sessionID", "destination"],
  262. "additionalProperties": false
  263. }
  264. }
  265. }
  266. },
  267. "x-codeSamples": [
  268. {
  269. "lang": "js",
  270. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.controlPlane.moveSession({\n ...\n})"
  271. }
  272. ]
  273. }
  274. },
  275. "/global/health": {
  276. "get": {
  277. "tags": ["global"],
  278. "operationId": "global.health",
  279. "parameters": [],
  280. "responses": {
  281. "200": {
  282. "description": "Health information",
  283. "content": {
  284. "application/json": {
  285. "schema": {
  286. "type": "object",
  287. "properties": {
  288. "healthy": {
  289. "type": "boolean",
  290. "enum": [true]
  291. },
  292. "version": {
  293. "type": "string"
  294. }
  295. },
  296. "required": ["healthy", "version"],
  297. "additionalProperties": false,
  298. "description": "Health information"
  299. }
  300. }
  301. }
  302. },
  303. "400": {
  304. "description": "Bad request",
  305. "content": {
  306. "application/json": {
  307. "schema": {
  308. "$ref": "#/components/schemas/BadRequestError"
  309. }
  310. }
  311. }
  312. }
  313. },
  314. "description": "Get health information about the OpenCode server.",
  315. "summary": "Get health",
  316. "x-codeSamples": [
  317. {
  318. "lang": "js",
  319. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  320. }
  321. ]
  322. }
  323. },
  324. "/global/event": {
  325. "get": {
  326. "tags": ["global"],
  327. "operationId": "global.event",
  328. "parameters": [],
  329. "responses": {
  330. "200": {
  331. "description": "Event stream",
  332. "content": {
  333. "text/event-stream": {
  334. "schema": {
  335. "$ref": "#/components/schemas/GlobalEvent"
  336. }
  337. }
  338. }
  339. },
  340. "400": {
  341. "description": "Bad request",
  342. "content": {
  343. "application/json": {
  344. "schema": {
  345. "$ref": "#/components/schemas/BadRequestError"
  346. }
  347. }
  348. }
  349. }
  350. },
  351. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  352. "summary": "Get global events",
  353. "x-codeSamples": [
  354. {
  355. "lang": "js",
  356. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  357. }
  358. ]
  359. }
  360. },
  361. "/global/config": {
  362. "get": {
  363. "tags": ["global"],
  364. "operationId": "global.config.get",
  365. "parameters": [],
  366. "responses": {
  367. "200": {
  368. "description": "Get global config info",
  369. "content": {
  370. "application/json": {
  371. "schema": {
  372. "$ref": "#/components/schemas/Config"
  373. }
  374. }
  375. }
  376. },
  377. "400": {
  378. "description": "Bad request",
  379. "content": {
  380. "application/json": {
  381. "schema": {
  382. "$ref": "#/components/schemas/BadRequestError"
  383. }
  384. }
  385. }
  386. }
  387. },
  388. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  389. "summary": "Get global configuration",
  390. "x-codeSamples": [
  391. {
  392. "lang": "js",
  393. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  394. }
  395. ]
  396. },
  397. "patch": {
  398. "tags": ["global"],
  399. "operationId": "global.config.update",
  400. "parameters": [],
  401. "responses": {
  402. "200": {
  403. "description": "Successfully updated global config",
  404. "content": {
  405. "application/json": {
  406. "schema": {
  407. "$ref": "#/components/schemas/Config"
  408. }
  409. }
  410. }
  411. },
  412. "400": {
  413. "description": "BadRequest | InvalidRequestError",
  414. "content": {
  415. "application/json": {
  416. "schema": {
  417. "anyOf": [
  418. {
  419. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  420. },
  421. {
  422. "$ref": "#/components/schemas/InvalidRequestError"
  423. }
  424. ]
  425. }
  426. }
  427. }
  428. }
  429. },
  430. "description": "Update global OpenCode configuration settings and preferences.",
  431. "summary": "Update global configuration",
  432. "requestBody": {
  433. "content": {
  434. "application/json": {
  435. "schema": {
  436. "$ref": "#/components/schemas/Config"
  437. }
  438. }
  439. }
  440. },
  441. "x-codeSamples": [
  442. {
  443. "lang": "js",
  444. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  445. }
  446. ]
  447. }
  448. },
  449. "/global/dispose": {
  450. "post": {
  451. "tags": ["global"],
  452. "operationId": "global.dispose",
  453. "parameters": [],
  454. "responses": {
  455. "200": {
  456. "description": "Global disposed",
  457. "content": {
  458. "application/json": {
  459. "schema": {
  460. "type": "boolean",
  461. "description": "Global disposed"
  462. }
  463. }
  464. }
  465. },
  466. "400": {
  467. "description": "Bad request",
  468. "content": {
  469. "application/json": {
  470. "schema": {
  471. "$ref": "#/components/schemas/BadRequestError"
  472. }
  473. }
  474. }
  475. }
  476. },
  477. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  478. "summary": "Dispose instance",
  479. "x-codeSamples": [
  480. {
  481. "lang": "js",
  482. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  483. }
  484. ]
  485. }
  486. },
  487. "/global/upgrade": {
  488. "post": {
  489. "tags": ["global"],
  490. "operationId": "global.upgrade",
  491. "parameters": [],
  492. "responses": {
  493. "200": {
  494. "description": "Upgrade result",
  495. "content": {
  496. "application/json": {
  497. "schema": {
  498. "anyOf": [
  499. {
  500. "type": "object",
  501. "properties": {
  502. "success": {
  503. "type": "boolean",
  504. "enum": [true]
  505. },
  506. "version": {
  507. "type": "string"
  508. }
  509. },
  510. "required": ["success", "version"],
  511. "additionalProperties": false
  512. },
  513. {
  514. "type": "object",
  515. "properties": {
  516. "success": {
  517. "type": "boolean",
  518. "enum": [false]
  519. },
  520. "error": {
  521. "type": "string"
  522. }
  523. },
  524. "required": ["success", "error"],
  525. "additionalProperties": false
  526. }
  527. ],
  528. "description": "Upgrade result"
  529. }
  530. }
  531. }
  532. },
  533. "400": {
  534. "description": "BadRequest | InvalidRequestError",
  535. "content": {
  536. "application/json": {
  537. "schema": {
  538. "anyOf": [
  539. {
  540. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  541. },
  542. {
  543. "$ref": "#/components/schemas/InvalidRequestError"
  544. }
  545. ]
  546. }
  547. }
  548. }
  549. }
  550. },
  551. "description": "Upgrade opencode to the specified version or latest if not specified.",
  552. "summary": "Upgrade opencode",
  553. "requestBody": {
  554. "content": {
  555. "application/json": {
  556. "schema": {
  557. "type": "object",
  558. "properties": {
  559. "target": {
  560. "type": "string"
  561. }
  562. },
  563. "additionalProperties": false
  564. }
  565. }
  566. }
  567. },
  568. "x-codeSamples": [
  569. {
  570. "lang": "js",
  571. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  572. }
  573. ]
  574. }
  575. },
  576. "/event": {
  577. "get": {
  578. "tags": ["event"],
  579. "operationId": "event.subscribe",
  580. "parameters": [
  581. {
  582. "name": "directory",
  583. "in": "query",
  584. "schema": {
  585. "type": "string"
  586. },
  587. "required": false
  588. },
  589. {
  590. "name": "workspace",
  591. "in": "query",
  592. "schema": {
  593. "type": "string"
  594. },
  595. "required": false
  596. }
  597. ],
  598. "responses": {
  599. "200": {
  600. "description": "Event stream",
  601. "content": {
  602. "text/event-stream": {
  603. "schema": {
  604. "$ref": "#/components/schemas/Event"
  605. }
  606. }
  607. }
  608. }
  609. },
  610. "description": "Get events",
  611. "summary": "Subscribe to events",
  612. "x-codeSamples": [
  613. {
  614. "lang": "js",
  615. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  616. }
  617. ]
  618. }
  619. },
  620. "/config": {
  621. "get": {
  622. "tags": ["config"],
  623. "operationId": "config.get",
  624. "parameters": [
  625. {
  626. "name": "directory",
  627. "in": "query",
  628. "schema": {
  629. "type": "string"
  630. },
  631. "required": false
  632. },
  633. {
  634. "name": "workspace",
  635. "in": "query",
  636. "schema": {
  637. "type": "string"
  638. },
  639. "required": false
  640. }
  641. ],
  642. "responses": {
  643. "200": {
  644. "description": "Get config info",
  645. "content": {
  646. "application/json": {
  647. "schema": {
  648. "$ref": "#/components/schemas/Config"
  649. }
  650. }
  651. }
  652. },
  653. "400": {
  654. "description": "Bad request",
  655. "content": {
  656. "application/json": {
  657. "schema": {
  658. "$ref": "#/components/schemas/BadRequestError"
  659. }
  660. }
  661. }
  662. }
  663. },
  664. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  665. "summary": "Get configuration",
  666. "x-codeSamples": [
  667. {
  668. "lang": "js",
  669. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  670. }
  671. ]
  672. },
  673. "patch": {
  674. "tags": ["config"],
  675. "operationId": "config.update",
  676. "parameters": [
  677. {
  678. "name": "directory",
  679. "in": "query",
  680. "schema": {
  681. "type": "string"
  682. },
  683. "required": false
  684. },
  685. {
  686. "name": "workspace",
  687. "in": "query",
  688. "schema": {
  689. "type": "string"
  690. },
  691. "required": false
  692. }
  693. ],
  694. "responses": {
  695. "200": {
  696. "description": "Successfully updated config",
  697. "content": {
  698. "application/json": {
  699. "schema": {
  700. "$ref": "#/components/schemas/Config"
  701. }
  702. }
  703. }
  704. },
  705. "400": {
  706. "description": "BadRequest | InvalidRequestError",
  707. "content": {
  708. "application/json": {
  709. "schema": {
  710. "anyOf": [
  711. {
  712. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  713. },
  714. {
  715. "$ref": "#/components/schemas/InvalidRequestError"
  716. }
  717. ]
  718. }
  719. }
  720. }
  721. }
  722. },
  723. "description": "Update OpenCode configuration settings and preferences.",
  724. "summary": "Update configuration",
  725. "requestBody": {
  726. "content": {
  727. "application/json": {
  728. "schema": {
  729. "$ref": "#/components/schemas/Config"
  730. }
  731. }
  732. }
  733. },
  734. "x-codeSamples": [
  735. {
  736. "lang": "js",
  737. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  738. }
  739. ]
  740. }
  741. },
  742. "/config/providers": {
  743. "get": {
  744. "tags": ["config"],
  745. "operationId": "config.providers",
  746. "parameters": [
  747. {
  748. "name": "directory",
  749. "in": "query",
  750. "schema": {
  751. "type": "string"
  752. },
  753. "required": false
  754. },
  755. {
  756. "name": "workspace",
  757. "in": "query",
  758. "schema": {
  759. "type": "string"
  760. },
  761. "required": false
  762. }
  763. ],
  764. "responses": {
  765. "200": {
  766. "description": "List of providers",
  767. "content": {
  768. "application/json": {
  769. "schema": {
  770. "type": "object",
  771. "properties": {
  772. "providers": {
  773. "type": "array",
  774. "items": {
  775. "$ref": "#/components/schemas/Provider"
  776. }
  777. },
  778. "default": {
  779. "type": "object",
  780. "additionalProperties": {
  781. "type": "string"
  782. }
  783. }
  784. },
  785. "required": ["providers", "default"],
  786. "additionalProperties": false,
  787. "description": "List of providers"
  788. }
  789. }
  790. }
  791. },
  792. "400": {
  793. "description": "Bad request",
  794. "content": {
  795. "application/json": {
  796. "schema": {
  797. "$ref": "#/components/schemas/BadRequestError"
  798. }
  799. }
  800. }
  801. }
  802. },
  803. "description": "Get a list of all configured AI providers and their default models.",
  804. "summary": "List config providers",
  805. "x-codeSamples": [
  806. {
  807. "lang": "js",
  808. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  809. }
  810. ]
  811. }
  812. },
  813. "/experimental/console": {
  814. "get": {
  815. "tags": ["experimental"],
  816. "operationId": "experimental.console.get",
  817. "parameters": [
  818. {
  819. "name": "directory",
  820. "in": "query",
  821. "schema": {
  822. "type": "string"
  823. },
  824. "required": false
  825. },
  826. {
  827. "name": "workspace",
  828. "in": "query",
  829. "schema": {
  830. "type": "string"
  831. },
  832. "required": false
  833. }
  834. ],
  835. "responses": {
  836. "200": {
  837. "description": "Active Console provider metadata",
  838. "content": {
  839. "application/json": {
  840. "schema": {
  841. "$ref": "#/components/schemas/ConsoleState"
  842. }
  843. }
  844. }
  845. },
  846. "400": {
  847. "description": "Bad request",
  848. "content": {
  849. "application/json": {
  850. "schema": {
  851. "$ref": "#/components/schemas/BadRequestError"
  852. }
  853. }
  854. }
  855. },
  856. "500": {
  857. "description": "InternalServerError",
  858. "content": {
  859. "application/json": {
  860. "schema": {
  861. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  862. }
  863. }
  864. }
  865. }
  866. },
  867. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  868. "summary": "Get active Console provider metadata",
  869. "x-codeSamples": [
  870. {
  871. "lang": "js",
  872. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  873. }
  874. ]
  875. }
  876. },
  877. "/experimental/console/orgs": {
  878. "get": {
  879. "tags": ["experimental"],
  880. "operationId": "experimental.console.listOrgs",
  881. "parameters": [
  882. {
  883. "name": "directory",
  884. "in": "query",
  885. "schema": {
  886. "type": "string"
  887. },
  888. "required": false
  889. },
  890. {
  891. "name": "workspace",
  892. "in": "query",
  893. "schema": {
  894. "type": "string"
  895. },
  896. "required": false
  897. }
  898. ],
  899. "responses": {
  900. "200": {
  901. "description": "Switchable Console orgs",
  902. "content": {
  903. "application/json": {
  904. "schema": {
  905. "type": "object",
  906. "properties": {
  907. "orgs": {
  908. "type": "array",
  909. "items": {
  910. "type": "object",
  911. "properties": {
  912. "accountID": {
  913. "type": "string"
  914. },
  915. "accountEmail": {
  916. "type": "string"
  917. },
  918. "accountUrl": {
  919. "type": "string"
  920. },
  921. "orgID": {
  922. "type": "string"
  923. },
  924. "orgName": {
  925. "type": "string"
  926. },
  927. "active": {
  928. "type": "boolean"
  929. }
  930. },
  931. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  932. "additionalProperties": false
  933. }
  934. }
  935. },
  936. "required": ["orgs"],
  937. "additionalProperties": false,
  938. "description": "Switchable Console orgs"
  939. }
  940. }
  941. }
  942. },
  943. "400": {
  944. "description": "Bad request",
  945. "content": {
  946. "application/json": {
  947. "schema": {
  948. "$ref": "#/components/schemas/BadRequestError"
  949. }
  950. }
  951. }
  952. },
  953. "500": {
  954. "description": "InternalServerError",
  955. "content": {
  956. "application/json": {
  957. "schema": {
  958. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  959. }
  960. }
  961. }
  962. }
  963. },
  964. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  965. "summary": "List switchable Console orgs",
  966. "x-codeSamples": [
  967. {
  968. "lang": "js",
  969. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  970. }
  971. ]
  972. }
  973. },
  974. "/experimental/console/switch": {
  975. "post": {
  976. "tags": ["experimental"],
  977. "operationId": "experimental.console.switchOrg",
  978. "parameters": [
  979. {
  980. "name": "directory",
  981. "in": "query",
  982. "schema": {
  983. "type": "string"
  984. },
  985. "required": false
  986. },
  987. {
  988. "name": "workspace",
  989. "in": "query",
  990. "schema": {
  991. "type": "string"
  992. },
  993. "required": false
  994. }
  995. ],
  996. "responses": {
  997. "200": {
  998. "description": "Switch success",
  999. "content": {
  1000. "application/json": {
  1001. "schema": {
  1002. "type": "boolean",
  1003. "description": "Switch success"
  1004. }
  1005. }
  1006. }
  1007. }
  1008. },
  1009. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  1010. "summary": "Switch active Console org",
  1011. "requestBody": {
  1012. "content": {
  1013. "application/json": {
  1014. "schema": {
  1015. "type": "object",
  1016. "properties": {
  1017. "accountID": {
  1018. "type": "string"
  1019. },
  1020. "orgID": {
  1021. "type": "string"
  1022. }
  1023. },
  1024. "required": ["accountID", "orgID"],
  1025. "additionalProperties": false
  1026. }
  1027. }
  1028. }
  1029. },
  1030. "x-codeSamples": [
  1031. {
  1032. "lang": "js",
  1033. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  1034. }
  1035. ]
  1036. }
  1037. },
  1038. "/experimental/tool": {
  1039. "get": {
  1040. "tags": ["experimental"],
  1041. "operationId": "tool.list",
  1042. "parameters": [
  1043. {
  1044. "name": "directory",
  1045. "in": "query",
  1046. "schema": {
  1047. "type": "string"
  1048. },
  1049. "required": false
  1050. },
  1051. {
  1052. "name": "workspace",
  1053. "in": "query",
  1054. "schema": {
  1055. "type": "string"
  1056. },
  1057. "required": false
  1058. },
  1059. {
  1060. "name": "provider",
  1061. "in": "query",
  1062. "schema": {
  1063. "type": "string"
  1064. },
  1065. "required": true
  1066. },
  1067. {
  1068. "name": "model",
  1069. "in": "query",
  1070. "schema": {
  1071. "type": "string"
  1072. },
  1073. "required": true
  1074. }
  1075. ],
  1076. "responses": {
  1077. "200": {
  1078. "description": "Tools",
  1079. "content": {
  1080. "application/json": {
  1081. "schema": {
  1082. "$ref": "#/components/schemas/ToolList"
  1083. }
  1084. }
  1085. }
  1086. },
  1087. "400": {
  1088. "description": "BadRequest | InvalidRequestError",
  1089. "content": {
  1090. "application/json": {
  1091. "schema": {
  1092. "anyOf": [
  1093. {
  1094. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1095. },
  1096. {
  1097. "$ref": "#/components/schemas/InvalidRequestError"
  1098. }
  1099. ]
  1100. }
  1101. }
  1102. }
  1103. }
  1104. },
  1105. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  1106. "summary": "List tools",
  1107. "x-codeSamples": [
  1108. {
  1109. "lang": "js",
  1110. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  1111. }
  1112. ]
  1113. }
  1114. },
  1115. "/experimental/tool/ids": {
  1116. "get": {
  1117. "tags": ["experimental"],
  1118. "operationId": "tool.ids",
  1119. "parameters": [
  1120. {
  1121. "name": "directory",
  1122. "in": "query",
  1123. "schema": {
  1124. "type": "string"
  1125. },
  1126. "required": false
  1127. },
  1128. {
  1129. "name": "workspace",
  1130. "in": "query",
  1131. "schema": {
  1132. "type": "string"
  1133. },
  1134. "required": false
  1135. }
  1136. ],
  1137. "responses": {
  1138. "200": {
  1139. "description": "Tool IDs",
  1140. "content": {
  1141. "application/json": {
  1142. "schema": {
  1143. "$ref": "#/components/schemas/ToolIDs"
  1144. }
  1145. }
  1146. }
  1147. },
  1148. "400": {
  1149. "description": "BadRequest | InvalidRequestError",
  1150. "content": {
  1151. "application/json": {
  1152. "schema": {
  1153. "anyOf": [
  1154. {
  1155. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1156. },
  1157. {
  1158. "$ref": "#/components/schemas/InvalidRequestError"
  1159. }
  1160. ]
  1161. }
  1162. }
  1163. }
  1164. }
  1165. },
  1166. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  1167. "summary": "List tool IDs",
  1168. "x-codeSamples": [
  1169. {
  1170. "lang": "js",
  1171. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  1172. }
  1173. ]
  1174. }
  1175. },
  1176. "/experimental/worktree": {
  1177. "get": {
  1178. "tags": ["experimental"],
  1179. "operationId": "worktree.list",
  1180. "parameters": [
  1181. {
  1182. "name": "directory",
  1183. "in": "query",
  1184. "schema": {
  1185. "type": "string"
  1186. },
  1187. "required": false
  1188. },
  1189. {
  1190. "name": "workspace",
  1191. "in": "query",
  1192. "schema": {
  1193. "type": "string"
  1194. },
  1195. "required": false
  1196. }
  1197. ],
  1198. "responses": {
  1199. "200": {
  1200. "description": "List of worktree directories",
  1201. "content": {
  1202. "application/json": {
  1203. "schema": {
  1204. "type": "array",
  1205. "items": {
  1206. "type": "string"
  1207. },
  1208. "description": "List of worktree directories"
  1209. }
  1210. }
  1211. }
  1212. },
  1213. "400": {
  1214. "description": "WorktreeError | InvalidRequestError",
  1215. "content": {
  1216. "application/json": {
  1217. "schema": {
  1218. "anyOf": [
  1219. {
  1220. "$ref": "#/components/schemas/WorktreeError"
  1221. },
  1222. {
  1223. "$ref": "#/components/schemas/InvalidRequestError"
  1224. }
  1225. ]
  1226. }
  1227. }
  1228. }
  1229. }
  1230. },
  1231. "description": "List all sandbox worktrees for the current project.",
  1232. "summary": "List worktrees",
  1233. "x-codeSamples": [
  1234. {
  1235. "lang": "js",
  1236. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1237. }
  1238. ]
  1239. },
  1240. "post": {
  1241. "tags": ["experimental"],
  1242. "operationId": "worktree.create",
  1243. "parameters": [
  1244. {
  1245. "name": "directory",
  1246. "in": "query",
  1247. "schema": {
  1248. "type": "string"
  1249. },
  1250. "required": false
  1251. },
  1252. {
  1253. "name": "workspace",
  1254. "in": "query",
  1255. "schema": {
  1256. "type": "string"
  1257. },
  1258. "required": false
  1259. }
  1260. ],
  1261. "responses": {
  1262. "200": {
  1263. "description": "Worktree created",
  1264. "content": {
  1265. "application/json": {
  1266. "schema": {
  1267. "$ref": "#/components/schemas/Worktree"
  1268. }
  1269. }
  1270. }
  1271. },
  1272. "400": {
  1273. "description": "WorktreeError | InvalidRequestError",
  1274. "content": {
  1275. "application/json": {
  1276. "schema": {
  1277. "anyOf": [
  1278. {
  1279. "$ref": "#/components/schemas/WorktreeError"
  1280. },
  1281. {
  1282. "$ref": "#/components/schemas/InvalidRequestError"
  1283. }
  1284. ]
  1285. }
  1286. }
  1287. }
  1288. }
  1289. },
  1290. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1291. "summary": "Create worktree",
  1292. "requestBody": {
  1293. "content": {
  1294. "application/json": {
  1295. "schema": {
  1296. "$ref": "#/components/schemas/WorktreeCreateInput"
  1297. }
  1298. }
  1299. }
  1300. },
  1301. "x-codeSamples": [
  1302. {
  1303. "lang": "js",
  1304. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1305. }
  1306. ]
  1307. },
  1308. "delete": {
  1309. "tags": ["experimental"],
  1310. "operationId": "worktree.remove",
  1311. "parameters": [
  1312. {
  1313. "name": "directory",
  1314. "in": "query",
  1315. "schema": {
  1316. "type": "string"
  1317. },
  1318. "required": false
  1319. },
  1320. {
  1321. "name": "workspace",
  1322. "in": "query",
  1323. "schema": {
  1324. "type": "string"
  1325. },
  1326. "required": false
  1327. }
  1328. ],
  1329. "responses": {
  1330. "200": {
  1331. "description": "Worktree removed",
  1332. "content": {
  1333. "application/json": {
  1334. "schema": {
  1335. "type": "boolean",
  1336. "description": "Worktree removed"
  1337. }
  1338. }
  1339. }
  1340. },
  1341. "400": {
  1342. "description": "WorktreeError | InvalidRequestError",
  1343. "content": {
  1344. "application/json": {
  1345. "schema": {
  1346. "anyOf": [
  1347. {
  1348. "$ref": "#/components/schemas/WorktreeError"
  1349. },
  1350. {
  1351. "$ref": "#/components/schemas/InvalidRequestError"
  1352. }
  1353. ]
  1354. }
  1355. }
  1356. }
  1357. }
  1358. },
  1359. "description": "Remove a git worktree and delete its branch.",
  1360. "summary": "Remove worktree",
  1361. "requestBody": {
  1362. "content": {
  1363. "application/json": {
  1364. "schema": {
  1365. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1366. }
  1367. }
  1368. }
  1369. },
  1370. "x-codeSamples": [
  1371. {
  1372. "lang": "js",
  1373. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1374. }
  1375. ]
  1376. }
  1377. },
  1378. "/experimental/worktree/reset": {
  1379. "post": {
  1380. "tags": ["experimental"],
  1381. "operationId": "worktree.reset",
  1382. "parameters": [
  1383. {
  1384. "name": "directory",
  1385. "in": "query",
  1386. "schema": {
  1387. "type": "string"
  1388. },
  1389. "required": false
  1390. },
  1391. {
  1392. "name": "workspace",
  1393. "in": "query",
  1394. "schema": {
  1395. "type": "string"
  1396. },
  1397. "required": false
  1398. }
  1399. ],
  1400. "responses": {
  1401. "200": {
  1402. "description": "Worktree reset",
  1403. "content": {
  1404. "application/json": {
  1405. "schema": {
  1406. "type": "boolean",
  1407. "description": "Worktree reset"
  1408. }
  1409. }
  1410. }
  1411. },
  1412. "400": {
  1413. "description": "WorktreeError | InvalidRequestError",
  1414. "content": {
  1415. "application/json": {
  1416. "schema": {
  1417. "anyOf": [
  1418. {
  1419. "$ref": "#/components/schemas/WorktreeError"
  1420. },
  1421. {
  1422. "$ref": "#/components/schemas/InvalidRequestError"
  1423. }
  1424. ]
  1425. }
  1426. }
  1427. }
  1428. }
  1429. },
  1430. "description": "Reset a worktree branch to the primary default branch.",
  1431. "summary": "Reset worktree",
  1432. "requestBody": {
  1433. "content": {
  1434. "application/json": {
  1435. "schema": {
  1436. "$ref": "#/components/schemas/WorktreeResetInput"
  1437. }
  1438. }
  1439. }
  1440. },
  1441. "x-codeSamples": [
  1442. {
  1443. "lang": "js",
  1444. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1445. }
  1446. ]
  1447. }
  1448. },
  1449. "/experimental/session": {
  1450. "get": {
  1451. "tags": ["experimental"],
  1452. "operationId": "experimental.session.list",
  1453. "parameters": [
  1454. {
  1455. "name": "directory",
  1456. "in": "query",
  1457. "schema": {
  1458. "type": "string"
  1459. },
  1460. "required": false
  1461. },
  1462. {
  1463. "name": "workspace",
  1464. "in": "query",
  1465. "schema": {
  1466. "type": "string"
  1467. },
  1468. "required": false
  1469. },
  1470. {
  1471. "name": "roots",
  1472. "in": "query",
  1473. "schema": {
  1474. "anyOf": [
  1475. {
  1476. "type": "boolean"
  1477. },
  1478. {
  1479. "type": "string",
  1480. "enum": ["true", "false"]
  1481. }
  1482. ]
  1483. },
  1484. "required": false
  1485. },
  1486. {
  1487. "name": "start",
  1488. "in": "query",
  1489. "schema": {
  1490. "type": "number"
  1491. },
  1492. "required": false
  1493. },
  1494. {
  1495. "name": "cursor",
  1496. "in": "query",
  1497. "schema": {
  1498. "type": "number"
  1499. },
  1500. "required": false
  1501. },
  1502. {
  1503. "name": "search",
  1504. "in": "query",
  1505. "schema": {
  1506. "type": "string"
  1507. },
  1508. "required": false
  1509. },
  1510. {
  1511. "name": "limit",
  1512. "in": "query",
  1513. "schema": {
  1514. "type": "number"
  1515. },
  1516. "required": false
  1517. },
  1518. {
  1519. "name": "archived",
  1520. "in": "query",
  1521. "schema": {
  1522. "anyOf": [
  1523. {
  1524. "type": "boolean"
  1525. },
  1526. {
  1527. "type": "string",
  1528. "enum": ["true", "false"]
  1529. }
  1530. ]
  1531. },
  1532. "required": false
  1533. }
  1534. ],
  1535. "responses": {
  1536. "200": {
  1537. "description": "List of sessions",
  1538. "content": {
  1539. "application/json": {
  1540. "schema": {
  1541. "type": "array",
  1542. "items": {
  1543. "$ref": "#/components/schemas/GlobalSession"
  1544. },
  1545. "description": "List of sessions"
  1546. }
  1547. }
  1548. }
  1549. },
  1550. "400": {
  1551. "description": "Bad request",
  1552. "content": {
  1553. "application/json": {
  1554. "schema": {
  1555. "$ref": "#/components/schemas/BadRequestError"
  1556. }
  1557. }
  1558. }
  1559. }
  1560. },
  1561. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1562. "summary": "List sessions",
  1563. "x-codeSamples": [
  1564. {
  1565. "lang": "js",
  1566. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1567. }
  1568. ]
  1569. }
  1570. },
  1571. "/experimental/session/{sessionID}/background": {
  1572. "post": {
  1573. "tags": ["experimental"],
  1574. "operationId": "experimental.session.background",
  1575. "parameters": [
  1576. {
  1577. "name": "sessionID",
  1578. "in": "path",
  1579. "schema": {
  1580. "type": "string",
  1581. "pattern": "^ses"
  1582. },
  1583. "required": true
  1584. },
  1585. {
  1586. "name": "directory",
  1587. "in": "query",
  1588. "schema": {
  1589. "type": "string"
  1590. },
  1591. "required": false
  1592. },
  1593. {
  1594. "name": "workspace",
  1595. "in": "query",
  1596. "schema": {
  1597. "type": "string"
  1598. },
  1599. "required": false
  1600. }
  1601. ],
  1602. "responses": {
  1603. "200": {
  1604. "description": "Backgrounded subagents",
  1605. "content": {
  1606. "application/json": {
  1607. "schema": {
  1608. "type": "boolean",
  1609. "description": "Backgrounded subagents"
  1610. }
  1611. }
  1612. }
  1613. },
  1614. "400": {
  1615. "description": "BadRequest | InvalidRequestError",
  1616. "content": {
  1617. "application/json": {
  1618. "schema": {
  1619. "anyOf": [
  1620. {
  1621. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  1622. },
  1623. {
  1624. "$ref": "#/components/schemas/InvalidRequestError"
  1625. }
  1626. ]
  1627. }
  1628. }
  1629. }
  1630. }
  1631. },
  1632. "description": "Detach any synchronous subagents currently blocking the session and continue them in the background.",
  1633. "summary": "Background subagents",
  1634. "x-codeSamples": [
  1635. {
  1636. "lang": "js",
  1637. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.background({\n ...\n})"
  1638. }
  1639. ]
  1640. }
  1641. },
  1642. "/experimental/resource": {
  1643. "get": {
  1644. "tags": ["experimental"],
  1645. "operationId": "experimental.resource.list",
  1646. "parameters": [
  1647. {
  1648. "name": "directory",
  1649. "in": "query",
  1650. "schema": {
  1651. "type": "string"
  1652. },
  1653. "required": false
  1654. },
  1655. {
  1656. "name": "workspace",
  1657. "in": "query",
  1658. "schema": {
  1659. "type": "string"
  1660. },
  1661. "required": false
  1662. }
  1663. ],
  1664. "responses": {
  1665. "200": {
  1666. "description": "MCP resources",
  1667. "content": {
  1668. "application/json": {
  1669. "schema": {
  1670. "type": "object",
  1671. "additionalProperties": {
  1672. "$ref": "#/components/schemas/McpResource"
  1673. },
  1674. "description": "MCP resources"
  1675. }
  1676. }
  1677. }
  1678. },
  1679. "400": {
  1680. "description": "Bad request",
  1681. "content": {
  1682. "application/json": {
  1683. "schema": {
  1684. "$ref": "#/components/schemas/BadRequestError"
  1685. }
  1686. }
  1687. }
  1688. }
  1689. },
  1690. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1691. "summary": "Get MCP resources",
  1692. "x-codeSamples": [
  1693. {
  1694. "lang": "js",
  1695. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1696. }
  1697. ]
  1698. }
  1699. },
  1700. "/find": {
  1701. "get": {
  1702. "tags": ["file"],
  1703. "operationId": "find.text",
  1704. "parameters": [
  1705. {
  1706. "name": "directory",
  1707. "in": "query",
  1708. "schema": {
  1709. "type": "string"
  1710. },
  1711. "required": false
  1712. },
  1713. {
  1714. "name": "workspace",
  1715. "in": "query",
  1716. "schema": {
  1717. "type": "string"
  1718. },
  1719. "required": false
  1720. },
  1721. {
  1722. "name": "pattern",
  1723. "in": "query",
  1724. "schema": {
  1725. "type": "string"
  1726. },
  1727. "required": true
  1728. }
  1729. ],
  1730. "responses": {
  1731. "200": {
  1732. "description": "Matches",
  1733. "content": {
  1734. "application/json": {
  1735. "schema": {
  1736. "type": "array",
  1737. "items": {
  1738. "type": "object",
  1739. "properties": {
  1740. "path": {
  1741. "type": "object",
  1742. "properties": {
  1743. "text": {
  1744. "type": "string"
  1745. }
  1746. },
  1747. "required": ["text"],
  1748. "additionalProperties": false
  1749. },
  1750. "lines": {
  1751. "type": "object",
  1752. "properties": {
  1753. "text": {
  1754. "type": "string"
  1755. }
  1756. },
  1757. "required": ["text"],
  1758. "additionalProperties": false
  1759. },
  1760. "line_number": {
  1761. "type": "integer",
  1762. "minimum": 0
  1763. },
  1764. "absolute_offset": {
  1765. "type": "integer",
  1766. "minimum": 0
  1767. },
  1768. "submatches": {
  1769. "type": "array",
  1770. "items": {
  1771. "type": "object",
  1772. "properties": {
  1773. "match": {
  1774. "type": "object",
  1775. "properties": {
  1776. "text": {
  1777. "type": "string"
  1778. }
  1779. },
  1780. "required": ["text"],
  1781. "additionalProperties": false
  1782. },
  1783. "start": {
  1784. "type": "integer",
  1785. "minimum": 0
  1786. },
  1787. "end": {
  1788. "type": "integer",
  1789. "minimum": 0
  1790. }
  1791. },
  1792. "required": ["match", "start", "end"],
  1793. "additionalProperties": false
  1794. }
  1795. }
  1796. },
  1797. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1798. "additionalProperties": false
  1799. },
  1800. "description": "Matches"
  1801. }
  1802. }
  1803. }
  1804. },
  1805. "400": {
  1806. "description": "Bad request",
  1807. "content": {
  1808. "application/json": {
  1809. "schema": {
  1810. "$ref": "#/components/schemas/BadRequestError"
  1811. }
  1812. }
  1813. }
  1814. }
  1815. },
  1816. "description": "Search for text patterns across files in the project using ripgrep.",
  1817. "summary": "Find text",
  1818. "x-codeSamples": [
  1819. {
  1820. "lang": "js",
  1821. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1822. }
  1823. ]
  1824. }
  1825. },
  1826. "/find/file": {
  1827. "get": {
  1828. "tags": ["file"],
  1829. "operationId": "find.files",
  1830. "parameters": [
  1831. {
  1832. "name": "directory",
  1833. "in": "query",
  1834. "schema": {
  1835. "type": "string"
  1836. },
  1837. "required": false
  1838. },
  1839. {
  1840. "name": "workspace",
  1841. "in": "query",
  1842. "schema": {
  1843. "type": "string"
  1844. },
  1845. "required": false
  1846. },
  1847. {
  1848. "name": "query",
  1849. "in": "query",
  1850. "schema": {
  1851. "type": "string"
  1852. },
  1853. "required": true
  1854. },
  1855. {
  1856. "name": "dirs",
  1857. "in": "query",
  1858. "schema": {
  1859. "type": "string",
  1860. "enum": ["true", "false"]
  1861. },
  1862. "required": false
  1863. },
  1864. {
  1865. "name": "type",
  1866. "in": "query",
  1867. "schema": {
  1868. "type": "string",
  1869. "enum": ["file", "directory"]
  1870. },
  1871. "required": false
  1872. },
  1873. {
  1874. "name": "limit",
  1875. "in": "query",
  1876. "schema": {
  1877. "type": "integer",
  1878. "minimum": 1,
  1879. "maximum": 200
  1880. },
  1881. "required": false
  1882. }
  1883. ],
  1884. "responses": {
  1885. "200": {
  1886. "description": "File paths",
  1887. "content": {
  1888. "application/json": {
  1889. "schema": {
  1890. "type": "array",
  1891. "items": {
  1892. "type": "string"
  1893. },
  1894. "description": "File paths"
  1895. }
  1896. }
  1897. }
  1898. },
  1899. "400": {
  1900. "description": "Bad request",
  1901. "content": {
  1902. "application/json": {
  1903. "schema": {
  1904. "$ref": "#/components/schemas/BadRequestError"
  1905. }
  1906. }
  1907. }
  1908. }
  1909. },
  1910. "description": "Search for files or directories by name or pattern in the project directory.",
  1911. "summary": "Find files",
  1912. "x-codeSamples": [
  1913. {
  1914. "lang": "js",
  1915. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1916. }
  1917. ]
  1918. }
  1919. },
  1920. "/find/symbol": {
  1921. "get": {
  1922. "tags": ["file"],
  1923. "operationId": "find.symbols",
  1924. "parameters": [
  1925. {
  1926. "name": "directory",
  1927. "in": "query",
  1928. "schema": {
  1929. "type": "string"
  1930. },
  1931. "required": false
  1932. },
  1933. {
  1934. "name": "workspace",
  1935. "in": "query",
  1936. "schema": {
  1937. "type": "string"
  1938. },
  1939. "required": false
  1940. },
  1941. {
  1942. "name": "query",
  1943. "in": "query",
  1944. "schema": {
  1945. "type": "string"
  1946. },
  1947. "required": true
  1948. }
  1949. ],
  1950. "responses": {
  1951. "200": {
  1952. "description": "Symbols",
  1953. "content": {
  1954. "application/json": {
  1955. "schema": {
  1956. "type": "array",
  1957. "items": {
  1958. "$ref": "#/components/schemas/Symbol"
  1959. },
  1960. "description": "Symbols"
  1961. }
  1962. }
  1963. }
  1964. },
  1965. "400": {
  1966. "description": "Bad request",
  1967. "content": {
  1968. "application/json": {
  1969. "schema": {
  1970. "$ref": "#/components/schemas/BadRequestError"
  1971. }
  1972. }
  1973. }
  1974. }
  1975. },
  1976. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  1977. "summary": "Find symbols",
  1978. "x-codeSamples": [
  1979. {
  1980. "lang": "js",
  1981. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  1982. }
  1983. ]
  1984. }
  1985. },
  1986. "/file": {
  1987. "get": {
  1988. "tags": ["file"],
  1989. "operationId": "file.list",
  1990. "parameters": [
  1991. {
  1992. "name": "directory",
  1993. "in": "query",
  1994. "schema": {
  1995. "type": "string"
  1996. },
  1997. "required": false
  1998. },
  1999. {
  2000. "name": "workspace",
  2001. "in": "query",
  2002. "schema": {
  2003. "type": "string"
  2004. },
  2005. "required": false
  2006. },
  2007. {
  2008. "name": "path",
  2009. "in": "query",
  2010. "schema": {
  2011. "type": "string"
  2012. },
  2013. "required": true
  2014. }
  2015. ],
  2016. "responses": {
  2017. "200": {
  2018. "description": "Files and directories",
  2019. "content": {
  2020. "application/json": {
  2021. "schema": {
  2022. "type": "array",
  2023. "items": {
  2024. "$ref": "#/components/schemas/FileNode"
  2025. },
  2026. "description": "Files and directories"
  2027. }
  2028. }
  2029. }
  2030. },
  2031. "400": {
  2032. "description": "Bad request",
  2033. "content": {
  2034. "application/json": {
  2035. "schema": {
  2036. "$ref": "#/components/schemas/BadRequestError"
  2037. }
  2038. }
  2039. }
  2040. }
  2041. },
  2042. "description": "List files and directories in a specified path.",
  2043. "summary": "List files",
  2044. "x-codeSamples": [
  2045. {
  2046. "lang": "js",
  2047. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  2048. }
  2049. ]
  2050. }
  2051. },
  2052. "/file/content": {
  2053. "get": {
  2054. "tags": ["file"],
  2055. "operationId": "file.read",
  2056. "parameters": [
  2057. {
  2058. "name": "directory",
  2059. "in": "query",
  2060. "schema": {
  2061. "type": "string"
  2062. },
  2063. "required": false
  2064. },
  2065. {
  2066. "name": "workspace",
  2067. "in": "query",
  2068. "schema": {
  2069. "type": "string"
  2070. },
  2071. "required": false
  2072. },
  2073. {
  2074. "name": "path",
  2075. "in": "query",
  2076. "schema": {
  2077. "type": "string"
  2078. },
  2079. "required": true
  2080. }
  2081. ],
  2082. "responses": {
  2083. "200": {
  2084. "description": "File content",
  2085. "content": {
  2086. "application/json": {
  2087. "schema": {
  2088. "$ref": "#/components/schemas/FileContent"
  2089. }
  2090. }
  2091. }
  2092. },
  2093. "400": {
  2094. "description": "Bad request",
  2095. "content": {
  2096. "application/json": {
  2097. "schema": {
  2098. "$ref": "#/components/schemas/BadRequestError"
  2099. }
  2100. }
  2101. }
  2102. }
  2103. },
  2104. "description": "Read the content of a specified file.",
  2105. "summary": "Read file",
  2106. "x-codeSamples": [
  2107. {
  2108. "lang": "js",
  2109. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  2110. }
  2111. ]
  2112. }
  2113. },
  2114. "/file/status": {
  2115. "get": {
  2116. "tags": ["file"],
  2117. "operationId": "file.status",
  2118. "parameters": [
  2119. {
  2120. "name": "directory",
  2121. "in": "query",
  2122. "schema": {
  2123. "type": "string"
  2124. },
  2125. "required": false
  2126. },
  2127. {
  2128. "name": "workspace",
  2129. "in": "query",
  2130. "schema": {
  2131. "type": "string"
  2132. },
  2133. "required": false
  2134. }
  2135. ],
  2136. "responses": {
  2137. "200": {
  2138. "description": "File status",
  2139. "content": {
  2140. "application/json": {
  2141. "schema": {
  2142. "type": "array",
  2143. "items": {
  2144. "$ref": "#/components/schemas/File"
  2145. },
  2146. "description": "File status"
  2147. }
  2148. }
  2149. }
  2150. },
  2151. "400": {
  2152. "description": "Bad request",
  2153. "content": {
  2154. "application/json": {
  2155. "schema": {
  2156. "$ref": "#/components/schemas/BadRequestError"
  2157. }
  2158. }
  2159. }
  2160. }
  2161. },
  2162. "description": "Get the git status of all files in the project.",
  2163. "summary": "Get file status",
  2164. "x-codeSamples": [
  2165. {
  2166. "lang": "js",
  2167. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  2168. }
  2169. ]
  2170. }
  2171. },
  2172. "/instance/dispose": {
  2173. "post": {
  2174. "tags": ["instance"],
  2175. "operationId": "instance.dispose",
  2176. "parameters": [
  2177. {
  2178. "name": "directory",
  2179. "in": "query",
  2180. "schema": {
  2181. "type": "string"
  2182. },
  2183. "required": false
  2184. },
  2185. {
  2186. "name": "workspace",
  2187. "in": "query",
  2188. "schema": {
  2189. "type": "string"
  2190. },
  2191. "required": false
  2192. }
  2193. ],
  2194. "responses": {
  2195. "200": {
  2196. "description": "Instance disposed",
  2197. "content": {
  2198. "application/json": {
  2199. "schema": {
  2200. "type": "boolean",
  2201. "description": "Instance disposed"
  2202. }
  2203. }
  2204. }
  2205. },
  2206. "400": {
  2207. "description": "Bad request",
  2208. "content": {
  2209. "application/json": {
  2210. "schema": {
  2211. "$ref": "#/components/schemas/BadRequestError"
  2212. }
  2213. }
  2214. }
  2215. }
  2216. },
  2217. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  2218. "summary": "Dispose instance",
  2219. "x-codeSamples": [
  2220. {
  2221. "lang": "js",
  2222. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  2223. }
  2224. ]
  2225. }
  2226. },
  2227. "/path": {
  2228. "get": {
  2229. "tags": ["instance"],
  2230. "operationId": "path.get",
  2231. "parameters": [
  2232. {
  2233. "name": "directory",
  2234. "in": "query",
  2235. "schema": {
  2236. "type": "string"
  2237. },
  2238. "required": false
  2239. },
  2240. {
  2241. "name": "workspace",
  2242. "in": "query",
  2243. "schema": {
  2244. "type": "string"
  2245. },
  2246. "required": false
  2247. }
  2248. ],
  2249. "responses": {
  2250. "200": {
  2251. "description": "Path",
  2252. "content": {
  2253. "application/json": {
  2254. "schema": {
  2255. "$ref": "#/components/schemas/Path"
  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": "Retrieve the current working directory and related path information for the OpenCode instance.",
  2272. "summary": "Get paths",
  2273. "x-codeSamples": [
  2274. {
  2275. "lang": "js",
  2276. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  2277. }
  2278. ]
  2279. }
  2280. },
  2281. "/vcs": {
  2282. "get": {
  2283. "tags": ["instance"],
  2284. "operationId": "vcs.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": "VCS info",
  2306. "content": {
  2307. "application/json": {
  2308. "schema": {
  2309. "$ref": "#/components/schemas/VcsInfo"
  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 version control system (VCS) information for the current project, such as git branch.",
  2326. "summary": "Get VCS info",
  2327. "x-codeSamples": [
  2328. {
  2329. "lang": "js",
  2330. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  2331. }
  2332. ]
  2333. }
  2334. },
  2335. "/vcs/status": {
  2336. "get": {
  2337. "tags": ["instance"],
  2338. "operationId": "vcs.status",
  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 status",
  2360. "content": {
  2361. "application/json": {
  2362. "schema": {
  2363. "type": "array",
  2364. "items": {
  2365. "$ref": "#/components/schemas/VcsFileStatus"
  2366. },
  2367. "description": "VCS status"
  2368. }
  2369. }
  2370. }
  2371. },
  2372. "400": {
  2373. "description": "Bad request",
  2374. "content": {
  2375. "application/json": {
  2376. "schema": {
  2377. "$ref": "#/components/schemas/BadRequestError"
  2378. }
  2379. }
  2380. }
  2381. }
  2382. },
  2383. "description": "Retrieve changed files in the current working tree without patches.",
  2384. "summary": "Get VCS status",
  2385. "x-codeSamples": [
  2386. {
  2387. "lang": "js",
  2388. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  2389. }
  2390. ]
  2391. }
  2392. },
  2393. "/vcs/diff": {
  2394. "get": {
  2395. "tags": ["instance"],
  2396. "operationId": "vcs.diff",
  2397. "parameters": [
  2398. {
  2399. "name": "directory",
  2400. "in": "query",
  2401. "schema": {
  2402. "type": "string"
  2403. },
  2404. "required": false
  2405. },
  2406. {
  2407. "name": "workspace",
  2408. "in": "query",
  2409. "schema": {
  2410. "type": "string"
  2411. },
  2412. "required": false
  2413. },
  2414. {
  2415. "name": "mode",
  2416. "in": "query",
  2417. "schema": {
  2418. "type": "string",
  2419. "enum": ["git", "branch"]
  2420. },
  2421. "required": true
  2422. },
  2423. {
  2424. "name": "context",
  2425. "in": "query",
  2426. "schema": {
  2427. "type": "integer",
  2428. "minimum": 0
  2429. },
  2430. "required": false
  2431. }
  2432. ],
  2433. "responses": {
  2434. "200": {
  2435. "description": "VCS diff",
  2436. "content": {
  2437. "application/json": {
  2438. "schema": {
  2439. "type": "array",
  2440. "items": {
  2441. "$ref": "#/components/schemas/VcsFileDiff"
  2442. },
  2443. "description": "VCS diff"
  2444. }
  2445. }
  2446. }
  2447. },
  2448. "400": {
  2449. "description": "Bad request",
  2450. "content": {
  2451. "application/json": {
  2452. "schema": {
  2453. "$ref": "#/components/schemas/BadRequestError"
  2454. }
  2455. }
  2456. }
  2457. }
  2458. },
  2459. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2460. "summary": "Get VCS diff",
  2461. "x-codeSamples": [
  2462. {
  2463. "lang": "js",
  2464. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2465. }
  2466. ]
  2467. }
  2468. },
  2469. "/vcs/diff/raw": {
  2470. "get": {
  2471. "tags": ["instance"],
  2472. "operationId": "vcs.diff.raw",
  2473. "parameters": [
  2474. {
  2475. "name": "directory",
  2476. "in": "query",
  2477. "schema": {
  2478. "type": "string"
  2479. },
  2480. "required": false
  2481. },
  2482. {
  2483. "name": "workspace",
  2484. "in": "query",
  2485. "schema": {
  2486. "type": "string"
  2487. },
  2488. "required": false
  2489. }
  2490. ],
  2491. "responses": {
  2492. "200": {
  2493. "description": "Raw VCS diff",
  2494. "content": {
  2495. "text/x-diff; charset=utf-8": {
  2496. "schema": {
  2497. "type": "string"
  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 a raw patch for current uncommitted changes.",
  2514. "summary": "Get raw 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.raw({\n ...\n})"
  2519. }
  2520. ]
  2521. }
  2522. },
  2523. "/vcs/apply": {
  2524. "post": {
  2525. "tags": ["instance"],
  2526. "operationId": "vcs.apply",
  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": "VCS patch applied",
  2548. "content": {
  2549. "application/json": {
  2550. "schema": {
  2551. "type": "object",
  2552. "properties": {
  2553. "applied": {
  2554. "type": "boolean"
  2555. }
  2556. },
  2557. "required": ["applied"],
  2558. "additionalProperties": false,
  2559. "description": "VCS patch applied"
  2560. }
  2561. }
  2562. }
  2563. },
  2564. "400": {
  2565. "description": "VcsApplyError | InvalidRequestError",
  2566. "content": {
  2567. "application/json": {
  2568. "schema": {
  2569. "anyOf": [
  2570. {
  2571. "$ref": "#/components/schemas/VcsApplyError"
  2572. },
  2573. {
  2574. "$ref": "#/components/schemas/InvalidRequestError"
  2575. }
  2576. ]
  2577. }
  2578. }
  2579. }
  2580. }
  2581. },
  2582. "description": "Apply a raw patch to the current working tree.",
  2583. "summary": "Apply VCS patch",
  2584. "requestBody": {
  2585. "content": {
  2586. "application/json": {
  2587. "schema": {
  2588. "type": "object",
  2589. "properties": {
  2590. "patch": {
  2591. "type": "string"
  2592. }
  2593. },
  2594. "required": ["patch"],
  2595. "additionalProperties": false
  2596. }
  2597. }
  2598. }
  2599. },
  2600. "x-codeSamples": [
  2601. {
  2602. "lang": "js",
  2603. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2604. }
  2605. ]
  2606. }
  2607. },
  2608. "/command": {
  2609. "get": {
  2610. "tags": ["instance"],
  2611. "operationId": "command.list",
  2612. "parameters": [
  2613. {
  2614. "name": "directory",
  2615. "in": "query",
  2616. "schema": {
  2617. "type": "string"
  2618. },
  2619. "required": false
  2620. },
  2621. {
  2622. "name": "workspace",
  2623. "in": "query",
  2624. "schema": {
  2625. "type": "string"
  2626. },
  2627. "required": false
  2628. }
  2629. ],
  2630. "responses": {
  2631. "200": {
  2632. "description": "List of commands",
  2633. "content": {
  2634. "application/json": {
  2635. "schema": {
  2636. "type": "array",
  2637. "items": {
  2638. "$ref": "#/components/schemas/Command"
  2639. },
  2640. "description": "List of commands"
  2641. }
  2642. }
  2643. }
  2644. },
  2645. "400": {
  2646. "description": "Bad request",
  2647. "content": {
  2648. "application/json": {
  2649. "schema": {
  2650. "$ref": "#/components/schemas/BadRequestError"
  2651. }
  2652. }
  2653. }
  2654. }
  2655. },
  2656. "description": "Get a list of all available commands in the OpenCode system.",
  2657. "summary": "List commands",
  2658. "x-codeSamples": [
  2659. {
  2660. "lang": "js",
  2661. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2662. }
  2663. ]
  2664. }
  2665. },
  2666. "/agent": {
  2667. "get": {
  2668. "tags": ["instance"],
  2669. "operationId": "app.agents",
  2670. "parameters": [
  2671. {
  2672. "name": "directory",
  2673. "in": "query",
  2674. "schema": {
  2675. "type": "string"
  2676. },
  2677. "required": false
  2678. },
  2679. {
  2680. "name": "workspace",
  2681. "in": "query",
  2682. "schema": {
  2683. "type": "string"
  2684. },
  2685. "required": false
  2686. }
  2687. ],
  2688. "responses": {
  2689. "200": {
  2690. "description": "List of agents",
  2691. "content": {
  2692. "application/json": {
  2693. "schema": {
  2694. "type": "array",
  2695. "items": {
  2696. "$ref": "#/components/schemas/Agent"
  2697. },
  2698. "description": "List of agents"
  2699. }
  2700. }
  2701. }
  2702. },
  2703. "400": {
  2704. "description": "Bad request",
  2705. "content": {
  2706. "application/json": {
  2707. "schema": {
  2708. "$ref": "#/components/schemas/BadRequestError"
  2709. }
  2710. }
  2711. }
  2712. }
  2713. },
  2714. "description": "Get a list of all available AI agents in the OpenCode system.",
  2715. "summary": "List agents",
  2716. "x-codeSamples": [
  2717. {
  2718. "lang": "js",
  2719. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2720. }
  2721. ]
  2722. }
  2723. },
  2724. "/skill": {
  2725. "get": {
  2726. "tags": ["instance"],
  2727. "operationId": "app.skills",
  2728. "parameters": [
  2729. {
  2730. "name": "directory",
  2731. "in": "query",
  2732. "schema": {
  2733. "type": "string"
  2734. },
  2735. "required": false
  2736. },
  2737. {
  2738. "name": "workspace",
  2739. "in": "query",
  2740. "schema": {
  2741. "type": "string"
  2742. },
  2743. "required": false
  2744. }
  2745. ],
  2746. "responses": {
  2747. "200": {
  2748. "description": "List of skills",
  2749. "content": {
  2750. "application/json": {
  2751. "schema": {
  2752. "type": "array",
  2753. "items": {
  2754. "type": "object",
  2755. "properties": {
  2756. "name": {
  2757. "type": "string"
  2758. },
  2759. "description": {
  2760. "type": "string"
  2761. },
  2762. "location": {
  2763. "type": "string"
  2764. },
  2765. "content": {
  2766. "type": "string"
  2767. }
  2768. },
  2769. "required": ["name", "location", "content"],
  2770. "additionalProperties": false
  2771. },
  2772. "description": "List of skills"
  2773. }
  2774. }
  2775. }
  2776. },
  2777. "400": {
  2778. "description": "Bad request",
  2779. "content": {
  2780. "application/json": {
  2781. "schema": {
  2782. "$ref": "#/components/schemas/BadRequestError"
  2783. }
  2784. }
  2785. }
  2786. }
  2787. },
  2788. "description": "Get a list of all available skills in the OpenCode system.",
  2789. "summary": "List skills",
  2790. "x-codeSamples": [
  2791. {
  2792. "lang": "js",
  2793. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2794. }
  2795. ]
  2796. }
  2797. },
  2798. "/lsp": {
  2799. "get": {
  2800. "tags": ["instance"],
  2801. "operationId": "lsp.status",
  2802. "parameters": [
  2803. {
  2804. "name": "directory",
  2805. "in": "query",
  2806. "schema": {
  2807. "type": "string"
  2808. },
  2809. "required": false
  2810. },
  2811. {
  2812. "name": "workspace",
  2813. "in": "query",
  2814. "schema": {
  2815. "type": "string"
  2816. },
  2817. "required": false
  2818. }
  2819. ],
  2820. "responses": {
  2821. "200": {
  2822. "description": "LSP server status",
  2823. "content": {
  2824. "application/json": {
  2825. "schema": {
  2826. "type": "array",
  2827. "items": {
  2828. "$ref": "#/components/schemas/LSPStatus"
  2829. },
  2830. "description": "LSP server status"
  2831. }
  2832. }
  2833. }
  2834. },
  2835. "400": {
  2836. "description": "Bad request",
  2837. "content": {
  2838. "application/json": {
  2839. "schema": {
  2840. "$ref": "#/components/schemas/BadRequestError"
  2841. }
  2842. }
  2843. }
  2844. }
  2845. },
  2846. "description": "Get LSP server status",
  2847. "summary": "Get LSP status",
  2848. "x-codeSamples": [
  2849. {
  2850. "lang": "js",
  2851. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2852. }
  2853. ]
  2854. }
  2855. },
  2856. "/formatter": {
  2857. "get": {
  2858. "tags": ["instance"],
  2859. "operationId": "formatter.status",
  2860. "parameters": [
  2861. {
  2862. "name": "directory",
  2863. "in": "query",
  2864. "schema": {
  2865. "type": "string"
  2866. },
  2867. "required": false
  2868. },
  2869. {
  2870. "name": "workspace",
  2871. "in": "query",
  2872. "schema": {
  2873. "type": "string"
  2874. },
  2875. "required": false
  2876. }
  2877. ],
  2878. "responses": {
  2879. "200": {
  2880. "description": "Formatter status",
  2881. "content": {
  2882. "application/json": {
  2883. "schema": {
  2884. "type": "array",
  2885. "items": {
  2886. "$ref": "#/components/schemas/FormatterStatus"
  2887. },
  2888. "description": "Formatter status"
  2889. }
  2890. }
  2891. }
  2892. },
  2893. "400": {
  2894. "description": "Bad request",
  2895. "content": {
  2896. "application/json": {
  2897. "schema": {
  2898. "$ref": "#/components/schemas/BadRequestError"
  2899. }
  2900. }
  2901. }
  2902. }
  2903. },
  2904. "description": "Get formatter status",
  2905. "summary": "Get formatter status",
  2906. "x-codeSamples": [
  2907. {
  2908. "lang": "js",
  2909. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2910. }
  2911. ]
  2912. }
  2913. },
  2914. "/mcp": {
  2915. "get": {
  2916. "tags": ["mcp"],
  2917. "operationId": "mcp.status",
  2918. "parameters": [
  2919. {
  2920. "name": "directory",
  2921. "in": "query",
  2922. "schema": {
  2923. "type": "string"
  2924. },
  2925. "required": false
  2926. },
  2927. {
  2928. "name": "workspace",
  2929. "in": "query",
  2930. "schema": {
  2931. "type": "string"
  2932. },
  2933. "required": false
  2934. }
  2935. ],
  2936. "responses": {
  2937. "200": {
  2938. "description": "MCP server status",
  2939. "content": {
  2940. "application/json": {
  2941. "schema": {
  2942. "type": "object",
  2943. "additionalProperties": {
  2944. "$ref": "#/components/schemas/MCPStatus"
  2945. },
  2946. "description": "MCP server status"
  2947. }
  2948. }
  2949. }
  2950. },
  2951. "400": {
  2952. "description": "Bad request",
  2953. "content": {
  2954. "application/json": {
  2955. "schema": {
  2956. "$ref": "#/components/schemas/BadRequestError"
  2957. }
  2958. }
  2959. }
  2960. }
  2961. },
  2962. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  2963. "summary": "Get MCP status",
  2964. "x-codeSamples": [
  2965. {
  2966. "lang": "js",
  2967. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  2968. }
  2969. ]
  2970. },
  2971. "post": {
  2972. "tags": ["mcp"],
  2973. "operationId": "mcp.add",
  2974. "parameters": [
  2975. {
  2976. "name": "directory",
  2977. "in": "query",
  2978. "schema": {
  2979. "type": "string"
  2980. },
  2981. "required": false
  2982. },
  2983. {
  2984. "name": "workspace",
  2985. "in": "query",
  2986. "schema": {
  2987. "type": "string"
  2988. },
  2989. "required": false
  2990. }
  2991. ],
  2992. "responses": {
  2993. "200": {
  2994. "description": "MCP server added successfully",
  2995. "content": {
  2996. "application/json": {
  2997. "schema": {
  2998. "type": "object",
  2999. "additionalProperties": {
  3000. "$ref": "#/components/schemas/MCPStatus"
  3001. },
  3002. "description": "MCP server added successfully"
  3003. }
  3004. }
  3005. }
  3006. },
  3007. "400": {
  3008. "description": "BadRequest | InvalidRequestError",
  3009. "content": {
  3010. "application/json": {
  3011. "schema": {
  3012. "anyOf": [
  3013. {
  3014. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3015. },
  3016. {
  3017. "$ref": "#/components/schemas/InvalidRequestError"
  3018. }
  3019. ]
  3020. }
  3021. }
  3022. }
  3023. }
  3024. },
  3025. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  3026. "summary": "Add MCP server",
  3027. "requestBody": {
  3028. "content": {
  3029. "application/json": {
  3030. "schema": {
  3031. "type": "object",
  3032. "properties": {
  3033. "name": {
  3034. "type": "string"
  3035. },
  3036. "config": {
  3037. "anyOf": [
  3038. {
  3039. "$ref": "#/components/schemas/McpLocalConfig"
  3040. },
  3041. {
  3042. "$ref": "#/components/schemas/McpRemoteConfig"
  3043. }
  3044. ]
  3045. }
  3046. },
  3047. "required": ["name", "config"],
  3048. "additionalProperties": false
  3049. }
  3050. }
  3051. }
  3052. },
  3053. "x-codeSamples": [
  3054. {
  3055. "lang": "js",
  3056. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  3057. }
  3058. ]
  3059. }
  3060. },
  3061. "/mcp/{name}/auth": {
  3062. "post": {
  3063. "tags": ["mcp"],
  3064. "operationId": "mcp.auth.start",
  3065. "parameters": [
  3066. {
  3067. "name": "name",
  3068. "in": "path",
  3069. "schema": {
  3070. "type": "string"
  3071. },
  3072. "required": true
  3073. },
  3074. {
  3075. "name": "directory",
  3076. "in": "query",
  3077. "schema": {
  3078. "type": "string"
  3079. },
  3080. "required": false
  3081. },
  3082. {
  3083. "name": "workspace",
  3084. "in": "query",
  3085. "schema": {
  3086. "type": "string"
  3087. },
  3088. "required": false
  3089. }
  3090. ],
  3091. "responses": {
  3092. "200": {
  3093. "description": "OAuth flow started",
  3094. "content": {
  3095. "application/json": {
  3096. "schema": {
  3097. "type": "object",
  3098. "properties": {
  3099. "authorizationUrl": {
  3100. "type": "string"
  3101. },
  3102. "oauthState": {
  3103. "type": "string"
  3104. }
  3105. },
  3106. "required": ["authorizationUrl", "oauthState"],
  3107. "additionalProperties": false,
  3108. "description": "OAuth flow started"
  3109. }
  3110. }
  3111. }
  3112. },
  3113. "400": {
  3114. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3115. "content": {
  3116. "application/json": {
  3117. "schema": {
  3118. "anyOf": [
  3119. {
  3120. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3121. },
  3122. {
  3123. "$ref": "#/components/schemas/InvalidRequestError"
  3124. }
  3125. ]
  3126. }
  3127. }
  3128. }
  3129. },
  3130. "404": {
  3131. "description": "McpServerNotFoundError",
  3132. "content": {
  3133. "application/json": {
  3134. "schema": {
  3135. "$ref": "#/components/schemas/McpServerNotFoundError"
  3136. }
  3137. }
  3138. }
  3139. }
  3140. },
  3141. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  3142. "summary": "Start MCP OAuth",
  3143. "x-codeSamples": [
  3144. {
  3145. "lang": "js",
  3146. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  3147. }
  3148. ]
  3149. },
  3150. "delete": {
  3151. "tags": ["mcp"],
  3152. "operationId": "mcp.auth.remove",
  3153. "parameters": [
  3154. {
  3155. "name": "name",
  3156. "in": "path",
  3157. "schema": {
  3158. "type": "string"
  3159. },
  3160. "required": true
  3161. },
  3162. {
  3163. "name": "directory",
  3164. "in": "query",
  3165. "schema": {
  3166. "type": "string"
  3167. },
  3168. "required": false
  3169. },
  3170. {
  3171. "name": "workspace",
  3172. "in": "query",
  3173. "schema": {
  3174. "type": "string"
  3175. },
  3176. "required": false
  3177. }
  3178. ],
  3179. "responses": {
  3180. "200": {
  3181. "description": "OAuth credentials removed",
  3182. "content": {
  3183. "application/json": {
  3184. "schema": {
  3185. "type": "object",
  3186. "properties": {
  3187. "success": {
  3188. "type": "boolean",
  3189. "enum": [true]
  3190. }
  3191. },
  3192. "required": ["success"],
  3193. "additionalProperties": false,
  3194. "description": "OAuth credentials removed"
  3195. }
  3196. }
  3197. }
  3198. },
  3199. "400": {
  3200. "description": "Bad request",
  3201. "content": {
  3202. "application/json": {
  3203. "schema": {
  3204. "$ref": "#/components/schemas/BadRequestError"
  3205. }
  3206. }
  3207. }
  3208. },
  3209. "404": {
  3210. "description": "McpServerNotFoundError",
  3211. "content": {
  3212. "application/json": {
  3213. "schema": {
  3214. "$ref": "#/components/schemas/McpServerNotFoundError"
  3215. }
  3216. }
  3217. }
  3218. }
  3219. },
  3220. "description": "Remove OAuth credentials for an MCP server.",
  3221. "summary": "Remove MCP OAuth",
  3222. "x-codeSamples": [
  3223. {
  3224. "lang": "js",
  3225. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  3226. }
  3227. ]
  3228. }
  3229. },
  3230. "/mcp/{name}/auth/callback": {
  3231. "post": {
  3232. "tags": ["mcp"],
  3233. "operationId": "mcp.auth.callback",
  3234. "parameters": [
  3235. {
  3236. "name": "name",
  3237. "in": "path",
  3238. "schema": {
  3239. "type": "string"
  3240. },
  3241. "required": true
  3242. },
  3243. {
  3244. "name": "directory",
  3245. "in": "query",
  3246. "schema": {
  3247. "type": "string"
  3248. },
  3249. "required": false
  3250. },
  3251. {
  3252. "name": "workspace",
  3253. "in": "query",
  3254. "schema": {
  3255. "type": "string"
  3256. },
  3257. "required": false
  3258. }
  3259. ],
  3260. "responses": {
  3261. "200": {
  3262. "description": "OAuth authentication completed",
  3263. "content": {
  3264. "application/json": {
  3265. "schema": {
  3266. "$ref": "#/components/schemas/MCPStatus"
  3267. }
  3268. }
  3269. }
  3270. },
  3271. "400": {
  3272. "description": "BadRequest | InvalidRequestError",
  3273. "content": {
  3274. "application/json": {
  3275. "schema": {
  3276. "anyOf": [
  3277. {
  3278. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3279. },
  3280. {
  3281. "$ref": "#/components/schemas/InvalidRequestError"
  3282. }
  3283. ]
  3284. }
  3285. }
  3286. }
  3287. },
  3288. "404": {
  3289. "description": "McpServerNotFoundError",
  3290. "content": {
  3291. "application/json": {
  3292. "schema": {
  3293. "$ref": "#/components/schemas/McpServerNotFoundError"
  3294. }
  3295. }
  3296. }
  3297. }
  3298. },
  3299. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  3300. "summary": "Complete MCP OAuth",
  3301. "requestBody": {
  3302. "content": {
  3303. "application/json": {
  3304. "schema": {
  3305. "type": "object",
  3306. "properties": {
  3307. "code": {
  3308. "type": "string"
  3309. }
  3310. },
  3311. "required": ["code"],
  3312. "additionalProperties": false
  3313. }
  3314. }
  3315. }
  3316. },
  3317. "x-codeSamples": [
  3318. {
  3319. "lang": "js",
  3320. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  3321. }
  3322. ]
  3323. }
  3324. },
  3325. "/mcp/{name}/auth/authenticate": {
  3326. "post": {
  3327. "tags": ["mcp"],
  3328. "operationId": "mcp.auth.authenticate",
  3329. "parameters": [
  3330. {
  3331. "name": "name",
  3332. "in": "path",
  3333. "schema": {
  3334. "type": "string"
  3335. },
  3336. "required": true
  3337. },
  3338. {
  3339. "name": "directory",
  3340. "in": "query",
  3341. "schema": {
  3342. "type": "string"
  3343. },
  3344. "required": false
  3345. },
  3346. {
  3347. "name": "workspace",
  3348. "in": "query",
  3349. "schema": {
  3350. "type": "string"
  3351. },
  3352. "required": false
  3353. }
  3354. ],
  3355. "responses": {
  3356. "200": {
  3357. "description": "OAuth authentication completed",
  3358. "content": {
  3359. "application/json": {
  3360. "schema": {
  3361. "$ref": "#/components/schemas/MCPStatus"
  3362. }
  3363. }
  3364. }
  3365. },
  3366. "400": {
  3367. "description": "McpUnsupportedOAuthError | InvalidRequestError",
  3368. "content": {
  3369. "application/json": {
  3370. "schema": {
  3371. "anyOf": [
  3372. {
  3373. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  3374. },
  3375. {
  3376. "$ref": "#/components/schemas/InvalidRequestError"
  3377. }
  3378. ]
  3379. }
  3380. }
  3381. }
  3382. },
  3383. "404": {
  3384. "description": "McpServerNotFoundError",
  3385. "content": {
  3386. "application/json": {
  3387. "schema": {
  3388. "$ref": "#/components/schemas/McpServerNotFoundError"
  3389. }
  3390. }
  3391. }
  3392. }
  3393. },
  3394. "description": "Start OAuth flow and wait for callback (opens browser).",
  3395. "summary": "Authenticate MCP OAuth",
  3396. "x-codeSamples": [
  3397. {
  3398. "lang": "js",
  3399. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  3400. }
  3401. ]
  3402. }
  3403. },
  3404. "/mcp/{name}/connect": {
  3405. "post": {
  3406. "tags": ["mcp"],
  3407. "operationId": "mcp.connect",
  3408. "parameters": [
  3409. {
  3410. "name": "name",
  3411. "in": "path",
  3412. "schema": {
  3413. "type": "string"
  3414. },
  3415. "required": true
  3416. },
  3417. {
  3418. "name": "directory",
  3419. "in": "query",
  3420. "schema": {
  3421. "type": "string"
  3422. },
  3423. "required": false
  3424. },
  3425. {
  3426. "name": "workspace",
  3427. "in": "query",
  3428. "schema": {
  3429. "type": "string"
  3430. },
  3431. "required": false
  3432. }
  3433. ],
  3434. "responses": {
  3435. "200": {
  3436. "description": "MCP server connected successfully",
  3437. "content": {
  3438. "application/json": {
  3439. "schema": {
  3440. "type": "boolean",
  3441. "description": "MCP server connected successfully"
  3442. }
  3443. }
  3444. }
  3445. },
  3446. "400": {
  3447. "description": "Bad request",
  3448. "content": {
  3449. "application/json": {
  3450. "schema": {
  3451. "$ref": "#/components/schemas/BadRequestError"
  3452. }
  3453. }
  3454. }
  3455. },
  3456. "404": {
  3457. "description": "McpServerNotFoundError",
  3458. "content": {
  3459. "application/json": {
  3460. "schema": {
  3461. "$ref": "#/components/schemas/McpServerNotFoundError"
  3462. }
  3463. }
  3464. }
  3465. }
  3466. },
  3467. "description": "Connect an MCP server.",
  3468. "x-codeSamples": [
  3469. {
  3470. "lang": "js",
  3471. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  3472. }
  3473. ]
  3474. }
  3475. },
  3476. "/mcp/{name}/disconnect": {
  3477. "post": {
  3478. "tags": ["mcp"],
  3479. "operationId": "mcp.disconnect",
  3480. "parameters": [
  3481. {
  3482. "name": "name",
  3483. "in": "path",
  3484. "schema": {
  3485. "type": "string"
  3486. },
  3487. "required": true
  3488. },
  3489. {
  3490. "name": "directory",
  3491. "in": "query",
  3492. "schema": {
  3493. "type": "string"
  3494. },
  3495. "required": false
  3496. },
  3497. {
  3498. "name": "workspace",
  3499. "in": "query",
  3500. "schema": {
  3501. "type": "string"
  3502. },
  3503. "required": false
  3504. }
  3505. ],
  3506. "responses": {
  3507. "200": {
  3508. "description": "MCP server disconnected successfully",
  3509. "content": {
  3510. "application/json": {
  3511. "schema": {
  3512. "type": "boolean",
  3513. "description": "MCP server disconnected successfully"
  3514. }
  3515. }
  3516. }
  3517. },
  3518. "400": {
  3519. "description": "Bad request",
  3520. "content": {
  3521. "application/json": {
  3522. "schema": {
  3523. "$ref": "#/components/schemas/BadRequestError"
  3524. }
  3525. }
  3526. }
  3527. },
  3528. "404": {
  3529. "description": "McpServerNotFoundError",
  3530. "content": {
  3531. "application/json": {
  3532. "schema": {
  3533. "$ref": "#/components/schemas/McpServerNotFoundError"
  3534. }
  3535. }
  3536. }
  3537. }
  3538. },
  3539. "description": "Disconnect an MCP server.",
  3540. "x-codeSamples": [
  3541. {
  3542. "lang": "js",
  3543. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  3544. }
  3545. ]
  3546. }
  3547. },
  3548. "/project": {
  3549. "get": {
  3550. "tags": ["project"],
  3551. "operationId": "project.list",
  3552. "parameters": [
  3553. {
  3554. "name": "directory",
  3555. "in": "query",
  3556. "schema": {
  3557. "type": "string"
  3558. },
  3559. "required": false
  3560. },
  3561. {
  3562. "name": "workspace",
  3563. "in": "query",
  3564. "schema": {
  3565. "type": "string"
  3566. },
  3567. "required": false
  3568. }
  3569. ],
  3570. "responses": {
  3571. "200": {
  3572. "description": "List of projects",
  3573. "content": {
  3574. "application/json": {
  3575. "schema": {
  3576. "type": "array",
  3577. "items": {
  3578. "$ref": "#/components/schemas/Project"
  3579. },
  3580. "description": "List of projects"
  3581. }
  3582. }
  3583. }
  3584. },
  3585. "400": {
  3586. "description": "Bad request",
  3587. "content": {
  3588. "application/json": {
  3589. "schema": {
  3590. "$ref": "#/components/schemas/BadRequestError"
  3591. }
  3592. }
  3593. }
  3594. }
  3595. },
  3596. "description": "Get a list of projects that have been opened with OpenCode.",
  3597. "summary": "List all projects",
  3598. "x-codeSamples": [
  3599. {
  3600. "lang": "js",
  3601. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  3602. }
  3603. ]
  3604. }
  3605. },
  3606. "/project/current": {
  3607. "get": {
  3608. "tags": ["project"],
  3609. "operationId": "project.current",
  3610. "parameters": [
  3611. {
  3612. "name": "directory",
  3613. "in": "query",
  3614. "schema": {
  3615. "type": "string"
  3616. },
  3617. "required": false
  3618. },
  3619. {
  3620. "name": "workspace",
  3621. "in": "query",
  3622. "schema": {
  3623. "type": "string"
  3624. },
  3625. "required": false
  3626. }
  3627. ],
  3628. "responses": {
  3629. "200": {
  3630. "description": "Current project information",
  3631. "content": {
  3632. "application/json": {
  3633. "schema": {
  3634. "$ref": "#/components/schemas/Project"
  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": "Retrieve the currently active project that OpenCode is working with.",
  3651. "summary": "Get current project",
  3652. "x-codeSamples": [
  3653. {
  3654. "lang": "js",
  3655. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3656. }
  3657. ]
  3658. }
  3659. },
  3660. "/project/git/init": {
  3661. "post": {
  3662. "tags": ["project"],
  3663. "operationId": "project.initGit",
  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": "Project information after git initialization",
  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": "Create a git repository for the current project and return the refreshed project info.",
  3705. "summary": "Initialize git repository",
  3706. "x-codeSamples": [
  3707. {
  3708. "lang": "js",
  3709. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3710. }
  3711. ]
  3712. }
  3713. },
  3714. "/project/{projectID}": {
  3715. "patch": {
  3716. "tags": ["project"],
  3717. "operationId": "project.update",
  3718. "parameters": [
  3719. {
  3720. "name": "projectID",
  3721. "in": "path",
  3722. "schema": {
  3723. "type": "string"
  3724. },
  3725. "required": true
  3726. },
  3727. {
  3728. "name": "directory",
  3729. "in": "query",
  3730. "schema": {
  3731. "type": "string"
  3732. },
  3733. "required": false
  3734. },
  3735. {
  3736. "name": "workspace",
  3737. "in": "query",
  3738. "schema": {
  3739. "type": "string"
  3740. },
  3741. "required": false
  3742. }
  3743. ],
  3744. "responses": {
  3745. "200": {
  3746. "description": "Updated project information",
  3747. "content": {
  3748. "application/json": {
  3749. "schema": {
  3750. "$ref": "#/components/schemas/Project"
  3751. }
  3752. }
  3753. }
  3754. },
  3755. "400": {
  3756. "description": "BadRequest | InvalidRequestError",
  3757. "content": {
  3758. "application/json": {
  3759. "schema": {
  3760. "anyOf": [
  3761. {
  3762. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  3763. },
  3764. {
  3765. "$ref": "#/components/schemas/InvalidRequestError"
  3766. }
  3767. ]
  3768. }
  3769. }
  3770. }
  3771. },
  3772. "404": {
  3773. "description": "ProjectNotFoundError",
  3774. "content": {
  3775. "application/json": {
  3776. "schema": {
  3777. "$ref": "#/components/schemas/ProjectNotFoundError"
  3778. }
  3779. }
  3780. }
  3781. }
  3782. },
  3783. "description": "Update project properties such as name, icon, and commands.",
  3784. "summary": "Update project",
  3785. "requestBody": {
  3786. "content": {
  3787. "application/json": {
  3788. "schema": {
  3789. "type": "object",
  3790. "properties": {
  3791. "name": {
  3792. "type": "string"
  3793. },
  3794. "icon": {
  3795. "type": "object",
  3796. "properties": {
  3797. "url": {
  3798. "type": "string"
  3799. },
  3800. "override": {
  3801. "type": "string"
  3802. },
  3803. "color": {
  3804. "type": "string"
  3805. }
  3806. },
  3807. "additionalProperties": false
  3808. },
  3809. "commands": {
  3810. "type": "object",
  3811. "properties": {
  3812. "start": {
  3813. "type": "string",
  3814. "description": "Startup script to run when creating a new workspace (worktree)"
  3815. }
  3816. },
  3817. "additionalProperties": false
  3818. }
  3819. },
  3820. "additionalProperties": false
  3821. }
  3822. }
  3823. }
  3824. },
  3825. "x-codeSamples": [
  3826. {
  3827. "lang": "js",
  3828. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3829. }
  3830. ]
  3831. }
  3832. },
  3833. "/project/{projectID}/directories": {
  3834. "get": {
  3835. "tags": ["project"],
  3836. "operationId": "project.directories",
  3837. "parameters": [
  3838. {
  3839. "name": "projectID",
  3840. "in": "path",
  3841. "schema": {
  3842. "type": "string"
  3843. },
  3844. "required": true
  3845. },
  3846. {
  3847. "name": "directory",
  3848. "in": "query",
  3849. "schema": {
  3850. "type": "string"
  3851. },
  3852. "required": false
  3853. },
  3854. {
  3855. "name": "workspace",
  3856. "in": "query",
  3857. "schema": {
  3858. "type": "string"
  3859. },
  3860. "required": false
  3861. }
  3862. ],
  3863. "responses": {
  3864. "200": {
  3865. "description": "Project directories",
  3866. "content": {
  3867. "application/json": {
  3868. "schema": {
  3869. "$ref": "#/components/schemas/ProjectDirectories"
  3870. }
  3871. }
  3872. }
  3873. },
  3874. "400": {
  3875. "description": "Bad request",
  3876. "content": {
  3877. "application/json": {
  3878. "schema": {
  3879. "$ref": "#/components/schemas/BadRequestError"
  3880. }
  3881. }
  3882. }
  3883. }
  3884. },
  3885. "description": "List known local absolute directories for a project.",
  3886. "summary": "List project directories",
  3887. "x-codeSamples": [
  3888. {
  3889. "lang": "js",
  3890. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.directories({\n ...\n})"
  3891. }
  3892. ]
  3893. }
  3894. },
  3895. "/experimental/project/{projectID}/copy/generate-name": {
  3896. "post": {
  3897. "tags": ["projectCopy"],
  3898. "operationId": "experimental.projectCopy.generateName",
  3899. "parameters": [
  3900. {
  3901. "name": "projectID",
  3902. "in": "path",
  3903. "schema": {
  3904. "type": "string"
  3905. },
  3906. "required": true
  3907. },
  3908. {
  3909. "name": "directory",
  3910. "in": "query",
  3911. "schema": {
  3912. "type": "string"
  3913. },
  3914. "required": false
  3915. },
  3916. {
  3917. "name": "workspace",
  3918. "in": "query",
  3919. "schema": {
  3920. "type": "string"
  3921. },
  3922. "required": false
  3923. }
  3924. ],
  3925. "responses": {
  3926. "200": {
  3927. "description": "Success",
  3928. "content": {
  3929. "application/json": {
  3930. "schema": {
  3931. "type": "object",
  3932. "properties": {
  3933. "name": {
  3934. "type": "string"
  3935. }
  3936. },
  3937. "required": ["name"],
  3938. "additionalProperties": false
  3939. }
  3940. }
  3941. }
  3942. },
  3943. "400": {
  3944. "description": "Bad request",
  3945. "content": {
  3946. "application/json": {
  3947. "schema": {
  3948. "$ref": "#/components/schemas/BadRequestError"
  3949. }
  3950. }
  3951. }
  3952. }
  3953. },
  3954. "description": "Generate a short name for a project copy from task context.",
  3955. "summary": "Generate project copy name",
  3956. "requestBody": {
  3957. "content": {
  3958. "application/json": {
  3959. "schema": {
  3960. "type": "object",
  3961. "properties": {
  3962. "context": {
  3963. "type": "string"
  3964. }
  3965. },
  3966. "additionalProperties": false
  3967. }
  3968. }
  3969. }
  3970. },
  3971. "x-codeSamples": [
  3972. {
  3973. "lang": "js",
  3974. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.projectCopy.generateName({\n ...\n})"
  3975. }
  3976. ]
  3977. }
  3978. },
  3979. "/pty/shells": {
  3980. "get": {
  3981. "tags": ["pty"],
  3982. "operationId": "pty.shells",
  3983. "parameters": [
  3984. {
  3985. "name": "directory",
  3986. "in": "query",
  3987. "schema": {
  3988. "type": "string"
  3989. },
  3990. "required": false
  3991. },
  3992. {
  3993. "name": "workspace",
  3994. "in": "query",
  3995. "schema": {
  3996. "type": "string"
  3997. },
  3998. "required": false
  3999. }
  4000. ],
  4001. "responses": {
  4002. "200": {
  4003. "description": "List of shells",
  4004. "content": {
  4005. "application/json": {
  4006. "schema": {
  4007. "type": "array",
  4008. "items": {
  4009. "type": "object",
  4010. "properties": {
  4011. "path": {
  4012. "type": "string"
  4013. },
  4014. "name": {
  4015. "type": "string"
  4016. },
  4017. "acceptable": {
  4018. "type": "boolean"
  4019. }
  4020. },
  4021. "required": ["path", "name", "acceptable"],
  4022. "additionalProperties": false
  4023. },
  4024. "description": "List of shells"
  4025. }
  4026. }
  4027. }
  4028. },
  4029. "400": {
  4030. "description": "Bad request",
  4031. "content": {
  4032. "application/json": {
  4033. "schema": {
  4034. "$ref": "#/components/schemas/BadRequestError"
  4035. }
  4036. }
  4037. }
  4038. }
  4039. },
  4040. "description": "Get a list of available shells on the system.",
  4041. "summary": "List available shells",
  4042. "x-codeSamples": [
  4043. {
  4044. "lang": "js",
  4045. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  4046. }
  4047. ]
  4048. }
  4049. },
  4050. "/pty": {
  4051. "get": {
  4052. "tags": ["pty"],
  4053. "operationId": "pty.list",
  4054. "parameters": [
  4055. {
  4056. "name": "directory",
  4057. "in": "query",
  4058. "schema": {
  4059. "type": "string"
  4060. },
  4061. "required": false
  4062. },
  4063. {
  4064. "name": "workspace",
  4065. "in": "query",
  4066. "schema": {
  4067. "type": "string"
  4068. },
  4069. "required": false
  4070. }
  4071. ],
  4072. "responses": {
  4073. "200": {
  4074. "description": "List of sessions",
  4075. "content": {
  4076. "application/json": {
  4077. "schema": {
  4078. "type": "array",
  4079. "items": {
  4080. "$ref": "#/components/schemas/Pty"
  4081. },
  4082. "description": "List of sessions"
  4083. }
  4084. }
  4085. }
  4086. },
  4087. "400": {
  4088. "description": "Bad request",
  4089. "content": {
  4090. "application/json": {
  4091. "schema": {
  4092. "$ref": "#/components/schemas/BadRequestError"
  4093. }
  4094. }
  4095. }
  4096. }
  4097. },
  4098. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  4099. "summary": "List PTY sessions",
  4100. "x-codeSamples": [
  4101. {
  4102. "lang": "js",
  4103. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  4104. }
  4105. ]
  4106. },
  4107. "post": {
  4108. "tags": ["pty"],
  4109. "operationId": "pty.create",
  4110. "parameters": [
  4111. {
  4112. "name": "directory",
  4113. "in": "query",
  4114. "schema": {
  4115. "type": "string"
  4116. },
  4117. "required": false
  4118. },
  4119. {
  4120. "name": "workspace",
  4121. "in": "query",
  4122. "schema": {
  4123. "type": "string"
  4124. },
  4125. "required": false
  4126. }
  4127. ],
  4128. "responses": {
  4129. "200": {
  4130. "description": "Created session",
  4131. "content": {
  4132. "application/json": {
  4133. "schema": {
  4134. "$ref": "#/components/schemas/Pty"
  4135. }
  4136. }
  4137. }
  4138. },
  4139. "400": {
  4140. "description": "BadRequest | InvalidRequestError",
  4141. "content": {
  4142. "application/json": {
  4143. "schema": {
  4144. "anyOf": [
  4145. {
  4146. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4147. },
  4148. {
  4149. "$ref": "#/components/schemas/InvalidRequestError"
  4150. }
  4151. ]
  4152. }
  4153. }
  4154. }
  4155. }
  4156. },
  4157. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  4158. "summary": "Create PTY session",
  4159. "requestBody": {
  4160. "content": {
  4161. "application/json": {
  4162. "schema": {
  4163. "type": "object",
  4164. "properties": {
  4165. "command": {
  4166. "type": "string"
  4167. },
  4168. "args": {
  4169. "type": "array",
  4170. "items": {
  4171. "type": "string"
  4172. }
  4173. },
  4174. "cwd": {
  4175. "type": "string"
  4176. },
  4177. "title": {
  4178. "type": "string"
  4179. },
  4180. "env": {
  4181. "type": "object",
  4182. "additionalProperties": {
  4183. "type": "string"
  4184. }
  4185. }
  4186. },
  4187. "additionalProperties": false
  4188. }
  4189. }
  4190. }
  4191. },
  4192. "x-codeSamples": [
  4193. {
  4194. "lang": "js",
  4195. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  4196. }
  4197. ]
  4198. }
  4199. },
  4200. "/pty/{ptyID}": {
  4201. "get": {
  4202. "tags": ["pty"],
  4203. "operationId": "pty.get",
  4204. "parameters": [
  4205. {
  4206. "name": "ptyID",
  4207. "in": "path",
  4208. "schema": {
  4209. "type": "string",
  4210. "pattern": "^pty"
  4211. },
  4212. "required": true
  4213. },
  4214. {
  4215. "name": "directory",
  4216. "in": "query",
  4217. "schema": {
  4218. "type": "string"
  4219. },
  4220. "required": false
  4221. },
  4222. {
  4223. "name": "workspace",
  4224. "in": "query",
  4225. "schema": {
  4226. "type": "string"
  4227. },
  4228. "required": false
  4229. }
  4230. ],
  4231. "responses": {
  4232. "200": {
  4233. "description": "Session info",
  4234. "content": {
  4235. "application/json": {
  4236. "schema": {
  4237. "$ref": "#/components/schemas/Pty"
  4238. }
  4239. }
  4240. }
  4241. },
  4242. "400": {
  4243. "description": "Bad request",
  4244. "content": {
  4245. "application/json": {
  4246. "schema": {
  4247. "$ref": "#/components/schemas/BadRequestError"
  4248. }
  4249. }
  4250. }
  4251. },
  4252. "404": {
  4253. "description": "PtyNotFoundError",
  4254. "content": {
  4255. "application/json": {
  4256. "schema": {
  4257. "$ref": "#/components/schemas/PtyNotFoundError"
  4258. }
  4259. }
  4260. }
  4261. }
  4262. },
  4263. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  4264. "summary": "Get PTY session",
  4265. "x-codeSamples": [
  4266. {
  4267. "lang": "js",
  4268. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  4269. }
  4270. ]
  4271. },
  4272. "put": {
  4273. "tags": ["pty"],
  4274. "operationId": "pty.update",
  4275. "parameters": [
  4276. {
  4277. "name": "ptyID",
  4278. "in": "path",
  4279. "schema": {
  4280. "type": "string",
  4281. "pattern": "^pty"
  4282. },
  4283. "required": true
  4284. },
  4285. {
  4286. "name": "directory",
  4287. "in": "query",
  4288. "schema": {
  4289. "type": "string"
  4290. },
  4291. "required": false
  4292. },
  4293. {
  4294. "name": "workspace",
  4295. "in": "query",
  4296. "schema": {
  4297. "type": "string"
  4298. },
  4299. "required": false
  4300. }
  4301. ],
  4302. "responses": {
  4303. "200": {
  4304. "description": "Updated session",
  4305. "content": {
  4306. "application/json": {
  4307. "schema": {
  4308. "$ref": "#/components/schemas/Pty"
  4309. }
  4310. }
  4311. }
  4312. },
  4313. "400": {
  4314. "description": "BadRequest | InvalidRequestError",
  4315. "content": {
  4316. "application/json": {
  4317. "schema": {
  4318. "anyOf": [
  4319. {
  4320. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4321. },
  4322. {
  4323. "$ref": "#/components/schemas/InvalidRequestError"
  4324. }
  4325. ]
  4326. }
  4327. }
  4328. }
  4329. },
  4330. "404": {
  4331. "description": "PtyNotFoundError",
  4332. "content": {
  4333. "application/json": {
  4334. "schema": {
  4335. "$ref": "#/components/schemas/PtyNotFoundError"
  4336. }
  4337. }
  4338. }
  4339. }
  4340. },
  4341. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  4342. "summary": "Update PTY session",
  4343. "requestBody": {
  4344. "content": {
  4345. "application/json": {
  4346. "schema": {
  4347. "type": "object",
  4348. "properties": {
  4349. "title": {
  4350. "type": "string"
  4351. },
  4352. "size": {
  4353. "type": "object",
  4354. "properties": {
  4355. "rows": {
  4356. "type": "integer",
  4357. "exclusiveMinimum": 0
  4358. },
  4359. "cols": {
  4360. "type": "integer",
  4361. "exclusiveMinimum": 0
  4362. }
  4363. },
  4364. "required": ["rows", "cols"],
  4365. "additionalProperties": false
  4366. }
  4367. },
  4368. "additionalProperties": false
  4369. }
  4370. }
  4371. }
  4372. },
  4373. "x-codeSamples": [
  4374. {
  4375. "lang": "js",
  4376. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  4377. }
  4378. ]
  4379. },
  4380. "delete": {
  4381. "tags": ["pty"],
  4382. "operationId": "pty.remove",
  4383. "parameters": [
  4384. {
  4385. "name": "ptyID",
  4386. "in": "path",
  4387. "schema": {
  4388. "type": "string",
  4389. "pattern": "^pty"
  4390. },
  4391. "required": true
  4392. },
  4393. {
  4394. "name": "directory",
  4395. "in": "query",
  4396. "schema": {
  4397. "type": "string"
  4398. },
  4399. "required": false
  4400. },
  4401. {
  4402. "name": "workspace",
  4403. "in": "query",
  4404. "schema": {
  4405. "type": "string"
  4406. },
  4407. "required": false
  4408. }
  4409. ],
  4410. "responses": {
  4411. "200": {
  4412. "description": "Session removed",
  4413. "content": {
  4414. "application/json": {
  4415. "schema": {
  4416. "type": "boolean",
  4417. "description": "Session removed"
  4418. }
  4419. }
  4420. }
  4421. },
  4422. "400": {
  4423. "description": "Bad request",
  4424. "content": {
  4425. "application/json": {
  4426. "schema": {
  4427. "$ref": "#/components/schemas/BadRequestError"
  4428. }
  4429. }
  4430. }
  4431. },
  4432. "404": {
  4433. "description": "PtyNotFoundError",
  4434. "content": {
  4435. "application/json": {
  4436. "schema": {
  4437. "$ref": "#/components/schemas/PtyNotFoundError"
  4438. }
  4439. }
  4440. }
  4441. }
  4442. },
  4443. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  4444. "summary": "Remove PTY session",
  4445. "x-codeSamples": [
  4446. {
  4447. "lang": "js",
  4448. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  4449. }
  4450. ]
  4451. }
  4452. },
  4453. "/pty/{ptyID}/connect-token": {
  4454. "post": {
  4455. "tags": ["pty"],
  4456. "operationId": "pty.connectToken",
  4457. "parameters": [
  4458. {
  4459. "name": "ptyID",
  4460. "in": "path",
  4461. "schema": {
  4462. "type": "string",
  4463. "pattern": "^pty"
  4464. },
  4465. "required": true
  4466. },
  4467. {
  4468. "name": "directory",
  4469. "in": "query",
  4470. "schema": {
  4471. "type": "string"
  4472. },
  4473. "required": false
  4474. },
  4475. {
  4476. "name": "workspace",
  4477. "in": "query",
  4478. "schema": {
  4479. "type": "string"
  4480. },
  4481. "required": false
  4482. }
  4483. ],
  4484. "responses": {
  4485. "200": {
  4486. "description": "WebSocket connect token",
  4487. "content": {
  4488. "application/json": {
  4489. "schema": {
  4490. "type": "object",
  4491. "properties": {
  4492. "ticket": {
  4493. "type": "string"
  4494. },
  4495. "expires_in": {
  4496. "type": "integer",
  4497. "exclusiveMinimum": 0
  4498. }
  4499. },
  4500. "required": ["ticket", "expires_in"],
  4501. "additionalProperties": false,
  4502. "description": "WebSocket connect token"
  4503. }
  4504. }
  4505. }
  4506. },
  4507. "400": {
  4508. "description": "Bad request",
  4509. "content": {
  4510. "application/json": {
  4511. "schema": {
  4512. "$ref": "#/components/schemas/BadRequestError"
  4513. }
  4514. }
  4515. }
  4516. },
  4517. "403": {
  4518. "description": "PtyForbiddenError",
  4519. "content": {
  4520. "application/json": {
  4521. "schema": {
  4522. "$ref": "#/components/schemas/PtyForbiddenError"
  4523. }
  4524. }
  4525. }
  4526. },
  4527. "404": {
  4528. "description": "PtyNotFoundError",
  4529. "content": {
  4530. "application/json": {
  4531. "schema": {
  4532. "$ref": "#/components/schemas/PtyNotFoundError"
  4533. }
  4534. }
  4535. }
  4536. }
  4537. },
  4538. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  4539. "summary": "Create PTY WebSocket token",
  4540. "x-codeSamples": [
  4541. {
  4542. "lang": "js",
  4543. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  4544. }
  4545. ]
  4546. }
  4547. },
  4548. "/question": {
  4549. "get": {
  4550. "tags": ["question"],
  4551. "operationId": "question.list",
  4552. "parameters": [
  4553. {
  4554. "name": "directory",
  4555. "in": "query",
  4556. "schema": {
  4557. "type": "string"
  4558. },
  4559. "required": false
  4560. },
  4561. {
  4562. "name": "workspace",
  4563. "in": "query",
  4564. "schema": {
  4565. "type": "string"
  4566. },
  4567. "required": false
  4568. }
  4569. ],
  4570. "responses": {
  4571. "200": {
  4572. "description": "List of pending questions",
  4573. "content": {
  4574. "application/json": {
  4575. "schema": {
  4576. "type": "array",
  4577. "items": {
  4578. "$ref": "#/components/schemas/QuestionRequest"
  4579. },
  4580. "description": "List of pending questions"
  4581. }
  4582. }
  4583. }
  4584. },
  4585. "400": {
  4586. "description": "Bad request",
  4587. "content": {
  4588. "application/json": {
  4589. "schema": {
  4590. "$ref": "#/components/schemas/BadRequestError"
  4591. }
  4592. }
  4593. }
  4594. }
  4595. },
  4596. "description": "Get all pending question requests across all sessions.",
  4597. "summary": "List pending questions",
  4598. "x-codeSamples": [
  4599. {
  4600. "lang": "js",
  4601. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  4602. }
  4603. ]
  4604. }
  4605. },
  4606. "/question/{requestID}/reply": {
  4607. "post": {
  4608. "tags": ["question"],
  4609. "operationId": "question.reply",
  4610. "parameters": [
  4611. {
  4612. "name": "requestID",
  4613. "in": "path",
  4614. "schema": {
  4615. "type": "string",
  4616. "pattern": "^que"
  4617. },
  4618. "required": true
  4619. },
  4620. {
  4621. "name": "directory",
  4622. "in": "query",
  4623. "schema": {
  4624. "type": "string"
  4625. },
  4626. "required": false
  4627. },
  4628. {
  4629. "name": "workspace",
  4630. "in": "query",
  4631. "schema": {
  4632. "type": "string"
  4633. },
  4634. "required": false
  4635. }
  4636. ],
  4637. "responses": {
  4638. "200": {
  4639. "description": "Question answered successfully",
  4640. "content": {
  4641. "application/json": {
  4642. "schema": {
  4643. "type": "boolean",
  4644. "description": "Question answered successfully"
  4645. }
  4646. }
  4647. }
  4648. },
  4649. "400": {
  4650. "description": "BadRequest | InvalidRequestError",
  4651. "content": {
  4652. "application/json": {
  4653. "schema": {
  4654. "anyOf": [
  4655. {
  4656. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4657. },
  4658. {
  4659. "$ref": "#/components/schemas/InvalidRequestError"
  4660. }
  4661. ]
  4662. }
  4663. }
  4664. }
  4665. },
  4666. "404": {
  4667. "description": "QuestionNotFoundError",
  4668. "content": {
  4669. "application/json": {
  4670. "schema": {
  4671. "$ref": "#/components/schemas/QuestionNotFoundError"
  4672. }
  4673. }
  4674. }
  4675. }
  4676. },
  4677. "description": "Provide answers to a question request from the AI assistant.",
  4678. "summary": "Reply to question request",
  4679. "requestBody": {
  4680. "content": {
  4681. "application/json": {
  4682. "schema": {
  4683. "type": "object",
  4684. "properties": {
  4685. "answers": {
  4686. "type": "array",
  4687. "items": {
  4688. "$ref": "#/components/schemas/QuestionAnswer"
  4689. },
  4690. "description": "User answers in order of questions (each answer is an array of selected labels)"
  4691. }
  4692. },
  4693. "required": ["answers"],
  4694. "additionalProperties": false
  4695. }
  4696. }
  4697. }
  4698. },
  4699. "x-codeSamples": [
  4700. {
  4701. "lang": "js",
  4702. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  4703. }
  4704. ]
  4705. }
  4706. },
  4707. "/question/{requestID}/reject": {
  4708. "post": {
  4709. "tags": ["question"],
  4710. "operationId": "question.reject",
  4711. "parameters": [
  4712. {
  4713. "name": "requestID",
  4714. "in": "path",
  4715. "schema": {
  4716. "type": "string",
  4717. "pattern": "^que"
  4718. },
  4719. "required": true
  4720. },
  4721. {
  4722. "name": "directory",
  4723. "in": "query",
  4724. "schema": {
  4725. "type": "string"
  4726. },
  4727. "required": false
  4728. },
  4729. {
  4730. "name": "workspace",
  4731. "in": "query",
  4732. "schema": {
  4733. "type": "string"
  4734. },
  4735. "required": false
  4736. }
  4737. ],
  4738. "responses": {
  4739. "200": {
  4740. "description": "Question rejected successfully",
  4741. "content": {
  4742. "application/json": {
  4743. "schema": {
  4744. "type": "boolean",
  4745. "description": "Question rejected successfully"
  4746. }
  4747. }
  4748. }
  4749. },
  4750. "400": {
  4751. "description": "BadRequest | InvalidRequestError",
  4752. "content": {
  4753. "application/json": {
  4754. "schema": {
  4755. "anyOf": [
  4756. {
  4757. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4758. },
  4759. {
  4760. "$ref": "#/components/schemas/InvalidRequestError"
  4761. }
  4762. ]
  4763. }
  4764. }
  4765. }
  4766. },
  4767. "404": {
  4768. "description": "QuestionNotFoundError",
  4769. "content": {
  4770. "application/json": {
  4771. "schema": {
  4772. "$ref": "#/components/schemas/QuestionNotFoundError"
  4773. }
  4774. }
  4775. }
  4776. }
  4777. },
  4778. "description": "Reject a question request from the AI assistant.",
  4779. "summary": "Reject question request",
  4780. "x-codeSamples": [
  4781. {
  4782. "lang": "js",
  4783. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  4784. }
  4785. ]
  4786. }
  4787. },
  4788. "/permission": {
  4789. "get": {
  4790. "tags": ["permission"],
  4791. "operationId": "permission.list",
  4792. "parameters": [
  4793. {
  4794. "name": "directory",
  4795. "in": "query",
  4796. "schema": {
  4797. "type": "string"
  4798. },
  4799. "required": false
  4800. },
  4801. {
  4802. "name": "workspace",
  4803. "in": "query",
  4804. "schema": {
  4805. "type": "string"
  4806. },
  4807. "required": false
  4808. }
  4809. ],
  4810. "responses": {
  4811. "200": {
  4812. "description": "List of pending permissions",
  4813. "content": {
  4814. "application/json": {
  4815. "schema": {
  4816. "type": "array",
  4817. "items": {
  4818. "$ref": "#/components/schemas/PermissionRequest"
  4819. },
  4820. "description": "List of pending permissions"
  4821. }
  4822. }
  4823. }
  4824. },
  4825. "400": {
  4826. "description": "Bad request",
  4827. "content": {
  4828. "application/json": {
  4829. "schema": {
  4830. "$ref": "#/components/schemas/BadRequestError"
  4831. }
  4832. }
  4833. }
  4834. }
  4835. },
  4836. "description": "Get all pending permission requests across all sessions.",
  4837. "summary": "List pending permissions",
  4838. "x-codeSamples": [
  4839. {
  4840. "lang": "js",
  4841. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  4842. }
  4843. ]
  4844. }
  4845. },
  4846. "/permission/{requestID}/reply": {
  4847. "post": {
  4848. "tags": ["permission"],
  4849. "operationId": "permission.reply",
  4850. "parameters": [
  4851. {
  4852. "name": "requestID",
  4853. "in": "path",
  4854. "schema": {
  4855. "type": "string",
  4856. "pattern": "^per"
  4857. },
  4858. "required": true
  4859. },
  4860. {
  4861. "name": "directory",
  4862. "in": "query",
  4863. "schema": {
  4864. "type": "string"
  4865. },
  4866. "required": false
  4867. },
  4868. {
  4869. "name": "workspace",
  4870. "in": "query",
  4871. "schema": {
  4872. "type": "string"
  4873. },
  4874. "required": false
  4875. }
  4876. ],
  4877. "responses": {
  4878. "200": {
  4879. "description": "Permission processed successfully",
  4880. "content": {
  4881. "application/json": {
  4882. "schema": {
  4883. "type": "boolean",
  4884. "description": "Permission processed successfully"
  4885. }
  4886. }
  4887. }
  4888. },
  4889. "400": {
  4890. "description": "BadRequest | InvalidRequestError",
  4891. "content": {
  4892. "application/json": {
  4893. "schema": {
  4894. "anyOf": [
  4895. {
  4896. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  4897. },
  4898. {
  4899. "$ref": "#/components/schemas/InvalidRequestError"
  4900. }
  4901. ]
  4902. }
  4903. }
  4904. }
  4905. },
  4906. "404": {
  4907. "description": "PermissionNotFoundError",
  4908. "content": {
  4909. "application/json": {
  4910. "schema": {
  4911. "$ref": "#/components/schemas/PermissionNotFoundError"
  4912. }
  4913. }
  4914. }
  4915. }
  4916. },
  4917. "description": "Approve or deny a permission request from the AI assistant.",
  4918. "summary": "Respond to permission request",
  4919. "requestBody": {
  4920. "content": {
  4921. "application/json": {
  4922. "schema": {
  4923. "type": "object",
  4924. "properties": {
  4925. "reply": {
  4926. "type": "string",
  4927. "enum": ["once", "always", "reject"]
  4928. },
  4929. "message": {
  4930. "type": "string"
  4931. }
  4932. },
  4933. "required": ["reply"],
  4934. "additionalProperties": false
  4935. }
  4936. }
  4937. }
  4938. },
  4939. "x-codeSamples": [
  4940. {
  4941. "lang": "js",
  4942. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4943. }
  4944. ]
  4945. }
  4946. },
  4947. "/provider": {
  4948. "get": {
  4949. "tags": ["provider"],
  4950. "operationId": "provider.list",
  4951. "parameters": [
  4952. {
  4953. "name": "directory",
  4954. "in": "query",
  4955. "schema": {
  4956. "type": "string"
  4957. },
  4958. "required": false
  4959. },
  4960. {
  4961. "name": "workspace",
  4962. "in": "query",
  4963. "schema": {
  4964. "type": "string"
  4965. },
  4966. "required": false
  4967. }
  4968. ],
  4969. "responses": {
  4970. "200": {
  4971. "description": "List of providers",
  4972. "content": {
  4973. "application/json": {
  4974. "schema": {
  4975. "type": "object",
  4976. "properties": {
  4977. "all": {
  4978. "type": "array",
  4979. "items": {
  4980. "$ref": "#/components/schemas/Provider"
  4981. }
  4982. },
  4983. "default": {
  4984. "type": "object",
  4985. "additionalProperties": {
  4986. "type": "string"
  4987. }
  4988. },
  4989. "connected": {
  4990. "type": "array",
  4991. "items": {
  4992. "type": "string"
  4993. }
  4994. }
  4995. },
  4996. "required": ["all", "default", "connected"],
  4997. "additionalProperties": false,
  4998. "description": "List of providers"
  4999. }
  5000. }
  5001. }
  5002. },
  5003. "400": {
  5004. "description": "Bad request",
  5005. "content": {
  5006. "application/json": {
  5007. "schema": {
  5008. "$ref": "#/components/schemas/BadRequestError"
  5009. }
  5010. }
  5011. }
  5012. }
  5013. },
  5014. "description": "Get a list of all available AI providers, including both available and connected ones.",
  5015. "summary": "List providers",
  5016. "x-codeSamples": [
  5017. {
  5018. "lang": "js",
  5019. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  5020. }
  5021. ]
  5022. }
  5023. },
  5024. "/provider/auth": {
  5025. "get": {
  5026. "tags": ["provider"],
  5027. "operationId": "provider.auth",
  5028. "parameters": [
  5029. {
  5030. "name": "directory",
  5031. "in": "query",
  5032. "schema": {
  5033. "type": "string"
  5034. },
  5035. "required": false
  5036. },
  5037. {
  5038. "name": "workspace",
  5039. "in": "query",
  5040. "schema": {
  5041. "type": "string"
  5042. },
  5043. "required": false
  5044. }
  5045. ],
  5046. "responses": {
  5047. "200": {
  5048. "description": "Provider auth methods",
  5049. "content": {
  5050. "application/json": {
  5051. "schema": {
  5052. "type": "object",
  5053. "additionalProperties": {
  5054. "type": "array",
  5055. "items": {
  5056. "$ref": "#/components/schemas/ProviderAuthMethod"
  5057. }
  5058. },
  5059. "description": "Provider auth methods"
  5060. }
  5061. }
  5062. }
  5063. },
  5064. "400": {
  5065. "description": "Bad request",
  5066. "content": {
  5067. "application/json": {
  5068. "schema": {
  5069. "$ref": "#/components/schemas/BadRequestError"
  5070. }
  5071. }
  5072. }
  5073. }
  5074. },
  5075. "description": "Retrieve available authentication methods for all AI providers.",
  5076. "summary": "Get provider auth methods",
  5077. "x-codeSamples": [
  5078. {
  5079. "lang": "js",
  5080. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  5081. }
  5082. ]
  5083. }
  5084. },
  5085. "/provider/{providerID}/oauth/authorize": {
  5086. "post": {
  5087. "tags": ["provider"],
  5088. "operationId": "provider.oauth.authorize",
  5089. "parameters": [
  5090. {
  5091. "name": "providerID",
  5092. "in": "path",
  5093. "schema": {
  5094. "type": "string"
  5095. },
  5096. "required": true
  5097. },
  5098. {
  5099. "name": "directory",
  5100. "in": "query",
  5101. "schema": {
  5102. "type": "string"
  5103. },
  5104. "required": false
  5105. },
  5106. {
  5107. "name": "workspace",
  5108. "in": "query",
  5109. "schema": {
  5110. "type": "string"
  5111. },
  5112. "required": false
  5113. }
  5114. ],
  5115. "responses": {
  5116. "200": {
  5117. "description": "Authorization URL and method",
  5118. "content": {
  5119. "application/json": {
  5120. "schema": {
  5121. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  5122. }
  5123. }
  5124. }
  5125. },
  5126. "400": {
  5127. "description": "ProviderAuthError | InvalidRequestError",
  5128. "content": {
  5129. "application/json": {
  5130. "schema": {
  5131. "anyOf": [
  5132. {
  5133. "$ref": "#/components/schemas/ProviderAuthError1"
  5134. },
  5135. {
  5136. "$ref": "#/components/schemas/InvalidRequestError"
  5137. }
  5138. ]
  5139. }
  5140. }
  5141. }
  5142. }
  5143. },
  5144. "description": "Start the OAuth authorization flow for a provider.",
  5145. "summary": "Start OAuth authorization",
  5146. "requestBody": {
  5147. "content": {
  5148. "application/json": {
  5149. "schema": {
  5150. "type": "object",
  5151. "properties": {
  5152. "method": {
  5153. "type": "number",
  5154. "description": "Auth method index"
  5155. },
  5156. "inputs": {
  5157. "type": "object",
  5158. "additionalProperties": {
  5159. "type": "string"
  5160. }
  5161. }
  5162. },
  5163. "required": ["method"],
  5164. "additionalProperties": false
  5165. }
  5166. }
  5167. }
  5168. },
  5169. "x-codeSamples": [
  5170. {
  5171. "lang": "js",
  5172. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  5173. }
  5174. ]
  5175. }
  5176. },
  5177. "/provider/{providerID}/oauth/callback": {
  5178. "post": {
  5179. "tags": ["provider"],
  5180. "operationId": "provider.oauth.callback",
  5181. "parameters": [
  5182. {
  5183. "name": "providerID",
  5184. "in": "path",
  5185. "schema": {
  5186. "type": "string"
  5187. },
  5188. "required": true
  5189. },
  5190. {
  5191. "name": "directory",
  5192. "in": "query",
  5193. "schema": {
  5194. "type": "string"
  5195. },
  5196. "required": false
  5197. },
  5198. {
  5199. "name": "workspace",
  5200. "in": "query",
  5201. "schema": {
  5202. "type": "string"
  5203. },
  5204. "required": false
  5205. }
  5206. ],
  5207. "responses": {
  5208. "200": {
  5209. "description": "OAuth callback processed successfully",
  5210. "content": {
  5211. "application/json": {
  5212. "schema": {
  5213. "type": "boolean",
  5214. "description": "OAuth callback processed successfully"
  5215. }
  5216. }
  5217. }
  5218. },
  5219. "400": {
  5220. "description": "ProviderAuthError | InvalidRequestError",
  5221. "content": {
  5222. "application/json": {
  5223. "schema": {
  5224. "anyOf": [
  5225. {
  5226. "$ref": "#/components/schemas/ProviderAuthError1"
  5227. },
  5228. {
  5229. "$ref": "#/components/schemas/InvalidRequestError"
  5230. }
  5231. ]
  5232. }
  5233. }
  5234. }
  5235. }
  5236. },
  5237. "description": "Handle the OAuth callback from a provider after user authorization.",
  5238. "summary": "Handle OAuth callback",
  5239. "requestBody": {
  5240. "content": {
  5241. "application/json": {
  5242. "schema": {
  5243. "type": "object",
  5244. "properties": {
  5245. "method": {
  5246. "type": "number",
  5247. "description": "Auth method index"
  5248. },
  5249. "code": {
  5250. "type": "string"
  5251. }
  5252. },
  5253. "required": ["method"],
  5254. "additionalProperties": false
  5255. }
  5256. }
  5257. }
  5258. },
  5259. "x-codeSamples": [
  5260. {
  5261. "lang": "js",
  5262. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  5263. }
  5264. ]
  5265. }
  5266. },
  5267. "/session": {
  5268. "get": {
  5269. "tags": ["session"],
  5270. "operationId": "session.list",
  5271. "parameters": [
  5272. {
  5273. "name": "directory",
  5274. "in": "query",
  5275. "schema": {
  5276. "type": "string"
  5277. },
  5278. "required": false
  5279. },
  5280. {
  5281. "name": "workspace",
  5282. "in": "query",
  5283. "schema": {
  5284. "type": "string"
  5285. },
  5286. "required": false
  5287. },
  5288. {
  5289. "name": "scope",
  5290. "in": "query",
  5291. "schema": {
  5292. "type": "string",
  5293. "enum": ["project"]
  5294. },
  5295. "required": false
  5296. },
  5297. {
  5298. "name": "path",
  5299. "in": "query",
  5300. "schema": {
  5301. "type": "string"
  5302. },
  5303. "required": false
  5304. },
  5305. {
  5306. "name": "roots",
  5307. "in": "query",
  5308. "schema": {
  5309. "anyOf": [
  5310. {
  5311. "type": "boolean"
  5312. },
  5313. {
  5314. "type": "string",
  5315. "enum": ["true", "false"]
  5316. }
  5317. ]
  5318. },
  5319. "required": false
  5320. },
  5321. {
  5322. "name": "start",
  5323. "in": "query",
  5324. "schema": {
  5325. "type": "number"
  5326. },
  5327. "required": false
  5328. },
  5329. {
  5330. "name": "search",
  5331. "in": "query",
  5332. "schema": {
  5333. "type": "string"
  5334. },
  5335. "required": false
  5336. },
  5337. {
  5338. "name": "limit",
  5339. "in": "query",
  5340. "schema": {
  5341. "type": "number"
  5342. },
  5343. "required": false
  5344. }
  5345. ],
  5346. "responses": {
  5347. "200": {
  5348. "description": "List of sessions",
  5349. "content": {
  5350. "application/json": {
  5351. "schema": {
  5352. "type": "array",
  5353. "items": {
  5354. "$ref": "#/components/schemas/Session"
  5355. },
  5356. "description": "List of sessions"
  5357. }
  5358. }
  5359. }
  5360. },
  5361. "400": {
  5362. "description": "Bad request",
  5363. "content": {
  5364. "application/json": {
  5365. "schema": {
  5366. "$ref": "#/components/schemas/BadRequestError"
  5367. }
  5368. }
  5369. }
  5370. }
  5371. },
  5372. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  5373. "summary": "List sessions",
  5374. "x-codeSamples": [
  5375. {
  5376. "lang": "js",
  5377. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  5378. }
  5379. ]
  5380. },
  5381. "post": {
  5382. "tags": ["session"],
  5383. "operationId": "session.create",
  5384. "parameters": [
  5385. {
  5386. "name": "directory",
  5387. "in": "query",
  5388. "schema": {
  5389. "type": "string"
  5390. },
  5391. "required": false
  5392. },
  5393. {
  5394. "name": "workspace",
  5395. "in": "query",
  5396. "schema": {
  5397. "type": "string"
  5398. },
  5399. "required": false
  5400. }
  5401. ],
  5402. "responses": {
  5403. "200": {
  5404. "description": "Successfully created session",
  5405. "content": {
  5406. "application/json": {
  5407. "schema": {
  5408. "$ref": "#/components/schemas/Session"
  5409. }
  5410. }
  5411. }
  5412. },
  5413. "400": {
  5414. "description": "BadRequest | InvalidRequestError",
  5415. "content": {
  5416. "application/json": {
  5417. "schema": {
  5418. "anyOf": [
  5419. {
  5420. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5421. },
  5422. {
  5423. "$ref": "#/components/schemas/InvalidRequestError"
  5424. }
  5425. ]
  5426. }
  5427. }
  5428. }
  5429. }
  5430. },
  5431. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  5432. "summary": "Create session",
  5433. "requestBody": {
  5434. "content": {
  5435. "application/json": {
  5436. "schema": {
  5437. "type": "object",
  5438. "properties": {
  5439. "parentID": {
  5440. "type": "string",
  5441. "pattern": "^ses"
  5442. },
  5443. "title": {
  5444. "type": "string"
  5445. },
  5446. "agent": {
  5447. "type": "string"
  5448. },
  5449. "model": {
  5450. "type": "object",
  5451. "properties": {
  5452. "id": {
  5453. "type": "string"
  5454. },
  5455. "providerID": {
  5456. "type": "string"
  5457. },
  5458. "variant": {
  5459. "type": "string"
  5460. }
  5461. },
  5462. "required": ["id", "providerID"],
  5463. "additionalProperties": false
  5464. },
  5465. "metadata": {
  5466. "type": "object"
  5467. },
  5468. "permission": {
  5469. "$ref": "#/components/schemas/PermissionRuleset"
  5470. },
  5471. "workspaceID": {
  5472. "type": "string",
  5473. "pattern": "^wrk"
  5474. }
  5475. },
  5476. "additionalProperties": false
  5477. }
  5478. }
  5479. }
  5480. },
  5481. "x-codeSamples": [
  5482. {
  5483. "lang": "js",
  5484. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  5485. }
  5486. ]
  5487. }
  5488. },
  5489. "/session/status": {
  5490. "get": {
  5491. "tags": ["session"],
  5492. "operationId": "session.status",
  5493. "parameters": [
  5494. {
  5495. "name": "directory",
  5496. "in": "query",
  5497. "schema": {
  5498. "type": "string"
  5499. },
  5500. "required": false
  5501. },
  5502. {
  5503. "name": "workspace",
  5504. "in": "query",
  5505. "schema": {
  5506. "type": "string"
  5507. },
  5508. "required": false
  5509. }
  5510. ],
  5511. "responses": {
  5512. "200": {
  5513. "description": "Get session status",
  5514. "content": {
  5515. "application/json": {
  5516. "schema": {
  5517. "type": "object",
  5518. "additionalProperties": {
  5519. "$ref": "#/components/schemas/SessionStatus"
  5520. },
  5521. "description": "Get session status"
  5522. }
  5523. }
  5524. }
  5525. },
  5526. "400": {
  5527. "description": "BadRequest | InvalidRequestError",
  5528. "content": {
  5529. "application/json": {
  5530. "schema": {
  5531. "anyOf": [
  5532. {
  5533. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5534. },
  5535. {
  5536. "$ref": "#/components/schemas/InvalidRequestError"
  5537. }
  5538. ]
  5539. }
  5540. }
  5541. }
  5542. }
  5543. },
  5544. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  5545. "summary": "Get session status",
  5546. "x-codeSamples": [
  5547. {
  5548. "lang": "js",
  5549. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  5550. }
  5551. ]
  5552. }
  5553. },
  5554. "/session/{sessionID}": {
  5555. "get": {
  5556. "tags": ["session"],
  5557. "operationId": "session.get",
  5558. "parameters": [
  5559. {
  5560. "name": "sessionID",
  5561. "in": "path",
  5562. "schema": {
  5563. "type": "string",
  5564. "pattern": "^ses"
  5565. },
  5566. "required": true
  5567. },
  5568. {
  5569. "name": "directory",
  5570. "in": "query",
  5571. "schema": {
  5572. "type": "string"
  5573. },
  5574. "required": false
  5575. },
  5576. {
  5577. "name": "workspace",
  5578. "in": "query",
  5579. "schema": {
  5580. "type": "string"
  5581. },
  5582. "required": false
  5583. }
  5584. ],
  5585. "responses": {
  5586. "200": {
  5587. "description": "Get session",
  5588. "content": {
  5589. "application/json": {
  5590. "schema": {
  5591. "$ref": "#/components/schemas/Session"
  5592. }
  5593. }
  5594. }
  5595. },
  5596. "400": {
  5597. "description": "BadRequest | InvalidRequestError",
  5598. "content": {
  5599. "application/json": {
  5600. "schema": {
  5601. "anyOf": [
  5602. {
  5603. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5604. },
  5605. {
  5606. "$ref": "#/components/schemas/InvalidRequestError"
  5607. }
  5608. ]
  5609. }
  5610. }
  5611. }
  5612. },
  5613. "404": {
  5614. "description": "NotFoundError",
  5615. "content": {
  5616. "application/json": {
  5617. "schema": {
  5618. "$ref": "#/components/schemas/NotFoundError"
  5619. }
  5620. }
  5621. }
  5622. }
  5623. },
  5624. "description": "Retrieve detailed information about a specific OpenCode session.",
  5625. "summary": "Get session",
  5626. "x-codeSamples": [
  5627. {
  5628. "lang": "js",
  5629. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  5630. }
  5631. ]
  5632. },
  5633. "delete": {
  5634. "tags": ["session"],
  5635. "operationId": "session.delete",
  5636. "parameters": [
  5637. {
  5638. "name": "sessionID",
  5639. "in": "path",
  5640. "schema": {
  5641. "type": "string",
  5642. "pattern": "^ses"
  5643. },
  5644. "required": true
  5645. },
  5646. {
  5647. "name": "directory",
  5648. "in": "query",
  5649. "schema": {
  5650. "type": "string"
  5651. },
  5652. "required": false
  5653. },
  5654. {
  5655. "name": "workspace",
  5656. "in": "query",
  5657. "schema": {
  5658. "type": "string"
  5659. },
  5660. "required": false
  5661. }
  5662. ],
  5663. "responses": {
  5664. "200": {
  5665. "description": "Successfully deleted session",
  5666. "content": {
  5667. "application/json": {
  5668. "schema": {
  5669. "type": "boolean",
  5670. "description": "Successfully deleted session"
  5671. }
  5672. }
  5673. }
  5674. },
  5675. "400": {
  5676. "description": "BadRequest | InvalidRequestError",
  5677. "content": {
  5678. "application/json": {
  5679. "schema": {
  5680. "anyOf": [
  5681. {
  5682. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5683. },
  5684. {
  5685. "$ref": "#/components/schemas/InvalidRequestError"
  5686. }
  5687. ]
  5688. }
  5689. }
  5690. }
  5691. },
  5692. "404": {
  5693. "description": "NotFoundError",
  5694. "content": {
  5695. "application/json": {
  5696. "schema": {
  5697. "$ref": "#/components/schemas/NotFoundError"
  5698. }
  5699. }
  5700. }
  5701. }
  5702. },
  5703. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  5704. "summary": "Delete session",
  5705. "x-codeSamples": [
  5706. {
  5707. "lang": "js",
  5708. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  5709. }
  5710. ]
  5711. },
  5712. "patch": {
  5713. "tags": ["session"],
  5714. "operationId": "session.update",
  5715. "parameters": [
  5716. {
  5717. "name": "sessionID",
  5718. "in": "path",
  5719. "schema": {
  5720. "type": "string",
  5721. "pattern": "^ses"
  5722. },
  5723. "required": true
  5724. },
  5725. {
  5726. "name": "directory",
  5727. "in": "query",
  5728. "schema": {
  5729. "type": "string"
  5730. },
  5731. "required": false
  5732. },
  5733. {
  5734. "name": "workspace",
  5735. "in": "query",
  5736. "schema": {
  5737. "type": "string"
  5738. },
  5739. "required": false
  5740. }
  5741. ],
  5742. "responses": {
  5743. "200": {
  5744. "description": "Successfully updated session",
  5745. "content": {
  5746. "application/json": {
  5747. "schema": {
  5748. "$ref": "#/components/schemas/Session"
  5749. }
  5750. }
  5751. }
  5752. },
  5753. "400": {
  5754. "description": "BadRequest | InvalidRequestError",
  5755. "content": {
  5756. "application/json": {
  5757. "schema": {
  5758. "anyOf": [
  5759. {
  5760. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5761. },
  5762. {
  5763. "$ref": "#/components/schemas/InvalidRequestError"
  5764. }
  5765. ]
  5766. }
  5767. }
  5768. }
  5769. },
  5770. "404": {
  5771. "description": "NotFoundError",
  5772. "content": {
  5773. "application/json": {
  5774. "schema": {
  5775. "$ref": "#/components/schemas/NotFoundError"
  5776. }
  5777. }
  5778. }
  5779. }
  5780. },
  5781. "description": "Update properties of an existing session, such as title or other metadata.",
  5782. "summary": "Update session",
  5783. "requestBody": {
  5784. "content": {
  5785. "application/json": {
  5786. "schema": {
  5787. "type": "object",
  5788. "properties": {
  5789. "title": {
  5790. "type": "string"
  5791. },
  5792. "metadata": {
  5793. "type": "object"
  5794. },
  5795. "permission": {
  5796. "$ref": "#/components/schemas/PermissionRuleset"
  5797. },
  5798. "time": {
  5799. "type": "object",
  5800. "properties": {
  5801. "archived": {
  5802. "type": "number"
  5803. }
  5804. },
  5805. "additionalProperties": false
  5806. }
  5807. },
  5808. "additionalProperties": false
  5809. }
  5810. }
  5811. }
  5812. },
  5813. "x-codeSamples": [
  5814. {
  5815. "lang": "js",
  5816. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  5817. }
  5818. ]
  5819. }
  5820. },
  5821. "/session/{sessionID}/children": {
  5822. "get": {
  5823. "tags": ["session"],
  5824. "operationId": "session.children",
  5825. "parameters": [
  5826. {
  5827. "name": "sessionID",
  5828. "in": "path",
  5829. "schema": {
  5830. "type": "string",
  5831. "pattern": "^ses"
  5832. },
  5833. "required": true
  5834. },
  5835. {
  5836. "name": "directory",
  5837. "in": "query",
  5838. "schema": {
  5839. "type": "string"
  5840. },
  5841. "required": false
  5842. },
  5843. {
  5844. "name": "workspace",
  5845. "in": "query",
  5846. "schema": {
  5847. "type": "string"
  5848. },
  5849. "required": false
  5850. }
  5851. ],
  5852. "responses": {
  5853. "200": {
  5854. "description": "List of children",
  5855. "content": {
  5856. "application/json": {
  5857. "schema": {
  5858. "type": "array",
  5859. "items": {
  5860. "$ref": "#/components/schemas/Session"
  5861. },
  5862. "description": "List of children"
  5863. }
  5864. }
  5865. }
  5866. },
  5867. "400": {
  5868. "description": "BadRequest | InvalidRequestError",
  5869. "content": {
  5870. "application/json": {
  5871. "schema": {
  5872. "anyOf": [
  5873. {
  5874. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5875. },
  5876. {
  5877. "$ref": "#/components/schemas/InvalidRequestError"
  5878. }
  5879. ]
  5880. }
  5881. }
  5882. }
  5883. },
  5884. "404": {
  5885. "description": "NotFoundError",
  5886. "content": {
  5887. "application/json": {
  5888. "schema": {
  5889. "$ref": "#/components/schemas/NotFoundError"
  5890. }
  5891. }
  5892. }
  5893. }
  5894. },
  5895. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  5896. "summary": "Get session children",
  5897. "x-codeSamples": [
  5898. {
  5899. "lang": "js",
  5900. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  5901. }
  5902. ]
  5903. }
  5904. },
  5905. "/session/{sessionID}/todo": {
  5906. "get": {
  5907. "tags": ["session"],
  5908. "operationId": "session.todo",
  5909. "parameters": [
  5910. {
  5911. "name": "sessionID",
  5912. "in": "path",
  5913. "schema": {
  5914. "type": "string",
  5915. "pattern": "^ses"
  5916. },
  5917. "required": true
  5918. },
  5919. {
  5920. "name": "directory",
  5921. "in": "query",
  5922. "schema": {
  5923. "type": "string"
  5924. },
  5925. "required": false
  5926. },
  5927. {
  5928. "name": "workspace",
  5929. "in": "query",
  5930. "schema": {
  5931. "type": "string"
  5932. },
  5933. "required": false
  5934. }
  5935. ],
  5936. "responses": {
  5937. "200": {
  5938. "description": "Todo list",
  5939. "content": {
  5940. "application/json": {
  5941. "schema": {
  5942. "type": "array",
  5943. "items": {
  5944. "$ref": "#/components/schemas/Todo"
  5945. },
  5946. "description": "Todo list"
  5947. }
  5948. }
  5949. }
  5950. },
  5951. "400": {
  5952. "description": "BadRequest | InvalidRequestError",
  5953. "content": {
  5954. "application/json": {
  5955. "schema": {
  5956. "anyOf": [
  5957. {
  5958. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  5959. },
  5960. {
  5961. "$ref": "#/components/schemas/InvalidRequestError"
  5962. }
  5963. ]
  5964. }
  5965. }
  5966. }
  5967. },
  5968. "404": {
  5969. "description": "NotFoundError",
  5970. "content": {
  5971. "application/json": {
  5972. "schema": {
  5973. "$ref": "#/components/schemas/NotFoundError"
  5974. }
  5975. }
  5976. }
  5977. }
  5978. },
  5979. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  5980. "summary": "Get session todos",
  5981. "x-codeSamples": [
  5982. {
  5983. "lang": "js",
  5984. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  5985. }
  5986. ]
  5987. }
  5988. },
  5989. "/session/{sessionID}/diff": {
  5990. "get": {
  5991. "tags": ["session"],
  5992. "operationId": "session.diff",
  5993. "parameters": [
  5994. {
  5995. "name": "sessionID",
  5996. "in": "path",
  5997. "schema": {
  5998. "type": "string",
  5999. "pattern": "^ses"
  6000. },
  6001. "required": true
  6002. },
  6003. {
  6004. "name": "directory",
  6005. "in": "query",
  6006. "schema": {
  6007. "type": "string"
  6008. },
  6009. "required": false
  6010. },
  6011. {
  6012. "name": "workspace",
  6013. "in": "query",
  6014. "schema": {
  6015. "type": "string"
  6016. },
  6017. "required": false
  6018. },
  6019. {
  6020. "name": "messageID",
  6021. "in": "query",
  6022. "schema": {
  6023. "type": "string",
  6024. "pattern": "^msg"
  6025. },
  6026. "required": false
  6027. }
  6028. ],
  6029. "responses": {
  6030. "200": {
  6031. "description": "Successfully retrieved diff",
  6032. "content": {
  6033. "application/json": {
  6034. "schema": {
  6035. "type": "array",
  6036. "items": {
  6037. "$ref": "#/components/schemas/SnapshotFileDiff"
  6038. },
  6039. "description": "Successfully retrieved diff"
  6040. }
  6041. }
  6042. }
  6043. },
  6044. "400": {
  6045. "description": "Bad request",
  6046. "content": {
  6047. "application/json": {
  6048. "schema": {
  6049. "$ref": "#/components/schemas/BadRequestError"
  6050. }
  6051. }
  6052. }
  6053. }
  6054. },
  6055. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  6056. "summary": "Get message diff",
  6057. "x-codeSamples": [
  6058. {
  6059. "lang": "js",
  6060. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  6061. }
  6062. ]
  6063. }
  6064. },
  6065. "/session/{sessionID}/message": {
  6066. "get": {
  6067. "tags": ["session"],
  6068. "operationId": "session.messages",
  6069. "parameters": [
  6070. {
  6071. "name": "sessionID",
  6072. "in": "path",
  6073. "schema": {
  6074. "type": "string",
  6075. "pattern": "^ses"
  6076. },
  6077. "required": true
  6078. },
  6079. {
  6080. "name": "directory",
  6081. "in": "query",
  6082. "schema": {
  6083. "type": "string"
  6084. },
  6085. "required": false
  6086. },
  6087. {
  6088. "name": "workspace",
  6089. "in": "query",
  6090. "schema": {
  6091. "type": "string"
  6092. },
  6093. "required": false
  6094. },
  6095. {
  6096. "name": "limit",
  6097. "in": "query",
  6098. "schema": {
  6099. "type": "integer",
  6100. "minimum": 0,
  6101. "maximum": 9007199254740991
  6102. },
  6103. "required": false
  6104. },
  6105. {
  6106. "name": "before",
  6107. "in": "query",
  6108. "schema": {
  6109. "type": "string"
  6110. },
  6111. "required": false
  6112. }
  6113. ],
  6114. "responses": {
  6115. "200": {
  6116. "description": "List of messages",
  6117. "content": {
  6118. "application/json": {
  6119. "schema": {
  6120. "type": "array",
  6121. "items": {
  6122. "type": "object",
  6123. "properties": {
  6124. "info": {
  6125. "$ref": "#/components/schemas/Message"
  6126. },
  6127. "parts": {
  6128. "type": "array",
  6129. "items": {
  6130. "$ref": "#/components/schemas/Part"
  6131. }
  6132. }
  6133. },
  6134. "required": ["info", "parts"],
  6135. "additionalProperties": false
  6136. },
  6137. "description": "List of messages"
  6138. }
  6139. }
  6140. }
  6141. },
  6142. "400": {
  6143. "description": "BadRequest | InvalidRequestError",
  6144. "content": {
  6145. "application/json": {
  6146. "schema": {
  6147. "anyOf": [
  6148. {
  6149. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6150. },
  6151. {
  6152. "$ref": "#/components/schemas/InvalidRequestError"
  6153. }
  6154. ]
  6155. }
  6156. }
  6157. }
  6158. },
  6159. "404": {
  6160. "description": "NotFoundError",
  6161. "content": {
  6162. "application/json": {
  6163. "schema": {
  6164. "$ref": "#/components/schemas/NotFoundError"
  6165. }
  6166. }
  6167. }
  6168. }
  6169. },
  6170. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  6171. "summary": "Get session messages",
  6172. "x-codeSamples": [
  6173. {
  6174. "lang": "js",
  6175. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  6176. }
  6177. ]
  6178. },
  6179. "post": {
  6180. "tags": ["session"],
  6181. "operationId": "session.prompt",
  6182. "parameters": [
  6183. {
  6184. "name": "sessionID",
  6185. "in": "path",
  6186. "schema": {
  6187. "type": "string",
  6188. "pattern": "^ses"
  6189. },
  6190. "required": true
  6191. },
  6192. {
  6193. "name": "directory",
  6194. "in": "query",
  6195. "schema": {
  6196. "type": "string"
  6197. },
  6198. "required": false
  6199. },
  6200. {
  6201. "name": "workspace",
  6202. "in": "query",
  6203. "schema": {
  6204. "type": "string"
  6205. },
  6206. "required": false
  6207. }
  6208. ],
  6209. "responses": {
  6210. "200": {
  6211. "description": "Created message",
  6212. "content": {
  6213. "application/json": {
  6214. "schema": {
  6215. "type": "object",
  6216. "required": ["info", "parts"],
  6217. "properties": {
  6218. "info": {
  6219. "$ref": "#/components/schemas/AssistantMessage"
  6220. },
  6221. "parts": {
  6222. "type": "array",
  6223. "items": {
  6224. "$ref": "#/components/schemas/Part"
  6225. }
  6226. }
  6227. }
  6228. }
  6229. }
  6230. }
  6231. },
  6232. "400": {
  6233. "description": "BadRequest | InvalidRequestError",
  6234. "content": {
  6235. "application/json": {
  6236. "schema": {
  6237. "anyOf": [
  6238. {
  6239. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6240. },
  6241. {
  6242. "$ref": "#/components/schemas/InvalidRequestError"
  6243. }
  6244. ]
  6245. }
  6246. }
  6247. }
  6248. },
  6249. "404": {
  6250. "description": "NotFoundError",
  6251. "content": {
  6252. "application/json": {
  6253. "schema": {
  6254. "$ref": "#/components/schemas/NotFoundError"
  6255. }
  6256. }
  6257. }
  6258. }
  6259. },
  6260. "description": "Create and send a new message to a session, streaming the AI response.",
  6261. "summary": "Send message",
  6262. "requestBody": {
  6263. "content": {
  6264. "application/json": {
  6265. "schema": {
  6266. "type": "object",
  6267. "properties": {
  6268. "messageID": {
  6269. "type": "string",
  6270. "pattern": "^msg"
  6271. },
  6272. "model": {
  6273. "type": "object",
  6274. "properties": {
  6275. "providerID": {
  6276. "type": "string"
  6277. },
  6278. "modelID": {
  6279. "type": "string"
  6280. }
  6281. },
  6282. "required": ["providerID", "modelID"],
  6283. "additionalProperties": false
  6284. },
  6285. "agent": {
  6286. "type": "string"
  6287. },
  6288. "noReply": {
  6289. "type": "boolean"
  6290. },
  6291. "tools": {
  6292. "type": "object",
  6293. "additionalProperties": {
  6294. "type": "boolean"
  6295. }
  6296. },
  6297. "format": {
  6298. "$ref": "#/components/schemas/OutputFormat"
  6299. },
  6300. "system": {
  6301. "type": "string"
  6302. },
  6303. "variant": {
  6304. "type": "string"
  6305. },
  6306. "parts": {
  6307. "type": "array",
  6308. "items": {
  6309. "anyOf": [
  6310. {
  6311. "$ref": "#/components/schemas/TextPartInput"
  6312. },
  6313. {
  6314. "$ref": "#/components/schemas/FilePartInput"
  6315. },
  6316. {
  6317. "$ref": "#/components/schemas/AgentPartInput"
  6318. },
  6319. {
  6320. "$ref": "#/components/schemas/SubtaskPartInput"
  6321. }
  6322. ]
  6323. }
  6324. }
  6325. },
  6326. "required": ["parts"],
  6327. "additionalProperties": false
  6328. }
  6329. }
  6330. }
  6331. },
  6332. "x-codeSamples": [
  6333. {
  6334. "lang": "js",
  6335. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  6336. }
  6337. ]
  6338. }
  6339. },
  6340. "/session/{sessionID}/message/{messageID}": {
  6341. "get": {
  6342. "tags": ["session"],
  6343. "operationId": "session.message",
  6344. "parameters": [
  6345. {
  6346. "name": "sessionID",
  6347. "in": "path",
  6348. "schema": {
  6349. "type": "string",
  6350. "pattern": "^ses"
  6351. },
  6352. "required": true
  6353. },
  6354. {
  6355. "name": "messageID",
  6356. "in": "path",
  6357. "schema": {
  6358. "type": "string",
  6359. "pattern": "^msg"
  6360. },
  6361. "required": true
  6362. },
  6363. {
  6364. "name": "directory",
  6365. "in": "query",
  6366. "schema": {
  6367. "type": "string"
  6368. },
  6369. "required": false
  6370. },
  6371. {
  6372. "name": "workspace",
  6373. "in": "query",
  6374. "schema": {
  6375. "type": "string"
  6376. },
  6377. "required": false
  6378. }
  6379. ],
  6380. "responses": {
  6381. "200": {
  6382. "description": "Message",
  6383. "content": {
  6384. "application/json": {
  6385. "schema": {
  6386. "type": "object",
  6387. "properties": {
  6388. "info": {
  6389. "$ref": "#/components/schemas/Message"
  6390. },
  6391. "parts": {
  6392. "type": "array",
  6393. "items": {
  6394. "$ref": "#/components/schemas/Part"
  6395. }
  6396. }
  6397. },
  6398. "required": ["info", "parts"],
  6399. "additionalProperties": false,
  6400. "description": "Message"
  6401. }
  6402. }
  6403. }
  6404. },
  6405. "400": {
  6406. "description": "BadRequest | InvalidRequestError",
  6407. "content": {
  6408. "application/json": {
  6409. "schema": {
  6410. "anyOf": [
  6411. {
  6412. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6413. },
  6414. {
  6415. "$ref": "#/components/schemas/InvalidRequestError"
  6416. }
  6417. ]
  6418. }
  6419. }
  6420. }
  6421. },
  6422. "404": {
  6423. "description": "NotFoundError",
  6424. "content": {
  6425. "application/json": {
  6426. "schema": {
  6427. "$ref": "#/components/schemas/NotFoundError"
  6428. }
  6429. }
  6430. }
  6431. }
  6432. },
  6433. "description": "Retrieve a specific message from a session by its message ID.",
  6434. "summary": "Get message",
  6435. "x-codeSamples": [
  6436. {
  6437. "lang": "js",
  6438. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  6439. }
  6440. ]
  6441. },
  6442. "delete": {
  6443. "tags": ["session"],
  6444. "operationId": "session.deleteMessage",
  6445. "parameters": [
  6446. {
  6447. "name": "sessionID",
  6448. "in": "path",
  6449. "schema": {
  6450. "type": "string",
  6451. "pattern": "^ses"
  6452. },
  6453. "required": true
  6454. },
  6455. {
  6456. "name": "messageID",
  6457. "in": "path",
  6458. "schema": {
  6459. "type": "string",
  6460. "pattern": "^msg"
  6461. },
  6462. "required": true
  6463. },
  6464. {
  6465. "name": "directory",
  6466. "in": "query",
  6467. "schema": {
  6468. "type": "string"
  6469. },
  6470. "required": false
  6471. },
  6472. {
  6473. "name": "workspace",
  6474. "in": "query",
  6475. "schema": {
  6476. "type": "string"
  6477. },
  6478. "required": false
  6479. }
  6480. ],
  6481. "responses": {
  6482. "200": {
  6483. "description": "Successfully deleted message",
  6484. "content": {
  6485. "application/json": {
  6486. "schema": {
  6487. "type": "boolean",
  6488. "description": "Successfully deleted message"
  6489. }
  6490. }
  6491. }
  6492. },
  6493. "400": {
  6494. "description": "BadRequest | InvalidRequestError",
  6495. "content": {
  6496. "application/json": {
  6497. "schema": {
  6498. "anyOf": [
  6499. {
  6500. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6501. },
  6502. {
  6503. "$ref": "#/components/schemas/InvalidRequestError"
  6504. }
  6505. ]
  6506. }
  6507. }
  6508. }
  6509. },
  6510. "404": {
  6511. "description": "NotFoundError",
  6512. "content": {
  6513. "application/json": {
  6514. "schema": {
  6515. "$ref": "#/components/schemas/NotFoundError"
  6516. }
  6517. }
  6518. }
  6519. },
  6520. "409": {
  6521. "description": "SessionBusyError",
  6522. "content": {
  6523. "application/json": {
  6524. "schema": {
  6525. "$ref": "#/components/schemas/SessionBusyError"
  6526. }
  6527. }
  6528. }
  6529. }
  6530. },
  6531. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  6532. "summary": "Delete message",
  6533. "x-codeSamples": [
  6534. {
  6535. "lang": "js",
  6536. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  6537. }
  6538. ]
  6539. }
  6540. },
  6541. "/session/{sessionID}/fork": {
  6542. "post": {
  6543. "tags": ["session"],
  6544. "operationId": "session.fork",
  6545. "parameters": [
  6546. {
  6547. "name": "sessionID",
  6548. "in": "path",
  6549. "schema": {
  6550. "type": "string",
  6551. "pattern": "^ses"
  6552. },
  6553. "required": true
  6554. },
  6555. {
  6556. "name": "directory",
  6557. "in": "query",
  6558. "schema": {
  6559. "type": "string"
  6560. },
  6561. "required": false
  6562. },
  6563. {
  6564. "name": "workspace",
  6565. "in": "query",
  6566. "schema": {
  6567. "type": "string"
  6568. },
  6569. "required": false
  6570. }
  6571. ],
  6572. "responses": {
  6573. "200": {
  6574. "description": "200",
  6575. "content": {
  6576. "application/json": {
  6577. "schema": {
  6578. "$ref": "#/components/schemas/Session"
  6579. }
  6580. }
  6581. }
  6582. },
  6583. "400": {
  6584. "description": "BadRequest | InvalidRequestError",
  6585. "content": {
  6586. "application/json": {
  6587. "schema": {
  6588. "anyOf": [
  6589. {
  6590. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6591. },
  6592. {
  6593. "$ref": "#/components/schemas/InvalidRequestError"
  6594. }
  6595. ]
  6596. }
  6597. }
  6598. }
  6599. },
  6600. "404": {
  6601. "description": "NotFoundError",
  6602. "content": {
  6603. "application/json": {
  6604. "schema": {
  6605. "$ref": "#/components/schemas/NotFoundError"
  6606. }
  6607. }
  6608. }
  6609. }
  6610. },
  6611. "description": "Create a new session by forking an existing session at a specific message point.",
  6612. "summary": "Fork session",
  6613. "requestBody": {
  6614. "content": {
  6615. "application/json": {
  6616. "schema": {
  6617. "type": "object",
  6618. "properties": {
  6619. "messageID": {
  6620. "type": "string",
  6621. "pattern": "^msg"
  6622. }
  6623. },
  6624. "additionalProperties": false
  6625. }
  6626. }
  6627. }
  6628. },
  6629. "x-codeSamples": [
  6630. {
  6631. "lang": "js",
  6632. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  6633. }
  6634. ]
  6635. }
  6636. },
  6637. "/session/{sessionID}/abort": {
  6638. "post": {
  6639. "tags": ["session"],
  6640. "operationId": "session.abort",
  6641. "parameters": [
  6642. {
  6643. "name": "sessionID",
  6644. "in": "path",
  6645. "schema": {
  6646. "type": "string",
  6647. "pattern": "^ses"
  6648. },
  6649. "required": true
  6650. },
  6651. {
  6652. "name": "directory",
  6653. "in": "query",
  6654. "schema": {
  6655. "type": "string"
  6656. },
  6657. "required": false
  6658. },
  6659. {
  6660. "name": "workspace",
  6661. "in": "query",
  6662. "schema": {
  6663. "type": "string"
  6664. },
  6665. "required": false
  6666. }
  6667. ],
  6668. "responses": {
  6669. "200": {
  6670. "description": "Aborted session",
  6671. "content": {
  6672. "application/json": {
  6673. "schema": {
  6674. "type": "boolean",
  6675. "description": "Aborted session"
  6676. }
  6677. }
  6678. }
  6679. },
  6680. "400": {
  6681. "description": "BadRequest | InvalidRequestError",
  6682. "content": {
  6683. "application/json": {
  6684. "schema": {
  6685. "anyOf": [
  6686. {
  6687. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6688. },
  6689. {
  6690. "$ref": "#/components/schemas/InvalidRequestError"
  6691. }
  6692. ]
  6693. }
  6694. }
  6695. }
  6696. }
  6697. },
  6698. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  6699. "summary": "Abort session",
  6700. "x-codeSamples": [
  6701. {
  6702. "lang": "js",
  6703. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  6704. }
  6705. ]
  6706. }
  6707. },
  6708. "/session/{sessionID}/init": {
  6709. "post": {
  6710. "tags": ["session"],
  6711. "operationId": "session.init",
  6712. "parameters": [
  6713. {
  6714. "name": "sessionID",
  6715. "in": "path",
  6716. "schema": {
  6717. "type": "string",
  6718. "pattern": "^ses"
  6719. },
  6720. "required": true
  6721. },
  6722. {
  6723. "name": "directory",
  6724. "in": "query",
  6725. "schema": {
  6726. "type": "string"
  6727. },
  6728. "required": false
  6729. },
  6730. {
  6731. "name": "workspace",
  6732. "in": "query",
  6733. "schema": {
  6734. "type": "string"
  6735. },
  6736. "required": false
  6737. }
  6738. ],
  6739. "responses": {
  6740. "200": {
  6741. "description": "200",
  6742. "content": {
  6743. "application/json": {
  6744. "schema": {
  6745. "type": "boolean",
  6746. "description": "200"
  6747. }
  6748. }
  6749. }
  6750. },
  6751. "400": {
  6752. "description": "BadRequest | InvalidRequestError",
  6753. "content": {
  6754. "application/json": {
  6755. "schema": {
  6756. "anyOf": [
  6757. {
  6758. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  6759. },
  6760. {
  6761. "$ref": "#/components/schemas/InvalidRequestError"
  6762. }
  6763. ]
  6764. }
  6765. }
  6766. }
  6767. },
  6768. "404": {
  6769. "description": "NotFoundError",
  6770. "content": {
  6771. "application/json": {
  6772. "schema": {
  6773. "$ref": "#/components/schemas/NotFoundError"
  6774. }
  6775. }
  6776. }
  6777. }
  6778. },
  6779. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  6780. "summary": "Initialize session",
  6781. "requestBody": {
  6782. "content": {
  6783. "application/json": {
  6784. "schema": {
  6785. "type": "object",
  6786. "properties": {
  6787. "modelID": {
  6788. "type": "string"
  6789. },
  6790. "providerID": {
  6791. "type": "string"
  6792. },
  6793. "messageID": {
  6794. "type": "string",
  6795. "pattern": "^msg"
  6796. }
  6797. },
  6798. "required": ["modelID", "providerID", "messageID"],
  6799. "additionalProperties": false
  6800. }
  6801. }
  6802. }
  6803. },
  6804. "x-codeSamples": [
  6805. {
  6806. "lang": "js",
  6807. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  6808. }
  6809. ]
  6810. }
  6811. },
  6812. "/session/{sessionID}/share": {
  6813. "post": {
  6814. "tags": ["session"],
  6815. "operationId": "session.share",
  6816. "parameters": [
  6817. {
  6818. "name": "sessionID",
  6819. "in": "path",
  6820. "schema": {
  6821. "type": "string",
  6822. "pattern": "^ses"
  6823. },
  6824. "required": true
  6825. },
  6826. {
  6827. "name": "directory",
  6828. "in": "query",
  6829. "schema": {
  6830. "type": "string"
  6831. },
  6832. "required": false
  6833. },
  6834. {
  6835. "name": "workspace",
  6836. "in": "query",
  6837. "schema": {
  6838. "type": "string"
  6839. },
  6840. "required": false
  6841. }
  6842. ],
  6843. "responses": {
  6844. "200": {
  6845. "description": "Successfully shared session",
  6846. "content": {
  6847. "application/json": {
  6848. "schema": {
  6849. "$ref": "#/components/schemas/Session"
  6850. }
  6851. }
  6852. }
  6853. },
  6854. "400": {
  6855. "description": "Bad request",
  6856. "content": {
  6857. "application/json": {
  6858. "schema": {
  6859. "$ref": "#/components/schemas/BadRequestError"
  6860. }
  6861. }
  6862. }
  6863. },
  6864. "404": {
  6865. "description": "NotFoundError",
  6866. "content": {
  6867. "application/json": {
  6868. "schema": {
  6869. "$ref": "#/components/schemas/NotFoundError"
  6870. }
  6871. }
  6872. }
  6873. },
  6874. "500": {
  6875. "description": "InternalServerError",
  6876. "content": {
  6877. "application/json": {
  6878. "schema": {
  6879. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6880. }
  6881. }
  6882. }
  6883. }
  6884. },
  6885. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  6886. "summary": "Share session",
  6887. "x-codeSamples": [
  6888. {
  6889. "lang": "js",
  6890. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  6891. }
  6892. ]
  6893. },
  6894. "delete": {
  6895. "tags": ["session"],
  6896. "operationId": "session.unshare",
  6897. "parameters": [
  6898. {
  6899. "name": "sessionID",
  6900. "in": "path",
  6901. "schema": {
  6902. "type": "string",
  6903. "pattern": "^ses"
  6904. },
  6905. "required": true
  6906. },
  6907. {
  6908. "name": "directory",
  6909. "in": "query",
  6910. "schema": {
  6911. "type": "string"
  6912. },
  6913. "required": false
  6914. },
  6915. {
  6916. "name": "workspace",
  6917. "in": "query",
  6918. "schema": {
  6919. "type": "string"
  6920. },
  6921. "required": false
  6922. }
  6923. ],
  6924. "responses": {
  6925. "200": {
  6926. "description": "Successfully unshared session",
  6927. "content": {
  6928. "application/json": {
  6929. "schema": {
  6930. "$ref": "#/components/schemas/Session"
  6931. }
  6932. }
  6933. }
  6934. },
  6935. "400": {
  6936. "description": "Bad request",
  6937. "content": {
  6938. "application/json": {
  6939. "schema": {
  6940. "$ref": "#/components/schemas/BadRequestError"
  6941. }
  6942. }
  6943. }
  6944. },
  6945. "404": {
  6946. "description": "NotFoundError",
  6947. "content": {
  6948. "application/json": {
  6949. "schema": {
  6950. "$ref": "#/components/schemas/NotFoundError"
  6951. }
  6952. }
  6953. }
  6954. },
  6955. "500": {
  6956. "description": "InternalServerError",
  6957. "content": {
  6958. "application/json": {
  6959. "schema": {
  6960. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  6961. }
  6962. }
  6963. }
  6964. }
  6965. },
  6966. "description": "Remove the shareable link for a session, making it private again.",
  6967. "summary": "Unshare session",
  6968. "x-codeSamples": [
  6969. {
  6970. "lang": "js",
  6971. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  6972. }
  6973. ]
  6974. }
  6975. },
  6976. "/session/{sessionID}/summarize": {
  6977. "post": {
  6978. "tags": ["session"],
  6979. "operationId": "session.summarize",
  6980. "parameters": [
  6981. {
  6982. "name": "sessionID",
  6983. "in": "path",
  6984. "schema": {
  6985. "type": "string",
  6986. "pattern": "^ses"
  6987. },
  6988. "required": true
  6989. },
  6990. {
  6991. "name": "directory",
  6992. "in": "query",
  6993. "schema": {
  6994. "type": "string"
  6995. },
  6996. "required": false
  6997. },
  6998. {
  6999. "name": "workspace",
  7000. "in": "query",
  7001. "schema": {
  7002. "type": "string"
  7003. },
  7004. "required": false
  7005. }
  7006. ],
  7007. "responses": {
  7008. "200": {
  7009. "description": "Summarized session",
  7010. "content": {
  7011. "application/json": {
  7012. "schema": {
  7013. "type": "boolean",
  7014. "description": "Summarized session"
  7015. }
  7016. }
  7017. }
  7018. },
  7019. "400": {
  7020. "description": "BadRequest | InvalidRequestError",
  7021. "content": {
  7022. "application/json": {
  7023. "schema": {
  7024. "anyOf": [
  7025. {
  7026. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7027. },
  7028. {
  7029. "$ref": "#/components/schemas/InvalidRequestError"
  7030. }
  7031. ]
  7032. }
  7033. }
  7034. }
  7035. },
  7036. "404": {
  7037. "description": "NotFoundError",
  7038. "content": {
  7039. "application/json": {
  7040. "schema": {
  7041. "$ref": "#/components/schemas/NotFoundError"
  7042. }
  7043. }
  7044. }
  7045. }
  7046. },
  7047. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  7048. "summary": "Summarize session",
  7049. "requestBody": {
  7050. "content": {
  7051. "application/json": {
  7052. "schema": {
  7053. "type": "object",
  7054. "properties": {
  7055. "providerID": {
  7056. "type": "string"
  7057. },
  7058. "modelID": {
  7059. "type": "string"
  7060. },
  7061. "auto": {
  7062. "type": "boolean"
  7063. }
  7064. },
  7065. "required": ["providerID", "modelID"],
  7066. "additionalProperties": false
  7067. }
  7068. }
  7069. }
  7070. },
  7071. "x-codeSamples": [
  7072. {
  7073. "lang": "js",
  7074. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  7075. }
  7076. ]
  7077. }
  7078. },
  7079. "/session/{sessionID}/prompt_async": {
  7080. "post": {
  7081. "tags": ["session"],
  7082. "operationId": "session.prompt_async",
  7083. "parameters": [
  7084. {
  7085. "name": "sessionID",
  7086. "in": "path",
  7087. "schema": {
  7088. "type": "string",
  7089. "pattern": "^ses"
  7090. },
  7091. "required": true
  7092. },
  7093. {
  7094. "name": "directory",
  7095. "in": "query",
  7096. "schema": {
  7097. "type": "string"
  7098. },
  7099. "required": false
  7100. },
  7101. {
  7102. "name": "workspace",
  7103. "in": "query",
  7104. "schema": {
  7105. "type": "string"
  7106. },
  7107. "required": false
  7108. }
  7109. ],
  7110. "responses": {
  7111. "204": {
  7112. "description": "Prompt accepted"
  7113. },
  7114. "400": {
  7115. "description": "BadRequest | InvalidRequestError",
  7116. "content": {
  7117. "application/json": {
  7118. "schema": {
  7119. "anyOf": [
  7120. {
  7121. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7122. },
  7123. {
  7124. "$ref": "#/components/schemas/InvalidRequestError"
  7125. }
  7126. ]
  7127. }
  7128. }
  7129. }
  7130. },
  7131. "404": {
  7132. "description": "NotFoundError",
  7133. "content": {
  7134. "application/json": {
  7135. "schema": {
  7136. "$ref": "#/components/schemas/NotFoundError"
  7137. }
  7138. }
  7139. }
  7140. }
  7141. },
  7142. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  7143. "summary": "Send async message",
  7144. "requestBody": {
  7145. "content": {
  7146. "application/json": {
  7147. "schema": {
  7148. "type": "object",
  7149. "properties": {
  7150. "messageID": {
  7151. "type": "string",
  7152. "pattern": "^msg"
  7153. },
  7154. "model": {
  7155. "type": "object",
  7156. "properties": {
  7157. "providerID": {
  7158. "type": "string"
  7159. },
  7160. "modelID": {
  7161. "type": "string"
  7162. }
  7163. },
  7164. "required": ["providerID", "modelID"],
  7165. "additionalProperties": false
  7166. },
  7167. "agent": {
  7168. "type": "string"
  7169. },
  7170. "noReply": {
  7171. "type": "boolean"
  7172. },
  7173. "tools": {
  7174. "type": "object",
  7175. "additionalProperties": {
  7176. "type": "boolean"
  7177. }
  7178. },
  7179. "format": {
  7180. "$ref": "#/components/schemas/OutputFormat"
  7181. },
  7182. "system": {
  7183. "type": "string"
  7184. },
  7185. "variant": {
  7186. "type": "string"
  7187. },
  7188. "parts": {
  7189. "type": "array",
  7190. "items": {
  7191. "anyOf": [
  7192. {
  7193. "$ref": "#/components/schemas/TextPartInput"
  7194. },
  7195. {
  7196. "$ref": "#/components/schemas/FilePartInput"
  7197. },
  7198. {
  7199. "$ref": "#/components/schemas/AgentPartInput"
  7200. },
  7201. {
  7202. "$ref": "#/components/schemas/SubtaskPartInput"
  7203. }
  7204. ]
  7205. }
  7206. }
  7207. },
  7208. "required": ["parts"],
  7209. "additionalProperties": false
  7210. }
  7211. }
  7212. }
  7213. },
  7214. "x-codeSamples": [
  7215. {
  7216. "lang": "js",
  7217. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  7218. }
  7219. ]
  7220. }
  7221. },
  7222. "/session/{sessionID}/command": {
  7223. "post": {
  7224. "tags": ["session"],
  7225. "operationId": "session.command",
  7226. "parameters": [
  7227. {
  7228. "name": "sessionID",
  7229. "in": "path",
  7230. "schema": {
  7231. "type": "string",
  7232. "pattern": "^ses"
  7233. },
  7234. "required": true
  7235. },
  7236. {
  7237. "name": "directory",
  7238. "in": "query",
  7239. "schema": {
  7240. "type": "string"
  7241. },
  7242. "required": false
  7243. },
  7244. {
  7245. "name": "workspace",
  7246. "in": "query",
  7247. "schema": {
  7248. "type": "string"
  7249. },
  7250. "required": false
  7251. }
  7252. ],
  7253. "responses": {
  7254. "200": {
  7255. "description": "Created message",
  7256. "content": {
  7257. "application/json": {
  7258. "schema": {
  7259. "type": "object",
  7260. "required": ["info", "parts"],
  7261. "properties": {
  7262. "info": {
  7263. "$ref": "#/components/schemas/AssistantMessage"
  7264. },
  7265. "parts": {
  7266. "type": "array",
  7267. "items": {
  7268. "$ref": "#/components/schemas/Part"
  7269. }
  7270. }
  7271. }
  7272. }
  7273. }
  7274. }
  7275. },
  7276. "400": {
  7277. "description": "BadRequest | InvalidRequestError",
  7278. "content": {
  7279. "application/json": {
  7280. "schema": {
  7281. "anyOf": [
  7282. {
  7283. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7284. },
  7285. {
  7286. "$ref": "#/components/schemas/InvalidRequestError"
  7287. }
  7288. ]
  7289. }
  7290. }
  7291. }
  7292. },
  7293. "404": {
  7294. "description": "NotFoundError",
  7295. "content": {
  7296. "application/json": {
  7297. "schema": {
  7298. "$ref": "#/components/schemas/NotFoundError"
  7299. }
  7300. }
  7301. }
  7302. }
  7303. },
  7304. "description": "Send a new command to a session for execution by the AI assistant.",
  7305. "summary": "Send command",
  7306. "requestBody": {
  7307. "content": {
  7308. "application/json": {
  7309. "schema": {
  7310. "type": "object",
  7311. "properties": {
  7312. "messageID": {
  7313. "type": "string",
  7314. "pattern": "^msg"
  7315. },
  7316. "agent": {
  7317. "type": "string"
  7318. },
  7319. "model": {
  7320. "type": "string"
  7321. },
  7322. "arguments": {
  7323. "type": "string"
  7324. },
  7325. "command": {
  7326. "type": "string"
  7327. },
  7328. "variant": {
  7329. "type": "string"
  7330. },
  7331. "parts": {
  7332. "type": "array",
  7333. "items": {
  7334. "type": "object",
  7335. "properties": {
  7336. "id": {
  7337. "type": "string",
  7338. "pattern": "^prt"
  7339. },
  7340. "type": {
  7341. "type": "string",
  7342. "enum": ["file"]
  7343. },
  7344. "mime": {
  7345. "type": "string"
  7346. },
  7347. "filename": {
  7348. "type": "string"
  7349. },
  7350. "url": {
  7351. "type": "string"
  7352. },
  7353. "source": {
  7354. "$ref": "#/components/schemas/FilePartSource"
  7355. }
  7356. },
  7357. "required": ["type", "mime", "url"],
  7358. "additionalProperties": false
  7359. }
  7360. }
  7361. },
  7362. "required": ["arguments", "command"],
  7363. "additionalProperties": false
  7364. }
  7365. }
  7366. }
  7367. },
  7368. "x-codeSamples": [
  7369. {
  7370. "lang": "js",
  7371. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  7372. }
  7373. ]
  7374. }
  7375. },
  7376. "/session/{sessionID}/shell": {
  7377. "post": {
  7378. "tags": ["session"],
  7379. "operationId": "session.shell",
  7380. "parameters": [
  7381. {
  7382. "name": "sessionID",
  7383. "in": "path",
  7384. "schema": {
  7385. "type": "string",
  7386. "pattern": "^ses"
  7387. },
  7388. "required": true
  7389. },
  7390. {
  7391. "name": "directory",
  7392. "in": "query",
  7393. "schema": {
  7394. "type": "string"
  7395. },
  7396. "required": false
  7397. },
  7398. {
  7399. "name": "workspace",
  7400. "in": "query",
  7401. "schema": {
  7402. "type": "string"
  7403. },
  7404. "required": false
  7405. }
  7406. ],
  7407. "responses": {
  7408. "200": {
  7409. "description": "Created message",
  7410. "content": {
  7411. "application/json": {
  7412. "schema": {
  7413. "type": "object",
  7414. "properties": {
  7415. "info": {
  7416. "$ref": "#/components/schemas/Message"
  7417. },
  7418. "parts": {
  7419. "type": "array",
  7420. "items": {
  7421. "$ref": "#/components/schemas/Part"
  7422. }
  7423. }
  7424. },
  7425. "required": ["info", "parts"],
  7426. "additionalProperties": false,
  7427. "description": "Created message"
  7428. }
  7429. }
  7430. }
  7431. },
  7432. "400": {
  7433. "description": "BadRequest | InvalidRequestError",
  7434. "content": {
  7435. "application/json": {
  7436. "schema": {
  7437. "anyOf": [
  7438. {
  7439. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7440. },
  7441. {
  7442. "$ref": "#/components/schemas/InvalidRequestError"
  7443. }
  7444. ]
  7445. }
  7446. }
  7447. }
  7448. },
  7449. "404": {
  7450. "description": "NotFoundError",
  7451. "content": {
  7452. "application/json": {
  7453. "schema": {
  7454. "$ref": "#/components/schemas/NotFoundError"
  7455. }
  7456. }
  7457. }
  7458. },
  7459. "409": {
  7460. "description": "SessionBusyError",
  7461. "content": {
  7462. "application/json": {
  7463. "schema": {
  7464. "$ref": "#/components/schemas/SessionBusyError"
  7465. }
  7466. }
  7467. }
  7468. }
  7469. },
  7470. "description": "Execute a shell command within the session context and return the AI's response.",
  7471. "summary": "Run shell command",
  7472. "requestBody": {
  7473. "content": {
  7474. "application/json": {
  7475. "schema": {
  7476. "type": "object",
  7477. "properties": {
  7478. "messageID": {
  7479. "type": "string",
  7480. "pattern": "^msg"
  7481. },
  7482. "agent": {
  7483. "type": "string"
  7484. },
  7485. "model": {
  7486. "type": "object",
  7487. "properties": {
  7488. "providerID": {
  7489. "type": "string"
  7490. },
  7491. "modelID": {
  7492. "type": "string"
  7493. }
  7494. },
  7495. "required": ["providerID", "modelID"],
  7496. "additionalProperties": false
  7497. },
  7498. "command": {
  7499. "type": "string"
  7500. }
  7501. },
  7502. "required": ["agent", "command"],
  7503. "additionalProperties": false
  7504. }
  7505. }
  7506. }
  7507. },
  7508. "x-codeSamples": [
  7509. {
  7510. "lang": "js",
  7511. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  7512. }
  7513. ]
  7514. }
  7515. },
  7516. "/session/{sessionID}/revert": {
  7517. "post": {
  7518. "tags": ["session"],
  7519. "operationId": "session.revert",
  7520. "parameters": [
  7521. {
  7522. "name": "sessionID",
  7523. "in": "path",
  7524. "schema": {
  7525. "type": "string",
  7526. "pattern": "^ses"
  7527. },
  7528. "required": true
  7529. },
  7530. {
  7531. "name": "directory",
  7532. "in": "query",
  7533. "schema": {
  7534. "type": "string"
  7535. },
  7536. "required": false
  7537. },
  7538. {
  7539. "name": "workspace",
  7540. "in": "query",
  7541. "schema": {
  7542. "type": "string"
  7543. },
  7544. "required": false
  7545. }
  7546. ],
  7547. "responses": {
  7548. "200": {
  7549. "description": "Updated session",
  7550. "content": {
  7551. "application/json": {
  7552. "schema": {
  7553. "$ref": "#/components/schemas/Session"
  7554. }
  7555. }
  7556. }
  7557. },
  7558. "400": {
  7559. "description": "BadRequest | InvalidRequestError",
  7560. "content": {
  7561. "application/json": {
  7562. "schema": {
  7563. "anyOf": [
  7564. {
  7565. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7566. },
  7567. {
  7568. "$ref": "#/components/schemas/InvalidRequestError"
  7569. }
  7570. ]
  7571. }
  7572. }
  7573. }
  7574. },
  7575. "404": {
  7576. "description": "NotFoundError",
  7577. "content": {
  7578. "application/json": {
  7579. "schema": {
  7580. "$ref": "#/components/schemas/NotFoundError"
  7581. }
  7582. }
  7583. }
  7584. },
  7585. "409": {
  7586. "description": "SessionBusyError",
  7587. "content": {
  7588. "application/json": {
  7589. "schema": {
  7590. "$ref": "#/components/schemas/SessionBusyError"
  7591. }
  7592. }
  7593. }
  7594. }
  7595. },
  7596. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  7597. "summary": "Revert message",
  7598. "requestBody": {
  7599. "content": {
  7600. "application/json": {
  7601. "schema": {
  7602. "type": "object",
  7603. "properties": {
  7604. "messageID": {
  7605. "type": "string",
  7606. "pattern": "^msg"
  7607. },
  7608. "partID": {
  7609. "type": "string",
  7610. "pattern": "^prt"
  7611. }
  7612. },
  7613. "required": ["messageID"],
  7614. "additionalProperties": false
  7615. }
  7616. }
  7617. }
  7618. },
  7619. "x-codeSamples": [
  7620. {
  7621. "lang": "js",
  7622. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  7623. }
  7624. ]
  7625. }
  7626. },
  7627. "/session/{sessionID}/unrevert": {
  7628. "post": {
  7629. "tags": ["session"],
  7630. "operationId": "session.unrevert",
  7631. "parameters": [
  7632. {
  7633. "name": "sessionID",
  7634. "in": "path",
  7635. "schema": {
  7636. "type": "string",
  7637. "pattern": "^ses"
  7638. },
  7639. "required": true
  7640. },
  7641. {
  7642. "name": "directory",
  7643. "in": "query",
  7644. "schema": {
  7645. "type": "string"
  7646. },
  7647. "required": false
  7648. },
  7649. {
  7650. "name": "workspace",
  7651. "in": "query",
  7652. "schema": {
  7653. "type": "string"
  7654. },
  7655. "required": false
  7656. }
  7657. ],
  7658. "responses": {
  7659. "200": {
  7660. "description": "Updated session",
  7661. "content": {
  7662. "application/json": {
  7663. "schema": {
  7664. "$ref": "#/components/schemas/Session"
  7665. }
  7666. }
  7667. }
  7668. },
  7669. "400": {
  7670. "description": "BadRequest | InvalidRequestError",
  7671. "content": {
  7672. "application/json": {
  7673. "schema": {
  7674. "anyOf": [
  7675. {
  7676. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7677. },
  7678. {
  7679. "$ref": "#/components/schemas/InvalidRequestError"
  7680. }
  7681. ]
  7682. }
  7683. }
  7684. }
  7685. },
  7686. "404": {
  7687. "description": "NotFoundError",
  7688. "content": {
  7689. "application/json": {
  7690. "schema": {
  7691. "$ref": "#/components/schemas/NotFoundError"
  7692. }
  7693. }
  7694. }
  7695. },
  7696. "409": {
  7697. "description": "SessionBusyError",
  7698. "content": {
  7699. "application/json": {
  7700. "schema": {
  7701. "$ref": "#/components/schemas/SessionBusyError"
  7702. }
  7703. }
  7704. }
  7705. }
  7706. },
  7707. "description": "Restore all previously reverted messages in a session.",
  7708. "summary": "Restore reverted messages",
  7709. "x-codeSamples": [
  7710. {
  7711. "lang": "js",
  7712. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  7713. }
  7714. ]
  7715. }
  7716. },
  7717. "/session/{sessionID}/permissions/{permissionID}": {
  7718. "post": {
  7719. "tags": ["session"],
  7720. "operationId": "permission.respond",
  7721. "parameters": [
  7722. {
  7723. "name": "sessionID",
  7724. "in": "path",
  7725. "schema": {
  7726. "type": "string",
  7727. "pattern": "^ses"
  7728. },
  7729. "required": true
  7730. },
  7731. {
  7732. "name": "permissionID",
  7733. "in": "path",
  7734. "schema": {
  7735. "type": "string",
  7736. "pattern": "^per"
  7737. },
  7738. "required": true
  7739. },
  7740. {
  7741. "name": "directory",
  7742. "in": "query",
  7743. "schema": {
  7744. "type": "string"
  7745. },
  7746. "required": false
  7747. },
  7748. {
  7749. "name": "workspace",
  7750. "in": "query",
  7751. "schema": {
  7752. "type": "string"
  7753. },
  7754. "required": false
  7755. }
  7756. ],
  7757. "responses": {
  7758. "200": {
  7759. "description": "Permission processed successfully",
  7760. "content": {
  7761. "application/json": {
  7762. "schema": {
  7763. "type": "boolean",
  7764. "description": "Permission processed successfully"
  7765. }
  7766. }
  7767. }
  7768. },
  7769. "400": {
  7770. "description": "BadRequest | InvalidRequestError",
  7771. "content": {
  7772. "application/json": {
  7773. "schema": {
  7774. "anyOf": [
  7775. {
  7776. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7777. },
  7778. {
  7779. "$ref": "#/components/schemas/InvalidRequestError"
  7780. }
  7781. ]
  7782. }
  7783. }
  7784. }
  7785. },
  7786. "404": {
  7787. "description": "NotFoundError | PermissionNotFoundError",
  7788. "content": {
  7789. "application/json": {
  7790. "schema": {
  7791. "anyOf": [
  7792. {
  7793. "$ref": "#/components/schemas/NotFoundError"
  7794. },
  7795. {
  7796. "$ref": "#/components/schemas/PermissionNotFoundError"
  7797. }
  7798. ]
  7799. }
  7800. }
  7801. }
  7802. }
  7803. },
  7804. "description": "Approve or deny a permission request from the AI assistant.",
  7805. "summary": "Respond to permission",
  7806. "deprecated": true,
  7807. "requestBody": {
  7808. "content": {
  7809. "application/json": {
  7810. "schema": {
  7811. "type": "object",
  7812. "properties": {
  7813. "response": {
  7814. "type": "string",
  7815. "enum": ["once", "always", "reject"]
  7816. }
  7817. },
  7818. "required": ["response"],
  7819. "additionalProperties": false
  7820. }
  7821. }
  7822. }
  7823. },
  7824. "x-codeSamples": [
  7825. {
  7826. "lang": "js",
  7827. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  7828. }
  7829. ]
  7830. }
  7831. },
  7832. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  7833. "delete": {
  7834. "tags": ["session"],
  7835. "operationId": "part.delete",
  7836. "parameters": [
  7837. {
  7838. "name": "sessionID",
  7839. "in": "path",
  7840. "schema": {
  7841. "type": "string",
  7842. "pattern": "^ses"
  7843. },
  7844. "required": true
  7845. },
  7846. {
  7847. "name": "messageID",
  7848. "in": "path",
  7849. "schema": {
  7850. "type": "string",
  7851. "pattern": "^msg"
  7852. },
  7853. "required": true
  7854. },
  7855. {
  7856. "name": "partID",
  7857. "in": "path",
  7858. "schema": {
  7859. "type": "string",
  7860. "pattern": "^prt"
  7861. },
  7862. "required": true
  7863. },
  7864. {
  7865. "name": "directory",
  7866. "in": "query",
  7867. "schema": {
  7868. "type": "string"
  7869. },
  7870. "required": false
  7871. },
  7872. {
  7873. "name": "workspace",
  7874. "in": "query",
  7875. "schema": {
  7876. "type": "string"
  7877. },
  7878. "required": false
  7879. }
  7880. ],
  7881. "responses": {
  7882. "200": {
  7883. "description": "Successfully deleted part",
  7884. "content": {
  7885. "application/json": {
  7886. "schema": {
  7887. "type": "boolean",
  7888. "description": "Successfully deleted part"
  7889. }
  7890. }
  7891. }
  7892. },
  7893. "400": {
  7894. "description": "BadRequest | InvalidRequestError",
  7895. "content": {
  7896. "application/json": {
  7897. "schema": {
  7898. "anyOf": [
  7899. {
  7900. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7901. },
  7902. {
  7903. "$ref": "#/components/schemas/InvalidRequestError"
  7904. }
  7905. ]
  7906. }
  7907. }
  7908. }
  7909. },
  7910. "404": {
  7911. "description": "NotFoundError",
  7912. "content": {
  7913. "application/json": {
  7914. "schema": {
  7915. "$ref": "#/components/schemas/NotFoundError"
  7916. }
  7917. }
  7918. }
  7919. }
  7920. },
  7921. "description": "Delete a part from a message.",
  7922. "x-codeSamples": [
  7923. {
  7924. "lang": "js",
  7925. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  7926. }
  7927. ]
  7928. },
  7929. "patch": {
  7930. "tags": ["session"],
  7931. "operationId": "part.update",
  7932. "parameters": [
  7933. {
  7934. "name": "sessionID",
  7935. "in": "path",
  7936. "schema": {
  7937. "type": "string",
  7938. "pattern": "^ses"
  7939. },
  7940. "required": true
  7941. },
  7942. {
  7943. "name": "messageID",
  7944. "in": "path",
  7945. "schema": {
  7946. "type": "string",
  7947. "pattern": "^msg"
  7948. },
  7949. "required": true
  7950. },
  7951. {
  7952. "name": "partID",
  7953. "in": "path",
  7954. "schema": {
  7955. "type": "string",
  7956. "pattern": "^prt"
  7957. },
  7958. "required": true
  7959. },
  7960. {
  7961. "name": "directory",
  7962. "in": "query",
  7963. "schema": {
  7964. "type": "string"
  7965. },
  7966. "required": false
  7967. },
  7968. {
  7969. "name": "workspace",
  7970. "in": "query",
  7971. "schema": {
  7972. "type": "string"
  7973. },
  7974. "required": false
  7975. }
  7976. ],
  7977. "responses": {
  7978. "200": {
  7979. "description": "Successfully updated part",
  7980. "content": {
  7981. "application/json": {
  7982. "schema": {
  7983. "$ref": "#/components/schemas/Part"
  7984. }
  7985. }
  7986. }
  7987. },
  7988. "400": {
  7989. "description": "BadRequest | InvalidRequestError",
  7990. "content": {
  7991. "application/json": {
  7992. "schema": {
  7993. "anyOf": [
  7994. {
  7995. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  7996. },
  7997. {
  7998. "$ref": "#/components/schemas/InvalidRequestError"
  7999. }
  8000. ]
  8001. }
  8002. }
  8003. }
  8004. },
  8005. "404": {
  8006. "description": "NotFoundError",
  8007. "content": {
  8008. "application/json": {
  8009. "schema": {
  8010. "$ref": "#/components/schemas/NotFoundError"
  8011. }
  8012. }
  8013. }
  8014. }
  8015. },
  8016. "description": "Update a part in a message.",
  8017. "requestBody": {
  8018. "content": {
  8019. "application/json": {
  8020. "schema": {
  8021. "$ref": "#/components/schemas/Part"
  8022. }
  8023. }
  8024. }
  8025. },
  8026. "x-codeSamples": [
  8027. {
  8028. "lang": "js",
  8029. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  8030. }
  8031. ]
  8032. }
  8033. },
  8034. "/sync/start": {
  8035. "post": {
  8036. "tags": ["sync"],
  8037. "operationId": "sync.start",
  8038. "parameters": [
  8039. {
  8040. "name": "directory",
  8041. "in": "query",
  8042. "schema": {
  8043. "type": "string"
  8044. },
  8045. "required": false
  8046. },
  8047. {
  8048. "name": "workspace",
  8049. "in": "query",
  8050. "schema": {
  8051. "type": "string"
  8052. },
  8053. "required": false
  8054. }
  8055. ],
  8056. "responses": {
  8057. "200": {
  8058. "description": "Workspace sync started",
  8059. "content": {
  8060. "application/json": {
  8061. "schema": {
  8062. "type": "boolean",
  8063. "description": "Workspace sync started"
  8064. }
  8065. }
  8066. }
  8067. },
  8068. "400": {
  8069. "description": "Bad request",
  8070. "content": {
  8071. "application/json": {
  8072. "schema": {
  8073. "$ref": "#/components/schemas/BadRequestError"
  8074. }
  8075. }
  8076. }
  8077. }
  8078. },
  8079. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  8080. "summary": "Start workspace sync",
  8081. "x-codeSamples": [
  8082. {
  8083. "lang": "js",
  8084. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  8085. }
  8086. ]
  8087. }
  8088. },
  8089. "/sync/replay": {
  8090. "post": {
  8091. "tags": ["sync"],
  8092. "operationId": "sync.replay",
  8093. "parameters": [
  8094. {
  8095. "name": "directory",
  8096. "in": "query",
  8097. "schema": {
  8098. "type": "string"
  8099. },
  8100. "required": false
  8101. },
  8102. {
  8103. "name": "workspace",
  8104. "in": "query",
  8105. "schema": {
  8106. "type": "string"
  8107. },
  8108. "required": false
  8109. }
  8110. ],
  8111. "responses": {
  8112. "200": {
  8113. "description": "Replayed sync events",
  8114. "content": {
  8115. "application/json": {
  8116. "schema": {
  8117. "type": "object",
  8118. "properties": {
  8119. "sessionID": {
  8120. "type": "string"
  8121. }
  8122. },
  8123. "required": ["sessionID"],
  8124. "additionalProperties": false,
  8125. "description": "Replayed sync events"
  8126. }
  8127. }
  8128. }
  8129. },
  8130. "400": {
  8131. "description": "BadRequest | InvalidRequestError",
  8132. "content": {
  8133. "application/json": {
  8134. "schema": {
  8135. "anyOf": [
  8136. {
  8137. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8138. },
  8139. {
  8140. "$ref": "#/components/schemas/InvalidRequestError"
  8141. }
  8142. ]
  8143. }
  8144. }
  8145. }
  8146. }
  8147. },
  8148. "description": "Validate and replay a complete sync event history.",
  8149. "summary": "Replay sync events",
  8150. "requestBody": {
  8151. "content": {
  8152. "application/json": {
  8153. "schema": {
  8154. "type": "object",
  8155. "properties": {
  8156. "directory": {
  8157. "type": "string"
  8158. },
  8159. "events": {
  8160. "type": "array",
  8161. "minItems": 1,
  8162. "items": {
  8163. "type": "object",
  8164. "properties": {
  8165. "id": {
  8166. "type": "string",
  8167. "pattern": "^evt_"
  8168. },
  8169. "aggregateID": {
  8170. "type": "string"
  8171. },
  8172. "seq": {
  8173. "type": "integer",
  8174. "minimum": 0
  8175. },
  8176. "type": {
  8177. "type": "string"
  8178. },
  8179. "data": {
  8180. "type": "object"
  8181. }
  8182. },
  8183. "required": ["id", "aggregateID", "seq", "type", "data"],
  8184. "additionalProperties": false
  8185. }
  8186. }
  8187. },
  8188. "required": ["directory", "events"],
  8189. "additionalProperties": false
  8190. }
  8191. }
  8192. }
  8193. },
  8194. "x-codeSamples": [
  8195. {
  8196. "lang": "js",
  8197. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  8198. }
  8199. ]
  8200. }
  8201. },
  8202. "/sync/steal": {
  8203. "post": {
  8204. "tags": ["sync"],
  8205. "operationId": "sync.steal",
  8206. "parameters": [
  8207. {
  8208. "name": "directory",
  8209. "in": "query",
  8210. "schema": {
  8211. "type": "string"
  8212. },
  8213. "required": false
  8214. },
  8215. {
  8216. "name": "workspace",
  8217. "in": "query",
  8218. "schema": {
  8219. "type": "string"
  8220. },
  8221. "required": false
  8222. }
  8223. ],
  8224. "responses": {
  8225. "200": {
  8226. "description": "Session stolen into workspace",
  8227. "content": {
  8228. "application/json": {
  8229. "schema": {
  8230. "type": "object",
  8231. "properties": {
  8232. "sessionID": {
  8233. "type": "string",
  8234. "pattern": "^ses"
  8235. }
  8236. },
  8237. "required": ["sessionID"],
  8238. "additionalProperties": false,
  8239. "description": "Session stolen into workspace"
  8240. }
  8241. }
  8242. }
  8243. },
  8244. "400": {
  8245. "description": "BadRequest | InvalidRequestError",
  8246. "content": {
  8247. "application/json": {
  8248. "schema": {
  8249. "anyOf": [
  8250. {
  8251. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8252. },
  8253. {
  8254. "$ref": "#/components/schemas/InvalidRequestError"
  8255. }
  8256. ]
  8257. }
  8258. }
  8259. }
  8260. }
  8261. },
  8262. "description": "Update a session to belong to the current workspace through the sync event system.",
  8263. "summary": "Steal session into workspace",
  8264. "requestBody": {
  8265. "content": {
  8266. "application/json": {
  8267. "schema": {
  8268. "type": "object",
  8269. "properties": {
  8270. "sessionID": {
  8271. "type": "string",
  8272. "pattern": "^ses"
  8273. }
  8274. },
  8275. "required": ["sessionID"],
  8276. "additionalProperties": false
  8277. }
  8278. }
  8279. }
  8280. },
  8281. "x-codeSamples": [
  8282. {
  8283. "lang": "js",
  8284. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  8285. }
  8286. ]
  8287. }
  8288. },
  8289. "/sync/history": {
  8290. "post": {
  8291. "tags": ["sync"],
  8292. "operationId": "sync.history.list",
  8293. "parameters": [
  8294. {
  8295. "name": "directory",
  8296. "in": "query",
  8297. "schema": {
  8298. "type": "string"
  8299. },
  8300. "required": false
  8301. },
  8302. {
  8303. "name": "workspace",
  8304. "in": "query",
  8305. "schema": {
  8306. "type": "string"
  8307. },
  8308. "required": false
  8309. }
  8310. ],
  8311. "responses": {
  8312. "200": {
  8313. "description": "Sync events",
  8314. "content": {
  8315. "application/json": {
  8316. "schema": {
  8317. "type": "array",
  8318. "items": {
  8319. "type": "object",
  8320. "properties": {
  8321. "id": {
  8322. "type": "string",
  8323. "pattern": "^evt_"
  8324. },
  8325. "aggregate_id": {
  8326. "type": "string"
  8327. },
  8328. "seq": {
  8329. "type": "integer",
  8330. "minimum": 0
  8331. },
  8332. "type": {
  8333. "type": "string"
  8334. },
  8335. "data": {
  8336. "type": "object"
  8337. }
  8338. },
  8339. "required": ["id", "aggregate_id", "seq", "type", "data"],
  8340. "additionalProperties": false
  8341. },
  8342. "description": "Sync events"
  8343. }
  8344. }
  8345. }
  8346. },
  8347. "400": {
  8348. "description": "BadRequest | InvalidRequestError",
  8349. "content": {
  8350. "application/json": {
  8351. "schema": {
  8352. "anyOf": [
  8353. {
  8354. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8355. },
  8356. {
  8357. "$ref": "#/components/schemas/InvalidRequestError"
  8358. }
  8359. ]
  8360. }
  8361. }
  8362. }
  8363. }
  8364. },
  8365. "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.",
  8366. "summary": "List sync events",
  8367. "requestBody": {
  8368. "content": {
  8369. "application/json": {
  8370. "schema": {
  8371. "type": "object",
  8372. "additionalProperties": {
  8373. "type": "integer",
  8374. "minimum": 0
  8375. }
  8376. }
  8377. }
  8378. }
  8379. },
  8380. "x-codeSamples": [
  8381. {
  8382. "lang": "js",
  8383. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  8384. }
  8385. ]
  8386. }
  8387. },
  8388. "/tui/append-prompt": {
  8389. "post": {
  8390. "tags": ["tui"],
  8391. "operationId": "tui.appendPrompt",
  8392. "parameters": [
  8393. {
  8394. "name": "directory",
  8395. "in": "query",
  8396. "schema": {
  8397. "type": "string"
  8398. },
  8399. "required": false
  8400. },
  8401. {
  8402. "name": "workspace",
  8403. "in": "query",
  8404. "schema": {
  8405. "type": "string"
  8406. },
  8407. "required": false
  8408. }
  8409. ],
  8410. "responses": {
  8411. "200": {
  8412. "description": "Prompt processed successfully",
  8413. "content": {
  8414. "application/json": {
  8415. "schema": {
  8416. "type": "boolean",
  8417. "description": "Prompt processed successfully"
  8418. }
  8419. }
  8420. }
  8421. },
  8422. "400": {
  8423. "description": "BadRequest | InvalidRequestError",
  8424. "content": {
  8425. "application/json": {
  8426. "schema": {
  8427. "anyOf": [
  8428. {
  8429. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8430. },
  8431. {
  8432. "$ref": "#/components/schemas/InvalidRequestError"
  8433. }
  8434. ]
  8435. }
  8436. }
  8437. }
  8438. }
  8439. },
  8440. "description": "Append prompt to the TUI.",
  8441. "summary": "Append TUI prompt",
  8442. "requestBody": {
  8443. "content": {
  8444. "application/json": {
  8445. "schema": {
  8446. "type": "object",
  8447. "properties": {
  8448. "text": {
  8449. "type": "string"
  8450. }
  8451. },
  8452. "required": ["text"],
  8453. "additionalProperties": false
  8454. }
  8455. }
  8456. }
  8457. },
  8458. "x-codeSamples": [
  8459. {
  8460. "lang": "js",
  8461. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  8462. }
  8463. ]
  8464. }
  8465. },
  8466. "/tui/open-help": {
  8467. "post": {
  8468. "tags": ["tui"],
  8469. "operationId": "tui.openHelp",
  8470. "parameters": [
  8471. {
  8472. "name": "directory",
  8473. "in": "query",
  8474. "schema": {
  8475. "type": "string"
  8476. },
  8477. "required": false
  8478. },
  8479. {
  8480. "name": "workspace",
  8481. "in": "query",
  8482. "schema": {
  8483. "type": "string"
  8484. },
  8485. "required": false
  8486. }
  8487. ],
  8488. "responses": {
  8489. "200": {
  8490. "description": "Help dialog opened successfully",
  8491. "content": {
  8492. "application/json": {
  8493. "schema": {
  8494. "type": "boolean",
  8495. "description": "Help dialog opened successfully"
  8496. }
  8497. }
  8498. }
  8499. },
  8500. "400": {
  8501. "description": "Bad request",
  8502. "content": {
  8503. "application/json": {
  8504. "schema": {
  8505. "$ref": "#/components/schemas/BadRequestError"
  8506. }
  8507. }
  8508. }
  8509. }
  8510. },
  8511. "description": "Open the help dialog in the TUI to display user assistance information.",
  8512. "summary": "Open help dialog",
  8513. "x-codeSamples": [
  8514. {
  8515. "lang": "js",
  8516. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  8517. }
  8518. ]
  8519. }
  8520. },
  8521. "/tui/open-sessions": {
  8522. "post": {
  8523. "tags": ["tui"],
  8524. "operationId": "tui.openSessions",
  8525. "parameters": [
  8526. {
  8527. "name": "directory",
  8528. "in": "query",
  8529. "schema": {
  8530. "type": "string"
  8531. },
  8532. "required": false
  8533. },
  8534. {
  8535. "name": "workspace",
  8536. "in": "query",
  8537. "schema": {
  8538. "type": "string"
  8539. },
  8540. "required": false
  8541. }
  8542. ],
  8543. "responses": {
  8544. "200": {
  8545. "description": "Session dialog opened successfully",
  8546. "content": {
  8547. "application/json": {
  8548. "schema": {
  8549. "type": "boolean",
  8550. "description": "Session dialog opened successfully"
  8551. }
  8552. }
  8553. }
  8554. },
  8555. "400": {
  8556. "description": "Bad request",
  8557. "content": {
  8558. "application/json": {
  8559. "schema": {
  8560. "$ref": "#/components/schemas/BadRequestError"
  8561. }
  8562. }
  8563. }
  8564. }
  8565. },
  8566. "description": "Open the session dialog.",
  8567. "summary": "Open sessions dialog",
  8568. "x-codeSamples": [
  8569. {
  8570. "lang": "js",
  8571. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  8572. }
  8573. ]
  8574. }
  8575. },
  8576. "/tui/open-themes": {
  8577. "post": {
  8578. "tags": ["tui"],
  8579. "operationId": "tui.openThemes",
  8580. "parameters": [
  8581. {
  8582. "name": "directory",
  8583. "in": "query",
  8584. "schema": {
  8585. "type": "string"
  8586. },
  8587. "required": false
  8588. },
  8589. {
  8590. "name": "workspace",
  8591. "in": "query",
  8592. "schema": {
  8593. "type": "string"
  8594. },
  8595. "required": false
  8596. }
  8597. ],
  8598. "responses": {
  8599. "200": {
  8600. "description": "Theme dialog opened successfully",
  8601. "content": {
  8602. "application/json": {
  8603. "schema": {
  8604. "type": "boolean",
  8605. "description": "Theme dialog opened successfully"
  8606. }
  8607. }
  8608. }
  8609. },
  8610. "400": {
  8611. "description": "Bad request",
  8612. "content": {
  8613. "application/json": {
  8614. "schema": {
  8615. "$ref": "#/components/schemas/BadRequestError"
  8616. }
  8617. }
  8618. }
  8619. }
  8620. },
  8621. "description": "Open the theme dialog.",
  8622. "summary": "Open themes dialog",
  8623. "x-codeSamples": [
  8624. {
  8625. "lang": "js",
  8626. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  8627. }
  8628. ]
  8629. }
  8630. },
  8631. "/tui/open-models": {
  8632. "post": {
  8633. "tags": ["tui"],
  8634. "operationId": "tui.openModels",
  8635. "parameters": [
  8636. {
  8637. "name": "directory",
  8638. "in": "query",
  8639. "schema": {
  8640. "type": "string"
  8641. },
  8642. "required": false
  8643. },
  8644. {
  8645. "name": "workspace",
  8646. "in": "query",
  8647. "schema": {
  8648. "type": "string"
  8649. },
  8650. "required": false
  8651. }
  8652. ],
  8653. "responses": {
  8654. "200": {
  8655. "description": "Model dialog opened successfully",
  8656. "content": {
  8657. "application/json": {
  8658. "schema": {
  8659. "type": "boolean",
  8660. "description": "Model dialog opened successfully"
  8661. }
  8662. }
  8663. }
  8664. },
  8665. "400": {
  8666. "description": "Bad request",
  8667. "content": {
  8668. "application/json": {
  8669. "schema": {
  8670. "$ref": "#/components/schemas/BadRequestError"
  8671. }
  8672. }
  8673. }
  8674. }
  8675. },
  8676. "description": "Open the model dialog.",
  8677. "summary": "Open models dialog",
  8678. "x-codeSamples": [
  8679. {
  8680. "lang": "js",
  8681. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  8682. }
  8683. ]
  8684. }
  8685. },
  8686. "/tui/submit-prompt": {
  8687. "post": {
  8688. "tags": ["tui"],
  8689. "operationId": "tui.submitPrompt",
  8690. "parameters": [
  8691. {
  8692. "name": "directory",
  8693. "in": "query",
  8694. "schema": {
  8695. "type": "string"
  8696. },
  8697. "required": false
  8698. },
  8699. {
  8700. "name": "workspace",
  8701. "in": "query",
  8702. "schema": {
  8703. "type": "string"
  8704. },
  8705. "required": false
  8706. }
  8707. ],
  8708. "responses": {
  8709. "200": {
  8710. "description": "Prompt submitted successfully",
  8711. "content": {
  8712. "application/json": {
  8713. "schema": {
  8714. "type": "boolean",
  8715. "description": "Prompt submitted successfully"
  8716. }
  8717. }
  8718. }
  8719. },
  8720. "400": {
  8721. "description": "Bad request",
  8722. "content": {
  8723. "application/json": {
  8724. "schema": {
  8725. "$ref": "#/components/schemas/BadRequestError"
  8726. }
  8727. }
  8728. }
  8729. }
  8730. },
  8731. "description": "Submit the prompt.",
  8732. "summary": "Submit TUI prompt",
  8733. "x-codeSamples": [
  8734. {
  8735. "lang": "js",
  8736. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  8737. }
  8738. ]
  8739. }
  8740. },
  8741. "/tui/clear-prompt": {
  8742. "post": {
  8743. "tags": ["tui"],
  8744. "operationId": "tui.clearPrompt",
  8745. "parameters": [
  8746. {
  8747. "name": "directory",
  8748. "in": "query",
  8749. "schema": {
  8750. "type": "string"
  8751. },
  8752. "required": false
  8753. },
  8754. {
  8755. "name": "workspace",
  8756. "in": "query",
  8757. "schema": {
  8758. "type": "string"
  8759. },
  8760. "required": false
  8761. }
  8762. ],
  8763. "responses": {
  8764. "200": {
  8765. "description": "Prompt cleared successfully",
  8766. "content": {
  8767. "application/json": {
  8768. "schema": {
  8769. "type": "boolean",
  8770. "description": "Prompt cleared successfully"
  8771. }
  8772. }
  8773. }
  8774. },
  8775. "400": {
  8776. "description": "Bad request",
  8777. "content": {
  8778. "application/json": {
  8779. "schema": {
  8780. "$ref": "#/components/schemas/BadRequestError"
  8781. }
  8782. }
  8783. }
  8784. }
  8785. },
  8786. "description": "Clear the prompt.",
  8787. "summary": "Clear TUI prompt",
  8788. "x-codeSamples": [
  8789. {
  8790. "lang": "js",
  8791. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  8792. }
  8793. ]
  8794. }
  8795. },
  8796. "/tui/execute-command": {
  8797. "post": {
  8798. "tags": ["tui"],
  8799. "operationId": "tui.executeCommand",
  8800. "parameters": [
  8801. {
  8802. "name": "directory",
  8803. "in": "query",
  8804. "schema": {
  8805. "type": "string"
  8806. },
  8807. "required": false
  8808. },
  8809. {
  8810. "name": "workspace",
  8811. "in": "query",
  8812. "schema": {
  8813. "type": "string"
  8814. },
  8815. "required": false
  8816. }
  8817. ],
  8818. "responses": {
  8819. "200": {
  8820. "description": "Command executed successfully",
  8821. "content": {
  8822. "application/json": {
  8823. "schema": {
  8824. "type": "boolean",
  8825. "description": "Command executed successfully"
  8826. }
  8827. }
  8828. }
  8829. },
  8830. "400": {
  8831. "description": "BadRequest | InvalidRequestError",
  8832. "content": {
  8833. "application/json": {
  8834. "schema": {
  8835. "anyOf": [
  8836. {
  8837. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8838. },
  8839. {
  8840. "$ref": "#/components/schemas/InvalidRequestError"
  8841. }
  8842. ]
  8843. }
  8844. }
  8845. }
  8846. }
  8847. },
  8848. "description": "Execute a TUI command.",
  8849. "summary": "Execute TUI command",
  8850. "requestBody": {
  8851. "content": {
  8852. "application/json": {
  8853. "schema": {
  8854. "type": "object",
  8855. "properties": {
  8856. "command": {
  8857. "type": "string"
  8858. }
  8859. },
  8860. "required": ["command"],
  8861. "additionalProperties": false
  8862. }
  8863. }
  8864. }
  8865. },
  8866. "x-codeSamples": [
  8867. {
  8868. "lang": "js",
  8869. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  8870. }
  8871. ]
  8872. }
  8873. },
  8874. "/tui/show-toast": {
  8875. "post": {
  8876. "tags": ["tui"],
  8877. "operationId": "tui.showToast",
  8878. "parameters": [
  8879. {
  8880. "name": "directory",
  8881. "in": "query",
  8882. "schema": {
  8883. "type": "string"
  8884. },
  8885. "required": false
  8886. },
  8887. {
  8888. "name": "workspace",
  8889. "in": "query",
  8890. "schema": {
  8891. "type": "string"
  8892. },
  8893. "required": false
  8894. }
  8895. ],
  8896. "responses": {
  8897. "200": {
  8898. "description": "Toast notification shown successfully",
  8899. "content": {
  8900. "application/json": {
  8901. "schema": {
  8902. "type": "boolean",
  8903. "description": "Toast notification shown successfully"
  8904. }
  8905. }
  8906. }
  8907. },
  8908. "400": {
  8909. "description": "Bad request",
  8910. "content": {
  8911. "application/json": {
  8912. "schema": {
  8913. "$ref": "#/components/schemas/BadRequestError"
  8914. }
  8915. }
  8916. }
  8917. }
  8918. },
  8919. "description": "Show a toast notification in the TUI.",
  8920. "summary": "Show TUI toast",
  8921. "requestBody": {
  8922. "content": {
  8923. "application/json": {
  8924. "schema": {
  8925. "type": "object",
  8926. "properties": {
  8927. "title": {
  8928. "type": "string"
  8929. },
  8930. "message": {
  8931. "type": "string"
  8932. },
  8933. "variant": {
  8934. "type": "string",
  8935. "enum": ["info", "success", "warning", "error"]
  8936. },
  8937. "duration": {
  8938. "type": "integer",
  8939. "exclusiveMinimum": 0
  8940. }
  8941. },
  8942. "required": ["message", "variant"],
  8943. "additionalProperties": false
  8944. }
  8945. }
  8946. }
  8947. },
  8948. "x-codeSamples": [
  8949. {
  8950. "lang": "js",
  8951. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  8952. }
  8953. ]
  8954. }
  8955. },
  8956. "/tui/publish": {
  8957. "post": {
  8958. "tags": ["tui"],
  8959. "operationId": "tui.publish",
  8960. "parameters": [
  8961. {
  8962. "name": "directory",
  8963. "in": "query",
  8964. "schema": {
  8965. "type": "string"
  8966. },
  8967. "required": false
  8968. },
  8969. {
  8970. "name": "workspace",
  8971. "in": "query",
  8972. "schema": {
  8973. "type": "string"
  8974. },
  8975. "required": false
  8976. }
  8977. ],
  8978. "responses": {
  8979. "200": {
  8980. "description": "Event published successfully",
  8981. "content": {
  8982. "application/json": {
  8983. "schema": {
  8984. "type": "boolean",
  8985. "description": "Event published successfully"
  8986. }
  8987. }
  8988. }
  8989. },
  8990. "400": {
  8991. "description": "BadRequest | InvalidRequestError",
  8992. "content": {
  8993. "application/json": {
  8994. "schema": {
  8995. "anyOf": [
  8996. {
  8997. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  8998. },
  8999. {
  9000. "$ref": "#/components/schemas/InvalidRequestError"
  9001. }
  9002. ]
  9003. }
  9004. }
  9005. }
  9006. }
  9007. },
  9008. "description": "Publish a TUI event.",
  9009. "summary": "Publish TUI event",
  9010. "requestBody": {
  9011. "content": {
  9012. "application/json": {
  9013. "schema": {
  9014. "anyOf": [
  9015. {
  9016. "$ref": "#/components/schemas/EventTuiPromptAppend"
  9017. },
  9018. {
  9019. "$ref": "#/components/schemas/EventTuiCommandExecute"
  9020. },
  9021. {
  9022. "$ref": "#/components/schemas/EventTuiToastShow"
  9023. },
  9024. {
  9025. "$ref": "#/components/schemas/EventTuiSessionSelect"
  9026. }
  9027. ]
  9028. }
  9029. }
  9030. }
  9031. },
  9032. "x-codeSamples": [
  9033. {
  9034. "lang": "js",
  9035. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  9036. }
  9037. ]
  9038. }
  9039. },
  9040. "/tui/select-session": {
  9041. "post": {
  9042. "tags": ["tui"],
  9043. "operationId": "tui.selectSession",
  9044. "parameters": [
  9045. {
  9046. "name": "directory",
  9047. "in": "query",
  9048. "schema": {
  9049. "type": "string"
  9050. },
  9051. "required": false
  9052. },
  9053. {
  9054. "name": "workspace",
  9055. "in": "query",
  9056. "schema": {
  9057. "type": "string"
  9058. },
  9059. "required": false
  9060. }
  9061. ],
  9062. "responses": {
  9063. "200": {
  9064. "description": "Session selected successfully",
  9065. "content": {
  9066. "application/json": {
  9067. "schema": {
  9068. "type": "boolean",
  9069. "description": "Session selected successfully"
  9070. }
  9071. }
  9072. }
  9073. },
  9074. "400": {
  9075. "description": "BadRequest | InvalidRequestError",
  9076. "content": {
  9077. "application/json": {
  9078. "schema": {
  9079. "anyOf": [
  9080. {
  9081. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9082. },
  9083. {
  9084. "$ref": "#/components/schemas/InvalidRequestError"
  9085. }
  9086. ]
  9087. }
  9088. }
  9089. }
  9090. },
  9091. "404": {
  9092. "description": "NotFoundError",
  9093. "content": {
  9094. "application/json": {
  9095. "schema": {
  9096. "$ref": "#/components/schemas/NotFoundError"
  9097. }
  9098. }
  9099. }
  9100. }
  9101. },
  9102. "description": "Navigate the TUI to display the specified session.",
  9103. "summary": "Select session",
  9104. "requestBody": {
  9105. "content": {
  9106. "application/json": {
  9107. "schema": {
  9108. "type": "object",
  9109. "properties": {
  9110. "sessionID": {
  9111. "type": "string",
  9112. "pattern": "^ses",
  9113. "description": "Session ID to navigate to"
  9114. }
  9115. },
  9116. "required": ["sessionID"],
  9117. "additionalProperties": false
  9118. }
  9119. }
  9120. }
  9121. },
  9122. "x-codeSamples": [
  9123. {
  9124. "lang": "js",
  9125. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  9126. }
  9127. ]
  9128. }
  9129. },
  9130. "/tui/control/next": {
  9131. "get": {
  9132. "tags": ["tui"],
  9133. "operationId": "tui.control.next",
  9134. "parameters": [
  9135. {
  9136. "name": "directory",
  9137. "in": "query",
  9138. "schema": {
  9139. "type": "string"
  9140. },
  9141. "required": false
  9142. },
  9143. {
  9144. "name": "workspace",
  9145. "in": "query",
  9146. "schema": {
  9147. "type": "string"
  9148. },
  9149. "required": false
  9150. }
  9151. ],
  9152. "responses": {
  9153. "200": {
  9154. "description": "Next TUI request",
  9155. "content": {
  9156. "application/json": {
  9157. "schema": {
  9158. "type": "object",
  9159. "properties": {
  9160. "path": {
  9161. "type": "string"
  9162. },
  9163. "body": {}
  9164. },
  9165. "required": ["path", "body"],
  9166. "additionalProperties": false,
  9167. "description": "Next TUI request"
  9168. }
  9169. }
  9170. }
  9171. },
  9172. "400": {
  9173. "description": "Bad request",
  9174. "content": {
  9175. "application/json": {
  9176. "schema": {
  9177. "$ref": "#/components/schemas/BadRequestError"
  9178. }
  9179. }
  9180. }
  9181. }
  9182. },
  9183. "description": "Retrieve the next TUI request from the queue for processing.",
  9184. "summary": "Get next TUI request",
  9185. "x-codeSamples": [
  9186. {
  9187. "lang": "js",
  9188. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  9189. }
  9190. ]
  9191. }
  9192. },
  9193. "/tui/control/response": {
  9194. "post": {
  9195. "tags": ["tui"],
  9196. "operationId": "tui.control.response",
  9197. "parameters": [
  9198. {
  9199. "name": "directory",
  9200. "in": "query",
  9201. "schema": {
  9202. "type": "string"
  9203. },
  9204. "required": false
  9205. },
  9206. {
  9207. "name": "workspace",
  9208. "in": "query",
  9209. "schema": {
  9210. "type": "string"
  9211. },
  9212. "required": false
  9213. }
  9214. ],
  9215. "responses": {
  9216. "200": {
  9217. "description": "Response submitted successfully",
  9218. "content": {
  9219. "application/json": {
  9220. "schema": {
  9221. "type": "boolean",
  9222. "description": "Response submitted successfully"
  9223. }
  9224. }
  9225. }
  9226. },
  9227. "400": {
  9228. "description": "Bad request",
  9229. "content": {
  9230. "application/json": {
  9231. "schema": {
  9232. "$ref": "#/components/schemas/BadRequestError"
  9233. }
  9234. }
  9235. }
  9236. }
  9237. },
  9238. "description": "Submit a response to the TUI request queue to complete a pending request.",
  9239. "summary": "Submit TUI response",
  9240. "requestBody": {
  9241. "content": {
  9242. "application/json": {
  9243. "schema": {}
  9244. }
  9245. }
  9246. },
  9247. "x-codeSamples": [
  9248. {
  9249. "lang": "js",
  9250. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  9251. }
  9252. ]
  9253. }
  9254. },
  9255. "/experimental/workspace/adapter": {
  9256. "get": {
  9257. "tags": ["workspace"],
  9258. "operationId": "experimental.workspace.adapter.list",
  9259. "parameters": [
  9260. {
  9261. "name": "directory",
  9262. "in": "query",
  9263. "schema": {
  9264. "type": "string"
  9265. },
  9266. "required": false
  9267. },
  9268. {
  9269. "name": "workspace",
  9270. "in": "query",
  9271. "schema": {
  9272. "type": "string"
  9273. },
  9274. "required": false
  9275. }
  9276. ],
  9277. "responses": {
  9278. "200": {
  9279. "description": "Workspace adapters",
  9280. "content": {
  9281. "application/json": {
  9282. "schema": {
  9283. "type": "array",
  9284. "items": {
  9285. "type": "object",
  9286. "properties": {
  9287. "type": {
  9288. "type": "string"
  9289. },
  9290. "name": {
  9291. "type": "string"
  9292. },
  9293. "description": {
  9294. "type": "string"
  9295. }
  9296. },
  9297. "required": ["type", "name", "description"],
  9298. "additionalProperties": false
  9299. },
  9300. "description": "Workspace adapters"
  9301. }
  9302. }
  9303. }
  9304. },
  9305. "400": {
  9306. "description": "Bad request",
  9307. "content": {
  9308. "application/json": {
  9309. "schema": {
  9310. "$ref": "#/components/schemas/BadRequestError"
  9311. }
  9312. }
  9313. }
  9314. }
  9315. },
  9316. "description": "List all available workspace adapters for the current project.",
  9317. "summary": "List workspace adapters",
  9318. "x-codeSamples": [
  9319. {
  9320. "lang": "js",
  9321. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  9322. }
  9323. ]
  9324. }
  9325. },
  9326. "/experimental/workspace": {
  9327. "get": {
  9328. "tags": ["workspace"],
  9329. "operationId": "experimental.workspace.list",
  9330. "parameters": [
  9331. {
  9332. "name": "directory",
  9333. "in": "query",
  9334. "schema": {
  9335. "type": "string"
  9336. },
  9337. "required": false
  9338. },
  9339. {
  9340. "name": "workspace",
  9341. "in": "query",
  9342. "schema": {
  9343. "type": "string"
  9344. },
  9345. "required": false
  9346. }
  9347. ],
  9348. "responses": {
  9349. "200": {
  9350. "description": "Workspaces",
  9351. "content": {
  9352. "application/json": {
  9353. "schema": {
  9354. "type": "array",
  9355. "items": {
  9356. "$ref": "#/components/schemas/Workspace"
  9357. },
  9358. "description": "Workspaces"
  9359. }
  9360. }
  9361. }
  9362. },
  9363. "400": {
  9364. "description": "Bad request",
  9365. "content": {
  9366. "application/json": {
  9367. "schema": {
  9368. "$ref": "#/components/schemas/BadRequestError"
  9369. }
  9370. }
  9371. }
  9372. }
  9373. },
  9374. "description": "List all workspaces.",
  9375. "summary": "List workspaces",
  9376. "x-codeSamples": [
  9377. {
  9378. "lang": "js",
  9379. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  9380. }
  9381. ]
  9382. },
  9383. "post": {
  9384. "tags": ["workspace"],
  9385. "operationId": "experimental.workspace.create",
  9386. "parameters": [
  9387. {
  9388. "name": "directory",
  9389. "in": "query",
  9390. "schema": {
  9391. "type": "string"
  9392. },
  9393. "required": false
  9394. },
  9395. {
  9396. "name": "workspace",
  9397. "in": "query",
  9398. "schema": {
  9399. "type": "string"
  9400. },
  9401. "required": false
  9402. }
  9403. ],
  9404. "responses": {
  9405. "200": {
  9406. "description": "Workspace created",
  9407. "content": {
  9408. "application/json": {
  9409. "schema": {
  9410. "$ref": "#/components/schemas/Workspace"
  9411. }
  9412. }
  9413. }
  9414. },
  9415. "400": {
  9416. "description": "WorkspaceCreateError | BadRequest | InvalidRequestError",
  9417. "content": {
  9418. "application/json": {
  9419. "schema": {
  9420. "anyOf": [
  9421. {
  9422. "$ref": "#/components/schemas/WorkspaceCreateError"
  9423. },
  9424. {
  9425. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9426. },
  9427. {
  9428. "$ref": "#/components/schemas/InvalidRequestError"
  9429. }
  9430. ]
  9431. }
  9432. }
  9433. }
  9434. }
  9435. },
  9436. "description": "Create a workspace for the current project.",
  9437. "summary": "Create workspace",
  9438. "requestBody": {
  9439. "content": {
  9440. "application/json": {
  9441. "schema": {
  9442. "type": "object",
  9443. "properties": {
  9444. "id": {
  9445. "type": "string",
  9446. "pattern": "^wrk"
  9447. },
  9448. "type": {
  9449. "type": "string"
  9450. },
  9451. "branch": {
  9452. "anyOf": [
  9453. {
  9454. "type": "string"
  9455. },
  9456. {
  9457. "type": "null"
  9458. }
  9459. ]
  9460. },
  9461. "extra": {
  9462. "anyOf": [
  9463. {},
  9464. {
  9465. "type": "null"
  9466. }
  9467. ]
  9468. }
  9469. },
  9470. "required": ["type"],
  9471. "additionalProperties": false
  9472. }
  9473. }
  9474. }
  9475. },
  9476. "x-codeSamples": [
  9477. {
  9478. "lang": "js",
  9479. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  9480. }
  9481. ]
  9482. }
  9483. },
  9484. "/experimental/workspace/sync-list": {
  9485. "post": {
  9486. "tags": ["workspace"],
  9487. "operationId": "experimental.workspace.syncList",
  9488. "parameters": [
  9489. {
  9490. "name": "directory",
  9491. "in": "query",
  9492. "schema": {
  9493. "type": "string"
  9494. },
  9495. "required": false
  9496. },
  9497. {
  9498. "name": "workspace",
  9499. "in": "query",
  9500. "schema": {
  9501. "type": "string"
  9502. },
  9503. "required": false
  9504. }
  9505. ],
  9506. "responses": {
  9507. "204": {
  9508. "description": "Workspace list synced"
  9509. },
  9510. "400": {
  9511. "description": "Bad request",
  9512. "content": {
  9513. "application/json": {
  9514. "schema": {
  9515. "$ref": "#/components/schemas/BadRequestError"
  9516. }
  9517. }
  9518. }
  9519. }
  9520. },
  9521. "description": "Register missing workspaces returned by workspace adapters.",
  9522. "summary": "Sync workspace list",
  9523. "x-codeSamples": [
  9524. {
  9525. "lang": "js",
  9526. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  9527. }
  9528. ]
  9529. }
  9530. },
  9531. "/experimental/workspace/status": {
  9532. "get": {
  9533. "tags": ["workspace"],
  9534. "operationId": "experimental.workspace.status",
  9535. "parameters": [
  9536. {
  9537. "name": "directory",
  9538. "in": "query",
  9539. "schema": {
  9540. "type": "string"
  9541. },
  9542. "required": false
  9543. },
  9544. {
  9545. "name": "workspace",
  9546. "in": "query",
  9547. "schema": {
  9548. "type": "string"
  9549. },
  9550. "required": false
  9551. }
  9552. ],
  9553. "responses": {
  9554. "200": {
  9555. "description": "Workspace status",
  9556. "content": {
  9557. "application/json": {
  9558. "schema": {
  9559. "type": "array",
  9560. "items": {
  9561. "type": "object",
  9562. "properties": {
  9563. "workspaceID": {
  9564. "type": "string",
  9565. "pattern": "^wrk"
  9566. },
  9567. "status": {
  9568. "type": "string",
  9569. "enum": ["connected", "connecting", "disconnected", "error"]
  9570. }
  9571. },
  9572. "required": ["workspaceID", "status"],
  9573. "additionalProperties": false
  9574. },
  9575. "description": "Workspace status"
  9576. }
  9577. }
  9578. }
  9579. },
  9580. "400": {
  9581. "description": "Bad request",
  9582. "content": {
  9583. "application/json": {
  9584. "schema": {
  9585. "$ref": "#/components/schemas/BadRequestError"
  9586. }
  9587. }
  9588. }
  9589. }
  9590. },
  9591. "description": "Get connection status for workspaces in the current project.",
  9592. "summary": "Workspace status",
  9593. "x-codeSamples": [
  9594. {
  9595. "lang": "js",
  9596. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  9597. }
  9598. ]
  9599. }
  9600. },
  9601. "/experimental/workspace/{id}": {
  9602. "delete": {
  9603. "tags": ["workspace"],
  9604. "operationId": "experimental.workspace.remove",
  9605. "parameters": [
  9606. {
  9607. "name": "id",
  9608. "in": "path",
  9609. "schema": {
  9610. "type": "string",
  9611. "pattern": "^wrk"
  9612. },
  9613. "required": true
  9614. },
  9615. {
  9616. "name": "directory",
  9617. "in": "query",
  9618. "schema": {
  9619. "type": "string"
  9620. },
  9621. "required": false
  9622. },
  9623. {
  9624. "name": "workspace",
  9625. "in": "query",
  9626. "schema": {
  9627. "type": "string"
  9628. },
  9629. "required": false
  9630. }
  9631. ],
  9632. "responses": {
  9633. "200": {
  9634. "description": "Workspace removed",
  9635. "content": {
  9636. "application/json": {
  9637. "schema": {
  9638. "$ref": "#/components/schemas/Workspace"
  9639. }
  9640. }
  9641. }
  9642. },
  9643. "400": {
  9644. "description": "BadRequest | InvalidRequestError",
  9645. "content": {
  9646. "application/json": {
  9647. "schema": {
  9648. "anyOf": [
  9649. {
  9650. "$ref": "#/components/schemas/effect_HttpApiError_BadRequest"
  9651. },
  9652. {
  9653. "$ref": "#/components/schemas/InvalidRequestError"
  9654. }
  9655. ]
  9656. }
  9657. }
  9658. }
  9659. }
  9660. },
  9661. "description": "Remove an existing workspace.",
  9662. "summary": "Remove workspace",
  9663. "x-codeSamples": [
  9664. {
  9665. "lang": "js",
  9666. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  9667. }
  9668. ]
  9669. }
  9670. },
  9671. "/experimental/workspace/warp": {
  9672. "post": {
  9673. "tags": ["workspace"],
  9674. "operationId": "experimental.workspace.warp",
  9675. "parameters": [
  9676. {
  9677. "name": "directory",
  9678. "in": "query",
  9679. "schema": {
  9680. "type": "string"
  9681. },
  9682. "required": false
  9683. },
  9684. {
  9685. "name": "workspace",
  9686. "in": "query",
  9687. "schema": {
  9688. "type": "string"
  9689. },
  9690. "required": false
  9691. }
  9692. ],
  9693. "responses": {
  9694. "204": {
  9695. "description": "Session warped"
  9696. },
  9697. "400": {
  9698. "description": "WorkspaceWarpError | VcsApplyError | InvalidRequestError",
  9699. "content": {
  9700. "application/json": {
  9701. "schema": {
  9702. "anyOf": [
  9703. {
  9704. "$ref": "#/components/schemas/WorkspaceWarpError"
  9705. },
  9706. {
  9707. "$ref": "#/components/schemas/VcsApplyError"
  9708. },
  9709. {
  9710. "$ref": "#/components/schemas/InvalidRequestError"
  9711. }
  9712. ]
  9713. }
  9714. }
  9715. }
  9716. },
  9717. "404": {
  9718. "description": "NotFoundError",
  9719. "content": {
  9720. "application/json": {
  9721. "schema": {
  9722. "$ref": "#/components/schemas/NotFoundError"
  9723. }
  9724. }
  9725. }
  9726. }
  9727. },
  9728. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  9729. "summary": "Warp session into workspace",
  9730. "requestBody": {
  9731. "content": {
  9732. "application/json": {
  9733. "schema": {
  9734. "type": "object",
  9735. "properties": {
  9736. "id": {
  9737. "anyOf": [
  9738. {
  9739. "type": "string",
  9740. "pattern": "^wrk"
  9741. },
  9742. {
  9743. "type": "null"
  9744. }
  9745. ]
  9746. },
  9747. "sessionID": {
  9748. "type": "string",
  9749. "pattern": "^ses"
  9750. },
  9751. "copyChanges": {
  9752. "type": "boolean"
  9753. }
  9754. },
  9755. "required": ["id", "sessionID"],
  9756. "additionalProperties": false
  9757. }
  9758. }
  9759. }
  9760. },
  9761. "x-codeSamples": [
  9762. {
  9763. "lang": "js",
  9764. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  9765. }
  9766. ]
  9767. }
  9768. },
  9769. "/api/health": {
  9770. "get": {
  9771. "tags": ["opencode HttpApi"],
  9772. "operationId": "v2.health.get",
  9773. "parameters": [],
  9774. "security": [],
  9775. "responses": {
  9776. "200": {
  9777. "description": "Success",
  9778. "content": {
  9779. "application/json": {
  9780. "schema": {
  9781. "type": "object",
  9782. "properties": {
  9783. "healthy": {
  9784. "type": "boolean",
  9785. "enum": [true]
  9786. }
  9787. },
  9788. "required": ["healthy"],
  9789. "additionalProperties": false
  9790. }
  9791. }
  9792. }
  9793. },
  9794. "400": {
  9795. "description": "InvalidRequestError",
  9796. "content": {
  9797. "application/json": {
  9798. "schema": {
  9799. "$ref": "#/components/schemas/InvalidRequestError"
  9800. }
  9801. }
  9802. }
  9803. },
  9804. "401": {
  9805. "description": "UnauthorizedError",
  9806. "content": {
  9807. "application/json": {
  9808. "schema": {
  9809. "$ref": "#/components/schemas/UnauthorizedError"
  9810. }
  9811. }
  9812. }
  9813. }
  9814. },
  9815. "description": "Check whether the API server is ready to accept requests.",
  9816. "summary": "Check server health",
  9817. "x-codeSamples": [
  9818. {
  9819. "lang": "js",
  9820. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.health.get({\n ...\n})"
  9821. }
  9822. ]
  9823. }
  9824. },
  9825. "/api/location": {
  9826. "get": {
  9827. "tags": ["opencode HttpApi"],
  9828. "operationId": "v2.location.get",
  9829. "parameters": [
  9830. {
  9831. "name": "location",
  9832. "in": "query",
  9833. "schema": {
  9834. "type": "object",
  9835. "properties": {
  9836. "directory": {
  9837. "type": "string"
  9838. },
  9839. "workspace": {
  9840. "type": "string"
  9841. }
  9842. },
  9843. "additionalProperties": false
  9844. },
  9845. "required": false,
  9846. "style": "deepObject",
  9847. "explode": true
  9848. }
  9849. ],
  9850. "security": [],
  9851. "responses": {
  9852. "200": {
  9853. "description": "Location.Info",
  9854. "content": {
  9855. "application/json": {
  9856. "schema": {
  9857. "$ref": "#/components/schemas/LocationInfo"
  9858. }
  9859. }
  9860. }
  9861. },
  9862. "400": {
  9863. "description": "InvalidRequestError",
  9864. "content": {
  9865. "application/json": {
  9866. "schema": {
  9867. "$ref": "#/components/schemas/InvalidRequestError"
  9868. }
  9869. }
  9870. }
  9871. },
  9872. "401": {
  9873. "description": "UnauthorizedError",
  9874. "content": {
  9875. "application/json": {
  9876. "schema": {
  9877. "$ref": "#/components/schemas/UnauthorizedError"
  9878. }
  9879. }
  9880. }
  9881. }
  9882. },
  9883. "description": "Resolve the requested location or the server default location.",
  9884. "summary": "Get location",
  9885. "x-codeSamples": [
  9886. {
  9887. "lang": "js",
  9888. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.location.get({\n ...\n})"
  9889. }
  9890. ]
  9891. }
  9892. },
  9893. "/api/agent": {
  9894. "get": {
  9895. "tags": ["opencode HttpApi"],
  9896. "operationId": "v2.agent.list",
  9897. "parameters": [
  9898. {
  9899. "name": "location",
  9900. "in": "query",
  9901. "schema": {
  9902. "type": "object",
  9903. "properties": {
  9904. "directory": {
  9905. "type": "string"
  9906. },
  9907. "workspace": {
  9908. "type": "string"
  9909. }
  9910. },
  9911. "additionalProperties": false
  9912. },
  9913. "required": false,
  9914. "style": "deepObject",
  9915. "explode": true
  9916. }
  9917. ],
  9918. "security": [],
  9919. "responses": {
  9920. "200": {
  9921. "description": "Success",
  9922. "content": {
  9923. "application/json": {
  9924. "schema": {
  9925. "type": "object",
  9926. "properties": {
  9927. "location": {
  9928. "$ref": "#/components/schemas/LocationInfo"
  9929. },
  9930. "data": {
  9931. "type": "array",
  9932. "items": {
  9933. "$ref": "#/components/schemas/AgentV2Info"
  9934. }
  9935. }
  9936. },
  9937. "required": ["location", "data"],
  9938. "additionalProperties": false
  9939. }
  9940. }
  9941. }
  9942. },
  9943. "400": {
  9944. "description": "InvalidRequestError",
  9945. "content": {
  9946. "application/json": {
  9947. "schema": {
  9948. "$ref": "#/components/schemas/InvalidRequestError"
  9949. }
  9950. }
  9951. }
  9952. },
  9953. "401": {
  9954. "description": "UnauthorizedError",
  9955. "content": {
  9956. "application/json": {
  9957. "schema": {
  9958. "$ref": "#/components/schemas/UnauthorizedError"
  9959. }
  9960. }
  9961. }
  9962. }
  9963. },
  9964. "description": "Retrieve currently registered agents.",
  9965. "summary": "List agents",
  9966. "x-codeSamples": [
  9967. {
  9968. "lang": "js",
  9969. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.agent.list({\n ...\n})"
  9970. }
  9971. ]
  9972. }
  9973. },
  9974. "/api/session": {
  9975. "get": {
  9976. "tags": ["sessions"],
  9977. "operationId": "v2.session.list",
  9978. "parameters": [
  9979. {
  9980. "name": "workspace",
  9981. "in": "query",
  9982. "schema": {
  9983. "type": "string",
  9984. "pattern": "^wrk"
  9985. },
  9986. "required": false
  9987. },
  9988. {
  9989. "name": "limit",
  9990. "in": "query",
  9991. "schema": {
  9992. "type": "number"
  9993. },
  9994. "required": false
  9995. },
  9996. {
  9997. "name": "order",
  9998. "in": "query",
  9999. "schema": {
  10000. "type": "string",
  10001. "enum": ["asc", "desc"]
  10002. },
  10003. "required": false
  10004. },
  10005. {
  10006. "name": "search",
  10007. "in": "query",
  10008. "schema": {
  10009. "type": "string"
  10010. },
  10011. "required": false
  10012. },
  10013. {
  10014. "name": "directory",
  10015. "in": "query",
  10016. "schema": {
  10017. "type": "string"
  10018. },
  10019. "required": false
  10020. },
  10021. {
  10022. "name": "project",
  10023. "in": "query",
  10024. "schema": {
  10025. "type": "string"
  10026. },
  10027. "required": false
  10028. },
  10029. {
  10030. "name": "subpath",
  10031. "in": "query",
  10032. "schema": {
  10033. "type": "string"
  10034. },
  10035. "required": false
  10036. },
  10037. {
  10038. "name": "cursor",
  10039. "in": "query",
  10040. "schema": {
  10041. "type": "string",
  10042. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response."
  10043. },
  10044. "required": false
  10045. }
  10046. ],
  10047. "security": [],
  10048. "responses": {
  10049. "200": {
  10050. "description": "SessionsResponse",
  10051. "content": {
  10052. "application/json": {
  10053. "schema": {
  10054. "$ref": "#/components/schemas/SessionsResponse"
  10055. }
  10056. }
  10057. }
  10058. },
  10059. "400": {
  10060. "description": "InvalidCursorError | InvalidRequestError",
  10061. "content": {
  10062. "application/json": {
  10063. "schema": {
  10064. "anyOf": [
  10065. {
  10066. "$ref": "#/components/schemas/InvalidCursorError"
  10067. },
  10068. {
  10069. "$ref": "#/components/schemas/InvalidRequestError"
  10070. },
  10071. {
  10072. "$ref": "#/components/schemas/InvalidRequestError"
  10073. }
  10074. ]
  10075. }
  10076. }
  10077. }
  10078. },
  10079. "401": {
  10080. "description": "UnauthorizedError",
  10081. "content": {
  10082. "application/json": {
  10083. "schema": {
  10084. "$ref": "#/components/schemas/UnauthorizedError"
  10085. }
  10086. }
  10087. }
  10088. }
  10089. },
  10090. "description": "Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.",
  10091. "summary": "List sessions",
  10092. "x-codeSamples": [
  10093. {
  10094. "lang": "js",
  10095. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  10096. }
  10097. ]
  10098. },
  10099. "post": {
  10100. "tags": ["sessions"],
  10101. "operationId": "v2.session.create",
  10102. "parameters": [],
  10103. "security": [],
  10104. "responses": {
  10105. "200": {
  10106. "description": "Success",
  10107. "content": {
  10108. "application/json": {
  10109. "schema": {
  10110. "type": "object",
  10111. "properties": {
  10112. "data": {
  10113. "$ref": "#/components/schemas/SessionV2Info"
  10114. }
  10115. },
  10116. "required": ["data"],
  10117. "additionalProperties": false
  10118. }
  10119. }
  10120. }
  10121. },
  10122. "400": {
  10123. "description": "InvalidRequestError",
  10124. "content": {
  10125. "application/json": {
  10126. "schema": {
  10127. "$ref": "#/components/schemas/InvalidRequestError"
  10128. }
  10129. }
  10130. }
  10131. },
  10132. "401": {
  10133. "description": "UnauthorizedError",
  10134. "content": {
  10135. "application/json": {
  10136. "schema": {
  10137. "$ref": "#/components/schemas/UnauthorizedError"
  10138. }
  10139. }
  10140. }
  10141. }
  10142. },
  10143. "description": "Create a session at the requested location.",
  10144. "summary": "Create session",
  10145. "requestBody": {
  10146. "content": {
  10147. "application/json": {
  10148. "schema": {
  10149. "type": "object",
  10150. "properties": {
  10151. "id": {
  10152. "type": "string",
  10153. "pattern": "^ses"
  10154. },
  10155. "agent": {
  10156. "type": "string"
  10157. },
  10158. "model": {
  10159. "type": "object",
  10160. "properties": {
  10161. "id": {
  10162. "type": "string"
  10163. },
  10164. "providerID": {
  10165. "type": "string"
  10166. },
  10167. "variant": {
  10168. "type": "string"
  10169. }
  10170. },
  10171. "required": ["id", "providerID"],
  10172. "additionalProperties": false
  10173. },
  10174. "location": {
  10175. "$ref": "#/components/schemas/LocationRef"
  10176. }
  10177. },
  10178. "additionalProperties": false
  10179. }
  10180. }
  10181. },
  10182. "required": true
  10183. },
  10184. "x-codeSamples": [
  10185. {
  10186. "lang": "js",
  10187. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.create({\n ...\n})"
  10188. }
  10189. ]
  10190. }
  10191. },
  10192. "/api/session/{sessionID}": {
  10193. "get": {
  10194. "tags": ["sessions"],
  10195. "operationId": "v2.session.get",
  10196. "parameters": [
  10197. {
  10198. "name": "sessionID",
  10199. "in": "path",
  10200. "schema": {
  10201. "type": "string",
  10202. "pattern": "^ses"
  10203. },
  10204. "required": true
  10205. }
  10206. ],
  10207. "security": [],
  10208. "responses": {
  10209. "200": {
  10210. "description": "Success",
  10211. "content": {
  10212. "application/json": {
  10213. "schema": {
  10214. "type": "object",
  10215. "properties": {
  10216. "data": {
  10217. "$ref": "#/components/schemas/SessionV2Info"
  10218. }
  10219. },
  10220. "required": ["data"],
  10221. "additionalProperties": false
  10222. }
  10223. }
  10224. }
  10225. },
  10226. "400": {
  10227. "description": "InvalidRequestError",
  10228. "content": {
  10229. "application/json": {
  10230. "schema": {
  10231. "$ref": "#/components/schemas/InvalidRequestError"
  10232. }
  10233. }
  10234. }
  10235. },
  10236. "401": {
  10237. "description": "UnauthorizedError",
  10238. "content": {
  10239. "application/json": {
  10240. "schema": {
  10241. "$ref": "#/components/schemas/UnauthorizedError"
  10242. }
  10243. }
  10244. }
  10245. },
  10246. "404": {
  10247. "description": "SessionNotFoundError",
  10248. "content": {
  10249. "application/json": {
  10250. "schema": {
  10251. "anyOf": [
  10252. {
  10253. "$ref": "#/components/schemas/SessionNotFoundError"
  10254. },
  10255. {
  10256. "$ref": "#/components/schemas/SessionNotFoundError"
  10257. }
  10258. ]
  10259. }
  10260. }
  10261. }
  10262. }
  10263. },
  10264. "description": "Retrieve a session by ID.",
  10265. "summary": "Get session",
  10266. "x-codeSamples": [
  10267. {
  10268. "lang": "js",
  10269. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.get({\n ...\n})"
  10270. }
  10271. ]
  10272. }
  10273. },
  10274. "/api/session/{sessionID}/prompt": {
  10275. "post": {
  10276. "tags": ["sessions"],
  10277. "operationId": "v2.session.prompt",
  10278. "parameters": [
  10279. {
  10280. "name": "sessionID",
  10281. "in": "path",
  10282. "schema": {
  10283. "type": "string",
  10284. "pattern": "^ses"
  10285. },
  10286. "required": true
  10287. }
  10288. ],
  10289. "security": [],
  10290. "responses": {
  10291. "200": {
  10292. "description": "Success",
  10293. "content": {
  10294. "application/json": {
  10295. "schema": {
  10296. "type": "object",
  10297. "properties": {
  10298. "data": {
  10299. "$ref": "#/components/schemas/SessionInputAdmitted"
  10300. }
  10301. },
  10302. "required": ["data"],
  10303. "additionalProperties": false
  10304. }
  10305. }
  10306. }
  10307. },
  10308. "400": {
  10309. "description": "InvalidRequestError",
  10310. "content": {
  10311. "application/json": {
  10312. "schema": {
  10313. "$ref": "#/components/schemas/InvalidRequestError"
  10314. }
  10315. }
  10316. }
  10317. },
  10318. "401": {
  10319. "description": "UnauthorizedError",
  10320. "content": {
  10321. "application/json": {
  10322. "schema": {
  10323. "$ref": "#/components/schemas/UnauthorizedError"
  10324. }
  10325. }
  10326. }
  10327. },
  10328. "404": {
  10329. "description": "SessionNotFoundError",
  10330. "content": {
  10331. "application/json": {
  10332. "schema": {
  10333. "anyOf": [
  10334. {
  10335. "$ref": "#/components/schemas/SessionNotFoundError"
  10336. },
  10337. {
  10338. "$ref": "#/components/schemas/SessionNotFoundError"
  10339. }
  10340. ]
  10341. }
  10342. }
  10343. }
  10344. },
  10345. "409": {
  10346. "description": "ConflictError",
  10347. "content": {
  10348. "application/json": {
  10349. "schema": {
  10350. "$ref": "#/components/schemas/ConflictError"
  10351. }
  10352. }
  10353. }
  10354. }
  10355. },
  10356. "description": "Durably admit one session input and schedule agent-loop execution unless resume is false.",
  10357. "summary": "Send message",
  10358. "requestBody": {
  10359. "content": {
  10360. "application/json": {
  10361. "schema": {
  10362. "type": "object",
  10363. "properties": {
  10364. "id": {
  10365. "type": "string",
  10366. "pattern": "^msg_"
  10367. },
  10368. "prompt": {
  10369. "$ref": "#/components/schemas/Prompt"
  10370. },
  10371. "delivery": {
  10372. "type": "string",
  10373. "enum": ["steer", "queue"]
  10374. },
  10375. "resume": {
  10376. "type": "boolean"
  10377. }
  10378. },
  10379. "required": ["prompt"],
  10380. "additionalProperties": false
  10381. }
  10382. }
  10383. },
  10384. "required": true
  10385. },
  10386. "x-codeSamples": [
  10387. {
  10388. "lang": "js",
  10389. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  10390. }
  10391. ]
  10392. }
  10393. },
  10394. "/api/session/{sessionID}/compact": {
  10395. "post": {
  10396. "tags": ["sessions"],
  10397. "operationId": "v2.session.compact",
  10398. "parameters": [
  10399. {
  10400. "name": "sessionID",
  10401. "in": "path",
  10402. "schema": {
  10403. "type": "string",
  10404. "pattern": "^ses"
  10405. },
  10406. "required": true
  10407. }
  10408. ],
  10409. "security": [],
  10410. "responses": {
  10411. "204": {
  10412. "description": "<No Content>"
  10413. },
  10414. "400": {
  10415. "description": "InvalidRequestError",
  10416. "content": {
  10417. "application/json": {
  10418. "schema": {
  10419. "$ref": "#/components/schemas/InvalidRequestError"
  10420. }
  10421. }
  10422. }
  10423. },
  10424. "401": {
  10425. "description": "UnauthorizedError",
  10426. "content": {
  10427. "application/json": {
  10428. "schema": {
  10429. "$ref": "#/components/schemas/UnauthorizedError"
  10430. }
  10431. }
  10432. }
  10433. },
  10434. "404": {
  10435. "description": "SessionNotFoundError",
  10436. "content": {
  10437. "application/json": {
  10438. "schema": {
  10439. "anyOf": [
  10440. {
  10441. "$ref": "#/components/schemas/SessionNotFoundError"
  10442. },
  10443. {
  10444. "$ref": "#/components/schemas/SessionNotFoundError"
  10445. }
  10446. ]
  10447. }
  10448. }
  10449. }
  10450. },
  10451. "503": {
  10452. "description": "ServiceUnavailableError",
  10453. "content": {
  10454. "application/json": {
  10455. "schema": {
  10456. "$ref": "#/components/schemas/ServiceUnavailableError"
  10457. }
  10458. }
  10459. }
  10460. }
  10461. },
  10462. "description": "Compact a session conversation.",
  10463. "summary": "Compact session",
  10464. "x-codeSamples": [
  10465. {
  10466. "lang": "js",
  10467. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  10468. }
  10469. ]
  10470. }
  10471. },
  10472. "/api/session/{sessionID}/wait": {
  10473. "post": {
  10474. "tags": ["sessions"],
  10475. "operationId": "v2.session.wait",
  10476. "parameters": [
  10477. {
  10478. "name": "sessionID",
  10479. "in": "path",
  10480. "schema": {
  10481. "type": "string",
  10482. "pattern": "^ses"
  10483. },
  10484. "required": true
  10485. }
  10486. ],
  10487. "security": [],
  10488. "responses": {
  10489. "204": {
  10490. "description": "<No Content>"
  10491. },
  10492. "400": {
  10493. "description": "InvalidRequestError",
  10494. "content": {
  10495. "application/json": {
  10496. "schema": {
  10497. "$ref": "#/components/schemas/InvalidRequestError"
  10498. }
  10499. }
  10500. }
  10501. },
  10502. "401": {
  10503. "description": "UnauthorizedError",
  10504. "content": {
  10505. "application/json": {
  10506. "schema": {
  10507. "$ref": "#/components/schemas/UnauthorizedError"
  10508. }
  10509. }
  10510. }
  10511. },
  10512. "404": {
  10513. "description": "SessionNotFoundError",
  10514. "content": {
  10515. "application/json": {
  10516. "schema": {
  10517. "anyOf": [
  10518. {
  10519. "$ref": "#/components/schemas/SessionNotFoundError"
  10520. },
  10521. {
  10522. "$ref": "#/components/schemas/SessionNotFoundError"
  10523. }
  10524. ]
  10525. }
  10526. }
  10527. }
  10528. },
  10529. "503": {
  10530. "description": "ServiceUnavailableError",
  10531. "content": {
  10532. "application/json": {
  10533. "schema": {
  10534. "$ref": "#/components/schemas/ServiceUnavailableError"
  10535. }
  10536. }
  10537. }
  10538. }
  10539. },
  10540. "description": "Wait for a session agent loop to become idle.",
  10541. "summary": "Wait for session",
  10542. "x-codeSamples": [
  10543. {
  10544. "lang": "js",
  10545. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  10546. }
  10547. ]
  10548. }
  10549. },
  10550. "/api/session/{sessionID}/context": {
  10551. "get": {
  10552. "tags": ["sessions"],
  10553. "operationId": "v2.session.context",
  10554. "parameters": [
  10555. {
  10556. "name": "sessionID",
  10557. "in": "path",
  10558. "schema": {
  10559. "type": "string",
  10560. "pattern": "^ses"
  10561. },
  10562. "required": true
  10563. }
  10564. ],
  10565. "security": [],
  10566. "responses": {
  10567. "200": {
  10568. "description": "Success",
  10569. "content": {
  10570. "application/json": {
  10571. "schema": {
  10572. "type": "object",
  10573. "properties": {
  10574. "data": {
  10575. "type": "array",
  10576. "items": {
  10577. "$ref": "#/components/schemas/SessionMessage"
  10578. }
  10579. }
  10580. },
  10581. "required": ["data"],
  10582. "additionalProperties": false
  10583. }
  10584. }
  10585. }
  10586. },
  10587. "400": {
  10588. "description": "InvalidRequestError",
  10589. "content": {
  10590. "application/json": {
  10591. "schema": {
  10592. "$ref": "#/components/schemas/InvalidRequestError"
  10593. }
  10594. }
  10595. }
  10596. },
  10597. "401": {
  10598. "description": "UnauthorizedError",
  10599. "content": {
  10600. "application/json": {
  10601. "schema": {
  10602. "$ref": "#/components/schemas/UnauthorizedError"
  10603. }
  10604. }
  10605. }
  10606. },
  10607. "404": {
  10608. "description": "SessionNotFoundError",
  10609. "content": {
  10610. "application/json": {
  10611. "schema": {
  10612. "anyOf": [
  10613. {
  10614. "$ref": "#/components/schemas/SessionNotFoundError"
  10615. },
  10616. {
  10617. "$ref": "#/components/schemas/SessionNotFoundError"
  10618. }
  10619. ]
  10620. }
  10621. }
  10622. }
  10623. },
  10624. "500": {
  10625. "description": "UnknownError",
  10626. "content": {
  10627. "application/json": {
  10628. "schema": {
  10629. "$ref": "#/components/schemas/UnknownError1"
  10630. }
  10631. }
  10632. }
  10633. }
  10634. },
  10635. "description": "Retrieve the active context messages for a session (all messages after the last compaction).",
  10636. "summary": "Get session context",
  10637. "x-codeSamples": [
  10638. {
  10639. "lang": "js",
  10640. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  10641. }
  10642. ]
  10643. }
  10644. },
  10645. "/api/session/{sessionID}/message": {
  10646. "get": {
  10647. "tags": ["messages"],
  10648. "operationId": "v2.session.messages",
  10649. "parameters": [
  10650. {
  10651. "name": "sessionID",
  10652. "in": "path",
  10653. "schema": {
  10654. "type": "string",
  10655. "pattern": "^ses"
  10656. },
  10657. "required": true
  10658. },
  10659. {
  10660. "name": "limit",
  10661. "in": "query",
  10662. "schema": {
  10663. "type": "number"
  10664. },
  10665. "required": false
  10666. },
  10667. {
  10668. "name": "order",
  10669. "in": "query",
  10670. "schema": {
  10671. "type": "string",
  10672. "enum": ["asc", "desc"]
  10673. },
  10674. "required": false
  10675. },
  10676. {
  10677. "name": "cursor",
  10678. "in": "query",
  10679. "schema": {
  10680. "type": "string",
  10681. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  10682. },
  10683. "required": false
  10684. }
  10685. ],
  10686. "security": [],
  10687. "responses": {
  10688. "200": {
  10689. "description": "SessionMessagesResponse",
  10690. "content": {
  10691. "application/json": {
  10692. "schema": {
  10693. "$ref": "#/components/schemas/SessionMessagesResponse"
  10694. }
  10695. }
  10696. }
  10697. },
  10698. "400": {
  10699. "description": "InvalidCursorError | InvalidRequestError",
  10700. "content": {
  10701. "application/json": {
  10702. "schema": {
  10703. "anyOf": [
  10704. {
  10705. "$ref": "#/components/schemas/InvalidCursorError"
  10706. },
  10707. {
  10708. "$ref": "#/components/schemas/InvalidRequestError"
  10709. }
  10710. ]
  10711. }
  10712. }
  10713. }
  10714. },
  10715. "401": {
  10716. "description": "UnauthorizedError",
  10717. "content": {
  10718. "application/json": {
  10719. "schema": {
  10720. "$ref": "#/components/schemas/UnauthorizedError"
  10721. }
  10722. }
  10723. }
  10724. },
  10725. "404": {
  10726. "description": "SessionNotFoundError",
  10727. "content": {
  10728. "application/json": {
  10729. "schema": {
  10730. "anyOf": [
  10731. {
  10732. "$ref": "#/components/schemas/SessionNotFoundError"
  10733. },
  10734. {
  10735. "$ref": "#/components/schemas/SessionNotFoundError"
  10736. }
  10737. ]
  10738. }
  10739. }
  10740. }
  10741. },
  10742. "500": {
  10743. "description": "UnknownError",
  10744. "content": {
  10745. "application/json": {
  10746. "schema": {
  10747. "$ref": "#/components/schemas/UnknownError1"
  10748. }
  10749. }
  10750. }
  10751. }
  10752. },
  10753. "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.",
  10754. "summary": "Get session messages",
  10755. "x-codeSamples": [
  10756. {
  10757. "lang": "js",
  10758. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  10759. }
  10760. ]
  10761. }
  10762. },
  10763. "/api/model": {
  10764. "get": {
  10765. "tags": ["models"],
  10766. "operationId": "v2.model.list",
  10767. "parameters": [
  10768. {
  10769. "name": "location",
  10770. "in": "query",
  10771. "schema": {
  10772. "type": "object",
  10773. "properties": {
  10774. "directory": {
  10775. "type": "string"
  10776. },
  10777. "workspace": {
  10778. "type": "string"
  10779. }
  10780. },
  10781. "additionalProperties": false
  10782. },
  10783. "required": false,
  10784. "style": "deepObject",
  10785. "explode": true
  10786. }
  10787. ],
  10788. "security": [],
  10789. "responses": {
  10790. "200": {
  10791. "description": "Success",
  10792. "content": {
  10793. "application/json": {
  10794. "schema": {
  10795. "type": "object",
  10796. "properties": {
  10797. "location": {
  10798. "$ref": "#/components/schemas/LocationInfo"
  10799. },
  10800. "data": {
  10801. "type": "array",
  10802. "items": {
  10803. "$ref": "#/components/schemas/ModelV2Info"
  10804. }
  10805. }
  10806. },
  10807. "required": ["location", "data"],
  10808. "additionalProperties": false
  10809. }
  10810. }
  10811. }
  10812. },
  10813. "400": {
  10814. "description": "InvalidRequestError",
  10815. "content": {
  10816. "application/json": {
  10817. "schema": {
  10818. "$ref": "#/components/schemas/InvalidRequestError"
  10819. }
  10820. }
  10821. }
  10822. },
  10823. "401": {
  10824. "description": "UnauthorizedError",
  10825. "content": {
  10826. "application/json": {
  10827. "schema": {
  10828. "$ref": "#/components/schemas/UnauthorizedError"
  10829. }
  10830. }
  10831. }
  10832. },
  10833. "503": {
  10834. "description": "ServiceUnavailableError",
  10835. "content": {
  10836. "application/json": {
  10837. "schema": {
  10838. "$ref": "#/components/schemas/ServiceUnavailableError"
  10839. }
  10840. }
  10841. }
  10842. }
  10843. },
  10844. "description": "Retrieve available models ordered by release date.",
  10845. "summary": "List models",
  10846. "x-codeSamples": [
  10847. {
  10848. "lang": "js",
  10849. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
  10850. }
  10851. ]
  10852. }
  10853. },
  10854. "/api/provider": {
  10855. "get": {
  10856. "tags": ["providers"],
  10857. "operationId": "v2.provider.list",
  10858. "parameters": [
  10859. {
  10860. "name": "location",
  10861. "in": "query",
  10862. "schema": {
  10863. "type": "object",
  10864. "properties": {
  10865. "directory": {
  10866. "type": "string"
  10867. },
  10868. "workspace": {
  10869. "type": "string"
  10870. }
  10871. },
  10872. "additionalProperties": false
  10873. },
  10874. "required": false,
  10875. "style": "deepObject",
  10876. "explode": true
  10877. }
  10878. ],
  10879. "security": [],
  10880. "responses": {
  10881. "200": {
  10882. "description": "Success",
  10883. "content": {
  10884. "application/json": {
  10885. "schema": {
  10886. "type": "object",
  10887. "properties": {
  10888. "location": {
  10889. "$ref": "#/components/schemas/LocationInfo"
  10890. },
  10891. "data": {
  10892. "type": "array",
  10893. "items": {
  10894. "$ref": "#/components/schemas/ProviderV2Info"
  10895. }
  10896. }
  10897. },
  10898. "required": ["location", "data"],
  10899. "additionalProperties": false
  10900. }
  10901. }
  10902. }
  10903. },
  10904. "400": {
  10905. "description": "InvalidRequestError",
  10906. "content": {
  10907. "application/json": {
  10908. "schema": {
  10909. "$ref": "#/components/schemas/InvalidRequestError"
  10910. }
  10911. }
  10912. }
  10913. },
  10914. "401": {
  10915. "description": "UnauthorizedError",
  10916. "content": {
  10917. "application/json": {
  10918. "schema": {
  10919. "$ref": "#/components/schemas/UnauthorizedError"
  10920. }
  10921. }
  10922. }
  10923. },
  10924. "503": {
  10925. "description": "ServiceUnavailableError",
  10926. "content": {
  10927. "application/json": {
  10928. "schema": {
  10929. "$ref": "#/components/schemas/ServiceUnavailableError"
  10930. }
  10931. }
  10932. }
  10933. }
  10934. },
  10935. "description": "Retrieve active AI providers so clients can show provider availability and configuration.",
  10936. "summary": "List providers",
  10937. "x-codeSamples": [
  10938. {
  10939. "lang": "js",
  10940. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
  10941. }
  10942. ]
  10943. }
  10944. },
  10945. "/api/provider/{providerID}": {
  10946. "get": {
  10947. "tags": ["providers"],
  10948. "operationId": "v2.provider.get",
  10949. "parameters": [
  10950. {
  10951. "name": "providerID",
  10952. "in": "path",
  10953. "schema": {
  10954. "type": "string"
  10955. },
  10956. "required": true
  10957. },
  10958. {
  10959. "name": "location",
  10960. "in": "query",
  10961. "schema": {
  10962. "type": "object",
  10963. "properties": {
  10964. "directory": {
  10965. "type": "string"
  10966. },
  10967. "workspace": {
  10968. "type": "string"
  10969. }
  10970. },
  10971. "additionalProperties": false
  10972. },
  10973. "required": false,
  10974. "style": "deepObject",
  10975. "explode": true
  10976. }
  10977. ],
  10978. "security": [],
  10979. "responses": {
  10980. "200": {
  10981. "description": "Success",
  10982. "content": {
  10983. "application/json": {
  10984. "schema": {
  10985. "type": "object",
  10986. "properties": {
  10987. "location": {
  10988. "$ref": "#/components/schemas/LocationInfo"
  10989. },
  10990. "data": {
  10991. "$ref": "#/components/schemas/ProviderV2Info"
  10992. }
  10993. },
  10994. "required": ["location", "data"],
  10995. "additionalProperties": false
  10996. }
  10997. }
  10998. }
  10999. },
  11000. "400": {
  11001. "description": "InvalidRequestError",
  11002. "content": {
  11003. "application/json": {
  11004. "schema": {
  11005. "$ref": "#/components/schemas/InvalidRequestError"
  11006. }
  11007. }
  11008. }
  11009. },
  11010. "401": {
  11011. "description": "UnauthorizedError",
  11012. "content": {
  11013. "application/json": {
  11014. "schema": {
  11015. "$ref": "#/components/schemas/UnauthorizedError"
  11016. }
  11017. }
  11018. }
  11019. },
  11020. "404": {
  11021. "description": "ProviderNotFoundError",
  11022. "content": {
  11023. "application/json": {
  11024. "schema": {
  11025. "$ref": "#/components/schemas/ProviderNotFoundError"
  11026. }
  11027. }
  11028. }
  11029. },
  11030. "503": {
  11031. "description": "ServiceUnavailableError",
  11032. "content": {
  11033. "application/json": {
  11034. "schema": {
  11035. "$ref": "#/components/schemas/ServiceUnavailableError"
  11036. }
  11037. }
  11038. }
  11039. }
  11040. },
  11041. "description": "Retrieve a single AI provider so clients can inspect its availability and endpoint settings.",
  11042. "summary": "Get provider",
  11043. "x-codeSamples": [
  11044. {
  11045. "lang": "js",
  11046. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
  11047. }
  11048. ]
  11049. }
  11050. },
  11051. "/api/integration": {
  11052. "get": {
  11053. "tags": ["integrations"],
  11054. "operationId": "v2.integration.list",
  11055. "parameters": [
  11056. {
  11057. "name": "location",
  11058. "in": "query",
  11059. "schema": {
  11060. "type": "object",
  11061. "properties": {
  11062. "directory": {
  11063. "type": "string"
  11064. },
  11065. "workspace": {
  11066. "type": "string"
  11067. }
  11068. },
  11069. "additionalProperties": false
  11070. },
  11071. "required": false,
  11072. "style": "deepObject",
  11073. "explode": true
  11074. }
  11075. ],
  11076. "security": [],
  11077. "responses": {
  11078. "200": {
  11079. "description": "Success",
  11080. "content": {
  11081. "application/json": {
  11082. "schema": {
  11083. "type": "object",
  11084. "properties": {
  11085. "location": {
  11086. "$ref": "#/components/schemas/LocationInfo"
  11087. },
  11088. "data": {
  11089. "type": "array",
  11090. "items": {
  11091. "$ref": "#/components/schemas/IntegrationInfo"
  11092. }
  11093. }
  11094. },
  11095. "required": ["location", "data"],
  11096. "additionalProperties": false
  11097. }
  11098. }
  11099. }
  11100. },
  11101. "400": {
  11102. "description": "InvalidRequestError",
  11103. "content": {
  11104. "application/json": {
  11105. "schema": {
  11106. "$ref": "#/components/schemas/InvalidRequestError"
  11107. }
  11108. }
  11109. }
  11110. },
  11111. "401": {
  11112. "description": "UnauthorizedError",
  11113. "content": {
  11114. "application/json": {
  11115. "schema": {
  11116. "$ref": "#/components/schemas/UnauthorizedError"
  11117. }
  11118. }
  11119. }
  11120. }
  11121. },
  11122. "description": "Retrieve available integrations and their authentication methods.",
  11123. "summary": "List integrations",
  11124. "x-codeSamples": [
  11125. {
  11126. "lang": "js",
  11127. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.list({\n ...\n})"
  11128. }
  11129. ]
  11130. }
  11131. },
  11132. "/api/integration/{integrationID}": {
  11133. "get": {
  11134. "tags": ["integrations"],
  11135. "operationId": "v2.integration.get",
  11136. "parameters": [
  11137. {
  11138. "name": "integrationID",
  11139. "in": "path",
  11140. "schema": {
  11141. "type": "string"
  11142. },
  11143. "required": true
  11144. },
  11145. {
  11146. "name": "location",
  11147. "in": "query",
  11148. "schema": {
  11149. "type": "object",
  11150. "properties": {
  11151. "directory": {
  11152. "type": "string"
  11153. },
  11154. "workspace": {
  11155. "type": "string"
  11156. }
  11157. },
  11158. "additionalProperties": false
  11159. },
  11160. "required": false,
  11161. "style": "deepObject",
  11162. "explode": true
  11163. }
  11164. ],
  11165. "security": [],
  11166. "responses": {
  11167. "200": {
  11168. "description": "Success",
  11169. "content": {
  11170. "application/json": {
  11171. "schema": {
  11172. "type": "object",
  11173. "properties": {
  11174. "location": {
  11175. "$ref": "#/components/schemas/LocationInfo"
  11176. },
  11177. "data": {
  11178. "$ref": "#/components/schemas/IntegrationInfo"
  11179. }
  11180. },
  11181. "required": ["location", "data"],
  11182. "additionalProperties": false
  11183. }
  11184. }
  11185. }
  11186. },
  11187. "400": {
  11188. "description": "InvalidRequestError",
  11189. "content": {
  11190. "application/json": {
  11191. "schema": {
  11192. "$ref": "#/components/schemas/InvalidRequestError"
  11193. }
  11194. }
  11195. }
  11196. },
  11197. "401": {
  11198. "description": "UnauthorizedError",
  11199. "content": {
  11200. "application/json": {
  11201. "schema": {
  11202. "$ref": "#/components/schemas/UnauthorizedError"
  11203. }
  11204. }
  11205. }
  11206. }
  11207. },
  11208. "description": "Retrieve one integration and its authentication methods.",
  11209. "summary": "Get integration",
  11210. "x-codeSamples": [
  11211. {
  11212. "lang": "js",
  11213. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.get({\n ...\n})"
  11214. }
  11215. ]
  11216. }
  11217. },
  11218. "/api/integration/{integrationID}/connect/key": {
  11219. "post": {
  11220. "tags": ["integrations"],
  11221. "operationId": "v2.integration.connect.key",
  11222. "parameters": [
  11223. {
  11224. "name": "integrationID",
  11225. "in": "path",
  11226. "schema": {
  11227. "type": "string"
  11228. },
  11229. "required": true
  11230. },
  11231. {
  11232. "name": "location",
  11233. "in": "query",
  11234. "schema": {
  11235. "type": "object",
  11236. "properties": {
  11237. "directory": {
  11238. "type": "string"
  11239. },
  11240. "workspace": {
  11241. "type": "string"
  11242. }
  11243. },
  11244. "additionalProperties": false
  11245. },
  11246. "required": false,
  11247. "style": "deepObject",
  11248. "explode": true
  11249. }
  11250. ],
  11251. "security": [],
  11252. "responses": {
  11253. "204": {
  11254. "description": "<No Content>"
  11255. },
  11256. "400": {
  11257. "description": "InvalidRequestError",
  11258. "content": {
  11259. "application/json": {
  11260. "schema": {
  11261. "anyOf": [
  11262. {
  11263. "$ref": "#/components/schemas/InvalidRequestError"
  11264. },
  11265. {
  11266. "$ref": "#/components/schemas/InvalidRequestError"
  11267. }
  11268. ]
  11269. }
  11270. }
  11271. }
  11272. },
  11273. "401": {
  11274. "description": "UnauthorizedError",
  11275. "content": {
  11276. "application/json": {
  11277. "schema": {
  11278. "$ref": "#/components/schemas/UnauthorizedError"
  11279. }
  11280. }
  11281. }
  11282. }
  11283. },
  11284. "description": "Run a key authentication method and store the resulting credential.",
  11285. "summary": "Connect with key",
  11286. "requestBody": {
  11287. "content": {
  11288. "application/json": {
  11289. "schema": {
  11290. "type": "object",
  11291. "properties": {
  11292. "key": {
  11293. "type": "string"
  11294. },
  11295. "label": {
  11296. "type": "string"
  11297. }
  11298. },
  11299. "required": ["key"],
  11300. "additionalProperties": false
  11301. }
  11302. }
  11303. },
  11304. "required": true
  11305. },
  11306. "x-codeSamples": [
  11307. {
  11308. "lang": "js",
  11309. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.key({\n ...\n})"
  11310. }
  11311. ]
  11312. }
  11313. },
  11314. "/api/integration/{integrationID}/connect/oauth": {
  11315. "post": {
  11316. "tags": ["integrations"],
  11317. "operationId": "v2.integration.connect.oauth",
  11318. "parameters": [
  11319. {
  11320. "name": "integrationID",
  11321. "in": "path",
  11322. "schema": {
  11323. "type": "string"
  11324. },
  11325. "required": true
  11326. },
  11327. {
  11328. "name": "location",
  11329. "in": "query",
  11330. "schema": {
  11331. "type": "object",
  11332. "properties": {
  11333. "directory": {
  11334. "type": "string"
  11335. },
  11336. "workspace": {
  11337. "type": "string"
  11338. }
  11339. },
  11340. "additionalProperties": false
  11341. },
  11342. "required": false,
  11343. "style": "deepObject",
  11344. "explode": true
  11345. }
  11346. ],
  11347. "security": [],
  11348. "responses": {
  11349. "200": {
  11350. "description": "Success",
  11351. "content": {
  11352. "application/json": {
  11353. "schema": {
  11354. "type": "object",
  11355. "properties": {
  11356. "location": {
  11357. "$ref": "#/components/schemas/LocationInfo"
  11358. },
  11359. "data": {
  11360. "$ref": "#/components/schemas/IntegrationAttempt"
  11361. }
  11362. },
  11363. "required": ["location", "data"],
  11364. "additionalProperties": false
  11365. }
  11366. }
  11367. }
  11368. },
  11369. "400": {
  11370. "description": "InvalidRequestError",
  11371. "content": {
  11372. "application/json": {
  11373. "schema": {
  11374. "anyOf": [
  11375. {
  11376. "$ref": "#/components/schemas/InvalidRequestError"
  11377. },
  11378. {
  11379. "$ref": "#/components/schemas/InvalidRequestError"
  11380. }
  11381. ]
  11382. }
  11383. }
  11384. }
  11385. },
  11386. "401": {
  11387. "description": "UnauthorizedError",
  11388. "content": {
  11389. "application/json": {
  11390. "schema": {
  11391. "$ref": "#/components/schemas/UnauthorizedError"
  11392. }
  11393. }
  11394. }
  11395. }
  11396. },
  11397. "description": "Start an OAuth attempt and return the authorization details.",
  11398. "summary": "Begin OAuth connection",
  11399. "requestBody": {
  11400. "content": {
  11401. "application/json": {
  11402. "schema": {
  11403. "type": "object",
  11404. "properties": {
  11405. "methodID": {
  11406. "type": "string"
  11407. },
  11408. "inputs": {
  11409. "type": "object",
  11410. "additionalProperties": {
  11411. "type": "string"
  11412. }
  11413. },
  11414. "label": {
  11415. "type": "string"
  11416. }
  11417. },
  11418. "required": ["methodID", "inputs"],
  11419. "additionalProperties": false
  11420. }
  11421. }
  11422. },
  11423. "required": true
  11424. },
  11425. "x-codeSamples": [
  11426. {
  11427. "lang": "js",
  11428. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.connect.oauth({\n ...\n})"
  11429. }
  11430. ]
  11431. }
  11432. },
  11433. "/api/integration/attempt/{attemptID}": {
  11434. "get": {
  11435. "tags": ["integrations"],
  11436. "operationId": "v2.integration.attempt.status",
  11437. "parameters": [
  11438. {
  11439. "name": "attemptID",
  11440. "in": "path",
  11441. "schema": {
  11442. "type": "string"
  11443. },
  11444. "required": true
  11445. },
  11446. {
  11447. "name": "location",
  11448. "in": "query",
  11449. "schema": {
  11450. "type": "object",
  11451. "properties": {
  11452. "directory": {
  11453. "type": "string"
  11454. },
  11455. "workspace": {
  11456. "type": "string"
  11457. }
  11458. },
  11459. "additionalProperties": false
  11460. },
  11461. "required": false,
  11462. "style": "deepObject",
  11463. "explode": true
  11464. }
  11465. ],
  11466. "security": [],
  11467. "responses": {
  11468. "200": {
  11469. "description": "Success",
  11470. "content": {
  11471. "application/json": {
  11472. "schema": {
  11473. "type": "object",
  11474. "properties": {
  11475. "location": {
  11476. "$ref": "#/components/schemas/LocationInfo"
  11477. },
  11478. "data": {
  11479. "anyOf": [
  11480. {
  11481. "type": "object",
  11482. "properties": {
  11483. "status": {
  11484. "type": "string",
  11485. "enum": ["pending"]
  11486. },
  11487. "time": {
  11488. "type": "object",
  11489. "properties": {
  11490. "created": {
  11491. "anyOf": [
  11492. {
  11493. "type": "number"
  11494. },
  11495. {
  11496. "type": "string",
  11497. "enum": ["NaN"]
  11498. },
  11499. {
  11500. "type": "string",
  11501. "enum": ["Infinity"]
  11502. },
  11503. {
  11504. "type": "string",
  11505. "enum": ["-Infinity"]
  11506. },
  11507. {
  11508. "type": "string",
  11509. "enum": ["Infinity", "-Infinity", "NaN"]
  11510. }
  11511. ]
  11512. },
  11513. "expires": {
  11514. "anyOf": [
  11515. {
  11516. "type": "number"
  11517. },
  11518. {
  11519. "type": "string",
  11520. "enum": ["NaN"]
  11521. },
  11522. {
  11523. "type": "string",
  11524. "enum": ["Infinity"]
  11525. },
  11526. {
  11527. "type": "string",
  11528. "enum": ["-Infinity"]
  11529. },
  11530. {
  11531. "type": "string",
  11532. "enum": ["Infinity", "-Infinity", "NaN"]
  11533. }
  11534. ]
  11535. }
  11536. },
  11537. "required": ["created", "expires"],
  11538. "additionalProperties": false
  11539. }
  11540. },
  11541. "required": ["status", "time"],
  11542. "additionalProperties": false
  11543. },
  11544. {
  11545. "type": "object",
  11546. "properties": {
  11547. "status": {
  11548. "type": "string",
  11549. "enum": ["complete"]
  11550. },
  11551. "time": {
  11552. "type": "object",
  11553. "properties": {
  11554. "created": {
  11555. "anyOf": [
  11556. {
  11557. "type": "number"
  11558. },
  11559. {
  11560. "type": "string",
  11561. "enum": ["NaN"]
  11562. },
  11563. {
  11564. "type": "string",
  11565. "enum": ["Infinity"]
  11566. },
  11567. {
  11568. "type": "string",
  11569. "enum": ["-Infinity"]
  11570. },
  11571. {
  11572. "type": "string",
  11573. "enum": ["Infinity", "-Infinity", "NaN"]
  11574. }
  11575. ]
  11576. },
  11577. "expires": {
  11578. "anyOf": [
  11579. {
  11580. "type": "number"
  11581. },
  11582. {
  11583. "type": "string",
  11584. "enum": ["NaN"]
  11585. },
  11586. {
  11587. "type": "string",
  11588. "enum": ["Infinity"]
  11589. },
  11590. {
  11591. "type": "string",
  11592. "enum": ["-Infinity"]
  11593. },
  11594. {
  11595. "type": "string",
  11596. "enum": ["Infinity", "-Infinity", "NaN"]
  11597. }
  11598. ]
  11599. }
  11600. },
  11601. "required": ["created", "expires"],
  11602. "additionalProperties": false
  11603. }
  11604. },
  11605. "required": ["status", "time"],
  11606. "additionalProperties": false
  11607. },
  11608. {
  11609. "type": "object",
  11610. "properties": {
  11611. "status": {
  11612. "type": "string",
  11613. "enum": ["failed"]
  11614. },
  11615. "message": {
  11616. "type": "string"
  11617. },
  11618. "time": {
  11619. "type": "object",
  11620. "properties": {
  11621. "created": {
  11622. "anyOf": [
  11623. {
  11624. "type": "number"
  11625. },
  11626. {
  11627. "type": "string",
  11628. "enum": ["NaN"]
  11629. },
  11630. {
  11631. "type": "string",
  11632. "enum": ["Infinity"]
  11633. },
  11634. {
  11635. "type": "string",
  11636. "enum": ["-Infinity"]
  11637. },
  11638. {
  11639. "type": "string",
  11640. "enum": ["Infinity", "-Infinity", "NaN"]
  11641. }
  11642. ]
  11643. },
  11644. "expires": {
  11645. "anyOf": [
  11646. {
  11647. "type": "number"
  11648. },
  11649. {
  11650. "type": "string",
  11651. "enum": ["NaN"]
  11652. },
  11653. {
  11654. "type": "string",
  11655. "enum": ["Infinity"]
  11656. },
  11657. {
  11658. "type": "string",
  11659. "enum": ["-Infinity"]
  11660. },
  11661. {
  11662. "type": "string",
  11663. "enum": ["Infinity", "-Infinity", "NaN"]
  11664. }
  11665. ]
  11666. }
  11667. },
  11668. "required": ["created", "expires"],
  11669. "additionalProperties": false
  11670. }
  11671. },
  11672. "required": ["status", "message", "time"],
  11673. "additionalProperties": false
  11674. },
  11675. {
  11676. "type": "object",
  11677. "properties": {
  11678. "status": {
  11679. "type": "string",
  11680. "enum": ["expired"]
  11681. },
  11682. "time": {
  11683. "type": "object",
  11684. "properties": {
  11685. "created": {
  11686. "anyOf": [
  11687. {
  11688. "type": "number"
  11689. },
  11690. {
  11691. "type": "string",
  11692. "enum": ["NaN"]
  11693. },
  11694. {
  11695. "type": "string",
  11696. "enum": ["Infinity"]
  11697. },
  11698. {
  11699. "type": "string",
  11700. "enum": ["-Infinity"]
  11701. },
  11702. {
  11703. "type": "string",
  11704. "enum": ["Infinity", "-Infinity", "NaN"]
  11705. }
  11706. ]
  11707. },
  11708. "expires": {
  11709. "anyOf": [
  11710. {
  11711. "type": "number"
  11712. },
  11713. {
  11714. "type": "string",
  11715. "enum": ["NaN"]
  11716. },
  11717. {
  11718. "type": "string",
  11719. "enum": ["Infinity"]
  11720. },
  11721. {
  11722. "type": "string",
  11723. "enum": ["-Infinity"]
  11724. },
  11725. {
  11726. "type": "string",
  11727. "enum": ["Infinity", "-Infinity", "NaN"]
  11728. }
  11729. ]
  11730. }
  11731. },
  11732. "required": ["created", "expires"],
  11733. "additionalProperties": false
  11734. }
  11735. },
  11736. "required": ["status", "time"],
  11737. "additionalProperties": false
  11738. }
  11739. ]
  11740. }
  11741. },
  11742. "required": ["location", "data"],
  11743. "additionalProperties": false
  11744. }
  11745. }
  11746. }
  11747. },
  11748. "400": {
  11749. "description": "InvalidRequestError",
  11750. "content": {
  11751. "application/json": {
  11752. "schema": {
  11753. "$ref": "#/components/schemas/InvalidRequestError"
  11754. }
  11755. }
  11756. }
  11757. },
  11758. "401": {
  11759. "description": "UnauthorizedError",
  11760. "content": {
  11761. "application/json": {
  11762. "schema": {
  11763. "$ref": "#/components/schemas/UnauthorizedError"
  11764. }
  11765. }
  11766. }
  11767. }
  11768. },
  11769. "description": "Poll the current status of an OAuth attempt.",
  11770. "summary": "Get OAuth attempt status",
  11771. "x-codeSamples": [
  11772. {
  11773. "lang": "js",
  11774. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.status({\n ...\n})"
  11775. }
  11776. ]
  11777. },
  11778. "delete": {
  11779. "tags": ["integrations"],
  11780. "operationId": "v2.integration.attempt.cancel",
  11781. "parameters": [
  11782. {
  11783. "name": "attemptID",
  11784. "in": "path",
  11785. "schema": {
  11786. "type": "string"
  11787. },
  11788. "required": true
  11789. },
  11790. {
  11791. "name": "location",
  11792. "in": "query",
  11793. "schema": {
  11794. "type": "object",
  11795. "properties": {
  11796. "directory": {
  11797. "type": "string"
  11798. },
  11799. "workspace": {
  11800. "type": "string"
  11801. }
  11802. },
  11803. "additionalProperties": false
  11804. },
  11805. "required": false,
  11806. "style": "deepObject",
  11807. "explode": true
  11808. }
  11809. ],
  11810. "security": [],
  11811. "responses": {
  11812. "204": {
  11813. "description": "<No Content>"
  11814. },
  11815. "400": {
  11816. "description": "InvalidRequestError",
  11817. "content": {
  11818. "application/json": {
  11819. "schema": {
  11820. "$ref": "#/components/schemas/InvalidRequestError"
  11821. }
  11822. }
  11823. }
  11824. },
  11825. "401": {
  11826. "description": "UnauthorizedError",
  11827. "content": {
  11828. "application/json": {
  11829. "schema": {
  11830. "$ref": "#/components/schemas/UnauthorizedError"
  11831. }
  11832. }
  11833. }
  11834. }
  11835. },
  11836. "description": "Cancel an OAuth attempt and release its resources.",
  11837. "summary": "Cancel OAuth connection",
  11838. "x-codeSamples": [
  11839. {
  11840. "lang": "js",
  11841. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.cancel({\n ...\n})"
  11842. }
  11843. ]
  11844. }
  11845. },
  11846. "/api/integration/attempt/{attemptID}/complete": {
  11847. "post": {
  11848. "tags": ["integrations"],
  11849. "operationId": "v2.integration.attempt.complete",
  11850. "parameters": [
  11851. {
  11852. "name": "attemptID",
  11853. "in": "path",
  11854. "schema": {
  11855. "type": "string"
  11856. },
  11857. "required": true
  11858. },
  11859. {
  11860. "name": "location",
  11861. "in": "query",
  11862. "schema": {
  11863. "type": "object",
  11864. "properties": {
  11865. "directory": {
  11866. "type": "string"
  11867. },
  11868. "workspace": {
  11869. "type": "string"
  11870. }
  11871. },
  11872. "additionalProperties": false
  11873. },
  11874. "required": false,
  11875. "style": "deepObject",
  11876. "explode": true
  11877. }
  11878. ],
  11879. "security": [],
  11880. "responses": {
  11881. "204": {
  11882. "description": "<No Content>"
  11883. },
  11884. "400": {
  11885. "description": "InvalidRequestError",
  11886. "content": {
  11887. "application/json": {
  11888. "schema": {
  11889. "anyOf": [
  11890. {
  11891. "$ref": "#/components/schemas/InvalidRequestError"
  11892. },
  11893. {
  11894. "$ref": "#/components/schemas/InvalidRequestError"
  11895. }
  11896. ]
  11897. }
  11898. }
  11899. }
  11900. },
  11901. "401": {
  11902. "description": "UnauthorizedError",
  11903. "content": {
  11904. "application/json": {
  11905. "schema": {
  11906. "$ref": "#/components/schemas/UnauthorizedError"
  11907. }
  11908. }
  11909. }
  11910. }
  11911. },
  11912. "description": "Complete a code-based OAuth attempt and store the resulting credential.",
  11913. "summary": "Complete OAuth connection",
  11914. "requestBody": {
  11915. "content": {
  11916. "application/json": {
  11917. "schema": {
  11918. "type": "object",
  11919. "properties": {
  11920. "code": {
  11921. "type": "string"
  11922. }
  11923. },
  11924. "additionalProperties": false
  11925. }
  11926. }
  11927. },
  11928. "required": true
  11929. },
  11930. "x-codeSamples": [
  11931. {
  11932. "lang": "js",
  11933. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.integration.attempt.complete({\n ...\n})"
  11934. }
  11935. ]
  11936. }
  11937. },
  11938. "/api/credential/{credentialID}": {
  11939. "patch": {
  11940. "tags": ["opencode HttpApi"],
  11941. "operationId": "v2.credential.update",
  11942. "parameters": [
  11943. {
  11944. "name": "credentialID",
  11945. "in": "path",
  11946. "schema": {
  11947. "type": "string"
  11948. },
  11949. "required": true
  11950. }
  11951. ],
  11952. "security": [],
  11953. "responses": {
  11954. "204": {
  11955. "description": "<No Content>"
  11956. },
  11957. "400": {
  11958. "description": "InvalidRequestError",
  11959. "content": {
  11960. "application/json": {
  11961. "schema": {
  11962. "$ref": "#/components/schemas/InvalidRequestError"
  11963. }
  11964. }
  11965. }
  11966. },
  11967. "401": {
  11968. "description": "UnauthorizedError",
  11969. "content": {
  11970. "application/json": {
  11971. "schema": {
  11972. "$ref": "#/components/schemas/UnauthorizedError"
  11973. }
  11974. }
  11975. }
  11976. }
  11977. },
  11978. "description": "Update a stored credential label.",
  11979. "summary": "Update credential",
  11980. "requestBody": {
  11981. "content": {
  11982. "application/json": {
  11983. "schema": {
  11984. "type": "object",
  11985. "properties": {
  11986. "label": {
  11987. "type": "string"
  11988. }
  11989. },
  11990. "required": ["label"],
  11991. "additionalProperties": false
  11992. }
  11993. }
  11994. },
  11995. "required": true
  11996. },
  11997. "x-codeSamples": [
  11998. {
  11999. "lang": "js",
  12000. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.update({\n ...\n})"
  12001. }
  12002. ]
  12003. },
  12004. "delete": {
  12005. "tags": ["opencode HttpApi"],
  12006. "operationId": "v2.credential.remove",
  12007. "parameters": [
  12008. {
  12009. "name": "credentialID",
  12010. "in": "path",
  12011. "schema": {
  12012. "type": "string"
  12013. },
  12014. "required": true
  12015. }
  12016. ],
  12017. "security": [],
  12018. "responses": {
  12019. "204": {
  12020. "description": "<No Content>"
  12021. },
  12022. "400": {
  12023. "description": "InvalidRequestError",
  12024. "content": {
  12025. "application/json": {
  12026. "schema": {
  12027. "$ref": "#/components/schemas/InvalidRequestError"
  12028. }
  12029. }
  12030. }
  12031. },
  12032. "401": {
  12033. "description": "UnauthorizedError",
  12034. "content": {
  12035. "application/json": {
  12036. "schema": {
  12037. "$ref": "#/components/schemas/UnauthorizedError"
  12038. }
  12039. }
  12040. }
  12041. }
  12042. },
  12043. "description": "Remove a stored integration credential.",
  12044. "summary": "Remove credential",
  12045. "x-codeSamples": [
  12046. {
  12047. "lang": "js",
  12048. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.credential.remove({\n ...\n})"
  12049. }
  12050. ]
  12051. }
  12052. },
  12053. "/api/permission/request": {
  12054. "get": {
  12055. "tags": ["permissions"],
  12056. "operationId": "v2.permission.request.list",
  12057. "parameters": [
  12058. {
  12059. "name": "location",
  12060. "in": "query",
  12061. "schema": {
  12062. "type": "object",
  12063. "properties": {
  12064. "directory": {
  12065. "type": "string"
  12066. },
  12067. "workspace": {
  12068. "type": "string"
  12069. }
  12070. },
  12071. "additionalProperties": false
  12072. },
  12073. "required": false,
  12074. "style": "deepObject",
  12075. "explode": true
  12076. }
  12077. ],
  12078. "security": [],
  12079. "responses": {
  12080. "200": {
  12081. "description": "Success",
  12082. "content": {
  12083. "application/json": {
  12084. "schema": {
  12085. "type": "object",
  12086. "properties": {
  12087. "location": {
  12088. "$ref": "#/components/schemas/LocationInfo"
  12089. },
  12090. "data": {
  12091. "type": "array",
  12092. "items": {
  12093. "$ref": "#/components/schemas/PermissionV2Request"
  12094. }
  12095. }
  12096. },
  12097. "required": ["location", "data"],
  12098. "additionalProperties": false
  12099. }
  12100. }
  12101. }
  12102. },
  12103. "400": {
  12104. "description": "InvalidRequestError",
  12105. "content": {
  12106. "application/json": {
  12107. "schema": {
  12108. "$ref": "#/components/schemas/InvalidRequestError"
  12109. }
  12110. }
  12111. }
  12112. },
  12113. "401": {
  12114. "description": "UnauthorizedError",
  12115. "content": {
  12116. "application/json": {
  12117. "schema": {
  12118. "$ref": "#/components/schemas/UnauthorizedError"
  12119. }
  12120. }
  12121. }
  12122. }
  12123. },
  12124. "description": "Retrieve pending permission requests for a location.",
  12125. "summary": "List pending permission requests",
  12126. "x-codeSamples": [
  12127. {
  12128. "lang": "js",
  12129. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.request.list({\n ...\n})"
  12130. }
  12131. ]
  12132. }
  12133. },
  12134. "/api/permission/saved": {
  12135. "get": {
  12136. "tags": ["permissions"],
  12137. "operationId": "v2.permission.saved.list",
  12138. "parameters": [
  12139. {
  12140. "name": "projectID",
  12141. "in": "query",
  12142. "schema": {
  12143. "type": "string"
  12144. },
  12145. "required": false
  12146. }
  12147. ],
  12148. "security": [],
  12149. "responses": {
  12150. "200": {
  12151. "description": "Success",
  12152. "content": {
  12153. "application/json": {
  12154. "schema": {
  12155. "type": "object",
  12156. "properties": {
  12157. "data": {
  12158. "type": "array",
  12159. "items": {
  12160. "$ref": "#/components/schemas/PermissionSavedInfo"
  12161. }
  12162. }
  12163. },
  12164. "required": ["data"],
  12165. "additionalProperties": false
  12166. }
  12167. }
  12168. }
  12169. },
  12170. "400": {
  12171. "description": "InvalidRequestError",
  12172. "content": {
  12173. "application/json": {
  12174. "schema": {
  12175. "$ref": "#/components/schemas/InvalidRequestError"
  12176. }
  12177. }
  12178. }
  12179. },
  12180. "401": {
  12181. "description": "UnauthorizedError",
  12182. "content": {
  12183. "application/json": {
  12184. "schema": {
  12185. "$ref": "#/components/schemas/UnauthorizedError"
  12186. }
  12187. }
  12188. }
  12189. }
  12190. },
  12191. "description": "Retrieve saved permissions, optionally filtered by project.",
  12192. "summary": "List saved permissions",
  12193. "x-codeSamples": [
  12194. {
  12195. "lang": "js",
  12196. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.list({\n ...\n})"
  12197. }
  12198. ]
  12199. }
  12200. },
  12201. "/api/permission/saved/{id}": {
  12202. "delete": {
  12203. "tags": ["permissions"],
  12204. "operationId": "v2.permission.saved.remove",
  12205. "parameters": [
  12206. {
  12207. "name": "id",
  12208. "in": "path",
  12209. "schema": {
  12210. "type": "string"
  12211. },
  12212. "required": true
  12213. }
  12214. ],
  12215. "security": [],
  12216. "responses": {
  12217. "204": {
  12218. "description": "<No Content>"
  12219. },
  12220. "400": {
  12221. "description": "InvalidRequestError",
  12222. "content": {
  12223. "application/json": {
  12224. "schema": {
  12225. "$ref": "#/components/schemas/InvalidRequestError"
  12226. }
  12227. }
  12228. }
  12229. },
  12230. "401": {
  12231. "description": "UnauthorizedError",
  12232. "content": {
  12233. "application/json": {
  12234. "schema": {
  12235. "$ref": "#/components/schemas/UnauthorizedError"
  12236. }
  12237. }
  12238. }
  12239. }
  12240. },
  12241. "description": "Remove a saved permission by ID.",
  12242. "summary": "Remove saved permission",
  12243. "x-codeSamples": [
  12244. {
  12245. "lang": "js",
  12246. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.permission.saved.remove({\n ...\n})"
  12247. }
  12248. ]
  12249. }
  12250. },
  12251. "/api/session/{sessionID}/permission": {
  12252. "get": {
  12253. "tags": ["permissions"],
  12254. "operationId": "v2.session.permission.list",
  12255. "parameters": [
  12256. {
  12257. "name": "sessionID",
  12258. "in": "path",
  12259. "schema": {
  12260. "type": "string",
  12261. "pattern": "^ses"
  12262. },
  12263. "required": true
  12264. }
  12265. ],
  12266. "security": [],
  12267. "responses": {
  12268. "200": {
  12269. "description": "Success",
  12270. "content": {
  12271. "application/json": {
  12272. "schema": {
  12273. "type": "object",
  12274. "properties": {
  12275. "data": {
  12276. "type": "array",
  12277. "items": {
  12278. "$ref": "#/components/schemas/PermissionV2Request"
  12279. }
  12280. }
  12281. },
  12282. "required": ["data"],
  12283. "additionalProperties": false
  12284. }
  12285. }
  12286. }
  12287. },
  12288. "400": {
  12289. "description": "InvalidRequestError",
  12290. "content": {
  12291. "application/json": {
  12292. "schema": {
  12293. "$ref": "#/components/schemas/InvalidRequestError"
  12294. }
  12295. }
  12296. }
  12297. },
  12298. "401": {
  12299. "description": "UnauthorizedError",
  12300. "content": {
  12301. "application/json": {
  12302. "schema": {
  12303. "$ref": "#/components/schemas/UnauthorizedError"
  12304. }
  12305. }
  12306. }
  12307. },
  12308. "404": {
  12309. "description": "SessionNotFoundError",
  12310. "content": {
  12311. "application/json": {
  12312. "schema": {
  12313. "anyOf": [
  12314. {
  12315. "$ref": "#/components/schemas/SessionNotFoundError"
  12316. },
  12317. {
  12318. "$ref": "#/components/schemas/SessionNotFoundError"
  12319. }
  12320. ]
  12321. }
  12322. }
  12323. }
  12324. }
  12325. },
  12326. "description": "Retrieve pending permission requests owned by a session.",
  12327. "summary": "List session permission requests",
  12328. "x-codeSamples": [
  12329. {
  12330. "lang": "js",
  12331. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.list({\n ...\n})"
  12332. }
  12333. ]
  12334. }
  12335. },
  12336. "/api/session/{sessionID}/permission/{requestID}/reply": {
  12337. "post": {
  12338. "tags": ["permissions"],
  12339. "operationId": "v2.session.permission.reply",
  12340. "parameters": [
  12341. {
  12342. "name": "sessionID",
  12343. "in": "path",
  12344. "schema": {
  12345. "type": "string",
  12346. "pattern": "^ses"
  12347. },
  12348. "required": true
  12349. },
  12350. {
  12351. "name": "requestID",
  12352. "in": "path",
  12353. "schema": {
  12354. "type": "string",
  12355. "pattern": "^per"
  12356. },
  12357. "required": true
  12358. }
  12359. ],
  12360. "security": [],
  12361. "responses": {
  12362. "204": {
  12363. "description": "<No Content>"
  12364. },
  12365. "400": {
  12366. "description": "InvalidRequestError",
  12367. "content": {
  12368. "application/json": {
  12369. "schema": {
  12370. "$ref": "#/components/schemas/InvalidRequestError"
  12371. }
  12372. }
  12373. }
  12374. },
  12375. "401": {
  12376. "description": "UnauthorizedError",
  12377. "content": {
  12378. "application/json": {
  12379. "schema": {
  12380. "$ref": "#/components/schemas/UnauthorizedError"
  12381. }
  12382. }
  12383. }
  12384. },
  12385. "404": {
  12386. "description": "SessionNotFoundError | PermissionNotFoundError",
  12387. "content": {
  12388. "application/json": {
  12389. "schema": {
  12390. "anyOf": [
  12391. {
  12392. "$ref": "#/components/schemas/PermissionNotFoundError"
  12393. },
  12394. {
  12395. "$ref": "#/components/schemas/SessionNotFoundError"
  12396. },
  12397. {
  12398. "$ref": "#/components/schemas/SessionNotFoundError"
  12399. }
  12400. ]
  12401. }
  12402. }
  12403. }
  12404. }
  12405. },
  12406. "description": "Respond to a pending permission request owned by a session.",
  12407. "summary": "Reply to pending permission request",
  12408. "requestBody": {
  12409. "content": {
  12410. "application/json": {
  12411. "schema": {
  12412. "type": "object",
  12413. "properties": {
  12414. "reply": {
  12415. "$ref": "#/components/schemas/PermissionV2Reply"
  12416. },
  12417. "message": {
  12418. "type": "string"
  12419. }
  12420. },
  12421. "required": ["reply"],
  12422. "additionalProperties": false
  12423. }
  12424. }
  12425. },
  12426. "required": true
  12427. },
  12428. "x-codeSamples": [
  12429. {
  12430. "lang": "js",
  12431. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.permission.reply({\n ...\n})"
  12432. }
  12433. ]
  12434. }
  12435. },
  12436. "/api/fs/read/*": {
  12437. "get": {
  12438. "tags": ["filesystem"],
  12439. "operationId": "v2.fs.read",
  12440. "parameters": [
  12441. {
  12442. "name": "location",
  12443. "in": "query",
  12444. "schema": {
  12445. "type": "object",
  12446. "properties": {
  12447. "directory": {
  12448. "type": "string"
  12449. },
  12450. "workspace": {
  12451. "type": "string"
  12452. }
  12453. },
  12454. "additionalProperties": false
  12455. },
  12456. "required": false,
  12457. "style": "deepObject",
  12458. "explode": true
  12459. }
  12460. ],
  12461. "security": [],
  12462. "responses": {
  12463. "200": {
  12464. "description": "Success",
  12465. "content": {
  12466. "application/octet-stream": {
  12467. "schema": {
  12468. "type": "string",
  12469. "format": "binary"
  12470. }
  12471. }
  12472. }
  12473. },
  12474. "400": {
  12475. "description": "InvalidRequestError",
  12476. "content": {
  12477. "application/json": {
  12478. "schema": {
  12479. "$ref": "#/components/schemas/InvalidRequestError"
  12480. }
  12481. }
  12482. }
  12483. },
  12484. "401": {
  12485. "description": "UnauthorizedError",
  12486. "content": {
  12487. "application/json": {
  12488. "schema": {
  12489. "$ref": "#/components/schemas/UnauthorizedError"
  12490. }
  12491. }
  12492. }
  12493. }
  12494. },
  12495. "description": "Serve one file relative to the requested location.",
  12496. "summary": "Read file",
  12497. "x-codeSamples": [
  12498. {
  12499. "lang": "js",
  12500. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.read({\n ...\n})"
  12501. }
  12502. ]
  12503. }
  12504. },
  12505. "/api/fs/list": {
  12506. "get": {
  12507. "tags": ["filesystem"],
  12508. "operationId": "v2.fs.list",
  12509. "parameters": [
  12510. {
  12511. "name": "location",
  12512. "in": "query",
  12513. "schema": {
  12514. "type": "object",
  12515. "properties": {
  12516. "directory": {
  12517. "type": "string"
  12518. },
  12519. "workspace": {
  12520. "type": "string"
  12521. }
  12522. },
  12523. "additionalProperties": false
  12524. },
  12525. "required": false,
  12526. "style": "deepObject",
  12527. "explode": true
  12528. },
  12529. {
  12530. "name": "path",
  12531. "in": "query",
  12532. "schema": {
  12533. "type": "string"
  12534. },
  12535. "required": false
  12536. }
  12537. ],
  12538. "security": [],
  12539. "responses": {
  12540. "200": {
  12541. "description": "Success",
  12542. "content": {
  12543. "application/json": {
  12544. "schema": {
  12545. "type": "object",
  12546. "properties": {
  12547. "location": {
  12548. "$ref": "#/components/schemas/LocationInfo"
  12549. },
  12550. "data": {
  12551. "type": "array",
  12552. "items": {
  12553. "$ref": "#/components/schemas/FileSystemEntry"
  12554. }
  12555. }
  12556. },
  12557. "required": ["location", "data"],
  12558. "additionalProperties": false
  12559. }
  12560. }
  12561. }
  12562. },
  12563. "400": {
  12564. "description": "InvalidRequestError",
  12565. "content": {
  12566. "application/json": {
  12567. "schema": {
  12568. "$ref": "#/components/schemas/InvalidRequestError"
  12569. }
  12570. }
  12571. }
  12572. },
  12573. "401": {
  12574. "description": "UnauthorizedError",
  12575. "content": {
  12576. "application/json": {
  12577. "schema": {
  12578. "$ref": "#/components/schemas/UnauthorizedError"
  12579. }
  12580. }
  12581. }
  12582. }
  12583. },
  12584. "description": "List direct children of one directory relative to the requested location.",
  12585. "summary": "List directory",
  12586. "x-codeSamples": [
  12587. {
  12588. "lang": "js",
  12589. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.list({\n ...\n})"
  12590. }
  12591. ]
  12592. }
  12593. },
  12594. "/api/fs/find": {
  12595. "get": {
  12596. "tags": ["filesystem"],
  12597. "operationId": "v2.fs.find",
  12598. "parameters": [
  12599. {
  12600. "name": "location",
  12601. "in": "query",
  12602. "schema": {
  12603. "type": "object",
  12604. "properties": {
  12605. "directory": {
  12606. "type": "string"
  12607. },
  12608. "workspace": {
  12609. "type": "string"
  12610. }
  12611. },
  12612. "additionalProperties": false
  12613. },
  12614. "required": false,
  12615. "style": "deepObject",
  12616. "explode": true
  12617. },
  12618. {
  12619. "name": "query",
  12620. "in": "query",
  12621. "schema": {
  12622. "type": "string"
  12623. },
  12624. "required": true
  12625. },
  12626. {
  12627. "name": "type",
  12628. "in": "query",
  12629. "schema": {
  12630. "type": "string",
  12631. "enum": ["file", "directory"]
  12632. },
  12633. "required": false
  12634. },
  12635. {
  12636. "name": "limit",
  12637. "in": "query",
  12638. "schema": {
  12639. "type": "string"
  12640. },
  12641. "required": false
  12642. }
  12643. ],
  12644. "security": [],
  12645. "responses": {
  12646. "200": {
  12647. "description": "Success",
  12648. "content": {
  12649. "application/json": {
  12650. "schema": {
  12651. "type": "object",
  12652. "properties": {
  12653. "location": {
  12654. "$ref": "#/components/schemas/LocationInfo"
  12655. },
  12656. "data": {
  12657. "type": "array",
  12658. "items": {
  12659. "$ref": "#/components/schemas/FileSystemEntry"
  12660. }
  12661. }
  12662. },
  12663. "required": ["location", "data"],
  12664. "additionalProperties": false
  12665. }
  12666. }
  12667. }
  12668. },
  12669. "400": {
  12670. "description": "InvalidRequestError",
  12671. "content": {
  12672. "application/json": {
  12673. "schema": {
  12674. "$ref": "#/components/schemas/InvalidRequestError"
  12675. }
  12676. }
  12677. }
  12678. },
  12679. "401": {
  12680. "description": "UnauthorizedError",
  12681. "content": {
  12682. "application/json": {
  12683. "schema": {
  12684. "$ref": "#/components/schemas/UnauthorizedError"
  12685. }
  12686. }
  12687. }
  12688. }
  12689. },
  12690. "description": "Find recursively ranked filesystem entries relative to the requested location.",
  12691. "summary": "Find files",
  12692. "x-codeSamples": [
  12693. {
  12694. "lang": "js",
  12695. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.fs.find({\n ...\n})"
  12696. }
  12697. ]
  12698. }
  12699. },
  12700. "/api/command": {
  12701. "get": {
  12702. "tags": ["commands"],
  12703. "operationId": "v2.command.list",
  12704. "parameters": [
  12705. {
  12706. "name": "location",
  12707. "in": "query",
  12708. "schema": {
  12709. "type": "object",
  12710. "properties": {
  12711. "directory": {
  12712. "type": "string"
  12713. },
  12714. "workspace": {
  12715. "type": "string"
  12716. }
  12717. },
  12718. "additionalProperties": false
  12719. },
  12720. "required": false,
  12721. "style": "deepObject",
  12722. "explode": true
  12723. }
  12724. ],
  12725. "security": [],
  12726. "responses": {
  12727. "200": {
  12728. "description": "Success",
  12729. "content": {
  12730. "application/json": {
  12731. "schema": {
  12732. "type": "object",
  12733. "properties": {
  12734. "location": {
  12735. "$ref": "#/components/schemas/LocationInfo"
  12736. },
  12737. "data": {
  12738. "type": "array",
  12739. "items": {
  12740. "$ref": "#/components/schemas/CommandV2Info"
  12741. }
  12742. }
  12743. },
  12744. "required": ["location", "data"],
  12745. "additionalProperties": false
  12746. }
  12747. }
  12748. }
  12749. },
  12750. "400": {
  12751. "description": "InvalidRequestError",
  12752. "content": {
  12753. "application/json": {
  12754. "schema": {
  12755. "$ref": "#/components/schemas/InvalidRequestError"
  12756. }
  12757. }
  12758. }
  12759. },
  12760. "401": {
  12761. "description": "UnauthorizedError",
  12762. "content": {
  12763. "application/json": {
  12764. "schema": {
  12765. "$ref": "#/components/schemas/UnauthorizedError"
  12766. }
  12767. }
  12768. }
  12769. }
  12770. },
  12771. "description": "Retrieve currently registered commands.",
  12772. "summary": "List commands",
  12773. "x-codeSamples": [
  12774. {
  12775. "lang": "js",
  12776. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.command.list({\n ...\n})"
  12777. }
  12778. ]
  12779. }
  12780. },
  12781. "/api/skill": {
  12782. "get": {
  12783. "tags": ["skills"],
  12784. "operationId": "v2.skill.list",
  12785. "parameters": [
  12786. {
  12787. "name": "location",
  12788. "in": "query",
  12789. "schema": {
  12790. "type": "object",
  12791. "properties": {
  12792. "directory": {
  12793. "type": "string"
  12794. },
  12795. "workspace": {
  12796. "type": "string"
  12797. }
  12798. },
  12799. "additionalProperties": false
  12800. },
  12801. "required": false,
  12802. "style": "deepObject",
  12803. "explode": true
  12804. }
  12805. ],
  12806. "security": [],
  12807. "responses": {
  12808. "200": {
  12809. "description": "Success",
  12810. "content": {
  12811. "application/json": {
  12812. "schema": {
  12813. "type": "object",
  12814. "properties": {
  12815. "location": {
  12816. "$ref": "#/components/schemas/LocationInfo"
  12817. },
  12818. "data": {
  12819. "type": "array",
  12820. "items": {
  12821. "$ref": "#/components/schemas/SkillV2Info"
  12822. }
  12823. }
  12824. },
  12825. "required": ["location", "data"],
  12826. "additionalProperties": false
  12827. }
  12828. }
  12829. }
  12830. },
  12831. "400": {
  12832. "description": "InvalidRequestError",
  12833. "content": {
  12834. "application/json": {
  12835. "schema": {
  12836. "$ref": "#/components/schemas/InvalidRequestError"
  12837. }
  12838. }
  12839. }
  12840. },
  12841. "401": {
  12842. "description": "UnauthorizedError",
  12843. "content": {
  12844. "application/json": {
  12845. "schema": {
  12846. "$ref": "#/components/schemas/UnauthorizedError"
  12847. }
  12848. }
  12849. }
  12850. }
  12851. },
  12852. "description": "Retrieve currently registered skills.",
  12853. "summary": "List skills",
  12854. "x-codeSamples": [
  12855. {
  12856. "lang": "js",
  12857. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.skill.list({\n ...\n})"
  12858. }
  12859. ]
  12860. }
  12861. },
  12862. "/api/event": {
  12863. "get": {
  12864. "tags": ["events"],
  12865. "operationId": "v2.event.subscribe",
  12866. "parameters": [
  12867. {
  12868. "name": "location",
  12869. "in": "query",
  12870. "schema": {
  12871. "type": "object",
  12872. "properties": {
  12873. "directory": {
  12874. "type": "string"
  12875. },
  12876. "workspace": {
  12877. "type": "string"
  12878. }
  12879. },
  12880. "additionalProperties": false
  12881. },
  12882. "required": false,
  12883. "style": "deepObject",
  12884. "explode": true
  12885. }
  12886. ],
  12887. "security": [],
  12888. "responses": {
  12889. "200": {
  12890. "description": "Success",
  12891. "content": {
  12892. "text/event-stream": {
  12893. "schema": {
  12894. "type": "string"
  12895. }
  12896. }
  12897. }
  12898. },
  12899. "400": {
  12900. "description": "InvalidRequestError",
  12901. "content": {
  12902. "application/json": {
  12903. "schema": {
  12904. "$ref": "#/components/schemas/InvalidRequestError"
  12905. }
  12906. }
  12907. }
  12908. },
  12909. "401": {
  12910. "description": "UnauthorizedError",
  12911. "content": {
  12912. "application/json": {
  12913. "schema": {
  12914. "$ref": "#/components/schemas/UnauthorizedError"
  12915. }
  12916. }
  12917. }
  12918. }
  12919. },
  12920. "description": "Subscribe to native event payloads for a location.",
  12921. "summary": "Subscribe to events",
  12922. "x-codeSamples": [
  12923. {
  12924. "lang": "js",
  12925. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.event.subscribe({\n ...\n})"
  12926. }
  12927. ]
  12928. }
  12929. },
  12930. "/api/pty": {
  12931. "get": {
  12932. "tags": ["pty"],
  12933. "operationId": "v2.pty.list",
  12934. "parameters": [
  12935. {
  12936. "name": "location",
  12937. "in": "query",
  12938. "schema": {
  12939. "type": "object",
  12940. "properties": {
  12941. "directory": {
  12942. "type": "string"
  12943. },
  12944. "workspace": {
  12945. "type": "string"
  12946. }
  12947. },
  12948. "additionalProperties": false
  12949. },
  12950. "required": false,
  12951. "style": "deepObject",
  12952. "explode": true
  12953. }
  12954. ],
  12955. "security": [],
  12956. "responses": {
  12957. "200": {
  12958. "description": "Success",
  12959. "content": {
  12960. "application/json": {
  12961. "schema": {
  12962. "type": "object",
  12963. "properties": {
  12964. "location": {
  12965. "$ref": "#/components/schemas/LocationInfo"
  12966. },
  12967. "data": {
  12968. "type": "array",
  12969. "items": {
  12970. "$ref": "#/components/schemas/Pty"
  12971. }
  12972. }
  12973. },
  12974. "required": ["location", "data"],
  12975. "additionalProperties": false
  12976. }
  12977. }
  12978. }
  12979. },
  12980. "400": {
  12981. "description": "InvalidRequestError",
  12982. "content": {
  12983. "application/json": {
  12984. "schema": {
  12985. "$ref": "#/components/schemas/InvalidRequestError"
  12986. }
  12987. }
  12988. }
  12989. },
  12990. "401": {
  12991. "description": "UnauthorizedError",
  12992. "content": {
  12993. "application/json": {
  12994. "schema": {
  12995. "$ref": "#/components/schemas/UnauthorizedError"
  12996. }
  12997. }
  12998. }
  12999. }
  13000. },
  13001. "description": "List PTY sessions for a location, including exited sessions retained until removal.",
  13002. "summary": "List PTY sessions",
  13003. "x-codeSamples": [
  13004. {
  13005. "lang": "js",
  13006. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.list({\n ...\n})"
  13007. }
  13008. ]
  13009. },
  13010. "post": {
  13011. "tags": ["pty"],
  13012. "operationId": "v2.pty.create",
  13013. "parameters": [
  13014. {
  13015. "name": "location",
  13016. "in": "query",
  13017. "schema": {
  13018. "type": "object",
  13019. "properties": {
  13020. "directory": {
  13021. "type": "string"
  13022. },
  13023. "workspace": {
  13024. "type": "string"
  13025. }
  13026. },
  13027. "additionalProperties": false
  13028. },
  13029. "required": false,
  13030. "style": "deepObject",
  13031. "explode": true
  13032. }
  13033. ],
  13034. "security": [],
  13035. "responses": {
  13036. "200": {
  13037. "description": "Success",
  13038. "content": {
  13039. "application/json": {
  13040. "schema": {
  13041. "type": "object",
  13042. "properties": {
  13043. "location": {
  13044. "$ref": "#/components/schemas/LocationInfo"
  13045. },
  13046. "data": {
  13047. "$ref": "#/components/schemas/Pty"
  13048. }
  13049. },
  13050. "required": ["location", "data"],
  13051. "additionalProperties": false
  13052. }
  13053. }
  13054. }
  13055. },
  13056. "400": {
  13057. "description": "InvalidRequestError",
  13058. "content": {
  13059. "application/json": {
  13060. "schema": {
  13061. "$ref": "#/components/schemas/InvalidRequestError"
  13062. }
  13063. }
  13064. }
  13065. },
  13066. "401": {
  13067. "description": "UnauthorizedError",
  13068. "content": {
  13069. "application/json": {
  13070. "schema": {
  13071. "$ref": "#/components/schemas/UnauthorizedError"
  13072. }
  13073. }
  13074. }
  13075. }
  13076. },
  13077. "description": "Create a pseudo-terminal session for a location.",
  13078. "summary": "Create PTY session",
  13079. "requestBody": {
  13080. "content": {
  13081. "application/json": {
  13082. "schema": {
  13083. "type": "object",
  13084. "properties": {
  13085. "command": {
  13086. "type": "string"
  13087. },
  13088. "args": {
  13089. "type": "array",
  13090. "items": {
  13091. "type": "string"
  13092. }
  13093. },
  13094. "cwd": {
  13095. "type": "string"
  13096. },
  13097. "title": {
  13098. "type": "string"
  13099. },
  13100. "env": {
  13101. "type": "object",
  13102. "additionalProperties": {
  13103. "type": "string"
  13104. }
  13105. }
  13106. },
  13107. "additionalProperties": false
  13108. }
  13109. }
  13110. },
  13111. "required": true
  13112. },
  13113. "x-codeSamples": [
  13114. {
  13115. "lang": "js",
  13116. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.create({\n ...\n})"
  13117. }
  13118. ]
  13119. }
  13120. },
  13121. "/api/pty/{ptyID}": {
  13122. "get": {
  13123. "tags": ["pty"],
  13124. "operationId": "v2.pty.get",
  13125. "parameters": [
  13126. {
  13127. "name": "ptyID",
  13128. "in": "path",
  13129. "schema": {
  13130. "type": "string",
  13131. "pattern": "^pty"
  13132. },
  13133. "required": true
  13134. },
  13135. {
  13136. "name": "location",
  13137. "in": "query",
  13138. "schema": {
  13139. "type": "object",
  13140. "properties": {
  13141. "directory": {
  13142. "type": "string"
  13143. },
  13144. "workspace": {
  13145. "type": "string"
  13146. }
  13147. },
  13148. "additionalProperties": false
  13149. },
  13150. "required": false,
  13151. "style": "deepObject",
  13152. "explode": true
  13153. }
  13154. ],
  13155. "security": [],
  13156. "responses": {
  13157. "200": {
  13158. "description": "Success",
  13159. "content": {
  13160. "application/json": {
  13161. "schema": {
  13162. "type": "object",
  13163. "properties": {
  13164. "location": {
  13165. "$ref": "#/components/schemas/LocationInfo"
  13166. },
  13167. "data": {
  13168. "$ref": "#/components/schemas/Pty"
  13169. }
  13170. },
  13171. "required": ["location", "data"],
  13172. "additionalProperties": false
  13173. }
  13174. }
  13175. }
  13176. },
  13177. "400": {
  13178. "description": "InvalidRequestError",
  13179. "content": {
  13180. "application/json": {
  13181. "schema": {
  13182. "$ref": "#/components/schemas/InvalidRequestError"
  13183. }
  13184. }
  13185. }
  13186. },
  13187. "401": {
  13188. "description": "UnauthorizedError",
  13189. "content": {
  13190. "application/json": {
  13191. "schema": {
  13192. "$ref": "#/components/schemas/UnauthorizedError"
  13193. }
  13194. }
  13195. }
  13196. },
  13197. "404": {
  13198. "description": "PtyNotFoundError",
  13199. "content": {
  13200. "application/json": {
  13201. "schema": {
  13202. "$ref": "#/components/schemas/PtyNotFoundError"
  13203. }
  13204. }
  13205. }
  13206. }
  13207. },
  13208. "description": "Get one PTY session, including its exit code once exited.",
  13209. "summary": "Get PTY session",
  13210. "x-codeSamples": [
  13211. {
  13212. "lang": "js",
  13213. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.get({\n ...\n})"
  13214. }
  13215. ]
  13216. },
  13217. "put": {
  13218. "tags": ["pty"],
  13219. "operationId": "v2.pty.update",
  13220. "parameters": [
  13221. {
  13222. "name": "ptyID",
  13223. "in": "path",
  13224. "schema": {
  13225. "type": "string",
  13226. "pattern": "^pty"
  13227. },
  13228. "required": true
  13229. },
  13230. {
  13231. "name": "location",
  13232. "in": "query",
  13233. "schema": {
  13234. "type": "object",
  13235. "properties": {
  13236. "directory": {
  13237. "type": "string"
  13238. },
  13239. "workspace": {
  13240. "type": "string"
  13241. }
  13242. },
  13243. "additionalProperties": false
  13244. },
  13245. "required": false,
  13246. "style": "deepObject",
  13247. "explode": true
  13248. }
  13249. ],
  13250. "security": [],
  13251. "responses": {
  13252. "200": {
  13253. "description": "Success",
  13254. "content": {
  13255. "application/json": {
  13256. "schema": {
  13257. "type": "object",
  13258. "properties": {
  13259. "location": {
  13260. "$ref": "#/components/schemas/LocationInfo"
  13261. },
  13262. "data": {
  13263. "$ref": "#/components/schemas/Pty"
  13264. }
  13265. },
  13266. "required": ["location", "data"],
  13267. "additionalProperties": false
  13268. }
  13269. }
  13270. }
  13271. },
  13272. "400": {
  13273. "description": "InvalidRequestError",
  13274. "content": {
  13275. "application/json": {
  13276. "schema": {
  13277. "$ref": "#/components/schemas/InvalidRequestError"
  13278. }
  13279. }
  13280. }
  13281. },
  13282. "401": {
  13283. "description": "UnauthorizedError",
  13284. "content": {
  13285. "application/json": {
  13286. "schema": {
  13287. "$ref": "#/components/schemas/UnauthorizedError"
  13288. }
  13289. }
  13290. }
  13291. },
  13292. "404": {
  13293. "description": "PtyNotFoundError",
  13294. "content": {
  13295. "application/json": {
  13296. "schema": {
  13297. "$ref": "#/components/schemas/PtyNotFoundError"
  13298. }
  13299. }
  13300. }
  13301. }
  13302. },
  13303. "description": "Update the title or viewport size of one PTY session.",
  13304. "summary": "Update PTY session",
  13305. "requestBody": {
  13306. "content": {
  13307. "application/json": {
  13308. "schema": {
  13309. "type": "object",
  13310. "properties": {
  13311. "title": {
  13312. "type": "string"
  13313. },
  13314. "size": {
  13315. "type": "object",
  13316. "properties": {
  13317. "rows": {
  13318. "type": "integer",
  13319. "exclusiveMinimum": 0
  13320. },
  13321. "cols": {
  13322. "type": "integer",
  13323. "exclusiveMinimum": 0
  13324. }
  13325. },
  13326. "required": ["rows", "cols"],
  13327. "additionalProperties": false
  13328. }
  13329. },
  13330. "additionalProperties": false
  13331. }
  13332. }
  13333. },
  13334. "required": true
  13335. },
  13336. "x-codeSamples": [
  13337. {
  13338. "lang": "js",
  13339. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.update({\n ...\n})"
  13340. }
  13341. ]
  13342. },
  13343. "delete": {
  13344. "tags": ["pty"],
  13345. "operationId": "v2.pty.remove",
  13346. "parameters": [
  13347. {
  13348. "name": "ptyID",
  13349. "in": "path",
  13350. "schema": {
  13351. "type": "string",
  13352. "pattern": "^pty"
  13353. },
  13354. "required": true
  13355. },
  13356. {
  13357. "name": "location",
  13358. "in": "query",
  13359. "schema": {
  13360. "type": "object",
  13361. "properties": {
  13362. "directory": {
  13363. "type": "string"
  13364. },
  13365. "workspace": {
  13366. "type": "string"
  13367. }
  13368. },
  13369. "additionalProperties": false
  13370. },
  13371. "required": false,
  13372. "style": "deepObject",
  13373. "explode": true
  13374. }
  13375. ],
  13376. "security": [],
  13377. "responses": {
  13378. "204": {
  13379. "description": "<No Content>"
  13380. },
  13381. "400": {
  13382. "description": "InvalidRequestError",
  13383. "content": {
  13384. "application/json": {
  13385. "schema": {
  13386. "$ref": "#/components/schemas/InvalidRequestError"
  13387. }
  13388. }
  13389. }
  13390. },
  13391. "401": {
  13392. "description": "UnauthorizedError",
  13393. "content": {
  13394. "application/json": {
  13395. "schema": {
  13396. "$ref": "#/components/schemas/UnauthorizedError"
  13397. }
  13398. }
  13399. }
  13400. },
  13401. "404": {
  13402. "description": "PtyNotFoundError",
  13403. "content": {
  13404. "application/json": {
  13405. "schema": {
  13406. "$ref": "#/components/schemas/PtyNotFoundError"
  13407. }
  13408. }
  13409. }
  13410. }
  13411. },
  13412. "description": "Terminate and remove one PTY session.",
  13413. "summary": "Remove PTY session",
  13414. "x-codeSamples": [
  13415. {
  13416. "lang": "js",
  13417. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.remove({\n ...\n})"
  13418. }
  13419. ]
  13420. }
  13421. },
  13422. "/api/pty/{ptyID}/connect-token": {
  13423. "post": {
  13424. "tags": ["pty"],
  13425. "operationId": "v2.pty.connectToken",
  13426. "parameters": [
  13427. {
  13428. "name": "ptyID",
  13429. "in": "path",
  13430. "schema": {
  13431. "type": "string",
  13432. "pattern": "^pty"
  13433. },
  13434. "required": true
  13435. },
  13436. {
  13437. "name": "location",
  13438. "in": "query",
  13439. "schema": {
  13440. "type": "object",
  13441. "properties": {
  13442. "directory": {
  13443. "type": "string"
  13444. },
  13445. "workspace": {
  13446. "type": "string"
  13447. }
  13448. },
  13449. "additionalProperties": false
  13450. },
  13451. "required": false,
  13452. "style": "deepObject",
  13453. "explode": true
  13454. }
  13455. ],
  13456. "security": [],
  13457. "responses": {
  13458. "200": {
  13459. "description": "Success",
  13460. "content": {
  13461. "application/json": {
  13462. "schema": {
  13463. "type": "object",
  13464. "properties": {
  13465. "location": {
  13466. "$ref": "#/components/schemas/LocationInfo"
  13467. },
  13468. "data": {
  13469. "type": "object",
  13470. "properties": {
  13471. "ticket": {
  13472. "type": "string"
  13473. },
  13474. "expires_in": {
  13475. "type": "integer",
  13476. "exclusiveMinimum": 0
  13477. }
  13478. },
  13479. "required": ["ticket", "expires_in"],
  13480. "additionalProperties": false
  13481. }
  13482. },
  13483. "required": ["location", "data"],
  13484. "additionalProperties": false
  13485. }
  13486. }
  13487. }
  13488. },
  13489. "400": {
  13490. "description": "InvalidRequestError",
  13491. "content": {
  13492. "application/json": {
  13493. "schema": {
  13494. "$ref": "#/components/schemas/InvalidRequestError"
  13495. }
  13496. }
  13497. }
  13498. },
  13499. "401": {
  13500. "description": "UnauthorizedError",
  13501. "content": {
  13502. "application/json": {
  13503. "schema": {
  13504. "$ref": "#/components/schemas/UnauthorizedError"
  13505. }
  13506. }
  13507. }
  13508. },
  13509. "403": {
  13510. "description": "ForbiddenError",
  13511. "content": {
  13512. "application/json": {
  13513. "schema": {
  13514. "$ref": "#/components/schemas/ForbiddenError"
  13515. }
  13516. }
  13517. }
  13518. },
  13519. "404": {
  13520. "description": "PtyNotFoundError",
  13521. "content": {
  13522. "application/json": {
  13523. "schema": {
  13524. "$ref": "#/components/schemas/PtyNotFoundError"
  13525. }
  13526. }
  13527. }
  13528. }
  13529. },
  13530. "description": "Create a short-lived single-use ticket for opening a PTY WebSocket connection.",
  13531. "summary": "Create PTY WebSocket token",
  13532. "x-codeSamples": [
  13533. {
  13534. "lang": "js",
  13535. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connectToken({\n ...\n})"
  13536. }
  13537. ]
  13538. }
  13539. },
  13540. "/api/pty/{ptyID}/connect": {
  13541. "get": {
  13542. "tags": ["pty"],
  13543. "operationId": "v2.pty.connect",
  13544. "parameters": [
  13545. {
  13546. "name": "ptyID",
  13547. "in": "path",
  13548. "schema": {
  13549. "type": "string",
  13550. "pattern": "^pty"
  13551. },
  13552. "required": true
  13553. },
  13554. {
  13555. "in": "query",
  13556. "name": "location[directory]",
  13557. "schema": {
  13558. "type": "string"
  13559. }
  13560. },
  13561. {
  13562. "in": "query",
  13563. "name": "location[workspace]",
  13564. "schema": {
  13565. "type": "string"
  13566. }
  13567. },
  13568. {
  13569. "in": "query",
  13570. "name": "cursor",
  13571. "schema": {
  13572. "type": "string"
  13573. }
  13574. },
  13575. {
  13576. "in": "query",
  13577. "name": "ticket",
  13578. "schema": {
  13579. "type": "string"
  13580. }
  13581. }
  13582. ],
  13583. "security": [],
  13584. "responses": {
  13585. "200": {
  13586. "description": "Success",
  13587. "content": {
  13588. "application/json": {
  13589. "schema": {
  13590. "type": "boolean"
  13591. }
  13592. }
  13593. }
  13594. },
  13595. "400": {
  13596. "description": "InvalidRequestError",
  13597. "content": {
  13598. "application/json": {
  13599. "schema": {
  13600. "$ref": "#/components/schemas/InvalidRequestError"
  13601. }
  13602. }
  13603. }
  13604. },
  13605. "401": {
  13606. "description": "UnauthorizedError",
  13607. "content": {
  13608. "application/json": {
  13609. "schema": {
  13610. "$ref": "#/components/schemas/UnauthorizedError"
  13611. }
  13612. }
  13613. }
  13614. },
  13615. "403": {
  13616. "description": "ForbiddenError",
  13617. "content": {
  13618. "application/json": {
  13619. "schema": {
  13620. "$ref": "#/components/schemas/ForbiddenError"
  13621. }
  13622. }
  13623. }
  13624. },
  13625. "404": {
  13626. "description": "PtyNotFoundError",
  13627. "content": {
  13628. "application/json": {
  13629. "schema": {
  13630. "$ref": "#/components/schemas/PtyNotFoundError"
  13631. }
  13632. }
  13633. }
  13634. }
  13635. },
  13636. "description": "Establish a WebSocket connection streaming PTY output and accepting terminal input.",
  13637. "summary": "Connect to PTY session",
  13638. "x-codeSamples": [
  13639. {
  13640. "lang": "js",
  13641. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.pty.connect({\n ...\n})"
  13642. }
  13643. ]
  13644. }
  13645. },
  13646. "/api/question/request": {
  13647. "get": {
  13648. "tags": ["session questions"],
  13649. "operationId": "v2.question.request.list",
  13650. "parameters": [
  13651. {
  13652. "name": "location",
  13653. "in": "query",
  13654. "schema": {
  13655. "type": "object",
  13656. "properties": {
  13657. "directory": {
  13658. "type": "string"
  13659. },
  13660. "workspace": {
  13661. "type": "string"
  13662. }
  13663. },
  13664. "additionalProperties": false
  13665. },
  13666. "required": false,
  13667. "style": "deepObject",
  13668. "explode": true
  13669. }
  13670. ],
  13671. "security": [],
  13672. "responses": {
  13673. "200": {
  13674. "description": "Success",
  13675. "content": {
  13676. "application/json": {
  13677. "schema": {
  13678. "type": "object",
  13679. "properties": {
  13680. "location": {
  13681. "$ref": "#/components/schemas/LocationInfo"
  13682. },
  13683. "data": {
  13684. "type": "array",
  13685. "items": {
  13686. "$ref": "#/components/schemas/QuestionV2Request"
  13687. }
  13688. }
  13689. },
  13690. "required": ["location", "data"],
  13691. "additionalProperties": false
  13692. }
  13693. }
  13694. }
  13695. },
  13696. "400": {
  13697. "description": "InvalidRequestError",
  13698. "content": {
  13699. "application/json": {
  13700. "schema": {
  13701. "$ref": "#/components/schemas/InvalidRequestError"
  13702. }
  13703. }
  13704. }
  13705. },
  13706. "401": {
  13707. "description": "UnauthorizedError",
  13708. "content": {
  13709. "application/json": {
  13710. "schema": {
  13711. "$ref": "#/components/schemas/UnauthorizedError"
  13712. }
  13713. }
  13714. }
  13715. }
  13716. },
  13717. "description": "Retrieve pending question requests for a location.",
  13718. "summary": "List pending question requests",
  13719. "x-codeSamples": [
  13720. {
  13721. "lang": "js",
  13722. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.question.request.list({\n ...\n})"
  13723. }
  13724. ]
  13725. }
  13726. },
  13727. "/api/session/{sessionID}/question": {
  13728. "get": {
  13729. "tags": ["session questions"],
  13730. "operationId": "v2.session.question.list",
  13731. "parameters": [
  13732. {
  13733. "name": "sessionID",
  13734. "in": "path",
  13735. "schema": {
  13736. "type": "string",
  13737. "pattern": "^ses"
  13738. },
  13739. "required": true
  13740. }
  13741. ],
  13742. "security": [],
  13743. "responses": {
  13744. "200": {
  13745. "description": "Success",
  13746. "content": {
  13747. "application/json": {
  13748. "schema": {
  13749. "type": "object",
  13750. "properties": {
  13751. "data": {
  13752. "type": "array",
  13753. "items": {
  13754. "$ref": "#/components/schemas/QuestionV2Request"
  13755. }
  13756. }
  13757. },
  13758. "required": ["data"],
  13759. "additionalProperties": false
  13760. }
  13761. }
  13762. }
  13763. },
  13764. "400": {
  13765. "description": "InvalidRequestError",
  13766. "content": {
  13767. "application/json": {
  13768. "schema": {
  13769. "$ref": "#/components/schemas/InvalidRequestError"
  13770. }
  13771. }
  13772. }
  13773. },
  13774. "401": {
  13775. "description": "UnauthorizedError",
  13776. "content": {
  13777. "application/json": {
  13778. "schema": {
  13779. "$ref": "#/components/schemas/UnauthorizedError"
  13780. }
  13781. }
  13782. }
  13783. },
  13784. "404": {
  13785. "description": "SessionNotFoundError",
  13786. "content": {
  13787. "application/json": {
  13788. "schema": {
  13789. "anyOf": [
  13790. {
  13791. "$ref": "#/components/schemas/SessionNotFoundError"
  13792. },
  13793. {
  13794. "$ref": "#/components/schemas/SessionNotFoundError"
  13795. }
  13796. ]
  13797. }
  13798. }
  13799. }
  13800. }
  13801. },
  13802. "description": "Retrieve pending question requests owned by a session.",
  13803. "summary": "List session question requests",
  13804. "x-codeSamples": [
  13805. {
  13806. "lang": "js",
  13807. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.list({\n ...\n})"
  13808. }
  13809. ]
  13810. }
  13811. },
  13812. "/api/session/{sessionID}/question/{requestID}/reply": {
  13813. "post": {
  13814. "tags": ["session questions"],
  13815. "operationId": "v2.session.question.reply",
  13816. "parameters": [
  13817. {
  13818. "name": "sessionID",
  13819. "in": "path",
  13820. "schema": {
  13821. "type": "string",
  13822. "pattern": "^ses"
  13823. },
  13824. "required": true
  13825. },
  13826. {
  13827. "name": "requestID",
  13828. "in": "path",
  13829. "schema": {
  13830. "type": "string",
  13831. "pattern": "^que"
  13832. },
  13833. "required": true
  13834. }
  13835. ],
  13836. "security": [],
  13837. "responses": {
  13838. "204": {
  13839. "description": "<No Content>"
  13840. },
  13841. "400": {
  13842. "description": "InvalidRequestError",
  13843. "content": {
  13844. "application/json": {
  13845. "schema": {
  13846. "$ref": "#/components/schemas/InvalidRequestError"
  13847. }
  13848. }
  13849. }
  13850. },
  13851. "401": {
  13852. "description": "UnauthorizedError",
  13853. "content": {
  13854. "application/json": {
  13855. "schema": {
  13856. "$ref": "#/components/schemas/UnauthorizedError"
  13857. }
  13858. }
  13859. }
  13860. },
  13861. "404": {
  13862. "description": "SessionNotFoundError | QuestionNotFoundError",
  13863. "content": {
  13864. "application/json": {
  13865. "schema": {
  13866. "anyOf": [
  13867. {
  13868. "$ref": "#/components/schemas/QuestionNotFoundError"
  13869. },
  13870. {
  13871. "$ref": "#/components/schemas/SessionNotFoundError"
  13872. },
  13873. {
  13874. "$ref": "#/components/schemas/SessionNotFoundError"
  13875. }
  13876. ]
  13877. }
  13878. }
  13879. }
  13880. }
  13881. },
  13882. "description": "Answer a pending question request owned by a session.",
  13883. "summary": "Reply to pending question request",
  13884. "requestBody": {
  13885. "content": {
  13886. "application/json": {
  13887. "schema": {
  13888. "$ref": "#/components/schemas/QuestionV2Reply"
  13889. }
  13890. }
  13891. },
  13892. "required": true
  13893. },
  13894. "x-codeSamples": [
  13895. {
  13896. "lang": "js",
  13897. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reply({\n ...\n})"
  13898. }
  13899. ]
  13900. }
  13901. },
  13902. "/api/session/{sessionID}/question/{requestID}/reject": {
  13903. "post": {
  13904. "tags": ["session questions"],
  13905. "operationId": "v2.session.question.reject",
  13906. "parameters": [
  13907. {
  13908. "name": "sessionID",
  13909. "in": "path",
  13910. "schema": {
  13911. "type": "string",
  13912. "pattern": "^ses"
  13913. },
  13914. "required": true
  13915. },
  13916. {
  13917. "name": "requestID",
  13918. "in": "path",
  13919. "schema": {
  13920. "type": "string",
  13921. "pattern": "^que"
  13922. },
  13923. "required": true
  13924. }
  13925. ],
  13926. "security": [],
  13927. "responses": {
  13928. "204": {
  13929. "description": "<No Content>"
  13930. },
  13931. "400": {
  13932. "description": "InvalidRequestError",
  13933. "content": {
  13934. "application/json": {
  13935. "schema": {
  13936. "$ref": "#/components/schemas/InvalidRequestError"
  13937. }
  13938. }
  13939. }
  13940. },
  13941. "401": {
  13942. "description": "UnauthorizedError",
  13943. "content": {
  13944. "application/json": {
  13945. "schema": {
  13946. "$ref": "#/components/schemas/UnauthorizedError"
  13947. }
  13948. }
  13949. }
  13950. },
  13951. "404": {
  13952. "description": "SessionNotFoundError | QuestionNotFoundError",
  13953. "content": {
  13954. "application/json": {
  13955. "schema": {
  13956. "anyOf": [
  13957. {
  13958. "$ref": "#/components/schemas/QuestionNotFoundError"
  13959. },
  13960. {
  13961. "$ref": "#/components/schemas/SessionNotFoundError"
  13962. },
  13963. {
  13964. "$ref": "#/components/schemas/SessionNotFoundError"
  13965. }
  13966. ]
  13967. }
  13968. }
  13969. }
  13970. }
  13971. },
  13972. "description": "Reject a pending question request owned by a session.",
  13973. "summary": "Reject pending question request",
  13974. "x-codeSamples": [
  13975. {
  13976. "lang": "js",
  13977. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.question.reject({\n ...\n})"
  13978. }
  13979. ]
  13980. }
  13981. },
  13982. "/api/reference": {
  13983. "get": {
  13984. "tags": ["reference"],
  13985. "operationId": "v2.reference.list",
  13986. "parameters": [
  13987. {
  13988. "name": "location",
  13989. "in": "query",
  13990. "schema": {
  13991. "type": "object",
  13992. "properties": {
  13993. "directory": {
  13994. "type": "string"
  13995. },
  13996. "workspace": {
  13997. "type": "string"
  13998. }
  13999. },
  14000. "additionalProperties": false
  14001. },
  14002. "required": false,
  14003. "style": "deepObject",
  14004. "explode": true
  14005. }
  14006. ],
  14007. "security": [],
  14008. "responses": {
  14009. "200": {
  14010. "description": "Success",
  14011. "content": {
  14012. "application/json": {
  14013. "schema": {
  14014. "type": "object",
  14015. "properties": {
  14016. "location": {
  14017. "$ref": "#/components/schemas/LocationInfo"
  14018. },
  14019. "data": {
  14020. "type": "array",
  14021. "items": {
  14022. "$ref": "#/components/schemas/ReferenceInfo"
  14023. }
  14024. }
  14025. },
  14026. "required": ["location", "data"],
  14027. "additionalProperties": false
  14028. }
  14029. }
  14030. }
  14031. },
  14032. "400": {
  14033. "description": "InvalidRequestError",
  14034. "content": {
  14035. "application/json": {
  14036. "schema": {
  14037. "$ref": "#/components/schemas/InvalidRequestError"
  14038. }
  14039. }
  14040. }
  14041. },
  14042. "401": {
  14043. "description": "UnauthorizedError",
  14044. "content": {
  14045. "application/json": {
  14046. "schema": {
  14047. "$ref": "#/components/schemas/UnauthorizedError"
  14048. }
  14049. }
  14050. }
  14051. }
  14052. },
  14053. "description": "List references available in the requested location.",
  14054. "summary": "List references",
  14055. "x-codeSamples": [
  14056. {
  14057. "lang": "js",
  14058. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.reference.list({\n ...\n})"
  14059. }
  14060. ]
  14061. }
  14062. },
  14063. "/experimental/project/{projectID}/copy": {
  14064. "post": {
  14065. "tags": ["projectCopy"],
  14066. "operationId": "v2.projectCopy.create",
  14067. "parameters": [
  14068. {
  14069. "name": "projectID",
  14070. "in": "path",
  14071. "schema": {
  14072. "type": "string"
  14073. },
  14074. "required": true
  14075. },
  14076. {
  14077. "name": "location",
  14078. "in": "query",
  14079. "schema": {
  14080. "type": "object",
  14081. "properties": {
  14082. "directory": {
  14083. "type": "string"
  14084. },
  14085. "workspace": {
  14086. "type": "string"
  14087. }
  14088. },
  14089. "additionalProperties": false
  14090. },
  14091. "required": false,
  14092. "style": "deepObject",
  14093. "explode": true
  14094. }
  14095. ],
  14096. "responses": {
  14097. "200": {
  14098. "description": "ProjectCopy.Copy",
  14099. "content": {
  14100. "application/json": {
  14101. "schema": {
  14102. "$ref": "#/components/schemas/ProjectCopyCopy"
  14103. }
  14104. }
  14105. }
  14106. },
  14107. "400": {
  14108. "description": "ProjectCopyError | InvalidRequestError",
  14109. "content": {
  14110. "application/json": {
  14111. "schema": {
  14112. "anyOf": [
  14113. {
  14114. "$ref": "#/components/schemas/ProjectCopyError"
  14115. },
  14116. {
  14117. "$ref": "#/components/schemas/InvalidRequestError"
  14118. }
  14119. ]
  14120. }
  14121. }
  14122. }
  14123. }
  14124. },
  14125. "requestBody": {
  14126. "content": {
  14127. "application/json": {
  14128. "schema": {
  14129. "type": "object",
  14130. "properties": {
  14131. "strategy": {
  14132. "type": "string"
  14133. },
  14134. "directory": {
  14135. "type": "string"
  14136. },
  14137. "name": {
  14138. "type": "string"
  14139. }
  14140. },
  14141. "required": ["strategy", "directory"],
  14142. "additionalProperties": false
  14143. }
  14144. }
  14145. }
  14146. },
  14147. "x-codeSamples": [
  14148. {
  14149. "lang": "js",
  14150. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.create({\n ...\n})"
  14151. }
  14152. ]
  14153. },
  14154. "delete": {
  14155. "tags": ["projectCopy"],
  14156. "operationId": "v2.projectCopy.remove",
  14157. "parameters": [
  14158. {
  14159. "name": "projectID",
  14160. "in": "path",
  14161. "schema": {
  14162. "type": "string"
  14163. },
  14164. "required": true
  14165. },
  14166. {
  14167. "name": "location",
  14168. "in": "query",
  14169. "schema": {
  14170. "type": "object",
  14171. "properties": {
  14172. "directory": {
  14173. "type": "string"
  14174. },
  14175. "workspace": {
  14176. "type": "string"
  14177. }
  14178. },
  14179. "additionalProperties": false
  14180. },
  14181. "required": false,
  14182. "style": "deepObject",
  14183. "explode": true
  14184. }
  14185. ],
  14186. "responses": {
  14187. "204": {
  14188. "description": "<No Content>"
  14189. },
  14190. "400": {
  14191. "description": "ProjectCopyError | InvalidRequestError",
  14192. "content": {
  14193. "application/json": {
  14194. "schema": {
  14195. "anyOf": [
  14196. {
  14197. "$ref": "#/components/schemas/ProjectCopyError"
  14198. },
  14199. {
  14200. "$ref": "#/components/schemas/InvalidRequestError"
  14201. }
  14202. ]
  14203. }
  14204. }
  14205. }
  14206. }
  14207. },
  14208. "requestBody": {
  14209. "content": {
  14210. "application/json": {
  14211. "schema": {
  14212. "type": "object",
  14213. "properties": {
  14214. "directory": {
  14215. "type": "string"
  14216. },
  14217. "force": {
  14218. "type": "boolean"
  14219. }
  14220. },
  14221. "required": ["directory", "force"],
  14222. "additionalProperties": false
  14223. }
  14224. }
  14225. }
  14226. },
  14227. "x-codeSamples": [
  14228. {
  14229. "lang": "js",
  14230. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.remove({\n ...\n})"
  14231. }
  14232. ]
  14233. }
  14234. },
  14235. "/experimental/project/{projectID}/copy/refresh": {
  14236. "post": {
  14237. "tags": ["projectCopy"],
  14238. "operationId": "v2.projectCopy.refresh",
  14239. "parameters": [
  14240. {
  14241. "name": "projectID",
  14242. "in": "path",
  14243. "schema": {
  14244. "type": "string"
  14245. },
  14246. "required": true
  14247. },
  14248. {
  14249. "name": "location",
  14250. "in": "query",
  14251. "schema": {
  14252. "type": "object",
  14253. "properties": {
  14254. "directory": {
  14255. "type": "string"
  14256. },
  14257. "workspace": {
  14258. "type": "string"
  14259. }
  14260. },
  14261. "additionalProperties": false
  14262. },
  14263. "required": false,
  14264. "style": "deepObject",
  14265. "explode": true
  14266. }
  14267. ],
  14268. "responses": {
  14269. "204": {
  14270. "description": "<No Content>"
  14271. },
  14272. "400": {
  14273. "description": "ProjectCopyError | InvalidRequestError",
  14274. "content": {
  14275. "application/json": {
  14276. "schema": {
  14277. "anyOf": [
  14278. {
  14279. "$ref": "#/components/schemas/ProjectCopyError"
  14280. },
  14281. {
  14282. "$ref": "#/components/schemas/InvalidRequestError"
  14283. }
  14284. ]
  14285. }
  14286. }
  14287. }
  14288. }
  14289. },
  14290. "x-codeSamples": [
  14291. {
  14292. "lang": "js",
  14293. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.projectCopy.refresh({\n ...\n})"
  14294. }
  14295. ]
  14296. }
  14297. },
  14298. "/pty/{ptyID}/connect": {
  14299. "get": {
  14300. "tags": ["pty"],
  14301. "operationId": "pty.connect",
  14302. "parameters": [
  14303. {
  14304. "name": "ptyID",
  14305. "in": "path",
  14306. "schema": {
  14307. "type": "string",
  14308. "pattern": "^pty"
  14309. },
  14310. "required": true
  14311. },
  14312. {
  14313. "in": "query",
  14314. "name": "directory",
  14315. "schema": {
  14316. "type": "string"
  14317. }
  14318. },
  14319. {
  14320. "in": "query",
  14321. "name": "workspace",
  14322. "schema": {
  14323. "type": "string"
  14324. }
  14325. },
  14326. {
  14327. "in": "query",
  14328. "name": "cursor",
  14329. "schema": {
  14330. "type": "string"
  14331. }
  14332. },
  14333. {
  14334. "in": "query",
  14335. "name": "ticket",
  14336. "schema": {
  14337. "type": "string"
  14338. }
  14339. }
  14340. ],
  14341. "responses": {
  14342. "200": {
  14343. "description": "Connected session",
  14344. "content": {
  14345. "application/json": {
  14346. "schema": {
  14347. "type": "boolean",
  14348. "description": "Connected session"
  14349. }
  14350. }
  14351. }
  14352. },
  14353. "403": {
  14354. "description": "Forbidden",
  14355. "content": {
  14356. "application/json": {
  14357. "schema": {
  14358. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  14359. }
  14360. }
  14361. }
  14362. },
  14363. "404": {
  14364. "description": "Not found",
  14365. "content": {
  14366. "application/json": {
  14367. "schema": {
  14368. "$ref": "#/components/schemas/NotFoundError"
  14369. }
  14370. }
  14371. }
  14372. }
  14373. },
  14374. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  14375. "summary": "Connect to PTY session",
  14376. "x-codeSamples": [
  14377. {
  14378. "lang": "js",
  14379. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  14380. }
  14381. ]
  14382. }
  14383. }
  14384. },
  14385. "components": {
  14386. "schemas": {
  14387. "Event": {
  14388. "anyOf": [
  14389. {
  14390. "$ref": "#/components/schemas/EventModels-devRefreshed"
  14391. },
  14392. {
  14393. "$ref": "#/components/schemas/EventPluginAdded"
  14394. },
  14395. {
  14396. "$ref": "#/components/schemas/EventCatalogModelUpdated"
  14397. },
  14398. {
  14399. "$ref": "#/components/schemas/EventSessionCreated"
  14400. },
  14401. {
  14402. "$ref": "#/components/schemas/EventSessionUpdated"
  14403. },
  14404. {
  14405. "$ref": "#/components/schemas/EventSessionDeleted"
  14406. },
  14407. {
  14408. "$ref": "#/components/schemas/EventMessageUpdated"
  14409. },
  14410. {
  14411. "$ref": "#/components/schemas/EventMessageRemoved"
  14412. },
  14413. {
  14414. "$ref": "#/components/schemas/EventMessagePartUpdated"
  14415. },
  14416. {
  14417. "$ref": "#/components/schemas/EventMessagePartRemoved"
  14418. },
  14419. {
  14420. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  14421. },
  14422. {
  14423. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  14424. },
  14425. {
  14426. "$ref": "#/components/schemas/EventSessionNextMoved"
  14427. },
  14428. {
  14429. "$ref": "#/components/schemas/EventSessionNextPrompted"
  14430. },
  14431. {
  14432. "$ref": "#/components/schemas/EventSessionNextPromptAdmitted"
  14433. },
  14434. {
  14435. "$ref": "#/components/schemas/EventSessionNextPromptPromoted"
  14436. },
  14437. {
  14438. "$ref": "#/components/schemas/EventSessionNextInterruptRequested"
  14439. },
  14440. {
  14441. "$ref": "#/components/schemas/EventSessionNextContextUpdated"
  14442. },
  14443. {
  14444. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  14445. },
  14446. {
  14447. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  14448. },
  14449. {
  14450. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  14451. },
  14452. {
  14453. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  14454. },
  14455. {
  14456. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  14457. },
  14458. {
  14459. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  14460. },
  14461. {
  14462. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  14463. },
  14464. {
  14465. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  14466. },
  14467. {
  14468. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  14469. },
  14470. {
  14471. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  14472. },
  14473. {
  14474. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  14475. },
  14476. {
  14477. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  14478. },
  14479. {
  14480. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  14481. },
  14482. {
  14483. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  14484. },
  14485. {
  14486. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  14487. },
  14488. {
  14489. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  14490. },
  14491. {
  14492. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  14493. },
  14494. {
  14495. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  14496. },
  14497. {
  14498. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  14499. },
  14500. {
  14501. "$ref": "#/components/schemas/EventSessionNextRetried"
  14502. },
  14503. {
  14504. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  14505. },
  14506. {
  14507. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  14508. },
  14509. {
  14510. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  14511. },
  14512. {
  14513. "$ref": "#/components/schemas/EventMessagePartDelta"
  14514. },
  14515. {
  14516. "$ref": "#/components/schemas/EventSessionDiff"
  14517. },
  14518. {
  14519. "$ref": "#/components/schemas/EventSessionError"
  14520. },
  14521. {
  14522. "$ref": "#/components/schemas/EventInstallationUpdated"
  14523. },
  14524. {
  14525. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  14526. },
  14527. {
  14528. "$ref": "#/components/schemas/EventFileEdited"
  14529. },
  14530. {
  14531. "$ref": "#/components/schemas/EventIntegrationUpdated"
  14532. },
  14533. {
  14534. "$ref": "#/components/schemas/EventPermissionV2Asked"
  14535. },
  14536. {
  14537. "$ref": "#/components/schemas/EventPermissionV2Replied"
  14538. },
  14539. {
  14540. "$ref": "#/components/schemas/EventReferenceUpdated"
  14541. },
  14542. {
  14543. "$ref": "#/components/schemas/EventProjectDirectoriesUpdated"
  14544. },
  14545. {
  14546. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  14547. },
  14548. {
  14549. "$ref": "#/components/schemas/EventPtyCreated"
  14550. },
  14551. {
  14552. "$ref": "#/components/schemas/EventPtyUpdated"
  14553. },
  14554. {
  14555. "$ref": "#/components/schemas/EventPtyExited"
  14556. },
  14557. {
  14558. "$ref": "#/components/schemas/EventPtyDeleted"
  14559. },
  14560. {
  14561. "$ref": "#/components/schemas/EventQuestionV2Asked"
  14562. },
  14563. {
  14564. "$ref": "#/components/schemas/EventQuestionV2Replied"
  14565. },
  14566. {
  14567. "$ref": "#/components/schemas/EventQuestionV2Rejected"
  14568. },
  14569. {
  14570. "$ref": "#/components/schemas/EventTodoUpdated"
  14571. },
  14572. {
  14573. "$ref": "#/components/schemas/EventLspUpdated"
  14574. },
  14575. {
  14576. "$ref": "#/components/schemas/EventPermissionAsked"
  14577. },
  14578. {
  14579. "$ref": "#/components/schemas/EventPermissionReplied"
  14580. },
  14581. {
  14582. "$ref": "#/components/schemas/Event.tui.prompt.append"
  14583. },
  14584. {
  14585. "$ref": "#/components/schemas/Event.tui.command.execute"
  14586. },
  14587. {
  14588. "$ref": "#/components/schemas/Event.tui.toast.show"
  14589. },
  14590. {
  14591. "$ref": "#/components/schemas/Event.tui.session.select"
  14592. },
  14593. {
  14594. "$ref": "#/components/schemas/EventMcpToolsChanged"
  14595. },
  14596. {
  14597. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  14598. },
  14599. {
  14600. "$ref": "#/components/schemas/EventCommandExecuted"
  14601. },
  14602. {
  14603. "$ref": "#/components/schemas/EventProjectUpdated"
  14604. },
  14605. {
  14606. "$ref": "#/components/schemas/EventSessionStatus"
  14607. },
  14608. {
  14609. "$ref": "#/components/schemas/EventSessionIdle"
  14610. },
  14611. {
  14612. "$ref": "#/components/schemas/EventQuestionAsked"
  14613. },
  14614. {
  14615. "$ref": "#/components/schemas/EventQuestionReplied"
  14616. },
  14617. {
  14618. "$ref": "#/components/schemas/EventQuestionRejected"
  14619. },
  14620. {
  14621. "$ref": "#/components/schemas/EventSessionCompacted"
  14622. },
  14623. {
  14624. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  14625. },
  14626. {
  14627. "$ref": "#/components/schemas/EventWorkspaceReady"
  14628. },
  14629. {
  14630. "$ref": "#/components/schemas/EventWorkspaceFailed"
  14631. },
  14632. {
  14633. "$ref": "#/components/schemas/EventWorkspaceStatus"
  14634. },
  14635. {
  14636. "$ref": "#/components/schemas/EventWorktreeReady"
  14637. },
  14638. {
  14639. "$ref": "#/components/schemas/EventWorktreeFailed"
  14640. },
  14641. {
  14642. "$ref": "#/components/schemas/EventServerConnected"
  14643. },
  14644. {
  14645. "$ref": "#/components/schemas/EventGlobalDisposed"
  14646. },
  14647. {
  14648. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  14649. }
  14650. ]
  14651. },
  14652. "QuestionReplied": {
  14653. "type": "object",
  14654. "properties": {
  14655. "sessionID": {
  14656. "type": "string",
  14657. "pattern": "^ses"
  14658. },
  14659. "requestID": {
  14660. "type": "string",
  14661. "pattern": "^que"
  14662. },
  14663. "answers": {
  14664. "type": "array",
  14665. "items": {
  14666. "$ref": "#/components/schemas/QuestionAnswer"
  14667. }
  14668. }
  14669. },
  14670. "required": ["sessionID", "requestID", "answers"],
  14671. "additionalProperties": false
  14672. },
  14673. "QuestionRejected": {
  14674. "type": "object",
  14675. "properties": {
  14676. "sessionID": {
  14677. "type": "string",
  14678. "pattern": "^ses"
  14679. },
  14680. "requestID": {
  14681. "type": "string",
  14682. "pattern": "^que"
  14683. }
  14684. },
  14685. "required": ["sessionID", "requestID"],
  14686. "additionalProperties": false
  14687. },
  14688. "OAuth": {
  14689. "type": "object",
  14690. "properties": {
  14691. "type": {
  14692. "type": "string",
  14693. "enum": ["oauth"]
  14694. },
  14695. "refresh": {
  14696. "type": "string"
  14697. },
  14698. "access": {
  14699. "type": "string"
  14700. },
  14701. "expires": {
  14702. "type": "integer",
  14703. "minimum": 0
  14704. },
  14705. "accountId": {
  14706. "type": "string"
  14707. },
  14708. "enterpriseUrl": {
  14709. "type": "string"
  14710. }
  14711. },
  14712. "required": ["type", "refresh", "access", "expires"],
  14713. "additionalProperties": false
  14714. },
  14715. "ApiAuth": {
  14716. "type": "object",
  14717. "properties": {
  14718. "type": {
  14719. "type": "string",
  14720. "enum": ["api"]
  14721. },
  14722. "key": {
  14723. "type": "string"
  14724. },
  14725. "metadata": {
  14726. "type": "object",
  14727. "additionalProperties": {
  14728. "type": "string"
  14729. }
  14730. }
  14731. },
  14732. "required": ["type", "key"],
  14733. "additionalProperties": false
  14734. },
  14735. "WellKnownAuth": {
  14736. "type": "object",
  14737. "properties": {
  14738. "type": {
  14739. "type": "string",
  14740. "enum": ["wellknown"]
  14741. },
  14742. "key": {
  14743. "type": "string"
  14744. },
  14745. "token": {
  14746. "type": "string"
  14747. }
  14748. },
  14749. "required": ["type", "key", "token"],
  14750. "additionalProperties": false
  14751. },
  14752. "Auth": {
  14753. "anyOf": [
  14754. {
  14755. "$ref": "#/components/schemas/OAuth"
  14756. },
  14757. {
  14758. "$ref": "#/components/schemas/ApiAuth"
  14759. },
  14760. {
  14761. "$ref": "#/components/schemas/WellKnownAuth"
  14762. }
  14763. ]
  14764. },
  14765. "effect_HttpApiError_BadRequest": {
  14766. "type": "object",
  14767. "properties": {
  14768. "_tag": {
  14769. "type": "string",
  14770. "enum": ["BadRequest"]
  14771. }
  14772. },
  14773. "required": ["_tag"],
  14774. "additionalProperties": false
  14775. },
  14776. "InvalidRequestError": {
  14777. "type": "object",
  14778. "properties": {
  14779. "_tag": {
  14780. "type": "string",
  14781. "enum": ["InvalidRequestError"]
  14782. },
  14783. "message": {
  14784. "type": "string"
  14785. },
  14786. "kind": {
  14787. "type": "string"
  14788. },
  14789. "field": {
  14790. "type": "string"
  14791. }
  14792. },
  14793. "required": ["_tag", "message"],
  14794. "additionalProperties": false
  14795. },
  14796. "MoveSessionError": {
  14797. "type": "object",
  14798. "properties": {
  14799. "name": {
  14800. "type": "string",
  14801. "enum": ["MoveSessionError"]
  14802. },
  14803. "data": {
  14804. "type": "object",
  14805. "properties": {
  14806. "message": {
  14807. "type": "string"
  14808. }
  14809. },
  14810. "required": ["message"],
  14811. "additionalProperties": false
  14812. }
  14813. },
  14814. "required": ["name", "data"],
  14815. "additionalProperties": false
  14816. },
  14817. "SnapshotFileDiff": {
  14818. "type": "object",
  14819. "properties": {
  14820. "file": {
  14821. "type": "string"
  14822. },
  14823. "patch": {
  14824. "type": "string"
  14825. },
  14826. "additions": {
  14827. "type": "number"
  14828. },
  14829. "deletions": {
  14830. "type": "number"
  14831. },
  14832. "status": {
  14833. "type": "string",
  14834. "enum": ["added", "deleted", "modified"]
  14835. }
  14836. },
  14837. "required": ["additions", "deletions"],
  14838. "additionalProperties": false
  14839. },
  14840. "PermissionAction": {
  14841. "type": "string",
  14842. "enum": ["allow", "deny", "ask"]
  14843. },
  14844. "PermissionRule": {
  14845. "type": "object",
  14846. "properties": {
  14847. "permission": {
  14848. "type": "string"
  14849. },
  14850. "pattern": {
  14851. "type": "string"
  14852. },
  14853. "action": {
  14854. "$ref": "#/components/schemas/PermissionAction"
  14855. }
  14856. },
  14857. "required": ["permission", "pattern", "action"],
  14858. "additionalProperties": false
  14859. },
  14860. "PermissionRuleset": {
  14861. "type": "array",
  14862. "items": {
  14863. "$ref": "#/components/schemas/PermissionRule"
  14864. }
  14865. },
  14866. "Session": {
  14867. "type": "object",
  14868. "properties": {
  14869. "id": {
  14870. "type": "string",
  14871. "pattern": "^ses"
  14872. },
  14873. "slug": {
  14874. "type": "string"
  14875. },
  14876. "projectID": {
  14877. "type": "string"
  14878. },
  14879. "workspaceID": {
  14880. "type": "string",
  14881. "pattern": "^wrk"
  14882. },
  14883. "directory": {
  14884. "type": "string"
  14885. },
  14886. "path": {
  14887. "type": "string"
  14888. },
  14889. "parentID": {
  14890. "type": "string",
  14891. "pattern": "^ses"
  14892. },
  14893. "summary": {
  14894. "type": "object",
  14895. "properties": {
  14896. "additions": {
  14897. "type": "number"
  14898. },
  14899. "deletions": {
  14900. "type": "number"
  14901. },
  14902. "files": {
  14903. "type": "number"
  14904. },
  14905. "diffs": {
  14906. "type": "array",
  14907. "items": {
  14908. "$ref": "#/components/schemas/SnapshotFileDiff"
  14909. }
  14910. }
  14911. },
  14912. "required": ["additions", "deletions", "files"],
  14913. "additionalProperties": false
  14914. },
  14915. "cost": {
  14916. "type": "number"
  14917. },
  14918. "tokens": {
  14919. "type": "object",
  14920. "properties": {
  14921. "input": {
  14922. "type": "number"
  14923. },
  14924. "output": {
  14925. "type": "number"
  14926. },
  14927. "reasoning": {
  14928. "type": "number"
  14929. },
  14930. "cache": {
  14931. "type": "object",
  14932. "properties": {
  14933. "read": {
  14934. "type": "number"
  14935. },
  14936. "write": {
  14937. "type": "number"
  14938. }
  14939. },
  14940. "required": ["read", "write"],
  14941. "additionalProperties": false
  14942. }
  14943. },
  14944. "required": ["input", "output", "reasoning", "cache"],
  14945. "additionalProperties": false
  14946. },
  14947. "share": {
  14948. "type": "object",
  14949. "properties": {
  14950. "url": {
  14951. "type": "string"
  14952. }
  14953. },
  14954. "required": ["url"],
  14955. "additionalProperties": false
  14956. },
  14957. "title": {
  14958. "type": "string"
  14959. },
  14960. "agent": {
  14961. "type": "string"
  14962. },
  14963. "model": {
  14964. "type": "object",
  14965. "properties": {
  14966. "id": {
  14967. "type": "string"
  14968. },
  14969. "providerID": {
  14970. "type": "string"
  14971. },
  14972. "variant": {
  14973. "type": "string"
  14974. }
  14975. },
  14976. "required": ["id", "providerID"],
  14977. "additionalProperties": false
  14978. },
  14979. "version": {
  14980. "type": "string"
  14981. },
  14982. "metadata": {
  14983. "type": "object"
  14984. },
  14985. "time": {
  14986. "type": "object",
  14987. "properties": {
  14988. "created": {
  14989. "type": "integer",
  14990. "minimum": 0
  14991. },
  14992. "updated": {
  14993. "type": "integer",
  14994. "minimum": 0
  14995. },
  14996. "compacting": {
  14997. "type": "integer",
  14998. "minimum": 0
  14999. },
  15000. "archived": {
  15001. "type": "number"
  15002. }
  15003. },
  15004. "required": ["created", "updated"],
  15005. "additionalProperties": false
  15006. },
  15007. "permission": {
  15008. "$ref": "#/components/schemas/PermissionRuleset"
  15009. },
  15010. "revert": {
  15011. "type": "object",
  15012. "properties": {
  15013. "messageID": {
  15014. "type": "string",
  15015. "pattern": "^msg"
  15016. },
  15017. "partID": {
  15018. "type": "string",
  15019. "pattern": "^prt"
  15020. },
  15021. "snapshot": {
  15022. "type": "string"
  15023. },
  15024. "diff": {
  15025. "type": "string"
  15026. }
  15027. },
  15028. "required": ["messageID"],
  15029. "additionalProperties": false
  15030. }
  15031. },
  15032. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  15033. "additionalProperties": false
  15034. },
  15035. "OutputFormatText": {
  15036. "type": "object",
  15037. "properties": {
  15038. "type": {
  15039. "type": "string",
  15040. "enum": ["text"]
  15041. }
  15042. },
  15043. "required": ["type"],
  15044. "additionalProperties": false
  15045. },
  15046. "JSONSchema": {
  15047. "type": "object"
  15048. },
  15049. "OutputFormatJsonSchema": {
  15050. "type": "object",
  15051. "properties": {
  15052. "type": {
  15053. "type": "string",
  15054. "enum": ["json_schema"]
  15055. },
  15056. "schema": {
  15057. "$ref": "#/components/schemas/JSONSchema"
  15058. },
  15059. "retryCount": {
  15060. "type": "integer",
  15061. "minimum": 0
  15062. }
  15063. },
  15064. "required": ["type", "schema"],
  15065. "additionalProperties": false
  15066. },
  15067. "OutputFormat": {
  15068. "anyOf": [
  15069. {
  15070. "$ref": "#/components/schemas/OutputFormatText"
  15071. },
  15072. {
  15073. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  15074. }
  15075. ]
  15076. },
  15077. "UserMessage": {
  15078. "type": "object",
  15079. "properties": {
  15080. "id": {
  15081. "type": "string",
  15082. "pattern": "^msg"
  15083. },
  15084. "sessionID": {
  15085. "type": "string",
  15086. "pattern": "^ses"
  15087. },
  15088. "role": {
  15089. "type": "string",
  15090. "enum": ["user"]
  15091. },
  15092. "time": {
  15093. "type": "object",
  15094. "properties": {
  15095. "created": {
  15096. "type": "number",
  15097. "minimum": 0
  15098. }
  15099. },
  15100. "required": ["created"],
  15101. "additionalProperties": false
  15102. },
  15103. "format": {
  15104. "$ref": "#/components/schemas/OutputFormat"
  15105. },
  15106. "summary": {
  15107. "type": "object",
  15108. "properties": {
  15109. "title": {
  15110. "type": "string"
  15111. },
  15112. "body": {
  15113. "type": "string"
  15114. },
  15115. "diffs": {
  15116. "type": "array",
  15117. "items": {
  15118. "$ref": "#/components/schemas/SnapshotFileDiff"
  15119. }
  15120. }
  15121. },
  15122. "required": ["diffs"],
  15123. "additionalProperties": false
  15124. },
  15125. "agent": {
  15126. "type": "string"
  15127. },
  15128. "model": {
  15129. "type": "object",
  15130. "properties": {
  15131. "providerID": {
  15132. "type": "string"
  15133. },
  15134. "modelID": {
  15135. "type": "string"
  15136. },
  15137. "variant": {
  15138. "type": "string"
  15139. }
  15140. },
  15141. "required": ["providerID", "modelID"],
  15142. "additionalProperties": false
  15143. },
  15144. "system": {
  15145. "type": "string"
  15146. },
  15147. "tools": {
  15148. "type": "object",
  15149. "additionalProperties": {
  15150. "type": "boolean"
  15151. }
  15152. }
  15153. },
  15154. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  15155. "additionalProperties": false
  15156. },
  15157. "ProviderAuthError": {
  15158. "type": "object",
  15159. "properties": {
  15160. "name": {
  15161. "type": "string",
  15162. "enum": ["ProviderAuthError"]
  15163. },
  15164. "data": {
  15165. "type": "object",
  15166. "properties": {
  15167. "providerID": {
  15168. "type": "string"
  15169. },
  15170. "message": {
  15171. "type": "string"
  15172. }
  15173. },
  15174. "required": ["providerID", "message"],
  15175. "additionalProperties": false
  15176. }
  15177. },
  15178. "required": ["name", "data"],
  15179. "additionalProperties": false
  15180. },
  15181. "UnknownError": {
  15182. "type": "object",
  15183. "properties": {
  15184. "name": {
  15185. "type": "string",
  15186. "enum": ["UnknownError"]
  15187. },
  15188. "data": {
  15189. "type": "object",
  15190. "properties": {
  15191. "message": {
  15192. "type": "string"
  15193. },
  15194. "ref": {
  15195. "type": "string"
  15196. }
  15197. },
  15198. "required": ["message"],
  15199. "additionalProperties": false
  15200. }
  15201. },
  15202. "required": ["name", "data"],
  15203. "additionalProperties": false
  15204. },
  15205. "MessageOutputLengthError": {
  15206. "type": "object",
  15207. "properties": {
  15208. "name": {
  15209. "type": "string",
  15210. "enum": ["MessageOutputLengthError"]
  15211. },
  15212. "data": {
  15213. "type": "object",
  15214. "properties": {}
  15215. }
  15216. },
  15217. "required": ["name", "data"],
  15218. "additionalProperties": false
  15219. },
  15220. "MessageAbortedError": {
  15221. "type": "object",
  15222. "properties": {
  15223. "name": {
  15224. "type": "string",
  15225. "enum": ["MessageAbortedError"]
  15226. },
  15227. "data": {
  15228. "type": "object",
  15229. "properties": {
  15230. "message": {
  15231. "type": "string"
  15232. }
  15233. },
  15234. "required": ["message"],
  15235. "additionalProperties": false
  15236. }
  15237. },
  15238. "required": ["name", "data"],
  15239. "additionalProperties": false
  15240. },
  15241. "StructuredOutputError": {
  15242. "type": "object",
  15243. "properties": {
  15244. "name": {
  15245. "type": "string",
  15246. "enum": ["StructuredOutputError"]
  15247. },
  15248. "data": {
  15249. "type": "object",
  15250. "properties": {
  15251. "message": {
  15252. "type": "string"
  15253. },
  15254. "retries": {
  15255. "type": "integer",
  15256. "minimum": 0
  15257. }
  15258. },
  15259. "required": ["message", "retries"],
  15260. "additionalProperties": false
  15261. }
  15262. },
  15263. "required": ["name", "data"],
  15264. "additionalProperties": false
  15265. },
  15266. "ContextOverflowError": {
  15267. "type": "object",
  15268. "properties": {
  15269. "name": {
  15270. "type": "string",
  15271. "enum": ["ContextOverflowError"]
  15272. },
  15273. "data": {
  15274. "type": "object",
  15275. "properties": {
  15276. "message": {
  15277. "type": "string"
  15278. },
  15279. "responseBody": {
  15280. "type": "string"
  15281. }
  15282. },
  15283. "required": ["message"],
  15284. "additionalProperties": false
  15285. }
  15286. },
  15287. "required": ["name", "data"],
  15288. "additionalProperties": false
  15289. },
  15290. "ContentFilterError": {
  15291. "type": "object",
  15292. "properties": {
  15293. "name": {
  15294. "type": "string",
  15295. "enum": ["ContentFilterError"]
  15296. },
  15297. "data": {
  15298. "type": "object",
  15299. "properties": {
  15300. "message": {
  15301. "type": "string"
  15302. }
  15303. },
  15304. "required": ["message"],
  15305. "additionalProperties": false
  15306. }
  15307. },
  15308. "required": ["name", "data"],
  15309. "additionalProperties": false
  15310. },
  15311. "APIError": {
  15312. "type": "object",
  15313. "properties": {
  15314. "name": {
  15315. "type": "string",
  15316. "enum": ["APIError"]
  15317. },
  15318. "data": {
  15319. "type": "object",
  15320. "properties": {
  15321. "message": {
  15322. "type": "string"
  15323. },
  15324. "statusCode": {
  15325. "type": "integer",
  15326. "minimum": 0
  15327. },
  15328. "isRetryable": {
  15329. "type": "boolean"
  15330. },
  15331. "responseHeaders": {
  15332. "type": "object",
  15333. "additionalProperties": {
  15334. "type": "string"
  15335. }
  15336. },
  15337. "responseBody": {
  15338. "type": "string"
  15339. },
  15340. "metadata": {
  15341. "type": "object",
  15342. "additionalProperties": {
  15343. "type": "string"
  15344. }
  15345. }
  15346. },
  15347. "required": ["message", "isRetryable"],
  15348. "additionalProperties": false
  15349. }
  15350. },
  15351. "required": ["name", "data"],
  15352. "additionalProperties": false
  15353. },
  15354. "AssistantMessage": {
  15355. "type": "object",
  15356. "properties": {
  15357. "id": {
  15358. "type": "string",
  15359. "pattern": "^msg"
  15360. },
  15361. "sessionID": {
  15362. "type": "string",
  15363. "pattern": "^ses"
  15364. },
  15365. "role": {
  15366. "type": "string",
  15367. "enum": ["assistant"]
  15368. },
  15369. "time": {
  15370. "type": "object",
  15371. "properties": {
  15372. "created": {
  15373. "type": "integer",
  15374. "minimum": 0
  15375. },
  15376. "completed": {
  15377. "type": "integer",
  15378. "minimum": 0
  15379. }
  15380. },
  15381. "required": ["created"],
  15382. "additionalProperties": false
  15383. },
  15384. "error": {
  15385. "anyOf": [
  15386. {
  15387. "$ref": "#/components/schemas/ProviderAuthError"
  15388. },
  15389. {
  15390. "$ref": "#/components/schemas/UnknownError"
  15391. },
  15392. {
  15393. "$ref": "#/components/schemas/MessageOutputLengthError"
  15394. },
  15395. {
  15396. "$ref": "#/components/schemas/MessageAbortedError"
  15397. },
  15398. {
  15399. "$ref": "#/components/schemas/StructuredOutputError"
  15400. },
  15401. {
  15402. "$ref": "#/components/schemas/ContextOverflowError"
  15403. },
  15404. {
  15405. "$ref": "#/components/schemas/ContentFilterError"
  15406. },
  15407. {
  15408. "$ref": "#/components/schemas/APIError"
  15409. }
  15410. ]
  15411. },
  15412. "parentID": {
  15413. "type": "string",
  15414. "pattern": "^msg"
  15415. },
  15416. "modelID": {
  15417. "type": "string"
  15418. },
  15419. "providerID": {
  15420. "type": "string"
  15421. },
  15422. "mode": {
  15423. "type": "string"
  15424. },
  15425. "agent": {
  15426. "type": "string"
  15427. },
  15428. "path": {
  15429. "type": "object",
  15430. "properties": {
  15431. "cwd": {
  15432. "type": "string"
  15433. },
  15434. "root": {
  15435. "type": "string"
  15436. }
  15437. },
  15438. "required": ["cwd", "root"],
  15439. "additionalProperties": false
  15440. },
  15441. "summary": {
  15442. "type": "boolean"
  15443. },
  15444. "cost": {
  15445. "type": "number"
  15446. },
  15447. "tokens": {
  15448. "type": "object",
  15449. "properties": {
  15450. "total": {
  15451. "type": "number"
  15452. },
  15453. "input": {
  15454. "type": "number"
  15455. },
  15456. "output": {
  15457. "type": "number"
  15458. },
  15459. "reasoning": {
  15460. "type": "number"
  15461. },
  15462. "cache": {
  15463. "type": "object",
  15464. "properties": {
  15465. "read": {
  15466. "type": "number"
  15467. },
  15468. "write": {
  15469. "type": "number"
  15470. }
  15471. },
  15472. "required": ["read", "write"],
  15473. "additionalProperties": false
  15474. }
  15475. },
  15476. "required": ["input", "output", "reasoning", "cache"],
  15477. "additionalProperties": false
  15478. },
  15479. "structured": {},
  15480. "variant": {
  15481. "type": "string"
  15482. },
  15483. "finish": {
  15484. "type": "string"
  15485. }
  15486. },
  15487. "required": [
  15488. "id",
  15489. "sessionID",
  15490. "role",
  15491. "time",
  15492. "parentID",
  15493. "modelID",
  15494. "providerID",
  15495. "mode",
  15496. "agent",
  15497. "path",
  15498. "cost",
  15499. "tokens"
  15500. ],
  15501. "additionalProperties": false
  15502. },
  15503. "Message": {
  15504. "anyOf": [
  15505. {
  15506. "$ref": "#/components/schemas/UserMessage"
  15507. },
  15508. {
  15509. "$ref": "#/components/schemas/AssistantMessage"
  15510. }
  15511. ]
  15512. },
  15513. "TextPart": {
  15514. "type": "object",
  15515. "properties": {
  15516. "id": {
  15517. "type": "string",
  15518. "pattern": "^prt"
  15519. },
  15520. "sessionID": {
  15521. "type": "string",
  15522. "pattern": "^ses"
  15523. },
  15524. "messageID": {
  15525. "type": "string",
  15526. "pattern": "^msg"
  15527. },
  15528. "type": {
  15529. "type": "string",
  15530. "enum": ["text"]
  15531. },
  15532. "text": {
  15533. "type": "string"
  15534. },
  15535. "synthetic": {
  15536. "type": "boolean"
  15537. },
  15538. "ignored": {
  15539. "type": "boolean"
  15540. },
  15541. "time": {
  15542. "type": "object",
  15543. "properties": {
  15544. "start": {
  15545. "type": "integer",
  15546. "minimum": 0
  15547. },
  15548. "end": {
  15549. "type": "integer",
  15550. "minimum": 0
  15551. }
  15552. },
  15553. "required": ["start"],
  15554. "additionalProperties": false
  15555. },
  15556. "metadata": {
  15557. "type": "object"
  15558. }
  15559. },
  15560. "required": ["id", "sessionID", "messageID", "type", "text"],
  15561. "additionalProperties": false
  15562. },
  15563. "SubtaskPart": {
  15564. "type": "object",
  15565. "properties": {
  15566. "id": {
  15567. "type": "string",
  15568. "pattern": "^prt"
  15569. },
  15570. "sessionID": {
  15571. "type": "string",
  15572. "pattern": "^ses"
  15573. },
  15574. "messageID": {
  15575. "type": "string",
  15576. "pattern": "^msg"
  15577. },
  15578. "type": {
  15579. "type": "string",
  15580. "enum": ["subtask"]
  15581. },
  15582. "prompt": {
  15583. "type": "string"
  15584. },
  15585. "description": {
  15586. "type": "string"
  15587. },
  15588. "agent": {
  15589. "type": "string"
  15590. },
  15591. "model": {
  15592. "type": "object",
  15593. "properties": {
  15594. "providerID": {
  15595. "type": "string"
  15596. },
  15597. "modelID": {
  15598. "type": "string"
  15599. }
  15600. },
  15601. "required": ["providerID", "modelID"],
  15602. "additionalProperties": false
  15603. },
  15604. "command": {
  15605. "type": "string"
  15606. }
  15607. },
  15608. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  15609. "additionalProperties": false
  15610. },
  15611. "ReasoningPart": {
  15612. "type": "object",
  15613. "properties": {
  15614. "id": {
  15615. "type": "string",
  15616. "pattern": "^prt"
  15617. },
  15618. "sessionID": {
  15619. "type": "string",
  15620. "pattern": "^ses"
  15621. },
  15622. "messageID": {
  15623. "type": "string",
  15624. "pattern": "^msg"
  15625. },
  15626. "type": {
  15627. "type": "string",
  15628. "enum": ["reasoning"]
  15629. },
  15630. "text": {
  15631. "type": "string"
  15632. },
  15633. "metadata": {
  15634. "type": "object"
  15635. },
  15636. "time": {
  15637. "type": "object",
  15638. "properties": {
  15639. "start": {
  15640. "type": "integer",
  15641. "minimum": 0
  15642. },
  15643. "end": {
  15644. "type": "integer",
  15645. "minimum": 0
  15646. }
  15647. },
  15648. "required": ["start"],
  15649. "additionalProperties": false
  15650. }
  15651. },
  15652. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  15653. "additionalProperties": false
  15654. },
  15655. "FilePartSourceText": {
  15656. "type": "object",
  15657. "properties": {
  15658. "value": {
  15659. "type": "string"
  15660. },
  15661. "start": {
  15662. "type": "number"
  15663. },
  15664. "end": {
  15665. "type": "number"
  15666. }
  15667. },
  15668. "required": ["value", "start", "end"],
  15669. "additionalProperties": false
  15670. },
  15671. "FileSource": {
  15672. "type": "object",
  15673. "properties": {
  15674. "text": {
  15675. "$ref": "#/components/schemas/FilePartSourceText"
  15676. },
  15677. "type": {
  15678. "type": "string",
  15679. "enum": ["file"]
  15680. },
  15681. "path": {
  15682. "type": "string"
  15683. }
  15684. },
  15685. "required": ["text", "type", "path"],
  15686. "additionalProperties": false
  15687. },
  15688. "Range": {
  15689. "type": "object",
  15690. "properties": {
  15691. "start": {
  15692. "type": "object",
  15693. "properties": {
  15694. "line": {
  15695. "type": "integer",
  15696. "minimum": 0
  15697. },
  15698. "character": {
  15699. "type": "integer",
  15700. "minimum": 0
  15701. }
  15702. },
  15703. "required": ["line", "character"],
  15704. "additionalProperties": false
  15705. },
  15706. "end": {
  15707. "type": "object",
  15708. "properties": {
  15709. "line": {
  15710. "type": "integer",
  15711. "minimum": 0
  15712. },
  15713. "character": {
  15714. "type": "integer",
  15715. "minimum": 0
  15716. }
  15717. },
  15718. "required": ["line", "character"],
  15719. "additionalProperties": false
  15720. }
  15721. },
  15722. "required": ["start", "end"],
  15723. "additionalProperties": false
  15724. },
  15725. "SymbolSource": {
  15726. "type": "object",
  15727. "properties": {
  15728. "text": {
  15729. "$ref": "#/components/schemas/FilePartSourceText"
  15730. },
  15731. "type": {
  15732. "type": "string",
  15733. "enum": ["symbol"]
  15734. },
  15735. "path": {
  15736. "type": "string"
  15737. },
  15738. "range": {
  15739. "$ref": "#/components/schemas/Range"
  15740. },
  15741. "name": {
  15742. "type": "string"
  15743. },
  15744. "kind": {
  15745. "type": "integer",
  15746. "minimum": 0
  15747. }
  15748. },
  15749. "required": ["text", "type", "path", "range", "name", "kind"],
  15750. "additionalProperties": false
  15751. },
  15752. "ResourceSource": {
  15753. "type": "object",
  15754. "properties": {
  15755. "text": {
  15756. "$ref": "#/components/schemas/FilePartSourceText"
  15757. },
  15758. "type": {
  15759. "type": "string",
  15760. "enum": ["resource"]
  15761. },
  15762. "clientName": {
  15763. "type": "string"
  15764. },
  15765. "uri": {
  15766. "type": "string"
  15767. }
  15768. },
  15769. "required": ["text", "type", "clientName", "uri"],
  15770. "additionalProperties": false
  15771. },
  15772. "FilePartSource": {
  15773. "anyOf": [
  15774. {
  15775. "$ref": "#/components/schemas/FileSource"
  15776. },
  15777. {
  15778. "$ref": "#/components/schemas/SymbolSource"
  15779. },
  15780. {
  15781. "$ref": "#/components/schemas/ResourceSource"
  15782. }
  15783. ]
  15784. },
  15785. "FilePart": {
  15786. "type": "object",
  15787. "properties": {
  15788. "id": {
  15789. "type": "string",
  15790. "pattern": "^prt"
  15791. },
  15792. "sessionID": {
  15793. "type": "string",
  15794. "pattern": "^ses"
  15795. },
  15796. "messageID": {
  15797. "type": "string",
  15798. "pattern": "^msg"
  15799. },
  15800. "type": {
  15801. "type": "string",
  15802. "enum": ["file"]
  15803. },
  15804. "mime": {
  15805. "type": "string"
  15806. },
  15807. "filename": {
  15808. "type": "string"
  15809. },
  15810. "url": {
  15811. "type": "string"
  15812. },
  15813. "source": {
  15814. "$ref": "#/components/schemas/FilePartSource"
  15815. }
  15816. },
  15817. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  15818. "additionalProperties": false
  15819. },
  15820. "ToolStatePending": {
  15821. "type": "object",
  15822. "properties": {
  15823. "status": {
  15824. "type": "string",
  15825. "enum": ["pending"]
  15826. },
  15827. "input": {
  15828. "type": "object"
  15829. },
  15830. "raw": {
  15831. "type": "string"
  15832. }
  15833. },
  15834. "required": ["status", "input", "raw"],
  15835. "additionalProperties": false
  15836. },
  15837. "ToolStateRunning": {
  15838. "type": "object",
  15839. "properties": {
  15840. "status": {
  15841. "type": "string",
  15842. "enum": ["running"]
  15843. },
  15844. "input": {
  15845. "type": "object"
  15846. },
  15847. "title": {
  15848. "type": "string"
  15849. },
  15850. "metadata": {
  15851. "type": "object"
  15852. },
  15853. "time": {
  15854. "type": "object",
  15855. "properties": {
  15856. "start": {
  15857. "type": "integer",
  15858. "minimum": 0
  15859. }
  15860. },
  15861. "required": ["start"],
  15862. "additionalProperties": false
  15863. }
  15864. },
  15865. "required": ["status", "input", "time"],
  15866. "additionalProperties": false
  15867. },
  15868. "ToolStateCompleted": {
  15869. "type": "object",
  15870. "properties": {
  15871. "status": {
  15872. "type": "string",
  15873. "enum": ["completed"]
  15874. },
  15875. "input": {
  15876. "type": "object"
  15877. },
  15878. "output": {
  15879. "type": "string"
  15880. },
  15881. "title": {
  15882. "type": "string"
  15883. },
  15884. "metadata": {
  15885. "type": "object"
  15886. },
  15887. "time": {
  15888. "type": "object",
  15889. "properties": {
  15890. "start": {
  15891. "type": "integer",
  15892. "minimum": 0
  15893. },
  15894. "end": {
  15895. "type": "integer",
  15896. "minimum": 0
  15897. },
  15898. "compacted": {
  15899. "type": "integer",
  15900. "minimum": 0
  15901. }
  15902. },
  15903. "required": ["start", "end"],
  15904. "additionalProperties": false
  15905. },
  15906. "attachments": {
  15907. "type": "array",
  15908. "items": {
  15909. "$ref": "#/components/schemas/FilePart"
  15910. }
  15911. }
  15912. },
  15913. "required": ["status", "input", "output", "title", "metadata", "time"],
  15914. "additionalProperties": false
  15915. },
  15916. "ToolStateError": {
  15917. "type": "object",
  15918. "properties": {
  15919. "status": {
  15920. "type": "string",
  15921. "enum": ["error"]
  15922. },
  15923. "input": {
  15924. "type": "object"
  15925. },
  15926. "error": {
  15927. "type": "string"
  15928. },
  15929. "metadata": {
  15930. "type": "object"
  15931. },
  15932. "time": {
  15933. "type": "object",
  15934. "properties": {
  15935. "start": {
  15936. "type": "integer",
  15937. "minimum": 0
  15938. },
  15939. "end": {
  15940. "type": "integer",
  15941. "minimum": 0
  15942. }
  15943. },
  15944. "required": ["start", "end"],
  15945. "additionalProperties": false
  15946. }
  15947. },
  15948. "required": ["status", "input", "error", "time"],
  15949. "additionalProperties": false
  15950. },
  15951. "ToolState": {
  15952. "anyOf": [
  15953. {
  15954. "$ref": "#/components/schemas/ToolStatePending"
  15955. },
  15956. {
  15957. "$ref": "#/components/schemas/ToolStateRunning"
  15958. },
  15959. {
  15960. "$ref": "#/components/schemas/ToolStateCompleted"
  15961. },
  15962. {
  15963. "$ref": "#/components/schemas/ToolStateError"
  15964. }
  15965. ]
  15966. },
  15967. "ToolPart": {
  15968. "type": "object",
  15969. "properties": {
  15970. "id": {
  15971. "type": "string",
  15972. "pattern": "^prt"
  15973. },
  15974. "sessionID": {
  15975. "type": "string",
  15976. "pattern": "^ses"
  15977. },
  15978. "messageID": {
  15979. "type": "string",
  15980. "pattern": "^msg"
  15981. },
  15982. "type": {
  15983. "type": "string",
  15984. "enum": ["tool"]
  15985. },
  15986. "callID": {
  15987. "type": "string"
  15988. },
  15989. "tool": {
  15990. "type": "string"
  15991. },
  15992. "state": {
  15993. "$ref": "#/components/schemas/ToolState"
  15994. },
  15995. "metadata": {
  15996. "type": "object"
  15997. }
  15998. },
  15999. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  16000. "additionalProperties": false
  16001. },
  16002. "StepStartPart": {
  16003. "type": "object",
  16004. "properties": {
  16005. "id": {
  16006. "type": "string",
  16007. "pattern": "^prt"
  16008. },
  16009. "sessionID": {
  16010. "type": "string",
  16011. "pattern": "^ses"
  16012. },
  16013. "messageID": {
  16014. "type": "string",
  16015. "pattern": "^msg"
  16016. },
  16017. "type": {
  16018. "type": "string",
  16019. "enum": ["step-start"]
  16020. },
  16021. "snapshot": {
  16022. "type": "string"
  16023. }
  16024. },
  16025. "required": ["id", "sessionID", "messageID", "type"],
  16026. "additionalProperties": false
  16027. },
  16028. "StepFinishPart": {
  16029. "type": "object",
  16030. "properties": {
  16031. "id": {
  16032. "type": "string",
  16033. "pattern": "^prt"
  16034. },
  16035. "sessionID": {
  16036. "type": "string",
  16037. "pattern": "^ses"
  16038. },
  16039. "messageID": {
  16040. "type": "string",
  16041. "pattern": "^msg"
  16042. },
  16043. "type": {
  16044. "type": "string",
  16045. "enum": ["step-finish"]
  16046. },
  16047. "reason": {
  16048. "type": "string"
  16049. },
  16050. "snapshot": {
  16051. "type": "string"
  16052. },
  16053. "cost": {
  16054. "type": "number"
  16055. },
  16056. "tokens": {
  16057. "type": "object",
  16058. "properties": {
  16059. "total": {
  16060. "type": "number"
  16061. },
  16062. "input": {
  16063. "type": "number"
  16064. },
  16065. "output": {
  16066. "type": "number"
  16067. },
  16068. "reasoning": {
  16069. "type": "number"
  16070. },
  16071. "cache": {
  16072. "type": "object",
  16073. "properties": {
  16074. "read": {
  16075. "type": "number"
  16076. },
  16077. "write": {
  16078. "type": "number"
  16079. }
  16080. },
  16081. "required": ["read", "write"],
  16082. "additionalProperties": false
  16083. }
  16084. },
  16085. "required": ["input", "output", "reasoning", "cache"],
  16086. "additionalProperties": false
  16087. }
  16088. },
  16089. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  16090. "additionalProperties": false
  16091. },
  16092. "SnapshotPart": {
  16093. "type": "object",
  16094. "properties": {
  16095. "id": {
  16096. "type": "string",
  16097. "pattern": "^prt"
  16098. },
  16099. "sessionID": {
  16100. "type": "string",
  16101. "pattern": "^ses"
  16102. },
  16103. "messageID": {
  16104. "type": "string",
  16105. "pattern": "^msg"
  16106. },
  16107. "type": {
  16108. "type": "string",
  16109. "enum": ["snapshot"]
  16110. },
  16111. "snapshot": {
  16112. "type": "string"
  16113. }
  16114. },
  16115. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  16116. "additionalProperties": false
  16117. },
  16118. "PatchPart": {
  16119. "type": "object",
  16120. "properties": {
  16121. "id": {
  16122. "type": "string",
  16123. "pattern": "^prt"
  16124. },
  16125. "sessionID": {
  16126. "type": "string",
  16127. "pattern": "^ses"
  16128. },
  16129. "messageID": {
  16130. "type": "string",
  16131. "pattern": "^msg"
  16132. },
  16133. "type": {
  16134. "type": "string",
  16135. "enum": ["patch"]
  16136. },
  16137. "hash": {
  16138. "type": "string"
  16139. },
  16140. "files": {
  16141. "type": "array",
  16142. "items": {
  16143. "type": "string"
  16144. }
  16145. }
  16146. },
  16147. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  16148. "additionalProperties": false
  16149. },
  16150. "AgentPart": {
  16151. "type": "object",
  16152. "properties": {
  16153. "id": {
  16154. "type": "string",
  16155. "pattern": "^prt"
  16156. },
  16157. "sessionID": {
  16158. "type": "string",
  16159. "pattern": "^ses"
  16160. },
  16161. "messageID": {
  16162. "type": "string",
  16163. "pattern": "^msg"
  16164. },
  16165. "type": {
  16166. "type": "string",
  16167. "enum": ["agent"]
  16168. },
  16169. "name": {
  16170. "type": "string"
  16171. },
  16172. "source": {
  16173. "type": "object",
  16174. "properties": {
  16175. "value": {
  16176. "type": "string"
  16177. },
  16178. "start": {
  16179. "type": "integer",
  16180. "minimum": 0
  16181. },
  16182. "end": {
  16183. "type": "integer",
  16184. "minimum": 0
  16185. }
  16186. },
  16187. "required": ["value", "start", "end"],
  16188. "additionalProperties": false
  16189. }
  16190. },
  16191. "required": ["id", "sessionID", "messageID", "type", "name"],
  16192. "additionalProperties": false
  16193. },
  16194. "RetryPart": {
  16195. "type": "object",
  16196. "properties": {
  16197. "id": {
  16198. "type": "string",
  16199. "pattern": "^prt"
  16200. },
  16201. "sessionID": {
  16202. "type": "string",
  16203. "pattern": "^ses"
  16204. },
  16205. "messageID": {
  16206. "type": "string",
  16207. "pattern": "^msg"
  16208. },
  16209. "type": {
  16210. "type": "string",
  16211. "enum": ["retry"]
  16212. },
  16213. "attempt": {
  16214. "type": "integer",
  16215. "minimum": 0
  16216. },
  16217. "error": {
  16218. "$ref": "#/components/schemas/APIError"
  16219. },
  16220. "time": {
  16221. "type": "object",
  16222. "properties": {
  16223. "created": {
  16224. "type": "integer",
  16225. "minimum": 0
  16226. }
  16227. },
  16228. "required": ["created"],
  16229. "additionalProperties": false
  16230. }
  16231. },
  16232. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  16233. "additionalProperties": false
  16234. },
  16235. "CompactionPart": {
  16236. "type": "object",
  16237. "properties": {
  16238. "id": {
  16239. "type": "string",
  16240. "pattern": "^prt"
  16241. },
  16242. "sessionID": {
  16243. "type": "string",
  16244. "pattern": "^ses"
  16245. },
  16246. "messageID": {
  16247. "type": "string",
  16248. "pattern": "^msg"
  16249. },
  16250. "type": {
  16251. "type": "string",
  16252. "enum": ["compaction"]
  16253. },
  16254. "auto": {
  16255. "type": "boolean"
  16256. },
  16257. "overflow": {
  16258. "type": "boolean"
  16259. },
  16260. "tail_start_id": {
  16261. "type": "string",
  16262. "pattern": "^msg"
  16263. }
  16264. },
  16265. "required": ["id", "sessionID", "messageID", "type", "auto"],
  16266. "additionalProperties": false
  16267. },
  16268. "Part": {
  16269. "anyOf": [
  16270. {
  16271. "$ref": "#/components/schemas/TextPart"
  16272. },
  16273. {
  16274. "$ref": "#/components/schemas/SubtaskPart"
  16275. },
  16276. {
  16277. "$ref": "#/components/schemas/ReasoningPart"
  16278. },
  16279. {
  16280. "$ref": "#/components/schemas/FilePart"
  16281. },
  16282. {
  16283. "$ref": "#/components/schemas/ToolPart"
  16284. },
  16285. {
  16286. "$ref": "#/components/schemas/StepStartPart"
  16287. },
  16288. {
  16289. "$ref": "#/components/schemas/StepFinishPart"
  16290. },
  16291. {
  16292. "$ref": "#/components/schemas/SnapshotPart"
  16293. },
  16294. {
  16295. "$ref": "#/components/schemas/PatchPart"
  16296. },
  16297. {
  16298. "$ref": "#/components/schemas/AgentPart"
  16299. },
  16300. {
  16301. "$ref": "#/components/schemas/RetryPart"
  16302. },
  16303. {
  16304. "$ref": "#/components/schemas/CompactionPart"
  16305. }
  16306. ]
  16307. },
  16308. "Prompt": {
  16309. "type": "object",
  16310. "properties": {
  16311. "text": {
  16312. "type": "string"
  16313. },
  16314. "files": {
  16315. "type": "array",
  16316. "items": {
  16317. "$ref": "#/components/schemas/PromptFileAttachment"
  16318. }
  16319. },
  16320. "agents": {
  16321. "type": "array",
  16322. "items": {
  16323. "$ref": "#/components/schemas/PromptAgentAttachment"
  16324. }
  16325. }
  16326. },
  16327. "required": ["text"],
  16328. "additionalProperties": false
  16329. },
  16330. "Pty": {
  16331. "type": "object",
  16332. "properties": {
  16333. "id": {
  16334. "type": "string",
  16335. "pattern": "^pty"
  16336. },
  16337. "title": {
  16338. "type": "string"
  16339. },
  16340. "command": {
  16341. "type": "string"
  16342. },
  16343. "args": {
  16344. "type": "array",
  16345. "items": {
  16346. "type": "string"
  16347. }
  16348. },
  16349. "cwd": {
  16350. "type": "string"
  16351. },
  16352. "status": {
  16353. "type": "string",
  16354. "enum": ["running", "exited"]
  16355. },
  16356. "pid": {
  16357. "type": "integer",
  16358. "minimum": 0
  16359. },
  16360. "exitCode": {
  16361. "type": "integer",
  16362. "minimum": 0
  16363. }
  16364. },
  16365. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  16366. "additionalProperties": false
  16367. },
  16368. "Todo": {
  16369. "type": "object",
  16370. "properties": {
  16371. "content": {
  16372. "type": "string",
  16373. "description": "Brief description of the task"
  16374. },
  16375. "status": {
  16376. "type": "string",
  16377. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  16378. },
  16379. "priority": {
  16380. "type": "string",
  16381. "description": "Priority level of the task: high, medium, low"
  16382. }
  16383. },
  16384. "required": ["content", "status", "priority"],
  16385. "additionalProperties": false
  16386. },
  16387. "SessionStatus": {
  16388. "anyOf": [
  16389. {
  16390. "type": "object",
  16391. "properties": {
  16392. "type": {
  16393. "type": "string",
  16394. "enum": ["idle"]
  16395. }
  16396. },
  16397. "required": ["type"],
  16398. "additionalProperties": false
  16399. },
  16400. {
  16401. "type": "object",
  16402. "properties": {
  16403. "type": {
  16404. "type": "string",
  16405. "enum": ["retry"]
  16406. },
  16407. "attempt": {
  16408. "type": "integer",
  16409. "minimum": 0
  16410. },
  16411. "message": {
  16412. "type": "string"
  16413. },
  16414. "action": {
  16415. "type": "object",
  16416. "properties": {
  16417. "reason": {
  16418. "type": "string"
  16419. },
  16420. "provider": {
  16421. "type": "string"
  16422. },
  16423. "title": {
  16424. "type": "string"
  16425. },
  16426. "message": {
  16427. "type": "string"
  16428. },
  16429. "label": {
  16430. "type": "string"
  16431. },
  16432. "link": {
  16433. "type": "string"
  16434. }
  16435. },
  16436. "required": ["reason", "provider", "title", "message", "label"],
  16437. "additionalProperties": false
  16438. },
  16439. "next": {
  16440. "type": "integer",
  16441. "minimum": 0
  16442. }
  16443. },
  16444. "required": ["type", "attempt", "message", "next"],
  16445. "additionalProperties": false
  16446. },
  16447. {
  16448. "type": "object",
  16449. "properties": {
  16450. "type": {
  16451. "type": "string",
  16452. "enum": ["busy"]
  16453. }
  16454. },
  16455. "required": ["type"],
  16456. "additionalProperties": false
  16457. }
  16458. ]
  16459. },
  16460. "QuestionOption": {
  16461. "type": "object",
  16462. "properties": {
  16463. "label": {
  16464. "type": "string",
  16465. "description": "Display text (1-5 words, concise)"
  16466. },
  16467. "description": {
  16468. "type": "string",
  16469. "description": "Explanation of choice"
  16470. }
  16471. },
  16472. "required": ["label", "description"],
  16473. "additionalProperties": false
  16474. },
  16475. "QuestionInfo": {
  16476. "type": "object",
  16477. "properties": {
  16478. "question": {
  16479. "type": "string",
  16480. "description": "Complete question"
  16481. },
  16482. "header": {
  16483. "type": "string",
  16484. "description": "Very short label (max 30 chars)"
  16485. },
  16486. "options": {
  16487. "type": "array",
  16488. "items": {
  16489. "$ref": "#/components/schemas/QuestionOption"
  16490. },
  16491. "description": "Available choices"
  16492. },
  16493. "multiple": {
  16494. "type": "boolean"
  16495. },
  16496. "custom": {
  16497. "type": "boolean"
  16498. }
  16499. },
  16500. "required": ["question", "header", "options"],
  16501. "additionalProperties": false
  16502. },
  16503. "QuestionTool": {
  16504. "type": "object",
  16505. "properties": {
  16506. "messageID": {
  16507. "type": "string",
  16508. "pattern": "^msg"
  16509. },
  16510. "callID": {
  16511. "type": "string"
  16512. }
  16513. },
  16514. "required": ["messageID", "callID"],
  16515. "additionalProperties": false
  16516. },
  16517. "QuestionAnswer": {
  16518. "type": "array",
  16519. "items": {
  16520. "type": "string"
  16521. }
  16522. },
  16523. "GlobalEvent": {
  16524. "type": "object",
  16525. "properties": {
  16526. "directory": {
  16527. "type": "string"
  16528. },
  16529. "project": {
  16530. "type": "string"
  16531. },
  16532. "workspace": {
  16533. "type": "string"
  16534. },
  16535. "payload": {
  16536. "anyOf": [
  16537. {
  16538. "type": "object",
  16539. "properties": {
  16540. "id": {
  16541. "type": "string",
  16542. "pattern": "^evt_"
  16543. },
  16544. "type": {
  16545. "type": "string",
  16546. "enum": ["models-dev.refreshed"]
  16547. },
  16548. "properties": {
  16549. "type": "object",
  16550. "properties": {}
  16551. }
  16552. },
  16553. "required": ["id", "type", "properties"],
  16554. "additionalProperties": false
  16555. },
  16556. {
  16557. "type": "object",
  16558. "properties": {
  16559. "id": {
  16560. "type": "string",
  16561. "pattern": "^evt_"
  16562. },
  16563. "type": {
  16564. "type": "string",
  16565. "enum": ["plugin.added"]
  16566. },
  16567. "properties": {
  16568. "type": "object",
  16569. "properties": {
  16570. "id": {
  16571. "type": "string"
  16572. }
  16573. },
  16574. "required": ["id"],
  16575. "additionalProperties": false
  16576. }
  16577. },
  16578. "required": ["id", "type", "properties"],
  16579. "additionalProperties": false
  16580. },
  16581. {
  16582. "type": "object",
  16583. "properties": {
  16584. "id": {
  16585. "type": "string",
  16586. "pattern": "^evt_"
  16587. },
  16588. "type": {
  16589. "type": "string",
  16590. "enum": ["catalog.model.updated"]
  16591. },
  16592. "properties": {
  16593. "type": "object",
  16594. "properties": {
  16595. "model": {
  16596. "$ref": "#/components/schemas/ModelV2Info"
  16597. }
  16598. },
  16599. "required": ["model"],
  16600. "additionalProperties": false
  16601. }
  16602. },
  16603. "required": ["id", "type", "properties"],
  16604. "additionalProperties": false
  16605. },
  16606. {
  16607. "type": "object",
  16608. "properties": {
  16609. "id": {
  16610. "type": "string",
  16611. "pattern": "^evt_"
  16612. },
  16613. "type": {
  16614. "type": "string",
  16615. "enum": ["session.created"]
  16616. },
  16617. "properties": {
  16618. "type": "object",
  16619. "properties": {
  16620. "sessionID": {
  16621. "type": "string",
  16622. "pattern": "^ses"
  16623. },
  16624. "info": {
  16625. "$ref": "#/components/schemas/Session"
  16626. }
  16627. },
  16628. "required": ["sessionID", "info"],
  16629. "additionalProperties": false
  16630. }
  16631. },
  16632. "required": ["id", "type", "properties"],
  16633. "additionalProperties": false
  16634. },
  16635. {
  16636. "type": "object",
  16637. "properties": {
  16638. "id": {
  16639. "type": "string",
  16640. "pattern": "^evt_"
  16641. },
  16642. "type": {
  16643. "type": "string",
  16644. "enum": ["session.updated"]
  16645. },
  16646. "properties": {
  16647. "type": "object",
  16648. "properties": {
  16649. "sessionID": {
  16650. "type": "string",
  16651. "pattern": "^ses"
  16652. },
  16653. "info": {
  16654. "$ref": "#/components/schemas/Session"
  16655. }
  16656. },
  16657. "required": ["sessionID", "info"],
  16658. "additionalProperties": false
  16659. }
  16660. },
  16661. "required": ["id", "type", "properties"],
  16662. "additionalProperties": false
  16663. },
  16664. {
  16665. "type": "object",
  16666. "properties": {
  16667. "id": {
  16668. "type": "string",
  16669. "pattern": "^evt_"
  16670. },
  16671. "type": {
  16672. "type": "string",
  16673. "enum": ["session.deleted"]
  16674. },
  16675. "properties": {
  16676. "type": "object",
  16677. "properties": {
  16678. "sessionID": {
  16679. "type": "string",
  16680. "pattern": "^ses"
  16681. },
  16682. "info": {
  16683. "$ref": "#/components/schemas/Session"
  16684. }
  16685. },
  16686. "required": ["sessionID", "info"],
  16687. "additionalProperties": false
  16688. }
  16689. },
  16690. "required": ["id", "type", "properties"],
  16691. "additionalProperties": false
  16692. },
  16693. {
  16694. "type": "object",
  16695. "properties": {
  16696. "id": {
  16697. "type": "string",
  16698. "pattern": "^evt_"
  16699. },
  16700. "type": {
  16701. "type": "string",
  16702. "enum": ["message.updated"]
  16703. },
  16704. "properties": {
  16705. "type": "object",
  16706. "properties": {
  16707. "sessionID": {
  16708. "type": "string",
  16709. "pattern": "^ses"
  16710. },
  16711. "info": {
  16712. "$ref": "#/components/schemas/Message"
  16713. }
  16714. },
  16715. "required": ["sessionID", "info"],
  16716. "additionalProperties": false
  16717. }
  16718. },
  16719. "required": ["id", "type", "properties"],
  16720. "additionalProperties": false
  16721. },
  16722. {
  16723. "type": "object",
  16724. "properties": {
  16725. "id": {
  16726. "type": "string",
  16727. "pattern": "^evt_"
  16728. },
  16729. "type": {
  16730. "type": "string",
  16731. "enum": ["message.removed"]
  16732. },
  16733. "properties": {
  16734. "type": "object",
  16735. "properties": {
  16736. "sessionID": {
  16737. "type": "string",
  16738. "pattern": "^ses"
  16739. },
  16740. "messageID": {
  16741. "type": "string",
  16742. "pattern": "^msg"
  16743. }
  16744. },
  16745. "required": ["sessionID", "messageID"],
  16746. "additionalProperties": false
  16747. }
  16748. },
  16749. "required": ["id", "type", "properties"],
  16750. "additionalProperties": false
  16751. },
  16752. {
  16753. "type": "object",
  16754. "properties": {
  16755. "id": {
  16756. "type": "string",
  16757. "pattern": "^evt_"
  16758. },
  16759. "type": {
  16760. "type": "string",
  16761. "enum": ["message.part.updated"]
  16762. },
  16763. "properties": {
  16764. "type": "object",
  16765. "properties": {
  16766. "sessionID": {
  16767. "type": "string",
  16768. "pattern": "^ses"
  16769. },
  16770. "part": {
  16771. "$ref": "#/components/schemas/Part"
  16772. },
  16773. "time": {
  16774. "type": "number"
  16775. }
  16776. },
  16777. "required": ["sessionID", "part", "time"],
  16778. "additionalProperties": false
  16779. }
  16780. },
  16781. "required": ["id", "type", "properties"],
  16782. "additionalProperties": false
  16783. },
  16784. {
  16785. "type": "object",
  16786. "properties": {
  16787. "id": {
  16788. "type": "string",
  16789. "pattern": "^evt_"
  16790. },
  16791. "type": {
  16792. "type": "string",
  16793. "enum": ["message.part.removed"]
  16794. },
  16795. "properties": {
  16796. "type": "object",
  16797. "properties": {
  16798. "sessionID": {
  16799. "type": "string",
  16800. "pattern": "^ses"
  16801. },
  16802. "messageID": {
  16803. "type": "string",
  16804. "pattern": "^msg"
  16805. },
  16806. "partID": {
  16807. "type": "string",
  16808. "pattern": "^prt"
  16809. }
  16810. },
  16811. "required": ["sessionID", "messageID", "partID"],
  16812. "additionalProperties": false
  16813. }
  16814. },
  16815. "required": ["id", "type", "properties"],
  16816. "additionalProperties": false
  16817. },
  16818. {
  16819. "type": "object",
  16820. "properties": {
  16821. "id": {
  16822. "type": "string",
  16823. "pattern": "^evt_"
  16824. },
  16825. "type": {
  16826. "type": "string",
  16827. "enum": ["session.next.agent.switched"]
  16828. },
  16829. "properties": {
  16830. "type": "object",
  16831. "properties": {
  16832. "timestamp": {
  16833. "type": "number"
  16834. },
  16835. "sessionID": {
  16836. "type": "string",
  16837. "pattern": "^ses"
  16838. },
  16839. "messageID": {
  16840. "type": "string",
  16841. "pattern": "^msg_"
  16842. },
  16843. "agent": {
  16844. "type": "string"
  16845. }
  16846. },
  16847. "required": ["timestamp", "sessionID", "messageID", "agent"],
  16848. "additionalProperties": false
  16849. }
  16850. },
  16851. "required": ["id", "type", "properties"],
  16852. "additionalProperties": false
  16853. },
  16854. {
  16855. "type": "object",
  16856. "properties": {
  16857. "id": {
  16858. "type": "string",
  16859. "pattern": "^evt_"
  16860. },
  16861. "type": {
  16862. "type": "string",
  16863. "enum": ["session.next.model.switched"]
  16864. },
  16865. "properties": {
  16866. "type": "object",
  16867. "properties": {
  16868. "timestamp": {
  16869. "type": "number"
  16870. },
  16871. "sessionID": {
  16872. "type": "string",
  16873. "pattern": "^ses"
  16874. },
  16875. "messageID": {
  16876. "type": "string",
  16877. "pattern": "^msg_"
  16878. },
  16879. "model": {
  16880. "type": "object",
  16881. "properties": {
  16882. "id": {
  16883. "type": "string"
  16884. },
  16885. "providerID": {
  16886. "type": "string"
  16887. },
  16888. "variant": {
  16889. "type": "string"
  16890. }
  16891. },
  16892. "required": ["id", "providerID"],
  16893. "additionalProperties": false
  16894. }
  16895. },
  16896. "required": ["timestamp", "sessionID", "messageID", "model"],
  16897. "additionalProperties": false
  16898. }
  16899. },
  16900. "required": ["id", "type", "properties"],
  16901. "additionalProperties": false
  16902. },
  16903. {
  16904. "type": "object",
  16905. "properties": {
  16906. "id": {
  16907. "type": "string",
  16908. "pattern": "^evt_"
  16909. },
  16910. "type": {
  16911. "type": "string",
  16912. "enum": ["session.next.moved"]
  16913. },
  16914. "properties": {
  16915. "type": "object",
  16916. "properties": {
  16917. "timestamp": {
  16918. "type": "number"
  16919. },
  16920. "sessionID": {
  16921. "type": "string",
  16922. "pattern": "^ses"
  16923. },
  16924. "location": {
  16925. "$ref": "#/components/schemas/LocationRef"
  16926. },
  16927. "subdirectory": {
  16928. "type": "string"
  16929. }
  16930. },
  16931. "required": ["timestamp", "sessionID", "location"],
  16932. "additionalProperties": false
  16933. }
  16934. },
  16935. "required": ["id", "type", "properties"],
  16936. "additionalProperties": false
  16937. },
  16938. {
  16939. "type": "object",
  16940. "properties": {
  16941. "id": {
  16942. "type": "string",
  16943. "pattern": "^evt_"
  16944. },
  16945. "type": {
  16946. "type": "string",
  16947. "enum": ["session.next.prompted"]
  16948. },
  16949. "properties": {
  16950. "type": "object",
  16951. "properties": {
  16952. "timestamp": {
  16953. "type": "number"
  16954. },
  16955. "sessionID": {
  16956. "type": "string",
  16957. "pattern": "^ses"
  16958. },
  16959. "messageID": {
  16960. "type": "string",
  16961. "pattern": "^msg_"
  16962. },
  16963. "prompt": {
  16964. "$ref": "#/components/schemas/Prompt"
  16965. },
  16966. "delivery": {
  16967. "type": "string",
  16968. "enum": ["steer", "queue"]
  16969. }
  16970. },
  16971. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  16972. "additionalProperties": false
  16973. }
  16974. },
  16975. "required": ["id", "type", "properties"],
  16976. "additionalProperties": false
  16977. },
  16978. {
  16979. "type": "object",
  16980. "properties": {
  16981. "id": {
  16982. "type": "string",
  16983. "pattern": "^evt_"
  16984. },
  16985. "type": {
  16986. "type": "string",
  16987. "enum": ["session.next.prompt.admitted"]
  16988. },
  16989. "properties": {
  16990. "type": "object",
  16991. "properties": {
  16992. "timestamp": {
  16993. "type": "number"
  16994. },
  16995. "sessionID": {
  16996. "type": "string",
  16997. "pattern": "^ses"
  16998. },
  16999. "messageID": {
  17000. "type": "string",
  17001. "pattern": "^msg_"
  17002. },
  17003. "prompt": {
  17004. "$ref": "#/components/schemas/Prompt"
  17005. },
  17006. "delivery": {
  17007. "type": "string",
  17008. "enum": ["steer", "queue"]
  17009. }
  17010. },
  17011. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  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.prompt.promoted"]
  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. "timeCreated": {
  17047. "type": "number"
  17048. }
  17049. },
  17050. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  17051. "additionalProperties": false
  17052. }
  17053. },
  17054. "required": ["id", "type", "properties"],
  17055. "additionalProperties": false
  17056. },
  17057. {
  17058. "type": "object",
  17059. "properties": {
  17060. "id": {
  17061. "type": "string",
  17062. "pattern": "^evt_"
  17063. },
  17064. "type": {
  17065. "type": "string",
  17066. "enum": ["session.next.interrupt.requested"]
  17067. },
  17068. "properties": {
  17069. "type": "object",
  17070. "properties": {
  17071. "timestamp": {
  17072. "type": "number"
  17073. },
  17074. "sessionID": {
  17075. "type": "string",
  17076. "pattern": "^ses"
  17077. }
  17078. },
  17079. "required": ["timestamp", "sessionID"],
  17080. "additionalProperties": false
  17081. }
  17082. },
  17083. "required": ["id", "type", "properties"],
  17084. "additionalProperties": false
  17085. },
  17086. {
  17087. "type": "object",
  17088. "properties": {
  17089. "id": {
  17090. "type": "string",
  17091. "pattern": "^evt_"
  17092. },
  17093. "type": {
  17094. "type": "string",
  17095. "enum": ["session.next.context.updated"]
  17096. },
  17097. "properties": {
  17098. "type": "object",
  17099. "properties": {
  17100. "timestamp": {
  17101. "type": "number"
  17102. },
  17103. "sessionID": {
  17104. "type": "string",
  17105. "pattern": "^ses"
  17106. },
  17107. "messageID": {
  17108. "type": "string",
  17109. "pattern": "^msg_"
  17110. },
  17111. "text": {
  17112. "type": "string"
  17113. }
  17114. },
  17115. "required": ["timestamp", "sessionID", "messageID", "text"],
  17116. "additionalProperties": false
  17117. }
  17118. },
  17119. "required": ["id", "type", "properties"],
  17120. "additionalProperties": false
  17121. },
  17122. {
  17123. "type": "object",
  17124. "properties": {
  17125. "id": {
  17126. "type": "string",
  17127. "pattern": "^evt_"
  17128. },
  17129. "type": {
  17130. "type": "string",
  17131. "enum": ["session.next.synthetic"]
  17132. },
  17133. "properties": {
  17134. "type": "object",
  17135. "properties": {
  17136. "timestamp": {
  17137. "type": "number"
  17138. },
  17139. "sessionID": {
  17140. "type": "string",
  17141. "pattern": "^ses"
  17142. },
  17143. "messageID": {
  17144. "type": "string",
  17145. "pattern": "^msg_"
  17146. },
  17147. "text": {
  17148. "type": "string"
  17149. }
  17150. },
  17151. "required": ["timestamp", "sessionID", "messageID", "text"],
  17152. "additionalProperties": false
  17153. }
  17154. },
  17155. "required": ["id", "type", "properties"],
  17156. "additionalProperties": false
  17157. },
  17158. {
  17159. "type": "object",
  17160. "properties": {
  17161. "id": {
  17162. "type": "string",
  17163. "pattern": "^evt_"
  17164. },
  17165. "type": {
  17166. "type": "string",
  17167. "enum": ["session.next.shell.started"]
  17168. },
  17169. "properties": {
  17170. "type": "object",
  17171. "properties": {
  17172. "timestamp": {
  17173. "type": "number"
  17174. },
  17175. "sessionID": {
  17176. "type": "string",
  17177. "pattern": "^ses"
  17178. },
  17179. "messageID": {
  17180. "type": "string",
  17181. "pattern": "^msg_"
  17182. },
  17183. "callID": {
  17184. "type": "string"
  17185. },
  17186. "command": {
  17187. "type": "string"
  17188. }
  17189. },
  17190. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  17191. "additionalProperties": false
  17192. }
  17193. },
  17194. "required": ["id", "type", "properties"],
  17195. "additionalProperties": false
  17196. },
  17197. {
  17198. "type": "object",
  17199. "properties": {
  17200. "id": {
  17201. "type": "string",
  17202. "pattern": "^evt_"
  17203. },
  17204. "type": {
  17205. "type": "string",
  17206. "enum": ["session.next.shell.ended"]
  17207. },
  17208. "properties": {
  17209. "type": "object",
  17210. "properties": {
  17211. "timestamp": {
  17212. "type": "number"
  17213. },
  17214. "sessionID": {
  17215. "type": "string",
  17216. "pattern": "^ses"
  17217. },
  17218. "callID": {
  17219. "type": "string"
  17220. },
  17221. "output": {
  17222. "type": "string"
  17223. }
  17224. },
  17225. "required": ["timestamp", "sessionID", "callID", "output"],
  17226. "additionalProperties": false
  17227. }
  17228. },
  17229. "required": ["id", "type", "properties"],
  17230. "additionalProperties": false
  17231. },
  17232. {
  17233. "type": "object",
  17234. "properties": {
  17235. "id": {
  17236. "type": "string",
  17237. "pattern": "^evt_"
  17238. },
  17239. "type": {
  17240. "type": "string",
  17241. "enum": ["session.next.step.started"]
  17242. },
  17243. "properties": {
  17244. "type": "object",
  17245. "properties": {
  17246. "timestamp": {
  17247. "type": "number"
  17248. },
  17249. "sessionID": {
  17250. "type": "string",
  17251. "pattern": "^ses"
  17252. },
  17253. "assistantMessageID": {
  17254. "type": "string",
  17255. "pattern": "^msg_"
  17256. },
  17257. "agent": {
  17258. "type": "string"
  17259. },
  17260. "model": {
  17261. "type": "object",
  17262. "properties": {
  17263. "id": {
  17264. "type": "string"
  17265. },
  17266. "providerID": {
  17267. "type": "string"
  17268. },
  17269. "variant": {
  17270. "type": "string"
  17271. }
  17272. },
  17273. "required": ["id", "providerID"],
  17274. "additionalProperties": false
  17275. },
  17276. "snapshot": {
  17277. "type": "string"
  17278. }
  17279. },
  17280. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  17281. "additionalProperties": false
  17282. }
  17283. },
  17284. "required": ["id", "type", "properties"],
  17285. "additionalProperties": false
  17286. },
  17287. {
  17288. "type": "object",
  17289. "properties": {
  17290. "id": {
  17291. "type": "string",
  17292. "pattern": "^evt_"
  17293. },
  17294. "type": {
  17295. "type": "string",
  17296. "enum": ["session.next.step.ended"]
  17297. },
  17298. "properties": {
  17299. "type": "object",
  17300. "properties": {
  17301. "timestamp": {
  17302. "type": "number"
  17303. },
  17304. "sessionID": {
  17305. "type": "string",
  17306. "pattern": "^ses"
  17307. },
  17308. "assistantMessageID": {
  17309. "type": "string",
  17310. "pattern": "^msg_"
  17311. },
  17312. "finish": {
  17313. "type": "string"
  17314. },
  17315. "cost": {
  17316. "type": "number"
  17317. },
  17318. "tokens": {
  17319. "type": "object",
  17320. "properties": {
  17321. "input": {
  17322. "type": "number"
  17323. },
  17324. "output": {
  17325. "type": "number"
  17326. },
  17327. "reasoning": {
  17328. "type": "number"
  17329. },
  17330. "cache": {
  17331. "type": "object",
  17332. "properties": {
  17333. "read": {
  17334. "type": "number"
  17335. },
  17336. "write": {
  17337. "type": "number"
  17338. }
  17339. },
  17340. "required": ["read", "write"],
  17341. "additionalProperties": false
  17342. }
  17343. },
  17344. "required": ["input", "output", "reasoning", "cache"],
  17345. "additionalProperties": false
  17346. },
  17347. "snapshot": {
  17348. "type": "string"
  17349. }
  17350. },
  17351. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  17352. "additionalProperties": false
  17353. }
  17354. },
  17355. "required": ["id", "type", "properties"],
  17356. "additionalProperties": false
  17357. },
  17358. {
  17359. "type": "object",
  17360. "properties": {
  17361. "id": {
  17362. "type": "string",
  17363. "pattern": "^evt_"
  17364. },
  17365. "type": {
  17366. "type": "string",
  17367. "enum": ["session.next.step.failed"]
  17368. },
  17369. "properties": {
  17370. "type": "object",
  17371. "properties": {
  17372. "timestamp": {
  17373. "type": "number"
  17374. },
  17375. "sessionID": {
  17376. "type": "string",
  17377. "pattern": "^ses"
  17378. },
  17379. "assistantMessageID": {
  17380. "type": "string",
  17381. "pattern": "^msg_"
  17382. },
  17383. "error": {
  17384. "$ref": "#/components/schemas/SessionErrorUnknown"
  17385. }
  17386. },
  17387. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  17388. "additionalProperties": false
  17389. }
  17390. },
  17391. "required": ["id", "type", "properties"],
  17392. "additionalProperties": false
  17393. },
  17394. {
  17395. "type": "object",
  17396. "properties": {
  17397. "id": {
  17398. "type": "string",
  17399. "pattern": "^evt_"
  17400. },
  17401. "type": {
  17402. "type": "string",
  17403. "enum": ["session.next.text.started"]
  17404. },
  17405. "properties": {
  17406. "type": "object",
  17407. "properties": {
  17408. "timestamp": {
  17409. "type": "number"
  17410. },
  17411. "sessionID": {
  17412. "type": "string",
  17413. "pattern": "^ses"
  17414. },
  17415. "assistantMessageID": {
  17416. "type": "string",
  17417. "pattern": "^msg_"
  17418. },
  17419. "textID": {
  17420. "type": "string"
  17421. }
  17422. },
  17423. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  17424. "additionalProperties": false
  17425. }
  17426. },
  17427. "required": ["id", "type", "properties"],
  17428. "additionalProperties": false
  17429. },
  17430. {
  17431. "type": "object",
  17432. "properties": {
  17433. "id": {
  17434. "type": "string",
  17435. "pattern": "^evt_"
  17436. },
  17437. "type": {
  17438. "type": "string",
  17439. "enum": ["session.next.text.delta"]
  17440. },
  17441. "properties": {
  17442. "type": "object",
  17443. "properties": {
  17444. "timestamp": {
  17445. "type": "number"
  17446. },
  17447. "sessionID": {
  17448. "type": "string",
  17449. "pattern": "^ses"
  17450. },
  17451. "assistantMessageID": {
  17452. "type": "string",
  17453. "pattern": "^msg_"
  17454. },
  17455. "textID": {
  17456. "type": "string"
  17457. },
  17458. "delta": {
  17459. "type": "string"
  17460. }
  17461. },
  17462. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  17463. "additionalProperties": false
  17464. }
  17465. },
  17466. "required": ["id", "type", "properties"],
  17467. "additionalProperties": false
  17468. },
  17469. {
  17470. "type": "object",
  17471. "properties": {
  17472. "id": {
  17473. "type": "string",
  17474. "pattern": "^evt_"
  17475. },
  17476. "type": {
  17477. "type": "string",
  17478. "enum": ["session.next.text.ended"]
  17479. },
  17480. "properties": {
  17481. "type": "object",
  17482. "properties": {
  17483. "timestamp": {
  17484. "type": "number"
  17485. },
  17486. "sessionID": {
  17487. "type": "string",
  17488. "pattern": "^ses"
  17489. },
  17490. "assistantMessageID": {
  17491. "type": "string",
  17492. "pattern": "^msg_"
  17493. },
  17494. "textID": {
  17495. "type": "string"
  17496. },
  17497. "text": {
  17498. "type": "string"
  17499. }
  17500. },
  17501. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  17502. "additionalProperties": false
  17503. }
  17504. },
  17505. "required": ["id", "type", "properties"],
  17506. "additionalProperties": false
  17507. },
  17508. {
  17509. "type": "object",
  17510. "properties": {
  17511. "id": {
  17512. "type": "string",
  17513. "pattern": "^evt_"
  17514. },
  17515. "type": {
  17516. "type": "string",
  17517. "enum": ["session.next.reasoning.started"]
  17518. },
  17519. "properties": {
  17520. "type": "object",
  17521. "properties": {
  17522. "timestamp": {
  17523. "type": "number"
  17524. },
  17525. "sessionID": {
  17526. "type": "string",
  17527. "pattern": "^ses"
  17528. },
  17529. "assistantMessageID": {
  17530. "type": "string",
  17531. "pattern": "^msg_"
  17532. },
  17533. "reasoningID": {
  17534. "type": "string"
  17535. },
  17536. "providerMetadata": {
  17537. "type": "object",
  17538. "additionalProperties": {
  17539. "type": "object"
  17540. }
  17541. }
  17542. },
  17543. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  17544. "additionalProperties": false
  17545. }
  17546. },
  17547. "required": ["id", "type", "properties"],
  17548. "additionalProperties": false
  17549. },
  17550. {
  17551. "type": "object",
  17552. "properties": {
  17553. "id": {
  17554. "type": "string",
  17555. "pattern": "^evt_"
  17556. },
  17557. "type": {
  17558. "type": "string",
  17559. "enum": ["session.next.reasoning.delta"]
  17560. },
  17561. "properties": {
  17562. "type": "object",
  17563. "properties": {
  17564. "timestamp": {
  17565. "type": "number"
  17566. },
  17567. "sessionID": {
  17568. "type": "string",
  17569. "pattern": "^ses"
  17570. },
  17571. "assistantMessageID": {
  17572. "type": "string",
  17573. "pattern": "^msg_"
  17574. },
  17575. "reasoningID": {
  17576. "type": "string"
  17577. },
  17578. "delta": {
  17579. "type": "string"
  17580. }
  17581. },
  17582. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  17583. "additionalProperties": false
  17584. }
  17585. },
  17586. "required": ["id", "type", "properties"],
  17587. "additionalProperties": false
  17588. },
  17589. {
  17590. "type": "object",
  17591. "properties": {
  17592. "id": {
  17593. "type": "string",
  17594. "pattern": "^evt_"
  17595. },
  17596. "type": {
  17597. "type": "string",
  17598. "enum": ["session.next.reasoning.ended"]
  17599. },
  17600. "properties": {
  17601. "type": "object",
  17602. "properties": {
  17603. "timestamp": {
  17604. "type": "number"
  17605. },
  17606. "sessionID": {
  17607. "type": "string",
  17608. "pattern": "^ses"
  17609. },
  17610. "assistantMessageID": {
  17611. "type": "string",
  17612. "pattern": "^msg_"
  17613. },
  17614. "reasoningID": {
  17615. "type": "string"
  17616. },
  17617. "text": {
  17618. "type": "string"
  17619. },
  17620. "providerMetadata": {
  17621. "type": "object",
  17622. "additionalProperties": {
  17623. "type": "object"
  17624. }
  17625. }
  17626. },
  17627. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  17628. "additionalProperties": false
  17629. }
  17630. },
  17631. "required": ["id", "type", "properties"],
  17632. "additionalProperties": false
  17633. },
  17634. {
  17635. "type": "object",
  17636. "properties": {
  17637. "id": {
  17638. "type": "string",
  17639. "pattern": "^evt_"
  17640. },
  17641. "type": {
  17642. "type": "string",
  17643. "enum": ["session.next.tool.input.started"]
  17644. },
  17645. "properties": {
  17646. "type": "object",
  17647. "properties": {
  17648. "timestamp": {
  17649. "type": "number"
  17650. },
  17651. "sessionID": {
  17652. "type": "string",
  17653. "pattern": "^ses"
  17654. },
  17655. "assistantMessageID": {
  17656. "type": "string",
  17657. "pattern": "^msg_"
  17658. },
  17659. "callID": {
  17660. "type": "string"
  17661. },
  17662. "name": {
  17663. "type": "string"
  17664. }
  17665. },
  17666. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  17667. "additionalProperties": false
  17668. }
  17669. },
  17670. "required": ["id", "type", "properties"],
  17671. "additionalProperties": false
  17672. },
  17673. {
  17674. "type": "object",
  17675. "properties": {
  17676. "id": {
  17677. "type": "string",
  17678. "pattern": "^evt_"
  17679. },
  17680. "type": {
  17681. "type": "string",
  17682. "enum": ["session.next.tool.input.delta"]
  17683. },
  17684. "properties": {
  17685. "type": "object",
  17686. "properties": {
  17687. "timestamp": {
  17688. "type": "number"
  17689. },
  17690. "sessionID": {
  17691. "type": "string",
  17692. "pattern": "^ses"
  17693. },
  17694. "assistantMessageID": {
  17695. "type": "string",
  17696. "pattern": "^msg_"
  17697. },
  17698. "callID": {
  17699. "type": "string"
  17700. },
  17701. "delta": {
  17702. "type": "string"
  17703. }
  17704. },
  17705. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  17706. "additionalProperties": false
  17707. }
  17708. },
  17709. "required": ["id", "type", "properties"],
  17710. "additionalProperties": false
  17711. },
  17712. {
  17713. "type": "object",
  17714. "properties": {
  17715. "id": {
  17716. "type": "string",
  17717. "pattern": "^evt_"
  17718. },
  17719. "type": {
  17720. "type": "string",
  17721. "enum": ["session.next.tool.input.ended"]
  17722. },
  17723. "properties": {
  17724. "type": "object",
  17725. "properties": {
  17726. "timestamp": {
  17727. "type": "number"
  17728. },
  17729. "sessionID": {
  17730. "type": "string",
  17731. "pattern": "^ses"
  17732. },
  17733. "assistantMessageID": {
  17734. "type": "string",
  17735. "pattern": "^msg_"
  17736. },
  17737. "callID": {
  17738. "type": "string"
  17739. },
  17740. "text": {
  17741. "type": "string"
  17742. }
  17743. },
  17744. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  17745. "additionalProperties": false
  17746. }
  17747. },
  17748. "required": ["id", "type", "properties"],
  17749. "additionalProperties": false
  17750. },
  17751. {
  17752. "type": "object",
  17753. "properties": {
  17754. "id": {
  17755. "type": "string",
  17756. "pattern": "^evt_"
  17757. },
  17758. "type": {
  17759. "type": "string",
  17760. "enum": ["session.next.tool.called"]
  17761. },
  17762. "properties": {
  17763. "type": "object",
  17764. "properties": {
  17765. "timestamp": {
  17766. "type": "number"
  17767. },
  17768. "sessionID": {
  17769. "type": "string",
  17770. "pattern": "^ses"
  17771. },
  17772. "assistantMessageID": {
  17773. "type": "string",
  17774. "pattern": "^msg_"
  17775. },
  17776. "callID": {
  17777. "type": "string"
  17778. },
  17779. "tool": {
  17780. "type": "string"
  17781. },
  17782. "input": {
  17783. "type": "object"
  17784. },
  17785. "provider": {
  17786. "type": "object",
  17787. "properties": {
  17788. "executed": {
  17789. "type": "boolean"
  17790. },
  17791. "metadata": {
  17792. "type": "object",
  17793. "additionalProperties": {
  17794. "type": "object"
  17795. }
  17796. }
  17797. },
  17798. "required": ["executed"],
  17799. "additionalProperties": false
  17800. }
  17801. },
  17802. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  17803. "additionalProperties": false
  17804. }
  17805. },
  17806. "required": ["id", "type", "properties"],
  17807. "additionalProperties": false
  17808. },
  17809. {
  17810. "type": "object",
  17811. "properties": {
  17812. "id": {
  17813. "type": "string",
  17814. "pattern": "^evt_"
  17815. },
  17816. "type": {
  17817. "type": "string",
  17818. "enum": ["session.next.tool.progress"]
  17819. },
  17820. "properties": {
  17821. "type": "object",
  17822. "properties": {
  17823. "timestamp": {
  17824. "type": "number"
  17825. },
  17826. "sessionID": {
  17827. "type": "string",
  17828. "pattern": "^ses"
  17829. },
  17830. "assistantMessageID": {
  17831. "type": "string",
  17832. "pattern": "^msg_"
  17833. },
  17834. "callID": {
  17835. "type": "string"
  17836. },
  17837. "structured": {
  17838. "type": "object"
  17839. },
  17840. "content": {
  17841. "type": "array",
  17842. "items": {
  17843. "anyOf": [
  17844. {
  17845. "$ref": "#/components/schemas/ToolTextContent"
  17846. },
  17847. {
  17848. "$ref": "#/components/schemas/ToolFileContent"
  17849. }
  17850. ]
  17851. }
  17852. }
  17853. },
  17854. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  17855. "additionalProperties": false
  17856. }
  17857. },
  17858. "required": ["id", "type", "properties"],
  17859. "additionalProperties": false
  17860. },
  17861. {
  17862. "type": "object",
  17863. "properties": {
  17864. "id": {
  17865. "type": "string",
  17866. "pattern": "^evt_"
  17867. },
  17868. "type": {
  17869. "type": "string",
  17870. "enum": ["session.next.tool.success"]
  17871. },
  17872. "properties": {
  17873. "type": "object",
  17874. "properties": {
  17875. "timestamp": {
  17876. "type": "number"
  17877. },
  17878. "sessionID": {
  17879. "type": "string",
  17880. "pattern": "^ses"
  17881. },
  17882. "assistantMessageID": {
  17883. "type": "string",
  17884. "pattern": "^msg_"
  17885. },
  17886. "callID": {
  17887. "type": "string"
  17888. },
  17889. "structured": {
  17890. "type": "object"
  17891. },
  17892. "content": {
  17893. "type": "array",
  17894. "items": {
  17895. "anyOf": [
  17896. {
  17897. "$ref": "#/components/schemas/ToolTextContent"
  17898. },
  17899. {
  17900. "$ref": "#/components/schemas/ToolFileContent"
  17901. }
  17902. ]
  17903. }
  17904. },
  17905. "outputPaths": {
  17906. "type": "array",
  17907. "items": {
  17908. "type": "string"
  17909. }
  17910. },
  17911. "result": {},
  17912. "provider": {
  17913. "type": "object",
  17914. "properties": {
  17915. "executed": {
  17916. "type": "boolean"
  17917. },
  17918. "metadata": {
  17919. "type": "object",
  17920. "additionalProperties": {
  17921. "type": "object"
  17922. }
  17923. }
  17924. },
  17925. "required": ["executed"],
  17926. "additionalProperties": false
  17927. }
  17928. },
  17929. "required": [
  17930. "timestamp",
  17931. "sessionID",
  17932. "assistantMessageID",
  17933. "callID",
  17934. "structured",
  17935. "content",
  17936. "provider"
  17937. ],
  17938. "additionalProperties": false
  17939. }
  17940. },
  17941. "required": ["id", "type", "properties"],
  17942. "additionalProperties": false
  17943. },
  17944. {
  17945. "type": "object",
  17946. "properties": {
  17947. "id": {
  17948. "type": "string",
  17949. "pattern": "^evt_"
  17950. },
  17951. "type": {
  17952. "type": "string",
  17953. "enum": ["session.next.tool.failed"]
  17954. },
  17955. "properties": {
  17956. "type": "object",
  17957. "properties": {
  17958. "timestamp": {
  17959. "type": "number"
  17960. },
  17961. "sessionID": {
  17962. "type": "string",
  17963. "pattern": "^ses"
  17964. },
  17965. "assistantMessageID": {
  17966. "type": "string",
  17967. "pattern": "^msg_"
  17968. },
  17969. "callID": {
  17970. "type": "string"
  17971. },
  17972. "error": {
  17973. "$ref": "#/components/schemas/SessionErrorUnknown"
  17974. },
  17975. "result": {},
  17976. "provider": {
  17977. "type": "object",
  17978. "properties": {
  17979. "executed": {
  17980. "type": "boolean"
  17981. },
  17982. "metadata": {
  17983. "type": "object",
  17984. "additionalProperties": {
  17985. "type": "object"
  17986. }
  17987. }
  17988. },
  17989. "required": ["executed"],
  17990. "additionalProperties": false
  17991. }
  17992. },
  17993. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  17994. "additionalProperties": false
  17995. }
  17996. },
  17997. "required": ["id", "type", "properties"],
  17998. "additionalProperties": false
  17999. },
  18000. {
  18001. "type": "object",
  18002. "properties": {
  18003. "id": {
  18004. "type": "string",
  18005. "pattern": "^evt_"
  18006. },
  18007. "type": {
  18008. "type": "string",
  18009. "enum": ["session.next.retried"]
  18010. },
  18011. "properties": {
  18012. "type": "object",
  18013. "properties": {
  18014. "timestamp": {
  18015. "type": "number"
  18016. },
  18017. "sessionID": {
  18018. "type": "string",
  18019. "pattern": "^ses"
  18020. },
  18021. "attempt": {
  18022. "type": "number"
  18023. },
  18024. "error": {
  18025. "$ref": "#/components/schemas/SessionNextRetry_error"
  18026. }
  18027. },
  18028. "required": ["timestamp", "sessionID", "attempt", "error"],
  18029. "additionalProperties": false
  18030. }
  18031. },
  18032. "required": ["id", "type", "properties"],
  18033. "additionalProperties": false
  18034. },
  18035. {
  18036. "type": "object",
  18037. "properties": {
  18038. "id": {
  18039. "type": "string",
  18040. "pattern": "^evt_"
  18041. },
  18042. "type": {
  18043. "type": "string",
  18044. "enum": ["session.next.compaction.started"]
  18045. },
  18046. "properties": {
  18047. "type": "object",
  18048. "properties": {
  18049. "timestamp": {
  18050. "type": "number"
  18051. },
  18052. "sessionID": {
  18053. "type": "string",
  18054. "pattern": "^ses"
  18055. },
  18056. "messageID": {
  18057. "type": "string",
  18058. "pattern": "^msg_"
  18059. },
  18060. "reason": {
  18061. "type": "string",
  18062. "enum": ["auto", "manual"]
  18063. }
  18064. },
  18065. "required": ["timestamp", "sessionID", "messageID", "reason"],
  18066. "additionalProperties": false
  18067. }
  18068. },
  18069. "required": ["id", "type", "properties"],
  18070. "additionalProperties": false
  18071. },
  18072. {
  18073. "type": "object",
  18074. "properties": {
  18075. "id": {
  18076. "type": "string",
  18077. "pattern": "^evt_"
  18078. },
  18079. "type": {
  18080. "type": "string",
  18081. "enum": ["session.next.compaction.delta"]
  18082. },
  18083. "properties": {
  18084. "type": "object",
  18085. "properties": {
  18086. "timestamp": {
  18087. "type": "number"
  18088. },
  18089. "sessionID": {
  18090. "type": "string",
  18091. "pattern": "^ses"
  18092. },
  18093. "messageID": {
  18094. "type": "string",
  18095. "pattern": "^msg_"
  18096. },
  18097. "text": {
  18098. "type": "string"
  18099. }
  18100. },
  18101. "required": ["timestamp", "sessionID", "messageID", "text"],
  18102. "additionalProperties": false
  18103. }
  18104. },
  18105. "required": ["id", "type", "properties"],
  18106. "additionalProperties": false
  18107. },
  18108. {
  18109. "type": "object",
  18110. "properties": {
  18111. "id": {
  18112. "type": "string",
  18113. "pattern": "^evt_"
  18114. },
  18115. "type": {
  18116. "type": "string",
  18117. "enum": ["session.next.compaction.ended"]
  18118. },
  18119. "properties": {
  18120. "type": "object",
  18121. "properties": {
  18122. "timestamp": {
  18123. "type": "number"
  18124. },
  18125. "sessionID": {
  18126. "type": "string",
  18127. "pattern": "^ses"
  18128. },
  18129. "messageID": {
  18130. "type": "string",
  18131. "pattern": "^msg_"
  18132. },
  18133. "reason": {
  18134. "type": "string",
  18135. "enum": ["auto", "manual"]
  18136. },
  18137. "text": {
  18138. "type": "string"
  18139. },
  18140. "recent": {
  18141. "type": "string"
  18142. }
  18143. },
  18144. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  18145. "additionalProperties": false
  18146. }
  18147. },
  18148. "required": ["id", "type", "properties"],
  18149. "additionalProperties": false
  18150. },
  18151. {
  18152. "type": "object",
  18153. "properties": {
  18154. "id": {
  18155. "type": "string",
  18156. "pattern": "^evt_"
  18157. },
  18158. "type": {
  18159. "type": "string",
  18160. "enum": ["message.part.delta"]
  18161. },
  18162. "properties": {
  18163. "type": "object",
  18164. "properties": {
  18165. "sessionID": {
  18166. "type": "string",
  18167. "pattern": "^ses"
  18168. },
  18169. "messageID": {
  18170. "type": "string",
  18171. "pattern": "^msg"
  18172. },
  18173. "partID": {
  18174. "type": "string",
  18175. "pattern": "^prt"
  18176. },
  18177. "field": {
  18178. "type": "string"
  18179. },
  18180. "delta": {
  18181. "type": "string"
  18182. }
  18183. },
  18184. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  18185. "additionalProperties": false
  18186. }
  18187. },
  18188. "required": ["id", "type", "properties"],
  18189. "additionalProperties": false
  18190. },
  18191. {
  18192. "type": "object",
  18193. "properties": {
  18194. "id": {
  18195. "type": "string",
  18196. "pattern": "^evt_"
  18197. },
  18198. "type": {
  18199. "type": "string",
  18200. "enum": ["session.diff"]
  18201. },
  18202. "properties": {
  18203. "type": "object",
  18204. "properties": {
  18205. "sessionID": {
  18206. "type": "string",
  18207. "pattern": "^ses"
  18208. },
  18209. "diff": {
  18210. "type": "array",
  18211. "items": {
  18212. "$ref": "#/components/schemas/SnapshotFileDiff"
  18213. }
  18214. }
  18215. },
  18216. "required": ["sessionID", "diff"],
  18217. "additionalProperties": false
  18218. }
  18219. },
  18220. "required": ["id", "type", "properties"],
  18221. "additionalProperties": false
  18222. },
  18223. {
  18224. "type": "object",
  18225. "properties": {
  18226. "id": {
  18227. "type": "string",
  18228. "pattern": "^evt_"
  18229. },
  18230. "type": {
  18231. "type": "string",
  18232. "enum": ["session.error"]
  18233. },
  18234. "properties": {
  18235. "type": "object",
  18236. "properties": {
  18237. "sessionID": {
  18238. "type": "string",
  18239. "pattern": "^ses"
  18240. },
  18241. "error": {
  18242. "anyOf": [
  18243. {
  18244. "$ref": "#/components/schemas/ProviderAuthError"
  18245. },
  18246. {
  18247. "$ref": "#/components/schemas/UnknownError"
  18248. },
  18249. {
  18250. "$ref": "#/components/schemas/MessageOutputLengthError"
  18251. },
  18252. {
  18253. "$ref": "#/components/schemas/MessageAbortedError"
  18254. },
  18255. {
  18256. "$ref": "#/components/schemas/StructuredOutputError"
  18257. },
  18258. {
  18259. "$ref": "#/components/schemas/ContextOverflowError"
  18260. },
  18261. {
  18262. "$ref": "#/components/schemas/ContentFilterError"
  18263. },
  18264. {
  18265. "$ref": "#/components/schemas/APIError"
  18266. }
  18267. ]
  18268. }
  18269. },
  18270. "additionalProperties": false
  18271. }
  18272. },
  18273. "required": ["id", "type", "properties"],
  18274. "additionalProperties": false
  18275. },
  18276. {
  18277. "type": "object",
  18278. "properties": {
  18279. "id": {
  18280. "type": "string",
  18281. "pattern": "^evt_"
  18282. },
  18283. "type": {
  18284. "type": "string",
  18285. "enum": ["installation.updated"]
  18286. },
  18287. "properties": {
  18288. "type": "object",
  18289. "properties": {
  18290. "version": {
  18291. "type": "string"
  18292. }
  18293. },
  18294. "required": ["version"],
  18295. "additionalProperties": false
  18296. }
  18297. },
  18298. "required": ["id", "type", "properties"],
  18299. "additionalProperties": false
  18300. },
  18301. {
  18302. "type": "object",
  18303. "properties": {
  18304. "id": {
  18305. "type": "string",
  18306. "pattern": "^evt_"
  18307. },
  18308. "type": {
  18309. "type": "string",
  18310. "enum": ["installation.update-available"]
  18311. },
  18312. "properties": {
  18313. "type": "object",
  18314. "properties": {
  18315. "version": {
  18316. "type": "string"
  18317. }
  18318. },
  18319. "required": ["version"],
  18320. "additionalProperties": false
  18321. }
  18322. },
  18323. "required": ["id", "type", "properties"],
  18324. "additionalProperties": false
  18325. },
  18326. {
  18327. "type": "object",
  18328. "properties": {
  18329. "id": {
  18330. "type": "string",
  18331. "pattern": "^evt_"
  18332. },
  18333. "type": {
  18334. "type": "string",
  18335. "enum": ["file.edited"]
  18336. },
  18337. "properties": {
  18338. "type": "object",
  18339. "properties": {
  18340. "file": {
  18341. "type": "string"
  18342. }
  18343. },
  18344. "required": ["file"],
  18345. "additionalProperties": false
  18346. }
  18347. },
  18348. "required": ["id", "type", "properties"],
  18349. "additionalProperties": false
  18350. },
  18351. {
  18352. "type": "object",
  18353. "properties": {
  18354. "id": {
  18355. "type": "string",
  18356. "pattern": "^evt_"
  18357. },
  18358. "type": {
  18359. "type": "string",
  18360. "enum": ["integration.updated"]
  18361. },
  18362. "properties": {
  18363. "type": "object",
  18364. "properties": {}
  18365. }
  18366. },
  18367. "required": ["id", "type", "properties"],
  18368. "additionalProperties": false
  18369. },
  18370. {
  18371. "type": "object",
  18372. "properties": {
  18373. "id": {
  18374. "type": "string",
  18375. "pattern": "^evt_"
  18376. },
  18377. "type": {
  18378. "type": "string",
  18379. "enum": ["permission.v2.asked"]
  18380. },
  18381. "properties": {
  18382. "type": "object",
  18383. "properties": {
  18384. "id": {
  18385. "type": "string",
  18386. "pattern": "^per"
  18387. },
  18388. "sessionID": {
  18389. "type": "string",
  18390. "pattern": "^ses"
  18391. },
  18392. "action": {
  18393. "type": "string"
  18394. },
  18395. "resources": {
  18396. "type": "array",
  18397. "items": {
  18398. "type": "string"
  18399. }
  18400. },
  18401. "save": {
  18402. "type": "array",
  18403. "items": {
  18404. "type": "string"
  18405. }
  18406. },
  18407. "metadata": {
  18408. "type": "object"
  18409. },
  18410. "source": {
  18411. "$ref": "#/components/schemas/PermissionV2Source"
  18412. }
  18413. },
  18414. "required": ["id", "sessionID", "action", "resources"],
  18415. "additionalProperties": false
  18416. }
  18417. },
  18418. "required": ["id", "type", "properties"],
  18419. "additionalProperties": false
  18420. },
  18421. {
  18422. "type": "object",
  18423. "properties": {
  18424. "id": {
  18425. "type": "string",
  18426. "pattern": "^evt_"
  18427. },
  18428. "type": {
  18429. "type": "string",
  18430. "enum": ["permission.v2.replied"]
  18431. },
  18432. "properties": {
  18433. "type": "object",
  18434. "properties": {
  18435. "sessionID": {
  18436. "type": "string",
  18437. "pattern": "^ses"
  18438. },
  18439. "requestID": {
  18440. "type": "string",
  18441. "pattern": "^per"
  18442. },
  18443. "reply": {
  18444. "$ref": "#/components/schemas/PermissionV2Reply"
  18445. }
  18446. },
  18447. "required": ["sessionID", "requestID", "reply"],
  18448. "additionalProperties": false
  18449. }
  18450. },
  18451. "required": ["id", "type", "properties"],
  18452. "additionalProperties": false
  18453. },
  18454. {
  18455. "type": "object",
  18456. "properties": {
  18457. "id": {
  18458. "type": "string",
  18459. "pattern": "^evt_"
  18460. },
  18461. "type": {
  18462. "type": "string",
  18463. "enum": ["reference.updated"]
  18464. },
  18465. "properties": {
  18466. "type": "object",
  18467. "properties": {}
  18468. }
  18469. },
  18470. "required": ["id", "type", "properties"],
  18471. "additionalProperties": false
  18472. },
  18473. {
  18474. "type": "object",
  18475. "properties": {
  18476. "id": {
  18477. "type": "string",
  18478. "pattern": "^evt_"
  18479. },
  18480. "type": {
  18481. "type": "string",
  18482. "enum": ["project.directories.updated"]
  18483. },
  18484. "properties": {
  18485. "type": "object",
  18486. "properties": {
  18487. "projectID": {
  18488. "type": "string"
  18489. }
  18490. },
  18491. "required": ["projectID"],
  18492. "additionalProperties": false
  18493. }
  18494. },
  18495. "required": ["id", "type", "properties"],
  18496. "additionalProperties": false
  18497. },
  18498. {
  18499. "type": "object",
  18500. "properties": {
  18501. "id": {
  18502. "type": "string",
  18503. "pattern": "^evt_"
  18504. },
  18505. "type": {
  18506. "type": "string",
  18507. "enum": ["file.watcher.updated"]
  18508. },
  18509. "properties": {
  18510. "type": "object",
  18511. "properties": {
  18512. "file": {
  18513. "type": "string"
  18514. },
  18515. "event": {
  18516. "type": "string",
  18517. "enum": ["add", "change", "unlink"]
  18518. }
  18519. },
  18520. "required": ["file", "event"],
  18521. "additionalProperties": false
  18522. }
  18523. },
  18524. "required": ["id", "type", "properties"],
  18525. "additionalProperties": false
  18526. },
  18527. {
  18528. "type": "object",
  18529. "properties": {
  18530. "id": {
  18531. "type": "string",
  18532. "pattern": "^evt_"
  18533. },
  18534. "type": {
  18535. "type": "string",
  18536. "enum": ["pty.created"]
  18537. },
  18538. "properties": {
  18539. "type": "object",
  18540. "properties": {
  18541. "info": {
  18542. "$ref": "#/components/schemas/Pty"
  18543. }
  18544. },
  18545. "required": ["info"],
  18546. "additionalProperties": false
  18547. }
  18548. },
  18549. "required": ["id", "type", "properties"],
  18550. "additionalProperties": false
  18551. },
  18552. {
  18553. "type": "object",
  18554. "properties": {
  18555. "id": {
  18556. "type": "string",
  18557. "pattern": "^evt_"
  18558. },
  18559. "type": {
  18560. "type": "string",
  18561. "enum": ["pty.updated"]
  18562. },
  18563. "properties": {
  18564. "type": "object",
  18565. "properties": {
  18566. "info": {
  18567. "$ref": "#/components/schemas/Pty"
  18568. }
  18569. },
  18570. "required": ["info"],
  18571. "additionalProperties": false
  18572. }
  18573. },
  18574. "required": ["id", "type", "properties"],
  18575. "additionalProperties": false
  18576. },
  18577. {
  18578. "type": "object",
  18579. "properties": {
  18580. "id": {
  18581. "type": "string",
  18582. "pattern": "^evt_"
  18583. },
  18584. "type": {
  18585. "type": "string",
  18586. "enum": ["pty.exited"]
  18587. },
  18588. "properties": {
  18589. "type": "object",
  18590. "properties": {
  18591. "id": {
  18592. "type": "string",
  18593. "pattern": "^pty"
  18594. },
  18595. "exitCode": {
  18596. "type": "integer",
  18597. "minimum": 0
  18598. }
  18599. },
  18600. "required": ["id", "exitCode"],
  18601. "additionalProperties": false
  18602. }
  18603. },
  18604. "required": ["id", "type", "properties"],
  18605. "additionalProperties": false
  18606. },
  18607. {
  18608. "type": "object",
  18609. "properties": {
  18610. "id": {
  18611. "type": "string",
  18612. "pattern": "^evt_"
  18613. },
  18614. "type": {
  18615. "type": "string",
  18616. "enum": ["pty.deleted"]
  18617. },
  18618. "properties": {
  18619. "type": "object",
  18620. "properties": {
  18621. "id": {
  18622. "type": "string",
  18623. "pattern": "^pty"
  18624. }
  18625. },
  18626. "required": ["id"],
  18627. "additionalProperties": false
  18628. }
  18629. },
  18630. "required": ["id", "type", "properties"],
  18631. "additionalProperties": false
  18632. },
  18633. {
  18634. "type": "object",
  18635. "properties": {
  18636. "id": {
  18637. "type": "string",
  18638. "pattern": "^evt_"
  18639. },
  18640. "type": {
  18641. "type": "string",
  18642. "enum": ["question.v2.asked"]
  18643. },
  18644. "properties": {
  18645. "type": "object",
  18646. "properties": {
  18647. "id": {
  18648. "type": "string",
  18649. "pattern": "^que"
  18650. },
  18651. "sessionID": {
  18652. "type": "string",
  18653. "pattern": "^ses"
  18654. },
  18655. "questions": {
  18656. "type": "array",
  18657. "items": {
  18658. "$ref": "#/components/schemas/QuestionV2Info"
  18659. },
  18660. "description": "Questions to ask"
  18661. },
  18662. "tool": {
  18663. "$ref": "#/components/schemas/QuestionV2Tool"
  18664. }
  18665. },
  18666. "required": ["id", "sessionID", "questions"],
  18667. "additionalProperties": false
  18668. }
  18669. },
  18670. "required": ["id", "type", "properties"],
  18671. "additionalProperties": false
  18672. },
  18673. {
  18674. "type": "object",
  18675. "properties": {
  18676. "id": {
  18677. "type": "string",
  18678. "pattern": "^evt_"
  18679. },
  18680. "type": {
  18681. "type": "string",
  18682. "enum": ["question.v2.replied"]
  18683. },
  18684. "properties": {
  18685. "type": "object",
  18686. "properties": {
  18687. "sessionID": {
  18688. "type": "string",
  18689. "pattern": "^ses"
  18690. },
  18691. "requestID": {
  18692. "type": "string",
  18693. "pattern": "^que"
  18694. },
  18695. "answers": {
  18696. "type": "array",
  18697. "items": {
  18698. "$ref": "#/components/schemas/QuestionV2Answer"
  18699. }
  18700. }
  18701. },
  18702. "required": ["sessionID", "requestID", "answers"],
  18703. "additionalProperties": false
  18704. }
  18705. },
  18706. "required": ["id", "type", "properties"],
  18707. "additionalProperties": false
  18708. },
  18709. {
  18710. "type": "object",
  18711. "properties": {
  18712. "id": {
  18713. "type": "string",
  18714. "pattern": "^evt_"
  18715. },
  18716. "type": {
  18717. "type": "string",
  18718. "enum": ["question.v2.rejected"]
  18719. },
  18720. "properties": {
  18721. "type": "object",
  18722. "properties": {
  18723. "sessionID": {
  18724. "type": "string",
  18725. "pattern": "^ses"
  18726. },
  18727. "requestID": {
  18728. "type": "string",
  18729. "pattern": "^que"
  18730. }
  18731. },
  18732. "required": ["sessionID", "requestID"],
  18733. "additionalProperties": false
  18734. }
  18735. },
  18736. "required": ["id", "type", "properties"],
  18737. "additionalProperties": false
  18738. },
  18739. {
  18740. "type": "object",
  18741. "properties": {
  18742. "id": {
  18743. "type": "string",
  18744. "pattern": "^evt_"
  18745. },
  18746. "type": {
  18747. "type": "string",
  18748. "enum": ["todo.updated"]
  18749. },
  18750. "properties": {
  18751. "type": "object",
  18752. "properties": {
  18753. "sessionID": {
  18754. "type": "string",
  18755. "pattern": "^ses"
  18756. },
  18757. "todos": {
  18758. "type": "array",
  18759. "items": {
  18760. "$ref": "#/components/schemas/Todo"
  18761. }
  18762. }
  18763. },
  18764. "required": ["sessionID", "todos"],
  18765. "additionalProperties": false
  18766. }
  18767. },
  18768. "required": ["id", "type", "properties"],
  18769. "additionalProperties": false
  18770. },
  18771. {
  18772. "type": "object",
  18773. "properties": {
  18774. "id": {
  18775. "type": "string",
  18776. "pattern": "^evt_"
  18777. },
  18778. "type": {
  18779. "type": "string",
  18780. "enum": ["lsp.updated"]
  18781. },
  18782. "properties": {
  18783. "type": "object",
  18784. "properties": {}
  18785. }
  18786. },
  18787. "required": ["id", "type", "properties"],
  18788. "additionalProperties": false
  18789. },
  18790. {
  18791. "type": "object",
  18792. "properties": {
  18793. "id": {
  18794. "type": "string",
  18795. "pattern": "^evt_"
  18796. },
  18797. "type": {
  18798. "type": "string",
  18799. "enum": ["permission.asked"]
  18800. },
  18801. "properties": {
  18802. "type": "object",
  18803. "properties": {
  18804. "id": {
  18805. "type": "string",
  18806. "pattern": "^per"
  18807. },
  18808. "sessionID": {
  18809. "type": "string",
  18810. "pattern": "^ses"
  18811. },
  18812. "permission": {
  18813. "type": "string"
  18814. },
  18815. "patterns": {
  18816. "type": "array",
  18817. "items": {
  18818. "type": "string"
  18819. }
  18820. },
  18821. "metadata": {
  18822. "type": "object"
  18823. },
  18824. "always": {
  18825. "type": "array",
  18826. "items": {
  18827. "type": "string"
  18828. }
  18829. },
  18830. "tool": {
  18831. "type": "object",
  18832. "properties": {
  18833. "messageID": {
  18834. "type": "string"
  18835. },
  18836. "callID": {
  18837. "type": "string"
  18838. }
  18839. },
  18840. "required": ["messageID", "callID"],
  18841. "additionalProperties": false
  18842. }
  18843. },
  18844. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  18845. "additionalProperties": false
  18846. }
  18847. },
  18848. "required": ["id", "type", "properties"],
  18849. "additionalProperties": false
  18850. },
  18851. {
  18852. "type": "object",
  18853. "properties": {
  18854. "id": {
  18855. "type": "string",
  18856. "pattern": "^evt_"
  18857. },
  18858. "type": {
  18859. "type": "string",
  18860. "enum": ["permission.replied"]
  18861. },
  18862. "properties": {
  18863. "type": "object",
  18864. "properties": {
  18865. "sessionID": {
  18866. "type": "string",
  18867. "pattern": "^ses"
  18868. },
  18869. "requestID": {
  18870. "type": "string",
  18871. "pattern": "^per"
  18872. },
  18873. "reply": {
  18874. "type": "string",
  18875. "enum": ["once", "always", "reject"]
  18876. }
  18877. },
  18878. "required": ["sessionID", "requestID", "reply"],
  18879. "additionalProperties": false
  18880. }
  18881. },
  18882. "required": ["id", "type", "properties"],
  18883. "additionalProperties": false
  18884. },
  18885. {
  18886. "type": "object",
  18887. "properties": {
  18888. "id": {
  18889. "type": "string",
  18890. "pattern": "^evt_"
  18891. },
  18892. "type": {
  18893. "type": "string",
  18894. "enum": ["tui.prompt.append"]
  18895. },
  18896. "properties": {
  18897. "type": "object",
  18898. "properties": {
  18899. "text": {
  18900. "type": "string"
  18901. }
  18902. },
  18903. "required": ["text"],
  18904. "additionalProperties": false
  18905. }
  18906. },
  18907. "required": ["id", "type", "properties"],
  18908. "additionalProperties": false
  18909. },
  18910. {
  18911. "type": "object",
  18912. "properties": {
  18913. "id": {
  18914. "type": "string",
  18915. "pattern": "^evt_"
  18916. },
  18917. "type": {
  18918. "type": "string",
  18919. "enum": ["tui.command.execute"]
  18920. },
  18921. "properties": {
  18922. "type": "object",
  18923. "properties": {
  18924. "command": {
  18925. "anyOf": [
  18926. {
  18927. "type": "string",
  18928. "enum": [
  18929. "session.list",
  18930. "session.new",
  18931. "session.share",
  18932. "session.interrupt",
  18933. "session.compact",
  18934. "session.page.up",
  18935. "session.page.down",
  18936. "session.line.up",
  18937. "session.line.down",
  18938. "session.half.page.up",
  18939. "session.half.page.down",
  18940. "session.first",
  18941. "session.last",
  18942. "prompt.clear",
  18943. "prompt.submit",
  18944. "agent.cycle"
  18945. ]
  18946. },
  18947. {
  18948. "type": "string"
  18949. }
  18950. ]
  18951. }
  18952. },
  18953. "required": ["command"],
  18954. "additionalProperties": false
  18955. }
  18956. },
  18957. "required": ["id", "type", "properties"],
  18958. "additionalProperties": false
  18959. },
  18960. {
  18961. "type": "object",
  18962. "properties": {
  18963. "id": {
  18964. "type": "string",
  18965. "pattern": "^evt_"
  18966. },
  18967. "type": {
  18968. "type": "string",
  18969. "enum": ["tui.toast.show"]
  18970. },
  18971. "properties": {
  18972. "type": "object",
  18973. "properties": {
  18974. "title": {
  18975. "type": "string"
  18976. },
  18977. "message": {
  18978. "type": "string"
  18979. },
  18980. "variant": {
  18981. "type": "string",
  18982. "enum": ["info", "success", "warning", "error"]
  18983. },
  18984. "duration": {
  18985. "type": "integer",
  18986. "exclusiveMinimum": 0
  18987. }
  18988. },
  18989. "required": ["message", "variant"],
  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.session.select"]
  19006. },
  19007. "properties": {
  19008. "type": "object",
  19009. "properties": {
  19010. "sessionID": {
  19011. "type": "string",
  19012. "pattern": "^ses",
  19013. "description": "Session ID to navigate to"
  19014. }
  19015. },
  19016. "required": ["sessionID"],
  19017. "additionalProperties": false
  19018. }
  19019. },
  19020. "required": ["id", "type", "properties"],
  19021. "additionalProperties": false
  19022. },
  19023. {
  19024. "type": "object",
  19025. "properties": {
  19026. "id": {
  19027. "type": "string",
  19028. "pattern": "^evt_"
  19029. },
  19030. "type": {
  19031. "type": "string",
  19032. "enum": ["mcp.tools.changed"]
  19033. },
  19034. "properties": {
  19035. "type": "object",
  19036. "properties": {
  19037. "server": {
  19038. "type": "string"
  19039. }
  19040. },
  19041. "required": ["server"],
  19042. "additionalProperties": false
  19043. }
  19044. },
  19045. "required": ["id", "type", "properties"],
  19046. "additionalProperties": false
  19047. },
  19048. {
  19049. "type": "object",
  19050. "properties": {
  19051. "id": {
  19052. "type": "string",
  19053. "pattern": "^evt_"
  19054. },
  19055. "type": {
  19056. "type": "string",
  19057. "enum": ["mcp.browser.open.failed"]
  19058. },
  19059. "properties": {
  19060. "type": "object",
  19061. "properties": {
  19062. "mcpName": {
  19063. "type": "string"
  19064. },
  19065. "url": {
  19066. "type": "string"
  19067. }
  19068. },
  19069. "required": ["mcpName", "url"],
  19070. "additionalProperties": false
  19071. }
  19072. },
  19073. "required": ["id", "type", "properties"],
  19074. "additionalProperties": false
  19075. },
  19076. {
  19077. "type": "object",
  19078. "properties": {
  19079. "id": {
  19080. "type": "string",
  19081. "pattern": "^evt_"
  19082. },
  19083. "type": {
  19084. "type": "string",
  19085. "enum": ["command.executed"]
  19086. },
  19087. "properties": {
  19088. "type": "object",
  19089. "properties": {
  19090. "name": {
  19091. "type": "string"
  19092. },
  19093. "sessionID": {
  19094. "type": "string",
  19095. "pattern": "^ses"
  19096. },
  19097. "arguments": {
  19098. "type": "string"
  19099. },
  19100. "messageID": {
  19101. "type": "string",
  19102. "pattern": "^msg"
  19103. }
  19104. },
  19105. "required": ["name", "sessionID", "arguments", "messageID"],
  19106. "additionalProperties": false
  19107. }
  19108. },
  19109. "required": ["id", "type", "properties"],
  19110. "additionalProperties": false
  19111. },
  19112. {
  19113. "type": "object",
  19114. "properties": {
  19115. "id": {
  19116. "type": "string",
  19117. "pattern": "^evt_"
  19118. },
  19119. "type": {
  19120. "type": "string",
  19121. "enum": ["project.updated"]
  19122. },
  19123. "properties": {
  19124. "type": "object",
  19125. "properties": {
  19126. "id": {
  19127. "type": "string"
  19128. },
  19129. "worktree": {
  19130. "type": "string"
  19131. },
  19132. "vcs": {
  19133. "type": "string",
  19134. "enum": ["git"]
  19135. },
  19136. "name": {
  19137. "type": "string"
  19138. },
  19139. "icon": {
  19140. "type": "object",
  19141. "properties": {
  19142. "url": {
  19143. "type": "string"
  19144. },
  19145. "override": {
  19146. "type": "string"
  19147. },
  19148. "color": {
  19149. "type": "string"
  19150. }
  19151. },
  19152. "additionalProperties": false
  19153. },
  19154. "commands": {
  19155. "type": "object",
  19156. "properties": {
  19157. "start": {
  19158. "type": "string",
  19159. "description": "Startup script to run when creating a new workspace (worktree)"
  19160. }
  19161. },
  19162. "additionalProperties": false
  19163. },
  19164. "time": {
  19165. "type": "object",
  19166. "properties": {
  19167. "created": {
  19168. "type": "integer",
  19169. "minimum": 0
  19170. },
  19171. "updated": {
  19172. "type": "integer",
  19173. "minimum": 0
  19174. },
  19175. "initialized": {
  19176. "type": "integer",
  19177. "minimum": 0
  19178. }
  19179. },
  19180. "required": ["created", "updated"],
  19181. "additionalProperties": false
  19182. },
  19183. "sandboxes": {
  19184. "type": "array",
  19185. "items": {
  19186. "type": "string"
  19187. }
  19188. }
  19189. },
  19190. "required": ["id", "worktree", "time", "sandboxes"],
  19191. "additionalProperties": false
  19192. }
  19193. },
  19194. "required": ["id", "type", "properties"],
  19195. "additionalProperties": false
  19196. },
  19197. {
  19198. "type": "object",
  19199. "properties": {
  19200. "id": {
  19201. "type": "string",
  19202. "pattern": "^evt_"
  19203. },
  19204. "type": {
  19205. "type": "string",
  19206. "enum": ["session.status"]
  19207. },
  19208. "properties": {
  19209. "type": "object",
  19210. "properties": {
  19211. "sessionID": {
  19212. "type": "string",
  19213. "pattern": "^ses"
  19214. },
  19215. "status": {
  19216. "$ref": "#/components/schemas/SessionStatus"
  19217. }
  19218. },
  19219. "required": ["sessionID", "status"],
  19220. "additionalProperties": false
  19221. }
  19222. },
  19223. "required": ["id", "type", "properties"],
  19224. "additionalProperties": false
  19225. },
  19226. {
  19227. "type": "object",
  19228. "properties": {
  19229. "id": {
  19230. "type": "string",
  19231. "pattern": "^evt_"
  19232. },
  19233. "type": {
  19234. "type": "string",
  19235. "enum": ["session.idle"]
  19236. },
  19237. "properties": {
  19238. "type": "object",
  19239. "properties": {
  19240. "sessionID": {
  19241. "type": "string",
  19242. "pattern": "^ses"
  19243. }
  19244. },
  19245. "required": ["sessionID"],
  19246. "additionalProperties": false
  19247. }
  19248. },
  19249. "required": ["id", "type", "properties"],
  19250. "additionalProperties": false
  19251. },
  19252. {
  19253. "type": "object",
  19254. "properties": {
  19255. "id": {
  19256. "type": "string",
  19257. "pattern": "^evt_"
  19258. },
  19259. "type": {
  19260. "type": "string",
  19261. "enum": ["question.asked"]
  19262. },
  19263. "properties": {
  19264. "type": "object",
  19265. "properties": {
  19266. "id": {
  19267. "type": "string",
  19268. "pattern": "^que"
  19269. },
  19270. "sessionID": {
  19271. "type": "string",
  19272. "pattern": "^ses"
  19273. },
  19274. "questions": {
  19275. "type": "array",
  19276. "items": {
  19277. "$ref": "#/components/schemas/QuestionInfo"
  19278. },
  19279. "description": "Questions to ask"
  19280. },
  19281. "tool": {
  19282. "$ref": "#/components/schemas/QuestionTool"
  19283. }
  19284. },
  19285. "required": ["id", "sessionID", "questions"],
  19286. "additionalProperties": false
  19287. }
  19288. },
  19289. "required": ["id", "type", "properties"],
  19290. "additionalProperties": false
  19291. },
  19292. {
  19293. "type": "object",
  19294. "properties": {
  19295. "id": {
  19296. "type": "string",
  19297. "pattern": "^evt_"
  19298. },
  19299. "type": {
  19300. "type": "string",
  19301. "enum": ["question.replied"]
  19302. },
  19303. "properties": {
  19304. "type": "object",
  19305. "properties": {
  19306. "sessionID": {
  19307. "type": "string",
  19308. "pattern": "^ses"
  19309. },
  19310. "requestID": {
  19311. "type": "string",
  19312. "pattern": "^que"
  19313. },
  19314. "answers": {
  19315. "type": "array",
  19316. "items": {
  19317. "$ref": "#/components/schemas/QuestionAnswer"
  19318. }
  19319. }
  19320. },
  19321. "required": ["sessionID", "requestID", "answers"],
  19322. "additionalProperties": false
  19323. }
  19324. },
  19325. "required": ["id", "type", "properties"],
  19326. "additionalProperties": false
  19327. },
  19328. {
  19329. "type": "object",
  19330. "properties": {
  19331. "id": {
  19332. "type": "string",
  19333. "pattern": "^evt_"
  19334. },
  19335. "type": {
  19336. "type": "string",
  19337. "enum": ["question.rejected"]
  19338. },
  19339. "properties": {
  19340. "type": "object",
  19341. "properties": {
  19342. "sessionID": {
  19343. "type": "string",
  19344. "pattern": "^ses"
  19345. },
  19346. "requestID": {
  19347. "type": "string",
  19348. "pattern": "^que"
  19349. }
  19350. },
  19351. "required": ["sessionID", "requestID"],
  19352. "additionalProperties": false
  19353. }
  19354. },
  19355. "required": ["id", "type", "properties"],
  19356. "additionalProperties": false
  19357. },
  19358. {
  19359. "type": "object",
  19360. "properties": {
  19361. "id": {
  19362. "type": "string",
  19363. "pattern": "^evt_"
  19364. },
  19365. "type": {
  19366. "type": "string",
  19367. "enum": ["session.compacted"]
  19368. },
  19369. "properties": {
  19370. "type": "object",
  19371. "properties": {
  19372. "sessionID": {
  19373. "type": "string",
  19374. "pattern": "^ses"
  19375. }
  19376. },
  19377. "required": ["sessionID"],
  19378. "additionalProperties": false
  19379. }
  19380. },
  19381. "required": ["id", "type", "properties"],
  19382. "additionalProperties": false
  19383. },
  19384. {
  19385. "type": "object",
  19386. "properties": {
  19387. "id": {
  19388. "type": "string",
  19389. "pattern": "^evt_"
  19390. },
  19391. "type": {
  19392. "type": "string",
  19393. "enum": ["vcs.branch.updated"]
  19394. },
  19395. "properties": {
  19396. "type": "object",
  19397. "properties": {
  19398. "branch": {
  19399. "type": "string"
  19400. }
  19401. },
  19402. "additionalProperties": false
  19403. }
  19404. },
  19405. "required": ["id", "type", "properties"],
  19406. "additionalProperties": false
  19407. },
  19408. {
  19409. "type": "object",
  19410. "properties": {
  19411. "id": {
  19412. "type": "string",
  19413. "pattern": "^evt_"
  19414. },
  19415. "type": {
  19416. "type": "string",
  19417. "enum": ["workspace.ready"]
  19418. },
  19419. "properties": {
  19420. "type": "object",
  19421. "properties": {
  19422. "name": {
  19423. "type": "string"
  19424. }
  19425. },
  19426. "required": ["name"],
  19427. "additionalProperties": false
  19428. }
  19429. },
  19430. "required": ["id", "type", "properties"],
  19431. "additionalProperties": false
  19432. },
  19433. {
  19434. "type": "object",
  19435. "properties": {
  19436. "id": {
  19437. "type": "string",
  19438. "pattern": "^evt_"
  19439. },
  19440. "type": {
  19441. "type": "string",
  19442. "enum": ["workspace.failed"]
  19443. },
  19444. "properties": {
  19445. "type": "object",
  19446. "properties": {
  19447. "message": {
  19448. "type": "string"
  19449. }
  19450. },
  19451. "required": ["message"],
  19452. "additionalProperties": false
  19453. }
  19454. },
  19455. "required": ["id", "type", "properties"],
  19456. "additionalProperties": false
  19457. },
  19458. {
  19459. "type": "object",
  19460. "properties": {
  19461. "id": {
  19462. "type": "string",
  19463. "pattern": "^evt_"
  19464. },
  19465. "type": {
  19466. "type": "string",
  19467. "enum": ["workspace.status"]
  19468. },
  19469. "properties": {
  19470. "type": "object",
  19471. "properties": {
  19472. "workspaceID": {
  19473. "type": "string",
  19474. "pattern": "^wrk"
  19475. },
  19476. "status": {
  19477. "type": "string",
  19478. "enum": ["connected", "connecting", "disconnected", "error"]
  19479. }
  19480. },
  19481. "required": ["workspaceID", "status"],
  19482. "additionalProperties": false
  19483. }
  19484. },
  19485. "required": ["id", "type", "properties"],
  19486. "additionalProperties": false
  19487. },
  19488. {
  19489. "type": "object",
  19490. "properties": {
  19491. "id": {
  19492. "type": "string",
  19493. "pattern": "^evt_"
  19494. },
  19495. "type": {
  19496. "type": "string",
  19497. "enum": ["worktree.ready"]
  19498. },
  19499. "properties": {
  19500. "type": "object",
  19501. "properties": {
  19502. "name": {
  19503. "type": "string"
  19504. },
  19505. "branch": {
  19506. "type": "string"
  19507. }
  19508. },
  19509. "required": ["name"],
  19510. "additionalProperties": false
  19511. }
  19512. },
  19513. "required": ["id", "type", "properties"],
  19514. "additionalProperties": false
  19515. },
  19516. {
  19517. "type": "object",
  19518. "properties": {
  19519. "id": {
  19520. "type": "string",
  19521. "pattern": "^evt_"
  19522. },
  19523. "type": {
  19524. "type": "string",
  19525. "enum": ["worktree.failed"]
  19526. },
  19527. "properties": {
  19528. "type": "object",
  19529. "properties": {
  19530. "message": {
  19531. "type": "string"
  19532. }
  19533. },
  19534. "required": ["message"],
  19535. "additionalProperties": false
  19536. }
  19537. },
  19538. "required": ["id", "type", "properties"],
  19539. "additionalProperties": false
  19540. },
  19541. {
  19542. "type": "object",
  19543. "properties": {
  19544. "id": {
  19545. "type": "string",
  19546. "pattern": "^evt_"
  19547. },
  19548. "type": {
  19549. "type": "string",
  19550. "enum": ["server.connected"]
  19551. },
  19552. "properties": {
  19553. "type": "object",
  19554. "properties": {}
  19555. }
  19556. },
  19557. "required": ["id", "type", "properties"],
  19558. "additionalProperties": false
  19559. },
  19560. {
  19561. "type": "object",
  19562. "properties": {
  19563. "id": {
  19564. "type": "string",
  19565. "pattern": "^evt_"
  19566. },
  19567. "type": {
  19568. "type": "string",
  19569. "enum": ["global.disposed"]
  19570. },
  19571. "properties": {
  19572. "type": "object",
  19573. "properties": {}
  19574. }
  19575. },
  19576. "required": ["id", "type", "properties"],
  19577. "additionalProperties": false
  19578. },
  19579. {
  19580. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  19581. },
  19582. {
  19583. "$ref": "#/components/schemas/SyncEventSessionCreated"
  19584. },
  19585. {
  19586. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  19587. },
  19588. {
  19589. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  19590. },
  19591. {
  19592. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  19593. },
  19594. {
  19595. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  19596. },
  19597. {
  19598. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  19599. },
  19600. {
  19601. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  19602. },
  19603. {
  19604. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  19605. },
  19606. {
  19607. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  19608. },
  19609. {
  19610. "$ref": "#/components/schemas/SyncEventSessionNextMoved"
  19611. },
  19612. {
  19613. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  19614. },
  19615. {
  19616. "$ref": "#/components/schemas/SyncEventSessionNextPromptAdmitted"
  19617. },
  19618. {
  19619. "$ref": "#/components/schemas/SyncEventSessionNextPromptPromoted"
  19620. },
  19621. {
  19622. "$ref": "#/components/schemas/SyncEventSessionNextInterruptRequested"
  19623. },
  19624. {
  19625. "$ref": "#/components/schemas/SyncEventSessionNextContextUpdated"
  19626. },
  19627. {
  19628. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  19629. },
  19630. {
  19631. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  19632. },
  19633. {
  19634. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  19635. },
  19636. {
  19637. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  19638. },
  19639. {
  19640. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  19641. },
  19642. {
  19643. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  19644. },
  19645. {
  19646. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  19647. },
  19648. {
  19649. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  19650. },
  19651. {
  19652. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  19653. },
  19654. {
  19655. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  19656. },
  19657. {
  19658. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  19659. },
  19660. {
  19661. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  19662. },
  19663. {
  19664. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  19665. },
  19666. {
  19667. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  19668. },
  19669. {
  19670. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  19671. },
  19672. {
  19673. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  19674. },
  19675. {
  19676. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  19677. },
  19678. {
  19679. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  19680. },
  19681. {
  19682. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  19683. }
  19684. ]
  19685. }
  19686. },
  19687. "required": ["directory", "payload"],
  19688. "additionalProperties": false
  19689. },
  19690. "LogLevel": {
  19691. "type": "string",
  19692. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  19693. "description": "Log level"
  19694. },
  19695. "ServerConfig": {
  19696. "type": "object",
  19697. "properties": {
  19698. "port": {
  19699. "type": "integer",
  19700. "exclusiveMinimum": 0
  19701. },
  19702. "hostname": {
  19703. "type": "string"
  19704. },
  19705. "mdns": {
  19706. "type": "boolean"
  19707. },
  19708. "mdnsDomain": {
  19709. "type": "string"
  19710. },
  19711. "cors": {
  19712. "type": "array",
  19713. "items": {
  19714. "type": "string"
  19715. }
  19716. }
  19717. },
  19718. "additionalProperties": false,
  19719. "description": "Server configuration for opencode serve and web commands"
  19720. },
  19721. "PermissionActionConfig": {
  19722. "type": "string",
  19723. "enum": ["ask", "allow", "deny"]
  19724. },
  19725. "PermissionObjectConfig": {
  19726. "type": "object",
  19727. "additionalProperties": {
  19728. "$ref": "#/components/schemas/PermissionActionConfig"
  19729. }
  19730. },
  19731. "PermissionRuleConfig": {
  19732. "anyOf": [
  19733. {
  19734. "$ref": "#/components/schemas/PermissionActionConfig"
  19735. },
  19736. {
  19737. "$ref": "#/components/schemas/PermissionObjectConfig"
  19738. }
  19739. ]
  19740. },
  19741. "PermissionConfig": {
  19742. "anyOf": [
  19743. {
  19744. "$ref": "#/components/schemas/PermissionActionConfig"
  19745. },
  19746. {
  19747. "type": "object",
  19748. "properties": {
  19749. "read": {
  19750. "$ref": "#/components/schemas/PermissionRuleConfig"
  19751. },
  19752. "edit": {
  19753. "$ref": "#/components/schemas/PermissionRuleConfig"
  19754. },
  19755. "glob": {
  19756. "$ref": "#/components/schemas/PermissionRuleConfig"
  19757. },
  19758. "grep": {
  19759. "$ref": "#/components/schemas/PermissionRuleConfig"
  19760. },
  19761. "list": {
  19762. "$ref": "#/components/schemas/PermissionRuleConfig"
  19763. },
  19764. "bash": {
  19765. "$ref": "#/components/schemas/PermissionRuleConfig"
  19766. },
  19767. "task": {
  19768. "$ref": "#/components/schemas/PermissionRuleConfig"
  19769. },
  19770. "external_directory": {
  19771. "$ref": "#/components/schemas/PermissionRuleConfig"
  19772. },
  19773. "todowrite": {
  19774. "$ref": "#/components/schemas/PermissionActionConfig"
  19775. },
  19776. "question": {
  19777. "$ref": "#/components/schemas/PermissionActionConfig"
  19778. },
  19779. "webfetch": {
  19780. "$ref": "#/components/schemas/PermissionActionConfig"
  19781. },
  19782. "websearch": {
  19783. "$ref": "#/components/schemas/PermissionActionConfig"
  19784. },
  19785. "lsp": {
  19786. "$ref": "#/components/schemas/PermissionRuleConfig"
  19787. },
  19788. "doom_loop": {
  19789. "$ref": "#/components/schemas/PermissionActionConfig"
  19790. },
  19791. "skill": {
  19792. "$ref": "#/components/schemas/PermissionRuleConfig"
  19793. }
  19794. },
  19795. "additionalProperties": {
  19796. "$ref": "#/components/schemas/PermissionRuleConfig"
  19797. }
  19798. }
  19799. ]
  19800. },
  19801. "AgentConfig": {
  19802. "type": "object",
  19803. "properties": {
  19804. "model": {
  19805. "type": "string"
  19806. },
  19807. "variant": {
  19808. "type": "string"
  19809. },
  19810. "temperature": {
  19811. "type": "number"
  19812. },
  19813. "top_p": {
  19814. "type": "number"
  19815. },
  19816. "prompt": {
  19817. "type": "string"
  19818. },
  19819. "tools": {
  19820. "type": "object",
  19821. "additionalProperties": {
  19822. "type": "boolean"
  19823. }
  19824. },
  19825. "disable": {
  19826. "type": "boolean"
  19827. },
  19828. "description": {
  19829. "type": "string"
  19830. },
  19831. "mode": {
  19832. "type": "string",
  19833. "enum": ["subagent", "primary", "all"]
  19834. },
  19835. "hidden": {
  19836. "type": "boolean"
  19837. },
  19838. "options": {
  19839. "type": "object"
  19840. },
  19841. "color": {
  19842. "anyOf": [
  19843. {
  19844. "type": "string",
  19845. "pattern": "^#[0-9a-fA-F]{6}$"
  19846. },
  19847. {
  19848. "type": "string",
  19849. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  19850. }
  19851. ],
  19852. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  19853. },
  19854. "steps": {
  19855. "type": "integer",
  19856. "exclusiveMinimum": 0
  19857. },
  19858. "maxSteps": {
  19859. "type": "integer",
  19860. "exclusiveMinimum": 0
  19861. },
  19862. "permission": {
  19863. "$ref": "#/components/schemas/PermissionConfig"
  19864. }
  19865. },
  19866. "additionalProperties": {}
  19867. },
  19868. "ProviderConfig": {
  19869. "type": "object",
  19870. "properties": {
  19871. "api": {
  19872. "type": "string"
  19873. },
  19874. "name": {
  19875. "type": "string"
  19876. },
  19877. "env": {
  19878. "type": "array",
  19879. "items": {
  19880. "type": "string"
  19881. }
  19882. },
  19883. "id": {
  19884. "type": "string"
  19885. },
  19886. "npm": {
  19887. "type": "string"
  19888. },
  19889. "whitelist": {
  19890. "type": "array",
  19891. "items": {
  19892. "type": "string"
  19893. }
  19894. },
  19895. "blacklist": {
  19896. "type": "array",
  19897. "items": {
  19898. "type": "string"
  19899. }
  19900. },
  19901. "options": {
  19902. "type": "object",
  19903. "properties": {
  19904. "apiKey": {
  19905. "type": "string"
  19906. },
  19907. "baseURL": {
  19908. "type": "string"
  19909. },
  19910. "enterpriseUrl": {
  19911. "type": "string"
  19912. },
  19913. "setCacheKey": {
  19914. "type": "boolean"
  19915. },
  19916. "timeout": {
  19917. "anyOf": [
  19918. {
  19919. "type": "integer",
  19920. "exclusiveMinimum": 0
  19921. },
  19922. {
  19923. "type": "boolean",
  19924. "enum": [false]
  19925. }
  19926. ],
  19927. "description": "Timeout in milliseconds for full requests to this provider. Set to false to disable timeout."
  19928. },
  19929. "headerTimeout": {
  19930. "anyOf": [
  19931. {
  19932. "type": "integer",
  19933. "exclusiveMinimum": 0
  19934. },
  19935. {
  19936. "type": "boolean",
  19937. "enum": [false]
  19938. }
  19939. ],
  19940. "description": "Timeout in milliseconds to wait for response headers. Provider integrations may set defaults. Set to false to disable timeout."
  19941. },
  19942. "chunkTimeout": {
  19943. "type": "integer",
  19944. "exclusiveMinimum": 0
  19945. }
  19946. },
  19947. "additionalProperties": {}
  19948. },
  19949. "models": {
  19950. "type": "object",
  19951. "additionalProperties": {
  19952. "type": "object",
  19953. "properties": {
  19954. "id": {
  19955. "type": "string"
  19956. },
  19957. "name": {
  19958. "type": "string"
  19959. },
  19960. "family": {
  19961. "type": "string"
  19962. },
  19963. "release_date": {
  19964. "type": "string"
  19965. },
  19966. "attachment": {
  19967. "type": "boolean"
  19968. },
  19969. "reasoning": {
  19970. "type": "boolean"
  19971. },
  19972. "temperature": {
  19973. "type": "boolean"
  19974. },
  19975. "tool_call": {
  19976. "type": "boolean"
  19977. },
  19978. "interleaved": {
  19979. "anyOf": [
  19980. {
  19981. "type": "boolean",
  19982. "enum": [true]
  19983. },
  19984. {
  19985. "type": "object",
  19986. "properties": {
  19987. "field": {
  19988. "type": "string",
  19989. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  19990. }
  19991. },
  19992. "required": ["field"],
  19993. "additionalProperties": false
  19994. }
  19995. ]
  19996. },
  19997. "cost": {
  19998. "type": "object",
  19999. "properties": {
  20000. "input": {
  20001. "type": "number"
  20002. },
  20003. "output": {
  20004. "type": "number"
  20005. },
  20006. "cache_read": {
  20007. "type": "number"
  20008. },
  20009. "cache_write": {
  20010. "type": "number"
  20011. },
  20012. "context_over_200k": {
  20013. "type": "object",
  20014. "properties": {
  20015. "input": {
  20016. "type": "number"
  20017. },
  20018. "output": {
  20019. "type": "number"
  20020. },
  20021. "cache_read": {
  20022. "type": "number"
  20023. },
  20024. "cache_write": {
  20025. "type": "number"
  20026. }
  20027. },
  20028. "required": ["input", "output"],
  20029. "additionalProperties": false
  20030. }
  20031. },
  20032. "required": ["input", "output"],
  20033. "additionalProperties": false
  20034. },
  20035. "limit": {
  20036. "type": "object",
  20037. "properties": {
  20038. "context": {
  20039. "type": "number"
  20040. },
  20041. "input": {
  20042. "type": "number"
  20043. },
  20044. "output": {
  20045. "type": "number"
  20046. }
  20047. },
  20048. "required": ["context", "output"],
  20049. "additionalProperties": false
  20050. },
  20051. "modalities": {
  20052. "type": "object",
  20053. "properties": {
  20054. "input": {
  20055. "type": "array",
  20056. "items": {
  20057. "type": "string",
  20058. "enum": ["text", "audio", "image", "video", "pdf"]
  20059. }
  20060. },
  20061. "output": {
  20062. "type": "array",
  20063. "items": {
  20064. "type": "string",
  20065. "enum": ["text", "audio", "image", "video", "pdf"]
  20066. }
  20067. }
  20068. },
  20069. "additionalProperties": false
  20070. },
  20071. "experimental": {
  20072. "type": "boolean"
  20073. },
  20074. "status": {
  20075. "type": "string",
  20076. "enum": ["alpha", "beta", "deprecated", "active"]
  20077. },
  20078. "provider": {
  20079. "type": "object",
  20080. "properties": {
  20081. "npm": {
  20082. "type": "string"
  20083. },
  20084. "api": {
  20085. "type": "string"
  20086. }
  20087. },
  20088. "additionalProperties": false
  20089. },
  20090. "options": {
  20091. "type": "object"
  20092. },
  20093. "headers": {
  20094. "type": "object",
  20095. "additionalProperties": {
  20096. "type": "string"
  20097. }
  20098. },
  20099. "variants": {
  20100. "type": "object",
  20101. "additionalProperties": {
  20102. "type": "object",
  20103. "properties": {
  20104. "disabled": {
  20105. "type": "boolean"
  20106. }
  20107. },
  20108. "additionalProperties": {}
  20109. },
  20110. "description": "Variant-specific configuration"
  20111. }
  20112. },
  20113. "additionalProperties": false
  20114. }
  20115. }
  20116. },
  20117. "additionalProperties": false
  20118. },
  20119. "McpLocalConfig": {
  20120. "type": "object",
  20121. "properties": {
  20122. "type": {
  20123. "type": "string",
  20124. "enum": ["local"],
  20125. "description": "Type of MCP server connection"
  20126. },
  20127. "command": {
  20128. "type": "array",
  20129. "items": {
  20130. "type": "string"
  20131. },
  20132. "description": "Command and arguments to run the MCP server"
  20133. },
  20134. "cwd": {
  20135. "type": "string"
  20136. },
  20137. "environment": {
  20138. "type": "object",
  20139. "additionalProperties": {
  20140. "type": "string"
  20141. }
  20142. },
  20143. "enabled": {
  20144. "type": "boolean"
  20145. },
  20146. "timeout": {
  20147. "type": "integer",
  20148. "exclusiveMinimum": 0
  20149. }
  20150. },
  20151. "required": ["type", "command"],
  20152. "additionalProperties": false
  20153. },
  20154. "McpOAuthConfig": {
  20155. "type": "object",
  20156. "properties": {
  20157. "clientId": {
  20158. "type": "string"
  20159. },
  20160. "clientSecret": {
  20161. "type": "string"
  20162. },
  20163. "scope": {
  20164. "type": "string"
  20165. },
  20166. "callbackPort": {
  20167. "type": "integer",
  20168. "minimum": 1,
  20169. "maximum": 65535
  20170. },
  20171. "redirectUri": {
  20172. "type": "string"
  20173. }
  20174. },
  20175. "additionalProperties": false
  20176. },
  20177. "McpRemoteConfig": {
  20178. "type": "object",
  20179. "properties": {
  20180. "type": {
  20181. "type": "string",
  20182. "enum": ["remote"],
  20183. "description": "Type of MCP server connection"
  20184. },
  20185. "url": {
  20186. "type": "string",
  20187. "description": "URL of the remote MCP server"
  20188. },
  20189. "enabled": {
  20190. "type": "boolean"
  20191. },
  20192. "headers": {
  20193. "type": "object",
  20194. "additionalProperties": {
  20195. "type": "string"
  20196. }
  20197. },
  20198. "oauth": {
  20199. "anyOf": [
  20200. {
  20201. "$ref": "#/components/schemas/McpOAuthConfig"
  20202. },
  20203. {
  20204. "type": "boolean",
  20205. "enum": [false]
  20206. }
  20207. ],
  20208. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  20209. },
  20210. "timeout": {
  20211. "type": "integer",
  20212. "exclusiveMinimum": 0
  20213. }
  20214. },
  20215. "required": ["type", "url"],
  20216. "additionalProperties": false
  20217. },
  20218. "LayoutConfig": {
  20219. "type": "string",
  20220. "enum": ["auto", "stretch"],
  20221. "description": "@deprecated Always uses stretch layout."
  20222. },
  20223. "ImageAttachmentConfig": {
  20224. "type": "object",
  20225. "properties": {
  20226. "auto_resize": {
  20227. "type": "boolean"
  20228. },
  20229. "max_width": {
  20230. "type": "integer",
  20231. "exclusiveMinimum": 0
  20232. },
  20233. "max_height": {
  20234. "type": "integer",
  20235. "exclusiveMinimum": 0
  20236. },
  20237. "max_base64_bytes": {
  20238. "type": "integer",
  20239. "exclusiveMinimum": 0
  20240. }
  20241. },
  20242. "additionalProperties": false
  20243. },
  20244. "AttachmentConfig": {
  20245. "type": "object",
  20246. "properties": {
  20247. "image": {
  20248. "$ref": "#/components/schemas/ImageAttachmentConfig"
  20249. }
  20250. },
  20251. "additionalProperties": false
  20252. },
  20253. "Config": {
  20254. "type": "object",
  20255. "properties": {
  20256. "$schema": {
  20257. "type": "string"
  20258. },
  20259. "shell": {
  20260. "type": "string"
  20261. },
  20262. "logLevel": {
  20263. "$ref": "#/components/schemas/LogLevel"
  20264. },
  20265. "server": {
  20266. "$ref": "#/components/schemas/ServerConfig"
  20267. },
  20268. "command": {
  20269. "type": "object",
  20270. "additionalProperties": {
  20271. "type": "object",
  20272. "properties": {
  20273. "template": {
  20274. "type": "string"
  20275. },
  20276. "description": {
  20277. "type": "string"
  20278. },
  20279. "agent": {
  20280. "type": "string"
  20281. },
  20282. "model": {
  20283. "type": "string"
  20284. },
  20285. "variant": {
  20286. "type": "string"
  20287. },
  20288. "subtask": {
  20289. "type": "boolean"
  20290. }
  20291. },
  20292. "required": ["template"],
  20293. "additionalProperties": false
  20294. }
  20295. },
  20296. "skills": {
  20297. "type": "object",
  20298. "properties": {
  20299. "paths": {
  20300. "type": "array",
  20301. "items": {
  20302. "type": "string"
  20303. }
  20304. },
  20305. "urls": {
  20306. "type": "array",
  20307. "items": {
  20308. "type": "string"
  20309. }
  20310. }
  20311. },
  20312. "additionalProperties": false
  20313. },
  20314. "references": {
  20315. "type": "object",
  20316. "additionalProperties": {
  20317. "anyOf": [
  20318. {
  20319. "type": "string"
  20320. },
  20321. {
  20322. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  20323. },
  20324. {
  20325. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  20326. }
  20327. ]
  20328. }
  20329. },
  20330. "reference": {
  20331. "type": "object",
  20332. "additionalProperties": {
  20333. "anyOf": [
  20334. {
  20335. "type": "string"
  20336. },
  20337. {
  20338. "$ref": "#/components/schemas/ConfigV2ReferenceGit"
  20339. },
  20340. {
  20341. "$ref": "#/components/schemas/ConfigV2ReferenceLocal"
  20342. }
  20343. ]
  20344. }
  20345. },
  20346. "watcher": {
  20347. "type": "object",
  20348. "properties": {
  20349. "ignore": {
  20350. "type": "array",
  20351. "items": {
  20352. "type": "string"
  20353. }
  20354. }
  20355. },
  20356. "additionalProperties": false
  20357. },
  20358. "snapshot": {
  20359. "type": "boolean"
  20360. },
  20361. "plugin": {
  20362. "type": "array",
  20363. "items": {
  20364. "anyOf": [
  20365. {
  20366. "type": "string"
  20367. },
  20368. {
  20369. "type": "array",
  20370. "prefixItems": [
  20371. {
  20372. "type": "string"
  20373. },
  20374. {
  20375. "type": "object"
  20376. }
  20377. ],
  20378. "maxItems": 2,
  20379. "minItems": 2
  20380. }
  20381. ]
  20382. }
  20383. },
  20384. "share": {
  20385. "type": "string",
  20386. "enum": ["manual", "auto", "disabled"]
  20387. },
  20388. "autoshare": {
  20389. "type": "boolean"
  20390. },
  20391. "autoupdate": {
  20392. "anyOf": [
  20393. {
  20394. "type": "boolean"
  20395. },
  20396. {
  20397. "type": "string",
  20398. "enum": ["notify"]
  20399. }
  20400. ],
  20401. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  20402. },
  20403. "disabled_providers": {
  20404. "type": "array",
  20405. "items": {
  20406. "type": "string"
  20407. }
  20408. },
  20409. "enabled_providers": {
  20410. "type": "array",
  20411. "items": {
  20412. "type": "string"
  20413. }
  20414. },
  20415. "model": {
  20416. "type": "string"
  20417. },
  20418. "small_model": {
  20419. "type": "string"
  20420. },
  20421. "default_agent": {
  20422. "type": "string"
  20423. },
  20424. "username": {
  20425. "type": "string"
  20426. },
  20427. "mode": {
  20428. "type": "object",
  20429. "properties": {
  20430. "build": {
  20431. "$ref": "#/components/schemas/AgentConfig"
  20432. },
  20433. "plan": {
  20434. "$ref": "#/components/schemas/AgentConfig"
  20435. }
  20436. },
  20437. "additionalProperties": {
  20438. "$ref": "#/components/schemas/AgentConfig"
  20439. }
  20440. },
  20441. "agent": {
  20442. "type": "object",
  20443. "properties": {
  20444. "plan": {
  20445. "$ref": "#/components/schemas/AgentConfig"
  20446. },
  20447. "build": {
  20448. "$ref": "#/components/schemas/AgentConfig"
  20449. },
  20450. "general": {
  20451. "$ref": "#/components/schemas/AgentConfig"
  20452. },
  20453. "explore": {
  20454. "$ref": "#/components/schemas/AgentConfig"
  20455. },
  20456. "title": {
  20457. "$ref": "#/components/schemas/AgentConfig"
  20458. },
  20459. "summary": {
  20460. "$ref": "#/components/schemas/AgentConfig"
  20461. },
  20462. "compaction": {
  20463. "$ref": "#/components/schemas/AgentConfig"
  20464. }
  20465. },
  20466. "additionalProperties": {
  20467. "$ref": "#/components/schemas/AgentConfig"
  20468. }
  20469. },
  20470. "provider": {
  20471. "type": "object",
  20472. "additionalProperties": {
  20473. "$ref": "#/components/schemas/ProviderConfig"
  20474. }
  20475. },
  20476. "mcp": {
  20477. "type": "object",
  20478. "additionalProperties": {
  20479. "anyOf": [
  20480. {
  20481. "$ref": "#/components/schemas/McpLocalConfig"
  20482. },
  20483. {
  20484. "$ref": "#/components/schemas/McpRemoteConfig"
  20485. },
  20486. {
  20487. "type": "object",
  20488. "properties": {
  20489. "enabled": {
  20490. "type": "boolean"
  20491. }
  20492. },
  20493. "required": ["enabled"],
  20494. "additionalProperties": false
  20495. }
  20496. ]
  20497. }
  20498. },
  20499. "formatter": {
  20500. "anyOf": [
  20501. {
  20502. "type": "boolean"
  20503. },
  20504. {
  20505. "type": "object",
  20506. "additionalProperties": {
  20507. "type": "object",
  20508. "properties": {
  20509. "disabled": {
  20510. "type": "boolean"
  20511. },
  20512. "command": {
  20513. "type": "array",
  20514. "items": {
  20515. "type": "string"
  20516. }
  20517. },
  20518. "environment": {
  20519. "type": "object",
  20520. "additionalProperties": {
  20521. "type": "string"
  20522. }
  20523. },
  20524. "extensions": {
  20525. "type": "array",
  20526. "items": {
  20527. "type": "string"
  20528. }
  20529. }
  20530. },
  20531. "additionalProperties": false
  20532. }
  20533. }
  20534. ],
  20535. "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."
  20536. },
  20537. "lsp": {
  20538. "anyOf": [
  20539. {
  20540. "type": "boolean"
  20541. },
  20542. {
  20543. "type": "object",
  20544. "additionalProperties": {
  20545. "anyOf": [
  20546. {
  20547. "type": "object",
  20548. "properties": {
  20549. "disabled": {
  20550. "type": "boolean",
  20551. "enum": [true]
  20552. }
  20553. },
  20554. "required": ["disabled"],
  20555. "additionalProperties": false
  20556. },
  20557. {
  20558. "type": "object",
  20559. "properties": {
  20560. "command": {
  20561. "type": "array",
  20562. "items": {
  20563. "type": "string"
  20564. }
  20565. },
  20566. "extensions": {
  20567. "type": "array",
  20568. "items": {
  20569. "type": "string"
  20570. }
  20571. },
  20572. "disabled": {
  20573. "type": "boolean"
  20574. },
  20575. "env": {
  20576. "type": "object",
  20577. "additionalProperties": {
  20578. "type": "string"
  20579. }
  20580. },
  20581. "initialization": {
  20582. "type": "object"
  20583. }
  20584. },
  20585. "required": ["command"],
  20586. "additionalProperties": false
  20587. }
  20588. ]
  20589. }
  20590. }
  20591. ],
  20592. "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."
  20593. },
  20594. "instructions": {
  20595. "type": "array",
  20596. "items": {
  20597. "type": "string"
  20598. }
  20599. },
  20600. "layout": {
  20601. "$ref": "#/components/schemas/LayoutConfig"
  20602. },
  20603. "permission": {
  20604. "$ref": "#/components/schemas/PermissionConfig"
  20605. },
  20606. "tools": {
  20607. "type": "object",
  20608. "additionalProperties": {
  20609. "type": "boolean"
  20610. }
  20611. },
  20612. "attachment": {
  20613. "$ref": "#/components/schemas/AttachmentConfig"
  20614. },
  20615. "enterprise": {
  20616. "type": "object",
  20617. "properties": {
  20618. "url": {
  20619. "type": "string"
  20620. }
  20621. },
  20622. "additionalProperties": false
  20623. },
  20624. "tool_output": {
  20625. "type": "object",
  20626. "properties": {
  20627. "max_lines": {
  20628. "type": "integer",
  20629. "exclusiveMinimum": 0
  20630. },
  20631. "max_bytes": {
  20632. "type": "integer",
  20633. "exclusiveMinimum": 0
  20634. }
  20635. },
  20636. "additionalProperties": false
  20637. },
  20638. "compaction": {
  20639. "type": "object",
  20640. "properties": {
  20641. "auto": {
  20642. "type": "boolean"
  20643. },
  20644. "prune": {
  20645. "type": "boolean"
  20646. },
  20647. "tail_turns": {
  20648. "type": "integer",
  20649. "minimum": 0
  20650. },
  20651. "preserve_recent_tokens": {
  20652. "type": "integer",
  20653. "minimum": 0
  20654. },
  20655. "reserved": {
  20656. "type": "integer",
  20657. "minimum": 0
  20658. }
  20659. },
  20660. "additionalProperties": false
  20661. },
  20662. "experimental": {
  20663. "type": "object",
  20664. "properties": {
  20665. "disable_paste_summary": {
  20666. "type": "boolean"
  20667. },
  20668. "batch_tool": {
  20669. "type": "boolean"
  20670. },
  20671. "openTelemetry": {
  20672. "type": "boolean"
  20673. },
  20674. "primary_tools": {
  20675. "type": "array",
  20676. "items": {
  20677. "type": "string"
  20678. }
  20679. },
  20680. "continue_loop_on_deny": {
  20681. "type": "boolean"
  20682. },
  20683. "mcp_timeout": {
  20684. "type": "integer",
  20685. "exclusiveMinimum": 0
  20686. },
  20687. "policies": {
  20688. "type": "array",
  20689. "items": {
  20690. "$ref": "#/components/schemas/ConfigV2ExperimentalPolicy"
  20691. }
  20692. }
  20693. },
  20694. "additionalProperties": false
  20695. }
  20696. },
  20697. "additionalProperties": false
  20698. },
  20699. "Model": {
  20700. "type": "object",
  20701. "properties": {
  20702. "id": {
  20703. "type": "string"
  20704. },
  20705. "providerID": {
  20706. "type": "string"
  20707. },
  20708. "api": {
  20709. "type": "object",
  20710. "properties": {
  20711. "id": {
  20712. "type": "string"
  20713. },
  20714. "url": {
  20715. "type": "string"
  20716. },
  20717. "npm": {
  20718. "type": "string"
  20719. }
  20720. },
  20721. "required": ["id", "url", "npm"],
  20722. "additionalProperties": false
  20723. },
  20724. "name": {
  20725. "type": "string"
  20726. },
  20727. "family": {
  20728. "type": "string"
  20729. },
  20730. "capabilities": {
  20731. "type": "object",
  20732. "properties": {
  20733. "temperature": {
  20734. "type": "boolean"
  20735. },
  20736. "reasoning": {
  20737. "type": "boolean"
  20738. },
  20739. "attachment": {
  20740. "type": "boolean"
  20741. },
  20742. "toolcall": {
  20743. "type": "boolean"
  20744. },
  20745. "input": {
  20746. "type": "object",
  20747. "properties": {
  20748. "text": {
  20749. "type": "boolean"
  20750. },
  20751. "audio": {
  20752. "type": "boolean"
  20753. },
  20754. "image": {
  20755. "type": "boolean"
  20756. },
  20757. "video": {
  20758. "type": "boolean"
  20759. },
  20760. "pdf": {
  20761. "type": "boolean"
  20762. }
  20763. },
  20764. "required": ["text", "audio", "image", "video", "pdf"],
  20765. "additionalProperties": false
  20766. },
  20767. "output": {
  20768. "type": "object",
  20769. "properties": {
  20770. "text": {
  20771. "type": "boolean"
  20772. },
  20773. "audio": {
  20774. "type": "boolean"
  20775. },
  20776. "image": {
  20777. "type": "boolean"
  20778. },
  20779. "video": {
  20780. "type": "boolean"
  20781. },
  20782. "pdf": {
  20783. "type": "boolean"
  20784. }
  20785. },
  20786. "required": ["text", "audio", "image", "video", "pdf"],
  20787. "additionalProperties": false
  20788. },
  20789. "interleaved": {
  20790. "anyOf": [
  20791. {
  20792. "type": "boolean"
  20793. },
  20794. {
  20795. "type": "object",
  20796. "properties": {
  20797. "field": {
  20798. "type": "string",
  20799. "enum": ["reasoning", "reasoning_content", "reasoning_details"]
  20800. }
  20801. },
  20802. "required": ["field"],
  20803. "additionalProperties": false
  20804. }
  20805. ]
  20806. }
  20807. },
  20808. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  20809. "additionalProperties": false
  20810. },
  20811. "cost": {
  20812. "type": "object",
  20813. "properties": {
  20814. "input": {
  20815. "type": "number"
  20816. },
  20817. "output": {
  20818. "type": "number"
  20819. },
  20820. "cache": {
  20821. "type": "object",
  20822. "properties": {
  20823. "read": {
  20824. "type": "number"
  20825. },
  20826. "write": {
  20827. "type": "number"
  20828. }
  20829. },
  20830. "required": ["read", "write"],
  20831. "additionalProperties": false
  20832. },
  20833. "tiers": {
  20834. "type": "array",
  20835. "items": {
  20836. "type": "object",
  20837. "properties": {
  20838. "input": {
  20839. "type": "number"
  20840. },
  20841. "output": {
  20842. "type": "number"
  20843. },
  20844. "cache": {
  20845. "type": "object",
  20846. "properties": {
  20847. "read": {
  20848. "type": "number"
  20849. },
  20850. "write": {
  20851. "type": "number"
  20852. }
  20853. },
  20854. "required": ["read", "write"],
  20855. "additionalProperties": false
  20856. },
  20857. "tier": {
  20858. "type": "object",
  20859. "properties": {
  20860. "type": {
  20861. "type": "string",
  20862. "enum": ["context"]
  20863. },
  20864. "size": {
  20865. "type": "number"
  20866. }
  20867. },
  20868. "required": ["type", "size"],
  20869. "additionalProperties": false
  20870. }
  20871. },
  20872. "required": ["input", "output", "cache", "tier"],
  20873. "additionalProperties": false
  20874. }
  20875. },
  20876. "experimentalOver200K": {
  20877. "type": "object",
  20878. "properties": {
  20879. "input": {
  20880. "type": "number"
  20881. },
  20882. "output": {
  20883. "type": "number"
  20884. },
  20885. "cache": {
  20886. "type": "object",
  20887. "properties": {
  20888. "read": {
  20889. "type": "number"
  20890. },
  20891. "write": {
  20892. "type": "number"
  20893. }
  20894. },
  20895. "required": ["read", "write"],
  20896. "additionalProperties": false
  20897. }
  20898. },
  20899. "required": ["input", "output", "cache"],
  20900. "additionalProperties": false
  20901. }
  20902. },
  20903. "required": ["input", "output", "cache"],
  20904. "additionalProperties": false
  20905. },
  20906. "limit": {
  20907. "type": "object",
  20908. "properties": {
  20909. "context": {
  20910. "type": "number"
  20911. },
  20912. "input": {
  20913. "type": "number"
  20914. },
  20915. "output": {
  20916. "type": "number"
  20917. }
  20918. },
  20919. "required": ["context", "output"],
  20920. "additionalProperties": false
  20921. },
  20922. "status": {
  20923. "type": "string",
  20924. "enum": ["alpha", "beta", "deprecated", "active"]
  20925. },
  20926. "options": {
  20927. "type": "object"
  20928. },
  20929. "headers": {
  20930. "type": "object",
  20931. "additionalProperties": {
  20932. "type": "string"
  20933. }
  20934. },
  20935. "release_date": {
  20936. "type": "string"
  20937. },
  20938. "variants": {
  20939. "type": "object",
  20940. "additionalProperties": {
  20941. "type": "object"
  20942. }
  20943. }
  20944. },
  20945. "required": [
  20946. "id",
  20947. "providerID",
  20948. "api",
  20949. "name",
  20950. "capabilities",
  20951. "cost",
  20952. "limit",
  20953. "status",
  20954. "options",
  20955. "headers",
  20956. "release_date"
  20957. ],
  20958. "additionalProperties": false
  20959. },
  20960. "Provider": {
  20961. "type": "object",
  20962. "properties": {
  20963. "id": {
  20964. "type": "string"
  20965. },
  20966. "name": {
  20967. "type": "string"
  20968. },
  20969. "source": {
  20970. "type": "string",
  20971. "enum": ["env", "config", "custom", "api"]
  20972. },
  20973. "env": {
  20974. "type": "array",
  20975. "items": {
  20976. "type": "string"
  20977. }
  20978. },
  20979. "key": {
  20980. "type": "string"
  20981. },
  20982. "options": {
  20983. "type": "object"
  20984. },
  20985. "models": {
  20986. "type": "object",
  20987. "additionalProperties": {
  20988. "$ref": "#/components/schemas/Model"
  20989. }
  20990. }
  20991. },
  20992. "required": ["id", "name", "source", "env", "options", "models"],
  20993. "additionalProperties": false
  20994. },
  20995. "ConsoleState": {
  20996. "type": "object",
  20997. "properties": {
  20998. "consoleManagedProviders": {
  20999. "type": "array",
  21000. "items": {
  21001. "type": "string"
  21002. }
  21003. },
  21004. "activeOrgName": {
  21005. "type": "string"
  21006. },
  21007. "switchableOrgCount": {
  21008. "type": "integer",
  21009. "minimum": 0
  21010. }
  21011. },
  21012. "required": ["consoleManagedProviders", "switchableOrgCount"],
  21013. "additionalProperties": false
  21014. },
  21015. "effect_HttpApiError_InternalServerError": {
  21016. "type": "object",
  21017. "properties": {
  21018. "_tag": {
  21019. "type": "string",
  21020. "enum": ["InternalServerError"]
  21021. }
  21022. },
  21023. "required": ["_tag"],
  21024. "additionalProperties": false
  21025. },
  21026. "ToolListItem": {
  21027. "type": "object",
  21028. "properties": {
  21029. "id": {
  21030. "type": "string"
  21031. },
  21032. "description": {
  21033. "type": "string"
  21034. },
  21035. "parameters": {}
  21036. },
  21037. "required": ["id", "description", "parameters"],
  21038. "additionalProperties": false
  21039. },
  21040. "ToolList": {
  21041. "type": "array",
  21042. "items": {
  21043. "$ref": "#/components/schemas/ToolListItem"
  21044. }
  21045. },
  21046. "ToolIDs": {
  21047. "type": "array",
  21048. "items": {
  21049. "type": "string"
  21050. }
  21051. },
  21052. "WorktreeError": {
  21053. "type": "object",
  21054. "properties": {
  21055. "name": {
  21056. "type": "string",
  21057. "enum": [
  21058. "WorktreeNotGitError",
  21059. "WorktreeNameGenerationFailedError",
  21060. "WorktreeCreateFailedError",
  21061. "WorktreeStartCommandFailedError",
  21062. "WorktreeRemoveFailedError",
  21063. "WorktreeResetFailedError",
  21064. "WorktreeListFailedError"
  21065. ]
  21066. },
  21067. "data": {
  21068. "type": "object",
  21069. "properties": {
  21070. "message": {
  21071. "type": "string"
  21072. }
  21073. },
  21074. "required": ["message"],
  21075. "additionalProperties": false
  21076. }
  21077. },
  21078. "required": ["name", "data"],
  21079. "additionalProperties": false
  21080. },
  21081. "WorktreeCreateInput": {
  21082. "type": "object",
  21083. "properties": {
  21084. "name": {
  21085. "type": "string"
  21086. },
  21087. "startCommand": {
  21088. "type": "string",
  21089. "description": "Additional startup script to run after the project's start command"
  21090. }
  21091. },
  21092. "additionalProperties": false
  21093. },
  21094. "Worktree": {
  21095. "type": "object",
  21096. "properties": {
  21097. "name": {
  21098. "type": "string"
  21099. },
  21100. "branch": {
  21101. "type": "string"
  21102. },
  21103. "directory": {
  21104. "type": "string"
  21105. }
  21106. },
  21107. "required": ["name", "directory"],
  21108. "additionalProperties": false
  21109. },
  21110. "WorktreeRemoveInput": {
  21111. "type": "object",
  21112. "properties": {
  21113. "directory": {
  21114. "type": "string"
  21115. }
  21116. },
  21117. "required": ["directory"],
  21118. "additionalProperties": false
  21119. },
  21120. "WorktreeResetInput": {
  21121. "type": "object",
  21122. "properties": {
  21123. "directory": {
  21124. "type": "string"
  21125. }
  21126. },
  21127. "required": ["directory"],
  21128. "additionalProperties": false
  21129. },
  21130. "ProjectSummary": {
  21131. "type": "object",
  21132. "properties": {
  21133. "id": {
  21134. "type": "string"
  21135. },
  21136. "name": {
  21137. "type": "string"
  21138. },
  21139. "worktree": {
  21140. "type": "string"
  21141. }
  21142. },
  21143. "required": ["id", "worktree"],
  21144. "additionalProperties": false
  21145. },
  21146. "GlobalSession": {
  21147. "type": "object",
  21148. "properties": {
  21149. "id": {
  21150. "type": "string",
  21151. "pattern": "^ses"
  21152. },
  21153. "slug": {
  21154. "type": "string"
  21155. },
  21156. "projectID": {
  21157. "type": "string"
  21158. },
  21159. "workspaceID": {
  21160. "type": "string",
  21161. "pattern": "^wrk"
  21162. },
  21163. "directory": {
  21164. "type": "string"
  21165. },
  21166. "path": {
  21167. "type": "string"
  21168. },
  21169. "parentID": {
  21170. "type": "string",
  21171. "pattern": "^ses"
  21172. },
  21173. "summary": {
  21174. "type": "object",
  21175. "properties": {
  21176. "additions": {
  21177. "type": "number"
  21178. },
  21179. "deletions": {
  21180. "type": "number"
  21181. },
  21182. "files": {
  21183. "type": "number"
  21184. },
  21185. "diffs": {
  21186. "type": "array",
  21187. "items": {
  21188. "$ref": "#/components/schemas/SnapshotFileDiff"
  21189. }
  21190. }
  21191. },
  21192. "required": ["additions", "deletions", "files"],
  21193. "additionalProperties": false
  21194. },
  21195. "cost": {
  21196. "type": "number"
  21197. },
  21198. "tokens": {
  21199. "type": "object",
  21200. "properties": {
  21201. "input": {
  21202. "type": "number"
  21203. },
  21204. "output": {
  21205. "type": "number"
  21206. },
  21207. "reasoning": {
  21208. "type": "number"
  21209. },
  21210. "cache": {
  21211. "type": "object",
  21212. "properties": {
  21213. "read": {
  21214. "type": "number"
  21215. },
  21216. "write": {
  21217. "type": "number"
  21218. }
  21219. },
  21220. "required": ["read", "write"],
  21221. "additionalProperties": false
  21222. }
  21223. },
  21224. "required": ["input", "output", "reasoning", "cache"],
  21225. "additionalProperties": false
  21226. },
  21227. "share": {
  21228. "type": "object",
  21229. "properties": {
  21230. "url": {
  21231. "type": "string"
  21232. }
  21233. },
  21234. "required": ["url"],
  21235. "additionalProperties": false
  21236. },
  21237. "title": {
  21238. "type": "string"
  21239. },
  21240. "agent": {
  21241. "type": "string"
  21242. },
  21243. "model": {
  21244. "type": "object",
  21245. "properties": {
  21246. "id": {
  21247. "type": "string"
  21248. },
  21249. "providerID": {
  21250. "type": "string"
  21251. },
  21252. "variant": {
  21253. "type": "string"
  21254. }
  21255. },
  21256. "required": ["id", "providerID"],
  21257. "additionalProperties": false
  21258. },
  21259. "version": {
  21260. "type": "string"
  21261. },
  21262. "metadata": {
  21263. "type": "object"
  21264. },
  21265. "time": {
  21266. "type": "object",
  21267. "properties": {
  21268. "created": {
  21269. "type": "integer",
  21270. "minimum": 0
  21271. },
  21272. "updated": {
  21273. "type": "integer",
  21274. "minimum": 0
  21275. },
  21276. "compacting": {
  21277. "type": "integer",
  21278. "minimum": 0
  21279. },
  21280. "archived": {
  21281. "type": "number"
  21282. }
  21283. },
  21284. "required": ["created", "updated"],
  21285. "additionalProperties": false
  21286. },
  21287. "permission": {
  21288. "$ref": "#/components/schemas/PermissionRuleset"
  21289. },
  21290. "revert": {
  21291. "type": "object",
  21292. "properties": {
  21293. "messageID": {
  21294. "type": "string",
  21295. "pattern": "^msg"
  21296. },
  21297. "partID": {
  21298. "type": "string",
  21299. "pattern": "^prt"
  21300. },
  21301. "snapshot": {
  21302. "type": "string"
  21303. },
  21304. "diff": {
  21305. "type": "string"
  21306. }
  21307. },
  21308. "required": ["messageID"],
  21309. "additionalProperties": false
  21310. },
  21311. "project": {
  21312. "anyOf": [
  21313. {
  21314. "$ref": "#/components/schemas/ProjectSummary"
  21315. },
  21316. {
  21317. "type": "null"
  21318. }
  21319. ]
  21320. }
  21321. },
  21322. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  21323. "additionalProperties": false
  21324. },
  21325. "McpResource": {
  21326. "type": "object",
  21327. "properties": {
  21328. "name": {
  21329. "type": "string"
  21330. },
  21331. "uri": {
  21332. "type": "string"
  21333. },
  21334. "description": {
  21335. "type": "string"
  21336. },
  21337. "mimeType": {
  21338. "type": "string"
  21339. },
  21340. "client": {
  21341. "type": "string"
  21342. }
  21343. },
  21344. "required": ["name", "uri", "client"],
  21345. "additionalProperties": false
  21346. },
  21347. "Symbol": {
  21348. "type": "object",
  21349. "properties": {
  21350. "name": {
  21351. "type": "string"
  21352. },
  21353. "kind": {
  21354. "type": "integer",
  21355. "minimum": 0
  21356. },
  21357. "location": {
  21358. "type": "object",
  21359. "properties": {
  21360. "uri": {
  21361. "type": "string"
  21362. },
  21363. "range": {
  21364. "$ref": "#/components/schemas/Range"
  21365. }
  21366. },
  21367. "required": ["uri", "range"],
  21368. "additionalProperties": false
  21369. }
  21370. },
  21371. "required": ["name", "kind", "location"],
  21372. "additionalProperties": false
  21373. },
  21374. "FileNode": {
  21375. "type": "object",
  21376. "properties": {
  21377. "name": {
  21378. "type": "string"
  21379. },
  21380. "path": {
  21381. "type": "string"
  21382. },
  21383. "absolute": {
  21384. "type": "string"
  21385. },
  21386. "type": {
  21387. "type": "string",
  21388. "enum": ["file", "directory"]
  21389. },
  21390. "ignored": {
  21391. "type": "boolean"
  21392. }
  21393. },
  21394. "required": ["name", "path", "absolute", "type", "ignored"],
  21395. "additionalProperties": false
  21396. },
  21397. "FileContent": {
  21398. "type": "object",
  21399. "properties": {
  21400. "type": {
  21401. "type": "string",
  21402. "enum": ["text", "binary"]
  21403. },
  21404. "content": {
  21405. "type": "string"
  21406. },
  21407. "diff": {
  21408. "type": "string"
  21409. },
  21410. "patch": {
  21411. "type": "object",
  21412. "properties": {
  21413. "oldFileName": {
  21414. "type": "string"
  21415. },
  21416. "newFileName": {
  21417. "type": "string"
  21418. },
  21419. "oldHeader": {
  21420. "type": "string"
  21421. },
  21422. "newHeader": {
  21423. "type": "string"
  21424. },
  21425. "hunks": {
  21426. "type": "array",
  21427. "items": {
  21428. "type": "object",
  21429. "properties": {
  21430. "oldStart": {
  21431. "type": "integer",
  21432. "minimum": 0
  21433. },
  21434. "oldLines": {
  21435. "type": "integer",
  21436. "minimum": 0
  21437. },
  21438. "newStart": {
  21439. "type": "integer",
  21440. "minimum": 0
  21441. },
  21442. "newLines": {
  21443. "type": "integer",
  21444. "minimum": 0
  21445. },
  21446. "lines": {
  21447. "type": "array",
  21448. "items": {
  21449. "type": "string"
  21450. }
  21451. }
  21452. },
  21453. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  21454. "additionalProperties": false
  21455. }
  21456. },
  21457. "index": {
  21458. "type": "string"
  21459. }
  21460. },
  21461. "required": ["oldFileName", "newFileName", "hunks"],
  21462. "additionalProperties": false
  21463. },
  21464. "encoding": {
  21465. "type": "string",
  21466. "enum": ["base64"]
  21467. },
  21468. "mimeType": {
  21469. "type": "string"
  21470. }
  21471. },
  21472. "required": ["type", "content"],
  21473. "additionalProperties": false
  21474. },
  21475. "File": {
  21476. "type": "object",
  21477. "properties": {
  21478. "path": {
  21479. "type": "string"
  21480. },
  21481. "added": {
  21482. "type": "integer",
  21483. "minimum": 0
  21484. },
  21485. "removed": {
  21486. "type": "integer",
  21487. "minimum": 0
  21488. },
  21489. "status": {
  21490. "type": "string",
  21491. "enum": ["added", "deleted", "modified"]
  21492. }
  21493. },
  21494. "required": ["path", "added", "removed", "status"],
  21495. "additionalProperties": false
  21496. },
  21497. "Path": {
  21498. "type": "object",
  21499. "properties": {
  21500. "home": {
  21501. "type": "string"
  21502. },
  21503. "state": {
  21504. "type": "string"
  21505. },
  21506. "config": {
  21507. "type": "string"
  21508. },
  21509. "worktree": {
  21510. "type": "string"
  21511. },
  21512. "directory": {
  21513. "type": "string"
  21514. }
  21515. },
  21516. "required": ["home", "state", "config", "worktree", "directory"],
  21517. "additionalProperties": false
  21518. },
  21519. "VcsInfo": {
  21520. "type": "object",
  21521. "properties": {
  21522. "branch": {
  21523. "type": "string"
  21524. },
  21525. "default_branch": {
  21526. "type": "string"
  21527. }
  21528. },
  21529. "additionalProperties": false
  21530. },
  21531. "VcsFileStatus": {
  21532. "type": "object",
  21533. "properties": {
  21534. "file": {
  21535. "type": "string"
  21536. },
  21537. "additions": {
  21538. "type": "number"
  21539. },
  21540. "deletions": {
  21541. "type": "number"
  21542. },
  21543. "status": {
  21544. "type": "string",
  21545. "enum": ["added", "deleted", "modified"]
  21546. }
  21547. },
  21548. "required": ["file", "additions", "deletions", "status"],
  21549. "additionalProperties": false
  21550. },
  21551. "VcsFileDiff": {
  21552. "type": "object",
  21553. "properties": {
  21554. "file": {
  21555. "type": "string"
  21556. },
  21557. "patch": {
  21558. "type": "string"
  21559. },
  21560. "additions": {
  21561. "type": "number"
  21562. },
  21563. "deletions": {
  21564. "type": "number"
  21565. },
  21566. "status": {
  21567. "type": "string",
  21568. "enum": ["added", "deleted", "modified"]
  21569. }
  21570. },
  21571. "required": ["file", "additions", "deletions"],
  21572. "additionalProperties": false
  21573. },
  21574. "VcsApplyError": {
  21575. "type": "object",
  21576. "properties": {
  21577. "name": {
  21578. "type": "string",
  21579. "enum": ["VcsApplyError"]
  21580. },
  21581. "data": {
  21582. "type": "object",
  21583. "properties": {
  21584. "message": {
  21585. "type": "string"
  21586. },
  21587. "reason": {
  21588. "type": "string",
  21589. "enum": ["non-git", "not-clean"]
  21590. }
  21591. },
  21592. "required": ["message", "reason"],
  21593. "additionalProperties": false
  21594. }
  21595. },
  21596. "required": ["name", "data"],
  21597. "additionalProperties": false
  21598. },
  21599. "Command": {
  21600. "type": "object",
  21601. "properties": {
  21602. "name": {
  21603. "type": "string"
  21604. },
  21605. "description": {
  21606. "type": "string"
  21607. },
  21608. "agent": {
  21609. "type": "string"
  21610. },
  21611. "model": {
  21612. "type": "string"
  21613. },
  21614. "source": {
  21615. "type": "string",
  21616. "enum": ["command", "mcp", "skill"]
  21617. },
  21618. "template": {
  21619. "type": "string"
  21620. },
  21621. "subtask": {
  21622. "type": "boolean"
  21623. },
  21624. "hints": {
  21625. "type": "array",
  21626. "items": {
  21627. "type": "string"
  21628. }
  21629. }
  21630. },
  21631. "required": ["name", "template", "hints"],
  21632. "additionalProperties": false
  21633. },
  21634. "Agent": {
  21635. "type": "object",
  21636. "properties": {
  21637. "name": {
  21638. "type": "string"
  21639. },
  21640. "description": {
  21641. "type": "string"
  21642. },
  21643. "mode": {
  21644. "type": "string",
  21645. "enum": ["subagent", "primary", "all"]
  21646. },
  21647. "native": {
  21648. "type": "boolean"
  21649. },
  21650. "hidden": {
  21651. "type": "boolean"
  21652. },
  21653. "topP": {
  21654. "type": "number"
  21655. },
  21656. "temperature": {
  21657. "type": "number"
  21658. },
  21659. "color": {
  21660. "type": "string"
  21661. },
  21662. "permission": {
  21663. "$ref": "#/components/schemas/PermissionRuleset"
  21664. },
  21665. "model": {
  21666. "type": "object",
  21667. "properties": {
  21668. "modelID": {
  21669. "type": "string"
  21670. },
  21671. "providerID": {
  21672. "type": "string"
  21673. }
  21674. },
  21675. "required": ["modelID", "providerID"],
  21676. "additionalProperties": false
  21677. },
  21678. "variant": {
  21679. "type": "string"
  21680. },
  21681. "prompt": {
  21682. "type": "string"
  21683. },
  21684. "options": {
  21685. "type": "object"
  21686. },
  21687. "steps": {
  21688. "type": "number"
  21689. }
  21690. },
  21691. "required": ["name", "mode", "permission", "options"],
  21692. "additionalProperties": false
  21693. },
  21694. "LSPStatus": {
  21695. "type": "object",
  21696. "properties": {
  21697. "id": {
  21698. "type": "string"
  21699. },
  21700. "name": {
  21701. "type": "string"
  21702. },
  21703. "root": {
  21704. "type": "string"
  21705. },
  21706. "status": {
  21707. "type": "string",
  21708. "enum": ["connected", "error"]
  21709. }
  21710. },
  21711. "required": ["id", "name", "root", "status"],
  21712. "additionalProperties": false
  21713. },
  21714. "FormatterStatus": {
  21715. "type": "object",
  21716. "properties": {
  21717. "name": {
  21718. "type": "string"
  21719. },
  21720. "extensions": {
  21721. "type": "array",
  21722. "items": {
  21723. "type": "string"
  21724. }
  21725. },
  21726. "enabled": {
  21727. "type": "boolean"
  21728. }
  21729. },
  21730. "required": ["name", "extensions", "enabled"],
  21731. "additionalProperties": false
  21732. },
  21733. "MCPStatusConnected": {
  21734. "type": "object",
  21735. "properties": {
  21736. "status": {
  21737. "type": "string",
  21738. "enum": ["connected"]
  21739. }
  21740. },
  21741. "required": ["status"],
  21742. "additionalProperties": false
  21743. },
  21744. "MCPStatusDisabled": {
  21745. "type": "object",
  21746. "properties": {
  21747. "status": {
  21748. "type": "string",
  21749. "enum": ["disabled"]
  21750. }
  21751. },
  21752. "required": ["status"],
  21753. "additionalProperties": false
  21754. },
  21755. "MCPStatusFailed": {
  21756. "type": "object",
  21757. "properties": {
  21758. "status": {
  21759. "type": "string",
  21760. "enum": ["failed"]
  21761. },
  21762. "error": {
  21763. "type": "string"
  21764. }
  21765. },
  21766. "required": ["status", "error"],
  21767. "additionalProperties": false
  21768. },
  21769. "MCPStatusNeedsAuth": {
  21770. "type": "object",
  21771. "properties": {
  21772. "status": {
  21773. "type": "string",
  21774. "enum": ["needs_auth"]
  21775. }
  21776. },
  21777. "required": ["status"],
  21778. "additionalProperties": false
  21779. },
  21780. "MCPStatusNeedsClientRegistration": {
  21781. "type": "object",
  21782. "properties": {
  21783. "status": {
  21784. "type": "string",
  21785. "enum": ["needs_client_registration"]
  21786. },
  21787. "error": {
  21788. "type": "string"
  21789. }
  21790. },
  21791. "required": ["status", "error"],
  21792. "additionalProperties": false
  21793. },
  21794. "MCPStatus": {
  21795. "anyOf": [
  21796. {
  21797. "$ref": "#/components/schemas/MCPStatusConnected"
  21798. },
  21799. {
  21800. "$ref": "#/components/schemas/MCPStatusDisabled"
  21801. },
  21802. {
  21803. "$ref": "#/components/schemas/MCPStatusFailed"
  21804. },
  21805. {
  21806. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  21807. },
  21808. {
  21809. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  21810. }
  21811. ]
  21812. },
  21813. "McpUnsupportedOAuthError": {
  21814. "type": "object",
  21815. "properties": {
  21816. "error": {
  21817. "type": "string"
  21818. }
  21819. },
  21820. "required": ["error"],
  21821. "additionalProperties": false
  21822. },
  21823. "McpServerNotFoundError": {
  21824. "type": "object",
  21825. "properties": {
  21826. "_tag": {
  21827. "type": "string",
  21828. "enum": ["McpServerNotFoundError"]
  21829. },
  21830. "name": {
  21831. "type": "string"
  21832. },
  21833. "message": {
  21834. "type": "string"
  21835. }
  21836. },
  21837. "required": ["_tag", "name", "message"],
  21838. "additionalProperties": false
  21839. },
  21840. "Project": {
  21841. "type": "object",
  21842. "properties": {
  21843. "id": {
  21844. "type": "string"
  21845. },
  21846. "worktree": {
  21847. "type": "string"
  21848. },
  21849. "vcs": {
  21850. "type": "string",
  21851. "enum": ["git"]
  21852. },
  21853. "name": {
  21854. "type": "string"
  21855. },
  21856. "icon": {
  21857. "type": "object",
  21858. "properties": {
  21859. "url": {
  21860. "type": "string"
  21861. },
  21862. "override": {
  21863. "type": "string"
  21864. },
  21865. "color": {
  21866. "type": "string"
  21867. }
  21868. },
  21869. "additionalProperties": false
  21870. },
  21871. "commands": {
  21872. "type": "object",
  21873. "properties": {
  21874. "start": {
  21875. "type": "string",
  21876. "description": "Startup script to run when creating a new workspace (worktree)"
  21877. }
  21878. },
  21879. "additionalProperties": false
  21880. },
  21881. "time": {
  21882. "type": "object",
  21883. "properties": {
  21884. "created": {
  21885. "type": "integer",
  21886. "minimum": 0
  21887. },
  21888. "updated": {
  21889. "type": "integer",
  21890. "minimum": 0
  21891. },
  21892. "initialized": {
  21893. "type": "integer",
  21894. "minimum": 0
  21895. }
  21896. },
  21897. "required": ["created", "updated"],
  21898. "additionalProperties": false
  21899. },
  21900. "sandboxes": {
  21901. "type": "array",
  21902. "items": {
  21903. "type": "string"
  21904. }
  21905. }
  21906. },
  21907. "required": ["id", "worktree", "time", "sandboxes"],
  21908. "additionalProperties": false
  21909. },
  21910. "ProjectNotFoundError": {
  21911. "type": "object",
  21912. "properties": {
  21913. "_tag": {
  21914. "type": "string",
  21915. "enum": ["ProjectNotFoundError"]
  21916. },
  21917. "projectID": {
  21918. "type": "string"
  21919. },
  21920. "message": {
  21921. "type": "string"
  21922. }
  21923. },
  21924. "required": ["_tag", "projectID", "message"],
  21925. "additionalProperties": false
  21926. },
  21927. "PtyNotFoundError": {
  21928. "type": "object",
  21929. "properties": {
  21930. "_tag": {
  21931. "type": "string",
  21932. "enum": ["PtyNotFoundError"]
  21933. },
  21934. "ptyID": {
  21935. "type": "string"
  21936. },
  21937. "message": {
  21938. "type": "string"
  21939. }
  21940. },
  21941. "required": ["_tag", "ptyID", "message"],
  21942. "additionalProperties": false
  21943. },
  21944. "PtyForbiddenError": {
  21945. "type": "object",
  21946. "properties": {
  21947. "_tag": {
  21948. "type": "string",
  21949. "enum": ["PtyForbiddenError"]
  21950. },
  21951. "message": {
  21952. "type": "string"
  21953. }
  21954. },
  21955. "required": ["_tag", "message"],
  21956. "additionalProperties": false
  21957. },
  21958. "QuestionRequest": {
  21959. "type": "object",
  21960. "properties": {
  21961. "id": {
  21962. "type": "string",
  21963. "pattern": "^que"
  21964. },
  21965. "sessionID": {
  21966. "type": "string",
  21967. "pattern": "^ses"
  21968. },
  21969. "questions": {
  21970. "type": "array",
  21971. "items": {
  21972. "$ref": "#/components/schemas/QuestionInfo"
  21973. },
  21974. "description": "Questions to ask"
  21975. },
  21976. "tool": {
  21977. "$ref": "#/components/schemas/QuestionTool"
  21978. }
  21979. },
  21980. "required": ["id", "sessionID", "questions"],
  21981. "additionalProperties": false
  21982. },
  21983. "QuestionNotFoundError": {
  21984. "type": "object",
  21985. "properties": {
  21986. "_tag": {
  21987. "type": "string",
  21988. "enum": ["QuestionNotFoundError"]
  21989. },
  21990. "requestID": {
  21991. "type": "string"
  21992. },
  21993. "message": {
  21994. "type": "string"
  21995. }
  21996. },
  21997. "required": ["_tag", "requestID", "message"],
  21998. "additionalProperties": false
  21999. },
  22000. "PermissionRequest": {
  22001. "type": "object",
  22002. "properties": {
  22003. "id": {
  22004. "type": "string",
  22005. "pattern": "^per"
  22006. },
  22007. "sessionID": {
  22008. "type": "string",
  22009. "pattern": "^ses"
  22010. },
  22011. "permission": {
  22012. "type": "string"
  22013. },
  22014. "patterns": {
  22015. "type": "array",
  22016. "items": {
  22017. "type": "string"
  22018. }
  22019. },
  22020. "metadata": {
  22021. "type": "object"
  22022. },
  22023. "always": {
  22024. "type": "array",
  22025. "items": {
  22026. "type": "string"
  22027. }
  22028. },
  22029. "tool": {
  22030. "type": "object",
  22031. "properties": {
  22032. "messageID": {
  22033. "type": "string"
  22034. },
  22035. "callID": {
  22036. "type": "string"
  22037. }
  22038. },
  22039. "required": ["messageID", "callID"],
  22040. "additionalProperties": false
  22041. }
  22042. },
  22043. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  22044. "additionalProperties": false
  22045. },
  22046. "PermissionNotFoundError": {
  22047. "type": "object",
  22048. "properties": {
  22049. "_tag": {
  22050. "type": "string",
  22051. "enum": ["PermissionNotFoundError"]
  22052. },
  22053. "requestID": {
  22054. "type": "string"
  22055. },
  22056. "message": {
  22057. "type": "string"
  22058. }
  22059. },
  22060. "required": ["_tag", "requestID", "message"],
  22061. "additionalProperties": false
  22062. },
  22063. "ProviderAuthMethod": {
  22064. "type": "object",
  22065. "properties": {
  22066. "type": {
  22067. "type": "string",
  22068. "enum": ["oauth", "api"]
  22069. },
  22070. "label": {
  22071. "type": "string"
  22072. },
  22073. "prompts": {
  22074. "type": "array",
  22075. "items": {
  22076. "anyOf": [
  22077. {
  22078. "type": "object",
  22079. "properties": {
  22080. "type": {
  22081. "type": "string",
  22082. "enum": ["text"]
  22083. },
  22084. "key": {
  22085. "type": "string"
  22086. },
  22087. "message": {
  22088. "type": "string"
  22089. },
  22090. "placeholder": {
  22091. "type": "string"
  22092. },
  22093. "when": {
  22094. "type": "object",
  22095. "properties": {
  22096. "key": {
  22097. "type": "string"
  22098. },
  22099. "op": {
  22100. "type": "string",
  22101. "enum": ["eq", "neq"]
  22102. },
  22103. "value": {
  22104. "type": "string"
  22105. }
  22106. },
  22107. "required": ["key", "op", "value"],
  22108. "additionalProperties": false
  22109. }
  22110. },
  22111. "required": ["type", "key", "message"],
  22112. "additionalProperties": false
  22113. },
  22114. {
  22115. "type": "object",
  22116. "properties": {
  22117. "type": {
  22118. "type": "string",
  22119. "enum": ["select"]
  22120. },
  22121. "key": {
  22122. "type": "string"
  22123. },
  22124. "message": {
  22125. "type": "string"
  22126. },
  22127. "options": {
  22128. "type": "array",
  22129. "items": {
  22130. "type": "object",
  22131. "properties": {
  22132. "label": {
  22133. "type": "string"
  22134. },
  22135. "value": {
  22136. "type": "string"
  22137. },
  22138. "hint": {
  22139. "type": "string"
  22140. }
  22141. },
  22142. "required": ["label", "value"],
  22143. "additionalProperties": false
  22144. }
  22145. },
  22146. "when": {
  22147. "type": "object",
  22148. "properties": {
  22149. "key": {
  22150. "type": "string"
  22151. },
  22152. "op": {
  22153. "type": "string",
  22154. "enum": ["eq", "neq"]
  22155. },
  22156. "value": {
  22157. "type": "string"
  22158. }
  22159. },
  22160. "required": ["key", "op", "value"],
  22161. "additionalProperties": false
  22162. }
  22163. },
  22164. "required": ["type", "key", "message", "options"],
  22165. "additionalProperties": false
  22166. }
  22167. ]
  22168. }
  22169. }
  22170. },
  22171. "required": ["type", "label"],
  22172. "additionalProperties": false
  22173. },
  22174. "ProviderAuthAuthorization": {
  22175. "type": "object",
  22176. "properties": {
  22177. "url": {
  22178. "type": "string"
  22179. },
  22180. "method": {
  22181. "type": "string",
  22182. "enum": ["auto", "code"]
  22183. },
  22184. "instructions": {
  22185. "type": "string"
  22186. }
  22187. },
  22188. "required": ["url", "method", "instructions"],
  22189. "additionalProperties": false
  22190. },
  22191. "ProviderAuthError1": {
  22192. "type": "object",
  22193. "properties": {
  22194. "name": {
  22195. "type": "string",
  22196. "enum": [
  22197. "BadRequest",
  22198. "ProviderAuthOauthMissing",
  22199. "ProviderAuthOauthCodeMissing",
  22200. "ProviderAuthOauthCallbackFailed",
  22201. "ProviderAuthValidationFailed"
  22202. ]
  22203. },
  22204. "data": {
  22205. "type": "object",
  22206. "properties": {
  22207. "providerID": {
  22208. "type": "string"
  22209. },
  22210. "field": {
  22211. "type": "string"
  22212. },
  22213. "message": {
  22214. "type": "string"
  22215. },
  22216. "kind": {
  22217. "type": "string"
  22218. }
  22219. },
  22220. "additionalProperties": false
  22221. }
  22222. },
  22223. "required": ["name", "data"],
  22224. "additionalProperties": false
  22225. },
  22226. "NotFoundError": {
  22227. "type": "object",
  22228. "required": ["name", "data"],
  22229. "properties": {
  22230. "name": {
  22231. "type": "string",
  22232. "enum": ["NotFoundError"]
  22233. },
  22234. "data": {
  22235. "type": "object",
  22236. "required": ["message"],
  22237. "properties": {
  22238. "message": {
  22239. "type": "string"
  22240. }
  22241. }
  22242. }
  22243. }
  22244. },
  22245. "TextPartInput": {
  22246. "type": "object",
  22247. "properties": {
  22248. "id": {
  22249. "type": "string",
  22250. "pattern": "^prt"
  22251. },
  22252. "type": {
  22253. "type": "string",
  22254. "enum": ["text"]
  22255. },
  22256. "text": {
  22257. "type": "string"
  22258. },
  22259. "synthetic": {
  22260. "type": "boolean"
  22261. },
  22262. "ignored": {
  22263. "type": "boolean"
  22264. },
  22265. "time": {
  22266. "type": "object",
  22267. "properties": {
  22268. "start": {
  22269. "type": "integer",
  22270. "minimum": 0
  22271. },
  22272. "end": {
  22273. "type": "integer",
  22274. "minimum": 0
  22275. }
  22276. },
  22277. "required": ["start"],
  22278. "additionalProperties": false
  22279. },
  22280. "metadata": {
  22281. "type": "object"
  22282. }
  22283. },
  22284. "required": ["type", "text"],
  22285. "additionalProperties": false
  22286. },
  22287. "FilePartInput": {
  22288. "type": "object",
  22289. "properties": {
  22290. "id": {
  22291. "type": "string",
  22292. "pattern": "^prt"
  22293. },
  22294. "type": {
  22295. "type": "string",
  22296. "enum": ["file"]
  22297. },
  22298. "mime": {
  22299. "type": "string"
  22300. },
  22301. "filename": {
  22302. "type": "string"
  22303. },
  22304. "url": {
  22305. "type": "string"
  22306. },
  22307. "source": {
  22308. "$ref": "#/components/schemas/FilePartSource"
  22309. }
  22310. },
  22311. "required": ["type", "mime", "url"],
  22312. "additionalProperties": false
  22313. },
  22314. "AgentPartInput": {
  22315. "type": "object",
  22316. "properties": {
  22317. "id": {
  22318. "type": "string",
  22319. "pattern": "^prt"
  22320. },
  22321. "type": {
  22322. "type": "string",
  22323. "enum": ["agent"]
  22324. },
  22325. "name": {
  22326. "type": "string"
  22327. },
  22328. "source": {
  22329. "type": "object",
  22330. "properties": {
  22331. "value": {
  22332. "type": "string"
  22333. },
  22334. "start": {
  22335. "type": "integer",
  22336. "minimum": 0
  22337. },
  22338. "end": {
  22339. "type": "integer",
  22340. "minimum": 0
  22341. }
  22342. },
  22343. "required": ["value", "start", "end"],
  22344. "additionalProperties": false
  22345. }
  22346. },
  22347. "required": ["type", "name"],
  22348. "additionalProperties": false
  22349. },
  22350. "SubtaskPartInput": {
  22351. "type": "object",
  22352. "properties": {
  22353. "id": {
  22354. "type": "string",
  22355. "pattern": "^prt"
  22356. },
  22357. "type": {
  22358. "type": "string",
  22359. "enum": ["subtask"]
  22360. },
  22361. "prompt": {
  22362. "type": "string"
  22363. },
  22364. "description": {
  22365. "type": "string"
  22366. },
  22367. "agent": {
  22368. "type": "string"
  22369. },
  22370. "model": {
  22371. "type": "object",
  22372. "properties": {
  22373. "providerID": {
  22374. "type": "string"
  22375. },
  22376. "modelID": {
  22377. "type": "string"
  22378. }
  22379. },
  22380. "required": ["providerID", "modelID"],
  22381. "additionalProperties": false
  22382. },
  22383. "command": {
  22384. "type": "string"
  22385. }
  22386. },
  22387. "required": ["type", "prompt", "description", "agent"],
  22388. "additionalProperties": false
  22389. },
  22390. "SessionBusyError": {
  22391. "type": "object",
  22392. "properties": {
  22393. "_tag": {
  22394. "type": "string",
  22395. "enum": ["SessionBusyError"]
  22396. },
  22397. "sessionID": {
  22398. "type": "string"
  22399. },
  22400. "message": {
  22401. "type": "string"
  22402. }
  22403. },
  22404. "required": ["_tag", "sessionID", "message"],
  22405. "additionalProperties": false
  22406. },
  22407. "EventTuiPromptAppend": {
  22408. "type": "object",
  22409. "properties": {
  22410. "type": {
  22411. "type": "string",
  22412. "enum": ["tui.prompt.append"]
  22413. },
  22414. "properties": {
  22415. "type": "object",
  22416. "properties": {
  22417. "text": {
  22418. "type": "string"
  22419. }
  22420. },
  22421. "required": ["text"],
  22422. "additionalProperties": false
  22423. }
  22424. },
  22425. "required": ["type", "properties"],
  22426. "additionalProperties": false
  22427. },
  22428. "EventTuiCommandExecute": {
  22429. "type": "object",
  22430. "properties": {
  22431. "type": {
  22432. "type": "string",
  22433. "enum": ["tui.command.execute"]
  22434. },
  22435. "properties": {
  22436. "type": "object",
  22437. "properties": {
  22438. "command": {
  22439. "anyOf": [
  22440. {
  22441. "type": "string",
  22442. "enum": [
  22443. "session.list",
  22444. "session.new",
  22445. "session.share",
  22446. "session.interrupt",
  22447. "session.compact",
  22448. "session.page.up",
  22449. "session.page.down",
  22450. "session.line.up",
  22451. "session.line.down",
  22452. "session.half.page.up",
  22453. "session.half.page.down",
  22454. "session.first",
  22455. "session.last",
  22456. "prompt.clear",
  22457. "prompt.submit",
  22458. "agent.cycle"
  22459. ]
  22460. },
  22461. {
  22462. "type": "string"
  22463. }
  22464. ]
  22465. }
  22466. },
  22467. "required": ["command"],
  22468. "additionalProperties": false
  22469. }
  22470. },
  22471. "required": ["type", "properties"],
  22472. "additionalProperties": false
  22473. },
  22474. "EventTuiToastShow": {
  22475. "type": "object",
  22476. "properties": {
  22477. "type": {
  22478. "type": "string",
  22479. "enum": ["tui.toast.show"]
  22480. },
  22481. "properties": {
  22482. "type": "object",
  22483. "properties": {
  22484. "title": {
  22485. "type": "string"
  22486. },
  22487. "message": {
  22488. "type": "string"
  22489. },
  22490. "variant": {
  22491. "type": "string",
  22492. "enum": ["info", "success", "warning", "error"]
  22493. },
  22494. "duration": {
  22495. "type": "integer",
  22496. "exclusiveMinimum": 0
  22497. }
  22498. },
  22499. "required": ["message", "variant"],
  22500. "additionalProperties": false
  22501. }
  22502. },
  22503. "required": ["type", "properties"],
  22504. "additionalProperties": false
  22505. },
  22506. "EventTuiSessionSelect": {
  22507. "type": "object",
  22508. "properties": {
  22509. "type": {
  22510. "type": "string",
  22511. "enum": ["tui.session.select"]
  22512. },
  22513. "properties": {
  22514. "type": "object",
  22515. "properties": {
  22516. "sessionID": {
  22517. "type": "string",
  22518. "pattern": "^ses",
  22519. "description": "Session ID to navigate to"
  22520. }
  22521. },
  22522. "required": ["sessionID"],
  22523. "additionalProperties": false
  22524. }
  22525. },
  22526. "required": ["type", "properties"],
  22527. "additionalProperties": false
  22528. },
  22529. "Workspace": {
  22530. "type": "object",
  22531. "properties": {
  22532. "id": {
  22533. "type": "string",
  22534. "pattern": "^wrk"
  22535. },
  22536. "type": {
  22537. "type": "string"
  22538. },
  22539. "name": {
  22540. "type": "string"
  22541. },
  22542. "branch": {
  22543. "anyOf": [
  22544. {
  22545. "type": "string"
  22546. },
  22547. {
  22548. "type": "null"
  22549. }
  22550. ]
  22551. },
  22552. "directory": {
  22553. "anyOf": [
  22554. {
  22555. "type": "string"
  22556. },
  22557. {
  22558. "type": "null"
  22559. }
  22560. ]
  22561. },
  22562. "extra": {
  22563. "anyOf": [
  22564. {},
  22565. {
  22566. "type": "null"
  22567. }
  22568. ]
  22569. },
  22570. "projectID": {
  22571. "type": "string"
  22572. },
  22573. "timeUsed": {
  22574. "anyOf": [
  22575. {
  22576. "type": "number"
  22577. },
  22578. {
  22579. "type": "string",
  22580. "enum": ["NaN"]
  22581. },
  22582. {
  22583. "type": "string",
  22584. "enum": ["Infinity"]
  22585. },
  22586. {
  22587. "type": "string",
  22588. "enum": ["-Infinity"]
  22589. },
  22590. {
  22591. "type": "string",
  22592. "enum": ["Infinity", "-Infinity", "NaN"]
  22593. }
  22594. ]
  22595. }
  22596. },
  22597. "required": ["id", "type", "name", "projectID", "timeUsed"],
  22598. "additionalProperties": false
  22599. },
  22600. "WorkspaceCreateError": {
  22601. "type": "object",
  22602. "properties": {
  22603. "name": {
  22604. "type": "string",
  22605. "enum": ["WorkspaceCreateError"]
  22606. },
  22607. "data": {
  22608. "type": "object",
  22609. "properties": {
  22610. "message": {
  22611. "type": "string"
  22612. }
  22613. },
  22614. "required": ["message"],
  22615. "additionalProperties": false
  22616. }
  22617. },
  22618. "required": ["name", "data"],
  22619. "additionalProperties": false
  22620. },
  22621. "WorkspaceWarpError": {
  22622. "type": "object",
  22623. "properties": {
  22624. "name": {
  22625. "type": "string",
  22626. "enum": ["WorkspaceWarpError"]
  22627. },
  22628. "data": {
  22629. "type": "object",
  22630. "properties": {
  22631. "message": {
  22632. "type": "string"
  22633. }
  22634. },
  22635. "required": ["message"],
  22636. "additionalProperties": false
  22637. }
  22638. },
  22639. "required": ["name", "data"],
  22640. "additionalProperties": false
  22641. },
  22642. "UnauthorizedError": {
  22643. "type": "object",
  22644. "properties": {
  22645. "_tag": {
  22646. "type": "string",
  22647. "enum": ["UnauthorizedError"]
  22648. },
  22649. "message": {
  22650. "type": "string"
  22651. }
  22652. },
  22653. "required": ["_tag", "message"],
  22654. "additionalProperties": false
  22655. },
  22656. "SessionsResponse": {
  22657. "type": "object",
  22658. "properties": {
  22659. "data": {
  22660. "type": "array",
  22661. "items": {
  22662. "$ref": "#/components/schemas/SessionV2Info"
  22663. }
  22664. },
  22665. "cursor": {
  22666. "type": "object",
  22667. "properties": {
  22668. "previous": {
  22669. "type": "string"
  22670. },
  22671. "next": {
  22672. "type": "string"
  22673. }
  22674. },
  22675. "additionalProperties": false
  22676. }
  22677. },
  22678. "required": ["data", "cursor"],
  22679. "additionalProperties": false
  22680. },
  22681. "InvalidCursorError": {
  22682. "type": "object",
  22683. "properties": {
  22684. "_tag": {
  22685. "type": "string",
  22686. "enum": ["InvalidCursorError"]
  22687. },
  22688. "message": {
  22689. "type": "string"
  22690. }
  22691. },
  22692. "required": ["_tag", "message"],
  22693. "additionalProperties": false
  22694. },
  22695. "SessionNotFoundError": {
  22696. "type": "object",
  22697. "properties": {
  22698. "_tag": {
  22699. "type": "string",
  22700. "enum": ["SessionNotFoundError"]
  22701. },
  22702. "sessionID": {
  22703. "type": "string"
  22704. },
  22705. "message": {
  22706. "type": "string"
  22707. }
  22708. },
  22709. "required": ["_tag", "sessionID", "message"],
  22710. "additionalProperties": false
  22711. },
  22712. "ConflictError": {
  22713. "type": "object",
  22714. "properties": {
  22715. "_tag": {
  22716. "type": "string",
  22717. "enum": ["ConflictError"]
  22718. },
  22719. "message": {
  22720. "type": "string"
  22721. },
  22722. "resource": {
  22723. "type": "string"
  22724. }
  22725. },
  22726. "required": ["_tag", "message"],
  22727. "additionalProperties": false
  22728. },
  22729. "ServiceUnavailableError": {
  22730. "type": "object",
  22731. "properties": {
  22732. "_tag": {
  22733. "type": "string",
  22734. "enum": ["ServiceUnavailableError"]
  22735. },
  22736. "message": {
  22737. "type": "string"
  22738. },
  22739. "service": {
  22740. "type": "string"
  22741. }
  22742. },
  22743. "required": ["_tag", "message"],
  22744. "additionalProperties": false
  22745. },
  22746. "UnknownError1": {
  22747. "type": "object",
  22748. "properties": {
  22749. "_tag": {
  22750. "type": "string",
  22751. "enum": ["UnknownError"]
  22752. },
  22753. "message": {
  22754. "type": "string"
  22755. },
  22756. "ref": {
  22757. "type": "string"
  22758. }
  22759. },
  22760. "required": ["_tag", "message"],
  22761. "additionalProperties": false
  22762. },
  22763. "SessionMessagesResponse": {
  22764. "type": "object",
  22765. "properties": {
  22766. "data": {
  22767. "type": "array",
  22768. "items": {
  22769. "$ref": "#/components/schemas/SessionMessage"
  22770. }
  22771. },
  22772. "cursor": {
  22773. "type": "object",
  22774. "properties": {
  22775. "previous": {
  22776. "type": "string"
  22777. },
  22778. "next": {
  22779. "type": "string"
  22780. }
  22781. },
  22782. "additionalProperties": false
  22783. }
  22784. },
  22785. "required": ["data", "cursor"],
  22786. "additionalProperties": false
  22787. },
  22788. "ProviderNotFoundError": {
  22789. "type": "object",
  22790. "properties": {
  22791. "_tag": {
  22792. "type": "string",
  22793. "enum": ["ProviderNotFoundError"]
  22794. },
  22795. "providerID": {
  22796. "type": "string"
  22797. },
  22798. "message": {
  22799. "type": "string"
  22800. }
  22801. },
  22802. "required": ["_tag", "providerID", "message"],
  22803. "additionalProperties": false
  22804. },
  22805. "ForbiddenError": {
  22806. "type": "object",
  22807. "properties": {
  22808. "_tag": {
  22809. "type": "string",
  22810. "enum": ["ForbiddenError"]
  22811. },
  22812. "message": {
  22813. "type": "string"
  22814. }
  22815. },
  22816. "required": ["_tag", "message"],
  22817. "additionalProperties": false
  22818. },
  22819. "ProjectCopyError": {
  22820. "type": "object",
  22821. "properties": {
  22822. "name": {
  22823. "type": "string",
  22824. "enum": ["ProjectCopyError"]
  22825. },
  22826. "data": {
  22827. "type": "object",
  22828. "properties": {
  22829. "message": {
  22830. "type": "string"
  22831. },
  22832. "forceRequired": {
  22833. "type": "boolean"
  22834. }
  22835. },
  22836. "required": ["message"],
  22837. "additionalProperties": false
  22838. }
  22839. },
  22840. "required": ["name", "data"],
  22841. "additionalProperties": false
  22842. },
  22843. "effect_HttpApiError_Forbidden": {
  22844. "type": "object",
  22845. "properties": {
  22846. "_tag": {
  22847. "type": "string",
  22848. "enum": ["Forbidden"]
  22849. }
  22850. },
  22851. "required": ["_tag"],
  22852. "additionalProperties": false
  22853. },
  22854. "Event.tui.prompt.append": {
  22855. "type": "object",
  22856. "properties": {
  22857. "id": {
  22858. "type": "string",
  22859. "pattern": "^evt_"
  22860. },
  22861. "type": {
  22862. "type": "string",
  22863. "enum": ["tui.prompt.append"]
  22864. },
  22865. "properties": {
  22866. "type": "object",
  22867. "properties": {
  22868. "text": {
  22869. "type": "string"
  22870. }
  22871. },
  22872. "required": ["text"],
  22873. "additionalProperties": false
  22874. }
  22875. },
  22876. "required": ["id", "type", "properties"],
  22877. "additionalProperties": false
  22878. },
  22879. "Event.tui.command.execute": {
  22880. "type": "object",
  22881. "properties": {
  22882. "id": {
  22883. "type": "string",
  22884. "pattern": "^evt_"
  22885. },
  22886. "type": {
  22887. "type": "string",
  22888. "enum": ["tui.command.execute"]
  22889. },
  22890. "properties": {
  22891. "type": "object",
  22892. "properties": {
  22893. "command": {
  22894. "anyOf": [
  22895. {
  22896. "type": "string",
  22897. "enum": [
  22898. "session.list",
  22899. "session.new",
  22900. "session.share",
  22901. "session.interrupt",
  22902. "session.compact",
  22903. "session.page.up",
  22904. "session.page.down",
  22905. "session.line.up",
  22906. "session.line.down",
  22907. "session.half.page.up",
  22908. "session.half.page.down",
  22909. "session.first",
  22910. "session.last",
  22911. "prompt.clear",
  22912. "prompt.submit",
  22913. "agent.cycle"
  22914. ]
  22915. },
  22916. {
  22917. "type": "string"
  22918. }
  22919. ]
  22920. }
  22921. },
  22922. "required": ["command"],
  22923. "additionalProperties": false
  22924. }
  22925. },
  22926. "required": ["id", "type", "properties"],
  22927. "additionalProperties": false
  22928. },
  22929. "Event.tui.toast.show": {
  22930. "type": "object",
  22931. "properties": {
  22932. "id": {
  22933. "type": "string",
  22934. "pattern": "^evt_"
  22935. },
  22936. "type": {
  22937. "type": "string",
  22938. "enum": ["tui.toast.show"]
  22939. },
  22940. "properties": {
  22941. "type": "object",
  22942. "properties": {
  22943. "title": {
  22944. "type": "string"
  22945. },
  22946. "message": {
  22947. "type": "string"
  22948. },
  22949. "variant": {
  22950. "type": "string",
  22951. "enum": ["info", "success", "warning", "error"]
  22952. },
  22953. "duration": {
  22954. "type": "integer",
  22955. "exclusiveMinimum": 0
  22956. }
  22957. },
  22958. "required": ["message", "variant"],
  22959. "additionalProperties": false
  22960. }
  22961. },
  22962. "required": ["id", "type", "properties"],
  22963. "additionalProperties": false
  22964. },
  22965. "Event.tui.session.select": {
  22966. "type": "object",
  22967. "properties": {
  22968. "id": {
  22969. "type": "string",
  22970. "pattern": "^evt_"
  22971. },
  22972. "type": {
  22973. "type": "string",
  22974. "enum": ["tui.session.select"]
  22975. },
  22976. "properties": {
  22977. "type": "object",
  22978. "properties": {
  22979. "sessionID": {
  22980. "type": "string",
  22981. "pattern": "^ses",
  22982. "description": "Session ID to navigate to"
  22983. }
  22984. },
  22985. "required": ["sessionID"],
  22986. "additionalProperties": false
  22987. }
  22988. },
  22989. "required": ["id", "type", "properties"],
  22990. "additionalProperties": false
  22991. },
  22992. "MoveSessionDestination": {
  22993. "type": "object",
  22994. "properties": {
  22995. "directory": {
  22996. "type": "string"
  22997. }
  22998. },
  22999. "required": ["directory"],
  23000. "additionalProperties": false
  23001. },
  23002. "ModelV2Info": {
  23003. "type": "object",
  23004. "properties": {
  23005. "id": {
  23006. "type": "string"
  23007. },
  23008. "providerID": {
  23009. "type": "string"
  23010. },
  23011. "family": {
  23012. "type": "string"
  23013. },
  23014. "name": {
  23015. "type": "string"
  23016. },
  23017. "api": {
  23018. "anyOf": [
  23019. {
  23020. "type": "object",
  23021. "properties": {
  23022. "id": {
  23023. "type": "string"
  23024. },
  23025. "type": {
  23026. "type": "string",
  23027. "enum": ["aisdk"]
  23028. },
  23029. "package": {
  23030. "type": "string"
  23031. },
  23032. "url": {
  23033. "type": "string"
  23034. },
  23035. "settings": {
  23036. "type": "object"
  23037. }
  23038. },
  23039. "required": ["id", "type", "package"],
  23040. "additionalProperties": false
  23041. },
  23042. {
  23043. "type": "object",
  23044. "properties": {
  23045. "id": {
  23046. "type": "string"
  23047. },
  23048. "type": {
  23049. "type": "string",
  23050. "enum": ["native"]
  23051. },
  23052. "url": {
  23053. "type": "string"
  23054. },
  23055. "settings": {
  23056. "type": "object"
  23057. }
  23058. },
  23059. "required": ["id", "type", "settings"],
  23060. "additionalProperties": false
  23061. }
  23062. ]
  23063. },
  23064. "capabilities": {
  23065. "type": "object",
  23066. "properties": {
  23067. "tools": {
  23068. "type": "boolean"
  23069. },
  23070. "input": {
  23071. "type": "array",
  23072. "items": {
  23073. "type": "string"
  23074. }
  23075. },
  23076. "output": {
  23077. "type": "array",
  23078. "items": {
  23079. "type": "string"
  23080. }
  23081. }
  23082. },
  23083. "required": ["tools", "input", "output"],
  23084. "additionalProperties": false
  23085. },
  23086. "request": {
  23087. "type": "object",
  23088. "properties": {
  23089. "headers": {
  23090. "type": "object",
  23091. "additionalProperties": {
  23092. "type": "string"
  23093. }
  23094. },
  23095. "body": {
  23096. "type": "object"
  23097. },
  23098. "generation": {
  23099. "type": "object",
  23100. "properties": {
  23101. "maxTokens": {
  23102. "anyOf": [
  23103. {
  23104. "type": "number"
  23105. },
  23106. {
  23107. "type": "string",
  23108. "enum": ["NaN"]
  23109. },
  23110. {
  23111. "type": "string",
  23112. "enum": ["Infinity"]
  23113. },
  23114. {
  23115. "type": "string",
  23116. "enum": ["-Infinity"]
  23117. },
  23118. {
  23119. "type": "string",
  23120. "enum": ["Infinity", "-Infinity", "NaN"]
  23121. }
  23122. ]
  23123. },
  23124. "temperature": {
  23125. "anyOf": [
  23126. {
  23127. "type": "number"
  23128. },
  23129. {
  23130. "type": "string",
  23131. "enum": ["NaN"]
  23132. },
  23133. {
  23134. "type": "string",
  23135. "enum": ["Infinity"]
  23136. },
  23137. {
  23138. "type": "string",
  23139. "enum": ["-Infinity"]
  23140. },
  23141. {
  23142. "type": "string",
  23143. "enum": ["Infinity", "-Infinity", "NaN"]
  23144. }
  23145. ]
  23146. },
  23147. "topP": {
  23148. "anyOf": [
  23149. {
  23150. "type": "number"
  23151. },
  23152. {
  23153. "type": "string",
  23154. "enum": ["NaN"]
  23155. },
  23156. {
  23157. "type": "string",
  23158. "enum": ["Infinity"]
  23159. },
  23160. {
  23161. "type": "string",
  23162. "enum": ["-Infinity"]
  23163. },
  23164. {
  23165. "type": "string",
  23166. "enum": ["Infinity", "-Infinity", "NaN"]
  23167. }
  23168. ]
  23169. },
  23170. "topK": {
  23171. "anyOf": [
  23172. {
  23173. "type": "number"
  23174. },
  23175. {
  23176. "type": "string",
  23177. "enum": ["NaN"]
  23178. },
  23179. {
  23180. "type": "string",
  23181. "enum": ["Infinity"]
  23182. },
  23183. {
  23184. "type": "string",
  23185. "enum": ["-Infinity"]
  23186. },
  23187. {
  23188. "type": "string",
  23189. "enum": ["Infinity", "-Infinity", "NaN"]
  23190. }
  23191. ]
  23192. },
  23193. "frequencyPenalty": {
  23194. "anyOf": [
  23195. {
  23196. "type": "number"
  23197. },
  23198. {
  23199. "type": "string",
  23200. "enum": ["NaN"]
  23201. },
  23202. {
  23203. "type": "string",
  23204. "enum": ["Infinity"]
  23205. },
  23206. {
  23207. "type": "string",
  23208. "enum": ["-Infinity"]
  23209. },
  23210. {
  23211. "type": "string",
  23212. "enum": ["Infinity", "-Infinity", "NaN"]
  23213. }
  23214. ]
  23215. },
  23216. "presencePenalty": {
  23217. "anyOf": [
  23218. {
  23219. "type": "number"
  23220. },
  23221. {
  23222. "type": "string",
  23223. "enum": ["NaN"]
  23224. },
  23225. {
  23226. "type": "string",
  23227. "enum": ["Infinity"]
  23228. },
  23229. {
  23230. "type": "string",
  23231. "enum": ["-Infinity"]
  23232. },
  23233. {
  23234. "type": "string",
  23235. "enum": ["Infinity", "-Infinity", "NaN"]
  23236. }
  23237. ]
  23238. },
  23239. "seed": {
  23240. "anyOf": [
  23241. {
  23242. "type": "number"
  23243. },
  23244. {
  23245. "type": "string",
  23246. "enum": ["NaN"]
  23247. },
  23248. {
  23249. "type": "string",
  23250. "enum": ["Infinity"]
  23251. },
  23252. {
  23253. "type": "string",
  23254. "enum": ["-Infinity"]
  23255. },
  23256. {
  23257. "type": "string",
  23258. "enum": ["Infinity", "-Infinity", "NaN"]
  23259. }
  23260. ]
  23261. },
  23262. "stop": {
  23263. "type": "array",
  23264. "items": {
  23265. "type": "string"
  23266. }
  23267. }
  23268. },
  23269. "additionalProperties": false
  23270. },
  23271. "options": {
  23272. "type": "object"
  23273. },
  23274. "variant": {
  23275. "type": "string"
  23276. }
  23277. },
  23278. "required": ["headers", "body"],
  23279. "additionalProperties": false
  23280. },
  23281. "variants": {
  23282. "type": "array",
  23283. "items": {
  23284. "type": "object",
  23285. "properties": {
  23286. "id": {
  23287. "type": "string"
  23288. },
  23289. "headers": {
  23290. "type": "object",
  23291. "additionalProperties": {
  23292. "type": "string"
  23293. }
  23294. },
  23295. "body": {
  23296. "type": "object"
  23297. },
  23298. "generation": {
  23299. "type": "object",
  23300. "properties": {
  23301. "maxTokens": {
  23302. "anyOf": [
  23303. {
  23304. "type": "number"
  23305. },
  23306. {
  23307. "type": "string",
  23308. "enum": ["NaN"]
  23309. },
  23310. {
  23311. "type": "string",
  23312. "enum": ["Infinity"]
  23313. },
  23314. {
  23315. "type": "string",
  23316. "enum": ["-Infinity"]
  23317. },
  23318. {
  23319. "type": "string",
  23320. "enum": ["Infinity", "-Infinity", "NaN"]
  23321. }
  23322. ]
  23323. },
  23324. "temperature": {
  23325. "anyOf": [
  23326. {
  23327. "type": "number"
  23328. },
  23329. {
  23330. "type": "string",
  23331. "enum": ["NaN"]
  23332. },
  23333. {
  23334. "type": "string",
  23335. "enum": ["Infinity"]
  23336. },
  23337. {
  23338. "type": "string",
  23339. "enum": ["-Infinity"]
  23340. },
  23341. {
  23342. "type": "string",
  23343. "enum": ["Infinity", "-Infinity", "NaN"]
  23344. }
  23345. ]
  23346. },
  23347. "topP": {
  23348. "anyOf": [
  23349. {
  23350. "type": "number"
  23351. },
  23352. {
  23353. "type": "string",
  23354. "enum": ["NaN"]
  23355. },
  23356. {
  23357. "type": "string",
  23358. "enum": ["Infinity"]
  23359. },
  23360. {
  23361. "type": "string",
  23362. "enum": ["-Infinity"]
  23363. },
  23364. {
  23365. "type": "string",
  23366. "enum": ["Infinity", "-Infinity", "NaN"]
  23367. }
  23368. ]
  23369. },
  23370. "topK": {
  23371. "anyOf": [
  23372. {
  23373. "type": "number"
  23374. },
  23375. {
  23376. "type": "string",
  23377. "enum": ["NaN"]
  23378. },
  23379. {
  23380. "type": "string",
  23381. "enum": ["Infinity"]
  23382. },
  23383. {
  23384. "type": "string",
  23385. "enum": ["-Infinity"]
  23386. },
  23387. {
  23388. "type": "string",
  23389. "enum": ["Infinity", "-Infinity", "NaN"]
  23390. }
  23391. ]
  23392. },
  23393. "frequencyPenalty": {
  23394. "anyOf": [
  23395. {
  23396. "type": "number"
  23397. },
  23398. {
  23399. "type": "string",
  23400. "enum": ["NaN"]
  23401. },
  23402. {
  23403. "type": "string",
  23404. "enum": ["Infinity"]
  23405. },
  23406. {
  23407. "type": "string",
  23408. "enum": ["-Infinity"]
  23409. },
  23410. {
  23411. "type": "string",
  23412. "enum": ["Infinity", "-Infinity", "NaN"]
  23413. }
  23414. ]
  23415. },
  23416. "presencePenalty": {
  23417. "anyOf": [
  23418. {
  23419. "type": "number"
  23420. },
  23421. {
  23422. "type": "string",
  23423. "enum": ["NaN"]
  23424. },
  23425. {
  23426. "type": "string",
  23427. "enum": ["Infinity"]
  23428. },
  23429. {
  23430. "type": "string",
  23431. "enum": ["-Infinity"]
  23432. },
  23433. {
  23434. "type": "string",
  23435. "enum": ["Infinity", "-Infinity", "NaN"]
  23436. }
  23437. ]
  23438. },
  23439. "seed": {
  23440. "anyOf": [
  23441. {
  23442. "type": "number"
  23443. },
  23444. {
  23445. "type": "string",
  23446. "enum": ["NaN"]
  23447. },
  23448. {
  23449. "type": "string",
  23450. "enum": ["Infinity"]
  23451. },
  23452. {
  23453. "type": "string",
  23454. "enum": ["-Infinity"]
  23455. },
  23456. {
  23457. "type": "string",
  23458. "enum": ["Infinity", "-Infinity", "NaN"]
  23459. }
  23460. ]
  23461. },
  23462. "stop": {
  23463. "type": "array",
  23464. "items": {
  23465. "type": "string"
  23466. }
  23467. }
  23468. },
  23469. "additionalProperties": false
  23470. },
  23471. "options": {
  23472. "type": "object"
  23473. }
  23474. },
  23475. "required": ["id", "headers", "body"],
  23476. "additionalProperties": false
  23477. }
  23478. },
  23479. "time": {
  23480. "type": "object",
  23481. "properties": {
  23482. "released": {
  23483. "anyOf": [
  23484. {
  23485. "type": "number"
  23486. },
  23487. {
  23488. "type": "string",
  23489. "enum": ["NaN"]
  23490. },
  23491. {
  23492. "type": "string",
  23493. "enum": ["Infinity"]
  23494. },
  23495. {
  23496. "type": "string",
  23497. "enum": ["-Infinity"]
  23498. },
  23499. {
  23500. "type": "string",
  23501. "enum": ["Infinity", "-Infinity", "NaN"]
  23502. }
  23503. ]
  23504. }
  23505. },
  23506. "required": ["released"],
  23507. "additionalProperties": false
  23508. },
  23509. "cost": {
  23510. "type": "array",
  23511. "items": {
  23512. "type": "object",
  23513. "properties": {
  23514. "tier": {
  23515. "type": "object",
  23516. "properties": {
  23517. "type": {
  23518. "type": "string",
  23519. "enum": ["context"]
  23520. },
  23521. "size": {
  23522. "type": "integer"
  23523. }
  23524. },
  23525. "required": ["type", "size"],
  23526. "additionalProperties": false
  23527. },
  23528. "input": {
  23529. "type": "number"
  23530. },
  23531. "output": {
  23532. "type": "number"
  23533. },
  23534. "cache": {
  23535. "type": "object",
  23536. "properties": {
  23537. "read": {
  23538. "type": "number"
  23539. },
  23540. "write": {
  23541. "type": "number"
  23542. }
  23543. },
  23544. "required": ["read", "write"],
  23545. "additionalProperties": false
  23546. }
  23547. },
  23548. "required": ["input", "output", "cache"],
  23549. "additionalProperties": false
  23550. }
  23551. },
  23552. "status": {
  23553. "type": "string",
  23554. "enum": ["alpha", "beta", "deprecated", "active"]
  23555. },
  23556. "enabled": {
  23557. "type": "boolean"
  23558. },
  23559. "limit": {
  23560. "type": "object",
  23561. "properties": {
  23562. "context": {
  23563. "type": "integer"
  23564. },
  23565. "input": {
  23566. "type": "integer"
  23567. },
  23568. "output": {
  23569. "type": "integer"
  23570. }
  23571. },
  23572. "required": ["context", "output"],
  23573. "additionalProperties": false
  23574. }
  23575. },
  23576. "required": [
  23577. "id",
  23578. "providerID",
  23579. "name",
  23580. "api",
  23581. "capabilities",
  23582. "request",
  23583. "variants",
  23584. "time",
  23585. "cost",
  23586. "status",
  23587. "enabled",
  23588. "limit"
  23589. ],
  23590. "additionalProperties": false
  23591. },
  23592. "LocationRef": {
  23593. "type": "object",
  23594. "properties": {
  23595. "directory": {
  23596. "type": "string"
  23597. },
  23598. "workspaceID": {
  23599. "type": "string",
  23600. "pattern": "^wrk"
  23601. }
  23602. },
  23603. "required": ["directory"],
  23604. "additionalProperties": false
  23605. },
  23606. "PromptSource": {
  23607. "type": "object",
  23608. "properties": {
  23609. "start": {
  23610. "type": "number"
  23611. },
  23612. "end": {
  23613. "type": "number"
  23614. },
  23615. "text": {
  23616. "type": "string"
  23617. }
  23618. },
  23619. "required": ["start", "end", "text"],
  23620. "additionalProperties": false
  23621. },
  23622. "PromptFileAttachment": {
  23623. "type": "object",
  23624. "properties": {
  23625. "uri": {
  23626. "type": "string"
  23627. },
  23628. "mime": {
  23629. "type": "string"
  23630. },
  23631. "name": {
  23632. "type": "string"
  23633. },
  23634. "description": {
  23635. "type": "string"
  23636. },
  23637. "source": {
  23638. "$ref": "#/components/schemas/PromptSource"
  23639. }
  23640. },
  23641. "required": ["uri", "mime"],
  23642. "additionalProperties": false
  23643. },
  23644. "PromptAgentAttachment": {
  23645. "type": "object",
  23646. "properties": {
  23647. "name": {
  23648. "type": "string"
  23649. },
  23650. "source": {
  23651. "$ref": "#/components/schemas/PromptSource"
  23652. }
  23653. },
  23654. "required": ["name"],
  23655. "additionalProperties": false
  23656. },
  23657. "SessionErrorUnknown": {
  23658. "type": "object",
  23659. "properties": {
  23660. "type": {
  23661. "type": "string",
  23662. "enum": ["unknown"]
  23663. },
  23664. "message": {
  23665. "type": "string"
  23666. }
  23667. },
  23668. "required": ["type", "message"],
  23669. "additionalProperties": false
  23670. },
  23671. "ToolTextContent": {
  23672. "type": "object",
  23673. "properties": {
  23674. "type": {
  23675. "type": "string",
  23676. "enum": ["text"]
  23677. },
  23678. "text": {
  23679. "type": "string"
  23680. }
  23681. },
  23682. "required": ["type", "text"],
  23683. "additionalProperties": false
  23684. },
  23685. "ToolFileContent": {
  23686. "type": "object",
  23687. "properties": {
  23688. "type": {
  23689. "type": "string",
  23690. "enum": ["file"]
  23691. },
  23692. "uri": {
  23693. "type": "string"
  23694. },
  23695. "mime": {
  23696. "type": "string"
  23697. },
  23698. "name": {
  23699. "type": "string"
  23700. }
  23701. },
  23702. "required": ["type", "uri", "mime"],
  23703. "additionalProperties": false
  23704. },
  23705. "SessionNextRetry_error": {
  23706. "type": "object",
  23707. "properties": {
  23708. "message": {
  23709. "type": "string"
  23710. },
  23711. "statusCode": {
  23712. "type": "number"
  23713. },
  23714. "isRetryable": {
  23715. "type": "boolean"
  23716. },
  23717. "responseHeaders": {
  23718. "type": "object",
  23719. "additionalProperties": {
  23720. "type": "string"
  23721. }
  23722. },
  23723. "responseBody": {
  23724. "type": "string"
  23725. },
  23726. "metadata": {
  23727. "type": "object",
  23728. "additionalProperties": {
  23729. "type": "string"
  23730. }
  23731. }
  23732. },
  23733. "required": ["message", "isRetryable"],
  23734. "additionalProperties": false
  23735. },
  23736. "PermissionV2Source": {
  23737. "type": "object",
  23738. "properties": {
  23739. "type": {
  23740. "type": "string",
  23741. "enum": ["tool"]
  23742. },
  23743. "messageID": {
  23744. "type": "string"
  23745. },
  23746. "callID": {
  23747. "type": "string"
  23748. }
  23749. },
  23750. "required": ["type", "messageID", "callID"],
  23751. "additionalProperties": false
  23752. },
  23753. "PermissionV2Reply": {
  23754. "type": "string",
  23755. "enum": ["once", "always", "reject"]
  23756. },
  23757. "QuestionV2Option": {
  23758. "type": "object",
  23759. "properties": {
  23760. "label": {
  23761. "type": "string",
  23762. "description": "Display text (1-5 words, concise)"
  23763. },
  23764. "description": {
  23765. "type": "string",
  23766. "description": "Explanation of choice"
  23767. }
  23768. },
  23769. "required": ["label", "description"],
  23770. "additionalProperties": false
  23771. },
  23772. "QuestionV2Info": {
  23773. "type": "object",
  23774. "properties": {
  23775. "question": {
  23776. "type": "string",
  23777. "description": "Complete question"
  23778. },
  23779. "header": {
  23780. "type": "string",
  23781. "description": "Very short label (max 30 chars)"
  23782. },
  23783. "options": {
  23784. "type": "array",
  23785. "items": {
  23786. "$ref": "#/components/schemas/QuestionV2Option"
  23787. },
  23788. "description": "Available choices"
  23789. },
  23790. "multiple": {
  23791. "type": "boolean"
  23792. },
  23793. "custom": {
  23794. "type": "boolean"
  23795. }
  23796. },
  23797. "required": ["question", "header", "options"],
  23798. "additionalProperties": false
  23799. },
  23800. "QuestionV2Tool": {
  23801. "type": "object",
  23802. "properties": {
  23803. "messageID": {
  23804. "type": "string"
  23805. },
  23806. "callID": {
  23807. "type": "string"
  23808. }
  23809. },
  23810. "required": ["messageID", "callID"],
  23811. "additionalProperties": false
  23812. },
  23813. "QuestionV2Answer": {
  23814. "type": "array",
  23815. "items": {
  23816. "type": "string"
  23817. }
  23818. },
  23819. "EventServerInstanceDisposed": {
  23820. "type": "object",
  23821. "properties": {
  23822. "id": {
  23823. "type": "string"
  23824. },
  23825. "type": {
  23826. "type": "string",
  23827. "enum": ["server.instance.disposed"]
  23828. },
  23829. "properties": {
  23830. "type": "object",
  23831. "properties": {
  23832. "directory": {
  23833. "type": "string"
  23834. }
  23835. },
  23836. "required": ["directory"],
  23837. "additionalProperties": false
  23838. }
  23839. },
  23840. "required": ["id", "type", "properties"],
  23841. "additionalProperties": false
  23842. },
  23843. "SyncEventSessionCreated": {
  23844. "type": "object",
  23845. "properties": {
  23846. "type": {
  23847. "type": "string",
  23848. "enum": ["sync"]
  23849. },
  23850. "id": {
  23851. "type": "string",
  23852. "pattern": "^evt_"
  23853. },
  23854. "syncEvent": {
  23855. "type": "object",
  23856. "properties": {
  23857. "type": {
  23858. "type": "string",
  23859. "enum": ["session.created.1"]
  23860. },
  23861. "id": {
  23862. "type": "string",
  23863. "pattern": "^evt_"
  23864. },
  23865. "seq": {
  23866. "type": "number"
  23867. },
  23868. "aggregateID": {
  23869. "type": "string"
  23870. },
  23871. "data": {
  23872. "type": "object",
  23873. "properties": {
  23874. "sessionID": {
  23875. "type": "string",
  23876. "pattern": "^ses"
  23877. },
  23878. "info": {
  23879. "$ref": "#/components/schemas/Session"
  23880. }
  23881. },
  23882. "required": ["sessionID", "info"],
  23883. "additionalProperties": false
  23884. }
  23885. },
  23886. "required": ["type", "id", "seq", "aggregateID", "data"],
  23887. "additionalProperties": false
  23888. }
  23889. },
  23890. "required": ["type", "id", "syncEvent"],
  23891. "additionalProperties": false
  23892. },
  23893. "SyncEventSessionUpdated": {
  23894. "type": "object",
  23895. "properties": {
  23896. "type": {
  23897. "type": "string",
  23898. "enum": ["sync"]
  23899. },
  23900. "id": {
  23901. "type": "string",
  23902. "pattern": "^evt_"
  23903. },
  23904. "syncEvent": {
  23905. "type": "object",
  23906. "properties": {
  23907. "type": {
  23908. "type": "string",
  23909. "enum": ["session.updated.1"]
  23910. },
  23911. "id": {
  23912. "type": "string",
  23913. "pattern": "^evt_"
  23914. },
  23915. "seq": {
  23916. "type": "number"
  23917. },
  23918. "aggregateID": {
  23919. "type": "string"
  23920. },
  23921. "data": {
  23922. "type": "object",
  23923. "properties": {
  23924. "sessionID": {
  23925. "type": "string",
  23926. "pattern": "^ses"
  23927. },
  23928. "info": {
  23929. "$ref": "#/components/schemas/Session"
  23930. }
  23931. },
  23932. "required": ["sessionID", "info"],
  23933. "additionalProperties": false
  23934. }
  23935. },
  23936. "required": ["type", "id", "seq", "aggregateID", "data"],
  23937. "additionalProperties": false
  23938. }
  23939. },
  23940. "required": ["type", "id", "syncEvent"],
  23941. "additionalProperties": false
  23942. },
  23943. "SyncEventSessionDeleted": {
  23944. "type": "object",
  23945. "properties": {
  23946. "type": {
  23947. "type": "string",
  23948. "enum": ["sync"]
  23949. },
  23950. "id": {
  23951. "type": "string",
  23952. "pattern": "^evt_"
  23953. },
  23954. "syncEvent": {
  23955. "type": "object",
  23956. "properties": {
  23957. "type": {
  23958. "type": "string",
  23959. "enum": ["session.deleted.1"]
  23960. },
  23961. "id": {
  23962. "type": "string",
  23963. "pattern": "^evt_"
  23964. },
  23965. "seq": {
  23966. "type": "number"
  23967. },
  23968. "aggregateID": {
  23969. "type": "string"
  23970. },
  23971. "data": {
  23972. "type": "object",
  23973. "properties": {
  23974. "sessionID": {
  23975. "type": "string",
  23976. "pattern": "^ses"
  23977. },
  23978. "info": {
  23979. "$ref": "#/components/schemas/Session"
  23980. }
  23981. },
  23982. "required": ["sessionID", "info"],
  23983. "additionalProperties": false
  23984. }
  23985. },
  23986. "required": ["type", "id", "seq", "aggregateID", "data"],
  23987. "additionalProperties": false
  23988. }
  23989. },
  23990. "required": ["type", "id", "syncEvent"],
  23991. "additionalProperties": false
  23992. },
  23993. "SyncEventMessageUpdated": {
  23994. "type": "object",
  23995. "properties": {
  23996. "type": {
  23997. "type": "string",
  23998. "enum": ["sync"]
  23999. },
  24000. "id": {
  24001. "type": "string",
  24002. "pattern": "^evt_"
  24003. },
  24004. "syncEvent": {
  24005. "type": "object",
  24006. "properties": {
  24007. "type": {
  24008. "type": "string",
  24009. "enum": ["message.updated.1"]
  24010. },
  24011. "id": {
  24012. "type": "string",
  24013. "pattern": "^evt_"
  24014. },
  24015. "seq": {
  24016. "type": "number"
  24017. },
  24018. "aggregateID": {
  24019. "type": "string"
  24020. },
  24021. "data": {
  24022. "type": "object",
  24023. "properties": {
  24024. "sessionID": {
  24025. "type": "string",
  24026. "pattern": "^ses"
  24027. },
  24028. "info": {
  24029. "$ref": "#/components/schemas/Message"
  24030. }
  24031. },
  24032. "required": ["sessionID", "info"],
  24033. "additionalProperties": false
  24034. }
  24035. },
  24036. "required": ["type", "id", "seq", "aggregateID", "data"],
  24037. "additionalProperties": false
  24038. }
  24039. },
  24040. "required": ["type", "id", "syncEvent"],
  24041. "additionalProperties": false
  24042. },
  24043. "SyncEventMessageRemoved": {
  24044. "type": "object",
  24045. "properties": {
  24046. "type": {
  24047. "type": "string",
  24048. "enum": ["sync"]
  24049. },
  24050. "id": {
  24051. "type": "string",
  24052. "pattern": "^evt_"
  24053. },
  24054. "syncEvent": {
  24055. "type": "object",
  24056. "properties": {
  24057. "type": {
  24058. "type": "string",
  24059. "enum": ["message.removed.1"]
  24060. },
  24061. "id": {
  24062. "type": "string",
  24063. "pattern": "^evt_"
  24064. },
  24065. "seq": {
  24066. "type": "number"
  24067. },
  24068. "aggregateID": {
  24069. "type": "string"
  24070. },
  24071. "data": {
  24072. "type": "object",
  24073. "properties": {
  24074. "sessionID": {
  24075. "type": "string",
  24076. "pattern": "^ses"
  24077. },
  24078. "messageID": {
  24079. "type": "string",
  24080. "pattern": "^msg"
  24081. }
  24082. },
  24083. "required": ["sessionID", "messageID"],
  24084. "additionalProperties": false
  24085. }
  24086. },
  24087. "required": ["type", "id", "seq", "aggregateID", "data"],
  24088. "additionalProperties": false
  24089. }
  24090. },
  24091. "required": ["type", "id", "syncEvent"],
  24092. "additionalProperties": false
  24093. },
  24094. "SyncEventMessagePartUpdated": {
  24095. "type": "object",
  24096. "properties": {
  24097. "type": {
  24098. "type": "string",
  24099. "enum": ["sync"]
  24100. },
  24101. "id": {
  24102. "type": "string",
  24103. "pattern": "^evt_"
  24104. },
  24105. "syncEvent": {
  24106. "type": "object",
  24107. "properties": {
  24108. "type": {
  24109. "type": "string",
  24110. "enum": ["message.part.updated.1"]
  24111. },
  24112. "id": {
  24113. "type": "string",
  24114. "pattern": "^evt_"
  24115. },
  24116. "seq": {
  24117. "type": "number"
  24118. },
  24119. "aggregateID": {
  24120. "type": "string"
  24121. },
  24122. "data": {
  24123. "type": "object",
  24124. "properties": {
  24125. "sessionID": {
  24126. "type": "string",
  24127. "pattern": "^ses"
  24128. },
  24129. "part": {
  24130. "$ref": "#/components/schemas/Part"
  24131. },
  24132. "time": {
  24133. "type": "number"
  24134. }
  24135. },
  24136. "required": ["sessionID", "part", "time"],
  24137. "additionalProperties": false
  24138. }
  24139. },
  24140. "required": ["type", "id", "seq", "aggregateID", "data"],
  24141. "additionalProperties": false
  24142. }
  24143. },
  24144. "required": ["type", "id", "syncEvent"],
  24145. "additionalProperties": false
  24146. },
  24147. "SyncEventMessagePartRemoved": {
  24148. "type": "object",
  24149. "properties": {
  24150. "type": {
  24151. "type": "string",
  24152. "enum": ["sync"]
  24153. },
  24154. "id": {
  24155. "type": "string",
  24156. "pattern": "^evt_"
  24157. },
  24158. "syncEvent": {
  24159. "type": "object",
  24160. "properties": {
  24161. "type": {
  24162. "type": "string",
  24163. "enum": ["message.part.removed.1"]
  24164. },
  24165. "id": {
  24166. "type": "string",
  24167. "pattern": "^evt_"
  24168. },
  24169. "seq": {
  24170. "type": "number"
  24171. },
  24172. "aggregateID": {
  24173. "type": "string"
  24174. },
  24175. "data": {
  24176. "type": "object",
  24177. "properties": {
  24178. "sessionID": {
  24179. "type": "string",
  24180. "pattern": "^ses"
  24181. },
  24182. "messageID": {
  24183. "type": "string",
  24184. "pattern": "^msg"
  24185. },
  24186. "partID": {
  24187. "type": "string",
  24188. "pattern": "^prt"
  24189. }
  24190. },
  24191. "required": ["sessionID", "messageID", "partID"],
  24192. "additionalProperties": false
  24193. }
  24194. },
  24195. "required": ["type", "id", "seq", "aggregateID", "data"],
  24196. "additionalProperties": false
  24197. }
  24198. },
  24199. "required": ["type", "id", "syncEvent"],
  24200. "additionalProperties": false
  24201. },
  24202. "SyncEventSessionNextAgentSwitched": {
  24203. "type": "object",
  24204. "properties": {
  24205. "type": {
  24206. "type": "string",
  24207. "enum": ["sync"]
  24208. },
  24209. "id": {
  24210. "type": "string",
  24211. "pattern": "^evt_"
  24212. },
  24213. "syncEvent": {
  24214. "type": "object",
  24215. "properties": {
  24216. "type": {
  24217. "type": "string",
  24218. "enum": ["session.next.agent.switched.1"]
  24219. },
  24220. "id": {
  24221. "type": "string",
  24222. "pattern": "^evt_"
  24223. },
  24224. "seq": {
  24225. "type": "number"
  24226. },
  24227. "aggregateID": {
  24228. "type": "string"
  24229. },
  24230. "data": {
  24231. "type": "object",
  24232. "properties": {
  24233. "timestamp": {
  24234. "type": "number"
  24235. },
  24236. "sessionID": {
  24237. "type": "string",
  24238. "pattern": "^ses"
  24239. },
  24240. "messageID": {
  24241. "type": "string",
  24242. "pattern": "^msg_"
  24243. },
  24244. "agent": {
  24245. "type": "string"
  24246. }
  24247. },
  24248. "required": ["timestamp", "sessionID", "messageID", "agent"],
  24249. "additionalProperties": false
  24250. }
  24251. },
  24252. "required": ["type", "id", "seq", "aggregateID", "data"],
  24253. "additionalProperties": false
  24254. }
  24255. },
  24256. "required": ["type", "id", "syncEvent"],
  24257. "additionalProperties": false
  24258. },
  24259. "SyncEventSessionNextModelSwitched": {
  24260. "type": "object",
  24261. "properties": {
  24262. "type": {
  24263. "type": "string",
  24264. "enum": ["sync"]
  24265. },
  24266. "id": {
  24267. "type": "string",
  24268. "pattern": "^evt_"
  24269. },
  24270. "syncEvent": {
  24271. "type": "object",
  24272. "properties": {
  24273. "type": {
  24274. "type": "string",
  24275. "enum": ["session.next.model.switched.1"]
  24276. },
  24277. "id": {
  24278. "type": "string",
  24279. "pattern": "^evt_"
  24280. },
  24281. "seq": {
  24282. "type": "number"
  24283. },
  24284. "aggregateID": {
  24285. "type": "string"
  24286. },
  24287. "data": {
  24288. "type": "object",
  24289. "properties": {
  24290. "timestamp": {
  24291. "type": "number"
  24292. },
  24293. "sessionID": {
  24294. "type": "string",
  24295. "pattern": "^ses"
  24296. },
  24297. "messageID": {
  24298. "type": "string",
  24299. "pattern": "^msg_"
  24300. },
  24301. "model": {
  24302. "type": "object",
  24303. "properties": {
  24304. "id": {
  24305. "type": "string"
  24306. },
  24307. "providerID": {
  24308. "type": "string"
  24309. },
  24310. "variant": {
  24311. "type": "string"
  24312. }
  24313. },
  24314. "required": ["id", "providerID"],
  24315. "additionalProperties": false
  24316. }
  24317. },
  24318. "required": ["timestamp", "sessionID", "messageID", "model"],
  24319. "additionalProperties": false
  24320. }
  24321. },
  24322. "required": ["type", "id", "seq", "aggregateID", "data"],
  24323. "additionalProperties": false
  24324. }
  24325. },
  24326. "required": ["type", "id", "syncEvent"],
  24327. "additionalProperties": false
  24328. },
  24329. "SyncEventSessionNextMoved": {
  24330. "type": "object",
  24331. "properties": {
  24332. "type": {
  24333. "type": "string",
  24334. "enum": ["sync"]
  24335. },
  24336. "id": {
  24337. "type": "string",
  24338. "pattern": "^evt_"
  24339. },
  24340. "syncEvent": {
  24341. "type": "object",
  24342. "properties": {
  24343. "type": {
  24344. "type": "string",
  24345. "enum": ["session.next.moved.1"]
  24346. },
  24347. "id": {
  24348. "type": "string",
  24349. "pattern": "^evt_"
  24350. },
  24351. "seq": {
  24352. "type": "number"
  24353. },
  24354. "aggregateID": {
  24355. "type": "string"
  24356. },
  24357. "data": {
  24358. "type": "object",
  24359. "properties": {
  24360. "timestamp": {
  24361. "type": "number"
  24362. },
  24363. "sessionID": {
  24364. "type": "string",
  24365. "pattern": "^ses"
  24366. },
  24367. "location": {
  24368. "$ref": "#/components/schemas/LocationRef"
  24369. },
  24370. "subdirectory": {
  24371. "type": "string"
  24372. }
  24373. },
  24374. "required": ["timestamp", "sessionID", "location"],
  24375. "additionalProperties": false
  24376. }
  24377. },
  24378. "required": ["type", "id", "seq", "aggregateID", "data"],
  24379. "additionalProperties": false
  24380. }
  24381. },
  24382. "required": ["type", "id", "syncEvent"],
  24383. "additionalProperties": false
  24384. },
  24385. "SyncEventSessionNextPrompted": {
  24386. "type": "object",
  24387. "properties": {
  24388. "type": {
  24389. "type": "string",
  24390. "enum": ["sync"]
  24391. },
  24392. "id": {
  24393. "type": "string",
  24394. "pattern": "^evt_"
  24395. },
  24396. "syncEvent": {
  24397. "type": "object",
  24398. "properties": {
  24399. "type": {
  24400. "type": "string",
  24401. "enum": ["session.next.prompted.1"]
  24402. },
  24403. "id": {
  24404. "type": "string",
  24405. "pattern": "^evt_"
  24406. },
  24407. "seq": {
  24408. "type": "number"
  24409. },
  24410. "aggregateID": {
  24411. "type": "string"
  24412. },
  24413. "data": {
  24414. "type": "object",
  24415. "properties": {
  24416. "timestamp": {
  24417. "type": "number"
  24418. },
  24419. "sessionID": {
  24420. "type": "string",
  24421. "pattern": "^ses"
  24422. },
  24423. "messageID": {
  24424. "type": "string",
  24425. "pattern": "^msg_"
  24426. },
  24427. "prompt": {
  24428. "$ref": "#/components/schemas/Prompt"
  24429. },
  24430. "delivery": {
  24431. "type": "string",
  24432. "enum": ["steer", "queue"]
  24433. }
  24434. },
  24435. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  24436. "additionalProperties": false
  24437. }
  24438. },
  24439. "required": ["type", "id", "seq", "aggregateID", "data"],
  24440. "additionalProperties": false
  24441. }
  24442. },
  24443. "required": ["type", "id", "syncEvent"],
  24444. "additionalProperties": false
  24445. },
  24446. "SyncEventSessionNextPromptAdmitted": {
  24447. "type": "object",
  24448. "properties": {
  24449. "type": {
  24450. "type": "string",
  24451. "enum": ["sync"]
  24452. },
  24453. "id": {
  24454. "type": "string",
  24455. "pattern": "^evt_"
  24456. },
  24457. "syncEvent": {
  24458. "type": "object",
  24459. "properties": {
  24460. "type": {
  24461. "type": "string",
  24462. "enum": ["session.next.prompt.admitted.1"]
  24463. },
  24464. "id": {
  24465. "type": "string",
  24466. "pattern": "^evt_"
  24467. },
  24468. "seq": {
  24469. "type": "number"
  24470. },
  24471. "aggregateID": {
  24472. "type": "string"
  24473. },
  24474. "data": {
  24475. "type": "object",
  24476. "properties": {
  24477. "timestamp": {
  24478. "type": "number"
  24479. },
  24480. "sessionID": {
  24481. "type": "string",
  24482. "pattern": "^ses"
  24483. },
  24484. "messageID": {
  24485. "type": "string",
  24486. "pattern": "^msg_"
  24487. },
  24488. "prompt": {
  24489. "$ref": "#/components/schemas/Prompt"
  24490. },
  24491. "delivery": {
  24492. "type": "string",
  24493. "enum": ["steer", "queue"]
  24494. }
  24495. },
  24496. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  24497. "additionalProperties": false
  24498. }
  24499. },
  24500. "required": ["type", "id", "seq", "aggregateID", "data"],
  24501. "additionalProperties": false
  24502. }
  24503. },
  24504. "required": ["type", "id", "syncEvent"],
  24505. "additionalProperties": false
  24506. },
  24507. "SyncEventSessionNextPromptPromoted": {
  24508. "type": "object",
  24509. "properties": {
  24510. "type": {
  24511. "type": "string",
  24512. "enum": ["sync"]
  24513. },
  24514. "id": {
  24515. "type": "string",
  24516. "pattern": "^evt_"
  24517. },
  24518. "syncEvent": {
  24519. "type": "object",
  24520. "properties": {
  24521. "type": {
  24522. "type": "string",
  24523. "enum": ["session.next.prompt.promoted.1"]
  24524. },
  24525. "id": {
  24526. "type": "string",
  24527. "pattern": "^evt_"
  24528. },
  24529. "seq": {
  24530. "type": "number"
  24531. },
  24532. "aggregateID": {
  24533. "type": "string"
  24534. },
  24535. "data": {
  24536. "type": "object",
  24537. "properties": {
  24538. "timestamp": {
  24539. "type": "number"
  24540. },
  24541. "sessionID": {
  24542. "type": "string",
  24543. "pattern": "^ses"
  24544. },
  24545. "messageID": {
  24546. "type": "string",
  24547. "pattern": "^msg_"
  24548. },
  24549. "prompt": {
  24550. "$ref": "#/components/schemas/Prompt"
  24551. },
  24552. "timeCreated": {
  24553. "type": "number"
  24554. }
  24555. },
  24556. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  24557. "additionalProperties": false
  24558. }
  24559. },
  24560. "required": ["type", "id", "seq", "aggregateID", "data"],
  24561. "additionalProperties": false
  24562. }
  24563. },
  24564. "required": ["type", "id", "syncEvent"],
  24565. "additionalProperties": false
  24566. },
  24567. "SyncEventSessionNextInterruptRequested": {
  24568. "type": "object",
  24569. "properties": {
  24570. "type": {
  24571. "type": "string",
  24572. "enum": ["sync"]
  24573. },
  24574. "id": {
  24575. "type": "string",
  24576. "pattern": "^evt_"
  24577. },
  24578. "syncEvent": {
  24579. "type": "object",
  24580. "properties": {
  24581. "type": {
  24582. "type": "string",
  24583. "enum": ["session.next.interrupt.requested.1"]
  24584. },
  24585. "id": {
  24586. "type": "string",
  24587. "pattern": "^evt_"
  24588. },
  24589. "seq": {
  24590. "type": "number"
  24591. },
  24592. "aggregateID": {
  24593. "type": "string"
  24594. },
  24595. "data": {
  24596. "type": "object",
  24597. "properties": {
  24598. "timestamp": {
  24599. "type": "number"
  24600. },
  24601. "sessionID": {
  24602. "type": "string",
  24603. "pattern": "^ses"
  24604. }
  24605. },
  24606. "required": ["timestamp", "sessionID"],
  24607. "additionalProperties": false
  24608. }
  24609. },
  24610. "required": ["type", "id", "seq", "aggregateID", "data"],
  24611. "additionalProperties": false
  24612. }
  24613. },
  24614. "required": ["type", "id", "syncEvent"],
  24615. "additionalProperties": false
  24616. },
  24617. "SyncEventSessionNextContextUpdated": {
  24618. "type": "object",
  24619. "properties": {
  24620. "type": {
  24621. "type": "string",
  24622. "enum": ["sync"]
  24623. },
  24624. "id": {
  24625. "type": "string",
  24626. "pattern": "^evt_"
  24627. },
  24628. "syncEvent": {
  24629. "type": "object",
  24630. "properties": {
  24631. "type": {
  24632. "type": "string",
  24633. "enum": ["session.next.context.updated.1"]
  24634. },
  24635. "id": {
  24636. "type": "string",
  24637. "pattern": "^evt_"
  24638. },
  24639. "seq": {
  24640. "type": "number"
  24641. },
  24642. "aggregateID": {
  24643. "type": "string"
  24644. },
  24645. "data": {
  24646. "type": "object",
  24647. "properties": {
  24648. "timestamp": {
  24649. "type": "number"
  24650. },
  24651. "sessionID": {
  24652. "type": "string",
  24653. "pattern": "^ses"
  24654. },
  24655. "messageID": {
  24656. "type": "string",
  24657. "pattern": "^msg_"
  24658. },
  24659. "text": {
  24660. "type": "string"
  24661. }
  24662. },
  24663. "required": ["timestamp", "sessionID", "messageID", "text"],
  24664. "additionalProperties": false
  24665. }
  24666. },
  24667. "required": ["type", "id", "seq", "aggregateID", "data"],
  24668. "additionalProperties": false
  24669. }
  24670. },
  24671. "required": ["type", "id", "syncEvent"],
  24672. "additionalProperties": false
  24673. },
  24674. "SyncEventSessionNextSynthetic": {
  24675. "type": "object",
  24676. "properties": {
  24677. "type": {
  24678. "type": "string",
  24679. "enum": ["sync"]
  24680. },
  24681. "id": {
  24682. "type": "string",
  24683. "pattern": "^evt_"
  24684. },
  24685. "syncEvent": {
  24686. "type": "object",
  24687. "properties": {
  24688. "type": {
  24689. "type": "string",
  24690. "enum": ["session.next.synthetic.1"]
  24691. },
  24692. "id": {
  24693. "type": "string",
  24694. "pattern": "^evt_"
  24695. },
  24696. "seq": {
  24697. "type": "number"
  24698. },
  24699. "aggregateID": {
  24700. "type": "string"
  24701. },
  24702. "data": {
  24703. "type": "object",
  24704. "properties": {
  24705. "timestamp": {
  24706. "type": "number"
  24707. },
  24708. "sessionID": {
  24709. "type": "string",
  24710. "pattern": "^ses"
  24711. },
  24712. "messageID": {
  24713. "type": "string",
  24714. "pattern": "^msg_"
  24715. },
  24716. "text": {
  24717. "type": "string"
  24718. }
  24719. },
  24720. "required": ["timestamp", "sessionID", "messageID", "text"],
  24721. "additionalProperties": false
  24722. }
  24723. },
  24724. "required": ["type", "id", "seq", "aggregateID", "data"],
  24725. "additionalProperties": false
  24726. }
  24727. },
  24728. "required": ["type", "id", "syncEvent"],
  24729. "additionalProperties": false
  24730. },
  24731. "SyncEventSessionNextShellStarted": {
  24732. "type": "object",
  24733. "properties": {
  24734. "type": {
  24735. "type": "string",
  24736. "enum": ["sync"]
  24737. },
  24738. "id": {
  24739. "type": "string",
  24740. "pattern": "^evt_"
  24741. },
  24742. "syncEvent": {
  24743. "type": "object",
  24744. "properties": {
  24745. "type": {
  24746. "type": "string",
  24747. "enum": ["session.next.shell.started.1"]
  24748. },
  24749. "id": {
  24750. "type": "string",
  24751. "pattern": "^evt_"
  24752. },
  24753. "seq": {
  24754. "type": "number"
  24755. },
  24756. "aggregateID": {
  24757. "type": "string"
  24758. },
  24759. "data": {
  24760. "type": "object",
  24761. "properties": {
  24762. "timestamp": {
  24763. "type": "number"
  24764. },
  24765. "sessionID": {
  24766. "type": "string",
  24767. "pattern": "^ses"
  24768. },
  24769. "messageID": {
  24770. "type": "string",
  24771. "pattern": "^msg_"
  24772. },
  24773. "callID": {
  24774. "type": "string"
  24775. },
  24776. "command": {
  24777. "type": "string"
  24778. }
  24779. },
  24780. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  24781. "additionalProperties": false
  24782. }
  24783. },
  24784. "required": ["type", "id", "seq", "aggregateID", "data"],
  24785. "additionalProperties": false
  24786. }
  24787. },
  24788. "required": ["type", "id", "syncEvent"],
  24789. "additionalProperties": false
  24790. },
  24791. "SyncEventSessionNextShellEnded": {
  24792. "type": "object",
  24793. "properties": {
  24794. "type": {
  24795. "type": "string",
  24796. "enum": ["sync"]
  24797. },
  24798. "id": {
  24799. "type": "string",
  24800. "pattern": "^evt_"
  24801. },
  24802. "syncEvent": {
  24803. "type": "object",
  24804. "properties": {
  24805. "type": {
  24806. "type": "string",
  24807. "enum": ["session.next.shell.ended.1"]
  24808. },
  24809. "id": {
  24810. "type": "string",
  24811. "pattern": "^evt_"
  24812. },
  24813. "seq": {
  24814. "type": "number"
  24815. },
  24816. "aggregateID": {
  24817. "type": "string"
  24818. },
  24819. "data": {
  24820. "type": "object",
  24821. "properties": {
  24822. "timestamp": {
  24823. "type": "number"
  24824. },
  24825. "sessionID": {
  24826. "type": "string",
  24827. "pattern": "^ses"
  24828. },
  24829. "callID": {
  24830. "type": "string"
  24831. },
  24832. "output": {
  24833. "type": "string"
  24834. }
  24835. },
  24836. "required": ["timestamp", "sessionID", "callID", "output"],
  24837. "additionalProperties": false
  24838. }
  24839. },
  24840. "required": ["type", "id", "seq", "aggregateID", "data"],
  24841. "additionalProperties": false
  24842. }
  24843. },
  24844. "required": ["type", "id", "syncEvent"],
  24845. "additionalProperties": false
  24846. },
  24847. "SyncEventSessionNextStepStarted": {
  24848. "type": "object",
  24849. "properties": {
  24850. "type": {
  24851. "type": "string",
  24852. "enum": ["sync"]
  24853. },
  24854. "id": {
  24855. "type": "string",
  24856. "pattern": "^evt_"
  24857. },
  24858. "syncEvent": {
  24859. "type": "object",
  24860. "properties": {
  24861. "type": {
  24862. "type": "string",
  24863. "enum": ["session.next.step.started.1"]
  24864. },
  24865. "id": {
  24866. "type": "string",
  24867. "pattern": "^evt_"
  24868. },
  24869. "seq": {
  24870. "type": "number"
  24871. },
  24872. "aggregateID": {
  24873. "type": "string"
  24874. },
  24875. "data": {
  24876. "type": "object",
  24877. "properties": {
  24878. "timestamp": {
  24879. "type": "number"
  24880. },
  24881. "sessionID": {
  24882. "type": "string",
  24883. "pattern": "^ses"
  24884. },
  24885. "assistantMessageID": {
  24886. "type": "string",
  24887. "pattern": "^msg_"
  24888. },
  24889. "agent": {
  24890. "type": "string"
  24891. },
  24892. "model": {
  24893. "type": "object",
  24894. "properties": {
  24895. "id": {
  24896. "type": "string"
  24897. },
  24898. "providerID": {
  24899. "type": "string"
  24900. },
  24901. "variant": {
  24902. "type": "string"
  24903. }
  24904. },
  24905. "required": ["id", "providerID"],
  24906. "additionalProperties": false
  24907. },
  24908. "snapshot": {
  24909. "type": "string"
  24910. }
  24911. },
  24912. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  24913. "additionalProperties": false
  24914. }
  24915. },
  24916. "required": ["type", "id", "seq", "aggregateID", "data"],
  24917. "additionalProperties": false
  24918. }
  24919. },
  24920. "required": ["type", "id", "syncEvent"],
  24921. "additionalProperties": false
  24922. },
  24923. "SyncEventSessionNextStepEnded": {
  24924. "type": "object",
  24925. "properties": {
  24926. "type": {
  24927. "type": "string",
  24928. "enum": ["sync"]
  24929. },
  24930. "id": {
  24931. "type": "string",
  24932. "pattern": "^evt_"
  24933. },
  24934. "syncEvent": {
  24935. "type": "object",
  24936. "properties": {
  24937. "type": {
  24938. "type": "string",
  24939. "enum": ["session.next.step.ended.2"]
  24940. },
  24941. "id": {
  24942. "type": "string",
  24943. "pattern": "^evt_"
  24944. },
  24945. "seq": {
  24946. "type": "number"
  24947. },
  24948. "aggregateID": {
  24949. "type": "string"
  24950. },
  24951. "data": {
  24952. "type": "object",
  24953. "properties": {
  24954. "timestamp": {
  24955. "type": "number"
  24956. },
  24957. "sessionID": {
  24958. "type": "string",
  24959. "pattern": "^ses"
  24960. },
  24961. "assistantMessageID": {
  24962. "type": "string",
  24963. "pattern": "^msg_"
  24964. },
  24965. "finish": {
  24966. "type": "string"
  24967. },
  24968. "cost": {
  24969. "type": "number"
  24970. },
  24971. "tokens": {
  24972. "type": "object",
  24973. "properties": {
  24974. "input": {
  24975. "type": "number"
  24976. },
  24977. "output": {
  24978. "type": "number"
  24979. },
  24980. "reasoning": {
  24981. "type": "number"
  24982. },
  24983. "cache": {
  24984. "type": "object",
  24985. "properties": {
  24986. "read": {
  24987. "type": "number"
  24988. },
  24989. "write": {
  24990. "type": "number"
  24991. }
  24992. },
  24993. "required": ["read", "write"],
  24994. "additionalProperties": false
  24995. }
  24996. },
  24997. "required": ["input", "output", "reasoning", "cache"],
  24998. "additionalProperties": false
  24999. },
  25000. "snapshot": {
  25001. "type": "string"
  25002. }
  25003. },
  25004. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  25005. "additionalProperties": false
  25006. }
  25007. },
  25008. "required": ["type", "id", "seq", "aggregateID", "data"],
  25009. "additionalProperties": false
  25010. }
  25011. },
  25012. "required": ["type", "id", "syncEvent"],
  25013. "additionalProperties": false
  25014. },
  25015. "SyncEventSessionNextStepFailed": {
  25016. "type": "object",
  25017. "properties": {
  25018. "type": {
  25019. "type": "string",
  25020. "enum": ["sync"]
  25021. },
  25022. "id": {
  25023. "type": "string",
  25024. "pattern": "^evt_"
  25025. },
  25026. "syncEvent": {
  25027. "type": "object",
  25028. "properties": {
  25029. "type": {
  25030. "type": "string",
  25031. "enum": ["session.next.step.failed.2"]
  25032. },
  25033. "id": {
  25034. "type": "string",
  25035. "pattern": "^evt_"
  25036. },
  25037. "seq": {
  25038. "type": "number"
  25039. },
  25040. "aggregateID": {
  25041. "type": "string"
  25042. },
  25043. "data": {
  25044. "type": "object",
  25045. "properties": {
  25046. "timestamp": {
  25047. "type": "number"
  25048. },
  25049. "sessionID": {
  25050. "type": "string",
  25051. "pattern": "^ses"
  25052. },
  25053. "assistantMessageID": {
  25054. "type": "string",
  25055. "pattern": "^msg_"
  25056. },
  25057. "error": {
  25058. "$ref": "#/components/schemas/SessionErrorUnknown"
  25059. }
  25060. },
  25061. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  25062. "additionalProperties": false
  25063. }
  25064. },
  25065. "required": ["type", "id", "seq", "aggregateID", "data"],
  25066. "additionalProperties": false
  25067. }
  25068. },
  25069. "required": ["type", "id", "syncEvent"],
  25070. "additionalProperties": false
  25071. },
  25072. "SyncEventSessionNextTextStarted": {
  25073. "type": "object",
  25074. "properties": {
  25075. "type": {
  25076. "type": "string",
  25077. "enum": ["sync"]
  25078. },
  25079. "id": {
  25080. "type": "string",
  25081. "pattern": "^evt_"
  25082. },
  25083. "syncEvent": {
  25084. "type": "object",
  25085. "properties": {
  25086. "type": {
  25087. "type": "string",
  25088. "enum": ["session.next.text.started.1"]
  25089. },
  25090. "id": {
  25091. "type": "string",
  25092. "pattern": "^evt_"
  25093. },
  25094. "seq": {
  25095. "type": "number"
  25096. },
  25097. "aggregateID": {
  25098. "type": "string"
  25099. },
  25100. "data": {
  25101. "type": "object",
  25102. "properties": {
  25103. "timestamp": {
  25104. "type": "number"
  25105. },
  25106. "sessionID": {
  25107. "type": "string",
  25108. "pattern": "^ses"
  25109. },
  25110. "assistantMessageID": {
  25111. "type": "string",
  25112. "pattern": "^msg_"
  25113. },
  25114. "textID": {
  25115. "type": "string"
  25116. }
  25117. },
  25118. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  25119. "additionalProperties": false
  25120. }
  25121. },
  25122. "required": ["type", "id", "seq", "aggregateID", "data"],
  25123. "additionalProperties": false
  25124. }
  25125. },
  25126. "required": ["type", "id", "syncEvent"],
  25127. "additionalProperties": false
  25128. },
  25129. "SyncEventSessionNextTextEnded": {
  25130. "type": "object",
  25131. "properties": {
  25132. "type": {
  25133. "type": "string",
  25134. "enum": ["sync"]
  25135. },
  25136. "id": {
  25137. "type": "string",
  25138. "pattern": "^evt_"
  25139. },
  25140. "syncEvent": {
  25141. "type": "object",
  25142. "properties": {
  25143. "type": {
  25144. "type": "string",
  25145. "enum": ["session.next.text.ended.1"]
  25146. },
  25147. "id": {
  25148. "type": "string",
  25149. "pattern": "^evt_"
  25150. },
  25151. "seq": {
  25152. "type": "number"
  25153. },
  25154. "aggregateID": {
  25155. "type": "string"
  25156. },
  25157. "data": {
  25158. "type": "object",
  25159. "properties": {
  25160. "timestamp": {
  25161. "type": "number"
  25162. },
  25163. "sessionID": {
  25164. "type": "string",
  25165. "pattern": "^ses"
  25166. },
  25167. "assistantMessageID": {
  25168. "type": "string",
  25169. "pattern": "^msg_"
  25170. },
  25171. "textID": {
  25172. "type": "string"
  25173. },
  25174. "text": {
  25175. "type": "string"
  25176. }
  25177. },
  25178. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  25179. "additionalProperties": false
  25180. }
  25181. },
  25182. "required": ["type", "id", "seq", "aggregateID", "data"],
  25183. "additionalProperties": false
  25184. }
  25185. },
  25186. "required": ["type", "id", "syncEvent"],
  25187. "additionalProperties": false
  25188. },
  25189. "SyncEventSessionNextReasoningStarted": {
  25190. "type": "object",
  25191. "properties": {
  25192. "type": {
  25193. "type": "string",
  25194. "enum": ["sync"]
  25195. },
  25196. "id": {
  25197. "type": "string",
  25198. "pattern": "^evt_"
  25199. },
  25200. "syncEvent": {
  25201. "type": "object",
  25202. "properties": {
  25203. "type": {
  25204. "type": "string",
  25205. "enum": ["session.next.reasoning.started.1"]
  25206. },
  25207. "id": {
  25208. "type": "string",
  25209. "pattern": "^evt_"
  25210. },
  25211. "seq": {
  25212. "type": "number"
  25213. },
  25214. "aggregateID": {
  25215. "type": "string"
  25216. },
  25217. "data": {
  25218. "type": "object",
  25219. "properties": {
  25220. "timestamp": {
  25221. "type": "number"
  25222. },
  25223. "sessionID": {
  25224. "type": "string",
  25225. "pattern": "^ses"
  25226. },
  25227. "assistantMessageID": {
  25228. "type": "string",
  25229. "pattern": "^msg_"
  25230. },
  25231. "reasoningID": {
  25232. "type": "string"
  25233. },
  25234. "providerMetadata": {
  25235. "type": "object",
  25236. "additionalProperties": {
  25237. "type": "object"
  25238. }
  25239. }
  25240. },
  25241. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  25242. "additionalProperties": false
  25243. }
  25244. },
  25245. "required": ["type", "id", "seq", "aggregateID", "data"],
  25246. "additionalProperties": false
  25247. }
  25248. },
  25249. "required": ["type", "id", "syncEvent"],
  25250. "additionalProperties": false
  25251. },
  25252. "SyncEventSessionNextReasoningEnded": {
  25253. "type": "object",
  25254. "properties": {
  25255. "type": {
  25256. "type": "string",
  25257. "enum": ["sync"]
  25258. },
  25259. "id": {
  25260. "type": "string",
  25261. "pattern": "^evt_"
  25262. },
  25263. "syncEvent": {
  25264. "type": "object",
  25265. "properties": {
  25266. "type": {
  25267. "type": "string",
  25268. "enum": ["session.next.reasoning.ended.1"]
  25269. },
  25270. "id": {
  25271. "type": "string",
  25272. "pattern": "^evt_"
  25273. },
  25274. "seq": {
  25275. "type": "number"
  25276. },
  25277. "aggregateID": {
  25278. "type": "string"
  25279. },
  25280. "data": {
  25281. "type": "object",
  25282. "properties": {
  25283. "timestamp": {
  25284. "type": "number"
  25285. },
  25286. "sessionID": {
  25287. "type": "string",
  25288. "pattern": "^ses"
  25289. },
  25290. "assistantMessageID": {
  25291. "type": "string",
  25292. "pattern": "^msg_"
  25293. },
  25294. "reasoningID": {
  25295. "type": "string"
  25296. },
  25297. "text": {
  25298. "type": "string"
  25299. },
  25300. "providerMetadata": {
  25301. "type": "object",
  25302. "additionalProperties": {
  25303. "type": "object"
  25304. }
  25305. }
  25306. },
  25307. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  25308. "additionalProperties": false
  25309. }
  25310. },
  25311. "required": ["type", "id", "seq", "aggregateID", "data"],
  25312. "additionalProperties": false
  25313. }
  25314. },
  25315. "required": ["type", "id", "syncEvent"],
  25316. "additionalProperties": false
  25317. },
  25318. "SyncEventSessionNextToolInputStarted": {
  25319. "type": "object",
  25320. "properties": {
  25321. "type": {
  25322. "type": "string",
  25323. "enum": ["sync"]
  25324. },
  25325. "id": {
  25326. "type": "string",
  25327. "pattern": "^evt_"
  25328. },
  25329. "syncEvent": {
  25330. "type": "object",
  25331. "properties": {
  25332. "type": {
  25333. "type": "string",
  25334. "enum": ["session.next.tool.input.started.1"]
  25335. },
  25336. "id": {
  25337. "type": "string",
  25338. "pattern": "^evt_"
  25339. },
  25340. "seq": {
  25341. "type": "number"
  25342. },
  25343. "aggregateID": {
  25344. "type": "string"
  25345. },
  25346. "data": {
  25347. "type": "object",
  25348. "properties": {
  25349. "timestamp": {
  25350. "type": "number"
  25351. },
  25352. "sessionID": {
  25353. "type": "string",
  25354. "pattern": "^ses"
  25355. },
  25356. "assistantMessageID": {
  25357. "type": "string",
  25358. "pattern": "^msg_"
  25359. },
  25360. "callID": {
  25361. "type": "string"
  25362. },
  25363. "name": {
  25364. "type": "string"
  25365. }
  25366. },
  25367. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  25368. "additionalProperties": false
  25369. }
  25370. },
  25371. "required": ["type", "id", "seq", "aggregateID", "data"],
  25372. "additionalProperties": false
  25373. }
  25374. },
  25375. "required": ["type", "id", "syncEvent"],
  25376. "additionalProperties": false
  25377. },
  25378. "SyncEventSessionNextToolInputEnded": {
  25379. "type": "object",
  25380. "properties": {
  25381. "type": {
  25382. "type": "string",
  25383. "enum": ["sync"]
  25384. },
  25385. "id": {
  25386. "type": "string",
  25387. "pattern": "^evt_"
  25388. },
  25389. "syncEvent": {
  25390. "type": "object",
  25391. "properties": {
  25392. "type": {
  25393. "type": "string",
  25394. "enum": ["session.next.tool.input.ended.1"]
  25395. },
  25396. "id": {
  25397. "type": "string",
  25398. "pattern": "^evt_"
  25399. },
  25400. "seq": {
  25401. "type": "number"
  25402. },
  25403. "aggregateID": {
  25404. "type": "string"
  25405. },
  25406. "data": {
  25407. "type": "object",
  25408. "properties": {
  25409. "timestamp": {
  25410. "type": "number"
  25411. },
  25412. "sessionID": {
  25413. "type": "string",
  25414. "pattern": "^ses"
  25415. },
  25416. "assistantMessageID": {
  25417. "type": "string",
  25418. "pattern": "^msg_"
  25419. },
  25420. "callID": {
  25421. "type": "string"
  25422. },
  25423. "text": {
  25424. "type": "string"
  25425. }
  25426. },
  25427. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  25428. "additionalProperties": false
  25429. }
  25430. },
  25431. "required": ["type", "id", "seq", "aggregateID", "data"],
  25432. "additionalProperties": false
  25433. }
  25434. },
  25435. "required": ["type", "id", "syncEvent"],
  25436. "additionalProperties": false
  25437. },
  25438. "SyncEventSessionNextToolCalled": {
  25439. "type": "object",
  25440. "properties": {
  25441. "type": {
  25442. "type": "string",
  25443. "enum": ["sync"]
  25444. },
  25445. "id": {
  25446. "type": "string",
  25447. "pattern": "^evt_"
  25448. },
  25449. "syncEvent": {
  25450. "type": "object",
  25451. "properties": {
  25452. "type": {
  25453. "type": "string",
  25454. "enum": ["session.next.tool.called.1"]
  25455. },
  25456. "id": {
  25457. "type": "string",
  25458. "pattern": "^evt_"
  25459. },
  25460. "seq": {
  25461. "type": "number"
  25462. },
  25463. "aggregateID": {
  25464. "type": "string"
  25465. },
  25466. "data": {
  25467. "type": "object",
  25468. "properties": {
  25469. "timestamp": {
  25470. "type": "number"
  25471. },
  25472. "sessionID": {
  25473. "type": "string",
  25474. "pattern": "^ses"
  25475. },
  25476. "assistantMessageID": {
  25477. "type": "string",
  25478. "pattern": "^msg_"
  25479. },
  25480. "callID": {
  25481. "type": "string"
  25482. },
  25483. "tool": {
  25484. "type": "string"
  25485. },
  25486. "input": {
  25487. "type": "object"
  25488. },
  25489. "provider": {
  25490. "type": "object",
  25491. "properties": {
  25492. "executed": {
  25493. "type": "boolean"
  25494. },
  25495. "metadata": {
  25496. "type": "object",
  25497. "additionalProperties": {
  25498. "type": "object"
  25499. }
  25500. }
  25501. },
  25502. "required": ["executed"],
  25503. "additionalProperties": false
  25504. }
  25505. },
  25506. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  25507. "additionalProperties": false
  25508. }
  25509. },
  25510. "required": ["type", "id", "seq", "aggregateID", "data"],
  25511. "additionalProperties": false
  25512. }
  25513. },
  25514. "required": ["type", "id", "syncEvent"],
  25515. "additionalProperties": false
  25516. },
  25517. "SyncEventSessionNextToolProgress": {
  25518. "type": "object",
  25519. "properties": {
  25520. "type": {
  25521. "type": "string",
  25522. "enum": ["sync"]
  25523. },
  25524. "id": {
  25525. "type": "string",
  25526. "pattern": "^evt_"
  25527. },
  25528. "syncEvent": {
  25529. "type": "object",
  25530. "properties": {
  25531. "type": {
  25532. "type": "string",
  25533. "enum": ["session.next.tool.progress.1"]
  25534. },
  25535. "id": {
  25536. "type": "string",
  25537. "pattern": "^evt_"
  25538. },
  25539. "seq": {
  25540. "type": "number"
  25541. },
  25542. "aggregateID": {
  25543. "type": "string"
  25544. },
  25545. "data": {
  25546. "type": "object",
  25547. "properties": {
  25548. "timestamp": {
  25549. "type": "number"
  25550. },
  25551. "sessionID": {
  25552. "type": "string",
  25553. "pattern": "^ses"
  25554. },
  25555. "assistantMessageID": {
  25556. "type": "string",
  25557. "pattern": "^msg_"
  25558. },
  25559. "callID": {
  25560. "type": "string"
  25561. },
  25562. "structured": {
  25563. "type": "object"
  25564. },
  25565. "content": {
  25566. "type": "array",
  25567. "items": {
  25568. "anyOf": [
  25569. {
  25570. "$ref": "#/components/schemas/ToolTextContent"
  25571. },
  25572. {
  25573. "$ref": "#/components/schemas/ToolFileContent"
  25574. }
  25575. ]
  25576. }
  25577. }
  25578. },
  25579. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  25580. "additionalProperties": false
  25581. }
  25582. },
  25583. "required": ["type", "id", "seq", "aggregateID", "data"],
  25584. "additionalProperties": false
  25585. }
  25586. },
  25587. "required": ["type", "id", "syncEvent"],
  25588. "additionalProperties": false
  25589. },
  25590. "SyncEventSessionNextToolSuccess": {
  25591. "type": "object",
  25592. "properties": {
  25593. "type": {
  25594. "type": "string",
  25595. "enum": ["sync"]
  25596. },
  25597. "id": {
  25598. "type": "string",
  25599. "pattern": "^evt_"
  25600. },
  25601. "syncEvent": {
  25602. "type": "object",
  25603. "properties": {
  25604. "type": {
  25605. "type": "string",
  25606. "enum": ["session.next.tool.success.1"]
  25607. },
  25608. "id": {
  25609. "type": "string",
  25610. "pattern": "^evt_"
  25611. },
  25612. "seq": {
  25613. "type": "number"
  25614. },
  25615. "aggregateID": {
  25616. "type": "string"
  25617. },
  25618. "data": {
  25619. "type": "object",
  25620. "properties": {
  25621. "timestamp": {
  25622. "type": "number"
  25623. },
  25624. "sessionID": {
  25625. "type": "string",
  25626. "pattern": "^ses"
  25627. },
  25628. "assistantMessageID": {
  25629. "type": "string",
  25630. "pattern": "^msg_"
  25631. },
  25632. "callID": {
  25633. "type": "string"
  25634. },
  25635. "structured": {
  25636. "type": "object"
  25637. },
  25638. "content": {
  25639. "type": "array",
  25640. "items": {
  25641. "anyOf": [
  25642. {
  25643. "$ref": "#/components/schemas/ToolTextContent"
  25644. },
  25645. {
  25646. "$ref": "#/components/schemas/ToolFileContent"
  25647. }
  25648. ]
  25649. }
  25650. },
  25651. "outputPaths": {
  25652. "type": "array",
  25653. "items": {
  25654. "type": "string"
  25655. }
  25656. },
  25657. "result": {},
  25658. "provider": {
  25659. "type": "object",
  25660. "properties": {
  25661. "executed": {
  25662. "type": "boolean"
  25663. },
  25664. "metadata": {
  25665. "type": "object",
  25666. "additionalProperties": {
  25667. "type": "object"
  25668. }
  25669. }
  25670. },
  25671. "required": ["executed"],
  25672. "additionalProperties": false
  25673. }
  25674. },
  25675. "required": [
  25676. "timestamp",
  25677. "sessionID",
  25678. "assistantMessageID",
  25679. "callID",
  25680. "structured",
  25681. "content",
  25682. "provider"
  25683. ],
  25684. "additionalProperties": false
  25685. }
  25686. },
  25687. "required": ["type", "id", "seq", "aggregateID", "data"],
  25688. "additionalProperties": false
  25689. }
  25690. },
  25691. "required": ["type", "id", "syncEvent"],
  25692. "additionalProperties": false
  25693. },
  25694. "SyncEventSessionNextToolFailed": {
  25695. "type": "object",
  25696. "properties": {
  25697. "type": {
  25698. "type": "string",
  25699. "enum": ["sync"]
  25700. },
  25701. "id": {
  25702. "type": "string",
  25703. "pattern": "^evt_"
  25704. },
  25705. "syncEvent": {
  25706. "type": "object",
  25707. "properties": {
  25708. "type": {
  25709. "type": "string",
  25710. "enum": ["session.next.tool.failed.1"]
  25711. },
  25712. "id": {
  25713. "type": "string",
  25714. "pattern": "^evt_"
  25715. },
  25716. "seq": {
  25717. "type": "number"
  25718. },
  25719. "aggregateID": {
  25720. "type": "string"
  25721. },
  25722. "data": {
  25723. "type": "object",
  25724. "properties": {
  25725. "timestamp": {
  25726. "type": "number"
  25727. },
  25728. "sessionID": {
  25729. "type": "string",
  25730. "pattern": "^ses"
  25731. },
  25732. "assistantMessageID": {
  25733. "type": "string",
  25734. "pattern": "^msg_"
  25735. },
  25736. "callID": {
  25737. "type": "string"
  25738. },
  25739. "error": {
  25740. "$ref": "#/components/schemas/SessionErrorUnknown"
  25741. },
  25742. "result": {},
  25743. "provider": {
  25744. "type": "object",
  25745. "properties": {
  25746. "executed": {
  25747. "type": "boolean"
  25748. },
  25749. "metadata": {
  25750. "type": "object",
  25751. "additionalProperties": {
  25752. "type": "object"
  25753. }
  25754. }
  25755. },
  25756. "required": ["executed"],
  25757. "additionalProperties": false
  25758. }
  25759. },
  25760. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  25761. "additionalProperties": false
  25762. }
  25763. },
  25764. "required": ["type", "id", "seq", "aggregateID", "data"],
  25765. "additionalProperties": false
  25766. }
  25767. },
  25768. "required": ["type", "id", "syncEvent"],
  25769. "additionalProperties": false
  25770. },
  25771. "SyncEventSessionNextRetried": {
  25772. "type": "object",
  25773. "properties": {
  25774. "type": {
  25775. "type": "string",
  25776. "enum": ["sync"]
  25777. },
  25778. "id": {
  25779. "type": "string",
  25780. "pattern": "^evt_"
  25781. },
  25782. "syncEvent": {
  25783. "type": "object",
  25784. "properties": {
  25785. "type": {
  25786. "type": "string",
  25787. "enum": ["session.next.retried.1"]
  25788. },
  25789. "id": {
  25790. "type": "string",
  25791. "pattern": "^evt_"
  25792. },
  25793. "seq": {
  25794. "type": "number"
  25795. },
  25796. "aggregateID": {
  25797. "type": "string"
  25798. },
  25799. "data": {
  25800. "type": "object",
  25801. "properties": {
  25802. "timestamp": {
  25803. "type": "number"
  25804. },
  25805. "sessionID": {
  25806. "type": "string",
  25807. "pattern": "^ses"
  25808. },
  25809. "attempt": {
  25810. "type": "number"
  25811. },
  25812. "error": {
  25813. "$ref": "#/components/schemas/SessionNextRetry_error"
  25814. }
  25815. },
  25816. "required": ["timestamp", "sessionID", "attempt", "error"],
  25817. "additionalProperties": false
  25818. }
  25819. },
  25820. "required": ["type", "id", "seq", "aggregateID", "data"],
  25821. "additionalProperties": false
  25822. }
  25823. },
  25824. "required": ["type", "id", "syncEvent"],
  25825. "additionalProperties": false
  25826. },
  25827. "SyncEventSessionNextCompactionStarted": {
  25828. "type": "object",
  25829. "properties": {
  25830. "type": {
  25831. "type": "string",
  25832. "enum": ["sync"]
  25833. },
  25834. "id": {
  25835. "type": "string",
  25836. "pattern": "^evt_"
  25837. },
  25838. "syncEvent": {
  25839. "type": "object",
  25840. "properties": {
  25841. "type": {
  25842. "type": "string",
  25843. "enum": ["session.next.compaction.started.1"]
  25844. },
  25845. "id": {
  25846. "type": "string",
  25847. "pattern": "^evt_"
  25848. },
  25849. "seq": {
  25850. "type": "number"
  25851. },
  25852. "aggregateID": {
  25853. "type": "string"
  25854. },
  25855. "data": {
  25856. "type": "object",
  25857. "properties": {
  25858. "timestamp": {
  25859. "type": "number"
  25860. },
  25861. "sessionID": {
  25862. "type": "string",
  25863. "pattern": "^ses"
  25864. },
  25865. "messageID": {
  25866. "type": "string",
  25867. "pattern": "^msg_"
  25868. },
  25869. "reason": {
  25870. "type": "string",
  25871. "enum": ["auto", "manual"]
  25872. }
  25873. },
  25874. "required": ["timestamp", "sessionID", "messageID", "reason"],
  25875. "additionalProperties": false
  25876. }
  25877. },
  25878. "required": ["type", "id", "seq", "aggregateID", "data"],
  25879. "additionalProperties": false
  25880. }
  25881. },
  25882. "required": ["type", "id", "syncEvent"],
  25883. "additionalProperties": false
  25884. },
  25885. "SyncEventSessionNextCompactionEnded": {
  25886. "type": "object",
  25887. "properties": {
  25888. "type": {
  25889. "type": "string",
  25890. "enum": ["sync"]
  25891. },
  25892. "id": {
  25893. "type": "string",
  25894. "pattern": "^evt_"
  25895. },
  25896. "syncEvent": {
  25897. "type": "object",
  25898. "properties": {
  25899. "type": {
  25900. "type": "string",
  25901. "enum": ["session.next.compaction.ended.2"]
  25902. },
  25903. "id": {
  25904. "type": "string",
  25905. "pattern": "^evt_"
  25906. },
  25907. "seq": {
  25908. "type": "number"
  25909. },
  25910. "aggregateID": {
  25911. "type": "string"
  25912. },
  25913. "data": {
  25914. "type": "object",
  25915. "properties": {
  25916. "timestamp": {
  25917. "type": "number"
  25918. },
  25919. "sessionID": {
  25920. "type": "string",
  25921. "pattern": "^ses"
  25922. },
  25923. "messageID": {
  25924. "type": "string",
  25925. "pattern": "^msg_"
  25926. },
  25927. "reason": {
  25928. "type": "string",
  25929. "enum": ["auto", "manual"]
  25930. },
  25931. "text": {
  25932. "type": "string"
  25933. },
  25934. "recent": {
  25935. "type": "string"
  25936. }
  25937. },
  25938. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  25939. "additionalProperties": false
  25940. }
  25941. },
  25942. "required": ["type", "id", "seq", "aggregateID", "data"],
  25943. "additionalProperties": false
  25944. }
  25945. },
  25946. "required": ["type", "id", "syncEvent"],
  25947. "additionalProperties": false
  25948. },
  25949. "ConfigV2ReferenceGit": {
  25950. "type": "object",
  25951. "properties": {
  25952. "repository": {
  25953. "type": "string"
  25954. },
  25955. "branch": {
  25956. "type": "string"
  25957. },
  25958. "description": {
  25959. "type": "string"
  25960. },
  25961. "hidden": {
  25962. "type": "boolean"
  25963. }
  25964. },
  25965. "required": ["repository"],
  25966. "additionalProperties": false
  25967. },
  25968. "ConfigV2ReferenceLocal": {
  25969. "type": "object",
  25970. "properties": {
  25971. "path": {
  25972. "type": "string"
  25973. },
  25974. "description": {
  25975. "type": "string"
  25976. },
  25977. "hidden": {
  25978. "type": "boolean"
  25979. }
  25980. },
  25981. "required": ["path"],
  25982. "additionalProperties": false
  25983. },
  25984. "PolicyEffect": {
  25985. "type": "string",
  25986. "enum": ["allow", "deny"]
  25987. },
  25988. "ConfigV2ExperimentalPolicy": {
  25989. "type": "object",
  25990. "properties": {
  25991. "action": {
  25992. "type": "string",
  25993. "enum": ["provider.use"]
  25994. },
  25995. "effect": {
  25996. "$ref": "#/components/schemas/PolicyEffect"
  25997. },
  25998. "resource": {
  25999. "type": "string"
  26000. }
  26001. },
  26002. "required": ["action", "effect", "resource"],
  26003. "additionalProperties": false
  26004. },
  26005. "ProjectDirectories": {
  26006. "type": "array",
  26007. "items": {
  26008. "type": "object",
  26009. "properties": {
  26010. "directory": {
  26011. "type": "string"
  26012. },
  26013. "strategy": {
  26014. "type": "string"
  26015. }
  26016. },
  26017. "required": ["directory"],
  26018. "additionalProperties": false
  26019. }
  26020. },
  26021. "LocationInfo": {
  26022. "type": "object",
  26023. "properties": {
  26024. "directory": {
  26025. "type": "string"
  26026. },
  26027. "workspaceID": {
  26028. "type": "string",
  26029. "pattern": "^wrk"
  26030. },
  26031. "project": {
  26032. "type": "object",
  26033. "properties": {
  26034. "id": {
  26035. "type": "string"
  26036. },
  26037. "directory": {
  26038. "type": "string"
  26039. }
  26040. },
  26041. "required": ["id", "directory"],
  26042. "additionalProperties": false
  26043. }
  26044. },
  26045. "required": ["directory", "project"],
  26046. "additionalProperties": false
  26047. },
  26048. "PermissionV2Effect": {
  26049. "type": "string",
  26050. "enum": ["allow", "deny", "ask"]
  26051. },
  26052. "PermissionV2Rule": {
  26053. "type": "object",
  26054. "properties": {
  26055. "action": {
  26056. "type": "string"
  26057. },
  26058. "resource": {
  26059. "type": "string"
  26060. },
  26061. "effect": {
  26062. "$ref": "#/components/schemas/PermissionV2Effect"
  26063. }
  26064. },
  26065. "required": ["action", "resource", "effect"],
  26066. "additionalProperties": false
  26067. },
  26068. "PermissionV2Ruleset": {
  26069. "type": "array",
  26070. "items": {
  26071. "$ref": "#/components/schemas/PermissionV2Rule"
  26072. }
  26073. },
  26074. "AgentV2Info": {
  26075. "type": "object",
  26076. "properties": {
  26077. "id": {
  26078. "type": "string"
  26079. },
  26080. "model": {
  26081. "type": "object",
  26082. "properties": {
  26083. "id": {
  26084. "type": "string"
  26085. },
  26086. "providerID": {
  26087. "type": "string"
  26088. },
  26089. "variant": {
  26090. "type": "string"
  26091. }
  26092. },
  26093. "required": ["id", "providerID"],
  26094. "additionalProperties": false
  26095. },
  26096. "request": {
  26097. "type": "object",
  26098. "properties": {
  26099. "headers": {
  26100. "type": "object",
  26101. "additionalProperties": {
  26102. "type": "string"
  26103. }
  26104. },
  26105. "body": {
  26106. "type": "object"
  26107. }
  26108. },
  26109. "required": ["headers", "body"],
  26110. "additionalProperties": false
  26111. },
  26112. "system": {
  26113. "type": "string"
  26114. },
  26115. "description": {
  26116. "type": "string"
  26117. },
  26118. "mode": {
  26119. "type": "string",
  26120. "enum": ["subagent", "primary", "all"]
  26121. },
  26122. "hidden": {
  26123. "type": "boolean"
  26124. },
  26125. "color": {
  26126. "anyOf": [
  26127. {
  26128. "type": "string",
  26129. "pattern": "^#[0-9a-fA-F]{6}$"
  26130. },
  26131. {
  26132. "type": "string",
  26133. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  26134. }
  26135. ]
  26136. },
  26137. "steps": {
  26138. "type": "integer",
  26139. "exclusiveMinimum": 0
  26140. },
  26141. "permissions": {
  26142. "$ref": "#/components/schemas/PermissionV2Ruleset"
  26143. }
  26144. },
  26145. "required": ["id", "request", "mode", "hidden", "permissions"],
  26146. "additionalProperties": false
  26147. },
  26148. "SessionV2Info": {
  26149. "type": "object",
  26150. "properties": {
  26151. "id": {
  26152. "type": "string",
  26153. "pattern": "^ses"
  26154. },
  26155. "parentID": {
  26156. "type": "string",
  26157. "pattern": "^ses"
  26158. },
  26159. "projectID": {
  26160. "type": "string"
  26161. },
  26162. "agent": {
  26163. "type": "string"
  26164. },
  26165. "model": {
  26166. "type": "object",
  26167. "properties": {
  26168. "id": {
  26169. "type": "string"
  26170. },
  26171. "providerID": {
  26172. "type": "string"
  26173. },
  26174. "variant": {
  26175. "type": "string"
  26176. }
  26177. },
  26178. "required": ["id", "providerID"],
  26179. "additionalProperties": false
  26180. },
  26181. "cost": {
  26182. "type": "number"
  26183. },
  26184. "tokens": {
  26185. "type": "object",
  26186. "properties": {
  26187. "input": {
  26188. "type": "number"
  26189. },
  26190. "output": {
  26191. "type": "number"
  26192. },
  26193. "reasoning": {
  26194. "type": "number"
  26195. },
  26196. "cache": {
  26197. "type": "object",
  26198. "properties": {
  26199. "read": {
  26200. "type": "number"
  26201. },
  26202. "write": {
  26203. "type": "number"
  26204. }
  26205. },
  26206. "required": ["read", "write"],
  26207. "additionalProperties": false
  26208. }
  26209. },
  26210. "required": ["input", "output", "reasoning", "cache"],
  26211. "additionalProperties": false
  26212. },
  26213. "time": {
  26214. "type": "object",
  26215. "properties": {
  26216. "created": {
  26217. "type": "number"
  26218. },
  26219. "updated": {
  26220. "type": "number"
  26221. },
  26222. "archived": {
  26223. "type": "number"
  26224. }
  26225. },
  26226. "required": ["created", "updated"],
  26227. "additionalProperties": false
  26228. },
  26229. "title": {
  26230. "type": "string"
  26231. },
  26232. "location": {
  26233. "$ref": "#/components/schemas/LocationRef"
  26234. },
  26235. "subpath": {
  26236. "type": "string"
  26237. }
  26238. },
  26239. "required": ["id", "projectID", "cost", "tokens", "time", "title", "location"],
  26240. "additionalProperties": false
  26241. },
  26242. "SessionInputAdmitted": {
  26243. "type": "object",
  26244. "properties": {
  26245. "admittedSeq": {
  26246. "type": "integer",
  26247. "minimum": 0
  26248. },
  26249. "id": {
  26250. "type": "string",
  26251. "pattern": "^msg_"
  26252. },
  26253. "sessionID": {
  26254. "type": "string",
  26255. "pattern": "^ses"
  26256. },
  26257. "prompt": {
  26258. "$ref": "#/components/schemas/Prompt"
  26259. },
  26260. "delivery": {
  26261. "type": "string",
  26262. "enum": ["steer", "queue"]
  26263. },
  26264. "timeCreated": {
  26265. "type": "number"
  26266. },
  26267. "promotedSeq": {
  26268. "type": "integer",
  26269. "minimum": 0
  26270. }
  26271. },
  26272. "required": ["admittedSeq", "id", "sessionID", "prompt", "delivery", "timeCreated"],
  26273. "additionalProperties": false
  26274. },
  26275. "SessionMessageAgentSwitched": {
  26276. "type": "object",
  26277. "properties": {
  26278. "id": {
  26279. "type": "string",
  26280. "pattern": "^msg_"
  26281. },
  26282. "metadata": {
  26283. "type": "object"
  26284. },
  26285. "time": {
  26286. "type": "object",
  26287. "properties": {
  26288. "created": {
  26289. "type": "number"
  26290. }
  26291. },
  26292. "required": ["created"],
  26293. "additionalProperties": false
  26294. },
  26295. "type": {
  26296. "type": "string",
  26297. "enum": ["agent-switched"]
  26298. },
  26299. "agent": {
  26300. "type": "string"
  26301. }
  26302. },
  26303. "required": ["id", "time", "type", "agent"],
  26304. "additionalProperties": false
  26305. },
  26306. "SessionMessageModelSwitched": {
  26307. "type": "object",
  26308. "properties": {
  26309. "id": {
  26310. "type": "string",
  26311. "pattern": "^msg_"
  26312. },
  26313. "metadata": {
  26314. "type": "object"
  26315. },
  26316. "time": {
  26317. "type": "object",
  26318. "properties": {
  26319. "created": {
  26320. "type": "number"
  26321. }
  26322. },
  26323. "required": ["created"],
  26324. "additionalProperties": false
  26325. },
  26326. "type": {
  26327. "type": "string",
  26328. "enum": ["model-switched"]
  26329. },
  26330. "model": {
  26331. "type": "object",
  26332. "properties": {
  26333. "id": {
  26334. "type": "string"
  26335. },
  26336. "providerID": {
  26337. "type": "string"
  26338. },
  26339. "variant": {
  26340. "type": "string"
  26341. }
  26342. },
  26343. "required": ["id", "providerID"],
  26344. "additionalProperties": false
  26345. }
  26346. },
  26347. "required": ["id", "time", "type", "model"],
  26348. "additionalProperties": false
  26349. },
  26350. "SessionMessageUser": {
  26351. "type": "object",
  26352. "properties": {
  26353. "id": {
  26354. "type": "string",
  26355. "pattern": "^msg_"
  26356. },
  26357. "metadata": {
  26358. "type": "object"
  26359. },
  26360. "time": {
  26361. "type": "object",
  26362. "properties": {
  26363. "created": {
  26364. "type": "number"
  26365. }
  26366. },
  26367. "required": ["created"],
  26368. "additionalProperties": false
  26369. },
  26370. "text": {
  26371. "type": "string"
  26372. },
  26373. "files": {
  26374. "type": "array",
  26375. "items": {
  26376. "$ref": "#/components/schemas/PromptFileAttachment"
  26377. }
  26378. },
  26379. "agents": {
  26380. "type": "array",
  26381. "items": {
  26382. "$ref": "#/components/schemas/PromptAgentAttachment"
  26383. }
  26384. },
  26385. "type": {
  26386. "type": "string",
  26387. "enum": ["user"]
  26388. }
  26389. },
  26390. "required": ["id", "time", "text", "type"],
  26391. "additionalProperties": false
  26392. },
  26393. "SessionMessageSynthetic": {
  26394. "type": "object",
  26395. "properties": {
  26396. "id": {
  26397. "type": "string",
  26398. "pattern": "^msg_"
  26399. },
  26400. "metadata": {
  26401. "type": "object"
  26402. },
  26403. "time": {
  26404. "type": "object",
  26405. "properties": {
  26406. "created": {
  26407. "type": "number"
  26408. }
  26409. },
  26410. "required": ["created"],
  26411. "additionalProperties": false
  26412. },
  26413. "sessionID": {
  26414. "type": "string",
  26415. "pattern": "^ses"
  26416. },
  26417. "text": {
  26418. "type": "string"
  26419. },
  26420. "type": {
  26421. "type": "string",
  26422. "enum": ["synthetic"]
  26423. }
  26424. },
  26425. "required": ["id", "time", "sessionID", "text", "type"],
  26426. "additionalProperties": false
  26427. },
  26428. "SessionMessageSystem": {
  26429. "type": "object",
  26430. "properties": {
  26431. "id": {
  26432. "type": "string",
  26433. "pattern": "^msg_"
  26434. },
  26435. "metadata": {
  26436. "type": "object"
  26437. },
  26438. "time": {
  26439. "type": "object",
  26440. "properties": {
  26441. "created": {
  26442. "type": "number"
  26443. }
  26444. },
  26445. "required": ["created"],
  26446. "additionalProperties": false
  26447. },
  26448. "type": {
  26449. "type": "string",
  26450. "enum": ["system"]
  26451. },
  26452. "text": {
  26453. "type": "string"
  26454. }
  26455. },
  26456. "required": ["id", "time", "type", "text"],
  26457. "additionalProperties": false
  26458. },
  26459. "SessionMessageShell": {
  26460. "type": "object",
  26461. "properties": {
  26462. "id": {
  26463. "type": "string",
  26464. "pattern": "^msg_"
  26465. },
  26466. "metadata": {
  26467. "type": "object"
  26468. },
  26469. "time": {
  26470. "type": "object",
  26471. "properties": {
  26472. "created": {
  26473. "type": "number"
  26474. },
  26475. "completed": {
  26476. "type": "number"
  26477. }
  26478. },
  26479. "required": ["created"],
  26480. "additionalProperties": false
  26481. },
  26482. "type": {
  26483. "type": "string",
  26484. "enum": ["shell"]
  26485. },
  26486. "callID": {
  26487. "type": "string"
  26488. },
  26489. "command": {
  26490. "type": "string"
  26491. },
  26492. "output": {
  26493. "type": "string"
  26494. }
  26495. },
  26496. "required": ["id", "time", "type", "callID", "command", "output"],
  26497. "additionalProperties": false
  26498. },
  26499. "SessionMessageAssistantText": {
  26500. "type": "object",
  26501. "properties": {
  26502. "type": {
  26503. "type": "string",
  26504. "enum": ["text"]
  26505. },
  26506. "id": {
  26507. "type": "string"
  26508. },
  26509. "text": {
  26510. "type": "string"
  26511. }
  26512. },
  26513. "required": ["type", "id", "text"],
  26514. "additionalProperties": false
  26515. },
  26516. "SessionMessageAssistantReasoning": {
  26517. "type": "object",
  26518. "properties": {
  26519. "type": {
  26520. "type": "string",
  26521. "enum": ["reasoning"]
  26522. },
  26523. "id": {
  26524. "type": "string"
  26525. },
  26526. "text": {
  26527. "type": "string"
  26528. },
  26529. "providerMetadata": {
  26530. "type": "object",
  26531. "additionalProperties": {
  26532. "type": "object"
  26533. }
  26534. }
  26535. },
  26536. "required": ["type", "id", "text"],
  26537. "additionalProperties": false
  26538. },
  26539. "SessionMessageToolStatePending": {
  26540. "type": "object",
  26541. "properties": {
  26542. "status": {
  26543. "type": "string",
  26544. "enum": ["pending"]
  26545. },
  26546. "input": {
  26547. "type": "string"
  26548. }
  26549. },
  26550. "required": ["status", "input"],
  26551. "additionalProperties": false
  26552. },
  26553. "SessionMessageToolStateRunning": {
  26554. "type": "object",
  26555. "properties": {
  26556. "status": {
  26557. "type": "string",
  26558. "enum": ["running"]
  26559. },
  26560. "input": {
  26561. "type": "object"
  26562. },
  26563. "structured": {
  26564. "type": "object"
  26565. },
  26566. "content": {
  26567. "type": "array",
  26568. "items": {
  26569. "anyOf": [
  26570. {
  26571. "$ref": "#/components/schemas/ToolTextContent"
  26572. },
  26573. {
  26574. "$ref": "#/components/schemas/ToolFileContent"
  26575. }
  26576. ]
  26577. }
  26578. }
  26579. },
  26580. "required": ["status", "input", "structured", "content"],
  26581. "additionalProperties": false
  26582. },
  26583. "SessionMessageToolStateCompleted": {
  26584. "type": "object",
  26585. "properties": {
  26586. "status": {
  26587. "type": "string",
  26588. "enum": ["completed"]
  26589. },
  26590. "input": {
  26591. "type": "object"
  26592. },
  26593. "attachments": {
  26594. "type": "array",
  26595. "items": {
  26596. "$ref": "#/components/schemas/PromptFileAttachment"
  26597. }
  26598. },
  26599. "content": {
  26600. "type": "array",
  26601. "items": {
  26602. "anyOf": [
  26603. {
  26604. "$ref": "#/components/schemas/ToolTextContent"
  26605. },
  26606. {
  26607. "$ref": "#/components/schemas/ToolFileContent"
  26608. }
  26609. ]
  26610. }
  26611. },
  26612. "outputPaths": {
  26613. "type": "array",
  26614. "items": {
  26615. "type": "string"
  26616. }
  26617. },
  26618. "structured": {
  26619. "type": "object"
  26620. },
  26621. "result": {}
  26622. },
  26623. "required": ["status", "input", "content", "structured"],
  26624. "additionalProperties": false
  26625. },
  26626. "SessionMessageToolStateError": {
  26627. "type": "object",
  26628. "properties": {
  26629. "status": {
  26630. "type": "string",
  26631. "enum": ["error"]
  26632. },
  26633. "input": {
  26634. "type": "object"
  26635. },
  26636. "content": {
  26637. "type": "array",
  26638. "items": {
  26639. "anyOf": [
  26640. {
  26641. "$ref": "#/components/schemas/ToolTextContent"
  26642. },
  26643. {
  26644. "$ref": "#/components/schemas/ToolFileContent"
  26645. }
  26646. ]
  26647. }
  26648. },
  26649. "structured": {
  26650. "type": "object"
  26651. },
  26652. "error": {
  26653. "$ref": "#/components/schemas/SessionErrorUnknown"
  26654. },
  26655. "result": {}
  26656. },
  26657. "required": ["status", "input", "content", "structured", "error"],
  26658. "additionalProperties": false
  26659. },
  26660. "SessionMessageAssistantTool": {
  26661. "type": "object",
  26662. "properties": {
  26663. "type": {
  26664. "type": "string",
  26665. "enum": ["tool"]
  26666. },
  26667. "id": {
  26668. "type": "string"
  26669. },
  26670. "name": {
  26671. "type": "string"
  26672. },
  26673. "provider": {
  26674. "type": "object",
  26675. "properties": {
  26676. "executed": {
  26677. "type": "boolean"
  26678. },
  26679. "metadata": {
  26680. "type": "object",
  26681. "additionalProperties": {
  26682. "type": "object"
  26683. }
  26684. },
  26685. "resultMetadata": {
  26686. "type": "object",
  26687. "additionalProperties": {
  26688. "type": "object"
  26689. }
  26690. }
  26691. },
  26692. "required": ["executed"],
  26693. "additionalProperties": false
  26694. },
  26695. "state": {
  26696. "anyOf": [
  26697. {
  26698. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  26699. },
  26700. {
  26701. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  26702. },
  26703. {
  26704. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  26705. },
  26706. {
  26707. "$ref": "#/components/schemas/SessionMessageToolStateError"
  26708. }
  26709. ]
  26710. },
  26711. "time": {
  26712. "type": "object",
  26713. "properties": {
  26714. "created": {
  26715. "type": "number"
  26716. },
  26717. "ran": {
  26718. "type": "number"
  26719. },
  26720. "completed": {
  26721. "type": "number"
  26722. },
  26723. "pruned": {
  26724. "type": "number"
  26725. }
  26726. },
  26727. "required": ["created"],
  26728. "additionalProperties": false
  26729. }
  26730. },
  26731. "required": ["type", "id", "name", "state", "time"],
  26732. "additionalProperties": false
  26733. },
  26734. "SessionMessageAssistant": {
  26735. "type": "object",
  26736. "properties": {
  26737. "id": {
  26738. "type": "string",
  26739. "pattern": "^msg_"
  26740. },
  26741. "metadata": {
  26742. "type": "object"
  26743. },
  26744. "time": {
  26745. "type": "object",
  26746. "properties": {
  26747. "created": {
  26748. "type": "number"
  26749. },
  26750. "completed": {
  26751. "type": "number"
  26752. }
  26753. },
  26754. "required": ["created"],
  26755. "additionalProperties": false
  26756. },
  26757. "type": {
  26758. "type": "string",
  26759. "enum": ["assistant"]
  26760. },
  26761. "agent": {
  26762. "type": "string"
  26763. },
  26764. "model": {
  26765. "type": "object",
  26766. "properties": {
  26767. "id": {
  26768. "type": "string"
  26769. },
  26770. "providerID": {
  26771. "type": "string"
  26772. },
  26773. "variant": {
  26774. "type": "string"
  26775. }
  26776. },
  26777. "required": ["id", "providerID"],
  26778. "additionalProperties": false
  26779. },
  26780. "content": {
  26781. "type": "array",
  26782. "items": {
  26783. "anyOf": [
  26784. {
  26785. "$ref": "#/components/schemas/SessionMessageAssistantText"
  26786. },
  26787. {
  26788. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  26789. },
  26790. {
  26791. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  26792. }
  26793. ]
  26794. }
  26795. },
  26796. "snapshot": {
  26797. "type": "object",
  26798. "properties": {
  26799. "start": {
  26800. "type": "string"
  26801. },
  26802. "end": {
  26803. "type": "string"
  26804. }
  26805. },
  26806. "additionalProperties": false
  26807. },
  26808. "finish": {
  26809. "type": "string"
  26810. },
  26811. "cost": {
  26812. "type": "number"
  26813. },
  26814. "tokens": {
  26815. "type": "object",
  26816. "properties": {
  26817. "input": {
  26818. "type": "number"
  26819. },
  26820. "output": {
  26821. "type": "number"
  26822. },
  26823. "reasoning": {
  26824. "type": "number"
  26825. },
  26826. "cache": {
  26827. "type": "object",
  26828. "properties": {
  26829. "read": {
  26830. "type": "number"
  26831. },
  26832. "write": {
  26833. "type": "number"
  26834. }
  26835. },
  26836. "required": ["read", "write"],
  26837. "additionalProperties": false
  26838. }
  26839. },
  26840. "required": ["input", "output", "reasoning", "cache"],
  26841. "additionalProperties": false
  26842. },
  26843. "error": {
  26844. "$ref": "#/components/schemas/SessionErrorUnknown"
  26845. }
  26846. },
  26847. "required": ["id", "time", "type", "agent", "model", "content"],
  26848. "additionalProperties": false
  26849. },
  26850. "SessionMessageCompaction": {
  26851. "type": "object",
  26852. "properties": {
  26853. "type": {
  26854. "type": "string",
  26855. "enum": ["compaction"]
  26856. },
  26857. "reason": {
  26858. "type": "string",
  26859. "enum": ["auto", "manual"]
  26860. },
  26861. "summary": {
  26862. "type": "string"
  26863. },
  26864. "recent": {
  26865. "type": "string"
  26866. },
  26867. "id": {
  26868. "type": "string",
  26869. "pattern": "^msg_"
  26870. },
  26871. "metadata": {
  26872. "type": "object"
  26873. },
  26874. "time": {
  26875. "type": "object",
  26876. "properties": {
  26877. "created": {
  26878. "type": "number"
  26879. }
  26880. },
  26881. "required": ["created"],
  26882. "additionalProperties": false
  26883. }
  26884. },
  26885. "required": ["type", "reason", "summary", "recent", "id", "time"],
  26886. "additionalProperties": false
  26887. },
  26888. "SessionMessage": {
  26889. "anyOf": [
  26890. {
  26891. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  26892. },
  26893. {
  26894. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  26895. },
  26896. {
  26897. "$ref": "#/components/schemas/SessionMessageUser"
  26898. },
  26899. {
  26900. "$ref": "#/components/schemas/SessionMessageSynthetic"
  26901. },
  26902. {
  26903. "$ref": "#/components/schemas/SessionMessageSystem"
  26904. },
  26905. {
  26906. "$ref": "#/components/schemas/SessionMessageShell"
  26907. },
  26908. {
  26909. "$ref": "#/components/schemas/SessionMessageAssistant"
  26910. },
  26911. {
  26912. "$ref": "#/components/schemas/SessionMessageCompaction"
  26913. }
  26914. ]
  26915. },
  26916. "ProviderV2Info": {
  26917. "type": "object",
  26918. "properties": {
  26919. "id": {
  26920. "type": "string"
  26921. },
  26922. "name": {
  26923. "type": "string"
  26924. },
  26925. "enabled": {
  26926. "anyOf": [
  26927. {
  26928. "type": "boolean",
  26929. "enum": [false]
  26930. },
  26931. {
  26932. "type": "object",
  26933. "properties": {
  26934. "via": {
  26935. "type": "string",
  26936. "enum": ["env"]
  26937. },
  26938. "name": {
  26939. "type": "string"
  26940. }
  26941. },
  26942. "required": ["via", "name"],
  26943. "additionalProperties": false
  26944. },
  26945. {
  26946. "type": "object",
  26947. "properties": {
  26948. "via": {
  26949. "type": "string",
  26950. "enum": ["credential"]
  26951. },
  26952. "credentialID": {
  26953. "type": "string"
  26954. }
  26955. },
  26956. "required": ["via", "credentialID"],
  26957. "additionalProperties": false
  26958. },
  26959. {
  26960. "type": "object",
  26961. "properties": {
  26962. "via": {
  26963. "type": "string",
  26964. "enum": ["custom"]
  26965. },
  26966. "data": {
  26967. "type": "object"
  26968. }
  26969. },
  26970. "required": ["via", "data"],
  26971. "additionalProperties": false
  26972. }
  26973. ]
  26974. },
  26975. "env": {
  26976. "type": "array",
  26977. "items": {
  26978. "type": "string"
  26979. }
  26980. },
  26981. "api": {
  26982. "anyOf": [
  26983. {
  26984. "type": "object",
  26985. "properties": {
  26986. "type": {
  26987. "type": "string",
  26988. "enum": ["aisdk"]
  26989. },
  26990. "package": {
  26991. "type": "string"
  26992. },
  26993. "url": {
  26994. "type": "string"
  26995. },
  26996. "settings": {
  26997. "type": "object"
  26998. }
  26999. },
  27000. "required": ["type", "package"],
  27001. "additionalProperties": false
  27002. },
  27003. {
  27004. "type": "object",
  27005. "properties": {
  27006. "type": {
  27007. "type": "string",
  27008. "enum": ["native"]
  27009. },
  27010. "url": {
  27011. "type": "string"
  27012. },
  27013. "settings": {
  27014. "type": "object"
  27015. }
  27016. },
  27017. "required": ["type", "settings"],
  27018. "additionalProperties": false
  27019. }
  27020. ]
  27021. },
  27022. "request": {
  27023. "type": "object",
  27024. "properties": {
  27025. "headers": {
  27026. "type": "object",
  27027. "additionalProperties": {
  27028. "type": "string"
  27029. }
  27030. },
  27031. "body": {
  27032. "type": "object"
  27033. }
  27034. },
  27035. "required": ["headers", "body"],
  27036. "additionalProperties": false
  27037. }
  27038. },
  27039. "required": ["id", "name", "enabled", "env", "api", "request"],
  27040. "additionalProperties": false
  27041. },
  27042. "IntegrationWhen": {
  27043. "type": "object",
  27044. "properties": {
  27045. "key": {
  27046. "type": "string"
  27047. },
  27048. "op": {
  27049. "type": "string",
  27050. "enum": ["eq", "neq"]
  27051. },
  27052. "value": {
  27053. "type": "string"
  27054. }
  27055. },
  27056. "required": ["key", "op", "value"],
  27057. "additionalProperties": false
  27058. },
  27059. "IntegrationTextPrompt": {
  27060. "type": "object",
  27061. "properties": {
  27062. "type": {
  27063. "type": "string",
  27064. "enum": ["text"]
  27065. },
  27066. "key": {
  27067. "type": "string"
  27068. },
  27069. "message": {
  27070. "type": "string"
  27071. },
  27072. "placeholder": {
  27073. "type": "string"
  27074. },
  27075. "when": {
  27076. "$ref": "#/components/schemas/IntegrationWhen"
  27077. }
  27078. },
  27079. "required": ["type", "key", "message"],
  27080. "additionalProperties": false
  27081. },
  27082. "IntegrationSelectPrompt": {
  27083. "type": "object",
  27084. "properties": {
  27085. "type": {
  27086. "type": "string",
  27087. "enum": ["select"]
  27088. },
  27089. "key": {
  27090. "type": "string"
  27091. },
  27092. "message": {
  27093. "type": "string"
  27094. },
  27095. "options": {
  27096. "type": "array",
  27097. "items": {
  27098. "type": "object",
  27099. "properties": {
  27100. "label": {
  27101. "type": "string"
  27102. },
  27103. "value": {
  27104. "type": "string"
  27105. },
  27106. "hint": {
  27107. "type": "string"
  27108. }
  27109. },
  27110. "required": ["label", "value"],
  27111. "additionalProperties": false
  27112. }
  27113. },
  27114. "when": {
  27115. "$ref": "#/components/schemas/IntegrationWhen"
  27116. }
  27117. },
  27118. "required": ["type", "key", "message", "options"],
  27119. "additionalProperties": false
  27120. },
  27121. "IntegrationOAuthMethod": {
  27122. "type": "object",
  27123. "properties": {
  27124. "id": {
  27125. "type": "string"
  27126. },
  27127. "type": {
  27128. "type": "string",
  27129. "enum": ["oauth"]
  27130. },
  27131. "label": {
  27132. "type": "string"
  27133. },
  27134. "prompts": {
  27135. "type": "array",
  27136. "items": {
  27137. "anyOf": [
  27138. {
  27139. "$ref": "#/components/schemas/IntegrationTextPrompt"
  27140. },
  27141. {
  27142. "$ref": "#/components/schemas/IntegrationSelectPrompt"
  27143. }
  27144. ]
  27145. }
  27146. }
  27147. },
  27148. "required": ["id", "type", "label"],
  27149. "additionalProperties": false
  27150. },
  27151. "IntegrationKeyMethod": {
  27152. "type": "object",
  27153. "properties": {
  27154. "type": {
  27155. "type": "string",
  27156. "enum": ["key"]
  27157. },
  27158. "label": {
  27159. "type": "string"
  27160. }
  27161. },
  27162. "required": ["type"],
  27163. "additionalProperties": false
  27164. },
  27165. "IntegrationEnvMethod": {
  27166. "type": "object",
  27167. "properties": {
  27168. "type": {
  27169. "type": "string",
  27170. "enum": ["env"]
  27171. },
  27172. "names": {
  27173. "type": "array",
  27174. "items": {
  27175. "type": "string"
  27176. }
  27177. }
  27178. },
  27179. "required": ["type", "names"],
  27180. "additionalProperties": false
  27181. },
  27182. "ConnectionCredentialInfo": {
  27183. "type": "object",
  27184. "properties": {
  27185. "type": {
  27186. "type": "string",
  27187. "enum": ["credential"]
  27188. },
  27189. "id": {
  27190. "type": "string"
  27191. },
  27192. "label": {
  27193. "type": "string"
  27194. }
  27195. },
  27196. "required": ["type", "id", "label"],
  27197. "additionalProperties": false
  27198. },
  27199. "ConnectionEnvInfo": {
  27200. "type": "object",
  27201. "properties": {
  27202. "type": {
  27203. "type": "string",
  27204. "enum": ["env"]
  27205. },
  27206. "name": {
  27207. "type": "string"
  27208. }
  27209. },
  27210. "required": ["type", "name"],
  27211. "additionalProperties": false
  27212. },
  27213. "ConnectionInfo": {
  27214. "anyOf": [
  27215. {
  27216. "$ref": "#/components/schemas/ConnectionCredentialInfo"
  27217. },
  27218. {
  27219. "$ref": "#/components/schemas/ConnectionEnvInfo"
  27220. }
  27221. ]
  27222. },
  27223. "IntegrationInfo": {
  27224. "type": "object",
  27225. "properties": {
  27226. "id": {
  27227. "type": "string"
  27228. },
  27229. "name": {
  27230. "type": "string"
  27231. },
  27232. "methods": {
  27233. "type": "array",
  27234. "items": {
  27235. "anyOf": [
  27236. {
  27237. "$ref": "#/components/schemas/IntegrationOAuthMethod"
  27238. },
  27239. {
  27240. "$ref": "#/components/schemas/IntegrationKeyMethod"
  27241. },
  27242. {
  27243. "$ref": "#/components/schemas/IntegrationEnvMethod"
  27244. }
  27245. ]
  27246. }
  27247. },
  27248. "connections": {
  27249. "type": "array",
  27250. "items": {
  27251. "$ref": "#/components/schemas/ConnectionInfo"
  27252. }
  27253. }
  27254. },
  27255. "required": ["id", "name", "methods", "connections"],
  27256. "additionalProperties": false
  27257. },
  27258. "IntegrationAttempt": {
  27259. "type": "object",
  27260. "properties": {
  27261. "attemptID": {
  27262. "type": "string"
  27263. },
  27264. "url": {
  27265. "type": "string"
  27266. },
  27267. "instructions": {
  27268. "type": "string"
  27269. },
  27270. "mode": {
  27271. "type": "string",
  27272. "enum": ["auto", "code"]
  27273. },
  27274. "time": {
  27275. "type": "object",
  27276. "properties": {
  27277. "created": {
  27278. "anyOf": [
  27279. {
  27280. "type": "number"
  27281. },
  27282. {
  27283. "type": "string",
  27284. "enum": ["NaN"]
  27285. },
  27286. {
  27287. "type": "string",
  27288. "enum": ["Infinity"]
  27289. },
  27290. {
  27291. "type": "string",
  27292. "enum": ["-Infinity"]
  27293. },
  27294. {
  27295. "type": "string",
  27296. "enum": ["Infinity", "-Infinity", "NaN"]
  27297. }
  27298. ]
  27299. },
  27300. "expires": {
  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. },
  27324. "required": ["created", "expires"],
  27325. "additionalProperties": false
  27326. }
  27327. },
  27328. "required": ["attemptID", "url", "instructions", "mode", "time"],
  27329. "additionalProperties": false
  27330. },
  27331. "PermissionV2Request": {
  27332. "type": "object",
  27333. "properties": {
  27334. "id": {
  27335. "type": "string",
  27336. "pattern": "^per"
  27337. },
  27338. "sessionID": {
  27339. "type": "string",
  27340. "pattern": "^ses"
  27341. },
  27342. "action": {
  27343. "type": "string"
  27344. },
  27345. "resources": {
  27346. "type": "array",
  27347. "items": {
  27348. "type": "string"
  27349. }
  27350. },
  27351. "save": {
  27352. "type": "array",
  27353. "items": {
  27354. "type": "string"
  27355. }
  27356. },
  27357. "metadata": {
  27358. "type": "object"
  27359. },
  27360. "source": {
  27361. "$ref": "#/components/schemas/PermissionV2Source"
  27362. }
  27363. },
  27364. "required": ["id", "sessionID", "action", "resources"],
  27365. "additionalProperties": false
  27366. },
  27367. "PermissionSavedInfo": {
  27368. "type": "object",
  27369. "properties": {
  27370. "id": {
  27371. "type": "string"
  27372. },
  27373. "projectID": {
  27374. "type": "string"
  27375. },
  27376. "action": {
  27377. "type": "string"
  27378. },
  27379. "resource": {
  27380. "type": "string"
  27381. }
  27382. },
  27383. "required": ["id", "projectID", "action", "resource"],
  27384. "additionalProperties": false
  27385. },
  27386. "FileSystemEntry": {
  27387. "type": "object",
  27388. "properties": {
  27389. "path": {
  27390. "type": "string"
  27391. },
  27392. "type": {
  27393. "type": "string",
  27394. "enum": ["file", "directory"]
  27395. },
  27396. "mime": {
  27397. "type": "string"
  27398. }
  27399. },
  27400. "required": ["path", "type", "mime"],
  27401. "additionalProperties": false
  27402. },
  27403. "CommandV2Info": {
  27404. "type": "object",
  27405. "properties": {
  27406. "name": {
  27407. "type": "string"
  27408. },
  27409. "template": {
  27410. "type": "string"
  27411. },
  27412. "description": {
  27413. "type": "string"
  27414. },
  27415. "agent": {
  27416. "type": "string"
  27417. },
  27418. "model": {
  27419. "type": "object",
  27420. "properties": {
  27421. "id": {
  27422. "type": "string"
  27423. },
  27424. "providerID": {
  27425. "type": "string"
  27426. },
  27427. "variant": {
  27428. "type": "string"
  27429. }
  27430. },
  27431. "required": ["id", "providerID"],
  27432. "additionalProperties": false
  27433. },
  27434. "subtask": {
  27435. "type": "boolean"
  27436. }
  27437. },
  27438. "required": ["name", "template"],
  27439. "additionalProperties": false
  27440. },
  27441. "SkillV2Info": {
  27442. "type": "object",
  27443. "properties": {
  27444. "name": {
  27445. "type": "string"
  27446. },
  27447. "description": {
  27448. "type": "string"
  27449. },
  27450. "slash": {
  27451. "type": "boolean"
  27452. },
  27453. "location": {
  27454. "type": "string"
  27455. },
  27456. "content": {
  27457. "type": "string"
  27458. }
  27459. },
  27460. "required": ["name", "location", "content"],
  27461. "additionalProperties": false
  27462. },
  27463. "QuestionV2Request": {
  27464. "type": "object",
  27465. "properties": {
  27466. "id": {
  27467. "type": "string",
  27468. "pattern": "^que"
  27469. },
  27470. "sessionID": {
  27471. "type": "string",
  27472. "pattern": "^ses"
  27473. },
  27474. "questions": {
  27475. "type": "array",
  27476. "items": {
  27477. "$ref": "#/components/schemas/QuestionV2Info"
  27478. },
  27479. "description": "Questions to ask"
  27480. },
  27481. "tool": {
  27482. "$ref": "#/components/schemas/QuestionV2Tool"
  27483. }
  27484. },
  27485. "required": ["id", "sessionID", "questions"],
  27486. "additionalProperties": false
  27487. },
  27488. "QuestionV2Reply": {
  27489. "type": "object",
  27490. "properties": {
  27491. "answers": {
  27492. "type": "array",
  27493. "items": {
  27494. "$ref": "#/components/schemas/QuestionV2Answer"
  27495. },
  27496. "description": "User answers in order of questions (each answer is an array of selected labels)"
  27497. }
  27498. },
  27499. "required": ["answers"],
  27500. "additionalProperties": false
  27501. },
  27502. "ReferenceLocalSource": {
  27503. "type": "object",
  27504. "properties": {
  27505. "type": {
  27506. "type": "string",
  27507. "enum": ["local"]
  27508. },
  27509. "path": {
  27510. "type": "string"
  27511. },
  27512. "description": {
  27513. "type": "string"
  27514. },
  27515. "hidden": {
  27516. "type": "boolean"
  27517. }
  27518. },
  27519. "required": ["type", "path"],
  27520. "additionalProperties": false
  27521. },
  27522. "ReferenceGitSource": {
  27523. "type": "object",
  27524. "properties": {
  27525. "type": {
  27526. "type": "string",
  27527. "enum": ["git"]
  27528. },
  27529. "repository": {
  27530. "type": "string"
  27531. },
  27532. "branch": {
  27533. "type": "string"
  27534. },
  27535. "description": {
  27536. "type": "string"
  27537. },
  27538. "hidden": {
  27539. "type": "boolean"
  27540. }
  27541. },
  27542. "required": ["type", "repository"],
  27543. "additionalProperties": false
  27544. },
  27545. "ReferenceInfo": {
  27546. "type": "object",
  27547. "properties": {
  27548. "name": {
  27549. "type": "string"
  27550. },
  27551. "path": {
  27552. "type": "string"
  27553. },
  27554. "description": {
  27555. "type": "string"
  27556. },
  27557. "hidden": {
  27558. "type": "boolean"
  27559. },
  27560. "source": {
  27561. "anyOf": [
  27562. {
  27563. "$ref": "#/components/schemas/ReferenceLocalSource"
  27564. },
  27565. {
  27566. "$ref": "#/components/schemas/ReferenceGitSource"
  27567. }
  27568. ]
  27569. }
  27570. },
  27571. "required": ["name", "path", "source"],
  27572. "additionalProperties": false
  27573. },
  27574. "ProjectCopyCopy": {
  27575. "type": "object",
  27576. "properties": {
  27577. "directory": {
  27578. "type": "string"
  27579. }
  27580. },
  27581. "required": ["directory"],
  27582. "additionalProperties": false
  27583. },
  27584. "EventModels-devRefreshed": {
  27585. "type": "object",
  27586. "properties": {
  27587. "id": {
  27588. "type": "string",
  27589. "pattern": "^evt_"
  27590. },
  27591. "type": {
  27592. "type": "string",
  27593. "enum": ["models-dev.refreshed"]
  27594. },
  27595. "properties": {
  27596. "type": "object",
  27597. "properties": {}
  27598. }
  27599. },
  27600. "required": ["id", "type", "properties"],
  27601. "additionalProperties": false
  27602. },
  27603. "EventPluginAdded": {
  27604. "type": "object",
  27605. "properties": {
  27606. "id": {
  27607. "type": "string",
  27608. "pattern": "^evt_"
  27609. },
  27610. "type": {
  27611. "type": "string",
  27612. "enum": ["plugin.added"]
  27613. },
  27614. "properties": {
  27615. "type": "object",
  27616. "properties": {
  27617. "id": {
  27618. "type": "string"
  27619. }
  27620. },
  27621. "required": ["id"],
  27622. "additionalProperties": false
  27623. }
  27624. },
  27625. "required": ["id", "type", "properties"],
  27626. "additionalProperties": false
  27627. },
  27628. "ModelV2Info1": {
  27629. "type": "object",
  27630. "properties": {
  27631. "id": {
  27632. "type": "string"
  27633. },
  27634. "providerID": {
  27635. "type": "string"
  27636. },
  27637. "family": {
  27638. "type": "string"
  27639. },
  27640. "name": {
  27641. "type": "string"
  27642. },
  27643. "api": {
  27644. "anyOf": [
  27645. {
  27646. "type": "object",
  27647. "properties": {
  27648. "id": {
  27649. "type": "string"
  27650. },
  27651. "type": {
  27652. "type": "string",
  27653. "enum": ["aisdk"]
  27654. },
  27655. "package": {
  27656. "type": "string"
  27657. },
  27658. "url": {
  27659. "type": "string"
  27660. },
  27661. "settings": {
  27662. "type": "object"
  27663. }
  27664. },
  27665. "required": ["id", "type", "package"],
  27666. "additionalProperties": false
  27667. },
  27668. {
  27669. "type": "object",
  27670. "properties": {
  27671. "id": {
  27672. "type": "string"
  27673. },
  27674. "type": {
  27675. "type": "string",
  27676. "enum": ["native"]
  27677. },
  27678. "url": {
  27679. "type": "string"
  27680. },
  27681. "settings": {
  27682. "type": "object"
  27683. }
  27684. },
  27685. "required": ["id", "type", "settings"],
  27686. "additionalProperties": false
  27687. }
  27688. ]
  27689. },
  27690. "capabilities": {
  27691. "type": "object",
  27692. "properties": {
  27693. "tools": {
  27694. "type": "boolean"
  27695. },
  27696. "input": {
  27697. "type": "array",
  27698. "items": {
  27699. "type": "string"
  27700. }
  27701. },
  27702. "output": {
  27703. "type": "array",
  27704. "items": {
  27705. "type": "string"
  27706. }
  27707. }
  27708. },
  27709. "required": ["tools", "input", "output"],
  27710. "additionalProperties": false
  27711. },
  27712. "request": {
  27713. "type": "object",
  27714. "properties": {
  27715. "headers": {
  27716. "type": "object",
  27717. "additionalProperties": {
  27718. "type": "string"
  27719. }
  27720. },
  27721. "body": {
  27722. "type": "object"
  27723. },
  27724. "generation": {
  27725. "type": "object",
  27726. "properties": {
  27727. "maxTokens": {
  27728. "anyOf": [
  27729. {
  27730. "type": "number"
  27731. },
  27732. {
  27733. "type": "string",
  27734. "enum": ["NaN"]
  27735. },
  27736. {
  27737. "type": "string",
  27738. "enum": ["Infinity"]
  27739. },
  27740. {
  27741. "type": "string",
  27742. "enum": ["-Infinity"]
  27743. }
  27744. ]
  27745. },
  27746. "temperature": {
  27747. "anyOf": [
  27748. {
  27749. "type": "number"
  27750. },
  27751. {
  27752. "type": "string",
  27753. "enum": ["NaN"]
  27754. },
  27755. {
  27756. "type": "string",
  27757. "enum": ["Infinity"]
  27758. },
  27759. {
  27760. "type": "string",
  27761. "enum": ["-Infinity"]
  27762. }
  27763. ]
  27764. },
  27765. "topP": {
  27766. "anyOf": [
  27767. {
  27768. "type": "number"
  27769. },
  27770. {
  27771. "type": "string",
  27772. "enum": ["NaN"]
  27773. },
  27774. {
  27775. "type": "string",
  27776. "enum": ["Infinity"]
  27777. },
  27778. {
  27779. "type": "string",
  27780. "enum": ["-Infinity"]
  27781. }
  27782. ]
  27783. },
  27784. "topK": {
  27785. "anyOf": [
  27786. {
  27787. "type": "number"
  27788. },
  27789. {
  27790. "type": "string",
  27791. "enum": ["NaN"]
  27792. },
  27793. {
  27794. "type": "string",
  27795. "enum": ["Infinity"]
  27796. },
  27797. {
  27798. "type": "string",
  27799. "enum": ["-Infinity"]
  27800. }
  27801. ]
  27802. },
  27803. "frequencyPenalty": {
  27804. "anyOf": [
  27805. {
  27806. "type": "number"
  27807. },
  27808. {
  27809. "type": "string",
  27810. "enum": ["NaN"]
  27811. },
  27812. {
  27813. "type": "string",
  27814. "enum": ["Infinity"]
  27815. },
  27816. {
  27817. "type": "string",
  27818. "enum": ["-Infinity"]
  27819. }
  27820. ]
  27821. },
  27822. "presencePenalty": {
  27823. "anyOf": [
  27824. {
  27825. "type": "number"
  27826. },
  27827. {
  27828. "type": "string",
  27829. "enum": ["NaN"]
  27830. },
  27831. {
  27832. "type": "string",
  27833. "enum": ["Infinity"]
  27834. },
  27835. {
  27836. "type": "string",
  27837. "enum": ["-Infinity"]
  27838. }
  27839. ]
  27840. },
  27841. "seed": {
  27842. "anyOf": [
  27843. {
  27844. "type": "number"
  27845. },
  27846. {
  27847. "type": "string",
  27848. "enum": ["NaN"]
  27849. },
  27850. {
  27851. "type": "string",
  27852. "enum": ["Infinity"]
  27853. },
  27854. {
  27855. "type": "string",
  27856. "enum": ["-Infinity"]
  27857. }
  27858. ]
  27859. },
  27860. "stop": {
  27861. "type": "array",
  27862. "items": {
  27863. "type": "string"
  27864. }
  27865. }
  27866. },
  27867. "additionalProperties": false
  27868. },
  27869. "options": {
  27870. "type": "object"
  27871. },
  27872. "variant": {
  27873. "type": "string"
  27874. }
  27875. },
  27876. "required": ["headers", "body"],
  27877. "additionalProperties": false
  27878. },
  27879. "variants": {
  27880. "type": "array",
  27881. "items": {
  27882. "type": "object",
  27883. "properties": {
  27884. "id": {
  27885. "type": "string"
  27886. },
  27887. "headers": {
  27888. "type": "object",
  27889. "additionalProperties": {
  27890. "type": "string"
  27891. }
  27892. },
  27893. "body": {
  27894. "type": "object"
  27895. },
  27896. "generation": {
  27897. "type": "object",
  27898. "properties": {
  27899. "maxTokens": {
  27900. "anyOf": [
  27901. {
  27902. "type": "number"
  27903. },
  27904. {
  27905. "type": "string",
  27906. "enum": ["NaN"]
  27907. },
  27908. {
  27909. "type": "string",
  27910. "enum": ["Infinity"]
  27911. },
  27912. {
  27913. "type": "string",
  27914. "enum": ["-Infinity"]
  27915. }
  27916. ]
  27917. },
  27918. "temperature": {
  27919. "anyOf": [
  27920. {
  27921. "type": "number"
  27922. },
  27923. {
  27924. "type": "string",
  27925. "enum": ["NaN"]
  27926. },
  27927. {
  27928. "type": "string",
  27929. "enum": ["Infinity"]
  27930. },
  27931. {
  27932. "type": "string",
  27933. "enum": ["-Infinity"]
  27934. }
  27935. ]
  27936. },
  27937. "topP": {
  27938. "anyOf": [
  27939. {
  27940. "type": "number"
  27941. },
  27942. {
  27943. "type": "string",
  27944. "enum": ["NaN"]
  27945. },
  27946. {
  27947. "type": "string",
  27948. "enum": ["Infinity"]
  27949. },
  27950. {
  27951. "type": "string",
  27952. "enum": ["-Infinity"]
  27953. }
  27954. ]
  27955. },
  27956. "topK": {
  27957. "anyOf": [
  27958. {
  27959. "type": "number"
  27960. },
  27961. {
  27962. "type": "string",
  27963. "enum": ["NaN"]
  27964. },
  27965. {
  27966. "type": "string",
  27967. "enum": ["Infinity"]
  27968. },
  27969. {
  27970. "type": "string",
  27971. "enum": ["-Infinity"]
  27972. }
  27973. ]
  27974. },
  27975. "frequencyPenalty": {
  27976. "anyOf": [
  27977. {
  27978. "type": "number"
  27979. },
  27980. {
  27981. "type": "string",
  27982. "enum": ["NaN"]
  27983. },
  27984. {
  27985. "type": "string",
  27986. "enum": ["Infinity"]
  27987. },
  27988. {
  27989. "type": "string",
  27990. "enum": ["-Infinity"]
  27991. }
  27992. ]
  27993. },
  27994. "presencePenalty": {
  27995. "anyOf": [
  27996. {
  27997. "type": "number"
  27998. },
  27999. {
  28000. "type": "string",
  28001. "enum": ["NaN"]
  28002. },
  28003. {
  28004. "type": "string",
  28005. "enum": ["Infinity"]
  28006. },
  28007. {
  28008. "type": "string",
  28009. "enum": ["-Infinity"]
  28010. }
  28011. ]
  28012. },
  28013. "seed": {
  28014. "anyOf": [
  28015. {
  28016. "type": "number"
  28017. },
  28018. {
  28019. "type": "string",
  28020. "enum": ["NaN"]
  28021. },
  28022. {
  28023. "type": "string",
  28024. "enum": ["Infinity"]
  28025. },
  28026. {
  28027. "type": "string",
  28028. "enum": ["-Infinity"]
  28029. }
  28030. ]
  28031. },
  28032. "stop": {
  28033. "type": "array",
  28034. "items": {
  28035. "type": "string"
  28036. }
  28037. }
  28038. },
  28039. "additionalProperties": false
  28040. },
  28041. "options": {
  28042. "type": "object"
  28043. }
  28044. },
  28045. "required": ["id", "headers", "body"],
  28046. "additionalProperties": false
  28047. }
  28048. },
  28049. "time": {
  28050. "type": "object",
  28051. "properties": {
  28052. "released": {
  28053. "anyOf": [
  28054. {
  28055. "type": "number"
  28056. },
  28057. {
  28058. "type": "string",
  28059. "enum": ["NaN"]
  28060. },
  28061. {
  28062. "type": "string",
  28063. "enum": ["Infinity"]
  28064. },
  28065. {
  28066. "type": "string",
  28067. "enum": ["-Infinity"]
  28068. }
  28069. ]
  28070. }
  28071. },
  28072. "required": ["released"],
  28073. "additionalProperties": false
  28074. },
  28075. "cost": {
  28076. "type": "array",
  28077. "items": {
  28078. "type": "object",
  28079. "properties": {
  28080. "tier": {
  28081. "type": "object",
  28082. "properties": {
  28083. "type": {
  28084. "type": "string",
  28085. "enum": ["context"]
  28086. },
  28087. "size": {
  28088. "type": "integer"
  28089. }
  28090. },
  28091. "required": ["type", "size"],
  28092. "additionalProperties": false
  28093. },
  28094. "input": {
  28095. "type": "number"
  28096. },
  28097. "output": {
  28098. "type": "number"
  28099. },
  28100. "cache": {
  28101. "type": "object",
  28102. "properties": {
  28103. "read": {
  28104. "type": "number"
  28105. },
  28106. "write": {
  28107. "type": "number"
  28108. }
  28109. },
  28110. "required": ["read", "write"],
  28111. "additionalProperties": false
  28112. }
  28113. },
  28114. "required": ["input", "output", "cache"],
  28115. "additionalProperties": false
  28116. }
  28117. },
  28118. "status": {
  28119. "type": "string",
  28120. "enum": ["alpha", "beta", "deprecated", "active"]
  28121. },
  28122. "enabled": {
  28123. "type": "boolean"
  28124. },
  28125. "limit": {
  28126. "type": "object",
  28127. "properties": {
  28128. "context": {
  28129. "type": "integer"
  28130. },
  28131. "input": {
  28132. "type": "integer"
  28133. },
  28134. "output": {
  28135. "type": "integer"
  28136. }
  28137. },
  28138. "required": ["context", "output"],
  28139. "additionalProperties": false
  28140. }
  28141. },
  28142. "required": [
  28143. "id",
  28144. "providerID",
  28145. "name",
  28146. "api",
  28147. "capabilities",
  28148. "request",
  28149. "variants",
  28150. "time",
  28151. "cost",
  28152. "status",
  28153. "enabled",
  28154. "limit"
  28155. ],
  28156. "additionalProperties": false
  28157. },
  28158. "EventCatalogModelUpdated": {
  28159. "type": "object",
  28160. "properties": {
  28161. "id": {
  28162. "type": "string",
  28163. "pattern": "^evt_"
  28164. },
  28165. "type": {
  28166. "type": "string",
  28167. "enum": ["catalog.model.updated"]
  28168. },
  28169. "properties": {
  28170. "type": "object",
  28171. "properties": {
  28172. "model": {
  28173. "$ref": "#/components/schemas/ModelV2Info1"
  28174. }
  28175. },
  28176. "required": ["model"],
  28177. "additionalProperties": false
  28178. }
  28179. },
  28180. "required": ["id", "type", "properties"],
  28181. "additionalProperties": false
  28182. },
  28183. "EventSessionCreated": {
  28184. "type": "object",
  28185. "properties": {
  28186. "id": {
  28187. "type": "string",
  28188. "pattern": "^evt_"
  28189. },
  28190. "type": {
  28191. "type": "string",
  28192. "enum": ["session.created"]
  28193. },
  28194. "properties": {
  28195. "type": "object",
  28196. "properties": {
  28197. "sessionID": {
  28198. "type": "string",
  28199. "pattern": "^ses"
  28200. },
  28201. "info": {
  28202. "$ref": "#/components/schemas/Session"
  28203. }
  28204. },
  28205. "required": ["sessionID", "info"],
  28206. "additionalProperties": false
  28207. }
  28208. },
  28209. "required": ["id", "type", "properties"],
  28210. "additionalProperties": false
  28211. },
  28212. "EventSessionUpdated": {
  28213. "type": "object",
  28214. "properties": {
  28215. "id": {
  28216. "type": "string",
  28217. "pattern": "^evt_"
  28218. },
  28219. "type": {
  28220. "type": "string",
  28221. "enum": ["session.updated"]
  28222. },
  28223. "properties": {
  28224. "type": "object",
  28225. "properties": {
  28226. "sessionID": {
  28227. "type": "string",
  28228. "pattern": "^ses"
  28229. },
  28230. "info": {
  28231. "$ref": "#/components/schemas/Session"
  28232. }
  28233. },
  28234. "required": ["sessionID", "info"],
  28235. "additionalProperties": false
  28236. }
  28237. },
  28238. "required": ["id", "type", "properties"],
  28239. "additionalProperties": false
  28240. },
  28241. "EventSessionDeleted": {
  28242. "type": "object",
  28243. "properties": {
  28244. "id": {
  28245. "type": "string",
  28246. "pattern": "^evt_"
  28247. },
  28248. "type": {
  28249. "type": "string",
  28250. "enum": ["session.deleted"]
  28251. },
  28252. "properties": {
  28253. "type": "object",
  28254. "properties": {
  28255. "sessionID": {
  28256. "type": "string",
  28257. "pattern": "^ses"
  28258. },
  28259. "info": {
  28260. "$ref": "#/components/schemas/Session"
  28261. }
  28262. },
  28263. "required": ["sessionID", "info"],
  28264. "additionalProperties": false
  28265. }
  28266. },
  28267. "required": ["id", "type", "properties"],
  28268. "additionalProperties": false
  28269. },
  28270. "EventMessageUpdated": {
  28271. "type": "object",
  28272. "properties": {
  28273. "id": {
  28274. "type": "string",
  28275. "pattern": "^evt_"
  28276. },
  28277. "type": {
  28278. "type": "string",
  28279. "enum": ["message.updated"]
  28280. },
  28281. "properties": {
  28282. "type": "object",
  28283. "properties": {
  28284. "sessionID": {
  28285. "type": "string",
  28286. "pattern": "^ses"
  28287. },
  28288. "info": {
  28289. "$ref": "#/components/schemas/Message"
  28290. }
  28291. },
  28292. "required": ["sessionID", "info"],
  28293. "additionalProperties": false
  28294. }
  28295. },
  28296. "required": ["id", "type", "properties"],
  28297. "additionalProperties": false
  28298. },
  28299. "EventMessageRemoved": {
  28300. "type": "object",
  28301. "properties": {
  28302. "id": {
  28303. "type": "string",
  28304. "pattern": "^evt_"
  28305. },
  28306. "type": {
  28307. "type": "string",
  28308. "enum": ["message.removed"]
  28309. },
  28310. "properties": {
  28311. "type": "object",
  28312. "properties": {
  28313. "sessionID": {
  28314. "type": "string",
  28315. "pattern": "^ses"
  28316. },
  28317. "messageID": {
  28318. "type": "string",
  28319. "pattern": "^msg"
  28320. }
  28321. },
  28322. "required": ["sessionID", "messageID"],
  28323. "additionalProperties": false
  28324. }
  28325. },
  28326. "required": ["id", "type", "properties"],
  28327. "additionalProperties": false
  28328. },
  28329. "EventMessagePartUpdated": {
  28330. "type": "object",
  28331. "properties": {
  28332. "id": {
  28333. "type": "string",
  28334. "pattern": "^evt_"
  28335. },
  28336. "type": {
  28337. "type": "string",
  28338. "enum": ["message.part.updated"]
  28339. },
  28340. "properties": {
  28341. "type": "object",
  28342. "properties": {
  28343. "sessionID": {
  28344. "type": "string",
  28345. "pattern": "^ses"
  28346. },
  28347. "part": {
  28348. "$ref": "#/components/schemas/Part"
  28349. },
  28350. "time": {
  28351. "type": "number"
  28352. }
  28353. },
  28354. "required": ["sessionID", "part", "time"],
  28355. "additionalProperties": false
  28356. }
  28357. },
  28358. "required": ["id", "type", "properties"],
  28359. "additionalProperties": false
  28360. },
  28361. "EventMessagePartRemoved": {
  28362. "type": "object",
  28363. "properties": {
  28364. "id": {
  28365. "type": "string",
  28366. "pattern": "^evt_"
  28367. },
  28368. "type": {
  28369. "type": "string",
  28370. "enum": ["message.part.removed"]
  28371. },
  28372. "properties": {
  28373. "type": "object",
  28374. "properties": {
  28375. "sessionID": {
  28376. "type": "string",
  28377. "pattern": "^ses"
  28378. },
  28379. "messageID": {
  28380. "type": "string",
  28381. "pattern": "^msg"
  28382. },
  28383. "partID": {
  28384. "type": "string",
  28385. "pattern": "^prt"
  28386. }
  28387. },
  28388. "required": ["sessionID", "messageID", "partID"],
  28389. "additionalProperties": false
  28390. }
  28391. },
  28392. "required": ["id", "type", "properties"],
  28393. "additionalProperties": false
  28394. },
  28395. "EventSessionNextAgentSwitched": {
  28396. "type": "object",
  28397. "properties": {
  28398. "id": {
  28399. "type": "string",
  28400. "pattern": "^evt_"
  28401. },
  28402. "type": {
  28403. "type": "string",
  28404. "enum": ["session.next.agent.switched"]
  28405. },
  28406. "properties": {
  28407. "type": "object",
  28408. "properties": {
  28409. "timestamp": {
  28410. "type": "number"
  28411. },
  28412. "sessionID": {
  28413. "type": "string",
  28414. "pattern": "^ses"
  28415. },
  28416. "messageID": {
  28417. "type": "string",
  28418. "pattern": "^msg_"
  28419. },
  28420. "agent": {
  28421. "type": "string"
  28422. }
  28423. },
  28424. "required": ["timestamp", "sessionID", "messageID", "agent"],
  28425. "additionalProperties": false
  28426. }
  28427. },
  28428. "required": ["id", "type", "properties"],
  28429. "additionalProperties": false
  28430. },
  28431. "EventSessionNextModelSwitched": {
  28432. "type": "object",
  28433. "properties": {
  28434. "id": {
  28435. "type": "string",
  28436. "pattern": "^evt_"
  28437. },
  28438. "type": {
  28439. "type": "string",
  28440. "enum": ["session.next.model.switched"]
  28441. },
  28442. "properties": {
  28443. "type": "object",
  28444. "properties": {
  28445. "timestamp": {
  28446. "type": "number"
  28447. },
  28448. "sessionID": {
  28449. "type": "string",
  28450. "pattern": "^ses"
  28451. },
  28452. "messageID": {
  28453. "type": "string",
  28454. "pattern": "^msg_"
  28455. },
  28456. "model": {
  28457. "type": "object",
  28458. "properties": {
  28459. "id": {
  28460. "type": "string"
  28461. },
  28462. "providerID": {
  28463. "type": "string"
  28464. },
  28465. "variant": {
  28466. "type": "string"
  28467. }
  28468. },
  28469. "required": ["id", "providerID"],
  28470. "additionalProperties": false
  28471. }
  28472. },
  28473. "required": ["timestamp", "sessionID", "messageID", "model"],
  28474. "additionalProperties": false
  28475. }
  28476. },
  28477. "required": ["id", "type", "properties"],
  28478. "additionalProperties": false
  28479. },
  28480. "EventSessionNextMoved": {
  28481. "type": "object",
  28482. "properties": {
  28483. "id": {
  28484. "type": "string",
  28485. "pattern": "^evt_"
  28486. },
  28487. "type": {
  28488. "type": "string",
  28489. "enum": ["session.next.moved"]
  28490. },
  28491. "properties": {
  28492. "type": "object",
  28493. "properties": {
  28494. "timestamp": {
  28495. "type": "number"
  28496. },
  28497. "sessionID": {
  28498. "type": "string",
  28499. "pattern": "^ses"
  28500. },
  28501. "location": {
  28502. "$ref": "#/components/schemas/LocationRef"
  28503. },
  28504. "subdirectory": {
  28505. "type": "string"
  28506. }
  28507. },
  28508. "required": ["timestamp", "sessionID", "location"],
  28509. "additionalProperties": false
  28510. }
  28511. },
  28512. "required": ["id", "type", "properties"],
  28513. "additionalProperties": false
  28514. },
  28515. "EventSessionNextPrompted": {
  28516. "type": "object",
  28517. "properties": {
  28518. "id": {
  28519. "type": "string",
  28520. "pattern": "^evt_"
  28521. },
  28522. "type": {
  28523. "type": "string",
  28524. "enum": ["session.next.prompted"]
  28525. },
  28526. "properties": {
  28527. "type": "object",
  28528. "properties": {
  28529. "timestamp": {
  28530. "type": "number"
  28531. },
  28532. "sessionID": {
  28533. "type": "string",
  28534. "pattern": "^ses"
  28535. },
  28536. "messageID": {
  28537. "type": "string",
  28538. "pattern": "^msg_"
  28539. },
  28540. "prompt": {
  28541. "$ref": "#/components/schemas/Prompt"
  28542. },
  28543. "delivery": {
  28544. "type": "string",
  28545. "enum": ["steer", "queue"]
  28546. }
  28547. },
  28548. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28549. "additionalProperties": false
  28550. }
  28551. },
  28552. "required": ["id", "type", "properties"],
  28553. "additionalProperties": false
  28554. },
  28555. "EventSessionNextPromptAdmitted": {
  28556. "type": "object",
  28557. "properties": {
  28558. "id": {
  28559. "type": "string",
  28560. "pattern": "^evt_"
  28561. },
  28562. "type": {
  28563. "type": "string",
  28564. "enum": ["session.next.prompt.admitted"]
  28565. },
  28566. "properties": {
  28567. "type": "object",
  28568. "properties": {
  28569. "timestamp": {
  28570. "type": "number"
  28571. },
  28572. "sessionID": {
  28573. "type": "string",
  28574. "pattern": "^ses"
  28575. },
  28576. "messageID": {
  28577. "type": "string",
  28578. "pattern": "^msg_"
  28579. },
  28580. "prompt": {
  28581. "$ref": "#/components/schemas/Prompt"
  28582. },
  28583. "delivery": {
  28584. "type": "string",
  28585. "enum": ["steer", "queue"]
  28586. }
  28587. },
  28588. "required": ["timestamp", "sessionID", "messageID", "prompt", "delivery"],
  28589. "additionalProperties": false
  28590. }
  28591. },
  28592. "required": ["id", "type", "properties"],
  28593. "additionalProperties": false
  28594. },
  28595. "EventSessionNextPromptPromoted": {
  28596. "type": "object",
  28597. "properties": {
  28598. "id": {
  28599. "type": "string",
  28600. "pattern": "^evt_"
  28601. },
  28602. "type": {
  28603. "type": "string",
  28604. "enum": ["session.next.prompt.promoted"]
  28605. },
  28606. "properties": {
  28607. "type": "object",
  28608. "properties": {
  28609. "timestamp": {
  28610. "type": "number"
  28611. },
  28612. "sessionID": {
  28613. "type": "string",
  28614. "pattern": "^ses"
  28615. },
  28616. "messageID": {
  28617. "type": "string",
  28618. "pattern": "^msg_"
  28619. },
  28620. "prompt": {
  28621. "$ref": "#/components/schemas/Prompt"
  28622. },
  28623. "timeCreated": {
  28624. "type": "number"
  28625. }
  28626. },
  28627. "required": ["timestamp", "sessionID", "messageID", "prompt", "timeCreated"],
  28628. "additionalProperties": false
  28629. }
  28630. },
  28631. "required": ["id", "type", "properties"],
  28632. "additionalProperties": false
  28633. },
  28634. "EventSessionNextInterruptRequested": {
  28635. "type": "object",
  28636. "properties": {
  28637. "id": {
  28638. "type": "string",
  28639. "pattern": "^evt_"
  28640. },
  28641. "type": {
  28642. "type": "string",
  28643. "enum": ["session.next.interrupt.requested"]
  28644. },
  28645. "properties": {
  28646. "type": "object",
  28647. "properties": {
  28648. "timestamp": {
  28649. "type": "number"
  28650. },
  28651. "sessionID": {
  28652. "type": "string",
  28653. "pattern": "^ses"
  28654. }
  28655. },
  28656. "required": ["timestamp", "sessionID"],
  28657. "additionalProperties": false
  28658. }
  28659. },
  28660. "required": ["id", "type", "properties"],
  28661. "additionalProperties": false
  28662. },
  28663. "EventSessionNextContextUpdated": {
  28664. "type": "object",
  28665. "properties": {
  28666. "id": {
  28667. "type": "string",
  28668. "pattern": "^evt_"
  28669. },
  28670. "type": {
  28671. "type": "string",
  28672. "enum": ["session.next.context.updated"]
  28673. },
  28674. "properties": {
  28675. "type": "object",
  28676. "properties": {
  28677. "timestamp": {
  28678. "type": "number"
  28679. },
  28680. "sessionID": {
  28681. "type": "string",
  28682. "pattern": "^ses"
  28683. },
  28684. "messageID": {
  28685. "type": "string",
  28686. "pattern": "^msg_"
  28687. },
  28688. "text": {
  28689. "type": "string"
  28690. }
  28691. },
  28692. "required": ["timestamp", "sessionID", "messageID", "text"],
  28693. "additionalProperties": false
  28694. }
  28695. },
  28696. "required": ["id", "type", "properties"],
  28697. "additionalProperties": false
  28698. },
  28699. "EventSessionNextSynthetic": {
  28700. "type": "object",
  28701. "properties": {
  28702. "id": {
  28703. "type": "string",
  28704. "pattern": "^evt_"
  28705. },
  28706. "type": {
  28707. "type": "string",
  28708. "enum": ["session.next.synthetic"]
  28709. },
  28710. "properties": {
  28711. "type": "object",
  28712. "properties": {
  28713. "timestamp": {
  28714. "type": "number"
  28715. },
  28716. "sessionID": {
  28717. "type": "string",
  28718. "pattern": "^ses"
  28719. },
  28720. "messageID": {
  28721. "type": "string",
  28722. "pattern": "^msg_"
  28723. },
  28724. "text": {
  28725. "type": "string"
  28726. }
  28727. },
  28728. "required": ["timestamp", "sessionID", "messageID", "text"],
  28729. "additionalProperties": false
  28730. }
  28731. },
  28732. "required": ["id", "type", "properties"],
  28733. "additionalProperties": false
  28734. },
  28735. "EventSessionNextShellStarted": {
  28736. "type": "object",
  28737. "properties": {
  28738. "id": {
  28739. "type": "string",
  28740. "pattern": "^evt_"
  28741. },
  28742. "type": {
  28743. "type": "string",
  28744. "enum": ["session.next.shell.started"]
  28745. },
  28746. "properties": {
  28747. "type": "object",
  28748. "properties": {
  28749. "timestamp": {
  28750. "type": "number"
  28751. },
  28752. "sessionID": {
  28753. "type": "string",
  28754. "pattern": "^ses"
  28755. },
  28756. "messageID": {
  28757. "type": "string",
  28758. "pattern": "^msg_"
  28759. },
  28760. "callID": {
  28761. "type": "string"
  28762. },
  28763. "command": {
  28764. "type": "string"
  28765. }
  28766. },
  28767. "required": ["timestamp", "sessionID", "messageID", "callID", "command"],
  28768. "additionalProperties": false
  28769. }
  28770. },
  28771. "required": ["id", "type", "properties"],
  28772. "additionalProperties": false
  28773. },
  28774. "EventSessionNextShellEnded": {
  28775. "type": "object",
  28776. "properties": {
  28777. "id": {
  28778. "type": "string",
  28779. "pattern": "^evt_"
  28780. },
  28781. "type": {
  28782. "type": "string",
  28783. "enum": ["session.next.shell.ended"]
  28784. },
  28785. "properties": {
  28786. "type": "object",
  28787. "properties": {
  28788. "timestamp": {
  28789. "type": "number"
  28790. },
  28791. "sessionID": {
  28792. "type": "string",
  28793. "pattern": "^ses"
  28794. },
  28795. "callID": {
  28796. "type": "string"
  28797. },
  28798. "output": {
  28799. "type": "string"
  28800. }
  28801. },
  28802. "required": ["timestamp", "sessionID", "callID", "output"],
  28803. "additionalProperties": false
  28804. }
  28805. },
  28806. "required": ["id", "type", "properties"],
  28807. "additionalProperties": false
  28808. },
  28809. "EventSessionNextStepStarted": {
  28810. "type": "object",
  28811. "properties": {
  28812. "id": {
  28813. "type": "string",
  28814. "pattern": "^evt_"
  28815. },
  28816. "type": {
  28817. "type": "string",
  28818. "enum": ["session.next.step.started"]
  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. "agent": {
  28835. "type": "string"
  28836. },
  28837. "model": {
  28838. "type": "object",
  28839. "properties": {
  28840. "id": {
  28841. "type": "string"
  28842. },
  28843. "providerID": {
  28844. "type": "string"
  28845. },
  28846. "variant": {
  28847. "type": "string"
  28848. }
  28849. },
  28850. "required": ["id", "providerID"],
  28851. "additionalProperties": false
  28852. },
  28853. "snapshot": {
  28854. "type": "string"
  28855. }
  28856. },
  28857. "required": ["timestamp", "sessionID", "assistantMessageID", "agent", "model"],
  28858. "additionalProperties": false
  28859. }
  28860. },
  28861. "required": ["id", "type", "properties"],
  28862. "additionalProperties": false
  28863. },
  28864. "EventSessionNextStepEnded": {
  28865. "type": "object",
  28866. "properties": {
  28867. "id": {
  28868. "type": "string",
  28869. "pattern": "^evt_"
  28870. },
  28871. "type": {
  28872. "type": "string",
  28873. "enum": ["session.next.step.ended"]
  28874. },
  28875. "properties": {
  28876. "type": "object",
  28877. "properties": {
  28878. "timestamp": {
  28879. "type": "number"
  28880. },
  28881. "sessionID": {
  28882. "type": "string",
  28883. "pattern": "^ses"
  28884. },
  28885. "assistantMessageID": {
  28886. "type": "string",
  28887. "pattern": "^msg_"
  28888. },
  28889. "finish": {
  28890. "type": "string"
  28891. },
  28892. "cost": {
  28893. "type": "number"
  28894. },
  28895. "tokens": {
  28896. "type": "object",
  28897. "properties": {
  28898. "input": {
  28899. "type": "number"
  28900. },
  28901. "output": {
  28902. "type": "number"
  28903. },
  28904. "reasoning": {
  28905. "type": "number"
  28906. },
  28907. "cache": {
  28908. "type": "object",
  28909. "properties": {
  28910. "read": {
  28911. "type": "number"
  28912. },
  28913. "write": {
  28914. "type": "number"
  28915. }
  28916. },
  28917. "required": ["read", "write"],
  28918. "additionalProperties": false
  28919. }
  28920. },
  28921. "required": ["input", "output", "reasoning", "cache"],
  28922. "additionalProperties": false
  28923. },
  28924. "snapshot": {
  28925. "type": "string"
  28926. }
  28927. },
  28928. "required": ["timestamp", "sessionID", "assistantMessageID", "finish", "cost", "tokens"],
  28929. "additionalProperties": false
  28930. }
  28931. },
  28932. "required": ["id", "type", "properties"],
  28933. "additionalProperties": false
  28934. },
  28935. "EventSessionNextStepFailed": {
  28936. "type": "object",
  28937. "properties": {
  28938. "id": {
  28939. "type": "string",
  28940. "pattern": "^evt_"
  28941. },
  28942. "type": {
  28943. "type": "string",
  28944. "enum": ["session.next.step.failed"]
  28945. },
  28946. "properties": {
  28947. "type": "object",
  28948. "properties": {
  28949. "timestamp": {
  28950. "type": "number"
  28951. },
  28952. "sessionID": {
  28953. "type": "string",
  28954. "pattern": "^ses"
  28955. },
  28956. "assistantMessageID": {
  28957. "type": "string",
  28958. "pattern": "^msg_"
  28959. },
  28960. "error": {
  28961. "$ref": "#/components/schemas/SessionErrorUnknown"
  28962. }
  28963. },
  28964. "required": ["timestamp", "sessionID", "assistantMessageID", "error"],
  28965. "additionalProperties": false
  28966. }
  28967. },
  28968. "required": ["id", "type", "properties"],
  28969. "additionalProperties": false
  28970. },
  28971. "EventSessionNextTextStarted": {
  28972. "type": "object",
  28973. "properties": {
  28974. "id": {
  28975. "type": "string",
  28976. "pattern": "^evt_"
  28977. },
  28978. "type": {
  28979. "type": "string",
  28980. "enum": ["session.next.text.started"]
  28981. },
  28982. "properties": {
  28983. "type": "object",
  28984. "properties": {
  28985. "timestamp": {
  28986. "type": "number"
  28987. },
  28988. "sessionID": {
  28989. "type": "string",
  28990. "pattern": "^ses"
  28991. },
  28992. "assistantMessageID": {
  28993. "type": "string",
  28994. "pattern": "^msg_"
  28995. },
  28996. "textID": {
  28997. "type": "string"
  28998. }
  28999. },
  29000. "required": ["timestamp", "sessionID", "assistantMessageID", "textID"],
  29001. "additionalProperties": false
  29002. }
  29003. },
  29004. "required": ["id", "type", "properties"],
  29005. "additionalProperties": false
  29006. },
  29007. "EventSessionNextTextDelta": {
  29008. "type": "object",
  29009. "properties": {
  29010. "id": {
  29011. "type": "string",
  29012. "pattern": "^evt_"
  29013. },
  29014. "type": {
  29015. "type": "string",
  29016. "enum": ["session.next.text.delta"]
  29017. },
  29018. "properties": {
  29019. "type": "object",
  29020. "properties": {
  29021. "timestamp": {
  29022. "type": "number"
  29023. },
  29024. "sessionID": {
  29025. "type": "string",
  29026. "pattern": "^ses"
  29027. },
  29028. "assistantMessageID": {
  29029. "type": "string",
  29030. "pattern": "^msg_"
  29031. },
  29032. "textID": {
  29033. "type": "string"
  29034. },
  29035. "delta": {
  29036. "type": "string"
  29037. }
  29038. },
  29039. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "delta"],
  29040. "additionalProperties": false
  29041. }
  29042. },
  29043. "required": ["id", "type", "properties"],
  29044. "additionalProperties": false
  29045. },
  29046. "EventSessionNextTextEnded": {
  29047. "type": "object",
  29048. "properties": {
  29049. "id": {
  29050. "type": "string",
  29051. "pattern": "^evt_"
  29052. },
  29053. "type": {
  29054. "type": "string",
  29055. "enum": ["session.next.text.ended"]
  29056. },
  29057. "properties": {
  29058. "type": "object",
  29059. "properties": {
  29060. "timestamp": {
  29061. "type": "number"
  29062. },
  29063. "sessionID": {
  29064. "type": "string",
  29065. "pattern": "^ses"
  29066. },
  29067. "assistantMessageID": {
  29068. "type": "string",
  29069. "pattern": "^msg_"
  29070. },
  29071. "textID": {
  29072. "type": "string"
  29073. },
  29074. "text": {
  29075. "type": "string"
  29076. }
  29077. },
  29078. "required": ["timestamp", "sessionID", "assistantMessageID", "textID", "text"],
  29079. "additionalProperties": false
  29080. }
  29081. },
  29082. "required": ["id", "type", "properties"],
  29083. "additionalProperties": false
  29084. },
  29085. "EventSessionNextReasoningStarted": {
  29086. "type": "object",
  29087. "properties": {
  29088. "id": {
  29089. "type": "string",
  29090. "pattern": "^evt_"
  29091. },
  29092. "type": {
  29093. "type": "string",
  29094. "enum": ["session.next.reasoning.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. "assistantMessageID": {
  29107. "type": "string",
  29108. "pattern": "^msg_"
  29109. },
  29110. "reasoningID": {
  29111. "type": "string"
  29112. },
  29113. "providerMetadata": {
  29114. "type": "object",
  29115. "additionalProperties": {
  29116. "type": "object"
  29117. }
  29118. }
  29119. },
  29120. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID"],
  29121. "additionalProperties": false
  29122. }
  29123. },
  29124. "required": ["id", "type", "properties"],
  29125. "additionalProperties": false
  29126. },
  29127. "EventSessionNextReasoningDelta": {
  29128. "type": "object",
  29129. "properties": {
  29130. "id": {
  29131. "type": "string",
  29132. "pattern": "^evt_"
  29133. },
  29134. "type": {
  29135. "type": "string",
  29136. "enum": ["session.next.reasoning.delta"]
  29137. },
  29138. "properties": {
  29139. "type": "object",
  29140. "properties": {
  29141. "timestamp": {
  29142. "type": "number"
  29143. },
  29144. "sessionID": {
  29145. "type": "string",
  29146. "pattern": "^ses"
  29147. },
  29148. "assistantMessageID": {
  29149. "type": "string",
  29150. "pattern": "^msg_"
  29151. },
  29152. "reasoningID": {
  29153. "type": "string"
  29154. },
  29155. "delta": {
  29156. "type": "string"
  29157. }
  29158. },
  29159. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "delta"],
  29160. "additionalProperties": false
  29161. }
  29162. },
  29163. "required": ["id", "type", "properties"],
  29164. "additionalProperties": false
  29165. },
  29166. "EventSessionNextReasoningEnded": {
  29167. "type": "object",
  29168. "properties": {
  29169. "id": {
  29170. "type": "string",
  29171. "pattern": "^evt_"
  29172. },
  29173. "type": {
  29174. "type": "string",
  29175. "enum": ["session.next.reasoning.ended"]
  29176. },
  29177. "properties": {
  29178. "type": "object",
  29179. "properties": {
  29180. "timestamp": {
  29181. "type": "number"
  29182. },
  29183. "sessionID": {
  29184. "type": "string",
  29185. "pattern": "^ses"
  29186. },
  29187. "assistantMessageID": {
  29188. "type": "string",
  29189. "pattern": "^msg_"
  29190. },
  29191. "reasoningID": {
  29192. "type": "string"
  29193. },
  29194. "text": {
  29195. "type": "string"
  29196. },
  29197. "providerMetadata": {
  29198. "type": "object",
  29199. "additionalProperties": {
  29200. "type": "object"
  29201. }
  29202. }
  29203. },
  29204. "required": ["timestamp", "sessionID", "assistantMessageID", "reasoningID", "text"],
  29205. "additionalProperties": false
  29206. }
  29207. },
  29208. "required": ["id", "type", "properties"],
  29209. "additionalProperties": false
  29210. },
  29211. "EventSessionNextToolInputStarted": {
  29212. "type": "object",
  29213. "properties": {
  29214. "id": {
  29215. "type": "string",
  29216. "pattern": "^evt_"
  29217. },
  29218. "type": {
  29219. "type": "string",
  29220. "enum": ["session.next.tool.input.started"]
  29221. },
  29222. "properties": {
  29223. "type": "object",
  29224. "properties": {
  29225. "timestamp": {
  29226. "type": "number"
  29227. },
  29228. "sessionID": {
  29229. "type": "string",
  29230. "pattern": "^ses"
  29231. },
  29232. "assistantMessageID": {
  29233. "type": "string",
  29234. "pattern": "^msg_"
  29235. },
  29236. "callID": {
  29237. "type": "string"
  29238. },
  29239. "name": {
  29240. "type": "string"
  29241. }
  29242. },
  29243. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "name"],
  29244. "additionalProperties": false
  29245. }
  29246. },
  29247. "required": ["id", "type", "properties"],
  29248. "additionalProperties": false
  29249. },
  29250. "EventSessionNextToolInputDelta": {
  29251. "type": "object",
  29252. "properties": {
  29253. "id": {
  29254. "type": "string",
  29255. "pattern": "^evt_"
  29256. },
  29257. "type": {
  29258. "type": "string",
  29259. "enum": ["session.next.tool.input.delta"]
  29260. },
  29261. "properties": {
  29262. "type": "object",
  29263. "properties": {
  29264. "timestamp": {
  29265. "type": "number"
  29266. },
  29267. "sessionID": {
  29268. "type": "string",
  29269. "pattern": "^ses"
  29270. },
  29271. "assistantMessageID": {
  29272. "type": "string",
  29273. "pattern": "^msg_"
  29274. },
  29275. "callID": {
  29276. "type": "string"
  29277. },
  29278. "delta": {
  29279. "type": "string"
  29280. }
  29281. },
  29282. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "delta"],
  29283. "additionalProperties": false
  29284. }
  29285. },
  29286. "required": ["id", "type", "properties"],
  29287. "additionalProperties": false
  29288. },
  29289. "EventSessionNextToolInputEnded": {
  29290. "type": "object",
  29291. "properties": {
  29292. "id": {
  29293. "type": "string",
  29294. "pattern": "^evt_"
  29295. },
  29296. "type": {
  29297. "type": "string",
  29298. "enum": ["session.next.tool.input.ended"]
  29299. },
  29300. "properties": {
  29301. "type": "object",
  29302. "properties": {
  29303. "timestamp": {
  29304. "type": "number"
  29305. },
  29306. "sessionID": {
  29307. "type": "string",
  29308. "pattern": "^ses"
  29309. },
  29310. "assistantMessageID": {
  29311. "type": "string",
  29312. "pattern": "^msg_"
  29313. },
  29314. "callID": {
  29315. "type": "string"
  29316. },
  29317. "text": {
  29318. "type": "string"
  29319. }
  29320. },
  29321. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "text"],
  29322. "additionalProperties": false
  29323. }
  29324. },
  29325. "required": ["id", "type", "properties"],
  29326. "additionalProperties": false
  29327. },
  29328. "EventSessionNextToolCalled": {
  29329. "type": "object",
  29330. "properties": {
  29331. "id": {
  29332. "type": "string",
  29333. "pattern": "^evt_"
  29334. },
  29335. "type": {
  29336. "type": "string",
  29337. "enum": ["session.next.tool.called"]
  29338. },
  29339. "properties": {
  29340. "type": "object",
  29341. "properties": {
  29342. "timestamp": {
  29343. "type": "number"
  29344. },
  29345. "sessionID": {
  29346. "type": "string",
  29347. "pattern": "^ses"
  29348. },
  29349. "assistantMessageID": {
  29350. "type": "string",
  29351. "pattern": "^msg_"
  29352. },
  29353. "callID": {
  29354. "type": "string"
  29355. },
  29356. "tool": {
  29357. "type": "string"
  29358. },
  29359. "input": {
  29360. "type": "object"
  29361. },
  29362. "provider": {
  29363. "type": "object",
  29364. "properties": {
  29365. "executed": {
  29366. "type": "boolean"
  29367. },
  29368. "metadata": {
  29369. "type": "object",
  29370. "additionalProperties": {
  29371. "type": "object"
  29372. }
  29373. }
  29374. },
  29375. "required": ["executed"],
  29376. "additionalProperties": false
  29377. }
  29378. },
  29379. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "tool", "input", "provider"],
  29380. "additionalProperties": false
  29381. }
  29382. },
  29383. "required": ["id", "type", "properties"],
  29384. "additionalProperties": false
  29385. },
  29386. "EventSessionNextToolProgress": {
  29387. "type": "object",
  29388. "properties": {
  29389. "id": {
  29390. "type": "string",
  29391. "pattern": "^evt_"
  29392. },
  29393. "type": {
  29394. "type": "string",
  29395. "enum": ["session.next.tool.progress"]
  29396. },
  29397. "properties": {
  29398. "type": "object",
  29399. "properties": {
  29400. "timestamp": {
  29401. "type": "number"
  29402. },
  29403. "sessionID": {
  29404. "type": "string",
  29405. "pattern": "^ses"
  29406. },
  29407. "assistantMessageID": {
  29408. "type": "string",
  29409. "pattern": "^msg_"
  29410. },
  29411. "callID": {
  29412. "type": "string"
  29413. },
  29414. "structured": {
  29415. "type": "object"
  29416. },
  29417. "content": {
  29418. "type": "array",
  29419. "items": {
  29420. "anyOf": [
  29421. {
  29422. "$ref": "#/components/schemas/ToolTextContent"
  29423. },
  29424. {
  29425. "$ref": "#/components/schemas/ToolFileContent"
  29426. }
  29427. ]
  29428. }
  29429. }
  29430. },
  29431. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content"],
  29432. "additionalProperties": false
  29433. }
  29434. },
  29435. "required": ["id", "type", "properties"],
  29436. "additionalProperties": false
  29437. },
  29438. "EventSessionNextToolSuccess": {
  29439. "type": "object",
  29440. "properties": {
  29441. "id": {
  29442. "type": "string",
  29443. "pattern": "^evt_"
  29444. },
  29445. "type": {
  29446. "type": "string",
  29447. "enum": ["session.next.tool.success"]
  29448. },
  29449. "properties": {
  29450. "type": "object",
  29451. "properties": {
  29452. "timestamp": {
  29453. "type": "number"
  29454. },
  29455. "sessionID": {
  29456. "type": "string",
  29457. "pattern": "^ses"
  29458. },
  29459. "assistantMessageID": {
  29460. "type": "string",
  29461. "pattern": "^msg_"
  29462. },
  29463. "callID": {
  29464. "type": "string"
  29465. },
  29466. "structured": {
  29467. "type": "object"
  29468. },
  29469. "content": {
  29470. "type": "array",
  29471. "items": {
  29472. "anyOf": [
  29473. {
  29474. "$ref": "#/components/schemas/ToolTextContent"
  29475. },
  29476. {
  29477. "$ref": "#/components/schemas/ToolFileContent"
  29478. }
  29479. ]
  29480. }
  29481. },
  29482. "outputPaths": {
  29483. "type": "array",
  29484. "items": {
  29485. "type": "string"
  29486. }
  29487. },
  29488. "result": {},
  29489. "provider": {
  29490. "type": "object",
  29491. "properties": {
  29492. "executed": {
  29493. "type": "boolean"
  29494. },
  29495. "metadata": {
  29496. "type": "object",
  29497. "additionalProperties": {
  29498. "type": "object"
  29499. }
  29500. }
  29501. },
  29502. "required": ["executed"],
  29503. "additionalProperties": false
  29504. }
  29505. },
  29506. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "structured", "content", "provider"],
  29507. "additionalProperties": false
  29508. }
  29509. },
  29510. "required": ["id", "type", "properties"],
  29511. "additionalProperties": false
  29512. },
  29513. "EventSessionNextToolFailed": {
  29514. "type": "object",
  29515. "properties": {
  29516. "id": {
  29517. "type": "string",
  29518. "pattern": "^evt_"
  29519. },
  29520. "type": {
  29521. "type": "string",
  29522. "enum": ["session.next.tool.failed"]
  29523. },
  29524. "properties": {
  29525. "type": "object",
  29526. "properties": {
  29527. "timestamp": {
  29528. "type": "number"
  29529. },
  29530. "sessionID": {
  29531. "type": "string",
  29532. "pattern": "^ses"
  29533. },
  29534. "assistantMessageID": {
  29535. "type": "string",
  29536. "pattern": "^msg_"
  29537. },
  29538. "callID": {
  29539. "type": "string"
  29540. },
  29541. "error": {
  29542. "$ref": "#/components/schemas/SessionErrorUnknown"
  29543. },
  29544. "result": {},
  29545. "provider": {
  29546. "type": "object",
  29547. "properties": {
  29548. "executed": {
  29549. "type": "boolean"
  29550. },
  29551. "metadata": {
  29552. "type": "object",
  29553. "additionalProperties": {
  29554. "type": "object"
  29555. }
  29556. }
  29557. },
  29558. "required": ["executed"],
  29559. "additionalProperties": false
  29560. }
  29561. },
  29562. "required": ["timestamp", "sessionID", "assistantMessageID", "callID", "error", "provider"],
  29563. "additionalProperties": false
  29564. }
  29565. },
  29566. "required": ["id", "type", "properties"],
  29567. "additionalProperties": false
  29568. },
  29569. "EventSessionNextRetried": {
  29570. "type": "object",
  29571. "properties": {
  29572. "id": {
  29573. "type": "string",
  29574. "pattern": "^evt_"
  29575. },
  29576. "type": {
  29577. "type": "string",
  29578. "enum": ["session.next.retried"]
  29579. },
  29580. "properties": {
  29581. "type": "object",
  29582. "properties": {
  29583. "timestamp": {
  29584. "type": "number"
  29585. },
  29586. "sessionID": {
  29587. "type": "string",
  29588. "pattern": "^ses"
  29589. },
  29590. "attempt": {
  29591. "type": "number"
  29592. },
  29593. "error": {
  29594. "$ref": "#/components/schemas/SessionNextRetry_error"
  29595. }
  29596. },
  29597. "required": ["timestamp", "sessionID", "attempt", "error"],
  29598. "additionalProperties": false
  29599. }
  29600. },
  29601. "required": ["id", "type", "properties"],
  29602. "additionalProperties": false
  29603. },
  29604. "EventSessionNextCompactionStarted": {
  29605. "type": "object",
  29606. "properties": {
  29607. "id": {
  29608. "type": "string",
  29609. "pattern": "^evt_"
  29610. },
  29611. "type": {
  29612. "type": "string",
  29613. "enum": ["session.next.compaction.started"]
  29614. },
  29615. "properties": {
  29616. "type": "object",
  29617. "properties": {
  29618. "timestamp": {
  29619. "type": "number"
  29620. },
  29621. "sessionID": {
  29622. "type": "string",
  29623. "pattern": "^ses"
  29624. },
  29625. "messageID": {
  29626. "type": "string",
  29627. "pattern": "^msg_"
  29628. },
  29629. "reason": {
  29630. "type": "string",
  29631. "enum": ["auto", "manual"]
  29632. }
  29633. },
  29634. "required": ["timestamp", "sessionID", "messageID", "reason"],
  29635. "additionalProperties": false
  29636. }
  29637. },
  29638. "required": ["id", "type", "properties"],
  29639. "additionalProperties": false
  29640. },
  29641. "EventSessionNextCompactionDelta": {
  29642. "type": "object",
  29643. "properties": {
  29644. "id": {
  29645. "type": "string",
  29646. "pattern": "^evt_"
  29647. },
  29648. "type": {
  29649. "type": "string",
  29650. "enum": ["session.next.compaction.delta"]
  29651. },
  29652. "properties": {
  29653. "type": "object",
  29654. "properties": {
  29655. "timestamp": {
  29656. "type": "number"
  29657. },
  29658. "sessionID": {
  29659. "type": "string",
  29660. "pattern": "^ses"
  29661. },
  29662. "messageID": {
  29663. "type": "string",
  29664. "pattern": "^msg_"
  29665. },
  29666. "text": {
  29667. "type": "string"
  29668. }
  29669. },
  29670. "required": ["timestamp", "sessionID", "messageID", "text"],
  29671. "additionalProperties": false
  29672. }
  29673. },
  29674. "required": ["id", "type", "properties"],
  29675. "additionalProperties": false
  29676. },
  29677. "EventSessionNextCompactionEnded": {
  29678. "type": "object",
  29679. "properties": {
  29680. "id": {
  29681. "type": "string",
  29682. "pattern": "^evt_"
  29683. },
  29684. "type": {
  29685. "type": "string",
  29686. "enum": ["session.next.compaction.ended"]
  29687. },
  29688. "properties": {
  29689. "type": "object",
  29690. "properties": {
  29691. "timestamp": {
  29692. "type": "number"
  29693. },
  29694. "sessionID": {
  29695. "type": "string",
  29696. "pattern": "^ses"
  29697. },
  29698. "messageID": {
  29699. "type": "string",
  29700. "pattern": "^msg_"
  29701. },
  29702. "reason": {
  29703. "type": "string",
  29704. "enum": ["auto", "manual"]
  29705. },
  29706. "text": {
  29707. "type": "string"
  29708. },
  29709. "recent": {
  29710. "type": "string"
  29711. }
  29712. },
  29713. "required": ["timestamp", "sessionID", "messageID", "reason", "text", "recent"],
  29714. "additionalProperties": false
  29715. }
  29716. },
  29717. "required": ["id", "type", "properties"],
  29718. "additionalProperties": false
  29719. },
  29720. "EventMessagePartDelta": {
  29721. "type": "object",
  29722. "properties": {
  29723. "id": {
  29724. "type": "string",
  29725. "pattern": "^evt_"
  29726. },
  29727. "type": {
  29728. "type": "string",
  29729. "enum": ["message.part.delta"]
  29730. },
  29731. "properties": {
  29732. "type": "object",
  29733. "properties": {
  29734. "sessionID": {
  29735. "type": "string",
  29736. "pattern": "^ses"
  29737. },
  29738. "messageID": {
  29739. "type": "string",
  29740. "pattern": "^msg"
  29741. },
  29742. "partID": {
  29743. "type": "string",
  29744. "pattern": "^prt"
  29745. },
  29746. "field": {
  29747. "type": "string"
  29748. },
  29749. "delta": {
  29750. "type": "string"
  29751. }
  29752. },
  29753. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  29754. "additionalProperties": false
  29755. }
  29756. },
  29757. "required": ["id", "type", "properties"],
  29758. "additionalProperties": false
  29759. },
  29760. "EventSessionDiff": {
  29761. "type": "object",
  29762. "properties": {
  29763. "id": {
  29764. "type": "string",
  29765. "pattern": "^evt_"
  29766. },
  29767. "type": {
  29768. "type": "string",
  29769. "enum": ["session.diff"]
  29770. },
  29771. "properties": {
  29772. "type": "object",
  29773. "properties": {
  29774. "sessionID": {
  29775. "type": "string",
  29776. "pattern": "^ses"
  29777. },
  29778. "diff": {
  29779. "type": "array",
  29780. "items": {
  29781. "$ref": "#/components/schemas/SnapshotFileDiff"
  29782. }
  29783. }
  29784. },
  29785. "required": ["sessionID", "diff"],
  29786. "additionalProperties": false
  29787. }
  29788. },
  29789. "required": ["id", "type", "properties"],
  29790. "additionalProperties": false
  29791. },
  29792. "EventSessionError": {
  29793. "type": "object",
  29794. "properties": {
  29795. "id": {
  29796. "type": "string",
  29797. "pattern": "^evt_"
  29798. },
  29799. "type": {
  29800. "type": "string",
  29801. "enum": ["session.error"]
  29802. },
  29803. "properties": {
  29804. "type": "object",
  29805. "properties": {
  29806. "sessionID": {
  29807. "type": "string",
  29808. "pattern": "^ses"
  29809. },
  29810. "error": {
  29811. "anyOf": [
  29812. {
  29813. "$ref": "#/components/schemas/ProviderAuthError"
  29814. },
  29815. {
  29816. "$ref": "#/components/schemas/UnknownError"
  29817. },
  29818. {
  29819. "$ref": "#/components/schemas/MessageOutputLengthError"
  29820. },
  29821. {
  29822. "$ref": "#/components/schemas/MessageAbortedError"
  29823. },
  29824. {
  29825. "$ref": "#/components/schemas/StructuredOutputError"
  29826. },
  29827. {
  29828. "$ref": "#/components/schemas/ContextOverflowError"
  29829. },
  29830. {
  29831. "$ref": "#/components/schemas/ContentFilterError"
  29832. },
  29833. {
  29834. "$ref": "#/components/schemas/APIError"
  29835. }
  29836. ]
  29837. }
  29838. },
  29839. "additionalProperties": false
  29840. }
  29841. },
  29842. "required": ["id", "type", "properties"],
  29843. "additionalProperties": false
  29844. },
  29845. "EventInstallationUpdated": {
  29846. "type": "object",
  29847. "properties": {
  29848. "id": {
  29849. "type": "string",
  29850. "pattern": "^evt_"
  29851. },
  29852. "type": {
  29853. "type": "string",
  29854. "enum": ["installation.updated"]
  29855. },
  29856. "properties": {
  29857. "type": "object",
  29858. "properties": {
  29859. "version": {
  29860. "type": "string"
  29861. }
  29862. },
  29863. "required": ["version"],
  29864. "additionalProperties": false
  29865. }
  29866. },
  29867. "required": ["id", "type", "properties"],
  29868. "additionalProperties": false
  29869. },
  29870. "EventInstallationUpdate-available": {
  29871. "type": "object",
  29872. "properties": {
  29873. "id": {
  29874. "type": "string",
  29875. "pattern": "^evt_"
  29876. },
  29877. "type": {
  29878. "type": "string",
  29879. "enum": ["installation.update-available"]
  29880. },
  29881. "properties": {
  29882. "type": "object",
  29883. "properties": {
  29884. "version": {
  29885. "type": "string"
  29886. }
  29887. },
  29888. "required": ["version"],
  29889. "additionalProperties": false
  29890. }
  29891. },
  29892. "required": ["id", "type", "properties"],
  29893. "additionalProperties": false
  29894. },
  29895. "EventFileEdited": {
  29896. "type": "object",
  29897. "properties": {
  29898. "id": {
  29899. "type": "string",
  29900. "pattern": "^evt_"
  29901. },
  29902. "type": {
  29903. "type": "string",
  29904. "enum": ["file.edited"]
  29905. },
  29906. "properties": {
  29907. "type": "object",
  29908. "properties": {
  29909. "file": {
  29910. "type": "string"
  29911. }
  29912. },
  29913. "required": ["file"],
  29914. "additionalProperties": false
  29915. }
  29916. },
  29917. "required": ["id", "type", "properties"],
  29918. "additionalProperties": false
  29919. },
  29920. "EventIntegrationUpdated": {
  29921. "type": "object",
  29922. "properties": {
  29923. "id": {
  29924. "type": "string",
  29925. "pattern": "^evt_"
  29926. },
  29927. "type": {
  29928. "type": "string",
  29929. "enum": ["integration.updated"]
  29930. },
  29931. "properties": {
  29932. "type": "object",
  29933. "properties": {}
  29934. }
  29935. },
  29936. "required": ["id", "type", "properties"],
  29937. "additionalProperties": false
  29938. },
  29939. "EventPermissionV2Asked": {
  29940. "type": "object",
  29941. "properties": {
  29942. "id": {
  29943. "type": "string",
  29944. "pattern": "^evt_"
  29945. },
  29946. "type": {
  29947. "type": "string",
  29948. "enum": ["permission.v2.asked"]
  29949. },
  29950. "properties": {
  29951. "type": "object",
  29952. "properties": {
  29953. "id": {
  29954. "type": "string",
  29955. "pattern": "^per"
  29956. },
  29957. "sessionID": {
  29958. "type": "string",
  29959. "pattern": "^ses"
  29960. },
  29961. "action": {
  29962. "type": "string"
  29963. },
  29964. "resources": {
  29965. "type": "array",
  29966. "items": {
  29967. "type": "string"
  29968. }
  29969. },
  29970. "save": {
  29971. "type": "array",
  29972. "items": {
  29973. "type": "string"
  29974. }
  29975. },
  29976. "metadata": {
  29977. "type": "object"
  29978. },
  29979. "source": {
  29980. "$ref": "#/components/schemas/PermissionV2Source"
  29981. }
  29982. },
  29983. "required": ["id", "sessionID", "action", "resources"],
  29984. "additionalProperties": false
  29985. }
  29986. },
  29987. "required": ["id", "type", "properties"],
  29988. "additionalProperties": false
  29989. },
  29990. "EventPermissionV2Replied": {
  29991. "type": "object",
  29992. "properties": {
  29993. "id": {
  29994. "type": "string",
  29995. "pattern": "^evt_"
  29996. },
  29997. "type": {
  29998. "type": "string",
  29999. "enum": ["permission.v2.replied"]
  30000. },
  30001. "properties": {
  30002. "type": "object",
  30003. "properties": {
  30004. "sessionID": {
  30005. "type": "string",
  30006. "pattern": "^ses"
  30007. },
  30008. "requestID": {
  30009. "type": "string",
  30010. "pattern": "^per"
  30011. },
  30012. "reply": {
  30013. "$ref": "#/components/schemas/PermissionV2Reply"
  30014. }
  30015. },
  30016. "required": ["sessionID", "requestID", "reply"],
  30017. "additionalProperties": false
  30018. }
  30019. },
  30020. "required": ["id", "type", "properties"],
  30021. "additionalProperties": false
  30022. },
  30023. "EventReferenceUpdated": {
  30024. "type": "object",
  30025. "properties": {
  30026. "id": {
  30027. "type": "string",
  30028. "pattern": "^evt_"
  30029. },
  30030. "type": {
  30031. "type": "string",
  30032. "enum": ["reference.updated"]
  30033. },
  30034. "properties": {
  30035. "type": "object",
  30036. "properties": {}
  30037. }
  30038. },
  30039. "required": ["id", "type", "properties"],
  30040. "additionalProperties": false
  30041. },
  30042. "EventProjectDirectoriesUpdated": {
  30043. "type": "object",
  30044. "properties": {
  30045. "id": {
  30046. "type": "string",
  30047. "pattern": "^evt_"
  30048. },
  30049. "type": {
  30050. "type": "string",
  30051. "enum": ["project.directories.updated"]
  30052. },
  30053. "properties": {
  30054. "type": "object",
  30055. "properties": {
  30056. "projectID": {
  30057. "type": "string"
  30058. }
  30059. },
  30060. "required": ["projectID"],
  30061. "additionalProperties": false
  30062. }
  30063. },
  30064. "required": ["id", "type", "properties"],
  30065. "additionalProperties": false
  30066. },
  30067. "EventFileWatcherUpdated": {
  30068. "type": "object",
  30069. "properties": {
  30070. "id": {
  30071. "type": "string",
  30072. "pattern": "^evt_"
  30073. },
  30074. "type": {
  30075. "type": "string",
  30076. "enum": ["file.watcher.updated"]
  30077. },
  30078. "properties": {
  30079. "type": "object",
  30080. "properties": {
  30081. "file": {
  30082. "type": "string"
  30083. },
  30084. "event": {
  30085. "type": "string",
  30086. "enum": ["add", "change", "unlink"]
  30087. }
  30088. },
  30089. "required": ["file", "event"],
  30090. "additionalProperties": false
  30091. }
  30092. },
  30093. "required": ["id", "type", "properties"],
  30094. "additionalProperties": false
  30095. },
  30096. "EventPtyCreated": {
  30097. "type": "object",
  30098. "properties": {
  30099. "id": {
  30100. "type": "string",
  30101. "pattern": "^evt_"
  30102. },
  30103. "type": {
  30104. "type": "string",
  30105. "enum": ["pty.created"]
  30106. },
  30107. "properties": {
  30108. "type": "object",
  30109. "properties": {
  30110. "info": {
  30111. "$ref": "#/components/schemas/Pty"
  30112. }
  30113. },
  30114. "required": ["info"],
  30115. "additionalProperties": false
  30116. }
  30117. },
  30118. "required": ["id", "type", "properties"],
  30119. "additionalProperties": false
  30120. },
  30121. "EventPtyUpdated": {
  30122. "type": "object",
  30123. "properties": {
  30124. "id": {
  30125. "type": "string",
  30126. "pattern": "^evt_"
  30127. },
  30128. "type": {
  30129. "type": "string",
  30130. "enum": ["pty.updated"]
  30131. },
  30132. "properties": {
  30133. "type": "object",
  30134. "properties": {
  30135. "info": {
  30136. "$ref": "#/components/schemas/Pty"
  30137. }
  30138. },
  30139. "required": ["info"],
  30140. "additionalProperties": false
  30141. }
  30142. },
  30143. "required": ["id", "type", "properties"],
  30144. "additionalProperties": false
  30145. },
  30146. "EventPtyExited": {
  30147. "type": "object",
  30148. "properties": {
  30149. "id": {
  30150. "type": "string",
  30151. "pattern": "^evt_"
  30152. },
  30153. "type": {
  30154. "type": "string",
  30155. "enum": ["pty.exited"]
  30156. },
  30157. "properties": {
  30158. "type": "object",
  30159. "properties": {
  30160. "id": {
  30161. "type": "string",
  30162. "pattern": "^pty"
  30163. },
  30164. "exitCode": {
  30165. "type": "integer",
  30166. "minimum": 0
  30167. }
  30168. },
  30169. "required": ["id", "exitCode"],
  30170. "additionalProperties": false
  30171. }
  30172. },
  30173. "required": ["id", "type", "properties"],
  30174. "additionalProperties": false
  30175. },
  30176. "EventPtyDeleted": {
  30177. "type": "object",
  30178. "properties": {
  30179. "id": {
  30180. "type": "string",
  30181. "pattern": "^evt_"
  30182. },
  30183. "type": {
  30184. "type": "string",
  30185. "enum": ["pty.deleted"]
  30186. },
  30187. "properties": {
  30188. "type": "object",
  30189. "properties": {
  30190. "id": {
  30191. "type": "string",
  30192. "pattern": "^pty"
  30193. }
  30194. },
  30195. "required": ["id"],
  30196. "additionalProperties": false
  30197. }
  30198. },
  30199. "required": ["id", "type", "properties"],
  30200. "additionalProperties": false
  30201. },
  30202. "EventQuestionV2Asked": {
  30203. "type": "object",
  30204. "properties": {
  30205. "id": {
  30206. "type": "string",
  30207. "pattern": "^evt_"
  30208. },
  30209. "type": {
  30210. "type": "string",
  30211. "enum": ["question.v2.asked"]
  30212. },
  30213. "properties": {
  30214. "type": "object",
  30215. "properties": {
  30216. "id": {
  30217. "type": "string",
  30218. "pattern": "^que"
  30219. },
  30220. "sessionID": {
  30221. "type": "string",
  30222. "pattern": "^ses"
  30223. },
  30224. "questions": {
  30225. "type": "array",
  30226. "items": {
  30227. "$ref": "#/components/schemas/QuestionV2Info"
  30228. },
  30229. "description": "Questions to ask"
  30230. },
  30231. "tool": {
  30232. "$ref": "#/components/schemas/QuestionV2Tool"
  30233. }
  30234. },
  30235. "required": ["id", "sessionID", "questions"],
  30236. "additionalProperties": false
  30237. }
  30238. },
  30239. "required": ["id", "type", "properties"],
  30240. "additionalProperties": false
  30241. },
  30242. "EventQuestionV2Replied": {
  30243. "type": "object",
  30244. "properties": {
  30245. "id": {
  30246. "type": "string",
  30247. "pattern": "^evt_"
  30248. },
  30249. "type": {
  30250. "type": "string",
  30251. "enum": ["question.v2.replied"]
  30252. },
  30253. "properties": {
  30254. "type": "object",
  30255. "properties": {
  30256. "sessionID": {
  30257. "type": "string",
  30258. "pattern": "^ses"
  30259. },
  30260. "requestID": {
  30261. "type": "string",
  30262. "pattern": "^que"
  30263. },
  30264. "answers": {
  30265. "type": "array",
  30266. "items": {
  30267. "$ref": "#/components/schemas/QuestionV2Answer"
  30268. }
  30269. }
  30270. },
  30271. "required": ["sessionID", "requestID", "answers"],
  30272. "additionalProperties": false
  30273. }
  30274. },
  30275. "required": ["id", "type", "properties"],
  30276. "additionalProperties": false
  30277. },
  30278. "EventQuestionV2Rejected": {
  30279. "type": "object",
  30280. "properties": {
  30281. "id": {
  30282. "type": "string",
  30283. "pattern": "^evt_"
  30284. },
  30285. "type": {
  30286. "type": "string",
  30287. "enum": ["question.v2.rejected"]
  30288. },
  30289. "properties": {
  30290. "type": "object",
  30291. "properties": {
  30292. "sessionID": {
  30293. "type": "string",
  30294. "pattern": "^ses"
  30295. },
  30296. "requestID": {
  30297. "type": "string",
  30298. "pattern": "^que"
  30299. }
  30300. },
  30301. "required": ["sessionID", "requestID"],
  30302. "additionalProperties": false
  30303. }
  30304. },
  30305. "required": ["id", "type", "properties"],
  30306. "additionalProperties": false
  30307. },
  30308. "EventTodoUpdated": {
  30309. "type": "object",
  30310. "properties": {
  30311. "id": {
  30312. "type": "string",
  30313. "pattern": "^evt_"
  30314. },
  30315. "type": {
  30316. "type": "string",
  30317. "enum": ["todo.updated"]
  30318. },
  30319. "properties": {
  30320. "type": "object",
  30321. "properties": {
  30322. "sessionID": {
  30323. "type": "string",
  30324. "pattern": "^ses"
  30325. },
  30326. "todos": {
  30327. "type": "array",
  30328. "items": {
  30329. "$ref": "#/components/schemas/Todo"
  30330. }
  30331. }
  30332. },
  30333. "required": ["sessionID", "todos"],
  30334. "additionalProperties": false
  30335. }
  30336. },
  30337. "required": ["id", "type", "properties"],
  30338. "additionalProperties": false
  30339. },
  30340. "EventLspUpdated": {
  30341. "type": "object",
  30342. "properties": {
  30343. "id": {
  30344. "type": "string",
  30345. "pattern": "^evt_"
  30346. },
  30347. "type": {
  30348. "type": "string",
  30349. "enum": ["lsp.updated"]
  30350. },
  30351. "properties": {
  30352. "type": "object",
  30353. "properties": {}
  30354. }
  30355. },
  30356. "required": ["id", "type", "properties"],
  30357. "additionalProperties": false
  30358. },
  30359. "EventPermissionAsked": {
  30360. "type": "object",
  30361. "properties": {
  30362. "id": {
  30363. "type": "string",
  30364. "pattern": "^evt_"
  30365. },
  30366. "type": {
  30367. "type": "string",
  30368. "enum": ["permission.asked"]
  30369. },
  30370. "properties": {
  30371. "type": "object",
  30372. "properties": {
  30373. "id": {
  30374. "type": "string",
  30375. "pattern": "^per"
  30376. },
  30377. "sessionID": {
  30378. "type": "string",
  30379. "pattern": "^ses"
  30380. },
  30381. "permission": {
  30382. "type": "string"
  30383. },
  30384. "patterns": {
  30385. "type": "array",
  30386. "items": {
  30387. "type": "string"
  30388. }
  30389. },
  30390. "metadata": {
  30391. "type": "object"
  30392. },
  30393. "always": {
  30394. "type": "array",
  30395. "items": {
  30396. "type": "string"
  30397. }
  30398. },
  30399. "tool": {
  30400. "type": "object",
  30401. "properties": {
  30402. "messageID": {
  30403. "type": "string"
  30404. },
  30405. "callID": {
  30406. "type": "string"
  30407. }
  30408. },
  30409. "required": ["messageID", "callID"],
  30410. "additionalProperties": false
  30411. }
  30412. },
  30413. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  30414. "additionalProperties": false
  30415. }
  30416. },
  30417. "required": ["id", "type", "properties"],
  30418. "additionalProperties": false
  30419. },
  30420. "EventPermissionReplied": {
  30421. "type": "object",
  30422. "properties": {
  30423. "id": {
  30424. "type": "string",
  30425. "pattern": "^evt_"
  30426. },
  30427. "type": {
  30428. "type": "string",
  30429. "enum": ["permission.replied"]
  30430. },
  30431. "properties": {
  30432. "type": "object",
  30433. "properties": {
  30434. "sessionID": {
  30435. "type": "string",
  30436. "pattern": "^ses"
  30437. },
  30438. "requestID": {
  30439. "type": "string",
  30440. "pattern": "^per"
  30441. },
  30442. "reply": {
  30443. "type": "string",
  30444. "enum": ["once", "always", "reject"]
  30445. }
  30446. },
  30447. "required": ["sessionID", "requestID", "reply"],
  30448. "additionalProperties": false
  30449. }
  30450. },
  30451. "required": ["id", "type", "properties"],
  30452. "additionalProperties": false
  30453. },
  30454. "EventMcpToolsChanged": {
  30455. "type": "object",
  30456. "properties": {
  30457. "id": {
  30458. "type": "string",
  30459. "pattern": "^evt_"
  30460. },
  30461. "type": {
  30462. "type": "string",
  30463. "enum": ["mcp.tools.changed"]
  30464. },
  30465. "properties": {
  30466. "type": "object",
  30467. "properties": {
  30468. "server": {
  30469. "type": "string"
  30470. }
  30471. },
  30472. "required": ["server"],
  30473. "additionalProperties": false
  30474. }
  30475. },
  30476. "required": ["id", "type", "properties"],
  30477. "additionalProperties": false
  30478. },
  30479. "EventMcpBrowserOpenFailed": {
  30480. "type": "object",
  30481. "properties": {
  30482. "id": {
  30483. "type": "string",
  30484. "pattern": "^evt_"
  30485. },
  30486. "type": {
  30487. "type": "string",
  30488. "enum": ["mcp.browser.open.failed"]
  30489. },
  30490. "properties": {
  30491. "type": "object",
  30492. "properties": {
  30493. "mcpName": {
  30494. "type": "string"
  30495. },
  30496. "url": {
  30497. "type": "string"
  30498. }
  30499. },
  30500. "required": ["mcpName", "url"],
  30501. "additionalProperties": false
  30502. }
  30503. },
  30504. "required": ["id", "type", "properties"],
  30505. "additionalProperties": false
  30506. },
  30507. "EventCommandExecuted": {
  30508. "type": "object",
  30509. "properties": {
  30510. "id": {
  30511. "type": "string",
  30512. "pattern": "^evt_"
  30513. },
  30514. "type": {
  30515. "type": "string",
  30516. "enum": ["command.executed"]
  30517. },
  30518. "properties": {
  30519. "type": "object",
  30520. "properties": {
  30521. "name": {
  30522. "type": "string"
  30523. },
  30524. "sessionID": {
  30525. "type": "string",
  30526. "pattern": "^ses"
  30527. },
  30528. "arguments": {
  30529. "type": "string"
  30530. },
  30531. "messageID": {
  30532. "type": "string",
  30533. "pattern": "^msg"
  30534. }
  30535. },
  30536. "required": ["name", "sessionID", "arguments", "messageID"],
  30537. "additionalProperties": false
  30538. }
  30539. },
  30540. "required": ["id", "type", "properties"],
  30541. "additionalProperties": false
  30542. },
  30543. "EventProjectUpdated": {
  30544. "type": "object",
  30545. "properties": {
  30546. "id": {
  30547. "type": "string",
  30548. "pattern": "^evt_"
  30549. },
  30550. "type": {
  30551. "type": "string",
  30552. "enum": ["project.updated"]
  30553. },
  30554. "properties": {
  30555. "type": "object",
  30556. "properties": {
  30557. "id": {
  30558. "type": "string"
  30559. },
  30560. "worktree": {
  30561. "type": "string"
  30562. },
  30563. "vcs": {
  30564. "type": "string",
  30565. "enum": ["git"]
  30566. },
  30567. "name": {
  30568. "type": "string"
  30569. },
  30570. "icon": {
  30571. "type": "object",
  30572. "properties": {
  30573. "url": {
  30574. "type": "string"
  30575. },
  30576. "override": {
  30577. "type": "string"
  30578. },
  30579. "color": {
  30580. "type": "string"
  30581. }
  30582. },
  30583. "additionalProperties": false
  30584. },
  30585. "commands": {
  30586. "type": "object",
  30587. "properties": {
  30588. "start": {
  30589. "type": "string",
  30590. "description": "Startup script to run when creating a new workspace (worktree)"
  30591. }
  30592. },
  30593. "additionalProperties": false
  30594. },
  30595. "time": {
  30596. "type": "object",
  30597. "properties": {
  30598. "created": {
  30599. "type": "integer",
  30600. "minimum": 0
  30601. },
  30602. "updated": {
  30603. "type": "integer",
  30604. "minimum": 0
  30605. },
  30606. "initialized": {
  30607. "type": "integer",
  30608. "minimum": 0
  30609. }
  30610. },
  30611. "required": ["created", "updated"],
  30612. "additionalProperties": false
  30613. },
  30614. "sandboxes": {
  30615. "type": "array",
  30616. "items": {
  30617. "type": "string"
  30618. }
  30619. }
  30620. },
  30621. "required": ["id", "worktree", "time", "sandboxes"],
  30622. "additionalProperties": false
  30623. }
  30624. },
  30625. "required": ["id", "type", "properties"],
  30626. "additionalProperties": false
  30627. },
  30628. "EventSessionStatus": {
  30629. "type": "object",
  30630. "properties": {
  30631. "id": {
  30632. "type": "string",
  30633. "pattern": "^evt_"
  30634. },
  30635. "type": {
  30636. "type": "string",
  30637. "enum": ["session.status"]
  30638. },
  30639. "properties": {
  30640. "type": "object",
  30641. "properties": {
  30642. "sessionID": {
  30643. "type": "string",
  30644. "pattern": "^ses"
  30645. },
  30646. "status": {
  30647. "$ref": "#/components/schemas/SessionStatus"
  30648. }
  30649. },
  30650. "required": ["sessionID", "status"],
  30651. "additionalProperties": false
  30652. }
  30653. },
  30654. "required": ["id", "type", "properties"],
  30655. "additionalProperties": false
  30656. },
  30657. "EventSessionIdle": {
  30658. "type": "object",
  30659. "properties": {
  30660. "id": {
  30661. "type": "string",
  30662. "pattern": "^evt_"
  30663. },
  30664. "type": {
  30665. "type": "string",
  30666. "enum": ["session.idle"]
  30667. },
  30668. "properties": {
  30669. "type": "object",
  30670. "properties": {
  30671. "sessionID": {
  30672. "type": "string",
  30673. "pattern": "^ses"
  30674. }
  30675. },
  30676. "required": ["sessionID"],
  30677. "additionalProperties": false
  30678. }
  30679. },
  30680. "required": ["id", "type", "properties"],
  30681. "additionalProperties": false
  30682. },
  30683. "EventQuestionAsked": {
  30684. "type": "object",
  30685. "properties": {
  30686. "id": {
  30687. "type": "string",
  30688. "pattern": "^evt_"
  30689. },
  30690. "type": {
  30691. "type": "string",
  30692. "enum": ["question.asked"]
  30693. },
  30694. "properties": {
  30695. "type": "object",
  30696. "properties": {
  30697. "id": {
  30698. "type": "string",
  30699. "pattern": "^que"
  30700. },
  30701. "sessionID": {
  30702. "type": "string",
  30703. "pattern": "^ses"
  30704. },
  30705. "questions": {
  30706. "type": "array",
  30707. "items": {
  30708. "$ref": "#/components/schemas/QuestionInfo"
  30709. },
  30710. "description": "Questions to ask"
  30711. },
  30712. "tool": {
  30713. "$ref": "#/components/schemas/QuestionTool"
  30714. }
  30715. },
  30716. "required": ["id", "sessionID", "questions"],
  30717. "additionalProperties": false
  30718. }
  30719. },
  30720. "required": ["id", "type", "properties"],
  30721. "additionalProperties": false
  30722. },
  30723. "EventQuestionReplied": {
  30724. "type": "object",
  30725. "properties": {
  30726. "id": {
  30727. "type": "string",
  30728. "pattern": "^evt_"
  30729. },
  30730. "type": {
  30731. "type": "string",
  30732. "enum": ["question.replied"]
  30733. },
  30734. "properties": {
  30735. "type": "object",
  30736. "properties": {
  30737. "sessionID": {
  30738. "type": "string",
  30739. "pattern": "^ses"
  30740. },
  30741. "requestID": {
  30742. "type": "string",
  30743. "pattern": "^que"
  30744. },
  30745. "answers": {
  30746. "type": "array",
  30747. "items": {
  30748. "$ref": "#/components/schemas/QuestionAnswer"
  30749. }
  30750. }
  30751. },
  30752. "required": ["sessionID", "requestID", "answers"],
  30753. "additionalProperties": false
  30754. }
  30755. },
  30756. "required": ["id", "type", "properties"],
  30757. "additionalProperties": false
  30758. },
  30759. "EventQuestionRejected": {
  30760. "type": "object",
  30761. "properties": {
  30762. "id": {
  30763. "type": "string",
  30764. "pattern": "^evt_"
  30765. },
  30766. "type": {
  30767. "type": "string",
  30768. "enum": ["question.rejected"]
  30769. },
  30770. "properties": {
  30771. "type": "object",
  30772. "properties": {
  30773. "sessionID": {
  30774. "type": "string",
  30775. "pattern": "^ses"
  30776. },
  30777. "requestID": {
  30778. "type": "string",
  30779. "pattern": "^que"
  30780. }
  30781. },
  30782. "required": ["sessionID", "requestID"],
  30783. "additionalProperties": false
  30784. }
  30785. },
  30786. "required": ["id", "type", "properties"],
  30787. "additionalProperties": false
  30788. },
  30789. "EventSessionCompacted": {
  30790. "type": "object",
  30791. "properties": {
  30792. "id": {
  30793. "type": "string",
  30794. "pattern": "^evt_"
  30795. },
  30796. "type": {
  30797. "type": "string",
  30798. "enum": ["session.compacted"]
  30799. },
  30800. "properties": {
  30801. "type": "object",
  30802. "properties": {
  30803. "sessionID": {
  30804. "type": "string",
  30805. "pattern": "^ses"
  30806. }
  30807. },
  30808. "required": ["sessionID"],
  30809. "additionalProperties": false
  30810. }
  30811. },
  30812. "required": ["id", "type", "properties"],
  30813. "additionalProperties": false
  30814. },
  30815. "EventVcsBranchUpdated": {
  30816. "type": "object",
  30817. "properties": {
  30818. "id": {
  30819. "type": "string",
  30820. "pattern": "^evt_"
  30821. },
  30822. "type": {
  30823. "type": "string",
  30824. "enum": ["vcs.branch.updated"]
  30825. },
  30826. "properties": {
  30827. "type": "object",
  30828. "properties": {
  30829. "branch": {
  30830. "type": "string"
  30831. }
  30832. },
  30833. "additionalProperties": false
  30834. }
  30835. },
  30836. "required": ["id", "type", "properties"],
  30837. "additionalProperties": false
  30838. },
  30839. "EventWorkspaceReady": {
  30840. "type": "object",
  30841. "properties": {
  30842. "id": {
  30843. "type": "string",
  30844. "pattern": "^evt_"
  30845. },
  30846. "type": {
  30847. "type": "string",
  30848. "enum": ["workspace.ready"]
  30849. },
  30850. "properties": {
  30851. "type": "object",
  30852. "properties": {
  30853. "name": {
  30854. "type": "string"
  30855. }
  30856. },
  30857. "required": ["name"],
  30858. "additionalProperties": false
  30859. }
  30860. },
  30861. "required": ["id", "type", "properties"],
  30862. "additionalProperties": false
  30863. },
  30864. "EventWorkspaceFailed": {
  30865. "type": "object",
  30866. "properties": {
  30867. "id": {
  30868. "type": "string",
  30869. "pattern": "^evt_"
  30870. },
  30871. "type": {
  30872. "type": "string",
  30873. "enum": ["workspace.failed"]
  30874. },
  30875. "properties": {
  30876. "type": "object",
  30877. "properties": {
  30878. "message": {
  30879. "type": "string"
  30880. }
  30881. },
  30882. "required": ["message"],
  30883. "additionalProperties": false
  30884. }
  30885. },
  30886. "required": ["id", "type", "properties"],
  30887. "additionalProperties": false
  30888. },
  30889. "EventWorkspaceStatus": {
  30890. "type": "object",
  30891. "properties": {
  30892. "id": {
  30893. "type": "string",
  30894. "pattern": "^evt_"
  30895. },
  30896. "type": {
  30897. "type": "string",
  30898. "enum": ["workspace.status"]
  30899. },
  30900. "properties": {
  30901. "type": "object",
  30902. "properties": {
  30903. "workspaceID": {
  30904. "type": "string",
  30905. "pattern": "^wrk"
  30906. },
  30907. "status": {
  30908. "type": "string",
  30909. "enum": ["connected", "connecting", "disconnected", "error"]
  30910. }
  30911. },
  30912. "required": ["workspaceID", "status"],
  30913. "additionalProperties": false
  30914. }
  30915. },
  30916. "required": ["id", "type", "properties"],
  30917. "additionalProperties": false
  30918. },
  30919. "EventWorktreeReady": {
  30920. "type": "object",
  30921. "properties": {
  30922. "id": {
  30923. "type": "string",
  30924. "pattern": "^evt_"
  30925. },
  30926. "type": {
  30927. "type": "string",
  30928. "enum": ["worktree.ready"]
  30929. },
  30930. "properties": {
  30931. "type": "object",
  30932. "properties": {
  30933. "name": {
  30934. "type": "string"
  30935. },
  30936. "branch": {
  30937. "type": "string"
  30938. }
  30939. },
  30940. "required": ["name"],
  30941. "additionalProperties": false
  30942. }
  30943. },
  30944. "required": ["id", "type", "properties"],
  30945. "additionalProperties": false
  30946. },
  30947. "EventWorktreeFailed": {
  30948. "type": "object",
  30949. "properties": {
  30950. "id": {
  30951. "type": "string",
  30952. "pattern": "^evt_"
  30953. },
  30954. "type": {
  30955. "type": "string",
  30956. "enum": ["worktree.failed"]
  30957. },
  30958. "properties": {
  30959. "type": "object",
  30960. "properties": {
  30961. "message": {
  30962. "type": "string"
  30963. }
  30964. },
  30965. "required": ["message"],
  30966. "additionalProperties": false
  30967. }
  30968. },
  30969. "required": ["id", "type", "properties"],
  30970. "additionalProperties": false
  30971. },
  30972. "EventServerConnected": {
  30973. "type": "object",
  30974. "properties": {
  30975. "id": {
  30976. "type": "string",
  30977. "pattern": "^evt_"
  30978. },
  30979. "type": {
  30980. "type": "string",
  30981. "enum": ["server.connected"]
  30982. },
  30983. "properties": {
  30984. "type": "object",
  30985. "properties": {}
  30986. }
  30987. },
  30988. "required": ["id", "type", "properties"],
  30989. "additionalProperties": false
  30990. },
  30991. "EventGlobalDisposed": {
  30992. "type": "object",
  30993. "properties": {
  30994. "id": {
  30995. "type": "string",
  30996. "pattern": "^evt_"
  30997. },
  30998. "type": {
  30999. "type": "string",
  31000. "enum": ["global.disposed"]
  31001. },
  31002. "properties": {
  31003. "type": "object",
  31004. "properties": {}
  31005. }
  31006. },
  31007. "required": ["id", "type", "properties"],
  31008. "additionalProperties": false
  31009. },
  31010. "BadRequestError": {
  31011. "type": "object",
  31012. "required": ["name", "data"],
  31013. "properties": {
  31014. "name": {
  31015. "type": "string",
  31016. "enum": ["BadRequest"]
  31017. },
  31018. "data": {
  31019. "type": "object",
  31020. "required": ["message"],
  31021. "properties": {
  31022. "message": {
  31023. "type": "string"
  31024. },
  31025. "kind": {
  31026. "type": "string",
  31027. "enum": ["Params", "Headers", "Query", "Body", "Payload"]
  31028. }
  31029. }
  31030. }
  31031. }
  31032. }
  31033. }
  31034. },
  31035. "security": [],
  31036. "tags": [
  31037. {
  31038. "name": "control",
  31039. "description": "Control plane routes."
  31040. },
  31041. {
  31042. "name": "controlPlane",
  31043. "description": "Control-plane orchestration routes."
  31044. },
  31045. {
  31046. "name": "global",
  31047. "description": "Global server routes."
  31048. },
  31049. {
  31050. "name": "event",
  31051. "description": "Instance event stream route."
  31052. },
  31053. {
  31054. "name": "config",
  31055. "description": "Experimental HttpApi config routes."
  31056. },
  31057. {
  31058. "name": "experimental",
  31059. "description": "Experimental HttpApi read-only routes."
  31060. },
  31061. {
  31062. "name": "file",
  31063. "description": "Experimental HttpApi file routes."
  31064. },
  31065. {
  31066. "name": "instance",
  31067. "description": "Experimental HttpApi instance read routes."
  31068. },
  31069. {
  31070. "name": "mcp",
  31071. "description": "Experimental HttpApi MCP routes."
  31072. },
  31073. {
  31074. "name": "project",
  31075. "description": "Experimental HttpApi project routes."
  31076. },
  31077. {
  31078. "name": "projectCopy",
  31079. "description": "Project copy naming routes."
  31080. },
  31081. {
  31082. "name": "pty",
  31083. "description": "Experimental HttpApi PTY routes."
  31084. },
  31085. {
  31086. "name": "question",
  31087. "description": "Question routes."
  31088. },
  31089. {
  31090. "name": "permission",
  31091. "description": "Experimental HttpApi permission routes."
  31092. },
  31093. {
  31094. "name": "provider",
  31095. "description": "Experimental HttpApi provider routes."
  31096. },
  31097. {
  31098. "name": "session",
  31099. "description": "Experimental HttpApi session routes."
  31100. },
  31101. {
  31102. "name": "sync",
  31103. "description": "Experimental HttpApi sync routes."
  31104. },
  31105. {
  31106. "name": "tui",
  31107. "description": "Experimental HttpApi TUI routes."
  31108. },
  31109. {
  31110. "name": "workspace",
  31111. "description": "Experimental HttpApi workspace routes."
  31112. },
  31113. {
  31114. "name": "opencode HttpApi",
  31115. "description": "Experimental HttpApi surface for selected instance routes."
  31116. },
  31117. {
  31118. "name": "opencode HttpApi",
  31119. "description": "Experimental HttpApi surface for selected instance routes."
  31120. },
  31121. {
  31122. "name": "opencode HttpApi",
  31123. "description": "Experimental HttpApi surface for selected instance routes."
  31124. },
  31125. {
  31126. "name": "sessions",
  31127. "description": "Experimental session routes."
  31128. },
  31129. {
  31130. "name": "messages",
  31131. "description": "Experimental message routes."
  31132. },
  31133. {
  31134. "name": "models",
  31135. "description": "Experimental model routes."
  31136. },
  31137. {
  31138. "name": "providers",
  31139. "description": "Experimental provider routes."
  31140. },
  31141. {
  31142. "name": "integrations",
  31143. "description": "Integration discovery and authentication routes."
  31144. },
  31145. {
  31146. "name": "opencode HttpApi",
  31147. "description": "Experimental HttpApi surface for selected instance routes."
  31148. },
  31149. {
  31150. "name": "permissions",
  31151. "description": "Experimental permission routes."
  31152. },
  31153. {
  31154. "name": "filesystem",
  31155. "description": "Experimental location-scoped filesystem routes."
  31156. },
  31157. {
  31158. "name": "commands",
  31159. "description": "Experimental command routes."
  31160. },
  31161. {
  31162. "name": "skills",
  31163. "description": "Experimental skill routes."
  31164. },
  31165. {
  31166. "name": "events",
  31167. "description": "Experimental event stream route."
  31168. },
  31169. {
  31170. "name": "pty",
  31171. "description": "Experimental location-scoped PTY routes."
  31172. },
  31173. {
  31174. "name": "session questions",
  31175. "description": "Experimental session question routes."
  31176. },
  31177. {
  31178. "name": "reference",
  31179. "description": "Location-scoped project references."
  31180. },
  31181. {
  31182. "name": "projectCopy",
  31183. "description": "Project copy management routes."
  31184. },
  31185. {
  31186. "name": "pty",
  31187. "description": "PTY websocket route."
  31188. }
  31189. ]
  31190. }