openapi.json 504 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566
  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": "Bad request",
  37. "content": {
  38. "application/json": {
  39. "schema": {
  40. "$ref": "#/components/schemas/BadRequestError"
  41. }
  42. }
  43. }
  44. }
  45. },
  46. "description": "Set authentication credentials",
  47. "summary": "Set auth credentials",
  48. "requestBody": {
  49. "content": {
  50. "application/json": {
  51. "schema": {
  52. "$ref": "#/components/schemas/Auth"
  53. }
  54. }
  55. }
  56. },
  57. "x-codeSamples": [
  58. {
  59. "lang": "js",
  60. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.set({\n ...\n})"
  61. }
  62. ]
  63. },
  64. "delete": {
  65. "tags": ["control"],
  66. "operationId": "auth.remove",
  67. "parameters": [
  68. {
  69. "name": "providerID",
  70. "in": "path",
  71. "schema": {
  72. "type": "string"
  73. },
  74. "required": true
  75. }
  76. ],
  77. "responses": {
  78. "200": {
  79. "description": "Successfully removed authentication credentials",
  80. "content": {
  81. "application/json": {
  82. "schema": {
  83. "type": "boolean",
  84. "description": "Successfully removed authentication credentials"
  85. }
  86. }
  87. }
  88. },
  89. "400": {
  90. "description": "Bad request",
  91. "content": {
  92. "application/json": {
  93. "schema": {
  94. "$ref": "#/components/schemas/BadRequestError"
  95. }
  96. }
  97. }
  98. }
  99. },
  100. "description": "Remove authentication credentials",
  101. "summary": "Remove auth credentials",
  102. "x-codeSamples": [
  103. {
  104. "lang": "js",
  105. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.auth.remove({\n ...\n})"
  106. }
  107. ]
  108. }
  109. },
  110. "/log": {
  111. "post": {
  112. "tags": ["control"],
  113. "operationId": "app.log",
  114. "parameters": [
  115. {
  116. "name": "directory",
  117. "in": "query",
  118. "required": false,
  119. "schema": {
  120. "type": "string"
  121. }
  122. },
  123. {
  124. "name": "workspace",
  125. "in": "query",
  126. "required": false,
  127. "schema": {
  128. "type": "string"
  129. }
  130. }
  131. ],
  132. "responses": {
  133. "200": {
  134. "description": "Log entry written successfully",
  135. "content": {
  136. "application/json": {
  137. "schema": {
  138. "type": "boolean",
  139. "description": "Log entry written successfully"
  140. }
  141. }
  142. }
  143. },
  144. "400": {
  145. "description": "Bad request",
  146. "content": {
  147. "application/json": {
  148. "schema": {
  149. "$ref": "#/components/schemas/BadRequestError"
  150. }
  151. }
  152. }
  153. }
  154. },
  155. "description": "Write a log entry to the server logs with specified level and metadata.",
  156. "summary": "Write log",
  157. "requestBody": {
  158. "content": {
  159. "application/json": {
  160. "schema": {
  161. "type": "object",
  162. "properties": {
  163. "service": {
  164. "type": "string",
  165. "description": "Service name for the log entry"
  166. },
  167. "level": {
  168. "type": "string",
  169. "enum": ["debug", "info", "error", "warn"],
  170. "description": "Log level"
  171. },
  172. "message": {
  173. "type": "string",
  174. "description": "Log message"
  175. },
  176. "extra": {
  177. "type": "object"
  178. }
  179. },
  180. "required": ["service", "level", "message"],
  181. "additionalProperties": false
  182. }
  183. }
  184. }
  185. },
  186. "x-codeSamples": [
  187. {
  188. "lang": "js",
  189. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
  190. }
  191. ]
  192. }
  193. },
  194. "/global/health": {
  195. "get": {
  196. "tags": ["global"],
  197. "operationId": "global.health",
  198. "parameters": [],
  199. "responses": {
  200. "200": {
  201. "description": "Health information",
  202. "content": {
  203. "application/json": {
  204. "schema": {
  205. "type": "object",
  206. "properties": {
  207. "healthy": {
  208. "type": "boolean",
  209. "enum": [true]
  210. },
  211. "version": {
  212. "type": "string"
  213. }
  214. },
  215. "required": ["healthy", "version"],
  216. "additionalProperties": false,
  217. "description": "Health information"
  218. }
  219. }
  220. }
  221. }
  222. },
  223. "description": "Get health information about the OpenCode server.",
  224. "summary": "Get health",
  225. "x-codeSamples": [
  226. {
  227. "lang": "js",
  228. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.health({\n ...\n})"
  229. }
  230. ]
  231. }
  232. },
  233. "/global/event": {
  234. "get": {
  235. "tags": ["global"],
  236. "operationId": "global.event",
  237. "parameters": [],
  238. "responses": {
  239. "200": {
  240. "description": "Event stream",
  241. "content": {
  242. "text/event-stream": {
  243. "schema": {
  244. "$ref": "#/components/schemas/GlobalEvent"
  245. }
  246. }
  247. }
  248. }
  249. },
  250. "description": "Subscribe to global events from the OpenCode system using server-sent events.",
  251. "summary": "Get global events",
  252. "x-codeSamples": [
  253. {
  254. "lang": "js",
  255. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.event({\n ...\n})"
  256. }
  257. ]
  258. }
  259. },
  260. "/global/config": {
  261. "get": {
  262. "tags": ["global"],
  263. "operationId": "global.config.get",
  264. "parameters": [],
  265. "responses": {
  266. "200": {
  267. "description": "Get global config info",
  268. "content": {
  269. "application/json": {
  270. "schema": {
  271. "$ref": "#/components/schemas/Config"
  272. }
  273. }
  274. }
  275. }
  276. },
  277. "description": "Retrieve the current global OpenCode configuration settings and preferences.",
  278. "summary": "Get global configuration",
  279. "x-codeSamples": [
  280. {
  281. "lang": "js",
  282. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.get({\n ...\n})"
  283. }
  284. ]
  285. },
  286. "patch": {
  287. "tags": ["global"],
  288. "operationId": "global.config.update",
  289. "parameters": [],
  290. "responses": {
  291. "200": {
  292. "description": "Successfully updated global config",
  293. "content": {
  294. "application/json": {
  295. "schema": {
  296. "$ref": "#/components/schemas/Config"
  297. }
  298. }
  299. }
  300. },
  301. "400": {
  302. "description": "Bad request",
  303. "content": {
  304. "application/json": {
  305. "schema": {
  306. "$ref": "#/components/schemas/BadRequestError"
  307. }
  308. }
  309. }
  310. }
  311. },
  312. "description": "Update global OpenCode configuration settings and preferences.",
  313. "summary": "Update global configuration",
  314. "requestBody": {
  315. "content": {
  316. "application/json": {
  317. "schema": {
  318. "$ref": "#/components/schemas/Config"
  319. }
  320. }
  321. }
  322. },
  323. "x-codeSamples": [
  324. {
  325. "lang": "js",
  326. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.config.update({\n ...\n})"
  327. }
  328. ]
  329. }
  330. },
  331. "/global/dispose": {
  332. "post": {
  333. "tags": ["global"],
  334. "operationId": "global.dispose",
  335. "parameters": [],
  336. "responses": {
  337. "200": {
  338. "description": "Global disposed",
  339. "content": {
  340. "application/json": {
  341. "schema": {
  342. "type": "boolean",
  343. "description": "Global disposed"
  344. }
  345. }
  346. }
  347. }
  348. },
  349. "description": "Clean up and dispose all OpenCode instances, releasing all resources.",
  350. "summary": "Dispose instance",
  351. "x-codeSamples": [
  352. {
  353. "lang": "js",
  354. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.dispose({\n ...\n})"
  355. }
  356. ]
  357. }
  358. },
  359. "/global/upgrade": {
  360. "post": {
  361. "tags": ["global"],
  362. "operationId": "global.upgrade",
  363. "parameters": [],
  364. "responses": {
  365. "200": {
  366. "description": "Upgrade result",
  367. "content": {
  368. "application/json": {
  369. "schema": {
  370. "anyOf": [
  371. {
  372. "type": "object",
  373. "properties": {
  374. "success": {
  375. "type": "boolean",
  376. "enum": [true]
  377. },
  378. "version": {
  379. "type": "string"
  380. }
  381. },
  382. "required": ["success", "version"],
  383. "additionalProperties": false
  384. },
  385. {
  386. "type": "object",
  387. "properties": {
  388. "success": {
  389. "type": "boolean",
  390. "enum": [false]
  391. },
  392. "error": {
  393. "type": "string"
  394. }
  395. },
  396. "required": ["success", "error"],
  397. "additionalProperties": false
  398. }
  399. ],
  400. "description": "Upgrade result"
  401. }
  402. }
  403. }
  404. },
  405. "400": {
  406. "description": "Bad request",
  407. "content": {
  408. "application/json": {
  409. "schema": {
  410. "$ref": "#/components/schemas/BadRequestError"
  411. }
  412. }
  413. }
  414. }
  415. },
  416. "description": "Upgrade opencode to the specified version or latest if not specified.",
  417. "summary": "Upgrade opencode",
  418. "requestBody": {
  419. "content": {
  420. "application/json": {
  421. "schema": {
  422. "type": "object",
  423. "properties": {
  424. "target": {
  425. "type": "string"
  426. }
  427. },
  428. "additionalProperties": false
  429. }
  430. }
  431. }
  432. },
  433. "x-codeSamples": [
  434. {
  435. "lang": "js",
  436. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.global.upgrade({\n ...\n})"
  437. }
  438. ]
  439. }
  440. },
  441. "/event": {
  442. "get": {
  443. "tags": ["event"],
  444. "operationId": "event.subscribe",
  445. "parameters": [
  446. {
  447. "name": "directory",
  448. "in": "query",
  449. "required": false,
  450. "schema": {
  451. "type": "string"
  452. }
  453. },
  454. {
  455. "name": "workspace",
  456. "in": "query",
  457. "required": false,
  458. "schema": {
  459. "type": "string"
  460. }
  461. }
  462. ],
  463. "responses": {
  464. "200": {
  465. "description": "Event stream",
  466. "content": {
  467. "text/event-stream": {
  468. "schema": {
  469. "$ref": "#/components/schemas/Event"
  470. }
  471. }
  472. }
  473. }
  474. },
  475. "description": "Get events",
  476. "summary": "Subscribe to events",
  477. "x-codeSamples": [
  478. {
  479. "lang": "js",
  480. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.event.subscribe({\n ...\n})"
  481. }
  482. ]
  483. }
  484. },
  485. "/config": {
  486. "get": {
  487. "tags": ["config"],
  488. "operationId": "config.get",
  489. "parameters": [
  490. {
  491. "name": "directory",
  492. "in": "query",
  493. "required": false,
  494. "schema": {
  495. "type": "string"
  496. }
  497. },
  498. {
  499. "name": "workspace",
  500. "in": "query",
  501. "required": false,
  502. "schema": {
  503. "type": "string"
  504. }
  505. }
  506. ],
  507. "responses": {
  508. "200": {
  509. "description": "Get config info",
  510. "content": {
  511. "application/json": {
  512. "schema": {
  513. "$ref": "#/components/schemas/Config"
  514. }
  515. }
  516. }
  517. }
  518. },
  519. "description": "Retrieve the current OpenCode configuration settings and preferences.",
  520. "summary": "Get configuration",
  521. "x-codeSamples": [
  522. {
  523. "lang": "js",
  524. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.get({\n ...\n})"
  525. }
  526. ]
  527. },
  528. "patch": {
  529. "tags": ["config"],
  530. "operationId": "config.update",
  531. "parameters": [
  532. {
  533. "name": "directory",
  534. "in": "query",
  535. "required": false,
  536. "schema": {
  537. "type": "string"
  538. }
  539. },
  540. {
  541. "name": "workspace",
  542. "in": "query",
  543. "required": false,
  544. "schema": {
  545. "type": "string"
  546. }
  547. }
  548. ],
  549. "responses": {
  550. "200": {
  551. "description": "Successfully updated config",
  552. "content": {
  553. "application/json": {
  554. "schema": {
  555. "$ref": "#/components/schemas/Config"
  556. }
  557. }
  558. }
  559. },
  560. "400": {
  561. "description": "Bad request",
  562. "content": {
  563. "application/json": {
  564. "schema": {
  565. "$ref": "#/components/schemas/BadRequestError"
  566. }
  567. }
  568. }
  569. }
  570. },
  571. "description": "Update OpenCode configuration settings and preferences.",
  572. "summary": "Update configuration",
  573. "requestBody": {
  574. "content": {
  575. "application/json": {
  576. "schema": {
  577. "$ref": "#/components/schemas/Config"
  578. }
  579. }
  580. }
  581. },
  582. "x-codeSamples": [
  583. {
  584. "lang": "js",
  585. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.update({\n ...\n})"
  586. }
  587. ]
  588. }
  589. },
  590. "/config/providers": {
  591. "get": {
  592. "tags": ["config"],
  593. "operationId": "config.providers",
  594. "parameters": [
  595. {
  596. "name": "directory",
  597. "in": "query",
  598. "required": false,
  599. "schema": {
  600. "type": "string"
  601. }
  602. },
  603. {
  604. "name": "workspace",
  605. "in": "query",
  606. "required": false,
  607. "schema": {
  608. "type": "string"
  609. }
  610. }
  611. ],
  612. "responses": {
  613. "200": {
  614. "description": "List of providers",
  615. "content": {
  616. "application/json": {
  617. "schema": {
  618. "type": "object",
  619. "properties": {
  620. "providers": {
  621. "type": "array",
  622. "items": {
  623. "$ref": "#/components/schemas/Provider"
  624. }
  625. },
  626. "default": {
  627. "type": "object",
  628. "additionalProperties": {
  629. "type": "string"
  630. }
  631. }
  632. },
  633. "required": ["providers", "default"],
  634. "additionalProperties": false,
  635. "description": "List of providers"
  636. }
  637. }
  638. }
  639. }
  640. },
  641. "description": "Get a list of all configured AI providers and their default models.",
  642. "summary": "List config providers",
  643. "x-codeSamples": [
  644. {
  645. "lang": "js",
  646. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.config.providers({\n ...\n})"
  647. }
  648. ]
  649. }
  650. },
  651. "/experimental/console": {
  652. "get": {
  653. "tags": ["experimental"],
  654. "operationId": "experimental.console.get",
  655. "parameters": [
  656. {
  657. "name": "directory",
  658. "in": "query",
  659. "required": false,
  660. "schema": {
  661. "type": "string"
  662. }
  663. },
  664. {
  665. "name": "workspace",
  666. "in": "query",
  667. "required": false,
  668. "schema": {
  669. "type": "string"
  670. }
  671. }
  672. ],
  673. "responses": {
  674. "200": {
  675. "description": "Active Console provider metadata",
  676. "content": {
  677. "application/json": {
  678. "schema": {
  679. "$ref": "#/components/schemas/ConsoleState"
  680. }
  681. }
  682. }
  683. },
  684. "500": {
  685. "description": "InternalServerError",
  686. "content": {
  687. "application/json": {
  688. "schema": {
  689. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  690. }
  691. }
  692. }
  693. }
  694. },
  695. "description": "Get the active Console org name and the set of provider IDs managed by that Console org.",
  696. "summary": "Get active Console provider metadata",
  697. "x-codeSamples": [
  698. {
  699. "lang": "js",
  700. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.get({\n ...\n})"
  701. }
  702. ]
  703. }
  704. },
  705. "/experimental/console/orgs": {
  706. "get": {
  707. "tags": ["experimental"],
  708. "operationId": "experimental.console.listOrgs",
  709. "parameters": [
  710. {
  711. "name": "directory",
  712. "in": "query",
  713. "required": false,
  714. "schema": {
  715. "type": "string"
  716. }
  717. },
  718. {
  719. "name": "workspace",
  720. "in": "query",
  721. "required": false,
  722. "schema": {
  723. "type": "string"
  724. }
  725. }
  726. ],
  727. "responses": {
  728. "200": {
  729. "description": "Switchable Console orgs",
  730. "content": {
  731. "application/json": {
  732. "schema": {
  733. "type": "object",
  734. "properties": {
  735. "orgs": {
  736. "type": "array",
  737. "items": {
  738. "type": "object",
  739. "properties": {
  740. "accountID": {
  741. "type": "string"
  742. },
  743. "accountEmail": {
  744. "type": "string"
  745. },
  746. "accountUrl": {
  747. "type": "string"
  748. },
  749. "orgID": {
  750. "type": "string"
  751. },
  752. "orgName": {
  753. "type": "string"
  754. },
  755. "active": {
  756. "type": "boolean"
  757. }
  758. },
  759. "required": ["accountID", "accountEmail", "accountUrl", "orgID", "orgName", "active"],
  760. "additionalProperties": false
  761. }
  762. }
  763. },
  764. "required": ["orgs"],
  765. "additionalProperties": false,
  766. "description": "Switchable Console orgs"
  767. }
  768. }
  769. }
  770. },
  771. "500": {
  772. "description": "InternalServerError",
  773. "content": {
  774. "application/json": {
  775. "schema": {
  776. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  777. }
  778. }
  779. }
  780. }
  781. },
  782. "description": "Get the available Console orgs across logged-in accounts, including the current active org.",
  783. "summary": "List switchable Console orgs",
  784. "x-codeSamples": [
  785. {
  786. "lang": "js",
  787. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.listOrgs({\n ...\n})"
  788. }
  789. ]
  790. }
  791. },
  792. "/experimental/console/switch": {
  793. "post": {
  794. "tags": ["experimental"],
  795. "operationId": "experimental.console.switchOrg",
  796. "parameters": [
  797. {
  798. "name": "directory",
  799. "in": "query",
  800. "required": false,
  801. "schema": {
  802. "type": "string"
  803. }
  804. },
  805. {
  806. "name": "workspace",
  807. "in": "query",
  808. "required": false,
  809. "schema": {
  810. "type": "string"
  811. }
  812. }
  813. ],
  814. "responses": {
  815. "200": {
  816. "description": "Switch success",
  817. "content": {
  818. "application/json": {
  819. "schema": {
  820. "type": "boolean",
  821. "description": "Switch success"
  822. }
  823. }
  824. }
  825. }
  826. },
  827. "description": "Persist a new active Console account/org selection for the current local OpenCode state.",
  828. "summary": "Switch active Console org",
  829. "requestBody": {
  830. "content": {
  831. "application/json": {
  832. "schema": {
  833. "type": "object",
  834. "properties": {
  835. "accountID": {
  836. "type": "string"
  837. },
  838. "orgID": {
  839. "type": "string"
  840. }
  841. },
  842. "required": ["accountID", "orgID"],
  843. "additionalProperties": false
  844. }
  845. }
  846. }
  847. },
  848. "x-codeSamples": [
  849. {
  850. "lang": "js",
  851. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.console.switchOrg({\n ...\n})"
  852. }
  853. ]
  854. }
  855. },
  856. "/experimental/tool": {
  857. "get": {
  858. "tags": ["experimental"],
  859. "operationId": "tool.list",
  860. "parameters": [
  861. {
  862. "name": "directory",
  863. "in": "query",
  864. "required": false,
  865. "schema": {
  866. "type": "string"
  867. }
  868. },
  869. {
  870. "name": "workspace",
  871. "in": "query",
  872. "required": false,
  873. "schema": {
  874. "type": "string"
  875. }
  876. },
  877. {
  878. "name": "provider",
  879. "in": "query",
  880. "schema": {
  881. "type": "string"
  882. },
  883. "required": true
  884. },
  885. {
  886. "name": "model",
  887. "in": "query",
  888. "schema": {
  889. "type": "string"
  890. },
  891. "required": true
  892. }
  893. ],
  894. "responses": {
  895. "200": {
  896. "description": "Tools",
  897. "content": {
  898. "application/json": {
  899. "schema": {
  900. "$ref": "#/components/schemas/ToolList"
  901. }
  902. }
  903. }
  904. },
  905. "400": {
  906. "description": "Bad request",
  907. "content": {
  908. "application/json": {
  909. "schema": {
  910. "$ref": "#/components/schemas/BadRequestError"
  911. }
  912. }
  913. }
  914. }
  915. },
  916. "description": "Get a list of available tools with their JSON schema parameters for a specific provider and model combination.",
  917. "summary": "List tools",
  918. "x-codeSamples": [
  919. {
  920. "lang": "js",
  921. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.list({\n ...\n})"
  922. }
  923. ]
  924. }
  925. },
  926. "/experimental/tool/ids": {
  927. "get": {
  928. "tags": ["experimental"],
  929. "operationId": "tool.ids",
  930. "parameters": [
  931. {
  932. "name": "directory",
  933. "in": "query",
  934. "required": false,
  935. "schema": {
  936. "type": "string"
  937. }
  938. },
  939. {
  940. "name": "workspace",
  941. "in": "query",
  942. "required": false,
  943. "schema": {
  944. "type": "string"
  945. }
  946. }
  947. ],
  948. "responses": {
  949. "200": {
  950. "description": "Tool IDs",
  951. "content": {
  952. "application/json": {
  953. "schema": {
  954. "$ref": "#/components/schemas/ToolIDs"
  955. }
  956. }
  957. }
  958. },
  959. "400": {
  960. "description": "Bad request",
  961. "content": {
  962. "application/json": {
  963. "schema": {
  964. "$ref": "#/components/schemas/BadRequestError"
  965. }
  966. }
  967. }
  968. }
  969. },
  970. "description": "Get a list of all available tool IDs, including both built-in tools and dynamically registered tools.",
  971. "summary": "List tool IDs",
  972. "x-codeSamples": [
  973. {
  974. "lang": "js",
  975. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tool.ids({\n ...\n})"
  976. }
  977. ]
  978. }
  979. },
  980. "/experimental/worktree": {
  981. "get": {
  982. "tags": ["experimental"],
  983. "operationId": "worktree.list",
  984. "parameters": [
  985. {
  986. "name": "directory",
  987. "in": "query",
  988. "required": false,
  989. "schema": {
  990. "type": "string"
  991. }
  992. },
  993. {
  994. "name": "workspace",
  995. "in": "query",
  996. "required": false,
  997. "schema": {
  998. "type": "string"
  999. }
  1000. }
  1001. ],
  1002. "responses": {
  1003. "200": {
  1004. "description": "List of worktree directories",
  1005. "content": {
  1006. "application/json": {
  1007. "schema": {
  1008. "type": "array",
  1009. "items": {
  1010. "type": "string"
  1011. },
  1012. "description": "List of worktree directories"
  1013. }
  1014. }
  1015. }
  1016. }
  1017. },
  1018. "description": "List all sandbox worktrees for the current project.",
  1019. "summary": "List worktrees",
  1020. "x-codeSamples": [
  1021. {
  1022. "lang": "js",
  1023. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.list({\n ...\n})"
  1024. }
  1025. ]
  1026. },
  1027. "post": {
  1028. "tags": ["experimental"],
  1029. "operationId": "worktree.create",
  1030. "parameters": [
  1031. {
  1032. "name": "directory",
  1033. "in": "query",
  1034. "required": false,
  1035. "schema": {
  1036. "type": "string"
  1037. }
  1038. },
  1039. {
  1040. "name": "workspace",
  1041. "in": "query",
  1042. "required": false,
  1043. "schema": {
  1044. "type": "string"
  1045. }
  1046. }
  1047. ],
  1048. "responses": {
  1049. "200": {
  1050. "description": "Worktree created",
  1051. "content": {
  1052. "application/json": {
  1053. "schema": {
  1054. "$ref": "#/components/schemas/Worktree"
  1055. }
  1056. }
  1057. }
  1058. },
  1059. "400": {
  1060. "description": "Bad request",
  1061. "content": {
  1062. "application/json": {
  1063. "schema": {
  1064. "$ref": "#/components/schemas/BadRequestError"
  1065. }
  1066. }
  1067. }
  1068. }
  1069. },
  1070. "description": "Create a new git worktree for the current project and run any configured startup scripts.",
  1071. "summary": "Create worktree",
  1072. "requestBody": {
  1073. "content": {
  1074. "application/json": {
  1075. "schema": {
  1076. "$ref": "#/components/schemas/WorktreeCreateInput"
  1077. }
  1078. }
  1079. }
  1080. },
  1081. "x-codeSamples": [
  1082. {
  1083. "lang": "js",
  1084. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.create({\n ...\n})"
  1085. }
  1086. ]
  1087. },
  1088. "delete": {
  1089. "tags": ["experimental"],
  1090. "operationId": "worktree.remove",
  1091. "parameters": [
  1092. {
  1093. "name": "directory",
  1094. "in": "query",
  1095. "required": false,
  1096. "schema": {
  1097. "type": "string"
  1098. }
  1099. },
  1100. {
  1101. "name": "workspace",
  1102. "in": "query",
  1103. "required": false,
  1104. "schema": {
  1105. "type": "string"
  1106. }
  1107. }
  1108. ],
  1109. "responses": {
  1110. "200": {
  1111. "description": "Worktree removed",
  1112. "content": {
  1113. "application/json": {
  1114. "schema": {
  1115. "type": "boolean",
  1116. "description": "Worktree removed"
  1117. }
  1118. }
  1119. }
  1120. },
  1121. "400": {
  1122. "description": "Bad request",
  1123. "content": {
  1124. "application/json": {
  1125. "schema": {
  1126. "$ref": "#/components/schemas/BadRequestError"
  1127. }
  1128. }
  1129. }
  1130. }
  1131. },
  1132. "description": "Remove a git worktree and delete its branch.",
  1133. "summary": "Remove worktree",
  1134. "requestBody": {
  1135. "content": {
  1136. "application/json": {
  1137. "schema": {
  1138. "$ref": "#/components/schemas/WorktreeRemoveInput"
  1139. }
  1140. }
  1141. }
  1142. },
  1143. "x-codeSamples": [
  1144. {
  1145. "lang": "js",
  1146. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.remove({\n ...\n})"
  1147. }
  1148. ]
  1149. }
  1150. },
  1151. "/experimental/worktree/reset": {
  1152. "post": {
  1153. "tags": ["experimental"],
  1154. "operationId": "worktree.reset",
  1155. "parameters": [
  1156. {
  1157. "name": "directory",
  1158. "in": "query",
  1159. "required": false,
  1160. "schema": {
  1161. "type": "string"
  1162. }
  1163. },
  1164. {
  1165. "name": "workspace",
  1166. "in": "query",
  1167. "required": false,
  1168. "schema": {
  1169. "type": "string"
  1170. }
  1171. }
  1172. ],
  1173. "responses": {
  1174. "200": {
  1175. "description": "Worktree reset",
  1176. "content": {
  1177. "application/json": {
  1178. "schema": {
  1179. "type": "boolean",
  1180. "description": "Worktree reset"
  1181. }
  1182. }
  1183. }
  1184. },
  1185. "400": {
  1186. "description": "Bad request",
  1187. "content": {
  1188. "application/json": {
  1189. "schema": {
  1190. "$ref": "#/components/schemas/BadRequestError"
  1191. }
  1192. }
  1193. }
  1194. }
  1195. },
  1196. "description": "Reset a worktree branch to the primary default branch.",
  1197. "summary": "Reset worktree",
  1198. "requestBody": {
  1199. "content": {
  1200. "application/json": {
  1201. "schema": {
  1202. "$ref": "#/components/schemas/WorktreeResetInput"
  1203. }
  1204. }
  1205. }
  1206. },
  1207. "x-codeSamples": [
  1208. {
  1209. "lang": "js",
  1210. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.worktree.reset({\n ...\n})"
  1211. }
  1212. ]
  1213. }
  1214. },
  1215. "/experimental/session": {
  1216. "get": {
  1217. "tags": ["experimental"],
  1218. "operationId": "experimental.session.list",
  1219. "parameters": [
  1220. {
  1221. "name": "directory",
  1222. "in": "query",
  1223. "required": false,
  1224. "schema": {
  1225. "type": "string"
  1226. }
  1227. },
  1228. {
  1229. "name": "workspace",
  1230. "in": "query",
  1231. "required": false,
  1232. "schema": {
  1233. "type": "string"
  1234. }
  1235. },
  1236. {
  1237. "name": "roots",
  1238. "in": "query",
  1239. "schema": {
  1240. "anyOf": [
  1241. {
  1242. "type": "boolean"
  1243. },
  1244. {
  1245. "type": "string",
  1246. "enum": ["true", "false"]
  1247. }
  1248. ]
  1249. },
  1250. "required": false
  1251. },
  1252. {
  1253. "name": "start",
  1254. "in": "query",
  1255. "schema": {
  1256. "type": "number"
  1257. },
  1258. "required": false
  1259. },
  1260. {
  1261. "name": "cursor",
  1262. "in": "query",
  1263. "schema": {
  1264. "type": "number"
  1265. },
  1266. "required": false
  1267. },
  1268. {
  1269. "name": "search",
  1270. "in": "query",
  1271. "schema": {
  1272. "type": "string"
  1273. },
  1274. "required": false
  1275. },
  1276. {
  1277. "name": "limit",
  1278. "in": "query",
  1279. "schema": {
  1280. "type": "number"
  1281. },
  1282. "required": false
  1283. },
  1284. {
  1285. "name": "archived",
  1286. "in": "query",
  1287. "schema": {
  1288. "anyOf": [
  1289. {
  1290. "type": "boolean"
  1291. },
  1292. {
  1293. "type": "string",
  1294. "enum": ["true", "false"]
  1295. }
  1296. ]
  1297. },
  1298. "required": false
  1299. }
  1300. ],
  1301. "responses": {
  1302. "200": {
  1303. "description": "List of sessions",
  1304. "content": {
  1305. "application/json": {
  1306. "schema": {
  1307. "type": "array",
  1308. "items": {
  1309. "$ref": "#/components/schemas/GlobalSession"
  1310. },
  1311. "description": "List of sessions"
  1312. }
  1313. }
  1314. }
  1315. }
  1316. },
  1317. "description": "Get a list of all OpenCode sessions across projects, sorted by most recently updated. Archived sessions are excluded by default.",
  1318. "summary": "List sessions",
  1319. "x-codeSamples": [
  1320. {
  1321. "lang": "js",
  1322. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.session.list({\n ...\n})"
  1323. }
  1324. ]
  1325. }
  1326. },
  1327. "/experimental/resource": {
  1328. "get": {
  1329. "tags": ["experimental"],
  1330. "operationId": "experimental.resource.list",
  1331. "parameters": [
  1332. {
  1333. "name": "directory",
  1334. "in": "query",
  1335. "required": false,
  1336. "schema": {
  1337. "type": "string"
  1338. }
  1339. },
  1340. {
  1341. "name": "workspace",
  1342. "in": "query",
  1343. "required": false,
  1344. "schema": {
  1345. "type": "string"
  1346. }
  1347. }
  1348. ],
  1349. "responses": {
  1350. "200": {
  1351. "description": "MCP resources",
  1352. "content": {
  1353. "application/json": {
  1354. "schema": {
  1355. "type": "object",
  1356. "additionalProperties": {
  1357. "$ref": "#/components/schemas/McpResource"
  1358. },
  1359. "description": "MCP resources"
  1360. }
  1361. }
  1362. }
  1363. }
  1364. },
  1365. "description": "Get all available MCP resources from connected servers. Optionally filter by name.",
  1366. "summary": "Get MCP resources",
  1367. "x-codeSamples": [
  1368. {
  1369. "lang": "js",
  1370. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.resource.list({\n ...\n})"
  1371. }
  1372. ]
  1373. }
  1374. },
  1375. "/find": {
  1376. "get": {
  1377. "tags": ["file"],
  1378. "operationId": "find.text",
  1379. "parameters": [
  1380. {
  1381. "name": "directory",
  1382. "in": "query",
  1383. "required": false,
  1384. "schema": {
  1385. "type": "string"
  1386. }
  1387. },
  1388. {
  1389. "name": "workspace",
  1390. "in": "query",
  1391. "required": false,
  1392. "schema": {
  1393. "type": "string"
  1394. }
  1395. },
  1396. {
  1397. "name": "pattern",
  1398. "in": "query",
  1399. "schema": {
  1400. "type": "string"
  1401. },
  1402. "required": true
  1403. }
  1404. ],
  1405. "responses": {
  1406. "200": {
  1407. "description": "Matches",
  1408. "content": {
  1409. "application/json": {
  1410. "schema": {
  1411. "type": "array",
  1412. "items": {
  1413. "type": "object",
  1414. "properties": {
  1415. "path": {
  1416. "type": "object",
  1417. "properties": {
  1418. "text": {
  1419. "type": "string"
  1420. }
  1421. },
  1422. "required": ["text"],
  1423. "additionalProperties": false
  1424. },
  1425. "lines": {
  1426. "type": "object",
  1427. "properties": {
  1428. "text": {
  1429. "type": "string"
  1430. }
  1431. },
  1432. "required": ["text"],
  1433. "additionalProperties": false
  1434. },
  1435. "line_number": {
  1436. "type": "integer",
  1437. "minimum": 0
  1438. },
  1439. "absolute_offset": {
  1440. "type": "integer",
  1441. "minimum": 0
  1442. },
  1443. "submatches": {
  1444. "type": "array",
  1445. "items": {
  1446. "type": "object",
  1447. "properties": {
  1448. "match": {
  1449. "type": "object",
  1450. "properties": {
  1451. "text": {
  1452. "type": "string"
  1453. }
  1454. },
  1455. "required": ["text"],
  1456. "additionalProperties": false
  1457. },
  1458. "start": {
  1459. "type": "integer",
  1460. "minimum": 0
  1461. },
  1462. "end": {
  1463. "type": "integer",
  1464. "minimum": 0
  1465. }
  1466. },
  1467. "required": ["match", "start", "end"],
  1468. "additionalProperties": false
  1469. }
  1470. }
  1471. },
  1472. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"],
  1473. "additionalProperties": false
  1474. },
  1475. "description": "Matches"
  1476. }
  1477. }
  1478. }
  1479. }
  1480. },
  1481. "description": "Search for text patterns across files in the project using ripgrep.",
  1482. "summary": "Find text",
  1483. "x-codeSamples": [
  1484. {
  1485. "lang": "js",
  1486. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.text({\n ...\n})"
  1487. }
  1488. ]
  1489. }
  1490. },
  1491. "/find/file": {
  1492. "get": {
  1493. "tags": ["file"],
  1494. "operationId": "find.files",
  1495. "parameters": [
  1496. {
  1497. "name": "directory",
  1498. "in": "query",
  1499. "required": false,
  1500. "schema": {
  1501. "type": "string"
  1502. }
  1503. },
  1504. {
  1505. "name": "workspace",
  1506. "in": "query",
  1507. "required": false,
  1508. "schema": {
  1509. "type": "string"
  1510. }
  1511. },
  1512. {
  1513. "name": "query",
  1514. "in": "query",
  1515. "schema": {
  1516. "type": "string"
  1517. },
  1518. "required": true
  1519. },
  1520. {
  1521. "name": "dirs",
  1522. "in": "query",
  1523. "schema": {
  1524. "type": "string",
  1525. "enum": ["true", "false"]
  1526. },
  1527. "required": false
  1528. },
  1529. {
  1530. "name": "type",
  1531. "in": "query",
  1532. "schema": {
  1533. "type": "string",
  1534. "enum": ["file", "directory"]
  1535. },
  1536. "required": false
  1537. },
  1538. {
  1539. "name": "limit",
  1540. "in": "query",
  1541. "schema": {
  1542. "type": "integer",
  1543. "minimum": 1,
  1544. "maximum": 200
  1545. },
  1546. "required": false
  1547. }
  1548. ],
  1549. "responses": {
  1550. "200": {
  1551. "description": "File paths",
  1552. "content": {
  1553. "application/json": {
  1554. "schema": {
  1555. "type": "array",
  1556. "items": {
  1557. "type": "string"
  1558. },
  1559. "description": "File paths"
  1560. }
  1561. }
  1562. }
  1563. }
  1564. },
  1565. "description": "Search for files or directories by name or pattern in the project directory.",
  1566. "summary": "Find files",
  1567. "x-codeSamples": [
  1568. {
  1569. "lang": "js",
  1570. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.files({\n ...\n})"
  1571. }
  1572. ]
  1573. }
  1574. },
  1575. "/find/symbol": {
  1576. "get": {
  1577. "tags": ["file"],
  1578. "operationId": "find.symbols",
  1579. "parameters": [
  1580. {
  1581. "name": "directory",
  1582. "in": "query",
  1583. "required": false,
  1584. "schema": {
  1585. "type": "string"
  1586. }
  1587. },
  1588. {
  1589. "name": "workspace",
  1590. "in": "query",
  1591. "required": false,
  1592. "schema": {
  1593. "type": "string"
  1594. }
  1595. },
  1596. {
  1597. "name": "query",
  1598. "in": "query",
  1599. "schema": {
  1600. "type": "string"
  1601. },
  1602. "required": true
  1603. }
  1604. ],
  1605. "responses": {
  1606. "200": {
  1607. "description": "Symbols",
  1608. "content": {
  1609. "application/json": {
  1610. "schema": {
  1611. "type": "array",
  1612. "items": {
  1613. "$ref": "#/components/schemas/Symbol"
  1614. },
  1615. "description": "Symbols"
  1616. }
  1617. }
  1618. }
  1619. }
  1620. },
  1621. "description": "Search for workspace symbols like functions, classes, and variables using LSP.",
  1622. "summary": "Find symbols",
  1623. "x-codeSamples": [
  1624. {
  1625. "lang": "js",
  1626. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.find.symbols({\n ...\n})"
  1627. }
  1628. ]
  1629. }
  1630. },
  1631. "/file": {
  1632. "get": {
  1633. "tags": ["file"],
  1634. "operationId": "file.list",
  1635. "parameters": [
  1636. {
  1637. "name": "directory",
  1638. "in": "query",
  1639. "required": false,
  1640. "schema": {
  1641. "type": "string"
  1642. }
  1643. },
  1644. {
  1645. "name": "workspace",
  1646. "in": "query",
  1647. "required": false,
  1648. "schema": {
  1649. "type": "string"
  1650. }
  1651. },
  1652. {
  1653. "name": "path",
  1654. "in": "query",
  1655. "schema": {
  1656. "type": "string"
  1657. },
  1658. "required": true
  1659. }
  1660. ],
  1661. "responses": {
  1662. "200": {
  1663. "description": "Files and directories",
  1664. "content": {
  1665. "application/json": {
  1666. "schema": {
  1667. "type": "array",
  1668. "items": {
  1669. "$ref": "#/components/schemas/FileNode"
  1670. },
  1671. "description": "Files and directories"
  1672. }
  1673. }
  1674. }
  1675. }
  1676. },
  1677. "description": "List files and directories in a specified path.",
  1678. "summary": "List files",
  1679. "x-codeSamples": [
  1680. {
  1681. "lang": "js",
  1682. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.list({\n ...\n})"
  1683. }
  1684. ]
  1685. }
  1686. },
  1687. "/file/content": {
  1688. "get": {
  1689. "tags": ["file"],
  1690. "operationId": "file.read",
  1691. "parameters": [
  1692. {
  1693. "name": "directory",
  1694. "in": "query",
  1695. "required": false,
  1696. "schema": {
  1697. "type": "string"
  1698. }
  1699. },
  1700. {
  1701. "name": "workspace",
  1702. "in": "query",
  1703. "required": false,
  1704. "schema": {
  1705. "type": "string"
  1706. }
  1707. },
  1708. {
  1709. "name": "path",
  1710. "in": "query",
  1711. "schema": {
  1712. "type": "string"
  1713. },
  1714. "required": true
  1715. }
  1716. ],
  1717. "responses": {
  1718. "200": {
  1719. "description": "File content",
  1720. "content": {
  1721. "application/json": {
  1722. "schema": {
  1723. "$ref": "#/components/schemas/FileContent"
  1724. }
  1725. }
  1726. }
  1727. }
  1728. },
  1729. "description": "Read the content of a specified file.",
  1730. "summary": "Read file",
  1731. "x-codeSamples": [
  1732. {
  1733. "lang": "js",
  1734. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.read({\n ...\n})"
  1735. }
  1736. ]
  1737. }
  1738. },
  1739. "/file/status": {
  1740. "get": {
  1741. "tags": ["file"],
  1742. "operationId": "file.status",
  1743. "parameters": [
  1744. {
  1745. "name": "directory",
  1746. "in": "query",
  1747. "required": false,
  1748. "schema": {
  1749. "type": "string"
  1750. }
  1751. },
  1752. {
  1753. "name": "workspace",
  1754. "in": "query",
  1755. "required": false,
  1756. "schema": {
  1757. "type": "string"
  1758. }
  1759. }
  1760. ],
  1761. "responses": {
  1762. "200": {
  1763. "description": "File status",
  1764. "content": {
  1765. "application/json": {
  1766. "schema": {
  1767. "type": "array",
  1768. "items": {
  1769. "$ref": "#/components/schemas/File"
  1770. },
  1771. "description": "File status"
  1772. }
  1773. }
  1774. }
  1775. }
  1776. },
  1777. "description": "Get the git status of all files in the project.",
  1778. "summary": "Get file status",
  1779. "x-codeSamples": [
  1780. {
  1781. "lang": "js",
  1782. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.file.status({\n ...\n})"
  1783. }
  1784. ]
  1785. }
  1786. },
  1787. "/instance/dispose": {
  1788. "post": {
  1789. "tags": ["instance"],
  1790. "operationId": "instance.dispose",
  1791. "parameters": [
  1792. {
  1793. "name": "directory",
  1794. "in": "query",
  1795. "required": false,
  1796. "schema": {
  1797. "type": "string"
  1798. }
  1799. },
  1800. {
  1801. "name": "workspace",
  1802. "in": "query",
  1803. "required": false,
  1804. "schema": {
  1805. "type": "string"
  1806. }
  1807. }
  1808. ],
  1809. "responses": {
  1810. "200": {
  1811. "description": "Instance disposed",
  1812. "content": {
  1813. "application/json": {
  1814. "schema": {
  1815. "type": "boolean",
  1816. "description": "Instance disposed"
  1817. }
  1818. }
  1819. }
  1820. }
  1821. },
  1822. "description": "Clean up and dispose the current OpenCode instance, releasing all resources.",
  1823. "summary": "Dispose instance",
  1824. "x-codeSamples": [
  1825. {
  1826. "lang": "js",
  1827. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.instance.dispose({\n ...\n})"
  1828. }
  1829. ]
  1830. }
  1831. },
  1832. "/path": {
  1833. "get": {
  1834. "tags": ["instance"],
  1835. "operationId": "path.get",
  1836. "parameters": [
  1837. {
  1838. "name": "directory",
  1839. "in": "query",
  1840. "required": false,
  1841. "schema": {
  1842. "type": "string"
  1843. }
  1844. },
  1845. {
  1846. "name": "workspace",
  1847. "in": "query",
  1848. "required": false,
  1849. "schema": {
  1850. "type": "string"
  1851. }
  1852. }
  1853. ],
  1854. "responses": {
  1855. "200": {
  1856. "description": "Path",
  1857. "content": {
  1858. "application/json": {
  1859. "schema": {
  1860. "$ref": "#/components/schemas/Path"
  1861. }
  1862. }
  1863. }
  1864. }
  1865. },
  1866. "description": "Retrieve the current working directory and related path information for the OpenCode instance.",
  1867. "summary": "Get paths",
  1868. "x-codeSamples": [
  1869. {
  1870. "lang": "js",
  1871. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.path.get({\n ...\n})"
  1872. }
  1873. ]
  1874. }
  1875. },
  1876. "/vcs": {
  1877. "get": {
  1878. "tags": ["instance"],
  1879. "operationId": "vcs.get",
  1880. "parameters": [
  1881. {
  1882. "name": "directory",
  1883. "in": "query",
  1884. "required": false,
  1885. "schema": {
  1886. "type": "string"
  1887. }
  1888. },
  1889. {
  1890. "name": "workspace",
  1891. "in": "query",
  1892. "required": false,
  1893. "schema": {
  1894. "type": "string"
  1895. }
  1896. }
  1897. ],
  1898. "responses": {
  1899. "200": {
  1900. "description": "VCS info",
  1901. "content": {
  1902. "application/json": {
  1903. "schema": {
  1904. "$ref": "#/components/schemas/VcsInfo"
  1905. }
  1906. }
  1907. }
  1908. }
  1909. },
  1910. "description": "Retrieve version control system (VCS) information for the current project, such as git branch.",
  1911. "summary": "Get VCS info",
  1912. "x-codeSamples": [
  1913. {
  1914. "lang": "js",
  1915. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.get({\n ...\n})"
  1916. }
  1917. ]
  1918. }
  1919. },
  1920. "/vcs/status": {
  1921. "get": {
  1922. "tags": ["instance"],
  1923. "operationId": "vcs.status",
  1924. "parameters": [
  1925. {
  1926. "name": "directory",
  1927. "in": "query",
  1928. "required": false,
  1929. "schema": {
  1930. "type": "string"
  1931. }
  1932. },
  1933. {
  1934. "name": "workspace",
  1935. "in": "query",
  1936. "required": false,
  1937. "schema": {
  1938. "type": "string"
  1939. }
  1940. }
  1941. ],
  1942. "responses": {
  1943. "200": {
  1944. "description": "VCS status",
  1945. "content": {
  1946. "application/json": {
  1947. "schema": {
  1948. "type": "array",
  1949. "items": {
  1950. "$ref": "#/components/schemas/VcsFileStatus"
  1951. },
  1952. "description": "VCS status"
  1953. }
  1954. }
  1955. }
  1956. }
  1957. },
  1958. "description": "Retrieve changed files in the current working tree without patches.",
  1959. "summary": "Get VCS status",
  1960. "x-codeSamples": [
  1961. {
  1962. "lang": "js",
  1963. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.status({\n ...\n})"
  1964. }
  1965. ]
  1966. }
  1967. },
  1968. "/vcs/diff": {
  1969. "get": {
  1970. "tags": ["instance"],
  1971. "operationId": "vcs.diff",
  1972. "parameters": [
  1973. {
  1974. "name": "directory",
  1975. "in": "query",
  1976. "required": false,
  1977. "schema": {
  1978. "type": "string"
  1979. }
  1980. },
  1981. {
  1982. "name": "workspace",
  1983. "in": "query",
  1984. "required": false,
  1985. "schema": {
  1986. "type": "string"
  1987. }
  1988. },
  1989. {
  1990. "name": "mode",
  1991. "in": "query",
  1992. "schema": {
  1993. "type": "string",
  1994. "enum": ["git", "branch"]
  1995. },
  1996. "required": true
  1997. }
  1998. ],
  1999. "responses": {
  2000. "200": {
  2001. "description": "VCS diff",
  2002. "content": {
  2003. "application/json": {
  2004. "schema": {
  2005. "type": "array",
  2006. "items": {
  2007. "$ref": "#/components/schemas/VcsFileDiff"
  2008. },
  2009. "description": "VCS diff"
  2010. }
  2011. }
  2012. }
  2013. }
  2014. },
  2015. "description": "Retrieve the current git diff for the working tree or against the default branch.",
  2016. "summary": "Get VCS diff",
  2017. "x-codeSamples": [
  2018. {
  2019. "lang": "js",
  2020. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff({\n ...\n})"
  2021. }
  2022. ]
  2023. }
  2024. },
  2025. "/vcs/diff/raw": {
  2026. "get": {
  2027. "tags": ["instance"],
  2028. "operationId": "vcs.diff.raw",
  2029. "parameters": [
  2030. {
  2031. "name": "directory",
  2032. "in": "query",
  2033. "required": false,
  2034. "schema": {
  2035. "type": "string"
  2036. }
  2037. },
  2038. {
  2039. "name": "workspace",
  2040. "in": "query",
  2041. "required": false,
  2042. "schema": {
  2043. "type": "string"
  2044. }
  2045. }
  2046. ],
  2047. "responses": {
  2048. "200": {
  2049. "description": "Raw VCS diff",
  2050. "content": {
  2051. "text/x-diff; charset=utf-8": {
  2052. "schema": {
  2053. "type": "string"
  2054. }
  2055. }
  2056. }
  2057. }
  2058. },
  2059. "description": "Retrieve a raw patch for current uncommitted changes.",
  2060. "summary": "Get raw VCS diff",
  2061. "x-codeSamples": [
  2062. {
  2063. "lang": "js",
  2064. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.diff.raw({\n ...\n})"
  2065. }
  2066. ]
  2067. }
  2068. },
  2069. "/vcs/apply": {
  2070. "post": {
  2071. "tags": ["instance"],
  2072. "operationId": "vcs.apply",
  2073. "parameters": [
  2074. {
  2075. "name": "directory",
  2076. "in": "query",
  2077. "required": false,
  2078. "schema": {
  2079. "type": "string"
  2080. }
  2081. },
  2082. {
  2083. "name": "workspace",
  2084. "in": "query",
  2085. "required": false,
  2086. "schema": {
  2087. "type": "string"
  2088. }
  2089. }
  2090. ],
  2091. "responses": {
  2092. "200": {
  2093. "description": "VCS patch applied",
  2094. "content": {
  2095. "application/json": {
  2096. "schema": {
  2097. "type": "object",
  2098. "properties": {
  2099. "applied": {
  2100. "type": "boolean"
  2101. }
  2102. },
  2103. "required": ["applied"],
  2104. "additionalProperties": false,
  2105. "description": "VCS patch applied"
  2106. }
  2107. }
  2108. }
  2109. },
  2110. "400": {
  2111. "description": "VcsApplyError",
  2112. "content": {
  2113. "application/json": {
  2114. "schema": {
  2115. "$ref": "#/components/schemas/VcsApplyError"
  2116. }
  2117. }
  2118. }
  2119. }
  2120. },
  2121. "description": "Apply a raw patch to the current working tree.",
  2122. "summary": "Apply VCS patch",
  2123. "requestBody": {
  2124. "content": {
  2125. "application/json": {
  2126. "schema": {
  2127. "type": "object",
  2128. "properties": {
  2129. "patch": {
  2130. "type": "string"
  2131. }
  2132. },
  2133. "required": ["patch"],
  2134. "additionalProperties": false
  2135. }
  2136. }
  2137. }
  2138. },
  2139. "x-codeSamples": [
  2140. {
  2141. "lang": "js",
  2142. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.vcs.apply({\n ...\n})"
  2143. }
  2144. ]
  2145. }
  2146. },
  2147. "/command": {
  2148. "get": {
  2149. "tags": ["instance"],
  2150. "operationId": "command.list",
  2151. "parameters": [
  2152. {
  2153. "name": "directory",
  2154. "in": "query",
  2155. "required": false,
  2156. "schema": {
  2157. "type": "string"
  2158. }
  2159. },
  2160. {
  2161. "name": "workspace",
  2162. "in": "query",
  2163. "required": false,
  2164. "schema": {
  2165. "type": "string"
  2166. }
  2167. }
  2168. ],
  2169. "responses": {
  2170. "200": {
  2171. "description": "List of commands",
  2172. "content": {
  2173. "application/json": {
  2174. "schema": {
  2175. "type": "array",
  2176. "items": {
  2177. "$ref": "#/components/schemas/Command"
  2178. },
  2179. "description": "List of commands"
  2180. }
  2181. }
  2182. }
  2183. }
  2184. },
  2185. "description": "Get a list of all available commands in the OpenCode system.",
  2186. "summary": "List commands",
  2187. "x-codeSamples": [
  2188. {
  2189. "lang": "js",
  2190. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.command.list({\n ...\n})"
  2191. }
  2192. ]
  2193. }
  2194. },
  2195. "/agent": {
  2196. "get": {
  2197. "tags": ["instance"],
  2198. "operationId": "app.agents",
  2199. "parameters": [
  2200. {
  2201. "name": "directory",
  2202. "in": "query",
  2203. "required": false,
  2204. "schema": {
  2205. "type": "string"
  2206. }
  2207. },
  2208. {
  2209. "name": "workspace",
  2210. "in": "query",
  2211. "required": false,
  2212. "schema": {
  2213. "type": "string"
  2214. }
  2215. }
  2216. ],
  2217. "responses": {
  2218. "200": {
  2219. "description": "List of agents",
  2220. "content": {
  2221. "application/json": {
  2222. "schema": {
  2223. "type": "array",
  2224. "items": {
  2225. "$ref": "#/components/schemas/Agent"
  2226. },
  2227. "description": "List of agents"
  2228. }
  2229. }
  2230. }
  2231. }
  2232. },
  2233. "description": "Get a list of all available AI agents in the OpenCode system.",
  2234. "summary": "List agents",
  2235. "x-codeSamples": [
  2236. {
  2237. "lang": "js",
  2238. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.agents({\n ...\n})"
  2239. }
  2240. ]
  2241. }
  2242. },
  2243. "/skill": {
  2244. "get": {
  2245. "tags": ["instance"],
  2246. "operationId": "app.skills",
  2247. "parameters": [
  2248. {
  2249. "name": "directory",
  2250. "in": "query",
  2251. "required": false,
  2252. "schema": {
  2253. "type": "string"
  2254. }
  2255. },
  2256. {
  2257. "name": "workspace",
  2258. "in": "query",
  2259. "required": false,
  2260. "schema": {
  2261. "type": "string"
  2262. }
  2263. }
  2264. ],
  2265. "responses": {
  2266. "200": {
  2267. "description": "List of skills",
  2268. "content": {
  2269. "application/json": {
  2270. "schema": {
  2271. "type": "array",
  2272. "items": {
  2273. "type": "object",
  2274. "properties": {
  2275. "name": {
  2276. "type": "string"
  2277. },
  2278. "description": {
  2279. "type": "string"
  2280. },
  2281. "location": {
  2282. "type": "string"
  2283. },
  2284. "content": {
  2285. "type": "string"
  2286. }
  2287. },
  2288. "required": ["name", "location", "content"],
  2289. "additionalProperties": false
  2290. },
  2291. "description": "List of skills"
  2292. }
  2293. }
  2294. }
  2295. }
  2296. },
  2297. "description": "Get a list of all available skills in the OpenCode system.",
  2298. "summary": "List skills",
  2299. "x-codeSamples": [
  2300. {
  2301. "lang": "js",
  2302. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.skills({\n ...\n})"
  2303. }
  2304. ]
  2305. }
  2306. },
  2307. "/lsp": {
  2308. "get": {
  2309. "tags": ["instance"],
  2310. "operationId": "lsp.status",
  2311. "parameters": [
  2312. {
  2313. "name": "directory",
  2314. "in": "query",
  2315. "required": false,
  2316. "schema": {
  2317. "type": "string"
  2318. }
  2319. },
  2320. {
  2321. "name": "workspace",
  2322. "in": "query",
  2323. "required": false,
  2324. "schema": {
  2325. "type": "string"
  2326. }
  2327. }
  2328. ],
  2329. "responses": {
  2330. "200": {
  2331. "description": "LSP server status",
  2332. "content": {
  2333. "application/json": {
  2334. "schema": {
  2335. "type": "array",
  2336. "items": {
  2337. "$ref": "#/components/schemas/LSPStatus"
  2338. },
  2339. "description": "LSP server status"
  2340. }
  2341. }
  2342. }
  2343. }
  2344. },
  2345. "description": "Get LSP server status",
  2346. "summary": "Get LSP status",
  2347. "x-codeSamples": [
  2348. {
  2349. "lang": "js",
  2350. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.lsp.status({\n ...\n})"
  2351. }
  2352. ]
  2353. }
  2354. },
  2355. "/formatter": {
  2356. "get": {
  2357. "tags": ["instance"],
  2358. "operationId": "formatter.status",
  2359. "parameters": [
  2360. {
  2361. "name": "directory",
  2362. "in": "query",
  2363. "required": false,
  2364. "schema": {
  2365. "type": "string"
  2366. }
  2367. },
  2368. {
  2369. "name": "workspace",
  2370. "in": "query",
  2371. "required": false,
  2372. "schema": {
  2373. "type": "string"
  2374. }
  2375. }
  2376. ],
  2377. "responses": {
  2378. "200": {
  2379. "description": "Formatter status",
  2380. "content": {
  2381. "application/json": {
  2382. "schema": {
  2383. "type": "array",
  2384. "items": {
  2385. "$ref": "#/components/schemas/FormatterStatus"
  2386. },
  2387. "description": "Formatter status"
  2388. }
  2389. }
  2390. }
  2391. }
  2392. },
  2393. "description": "Get formatter status",
  2394. "summary": "Get formatter status",
  2395. "x-codeSamples": [
  2396. {
  2397. "lang": "js",
  2398. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.formatter.status({\n ...\n})"
  2399. }
  2400. ]
  2401. }
  2402. },
  2403. "/mcp": {
  2404. "get": {
  2405. "tags": ["mcp"],
  2406. "operationId": "mcp.status",
  2407. "parameters": [
  2408. {
  2409. "name": "directory",
  2410. "in": "query",
  2411. "required": false,
  2412. "schema": {
  2413. "type": "string"
  2414. }
  2415. },
  2416. {
  2417. "name": "workspace",
  2418. "in": "query",
  2419. "required": false,
  2420. "schema": {
  2421. "type": "string"
  2422. }
  2423. }
  2424. ],
  2425. "responses": {
  2426. "200": {
  2427. "description": "MCP server status",
  2428. "content": {
  2429. "application/json": {
  2430. "schema": {
  2431. "type": "object",
  2432. "additionalProperties": {
  2433. "$ref": "#/components/schemas/MCPStatus"
  2434. },
  2435. "description": "MCP server status"
  2436. }
  2437. }
  2438. }
  2439. }
  2440. },
  2441. "description": "Get the status of all Model Context Protocol (MCP) servers.",
  2442. "summary": "Get MCP status",
  2443. "x-codeSamples": [
  2444. {
  2445. "lang": "js",
  2446. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.status({\n ...\n})"
  2447. }
  2448. ]
  2449. },
  2450. "post": {
  2451. "tags": ["mcp"],
  2452. "operationId": "mcp.add",
  2453. "parameters": [
  2454. {
  2455. "name": "directory",
  2456. "in": "query",
  2457. "required": false,
  2458. "schema": {
  2459. "type": "string"
  2460. }
  2461. },
  2462. {
  2463. "name": "workspace",
  2464. "in": "query",
  2465. "required": false,
  2466. "schema": {
  2467. "type": "string"
  2468. }
  2469. }
  2470. ],
  2471. "responses": {
  2472. "200": {
  2473. "description": "MCP server added successfully",
  2474. "content": {
  2475. "application/json": {
  2476. "schema": {
  2477. "type": "object",
  2478. "additionalProperties": {
  2479. "$ref": "#/components/schemas/MCPStatus"
  2480. },
  2481. "description": "MCP server added successfully"
  2482. }
  2483. }
  2484. }
  2485. },
  2486. "400": {
  2487. "description": "Bad request",
  2488. "content": {
  2489. "application/json": {
  2490. "schema": {
  2491. "$ref": "#/components/schemas/BadRequestError"
  2492. }
  2493. }
  2494. }
  2495. }
  2496. },
  2497. "description": "Dynamically add a new Model Context Protocol (MCP) server to the system.",
  2498. "summary": "Add MCP server",
  2499. "requestBody": {
  2500. "content": {
  2501. "application/json": {
  2502. "schema": {
  2503. "type": "object",
  2504. "properties": {
  2505. "name": {
  2506. "type": "string"
  2507. },
  2508. "config": {
  2509. "anyOf": [
  2510. {
  2511. "$ref": "#/components/schemas/McpLocalConfig"
  2512. },
  2513. {
  2514. "$ref": "#/components/schemas/McpRemoteConfig"
  2515. }
  2516. ]
  2517. }
  2518. },
  2519. "required": ["name", "config"],
  2520. "additionalProperties": false
  2521. }
  2522. }
  2523. }
  2524. },
  2525. "x-codeSamples": [
  2526. {
  2527. "lang": "js",
  2528. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.add({\n ...\n})"
  2529. }
  2530. ]
  2531. }
  2532. },
  2533. "/mcp/{name}/auth": {
  2534. "post": {
  2535. "tags": ["mcp"],
  2536. "operationId": "mcp.auth.start",
  2537. "parameters": [
  2538. {
  2539. "name": "directory",
  2540. "in": "query",
  2541. "required": false,
  2542. "schema": {
  2543. "type": "string"
  2544. }
  2545. },
  2546. {
  2547. "name": "workspace",
  2548. "in": "query",
  2549. "required": false,
  2550. "schema": {
  2551. "type": "string"
  2552. }
  2553. },
  2554. {
  2555. "name": "name",
  2556. "in": "path",
  2557. "schema": {
  2558. "type": "string"
  2559. },
  2560. "required": true
  2561. }
  2562. ],
  2563. "responses": {
  2564. "200": {
  2565. "description": "OAuth flow started",
  2566. "content": {
  2567. "application/json": {
  2568. "schema": {
  2569. "type": "object",
  2570. "properties": {
  2571. "authorizationUrl": {
  2572. "type": "string"
  2573. },
  2574. "oauthState": {
  2575. "type": "string"
  2576. }
  2577. },
  2578. "required": ["authorizationUrl", "oauthState"],
  2579. "additionalProperties": false,
  2580. "description": "OAuth flow started"
  2581. }
  2582. }
  2583. }
  2584. },
  2585. "400": {
  2586. "description": "McpUnsupportedOAuthError",
  2587. "content": {
  2588. "application/json": {
  2589. "schema": {
  2590. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  2591. }
  2592. }
  2593. }
  2594. },
  2595. "404": {
  2596. "description": "Not found",
  2597. "content": {
  2598. "application/json": {
  2599. "schema": {
  2600. "$ref": "#/components/schemas/NotFoundError"
  2601. }
  2602. }
  2603. }
  2604. }
  2605. },
  2606. "description": "Start OAuth authentication flow for a Model Context Protocol (MCP) server.",
  2607. "summary": "Start MCP OAuth",
  2608. "x-codeSamples": [
  2609. {
  2610. "lang": "js",
  2611. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.start({\n ...\n})"
  2612. }
  2613. ]
  2614. },
  2615. "delete": {
  2616. "tags": ["mcp"],
  2617. "operationId": "mcp.auth.remove",
  2618. "parameters": [
  2619. {
  2620. "name": "directory",
  2621. "in": "query",
  2622. "required": false,
  2623. "schema": {
  2624. "type": "string"
  2625. }
  2626. },
  2627. {
  2628. "name": "workspace",
  2629. "in": "query",
  2630. "required": false,
  2631. "schema": {
  2632. "type": "string"
  2633. }
  2634. },
  2635. {
  2636. "name": "name",
  2637. "in": "path",
  2638. "schema": {
  2639. "type": "string"
  2640. },
  2641. "required": true
  2642. }
  2643. ],
  2644. "responses": {
  2645. "200": {
  2646. "description": "OAuth credentials removed",
  2647. "content": {
  2648. "application/json": {
  2649. "schema": {
  2650. "type": "object",
  2651. "properties": {
  2652. "success": {
  2653. "type": "boolean",
  2654. "enum": [true]
  2655. }
  2656. },
  2657. "required": ["success"],
  2658. "additionalProperties": false,
  2659. "description": "OAuth credentials removed"
  2660. }
  2661. }
  2662. }
  2663. },
  2664. "404": {
  2665. "description": "Not found",
  2666. "content": {
  2667. "application/json": {
  2668. "schema": {
  2669. "$ref": "#/components/schemas/NotFoundError"
  2670. }
  2671. }
  2672. }
  2673. }
  2674. },
  2675. "description": "Remove OAuth credentials for an MCP server.",
  2676. "summary": "Remove MCP OAuth",
  2677. "x-codeSamples": [
  2678. {
  2679. "lang": "js",
  2680. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.remove({\n ...\n})"
  2681. }
  2682. ]
  2683. }
  2684. },
  2685. "/mcp/{name}/auth/callback": {
  2686. "post": {
  2687. "tags": ["mcp"],
  2688. "operationId": "mcp.auth.callback",
  2689. "parameters": [
  2690. {
  2691. "name": "directory",
  2692. "in": "query",
  2693. "required": false,
  2694. "schema": {
  2695. "type": "string"
  2696. }
  2697. },
  2698. {
  2699. "name": "workspace",
  2700. "in": "query",
  2701. "required": false,
  2702. "schema": {
  2703. "type": "string"
  2704. }
  2705. },
  2706. {
  2707. "name": "name",
  2708. "in": "path",
  2709. "schema": {
  2710. "type": "string"
  2711. },
  2712. "required": true
  2713. }
  2714. ],
  2715. "responses": {
  2716. "200": {
  2717. "description": "OAuth authentication completed",
  2718. "content": {
  2719. "application/json": {
  2720. "schema": {
  2721. "$ref": "#/components/schemas/MCPStatus"
  2722. }
  2723. }
  2724. }
  2725. },
  2726. "400": {
  2727. "description": "Bad request",
  2728. "content": {
  2729. "application/json": {
  2730. "schema": {
  2731. "$ref": "#/components/schemas/BadRequestError"
  2732. }
  2733. }
  2734. }
  2735. },
  2736. "404": {
  2737. "description": "Not found",
  2738. "content": {
  2739. "application/json": {
  2740. "schema": {
  2741. "$ref": "#/components/schemas/NotFoundError"
  2742. }
  2743. }
  2744. }
  2745. }
  2746. },
  2747. "description": "Complete OAuth authentication for a Model Context Protocol (MCP) server using the authorization code.",
  2748. "summary": "Complete MCP OAuth",
  2749. "requestBody": {
  2750. "content": {
  2751. "application/json": {
  2752. "schema": {
  2753. "type": "object",
  2754. "properties": {
  2755. "code": {
  2756. "type": "string"
  2757. }
  2758. },
  2759. "required": ["code"],
  2760. "additionalProperties": false
  2761. }
  2762. }
  2763. }
  2764. },
  2765. "x-codeSamples": [
  2766. {
  2767. "lang": "js",
  2768. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.callback({\n ...\n})"
  2769. }
  2770. ]
  2771. }
  2772. },
  2773. "/mcp/{name}/auth/authenticate": {
  2774. "post": {
  2775. "tags": ["mcp"],
  2776. "operationId": "mcp.auth.authenticate",
  2777. "parameters": [
  2778. {
  2779. "name": "directory",
  2780. "in": "query",
  2781. "required": false,
  2782. "schema": {
  2783. "type": "string"
  2784. }
  2785. },
  2786. {
  2787. "name": "workspace",
  2788. "in": "query",
  2789. "required": false,
  2790. "schema": {
  2791. "type": "string"
  2792. }
  2793. },
  2794. {
  2795. "name": "name",
  2796. "in": "path",
  2797. "schema": {
  2798. "type": "string"
  2799. },
  2800. "required": true
  2801. }
  2802. ],
  2803. "responses": {
  2804. "200": {
  2805. "description": "OAuth authentication completed",
  2806. "content": {
  2807. "application/json": {
  2808. "schema": {
  2809. "$ref": "#/components/schemas/MCPStatus"
  2810. }
  2811. }
  2812. }
  2813. },
  2814. "400": {
  2815. "description": "McpUnsupportedOAuthError",
  2816. "content": {
  2817. "application/json": {
  2818. "schema": {
  2819. "$ref": "#/components/schemas/McpUnsupportedOAuthError"
  2820. }
  2821. }
  2822. }
  2823. },
  2824. "404": {
  2825. "description": "Not found",
  2826. "content": {
  2827. "application/json": {
  2828. "schema": {
  2829. "$ref": "#/components/schemas/NotFoundError"
  2830. }
  2831. }
  2832. }
  2833. }
  2834. },
  2835. "description": "Start OAuth flow and wait for callback (opens browser).",
  2836. "summary": "Authenticate MCP OAuth",
  2837. "x-codeSamples": [
  2838. {
  2839. "lang": "js",
  2840. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.auth.authenticate({\n ...\n})"
  2841. }
  2842. ]
  2843. }
  2844. },
  2845. "/mcp/{name}/connect": {
  2846. "post": {
  2847. "tags": ["mcp"],
  2848. "operationId": "mcp.connect",
  2849. "parameters": [
  2850. {
  2851. "name": "directory",
  2852. "in": "query",
  2853. "required": false,
  2854. "schema": {
  2855. "type": "string"
  2856. }
  2857. },
  2858. {
  2859. "name": "workspace",
  2860. "in": "query",
  2861. "required": false,
  2862. "schema": {
  2863. "type": "string"
  2864. }
  2865. },
  2866. {
  2867. "name": "name",
  2868. "in": "path",
  2869. "schema": {
  2870. "type": "string"
  2871. },
  2872. "required": true
  2873. }
  2874. ],
  2875. "responses": {
  2876. "200": {
  2877. "description": "MCP server connected successfully",
  2878. "content": {
  2879. "application/json": {
  2880. "schema": {
  2881. "type": "boolean",
  2882. "description": "MCP server connected successfully"
  2883. }
  2884. }
  2885. }
  2886. }
  2887. },
  2888. "description": "Connect an MCP server.",
  2889. "x-codeSamples": [
  2890. {
  2891. "lang": "js",
  2892. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.connect({\n ...\n})"
  2893. }
  2894. ]
  2895. }
  2896. },
  2897. "/mcp/{name}/disconnect": {
  2898. "post": {
  2899. "tags": ["mcp"],
  2900. "operationId": "mcp.disconnect",
  2901. "parameters": [
  2902. {
  2903. "name": "directory",
  2904. "in": "query",
  2905. "required": false,
  2906. "schema": {
  2907. "type": "string"
  2908. }
  2909. },
  2910. {
  2911. "name": "workspace",
  2912. "in": "query",
  2913. "required": false,
  2914. "schema": {
  2915. "type": "string"
  2916. }
  2917. },
  2918. {
  2919. "name": "name",
  2920. "in": "path",
  2921. "schema": {
  2922. "type": "string"
  2923. },
  2924. "required": true
  2925. }
  2926. ],
  2927. "responses": {
  2928. "200": {
  2929. "description": "MCP server disconnected successfully",
  2930. "content": {
  2931. "application/json": {
  2932. "schema": {
  2933. "type": "boolean",
  2934. "description": "MCP server disconnected successfully"
  2935. }
  2936. }
  2937. }
  2938. }
  2939. },
  2940. "description": "Disconnect an MCP server.",
  2941. "x-codeSamples": [
  2942. {
  2943. "lang": "js",
  2944. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.mcp.disconnect({\n ...\n})"
  2945. }
  2946. ]
  2947. }
  2948. },
  2949. "/project": {
  2950. "get": {
  2951. "tags": ["project"],
  2952. "operationId": "project.list",
  2953. "parameters": [
  2954. {
  2955. "name": "directory",
  2956. "in": "query",
  2957. "required": false,
  2958. "schema": {
  2959. "type": "string"
  2960. }
  2961. },
  2962. {
  2963. "name": "workspace",
  2964. "in": "query",
  2965. "required": false,
  2966. "schema": {
  2967. "type": "string"
  2968. }
  2969. }
  2970. ],
  2971. "responses": {
  2972. "200": {
  2973. "description": "List of projects",
  2974. "content": {
  2975. "application/json": {
  2976. "schema": {
  2977. "type": "array",
  2978. "items": {
  2979. "$ref": "#/components/schemas/Project"
  2980. },
  2981. "description": "List of projects"
  2982. }
  2983. }
  2984. }
  2985. }
  2986. },
  2987. "description": "Get a list of projects that have been opened with OpenCode.",
  2988. "summary": "List all projects",
  2989. "x-codeSamples": [
  2990. {
  2991. "lang": "js",
  2992. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.list({\n ...\n})"
  2993. }
  2994. ]
  2995. }
  2996. },
  2997. "/project/current": {
  2998. "get": {
  2999. "tags": ["project"],
  3000. "operationId": "project.current",
  3001. "parameters": [
  3002. {
  3003. "name": "directory",
  3004. "in": "query",
  3005. "required": false,
  3006. "schema": {
  3007. "type": "string"
  3008. }
  3009. },
  3010. {
  3011. "name": "workspace",
  3012. "in": "query",
  3013. "required": false,
  3014. "schema": {
  3015. "type": "string"
  3016. }
  3017. }
  3018. ],
  3019. "responses": {
  3020. "200": {
  3021. "description": "Current project information",
  3022. "content": {
  3023. "application/json": {
  3024. "schema": {
  3025. "$ref": "#/components/schemas/Project"
  3026. }
  3027. }
  3028. }
  3029. }
  3030. },
  3031. "description": "Retrieve the currently active project that OpenCode is working with.",
  3032. "summary": "Get current project",
  3033. "x-codeSamples": [
  3034. {
  3035. "lang": "js",
  3036. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.current({\n ...\n})"
  3037. }
  3038. ]
  3039. }
  3040. },
  3041. "/project/git/init": {
  3042. "post": {
  3043. "tags": ["project"],
  3044. "operationId": "project.initGit",
  3045. "parameters": [
  3046. {
  3047. "name": "directory",
  3048. "in": "query",
  3049. "required": false,
  3050. "schema": {
  3051. "type": "string"
  3052. }
  3053. },
  3054. {
  3055. "name": "workspace",
  3056. "in": "query",
  3057. "required": false,
  3058. "schema": {
  3059. "type": "string"
  3060. }
  3061. }
  3062. ],
  3063. "responses": {
  3064. "200": {
  3065. "description": "Project information after git initialization",
  3066. "content": {
  3067. "application/json": {
  3068. "schema": {
  3069. "$ref": "#/components/schemas/Project"
  3070. }
  3071. }
  3072. }
  3073. }
  3074. },
  3075. "description": "Create a git repository for the current project and return the refreshed project info.",
  3076. "summary": "Initialize git repository",
  3077. "x-codeSamples": [
  3078. {
  3079. "lang": "js",
  3080. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.initGit({\n ...\n})"
  3081. }
  3082. ]
  3083. }
  3084. },
  3085. "/project/{projectID}": {
  3086. "patch": {
  3087. "tags": ["project"],
  3088. "operationId": "project.update",
  3089. "parameters": [
  3090. {
  3091. "name": "directory",
  3092. "in": "query",
  3093. "required": false,
  3094. "schema": {
  3095. "type": "string"
  3096. }
  3097. },
  3098. {
  3099. "name": "workspace",
  3100. "in": "query",
  3101. "required": false,
  3102. "schema": {
  3103. "type": "string"
  3104. }
  3105. },
  3106. {
  3107. "name": "projectID",
  3108. "in": "path",
  3109. "schema": {
  3110. "type": "string"
  3111. },
  3112. "required": true
  3113. }
  3114. ],
  3115. "responses": {
  3116. "200": {
  3117. "description": "Updated project information",
  3118. "content": {
  3119. "application/json": {
  3120. "schema": {
  3121. "$ref": "#/components/schemas/Project"
  3122. }
  3123. }
  3124. }
  3125. },
  3126. "400": {
  3127. "description": "Bad request",
  3128. "content": {
  3129. "application/json": {
  3130. "schema": {
  3131. "$ref": "#/components/schemas/BadRequestError"
  3132. }
  3133. }
  3134. }
  3135. },
  3136. "404": {
  3137. "description": "Not found",
  3138. "content": {
  3139. "application/json": {
  3140. "schema": {
  3141. "$ref": "#/components/schemas/NotFoundError"
  3142. }
  3143. }
  3144. }
  3145. }
  3146. },
  3147. "description": "Update project properties such as name, icon, and commands.",
  3148. "summary": "Update project",
  3149. "requestBody": {
  3150. "content": {
  3151. "application/json": {
  3152. "schema": {
  3153. "type": "object",
  3154. "properties": {
  3155. "name": {
  3156. "type": "string"
  3157. },
  3158. "icon": {
  3159. "type": "object",
  3160. "properties": {
  3161. "url": {
  3162. "type": "string"
  3163. },
  3164. "override": {
  3165. "type": "string"
  3166. },
  3167. "color": {
  3168. "type": "string"
  3169. }
  3170. },
  3171. "additionalProperties": false
  3172. },
  3173. "commands": {
  3174. "type": "object",
  3175. "properties": {
  3176. "start": {
  3177. "type": "string",
  3178. "description": "Startup script to run when creating a new workspace (worktree)"
  3179. }
  3180. },
  3181. "additionalProperties": false
  3182. }
  3183. },
  3184. "additionalProperties": false
  3185. }
  3186. }
  3187. }
  3188. },
  3189. "x-codeSamples": [
  3190. {
  3191. "lang": "js",
  3192. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.project.update({\n ...\n})"
  3193. }
  3194. ]
  3195. }
  3196. },
  3197. "/pty/shells": {
  3198. "get": {
  3199. "tags": ["pty"],
  3200. "operationId": "pty.shells",
  3201. "parameters": [
  3202. {
  3203. "name": "directory",
  3204. "in": "query",
  3205. "required": false,
  3206. "schema": {
  3207. "type": "string"
  3208. }
  3209. },
  3210. {
  3211. "name": "workspace",
  3212. "in": "query",
  3213. "required": false,
  3214. "schema": {
  3215. "type": "string"
  3216. }
  3217. }
  3218. ],
  3219. "responses": {
  3220. "200": {
  3221. "description": "List of shells",
  3222. "content": {
  3223. "application/json": {
  3224. "schema": {
  3225. "type": "array",
  3226. "items": {
  3227. "type": "object",
  3228. "properties": {
  3229. "path": {
  3230. "type": "string"
  3231. },
  3232. "name": {
  3233. "type": "string"
  3234. },
  3235. "acceptable": {
  3236. "type": "boolean"
  3237. }
  3238. },
  3239. "required": ["path", "name", "acceptable"],
  3240. "additionalProperties": false
  3241. },
  3242. "description": "List of shells"
  3243. }
  3244. }
  3245. }
  3246. }
  3247. },
  3248. "description": "Get a list of available shells on the system.",
  3249. "summary": "List available shells",
  3250. "x-codeSamples": [
  3251. {
  3252. "lang": "js",
  3253. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.shells({\n ...\n})"
  3254. }
  3255. ]
  3256. }
  3257. },
  3258. "/pty": {
  3259. "get": {
  3260. "tags": ["pty"],
  3261. "operationId": "pty.list",
  3262. "parameters": [
  3263. {
  3264. "name": "directory",
  3265. "in": "query",
  3266. "required": false,
  3267. "schema": {
  3268. "type": "string"
  3269. }
  3270. },
  3271. {
  3272. "name": "workspace",
  3273. "in": "query",
  3274. "required": false,
  3275. "schema": {
  3276. "type": "string"
  3277. }
  3278. }
  3279. ],
  3280. "responses": {
  3281. "200": {
  3282. "description": "List of sessions",
  3283. "content": {
  3284. "application/json": {
  3285. "schema": {
  3286. "type": "array",
  3287. "items": {
  3288. "$ref": "#/components/schemas/Pty"
  3289. },
  3290. "description": "List of sessions"
  3291. }
  3292. }
  3293. }
  3294. }
  3295. },
  3296. "description": "Get a list of all active pseudo-terminal (PTY) sessions managed by OpenCode.",
  3297. "summary": "List PTY sessions",
  3298. "x-codeSamples": [
  3299. {
  3300. "lang": "js",
  3301. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.list({\n ...\n})"
  3302. }
  3303. ]
  3304. },
  3305. "post": {
  3306. "tags": ["pty"],
  3307. "operationId": "pty.create",
  3308. "parameters": [
  3309. {
  3310. "name": "directory",
  3311. "in": "query",
  3312. "required": false,
  3313. "schema": {
  3314. "type": "string"
  3315. }
  3316. },
  3317. {
  3318. "name": "workspace",
  3319. "in": "query",
  3320. "required": false,
  3321. "schema": {
  3322. "type": "string"
  3323. }
  3324. }
  3325. ],
  3326. "responses": {
  3327. "200": {
  3328. "description": "Created session",
  3329. "content": {
  3330. "application/json": {
  3331. "schema": {
  3332. "$ref": "#/components/schemas/Pty"
  3333. }
  3334. }
  3335. }
  3336. },
  3337. "400": {
  3338. "description": "Bad request",
  3339. "content": {
  3340. "application/json": {
  3341. "schema": {
  3342. "$ref": "#/components/schemas/BadRequestError"
  3343. }
  3344. }
  3345. }
  3346. }
  3347. },
  3348. "description": "Create a new pseudo-terminal (PTY) session for running shell commands and processes.",
  3349. "summary": "Create PTY session",
  3350. "requestBody": {
  3351. "content": {
  3352. "application/json": {
  3353. "schema": {
  3354. "type": "object",
  3355. "properties": {
  3356. "command": {
  3357. "type": "string"
  3358. },
  3359. "args": {
  3360. "type": "array",
  3361. "items": {
  3362. "type": "string"
  3363. }
  3364. },
  3365. "cwd": {
  3366. "type": "string"
  3367. },
  3368. "title": {
  3369. "type": "string"
  3370. },
  3371. "env": {
  3372. "type": "object",
  3373. "additionalProperties": {
  3374. "type": "string"
  3375. }
  3376. }
  3377. },
  3378. "additionalProperties": false
  3379. }
  3380. }
  3381. }
  3382. },
  3383. "x-codeSamples": [
  3384. {
  3385. "lang": "js",
  3386. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.create({\n ...\n})"
  3387. }
  3388. ]
  3389. }
  3390. },
  3391. "/pty/{ptyID}": {
  3392. "get": {
  3393. "tags": ["pty"],
  3394. "operationId": "pty.get",
  3395. "parameters": [
  3396. {
  3397. "name": "directory",
  3398. "in": "query",
  3399. "required": false,
  3400. "schema": {
  3401. "type": "string"
  3402. }
  3403. },
  3404. {
  3405. "name": "workspace",
  3406. "in": "query",
  3407. "required": false,
  3408. "schema": {
  3409. "type": "string"
  3410. }
  3411. },
  3412. {
  3413. "name": "ptyID",
  3414. "in": "path",
  3415. "schema": {
  3416. "type": "string",
  3417. "pattern": "^pty.*"
  3418. },
  3419. "required": true
  3420. }
  3421. ],
  3422. "responses": {
  3423. "200": {
  3424. "description": "Session info",
  3425. "content": {
  3426. "application/json": {
  3427. "schema": {
  3428. "$ref": "#/components/schemas/Pty"
  3429. }
  3430. }
  3431. }
  3432. },
  3433. "404": {
  3434. "description": "NotFoundError",
  3435. "content": {
  3436. "application/json": {
  3437. "schema": {
  3438. "$ref": "#/components/schemas/NotFoundError"
  3439. }
  3440. }
  3441. }
  3442. }
  3443. },
  3444. "description": "Retrieve detailed information about a specific pseudo-terminal (PTY) session.",
  3445. "summary": "Get PTY session",
  3446. "x-codeSamples": [
  3447. {
  3448. "lang": "js",
  3449. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.get({\n ...\n})"
  3450. }
  3451. ]
  3452. },
  3453. "put": {
  3454. "tags": ["pty"],
  3455. "operationId": "pty.update",
  3456. "parameters": [
  3457. {
  3458. "name": "directory",
  3459. "in": "query",
  3460. "required": false,
  3461. "schema": {
  3462. "type": "string"
  3463. }
  3464. },
  3465. {
  3466. "name": "workspace",
  3467. "in": "query",
  3468. "required": false,
  3469. "schema": {
  3470. "type": "string"
  3471. }
  3472. },
  3473. {
  3474. "name": "ptyID",
  3475. "in": "path",
  3476. "schema": {
  3477. "type": "string",
  3478. "pattern": "^pty.*"
  3479. },
  3480. "required": true
  3481. }
  3482. ],
  3483. "responses": {
  3484. "200": {
  3485. "description": "Updated session",
  3486. "content": {
  3487. "application/json": {
  3488. "schema": {
  3489. "$ref": "#/components/schemas/Pty"
  3490. }
  3491. }
  3492. }
  3493. },
  3494. "400": {
  3495. "description": "Bad request",
  3496. "content": {
  3497. "application/json": {
  3498. "schema": {
  3499. "$ref": "#/components/schemas/BadRequestError"
  3500. }
  3501. }
  3502. }
  3503. }
  3504. },
  3505. "description": "Update properties of an existing pseudo-terminal (PTY) session.",
  3506. "summary": "Update PTY session",
  3507. "requestBody": {
  3508. "content": {
  3509. "application/json": {
  3510. "schema": {
  3511. "type": "object",
  3512. "properties": {
  3513. "title": {
  3514. "type": "string"
  3515. },
  3516. "size": {
  3517. "type": "object",
  3518. "properties": {
  3519. "rows": {
  3520. "type": "integer",
  3521. "exclusiveMinimum": 0
  3522. },
  3523. "cols": {
  3524. "type": "integer",
  3525. "exclusiveMinimum": 0
  3526. }
  3527. },
  3528. "required": ["rows", "cols"],
  3529. "additionalProperties": false
  3530. }
  3531. },
  3532. "additionalProperties": false
  3533. }
  3534. }
  3535. }
  3536. },
  3537. "x-codeSamples": [
  3538. {
  3539. "lang": "js",
  3540. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.update({\n ...\n})"
  3541. }
  3542. ]
  3543. },
  3544. "delete": {
  3545. "tags": ["pty"],
  3546. "operationId": "pty.remove",
  3547. "parameters": [
  3548. {
  3549. "name": "directory",
  3550. "in": "query",
  3551. "required": false,
  3552. "schema": {
  3553. "type": "string"
  3554. }
  3555. },
  3556. {
  3557. "name": "workspace",
  3558. "in": "query",
  3559. "required": false,
  3560. "schema": {
  3561. "type": "string"
  3562. }
  3563. },
  3564. {
  3565. "name": "ptyID",
  3566. "in": "path",
  3567. "schema": {
  3568. "type": "string",
  3569. "pattern": "^pty.*"
  3570. },
  3571. "required": true
  3572. }
  3573. ],
  3574. "responses": {
  3575. "200": {
  3576. "description": "Session removed",
  3577. "content": {
  3578. "application/json": {
  3579. "schema": {
  3580. "type": "boolean",
  3581. "description": "Session removed"
  3582. }
  3583. }
  3584. }
  3585. },
  3586. "404": {
  3587. "description": "NotFoundError",
  3588. "content": {
  3589. "application/json": {
  3590. "schema": {
  3591. "$ref": "#/components/schemas/NotFoundError"
  3592. }
  3593. }
  3594. }
  3595. }
  3596. },
  3597. "description": "Remove and terminate a specific pseudo-terminal (PTY) session.",
  3598. "summary": "Remove PTY session",
  3599. "x-codeSamples": [
  3600. {
  3601. "lang": "js",
  3602. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.remove({\n ...\n})"
  3603. }
  3604. ]
  3605. }
  3606. },
  3607. "/pty/{ptyID}/connect-token": {
  3608. "post": {
  3609. "tags": ["pty"],
  3610. "operationId": "pty.connectToken",
  3611. "parameters": [
  3612. {
  3613. "name": "directory",
  3614. "in": "query",
  3615. "required": false,
  3616. "schema": {
  3617. "type": "string"
  3618. }
  3619. },
  3620. {
  3621. "name": "workspace",
  3622. "in": "query",
  3623. "required": false,
  3624. "schema": {
  3625. "type": "string"
  3626. }
  3627. },
  3628. {
  3629. "name": "ptyID",
  3630. "in": "path",
  3631. "schema": {
  3632. "type": "string",
  3633. "pattern": "^pty.*"
  3634. },
  3635. "required": true
  3636. }
  3637. ],
  3638. "responses": {
  3639. "200": {
  3640. "description": "WebSocket connect token",
  3641. "content": {
  3642. "application/json": {
  3643. "schema": {
  3644. "type": "object",
  3645. "properties": {
  3646. "ticket": {
  3647. "type": "string"
  3648. },
  3649. "expires_in": {
  3650. "type": "integer",
  3651. "exclusiveMinimum": 0
  3652. }
  3653. },
  3654. "required": ["ticket", "expires_in"],
  3655. "additionalProperties": false,
  3656. "description": "WebSocket connect token"
  3657. }
  3658. }
  3659. }
  3660. },
  3661. "403": {
  3662. "description": "Forbidden",
  3663. "content": {
  3664. "application/json": {
  3665. "schema": {
  3666. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  3667. }
  3668. }
  3669. }
  3670. },
  3671. "404": {
  3672. "description": "NotFoundError",
  3673. "content": {
  3674. "application/json": {
  3675. "schema": {
  3676. "$ref": "#/components/schemas/NotFoundError"
  3677. }
  3678. }
  3679. }
  3680. }
  3681. },
  3682. "description": "Create a short-lived ticket for opening a PTY WebSocket connection.",
  3683. "summary": "Create PTY WebSocket token",
  3684. "x-codeSamples": [
  3685. {
  3686. "lang": "js",
  3687. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connectToken({\n ...\n})"
  3688. }
  3689. ]
  3690. }
  3691. },
  3692. "/question": {
  3693. "get": {
  3694. "tags": ["question"],
  3695. "operationId": "question.list",
  3696. "parameters": [
  3697. {
  3698. "name": "directory",
  3699. "in": "query",
  3700. "required": false,
  3701. "schema": {
  3702. "type": "string"
  3703. }
  3704. },
  3705. {
  3706. "name": "workspace",
  3707. "in": "query",
  3708. "required": false,
  3709. "schema": {
  3710. "type": "string"
  3711. }
  3712. }
  3713. ],
  3714. "responses": {
  3715. "200": {
  3716. "description": "List of pending questions",
  3717. "content": {
  3718. "application/json": {
  3719. "schema": {
  3720. "type": "array",
  3721. "items": {
  3722. "$ref": "#/components/schemas/QuestionRequest"
  3723. },
  3724. "description": "List of pending questions"
  3725. }
  3726. }
  3727. }
  3728. }
  3729. },
  3730. "description": "Get all pending question requests across all sessions.",
  3731. "summary": "List pending questions",
  3732. "x-codeSamples": [
  3733. {
  3734. "lang": "js",
  3735. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.list({\n ...\n})"
  3736. }
  3737. ]
  3738. }
  3739. },
  3740. "/question/{requestID}/reply": {
  3741. "post": {
  3742. "tags": ["question"],
  3743. "operationId": "question.reply",
  3744. "parameters": [
  3745. {
  3746. "name": "directory",
  3747. "in": "query",
  3748. "required": false,
  3749. "schema": {
  3750. "type": "string"
  3751. }
  3752. },
  3753. {
  3754. "name": "workspace",
  3755. "in": "query",
  3756. "required": false,
  3757. "schema": {
  3758. "type": "string"
  3759. }
  3760. },
  3761. {
  3762. "name": "requestID",
  3763. "in": "path",
  3764. "schema": {
  3765. "type": "string",
  3766. "pattern": "^que.*"
  3767. },
  3768. "required": true
  3769. }
  3770. ],
  3771. "responses": {
  3772. "200": {
  3773. "description": "Question answered successfully",
  3774. "content": {
  3775. "application/json": {
  3776. "schema": {
  3777. "type": "boolean",
  3778. "description": "Question answered successfully"
  3779. }
  3780. }
  3781. }
  3782. },
  3783. "400": {
  3784. "description": "Bad request",
  3785. "content": {
  3786. "application/json": {
  3787. "schema": {
  3788. "$ref": "#/components/schemas/BadRequestError"
  3789. }
  3790. }
  3791. }
  3792. },
  3793. "404": {
  3794. "description": "Not found",
  3795. "content": {
  3796. "application/json": {
  3797. "schema": {
  3798. "$ref": "#/components/schemas/NotFoundError"
  3799. }
  3800. }
  3801. }
  3802. }
  3803. },
  3804. "description": "Provide answers to a question request from the AI assistant.",
  3805. "summary": "Reply to question request",
  3806. "requestBody": {
  3807. "content": {
  3808. "application/json": {
  3809. "schema": {
  3810. "type": "object",
  3811. "properties": {
  3812. "answers": {
  3813. "type": "array",
  3814. "items": {
  3815. "$ref": "#/components/schemas/QuestionAnswer"
  3816. },
  3817. "description": "User answers in order of questions (each answer is an array of selected labels)"
  3818. }
  3819. },
  3820. "required": ["answers"],
  3821. "additionalProperties": false
  3822. }
  3823. }
  3824. }
  3825. },
  3826. "x-codeSamples": [
  3827. {
  3828. "lang": "js",
  3829. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reply({\n ...\n})"
  3830. }
  3831. ]
  3832. }
  3833. },
  3834. "/question/{requestID}/reject": {
  3835. "post": {
  3836. "tags": ["question"],
  3837. "operationId": "question.reject",
  3838. "parameters": [
  3839. {
  3840. "name": "directory",
  3841. "in": "query",
  3842. "required": false,
  3843. "schema": {
  3844. "type": "string"
  3845. }
  3846. },
  3847. {
  3848. "name": "workspace",
  3849. "in": "query",
  3850. "required": false,
  3851. "schema": {
  3852. "type": "string"
  3853. }
  3854. },
  3855. {
  3856. "name": "requestID",
  3857. "in": "path",
  3858. "schema": {
  3859. "type": "string",
  3860. "pattern": "^que.*"
  3861. },
  3862. "required": true
  3863. }
  3864. ],
  3865. "responses": {
  3866. "200": {
  3867. "description": "Question rejected successfully",
  3868. "content": {
  3869. "application/json": {
  3870. "schema": {
  3871. "type": "boolean",
  3872. "description": "Question rejected successfully"
  3873. }
  3874. }
  3875. }
  3876. },
  3877. "400": {
  3878. "description": "Bad request",
  3879. "content": {
  3880. "application/json": {
  3881. "schema": {
  3882. "$ref": "#/components/schemas/BadRequestError"
  3883. }
  3884. }
  3885. }
  3886. },
  3887. "404": {
  3888. "description": "Not found",
  3889. "content": {
  3890. "application/json": {
  3891. "schema": {
  3892. "$ref": "#/components/schemas/NotFoundError"
  3893. }
  3894. }
  3895. }
  3896. }
  3897. },
  3898. "description": "Reject a question request from the AI assistant.",
  3899. "summary": "Reject question request",
  3900. "x-codeSamples": [
  3901. {
  3902. "lang": "js",
  3903. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.question.reject({\n ...\n})"
  3904. }
  3905. ]
  3906. }
  3907. },
  3908. "/permission": {
  3909. "get": {
  3910. "tags": ["permission"],
  3911. "operationId": "permission.list",
  3912. "parameters": [
  3913. {
  3914. "name": "directory",
  3915. "in": "query",
  3916. "required": false,
  3917. "schema": {
  3918. "type": "string"
  3919. }
  3920. },
  3921. {
  3922. "name": "workspace",
  3923. "in": "query",
  3924. "required": false,
  3925. "schema": {
  3926. "type": "string"
  3927. }
  3928. }
  3929. ],
  3930. "responses": {
  3931. "200": {
  3932. "description": "List of pending permissions",
  3933. "content": {
  3934. "application/json": {
  3935. "schema": {
  3936. "type": "array",
  3937. "items": {
  3938. "$ref": "#/components/schemas/PermissionRequest"
  3939. },
  3940. "description": "List of pending permissions"
  3941. }
  3942. }
  3943. }
  3944. }
  3945. },
  3946. "description": "Get all pending permission requests across all sessions.",
  3947. "summary": "List pending permissions",
  3948. "x-codeSamples": [
  3949. {
  3950. "lang": "js",
  3951. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.list({\n ...\n})"
  3952. }
  3953. ]
  3954. }
  3955. },
  3956. "/permission/{requestID}/reply": {
  3957. "post": {
  3958. "tags": ["permission"],
  3959. "operationId": "permission.reply",
  3960. "parameters": [
  3961. {
  3962. "name": "directory",
  3963. "in": "query",
  3964. "required": false,
  3965. "schema": {
  3966. "type": "string"
  3967. }
  3968. },
  3969. {
  3970. "name": "workspace",
  3971. "in": "query",
  3972. "required": false,
  3973. "schema": {
  3974. "type": "string"
  3975. }
  3976. },
  3977. {
  3978. "name": "requestID",
  3979. "in": "path",
  3980. "schema": {
  3981. "type": "string",
  3982. "pattern": "^per.*"
  3983. },
  3984. "required": true
  3985. }
  3986. ],
  3987. "responses": {
  3988. "200": {
  3989. "description": "Permission processed successfully",
  3990. "content": {
  3991. "application/json": {
  3992. "schema": {
  3993. "type": "boolean",
  3994. "description": "Permission processed successfully"
  3995. }
  3996. }
  3997. }
  3998. },
  3999. "400": {
  4000. "description": "Bad request",
  4001. "content": {
  4002. "application/json": {
  4003. "schema": {
  4004. "$ref": "#/components/schemas/BadRequestError"
  4005. }
  4006. }
  4007. }
  4008. },
  4009. "404": {
  4010. "description": "Not found",
  4011. "content": {
  4012. "application/json": {
  4013. "schema": {
  4014. "$ref": "#/components/schemas/NotFoundError"
  4015. }
  4016. }
  4017. }
  4018. }
  4019. },
  4020. "description": "Approve or deny a permission request from the AI assistant.",
  4021. "summary": "Respond to permission request",
  4022. "requestBody": {
  4023. "content": {
  4024. "application/json": {
  4025. "schema": {
  4026. "type": "object",
  4027. "properties": {
  4028. "reply": {
  4029. "type": "string",
  4030. "enum": ["once", "always", "reject"]
  4031. },
  4032. "message": {
  4033. "type": "string"
  4034. }
  4035. },
  4036. "required": ["reply"],
  4037. "additionalProperties": false
  4038. }
  4039. }
  4040. }
  4041. },
  4042. "x-codeSamples": [
  4043. {
  4044. "lang": "js",
  4045. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.reply({\n ...\n})"
  4046. }
  4047. ]
  4048. }
  4049. },
  4050. "/provider": {
  4051. "get": {
  4052. "tags": ["provider"],
  4053. "operationId": "provider.list",
  4054. "parameters": [
  4055. {
  4056. "name": "directory",
  4057. "in": "query",
  4058. "required": false,
  4059. "schema": {
  4060. "type": "string"
  4061. }
  4062. },
  4063. {
  4064. "name": "workspace",
  4065. "in": "query",
  4066. "required": false,
  4067. "schema": {
  4068. "type": "string"
  4069. }
  4070. }
  4071. ],
  4072. "responses": {
  4073. "200": {
  4074. "description": "List of providers",
  4075. "content": {
  4076. "application/json": {
  4077. "schema": {
  4078. "type": "object",
  4079. "properties": {
  4080. "all": {
  4081. "type": "array",
  4082. "items": {
  4083. "$ref": "#/components/schemas/Provider"
  4084. }
  4085. },
  4086. "default": {
  4087. "type": "object",
  4088. "additionalProperties": {
  4089. "type": "string"
  4090. }
  4091. },
  4092. "connected": {
  4093. "type": "array",
  4094. "items": {
  4095. "type": "string"
  4096. }
  4097. }
  4098. },
  4099. "required": ["all", "default", "connected"],
  4100. "additionalProperties": false,
  4101. "description": "List of providers"
  4102. }
  4103. }
  4104. }
  4105. }
  4106. },
  4107. "description": "Get a list of all available AI providers, including both available and connected ones.",
  4108. "summary": "List providers",
  4109. "x-codeSamples": [
  4110. {
  4111. "lang": "js",
  4112. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.list({\n ...\n})"
  4113. }
  4114. ]
  4115. }
  4116. },
  4117. "/provider/auth": {
  4118. "get": {
  4119. "tags": ["provider"],
  4120. "operationId": "provider.auth",
  4121. "parameters": [
  4122. {
  4123. "name": "directory",
  4124. "in": "query",
  4125. "required": false,
  4126. "schema": {
  4127. "type": "string"
  4128. }
  4129. },
  4130. {
  4131. "name": "workspace",
  4132. "in": "query",
  4133. "required": false,
  4134. "schema": {
  4135. "type": "string"
  4136. }
  4137. }
  4138. ],
  4139. "responses": {
  4140. "200": {
  4141. "description": "Provider auth methods",
  4142. "content": {
  4143. "application/json": {
  4144. "schema": {
  4145. "type": "object",
  4146. "additionalProperties": {
  4147. "type": "array",
  4148. "items": {
  4149. "$ref": "#/components/schemas/ProviderAuthMethod"
  4150. }
  4151. },
  4152. "description": "Provider auth methods"
  4153. }
  4154. }
  4155. }
  4156. }
  4157. },
  4158. "description": "Retrieve available authentication methods for all AI providers.",
  4159. "summary": "Get provider auth methods",
  4160. "x-codeSamples": [
  4161. {
  4162. "lang": "js",
  4163. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.auth({\n ...\n})"
  4164. }
  4165. ]
  4166. }
  4167. },
  4168. "/provider/{providerID}/oauth/authorize": {
  4169. "post": {
  4170. "tags": ["provider"],
  4171. "operationId": "provider.oauth.authorize",
  4172. "parameters": [
  4173. {
  4174. "name": "directory",
  4175. "in": "query",
  4176. "required": false,
  4177. "schema": {
  4178. "type": "string"
  4179. }
  4180. },
  4181. {
  4182. "name": "workspace",
  4183. "in": "query",
  4184. "required": false,
  4185. "schema": {
  4186. "type": "string"
  4187. }
  4188. },
  4189. {
  4190. "name": "providerID",
  4191. "in": "path",
  4192. "schema": {
  4193. "type": "string"
  4194. },
  4195. "required": true
  4196. }
  4197. ],
  4198. "responses": {
  4199. "200": {
  4200. "description": "Authorization URL and method",
  4201. "content": {
  4202. "application/json": {
  4203. "schema": {
  4204. "$ref": "#/components/schemas/ProviderAuthAuthorization"
  4205. }
  4206. }
  4207. }
  4208. },
  4209. "400": {
  4210. "description": "Bad request",
  4211. "content": {
  4212. "application/json": {
  4213. "schema": {
  4214. "$ref": "#/components/schemas/BadRequestError"
  4215. }
  4216. }
  4217. }
  4218. }
  4219. },
  4220. "description": "Start the OAuth authorization flow for a provider.",
  4221. "summary": "Start OAuth authorization",
  4222. "requestBody": {
  4223. "content": {
  4224. "application/json": {
  4225. "schema": {
  4226. "type": "object",
  4227. "properties": {
  4228. "method": {
  4229. "type": "number",
  4230. "description": "Auth method index"
  4231. },
  4232. "inputs": {
  4233. "type": "object",
  4234. "additionalProperties": {
  4235. "type": "string"
  4236. }
  4237. }
  4238. },
  4239. "required": ["method"],
  4240. "additionalProperties": false
  4241. }
  4242. }
  4243. }
  4244. },
  4245. "x-codeSamples": [
  4246. {
  4247. "lang": "js",
  4248. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.authorize({\n ...\n})"
  4249. }
  4250. ]
  4251. }
  4252. },
  4253. "/provider/{providerID}/oauth/callback": {
  4254. "post": {
  4255. "tags": ["provider"],
  4256. "operationId": "provider.oauth.callback",
  4257. "parameters": [
  4258. {
  4259. "name": "directory",
  4260. "in": "query",
  4261. "required": false,
  4262. "schema": {
  4263. "type": "string"
  4264. }
  4265. },
  4266. {
  4267. "name": "workspace",
  4268. "in": "query",
  4269. "required": false,
  4270. "schema": {
  4271. "type": "string"
  4272. }
  4273. },
  4274. {
  4275. "name": "providerID",
  4276. "in": "path",
  4277. "schema": {
  4278. "type": "string"
  4279. },
  4280. "required": true
  4281. }
  4282. ],
  4283. "responses": {
  4284. "200": {
  4285. "description": "OAuth callback processed successfully",
  4286. "content": {
  4287. "application/json": {
  4288. "schema": {
  4289. "type": "boolean",
  4290. "description": "OAuth callback processed successfully"
  4291. }
  4292. }
  4293. }
  4294. },
  4295. "400": {
  4296. "description": "Bad request",
  4297. "content": {
  4298. "application/json": {
  4299. "schema": {
  4300. "$ref": "#/components/schemas/BadRequestError"
  4301. }
  4302. }
  4303. }
  4304. }
  4305. },
  4306. "description": "Handle the OAuth callback from a provider after user authorization.",
  4307. "summary": "Handle OAuth callback",
  4308. "requestBody": {
  4309. "content": {
  4310. "application/json": {
  4311. "schema": {
  4312. "type": "object",
  4313. "properties": {
  4314. "method": {
  4315. "type": "number",
  4316. "description": "Auth method index"
  4317. },
  4318. "code": {
  4319. "type": "string"
  4320. }
  4321. },
  4322. "required": ["method"],
  4323. "additionalProperties": false
  4324. }
  4325. }
  4326. }
  4327. },
  4328. "x-codeSamples": [
  4329. {
  4330. "lang": "js",
  4331. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.provider.oauth.callback({\n ...\n})"
  4332. }
  4333. ]
  4334. }
  4335. },
  4336. "/session": {
  4337. "get": {
  4338. "tags": ["session"],
  4339. "operationId": "session.list",
  4340. "parameters": [
  4341. {
  4342. "name": "directory",
  4343. "in": "query",
  4344. "required": false,
  4345. "schema": {
  4346. "type": "string"
  4347. }
  4348. },
  4349. {
  4350. "name": "workspace",
  4351. "in": "query",
  4352. "required": false,
  4353. "schema": {
  4354. "type": "string"
  4355. }
  4356. },
  4357. {
  4358. "name": "scope",
  4359. "in": "query",
  4360. "schema": {
  4361. "type": "string",
  4362. "enum": ["project"]
  4363. },
  4364. "required": false
  4365. },
  4366. {
  4367. "name": "path",
  4368. "in": "query",
  4369. "schema": {
  4370. "type": "string"
  4371. },
  4372. "required": false
  4373. },
  4374. {
  4375. "name": "roots",
  4376. "in": "query",
  4377. "schema": {
  4378. "anyOf": [
  4379. {
  4380. "type": "boolean"
  4381. },
  4382. {
  4383. "type": "string",
  4384. "enum": ["true", "false"]
  4385. }
  4386. ]
  4387. },
  4388. "required": false
  4389. },
  4390. {
  4391. "name": "start",
  4392. "in": "query",
  4393. "schema": {
  4394. "type": "number"
  4395. },
  4396. "required": false
  4397. },
  4398. {
  4399. "name": "search",
  4400. "in": "query",
  4401. "schema": {
  4402. "type": "string"
  4403. },
  4404. "required": false
  4405. },
  4406. {
  4407. "name": "limit",
  4408. "in": "query",
  4409. "schema": {
  4410. "type": "number"
  4411. },
  4412. "required": false
  4413. }
  4414. ],
  4415. "responses": {
  4416. "200": {
  4417. "description": "List of sessions",
  4418. "content": {
  4419. "application/json": {
  4420. "schema": {
  4421. "type": "array",
  4422. "items": {
  4423. "$ref": "#/components/schemas/Session"
  4424. },
  4425. "description": "List of sessions"
  4426. }
  4427. }
  4428. }
  4429. }
  4430. },
  4431. "description": "Get a list of all OpenCode sessions, sorted by most recently updated.",
  4432. "summary": "List sessions",
  4433. "x-codeSamples": [
  4434. {
  4435. "lang": "js",
  4436. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.list({\n ...\n})"
  4437. }
  4438. ]
  4439. },
  4440. "post": {
  4441. "tags": ["session"],
  4442. "operationId": "session.create",
  4443. "parameters": [
  4444. {
  4445. "name": "directory",
  4446. "in": "query",
  4447. "required": false,
  4448. "schema": {
  4449. "type": "string"
  4450. }
  4451. },
  4452. {
  4453. "name": "workspace",
  4454. "in": "query",
  4455. "required": false,
  4456. "schema": {
  4457. "type": "string"
  4458. }
  4459. }
  4460. ],
  4461. "responses": {
  4462. "200": {
  4463. "description": "Successfully created session",
  4464. "content": {
  4465. "application/json": {
  4466. "schema": {
  4467. "$ref": "#/components/schemas/Session"
  4468. }
  4469. }
  4470. }
  4471. },
  4472. "400": {
  4473. "description": "Bad request",
  4474. "content": {
  4475. "application/json": {
  4476. "schema": {
  4477. "$ref": "#/components/schemas/BadRequestError"
  4478. }
  4479. }
  4480. }
  4481. }
  4482. },
  4483. "description": "Create a new OpenCode session for interacting with AI assistants and managing conversations.",
  4484. "summary": "Create session",
  4485. "requestBody": {
  4486. "content": {
  4487. "application/json": {
  4488. "schema": {
  4489. "type": "object",
  4490. "properties": {
  4491. "parentID": {
  4492. "type": "string"
  4493. },
  4494. "title": {
  4495. "type": "string"
  4496. },
  4497. "agent": {
  4498. "type": "string"
  4499. },
  4500. "model": {
  4501. "type": "object",
  4502. "properties": {
  4503. "id": {
  4504. "type": "string"
  4505. },
  4506. "providerID": {
  4507. "type": "string"
  4508. },
  4509. "variant": {
  4510. "type": "string"
  4511. }
  4512. },
  4513. "required": ["id", "providerID"],
  4514. "additionalProperties": false
  4515. },
  4516. "permission": {
  4517. "$ref": "#/components/schemas/PermissionRuleset"
  4518. },
  4519. "workspaceID": {
  4520. "type": "string"
  4521. }
  4522. },
  4523. "additionalProperties": false
  4524. }
  4525. }
  4526. }
  4527. },
  4528. "x-codeSamples": [
  4529. {
  4530. "lang": "js",
  4531. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.create({\n ...\n})"
  4532. }
  4533. ]
  4534. }
  4535. },
  4536. "/session/status": {
  4537. "get": {
  4538. "tags": ["session"],
  4539. "operationId": "session.status",
  4540. "parameters": [
  4541. {
  4542. "name": "directory",
  4543. "in": "query",
  4544. "required": false,
  4545. "schema": {
  4546. "type": "string"
  4547. }
  4548. },
  4549. {
  4550. "name": "workspace",
  4551. "in": "query",
  4552. "required": false,
  4553. "schema": {
  4554. "type": "string"
  4555. }
  4556. }
  4557. ],
  4558. "responses": {
  4559. "200": {
  4560. "description": "Get session status",
  4561. "content": {
  4562. "application/json": {
  4563. "schema": {
  4564. "type": "object",
  4565. "additionalProperties": {
  4566. "$ref": "#/components/schemas/SessionStatus"
  4567. },
  4568. "description": "Get session status"
  4569. }
  4570. }
  4571. }
  4572. },
  4573. "400": {
  4574. "description": "Bad request",
  4575. "content": {
  4576. "application/json": {
  4577. "schema": {
  4578. "$ref": "#/components/schemas/BadRequestError"
  4579. }
  4580. }
  4581. }
  4582. }
  4583. },
  4584. "description": "Retrieve the current status of all sessions, including active, idle, and completed states.",
  4585. "summary": "Get session status",
  4586. "x-codeSamples": [
  4587. {
  4588. "lang": "js",
  4589. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.status({\n ...\n})"
  4590. }
  4591. ]
  4592. }
  4593. },
  4594. "/session/{sessionID}": {
  4595. "get": {
  4596. "tags": ["session"],
  4597. "operationId": "session.get",
  4598. "parameters": [
  4599. {
  4600. "name": "directory",
  4601. "in": "query",
  4602. "required": false,
  4603. "schema": {
  4604. "type": "string"
  4605. }
  4606. },
  4607. {
  4608. "name": "workspace",
  4609. "in": "query",
  4610. "required": false,
  4611. "schema": {
  4612. "type": "string"
  4613. }
  4614. },
  4615. {
  4616. "name": "sessionID",
  4617. "in": "path",
  4618. "schema": {
  4619. "type": "string",
  4620. "pattern": "^ses.*"
  4621. },
  4622. "required": true
  4623. }
  4624. ],
  4625. "responses": {
  4626. "200": {
  4627. "description": "Get session",
  4628. "content": {
  4629. "application/json": {
  4630. "schema": {
  4631. "$ref": "#/components/schemas/Session"
  4632. }
  4633. }
  4634. }
  4635. },
  4636. "400": {
  4637. "description": "Bad request",
  4638. "content": {
  4639. "application/json": {
  4640. "schema": {
  4641. "$ref": "#/components/schemas/BadRequestError"
  4642. }
  4643. }
  4644. }
  4645. },
  4646. "404": {
  4647. "description": "NotFoundError",
  4648. "content": {
  4649. "application/json": {
  4650. "schema": {
  4651. "$ref": "#/components/schemas/NotFoundError"
  4652. }
  4653. }
  4654. }
  4655. }
  4656. },
  4657. "description": "Retrieve detailed information about a specific OpenCode session.",
  4658. "summary": "Get session",
  4659. "x-codeSamples": [
  4660. {
  4661. "lang": "js",
  4662. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.get({\n ...\n})"
  4663. }
  4664. ]
  4665. },
  4666. "delete": {
  4667. "tags": ["session"],
  4668. "operationId": "session.delete",
  4669. "parameters": [
  4670. {
  4671. "name": "directory",
  4672. "in": "query",
  4673. "required": false,
  4674. "schema": {
  4675. "type": "string"
  4676. }
  4677. },
  4678. {
  4679. "name": "workspace",
  4680. "in": "query",
  4681. "required": false,
  4682. "schema": {
  4683. "type": "string"
  4684. }
  4685. },
  4686. {
  4687. "name": "sessionID",
  4688. "in": "path",
  4689. "schema": {
  4690. "type": "string",
  4691. "pattern": "^ses.*"
  4692. },
  4693. "required": true
  4694. }
  4695. ],
  4696. "responses": {
  4697. "200": {
  4698. "description": "Successfully deleted session",
  4699. "content": {
  4700. "application/json": {
  4701. "schema": {
  4702. "type": "boolean",
  4703. "description": "Successfully deleted session"
  4704. }
  4705. }
  4706. }
  4707. },
  4708. "400": {
  4709. "description": "Bad request",
  4710. "content": {
  4711. "application/json": {
  4712. "schema": {
  4713. "$ref": "#/components/schemas/BadRequestError"
  4714. }
  4715. }
  4716. }
  4717. },
  4718. "404": {
  4719. "description": "NotFoundError",
  4720. "content": {
  4721. "application/json": {
  4722. "schema": {
  4723. "$ref": "#/components/schemas/NotFoundError"
  4724. }
  4725. }
  4726. }
  4727. }
  4728. },
  4729. "description": "Delete a session and permanently remove all associated data, including messages and history.",
  4730. "summary": "Delete session",
  4731. "x-codeSamples": [
  4732. {
  4733. "lang": "js",
  4734. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.delete({\n ...\n})"
  4735. }
  4736. ]
  4737. },
  4738. "patch": {
  4739. "tags": ["session"],
  4740. "operationId": "session.update",
  4741. "parameters": [
  4742. {
  4743. "name": "directory",
  4744. "in": "query",
  4745. "required": false,
  4746. "schema": {
  4747. "type": "string"
  4748. }
  4749. },
  4750. {
  4751. "name": "workspace",
  4752. "in": "query",
  4753. "required": false,
  4754. "schema": {
  4755. "type": "string"
  4756. }
  4757. },
  4758. {
  4759. "name": "sessionID",
  4760. "in": "path",
  4761. "schema": {
  4762. "type": "string",
  4763. "pattern": "^ses.*"
  4764. },
  4765. "required": true
  4766. }
  4767. ],
  4768. "responses": {
  4769. "200": {
  4770. "description": "Successfully updated session",
  4771. "content": {
  4772. "application/json": {
  4773. "schema": {
  4774. "$ref": "#/components/schemas/Session"
  4775. }
  4776. }
  4777. }
  4778. },
  4779. "400": {
  4780. "description": "Bad request",
  4781. "content": {
  4782. "application/json": {
  4783. "schema": {
  4784. "$ref": "#/components/schemas/BadRequestError"
  4785. }
  4786. }
  4787. }
  4788. },
  4789. "404": {
  4790. "description": "NotFoundError",
  4791. "content": {
  4792. "application/json": {
  4793. "schema": {
  4794. "$ref": "#/components/schemas/NotFoundError"
  4795. }
  4796. }
  4797. }
  4798. }
  4799. },
  4800. "description": "Update properties of an existing session, such as title or other metadata.",
  4801. "summary": "Update session",
  4802. "requestBody": {
  4803. "content": {
  4804. "application/json": {
  4805. "schema": {
  4806. "type": "object",
  4807. "properties": {
  4808. "title": {
  4809. "type": "string"
  4810. },
  4811. "permission": {
  4812. "$ref": "#/components/schemas/PermissionRuleset"
  4813. },
  4814. "time": {
  4815. "type": "object",
  4816. "properties": {
  4817. "archived": {
  4818. "type": "number"
  4819. }
  4820. },
  4821. "additionalProperties": false
  4822. }
  4823. },
  4824. "additionalProperties": false
  4825. }
  4826. }
  4827. }
  4828. },
  4829. "x-codeSamples": [
  4830. {
  4831. "lang": "js",
  4832. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.update({\n ...\n})"
  4833. }
  4834. ]
  4835. }
  4836. },
  4837. "/session/{sessionID}/children": {
  4838. "get": {
  4839. "tags": ["session"],
  4840. "operationId": "session.children",
  4841. "parameters": [
  4842. {
  4843. "name": "directory",
  4844. "in": "query",
  4845. "required": false,
  4846. "schema": {
  4847. "type": "string"
  4848. }
  4849. },
  4850. {
  4851. "name": "workspace",
  4852. "in": "query",
  4853. "required": false,
  4854. "schema": {
  4855. "type": "string"
  4856. }
  4857. },
  4858. {
  4859. "name": "sessionID",
  4860. "in": "path",
  4861. "schema": {
  4862. "type": "string",
  4863. "pattern": "^ses.*"
  4864. },
  4865. "required": true
  4866. }
  4867. ],
  4868. "responses": {
  4869. "200": {
  4870. "description": "List of children",
  4871. "content": {
  4872. "application/json": {
  4873. "schema": {
  4874. "type": "array",
  4875. "items": {
  4876. "$ref": "#/components/schemas/Session"
  4877. },
  4878. "description": "List of children"
  4879. }
  4880. }
  4881. }
  4882. },
  4883. "400": {
  4884. "description": "Bad request",
  4885. "content": {
  4886. "application/json": {
  4887. "schema": {
  4888. "$ref": "#/components/schemas/BadRequestError"
  4889. }
  4890. }
  4891. }
  4892. },
  4893. "404": {
  4894. "description": "Not found",
  4895. "content": {
  4896. "application/json": {
  4897. "schema": {
  4898. "$ref": "#/components/schemas/NotFoundError"
  4899. }
  4900. }
  4901. }
  4902. }
  4903. },
  4904. "description": "Retrieve all child sessions that were forked from the specified parent session.",
  4905. "summary": "Get session children",
  4906. "x-codeSamples": [
  4907. {
  4908. "lang": "js",
  4909. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.children({\n ...\n})"
  4910. }
  4911. ]
  4912. }
  4913. },
  4914. "/session/{sessionID}/todo": {
  4915. "get": {
  4916. "tags": ["session"],
  4917. "operationId": "session.todo",
  4918. "parameters": [
  4919. {
  4920. "name": "directory",
  4921. "in": "query",
  4922. "required": false,
  4923. "schema": {
  4924. "type": "string"
  4925. }
  4926. },
  4927. {
  4928. "name": "workspace",
  4929. "in": "query",
  4930. "required": false,
  4931. "schema": {
  4932. "type": "string"
  4933. }
  4934. },
  4935. {
  4936. "name": "sessionID",
  4937. "in": "path",
  4938. "schema": {
  4939. "type": "string",
  4940. "pattern": "^ses.*"
  4941. },
  4942. "required": true
  4943. }
  4944. ],
  4945. "responses": {
  4946. "200": {
  4947. "description": "Todo list",
  4948. "content": {
  4949. "application/json": {
  4950. "schema": {
  4951. "type": "array",
  4952. "items": {
  4953. "$ref": "#/components/schemas/Todo"
  4954. },
  4955. "description": "Todo list"
  4956. }
  4957. }
  4958. }
  4959. },
  4960. "400": {
  4961. "description": "Bad request",
  4962. "content": {
  4963. "application/json": {
  4964. "schema": {
  4965. "$ref": "#/components/schemas/BadRequestError"
  4966. }
  4967. }
  4968. }
  4969. },
  4970. "404": {
  4971. "description": "Not found",
  4972. "content": {
  4973. "application/json": {
  4974. "schema": {
  4975. "$ref": "#/components/schemas/NotFoundError"
  4976. }
  4977. }
  4978. }
  4979. }
  4980. },
  4981. "description": "Retrieve the todo list associated with a specific session, showing tasks and action items.",
  4982. "summary": "Get session todos",
  4983. "x-codeSamples": [
  4984. {
  4985. "lang": "js",
  4986. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.todo({\n ...\n})"
  4987. }
  4988. ]
  4989. }
  4990. },
  4991. "/session/{sessionID}/diff": {
  4992. "get": {
  4993. "tags": ["session"],
  4994. "operationId": "session.diff",
  4995. "parameters": [
  4996. {
  4997. "name": "directory",
  4998. "in": "query",
  4999. "required": false,
  5000. "schema": {
  5001. "type": "string"
  5002. }
  5003. },
  5004. {
  5005. "name": "workspace",
  5006. "in": "query",
  5007. "required": false,
  5008. "schema": {
  5009. "type": "string"
  5010. }
  5011. },
  5012. {
  5013. "name": "sessionID",
  5014. "in": "path",
  5015. "schema": {
  5016. "type": "string",
  5017. "pattern": "^ses.*"
  5018. },
  5019. "required": true
  5020. },
  5021. {
  5022. "name": "messageID",
  5023. "in": "query",
  5024. "schema": {
  5025. "type": "string",
  5026. "pattern": "^msg.*"
  5027. },
  5028. "required": false
  5029. }
  5030. ],
  5031. "responses": {
  5032. "200": {
  5033. "description": "Successfully retrieved diff",
  5034. "content": {
  5035. "application/json": {
  5036. "schema": {
  5037. "type": "array",
  5038. "items": {
  5039. "$ref": "#/components/schemas/SnapshotFileDiff"
  5040. },
  5041. "description": "Successfully retrieved diff"
  5042. }
  5043. }
  5044. }
  5045. }
  5046. },
  5047. "description": "Get the file changes (diff) that resulted from a specific user message in the session.",
  5048. "summary": "Get message diff",
  5049. "x-codeSamples": [
  5050. {
  5051. "lang": "js",
  5052. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.diff({\n ...\n})"
  5053. }
  5054. ]
  5055. }
  5056. },
  5057. "/session/{sessionID}/message": {
  5058. "get": {
  5059. "tags": ["session"],
  5060. "operationId": "session.messages",
  5061. "parameters": [
  5062. {
  5063. "name": "directory",
  5064. "in": "query",
  5065. "required": false,
  5066. "schema": {
  5067. "type": "string"
  5068. }
  5069. },
  5070. {
  5071. "name": "workspace",
  5072. "in": "query",
  5073. "required": false,
  5074. "schema": {
  5075. "type": "string"
  5076. }
  5077. },
  5078. {
  5079. "name": "sessionID",
  5080. "in": "path",
  5081. "schema": {
  5082. "type": "string",
  5083. "pattern": "^ses.*"
  5084. },
  5085. "required": true
  5086. },
  5087. {
  5088. "name": "limit",
  5089. "in": "query",
  5090. "schema": {
  5091. "type": "integer",
  5092. "minimum": 0,
  5093. "maximum": 9007199254740991
  5094. },
  5095. "required": false
  5096. },
  5097. {
  5098. "name": "before",
  5099. "in": "query",
  5100. "schema": {
  5101. "type": "string"
  5102. },
  5103. "required": false
  5104. }
  5105. ],
  5106. "responses": {
  5107. "200": {
  5108. "description": "List of messages",
  5109. "content": {
  5110. "application/json": {
  5111. "schema": {
  5112. "type": "array",
  5113. "items": {
  5114. "type": "object",
  5115. "properties": {
  5116. "info": {
  5117. "$ref": "#/components/schemas/Message"
  5118. },
  5119. "parts": {
  5120. "type": "array",
  5121. "items": {
  5122. "$ref": "#/components/schemas/Part"
  5123. }
  5124. }
  5125. },
  5126. "required": ["info", "parts"],
  5127. "additionalProperties": false
  5128. },
  5129. "description": "List of messages"
  5130. }
  5131. }
  5132. }
  5133. },
  5134. "400": {
  5135. "description": "Bad request",
  5136. "content": {
  5137. "application/json": {
  5138. "schema": {
  5139. "$ref": "#/components/schemas/BadRequestError"
  5140. }
  5141. }
  5142. }
  5143. },
  5144. "404": {
  5145. "description": "NotFoundError",
  5146. "content": {
  5147. "application/json": {
  5148. "schema": {
  5149. "$ref": "#/components/schemas/NotFoundError"
  5150. }
  5151. }
  5152. }
  5153. }
  5154. },
  5155. "description": "Retrieve all messages in a session, including user prompts and AI responses.",
  5156. "summary": "Get session messages",
  5157. "x-codeSamples": [
  5158. {
  5159. "lang": "js",
  5160. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.messages({\n ...\n})"
  5161. }
  5162. ]
  5163. },
  5164. "post": {
  5165. "tags": ["session"],
  5166. "operationId": "session.prompt",
  5167. "parameters": [
  5168. {
  5169. "name": "directory",
  5170. "in": "query",
  5171. "required": false,
  5172. "schema": {
  5173. "type": "string"
  5174. }
  5175. },
  5176. {
  5177. "name": "workspace",
  5178. "in": "query",
  5179. "required": false,
  5180. "schema": {
  5181. "type": "string"
  5182. }
  5183. },
  5184. {
  5185. "name": "sessionID",
  5186. "in": "path",
  5187. "schema": {
  5188. "type": "string",
  5189. "pattern": "^ses.*"
  5190. },
  5191. "required": true
  5192. }
  5193. ],
  5194. "responses": {
  5195. "200": {
  5196. "description": "Created message",
  5197. "content": {
  5198. "application/json": {
  5199. "schema": {
  5200. "type": "object",
  5201. "required": ["info", "parts"],
  5202. "properties": {
  5203. "info": {
  5204. "$ref": "#/components/schemas/AssistantMessage"
  5205. },
  5206. "parts": {
  5207. "type": "array",
  5208. "items": {
  5209. "$ref": "#/components/schemas/Part"
  5210. }
  5211. }
  5212. }
  5213. }
  5214. }
  5215. }
  5216. },
  5217. "400": {
  5218. "description": "Bad request",
  5219. "content": {
  5220. "application/json": {
  5221. "schema": {
  5222. "$ref": "#/components/schemas/BadRequestError"
  5223. }
  5224. }
  5225. }
  5226. },
  5227. "404": {
  5228. "description": "Not found",
  5229. "content": {
  5230. "application/json": {
  5231. "schema": {
  5232. "$ref": "#/components/schemas/NotFoundError"
  5233. }
  5234. }
  5235. }
  5236. }
  5237. },
  5238. "description": "Create and send a new message to a session, streaming the AI response.",
  5239. "summary": "Send message",
  5240. "requestBody": {
  5241. "content": {
  5242. "application/json": {
  5243. "schema": {
  5244. "type": "object",
  5245. "properties": {
  5246. "messageID": {
  5247. "type": "string"
  5248. },
  5249. "model": {
  5250. "type": "object",
  5251. "properties": {
  5252. "providerID": {
  5253. "type": "string"
  5254. },
  5255. "modelID": {
  5256. "type": "string"
  5257. }
  5258. },
  5259. "required": ["providerID", "modelID"],
  5260. "additionalProperties": false
  5261. },
  5262. "agent": {
  5263. "type": "string"
  5264. },
  5265. "noReply": {
  5266. "type": "boolean"
  5267. },
  5268. "tools": {
  5269. "type": "object",
  5270. "additionalProperties": {
  5271. "type": "boolean"
  5272. }
  5273. },
  5274. "format": {
  5275. "$ref": "#/components/schemas/OutputFormat"
  5276. },
  5277. "system": {
  5278. "type": "string"
  5279. },
  5280. "variant": {
  5281. "type": "string"
  5282. },
  5283. "parts": {
  5284. "type": "array",
  5285. "items": {
  5286. "anyOf": [
  5287. {
  5288. "$ref": "#/components/schemas/TextPartInput"
  5289. },
  5290. {
  5291. "$ref": "#/components/schemas/FilePartInput"
  5292. },
  5293. {
  5294. "$ref": "#/components/schemas/AgentPartInput"
  5295. },
  5296. {
  5297. "$ref": "#/components/schemas/SubtaskPartInput"
  5298. }
  5299. ]
  5300. }
  5301. }
  5302. },
  5303. "required": ["parts"],
  5304. "additionalProperties": false
  5305. }
  5306. }
  5307. }
  5308. },
  5309. "x-codeSamples": [
  5310. {
  5311. "lang": "js",
  5312. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt({\n ...\n})"
  5313. }
  5314. ]
  5315. }
  5316. },
  5317. "/session/{sessionID}/message/{messageID}": {
  5318. "get": {
  5319. "tags": ["session"],
  5320. "operationId": "session.message",
  5321. "parameters": [
  5322. {
  5323. "name": "directory",
  5324. "in": "query",
  5325. "required": false,
  5326. "schema": {
  5327. "type": "string"
  5328. }
  5329. },
  5330. {
  5331. "name": "workspace",
  5332. "in": "query",
  5333. "required": false,
  5334. "schema": {
  5335. "type": "string"
  5336. }
  5337. },
  5338. {
  5339. "name": "sessionID",
  5340. "in": "path",
  5341. "schema": {
  5342. "type": "string",
  5343. "pattern": "^ses.*"
  5344. },
  5345. "required": true
  5346. },
  5347. {
  5348. "name": "messageID",
  5349. "in": "path",
  5350. "schema": {
  5351. "type": "string",
  5352. "pattern": "^msg.*"
  5353. },
  5354. "required": true
  5355. }
  5356. ],
  5357. "responses": {
  5358. "200": {
  5359. "description": "Message",
  5360. "content": {
  5361. "application/json": {
  5362. "schema": {
  5363. "type": "object",
  5364. "properties": {
  5365. "info": {
  5366. "$ref": "#/components/schemas/Message"
  5367. },
  5368. "parts": {
  5369. "type": "array",
  5370. "items": {
  5371. "$ref": "#/components/schemas/Part"
  5372. }
  5373. }
  5374. },
  5375. "required": ["info", "parts"],
  5376. "additionalProperties": false,
  5377. "description": "Message"
  5378. }
  5379. }
  5380. }
  5381. },
  5382. "400": {
  5383. "description": "Bad request",
  5384. "content": {
  5385. "application/json": {
  5386. "schema": {
  5387. "$ref": "#/components/schemas/BadRequestError"
  5388. }
  5389. }
  5390. }
  5391. },
  5392. "404": {
  5393. "description": "NotFoundError",
  5394. "content": {
  5395. "application/json": {
  5396. "schema": {
  5397. "$ref": "#/components/schemas/NotFoundError"
  5398. }
  5399. }
  5400. }
  5401. }
  5402. },
  5403. "description": "Retrieve a specific message from a session by its message ID.",
  5404. "summary": "Get message",
  5405. "x-codeSamples": [
  5406. {
  5407. "lang": "js",
  5408. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.message({\n ...\n})"
  5409. }
  5410. ]
  5411. },
  5412. "delete": {
  5413. "tags": ["session"],
  5414. "operationId": "session.deleteMessage",
  5415. "parameters": [
  5416. {
  5417. "name": "directory",
  5418. "in": "query",
  5419. "required": false,
  5420. "schema": {
  5421. "type": "string"
  5422. }
  5423. },
  5424. {
  5425. "name": "workspace",
  5426. "in": "query",
  5427. "required": false,
  5428. "schema": {
  5429. "type": "string"
  5430. }
  5431. },
  5432. {
  5433. "name": "sessionID",
  5434. "in": "path",
  5435. "schema": {
  5436. "type": "string",
  5437. "pattern": "^ses.*"
  5438. },
  5439. "required": true
  5440. },
  5441. {
  5442. "name": "messageID",
  5443. "in": "path",
  5444. "schema": {
  5445. "type": "string",
  5446. "pattern": "^msg.*"
  5447. },
  5448. "required": true
  5449. }
  5450. ],
  5451. "responses": {
  5452. "200": {
  5453. "description": "Successfully deleted message",
  5454. "content": {
  5455. "application/json": {
  5456. "schema": {
  5457. "type": "boolean",
  5458. "description": "Successfully deleted message"
  5459. }
  5460. }
  5461. }
  5462. },
  5463. "400": {
  5464. "description": "Bad request",
  5465. "content": {
  5466. "application/json": {
  5467. "schema": {
  5468. "$ref": "#/components/schemas/BadRequestError"
  5469. }
  5470. }
  5471. }
  5472. },
  5473. "404": {
  5474. "description": "Not found",
  5475. "content": {
  5476. "application/json": {
  5477. "schema": {
  5478. "$ref": "#/components/schemas/NotFoundError"
  5479. }
  5480. }
  5481. }
  5482. }
  5483. },
  5484. "description": "Permanently delete a specific message and all of its parts from a session without reverting file changes.",
  5485. "summary": "Delete message",
  5486. "x-codeSamples": [
  5487. {
  5488. "lang": "js",
  5489. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.deleteMessage({\n ...\n})"
  5490. }
  5491. ]
  5492. }
  5493. },
  5494. "/session/{sessionID}/fork": {
  5495. "post": {
  5496. "tags": ["session"],
  5497. "operationId": "session.fork",
  5498. "parameters": [
  5499. {
  5500. "name": "directory",
  5501. "in": "query",
  5502. "required": false,
  5503. "schema": {
  5504. "type": "string"
  5505. }
  5506. },
  5507. {
  5508. "name": "workspace",
  5509. "in": "query",
  5510. "required": false,
  5511. "schema": {
  5512. "type": "string"
  5513. }
  5514. },
  5515. {
  5516. "name": "sessionID",
  5517. "in": "path",
  5518. "schema": {
  5519. "type": "string",
  5520. "pattern": "^ses.*"
  5521. },
  5522. "required": true
  5523. }
  5524. ],
  5525. "responses": {
  5526. "200": {
  5527. "description": "200",
  5528. "content": {
  5529. "application/json": {
  5530. "schema": {
  5531. "$ref": "#/components/schemas/Session"
  5532. }
  5533. }
  5534. }
  5535. },
  5536. "404": {
  5537. "description": "NotFoundError",
  5538. "content": {
  5539. "application/json": {
  5540. "schema": {
  5541. "$ref": "#/components/schemas/NotFoundError"
  5542. }
  5543. }
  5544. }
  5545. }
  5546. },
  5547. "description": "Create a new session by forking an existing session at a specific message point.",
  5548. "summary": "Fork session",
  5549. "requestBody": {
  5550. "content": {
  5551. "application/json": {
  5552. "schema": {
  5553. "type": "object",
  5554. "properties": {
  5555. "messageID": {
  5556. "type": "string"
  5557. }
  5558. },
  5559. "additionalProperties": false
  5560. }
  5561. }
  5562. }
  5563. },
  5564. "x-codeSamples": [
  5565. {
  5566. "lang": "js",
  5567. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.fork({\n ...\n})"
  5568. }
  5569. ]
  5570. }
  5571. },
  5572. "/session/{sessionID}/abort": {
  5573. "post": {
  5574. "tags": ["session"],
  5575. "operationId": "session.abort",
  5576. "parameters": [
  5577. {
  5578. "name": "directory",
  5579. "in": "query",
  5580. "required": false,
  5581. "schema": {
  5582. "type": "string"
  5583. }
  5584. },
  5585. {
  5586. "name": "workspace",
  5587. "in": "query",
  5588. "required": false,
  5589. "schema": {
  5590. "type": "string"
  5591. }
  5592. },
  5593. {
  5594. "name": "sessionID",
  5595. "in": "path",
  5596. "schema": {
  5597. "type": "string",
  5598. "pattern": "^ses.*"
  5599. },
  5600. "required": true
  5601. }
  5602. ],
  5603. "responses": {
  5604. "200": {
  5605. "description": "Aborted session",
  5606. "content": {
  5607. "application/json": {
  5608. "schema": {
  5609. "type": "boolean",
  5610. "description": "Aborted session"
  5611. }
  5612. }
  5613. }
  5614. },
  5615. "400": {
  5616. "description": "Bad request",
  5617. "content": {
  5618. "application/json": {
  5619. "schema": {
  5620. "$ref": "#/components/schemas/BadRequestError"
  5621. }
  5622. }
  5623. }
  5624. },
  5625. "404": {
  5626. "description": "Not found",
  5627. "content": {
  5628. "application/json": {
  5629. "schema": {
  5630. "$ref": "#/components/schemas/NotFoundError"
  5631. }
  5632. }
  5633. }
  5634. }
  5635. },
  5636. "description": "Abort an active session and stop any ongoing AI processing or command execution.",
  5637. "summary": "Abort session",
  5638. "x-codeSamples": [
  5639. {
  5640. "lang": "js",
  5641. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.abort({\n ...\n})"
  5642. }
  5643. ]
  5644. }
  5645. },
  5646. "/session/{sessionID}/init": {
  5647. "post": {
  5648. "tags": ["session"],
  5649. "operationId": "session.init",
  5650. "parameters": [
  5651. {
  5652. "name": "directory",
  5653. "in": "query",
  5654. "required": false,
  5655. "schema": {
  5656. "type": "string"
  5657. }
  5658. },
  5659. {
  5660. "name": "workspace",
  5661. "in": "query",
  5662. "required": false,
  5663. "schema": {
  5664. "type": "string"
  5665. }
  5666. },
  5667. {
  5668. "name": "sessionID",
  5669. "in": "path",
  5670. "schema": {
  5671. "type": "string",
  5672. "pattern": "^ses.*"
  5673. },
  5674. "required": true
  5675. }
  5676. ],
  5677. "responses": {
  5678. "200": {
  5679. "description": "200",
  5680. "content": {
  5681. "application/json": {
  5682. "schema": {
  5683. "type": "boolean",
  5684. "description": "200"
  5685. }
  5686. }
  5687. }
  5688. },
  5689. "400": {
  5690. "description": "Bad request",
  5691. "content": {
  5692. "application/json": {
  5693. "schema": {
  5694. "$ref": "#/components/schemas/BadRequestError"
  5695. }
  5696. }
  5697. }
  5698. },
  5699. "404": {
  5700. "description": "Not found",
  5701. "content": {
  5702. "application/json": {
  5703. "schema": {
  5704. "$ref": "#/components/schemas/NotFoundError"
  5705. }
  5706. }
  5707. }
  5708. }
  5709. },
  5710. "description": "Analyze the current application and create an AGENTS.md file with project-specific agent configurations.",
  5711. "summary": "Initialize session",
  5712. "requestBody": {
  5713. "content": {
  5714. "application/json": {
  5715. "schema": {
  5716. "type": "object",
  5717. "properties": {
  5718. "modelID": {
  5719. "type": "string"
  5720. },
  5721. "providerID": {
  5722. "type": "string"
  5723. },
  5724. "messageID": {
  5725. "type": "string"
  5726. }
  5727. },
  5728. "required": ["modelID", "providerID", "messageID"],
  5729. "additionalProperties": false
  5730. }
  5731. }
  5732. }
  5733. },
  5734. "x-codeSamples": [
  5735. {
  5736. "lang": "js",
  5737. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.init({\n ...\n})"
  5738. }
  5739. ]
  5740. }
  5741. },
  5742. "/session/{sessionID}/share": {
  5743. "post": {
  5744. "tags": ["session"],
  5745. "operationId": "session.share",
  5746. "parameters": [
  5747. {
  5748. "name": "directory",
  5749. "in": "query",
  5750. "required": false,
  5751. "schema": {
  5752. "type": "string"
  5753. }
  5754. },
  5755. {
  5756. "name": "workspace",
  5757. "in": "query",
  5758. "required": false,
  5759. "schema": {
  5760. "type": "string"
  5761. }
  5762. },
  5763. {
  5764. "name": "sessionID",
  5765. "in": "path",
  5766. "schema": {
  5767. "type": "string",
  5768. "pattern": "^ses.*"
  5769. },
  5770. "required": true
  5771. }
  5772. ],
  5773. "responses": {
  5774. "200": {
  5775. "description": "Successfully shared session",
  5776. "content": {
  5777. "application/json": {
  5778. "schema": {
  5779. "$ref": "#/components/schemas/Session"
  5780. }
  5781. }
  5782. }
  5783. },
  5784. "404": {
  5785. "description": "NotFoundError",
  5786. "content": {
  5787. "application/json": {
  5788. "schema": {
  5789. "$ref": "#/components/schemas/NotFoundError"
  5790. }
  5791. }
  5792. }
  5793. },
  5794. "500": {
  5795. "description": "InternalServerError",
  5796. "content": {
  5797. "application/json": {
  5798. "schema": {
  5799. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  5800. }
  5801. }
  5802. }
  5803. }
  5804. },
  5805. "description": "Create a shareable link for a session, allowing others to view the conversation.",
  5806. "summary": "Share session",
  5807. "x-codeSamples": [
  5808. {
  5809. "lang": "js",
  5810. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.share({\n ...\n})"
  5811. }
  5812. ]
  5813. },
  5814. "delete": {
  5815. "tags": ["session"],
  5816. "operationId": "session.unshare",
  5817. "parameters": [
  5818. {
  5819. "name": "directory",
  5820. "in": "query",
  5821. "required": false,
  5822. "schema": {
  5823. "type": "string"
  5824. }
  5825. },
  5826. {
  5827. "name": "workspace",
  5828. "in": "query",
  5829. "required": false,
  5830. "schema": {
  5831. "type": "string"
  5832. }
  5833. },
  5834. {
  5835. "name": "sessionID",
  5836. "in": "path",
  5837. "schema": {
  5838. "type": "string",
  5839. "pattern": "^ses.*"
  5840. },
  5841. "required": true
  5842. }
  5843. ],
  5844. "responses": {
  5845. "200": {
  5846. "description": "Successfully unshared session",
  5847. "content": {
  5848. "application/json": {
  5849. "schema": {
  5850. "$ref": "#/components/schemas/Session"
  5851. }
  5852. }
  5853. }
  5854. },
  5855. "404": {
  5856. "description": "NotFoundError",
  5857. "content": {
  5858. "application/json": {
  5859. "schema": {
  5860. "$ref": "#/components/schemas/NotFoundError"
  5861. }
  5862. }
  5863. }
  5864. },
  5865. "500": {
  5866. "description": "InternalServerError",
  5867. "content": {
  5868. "application/json": {
  5869. "schema": {
  5870. "$ref": "#/components/schemas/effect_HttpApiError_InternalServerError"
  5871. }
  5872. }
  5873. }
  5874. }
  5875. },
  5876. "description": "Remove the shareable link for a session, making it private again.",
  5877. "summary": "Unshare session",
  5878. "x-codeSamples": [
  5879. {
  5880. "lang": "js",
  5881. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unshare({\n ...\n})"
  5882. }
  5883. ]
  5884. }
  5885. },
  5886. "/session/{sessionID}/summarize": {
  5887. "post": {
  5888. "tags": ["session"],
  5889. "operationId": "session.summarize",
  5890. "parameters": [
  5891. {
  5892. "name": "directory",
  5893. "in": "query",
  5894. "required": false,
  5895. "schema": {
  5896. "type": "string"
  5897. }
  5898. },
  5899. {
  5900. "name": "workspace",
  5901. "in": "query",
  5902. "required": false,
  5903. "schema": {
  5904. "type": "string"
  5905. }
  5906. },
  5907. {
  5908. "name": "sessionID",
  5909. "in": "path",
  5910. "schema": {
  5911. "type": "string",
  5912. "pattern": "^ses.*"
  5913. },
  5914. "required": true
  5915. }
  5916. ],
  5917. "responses": {
  5918. "200": {
  5919. "description": "Summarized session",
  5920. "content": {
  5921. "application/json": {
  5922. "schema": {
  5923. "type": "boolean",
  5924. "description": "Summarized session"
  5925. }
  5926. }
  5927. }
  5928. },
  5929. "400": {
  5930. "description": "Bad request",
  5931. "content": {
  5932. "application/json": {
  5933. "schema": {
  5934. "$ref": "#/components/schemas/BadRequestError"
  5935. }
  5936. }
  5937. }
  5938. },
  5939. "404": {
  5940. "description": "NotFoundError",
  5941. "content": {
  5942. "application/json": {
  5943. "schema": {
  5944. "$ref": "#/components/schemas/NotFoundError"
  5945. }
  5946. }
  5947. }
  5948. }
  5949. },
  5950. "description": "Generate a concise summary of the session using AI compaction to preserve key information.",
  5951. "summary": "Summarize session",
  5952. "requestBody": {
  5953. "content": {
  5954. "application/json": {
  5955. "schema": {
  5956. "type": "object",
  5957. "properties": {
  5958. "providerID": {
  5959. "type": "string"
  5960. },
  5961. "modelID": {
  5962. "type": "string"
  5963. },
  5964. "auto": {
  5965. "type": "boolean"
  5966. }
  5967. },
  5968. "required": ["providerID", "modelID"],
  5969. "additionalProperties": false
  5970. }
  5971. }
  5972. }
  5973. },
  5974. "x-codeSamples": [
  5975. {
  5976. "lang": "js",
  5977. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.summarize({\n ...\n})"
  5978. }
  5979. ]
  5980. }
  5981. },
  5982. "/session/{sessionID}/prompt_async": {
  5983. "post": {
  5984. "tags": ["session"],
  5985. "operationId": "session.prompt_async",
  5986. "parameters": [
  5987. {
  5988. "name": "directory",
  5989. "in": "query",
  5990. "required": false,
  5991. "schema": {
  5992. "type": "string"
  5993. }
  5994. },
  5995. {
  5996. "name": "workspace",
  5997. "in": "query",
  5998. "required": false,
  5999. "schema": {
  6000. "type": "string"
  6001. }
  6002. },
  6003. {
  6004. "name": "sessionID",
  6005. "in": "path",
  6006. "schema": {
  6007. "type": "string",
  6008. "pattern": "^ses.*"
  6009. },
  6010. "required": true
  6011. }
  6012. ],
  6013. "responses": {
  6014. "204": {
  6015. "description": "Prompt accepted"
  6016. },
  6017. "400": {
  6018. "description": "Bad request",
  6019. "content": {
  6020. "application/json": {
  6021. "schema": {
  6022. "$ref": "#/components/schemas/BadRequestError"
  6023. }
  6024. }
  6025. }
  6026. },
  6027. "404": {
  6028. "description": "Not found",
  6029. "content": {
  6030. "application/json": {
  6031. "schema": {
  6032. "$ref": "#/components/schemas/NotFoundError"
  6033. }
  6034. }
  6035. }
  6036. }
  6037. },
  6038. "description": "Create and send a new message to a session asynchronously, starting the session if needed and returning immediately.",
  6039. "summary": "Send async message",
  6040. "requestBody": {
  6041. "content": {
  6042. "application/json": {
  6043. "schema": {
  6044. "type": "object",
  6045. "properties": {
  6046. "messageID": {
  6047. "type": "string"
  6048. },
  6049. "model": {
  6050. "type": "object",
  6051. "properties": {
  6052. "providerID": {
  6053. "type": "string"
  6054. },
  6055. "modelID": {
  6056. "type": "string"
  6057. }
  6058. },
  6059. "required": ["providerID", "modelID"],
  6060. "additionalProperties": false
  6061. },
  6062. "agent": {
  6063. "type": "string"
  6064. },
  6065. "noReply": {
  6066. "type": "boolean"
  6067. },
  6068. "tools": {
  6069. "type": "object",
  6070. "additionalProperties": {
  6071. "type": "boolean"
  6072. }
  6073. },
  6074. "format": {
  6075. "$ref": "#/components/schemas/OutputFormat"
  6076. },
  6077. "system": {
  6078. "type": "string"
  6079. },
  6080. "variant": {
  6081. "type": "string"
  6082. },
  6083. "parts": {
  6084. "type": "array",
  6085. "items": {
  6086. "anyOf": [
  6087. {
  6088. "$ref": "#/components/schemas/TextPartInput"
  6089. },
  6090. {
  6091. "$ref": "#/components/schemas/FilePartInput"
  6092. },
  6093. {
  6094. "$ref": "#/components/schemas/AgentPartInput"
  6095. },
  6096. {
  6097. "$ref": "#/components/schemas/SubtaskPartInput"
  6098. }
  6099. ]
  6100. }
  6101. }
  6102. },
  6103. "required": ["parts"],
  6104. "additionalProperties": false
  6105. }
  6106. }
  6107. }
  6108. },
  6109. "x-codeSamples": [
  6110. {
  6111. "lang": "js",
  6112. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.prompt_async({\n ...\n})"
  6113. }
  6114. ]
  6115. }
  6116. },
  6117. "/session/{sessionID}/command": {
  6118. "post": {
  6119. "tags": ["session"],
  6120. "operationId": "session.command",
  6121. "parameters": [
  6122. {
  6123. "name": "directory",
  6124. "in": "query",
  6125. "required": false,
  6126. "schema": {
  6127. "type": "string"
  6128. }
  6129. },
  6130. {
  6131. "name": "workspace",
  6132. "in": "query",
  6133. "required": false,
  6134. "schema": {
  6135. "type": "string"
  6136. }
  6137. },
  6138. {
  6139. "name": "sessionID",
  6140. "in": "path",
  6141. "schema": {
  6142. "type": "string",
  6143. "pattern": "^ses.*"
  6144. },
  6145. "required": true
  6146. }
  6147. ],
  6148. "responses": {
  6149. "200": {
  6150. "description": "Created message",
  6151. "content": {
  6152. "application/json": {
  6153. "schema": {
  6154. "type": "object",
  6155. "required": ["info", "parts"],
  6156. "properties": {
  6157. "info": {
  6158. "$ref": "#/components/schemas/AssistantMessage"
  6159. },
  6160. "parts": {
  6161. "type": "array",
  6162. "items": {
  6163. "$ref": "#/components/schemas/Part"
  6164. }
  6165. }
  6166. }
  6167. }
  6168. }
  6169. }
  6170. },
  6171. "400": {
  6172. "description": "Bad request",
  6173. "content": {
  6174. "application/json": {
  6175. "schema": {
  6176. "$ref": "#/components/schemas/BadRequestError"
  6177. }
  6178. }
  6179. }
  6180. },
  6181. "404": {
  6182. "description": "Not found",
  6183. "content": {
  6184. "application/json": {
  6185. "schema": {
  6186. "$ref": "#/components/schemas/NotFoundError"
  6187. }
  6188. }
  6189. }
  6190. }
  6191. },
  6192. "description": "Send a new command to a session for execution by the AI assistant.",
  6193. "summary": "Send command",
  6194. "requestBody": {
  6195. "content": {
  6196. "application/json": {
  6197. "schema": {
  6198. "type": "object",
  6199. "properties": {
  6200. "messageID": {
  6201. "type": "string"
  6202. },
  6203. "agent": {
  6204. "type": "string"
  6205. },
  6206. "model": {
  6207. "type": "string"
  6208. },
  6209. "arguments": {
  6210. "type": "string"
  6211. },
  6212. "command": {
  6213. "type": "string"
  6214. },
  6215. "variant": {
  6216. "type": "string"
  6217. },
  6218. "parts": {
  6219. "type": "array",
  6220. "items": {
  6221. "type": "object",
  6222. "properties": {
  6223. "id": {
  6224. "type": "string"
  6225. },
  6226. "type": {
  6227. "type": "string",
  6228. "enum": ["file"]
  6229. },
  6230. "mime": {
  6231. "type": "string"
  6232. },
  6233. "filename": {
  6234. "type": "string"
  6235. },
  6236. "url": {
  6237. "type": "string"
  6238. },
  6239. "source": {
  6240. "$ref": "#/components/schemas/FilePartSource"
  6241. }
  6242. },
  6243. "required": ["type", "mime", "url"],
  6244. "additionalProperties": false
  6245. }
  6246. }
  6247. },
  6248. "required": ["arguments", "command"],
  6249. "additionalProperties": false
  6250. }
  6251. }
  6252. }
  6253. },
  6254. "x-codeSamples": [
  6255. {
  6256. "lang": "js",
  6257. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.command({\n ...\n})"
  6258. }
  6259. ]
  6260. }
  6261. },
  6262. "/session/{sessionID}/shell": {
  6263. "post": {
  6264. "tags": ["session"],
  6265. "operationId": "session.shell",
  6266. "parameters": [
  6267. {
  6268. "name": "directory",
  6269. "in": "query",
  6270. "required": false,
  6271. "schema": {
  6272. "type": "string"
  6273. }
  6274. },
  6275. {
  6276. "name": "workspace",
  6277. "in": "query",
  6278. "required": false,
  6279. "schema": {
  6280. "type": "string"
  6281. }
  6282. },
  6283. {
  6284. "name": "sessionID",
  6285. "in": "path",
  6286. "schema": {
  6287. "type": "string",
  6288. "pattern": "^ses.*"
  6289. },
  6290. "required": true
  6291. }
  6292. ],
  6293. "responses": {
  6294. "200": {
  6295. "description": "Created message",
  6296. "content": {
  6297. "application/json": {
  6298. "schema": {
  6299. "type": "object",
  6300. "properties": {
  6301. "info": {
  6302. "$ref": "#/components/schemas/Message"
  6303. },
  6304. "parts": {
  6305. "type": "array",
  6306. "items": {
  6307. "$ref": "#/components/schemas/Part"
  6308. }
  6309. }
  6310. },
  6311. "required": ["info", "parts"],
  6312. "additionalProperties": false,
  6313. "description": "Created message"
  6314. }
  6315. }
  6316. }
  6317. },
  6318. "400": {
  6319. "description": "Bad request",
  6320. "content": {
  6321. "application/json": {
  6322. "schema": {
  6323. "$ref": "#/components/schemas/BadRequestError"
  6324. }
  6325. }
  6326. }
  6327. },
  6328. "404": {
  6329. "description": "Not found",
  6330. "content": {
  6331. "application/json": {
  6332. "schema": {
  6333. "$ref": "#/components/schemas/NotFoundError"
  6334. }
  6335. }
  6336. }
  6337. }
  6338. },
  6339. "description": "Execute a shell command within the session context and return the AI's response.",
  6340. "summary": "Run shell command",
  6341. "requestBody": {
  6342. "content": {
  6343. "application/json": {
  6344. "schema": {
  6345. "type": "object",
  6346. "properties": {
  6347. "messageID": {
  6348. "type": "string"
  6349. },
  6350. "agent": {
  6351. "type": "string"
  6352. },
  6353. "model": {
  6354. "type": "object",
  6355. "properties": {
  6356. "providerID": {
  6357. "type": "string"
  6358. },
  6359. "modelID": {
  6360. "type": "string"
  6361. }
  6362. },
  6363. "required": ["providerID", "modelID"],
  6364. "additionalProperties": false
  6365. },
  6366. "command": {
  6367. "type": "string"
  6368. }
  6369. },
  6370. "required": ["agent", "command"],
  6371. "additionalProperties": false
  6372. }
  6373. }
  6374. }
  6375. },
  6376. "x-codeSamples": [
  6377. {
  6378. "lang": "js",
  6379. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.shell({\n ...\n})"
  6380. }
  6381. ]
  6382. }
  6383. },
  6384. "/session/{sessionID}/revert": {
  6385. "post": {
  6386. "tags": ["session"],
  6387. "operationId": "session.revert",
  6388. "parameters": [
  6389. {
  6390. "name": "directory",
  6391. "in": "query",
  6392. "required": false,
  6393. "schema": {
  6394. "type": "string"
  6395. }
  6396. },
  6397. {
  6398. "name": "workspace",
  6399. "in": "query",
  6400. "required": false,
  6401. "schema": {
  6402. "type": "string"
  6403. }
  6404. },
  6405. {
  6406. "name": "sessionID",
  6407. "in": "path",
  6408. "schema": {
  6409. "type": "string",
  6410. "pattern": "^ses.*"
  6411. },
  6412. "required": true
  6413. }
  6414. ],
  6415. "responses": {
  6416. "200": {
  6417. "description": "Updated session",
  6418. "content": {
  6419. "application/json": {
  6420. "schema": {
  6421. "$ref": "#/components/schemas/Session"
  6422. }
  6423. }
  6424. }
  6425. },
  6426. "400": {
  6427. "description": "Bad request",
  6428. "content": {
  6429. "application/json": {
  6430. "schema": {
  6431. "$ref": "#/components/schemas/BadRequestError"
  6432. }
  6433. }
  6434. }
  6435. },
  6436. "404": {
  6437. "description": "Not found",
  6438. "content": {
  6439. "application/json": {
  6440. "schema": {
  6441. "$ref": "#/components/schemas/NotFoundError"
  6442. }
  6443. }
  6444. }
  6445. }
  6446. },
  6447. "description": "Revert a specific message in a session, undoing its effects and restoring the previous state.",
  6448. "summary": "Revert message",
  6449. "requestBody": {
  6450. "content": {
  6451. "application/json": {
  6452. "schema": {
  6453. "type": "object",
  6454. "properties": {
  6455. "messageID": {
  6456. "type": "string"
  6457. },
  6458. "partID": {
  6459. "type": "string"
  6460. }
  6461. },
  6462. "required": ["messageID"],
  6463. "additionalProperties": false
  6464. }
  6465. }
  6466. }
  6467. },
  6468. "x-codeSamples": [
  6469. {
  6470. "lang": "js",
  6471. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.revert({\n ...\n})"
  6472. }
  6473. ]
  6474. }
  6475. },
  6476. "/session/{sessionID}/unrevert": {
  6477. "post": {
  6478. "tags": ["session"],
  6479. "operationId": "session.unrevert",
  6480. "parameters": [
  6481. {
  6482. "name": "directory",
  6483. "in": "query",
  6484. "required": false,
  6485. "schema": {
  6486. "type": "string"
  6487. }
  6488. },
  6489. {
  6490. "name": "workspace",
  6491. "in": "query",
  6492. "required": false,
  6493. "schema": {
  6494. "type": "string"
  6495. }
  6496. },
  6497. {
  6498. "name": "sessionID",
  6499. "in": "path",
  6500. "schema": {
  6501. "type": "string",
  6502. "pattern": "^ses.*"
  6503. },
  6504. "required": true
  6505. }
  6506. ],
  6507. "responses": {
  6508. "200": {
  6509. "description": "Updated session",
  6510. "content": {
  6511. "application/json": {
  6512. "schema": {
  6513. "$ref": "#/components/schemas/Session"
  6514. }
  6515. }
  6516. }
  6517. },
  6518. "400": {
  6519. "description": "Bad request",
  6520. "content": {
  6521. "application/json": {
  6522. "schema": {
  6523. "$ref": "#/components/schemas/BadRequestError"
  6524. }
  6525. }
  6526. }
  6527. },
  6528. "404": {
  6529. "description": "Not found",
  6530. "content": {
  6531. "application/json": {
  6532. "schema": {
  6533. "$ref": "#/components/schemas/NotFoundError"
  6534. }
  6535. }
  6536. }
  6537. }
  6538. },
  6539. "description": "Restore all previously reverted messages in a session.",
  6540. "summary": "Restore reverted messages",
  6541. "x-codeSamples": [
  6542. {
  6543. "lang": "js",
  6544. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.session.unrevert({\n ...\n})"
  6545. }
  6546. ]
  6547. }
  6548. },
  6549. "/session/{sessionID}/permissions/{permissionID}": {
  6550. "post": {
  6551. "tags": ["session"],
  6552. "operationId": "permission.respond",
  6553. "parameters": [
  6554. {
  6555. "name": "directory",
  6556. "in": "query",
  6557. "required": false,
  6558. "schema": {
  6559. "type": "string"
  6560. }
  6561. },
  6562. {
  6563. "name": "workspace",
  6564. "in": "query",
  6565. "required": false,
  6566. "schema": {
  6567. "type": "string"
  6568. }
  6569. },
  6570. {
  6571. "name": "sessionID",
  6572. "in": "path",
  6573. "schema": {
  6574. "type": "string",
  6575. "pattern": "^ses.*"
  6576. },
  6577. "required": true
  6578. },
  6579. {
  6580. "name": "permissionID",
  6581. "in": "path",
  6582. "schema": {
  6583. "type": "string",
  6584. "pattern": "^per.*"
  6585. },
  6586. "required": true
  6587. }
  6588. ],
  6589. "responses": {
  6590. "200": {
  6591. "description": "Permission processed successfully",
  6592. "content": {
  6593. "application/json": {
  6594. "schema": {
  6595. "type": "boolean",
  6596. "description": "Permission processed successfully"
  6597. }
  6598. }
  6599. }
  6600. },
  6601. "400": {
  6602. "description": "Bad request",
  6603. "content": {
  6604. "application/json": {
  6605. "schema": {
  6606. "$ref": "#/components/schemas/BadRequestError"
  6607. }
  6608. }
  6609. }
  6610. },
  6611. "404": {
  6612. "description": "Not found",
  6613. "content": {
  6614. "application/json": {
  6615. "schema": {
  6616. "$ref": "#/components/schemas/NotFoundError"
  6617. }
  6618. }
  6619. }
  6620. }
  6621. },
  6622. "description": "Approve or deny a permission request from the AI assistant.",
  6623. "summary": "Respond to permission",
  6624. "deprecated": true,
  6625. "requestBody": {
  6626. "content": {
  6627. "application/json": {
  6628. "schema": {
  6629. "type": "object",
  6630. "properties": {
  6631. "response": {
  6632. "type": "string",
  6633. "enum": ["once", "always", "reject"]
  6634. }
  6635. },
  6636. "required": ["response"],
  6637. "additionalProperties": false
  6638. }
  6639. }
  6640. }
  6641. },
  6642. "x-codeSamples": [
  6643. {
  6644. "lang": "js",
  6645. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.permission.respond({\n ...\n})"
  6646. }
  6647. ]
  6648. }
  6649. },
  6650. "/session/{sessionID}/message/{messageID}/part/{partID}": {
  6651. "delete": {
  6652. "tags": ["session"],
  6653. "operationId": "part.delete",
  6654. "parameters": [
  6655. {
  6656. "name": "directory",
  6657. "in": "query",
  6658. "required": false,
  6659. "schema": {
  6660. "type": "string"
  6661. }
  6662. },
  6663. {
  6664. "name": "workspace",
  6665. "in": "query",
  6666. "required": false,
  6667. "schema": {
  6668. "type": "string"
  6669. }
  6670. },
  6671. {
  6672. "name": "sessionID",
  6673. "in": "path",
  6674. "schema": {
  6675. "type": "string",
  6676. "pattern": "^ses.*"
  6677. },
  6678. "required": true
  6679. },
  6680. {
  6681. "name": "messageID",
  6682. "in": "path",
  6683. "schema": {
  6684. "type": "string",
  6685. "pattern": "^msg.*"
  6686. },
  6687. "required": true
  6688. },
  6689. {
  6690. "name": "partID",
  6691. "in": "path",
  6692. "schema": {
  6693. "type": "string",
  6694. "pattern": "^prt.*"
  6695. },
  6696. "required": true
  6697. }
  6698. ],
  6699. "responses": {
  6700. "200": {
  6701. "description": "Successfully deleted part",
  6702. "content": {
  6703. "application/json": {
  6704. "schema": {
  6705. "type": "boolean",
  6706. "description": "Successfully deleted part"
  6707. }
  6708. }
  6709. }
  6710. },
  6711. "400": {
  6712. "description": "Bad request",
  6713. "content": {
  6714. "application/json": {
  6715. "schema": {
  6716. "$ref": "#/components/schemas/BadRequestError"
  6717. }
  6718. }
  6719. }
  6720. },
  6721. "404": {
  6722. "description": "Not found",
  6723. "content": {
  6724. "application/json": {
  6725. "schema": {
  6726. "$ref": "#/components/schemas/NotFoundError"
  6727. }
  6728. }
  6729. }
  6730. }
  6731. },
  6732. "description": "Delete a part from a message.",
  6733. "x-codeSamples": [
  6734. {
  6735. "lang": "js",
  6736. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.delete({\n ...\n})"
  6737. }
  6738. ]
  6739. },
  6740. "patch": {
  6741. "tags": ["session"],
  6742. "operationId": "part.update",
  6743. "parameters": [
  6744. {
  6745. "name": "directory",
  6746. "in": "query",
  6747. "required": false,
  6748. "schema": {
  6749. "type": "string"
  6750. }
  6751. },
  6752. {
  6753. "name": "workspace",
  6754. "in": "query",
  6755. "required": false,
  6756. "schema": {
  6757. "type": "string"
  6758. }
  6759. },
  6760. {
  6761. "name": "sessionID",
  6762. "in": "path",
  6763. "schema": {
  6764. "type": "string",
  6765. "pattern": "^ses.*"
  6766. },
  6767. "required": true
  6768. },
  6769. {
  6770. "name": "messageID",
  6771. "in": "path",
  6772. "schema": {
  6773. "type": "string",
  6774. "pattern": "^msg.*"
  6775. },
  6776. "required": true
  6777. },
  6778. {
  6779. "name": "partID",
  6780. "in": "path",
  6781. "schema": {
  6782. "type": "string",
  6783. "pattern": "^prt.*"
  6784. },
  6785. "required": true
  6786. }
  6787. ],
  6788. "responses": {
  6789. "200": {
  6790. "description": "Successfully updated part",
  6791. "content": {
  6792. "application/json": {
  6793. "schema": {
  6794. "$ref": "#/components/schemas/Part"
  6795. }
  6796. }
  6797. }
  6798. },
  6799. "400": {
  6800. "description": "Bad request",
  6801. "content": {
  6802. "application/json": {
  6803. "schema": {
  6804. "$ref": "#/components/schemas/BadRequestError"
  6805. }
  6806. }
  6807. }
  6808. },
  6809. "404": {
  6810. "description": "Not found",
  6811. "content": {
  6812. "application/json": {
  6813. "schema": {
  6814. "$ref": "#/components/schemas/NotFoundError"
  6815. }
  6816. }
  6817. }
  6818. }
  6819. },
  6820. "description": "Update a part in a message.",
  6821. "requestBody": {
  6822. "content": {
  6823. "application/json": {
  6824. "schema": {
  6825. "$ref": "#/components/schemas/Part"
  6826. }
  6827. }
  6828. }
  6829. },
  6830. "x-codeSamples": [
  6831. {
  6832. "lang": "js",
  6833. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.part.update({\n ...\n})"
  6834. }
  6835. ]
  6836. }
  6837. },
  6838. "/sync/start": {
  6839. "post": {
  6840. "tags": ["sync"],
  6841. "operationId": "sync.start",
  6842. "parameters": [
  6843. {
  6844. "name": "directory",
  6845. "in": "query",
  6846. "required": false,
  6847. "schema": {
  6848. "type": "string"
  6849. }
  6850. },
  6851. {
  6852. "name": "workspace",
  6853. "in": "query",
  6854. "required": false,
  6855. "schema": {
  6856. "type": "string"
  6857. }
  6858. }
  6859. ],
  6860. "responses": {
  6861. "200": {
  6862. "description": "Workspace sync started",
  6863. "content": {
  6864. "application/json": {
  6865. "schema": {
  6866. "type": "boolean",
  6867. "description": "Workspace sync started"
  6868. }
  6869. }
  6870. }
  6871. }
  6872. },
  6873. "description": "Start sync loops for workspaces in the current project that have active sessions.",
  6874. "summary": "Start workspace sync",
  6875. "x-codeSamples": [
  6876. {
  6877. "lang": "js",
  6878. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.start({\n ...\n})"
  6879. }
  6880. ]
  6881. }
  6882. },
  6883. "/sync/replay": {
  6884. "post": {
  6885. "tags": ["sync"],
  6886. "operationId": "sync.replay",
  6887. "parameters": [
  6888. {
  6889. "name": "directory",
  6890. "in": "query",
  6891. "required": false,
  6892. "schema": {
  6893. "type": "string"
  6894. }
  6895. },
  6896. {
  6897. "name": "workspace",
  6898. "in": "query",
  6899. "required": false,
  6900. "schema": {
  6901. "type": "string"
  6902. }
  6903. }
  6904. ],
  6905. "responses": {
  6906. "200": {
  6907. "description": "Replayed sync events",
  6908. "content": {
  6909. "application/json": {
  6910. "schema": {
  6911. "type": "object",
  6912. "properties": {
  6913. "sessionID": {
  6914. "type": "string"
  6915. }
  6916. },
  6917. "required": ["sessionID"],
  6918. "additionalProperties": false,
  6919. "description": "Replayed sync events"
  6920. }
  6921. }
  6922. }
  6923. },
  6924. "400": {
  6925. "description": "Bad request",
  6926. "content": {
  6927. "application/json": {
  6928. "schema": {
  6929. "$ref": "#/components/schemas/BadRequestError"
  6930. }
  6931. }
  6932. }
  6933. }
  6934. },
  6935. "description": "Validate and replay a complete sync event history.",
  6936. "summary": "Replay sync events",
  6937. "requestBody": {
  6938. "content": {
  6939. "application/json": {
  6940. "schema": {
  6941. "type": "object",
  6942. "properties": {
  6943. "directory": {
  6944. "type": "string"
  6945. },
  6946. "events": {
  6947. "type": "array",
  6948. "minItems": 1,
  6949. "items": {
  6950. "type": "object",
  6951. "properties": {
  6952. "id": {
  6953. "type": "string"
  6954. },
  6955. "aggregateID": {
  6956. "type": "string"
  6957. },
  6958. "seq": {
  6959. "type": "integer",
  6960. "minimum": 0
  6961. },
  6962. "type": {
  6963. "type": "string"
  6964. },
  6965. "data": {
  6966. "type": "object"
  6967. }
  6968. },
  6969. "required": ["id", "aggregateID", "seq", "type", "data"],
  6970. "additionalProperties": false
  6971. }
  6972. }
  6973. },
  6974. "required": ["directory", "events"],
  6975. "additionalProperties": false
  6976. }
  6977. }
  6978. }
  6979. },
  6980. "x-codeSamples": [
  6981. {
  6982. "lang": "js",
  6983. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.replay({\n ...\n})"
  6984. }
  6985. ]
  6986. }
  6987. },
  6988. "/sync/steal": {
  6989. "post": {
  6990. "tags": ["sync"],
  6991. "operationId": "sync.steal",
  6992. "parameters": [
  6993. {
  6994. "name": "directory",
  6995. "in": "query",
  6996. "required": false,
  6997. "schema": {
  6998. "type": "string"
  6999. }
  7000. },
  7001. {
  7002. "name": "workspace",
  7003. "in": "query",
  7004. "required": false,
  7005. "schema": {
  7006. "type": "string"
  7007. }
  7008. }
  7009. ],
  7010. "responses": {
  7011. "200": {
  7012. "description": "Session stolen into workspace",
  7013. "content": {
  7014. "application/json": {
  7015. "schema": {
  7016. "type": "object",
  7017. "properties": {
  7018. "sessionID": {
  7019. "type": "string"
  7020. }
  7021. },
  7022. "required": ["sessionID"],
  7023. "additionalProperties": false,
  7024. "description": "Session stolen into workspace"
  7025. }
  7026. }
  7027. }
  7028. },
  7029. "400": {
  7030. "description": "Bad request",
  7031. "content": {
  7032. "application/json": {
  7033. "schema": {
  7034. "$ref": "#/components/schemas/BadRequestError"
  7035. }
  7036. }
  7037. }
  7038. }
  7039. },
  7040. "description": "Update a session to belong to the current workspace through the sync event system.",
  7041. "summary": "Steal session into workspace",
  7042. "requestBody": {
  7043. "content": {
  7044. "application/json": {
  7045. "schema": {
  7046. "type": "object",
  7047. "properties": {
  7048. "sessionID": {
  7049. "type": "string"
  7050. }
  7051. },
  7052. "required": ["sessionID"],
  7053. "additionalProperties": false
  7054. }
  7055. }
  7056. }
  7057. },
  7058. "x-codeSamples": [
  7059. {
  7060. "lang": "js",
  7061. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.steal({\n ...\n})"
  7062. }
  7063. ]
  7064. }
  7065. },
  7066. "/sync/history": {
  7067. "post": {
  7068. "tags": ["sync"],
  7069. "operationId": "sync.history.list",
  7070. "parameters": [
  7071. {
  7072. "name": "directory",
  7073. "in": "query",
  7074. "required": false,
  7075. "schema": {
  7076. "type": "string"
  7077. }
  7078. },
  7079. {
  7080. "name": "workspace",
  7081. "in": "query",
  7082. "required": false,
  7083. "schema": {
  7084. "type": "string"
  7085. }
  7086. }
  7087. ],
  7088. "responses": {
  7089. "200": {
  7090. "description": "Sync events",
  7091. "content": {
  7092. "application/json": {
  7093. "schema": {
  7094. "type": "array",
  7095. "items": {
  7096. "type": "object",
  7097. "properties": {
  7098. "id": {
  7099. "type": "string"
  7100. },
  7101. "aggregate_id": {
  7102. "type": "string"
  7103. },
  7104. "seq": {
  7105. "type": "integer",
  7106. "minimum": 0
  7107. },
  7108. "type": {
  7109. "type": "string"
  7110. },
  7111. "data": {
  7112. "type": "object"
  7113. }
  7114. },
  7115. "required": ["id", "aggregate_id", "seq", "type", "data"],
  7116. "additionalProperties": false
  7117. },
  7118. "description": "Sync events"
  7119. }
  7120. }
  7121. }
  7122. },
  7123. "400": {
  7124. "description": "Bad request",
  7125. "content": {
  7126. "application/json": {
  7127. "schema": {
  7128. "$ref": "#/components/schemas/BadRequestError"
  7129. }
  7130. }
  7131. }
  7132. }
  7133. },
  7134. "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.",
  7135. "summary": "List sync events",
  7136. "requestBody": {
  7137. "content": {
  7138. "application/json": {
  7139. "schema": {
  7140. "type": "object",
  7141. "additionalProperties": {
  7142. "type": "integer",
  7143. "minimum": 0
  7144. }
  7145. }
  7146. }
  7147. }
  7148. },
  7149. "x-codeSamples": [
  7150. {
  7151. "lang": "js",
  7152. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.sync.history.list({\n ...\n})"
  7153. }
  7154. ]
  7155. }
  7156. },
  7157. "/api/session": {
  7158. "get": {
  7159. "tags": ["v2"],
  7160. "operationId": "v2.session.list",
  7161. "parameters": [
  7162. {
  7163. "name": "directory",
  7164. "in": "query",
  7165. "required": false,
  7166. "schema": {
  7167. "type": "string"
  7168. }
  7169. },
  7170. {
  7171. "name": "workspace",
  7172. "in": "query",
  7173. "required": false,
  7174. "schema": {
  7175. "type": "string"
  7176. }
  7177. }
  7178. ],
  7179. "responses": {
  7180. "200": {
  7181. "description": "V2SessionsResponse",
  7182. "content": {
  7183. "application/json": {
  7184. "schema": {
  7185. "$ref": "#/components/schemas/V2SessionsResponse"
  7186. }
  7187. }
  7188. }
  7189. },
  7190. "400": {
  7191. "description": "Bad request",
  7192. "content": {
  7193. "application/json": {
  7194. "schema": {
  7195. "$ref": "#/components/schemas/BadRequestError"
  7196. }
  7197. }
  7198. }
  7199. }
  7200. },
  7201. "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.",
  7202. "summary": "List v2 sessions",
  7203. "x-codeSamples": [
  7204. {
  7205. "lang": "js",
  7206. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  7207. }
  7208. ]
  7209. }
  7210. },
  7211. "/api/session/{sessionID}/prompt": {
  7212. "post": {
  7213. "tags": ["v2"],
  7214. "operationId": "v2.session.prompt",
  7215. "parameters": [
  7216. {
  7217. "name": "directory",
  7218. "in": "query",
  7219. "required": false,
  7220. "schema": {
  7221. "type": "string"
  7222. }
  7223. },
  7224. {
  7225. "name": "workspace",
  7226. "in": "query",
  7227. "required": false,
  7228. "schema": {
  7229. "type": "string"
  7230. }
  7231. },
  7232. {
  7233. "name": "sessionID",
  7234. "in": "path",
  7235. "schema": {
  7236. "type": "string",
  7237. "pattern": "^ses.*"
  7238. },
  7239. "required": true
  7240. }
  7241. ],
  7242. "responses": {
  7243. "200": {
  7244. "description": "Session.Message",
  7245. "content": {
  7246. "application/json": {
  7247. "schema": {
  7248. "$ref": "#/components/schemas/SessionMessage"
  7249. }
  7250. }
  7251. }
  7252. }
  7253. },
  7254. "description": "Create a v2 session message and queue it for the agent loop.",
  7255. "summary": "Send v2 message",
  7256. "requestBody": {
  7257. "content": {
  7258. "application/json": {
  7259. "schema": {
  7260. "type": "object",
  7261. "properties": {
  7262. "prompt": {
  7263. "$ref": "#/components/schemas/Prompt"
  7264. },
  7265. "delivery": {
  7266. "$ref": "#/components/schemas/SessionDelivery"
  7267. }
  7268. },
  7269. "required": ["prompt"],
  7270. "additionalProperties": false
  7271. }
  7272. }
  7273. }
  7274. },
  7275. "x-codeSamples": [
  7276. {
  7277. "lang": "js",
  7278. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  7279. }
  7280. ]
  7281. }
  7282. },
  7283. "/api/session/{sessionID}/compact": {
  7284. "post": {
  7285. "tags": ["v2"],
  7286. "operationId": "v2.session.compact",
  7287. "parameters": [
  7288. {
  7289. "name": "directory",
  7290. "in": "query",
  7291. "required": false,
  7292. "schema": {
  7293. "type": "string"
  7294. }
  7295. },
  7296. {
  7297. "name": "workspace",
  7298. "in": "query",
  7299. "required": false,
  7300. "schema": {
  7301. "type": "string"
  7302. }
  7303. },
  7304. {
  7305. "name": "sessionID",
  7306. "in": "path",
  7307. "schema": {
  7308. "type": "string",
  7309. "pattern": "^ses.*"
  7310. },
  7311. "required": true
  7312. }
  7313. ],
  7314. "responses": {
  7315. "204": {
  7316. "description": "<No Content>"
  7317. }
  7318. },
  7319. "description": "Compact a v2 session conversation.",
  7320. "summary": "Compact v2 session",
  7321. "x-codeSamples": [
  7322. {
  7323. "lang": "js",
  7324. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  7325. }
  7326. ]
  7327. }
  7328. },
  7329. "/api/session/{sessionID}/wait": {
  7330. "post": {
  7331. "tags": ["v2"],
  7332. "operationId": "v2.session.wait",
  7333. "parameters": [
  7334. {
  7335. "name": "directory",
  7336. "in": "query",
  7337. "required": false,
  7338. "schema": {
  7339. "type": "string"
  7340. }
  7341. },
  7342. {
  7343. "name": "workspace",
  7344. "in": "query",
  7345. "required": false,
  7346. "schema": {
  7347. "type": "string"
  7348. }
  7349. },
  7350. {
  7351. "name": "sessionID",
  7352. "in": "path",
  7353. "schema": {
  7354. "type": "string",
  7355. "pattern": "^ses.*"
  7356. },
  7357. "required": true
  7358. }
  7359. ],
  7360. "responses": {
  7361. "204": {
  7362. "description": "<No Content>"
  7363. }
  7364. },
  7365. "description": "Wait for a v2 session agent loop to become idle.",
  7366. "summary": "Wait for v2 session",
  7367. "x-codeSamples": [
  7368. {
  7369. "lang": "js",
  7370. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  7371. }
  7372. ]
  7373. }
  7374. },
  7375. "/api/session/{sessionID}/context": {
  7376. "get": {
  7377. "tags": ["v2"],
  7378. "operationId": "v2.session.context",
  7379. "parameters": [
  7380. {
  7381. "name": "directory",
  7382. "in": "query",
  7383. "required": false,
  7384. "schema": {
  7385. "type": "string"
  7386. }
  7387. },
  7388. {
  7389. "name": "workspace",
  7390. "in": "query",
  7391. "required": false,
  7392. "schema": {
  7393. "type": "string"
  7394. }
  7395. },
  7396. {
  7397. "name": "sessionID",
  7398. "in": "path",
  7399. "schema": {
  7400. "type": "string",
  7401. "pattern": "^ses.*"
  7402. },
  7403. "required": true
  7404. }
  7405. ],
  7406. "responses": {
  7407. "200": {
  7408. "description": "Success",
  7409. "content": {
  7410. "application/json": {
  7411. "schema": {
  7412. "type": "array",
  7413. "items": {
  7414. "$ref": "#/components/schemas/SessionMessage"
  7415. }
  7416. }
  7417. }
  7418. }
  7419. }
  7420. },
  7421. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  7422. "summary": "Get v2 session context",
  7423. "x-codeSamples": [
  7424. {
  7425. "lang": "js",
  7426. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  7427. }
  7428. ]
  7429. }
  7430. },
  7431. "/api/session/{sessionID}/message": {
  7432. "get": {
  7433. "tags": ["v2 messages"],
  7434. "operationId": "v2.session.messages",
  7435. "parameters": [
  7436. {
  7437. "name": "directory",
  7438. "in": "query",
  7439. "required": false,
  7440. "schema": {
  7441. "type": "string"
  7442. }
  7443. },
  7444. {
  7445. "name": "workspace",
  7446. "in": "query",
  7447. "required": false,
  7448. "schema": {
  7449. "type": "string"
  7450. }
  7451. },
  7452. {
  7453. "name": "sessionID",
  7454. "in": "path",
  7455. "schema": {
  7456. "type": "string",
  7457. "pattern": "^ses.*"
  7458. },
  7459. "required": true
  7460. }
  7461. ],
  7462. "responses": {
  7463. "200": {
  7464. "description": "V2SessionMessagesResponse",
  7465. "content": {
  7466. "application/json": {
  7467. "schema": {
  7468. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  7469. }
  7470. }
  7471. }
  7472. },
  7473. "400": {
  7474. "description": "Bad request",
  7475. "content": {
  7476. "application/json": {
  7477. "schema": {
  7478. "$ref": "#/components/schemas/BadRequestError"
  7479. }
  7480. }
  7481. }
  7482. }
  7483. },
  7484. "description": "Retrieve projected v2 messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.",
  7485. "summary": "Get v2 session messages",
  7486. "x-codeSamples": [
  7487. {
  7488. "lang": "js",
  7489. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  7490. }
  7491. ]
  7492. }
  7493. },
  7494. "/tui/append-prompt": {
  7495. "post": {
  7496. "tags": ["tui"],
  7497. "operationId": "tui.appendPrompt",
  7498. "parameters": [
  7499. {
  7500. "name": "directory",
  7501. "in": "query",
  7502. "required": false,
  7503. "schema": {
  7504. "type": "string"
  7505. }
  7506. },
  7507. {
  7508. "name": "workspace",
  7509. "in": "query",
  7510. "required": false,
  7511. "schema": {
  7512. "type": "string"
  7513. }
  7514. }
  7515. ],
  7516. "responses": {
  7517. "200": {
  7518. "description": "Prompt processed successfully",
  7519. "content": {
  7520. "application/json": {
  7521. "schema": {
  7522. "type": "boolean",
  7523. "description": "Prompt processed successfully"
  7524. }
  7525. }
  7526. }
  7527. },
  7528. "400": {
  7529. "description": "Bad request",
  7530. "content": {
  7531. "application/json": {
  7532. "schema": {
  7533. "$ref": "#/components/schemas/BadRequestError"
  7534. }
  7535. }
  7536. }
  7537. }
  7538. },
  7539. "description": "Append prompt to the TUI.",
  7540. "summary": "Append TUI prompt",
  7541. "requestBody": {
  7542. "content": {
  7543. "application/json": {
  7544. "schema": {
  7545. "type": "object",
  7546. "properties": {
  7547. "text": {
  7548. "type": "string"
  7549. }
  7550. },
  7551. "required": ["text"],
  7552. "additionalProperties": false
  7553. }
  7554. }
  7555. }
  7556. },
  7557. "x-codeSamples": [
  7558. {
  7559. "lang": "js",
  7560. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  7561. }
  7562. ]
  7563. }
  7564. },
  7565. "/tui/open-help": {
  7566. "post": {
  7567. "tags": ["tui"],
  7568. "operationId": "tui.openHelp",
  7569. "parameters": [
  7570. {
  7571. "name": "directory",
  7572. "in": "query",
  7573. "required": false,
  7574. "schema": {
  7575. "type": "string"
  7576. }
  7577. },
  7578. {
  7579. "name": "workspace",
  7580. "in": "query",
  7581. "required": false,
  7582. "schema": {
  7583. "type": "string"
  7584. }
  7585. }
  7586. ],
  7587. "responses": {
  7588. "200": {
  7589. "description": "Help dialog opened successfully",
  7590. "content": {
  7591. "application/json": {
  7592. "schema": {
  7593. "type": "boolean",
  7594. "description": "Help dialog opened successfully"
  7595. }
  7596. }
  7597. }
  7598. }
  7599. },
  7600. "description": "Open the help dialog in the TUI to display user assistance information.",
  7601. "summary": "Open help dialog",
  7602. "x-codeSamples": [
  7603. {
  7604. "lang": "js",
  7605. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  7606. }
  7607. ]
  7608. }
  7609. },
  7610. "/tui/open-sessions": {
  7611. "post": {
  7612. "tags": ["tui"],
  7613. "operationId": "tui.openSessions",
  7614. "parameters": [
  7615. {
  7616. "name": "directory",
  7617. "in": "query",
  7618. "required": false,
  7619. "schema": {
  7620. "type": "string"
  7621. }
  7622. },
  7623. {
  7624. "name": "workspace",
  7625. "in": "query",
  7626. "required": false,
  7627. "schema": {
  7628. "type": "string"
  7629. }
  7630. }
  7631. ],
  7632. "responses": {
  7633. "200": {
  7634. "description": "Session dialog opened successfully",
  7635. "content": {
  7636. "application/json": {
  7637. "schema": {
  7638. "type": "boolean",
  7639. "description": "Session dialog opened successfully"
  7640. }
  7641. }
  7642. }
  7643. }
  7644. },
  7645. "description": "Open the session dialog.",
  7646. "summary": "Open sessions dialog",
  7647. "x-codeSamples": [
  7648. {
  7649. "lang": "js",
  7650. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  7651. }
  7652. ]
  7653. }
  7654. },
  7655. "/tui/open-themes": {
  7656. "post": {
  7657. "tags": ["tui"],
  7658. "operationId": "tui.openThemes",
  7659. "parameters": [
  7660. {
  7661. "name": "directory",
  7662. "in": "query",
  7663. "required": false,
  7664. "schema": {
  7665. "type": "string"
  7666. }
  7667. },
  7668. {
  7669. "name": "workspace",
  7670. "in": "query",
  7671. "required": false,
  7672. "schema": {
  7673. "type": "string"
  7674. }
  7675. }
  7676. ],
  7677. "responses": {
  7678. "200": {
  7679. "description": "Theme dialog opened successfully",
  7680. "content": {
  7681. "application/json": {
  7682. "schema": {
  7683. "type": "boolean",
  7684. "description": "Theme dialog opened successfully"
  7685. }
  7686. }
  7687. }
  7688. }
  7689. },
  7690. "description": "Open the theme dialog.",
  7691. "summary": "Open themes dialog",
  7692. "x-codeSamples": [
  7693. {
  7694. "lang": "js",
  7695. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  7696. }
  7697. ]
  7698. }
  7699. },
  7700. "/tui/open-models": {
  7701. "post": {
  7702. "tags": ["tui"],
  7703. "operationId": "tui.openModels",
  7704. "parameters": [
  7705. {
  7706. "name": "directory",
  7707. "in": "query",
  7708. "required": false,
  7709. "schema": {
  7710. "type": "string"
  7711. }
  7712. },
  7713. {
  7714. "name": "workspace",
  7715. "in": "query",
  7716. "required": false,
  7717. "schema": {
  7718. "type": "string"
  7719. }
  7720. }
  7721. ],
  7722. "responses": {
  7723. "200": {
  7724. "description": "Model dialog opened successfully",
  7725. "content": {
  7726. "application/json": {
  7727. "schema": {
  7728. "type": "boolean",
  7729. "description": "Model dialog opened successfully"
  7730. }
  7731. }
  7732. }
  7733. }
  7734. },
  7735. "description": "Open the model dialog.",
  7736. "summary": "Open models dialog",
  7737. "x-codeSamples": [
  7738. {
  7739. "lang": "js",
  7740. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  7741. }
  7742. ]
  7743. }
  7744. },
  7745. "/tui/submit-prompt": {
  7746. "post": {
  7747. "tags": ["tui"],
  7748. "operationId": "tui.submitPrompt",
  7749. "parameters": [
  7750. {
  7751. "name": "directory",
  7752. "in": "query",
  7753. "required": false,
  7754. "schema": {
  7755. "type": "string"
  7756. }
  7757. },
  7758. {
  7759. "name": "workspace",
  7760. "in": "query",
  7761. "required": false,
  7762. "schema": {
  7763. "type": "string"
  7764. }
  7765. }
  7766. ],
  7767. "responses": {
  7768. "200": {
  7769. "description": "Prompt submitted successfully",
  7770. "content": {
  7771. "application/json": {
  7772. "schema": {
  7773. "type": "boolean",
  7774. "description": "Prompt submitted successfully"
  7775. }
  7776. }
  7777. }
  7778. }
  7779. },
  7780. "description": "Submit the prompt.",
  7781. "summary": "Submit TUI prompt",
  7782. "x-codeSamples": [
  7783. {
  7784. "lang": "js",
  7785. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  7786. }
  7787. ]
  7788. }
  7789. },
  7790. "/tui/clear-prompt": {
  7791. "post": {
  7792. "tags": ["tui"],
  7793. "operationId": "tui.clearPrompt",
  7794. "parameters": [
  7795. {
  7796. "name": "directory",
  7797. "in": "query",
  7798. "required": false,
  7799. "schema": {
  7800. "type": "string"
  7801. }
  7802. },
  7803. {
  7804. "name": "workspace",
  7805. "in": "query",
  7806. "required": false,
  7807. "schema": {
  7808. "type": "string"
  7809. }
  7810. }
  7811. ],
  7812. "responses": {
  7813. "200": {
  7814. "description": "Prompt cleared successfully",
  7815. "content": {
  7816. "application/json": {
  7817. "schema": {
  7818. "type": "boolean",
  7819. "description": "Prompt cleared successfully"
  7820. }
  7821. }
  7822. }
  7823. }
  7824. },
  7825. "description": "Clear the prompt.",
  7826. "summary": "Clear TUI prompt",
  7827. "x-codeSamples": [
  7828. {
  7829. "lang": "js",
  7830. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  7831. }
  7832. ]
  7833. }
  7834. },
  7835. "/tui/execute-command": {
  7836. "post": {
  7837. "tags": ["tui"],
  7838. "operationId": "tui.executeCommand",
  7839. "parameters": [
  7840. {
  7841. "name": "directory",
  7842. "in": "query",
  7843. "required": false,
  7844. "schema": {
  7845. "type": "string"
  7846. }
  7847. },
  7848. {
  7849. "name": "workspace",
  7850. "in": "query",
  7851. "required": false,
  7852. "schema": {
  7853. "type": "string"
  7854. }
  7855. }
  7856. ],
  7857. "responses": {
  7858. "200": {
  7859. "description": "Command executed successfully",
  7860. "content": {
  7861. "application/json": {
  7862. "schema": {
  7863. "type": "boolean",
  7864. "description": "Command executed successfully"
  7865. }
  7866. }
  7867. }
  7868. },
  7869. "400": {
  7870. "description": "Bad request",
  7871. "content": {
  7872. "application/json": {
  7873. "schema": {
  7874. "$ref": "#/components/schemas/BadRequestError"
  7875. }
  7876. }
  7877. }
  7878. }
  7879. },
  7880. "description": "Execute a TUI command.",
  7881. "summary": "Execute TUI command",
  7882. "requestBody": {
  7883. "content": {
  7884. "application/json": {
  7885. "schema": {
  7886. "type": "object",
  7887. "properties": {
  7888. "command": {
  7889. "type": "string"
  7890. }
  7891. },
  7892. "required": ["command"],
  7893. "additionalProperties": false
  7894. }
  7895. }
  7896. }
  7897. },
  7898. "x-codeSamples": [
  7899. {
  7900. "lang": "js",
  7901. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  7902. }
  7903. ]
  7904. }
  7905. },
  7906. "/tui/show-toast": {
  7907. "post": {
  7908. "tags": ["tui"],
  7909. "operationId": "tui.showToast",
  7910. "parameters": [
  7911. {
  7912. "name": "directory",
  7913. "in": "query",
  7914. "required": false,
  7915. "schema": {
  7916. "type": "string"
  7917. }
  7918. },
  7919. {
  7920. "name": "workspace",
  7921. "in": "query",
  7922. "required": false,
  7923. "schema": {
  7924. "type": "string"
  7925. }
  7926. }
  7927. ],
  7928. "responses": {
  7929. "200": {
  7930. "description": "Toast notification shown successfully",
  7931. "content": {
  7932. "application/json": {
  7933. "schema": {
  7934. "type": "boolean",
  7935. "description": "Toast notification shown successfully"
  7936. }
  7937. }
  7938. }
  7939. }
  7940. },
  7941. "description": "Show a toast notification in the TUI.",
  7942. "summary": "Show TUI toast",
  7943. "requestBody": {
  7944. "content": {
  7945. "application/json": {
  7946. "schema": {
  7947. "type": "object",
  7948. "properties": {
  7949. "title": {
  7950. "type": "string"
  7951. },
  7952. "message": {
  7953. "type": "string"
  7954. },
  7955. "variant": {
  7956. "type": "string",
  7957. "enum": ["info", "success", "warning", "error"]
  7958. },
  7959. "duration": {
  7960. "type": "integer",
  7961. "exclusiveMinimum": 0
  7962. }
  7963. },
  7964. "required": ["message", "variant"],
  7965. "additionalProperties": false
  7966. }
  7967. }
  7968. }
  7969. },
  7970. "x-codeSamples": [
  7971. {
  7972. "lang": "js",
  7973. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  7974. }
  7975. ]
  7976. }
  7977. },
  7978. "/tui/publish": {
  7979. "post": {
  7980. "tags": ["tui"],
  7981. "operationId": "tui.publish",
  7982. "parameters": [
  7983. {
  7984. "name": "directory",
  7985. "in": "query",
  7986. "required": false,
  7987. "schema": {
  7988. "type": "string"
  7989. }
  7990. },
  7991. {
  7992. "name": "workspace",
  7993. "in": "query",
  7994. "required": false,
  7995. "schema": {
  7996. "type": "string"
  7997. }
  7998. }
  7999. ],
  8000. "responses": {
  8001. "200": {
  8002. "description": "Event published successfully",
  8003. "content": {
  8004. "application/json": {
  8005. "schema": {
  8006. "type": "boolean",
  8007. "description": "Event published successfully"
  8008. }
  8009. }
  8010. }
  8011. },
  8012. "400": {
  8013. "description": "Bad request",
  8014. "content": {
  8015. "application/json": {
  8016. "schema": {
  8017. "$ref": "#/components/schemas/BadRequestError"
  8018. }
  8019. }
  8020. }
  8021. }
  8022. },
  8023. "description": "Publish a TUI event.",
  8024. "summary": "Publish TUI event",
  8025. "requestBody": {
  8026. "content": {
  8027. "application/json": {
  8028. "schema": {
  8029. "anyOf": [
  8030. {
  8031. "$ref": "#/components/schemas/EventTuiPromptAppend"
  8032. },
  8033. {
  8034. "$ref": "#/components/schemas/EventTuiCommandExecute"
  8035. },
  8036. {
  8037. "$ref": "#/components/schemas/EventTuiToastShow"
  8038. },
  8039. {
  8040. "$ref": "#/components/schemas/EventTuiSessionSelect"
  8041. }
  8042. ]
  8043. }
  8044. }
  8045. }
  8046. },
  8047. "x-codeSamples": [
  8048. {
  8049. "lang": "js",
  8050. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  8051. }
  8052. ]
  8053. }
  8054. },
  8055. "/tui/select-session": {
  8056. "post": {
  8057. "tags": ["tui"],
  8058. "operationId": "tui.selectSession",
  8059. "parameters": [
  8060. {
  8061. "name": "directory",
  8062. "in": "query",
  8063. "required": false,
  8064. "schema": {
  8065. "type": "string"
  8066. }
  8067. },
  8068. {
  8069. "name": "workspace",
  8070. "in": "query",
  8071. "required": false,
  8072. "schema": {
  8073. "type": "string"
  8074. }
  8075. }
  8076. ],
  8077. "responses": {
  8078. "200": {
  8079. "description": "Session selected successfully",
  8080. "content": {
  8081. "application/json": {
  8082. "schema": {
  8083. "type": "boolean",
  8084. "description": "Session selected successfully"
  8085. }
  8086. }
  8087. }
  8088. },
  8089. "400": {
  8090. "description": "Bad request",
  8091. "content": {
  8092. "application/json": {
  8093. "schema": {
  8094. "$ref": "#/components/schemas/BadRequestError"
  8095. }
  8096. }
  8097. }
  8098. },
  8099. "404": {
  8100. "description": "NotFoundError",
  8101. "content": {
  8102. "application/json": {
  8103. "schema": {
  8104. "$ref": "#/components/schemas/NotFoundError"
  8105. }
  8106. }
  8107. }
  8108. }
  8109. },
  8110. "description": "Navigate the TUI to display the specified session.",
  8111. "summary": "Select session",
  8112. "requestBody": {
  8113. "content": {
  8114. "application/json": {
  8115. "schema": {
  8116. "type": "object",
  8117. "properties": {
  8118. "sessionID": {
  8119. "type": "string",
  8120. "description": "Session ID to navigate to"
  8121. }
  8122. },
  8123. "required": ["sessionID"],
  8124. "additionalProperties": false
  8125. }
  8126. }
  8127. }
  8128. },
  8129. "x-codeSamples": [
  8130. {
  8131. "lang": "js",
  8132. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  8133. }
  8134. ]
  8135. }
  8136. },
  8137. "/tui/control/next": {
  8138. "get": {
  8139. "tags": ["tui"],
  8140. "operationId": "tui.control.next",
  8141. "parameters": [
  8142. {
  8143. "name": "directory",
  8144. "in": "query",
  8145. "required": false,
  8146. "schema": {
  8147. "type": "string"
  8148. }
  8149. },
  8150. {
  8151. "name": "workspace",
  8152. "in": "query",
  8153. "required": false,
  8154. "schema": {
  8155. "type": "string"
  8156. }
  8157. }
  8158. ],
  8159. "responses": {
  8160. "200": {
  8161. "description": "Next TUI request",
  8162. "content": {
  8163. "application/json": {
  8164. "schema": {
  8165. "type": "object",
  8166. "properties": {
  8167. "path": {
  8168. "type": "string"
  8169. },
  8170. "body": {}
  8171. },
  8172. "required": ["path", "body"],
  8173. "additionalProperties": false,
  8174. "description": "Next TUI request"
  8175. }
  8176. }
  8177. }
  8178. }
  8179. },
  8180. "description": "Retrieve the next TUI request from the queue for processing.",
  8181. "summary": "Get next TUI request",
  8182. "x-codeSamples": [
  8183. {
  8184. "lang": "js",
  8185. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  8186. }
  8187. ]
  8188. }
  8189. },
  8190. "/tui/control/response": {
  8191. "post": {
  8192. "tags": ["tui"],
  8193. "operationId": "tui.control.response",
  8194. "parameters": [
  8195. {
  8196. "name": "directory",
  8197. "in": "query",
  8198. "required": false,
  8199. "schema": {
  8200. "type": "string"
  8201. }
  8202. },
  8203. {
  8204. "name": "workspace",
  8205. "in": "query",
  8206. "required": false,
  8207. "schema": {
  8208. "type": "string"
  8209. }
  8210. }
  8211. ],
  8212. "responses": {
  8213. "200": {
  8214. "description": "Response submitted successfully",
  8215. "content": {
  8216. "application/json": {
  8217. "schema": {
  8218. "type": "boolean",
  8219. "description": "Response submitted successfully"
  8220. }
  8221. }
  8222. }
  8223. }
  8224. },
  8225. "description": "Submit a response to the TUI request queue to complete a pending request.",
  8226. "summary": "Submit TUI response",
  8227. "requestBody": {
  8228. "content": {
  8229. "application/json": {
  8230. "schema": {}
  8231. }
  8232. }
  8233. },
  8234. "x-codeSamples": [
  8235. {
  8236. "lang": "js",
  8237. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  8238. }
  8239. ]
  8240. }
  8241. },
  8242. "/experimental/workspace/adapter": {
  8243. "get": {
  8244. "tags": ["workspace"],
  8245. "operationId": "experimental.workspace.adapter.list",
  8246. "parameters": [
  8247. {
  8248. "name": "directory",
  8249. "in": "query",
  8250. "required": false,
  8251. "schema": {
  8252. "type": "string"
  8253. }
  8254. },
  8255. {
  8256. "name": "workspace",
  8257. "in": "query",
  8258. "required": false,
  8259. "schema": {
  8260. "type": "string"
  8261. }
  8262. }
  8263. ],
  8264. "responses": {
  8265. "200": {
  8266. "description": "Workspace adapters",
  8267. "content": {
  8268. "application/json": {
  8269. "schema": {
  8270. "type": "array",
  8271. "items": {
  8272. "type": "object",
  8273. "properties": {
  8274. "type": {
  8275. "type": "string"
  8276. },
  8277. "name": {
  8278. "type": "string"
  8279. },
  8280. "description": {
  8281. "type": "string"
  8282. }
  8283. },
  8284. "required": ["type", "name", "description"],
  8285. "additionalProperties": false
  8286. },
  8287. "description": "Workspace adapters"
  8288. }
  8289. }
  8290. }
  8291. }
  8292. },
  8293. "description": "List all available workspace adapters for the current project.",
  8294. "summary": "List workspace adapters",
  8295. "x-codeSamples": [
  8296. {
  8297. "lang": "js",
  8298. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  8299. }
  8300. ]
  8301. }
  8302. },
  8303. "/experimental/workspace": {
  8304. "get": {
  8305. "tags": ["workspace"],
  8306. "operationId": "experimental.workspace.list",
  8307. "parameters": [
  8308. {
  8309. "name": "directory",
  8310. "in": "query",
  8311. "required": false,
  8312. "schema": {
  8313. "type": "string"
  8314. }
  8315. },
  8316. {
  8317. "name": "workspace",
  8318. "in": "query",
  8319. "required": false,
  8320. "schema": {
  8321. "type": "string"
  8322. }
  8323. }
  8324. ],
  8325. "responses": {
  8326. "200": {
  8327. "description": "Workspaces",
  8328. "content": {
  8329. "application/json": {
  8330. "schema": {
  8331. "type": "array",
  8332. "items": {
  8333. "$ref": "#/components/schemas/Workspace"
  8334. },
  8335. "description": "Workspaces"
  8336. }
  8337. }
  8338. }
  8339. }
  8340. },
  8341. "description": "List all workspaces.",
  8342. "summary": "List workspaces",
  8343. "x-codeSamples": [
  8344. {
  8345. "lang": "js",
  8346. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  8347. }
  8348. ]
  8349. },
  8350. "post": {
  8351. "tags": ["workspace"],
  8352. "operationId": "experimental.workspace.create",
  8353. "parameters": [
  8354. {
  8355. "name": "directory",
  8356. "in": "query",
  8357. "required": false,
  8358. "schema": {
  8359. "type": "string"
  8360. }
  8361. },
  8362. {
  8363. "name": "workspace",
  8364. "in": "query",
  8365. "required": false,
  8366. "schema": {
  8367. "type": "string"
  8368. }
  8369. }
  8370. ],
  8371. "responses": {
  8372. "200": {
  8373. "description": "Workspace created",
  8374. "content": {
  8375. "application/json": {
  8376. "schema": {
  8377. "$ref": "#/components/schemas/Workspace"
  8378. }
  8379. }
  8380. }
  8381. },
  8382. "400": {
  8383. "description": "Bad request",
  8384. "content": {
  8385. "application/json": {
  8386. "schema": {
  8387. "$ref": "#/components/schemas/BadRequestError"
  8388. }
  8389. }
  8390. }
  8391. }
  8392. },
  8393. "description": "Create a workspace for the current project.",
  8394. "summary": "Create workspace",
  8395. "requestBody": {
  8396. "content": {
  8397. "application/json": {
  8398. "schema": {
  8399. "type": "object",
  8400. "properties": {
  8401. "id": {
  8402. "type": "string"
  8403. },
  8404. "type": {
  8405. "type": "string"
  8406. },
  8407. "branch": {
  8408. "anyOf": [
  8409. {
  8410. "type": "string"
  8411. },
  8412. {
  8413. "type": "null"
  8414. }
  8415. ]
  8416. },
  8417. "extra": {
  8418. "anyOf": [
  8419. {},
  8420. {
  8421. "type": "null"
  8422. }
  8423. ]
  8424. }
  8425. },
  8426. "required": ["type", "branch"],
  8427. "additionalProperties": false
  8428. }
  8429. }
  8430. }
  8431. },
  8432. "x-codeSamples": [
  8433. {
  8434. "lang": "js",
  8435. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  8436. }
  8437. ]
  8438. }
  8439. },
  8440. "/experimental/workspace/sync-list": {
  8441. "post": {
  8442. "tags": ["workspace"],
  8443. "operationId": "experimental.workspace.syncList",
  8444. "parameters": [
  8445. {
  8446. "name": "directory",
  8447. "in": "query",
  8448. "required": false,
  8449. "schema": {
  8450. "type": "string"
  8451. }
  8452. },
  8453. {
  8454. "name": "workspace",
  8455. "in": "query",
  8456. "required": false,
  8457. "schema": {
  8458. "type": "string"
  8459. }
  8460. }
  8461. ],
  8462. "responses": {
  8463. "204": {
  8464. "description": "Workspace list synced"
  8465. }
  8466. },
  8467. "description": "Register missing workspaces returned by workspace adapters.",
  8468. "summary": "Sync workspace list",
  8469. "x-codeSamples": [
  8470. {
  8471. "lang": "js",
  8472. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  8473. }
  8474. ]
  8475. }
  8476. },
  8477. "/experimental/workspace/status": {
  8478. "get": {
  8479. "tags": ["workspace"],
  8480. "operationId": "experimental.workspace.status",
  8481. "parameters": [
  8482. {
  8483. "name": "directory",
  8484. "in": "query",
  8485. "required": false,
  8486. "schema": {
  8487. "type": "string"
  8488. }
  8489. },
  8490. {
  8491. "name": "workspace",
  8492. "in": "query",
  8493. "required": false,
  8494. "schema": {
  8495. "type": "string"
  8496. }
  8497. }
  8498. ],
  8499. "responses": {
  8500. "200": {
  8501. "description": "Workspace status",
  8502. "content": {
  8503. "application/json": {
  8504. "schema": {
  8505. "type": "array",
  8506. "items": {
  8507. "type": "object",
  8508. "properties": {
  8509. "workspaceID": {
  8510. "type": "string"
  8511. },
  8512. "status": {
  8513. "type": "string",
  8514. "enum": ["connected", "connecting", "disconnected", "error"]
  8515. }
  8516. },
  8517. "required": ["workspaceID", "status"],
  8518. "additionalProperties": false
  8519. },
  8520. "description": "Workspace status"
  8521. }
  8522. }
  8523. }
  8524. }
  8525. },
  8526. "description": "Get connection status for workspaces in the current project.",
  8527. "summary": "Workspace status",
  8528. "x-codeSamples": [
  8529. {
  8530. "lang": "js",
  8531. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  8532. }
  8533. ]
  8534. }
  8535. },
  8536. "/experimental/workspace/{id}": {
  8537. "delete": {
  8538. "tags": ["workspace"],
  8539. "operationId": "experimental.workspace.remove",
  8540. "parameters": [
  8541. {
  8542. "name": "directory",
  8543. "in": "query",
  8544. "required": false,
  8545. "schema": {
  8546. "type": "string"
  8547. }
  8548. },
  8549. {
  8550. "name": "workspace",
  8551. "in": "query",
  8552. "required": false,
  8553. "schema": {
  8554. "type": "string"
  8555. }
  8556. },
  8557. {
  8558. "name": "id",
  8559. "in": "path",
  8560. "schema": {
  8561. "type": "string",
  8562. "pattern": "^wrk.*"
  8563. },
  8564. "required": true
  8565. }
  8566. ],
  8567. "responses": {
  8568. "200": {
  8569. "description": "Workspace removed",
  8570. "content": {
  8571. "application/json": {
  8572. "schema": {
  8573. "$ref": "#/components/schemas/Workspace"
  8574. }
  8575. }
  8576. }
  8577. },
  8578. "400": {
  8579. "description": "Bad request",
  8580. "content": {
  8581. "application/json": {
  8582. "schema": {
  8583. "$ref": "#/components/schemas/BadRequestError"
  8584. }
  8585. }
  8586. }
  8587. }
  8588. },
  8589. "description": "Remove an existing workspace.",
  8590. "summary": "Remove workspace",
  8591. "x-codeSamples": [
  8592. {
  8593. "lang": "js",
  8594. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  8595. }
  8596. ]
  8597. }
  8598. },
  8599. "/experimental/workspace/warp": {
  8600. "post": {
  8601. "tags": ["workspace"],
  8602. "operationId": "experimental.workspace.warp",
  8603. "parameters": [
  8604. {
  8605. "name": "directory",
  8606. "in": "query",
  8607. "required": false,
  8608. "schema": {
  8609. "type": "string"
  8610. }
  8611. },
  8612. {
  8613. "name": "workspace",
  8614. "in": "query",
  8615. "required": false,
  8616. "schema": {
  8617. "type": "string"
  8618. }
  8619. }
  8620. ],
  8621. "responses": {
  8622. "204": {
  8623. "description": "Session warped"
  8624. },
  8625. "400": {
  8626. "description": "WorkspaceWarpError | VcsApplyError",
  8627. "content": {
  8628. "application/json": {
  8629. "schema": {
  8630. "anyOf": [
  8631. {
  8632. "$ref": "#/components/schemas/WorkspaceWarpError"
  8633. },
  8634. {
  8635. "$ref": "#/components/schemas/VcsApplyError"
  8636. }
  8637. ]
  8638. }
  8639. }
  8640. }
  8641. }
  8642. },
  8643. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  8644. "summary": "Warp session into workspace",
  8645. "requestBody": {
  8646. "content": {
  8647. "application/json": {
  8648. "schema": {
  8649. "type": "object",
  8650. "properties": {
  8651. "id": {
  8652. "anyOf": [
  8653. {
  8654. "type": "string"
  8655. },
  8656. {
  8657. "type": "null"
  8658. }
  8659. ]
  8660. },
  8661. "sessionID": {
  8662. "type": "string"
  8663. },
  8664. "copyChanges": {
  8665. "type": "boolean"
  8666. }
  8667. },
  8668. "required": ["id", "sessionID"],
  8669. "additionalProperties": false
  8670. }
  8671. }
  8672. }
  8673. },
  8674. "x-codeSamples": [
  8675. {
  8676. "lang": "js",
  8677. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  8678. }
  8679. ]
  8680. }
  8681. },
  8682. "/pty/{ptyID}/connect": {
  8683. "get": {
  8684. "tags": ["pty"],
  8685. "operationId": "pty.connect",
  8686. "parameters": [
  8687. {
  8688. "name": "directory",
  8689. "in": "query",
  8690. "required": false,
  8691. "schema": {
  8692. "type": "string"
  8693. }
  8694. },
  8695. {
  8696. "name": "workspace",
  8697. "in": "query",
  8698. "required": false,
  8699. "schema": {
  8700. "type": "string"
  8701. }
  8702. },
  8703. {
  8704. "name": "ptyID",
  8705. "in": "path",
  8706. "schema": {
  8707. "type": "string",
  8708. "pattern": "^pty.*"
  8709. },
  8710. "required": true
  8711. }
  8712. ],
  8713. "responses": {
  8714. "200": {
  8715. "description": "Connected session",
  8716. "content": {
  8717. "application/json": {
  8718. "schema": {
  8719. "type": "boolean",
  8720. "description": "Connected session"
  8721. }
  8722. }
  8723. }
  8724. },
  8725. "403": {
  8726. "description": "Forbidden",
  8727. "content": {
  8728. "application/json": {
  8729. "schema": {
  8730. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  8731. }
  8732. }
  8733. }
  8734. },
  8735. "404": {
  8736. "description": "Not found",
  8737. "content": {
  8738. "application/json": {
  8739. "schema": {
  8740. "$ref": "#/components/schemas/NotFoundError"
  8741. }
  8742. }
  8743. }
  8744. }
  8745. },
  8746. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  8747. "summary": "Connect to PTY session",
  8748. "x-codeSamples": [
  8749. {
  8750. "lang": "js",
  8751. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  8752. }
  8753. ]
  8754. }
  8755. }
  8756. },
  8757. "components": {
  8758. "schemas": {
  8759. "Event": {
  8760. "anyOf": [
  8761. {
  8762. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  8763. },
  8764. {
  8765. "$ref": "#/components/schemas/EventFileEdited"
  8766. },
  8767. {
  8768. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  8769. },
  8770. {
  8771. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  8772. },
  8773. {
  8774. "$ref": "#/components/schemas/EventLspUpdated"
  8775. },
  8776. {
  8777. "$ref": "#/components/schemas/EventMessagePartDelta"
  8778. },
  8779. {
  8780. "$ref": "#/components/schemas/EventPermissionAsked"
  8781. },
  8782. {
  8783. "$ref": "#/components/schemas/EventPermissionReplied"
  8784. },
  8785. {
  8786. "$ref": "#/components/schemas/EventSessionDiff"
  8787. },
  8788. {
  8789. "$ref": "#/components/schemas/EventSessionError"
  8790. },
  8791. {
  8792. "$ref": "#/components/schemas/EventInstallationUpdated"
  8793. },
  8794. {
  8795. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  8796. },
  8797. {
  8798. "$ref": "#/components/schemas/EventQuestionAsked"
  8799. },
  8800. {
  8801. "$ref": "#/components/schemas/EventQuestionReplied"
  8802. },
  8803. {
  8804. "$ref": "#/components/schemas/EventQuestionRejected"
  8805. },
  8806. {
  8807. "$ref": "#/components/schemas/EventTodoUpdated"
  8808. },
  8809. {
  8810. "$ref": "#/components/schemas/EventSessionStatus"
  8811. },
  8812. {
  8813. "$ref": "#/components/schemas/EventSessionIdle"
  8814. },
  8815. {
  8816. "$ref": "#/components/schemas/EventSessionCompacted"
  8817. },
  8818. {
  8819. "$ref": "#/components/schemas/Event.tui.prompt.append"
  8820. },
  8821. {
  8822. "$ref": "#/components/schemas/Event.tui.command.execute"
  8823. },
  8824. {
  8825. "$ref": "#/components/schemas/EventTuiToastShow1"
  8826. },
  8827. {
  8828. "$ref": "#/components/schemas/Event.tui.session.select"
  8829. },
  8830. {
  8831. "$ref": "#/components/schemas/EventMcpToolsChanged"
  8832. },
  8833. {
  8834. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  8835. },
  8836. {
  8837. "$ref": "#/components/schemas/EventCommandExecuted"
  8838. },
  8839. {
  8840. "$ref": "#/components/schemas/EventProjectUpdated"
  8841. },
  8842. {
  8843. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  8844. },
  8845. {
  8846. "$ref": "#/components/schemas/EventWorkspaceReady"
  8847. },
  8848. {
  8849. "$ref": "#/components/schemas/EventWorkspaceFailed"
  8850. },
  8851. {
  8852. "$ref": "#/components/schemas/EventWorkspaceStatus"
  8853. },
  8854. {
  8855. "$ref": "#/components/schemas/EventWorktreeReady"
  8856. },
  8857. {
  8858. "$ref": "#/components/schemas/EventWorktreeFailed"
  8859. },
  8860. {
  8861. "$ref": "#/components/schemas/EventPtyCreated"
  8862. },
  8863. {
  8864. "$ref": "#/components/schemas/EventPtyUpdated"
  8865. },
  8866. {
  8867. "$ref": "#/components/schemas/EventPtyExited"
  8868. },
  8869. {
  8870. "$ref": "#/components/schemas/EventPtyDeleted"
  8871. },
  8872. {
  8873. "$ref": "#/components/schemas/EventMessageUpdated"
  8874. },
  8875. {
  8876. "$ref": "#/components/schemas/EventMessageRemoved"
  8877. },
  8878. {
  8879. "$ref": "#/components/schemas/EventMessagePartUpdated"
  8880. },
  8881. {
  8882. "$ref": "#/components/schemas/EventMessagePartRemoved"
  8883. },
  8884. {
  8885. "$ref": "#/components/schemas/EventSessionCreated"
  8886. },
  8887. {
  8888. "$ref": "#/components/schemas/EventSessionUpdated"
  8889. },
  8890. {
  8891. "$ref": "#/components/schemas/EventSessionDeleted"
  8892. },
  8893. {
  8894. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  8895. },
  8896. {
  8897. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  8898. },
  8899. {
  8900. "$ref": "#/components/schemas/EventSessionNextPrompted"
  8901. },
  8902. {
  8903. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  8904. },
  8905. {
  8906. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  8907. },
  8908. {
  8909. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  8910. },
  8911. {
  8912. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  8913. },
  8914. {
  8915. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  8916. },
  8917. {
  8918. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  8919. },
  8920. {
  8921. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  8922. },
  8923. {
  8924. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  8925. },
  8926. {
  8927. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  8928. },
  8929. {
  8930. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  8931. },
  8932. {
  8933. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  8934. },
  8935. {
  8936. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  8937. },
  8938. {
  8939. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  8940. },
  8941. {
  8942. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  8943. },
  8944. {
  8945. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  8946. },
  8947. {
  8948. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  8949. },
  8950. {
  8951. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  8952. },
  8953. {
  8954. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  8955. },
  8956. {
  8957. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  8958. },
  8959. {
  8960. "$ref": "#/components/schemas/EventSessionNextRetried"
  8961. },
  8962. {
  8963. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  8964. },
  8965. {
  8966. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  8967. },
  8968. {
  8969. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  8970. },
  8971. {
  8972. "$ref": "#/components/schemas/EventServerConnected"
  8973. },
  8974. {
  8975. "$ref": "#/components/schemas/EventGlobalDisposed"
  8976. }
  8977. ]
  8978. },
  8979. "OAuth": {
  8980. "type": "object",
  8981. "properties": {
  8982. "type": {
  8983. "type": "string",
  8984. "enum": ["oauth"]
  8985. },
  8986. "refresh": {
  8987. "type": "string"
  8988. },
  8989. "access": {
  8990. "type": "string"
  8991. },
  8992. "expires": {
  8993. "type": "integer",
  8994. "minimum": 0
  8995. },
  8996. "accountId": {
  8997. "type": "string"
  8998. },
  8999. "enterpriseUrl": {
  9000. "type": "string"
  9001. }
  9002. },
  9003. "required": ["type", "refresh", "access", "expires"],
  9004. "additionalProperties": false
  9005. },
  9006. "ApiAuth": {
  9007. "type": "object",
  9008. "properties": {
  9009. "type": {
  9010. "type": "string",
  9011. "enum": ["api"]
  9012. },
  9013. "key": {
  9014. "type": "string"
  9015. },
  9016. "metadata": {
  9017. "type": "object",
  9018. "additionalProperties": {
  9019. "type": "string"
  9020. }
  9021. }
  9022. },
  9023. "required": ["type", "key"],
  9024. "additionalProperties": false
  9025. },
  9026. "WellKnownAuth": {
  9027. "type": "object",
  9028. "properties": {
  9029. "type": {
  9030. "type": "string",
  9031. "enum": ["wellknown"]
  9032. },
  9033. "key": {
  9034. "type": "string"
  9035. },
  9036. "token": {
  9037. "type": "string"
  9038. }
  9039. },
  9040. "required": ["type", "key", "token"],
  9041. "additionalProperties": false
  9042. },
  9043. "Auth": {
  9044. "anyOf": [
  9045. {
  9046. "$ref": "#/components/schemas/OAuth"
  9047. },
  9048. {
  9049. "$ref": "#/components/schemas/ApiAuth"
  9050. },
  9051. {
  9052. "$ref": "#/components/schemas/WellKnownAuth"
  9053. }
  9054. ]
  9055. },
  9056. "PermissionRequest": {
  9057. "type": "object",
  9058. "properties": {
  9059. "id": {
  9060. "type": "string",
  9061. "pattern": "^per"
  9062. },
  9063. "sessionID": {
  9064. "type": "string"
  9065. },
  9066. "permission": {
  9067. "type": "string"
  9068. },
  9069. "patterns": {
  9070. "type": "array",
  9071. "items": {
  9072. "type": "string"
  9073. }
  9074. },
  9075. "metadata": {
  9076. "type": "object"
  9077. },
  9078. "always": {
  9079. "type": "array",
  9080. "items": {
  9081. "type": "string"
  9082. }
  9083. },
  9084. "tool": {
  9085. "type": "object",
  9086. "properties": {
  9087. "messageID": {
  9088. "type": "string"
  9089. },
  9090. "callID": {
  9091. "type": "string"
  9092. }
  9093. },
  9094. "required": ["messageID", "callID"],
  9095. "additionalProperties": false
  9096. }
  9097. },
  9098. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  9099. "additionalProperties": false
  9100. },
  9101. "SnapshotFileDiff": {
  9102. "type": "object",
  9103. "properties": {
  9104. "file": {
  9105. "type": "string"
  9106. },
  9107. "patch": {
  9108. "type": "string"
  9109. },
  9110. "additions": {
  9111. "type": "integer",
  9112. "minimum": 0
  9113. },
  9114. "deletions": {
  9115. "type": "integer",
  9116. "minimum": 0
  9117. },
  9118. "status": {
  9119. "type": "string",
  9120. "enum": ["added", "deleted", "modified"]
  9121. }
  9122. },
  9123. "required": ["additions", "deletions"],
  9124. "additionalProperties": false
  9125. },
  9126. "ProviderAuthError": {
  9127. "type": "object",
  9128. "properties": {
  9129. "name": {
  9130. "type": "string",
  9131. "enum": ["ProviderAuthError"]
  9132. },
  9133. "data": {
  9134. "type": "object",
  9135. "properties": {
  9136. "providerID": {
  9137. "type": "string"
  9138. },
  9139. "message": {
  9140. "type": "string"
  9141. }
  9142. },
  9143. "required": ["providerID", "message"],
  9144. "additionalProperties": false
  9145. }
  9146. },
  9147. "required": ["name", "data"],
  9148. "additionalProperties": false
  9149. },
  9150. "UnknownError": {
  9151. "type": "object",
  9152. "properties": {
  9153. "name": {
  9154. "type": "string",
  9155. "enum": ["UnknownError"]
  9156. },
  9157. "data": {
  9158. "type": "object",
  9159. "properties": {
  9160. "message": {
  9161. "type": "string"
  9162. }
  9163. },
  9164. "required": ["message"],
  9165. "additionalProperties": false
  9166. }
  9167. },
  9168. "required": ["name", "data"],
  9169. "additionalProperties": false
  9170. },
  9171. "MessageOutputLengthError": {
  9172. "type": "object",
  9173. "properties": {
  9174. "name": {
  9175. "type": "string",
  9176. "enum": ["MessageOutputLengthError"]
  9177. },
  9178. "data": {
  9179. "type": "object",
  9180. "properties": {}
  9181. }
  9182. },
  9183. "required": ["name", "data"],
  9184. "additionalProperties": false
  9185. },
  9186. "MessageAbortedError": {
  9187. "type": "object",
  9188. "properties": {
  9189. "name": {
  9190. "type": "string",
  9191. "enum": ["MessageAbortedError"]
  9192. },
  9193. "data": {
  9194. "type": "object",
  9195. "properties": {
  9196. "message": {
  9197. "type": "string"
  9198. }
  9199. },
  9200. "required": ["message"],
  9201. "additionalProperties": false
  9202. }
  9203. },
  9204. "required": ["name", "data"],
  9205. "additionalProperties": false
  9206. },
  9207. "StructuredOutputError": {
  9208. "type": "object",
  9209. "properties": {
  9210. "name": {
  9211. "type": "string",
  9212. "enum": ["StructuredOutputError"]
  9213. },
  9214. "data": {
  9215. "type": "object",
  9216. "properties": {
  9217. "message": {
  9218. "type": "string"
  9219. },
  9220. "retries": {
  9221. "type": "integer",
  9222. "minimum": 0
  9223. }
  9224. },
  9225. "required": ["message", "retries"],
  9226. "additionalProperties": false
  9227. }
  9228. },
  9229. "required": ["name", "data"],
  9230. "additionalProperties": false
  9231. },
  9232. "ContextOverflowError": {
  9233. "type": "object",
  9234. "properties": {
  9235. "name": {
  9236. "type": "string",
  9237. "enum": ["ContextOverflowError"]
  9238. },
  9239. "data": {
  9240. "type": "object",
  9241. "properties": {
  9242. "message": {
  9243. "type": "string"
  9244. },
  9245. "responseBody": {
  9246. "type": "string"
  9247. }
  9248. },
  9249. "required": ["message"],
  9250. "additionalProperties": false
  9251. }
  9252. },
  9253. "required": ["name", "data"],
  9254. "additionalProperties": false
  9255. },
  9256. "APIError": {
  9257. "type": "object",
  9258. "properties": {
  9259. "name": {
  9260. "type": "string",
  9261. "enum": ["APIError"]
  9262. },
  9263. "data": {
  9264. "type": "object",
  9265. "properties": {
  9266. "message": {
  9267. "type": "string"
  9268. },
  9269. "statusCode": {
  9270. "type": "integer",
  9271. "minimum": 0
  9272. },
  9273. "isRetryable": {
  9274. "type": "boolean"
  9275. },
  9276. "responseHeaders": {
  9277. "type": "object",
  9278. "additionalProperties": {
  9279. "type": "string"
  9280. }
  9281. },
  9282. "responseBody": {
  9283. "type": "string"
  9284. },
  9285. "metadata": {
  9286. "type": "object",
  9287. "additionalProperties": {
  9288. "type": "string"
  9289. }
  9290. }
  9291. },
  9292. "required": ["message", "isRetryable"],
  9293. "additionalProperties": false
  9294. }
  9295. },
  9296. "required": ["name", "data"],
  9297. "additionalProperties": false
  9298. },
  9299. "QuestionOption": {
  9300. "type": "object",
  9301. "properties": {
  9302. "label": {
  9303. "type": "string",
  9304. "description": "Display text (1-5 words, concise)"
  9305. },
  9306. "description": {
  9307. "type": "string",
  9308. "description": "Explanation of choice"
  9309. }
  9310. },
  9311. "required": ["label", "description"],
  9312. "additionalProperties": false
  9313. },
  9314. "QuestionInfo": {
  9315. "type": "object",
  9316. "properties": {
  9317. "question": {
  9318. "type": "string",
  9319. "description": "Complete question"
  9320. },
  9321. "header": {
  9322. "type": "string",
  9323. "description": "Very short label (max 30 chars)"
  9324. },
  9325. "options": {
  9326. "type": "array",
  9327. "items": {
  9328. "$ref": "#/components/schemas/QuestionOption"
  9329. },
  9330. "description": "Available choices"
  9331. },
  9332. "multiple": {
  9333. "type": "boolean"
  9334. },
  9335. "custom": {
  9336. "type": "boolean"
  9337. }
  9338. },
  9339. "required": ["question", "header", "options"],
  9340. "additionalProperties": false
  9341. },
  9342. "QuestionTool": {
  9343. "type": "object",
  9344. "properties": {
  9345. "messageID": {
  9346. "type": "string"
  9347. },
  9348. "callID": {
  9349. "type": "string"
  9350. }
  9351. },
  9352. "required": ["messageID", "callID"],
  9353. "additionalProperties": false
  9354. },
  9355. "QuestionRequest": {
  9356. "type": "object",
  9357. "properties": {
  9358. "id": {
  9359. "type": "string",
  9360. "pattern": "^que"
  9361. },
  9362. "sessionID": {
  9363. "type": "string"
  9364. },
  9365. "questions": {
  9366. "type": "array",
  9367. "items": {
  9368. "$ref": "#/components/schemas/QuestionInfo"
  9369. },
  9370. "description": "Questions to ask"
  9371. },
  9372. "tool": {
  9373. "$ref": "#/components/schemas/QuestionTool"
  9374. }
  9375. },
  9376. "required": ["id", "sessionID", "questions"],
  9377. "additionalProperties": false
  9378. },
  9379. "QuestionAnswer": {
  9380. "type": "array",
  9381. "items": {
  9382. "type": "string"
  9383. }
  9384. },
  9385. "QuestionReplied": {
  9386. "type": "object",
  9387. "properties": {
  9388. "sessionID": {
  9389. "type": "string"
  9390. },
  9391. "requestID": {
  9392. "type": "string",
  9393. "pattern": "^que"
  9394. },
  9395. "answers": {
  9396. "type": "array",
  9397. "items": {
  9398. "$ref": "#/components/schemas/QuestionAnswer"
  9399. }
  9400. }
  9401. },
  9402. "required": ["sessionID", "requestID", "answers"],
  9403. "additionalProperties": false
  9404. },
  9405. "QuestionRejected": {
  9406. "type": "object",
  9407. "properties": {
  9408. "sessionID": {
  9409. "type": "string"
  9410. },
  9411. "requestID": {
  9412. "type": "string",
  9413. "pattern": "^que"
  9414. }
  9415. },
  9416. "required": ["sessionID", "requestID"],
  9417. "additionalProperties": false
  9418. },
  9419. "Todo": {
  9420. "type": "object",
  9421. "properties": {
  9422. "content": {
  9423. "type": "string",
  9424. "description": "Brief description of the task"
  9425. },
  9426. "status": {
  9427. "type": "string",
  9428. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  9429. },
  9430. "priority": {
  9431. "type": "string",
  9432. "description": "Priority level of the task: high, medium, low"
  9433. }
  9434. },
  9435. "required": ["content", "status", "priority"],
  9436. "additionalProperties": false
  9437. },
  9438. "SessionStatus": {
  9439. "anyOf": [
  9440. {
  9441. "type": "object",
  9442. "properties": {
  9443. "type": {
  9444. "type": "string",
  9445. "enum": ["idle"]
  9446. }
  9447. },
  9448. "required": ["type"],
  9449. "additionalProperties": false
  9450. },
  9451. {
  9452. "type": "object",
  9453. "properties": {
  9454. "type": {
  9455. "type": "string",
  9456. "enum": ["retry"]
  9457. },
  9458. "attempt": {
  9459. "type": "integer",
  9460. "minimum": 0
  9461. },
  9462. "message": {
  9463. "type": "string"
  9464. },
  9465. "action": {
  9466. "type": "object",
  9467. "properties": {
  9468. "reason": {
  9469. "type": "string"
  9470. },
  9471. "provider": {
  9472. "type": "string"
  9473. },
  9474. "title": {
  9475. "type": "string"
  9476. },
  9477. "message": {
  9478. "type": "string"
  9479. },
  9480. "label": {
  9481. "type": "string"
  9482. },
  9483. "link": {
  9484. "type": "string"
  9485. }
  9486. },
  9487. "required": ["reason", "provider", "title", "message", "label"],
  9488. "additionalProperties": false
  9489. },
  9490. "next": {
  9491. "type": "integer",
  9492. "minimum": 0
  9493. }
  9494. },
  9495. "required": ["type", "attempt", "message", "next"],
  9496. "additionalProperties": false
  9497. },
  9498. {
  9499. "type": "object",
  9500. "properties": {
  9501. "type": {
  9502. "type": "string",
  9503. "enum": ["busy"]
  9504. }
  9505. },
  9506. "required": ["type"],
  9507. "additionalProperties": false
  9508. }
  9509. ]
  9510. },
  9511. "Event.tui.prompt.append": {
  9512. "type": "object",
  9513. "properties": {
  9514. "id": {
  9515. "type": "string"
  9516. },
  9517. "type": {
  9518. "type": "string",
  9519. "enum": ["tui.prompt.append"]
  9520. },
  9521. "properties": {
  9522. "type": "object",
  9523. "properties": {
  9524. "text": {
  9525. "type": "string"
  9526. }
  9527. },
  9528. "required": ["text"],
  9529. "additionalProperties": false
  9530. }
  9531. },
  9532. "required": ["id", "type", "properties"],
  9533. "additionalProperties": false
  9534. },
  9535. "Event.tui.command.execute": {
  9536. "type": "object",
  9537. "properties": {
  9538. "id": {
  9539. "type": "string"
  9540. },
  9541. "type": {
  9542. "type": "string",
  9543. "enum": ["tui.command.execute"]
  9544. },
  9545. "properties": {
  9546. "type": "object",
  9547. "properties": {
  9548. "command": {
  9549. "anyOf": [
  9550. {
  9551. "type": "string",
  9552. "enum": [
  9553. "session.list",
  9554. "session.new",
  9555. "session.share",
  9556. "session.interrupt",
  9557. "session.compact",
  9558. "session.page.up",
  9559. "session.page.down",
  9560. "session.line.up",
  9561. "session.line.down",
  9562. "session.half.page.up",
  9563. "session.half.page.down",
  9564. "session.first",
  9565. "session.last",
  9566. "prompt.clear",
  9567. "prompt.submit",
  9568. "agent.cycle"
  9569. ]
  9570. },
  9571. {
  9572. "type": "string"
  9573. }
  9574. ]
  9575. }
  9576. },
  9577. "required": ["command"],
  9578. "additionalProperties": false
  9579. }
  9580. },
  9581. "required": ["id", "type", "properties"],
  9582. "additionalProperties": false
  9583. },
  9584. "Event.tui.toast.show": {
  9585. "type": "object",
  9586. "properties": {
  9587. "id": {
  9588. "type": "string"
  9589. },
  9590. "type": {
  9591. "type": "string",
  9592. "enum": ["tui.toast.show"]
  9593. },
  9594. "properties": {
  9595. "type": "object",
  9596. "properties": {
  9597. "title": {
  9598. "type": "string"
  9599. },
  9600. "message": {
  9601. "type": "string"
  9602. },
  9603. "variant": {
  9604. "type": "string",
  9605. "enum": ["info", "success", "warning", "error"]
  9606. },
  9607. "duration": {
  9608. "type": "integer",
  9609. "exclusiveMinimum": 0
  9610. }
  9611. },
  9612. "required": ["message", "variant"],
  9613. "additionalProperties": false
  9614. }
  9615. },
  9616. "required": ["id", "type", "properties"],
  9617. "additionalProperties": false
  9618. },
  9619. "Event.tui.session.select": {
  9620. "type": "object",
  9621. "properties": {
  9622. "id": {
  9623. "type": "string"
  9624. },
  9625. "type": {
  9626. "type": "string",
  9627. "enum": ["tui.session.select"]
  9628. },
  9629. "properties": {
  9630. "type": "object",
  9631. "properties": {
  9632. "sessionID": {
  9633. "type": "string",
  9634. "description": "Session ID to navigate to"
  9635. }
  9636. },
  9637. "required": ["sessionID"],
  9638. "additionalProperties": false
  9639. }
  9640. },
  9641. "required": ["id", "type", "properties"],
  9642. "additionalProperties": false
  9643. },
  9644. "Project": {
  9645. "type": "object",
  9646. "properties": {
  9647. "id": {
  9648. "type": "string"
  9649. },
  9650. "worktree": {
  9651. "type": "string"
  9652. },
  9653. "vcs": {
  9654. "type": "string",
  9655. "enum": ["git"]
  9656. },
  9657. "name": {
  9658. "type": "string"
  9659. },
  9660. "icon": {
  9661. "type": "object",
  9662. "properties": {
  9663. "url": {
  9664. "type": "string"
  9665. },
  9666. "override": {
  9667. "type": "string"
  9668. },
  9669. "color": {
  9670. "type": "string"
  9671. }
  9672. },
  9673. "additionalProperties": false
  9674. },
  9675. "commands": {
  9676. "type": "object",
  9677. "properties": {
  9678. "start": {
  9679. "type": "string",
  9680. "description": "Startup script to run when creating a new workspace (worktree)"
  9681. }
  9682. },
  9683. "additionalProperties": false
  9684. },
  9685. "time": {
  9686. "type": "object",
  9687. "properties": {
  9688. "created": {
  9689. "type": "integer",
  9690. "minimum": 0
  9691. },
  9692. "updated": {
  9693. "type": "integer",
  9694. "minimum": 0
  9695. },
  9696. "initialized": {
  9697. "type": "integer",
  9698. "minimum": 0
  9699. }
  9700. },
  9701. "required": ["created", "updated"],
  9702. "additionalProperties": false
  9703. },
  9704. "sandboxes": {
  9705. "type": "array",
  9706. "items": {
  9707. "type": "string"
  9708. }
  9709. }
  9710. },
  9711. "required": ["id", "worktree", "time", "sandboxes"],
  9712. "additionalProperties": false
  9713. },
  9714. "Pty": {
  9715. "type": "object",
  9716. "properties": {
  9717. "id": {
  9718. "type": "string"
  9719. },
  9720. "title": {
  9721. "type": "string"
  9722. },
  9723. "command": {
  9724. "type": "string"
  9725. },
  9726. "args": {
  9727. "type": "array",
  9728. "items": {
  9729. "type": "string"
  9730. }
  9731. },
  9732. "cwd": {
  9733. "type": "string"
  9734. },
  9735. "status": {
  9736. "type": "string",
  9737. "enum": ["running", "exited"]
  9738. },
  9739. "pid": {
  9740. "type": "integer",
  9741. "exclusiveMinimum": 0
  9742. }
  9743. },
  9744. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  9745. "additionalProperties": false
  9746. },
  9747. "OutputFormatText": {
  9748. "type": "object",
  9749. "properties": {
  9750. "type": {
  9751. "type": "string",
  9752. "enum": ["text"]
  9753. }
  9754. },
  9755. "required": ["type"],
  9756. "additionalProperties": false
  9757. },
  9758. "JSONSchema": {
  9759. "type": "object"
  9760. },
  9761. "OutputFormatJsonSchema": {
  9762. "type": "object",
  9763. "properties": {
  9764. "type": {
  9765. "type": "string",
  9766. "enum": ["json_schema"]
  9767. },
  9768. "schema": {
  9769. "$ref": "#/components/schemas/JSONSchema"
  9770. },
  9771. "retryCount": {
  9772. "type": "integer",
  9773. "minimum": 0
  9774. }
  9775. },
  9776. "required": ["type", "schema"],
  9777. "additionalProperties": false
  9778. },
  9779. "OutputFormat": {
  9780. "anyOf": [
  9781. {
  9782. "$ref": "#/components/schemas/OutputFormatText"
  9783. },
  9784. {
  9785. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  9786. }
  9787. ]
  9788. },
  9789. "UserMessage": {
  9790. "type": "object",
  9791. "properties": {
  9792. "id": {
  9793. "type": "string"
  9794. },
  9795. "sessionID": {
  9796. "type": "string"
  9797. },
  9798. "role": {
  9799. "type": "string",
  9800. "enum": ["user"]
  9801. },
  9802. "time": {
  9803. "type": "object",
  9804. "properties": {
  9805. "created": {
  9806. "type": "integer",
  9807. "minimum": 0
  9808. }
  9809. },
  9810. "required": ["created"],
  9811. "additionalProperties": false
  9812. },
  9813. "format": {
  9814. "$ref": "#/components/schemas/OutputFormat"
  9815. },
  9816. "summary": {
  9817. "type": "object",
  9818. "properties": {
  9819. "title": {
  9820. "type": "string"
  9821. },
  9822. "body": {
  9823. "type": "string"
  9824. },
  9825. "diffs": {
  9826. "type": "array",
  9827. "items": {
  9828. "$ref": "#/components/schemas/SnapshotFileDiff"
  9829. }
  9830. }
  9831. },
  9832. "required": ["diffs"],
  9833. "additionalProperties": false
  9834. },
  9835. "agent": {
  9836. "type": "string"
  9837. },
  9838. "model": {
  9839. "type": "object",
  9840. "properties": {
  9841. "providerID": {
  9842. "type": "string"
  9843. },
  9844. "modelID": {
  9845. "type": "string"
  9846. },
  9847. "variant": {
  9848. "type": "string"
  9849. }
  9850. },
  9851. "required": ["providerID", "modelID"],
  9852. "additionalProperties": false
  9853. },
  9854. "system": {
  9855. "type": "string"
  9856. },
  9857. "tools": {
  9858. "type": "object",
  9859. "additionalProperties": {
  9860. "type": "boolean"
  9861. }
  9862. }
  9863. },
  9864. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  9865. "additionalProperties": false
  9866. },
  9867. "AssistantMessage": {
  9868. "type": "object",
  9869. "properties": {
  9870. "id": {
  9871. "type": "string"
  9872. },
  9873. "sessionID": {
  9874. "type": "string"
  9875. },
  9876. "role": {
  9877. "type": "string",
  9878. "enum": ["assistant"]
  9879. },
  9880. "time": {
  9881. "type": "object",
  9882. "properties": {
  9883. "created": {
  9884. "type": "integer",
  9885. "minimum": 0
  9886. },
  9887. "completed": {
  9888. "type": "integer",
  9889. "minimum": 0
  9890. }
  9891. },
  9892. "required": ["created"],
  9893. "additionalProperties": false
  9894. },
  9895. "error": {
  9896. "anyOf": [
  9897. {
  9898. "$ref": "#/components/schemas/ProviderAuthError"
  9899. },
  9900. {
  9901. "$ref": "#/components/schemas/UnknownError"
  9902. },
  9903. {
  9904. "$ref": "#/components/schemas/MessageOutputLengthError"
  9905. },
  9906. {
  9907. "$ref": "#/components/schemas/MessageAbortedError"
  9908. },
  9909. {
  9910. "$ref": "#/components/schemas/StructuredOutputError"
  9911. },
  9912. {
  9913. "$ref": "#/components/schemas/ContextOverflowError"
  9914. },
  9915. {
  9916. "$ref": "#/components/schemas/APIError"
  9917. }
  9918. ]
  9919. },
  9920. "parentID": {
  9921. "type": "string"
  9922. },
  9923. "modelID": {
  9924. "type": "string"
  9925. },
  9926. "providerID": {
  9927. "type": "string"
  9928. },
  9929. "mode": {
  9930. "type": "string"
  9931. },
  9932. "agent": {
  9933. "type": "string"
  9934. },
  9935. "path": {
  9936. "type": "object",
  9937. "properties": {
  9938. "cwd": {
  9939. "type": "string"
  9940. },
  9941. "root": {
  9942. "type": "string"
  9943. }
  9944. },
  9945. "required": ["cwd", "root"],
  9946. "additionalProperties": false
  9947. },
  9948. "summary": {
  9949. "type": "boolean"
  9950. },
  9951. "cost": {
  9952. "type": "number"
  9953. },
  9954. "tokens": {
  9955. "type": "object",
  9956. "properties": {
  9957. "total": {
  9958. "type": "integer",
  9959. "minimum": 0
  9960. },
  9961. "input": {
  9962. "type": "integer",
  9963. "minimum": 0
  9964. },
  9965. "output": {
  9966. "type": "integer",
  9967. "minimum": 0
  9968. },
  9969. "reasoning": {
  9970. "type": "integer",
  9971. "minimum": 0
  9972. },
  9973. "cache": {
  9974. "type": "object",
  9975. "properties": {
  9976. "read": {
  9977. "type": "integer",
  9978. "minimum": 0
  9979. },
  9980. "write": {
  9981. "type": "integer",
  9982. "minimum": 0
  9983. }
  9984. },
  9985. "required": ["read", "write"],
  9986. "additionalProperties": false
  9987. }
  9988. },
  9989. "required": ["input", "output", "reasoning", "cache"],
  9990. "additionalProperties": false
  9991. },
  9992. "structured": {},
  9993. "variant": {
  9994. "type": "string"
  9995. },
  9996. "finish": {
  9997. "type": "string"
  9998. }
  9999. },
  10000. "required": [
  10001. "id",
  10002. "sessionID",
  10003. "role",
  10004. "time",
  10005. "parentID",
  10006. "modelID",
  10007. "providerID",
  10008. "mode",
  10009. "agent",
  10010. "path",
  10011. "cost",
  10012. "tokens"
  10013. ],
  10014. "additionalProperties": false
  10015. },
  10016. "Message": {
  10017. "anyOf": [
  10018. {
  10019. "$ref": "#/components/schemas/UserMessage"
  10020. },
  10021. {
  10022. "$ref": "#/components/schemas/AssistantMessage"
  10023. }
  10024. ]
  10025. },
  10026. "TextPart": {
  10027. "type": "object",
  10028. "properties": {
  10029. "id": {
  10030. "type": "string"
  10031. },
  10032. "sessionID": {
  10033. "type": "string"
  10034. },
  10035. "messageID": {
  10036. "type": "string"
  10037. },
  10038. "type": {
  10039. "type": "string",
  10040. "enum": ["text"]
  10041. },
  10042. "text": {
  10043. "type": "string"
  10044. },
  10045. "synthetic": {
  10046. "type": "boolean"
  10047. },
  10048. "ignored": {
  10049. "type": "boolean"
  10050. },
  10051. "time": {
  10052. "type": "object",
  10053. "properties": {
  10054. "start": {
  10055. "type": "integer",
  10056. "minimum": 0
  10057. },
  10058. "end": {
  10059. "type": "integer",
  10060. "minimum": 0
  10061. }
  10062. },
  10063. "required": ["start"],
  10064. "additionalProperties": false
  10065. },
  10066. "metadata": {
  10067. "type": "object"
  10068. }
  10069. },
  10070. "required": ["id", "sessionID", "messageID", "type", "text"],
  10071. "additionalProperties": false
  10072. },
  10073. "SubtaskPart": {
  10074. "type": "object",
  10075. "properties": {
  10076. "id": {
  10077. "type": "string"
  10078. },
  10079. "sessionID": {
  10080. "type": "string"
  10081. },
  10082. "messageID": {
  10083. "type": "string"
  10084. },
  10085. "type": {
  10086. "type": "string",
  10087. "enum": ["subtask"]
  10088. },
  10089. "prompt": {
  10090. "type": "string"
  10091. },
  10092. "description": {
  10093. "type": "string"
  10094. },
  10095. "agent": {
  10096. "type": "string"
  10097. },
  10098. "model": {
  10099. "type": "object",
  10100. "properties": {
  10101. "providerID": {
  10102. "type": "string"
  10103. },
  10104. "modelID": {
  10105. "type": "string"
  10106. }
  10107. },
  10108. "required": ["providerID", "modelID"],
  10109. "additionalProperties": false
  10110. },
  10111. "command": {
  10112. "type": "string"
  10113. }
  10114. },
  10115. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  10116. "additionalProperties": false
  10117. },
  10118. "ReasoningPart": {
  10119. "type": "object",
  10120. "properties": {
  10121. "id": {
  10122. "type": "string"
  10123. },
  10124. "sessionID": {
  10125. "type": "string"
  10126. },
  10127. "messageID": {
  10128. "type": "string"
  10129. },
  10130. "type": {
  10131. "type": "string",
  10132. "enum": ["reasoning"]
  10133. },
  10134. "text": {
  10135. "type": "string"
  10136. },
  10137. "metadata": {
  10138. "type": "object"
  10139. },
  10140. "time": {
  10141. "type": "object",
  10142. "properties": {
  10143. "start": {
  10144. "type": "integer",
  10145. "minimum": 0
  10146. },
  10147. "end": {
  10148. "type": "integer",
  10149. "minimum": 0
  10150. }
  10151. },
  10152. "required": ["start"],
  10153. "additionalProperties": false
  10154. }
  10155. },
  10156. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  10157. "additionalProperties": false
  10158. },
  10159. "FilePartSourceText": {
  10160. "type": "object",
  10161. "properties": {
  10162. "value": {
  10163. "type": "string"
  10164. },
  10165. "start": {
  10166. "type": "integer",
  10167. "minimum": 0
  10168. },
  10169. "end": {
  10170. "type": "integer",
  10171. "minimum": 0
  10172. }
  10173. },
  10174. "required": ["value", "start", "end"],
  10175. "additionalProperties": false
  10176. },
  10177. "FileSource": {
  10178. "type": "object",
  10179. "properties": {
  10180. "text": {
  10181. "$ref": "#/components/schemas/FilePartSourceText"
  10182. },
  10183. "type": {
  10184. "type": "string",
  10185. "enum": ["file"]
  10186. },
  10187. "path": {
  10188. "type": "string"
  10189. }
  10190. },
  10191. "required": ["text", "type", "path"],
  10192. "additionalProperties": false
  10193. },
  10194. "Range": {
  10195. "type": "object",
  10196. "properties": {
  10197. "start": {
  10198. "type": "object",
  10199. "properties": {
  10200. "line": {
  10201. "type": "integer",
  10202. "minimum": 0
  10203. },
  10204. "character": {
  10205. "type": "integer",
  10206. "minimum": 0
  10207. }
  10208. },
  10209. "required": ["line", "character"],
  10210. "additionalProperties": false
  10211. },
  10212. "end": {
  10213. "type": "object",
  10214. "properties": {
  10215. "line": {
  10216. "type": "integer",
  10217. "minimum": 0
  10218. },
  10219. "character": {
  10220. "type": "integer",
  10221. "minimum": 0
  10222. }
  10223. },
  10224. "required": ["line", "character"],
  10225. "additionalProperties": false
  10226. }
  10227. },
  10228. "required": ["start", "end"],
  10229. "additionalProperties": false
  10230. },
  10231. "SymbolSource": {
  10232. "type": "object",
  10233. "properties": {
  10234. "text": {
  10235. "$ref": "#/components/schemas/FilePartSourceText"
  10236. },
  10237. "type": {
  10238. "type": "string",
  10239. "enum": ["symbol"]
  10240. },
  10241. "path": {
  10242. "type": "string"
  10243. },
  10244. "range": {
  10245. "$ref": "#/components/schemas/Range"
  10246. },
  10247. "name": {
  10248. "type": "string"
  10249. },
  10250. "kind": {
  10251. "type": "integer",
  10252. "minimum": 0
  10253. }
  10254. },
  10255. "required": ["text", "type", "path", "range", "name", "kind"],
  10256. "additionalProperties": false
  10257. },
  10258. "ResourceSource": {
  10259. "type": "object",
  10260. "properties": {
  10261. "text": {
  10262. "$ref": "#/components/schemas/FilePartSourceText"
  10263. },
  10264. "type": {
  10265. "type": "string",
  10266. "enum": ["resource"]
  10267. },
  10268. "clientName": {
  10269. "type": "string"
  10270. },
  10271. "uri": {
  10272. "type": "string"
  10273. }
  10274. },
  10275. "required": ["text", "type", "clientName", "uri"],
  10276. "additionalProperties": false
  10277. },
  10278. "FilePartSource": {
  10279. "anyOf": [
  10280. {
  10281. "$ref": "#/components/schemas/FileSource"
  10282. },
  10283. {
  10284. "$ref": "#/components/schemas/SymbolSource"
  10285. },
  10286. {
  10287. "$ref": "#/components/schemas/ResourceSource"
  10288. }
  10289. ]
  10290. },
  10291. "FilePart": {
  10292. "type": "object",
  10293. "properties": {
  10294. "id": {
  10295. "type": "string"
  10296. },
  10297. "sessionID": {
  10298. "type": "string"
  10299. },
  10300. "messageID": {
  10301. "type": "string"
  10302. },
  10303. "type": {
  10304. "type": "string",
  10305. "enum": ["file"]
  10306. },
  10307. "mime": {
  10308. "type": "string"
  10309. },
  10310. "filename": {
  10311. "type": "string"
  10312. },
  10313. "url": {
  10314. "type": "string"
  10315. },
  10316. "source": {
  10317. "$ref": "#/components/schemas/FilePartSource"
  10318. }
  10319. },
  10320. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  10321. "additionalProperties": false
  10322. },
  10323. "ToolStatePending": {
  10324. "type": "object",
  10325. "properties": {
  10326. "status": {
  10327. "type": "string",
  10328. "enum": ["pending"]
  10329. },
  10330. "input": {
  10331. "type": "object"
  10332. },
  10333. "raw": {
  10334. "type": "string"
  10335. }
  10336. },
  10337. "required": ["status", "input", "raw"],
  10338. "additionalProperties": false
  10339. },
  10340. "ToolStateRunning": {
  10341. "type": "object",
  10342. "properties": {
  10343. "status": {
  10344. "type": "string",
  10345. "enum": ["running"]
  10346. },
  10347. "input": {
  10348. "type": "object"
  10349. },
  10350. "title": {
  10351. "type": "string"
  10352. },
  10353. "metadata": {
  10354. "type": "object"
  10355. },
  10356. "time": {
  10357. "type": "object",
  10358. "properties": {
  10359. "start": {
  10360. "type": "integer",
  10361. "minimum": 0
  10362. }
  10363. },
  10364. "required": ["start"],
  10365. "additionalProperties": false
  10366. }
  10367. },
  10368. "required": ["status", "input", "time"],
  10369. "additionalProperties": false
  10370. },
  10371. "ToolStateCompleted": {
  10372. "type": "object",
  10373. "properties": {
  10374. "status": {
  10375. "type": "string",
  10376. "enum": ["completed"]
  10377. },
  10378. "input": {
  10379. "type": "object"
  10380. },
  10381. "output": {
  10382. "type": "string"
  10383. },
  10384. "title": {
  10385. "type": "string"
  10386. },
  10387. "metadata": {
  10388. "type": "object"
  10389. },
  10390. "time": {
  10391. "type": "object",
  10392. "properties": {
  10393. "start": {
  10394. "type": "integer",
  10395. "minimum": 0
  10396. },
  10397. "end": {
  10398. "type": "integer",
  10399. "minimum": 0
  10400. },
  10401. "compacted": {
  10402. "type": "integer",
  10403. "minimum": 0
  10404. }
  10405. },
  10406. "required": ["start", "end"],
  10407. "additionalProperties": false
  10408. },
  10409. "attachments": {
  10410. "type": "array",
  10411. "items": {
  10412. "$ref": "#/components/schemas/FilePart"
  10413. }
  10414. }
  10415. },
  10416. "required": ["status", "input", "output", "title", "metadata", "time"],
  10417. "additionalProperties": false
  10418. },
  10419. "ToolStateError": {
  10420. "type": "object",
  10421. "properties": {
  10422. "status": {
  10423. "type": "string",
  10424. "enum": ["error"]
  10425. },
  10426. "input": {
  10427. "type": "object"
  10428. },
  10429. "error": {
  10430. "type": "string"
  10431. },
  10432. "metadata": {
  10433. "type": "object"
  10434. },
  10435. "time": {
  10436. "type": "object",
  10437. "properties": {
  10438. "start": {
  10439. "type": "integer",
  10440. "minimum": 0
  10441. },
  10442. "end": {
  10443. "type": "integer",
  10444. "minimum": 0
  10445. }
  10446. },
  10447. "required": ["start", "end"],
  10448. "additionalProperties": false
  10449. }
  10450. },
  10451. "required": ["status", "input", "error", "time"],
  10452. "additionalProperties": false
  10453. },
  10454. "ToolState": {
  10455. "anyOf": [
  10456. {
  10457. "$ref": "#/components/schemas/ToolStatePending"
  10458. },
  10459. {
  10460. "$ref": "#/components/schemas/ToolStateRunning"
  10461. },
  10462. {
  10463. "$ref": "#/components/schemas/ToolStateCompleted"
  10464. },
  10465. {
  10466. "$ref": "#/components/schemas/ToolStateError"
  10467. }
  10468. ]
  10469. },
  10470. "ToolPart": {
  10471. "type": "object",
  10472. "properties": {
  10473. "id": {
  10474. "type": "string"
  10475. },
  10476. "sessionID": {
  10477. "type": "string"
  10478. },
  10479. "messageID": {
  10480. "type": "string"
  10481. },
  10482. "type": {
  10483. "type": "string",
  10484. "enum": ["tool"]
  10485. },
  10486. "callID": {
  10487. "type": "string"
  10488. },
  10489. "tool": {
  10490. "type": "string"
  10491. },
  10492. "state": {
  10493. "$ref": "#/components/schemas/ToolState"
  10494. },
  10495. "metadata": {
  10496. "type": "object"
  10497. }
  10498. },
  10499. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  10500. "additionalProperties": false
  10501. },
  10502. "StepStartPart": {
  10503. "type": "object",
  10504. "properties": {
  10505. "id": {
  10506. "type": "string"
  10507. },
  10508. "sessionID": {
  10509. "type": "string"
  10510. },
  10511. "messageID": {
  10512. "type": "string"
  10513. },
  10514. "type": {
  10515. "type": "string",
  10516. "enum": ["step-start"]
  10517. },
  10518. "snapshot": {
  10519. "type": "string"
  10520. }
  10521. },
  10522. "required": ["id", "sessionID", "messageID", "type"],
  10523. "additionalProperties": false
  10524. },
  10525. "StepFinishPart": {
  10526. "type": "object",
  10527. "properties": {
  10528. "id": {
  10529. "type": "string"
  10530. },
  10531. "sessionID": {
  10532. "type": "string"
  10533. },
  10534. "messageID": {
  10535. "type": "string"
  10536. },
  10537. "type": {
  10538. "type": "string",
  10539. "enum": ["step-finish"]
  10540. },
  10541. "reason": {
  10542. "type": "string"
  10543. },
  10544. "snapshot": {
  10545. "type": "string"
  10546. },
  10547. "cost": {
  10548. "type": "number"
  10549. },
  10550. "tokens": {
  10551. "type": "object",
  10552. "properties": {
  10553. "total": {
  10554. "type": "integer",
  10555. "minimum": 0
  10556. },
  10557. "input": {
  10558. "type": "integer",
  10559. "minimum": 0
  10560. },
  10561. "output": {
  10562. "type": "integer",
  10563. "minimum": 0
  10564. },
  10565. "reasoning": {
  10566. "type": "integer",
  10567. "minimum": 0
  10568. },
  10569. "cache": {
  10570. "type": "object",
  10571. "properties": {
  10572. "read": {
  10573. "type": "integer",
  10574. "minimum": 0
  10575. },
  10576. "write": {
  10577. "type": "integer",
  10578. "minimum": 0
  10579. }
  10580. },
  10581. "required": ["read", "write"],
  10582. "additionalProperties": false
  10583. }
  10584. },
  10585. "required": ["input", "output", "reasoning", "cache"],
  10586. "additionalProperties": false
  10587. }
  10588. },
  10589. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  10590. "additionalProperties": false
  10591. },
  10592. "SnapshotPart": {
  10593. "type": "object",
  10594. "properties": {
  10595. "id": {
  10596. "type": "string"
  10597. },
  10598. "sessionID": {
  10599. "type": "string"
  10600. },
  10601. "messageID": {
  10602. "type": "string"
  10603. },
  10604. "type": {
  10605. "type": "string",
  10606. "enum": ["snapshot"]
  10607. },
  10608. "snapshot": {
  10609. "type": "string"
  10610. }
  10611. },
  10612. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  10613. "additionalProperties": false
  10614. },
  10615. "PatchPart": {
  10616. "type": "object",
  10617. "properties": {
  10618. "id": {
  10619. "type": "string"
  10620. },
  10621. "sessionID": {
  10622. "type": "string"
  10623. },
  10624. "messageID": {
  10625. "type": "string"
  10626. },
  10627. "type": {
  10628. "type": "string",
  10629. "enum": ["patch"]
  10630. },
  10631. "hash": {
  10632. "type": "string"
  10633. },
  10634. "files": {
  10635. "type": "array",
  10636. "items": {
  10637. "type": "string"
  10638. }
  10639. }
  10640. },
  10641. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  10642. "additionalProperties": false
  10643. },
  10644. "AgentPart": {
  10645. "type": "object",
  10646. "properties": {
  10647. "id": {
  10648. "type": "string"
  10649. },
  10650. "sessionID": {
  10651. "type": "string"
  10652. },
  10653. "messageID": {
  10654. "type": "string"
  10655. },
  10656. "type": {
  10657. "type": "string",
  10658. "enum": ["agent"]
  10659. },
  10660. "name": {
  10661. "type": "string"
  10662. },
  10663. "source": {
  10664. "type": "object",
  10665. "properties": {
  10666. "value": {
  10667. "type": "string"
  10668. },
  10669. "start": {
  10670. "type": "integer",
  10671. "minimum": 0
  10672. },
  10673. "end": {
  10674. "type": "integer",
  10675. "minimum": 0
  10676. }
  10677. },
  10678. "required": ["value", "start", "end"],
  10679. "additionalProperties": false
  10680. }
  10681. },
  10682. "required": ["id", "sessionID", "messageID", "type", "name"],
  10683. "additionalProperties": false
  10684. },
  10685. "RetryPart": {
  10686. "type": "object",
  10687. "properties": {
  10688. "id": {
  10689. "type": "string"
  10690. },
  10691. "sessionID": {
  10692. "type": "string"
  10693. },
  10694. "messageID": {
  10695. "type": "string"
  10696. },
  10697. "type": {
  10698. "type": "string",
  10699. "enum": ["retry"]
  10700. },
  10701. "attempt": {
  10702. "type": "integer",
  10703. "minimum": 0
  10704. },
  10705. "error": {
  10706. "$ref": "#/components/schemas/APIError"
  10707. },
  10708. "time": {
  10709. "type": "object",
  10710. "properties": {
  10711. "created": {
  10712. "type": "integer",
  10713. "minimum": 0
  10714. }
  10715. },
  10716. "required": ["created"],
  10717. "additionalProperties": false
  10718. }
  10719. },
  10720. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  10721. "additionalProperties": false
  10722. },
  10723. "CompactionPart": {
  10724. "type": "object",
  10725. "properties": {
  10726. "id": {
  10727. "type": "string"
  10728. },
  10729. "sessionID": {
  10730. "type": "string"
  10731. },
  10732. "messageID": {
  10733. "type": "string"
  10734. },
  10735. "type": {
  10736. "type": "string",
  10737. "enum": ["compaction"]
  10738. },
  10739. "auto": {
  10740. "type": "boolean"
  10741. },
  10742. "overflow": {
  10743. "type": "boolean"
  10744. },
  10745. "tail_start_id": {
  10746. "type": "string"
  10747. }
  10748. },
  10749. "required": ["id", "sessionID", "messageID", "type", "auto"],
  10750. "additionalProperties": false
  10751. },
  10752. "Part": {
  10753. "anyOf": [
  10754. {
  10755. "$ref": "#/components/schemas/TextPart"
  10756. },
  10757. {
  10758. "$ref": "#/components/schemas/SubtaskPart"
  10759. },
  10760. {
  10761. "$ref": "#/components/schemas/ReasoningPart"
  10762. },
  10763. {
  10764. "$ref": "#/components/schemas/FilePart"
  10765. },
  10766. {
  10767. "$ref": "#/components/schemas/ToolPart"
  10768. },
  10769. {
  10770. "$ref": "#/components/schemas/StepStartPart"
  10771. },
  10772. {
  10773. "$ref": "#/components/schemas/StepFinishPart"
  10774. },
  10775. {
  10776. "$ref": "#/components/schemas/SnapshotPart"
  10777. },
  10778. {
  10779. "$ref": "#/components/schemas/PatchPart"
  10780. },
  10781. {
  10782. "$ref": "#/components/schemas/AgentPart"
  10783. },
  10784. {
  10785. "$ref": "#/components/schemas/RetryPart"
  10786. },
  10787. {
  10788. "$ref": "#/components/schemas/CompactionPart"
  10789. }
  10790. ]
  10791. },
  10792. "PermissionAction": {
  10793. "type": "string",
  10794. "enum": ["allow", "deny", "ask"]
  10795. },
  10796. "PermissionRule": {
  10797. "type": "object",
  10798. "properties": {
  10799. "permission": {
  10800. "type": "string"
  10801. },
  10802. "pattern": {
  10803. "type": "string"
  10804. },
  10805. "action": {
  10806. "$ref": "#/components/schemas/PermissionAction"
  10807. }
  10808. },
  10809. "required": ["permission", "pattern", "action"],
  10810. "additionalProperties": false
  10811. },
  10812. "PermissionRuleset": {
  10813. "type": "array",
  10814. "items": {
  10815. "$ref": "#/components/schemas/PermissionRule"
  10816. }
  10817. },
  10818. "Session": {
  10819. "type": "object",
  10820. "properties": {
  10821. "id": {
  10822. "type": "string"
  10823. },
  10824. "slug": {
  10825. "type": "string"
  10826. },
  10827. "projectID": {
  10828. "type": "string"
  10829. },
  10830. "workspaceID": {
  10831. "type": "string"
  10832. },
  10833. "directory": {
  10834. "type": "string"
  10835. },
  10836. "path": {
  10837. "type": "string"
  10838. },
  10839. "parentID": {
  10840. "type": "string"
  10841. },
  10842. "summary": {
  10843. "type": "object",
  10844. "properties": {
  10845. "additions": {
  10846. "type": "integer",
  10847. "minimum": 0
  10848. },
  10849. "deletions": {
  10850. "type": "integer",
  10851. "minimum": 0
  10852. },
  10853. "files": {
  10854. "type": "integer",
  10855. "minimum": 0
  10856. },
  10857. "diffs": {
  10858. "type": "array",
  10859. "items": {
  10860. "$ref": "#/components/schemas/SnapshotFileDiff"
  10861. }
  10862. }
  10863. },
  10864. "required": ["additions", "deletions", "files"],
  10865. "additionalProperties": false
  10866. },
  10867. "share": {
  10868. "type": "object",
  10869. "properties": {
  10870. "url": {
  10871. "type": "string"
  10872. }
  10873. },
  10874. "required": ["url"],
  10875. "additionalProperties": false
  10876. },
  10877. "title": {
  10878. "type": "string"
  10879. },
  10880. "agent": {
  10881. "type": "string"
  10882. },
  10883. "model": {
  10884. "type": "object",
  10885. "properties": {
  10886. "id": {
  10887. "type": "string"
  10888. },
  10889. "providerID": {
  10890. "type": "string"
  10891. },
  10892. "variant": {
  10893. "type": "string"
  10894. }
  10895. },
  10896. "required": ["id", "providerID"],
  10897. "additionalProperties": false
  10898. },
  10899. "version": {
  10900. "type": "string"
  10901. },
  10902. "time": {
  10903. "type": "object",
  10904. "properties": {
  10905. "created": {
  10906. "type": "integer",
  10907. "minimum": 0
  10908. },
  10909. "updated": {
  10910. "type": "integer",
  10911. "minimum": 0
  10912. },
  10913. "compacting": {
  10914. "type": "integer",
  10915. "minimum": 0
  10916. },
  10917. "archived": {
  10918. "type": "number"
  10919. }
  10920. },
  10921. "required": ["created", "updated"],
  10922. "additionalProperties": false
  10923. },
  10924. "permission": {
  10925. "$ref": "#/components/schemas/PermissionRuleset"
  10926. },
  10927. "revert": {
  10928. "type": "object",
  10929. "properties": {
  10930. "messageID": {
  10931. "type": "string"
  10932. },
  10933. "partID": {
  10934. "type": "string"
  10935. },
  10936. "snapshot": {
  10937. "type": "string"
  10938. },
  10939. "diff": {
  10940. "type": "string"
  10941. }
  10942. },
  10943. "required": ["messageID"],
  10944. "additionalProperties": false
  10945. }
  10946. },
  10947. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  10948. "additionalProperties": false
  10949. },
  10950. "Prompt": {
  10951. "type": "object",
  10952. "properties": {
  10953. "text": {
  10954. "type": "string"
  10955. },
  10956. "files": {
  10957. "type": "array",
  10958. "items": {
  10959. "$ref": "#/components/schemas/PromptFileAttachment"
  10960. }
  10961. },
  10962. "agents": {
  10963. "type": "array",
  10964. "items": {
  10965. "$ref": "#/components/schemas/PromptAgentAttachment"
  10966. }
  10967. }
  10968. },
  10969. "required": ["text"],
  10970. "additionalProperties": false
  10971. },
  10972. "GlobalEvent": {
  10973. "type": "object",
  10974. "properties": {
  10975. "directory": {
  10976. "type": "string"
  10977. },
  10978. "project": {
  10979. "type": "string"
  10980. },
  10981. "workspace": {
  10982. "type": "string"
  10983. },
  10984. "payload": {
  10985. "anyOf": [
  10986. {
  10987. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  10988. },
  10989. {
  10990. "$ref": "#/components/schemas/EventFileEdited"
  10991. },
  10992. {
  10993. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  10994. },
  10995. {
  10996. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  10997. },
  10998. {
  10999. "$ref": "#/components/schemas/EventLspUpdated"
  11000. },
  11001. {
  11002. "$ref": "#/components/schemas/EventMessagePartDelta"
  11003. },
  11004. {
  11005. "$ref": "#/components/schemas/EventPermissionAsked"
  11006. },
  11007. {
  11008. "$ref": "#/components/schemas/EventPermissionReplied"
  11009. },
  11010. {
  11011. "$ref": "#/components/schemas/EventSessionDiff"
  11012. },
  11013. {
  11014. "$ref": "#/components/schemas/EventSessionError"
  11015. },
  11016. {
  11017. "$ref": "#/components/schemas/EventInstallationUpdated"
  11018. },
  11019. {
  11020. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  11021. },
  11022. {
  11023. "$ref": "#/components/schemas/EventQuestionAsked"
  11024. },
  11025. {
  11026. "$ref": "#/components/schemas/EventQuestionReplied"
  11027. },
  11028. {
  11029. "$ref": "#/components/schemas/EventQuestionRejected"
  11030. },
  11031. {
  11032. "$ref": "#/components/schemas/EventTodoUpdated"
  11033. },
  11034. {
  11035. "$ref": "#/components/schemas/EventSessionStatus"
  11036. },
  11037. {
  11038. "$ref": "#/components/schemas/EventSessionIdle"
  11039. },
  11040. {
  11041. "$ref": "#/components/schemas/EventSessionCompacted"
  11042. },
  11043. {
  11044. "$ref": "#/components/schemas/Event.tui.prompt.append"
  11045. },
  11046. {
  11047. "$ref": "#/components/schemas/Event.tui.command.execute"
  11048. },
  11049. {
  11050. "$ref": "#/components/schemas/Event.tui.toast.show"
  11051. },
  11052. {
  11053. "$ref": "#/components/schemas/Event.tui.session.select"
  11054. },
  11055. {
  11056. "$ref": "#/components/schemas/EventMcpToolsChanged"
  11057. },
  11058. {
  11059. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  11060. },
  11061. {
  11062. "$ref": "#/components/schemas/EventCommandExecuted"
  11063. },
  11064. {
  11065. "$ref": "#/components/schemas/EventProjectUpdated"
  11066. },
  11067. {
  11068. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  11069. },
  11070. {
  11071. "$ref": "#/components/schemas/EventWorkspaceReady"
  11072. },
  11073. {
  11074. "$ref": "#/components/schemas/EventWorkspaceFailed"
  11075. },
  11076. {
  11077. "$ref": "#/components/schemas/EventWorkspaceStatus"
  11078. },
  11079. {
  11080. "$ref": "#/components/schemas/EventWorktreeReady"
  11081. },
  11082. {
  11083. "$ref": "#/components/schemas/EventWorktreeFailed"
  11084. },
  11085. {
  11086. "$ref": "#/components/schemas/EventPtyCreated"
  11087. },
  11088. {
  11089. "$ref": "#/components/schemas/EventPtyUpdated"
  11090. },
  11091. {
  11092. "$ref": "#/components/schemas/EventPtyExited"
  11093. },
  11094. {
  11095. "$ref": "#/components/schemas/EventPtyDeleted"
  11096. },
  11097. {
  11098. "$ref": "#/components/schemas/EventMessageUpdated"
  11099. },
  11100. {
  11101. "$ref": "#/components/schemas/EventMessageRemoved"
  11102. },
  11103. {
  11104. "$ref": "#/components/schemas/EventMessagePartUpdated"
  11105. },
  11106. {
  11107. "$ref": "#/components/schemas/EventMessagePartRemoved"
  11108. },
  11109. {
  11110. "$ref": "#/components/schemas/EventSessionCreated"
  11111. },
  11112. {
  11113. "$ref": "#/components/schemas/EventSessionUpdated"
  11114. },
  11115. {
  11116. "$ref": "#/components/schemas/EventSessionDeleted"
  11117. },
  11118. {
  11119. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  11120. },
  11121. {
  11122. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  11123. },
  11124. {
  11125. "$ref": "#/components/schemas/EventSessionNextPrompted"
  11126. },
  11127. {
  11128. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  11129. },
  11130. {
  11131. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  11132. },
  11133. {
  11134. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  11135. },
  11136. {
  11137. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  11138. },
  11139. {
  11140. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  11141. },
  11142. {
  11143. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  11144. },
  11145. {
  11146. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  11147. },
  11148. {
  11149. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  11150. },
  11151. {
  11152. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  11153. },
  11154. {
  11155. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  11156. },
  11157. {
  11158. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  11159. },
  11160. {
  11161. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  11162. },
  11163. {
  11164. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  11165. },
  11166. {
  11167. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  11168. },
  11169. {
  11170. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  11171. },
  11172. {
  11173. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  11174. },
  11175. {
  11176. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  11177. },
  11178. {
  11179. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  11180. },
  11181. {
  11182. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  11183. },
  11184. {
  11185. "$ref": "#/components/schemas/EventSessionNextRetried"
  11186. },
  11187. {
  11188. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  11189. },
  11190. {
  11191. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  11192. },
  11193. {
  11194. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  11195. },
  11196. {
  11197. "$ref": "#/components/schemas/EventServerConnected"
  11198. },
  11199. {
  11200. "$ref": "#/components/schemas/EventGlobalDisposed"
  11201. },
  11202. {
  11203. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  11204. },
  11205. {
  11206. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  11207. },
  11208. {
  11209. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  11210. },
  11211. {
  11212. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  11213. },
  11214. {
  11215. "$ref": "#/components/schemas/SyncEventSessionCreated"
  11216. },
  11217. {
  11218. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  11219. },
  11220. {
  11221. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  11222. },
  11223. {
  11224. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  11225. },
  11226. {
  11227. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  11228. },
  11229. {
  11230. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  11231. },
  11232. {
  11233. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  11234. },
  11235. {
  11236. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  11237. },
  11238. {
  11239. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  11240. },
  11241. {
  11242. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  11243. },
  11244. {
  11245. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  11246. },
  11247. {
  11248. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  11249. },
  11250. {
  11251. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  11252. },
  11253. {
  11254. "$ref": "#/components/schemas/SyncEventSessionNextTextDelta"
  11255. },
  11256. {
  11257. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  11258. },
  11259. {
  11260. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  11261. },
  11262. {
  11263. "$ref": "#/components/schemas/SyncEventSessionNextReasoningDelta"
  11264. },
  11265. {
  11266. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  11267. },
  11268. {
  11269. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  11270. },
  11271. {
  11272. "$ref": "#/components/schemas/SyncEventSessionNextToolInputDelta"
  11273. },
  11274. {
  11275. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  11276. },
  11277. {
  11278. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  11279. },
  11280. {
  11281. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  11282. },
  11283. {
  11284. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  11285. },
  11286. {
  11287. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  11288. },
  11289. {
  11290. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  11291. },
  11292. {
  11293. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  11294. },
  11295. {
  11296. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  11297. },
  11298. {
  11299. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  11300. }
  11301. ]
  11302. }
  11303. },
  11304. "required": ["directory", "payload"],
  11305. "additionalProperties": false
  11306. },
  11307. "LogLevel": {
  11308. "type": "string",
  11309. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  11310. "description": "Log level"
  11311. },
  11312. "ServerConfig": {
  11313. "type": "object",
  11314. "properties": {
  11315. "port": {
  11316. "type": "integer",
  11317. "exclusiveMinimum": 0
  11318. },
  11319. "hostname": {
  11320. "type": "string"
  11321. },
  11322. "mdns": {
  11323. "type": "boolean"
  11324. },
  11325. "mdnsDomain": {
  11326. "type": "string"
  11327. },
  11328. "cors": {
  11329. "type": "array",
  11330. "items": {
  11331. "type": "string"
  11332. }
  11333. }
  11334. },
  11335. "additionalProperties": false,
  11336. "description": "Server configuration for opencode serve and web commands"
  11337. },
  11338. "ReferenceConfigEntry": {
  11339. "anyOf": [
  11340. {
  11341. "type": "string"
  11342. },
  11343. {
  11344. "type": "object",
  11345. "properties": {
  11346. "repository": {
  11347. "type": "string",
  11348. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  11349. },
  11350. "branch": {
  11351. "type": "string"
  11352. }
  11353. },
  11354. "required": ["repository"],
  11355. "additionalProperties": false
  11356. },
  11357. {
  11358. "type": "object",
  11359. "properties": {
  11360. "path": {
  11361. "type": "string",
  11362. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  11363. }
  11364. },
  11365. "required": ["path"],
  11366. "additionalProperties": false
  11367. }
  11368. ]
  11369. },
  11370. "ReferenceConfig": {
  11371. "type": "object",
  11372. "additionalProperties": {
  11373. "$ref": "#/components/schemas/ReferenceConfigEntry"
  11374. }
  11375. },
  11376. "PermissionActionConfig": {
  11377. "type": "string",
  11378. "enum": ["ask", "allow", "deny"]
  11379. },
  11380. "PermissionObjectConfig": {
  11381. "type": "object",
  11382. "additionalProperties": {
  11383. "$ref": "#/components/schemas/PermissionActionConfig"
  11384. }
  11385. },
  11386. "PermissionRuleConfig": {
  11387. "anyOf": [
  11388. {
  11389. "$ref": "#/components/schemas/PermissionActionConfig"
  11390. },
  11391. {
  11392. "$ref": "#/components/schemas/PermissionObjectConfig"
  11393. }
  11394. ]
  11395. },
  11396. "PermissionConfig": {
  11397. "anyOf": [
  11398. {
  11399. "$ref": "#/components/schemas/PermissionActionConfig"
  11400. },
  11401. {
  11402. "type": "object",
  11403. "properties": {
  11404. "read": {
  11405. "$ref": "#/components/schemas/PermissionRuleConfig"
  11406. },
  11407. "edit": {
  11408. "$ref": "#/components/schemas/PermissionRuleConfig"
  11409. },
  11410. "glob": {
  11411. "$ref": "#/components/schemas/PermissionRuleConfig"
  11412. },
  11413. "grep": {
  11414. "$ref": "#/components/schemas/PermissionRuleConfig"
  11415. },
  11416. "list": {
  11417. "$ref": "#/components/schemas/PermissionRuleConfig"
  11418. },
  11419. "bash": {
  11420. "$ref": "#/components/schemas/PermissionRuleConfig"
  11421. },
  11422. "task": {
  11423. "$ref": "#/components/schemas/PermissionRuleConfig"
  11424. },
  11425. "external_directory": {
  11426. "$ref": "#/components/schemas/PermissionRuleConfig"
  11427. },
  11428. "todowrite": {
  11429. "$ref": "#/components/schemas/PermissionActionConfig"
  11430. },
  11431. "question": {
  11432. "$ref": "#/components/schemas/PermissionActionConfig"
  11433. },
  11434. "webfetch": {
  11435. "$ref": "#/components/schemas/PermissionActionConfig"
  11436. },
  11437. "websearch": {
  11438. "$ref": "#/components/schemas/PermissionActionConfig"
  11439. },
  11440. "codesearch": {
  11441. "$ref": "#/components/schemas/PermissionActionConfig"
  11442. },
  11443. "repo_clone": {
  11444. "$ref": "#/components/schemas/PermissionRuleConfig"
  11445. },
  11446. "repo_overview": {
  11447. "$ref": "#/components/schemas/PermissionRuleConfig"
  11448. },
  11449. "lsp": {
  11450. "$ref": "#/components/schemas/PermissionRuleConfig"
  11451. },
  11452. "doom_loop": {
  11453. "$ref": "#/components/schemas/PermissionActionConfig"
  11454. },
  11455. "skill": {
  11456. "$ref": "#/components/schemas/PermissionRuleConfig"
  11457. }
  11458. },
  11459. "additionalProperties": {
  11460. "$ref": "#/components/schemas/PermissionRuleConfig"
  11461. }
  11462. }
  11463. ]
  11464. },
  11465. "AgentConfig": {
  11466. "type": "object",
  11467. "properties": {
  11468. "model": {
  11469. "type": "string"
  11470. },
  11471. "variant": {
  11472. "type": "string"
  11473. },
  11474. "temperature": {
  11475. "type": "number"
  11476. },
  11477. "top_p": {
  11478. "type": "number"
  11479. },
  11480. "prompt": {
  11481. "type": "string"
  11482. },
  11483. "tools": {
  11484. "type": "object",
  11485. "additionalProperties": {
  11486. "type": "boolean"
  11487. }
  11488. },
  11489. "disable": {
  11490. "type": "boolean"
  11491. },
  11492. "description": {
  11493. "type": "string"
  11494. },
  11495. "mode": {
  11496. "type": "string",
  11497. "enum": ["subagent", "primary", "all"]
  11498. },
  11499. "hidden": {
  11500. "type": "boolean"
  11501. },
  11502. "options": {
  11503. "type": "object"
  11504. },
  11505. "color": {
  11506. "anyOf": [
  11507. {
  11508. "type": "string",
  11509. "pattern": "^#[0-9a-fA-F]{6}$"
  11510. },
  11511. {
  11512. "type": "string",
  11513. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  11514. }
  11515. ],
  11516. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  11517. },
  11518. "steps": {
  11519. "type": "integer",
  11520. "exclusiveMinimum": 0
  11521. },
  11522. "maxSteps": {
  11523. "type": "integer",
  11524. "exclusiveMinimum": 0
  11525. },
  11526. "permission": {
  11527. "$ref": "#/components/schemas/PermissionConfig"
  11528. }
  11529. },
  11530. "additionalProperties": {}
  11531. },
  11532. "ProviderConfig": {
  11533. "type": "object",
  11534. "properties": {
  11535. "api": {
  11536. "type": "string"
  11537. },
  11538. "name": {
  11539. "type": "string"
  11540. },
  11541. "env": {
  11542. "type": "array",
  11543. "items": {
  11544. "type": "string"
  11545. }
  11546. },
  11547. "id": {
  11548. "type": "string"
  11549. },
  11550. "npm": {
  11551. "type": "string"
  11552. },
  11553. "whitelist": {
  11554. "type": "array",
  11555. "items": {
  11556. "type": "string"
  11557. }
  11558. },
  11559. "blacklist": {
  11560. "type": "array",
  11561. "items": {
  11562. "type": "string"
  11563. }
  11564. },
  11565. "options": {
  11566. "type": "object",
  11567. "properties": {
  11568. "apiKey": {
  11569. "type": "string"
  11570. },
  11571. "baseURL": {
  11572. "type": "string"
  11573. },
  11574. "enterpriseUrl": {
  11575. "type": "string"
  11576. },
  11577. "setCacheKey": {
  11578. "type": "boolean"
  11579. },
  11580. "timeout": {
  11581. "anyOf": [
  11582. {
  11583. "type": "integer",
  11584. "exclusiveMinimum": 0
  11585. },
  11586. {
  11587. "type": "boolean",
  11588. "enum": [false]
  11589. }
  11590. ],
  11591. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout."
  11592. },
  11593. "chunkTimeout": {
  11594. "type": "integer",
  11595. "exclusiveMinimum": 0
  11596. }
  11597. },
  11598. "additionalProperties": {}
  11599. },
  11600. "models": {
  11601. "type": "object",
  11602. "additionalProperties": {
  11603. "type": "object",
  11604. "properties": {
  11605. "id": {
  11606. "type": "string"
  11607. },
  11608. "name": {
  11609. "type": "string"
  11610. },
  11611. "family": {
  11612. "type": "string"
  11613. },
  11614. "release_date": {
  11615. "type": "string"
  11616. },
  11617. "attachment": {
  11618. "type": "boolean"
  11619. },
  11620. "reasoning": {
  11621. "type": "boolean"
  11622. },
  11623. "temperature": {
  11624. "type": "boolean"
  11625. },
  11626. "tool_call": {
  11627. "type": "boolean"
  11628. },
  11629. "interleaved": {
  11630. "anyOf": [
  11631. {
  11632. "type": "boolean",
  11633. "enum": [true]
  11634. },
  11635. {
  11636. "type": "object",
  11637. "properties": {
  11638. "field": {
  11639. "type": "string",
  11640. "enum": ["reasoning_content", "reasoning_details"]
  11641. }
  11642. },
  11643. "required": ["field"],
  11644. "additionalProperties": false
  11645. }
  11646. ]
  11647. },
  11648. "cost": {
  11649. "type": "object",
  11650. "properties": {
  11651. "input": {
  11652. "type": "number"
  11653. },
  11654. "output": {
  11655. "type": "number"
  11656. },
  11657. "cache_read": {
  11658. "type": "number"
  11659. },
  11660. "cache_write": {
  11661. "type": "number"
  11662. },
  11663. "context_over_200k": {
  11664. "type": "object",
  11665. "properties": {
  11666. "input": {
  11667. "type": "number"
  11668. },
  11669. "output": {
  11670. "type": "number"
  11671. },
  11672. "cache_read": {
  11673. "type": "number"
  11674. },
  11675. "cache_write": {
  11676. "type": "number"
  11677. }
  11678. },
  11679. "required": ["input", "output"],
  11680. "additionalProperties": false
  11681. }
  11682. },
  11683. "required": ["input", "output"],
  11684. "additionalProperties": false
  11685. },
  11686. "limit": {
  11687. "type": "object",
  11688. "properties": {
  11689. "context": {
  11690. "type": "number"
  11691. },
  11692. "input": {
  11693. "type": "number"
  11694. },
  11695. "output": {
  11696. "type": "number"
  11697. }
  11698. },
  11699. "required": ["context", "output"],
  11700. "additionalProperties": false
  11701. },
  11702. "modalities": {
  11703. "type": "object",
  11704. "properties": {
  11705. "input": {
  11706. "type": "array",
  11707. "items": {
  11708. "type": "string",
  11709. "enum": ["text", "audio", "image", "video", "pdf"]
  11710. }
  11711. },
  11712. "output": {
  11713. "type": "array",
  11714. "items": {
  11715. "type": "string",
  11716. "enum": ["text", "audio", "image", "video", "pdf"]
  11717. }
  11718. }
  11719. },
  11720. "required": ["input", "output"],
  11721. "additionalProperties": false
  11722. },
  11723. "experimental": {
  11724. "type": "boolean"
  11725. },
  11726. "status": {
  11727. "type": "string",
  11728. "enum": ["alpha", "beta", "deprecated", "active"]
  11729. },
  11730. "provider": {
  11731. "type": "object",
  11732. "properties": {
  11733. "npm": {
  11734. "type": "string"
  11735. },
  11736. "api": {
  11737. "type": "string"
  11738. }
  11739. },
  11740. "additionalProperties": false
  11741. },
  11742. "options": {
  11743. "type": "object"
  11744. },
  11745. "headers": {
  11746. "type": "object",
  11747. "additionalProperties": {
  11748. "type": "string"
  11749. }
  11750. },
  11751. "variants": {
  11752. "type": "object",
  11753. "additionalProperties": {
  11754. "type": "object",
  11755. "properties": {
  11756. "disabled": {
  11757. "type": "boolean"
  11758. }
  11759. },
  11760. "additionalProperties": {}
  11761. },
  11762. "description": "Variant-specific configuration"
  11763. }
  11764. },
  11765. "additionalProperties": false
  11766. }
  11767. }
  11768. },
  11769. "additionalProperties": false
  11770. },
  11771. "McpLocalConfig": {
  11772. "type": "object",
  11773. "properties": {
  11774. "type": {
  11775. "type": "string",
  11776. "enum": ["local"],
  11777. "description": "Type of MCP server connection"
  11778. },
  11779. "command": {
  11780. "type": "array",
  11781. "items": {
  11782. "type": "string"
  11783. },
  11784. "description": "Command and arguments to run the MCP server"
  11785. },
  11786. "environment": {
  11787. "type": "object",
  11788. "additionalProperties": {
  11789. "type": "string"
  11790. }
  11791. },
  11792. "enabled": {
  11793. "type": "boolean"
  11794. },
  11795. "timeout": {
  11796. "type": "integer",
  11797. "exclusiveMinimum": 0
  11798. }
  11799. },
  11800. "required": ["type", "command"],
  11801. "additionalProperties": false
  11802. },
  11803. "McpOAuthConfig": {
  11804. "type": "object",
  11805. "properties": {
  11806. "clientId": {
  11807. "type": "string"
  11808. },
  11809. "clientSecret": {
  11810. "type": "string"
  11811. },
  11812. "scope": {
  11813. "type": "string"
  11814. },
  11815. "redirectUri": {
  11816. "type": "string"
  11817. }
  11818. },
  11819. "additionalProperties": false
  11820. },
  11821. "McpRemoteConfig": {
  11822. "type": "object",
  11823. "properties": {
  11824. "type": {
  11825. "type": "string",
  11826. "enum": ["remote"],
  11827. "description": "Type of MCP server connection"
  11828. },
  11829. "url": {
  11830. "type": "string",
  11831. "description": "URL of the remote MCP server"
  11832. },
  11833. "enabled": {
  11834. "type": "boolean"
  11835. },
  11836. "headers": {
  11837. "type": "object",
  11838. "additionalProperties": {
  11839. "type": "string"
  11840. }
  11841. },
  11842. "oauth": {
  11843. "anyOf": [
  11844. {
  11845. "$ref": "#/components/schemas/McpOAuthConfig"
  11846. },
  11847. {
  11848. "type": "boolean",
  11849. "enum": [false]
  11850. }
  11851. ],
  11852. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  11853. },
  11854. "timeout": {
  11855. "type": "integer",
  11856. "exclusiveMinimum": 0
  11857. }
  11858. },
  11859. "required": ["type", "url"],
  11860. "additionalProperties": false
  11861. },
  11862. "LayoutConfig": {
  11863. "type": "string",
  11864. "enum": ["auto", "stretch"],
  11865. "description": "@deprecated Always uses stretch layout."
  11866. },
  11867. "Config": {
  11868. "type": "object",
  11869. "properties": {
  11870. "$schema": {
  11871. "type": "string"
  11872. },
  11873. "shell": {
  11874. "type": "string"
  11875. },
  11876. "logLevel": {
  11877. "$ref": "#/components/schemas/LogLevel"
  11878. },
  11879. "server": {
  11880. "$ref": "#/components/schemas/ServerConfig"
  11881. },
  11882. "command": {
  11883. "type": "object",
  11884. "additionalProperties": {
  11885. "type": "object",
  11886. "properties": {
  11887. "template": {
  11888. "type": "string"
  11889. },
  11890. "description": {
  11891. "type": "string"
  11892. },
  11893. "agent": {
  11894. "type": "string"
  11895. },
  11896. "model": {
  11897. "type": "string"
  11898. },
  11899. "subtask": {
  11900. "type": "boolean"
  11901. }
  11902. },
  11903. "required": ["template"],
  11904. "additionalProperties": false
  11905. }
  11906. },
  11907. "skills": {
  11908. "type": "object",
  11909. "properties": {
  11910. "paths": {
  11911. "type": "array",
  11912. "items": {
  11913. "type": "string"
  11914. }
  11915. },
  11916. "urls": {
  11917. "type": "array",
  11918. "items": {
  11919. "type": "string"
  11920. }
  11921. }
  11922. },
  11923. "additionalProperties": false
  11924. },
  11925. "reference": {
  11926. "$ref": "#/components/schemas/ReferenceConfig"
  11927. },
  11928. "watcher": {
  11929. "type": "object",
  11930. "properties": {
  11931. "ignore": {
  11932. "type": "array",
  11933. "items": {
  11934. "type": "string"
  11935. }
  11936. }
  11937. },
  11938. "additionalProperties": false
  11939. },
  11940. "snapshot": {
  11941. "type": "boolean"
  11942. },
  11943. "plugin": {
  11944. "type": "array",
  11945. "items": {
  11946. "anyOf": [
  11947. {
  11948. "type": "string"
  11949. },
  11950. {
  11951. "type": "array",
  11952. "prefixItems": [
  11953. {
  11954. "type": "string"
  11955. },
  11956. {
  11957. "type": "object"
  11958. }
  11959. ],
  11960. "maxItems": 2,
  11961. "minItems": 2
  11962. }
  11963. ]
  11964. }
  11965. },
  11966. "share": {
  11967. "type": "string",
  11968. "enum": ["manual", "auto", "disabled"]
  11969. },
  11970. "autoshare": {
  11971. "type": "boolean"
  11972. },
  11973. "autoupdate": {
  11974. "anyOf": [
  11975. {
  11976. "type": "boolean"
  11977. },
  11978. {
  11979. "type": "string",
  11980. "enum": ["notify"]
  11981. }
  11982. ],
  11983. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  11984. },
  11985. "disabled_providers": {
  11986. "type": "array",
  11987. "items": {
  11988. "type": "string"
  11989. }
  11990. },
  11991. "enabled_providers": {
  11992. "type": "array",
  11993. "items": {
  11994. "type": "string"
  11995. }
  11996. },
  11997. "model": {
  11998. "type": "string"
  11999. },
  12000. "small_model": {
  12001. "type": "string"
  12002. },
  12003. "default_agent": {
  12004. "type": "string"
  12005. },
  12006. "username": {
  12007. "type": "string"
  12008. },
  12009. "mode": {
  12010. "type": "object",
  12011. "properties": {
  12012. "build": {
  12013. "$ref": "#/components/schemas/AgentConfig"
  12014. },
  12015. "plan": {
  12016. "$ref": "#/components/schemas/AgentConfig"
  12017. }
  12018. },
  12019. "additionalProperties": {
  12020. "$ref": "#/components/schemas/AgentConfig"
  12021. }
  12022. },
  12023. "agent": {
  12024. "type": "object",
  12025. "properties": {
  12026. "plan": {
  12027. "$ref": "#/components/schemas/AgentConfig"
  12028. },
  12029. "build": {
  12030. "$ref": "#/components/schemas/AgentConfig"
  12031. },
  12032. "general": {
  12033. "$ref": "#/components/schemas/AgentConfig"
  12034. },
  12035. "explore": {
  12036. "$ref": "#/components/schemas/AgentConfig"
  12037. },
  12038. "scout": {
  12039. "$ref": "#/components/schemas/AgentConfig"
  12040. },
  12041. "title": {
  12042. "$ref": "#/components/schemas/AgentConfig"
  12043. },
  12044. "summary": {
  12045. "$ref": "#/components/schemas/AgentConfig"
  12046. },
  12047. "compaction": {
  12048. "$ref": "#/components/schemas/AgentConfig"
  12049. }
  12050. },
  12051. "additionalProperties": {
  12052. "$ref": "#/components/schemas/AgentConfig"
  12053. }
  12054. },
  12055. "provider": {
  12056. "type": "object",
  12057. "additionalProperties": {
  12058. "$ref": "#/components/schemas/ProviderConfig"
  12059. }
  12060. },
  12061. "mcp": {
  12062. "type": "object",
  12063. "additionalProperties": {
  12064. "anyOf": [
  12065. {
  12066. "$ref": "#/components/schemas/McpLocalConfig"
  12067. },
  12068. {
  12069. "$ref": "#/components/schemas/McpRemoteConfig"
  12070. },
  12071. {
  12072. "type": "object",
  12073. "properties": {
  12074. "enabled": {
  12075. "type": "boolean"
  12076. }
  12077. },
  12078. "required": ["enabled"],
  12079. "additionalProperties": false
  12080. }
  12081. ]
  12082. }
  12083. },
  12084. "formatter": {
  12085. "anyOf": [
  12086. {
  12087. "type": "boolean"
  12088. },
  12089. {
  12090. "type": "object",
  12091. "additionalProperties": {
  12092. "type": "object",
  12093. "properties": {
  12094. "disabled": {
  12095. "type": "boolean"
  12096. },
  12097. "command": {
  12098. "type": "array",
  12099. "items": {
  12100. "type": "string"
  12101. }
  12102. },
  12103. "environment": {
  12104. "type": "object",
  12105. "additionalProperties": {
  12106. "type": "string"
  12107. }
  12108. },
  12109. "extensions": {
  12110. "type": "array",
  12111. "items": {
  12112. "type": "string"
  12113. }
  12114. }
  12115. },
  12116. "additionalProperties": false
  12117. }
  12118. }
  12119. ],
  12120. "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."
  12121. },
  12122. "lsp": {
  12123. "anyOf": [
  12124. {
  12125. "type": "boolean"
  12126. },
  12127. {
  12128. "type": "object",
  12129. "additionalProperties": {
  12130. "anyOf": [
  12131. {
  12132. "type": "object",
  12133. "properties": {
  12134. "disabled": {
  12135. "type": "boolean",
  12136. "enum": [true]
  12137. }
  12138. },
  12139. "required": ["disabled"],
  12140. "additionalProperties": false
  12141. },
  12142. {
  12143. "type": "object",
  12144. "properties": {
  12145. "command": {
  12146. "type": "array",
  12147. "items": {
  12148. "type": "string"
  12149. }
  12150. },
  12151. "extensions": {
  12152. "type": "array",
  12153. "items": {
  12154. "type": "string"
  12155. }
  12156. },
  12157. "disabled": {
  12158. "type": "boolean"
  12159. },
  12160. "env": {
  12161. "type": "object",
  12162. "additionalProperties": {
  12163. "type": "string"
  12164. }
  12165. },
  12166. "initialization": {
  12167. "type": "object"
  12168. }
  12169. },
  12170. "required": ["command"],
  12171. "additionalProperties": false
  12172. }
  12173. ]
  12174. }
  12175. }
  12176. ],
  12177. "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."
  12178. },
  12179. "instructions": {
  12180. "type": "array",
  12181. "items": {
  12182. "type": "string"
  12183. }
  12184. },
  12185. "layout": {
  12186. "$ref": "#/components/schemas/LayoutConfig"
  12187. },
  12188. "permission": {
  12189. "$ref": "#/components/schemas/PermissionConfig"
  12190. },
  12191. "tools": {
  12192. "type": "object",
  12193. "additionalProperties": {
  12194. "type": "boolean"
  12195. }
  12196. },
  12197. "enterprise": {
  12198. "type": "object",
  12199. "properties": {
  12200. "url": {
  12201. "type": "string"
  12202. }
  12203. },
  12204. "additionalProperties": false
  12205. },
  12206. "tool_output": {
  12207. "type": "object",
  12208. "properties": {
  12209. "max_lines": {
  12210. "type": "integer",
  12211. "exclusiveMinimum": 0
  12212. },
  12213. "max_bytes": {
  12214. "type": "integer",
  12215. "exclusiveMinimum": 0
  12216. }
  12217. },
  12218. "additionalProperties": false
  12219. },
  12220. "compaction": {
  12221. "type": "object",
  12222. "properties": {
  12223. "auto": {
  12224. "type": "boolean"
  12225. },
  12226. "prune": {
  12227. "type": "boolean"
  12228. },
  12229. "tail_turns": {
  12230. "type": "integer",
  12231. "minimum": 0
  12232. },
  12233. "preserve_recent_tokens": {
  12234. "type": "integer",
  12235. "minimum": 0
  12236. },
  12237. "reserved": {
  12238. "type": "integer",
  12239. "minimum": 0
  12240. }
  12241. },
  12242. "additionalProperties": false
  12243. },
  12244. "experimental": {
  12245. "type": "object",
  12246. "properties": {
  12247. "disable_paste_summary": {
  12248. "type": "boolean"
  12249. },
  12250. "batch_tool": {
  12251. "type": "boolean"
  12252. },
  12253. "openTelemetry": {
  12254. "type": "boolean"
  12255. },
  12256. "primary_tools": {
  12257. "type": "array",
  12258. "items": {
  12259. "type": "string"
  12260. }
  12261. },
  12262. "continue_loop_on_deny": {
  12263. "type": "boolean"
  12264. },
  12265. "mcp_timeout": {
  12266. "type": "integer",
  12267. "exclusiveMinimum": 0
  12268. }
  12269. },
  12270. "additionalProperties": false
  12271. }
  12272. },
  12273. "additionalProperties": false
  12274. },
  12275. "Model": {
  12276. "type": "object",
  12277. "properties": {
  12278. "id": {
  12279. "type": "string"
  12280. },
  12281. "providerID": {
  12282. "type": "string"
  12283. },
  12284. "api": {
  12285. "type": "object",
  12286. "properties": {
  12287. "id": {
  12288. "type": "string"
  12289. },
  12290. "url": {
  12291. "type": "string"
  12292. },
  12293. "npm": {
  12294. "type": "string"
  12295. }
  12296. },
  12297. "required": ["id", "url", "npm"],
  12298. "additionalProperties": false
  12299. },
  12300. "name": {
  12301. "type": "string"
  12302. },
  12303. "family": {
  12304. "type": "string"
  12305. },
  12306. "capabilities": {
  12307. "type": "object",
  12308. "properties": {
  12309. "temperature": {
  12310. "type": "boolean"
  12311. },
  12312. "reasoning": {
  12313. "type": "boolean"
  12314. },
  12315. "attachment": {
  12316. "type": "boolean"
  12317. },
  12318. "toolcall": {
  12319. "type": "boolean"
  12320. },
  12321. "input": {
  12322. "type": "object",
  12323. "properties": {
  12324. "text": {
  12325. "type": "boolean"
  12326. },
  12327. "audio": {
  12328. "type": "boolean"
  12329. },
  12330. "image": {
  12331. "type": "boolean"
  12332. },
  12333. "video": {
  12334. "type": "boolean"
  12335. },
  12336. "pdf": {
  12337. "type": "boolean"
  12338. }
  12339. },
  12340. "required": ["text", "audio", "image", "video", "pdf"],
  12341. "additionalProperties": false
  12342. },
  12343. "output": {
  12344. "type": "object",
  12345. "properties": {
  12346. "text": {
  12347. "type": "boolean"
  12348. },
  12349. "audio": {
  12350. "type": "boolean"
  12351. },
  12352. "image": {
  12353. "type": "boolean"
  12354. },
  12355. "video": {
  12356. "type": "boolean"
  12357. },
  12358. "pdf": {
  12359. "type": "boolean"
  12360. }
  12361. },
  12362. "required": ["text", "audio", "image", "video", "pdf"],
  12363. "additionalProperties": false
  12364. },
  12365. "interleaved": {
  12366. "anyOf": [
  12367. {
  12368. "type": "boolean"
  12369. },
  12370. {
  12371. "type": "object",
  12372. "properties": {
  12373. "field": {
  12374. "type": "string",
  12375. "enum": ["reasoning_content", "reasoning_details"]
  12376. }
  12377. },
  12378. "required": ["field"],
  12379. "additionalProperties": false
  12380. }
  12381. ]
  12382. }
  12383. },
  12384. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  12385. "additionalProperties": false
  12386. },
  12387. "cost": {
  12388. "type": "object",
  12389. "properties": {
  12390. "input": {
  12391. "type": "number"
  12392. },
  12393. "output": {
  12394. "type": "number"
  12395. },
  12396. "cache": {
  12397. "type": "object",
  12398. "properties": {
  12399. "read": {
  12400. "type": "number"
  12401. },
  12402. "write": {
  12403. "type": "number"
  12404. }
  12405. },
  12406. "required": ["read", "write"],
  12407. "additionalProperties": false
  12408. },
  12409. "experimentalOver200K": {
  12410. "type": "object",
  12411. "properties": {
  12412. "input": {
  12413. "type": "number"
  12414. },
  12415. "output": {
  12416. "type": "number"
  12417. },
  12418. "cache": {
  12419. "type": "object",
  12420. "properties": {
  12421. "read": {
  12422. "type": "number"
  12423. },
  12424. "write": {
  12425. "type": "number"
  12426. }
  12427. },
  12428. "required": ["read", "write"],
  12429. "additionalProperties": false
  12430. }
  12431. },
  12432. "required": ["input", "output", "cache"],
  12433. "additionalProperties": false
  12434. }
  12435. },
  12436. "required": ["input", "output", "cache"],
  12437. "additionalProperties": false
  12438. },
  12439. "limit": {
  12440. "type": "object",
  12441. "properties": {
  12442. "context": {
  12443. "type": "number"
  12444. },
  12445. "input": {
  12446. "type": "number"
  12447. },
  12448. "output": {
  12449. "type": "number"
  12450. }
  12451. },
  12452. "required": ["context", "output"],
  12453. "additionalProperties": false
  12454. },
  12455. "status": {
  12456. "type": "string",
  12457. "enum": ["alpha", "beta", "deprecated", "active"]
  12458. },
  12459. "options": {
  12460. "type": "object"
  12461. },
  12462. "headers": {
  12463. "type": "object",
  12464. "additionalProperties": {
  12465. "type": "string"
  12466. }
  12467. },
  12468. "release_date": {
  12469. "type": "string"
  12470. },
  12471. "variants": {
  12472. "type": "object",
  12473. "additionalProperties": {
  12474. "type": "object"
  12475. }
  12476. }
  12477. },
  12478. "required": [
  12479. "id",
  12480. "providerID",
  12481. "api",
  12482. "name",
  12483. "capabilities",
  12484. "cost",
  12485. "limit",
  12486. "status",
  12487. "options",
  12488. "headers",
  12489. "release_date"
  12490. ],
  12491. "additionalProperties": false
  12492. },
  12493. "Provider": {
  12494. "type": "object",
  12495. "properties": {
  12496. "id": {
  12497. "type": "string"
  12498. },
  12499. "name": {
  12500. "type": "string"
  12501. },
  12502. "source": {
  12503. "type": "string",
  12504. "enum": ["env", "config", "custom", "api"]
  12505. },
  12506. "env": {
  12507. "type": "array",
  12508. "items": {
  12509. "type": "string"
  12510. }
  12511. },
  12512. "key": {
  12513. "type": "string"
  12514. },
  12515. "options": {
  12516. "type": "object"
  12517. },
  12518. "models": {
  12519. "type": "object",
  12520. "additionalProperties": {
  12521. "$ref": "#/components/schemas/Model"
  12522. }
  12523. }
  12524. },
  12525. "required": ["id", "name", "source", "env", "options", "models"],
  12526. "additionalProperties": false
  12527. },
  12528. "ConsoleState": {
  12529. "type": "object",
  12530. "properties": {
  12531. "consoleManagedProviders": {
  12532. "type": "array",
  12533. "items": {
  12534. "type": "string"
  12535. }
  12536. },
  12537. "activeOrgName": {
  12538. "type": "string"
  12539. },
  12540. "switchableOrgCount": {
  12541. "type": "integer",
  12542. "minimum": 0
  12543. }
  12544. },
  12545. "required": ["consoleManagedProviders", "switchableOrgCount"],
  12546. "additionalProperties": false
  12547. },
  12548. "effect_HttpApiError_InternalServerError": {
  12549. "type": "object",
  12550. "properties": {
  12551. "_tag": {
  12552. "type": "string",
  12553. "enum": ["InternalServerError"]
  12554. }
  12555. },
  12556. "required": ["_tag"],
  12557. "additionalProperties": false
  12558. },
  12559. "ToolListItem": {
  12560. "type": "object",
  12561. "properties": {
  12562. "id": {
  12563. "type": "string"
  12564. },
  12565. "description": {
  12566. "type": "string"
  12567. },
  12568. "parameters": {}
  12569. },
  12570. "required": ["id", "description", "parameters"],
  12571. "additionalProperties": false
  12572. },
  12573. "ToolList": {
  12574. "type": "array",
  12575. "items": {
  12576. "$ref": "#/components/schemas/ToolListItem"
  12577. }
  12578. },
  12579. "ToolIDs": {
  12580. "type": "array",
  12581. "items": {
  12582. "type": "string"
  12583. }
  12584. },
  12585. "WorktreeCreateInput": {
  12586. "type": "object",
  12587. "properties": {
  12588. "name": {
  12589. "type": "string"
  12590. },
  12591. "startCommand": {
  12592. "type": "string",
  12593. "description": "Additional startup script to run after the project's start command"
  12594. }
  12595. },
  12596. "additionalProperties": false
  12597. },
  12598. "Worktree": {
  12599. "type": "object",
  12600. "properties": {
  12601. "name": {
  12602. "type": "string"
  12603. },
  12604. "branch": {
  12605. "type": "string"
  12606. },
  12607. "directory": {
  12608. "type": "string"
  12609. }
  12610. },
  12611. "required": ["name", "branch", "directory"],
  12612. "additionalProperties": false
  12613. },
  12614. "WorktreeRemoveInput": {
  12615. "type": "object",
  12616. "properties": {
  12617. "directory": {
  12618. "type": "string"
  12619. }
  12620. },
  12621. "required": ["directory"],
  12622. "additionalProperties": false
  12623. },
  12624. "WorktreeResetInput": {
  12625. "type": "object",
  12626. "properties": {
  12627. "directory": {
  12628. "type": "string"
  12629. }
  12630. },
  12631. "required": ["directory"],
  12632. "additionalProperties": false
  12633. },
  12634. "ProjectSummary": {
  12635. "type": "object",
  12636. "properties": {
  12637. "id": {
  12638. "type": "string"
  12639. },
  12640. "name": {
  12641. "type": "string"
  12642. },
  12643. "worktree": {
  12644. "type": "string"
  12645. }
  12646. },
  12647. "required": ["id", "worktree"],
  12648. "additionalProperties": false
  12649. },
  12650. "GlobalSession": {
  12651. "type": "object",
  12652. "properties": {
  12653. "id": {
  12654. "type": "string"
  12655. },
  12656. "slug": {
  12657. "type": "string"
  12658. },
  12659. "projectID": {
  12660. "type": "string"
  12661. },
  12662. "workspaceID": {
  12663. "type": "string"
  12664. },
  12665. "directory": {
  12666. "type": "string"
  12667. },
  12668. "path": {
  12669. "type": "string"
  12670. },
  12671. "parentID": {
  12672. "type": "string"
  12673. },
  12674. "summary": {
  12675. "type": "object",
  12676. "properties": {
  12677. "additions": {
  12678. "type": "integer",
  12679. "minimum": 0
  12680. },
  12681. "deletions": {
  12682. "type": "integer",
  12683. "minimum": 0
  12684. },
  12685. "files": {
  12686. "type": "integer",
  12687. "minimum": 0
  12688. },
  12689. "diffs": {
  12690. "type": "array",
  12691. "items": {
  12692. "$ref": "#/components/schemas/SnapshotFileDiff"
  12693. }
  12694. }
  12695. },
  12696. "required": ["additions", "deletions", "files"],
  12697. "additionalProperties": false
  12698. },
  12699. "share": {
  12700. "type": "object",
  12701. "properties": {
  12702. "url": {
  12703. "type": "string"
  12704. }
  12705. },
  12706. "required": ["url"],
  12707. "additionalProperties": false
  12708. },
  12709. "title": {
  12710. "type": "string"
  12711. },
  12712. "agent": {
  12713. "type": "string"
  12714. },
  12715. "model": {
  12716. "type": "object",
  12717. "properties": {
  12718. "id": {
  12719. "type": "string"
  12720. },
  12721. "providerID": {
  12722. "type": "string"
  12723. },
  12724. "variant": {
  12725. "type": "string"
  12726. }
  12727. },
  12728. "required": ["id", "providerID"],
  12729. "additionalProperties": false
  12730. },
  12731. "version": {
  12732. "type": "string"
  12733. },
  12734. "time": {
  12735. "type": "object",
  12736. "properties": {
  12737. "created": {
  12738. "type": "integer",
  12739. "minimum": 0
  12740. },
  12741. "updated": {
  12742. "type": "integer",
  12743. "minimum": 0
  12744. },
  12745. "compacting": {
  12746. "type": "integer",
  12747. "minimum": 0
  12748. },
  12749. "archived": {
  12750. "type": "number"
  12751. }
  12752. },
  12753. "required": ["created", "updated"],
  12754. "additionalProperties": false
  12755. },
  12756. "permission": {
  12757. "$ref": "#/components/schemas/PermissionRuleset"
  12758. },
  12759. "revert": {
  12760. "type": "object",
  12761. "properties": {
  12762. "messageID": {
  12763. "type": "string"
  12764. },
  12765. "partID": {
  12766. "type": "string"
  12767. },
  12768. "snapshot": {
  12769. "type": "string"
  12770. },
  12771. "diff": {
  12772. "type": "string"
  12773. }
  12774. },
  12775. "required": ["messageID"],
  12776. "additionalProperties": false
  12777. },
  12778. "project": {
  12779. "anyOf": [
  12780. {
  12781. "$ref": "#/components/schemas/ProjectSummary"
  12782. },
  12783. {
  12784. "type": "null"
  12785. }
  12786. ]
  12787. }
  12788. },
  12789. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  12790. "additionalProperties": false
  12791. },
  12792. "McpResource": {
  12793. "type": "object",
  12794. "properties": {
  12795. "name": {
  12796. "type": "string"
  12797. },
  12798. "uri": {
  12799. "type": "string"
  12800. },
  12801. "description": {
  12802. "type": "string"
  12803. },
  12804. "mimeType": {
  12805. "type": "string"
  12806. },
  12807. "client": {
  12808. "type": "string"
  12809. }
  12810. },
  12811. "required": ["name", "uri", "client"],
  12812. "additionalProperties": false
  12813. },
  12814. "Symbol": {
  12815. "type": "object",
  12816. "properties": {
  12817. "name": {
  12818. "type": "string"
  12819. },
  12820. "kind": {
  12821. "type": "integer",
  12822. "minimum": 0
  12823. },
  12824. "location": {
  12825. "type": "object",
  12826. "properties": {
  12827. "uri": {
  12828. "type": "string"
  12829. },
  12830. "range": {
  12831. "$ref": "#/components/schemas/Range"
  12832. }
  12833. },
  12834. "required": ["uri", "range"],
  12835. "additionalProperties": false
  12836. }
  12837. },
  12838. "required": ["name", "kind", "location"],
  12839. "additionalProperties": false
  12840. },
  12841. "FileNode": {
  12842. "type": "object",
  12843. "properties": {
  12844. "name": {
  12845. "type": "string"
  12846. },
  12847. "path": {
  12848. "type": "string"
  12849. },
  12850. "absolute": {
  12851. "type": "string"
  12852. },
  12853. "type": {
  12854. "type": "string",
  12855. "enum": ["file", "directory"]
  12856. },
  12857. "ignored": {
  12858. "type": "boolean"
  12859. }
  12860. },
  12861. "required": ["name", "path", "absolute", "type", "ignored"],
  12862. "additionalProperties": false
  12863. },
  12864. "FileContent": {
  12865. "type": "object",
  12866. "properties": {
  12867. "type": {
  12868. "type": "string",
  12869. "enum": ["text", "binary"]
  12870. },
  12871. "content": {
  12872. "type": "string"
  12873. },
  12874. "diff": {
  12875. "type": "string"
  12876. },
  12877. "patch": {
  12878. "type": "object",
  12879. "properties": {
  12880. "oldFileName": {
  12881. "type": "string"
  12882. },
  12883. "newFileName": {
  12884. "type": "string"
  12885. },
  12886. "oldHeader": {
  12887. "type": "string"
  12888. },
  12889. "newHeader": {
  12890. "type": "string"
  12891. },
  12892. "hunks": {
  12893. "type": "array",
  12894. "items": {
  12895. "type": "object",
  12896. "properties": {
  12897. "oldStart": {
  12898. "type": "integer",
  12899. "minimum": 0
  12900. },
  12901. "oldLines": {
  12902. "type": "integer",
  12903. "minimum": 0
  12904. },
  12905. "newStart": {
  12906. "type": "integer",
  12907. "minimum": 0
  12908. },
  12909. "newLines": {
  12910. "type": "integer",
  12911. "minimum": 0
  12912. },
  12913. "lines": {
  12914. "type": "array",
  12915. "items": {
  12916. "type": "string"
  12917. }
  12918. }
  12919. },
  12920. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  12921. "additionalProperties": false
  12922. }
  12923. },
  12924. "index": {
  12925. "type": "string"
  12926. }
  12927. },
  12928. "required": ["oldFileName", "newFileName", "hunks"],
  12929. "additionalProperties": false
  12930. },
  12931. "encoding": {
  12932. "type": "string",
  12933. "enum": ["base64"]
  12934. },
  12935. "mimeType": {
  12936. "type": "string"
  12937. }
  12938. },
  12939. "required": ["type", "content"],
  12940. "additionalProperties": false
  12941. },
  12942. "File": {
  12943. "type": "object",
  12944. "properties": {
  12945. "path": {
  12946. "type": "string"
  12947. },
  12948. "added": {
  12949. "type": "integer",
  12950. "minimum": 0
  12951. },
  12952. "removed": {
  12953. "type": "integer",
  12954. "minimum": 0
  12955. },
  12956. "status": {
  12957. "type": "string",
  12958. "enum": ["added", "deleted", "modified"]
  12959. }
  12960. },
  12961. "required": ["path", "added", "removed", "status"],
  12962. "additionalProperties": false
  12963. },
  12964. "Path": {
  12965. "type": "object",
  12966. "properties": {
  12967. "home": {
  12968. "type": "string"
  12969. },
  12970. "state": {
  12971. "type": "string"
  12972. },
  12973. "config": {
  12974. "type": "string"
  12975. },
  12976. "worktree": {
  12977. "type": "string"
  12978. },
  12979. "directory": {
  12980. "type": "string"
  12981. }
  12982. },
  12983. "required": ["home", "state", "config", "worktree", "directory"],
  12984. "additionalProperties": false
  12985. },
  12986. "VcsInfo": {
  12987. "type": "object",
  12988. "properties": {
  12989. "branch": {
  12990. "type": "string"
  12991. },
  12992. "default_branch": {
  12993. "type": "string"
  12994. }
  12995. },
  12996. "additionalProperties": false
  12997. },
  12998. "VcsFileStatus": {
  12999. "type": "object",
  13000. "properties": {
  13001. "file": {
  13002. "type": "string"
  13003. },
  13004. "additions": {
  13005. "type": "integer",
  13006. "minimum": 0
  13007. },
  13008. "deletions": {
  13009. "type": "integer",
  13010. "minimum": 0
  13011. },
  13012. "status": {
  13013. "type": "string",
  13014. "enum": ["added", "deleted", "modified"]
  13015. }
  13016. },
  13017. "required": ["file", "additions", "deletions", "status"],
  13018. "additionalProperties": false
  13019. },
  13020. "VcsFileDiff": {
  13021. "type": "object",
  13022. "properties": {
  13023. "file": {
  13024. "type": "string"
  13025. },
  13026. "patch": {
  13027. "type": "string"
  13028. },
  13029. "additions": {
  13030. "type": "integer",
  13031. "minimum": 0
  13032. },
  13033. "deletions": {
  13034. "type": "integer",
  13035. "minimum": 0
  13036. },
  13037. "status": {
  13038. "type": "string",
  13039. "enum": ["added", "deleted", "modified"]
  13040. }
  13041. },
  13042. "required": ["file", "additions", "deletions"],
  13043. "additionalProperties": false
  13044. },
  13045. "VcsApplyError": {
  13046. "type": "object",
  13047. "properties": {
  13048. "name": {
  13049. "type": "string",
  13050. "enum": ["VcsApplyError"]
  13051. },
  13052. "data": {
  13053. "type": "object",
  13054. "properties": {
  13055. "message": {
  13056. "type": "string"
  13057. },
  13058. "reason": {
  13059. "type": "string",
  13060. "enum": ["non-git", "not-clean"]
  13061. }
  13062. },
  13063. "required": ["message", "reason"],
  13064. "additionalProperties": false
  13065. }
  13066. },
  13067. "required": ["name", "data"],
  13068. "additionalProperties": false
  13069. },
  13070. "Command": {
  13071. "type": "object",
  13072. "properties": {
  13073. "name": {
  13074. "type": "string"
  13075. },
  13076. "description": {
  13077. "type": "string"
  13078. },
  13079. "agent": {
  13080. "type": "string"
  13081. },
  13082. "model": {
  13083. "type": "string"
  13084. },
  13085. "source": {
  13086. "type": "string",
  13087. "enum": ["command", "mcp", "skill"]
  13088. },
  13089. "template": {
  13090. "type": "string"
  13091. },
  13092. "subtask": {
  13093. "type": "boolean"
  13094. },
  13095. "hints": {
  13096. "type": "array",
  13097. "items": {
  13098. "type": "string"
  13099. }
  13100. }
  13101. },
  13102. "required": ["name", "template", "hints"],
  13103. "additionalProperties": false
  13104. },
  13105. "Agent": {
  13106. "type": "object",
  13107. "properties": {
  13108. "name": {
  13109. "type": "string"
  13110. },
  13111. "description": {
  13112. "type": "string"
  13113. },
  13114. "mode": {
  13115. "type": "string",
  13116. "enum": ["subagent", "primary", "all"]
  13117. },
  13118. "native": {
  13119. "type": "boolean"
  13120. },
  13121. "hidden": {
  13122. "type": "boolean"
  13123. },
  13124. "topP": {
  13125. "type": "number"
  13126. },
  13127. "temperature": {
  13128. "type": "number"
  13129. },
  13130. "color": {
  13131. "type": "string"
  13132. },
  13133. "permission": {
  13134. "$ref": "#/components/schemas/PermissionRuleset"
  13135. },
  13136. "model": {
  13137. "type": "object",
  13138. "properties": {
  13139. "modelID": {
  13140. "type": "string"
  13141. },
  13142. "providerID": {
  13143. "type": "string"
  13144. }
  13145. },
  13146. "required": ["modelID", "providerID"],
  13147. "additionalProperties": false
  13148. },
  13149. "variant": {
  13150. "type": "string"
  13151. },
  13152. "prompt": {
  13153. "type": "string"
  13154. },
  13155. "options": {
  13156. "type": "object"
  13157. },
  13158. "steps": {
  13159. "type": "number"
  13160. }
  13161. },
  13162. "required": ["name", "mode", "permission", "options"],
  13163. "additionalProperties": false
  13164. },
  13165. "LSPStatus": {
  13166. "type": "object",
  13167. "properties": {
  13168. "id": {
  13169. "type": "string"
  13170. },
  13171. "name": {
  13172. "type": "string"
  13173. },
  13174. "root": {
  13175. "type": "string"
  13176. },
  13177. "status": {
  13178. "type": "string",
  13179. "enum": ["connected", "error"]
  13180. }
  13181. },
  13182. "required": ["id", "name", "root", "status"],
  13183. "additionalProperties": false
  13184. },
  13185. "FormatterStatus": {
  13186. "type": "object",
  13187. "properties": {
  13188. "name": {
  13189. "type": "string"
  13190. },
  13191. "extensions": {
  13192. "type": "array",
  13193. "items": {
  13194. "type": "string"
  13195. }
  13196. },
  13197. "enabled": {
  13198. "type": "boolean"
  13199. }
  13200. },
  13201. "required": ["name", "extensions", "enabled"],
  13202. "additionalProperties": false
  13203. },
  13204. "MCPStatusConnected": {
  13205. "type": "object",
  13206. "properties": {
  13207. "status": {
  13208. "type": "string",
  13209. "enum": ["connected"]
  13210. }
  13211. },
  13212. "required": ["status"],
  13213. "additionalProperties": false
  13214. },
  13215. "MCPStatusDisabled": {
  13216. "type": "object",
  13217. "properties": {
  13218. "status": {
  13219. "type": "string",
  13220. "enum": ["disabled"]
  13221. }
  13222. },
  13223. "required": ["status"],
  13224. "additionalProperties": false
  13225. },
  13226. "MCPStatusFailed": {
  13227. "type": "object",
  13228. "properties": {
  13229. "status": {
  13230. "type": "string",
  13231. "enum": ["failed"]
  13232. },
  13233. "error": {
  13234. "type": "string"
  13235. }
  13236. },
  13237. "required": ["status", "error"],
  13238. "additionalProperties": false
  13239. },
  13240. "MCPStatusNeedsAuth": {
  13241. "type": "object",
  13242. "properties": {
  13243. "status": {
  13244. "type": "string",
  13245. "enum": ["needs_auth"]
  13246. }
  13247. },
  13248. "required": ["status"],
  13249. "additionalProperties": false
  13250. },
  13251. "MCPStatusNeedsClientRegistration": {
  13252. "type": "object",
  13253. "properties": {
  13254. "status": {
  13255. "type": "string",
  13256. "enum": ["needs_client_registration"]
  13257. },
  13258. "error": {
  13259. "type": "string"
  13260. }
  13261. },
  13262. "required": ["status", "error"],
  13263. "additionalProperties": false
  13264. },
  13265. "MCPStatus": {
  13266. "anyOf": [
  13267. {
  13268. "$ref": "#/components/schemas/MCPStatusConnected"
  13269. },
  13270. {
  13271. "$ref": "#/components/schemas/MCPStatusDisabled"
  13272. },
  13273. {
  13274. "$ref": "#/components/schemas/MCPStatusFailed"
  13275. },
  13276. {
  13277. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  13278. },
  13279. {
  13280. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  13281. }
  13282. ]
  13283. },
  13284. "McpUnsupportedOAuthError": {
  13285. "type": "object",
  13286. "properties": {
  13287. "error": {
  13288. "type": "string"
  13289. }
  13290. },
  13291. "required": ["error"],
  13292. "additionalProperties": false
  13293. },
  13294. "NotFoundError": {
  13295. "type": "object",
  13296. "required": ["name", "data"],
  13297. "properties": {
  13298. "name": {
  13299. "type": "string",
  13300. "enum": ["NotFoundError"]
  13301. },
  13302. "data": {
  13303. "type": "object",
  13304. "required": ["message"],
  13305. "properties": {
  13306. "message": {
  13307. "type": "string"
  13308. }
  13309. }
  13310. }
  13311. }
  13312. },
  13313. "effect_HttpApiError_Forbidden": {
  13314. "type": "object",
  13315. "properties": {
  13316. "_tag": {
  13317. "type": "string",
  13318. "enum": ["Forbidden"]
  13319. }
  13320. },
  13321. "required": ["_tag"],
  13322. "additionalProperties": false
  13323. },
  13324. "ProviderAuthMethod": {
  13325. "type": "object",
  13326. "properties": {
  13327. "type": {
  13328. "type": "string",
  13329. "enum": ["oauth", "api"]
  13330. },
  13331. "label": {
  13332. "type": "string"
  13333. },
  13334. "prompts": {
  13335. "type": "array",
  13336. "items": {
  13337. "anyOf": [
  13338. {
  13339. "type": "object",
  13340. "properties": {
  13341. "type": {
  13342. "type": "string",
  13343. "enum": ["text"]
  13344. },
  13345. "key": {
  13346. "type": "string"
  13347. },
  13348. "message": {
  13349. "type": "string"
  13350. },
  13351. "placeholder": {
  13352. "type": "string"
  13353. },
  13354. "when": {
  13355. "type": "object",
  13356. "properties": {
  13357. "key": {
  13358. "type": "string"
  13359. },
  13360. "op": {
  13361. "type": "string",
  13362. "enum": ["eq", "neq"]
  13363. },
  13364. "value": {
  13365. "type": "string"
  13366. }
  13367. },
  13368. "required": ["key", "op", "value"],
  13369. "additionalProperties": false
  13370. }
  13371. },
  13372. "required": ["type", "key", "message"],
  13373. "additionalProperties": false
  13374. },
  13375. {
  13376. "type": "object",
  13377. "properties": {
  13378. "type": {
  13379. "type": "string",
  13380. "enum": ["select"]
  13381. },
  13382. "key": {
  13383. "type": "string"
  13384. },
  13385. "message": {
  13386. "type": "string"
  13387. },
  13388. "options": {
  13389. "type": "array",
  13390. "items": {
  13391. "type": "object",
  13392. "properties": {
  13393. "label": {
  13394. "type": "string"
  13395. },
  13396. "value": {
  13397. "type": "string"
  13398. },
  13399. "hint": {
  13400. "type": "string"
  13401. }
  13402. },
  13403. "required": ["label", "value"],
  13404. "additionalProperties": false
  13405. }
  13406. },
  13407. "when": {
  13408. "type": "object",
  13409. "properties": {
  13410. "key": {
  13411. "type": "string"
  13412. },
  13413. "op": {
  13414. "type": "string",
  13415. "enum": ["eq", "neq"]
  13416. },
  13417. "value": {
  13418. "type": "string"
  13419. }
  13420. },
  13421. "required": ["key", "op", "value"],
  13422. "additionalProperties": false
  13423. }
  13424. },
  13425. "required": ["type", "key", "message", "options"],
  13426. "additionalProperties": false
  13427. }
  13428. ]
  13429. }
  13430. }
  13431. },
  13432. "required": ["type", "label"],
  13433. "additionalProperties": false
  13434. },
  13435. "ProviderAuthAuthorization": {
  13436. "type": "object",
  13437. "properties": {
  13438. "url": {
  13439. "type": "string"
  13440. },
  13441. "method": {
  13442. "type": "string",
  13443. "enum": ["auto", "code"]
  13444. },
  13445. "instructions": {
  13446. "type": "string"
  13447. }
  13448. },
  13449. "required": ["url", "method", "instructions"],
  13450. "additionalProperties": false
  13451. },
  13452. "TextPartInput": {
  13453. "type": "object",
  13454. "properties": {
  13455. "id": {
  13456. "type": "string"
  13457. },
  13458. "type": {
  13459. "type": "string",
  13460. "enum": ["text"]
  13461. },
  13462. "text": {
  13463. "type": "string"
  13464. },
  13465. "synthetic": {
  13466. "type": "boolean"
  13467. },
  13468. "ignored": {
  13469. "type": "boolean"
  13470. },
  13471. "time": {
  13472. "type": "object",
  13473. "properties": {
  13474. "start": {
  13475. "type": "integer",
  13476. "minimum": 0
  13477. },
  13478. "end": {
  13479. "type": "integer",
  13480. "minimum": 0
  13481. }
  13482. },
  13483. "required": ["start"],
  13484. "additionalProperties": false
  13485. },
  13486. "metadata": {
  13487. "type": "object"
  13488. }
  13489. },
  13490. "required": ["type", "text"],
  13491. "additionalProperties": false
  13492. },
  13493. "FilePartInput": {
  13494. "type": "object",
  13495. "properties": {
  13496. "id": {
  13497. "type": "string"
  13498. },
  13499. "type": {
  13500. "type": "string",
  13501. "enum": ["file"]
  13502. },
  13503. "mime": {
  13504. "type": "string"
  13505. },
  13506. "filename": {
  13507. "type": "string"
  13508. },
  13509. "url": {
  13510. "type": "string"
  13511. },
  13512. "source": {
  13513. "$ref": "#/components/schemas/FilePartSource"
  13514. }
  13515. },
  13516. "required": ["type", "mime", "url"],
  13517. "additionalProperties": false
  13518. },
  13519. "AgentPartInput": {
  13520. "type": "object",
  13521. "properties": {
  13522. "id": {
  13523. "type": "string"
  13524. },
  13525. "type": {
  13526. "type": "string",
  13527. "enum": ["agent"]
  13528. },
  13529. "name": {
  13530. "type": "string"
  13531. },
  13532. "source": {
  13533. "type": "object",
  13534. "properties": {
  13535. "value": {
  13536. "type": "string"
  13537. },
  13538. "start": {
  13539. "type": "integer",
  13540. "minimum": 0
  13541. },
  13542. "end": {
  13543. "type": "integer",
  13544. "minimum": 0
  13545. }
  13546. },
  13547. "required": ["value", "start", "end"],
  13548. "additionalProperties": false
  13549. }
  13550. },
  13551. "required": ["type", "name"],
  13552. "additionalProperties": false
  13553. },
  13554. "SubtaskPartInput": {
  13555. "type": "object",
  13556. "properties": {
  13557. "id": {
  13558. "type": "string"
  13559. },
  13560. "type": {
  13561. "type": "string",
  13562. "enum": ["subtask"]
  13563. },
  13564. "prompt": {
  13565. "type": "string"
  13566. },
  13567. "description": {
  13568. "type": "string"
  13569. },
  13570. "agent": {
  13571. "type": "string"
  13572. },
  13573. "model": {
  13574. "type": "object",
  13575. "properties": {
  13576. "providerID": {
  13577. "type": "string"
  13578. },
  13579. "modelID": {
  13580. "type": "string"
  13581. }
  13582. },
  13583. "required": ["providerID", "modelID"],
  13584. "additionalProperties": false
  13585. },
  13586. "command": {
  13587. "type": "string"
  13588. }
  13589. },
  13590. "required": ["type", "prompt", "description", "agent"],
  13591. "additionalProperties": false
  13592. },
  13593. "V2SessionsResponse": {
  13594. "type": "object",
  13595. "properties": {
  13596. "items": {
  13597. "type": "array",
  13598. "items": {
  13599. "$ref": "#/components/schemas/SessionInfo"
  13600. }
  13601. },
  13602. "cursor": {
  13603. "type": "object",
  13604. "properties": {
  13605. "previous": {
  13606. "type": "string"
  13607. },
  13608. "next": {
  13609. "type": "string"
  13610. }
  13611. },
  13612. "additionalProperties": false
  13613. }
  13614. },
  13615. "required": ["items", "cursor"],
  13616. "additionalProperties": false
  13617. },
  13618. "V2SessionMessagesResponse": {
  13619. "type": "object",
  13620. "properties": {
  13621. "items": {
  13622. "type": "array",
  13623. "items": {
  13624. "$ref": "#/components/schemas/SessionMessage"
  13625. }
  13626. },
  13627. "cursor": {
  13628. "type": "object",
  13629. "properties": {
  13630. "previous": {
  13631. "type": "string"
  13632. },
  13633. "next": {
  13634. "type": "string"
  13635. }
  13636. },
  13637. "additionalProperties": false
  13638. }
  13639. },
  13640. "required": ["items", "cursor"],
  13641. "additionalProperties": false
  13642. },
  13643. "EventTuiPromptAppend": {
  13644. "type": "object",
  13645. "properties": {
  13646. "type": {
  13647. "type": "string",
  13648. "enum": ["tui.prompt.append"]
  13649. },
  13650. "properties": {
  13651. "type": "object",
  13652. "properties": {
  13653. "text": {
  13654. "type": "string"
  13655. }
  13656. },
  13657. "required": ["text"],
  13658. "additionalProperties": false
  13659. }
  13660. },
  13661. "required": ["type", "properties"],
  13662. "additionalProperties": false
  13663. },
  13664. "EventTuiCommandExecute": {
  13665. "type": "object",
  13666. "properties": {
  13667. "type": {
  13668. "type": "string",
  13669. "enum": ["tui.command.execute"]
  13670. },
  13671. "properties": {
  13672. "type": "object",
  13673. "properties": {
  13674. "command": {
  13675. "anyOf": [
  13676. {
  13677. "type": "string",
  13678. "enum": [
  13679. "session.list",
  13680. "session.new",
  13681. "session.share",
  13682. "session.interrupt",
  13683. "session.compact",
  13684. "session.page.up",
  13685. "session.page.down",
  13686. "session.line.up",
  13687. "session.line.down",
  13688. "session.half.page.up",
  13689. "session.half.page.down",
  13690. "session.first",
  13691. "session.last",
  13692. "prompt.clear",
  13693. "prompt.submit",
  13694. "agent.cycle"
  13695. ]
  13696. },
  13697. {
  13698. "type": "string"
  13699. }
  13700. ]
  13701. }
  13702. },
  13703. "required": ["command"],
  13704. "additionalProperties": false
  13705. }
  13706. },
  13707. "required": ["type", "properties"],
  13708. "additionalProperties": false
  13709. },
  13710. "EventTuiToastShow": {
  13711. "type": "object",
  13712. "properties": {
  13713. "type": {
  13714. "type": "string",
  13715. "enum": ["tui.toast.show"]
  13716. },
  13717. "properties": {
  13718. "type": "object",
  13719. "properties": {
  13720. "title": {
  13721. "type": "string"
  13722. },
  13723. "message": {
  13724. "type": "string"
  13725. },
  13726. "variant": {
  13727. "type": "string",
  13728. "enum": ["info", "success", "warning", "error"]
  13729. },
  13730. "duration": {
  13731. "type": "integer",
  13732. "exclusiveMinimum": 0
  13733. }
  13734. },
  13735. "required": ["message", "variant"],
  13736. "additionalProperties": false
  13737. }
  13738. },
  13739. "required": ["type", "properties"],
  13740. "additionalProperties": false
  13741. },
  13742. "EventTuiSessionSelect": {
  13743. "type": "object",
  13744. "properties": {
  13745. "type": {
  13746. "type": "string",
  13747. "enum": ["tui.session.select"]
  13748. },
  13749. "properties": {
  13750. "type": "object",
  13751. "properties": {
  13752. "sessionID": {
  13753. "type": "string",
  13754. "description": "Session ID to navigate to"
  13755. }
  13756. },
  13757. "required": ["sessionID"],
  13758. "additionalProperties": false
  13759. }
  13760. },
  13761. "required": ["type", "properties"],
  13762. "additionalProperties": false
  13763. },
  13764. "Workspace": {
  13765. "type": "object",
  13766. "properties": {
  13767. "id": {
  13768. "type": "string"
  13769. },
  13770. "type": {
  13771. "type": "string"
  13772. },
  13773. "name": {
  13774. "type": "string"
  13775. },
  13776. "branch": {
  13777. "anyOf": [
  13778. {
  13779. "type": "string"
  13780. },
  13781. {
  13782. "type": "null"
  13783. }
  13784. ]
  13785. },
  13786. "directory": {
  13787. "anyOf": [
  13788. {
  13789. "type": "string"
  13790. },
  13791. {
  13792. "type": "null"
  13793. }
  13794. ]
  13795. },
  13796. "extra": {
  13797. "anyOf": [
  13798. {},
  13799. {
  13800. "type": "null"
  13801. }
  13802. ]
  13803. },
  13804. "projectID": {
  13805. "type": "string"
  13806. },
  13807. "timeUsed": {
  13808. "anyOf": [
  13809. {
  13810. "type": "number"
  13811. },
  13812. {
  13813. "type": "string",
  13814. "enum": ["NaN"]
  13815. },
  13816. {
  13817. "type": "string",
  13818. "enum": ["Infinity"]
  13819. },
  13820. {
  13821. "type": "string",
  13822. "enum": ["-Infinity"]
  13823. },
  13824. {
  13825. "type": "string",
  13826. "enum": ["Infinity", "-Infinity", "NaN"]
  13827. }
  13828. ]
  13829. }
  13830. },
  13831. "required": ["id", "type", "name", "branch", "directory", "extra", "projectID", "timeUsed"],
  13832. "additionalProperties": false
  13833. },
  13834. "WorkspaceWarpError": {
  13835. "type": "object",
  13836. "properties": {
  13837. "name": {
  13838. "type": "string",
  13839. "enum": ["WorkspaceWarpError"]
  13840. },
  13841. "data": {
  13842. "type": "object",
  13843. "properties": {
  13844. "message": {
  13845. "type": "string"
  13846. }
  13847. },
  13848. "required": ["message"],
  13849. "additionalProperties": false
  13850. }
  13851. },
  13852. "required": ["name", "data"],
  13853. "additionalProperties": false
  13854. },
  13855. "SyncEventMessageUpdated": {
  13856. "type": "object",
  13857. "properties": {
  13858. "type": {
  13859. "type": "string",
  13860. "enum": ["sync"]
  13861. },
  13862. "name": {
  13863. "type": "string",
  13864. "enum": ["message.updated.1"]
  13865. },
  13866. "id": {
  13867. "type": "string"
  13868. },
  13869. "seq": {
  13870. "type": "number"
  13871. },
  13872. "aggregateID": {
  13873. "type": "string",
  13874. "enum": ["sessionID"]
  13875. },
  13876. "data": {
  13877. "type": "object",
  13878. "properties": {
  13879. "sessionID": {
  13880. "type": "string"
  13881. },
  13882. "info": {
  13883. "$ref": "#/components/schemas/Message"
  13884. }
  13885. },
  13886. "required": ["sessionID", "info"],
  13887. "additionalProperties": false
  13888. }
  13889. },
  13890. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  13891. "additionalProperties": false
  13892. },
  13893. "SyncEventMessageRemoved": {
  13894. "type": "object",
  13895. "properties": {
  13896. "type": {
  13897. "type": "string",
  13898. "enum": ["sync"]
  13899. },
  13900. "name": {
  13901. "type": "string",
  13902. "enum": ["message.removed.1"]
  13903. },
  13904. "id": {
  13905. "type": "string"
  13906. },
  13907. "seq": {
  13908. "type": "number"
  13909. },
  13910. "aggregateID": {
  13911. "type": "string",
  13912. "enum": ["sessionID"]
  13913. },
  13914. "data": {
  13915. "type": "object",
  13916. "properties": {
  13917. "sessionID": {
  13918. "type": "string"
  13919. },
  13920. "messageID": {
  13921. "type": "string"
  13922. }
  13923. },
  13924. "required": ["sessionID", "messageID"],
  13925. "additionalProperties": false
  13926. }
  13927. },
  13928. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  13929. "additionalProperties": false
  13930. },
  13931. "SyncEventMessagePartUpdated": {
  13932. "type": "object",
  13933. "properties": {
  13934. "type": {
  13935. "type": "string",
  13936. "enum": ["sync"]
  13937. },
  13938. "name": {
  13939. "type": "string",
  13940. "enum": ["message.part.updated.1"]
  13941. },
  13942. "id": {
  13943. "type": "string"
  13944. },
  13945. "seq": {
  13946. "type": "number"
  13947. },
  13948. "aggregateID": {
  13949. "type": "string",
  13950. "enum": ["sessionID"]
  13951. },
  13952. "data": {
  13953. "type": "object",
  13954. "properties": {
  13955. "sessionID": {
  13956. "type": "string"
  13957. },
  13958. "part": {
  13959. "$ref": "#/components/schemas/Part"
  13960. },
  13961. "time": {
  13962. "type": "integer",
  13963. "minimum": 0
  13964. }
  13965. },
  13966. "required": ["sessionID", "part", "time"],
  13967. "additionalProperties": false
  13968. }
  13969. },
  13970. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  13971. "additionalProperties": false
  13972. },
  13973. "SyncEventMessagePartRemoved": {
  13974. "type": "object",
  13975. "properties": {
  13976. "type": {
  13977. "type": "string",
  13978. "enum": ["sync"]
  13979. },
  13980. "name": {
  13981. "type": "string",
  13982. "enum": ["message.part.removed.1"]
  13983. },
  13984. "id": {
  13985. "type": "string"
  13986. },
  13987. "seq": {
  13988. "type": "number"
  13989. },
  13990. "aggregateID": {
  13991. "type": "string",
  13992. "enum": ["sessionID"]
  13993. },
  13994. "data": {
  13995. "type": "object",
  13996. "properties": {
  13997. "sessionID": {
  13998. "type": "string"
  13999. },
  14000. "messageID": {
  14001. "type": "string"
  14002. },
  14003. "partID": {
  14004. "type": "string"
  14005. }
  14006. },
  14007. "required": ["sessionID", "messageID", "partID"],
  14008. "additionalProperties": false
  14009. }
  14010. },
  14011. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14012. "additionalProperties": false
  14013. },
  14014. "SyncEventSessionCreated": {
  14015. "type": "object",
  14016. "properties": {
  14017. "type": {
  14018. "type": "string",
  14019. "enum": ["sync"]
  14020. },
  14021. "name": {
  14022. "type": "string",
  14023. "enum": ["session.created.1"]
  14024. },
  14025. "id": {
  14026. "type": "string"
  14027. },
  14028. "seq": {
  14029. "type": "number"
  14030. },
  14031. "aggregateID": {
  14032. "type": "string",
  14033. "enum": ["sessionID"]
  14034. },
  14035. "data": {
  14036. "type": "object",
  14037. "properties": {
  14038. "sessionID": {
  14039. "type": "string"
  14040. },
  14041. "info": {
  14042. "$ref": "#/components/schemas/Session"
  14043. }
  14044. },
  14045. "required": ["sessionID", "info"],
  14046. "additionalProperties": false
  14047. }
  14048. },
  14049. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14050. "additionalProperties": false
  14051. },
  14052. "SyncEventSessionUpdated": {
  14053. "type": "object",
  14054. "properties": {
  14055. "type": {
  14056. "type": "string",
  14057. "enum": ["sync"]
  14058. },
  14059. "name": {
  14060. "type": "string",
  14061. "enum": ["session.updated.1"]
  14062. },
  14063. "id": {
  14064. "type": "string"
  14065. },
  14066. "seq": {
  14067. "type": "number"
  14068. },
  14069. "aggregateID": {
  14070. "type": "string",
  14071. "enum": ["sessionID"]
  14072. },
  14073. "data": {
  14074. "type": "object",
  14075. "properties": {
  14076. "sessionID": {
  14077. "type": "string"
  14078. },
  14079. "info": {
  14080. "type": "object",
  14081. "properties": {
  14082. "id": {
  14083. "anyOf": [
  14084. {
  14085. "type": "string"
  14086. },
  14087. {
  14088. "type": "null"
  14089. }
  14090. ]
  14091. },
  14092. "slug": {
  14093. "anyOf": [
  14094. {
  14095. "type": "string"
  14096. },
  14097. {
  14098. "type": "null"
  14099. }
  14100. ]
  14101. },
  14102. "projectID": {
  14103. "anyOf": [
  14104. {
  14105. "type": "string"
  14106. },
  14107. {
  14108. "type": "null"
  14109. }
  14110. ]
  14111. },
  14112. "workspaceID": {
  14113. "anyOf": [
  14114. {
  14115. "type": "string"
  14116. },
  14117. {
  14118. "type": "null"
  14119. }
  14120. ]
  14121. },
  14122. "directory": {
  14123. "anyOf": [
  14124. {
  14125. "type": "string"
  14126. },
  14127. {
  14128. "type": "null"
  14129. }
  14130. ]
  14131. },
  14132. "path": {
  14133. "anyOf": [
  14134. {
  14135. "type": "string"
  14136. },
  14137. {
  14138. "type": "null"
  14139. }
  14140. ]
  14141. },
  14142. "parentID": {
  14143. "anyOf": [
  14144. {
  14145. "type": "string"
  14146. },
  14147. {
  14148. "type": "null"
  14149. }
  14150. ]
  14151. },
  14152. "summary": {
  14153. "anyOf": [
  14154. {
  14155. "type": "object",
  14156. "properties": {
  14157. "additions": {
  14158. "type": "integer",
  14159. "minimum": 0
  14160. },
  14161. "deletions": {
  14162. "type": "integer",
  14163. "minimum": 0
  14164. },
  14165. "files": {
  14166. "type": "integer",
  14167. "minimum": 0
  14168. },
  14169. "diffs": {
  14170. "type": "array",
  14171. "items": {
  14172. "$ref": "#/components/schemas/SnapshotFileDiff"
  14173. }
  14174. }
  14175. },
  14176. "required": ["additions", "deletions", "files"],
  14177. "additionalProperties": false
  14178. },
  14179. {
  14180. "type": "null"
  14181. }
  14182. ]
  14183. },
  14184. "share": {
  14185. "type": "object",
  14186. "properties": {
  14187. "url": {
  14188. "anyOf": [
  14189. {
  14190. "type": "string"
  14191. },
  14192. {
  14193. "type": "null"
  14194. }
  14195. ]
  14196. }
  14197. },
  14198. "additionalProperties": false
  14199. },
  14200. "title": {
  14201. "anyOf": [
  14202. {
  14203. "type": "string"
  14204. },
  14205. {
  14206. "type": "null"
  14207. }
  14208. ]
  14209. },
  14210. "agent": {
  14211. "anyOf": [
  14212. {
  14213. "type": "string"
  14214. },
  14215. {
  14216. "type": "null"
  14217. }
  14218. ]
  14219. },
  14220. "model": {
  14221. "anyOf": [
  14222. {
  14223. "type": "object",
  14224. "properties": {
  14225. "id": {
  14226. "type": "string"
  14227. },
  14228. "providerID": {
  14229. "type": "string"
  14230. },
  14231. "variant": {
  14232. "type": "string"
  14233. }
  14234. },
  14235. "required": ["id", "providerID"],
  14236. "additionalProperties": false
  14237. },
  14238. {
  14239. "type": "null"
  14240. }
  14241. ]
  14242. },
  14243. "version": {
  14244. "anyOf": [
  14245. {
  14246. "type": "string"
  14247. },
  14248. {
  14249. "type": "null"
  14250. }
  14251. ]
  14252. },
  14253. "time": {
  14254. "type": "object",
  14255. "properties": {
  14256. "created": {
  14257. "anyOf": [
  14258. {
  14259. "type": "integer",
  14260. "minimum": 0
  14261. },
  14262. {
  14263. "type": "null"
  14264. }
  14265. ]
  14266. },
  14267. "updated": {
  14268. "anyOf": [
  14269. {
  14270. "type": "integer",
  14271. "minimum": 0
  14272. },
  14273. {
  14274. "type": "null"
  14275. }
  14276. ]
  14277. },
  14278. "compacting": {
  14279. "anyOf": [
  14280. {
  14281. "type": "integer",
  14282. "minimum": 0
  14283. },
  14284. {
  14285. "type": "null"
  14286. }
  14287. ]
  14288. },
  14289. "archived": {
  14290. "anyOf": [
  14291. {
  14292. "type": "number"
  14293. },
  14294. {
  14295. "type": "null"
  14296. }
  14297. ]
  14298. }
  14299. },
  14300. "additionalProperties": false
  14301. },
  14302. "permission": {
  14303. "anyOf": [
  14304. {
  14305. "$ref": "#/components/schemas/PermissionRuleset"
  14306. },
  14307. {
  14308. "type": "null"
  14309. }
  14310. ]
  14311. },
  14312. "revert": {
  14313. "anyOf": [
  14314. {
  14315. "type": "object",
  14316. "properties": {
  14317. "messageID": {
  14318. "type": "string"
  14319. },
  14320. "partID": {
  14321. "type": "string"
  14322. },
  14323. "snapshot": {
  14324. "type": "string"
  14325. },
  14326. "diff": {
  14327. "type": "string"
  14328. }
  14329. },
  14330. "required": ["messageID"],
  14331. "additionalProperties": false
  14332. },
  14333. {
  14334. "type": "null"
  14335. }
  14336. ]
  14337. }
  14338. },
  14339. "additionalProperties": false
  14340. }
  14341. },
  14342. "required": ["sessionID", "info"],
  14343. "additionalProperties": false
  14344. }
  14345. },
  14346. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14347. "additionalProperties": false
  14348. },
  14349. "SyncEventSessionDeleted": {
  14350. "type": "object",
  14351. "properties": {
  14352. "type": {
  14353. "type": "string",
  14354. "enum": ["sync"]
  14355. },
  14356. "name": {
  14357. "type": "string",
  14358. "enum": ["session.deleted.1"]
  14359. },
  14360. "id": {
  14361. "type": "string"
  14362. },
  14363. "seq": {
  14364. "type": "number"
  14365. },
  14366. "aggregateID": {
  14367. "type": "string",
  14368. "enum": ["sessionID"]
  14369. },
  14370. "data": {
  14371. "type": "object",
  14372. "properties": {
  14373. "sessionID": {
  14374. "type": "string"
  14375. },
  14376. "info": {
  14377. "$ref": "#/components/schemas/Session"
  14378. }
  14379. },
  14380. "required": ["sessionID", "info"],
  14381. "additionalProperties": false
  14382. }
  14383. },
  14384. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14385. "additionalProperties": false
  14386. },
  14387. "SyncEventSessionNextAgentSwitched": {
  14388. "type": "object",
  14389. "properties": {
  14390. "type": {
  14391. "type": "string",
  14392. "enum": ["sync"]
  14393. },
  14394. "name": {
  14395. "type": "string",
  14396. "enum": ["session.next.agent.switched.1"]
  14397. },
  14398. "id": {
  14399. "type": "string"
  14400. },
  14401. "seq": {
  14402. "type": "number"
  14403. },
  14404. "aggregateID": {
  14405. "type": "string",
  14406. "enum": ["sessionID"]
  14407. },
  14408. "data": {
  14409. "type": "object",
  14410. "properties": {
  14411. "timestamp": {
  14412. "type": "number"
  14413. },
  14414. "sessionID": {
  14415. "type": "string"
  14416. },
  14417. "agent": {
  14418. "type": "string"
  14419. }
  14420. },
  14421. "required": ["timestamp", "sessionID", "agent"],
  14422. "additionalProperties": false
  14423. }
  14424. },
  14425. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14426. "additionalProperties": false
  14427. },
  14428. "SyncEventSessionNextModelSwitched": {
  14429. "type": "object",
  14430. "properties": {
  14431. "type": {
  14432. "type": "string",
  14433. "enum": ["sync"]
  14434. },
  14435. "name": {
  14436. "type": "string",
  14437. "enum": ["session.next.model.switched.1"]
  14438. },
  14439. "id": {
  14440. "type": "string"
  14441. },
  14442. "seq": {
  14443. "type": "number"
  14444. },
  14445. "aggregateID": {
  14446. "type": "string",
  14447. "enum": ["sessionID"]
  14448. },
  14449. "data": {
  14450. "type": "object",
  14451. "properties": {
  14452. "timestamp": {
  14453. "type": "number"
  14454. },
  14455. "sessionID": {
  14456. "type": "string"
  14457. },
  14458. "model": {
  14459. "type": "object",
  14460. "properties": {
  14461. "id": {
  14462. "type": "string"
  14463. },
  14464. "providerID": {
  14465. "type": "string"
  14466. },
  14467. "variant": {
  14468. "type": "string"
  14469. }
  14470. },
  14471. "required": ["id", "providerID", "variant"],
  14472. "additionalProperties": false
  14473. }
  14474. },
  14475. "required": ["timestamp", "sessionID", "model"],
  14476. "additionalProperties": false
  14477. }
  14478. },
  14479. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14480. "additionalProperties": false
  14481. },
  14482. "SyncEventSessionNextPrompted": {
  14483. "type": "object",
  14484. "properties": {
  14485. "type": {
  14486. "type": "string",
  14487. "enum": ["sync"]
  14488. },
  14489. "name": {
  14490. "type": "string",
  14491. "enum": ["session.next.prompted.1"]
  14492. },
  14493. "id": {
  14494. "type": "string"
  14495. },
  14496. "seq": {
  14497. "type": "number"
  14498. },
  14499. "aggregateID": {
  14500. "type": "string",
  14501. "enum": ["sessionID"]
  14502. },
  14503. "data": {
  14504. "type": "object",
  14505. "properties": {
  14506. "timestamp": {
  14507. "type": "number"
  14508. },
  14509. "sessionID": {
  14510. "type": "string"
  14511. },
  14512. "prompt": {
  14513. "$ref": "#/components/schemas/Prompt"
  14514. }
  14515. },
  14516. "required": ["timestamp", "sessionID", "prompt"],
  14517. "additionalProperties": false
  14518. }
  14519. },
  14520. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14521. "additionalProperties": false
  14522. },
  14523. "SyncEventSessionNextSynthetic": {
  14524. "type": "object",
  14525. "properties": {
  14526. "type": {
  14527. "type": "string",
  14528. "enum": ["sync"]
  14529. },
  14530. "name": {
  14531. "type": "string",
  14532. "enum": ["session.next.synthetic.1"]
  14533. },
  14534. "id": {
  14535. "type": "string"
  14536. },
  14537. "seq": {
  14538. "type": "number"
  14539. },
  14540. "aggregateID": {
  14541. "type": "string",
  14542. "enum": ["sessionID"]
  14543. },
  14544. "data": {
  14545. "type": "object",
  14546. "properties": {
  14547. "timestamp": {
  14548. "type": "number"
  14549. },
  14550. "sessionID": {
  14551. "type": "string"
  14552. },
  14553. "text": {
  14554. "type": "string"
  14555. }
  14556. },
  14557. "required": ["timestamp", "sessionID", "text"],
  14558. "additionalProperties": false
  14559. }
  14560. },
  14561. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14562. "additionalProperties": false
  14563. },
  14564. "SyncEventSessionNextShellStarted": {
  14565. "type": "object",
  14566. "properties": {
  14567. "type": {
  14568. "type": "string",
  14569. "enum": ["sync"]
  14570. },
  14571. "name": {
  14572. "type": "string",
  14573. "enum": ["session.next.shell.started.1"]
  14574. },
  14575. "id": {
  14576. "type": "string"
  14577. },
  14578. "seq": {
  14579. "type": "number"
  14580. },
  14581. "aggregateID": {
  14582. "type": "string",
  14583. "enum": ["sessionID"]
  14584. },
  14585. "data": {
  14586. "type": "object",
  14587. "properties": {
  14588. "timestamp": {
  14589. "type": "number"
  14590. },
  14591. "sessionID": {
  14592. "type": "string"
  14593. },
  14594. "callID": {
  14595. "type": "string"
  14596. },
  14597. "command": {
  14598. "type": "string"
  14599. }
  14600. },
  14601. "required": ["timestamp", "sessionID", "callID", "command"],
  14602. "additionalProperties": false
  14603. }
  14604. },
  14605. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14606. "additionalProperties": false
  14607. },
  14608. "SyncEventSessionNextShellEnded": {
  14609. "type": "object",
  14610. "properties": {
  14611. "type": {
  14612. "type": "string",
  14613. "enum": ["sync"]
  14614. },
  14615. "name": {
  14616. "type": "string",
  14617. "enum": ["session.next.shell.ended.1"]
  14618. },
  14619. "id": {
  14620. "type": "string"
  14621. },
  14622. "seq": {
  14623. "type": "number"
  14624. },
  14625. "aggregateID": {
  14626. "type": "string",
  14627. "enum": ["sessionID"]
  14628. },
  14629. "data": {
  14630. "type": "object",
  14631. "properties": {
  14632. "timestamp": {
  14633. "type": "number"
  14634. },
  14635. "sessionID": {
  14636. "type": "string"
  14637. },
  14638. "callID": {
  14639. "type": "string"
  14640. },
  14641. "output": {
  14642. "type": "string"
  14643. }
  14644. },
  14645. "required": ["timestamp", "sessionID", "callID", "output"],
  14646. "additionalProperties": false
  14647. }
  14648. },
  14649. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14650. "additionalProperties": false
  14651. },
  14652. "SyncEventSessionNextStepStarted": {
  14653. "type": "object",
  14654. "properties": {
  14655. "type": {
  14656. "type": "string",
  14657. "enum": ["sync"]
  14658. },
  14659. "name": {
  14660. "type": "string",
  14661. "enum": ["session.next.step.started.1"]
  14662. },
  14663. "id": {
  14664. "type": "string"
  14665. },
  14666. "seq": {
  14667. "type": "number"
  14668. },
  14669. "aggregateID": {
  14670. "type": "string",
  14671. "enum": ["sessionID"]
  14672. },
  14673. "data": {
  14674. "type": "object",
  14675. "properties": {
  14676. "timestamp": {
  14677. "type": "number"
  14678. },
  14679. "sessionID": {
  14680. "type": "string"
  14681. },
  14682. "agent": {
  14683. "type": "string"
  14684. },
  14685. "model": {
  14686. "type": "object",
  14687. "properties": {
  14688. "id": {
  14689. "type": "string"
  14690. },
  14691. "providerID": {
  14692. "type": "string"
  14693. },
  14694. "variant": {
  14695. "type": "string"
  14696. }
  14697. },
  14698. "required": ["id", "providerID", "variant"],
  14699. "additionalProperties": false
  14700. },
  14701. "snapshot": {
  14702. "type": "string"
  14703. }
  14704. },
  14705. "required": ["timestamp", "sessionID", "agent", "model"],
  14706. "additionalProperties": false
  14707. }
  14708. },
  14709. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14710. "additionalProperties": false
  14711. },
  14712. "SyncEventSessionNextStepEnded": {
  14713. "type": "object",
  14714. "properties": {
  14715. "type": {
  14716. "type": "string",
  14717. "enum": ["sync"]
  14718. },
  14719. "name": {
  14720. "type": "string",
  14721. "enum": ["session.next.step.ended.1"]
  14722. },
  14723. "id": {
  14724. "type": "string"
  14725. },
  14726. "seq": {
  14727. "type": "number"
  14728. },
  14729. "aggregateID": {
  14730. "type": "string",
  14731. "enum": ["sessionID"]
  14732. },
  14733. "data": {
  14734. "type": "object",
  14735. "properties": {
  14736. "timestamp": {
  14737. "type": "number"
  14738. },
  14739. "sessionID": {
  14740. "type": "string"
  14741. },
  14742. "finish": {
  14743. "type": "string"
  14744. },
  14745. "cost": {
  14746. "type": "number"
  14747. },
  14748. "tokens": {
  14749. "type": "object",
  14750. "properties": {
  14751. "input": {
  14752. "type": "integer",
  14753. "minimum": 0
  14754. },
  14755. "output": {
  14756. "type": "integer",
  14757. "minimum": 0
  14758. },
  14759. "reasoning": {
  14760. "type": "integer",
  14761. "minimum": 0
  14762. },
  14763. "cache": {
  14764. "type": "object",
  14765. "properties": {
  14766. "read": {
  14767. "type": "integer",
  14768. "minimum": 0
  14769. },
  14770. "write": {
  14771. "type": "integer",
  14772. "minimum": 0
  14773. }
  14774. },
  14775. "required": ["read", "write"],
  14776. "additionalProperties": false
  14777. }
  14778. },
  14779. "required": ["input", "output", "reasoning", "cache"],
  14780. "additionalProperties": false
  14781. },
  14782. "snapshot": {
  14783. "type": "string"
  14784. }
  14785. },
  14786. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  14787. "additionalProperties": false
  14788. }
  14789. },
  14790. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14791. "additionalProperties": false
  14792. },
  14793. "SyncEventSessionNextStepFailed": {
  14794. "type": "object",
  14795. "properties": {
  14796. "type": {
  14797. "type": "string",
  14798. "enum": ["sync"]
  14799. },
  14800. "name": {
  14801. "type": "string",
  14802. "enum": ["session.next.step.failed.1"]
  14803. },
  14804. "id": {
  14805. "type": "string"
  14806. },
  14807. "seq": {
  14808. "type": "number"
  14809. },
  14810. "aggregateID": {
  14811. "type": "string",
  14812. "enum": ["sessionID"]
  14813. },
  14814. "data": {
  14815. "type": "object",
  14816. "properties": {
  14817. "timestamp": {
  14818. "type": "number"
  14819. },
  14820. "sessionID": {
  14821. "type": "string"
  14822. },
  14823. "error": {
  14824. "$ref": "#/components/schemas/SessionErrorUnknown"
  14825. }
  14826. },
  14827. "required": ["timestamp", "sessionID", "error"],
  14828. "additionalProperties": false
  14829. }
  14830. },
  14831. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14832. "additionalProperties": false
  14833. },
  14834. "SyncEventSessionNextTextStarted": {
  14835. "type": "object",
  14836. "properties": {
  14837. "type": {
  14838. "type": "string",
  14839. "enum": ["sync"]
  14840. },
  14841. "name": {
  14842. "type": "string",
  14843. "enum": ["session.next.text.started.1"]
  14844. },
  14845. "id": {
  14846. "type": "string"
  14847. },
  14848. "seq": {
  14849. "type": "number"
  14850. },
  14851. "aggregateID": {
  14852. "type": "string",
  14853. "enum": ["sessionID"]
  14854. },
  14855. "data": {
  14856. "type": "object",
  14857. "properties": {
  14858. "timestamp": {
  14859. "type": "number"
  14860. },
  14861. "sessionID": {
  14862. "type": "string"
  14863. }
  14864. },
  14865. "required": ["timestamp", "sessionID"],
  14866. "additionalProperties": false
  14867. }
  14868. },
  14869. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14870. "additionalProperties": false
  14871. },
  14872. "SyncEventSessionNextTextDelta": {
  14873. "type": "object",
  14874. "properties": {
  14875. "type": {
  14876. "type": "string",
  14877. "enum": ["sync"]
  14878. },
  14879. "name": {
  14880. "type": "string",
  14881. "enum": ["session.next.text.delta.1"]
  14882. },
  14883. "id": {
  14884. "type": "string"
  14885. },
  14886. "seq": {
  14887. "type": "number"
  14888. },
  14889. "aggregateID": {
  14890. "type": "string",
  14891. "enum": ["sessionID"]
  14892. },
  14893. "data": {
  14894. "type": "object",
  14895. "properties": {
  14896. "timestamp": {
  14897. "type": "number"
  14898. },
  14899. "sessionID": {
  14900. "type": "string"
  14901. },
  14902. "delta": {
  14903. "type": "string"
  14904. }
  14905. },
  14906. "required": ["timestamp", "sessionID", "delta"],
  14907. "additionalProperties": false
  14908. }
  14909. },
  14910. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14911. "additionalProperties": false
  14912. },
  14913. "SyncEventSessionNextTextEnded": {
  14914. "type": "object",
  14915. "properties": {
  14916. "type": {
  14917. "type": "string",
  14918. "enum": ["sync"]
  14919. },
  14920. "name": {
  14921. "type": "string",
  14922. "enum": ["session.next.text.ended.1"]
  14923. },
  14924. "id": {
  14925. "type": "string"
  14926. },
  14927. "seq": {
  14928. "type": "number"
  14929. },
  14930. "aggregateID": {
  14931. "type": "string",
  14932. "enum": ["sessionID"]
  14933. },
  14934. "data": {
  14935. "type": "object",
  14936. "properties": {
  14937. "timestamp": {
  14938. "type": "number"
  14939. },
  14940. "sessionID": {
  14941. "type": "string"
  14942. },
  14943. "text": {
  14944. "type": "string"
  14945. }
  14946. },
  14947. "required": ["timestamp", "sessionID", "text"],
  14948. "additionalProperties": false
  14949. }
  14950. },
  14951. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14952. "additionalProperties": false
  14953. },
  14954. "SyncEventSessionNextReasoningStarted": {
  14955. "type": "object",
  14956. "properties": {
  14957. "type": {
  14958. "type": "string",
  14959. "enum": ["sync"]
  14960. },
  14961. "name": {
  14962. "type": "string",
  14963. "enum": ["session.next.reasoning.started.1"]
  14964. },
  14965. "id": {
  14966. "type": "string"
  14967. },
  14968. "seq": {
  14969. "type": "number"
  14970. },
  14971. "aggregateID": {
  14972. "type": "string",
  14973. "enum": ["sessionID"]
  14974. },
  14975. "data": {
  14976. "type": "object",
  14977. "properties": {
  14978. "timestamp": {
  14979. "type": "number"
  14980. },
  14981. "sessionID": {
  14982. "type": "string"
  14983. },
  14984. "reasoningID": {
  14985. "type": "string"
  14986. }
  14987. },
  14988. "required": ["timestamp", "sessionID", "reasoningID"],
  14989. "additionalProperties": false
  14990. }
  14991. },
  14992. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14993. "additionalProperties": false
  14994. },
  14995. "SyncEventSessionNextReasoningDelta": {
  14996. "type": "object",
  14997. "properties": {
  14998. "type": {
  14999. "type": "string",
  15000. "enum": ["sync"]
  15001. },
  15002. "name": {
  15003. "type": "string",
  15004. "enum": ["session.next.reasoning.delta.1"]
  15005. },
  15006. "id": {
  15007. "type": "string"
  15008. },
  15009. "seq": {
  15010. "type": "number"
  15011. },
  15012. "aggregateID": {
  15013. "type": "string",
  15014. "enum": ["sessionID"]
  15015. },
  15016. "data": {
  15017. "type": "object",
  15018. "properties": {
  15019. "timestamp": {
  15020. "type": "number"
  15021. },
  15022. "sessionID": {
  15023. "type": "string"
  15024. },
  15025. "reasoningID": {
  15026. "type": "string"
  15027. },
  15028. "delta": {
  15029. "type": "string"
  15030. }
  15031. },
  15032. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  15033. "additionalProperties": false
  15034. }
  15035. },
  15036. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15037. "additionalProperties": false
  15038. },
  15039. "SyncEventSessionNextReasoningEnded": {
  15040. "type": "object",
  15041. "properties": {
  15042. "type": {
  15043. "type": "string",
  15044. "enum": ["sync"]
  15045. },
  15046. "name": {
  15047. "type": "string",
  15048. "enum": ["session.next.reasoning.ended.1"]
  15049. },
  15050. "id": {
  15051. "type": "string"
  15052. },
  15053. "seq": {
  15054. "type": "number"
  15055. },
  15056. "aggregateID": {
  15057. "type": "string",
  15058. "enum": ["sessionID"]
  15059. },
  15060. "data": {
  15061. "type": "object",
  15062. "properties": {
  15063. "timestamp": {
  15064. "type": "number"
  15065. },
  15066. "sessionID": {
  15067. "type": "string"
  15068. },
  15069. "reasoningID": {
  15070. "type": "string"
  15071. },
  15072. "text": {
  15073. "type": "string"
  15074. }
  15075. },
  15076. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  15077. "additionalProperties": false
  15078. }
  15079. },
  15080. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15081. "additionalProperties": false
  15082. },
  15083. "SyncEventSessionNextToolInputStarted": {
  15084. "type": "object",
  15085. "properties": {
  15086. "type": {
  15087. "type": "string",
  15088. "enum": ["sync"]
  15089. },
  15090. "name": {
  15091. "type": "string",
  15092. "enum": ["session.next.tool.input.started.1"]
  15093. },
  15094. "id": {
  15095. "type": "string"
  15096. },
  15097. "seq": {
  15098. "type": "number"
  15099. },
  15100. "aggregateID": {
  15101. "type": "string",
  15102. "enum": ["sessionID"]
  15103. },
  15104. "data": {
  15105. "type": "object",
  15106. "properties": {
  15107. "timestamp": {
  15108. "type": "number"
  15109. },
  15110. "sessionID": {
  15111. "type": "string"
  15112. },
  15113. "callID": {
  15114. "type": "string"
  15115. },
  15116. "name": {
  15117. "type": "string"
  15118. }
  15119. },
  15120. "required": ["timestamp", "sessionID", "callID", "name"],
  15121. "additionalProperties": false
  15122. }
  15123. },
  15124. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15125. "additionalProperties": false
  15126. },
  15127. "SyncEventSessionNextToolInputDelta": {
  15128. "type": "object",
  15129. "properties": {
  15130. "type": {
  15131. "type": "string",
  15132. "enum": ["sync"]
  15133. },
  15134. "name": {
  15135. "type": "string",
  15136. "enum": ["session.next.tool.input.delta.1"]
  15137. },
  15138. "id": {
  15139. "type": "string"
  15140. },
  15141. "seq": {
  15142. "type": "number"
  15143. },
  15144. "aggregateID": {
  15145. "type": "string",
  15146. "enum": ["sessionID"]
  15147. },
  15148. "data": {
  15149. "type": "object",
  15150. "properties": {
  15151. "timestamp": {
  15152. "type": "number"
  15153. },
  15154. "sessionID": {
  15155. "type": "string"
  15156. },
  15157. "callID": {
  15158. "type": "string"
  15159. },
  15160. "delta": {
  15161. "type": "string"
  15162. }
  15163. },
  15164. "required": ["timestamp", "sessionID", "callID", "delta"],
  15165. "additionalProperties": false
  15166. }
  15167. },
  15168. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15169. "additionalProperties": false
  15170. },
  15171. "SyncEventSessionNextToolInputEnded": {
  15172. "type": "object",
  15173. "properties": {
  15174. "type": {
  15175. "type": "string",
  15176. "enum": ["sync"]
  15177. },
  15178. "name": {
  15179. "type": "string",
  15180. "enum": ["session.next.tool.input.ended.1"]
  15181. },
  15182. "id": {
  15183. "type": "string"
  15184. },
  15185. "seq": {
  15186. "type": "number"
  15187. },
  15188. "aggregateID": {
  15189. "type": "string",
  15190. "enum": ["sessionID"]
  15191. },
  15192. "data": {
  15193. "type": "object",
  15194. "properties": {
  15195. "timestamp": {
  15196. "type": "number"
  15197. },
  15198. "sessionID": {
  15199. "type": "string"
  15200. },
  15201. "callID": {
  15202. "type": "string"
  15203. },
  15204. "text": {
  15205. "type": "string"
  15206. }
  15207. },
  15208. "required": ["timestamp", "sessionID", "callID", "text"],
  15209. "additionalProperties": false
  15210. }
  15211. },
  15212. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15213. "additionalProperties": false
  15214. },
  15215. "SyncEventSessionNextToolCalled": {
  15216. "type": "object",
  15217. "properties": {
  15218. "type": {
  15219. "type": "string",
  15220. "enum": ["sync"]
  15221. },
  15222. "name": {
  15223. "type": "string",
  15224. "enum": ["session.next.tool.called.1"]
  15225. },
  15226. "id": {
  15227. "type": "string"
  15228. },
  15229. "seq": {
  15230. "type": "number"
  15231. },
  15232. "aggregateID": {
  15233. "type": "string",
  15234. "enum": ["sessionID"]
  15235. },
  15236. "data": {
  15237. "type": "object",
  15238. "properties": {
  15239. "timestamp": {
  15240. "type": "number"
  15241. },
  15242. "sessionID": {
  15243. "type": "string"
  15244. },
  15245. "callID": {
  15246. "type": "string"
  15247. },
  15248. "tool": {
  15249. "type": "string"
  15250. },
  15251. "input": {
  15252. "type": "object"
  15253. },
  15254. "provider": {
  15255. "type": "object",
  15256. "properties": {
  15257. "executed": {
  15258. "type": "boolean"
  15259. },
  15260. "metadata": {
  15261. "type": "object"
  15262. }
  15263. },
  15264. "required": ["executed"],
  15265. "additionalProperties": false
  15266. }
  15267. },
  15268. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  15269. "additionalProperties": false
  15270. }
  15271. },
  15272. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15273. "additionalProperties": false
  15274. },
  15275. "SyncEventSessionNextToolProgress": {
  15276. "type": "object",
  15277. "properties": {
  15278. "type": {
  15279. "type": "string",
  15280. "enum": ["sync"]
  15281. },
  15282. "name": {
  15283. "type": "string",
  15284. "enum": ["session.next.tool.progress.1"]
  15285. },
  15286. "id": {
  15287. "type": "string"
  15288. },
  15289. "seq": {
  15290. "type": "number"
  15291. },
  15292. "aggregateID": {
  15293. "type": "string",
  15294. "enum": ["sessionID"]
  15295. },
  15296. "data": {
  15297. "type": "object",
  15298. "properties": {
  15299. "timestamp": {
  15300. "type": "number"
  15301. },
  15302. "sessionID": {
  15303. "type": "string"
  15304. },
  15305. "callID": {
  15306. "type": "string"
  15307. },
  15308. "structured": {
  15309. "type": "object"
  15310. },
  15311. "content": {
  15312. "type": "array",
  15313. "items": {
  15314. "anyOf": [
  15315. {
  15316. "$ref": "#/components/schemas/ToolTextContent"
  15317. },
  15318. {
  15319. "$ref": "#/components/schemas/ToolFileContent"
  15320. }
  15321. ]
  15322. }
  15323. }
  15324. },
  15325. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  15326. "additionalProperties": false
  15327. }
  15328. },
  15329. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15330. "additionalProperties": false
  15331. },
  15332. "SyncEventSessionNextToolSuccess": {
  15333. "type": "object",
  15334. "properties": {
  15335. "type": {
  15336. "type": "string",
  15337. "enum": ["sync"]
  15338. },
  15339. "name": {
  15340. "type": "string",
  15341. "enum": ["session.next.tool.success.1"]
  15342. },
  15343. "id": {
  15344. "type": "string"
  15345. },
  15346. "seq": {
  15347. "type": "number"
  15348. },
  15349. "aggregateID": {
  15350. "type": "string",
  15351. "enum": ["sessionID"]
  15352. },
  15353. "data": {
  15354. "type": "object",
  15355. "properties": {
  15356. "timestamp": {
  15357. "type": "number"
  15358. },
  15359. "sessionID": {
  15360. "type": "string"
  15361. },
  15362. "callID": {
  15363. "type": "string"
  15364. },
  15365. "structured": {
  15366. "type": "object"
  15367. },
  15368. "content": {
  15369. "type": "array",
  15370. "items": {
  15371. "anyOf": [
  15372. {
  15373. "$ref": "#/components/schemas/ToolTextContent"
  15374. },
  15375. {
  15376. "$ref": "#/components/schemas/ToolFileContent"
  15377. }
  15378. ]
  15379. }
  15380. },
  15381. "provider": {
  15382. "type": "object",
  15383. "properties": {
  15384. "executed": {
  15385. "type": "boolean"
  15386. },
  15387. "metadata": {
  15388. "type": "object"
  15389. }
  15390. },
  15391. "required": ["executed"],
  15392. "additionalProperties": false
  15393. }
  15394. },
  15395. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  15396. "additionalProperties": false
  15397. }
  15398. },
  15399. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15400. "additionalProperties": false
  15401. },
  15402. "SyncEventSessionNextToolFailed": {
  15403. "type": "object",
  15404. "properties": {
  15405. "type": {
  15406. "type": "string",
  15407. "enum": ["sync"]
  15408. },
  15409. "name": {
  15410. "type": "string",
  15411. "enum": ["session.next.tool.failed.1"]
  15412. },
  15413. "id": {
  15414. "type": "string"
  15415. },
  15416. "seq": {
  15417. "type": "number"
  15418. },
  15419. "aggregateID": {
  15420. "type": "string",
  15421. "enum": ["sessionID"]
  15422. },
  15423. "data": {
  15424. "type": "object",
  15425. "properties": {
  15426. "timestamp": {
  15427. "type": "number"
  15428. },
  15429. "sessionID": {
  15430. "type": "string"
  15431. },
  15432. "callID": {
  15433. "type": "string"
  15434. },
  15435. "error": {
  15436. "$ref": "#/components/schemas/SessionErrorUnknown"
  15437. },
  15438. "provider": {
  15439. "type": "object",
  15440. "properties": {
  15441. "executed": {
  15442. "type": "boolean"
  15443. },
  15444. "metadata": {
  15445. "type": "object"
  15446. }
  15447. },
  15448. "required": ["executed"],
  15449. "additionalProperties": false
  15450. }
  15451. },
  15452. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  15453. "additionalProperties": false
  15454. }
  15455. },
  15456. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15457. "additionalProperties": false
  15458. },
  15459. "SyncEventSessionNextRetried": {
  15460. "type": "object",
  15461. "properties": {
  15462. "type": {
  15463. "type": "string",
  15464. "enum": ["sync"]
  15465. },
  15466. "name": {
  15467. "type": "string",
  15468. "enum": ["session.next.retried.1"]
  15469. },
  15470. "id": {
  15471. "type": "string"
  15472. },
  15473. "seq": {
  15474. "type": "number"
  15475. },
  15476. "aggregateID": {
  15477. "type": "string",
  15478. "enum": ["sessionID"]
  15479. },
  15480. "data": {
  15481. "type": "object",
  15482. "properties": {
  15483. "timestamp": {
  15484. "type": "number"
  15485. },
  15486. "sessionID": {
  15487. "type": "string"
  15488. },
  15489. "attempt": {
  15490. "type": "integer",
  15491. "minimum": 0
  15492. },
  15493. "error": {
  15494. "$ref": "#/components/schemas/SessionNextRetry_error"
  15495. }
  15496. },
  15497. "required": ["timestamp", "sessionID", "attempt", "error"],
  15498. "additionalProperties": false
  15499. }
  15500. },
  15501. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15502. "additionalProperties": false
  15503. },
  15504. "SyncEventSessionNextCompactionStarted": {
  15505. "type": "object",
  15506. "properties": {
  15507. "type": {
  15508. "type": "string",
  15509. "enum": ["sync"]
  15510. },
  15511. "name": {
  15512. "type": "string",
  15513. "enum": ["session.next.compaction.started.1"]
  15514. },
  15515. "id": {
  15516. "type": "string"
  15517. },
  15518. "seq": {
  15519. "type": "number"
  15520. },
  15521. "aggregateID": {
  15522. "type": "string",
  15523. "enum": ["sessionID"]
  15524. },
  15525. "data": {
  15526. "type": "object",
  15527. "properties": {
  15528. "timestamp": {
  15529. "type": "number"
  15530. },
  15531. "sessionID": {
  15532. "type": "string"
  15533. },
  15534. "reason": {
  15535. "type": "string",
  15536. "enum": ["auto", "manual"]
  15537. }
  15538. },
  15539. "required": ["timestamp", "sessionID", "reason"],
  15540. "additionalProperties": false
  15541. }
  15542. },
  15543. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15544. "additionalProperties": false
  15545. },
  15546. "SyncEventSessionNextCompactionDelta": {
  15547. "type": "object",
  15548. "properties": {
  15549. "type": {
  15550. "type": "string",
  15551. "enum": ["sync"]
  15552. },
  15553. "name": {
  15554. "type": "string",
  15555. "enum": ["session.next.compaction.delta.1"]
  15556. },
  15557. "id": {
  15558. "type": "string"
  15559. },
  15560. "seq": {
  15561. "type": "number"
  15562. },
  15563. "aggregateID": {
  15564. "type": "string",
  15565. "enum": ["sessionID"]
  15566. },
  15567. "data": {
  15568. "type": "object",
  15569. "properties": {
  15570. "timestamp": {
  15571. "type": "number"
  15572. },
  15573. "sessionID": {
  15574. "type": "string"
  15575. },
  15576. "text": {
  15577. "type": "string"
  15578. }
  15579. },
  15580. "required": ["timestamp", "sessionID", "text"],
  15581. "additionalProperties": false
  15582. }
  15583. },
  15584. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15585. "additionalProperties": false
  15586. },
  15587. "SyncEventSessionNextCompactionEnded": {
  15588. "type": "object",
  15589. "properties": {
  15590. "type": {
  15591. "type": "string",
  15592. "enum": ["sync"]
  15593. },
  15594. "name": {
  15595. "type": "string",
  15596. "enum": ["session.next.compaction.ended.1"]
  15597. },
  15598. "id": {
  15599. "type": "string"
  15600. },
  15601. "seq": {
  15602. "type": "number"
  15603. },
  15604. "aggregateID": {
  15605. "type": "string",
  15606. "enum": ["sessionID"]
  15607. },
  15608. "data": {
  15609. "type": "object",
  15610. "properties": {
  15611. "timestamp": {
  15612. "type": "number"
  15613. },
  15614. "sessionID": {
  15615. "type": "string"
  15616. },
  15617. "text": {
  15618. "type": "string"
  15619. },
  15620. "include": {
  15621. "type": "string"
  15622. }
  15623. },
  15624. "required": ["timestamp", "sessionID", "text"],
  15625. "additionalProperties": false
  15626. }
  15627. },
  15628. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15629. "additionalProperties": false
  15630. },
  15631. "EventServerInstanceDisposed": {
  15632. "type": "object",
  15633. "properties": {
  15634. "id": {
  15635. "type": "string"
  15636. },
  15637. "type": {
  15638. "type": "string",
  15639. "enum": ["server.instance.disposed"]
  15640. },
  15641. "properties": {
  15642. "type": "object",
  15643. "properties": {
  15644. "directory": {
  15645. "type": "string"
  15646. }
  15647. },
  15648. "required": ["directory"],
  15649. "additionalProperties": false
  15650. }
  15651. },
  15652. "required": ["id", "type", "properties"],
  15653. "additionalProperties": false
  15654. },
  15655. "EventFileEdited": {
  15656. "type": "object",
  15657. "properties": {
  15658. "id": {
  15659. "type": "string"
  15660. },
  15661. "type": {
  15662. "type": "string",
  15663. "enum": ["file.edited"]
  15664. },
  15665. "properties": {
  15666. "type": "object",
  15667. "properties": {
  15668. "file": {
  15669. "type": "string"
  15670. }
  15671. },
  15672. "required": ["file"],
  15673. "additionalProperties": false
  15674. }
  15675. },
  15676. "required": ["id", "type", "properties"],
  15677. "additionalProperties": false
  15678. },
  15679. "EventFileWatcherUpdated": {
  15680. "type": "object",
  15681. "properties": {
  15682. "id": {
  15683. "type": "string"
  15684. },
  15685. "type": {
  15686. "type": "string",
  15687. "enum": ["file.watcher.updated"]
  15688. },
  15689. "properties": {
  15690. "type": "object",
  15691. "properties": {
  15692. "file": {
  15693. "type": "string"
  15694. },
  15695. "event": {
  15696. "type": "string",
  15697. "enum": ["add", "change", "unlink"]
  15698. }
  15699. },
  15700. "required": ["file", "event"],
  15701. "additionalProperties": false
  15702. }
  15703. },
  15704. "required": ["id", "type", "properties"],
  15705. "additionalProperties": false
  15706. },
  15707. "EventLspClientDiagnostics": {
  15708. "type": "object",
  15709. "properties": {
  15710. "id": {
  15711. "type": "string"
  15712. },
  15713. "type": {
  15714. "type": "string",
  15715. "enum": ["lsp.client.diagnostics"]
  15716. },
  15717. "properties": {
  15718. "type": "object",
  15719. "properties": {
  15720. "serverID": {
  15721. "type": "string"
  15722. },
  15723. "path": {
  15724. "type": "string"
  15725. }
  15726. },
  15727. "required": ["serverID", "path"],
  15728. "additionalProperties": false
  15729. }
  15730. },
  15731. "required": ["id", "type", "properties"],
  15732. "additionalProperties": false
  15733. },
  15734. "EventLspUpdated": {
  15735. "type": "object",
  15736. "properties": {
  15737. "id": {
  15738. "type": "string"
  15739. },
  15740. "type": {
  15741. "type": "string",
  15742. "enum": ["lsp.updated"]
  15743. },
  15744. "properties": {
  15745. "type": "object",
  15746. "properties": {}
  15747. }
  15748. },
  15749. "required": ["id", "type", "properties"],
  15750. "additionalProperties": false
  15751. },
  15752. "EventMessagePartDelta": {
  15753. "type": "object",
  15754. "properties": {
  15755. "id": {
  15756. "type": "string"
  15757. },
  15758. "type": {
  15759. "type": "string",
  15760. "enum": ["message.part.delta"]
  15761. },
  15762. "properties": {
  15763. "type": "object",
  15764. "properties": {
  15765. "sessionID": {
  15766. "type": "string"
  15767. },
  15768. "messageID": {
  15769. "type": "string"
  15770. },
  15771. "partID": {
  15772. "type": "string"
  15773. },
  15774. "field": {
  15775. "type": "string"
  15776. },
  15777. "delta": {
  15778. "type": "string"
  15779. }
  15780. },
  15781. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  15782. "additionalProperties": false
  15783. }
  15784. },
  15785. "required": ["id", "type", "properties"],
  15786. "additionalProperties": false
  15787. },
  15788. "EventPermissionAsked": {
  15789. "type": "object",
  15790. "properties": {
  15791. "id": {
  15792. "type": "string"
  15793. },
  15794. "type": {
  15795. "type": "string",
  15796. "enum": ["permission.asked"]
  15797. },
  15798. "properties": {
  15799. "$ref": "#/components/schemas/PermissionRequest"
  15800. }
  15801. },
  15802. "required": ["id", "type", "properties"],
  15803. "additionalProperties": false
  15804. },
  15805. "EventPermissionReplied": {
  15806. "type": "object",
  15807. "properties": {
  15808. "id": {
  15809. "type": "string"
  15810. },
  15811. "type": {
  15812. "type": "string",
  15813. "enum": ["permission.replied"]
  15814. },
  15815. "properties": {
  15816. "type": "object",
  15817. "properties": {
  15818. "sessionID": {
  15819. "type": "string"
  15820. },
  15821. "requestID": {
  15822. "type": "string",
  15823. "pattern": "^per"
  15824. },
  15825. "reply": {
  15826. "type": "string",
  15827. "enum": ["once", "always", "reject"]
  15828. }
  15829. },
  15830. "required": ["sessionID", "requestID", "reply"],
  15831. "additionalProperties": false
  15832. }
  15833. },
  15834. "required": ["id", "type", "properties"],
  15835. "additionalProperties": false
  15836. },
  15837. "EventSessionDiff": {
  15838. "type": "object",
  15839. "properties": {
  15840. "id": {
  15841. "type": "string"
  15842. },
  15843. "type": {
  15844. "type": "string",
  15845. "enum": ["session.diff"]
  15846. },
  15847. "properties": {
  15848. "type": "object",
  15849. "properties": {
  15850. "sessionID": {
  15851. "type": "string"
  15852. },
  15853. "diff": {
  15854. "type": "array",
  15855. "items": {
  15856. "$ref": "#/components/schemas/SnapshotFileDiff"
  15857. }
  15858. }
  15859. },
  15860. "required": ["sessionID", "diff"],
  15861. "additionalProperties": false
  15862. }
  15863. },
  15864. "required": ["id", "type", "properties"],
  15865. "additionalProperties": false
  15866. },
  15867. "EventSessionError": {
  15868. "type": "object",
  15869. "properties": {
  15870. "id": {
  15871. "type": "string"
  15872. },
  15873. "type": {
  15874. "type": "string",
  15875. "enum": ["session.error"]
  15876. },
  15877. "properties": {
  15878. "type": "object",
  15879. "properties": {
  15880. "sessionID": {
  15881. "type": "string"
  15882. },
  15883. "error": {
  15884. "anyOf": [
  15885. {
  15886. "$ref": "#/components/schemas/ProviderAuthError"
  15887. },
  15888. {
  15889. "$ref": "#/components/schemas/UnknownError"
  15890. },
  15891. {
  15892. "$ref": "#/components/schemas/MessageOutputLengthError"
  15893. },
  15894. {
  15895. "$ref": "#/components/schemas/MessageAbortedError"
  15896. },
  15897. {
  15898. "$ref": "#/components/schemas/StructuredOutputError"
  15899. },
  15900. {
  15901. "$ref": "#/components/schemas/ContextOverflowError"
  15902. },
  15903. {
  15904. "$ref": "#/components/schemas/APIError"
  15905. }
  15906. ]
  15907. }
  15908. },
  15909. "additionalProperties": false
  15910. }
  15911. },
  15912. "required": ["id", "type", "properties"],
  15913. "additionalProperties": false
  15914. },
  15915. "EventInstallationUpdated": {
  15916. "type": "object",
  15917. "properties": {
  15918. "id": {
  15919. "type": "string"
  15920. },
  15921. "type": {
  15922. "type": "string",
  15923. "enum": ["installation.updated"]
  15924. },
  15925. "properties": {
  15926. "type": "object",
  15927. "properties": {
  15928. "version": {
  15929. "type": "string"
  15930. }
  15931. },
  15932. "required": ["version"],
  15933. "additionalProperties": false
  15934. }
  15935. },
  15936. "required": ["id", "type", "properties"],
  15937. "additionalProperties": false
  15938. },
  15939. "EventInstallationUpdate-available": {
  15940. "type": "object",
  15941. "properties": {
  15942. "id": {
  15943. "type": "string"
  15944. },
  15945. "type": {
  15946. "type": "string",
  15947. "enum": ["installation.update-available"]
  15948. },
  15949. "properties": {
  15950. "type": "object",
  15951. "properties": {
  15952. "version": {
  15953. "type": "string"
  15954. }
  15955. },
  15956. "required": ["version"],
  15957. "additionalProperties": false
  15958. }
  15959. },
  15960. "required": ["id", "type", "properties"],
  15961. "additionalProperties": false
  15962. },
  15963. "EventQuestionAsked": {
  15964. "type": "object",
  15965. "properties": {
  15966. "id": {
  15967. "type": "string"
  15968. },
  15969. "type": {
  15970. "type": "string",
  15971. "enum": ["question.asked"]
  15972. },
  15973. "properties": {
  15974. "$ref": "#/components/schemas/QuestionRequest"
  15975. }
  15976. },
  15977. "required": ["id", "type", "properties"],
  15978. "additionalProperties": false
  15979. },
  15980. "EventQuestionReplied": {
  15981. "type": "object",
  15982. "properties": {
  15983. "id": {
  15984. "type": "string"
  15985. },
  15986. "type": {
  15987. "type": "string",
  15988. "enum": ["question.replied"]
  15989. },
  15990. "properties": {
  15991. "$ref": "#/components/schemas/QuestionReplied"
  15992. }
  15993. },
  15994. "required": ["id", "type", "properties"],
  15995. "additionalProperties": false
  15996. },
  15997. "EventQuestionRejected": {
  15998. "type": "object",
  15999. "properties": {
  16000. "id": {
  16001. "type": "string"
  16002. },
  16003. "type": {
  16004. "type": "string",
  16005. "enum": ["question.rejected"]
  16006. },
  16007. "properties": {
  16008. "$ref": "#/components/schemas/QuestionRejected"
  16009. }
  16010. },
  16011. "required": ["id", "type", "properties"],
  16012. "additionalProperties": false
  16013. },
  16014. "EventTodoUpdated": {
  16015. "type": "object",
  16016. "properties": {
  16017. "id": {
  16018. "type": "string"
  16019. },
  16020. "type": {
  16021. "type": "string",
  16022. "enum": ["todo.updated"]
  16023. },
  16024. "properties": {
  16025. "type": "object",
  16026. "properties": {
  16027. "sessionID": {
  16028. "type": "string"
  16029. },
  16030. "todos": {
  16031. "type": "array",
  16032. "items": {
  16033. "$ref": "#/components/schemas/Todo"
  16034. }
  16035. }
  16036. },
  16037. "required": ["sessionID", "todos"],
  16038. "additionalProperties": false
  16039. }
  16040. },
  16041. "required": ["id", "type", "properties"],
  16042. "additionalProperties": false
  16043. },
  16044. "EventSessionStatus": {
  16045. "type": "object",
  16046. "properties": {
  16047. "id": {
  16048. "type": "string"
  16049. },
  16050. "type": {
  16051. "type": "string",
  16052. "enum": ["session.status"]
  16053. },
  16054. "properties": {
  16055. "type": "object",
  16056. "properties": {
  16057. "sessionID": {
  16058. "type": "string"
  16059. },
  16060. "status": {
  16061. "$ref": "#/components/schemas/SessionStatus"
  16062. }
  16063. },
  16064. "required": ["sessionID", "status"],
  16065. "additionalProperties": false
  16066. }
  16067. },
  16068. "required": ["id", "type", "properties"],
  16069. "additionalProperties": false
  16070. },
  16071. "EventSessionIdle": {
  16072. "type": "object",
  16073. "properties": {
  16074. "id": {
  16075. "type": "string"
  16076. },
  16077. "type": {
  16078. "type": "string",
  16079. "enum": ["session.idle"]
  16080. },
  16081. "properties": {
  16082. "type": "object",
  16083. "properties": {
  16084. "sessionID": {
  16085. "type": "string"
  16086. }
  16087. },
  16088. "required": ["sessionID"],
  16089. "additionalProperties": false
  16090. }
  16091. },
  16092. "required": ["id", "type", "properties"],
  16093. "additionalProperties": false
  16094. },
  16095. "EventSessionCompacted": {
  16096. "type": "object",
  16097. "properties": {
  16098. "id": {
  16099. "type": "string"
  16100. },
  16101. "type": {
  16102. "type": "string",
  16103. "enum": ["session.compacted"]
  16104. },
  16105. "properties": {
  16106. "type": "object",
  16107. "properties": {
  16108. "sessionID": {
  16109. "type": "string"
  16110. }
  16111. },
  16112. "required": ["sessionID"],
  16113. "additionalProperties": false
  16114. }
  16115. },
  16116. "required": ["id", "type", "properties"],
  16117. "additionalProperties": false
  16118. },
  16119. "EventMcpToolsChanged": {
  16120. "type": "object",
  16121. "properties": {
  16122. "id": {
  16123. "type": "string"
  16124. },
  16125. "type": {
  16126. "type": "string",
  16127. "enum": ["mcp.tools.changed"]
  16128. },
  16129. "properties": {
  16130. "type": "object",
  16131. "properties": {
  16132. "server": {
  16133. "type": "string"
  16134. }
  16135. },
  16136. "required": ["server"],
  16137. "additionalProperties": false
  16138. }
  16139. },
  16140. "required": ["id", "type", "properties"],
  16141. "additionalProperties": false
  16142. },
  16143. "EventMcpBrowserOpenFailed": {
  16144. "type": "object",
  16145. "properties": {
  16146. "id": {
  16147. "type": "string"
  16148. },
  16149. "type": {
  16150. "type": "string",
  16151. "enum": ["mcp.browser.open.failed"]
  16152. },
  16153. "properties": {
  16154. "type": "object",
  16155. "properties": {
  16156. "mcpName": {
  16157. "type": "string"
  16158. },
  16159. "url": {
  16160. "type": "string"
  16161. }
  16162. },
  16163. "required": ["mcpName", "url"],
  16164. "additionalProperties": false
  16165. }
  16166. },
  16167. "required": ["id", "type", "properties"],
  16168. "additionalProperties": false
  16169. },
  16170. "EventCommandExecuted": {
  16171. "type": "object",
  16172. "properties": {
  16173. "id": {
  16174. "type": "string"
  16175. },
  16176. "type": {
  16177. "type": "string",
  16178. "enum": ["command.executed"]
  16179. },
  16180. "properties": {
  16181. "type": "object",
  16182. "properties": {
  16183. "name": {
  16184. "type": "string"
  16185. },
  16186. "sessionID": {
  16187. "type": "string"
  16188. },
  16189. "arguments": {
  16190. "type": "string"
  16191. },
  16192. "messageID": {
  16193. "type": "string"
  16194. }
  16195. },
  16196. "required": ["name", "sessionID", "arguments", "messageID"],
  16197. "additionalProperties": false
  16198. }
  16199. },
  16200. "required": ["id", "type", "properties"],
  16201. "additionalProperties": false
  16202. },
  16203. "EventProjectUpdated": {
  16204. "type": "object",
  16205. "properties": {
  16206. "id": {
  16207. "type": "string"
  16208. },
  16209. "type": {
  16210. "type": "string",
  16211. "enum": ["project.updated"]
  16212. },
  16213. "properties": {
  16214. "$ref": "#/components/schemas/Project"
  16215. }
  16216. },
  16217. "required": ["id", "type", "properties"],
  16218. "additionalProperties": false
  16219. },
  16220. "EventVcsBranchUpdated": {
  16221. "type": "object",
  16222. "properties": {
  16223. "id": {
  16224. "type": "string"
  16225. },
  16226. "type": {
  16227. "type": "string",
  16228. "enum": ["vcs.branch.updated"]
  16229. },
  16230. "properties": {
  16231. "type": "object",
  16232. "properties": {
  16233. "branch": {
  16234. "type": "string"
  16235. }
  16236. },
  16237. "additionalProperties": false
  16238. }
  16239. },
  16240. "required": ["id", "type", "properties"],
  16241. "additionalProperties": false
  16242. },
  16243. "EventWorkspaceReady": {
  16244. "type": "object",
  16245. "properties": {
  16246. "id": {
  16247. "type": "string"
  16248. },
  16249. "type": {
  16250. "type": "string",
  16251. "enum": ["workspace.ready"]
  16252. },
  16253. "properties": {
  16254. "type": "object",
  16255. "properties": {
  16256. "name": {
  16257. "type": "string"
  16258. }
  16259. },
  16260. "required": ["name"],
  16261. "additionalProperties": false
  16262. }
  16263. },
  16264. "required": ["id", "type", "properties"],
  16265. "additionalProperties": false
  16266. },
  16267. "EventWorkspaceFailed": {
  16268. "type": "object",
  16269. "properties": {
  16270. "id": {
  16271. "type": "string"
  16272. },
  16273. "type": {
  16274. "type": "string",
  16275. "enum": ["workspace.failed"]
  16276. },
  16277. "properties": {
  16278. "type": "object",
  16279. "properties": {
  16280. "message": {
  16281. "type": "string"
  16282. }
  16283. },
  16284. "required": ["message"],
  16285. "additionalProperties": false
  16286. }
  16287. },
  16288. "required": ["id", "type", "properties"],
  16289. "additionalProperties": false
  16290. },
  16291. "EventWorkspaceStatus": {
  16292. "type": "object",
  16293. "properties": {
  16294. "id": {
  16295. "type": "string"
  16296. },
  16297. "type": {
  16298. "type": "string",
  16299. "enum": ["workspace.status"]
  16300. },
  16301. "properties": {
  16302. "type": "object",
  16303. "properties": {
  16304. "workspaceID": {
  16305. "type": "string"
  16306. },
  16307. "status": {
  16308. "type": "string",
  16309. "enum": ["connected", "connecting", "disconnected", "error"]
  16310. }
  16311. },
  16312. "required": ["workspaceID", "status"],
  16313. "additionalProperties": false
  16314. }
  16315. },
  16316. "required": ["id", "type", "properties"],
  16317. "additionalProperties": false
  16318. },
  16319. "EventWorktreeReady": {
  16320. "type": "object",
  16321. "properties": {
  16322. "id": {
  16323. "type": "string"
  16324. },
  16325. "type": {
  16326. "type": "string",
  16327. "enum": ["worktree.ready"]
  16328. },
  16329. "properties": {
  16330. "type": "object",
  16331. "properties": {
  16332. "name": {
  16333. "type": "string"
  16334. },
  16335. "branch": {
  16336. "type": "string"
  16337. }
  16338. },
  16339. "required": ["name", "branch"],
  16340. "additionalProperties": false
  16341. }
  16342. },
  16343. "required": ["id", "type", "properties"],
  16344. "additionalProperties": false
  16345. },
  16346. "EventWorktreeFailed": {
  16347. "type": "object",
  16348. "properties": {
  16349. "id": {
  16350. "type": "string"
  16351. },
  16352. "type": {
  16353. "type": "string",
  16354. "enum": ["worktree.failed"]
  16355. },
  16356. "properties": {
  16357. "type": "object",
  16358. "properties": {
  16359. "message": {
  16360. "type": "string"
  16361. }
  16362. },
  16363. "required": ["message"],
  16364. "additionalProperties": false
  16365. }
  16366. },
  16367. "required": ["id", "type", "properties"],
  16368. "additionalProperties": false
  16369. },
  16370. "EventPtyCreated": {
  16371. "type": "object",
  16372. "properties": {
  16373. "id": {
  16374. "type": "string"
  16375. },
  16376. "type": {
  16377. "type": "string",
  16378. "enum": ["pty.created"]
  16379. },
  16380. "properties": {
  16381. "type": "object",
  16382. "properties": {
  16383. "info": {
  16384. "$ref": "#/components/schemas/Pty"
  16385. }
  16386. },
  16387. "required": ["info"],
  16388. "additionalProperties": false
  16389. }
  16390. },
  16391. "required": ["id", "type", "properties"],
  16392. "additionalProperties": false
  16393. },
  16394. "EventPtyUpdated": {
  16395. "type": "object",
  16396. "properties": {
  16397. "id": {
  16398. "type": "string"
  16399. },
  16400. "type": {
  16401. "type": "string",
  16402. "enum": ["pty.updated"]
  16403. },
  16404. "properties": {
  16405. "type": "object",
  16406. "properties": {
  16407. "info": {
  16408. "$ref": "#/components/schemas/Pty"
  16409. }
  16410. },
  16411. "required": ["info"],
  16412. "additionalProperties": false
  16413. }
  16414. },
  16415. "required": ["id", "type", "properties"],
  16416. "additionalProperties": false
  16417. },
  16418. "EventPtyExited": {
  16419. "type": "object",
  16420. "properties": {
  16421. "id": {
  16422. "type": "string"
  16423. },
  16424. "type": {
  16425. "type": "string",
  16426. "enum": ["pty.exited"]
  16427. },
  16428. "properties": {
  16429. "type": "object",
  16430. "properties": {
  16431. "id": {
  16432. "type": "string"
  16433. },
  16434. "exitCode": {
  16435. "type": "integer",
  16436. "minimum": 0
  16437. }
  16438. },
  16439. "required": ["id", "exitCode"],
  16440. "additionalProperties": false
  16441. }
  16442. },
  16443. "required": ["id", "type", "properties"],
  16444. "additionalProperties": false
  16445. },
  16446. "EventPtyDeleted": {
  16447. "type": "object",
  16448. "properties": {
  16449. "id": {
  16450. "type": "string"
  16451. },
  16452. "type": {
  16453. "type": "string",
  16454. "enum": ["pty.deleted"]
  16455. },
  16456. "properties": {
  16457. "type": "object",
  16458. "properties": {
  16459. "id": {
  16460. "type": "string"
  16461. }
  16462. },
  16463. "required": ["id"],
  16464. "additionalProperties": false
  16465. }
  16466. },
  16467. "required": ["id", "type", "properties"],
  16468. "additionalProperties": false
  16469. },
  16470. "EventMessageUpdated": {
  16471. "type": "object",
  16472. "properties": {
  16473. "id": {
  16474. "type": "string"
  16475. },
  16476. "type": {
  16477. "type": "string",
  16478. "enum": ["message.updated"]
  16479. },
  16480. "properties": {
  16481. "type": "object",
  16482. "properties": {
  16483. "sessionID": {
  16484. "type": "string"
  16485. },
  16486. "info": {
  16487. "$ref": "#/components/schemas/Message"
  16488. }
  16489. },
  16490. "required": ["sessionID", "info"],
  16491. "additionalProperties": false
  16492. }
  16493. },
  16494. "required": ["id", "type", "properties"],
  16495. "additionalProperties": false
  16496. },
  16497. "EventMessageRemoved": {
  16498. "type": "object",
  16499. "properties": {
  16500. "id": {
  16501. "type": "string"
  16502. },
  16503. "type": {
  16504. "type": "string",
  16505. "enum": ["message.removed"]
  16506. },
  16507. "properties": {
  16508. "type": "object",
  16509. "properties": {
  16510. "sessionID": {
  16511. "type": "string"
  16512. },
  16513. "messageID": {
  16514. "type": "string"
  16515. }
  16516. },
  16517. "required": ["sessionID", "messageID"],
  16518. "additionalProperties": false
  16519. }
  16520. },
  16521. "required": ["id", "type", "properties"],
  16522. "additionalProperties": false
  16523. },
  16524. "EventMessagePartUpdated": {
  16525. "type": "object",
  16526. "properties": {
  16527. "id": {
  16528. "type": "string"
  16529. },
  16530. "type": {
  16531. "type": "string",
  16532. "enum": ["message.part.updated"]
  16533. },
  16534. "properties": {
  16535. "type": "object",
  16536. "properties": {
  16537. "sessionID": {
  16538. "type": "string"
  16539. },
  16540. "part": {
  16541. "$ref": "#/components/schemas/Part"
  16542. },
  16543. "time": {
  16544. "type": "integer",
  16545. "minimum": 0
  16546. }
  16547. },
  16548. "required": ["sessionID", "part", "time"],
  16549. "additionalProperties": false
  16550. }
  16551. },
  16552. "required": ["id", "type", "properties"],
  16553. "additionalProperties": false
  16554. },
  16555. "EventMessagePartRemoved": {
  16556. "type": "object",
  16557. "properties": {
  16558. "id": {
  16559. "type": "string"
  16560. },
  16561. "type": {
  16562. "type": "string",
  16563. "enum": ["message.part.removed"]
  16564. },
  16565. "properties": {
  16566. "type": "object",
  16567. "properties": {
  16568. "sessionID": {
  16569. "type": "string"
  16570. },
  16571. "messageID": {
  16572. "type": "string"
  16573. },
  16574. "partID": {
  16575. "type": "string"
  16576. }
  16577. },
  16578. "required": ["sessionID", "messageID", "partID"],
  16579. "additionalProperties": false
  16580. }
  16581. },
  16582. "required": ["id", "type", "properties"],
  16583. "additionalProperties": false
  16584. },
  16585. "EventSessionCreated": {
  16586. "type": "object",
  16587. "properties": {
  16588. "id": {
  16589. "type": "string"
  16590. },
  16591. "type": {
  16592. "type": "string",
  16593. "enum": ["session.created"]
  16594. },
  16595. "properties": {
  16596. "type": "object",
  16597. "properties": {
  16598. "sessionID": {
  16599. "type": "string"
  16600. },
  16601. "info": {
  16602. "$ref": "#/components/schemas/Session"
  16603. }
  16604. },
  16605. "required": ["sessionID", "info"],
  16606. "additionalProperties": false
  16607. }
  16608. },
  16609. "required": ["id", "type", "properties"],
  16610. "additionalProperties": false
  16611. },
  16612. "EventSessionUpdated": {
  16613. "type": "object",
  16614. "properties": {
  16615. "id": {
  16616. "type": "string"
  16617. },
  16618. "type": {
  16619. "type": "string",
  16620. "enum": ["session.updated"]
  16621. },
  16622. "properties": {
  16623. "type": "object",
  16624. "properties": {
  16625. "sessionID": {
  16626. "type": "string"
  16627. },
  16628. "info": {
  16629. "$ref": "#/components/schemas/Session"
  16630. }
  16631. },
  16632. "required": ["sessionID", "info"],
  16633. "additionalProperties": false
  16634. }
  16635. },
  16636. "required": ["id", "type", "properties"],
  16637. "additionalProperties": false
  16638. },
  16639. "EventSessionDeleted": {
  16640. "type": "object",
  16641. "properties": {
  16642. "id": {
  16643. "type": "string"
  16644. },
  16645. "type": {
  16646. "type": "string",
  16647. "enum": ["session.deleted"]
  16648. },
  16649. "properties": {
  16650. "type": "object",
  16651. "properties": {
  16652. "sessionID": {
  16653. "type": "string"
  16654. },
  16655. "info": {
  16656. "$ref": "#/components/schemas/Session"
  16657. }
  16658. },
  16659. "required": ["sessionID", "info"],
  16660. "additionalProperties": false
  16661. }
  16662. },
  16663. "required": ["id", "type", "properties"],
  16664. "additionalProperties": false
  16665. },
  16666. "EventSessionNextAgentSwitched": {
  16667. "type": "object",
  16668. "properties": {
  16669. "id": {
  16670. "type": "string"
  16671. },
  16672. "type": {
  16673. "type": "string",
  16674. "enum": ["session.next.agent.switched"]
  16675. },
  16676. "properties": {
  16677. "type": "object",
  16678. "properties": {
  16679. "timestamp": {
  16680. "type": "number"
  16681. },
  16682. "sessionID": {
  16683. "type": "string"
  16684. },
  16685. "agent": {
  16686. "type": "string"
  16687. }
  16688. },
  16689. "required": ["timestamp", "sessionID", "agent"],
  16690. "additionalProperties": false
  16691. }
  16692. },
  16693. "required": ["id", "type", "properties"],
  16694. "additionalProperties": false
  16695. },
  16696. "EventSessionNextModelSwitched": {
  16697. "type": "object",
  16698. "properties": {
  16699. "id": {
  16700. "type": "string"
  16701. },
  16702. "type": {
  16703. "type": "string",
  16704. "enum": ["session.next.model.switched"]
  16705. },
  16706. "properties": {
  16707. "type": "object",
  16708. "properties": {
  16709. "timestamp": {
  16710. "type": "number"
  16711. },
  16712. "sessionID": {
  16713. "type": "string"
  16714. },
  16715. "model": {
  16716. "type": "object",
  16717. "properties": {
  16718. "id": {
  16719. "type": "string"
  16720. },
  16721. "providerID": {
  16722. "type": "string"
  16723. },
  16724. "variant": {
  16725. "type": "string"
  16726. }
  16727. },
  16728. "required": ["id", "providerID", "variant"],
  16729. "additionalProperties": false
  16730. }
  16731. },
  16732. "required": ["timestamp", "sessionID", "model"],
  16733. "additionalProperties": false
  16734. }
  16735. },
  16736. "required": ["id", "type", "properties"],
  16737. "additionalProperties": false
  16738. },
  16739. "PromptSource": {
  16740. "type": "object",
  16741. "properties": {
  16742. "start": {
  16743. "type": "number"
  16744. },
  16745. "end": {
  16746. "type": "number"
  16747. },
  16748. "text": {
  16749. "type": "string"
  16750. }
  16751. },
  16752. "required": ["start", "end", "text"],
  16753. "additionalProperties": false
  16754. },
  16755. "PromptFileAttachment": {
  16756. "type": "object",
  16757. "properties": {
  16758. "uri": {
  16759. "type": "string"
  16760. },
  16761. "mime": {
  16762. "type": "string"
  16763. },
  16764. "name": {
  16765. "type": "string"
  16766. },
  16767. "description": {
  16768. "type": "string"
  16769. },
  16770. "source": {
  16771. "$ref": "#/components/schemas/PromptSource"
  16772. }
  16773. },
  16774. "required": ["uri", "mime"],
  16775. "additionalProperties": false
  16776. },
  16777. "PromptAgentAttachment": {
  16778. "type": "object",
  16779. "properties": {
  16780. "name": {
  16781. "type": "string"
  16782. },
  16783. "source": {
  16784. "$ref": "#/components/schemas/PromptSource"
  16785. }
  16786. },
  16787. "required": ["name"],
  16788. "additionalProperties": false
  16789. },
  16790. "EventSessionNextPrompted": {
  16791. "type": "object",
  16792. "properties": {
  16793. "id": {
  16794. "type": "string"
  16795. },
  16796. "type": {
  16797. "type": "string",
  16798. "enum": ["session.next.prompted"]
  16799. },
  16800. "properties": {
  16801. "type": "object",
  16802. "properties": {
  16803. "timestamp": {
  16804. "type": "number"
  16805. },
  16806. "sessionID": {
  16807. "type": "string"
  16808. },
  16809. "prompt": {
  16810. "$ref": "#/components/schemas/Prompt"
  16811. }
  16812. },
  16813. "required": ["timestamp", "sessionID", "prompt"],
  16814. "additionalProperties": false
  16815. }
  16816. },
  16817. "required": ["id", "type", "properties"],
  16818. "additionalProperties": false
  16819. },
  16820. "EventSessionNextSynthetic": {
  16821. "type": "object",
  16822. "properties": {
  16823. "id": {
  16824. "type": "string"
  16825. },
  16826. "type": {
  16827. "type": "string",
  16828. "enum": ["session.next.synthetic"]
  16829. },
  16830. "properties": {
  16831. "type": "object",
  16832. "properties": {
  16833. "timestamp": {
  16834. "type": "number"
  16835. },
  16836. "sessionID": {
  16837. "type": "string"
  16838. },
  16839. "text": {
  16840. "type": "string"
  16841. }
  16842. },
  16843. "required": ["timestamp", "sessionID", "text"],
  16844. "additionalProperties": false
  16845. }
  16846. },
  16847. "required": ["id", "type", "properties"],
  16848. "additionalProperties": false
  16849. },
  16850. "EventSessionNextShellStarted": {
  16851. "type": "object",
  16852. "properties": {
  16853. "id": {
  16854. "type": "string"
  16855. },
  16856. "type": {
  16857. "type": "string",
  16858. "enum": ["session.next.shell.started"]
  16859. },
  16860. "properties": {
  16861. "type": "object",
  16862. "properties": {
  16863. "timestamp": {
  16864. "type": "number"
  16865. },
  16866. "sessionID": {
  16867. "type": "string"
  16868. },
  16869. "callID": {
  16870. "type": "string"
  16871. },
  16872. "command": {
  16873. "type": "string"
  16874. }
  16875. },
  16876. "required": ["timestamp", "sessionID", "callID", "command"],
  16877. "additionalProperties": false
  16878. }
  16879. },
  16880. "required": ["id", "type", "properties"],
  16881. "additionalProperties": false
  16882. },
  16883. "EventSessionNextShellEnded": {
  16884. "type": "object",
  16885. "properties": {
  16886. "id": {
  16887. "type": "string"
  16888. },
  16889. "type": {
  16890. "type": "string",
  16891. "enum": ["session.next.shell.ended"]
  16892. },
  16893. "properties": {
  16894. "type": "object",
  16895. "properties": {
  16896. "timestamp": {
  16897. "type": "number"
  16898. },
  16899. "sessionID": {
  16900. "type": "string"
  16901. },
  16902. "callID": {
  16903. "type": "string"
  16904. },
  16905. "output": {
  16906. "type": "string"
  16907. }
  16908. },
  16909. "required": ["timestamp", "sessionID", "callID", "output"],
  16910. "additionalProperties": false
  16911. }
  16912. },
  16913. "required": ["id", "type", "properties"],
  16914. "additionalProperties": false
  16915. },
  16916. "EventSessionNextStepStarted": {
  16917. "type": "object",
  16918. "properties": {
  16919. "id": {
  16920. "type": "string"
  16921. },
  16922. "type": {
  16923. "type": "string",
  16924. "enum": ["session.next.step.started"]
  16925. },
  16926. "properties": {
  16927. "type": "object",
  16928. "properties": {
  16929. "timestamp": {
  16930. "type": "number"
  16931. },
  16932. "sessionID": {
  16933. "type": "string"
  16934. },
  16935. "agent": {
  16936. "type": "string"
  16937. },
  16938. "model": {
  16939. "type": "object",
  16940. "properties": {
  16941. "id": {
  16942. "type": "string"
  16943. },
  16944. "providerID": {
  16945. "type": "string"
  16946. },
  16947. "variant": {
  16948. "type": "string"
  16949. }
  16950. },
  16951. "required": ["id", "providerID", "variant"],
  16952. "additionalProperties": false
  16953. },
  16954. "snapshot": {
  16955. "type": "string"
  16956. }
  16957. },
  16958. "required": ["timestamp", "sessionID", "agent", "model"],
  16959. "additionalProperties": false
  16960. }
  16961. },
  16962. "required": ["id", "type", "properties"],
  16963. "additionalProperties": false
  16964. },
  16965. "EventSessionNextStepEnded": {
  16966. "type": "object",
  16967. "properties": {
  16968. "id": {
  16969. "type": "string"
  16970. },
  16971. "type": {
  16972. "type": "string",
  16973. "enum": ["session.next.step.ended"]
  16974. },
  16975. "properties": {
  16976. "type": "object",
  16977. "properties": {
  16978. "timestamp": {
  16979. "type": "number"
  16980. },
  16981. "sessionID": {
  16982. "type": "string"
  16983. },
  16984. "finish": {
  16985. "type": "string"
  16986. },
  16987. "cost": {
  16988. "type": "number"
  16989. },
  16990. "tokens": {
  16991. "type": "object",
  16992. "properties": {
  16993. "input": {
  16994. "type": "integer",
  16995. "minimum": 0
  16996. },
  16997. "output": {
  16998. "type": "integer",
  16999. "minimum": 0
  17000. },
  17001. "reasoning": {
  17002. "type": "integer",
  17003. "minimum": 0
  17004. },
  17005. "cache": {
  17006. "type": "object",
  17007. "properties": {
  17008. "read": {
  17009. "type": "integer",
  17010. "minimum": 0
  17011. },
  17012. "write": {
  17013. "type": "integer",
  17014. "minimum": 0
  17015. }
  17016. },
  17017. "required": ["read", "write"],
  17018. "additionalProperties": false
  17019. }
  17020. },
  17021. "required": ["input", "output", "reasoning", "cache"],
  17022. "additionalProperties": false
  17023. },
  17024. "snapshot": {
  17025. "type": "string"
  17026. }
  17027. },
  17028. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  17029. "additionalProperties": false
  17030. }
  17031. },
  17032. "required": ["id", "type", "properties"],
  17033. "additionalProperties": false
  17034. },
  17035. "SessionErrorUnknown": {
  17036. "type": "object",
  17037. "properties": {
  17038. "type": {
  17039. "type": "string",
  17040. "enum": ["unknown"]
  17041. },
  17042. "message": {
  17043. "type": "string"
  17044. }
  17045. },
  17046. "required": ["type", "message"],
  17047. "additionalProperties": false
  17048. },
  17049. "EventSessionNextStepFailed": {
  17050. "type": "object",
  17051. "properties": {
  17052. "id": {
  17053. "type": "string"
  17054. },
  17055. "type": {
  17056. "type": "string",
  17057. "enum": ["session.next.step.failed"]
  17058. },
  17059. "properties": {
  17060. "type": "object",
  17061. "properties": {
  17062. "timestamp": {
  17063. "type": "number"
  17064. },
  17065. "sessionID": {
  17066. "type": "string"
  17067. },
  17068. "error": {
  17069. "$ref": "#/components/schemas/SessionErrorUnknown"
  17070. }
  17071. },
  17072. "required": ["timestamp", "sessionID", "error"],
  17073. "additionalProperties": false
  17074. }
  17075. },
  17076. "required": ["id", "type", "properties"],
  17077. "additionalProperties": false
  17078. },
  17079. "EventSessionNextTextStarted": {
  17080. "type": "object",
  17081. "properties": {
  17082. "id": {
  17083. "type": "string"
  17084. },
  17085. "type": {
  17086. "type": "string",
  17087. "enum": ["session.next.text.started"]
  17088. },
  17089. "properties": {
  17090. "type": "object",
  17091. "properties": {
  17092. "timestamp": {
  17093. "type": "number"
  17094. },
  17095. "sessionID": {
  17096. "type": "string"
  17097. }
  17098. },
  17099. "required": ["timestamp", "sessionID"],
  17100. "additionalProperties": false
  17101. }
  17102. },
  17103. "required": ["id", "type", "properties"],
  17104. "additionalProperties": false
  17105. },
  17106. "EventSessionNextTextDelta": {
  17107. "type": "object",
  17108. "properties": {
  17109. "id": {
  17110. "type": "string"
  17111. },
  17112. "type": {
  17113. "type": "string",
  17114. "enum": ["session.next.text.delta"]
  17115. },
  17116. "properties": {
  17117. "type": "object",
  17118. "properties": {
  17119. "timestamp": {
  17120. "type": "number"
  17121. },
  17122. "sessionID": {
  17123. "type": "string"
  17124. },
  17125. "delta": {
  17126. "type": "string"
  17127. }
  17128. },
  17129. "required": ["timestamp", "sessionID", "delta"],
  17130. "additionalProperties": false
  17131. }
  17132. },
  17133. "required": ["id", "type", "properties"],
  17134. "additionalProperties": false
  17135. },
  17136. "EventSessionNextTextEnded": {
  17137. "type": "object",
  17138. "properties": {
  17139. "id": {
  17140. "type": "string"
  17141. },
  17142. "type": {
  17143. "type": "string",
  17144. "enum": ["session.next.text.ended"]
  17145. },
  17146. "properties": {
  17147. "type": "object",
  17148. "properties": {
  17149. "timestamp": {
  17150. "type": "number"
  17151. },
  17152. "sessionID": {
  17153. "type": "string"
  17154. },
  17155. "text": {
  17156. "type": "string"
  17157. }
  17158. },
  17159. "required": ["timestamp", "sessionID", "text"],
  17160. "additionalProperties": false
  17161. }
  17162. },
  17163. "required": ["id", "type", "properties"],
  17164. "additionalProperties": false
  17165. },
  17166. "EventSessionNextReasoningStarted": {
  17167. "type": "object",
  17168. "properties": {
  17169. "id": {
  17170. "type": "string"
  17171. },
  17172. "type": {
  17173. "type": "string",
  17174. "enum": ["session.next.reasoning.started"]
  17175. },
  17176. "properties": {
  17177. "type": "object",
  17178. "properties": {
  17179. "timestamp": {
  17180. "type": "number"
  17181. },
  17182. "sessionID": {
  17183. "type": "string"
  17184. },
  17185. "reasoningID": {
  17186. "type": "string"
  17187. }
  17188. },
  17189. "required": ["timestamp", "sessionID", "reasoningID"],
  17190. "additionalProperties": false
  17191. }
  17192. },
  17193. "required": ["id", "type", "properties"],
  17194. "additionalProperties": false
  17195. },
  17196. "EventSessionNextReasoningDelta": {
  17197. "type": "object",
  17198. "properties": {
  17199. "id": {
  17200. "type": "string"
  17201. },
  17202. "type": {
  17203. "type": "string",
  17204. "enum": ["session.next.reasoning.delta"]
  17205. },
  17206. "properties": {
  17207. "type": "object",
  17208. "properties": {
  17209. "timestamp": {
  17210. "type": "number"
  17211. },
  17212. "sessionID": {
  17213. "type": "string"
  17214. },
  17215. "reasoningID": {
  17216. "type": "string"
  17217. },
  17218. "delta": {
  17219. "type": "string"
  17220. }
  17221. },
  17222. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  17223. "additionalProperties": false
  17224. }
  17225. },
  17226. "required": ["id", "type", "properties"],
  17227. "additionalProperties": false
  17228. },
  17229. "EventSessionNextReasoningEnded": {
  17230. "type": "object",
  17231. "properties": {
  17232. "id": {
  17233. "type": "string"
  17234. },
  17235. "type": {
  17236. "type": "string",
  17237. "enum": ["session.next.reasoning.ended"]
  17238. },
  17239. "properties": {
  17240. "type": "object",
  17241. "properties": {
  17242. "timestamp": {
  17243. "type": "number"
  17244. },
  17245. "sessionID": {
  17246. "type": "string"
  17247. },
  17248. "reasoningID": {
  17249. "type": "string"
  17250. },
  17251. "text": {
  17252. "type": "string"
  17253. }
  17254. },
  17255. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  17256. "additionalProperties": false
  17257. }
  17258. },
  17259. "required": ["id", "type", "properties"],
  17260. "additionalProperties": false
  17261. },
  17262. "EventSessionNextToolInputStarted": {
  17263. "type": "object",
  17264. "properties": {
  17265. "id": {
  17266. "type": "string"
  17267. },
  17268. "type": {
  17269. "type": "string",
  17270. "enum": ["session.next.tool.input.started"]
  17271. },
  17272. "properties": {
  17273. "type": "object",
  17274. "properties": {
  17275. "timestamp": {
  17276. "type": "number"
  17277. },
  17278. "sessionID": {
  17279. "type": "string"
  17280. },
  17281. "callID": {
  17282. "type": "string"
  17283. },
  17284. "name": {
  17285. "type": "string"
  17286. }
  17287. },
  17288. "required": ["timestamp", "sessionID", "callID", "name"],
  17289. "additionalProperties": false
  17290. }
  17291. },
  17292. "required": ["id", "type", "properties"],
  17293. "additionalProperties": false
  17294. },
  17295. "EventSessionNextToolInputDelta": {
  17296. "type": "object",
  17297. "properties": {
  17298. "id": {
  17299. "type": "string"
  17300. },
  17301. "type": {
  17302. "type": "string",
  17303. "enum": ["session.next.tool.input.delta"]
  17304. },
  17305. "properties": {
  17306. "type": "object",
  17307. "properties": {
  17308. "timestamp": {
  17309. "type": "number"
  17310. },
  17311. "sessionID": {
  17312. "type": "string"
  17313. },
  17314. "callID": {
  17315. "type": "string"
  17316. },
  17317. "delta": {
  17318. "type": "string"
  17319. }
  17320. },
  17321. "required": ["timestamp", "sessionID", "callID", "delta"],
  17322. "additionalProperties": false
  17323. }
  17324. },
  17325. "required": ["id", "type", "properties"],
  17326. "additionalProperties": false
  17327. },
  17328. "EventSessionNextToolInputEnded": {
  17329. "type": "object",
  17330. "properties": {
  17331. "id": {
  17332. "type": "string"
  17333. },
  17334. "type": {
  17335. "type": "string",
  17336. "enum": ["session.next.tool.input.ended"]
  17337. },
  17338. "properties": {
  17339. "type": "object",
  17340. "properties": {
  17341. "timestamp": {
  17342. "type": "number"
  17343. },
  17344. "sessionID": {
  17345. "type": "string"
  17346. },
  17347. "callID": {
  17348. "type": "string"
  17349. },
  17350. "text": {
  17351. "type": "string"
  17352. }
  17353. },
  17354. "required": ["timestamp", "sessionID", "callID", "text"],
  17355. "additionalProperties": false
  17356. }
  17357. },
  17358. "required": ["id", "type", "properties"],
  17359. "additionalProperties": false
  17360. },
  17361. "EventSessionNextToolCalled": {
  17362. "type": "object",
  17363. "properties": {
  17364. "id": {
  17365. "type": "string"
  17366. },
  17367. "type": {
  17368. "type": "string",
  17369. "enum": ["session.next.tool.called"]
  17370. },
  17371. "properties": {
  17372. "type": "object",
  17373. "properties": {
  17374. "timestamp": {
  17375. "type": "number"
  17376. },
  17377. "sessionID": {
  17378. "type": "string"
  17379. },
  17380. "callID": {
  17381. "type": "string"
  17382. },
  17383. "tool": {
  17384. "type": "string"
  17385. },
  17386. "input": {
  17387. "type": "object"
  17388. },
  17389. "provider": {
  17390. "type": "object",
  17391. "properties": {
  17392. "executed": {
  17393. "type": "boolean"
  17394. },
  17395. "metadata": {
  17396. "type": "object"
  17397. }
  17398. },
  17399. "required": ["executed"],
  17400. "additionalProperties": false
  17401. }
  17402. },
  17403. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  17404. "additionalProperties": false
  17405. }
  17406. },
  17407. "required": ["id", "type", "properties"],
  17408. "additionalProperties": false
  17409. },
  17410. "ToolTextContent": {
  17411. "type": "object",
  17412. "properties": {
  17413. "type": {
  17414. "type": "string",
  17415. "enum": ["text"]
  17416. },
  17417. "text": {
  17418. "type": "string"
  17419. }
  17420. },
  17421. "required": ["type", "text"],
  17422. "additionalProperties": false
  17423. },
  17424. "ToolFileContent": {
  17425. "type": "object",
  17426. "properties": {
  17427. "type": {
  17428. "type": "string",
  17429. "enum": ["file"]
  17430. },
  17431. "uri": {
  17432. "type": "string"
  17433. },
  17434. "mime": {
  17435. "type": "string"
  17436. },
  17437. "name": {
  17438. "type": "string"
  17439. }
  17440. },
  17441. "required": ["type", "uri", "mime"],
  17442. "additionalProperties": false
  17443. },
  17444. "EventSessionNextToolProgress": {
  17445. "type": "object",
  17446. "properties": {
  17447. "id": {
  17448. "type": "string"
  17449. },
  17450. "type": {
  17451. "type": "string",
  17452. "enum": ["session.next.tool.progress"]
  17453. },
  17454. "properties": {
  17455. "type": "object",
  17456. "properties": {
  17457. "timestamp": {
  17458. "type": "number"
  17459. },
  17460. "sessionID": {
  17461. "type": "string"
  17462. },
  17463. "callID": {
  17464. "type": "string"
  17465. },
  17466. "structured": {
  17467. "type": "object"
  17468. },
  17469. "content": {
  17470. "type": "array",
  17471. "items": {
  17472. "anyOf": [
  17473. {
  17474. "$ref": "#/components/schemas/ToolTextContent"
  17475. },
  17476. {
  17477. "$ref": "#/components/schemas/ToolFileContent"
  17478. }
  17479. ]
  17480. }
  17481. }
  17482. },
  17483. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  17484. "additionalProperties": false
  17485. }
  17486. },
  17487. "required": ["id", "type", "properties"],
  17488. "additionalProperties": false
  17489. },
  17490. "EventSessionNextToolSuccess": {
  17491. "type": "object",
  17492. "properties": {
  17493. "id": {
  17494. "type": "string"
  17495. },
  17496. "type": {
  17497. "type": "string",
  17498. "enum": ["session.next.tool.success"]
  17499. },
  17500. "properties": {
  17501. "type": "object",
  17502. "properties": {
  17503. "timestamp": {
  17504. "type": "number"
  17505. },
  17506. "sessionID": {
  17507. "type": "string"
  17508. },
  17509. "callID": {
  17510. "type": "string"
  17511. },
  17512. "structured": {
  17513. "type": "object"
  17514. },
  17515. "content": {
  17516. "type": "array",
  17517. "items": {
  17518. "anyOf": [
  17519. {
  17520. "$ref": "#/components/schemas/ToolTextContent"
  17521. },
  17522. {
  17523. "$ref": "#/components/schemas/ToolFileContent"
  17524. }
  17525. ]
  17526. }
  17527. },
  17528. "provider": {
  17529. "type": "object",
  17530. "properties": {
  17531. "executed": {
  17532. "type": "boolean"
  17533. },
  17534. "metadata": {
  17535. "type": "object"
  17536. }
  17537. },
  17538. "required": ["executed"],
  17539. "additionalProperties": false
  17540. }
  17541. },
  17542. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  17543. "additionalProperties": false
  17544. }
  17545. },
  17546. "required": ["id", "type", "properties"],
  17547. "additionalProperties": false
  17548. },
  17549. "EventSessionNextToolFailed": {
  17550. "type": "object",
  17551. "properties": {
  17552. "id": {
  17553. "type": "string"
  17554. },
  17555. "type": {
  17556. "type": "string",
  17557. "enum": ["session.next.tool.failed"]
  17558. },
  17559. "properties": {
  17560. "type": "object",
  17561. "properties": {
  17562. "timestamp": {
  17563. "type": "number"
  17564. },
  17565. "sessionID": {
  17566. "type": "string"
  17567. },
  17568. "callID": {
  17569. "type": "string"
  17570. },
  17571. "error": {
  17572. "$ref": "#/components/schemas/SessionErrorUnknown"
  17573. },
  17574. "provider": {
  17575. "type": "object",
  17576. "properties": {
  17577. "executed": {
  17578. "type": "boolean"
  17579. },
  17580. "metadata": {
  17581. "type": "object"
  17582. }
  17583. },
  17584. "required": ["executed"],
  17585. "additionalProperties": false
  17586. }
  17587. },
  17588. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  17589. "additionalProperties": false
  17590. }
  17591. },
  17592. "required": ["id", "type", "properties"],
  17593. "additionalProperties": false
  17594. },
  17595. "SessionNextRetry_error": {
  17596. "type": "object",
  17597. "properties": {
  17598. "message": {
  17599. "type": "string"
  17600. },
  17601. "statusCode": {
  17602. "type": "integer",
  17603. "minimum": 0
  17604. },
  17605. "isRetryable": {
  17606. "type": "boolean"
  17607. },
  17608. "responseHeaders": {
  17609. "type": "object",
  17610. "additionalProperties": {
  17611. "type": "string"
  17612. }
  17613. },
  17614. "responseBody": {
  17615. "type": "string"
  17616. },
  17617. "metadata": {
  17618. "type": "object",
  17619. "additionalProperties": {
  17620. "type": "string"
  17621. }
  17622. }
  17623. },
  17624. "required": ["message", "isRetryable"],
  17625. "additionalProperties": false
  17626. },
  17627. "EventSessionNextRetried": {
  17628. "type": "object",
  17629. "properties": {
  17630. "id": {
  17631. "type": "string"
  17632. },
  17633. "type": {
  17634. "type": "string",
  17635. "enum": ["session.next.retried"]
  17636. },
  17637. "properties": {
  17638. "type": "object",
  17639. "properties": {
  17640. "timestamp": {
  17641. "type": "number"
  17642. },
  17643. "sessionID": {
  17644. "type": "string"
  17645. },
  17646. "attempt": {
  17647. "type": "integer",
  17648. "minimum": 0
  17649. },
  17650. "error": {
  17651. "$ref": "#/components/schemas/SessionNextRetry_error"
  17652. }
  17653. },
  17654. "required": ["timestamp", "sessionID", "attempt", "error"],
  17655. "additionalProperties": false
  17656. }
  17657. },
  17658. "required": ["id", "type", "properties"],
  17659. "additionalProperties": false
  17660. },
  17661. "EventSessionNextCompactionStarted": {
  17662. "type": "object",
  17663. "properties": {
  17664. "id": {
  17665. "type": "string"
  17666. },
  17667. "type": {
  17668. "type": "string",
  17669. "enum": ["session.next.compaction.started"]
  17670. },
  17671. "properties": {
  17672. "type": "object",
  17673. "properties": {
  17674. "timestamp": {
  17675. "type": "number"
  17676. },
  17677. "sessionID": {
  17678. "type": "string"
  17679. },
  17680. "reason": {
  17681. "type": "string",
  17682. "enum": ["auto", "manual"]
  17683. }
  17684. },
  17685. "required": ["timestamp", "sessionID", "reason"],
  17686. "additionalProperties": false
  17687. }
  17688. },
  17689. "required": ["id", "type", "properties"],
  17690. "additionalProperties": false
  17691. },
  17692. "EventSessionNextCompactionDelta": {
  17693. "type": "object",
  17694. "properties": {
  17695. "id": {
  17696. "type": "string"
  17697. },
  17698. "type": {
  17699. "type": "string",
  17700. "enum": ["session.next.compaction.delta"]
  17701. },
  17702. "properties": {
  17703. "type": "object",
  17704. "properties": {
  17705. "timestamp": {
  17706. "type": "number"
  17707. },
  17708. "sessionID": {
  17709. "type": "string"
  17710. },
  17711. "text": {
  17712. "type": "string"
  17713. }
  17714. },
  17715. "required": ["timestamp", "sessionID", "text"],
  17716. "additionalProperties": false
  17717. }
  17718. },
  17719. "required": ["id", "type", "properties"],
  17720. "additionalProperties": false
  17721. },
  17722. "EventSessionNextCompactionEnded": {
  17723. "type": "object",
  17724. "properties": {
  17725. "id": {
  17726. "type": "string"
  17727. },
  17728. "type": {
  17729. "type": "string",
  17730. "enum": ["session.next.compaction.ended"]
  17731. },
  17732. "properties": {
  17733. "type": "object",
  17734. "properties": {
  17735. "timestamp": {
  17736. "type": "number"
  17737. },
  17738. "sessionID": {
  17739. "type": "string"
  17740. },
  17741. "text": {
  17742. "type": "string"
  17743. },
  17744. "include": {
  17745. "type": "string"
  17746. }
  17747. },
  17748. "required": ["timestamp", "sessionID", "text"],
  17749. "additionalProperties": false
  17750. }
  17751. },
  17752. "required": ["id", "type", "properties"],
  17753. "additionalProperties": false
  17754. },
  17755. "EventServerConnected": {
  17756. "type": "object",
  17757. "properties": {
  17758. "id": {
  17759. "type": "string"
  17760. },
  17761. "type": {
  17762. "type": "string",
  17763. "enum": ["server.connected"]
  17764. },
  17765. "properties": {
  17766. "type": "object",
  17767. "properties": {}
  17768. }
  17769. },
  17770. "required": ["id", "type", "properties"],
  17771. "additionalProperties": false
  17772. },
  17773. "EventGlobalDisposed": {
  17774. "type": "object",
  17775. "properties": {
  17776. "id": {
  17777. "type": "string"
  17778. },
  17779. "type": {
  17780. "type": "string",
  17781. "enum": ["global.disposed"]
  17782. },
  17783. "properties": {
  17784. "type": "object",
  17785. "properties": {}
  17786. }
  17787. },
  17788. "required": ["id", "type", "properties"],
  17789. "additionalProperties": false
  17790. },
  17791. "SessionInfo": {
  17792. "type": "object",
  17793. "properties": {
  17794. "id": {
  17795. "type": "string"
  17796. },
  17797. "parentID": {
  17798. "type": "string"
  17799. },
  17800. "projectID": {
  17801. "type": "string"
  17802. },
  17803. "workspaceID": {
  17804. "type": "string"
  17805. },
  17806. "path": {
  17807. "type": "string"
  17808. },
  17809. "agent": {
  17810. "type": "string"
  17811. },
  17812. "model": {
  17813. "type": "object",
  17814. "properties": {
  17815. "id": {
  17816. "type": "string"
  17817. },
  17818. "providerID": {
  17819. "type": "string"
  17820. },
  17821. "variant": {
  17822. "type": "string"
  17823. }
  17824. },
  17825. "required": ["id", "providerID", "variant"],
  17826. "additionalProperties": false
  17827. },
  17828. "time": {
  17829. "type": "object",
  17830. "properties": {
  17831. "created": {
  17832. "type": "number"
  17833. },
  17834. "updated": {
  17835. "type": "number"
  17836. },
  17837. "archived": {
  17838. "type": "number"
  17839. }
  17840. },
  17841. "required": ["created", "updated"],
  17842. "additionalProperties": false
  17843. },
  17844. "title": {
  17845. "type": "string"
  17846. }
  17847. },
  17848. "required": ["id", "projectID", "time", "title"],
  17849. "additionalProperties": false
  17850. },
  17851. "SessionDelivery": {
  17852. "type": "string",
  17853. "enum": ["immediate", "deferred"]
  17854. },
  17855. "SessionMessageAgentSwitched": {
  17856. "type": "object",
  17857. "properties": {
  17858. "id": {
  17859. "type": "string"
  17860. },
  17861. "metadata": {
  17862. "type": "object"
  17863. },
  17864. "time": {
  17865. "type": "object",
  17866. "properties": {
  17867. "created": {
  17868. "type": "number"
  17869. }
  17870. },
  17871. "required": ["created"],
  17872. "additionalProperties": false
  17873. },
  17874. "type": {
  17875. "type": "string",
  17876. "enum": ["agent-switched"]
  17877. },
  17878. "agent": {
  17879. "type": "string"
  17880. }
  17881. },
  17882. "required": ["id", "time", "type", "agent"],
  17883. "additionalProperties": false
  17884. },
  17885. "SessionMessageModelSwitched": {
  17886. "type": "object",
  17887. "properties": {
  17888. "id": {
  17889. "type": "string"
  17890. },
  17891. "metadata": {
  17892. "type": "object"
  17893. },
  17894. "time": {
  17895. "type": "object",
  17896. "properties": {
  17897. "created": {
  17898. "type": "number"
  17899. }
  17900. },
  17901. "required": ["created"],
  17902. "additionalProperties": false
  17903. },
  17904. "type": {
  17905. "type": "string",
  17906. "enum": ["model-switched"]
  17907. },
  17908. "model": {
  17909. "type": "object",
  17910. "properties": {
  17911. "id": {
  17912. "type": "string"
  17913. },
  17914. "providerID": {
  17915. "type": "string"
  17916. },
  17917. "variant": {
  17918. "type": "string"
  17919. }
  17920. },
  17921. "required": ["id", "providerID", "variant"],
  17922. "additionalProperties": false
  17923. }
  17924. },
  17925. "required": ["id", "time", "type", "model"],
  17926. "additionalProperties": false
  17927. },
  17928. "SessionMessageUser": {
  17929. "type": "object",
  17930. "properties": {
  17931. "id": {
  17932. "type": "string"
  17933. },
  17934. "metadata": {
  17935. "type": "object"
  17936. },
  17937. "time": {
  17938. "type": "object",
  17939. "properties": {
  17940. "created": {
  17941. "type": "number"
  17942. }
  17943. },
  17944. "required": ["created"],
  17945. "additionalProperties": false
  17946. },
  17947. "text": {
  17948. "type": "string"
  17949. },
  17950. "files": {
  17951. "type": "array",
  17952. "items": {
  17953. "$ref": "#/components/schemas/PromptFileAttachment"
  17954. }
  17955. },
  17956. "agents": {
  17957. "type": "array",
  17958. "items": {
  17959. "$ref": "#/components/schemas/PromptAgentAttachment"
  17960. }
  17961. },
  17962. "type": {
  17963. "type": "string",
  17964. "enum": ["user"]
  17965. }
  17966. },
  17967. "required": ["id", "time", "text", "type"],
  17968. "additionalProperties": false
  17969. },
  17970. "SessionMessageSynthetic": {
  17971. "type": "object",
  17972. "properties": {
  17973. "id": {
  17974. "type": "string"
  17975. },
  17976. "metadata": {
  17977. "type": "object"
  17978. },
  17979. "time": {
  17980. "type": "object",
  17981. "properties": {
  17982. "created": {
  17983. "type": "number"
  17984. }
  17985. },
  17986. "required": ["created"],
  17987. "additionalProperties": false
  17988. },
  17989. "sessionID": {
  17990. "type": "string"
  17991. },
  17992. "text": {
  17993. "type": "string"
  17994. },
  17995. "type": {
  17996. "type": "string",
  17997. "enum": ["synthetic"]
  17998. }
  17999. },
  18000. "required": ["id", "time", "sessionID", "text", "type"],
  18001. "additionalProperties": false
  18002. },
  18003. "SessionMessageShell": {
  18004. "type": "object",
  18005. "properties": {
  18006. "id": {
  18007. "type": "string"
  18008. },
  18009. "metadata": {
  18010. "type": "object"
  18011. },
  18012. "time": {
  18013. "type": "object",
  18014. "properties": {
  18015. "created": {
  18016. "type": "number"
  18017. },
  18018. "completed": {
  18019. "type": "number"
  18020. }
  18021. },
  18022. "required": ["created"],
  18023. "additionalProperties": false
  18024. },
  18025. "type": {
  18026. "type": "string",
  18027. "enum": ["shell"]
  18028. },
  18029. "callID": {
  18030. "type": "string"
  18031. },
  18032. "command": {
  18033. "type": "string"
  18034. },
  18035. "output": {
  18036. "type": "string"
  18037. }
  18038. },
  18039. "required": ["id", "time", "type", "callID", "command", "output"],
  18040. "additionalProperties": false
  18041. },
  18042. "SessionMessageAssistantText": {
  18043. "type": "object",
  18044. "properties": {
  18045. "type": {
  18046. "type": "string",
  18047. "enum": ["text"]
  18048. },
  18049. "text": {
  18050. "type": "string"
  18051. }
  18052. },
  18053. "required": ["type", "text"],
  18054. "additionalProperties": false
  18055. },
  18056. "SessionMessageAssistantReasoning": {
  18057. "type": "object",
  18058. "properties": {
  18059. "type": {
  18060. "type": "string",
  18061. "enum": ["reasoning"]
  18062. },
  18063. "id": {
  18064. "type": "string"
  18065. },
  18066. "text": {
  18067. "type": "string"
  18068. }
  18069. },
  18070. "required": ["type", "id", "text"],
  18071. "additionalProperties": false
  18072. },
  18073. "SessionMessageToolStatePending": {
  18074. "type": "object",
  18075. "properties": {
  18076. "status": {
  18077. "type": "string",
  18078. "enum": ["pending"]
  18079. },
  18080. "input": {
  18081. "type": "string"
  18082. }
  18083. },
  18084. "required": ["status", "input"],
  18085. "additionalProperties": false
  18086. },
  18087. "SessionMessageToolStateRunning": {
  18088. "type": "object",
  18089. "properties": {
  18090. "status": {
  18091. "type": "string",
  18092. "enum": ["running"]
  18093. },
  18094. "input": {
  18095. "type": "object"
  18096. },
  18097. "structured": {
  18098. "type": "object"
  18099. },
  18100. "content": {
  18101. "type": "array",
  18102. "items": {
  18103. "anyOf": [
  18104. {
  18105. "$ref": "#/components/schemas/ToolTextContent"
  18106. },
  18107. {
  18108. "$ref": "#/components/schemas/ToolFileContent"
  18109. }
  18110. ]
  18111. }
  18112. }
  18113. },
  18114. "required": ["status", "input", "structured", "content"],
  18115. "additionalProperties": false
  18116. },
  18117. "SessionMessageToolStateCompleted": {
  18118. "type": "object",
  18119. "properties": {
  18120. "status": {
  18121. "type": "string",
  18122. "enum": ["completed"]
  18123. },
  18124. "input": {
  18125. "type": "object"
  18126. },
  18127. "attachments": {
  18128. "type": "array",
  18129. "items": {
  18130. "$ref": "#/components/schemas/PromptFileAttachment"
  18131. }
  18132. },
  18133. "content": {
  18134. "type": "array",
  18135. "items": {
  18136. "anyOf": [
  18137. {
  18138. "$ref": "#/components/schemas/ToolTextContent"
  18139. },
  18140. {
  18141. "$ref": "#/components/schemas/ToolFileContent"
  18142. }
  18143. ]
  18144. }
  18145. },
  18146. "structured": {
  18147. "type": "object"
  18148. }
  18149. },
  18150. "required": ["status", "input", "content", "structured"],
  18151. "additionalProperties": false
  18152. },
  18153. "SessionMessageToolStateError": {
  18154. "type": "object",
  18155. "properties": {
  18156. "status": {
  18157. "type": "string",
  18158. "enum": ["error"]
  18159. },
  18160. "input": {
  18161. "type": "object"
  18162. },
  18163. "content": {
  18164. "type": "array",
  18165. "items": {
  18166. "anyOf": [
  18167. {
  18168. "$ref": "#/components/schemas/ToolTextContent"
  18169. },
  18170. {
  18171. "$ref": "#/components/schemas/ToolFileContent"
  18172. }
  18173. ]
  18174. }
  18175. },
  18176. "structured": {
  18177. "type": "object"
  18178. },
  18179. "error": {
  18180. "$ref": "#/components/schemas/SessionErrorUnknown"
  18181. }
  18182. },
  18183. "required": ["status", "input", "content", "structured", "error"],
  18184. "additionalProperties": false
  18185. },
  18186. "SessionMessageAssistantTool": {
  18187. "type": "object",
  18188. "properties": {
  18189. "type": {
  18190. "type": "string",
  18191. "enum": ["tool"]
  18192. },
  18193. "id": {
  18194. "type": "string"
  18195. },
  18196. "name": {
  18197. "type": "string"
  18198. },
  18199. "provider": {
  18200. "type": "object",
  18201. "properties": {
  18202. "executed": {
  18203. "type": "boolean"
  18204. },
  18205. "metadata": {
  18206. "type": "object"
  18207. }
  18208. },
  18209. "required": ["executed"],
  18210. "additionalProperties": false
  18211. },
  18212. "state": {
  18213. "anyOf": [
  18214. {
  18215. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  18216. },
  18217. {
  18218. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  18219. },
  18220. {
  18221. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  18222. },
  18223. {
  18224. "$ref": "#/components/schemas/SessionMessageToolStateError"
  18225. }
  18226. ]
  18227. },
  18228. "time": {
  18229. "type": "object",
  18230. "properties": {
  18231. "created": {
  18232. "type": "number"
  18233. },
  18234. "ran": {
  18235. "type": "number"
  18236. },
  18237. "completed": {
  18238. "type": "number"
  18239. },
  18240. "pruned": {
  18241. "type": "number"
  18242. }
  18243. },
  18244. "required": ["created"],
  18245. "additionalProperties": false
  18246. }
  18247. },
  18248. "required": ["type", "id", "name", "state", "time"],
  18249. "additionalProperties": false
  18250. },
  18251. "SessionMessageAssistant": {
  18252. "type": "object",
  18253. "properties": {
  18254. "id": {
  18255. "type": "string"
  18256. },
  18257. "metadata": {
  18258. "type": "object"
  18259. },
  18260. "time": {
  18261. "type": "object",
  18262. "properties": {
  18263. "created": {
  18264. "type": "number"
  18265. },
  18266. "completed": {
  18267. "type": "number"
  18268. }
  18269. },
  18270. "required": ["created"],
  18271. "additionalProperties": false
  18272. },
  18273. "type": {
  18274. "type": "string",
  18275. "enum": ["assistant"]
  18276. },
  18277. "agent": {
  18278. "type": "string"
  18279. },
  18280. "model": {
  18281. "type": "object",
  18282. "properties": {
  18283. "id": {
  18284. "type": "string"
  18285. },
  18286. "providerID": {
  18287. "type": "string"
  18288. },
  18289. "variant": {
  18290. "type": "string"
  18291. }
  18292. },
  18293. "required": ["id", "providerID", "variant"],
  18294. "additionalProperties": false
  18295. },
  18296. "content": {
  18297. "type": "array",
  18298. "items": {
  18299. "anyOf": [
  18300. {
  18301. "$ref": "#/components/schemas/SessionMessageAssistantText"
  18302. },
  18303. {
  18304. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  18305. },
  18306. {
  18307. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  18308. }
  18309. ]
  18310. }
  18311. },
  18312. "snapshot": {
  18313. "type": "object",
  18314. "properties": {
  18315. "start": {
  18316. "type": "string"
  18317. },
  18318. "end": {
  18319. "type": "string"
  18320. }
  18321. },
  18322. "additionalProperties": false
  18323. },
  18324. "finish": {
  18325. "type": "string"
  18326. },
  18327. "cost": {
  18328. "type": "number"
  18329. },
  18330. "tokens": {
  18331. "type": "object",
  18332. "properties": {
  18333. "input": {
  18334. "type": "number"
  18335. },
  18336. "output": {
  18337. "type": "number"
  18338. },
  18339. "reasoning": {
  18340. "type": "number"
  18341. },
  18342. "cache": {
  18343. "type": "object",
  18344. "properties": {
  18345. "read": {
  18346. "type": "number"
  18347. },
  18348. "write": {
  18349. "type": "number"
  18350. }
  18351. },
  18352. "required": ["read", "write"],
  18353. "additionalProperties": false
  18354. }
  18355. },
  18356. "required": ["input", "output", "reasoning", "cache"],
  18357. "additionalProperties": false
  18358. },
  18359. "error": {
  18360. "$ref": "#/components/schemas/SessionErrorUnknown"
  18361. }
  18362. },
  18363. "required": ["id", "time", "type", "agent", "model", "content"],
  18364. "additionalProperties": false
  18365. },
  18366. "SessionMessageCompaction": {
  18367. "type": "object",
  18368. "properties": {
  18369. "type": {
  18370. "type": "string",
  18371. "enum": ["compaction"]
  18372. },
  18373. "reason": {
  18374. "type": "string",
  18375. "enum": ["auto", "manual"]
  18376. },
  18377. "summary": {
  18378. "type": "string"
  18379. },
  18380. "include": {
  18381. "type": "string"
  18382. },
  18383. "id": {
  18384. "type": "string"
  18385. },
  18386. "metadata": {
  18387. "type": "object"
  18388. },
  18389. "time": {
  18390. "type": "object",
  18391. "properties": {
  18392. "created": {
  18393. "type": "number"
  18394. }
  18395. },
  18396. "required": ["created"],
  18397. "additionalProperties": false
  18398. }
  18399. },
  18400. "required": ["type", "reason", "summary", "id", "time"],
  18401. "additionalProperties": false
  18402. },
  18403. "SessionMessage": {
  18404. "anyOf": [
  18405. {
  18406. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  18407. },
  18408. {
  18409. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  18410. },
  18411. {
  18412. "$ref": "#/components/schemas/SessionMessageUser"
  18413. },
  18414. {
  18415. "$ref": "#/components/schemas/SessionMessageSynthetic"
  18416. },
  18417. {
  18418. "$ref": "#/components/schemas/SessionMessageShell"
  18419. },
  18420. {
  18421. "$ref": "#/components/schemas/SessionMessageAssistant"
  18422. },
  18423. {
  18424. "$ref": "#/components/schemas/SessionMessageCompaction"
  18425. }
  18426. ]
  18427. },
  18428. "EventTuiToastShow1": {
  18429. "type": "object",
  18430. "properties": {
  18431. "id": {
  18432. "type": "string"
  18433. },
  18434. "type": {
  18435. "type": "string",
  18436. "enum": ["tui.toast.show"]
  18437. },
  18438. "properties": {
  18439. "type": "object",
  18440. "properties": {
  18441. "title": {
  18442. "type": "string"
  18443. },
  18444. "message": {
  18445. "type": "string"
  18446. },
  18447. "variant": {
  18448. "type": "string",
  18449. "enum": ["info", "success", "warning", "error"]
  18450. },
  18451. "duration": {
  18452. "type": "integer",
  18453. "exclusiveMinimum": 0
  18454. }
  18455. },
  18456. "required": ["message", "variant"],
  18457. "additionalProperties": false
  18458. }
  18459. },
  18460. "required": ["id", "type", "properties"],
  18461. "additionalProperties": false
  18462. },
  18463. "BadRequestError": {
  18464. "type": "object",
  18465. "required": ["data", "errors", "success"],
  18466. "properties": {
  18467. "data": {},
  18468. "errors": {
  18469. "type": "array",
  18470. "items": {
  18471. "type": "object",
  18472. "additionalProperties": {}
  18473. }
  18474. },
  18475. "success": {
  18476. "type": "boolean",
  18477. "enum": [false]
  18478. }
  18479. }
  18480. }
  18481. }
  18482. },
  18483. "security": [],
  18484. "tags": [
  18485. {
  18486. "name": "control",
  18487. "description": "Control plane routes."
  18488. },
  18489. {
  18490. "name": "global",
  18491. "description": "Global server routes."
  18492. },
  18493. {
  18494. "name": "event",
  18495. "description": "Instance event stream route."
  18496. },
  18497. {
  18498. "name": "config",
  18499. "description": "Experimental HttpApi config routes."
  18500. },
  18501. {
  18502. "name": "experimental",
  18503. "description": "Experimental HttpApi read-only routes."
  18504. },
  18505. {
  18506. "name": "file",
  18507. "description": "Experimental HttpApi file routes."
  18508. },
  18509. {
  18510. "name": "instance",
  18511. "description": "Experimental HttpApi instance read routes."
  18512. },
  18513. {
  18514. "name": "mcp",
  18515. "description": "Experimental HttpApi MCP routes."
  18516. },
  18517. {
  18518. "name": "project",
  18519. "description": "Experimental HttpApi project routes."
  18520. },
  18521. {
  18522. "name": "pty",
  18523. "description": "Experimental HttpApi PTY routes."
  18524. },
  18525. {
  18526. "name": "question",
  18527. "description": "Question routes."
  18528. },
  18529. {
  18530. "name": "permission",
  18531. "description": "Experimental HttpApi permission routes."
  18532. },
  18533. {
  18534. "name": "provider",
  18535. "description": "Experimental HttpApi provider routes."
  18536. },
  18537. {
  18538. "name": "session",
  18539. "description": "Experimental HttpApi session routes."
  18540. },
  18541. {
  18542. "name": "sync",
  18543. "description": "Experimental HttpApi sync routes."
  18544. },
  18545. {
  18546. "name": "v2",
  18547. "description": "Experimental v2 routes."
  18548. },
  18549. {
  18550. "name": "v2 messages",
  18551. "description": "Experimental v2 message routes."
  18552. },
  18553. {
  18554. "name": "tui",
  18555. "description": "Experimental HttpApi TUI routes."
  18556. },
  18557. {
  18558. "name": "workspace",
  18559. "description": "Experimental HttpApi workspace routes."
  18560. },
  18561. {
  18562. "name": "pty",
  18563. "description": "PTY websocket route."
  18564. }
  18565. ]
  18566. }