openapi.json 505 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616
  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. "schema": {
  119. "type": "string"
  120. },
  121. "required": false
  122. },
  123. {
  124. "name": "workspace",
  125. "in": "query",
  126. "schema": {
  127. "type": "string"
  128. },
  129. "required": false
  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. "schema": {
  450. "type": "string"
  451. },
  452. "required": false
  453. },
  454. {
  455. "name": "workspace",
  456. "in": "query",
  457. "schema": {
  458. "type": "string"
  459. },
  460. "required": false
  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. "schema": {
  494. "type": "string"
  495. },
  496. "required": false
  497. },
  498. {
  499. "name": "workspace",
  500. "in": "query",
  501. "schema": {
  502. "type": "string"
  503. },
  504. "required": false
  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. "schema": {
  536. "type": "string"
  537. },
  538. "required": false
  539. },
  540. {
  541. "name": "workspace",
  542. "in": "query",
  543. "schema": {
  544. "type": "string"
  545. },
  546. "required": false
  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. "schema": {
  599. "type": "string"
  600. },
  601. "required": false
  602. },
  603. {
  604. "name": "workspace",
  605. "in": "query",
  606. "schema": {
  607. "type": "string"
  608. },
  609. "required": false
  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. "schema": {
  660. "type": "string"
  661. },
  662. "required": false
  663. },
  664. {
  665. "name": "workspace",
  666. "in": "query",
  667. "schema": {
  668. "type": "string"
  669. },
  670. "required": false
  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. "schema": {
  714. "type": "string"
  715. },
  716. "required": false
  717. },
  718. {
  719. "name": "workspace",
  720. "in": "query",
  721. "schema": {
  722. "type": "string"
  723. },
  724. "required": false
  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. "schema": {
  801. "type": "string"
  802. },
  803. "required": false
  804. },
  805. {
  806. "name": "workspace",
  807. "in": "query",
  808. "schema": {
  809. "type": "string"
  810. },
  811. "required": false
  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. "schema": {
  865. "type": "string"
  866. },
  867. "required": false
  868. },
  869. {
  870. "name": "workspace",
  871. "in": "query",
  872. "schema": {
  873. "type": "string"
  874. },
  875. "required": false
  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. "schema": {
  935. "type": "string"
  936. },
  937. "required": false
  938. },
  939. {
  940. "name": "workspace",
  941. "in": "query",
  942. "schema": {
  943. "type": "string"
  944. },
  945. "required": false
  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. "schema": {
  989. "type": "string"
  990. },
  991. "required": false
  992. },
  993. {
  994. "name": "workspace",
  995. "in": "query",
  996. "schema": {
  997. "type": "string"
  998. },
  999. "required": false
  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. "schema": {
  1035. "type": "string"
  1036. },
  1037. "required": false
  1038. },
  1039. {
  1040. "name": "workspace",
  1041. "in": "query",
  1042. "schema": {
  1043. "type": "string"
  1044. },
  1045. "required": false
  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. "schema": {
  1096. "type": "string"
  1097. },
  1098. "required": false
  1099. },
  1100. {
  1101. "name": "workspace",
  1102. "in": "query",
  1103. "schema": {
  1104. "type": "string"
  1105. },
  1106. "required": false
  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. "schema": {
  1160. "type": "string"
  1161. },
  1162. "required": false
  1163. },
  1164. {
  1165. "name": "workspace",
  1166. "in": "query",
  1167. "schema": {
  1168. "type": "string"
  1169. },
  1170. "required": false
  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. "schema": {
  1224. "type": "string"
  1225. },
  1226. "required": false
  1227. },
  1228. {
  1229. "name": "workspace",
  1230. "in": "query",
  1231. "schema": {
  1232. "type": "string"
  1233. },
  1234. "required": false
  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. "schema": {
  1336. "type": "string"
  1337. },
  1338. "required": false
  1339. },
  1340. {
  1341. "name": "workspace",
  1342. "in": "query",
  1343. "schema": {
  1344. "type": "string"
  1345. },
  1346. "required": false
  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. "schema": {
  1384. "type": "string"
  1385. },
  1386. "required": false
  1387. },
  1388. {
  1389. "name": "workspace",
  1390. "in": "query",
  1391. "schema": {
  1392. "type": "string"
  1393. },
  1394. "required": false
  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. "schema": {
  1500. "type": "string"
  1501. },
  1502. "required": false
  1503. },
  1504. {
  1505. "name": "workspace",
  1506. "in": "query",
  1507. "schema": {
  1508. "type": "string"
  1509. },
  1510. "required": false
  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. "schema": {
  1584. "type": "string"
  1585. },
  1586. "required": false
  1587. },
  1588. {
  1589. "name": "workspace",
  1590. "in": "query",
  1591. "schema": {
  1592. "type": "string"
  1593. },
  1594. "required": false
  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. "schema": {
  1640. "type": "string"
  1641. },
  1642. "required": false
  1643. },
  1644. {
  1645. "name": "workspace",
  1646. "in": "query",
  1647. "schema": {
  1648. "type": "string"
  1649. },
  1650. "required": false
  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. "schema": {
  1696. "type": "string"
  1697. },
  1698. "required": false
  1699. },
  1700. {
  1701. "name": "workspace",
  1702. "in": "query",
  1703. "schema": {
  1704. "type": "string"
  1705. },
  1706. "required": false
  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. "schema": {
  1748. "type": "string"
  1749. },
  1750. "required": false
  1751. },
  1752. {
  1753. "name": "workspace",
  1754. "in": "query",
  1755. "schema": {
  1756. "type": "string"
  1757. },
  1758. "required": false
  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. "schema": {
  1796. "type": "string"
  1797. },
  1798. "required": false
  1799. },
  1800. {
  1801. "name": "workspace",
  1802. "in": "query",
  1803. "schema": {
  1804. "type": "string"
  1805. },
  1806. "required": false
  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. "schema": {
  1841. "type": "string"
  1842. },
  1843. "required": false
  1844. },
  1845. {
  1846. "name": "workspace",
  1847. "in": "query",
  1848. "schema": {
  1849. "type": "string"
  1850. },
  1851. "required": false
  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. "schema": {
  1885. "type": "string"
  1886. },
  1887. "required": false
  1888. },
  1889. {
  1890. "name": "workspace",
  1891. "in": "query",
  1892. "schema": {
  1893. "type": "string"
  1894. },
  1895. "required": false
  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. "schema": {
  1929. "type": "string"
  1930. },
  1931. "required": false
  1932. },
  1933. {
  1934. "name": "workspace",
  1935. "in": "query",
  1936. "schema": {
  1937. "type": "string"
  1938. },
  1939. "required": false
  1940. }
  1941. ],
  1942. "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. "schema": {
  1977. "type": "string"
  1978. },
  1979. "required": false
  1980. },
  1981. {
  1982. "name": "workspace",
  1983. "in": "query",
  1984. "schema": {
  1985. "type": "string"
  1986. },
  1987. "required": false
  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. "schema": {
  2034. "type": "string"
  2035. },
  2036. "required": false
  2037. },
  2038. {
  2039. "name": "workspace",
  2040. "in": "query",
  2041. "schema": {
  2042. "type": "string"
  2043. },
  2044. "required": false
  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. "schema": {
  2078. "type": "string"
  2079. },
  2080. "required": false
  2081. },
  2082. {
  2083. "name": "workspace",
  2084. "in": "query",
  2085. "schema": {
  2086. "type": "string"
  2087. },
  2088. "required": false
  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. "schema": {
  2156. "type": "string"
  2157. },
  2158. "required": false
  2159. },
  2160. {
  2161. "name": "workspace",
  2162. "in": "query",
  2163. "schema": {
  2164. "type": "string"
  2165. },
  2166. "required": false
  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. "schema": {
  2204. "type": "string"
  2205. },
  2206. "required": false
  2207. },
  2208. {
  2209. "name": "workspace",
  2210. "in": "query",
  2211. "schema": {
  2212. "type": "string"
  2213. },
  2214. "required": false
  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. "schema": {
  2252. "type": "string"
  2253. },
  2254. "required": false
  2255. },
  2256. {
  2257. "name": "workspace",
  2258. "in": "query",
  2259. "schema": {
  2260. "type": "string"
  2261. },
  2262. "required": false
  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. "schema": {
  2316. "type": "string"
  2317. },
  2318. "required": false
  2319. },
  2320. {
  2321. "name": "workspace",
  2322. "in": "query",
  2323. "schema": {
  2324. "type": "string"
  2325. },
  2326. "required": false
  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. "schema": {
  2364. "type": "string"
  2365. },
  2366. "required": false
  2367. },
  2368. {
  2369. "name": "workspace",
  2370. "in": "query",
  2371. "schema": {
  2372. "type": "string"
  2373. },
  2374. "required": false
  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. "schema": {
  2412. "type": "string"
  2413. },
  2414. "required": false
  2415. },
  2416. {
  2417. "name": "workspace",
  2418. "in": "query",
  2419. "schema": {
  2420. "type": "string"
  2421. },
  2422. "required": false
  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. "schema": {
  2458. "type": "string"
  2459. },
  2460. "required": false
  2461. },
  2462. {
  2463. "name": "workspace",
  2464. "in": "query",
  2465. "schema": {
  2466. "type": "string"
  2467. },
  2468. "required": false
  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": "name",
  2540. "in": "path",
  2541. "schema": {
  2542. "type": "string"
  2543. },
  2544. "required": true
  2545. },
  2546. {
  2547. "name": "directory",
  2548. "in": "query",
  2549. "schema": {
  2550. "type": "string"
  2551. },
  2552. "required": false
  2553. },
  2554. {
  2555. "name": "workspace",
  2556. "in": "query",
  2557. "schema": {
  2558. "type": "string"
  2559. },
  2560. "required": false
  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": "name",
  2621. "in": "path",
  2622. "schema": {
  2623. "type": "string"
  2624. },
  2625. "required": true
  2626. },
  2627. {
  2628. "name": "directory",
  2629. "in": "query",
  2630. "schema": {
  2631. "type": "string"
  2632. },
  2633. "required": false
  2634. },
  2635. {
  2636. "name": "workspace",
  2637. "in": "query",
  2638. "schema": {
  2639. "type": "string"
  2640. },
  2641. "required": false
  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": "name",
  2692. "in": "path",
  2693. "schema": {
  2694. "type": "string"
  2695. },
  2696. "required": true
  2697. },
  2698. {
  2699. "name": "directory",
  2700. "in": "query",
  2701. "schema": {
  2702. "type": "string"
  2703. },
  2704. "required": false
  2705. },
  2706. {
  2707. "name": "workspace",
  2708. "in": "query",
  2709. "schema": {
  2710. "type": "string"
  2711. },
  2712. "required": false
  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": "name",
  2780. "in": "path",
  2781. "schema": {
  2782. "type": "string"
  2783. },
  2784. "required": true
  2785. },
  2786. {
  2787. "name": "directory",
  2788. "in": "query",
  2789. "schema": {
  2790. "type": "string"
  2791. },
  2792. "required": false
  2793. },
  2794. {
  2795. "name": "workspace",
  2796. "in": "query",
  2797. "schema": {
  2798. "type": "string"
  2799. },
  2800. "required": false
  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": "name",
  2852. "in": "path",
  2853. "schema": {
  2854. "type": "string"
  2855. },
  2856. "required": true
  2857. },
  2858. {
  2859. "name": "directory",
  2860. "in": "query",
  2861. "schema": {
  2862. "type": "string"
  2863. },
  2864. "required": false
  2865. },
  2866. {
  2867. "name": "workspace",
  2868. "in": "query",
  2869. "schema": {
  2870. "type": "string"
  2871. },
  2872. "required": false
  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": "name",
  2904. "in": "path",
  2905. "schema": {
  2906. "type": "string"
  2907. },
  2908. "required": true
  2909. },
  2910. {
  2911. "name": "directory",
  2912. "in": "query",
  2913. "schema": {
  2914. "type": "string"
  2915. },
  2916. "required": false
  2917. },
  2918. {
  2919. "name": "workspace",
  2920. "in": "query",
  2921. "schema": {
  2922. "type": "string"
  2923. },
  2924. "required": false
  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. "schema": {
  2958. "type": "string"
  2959. },
  2960. "required": false
  2961. },
  2962. {
  2963. "name": "workspace",
  2964. "in": "query",
  2965. "schema": {
  2966. "type": "string"
  2967. },
  2968. "required": false
  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. "schema": {
  3006. "type": "string"
  3007. },
  3008. "required": false
  3009. },
  3010. {
  3011. "name": "workspace",
  3012. "in": "query",
  3013. "schema": {
  3014. "type": "string"
  3015. },
  3016. "required": false
  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. "schema": {
  3050. "type": "string"
  3051. },
  3052. "required": false
  3053. },
  3054. {
  3055. "name": "workspace",
  3056. "in": "query",
  3057. "schema": {
  3058. "type": "string"
  3059. },
  3060. "required": false
  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": "projectID",
  3092. "in": "path",
  3093. "schema": {
  3094. "type": "string"
  3095. },
  3096. "required": true
  3097. },
  3098. {
  3099. "name": "directory",
  3100. "in": "query",
  3101. "schema": {
  3102. "type": "string"
  3103. },
  3104. "required": false
  3105. },
  3106. {
  3107. "name": "workspace",
  3108. "in": "query",
  3109. "schema": {
  3110. "type": "string"
  3111. },
  3112. "required": false
  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. "schema": {
  3206. "type": "string"
  3207. },
  3208. "required": false
  3209. },
  3210. {
  3211. "name": "workspace",
  3212. "in": "query",
  3213. "schema": {
  3214. "type": "string"
  3215. },
  3216. "required": false
  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. "schema": {
  3267. "type": "string"
  3268. },
  3269. "required": false
  3270. },
  3271. {
  3272. "name": "workspace",
  3273. "in": "query",
  3274. "schema": {
  3275. "type": "string"
  3276. },
  3277. "required": false
  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. "schema": {
  3313. "type": "string"
  3314. },
  3315. "required": false
  3316. },
  3317. {
  3318. "name": "workspace",
  3319. "in": "query",
  3320. "schema": {
  3321. "type": "string"
  3322. },
  3323. "required": false
  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": "ptyID",
  3398. "in": "path",
  3399. "schema": {
  3400. "type": "string",
  3401. "pattern": "^pty.*"
  3402. },
  3403. "required": true
  3404. },
  3405. {
  3406. "name": "directory",
  3407. "in": "query",
  3408. "schema": {
  3409. "type": "string"
  3410. },
  3411. "required": false
  3412. },
  3413. {
  3414. "name": "workspace",
  3415. "in": "query",
  3416. "schema": {
  3417. "type": "string"
  3418. },
  3419. "required": false
  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": "ptyID",
  3459. "in": "path",
  3460. "schema": {
  3461. "type": "string",
  3462. "pattern": "^pty.*"
  3463. },
  3464. "required": true
  3465. },
  3466. {
  3467. "name": "directory",
  3468. "in": "query",
  3469. "schema": {
  3470. "type": "string"
  3471. },
  3472. "required": false
  3473. },
  3474. {
  3475. "name": "workspace",
  3476. "in": "query",
  3477. "schema": {
  3478. "type": "string"
  3479. },
  3480. "required": false
  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": "ptyID",
  3550. "in": "path",
  3551. "schema": {
  3552. "type": "string",
  3553. "pattern": "^pty.*"
  3554. },
  3555. "required": true
  3556. },
  3557. {
  3558. "name": "directory",
  3559. "in": "query",
  3560. "schema": {
  3561. "type": "string"
  3562. },
  3563. "required": false
  3564. },
  3565. {
  3566. "name": "workspace",
  3567. "in": "query",
  3568. "schema": {
  3569. "type": "string"
  3570. },
  3571. "required": false
  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": "ptyID",
  3614. "in": "path",
  3615. "schema": {
  3616. "type": "string",
  3617. "pattern": "^pty.*"
  3618. },
  3619. "required": true
  3620. },
  3621. {
  3622. "name": "directory",
  3623. "in": "query",
  3624. "schema": {
  3625. "type": "string"
  3626. },
  3627. "required": false
  3628. },
  3629. {
  3630. "name": "workspace",
  3631. "in": "query",
  3632. "schema": {
  3633. "type": "string"
  3634. },
  3635. "required": false
  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. "schema": {
  3701. "type": "string"
  3702. },
  3703. "required": false
  3704. },
  3705. {
  3706. "name": "workspace",
  3707. "in": "query",
  3708. "schema": {
  3709. "type": "string"
  3710. },
  3711. "required": false
  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": "requestID",
  3747. "in": "path",
  3748. "schema": {
  3749. "type": "string",
  3750. "pattern": "^que.*"
  3751. },
  3752. "required": true
  3753. },
  3754. {
  3755. "name": "directory",
  3756. "in": "query",
  3757. "schema": {
  3758. "type": "string"
  3759. },
  3760. "required": false
  3761. },
  3762. {
  3763. "name": "workspace",
  3764. "in": "query",
  3765. "schema": {
  3766. "type": "string"
  3767. },
  3768. "required": false
  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": "requestID",
  3841. "in": "path",
  3842. "schema": {
  3843. "type": "string",
  3844. "pattern": "^que.*"
  3845. },
  3846. "required": true
  3847. },
  3848. {
  3849. "name": "directory",
  3850. "in": "query",
  3851. "schema": {
  3852. "type": "string"
  3853. },
  3854. "required": false
  3855. },
  3856. {
  3857. "name": "workspace",
  3858. "in": "query",
  3859. "schema": {
  3860. "type": "string"
  3861. },
  3862. "required": false
  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. "schema": {
  3917. "type": "string"
  3918. },
  3919. "required": false
  3920. },
  3921. {
  3922. "name": "workspace",
  3923. "in": "query",
  3924. "schema": {
  3925. "type": "string"
  3926. },
  3927. "required": false
  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": "requestID",
  3963. "in": "path",
  3964. "schema": {
  3965. "type": "string",
  3966. "pattern": "^per.*"
  3967. },
  3968. "required": true
  3969. },
  3970. {
  3971. "name": "directory",
  3972. "in": "query",
  3973. "schema": {
  3974. "type": "string"
  3975. },
  3976. "required": false
  3977. },
  3978. {
  3979. "name": "workspace",
  3980. "in": "query",
  3981. "schema": {
  3982. "type": "string"
  3983. },
  3984. "required": false
  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. "schema": {
  4059. "type": "string"
  4060. },
  4061. "required": false
  4062. },
  4063. {
  4064. "name": "workspace",
  4065. "in": "query",
  4066. "schema": {
  4067. "type": "string"
  4068. },
  4069. "required": false
  4070. }
  4071. ],
  4072. "responses": {
  4073. "200": {
  4074. "description": "List of 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. "schema": {
  4126. "type": "string"
  4127. },
  4128. "required": false
  4129. },
  4130. {
  4131. "name": "workspace",
  4132. "in": "query",
  4133. "schema": {
  4134. "type": "string"
  4135. },
  4136. "required": false
  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": "providerID",
  4175. "in": "path",
  4176. "schema": {
  4177. "type": "string"
  4178. },
  4179. "required": true
  4180. },
  4181. {
  4182. "name": "directory",
  4183. "in": "query",
  4184. "schema": {
  4185. "type": "string"
  4186. },
  4187. "required": false
  4188. },
  4189. {
  4190. "name": "workspace",
  4191. "in": "query",
  4192. "schema": {
  4193. "type": "string"
  4194. },
  4195. "required": false
  4196. }
  4197. ],
  4198. "responses": {
  4199. "200": {
  4200. "description": "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": "providerID",
  4260. "in": "path",
  4261. "schema": {
  4262. "type": "string"
  4263. },
  4264. "required": true
  4265. },
  4266. {
  4267. "name": "directory",
  4268. "in": "query",
  4269. "schema": {
  4270. "type": "string"
  4271. },
  4272. "required": false
  4273. },
  4274. {
  4275. "name": "workspace",
  4276. "in": "query",
  4277. "schema": {
  4278. "type": "string"
  4279. },
  4280. "required": false
  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. "schema": {
  4345. "type": "string"
  4346. },
  4347. "required": false
  4348. },
  4349. {
  4350. "name": "workspace",
  4351. "in": "query",
  4352. "schema": {
  4353. "type": "string"
  4354. },
  4355. "required": false
  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. "schema": {
  4448. "type": "string"
  4449. },
  4450. "required": false
  4451. },
  4452. {
  4453. "name": "workspace",
  4454. "in": "query",
  4455. "schema": {
  4456. "type": "string"
  4457. },
  4458. "required": false
  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. "schema": {
  4545. "type": "string"
  4546. },
  4547. "required": false
  4548. },
  4549. {
  4550. "name": "workspace",
  4551. "in": "query",
  4552. "schema": {
  4553. "type": "string"
  4554. },
  4555. "required": false
  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": "sessionID",
  4601. "in": "path",
  4602. "schema": {
  4603. "type": "string",
  4604. "pattern": "^ses.*"
  4605. },
  4606. "required": true
  4607. },
  4608. {
  4609. "name": "directory",
  4610. "in": "query",
  4611. "schema": {
  4612. "type": "string"
  4613. },
  4614. "required": false
  4615. },
  4616. {
  4617. "name": "workspace",
  4618. "in": "query",
  4619. "schema": {
  4620. "type": "string"
  4621. },
  4622. "required": false
  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": "sessionID",
  4672. "in": "path",
  4673. "schema": {
  4674. "type": "string",
  4675. "pattern": "^ses.*"
  4676. },
  4677. "required": true
  4678. },
  4679. {
  4680. "name": "directory",
  4681. "in": "query",
  4682. "schema": {
  4683. "type": "string"
  4684. },
  4685. "required": false
  4686. },
  4687. {
  4688. "name": "workspace",
  4689. "in": "query",
  4690. "schema": {
  4691. "type": "string"
  4692. },
  4693. "required": false
  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": "sessionID",
  4744. "in": "path",
  4745. "schema": {
  4746. "type": "string",
  4747. "pattern": "^ses.*"
  4748. },
  4749. "required": true
  4750. },
  4751. {
  4752. "name": "directory",
  4753. "in": "query",
  4754. "schema": {
  4755. "type": "string"
  4756. },
  4757. "required": false
  4758. },
  4759. {
  4760. "name": "workspace",
  4761. "in": "query",
  4762. "schema": {
  4763. "type": "string"
  4764. },
  4765. "required": false
  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": "sessionID",
  4844. "in": "path",
  4845. "schema": {
  4846. "type": "string",
  4847. "pattern": "^ses.*"
  4848. },
  4849. "required": true
  4850. },
  4851. {
  4852. "name": "directory",
  4853. "in": "query",
  4854. "schema": {
  4855. "type": "string"
  4856. },
  4857. "required": false
  4858. },
  4859. {
  4860. "name": "workspace",
  4861. "in": "query",
  4862. "schema": {
  4863. "type": "string"
  4864. },
  4865. "required": false
  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": "sessionID",
  4921. "in": "path",
  4922. "schema": {
  4923. "type": "string",
  4924. "pattern": "^ses.*"
  4925. },
  4926. "required": true
  4927. },
  4928. {
  4929. "name": "directory",
  4930. "in": "query",
  4931. "schema": {
  4932. "type": "string"
  4933. },
  4934. "required": false
  4935. },
  4936. {
  4937. "name": "workspace",
  4938. "in": "query",
  4939. "schema": {
  4940. "type": "string"
  4941. },
  4942. "required": false
  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": "sessionID",
  4998. "in": "path",
  4999. "schema": {
  5000. "type": "string",
  5001. "pattern": "^ses.*"
  5002. },
  5003. "required": true
  5004. },
  5005. {
  5006. "name": "directory",
  5007. "in": "query",
  5008. "schema": {
  5009. "type": "string"
  5010. },
  5011. "required": false
  5012. },
  5013. {
  5014. "name": "workspace",
  5015. "in": "query",
  5016. "schema": {
  5017. "type": "string"
  5018. },
  5019. "required": false
  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": "sessionID",
  5064. "in": "path",
  5065. "schema": {
  5066. "type": "string",
  5067. "pattern": "^ses.*"
  5068. },
  5069. "required": true
  5070. },
  5071. {
  5072. "name": "directory",
  5073. "in": "query",
  5074. "schema": {
  5075. "type": "string"
  5076. },
  5077. "required": false
  5078. },
  5079. {
  5080. "name": "workspace",
  5081. "in": "query",
  5082. "schema": {
  5083. "type": "string"
  5084. },
  5085. "required": false
  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": "sessionID",
  5170. "in": "path",
  5171. "schema": {
  5172. "type": "string",
  5173. "pattern": "^ses.*"
  5174. },
  5175. "required": true
  5176. },
  5177. {
  5178. "name": "directory",
  5179. "in": "query",
  5180. "schema": {
  5181. "type": "string"
  5182. },
  5183. "required": false
  5184. },
  5185. {
  5186. "name": "workspace",
  5187. "in": "query",
  5188. "schema": {
  5189. "type": "string"
  5190. },
  5191. "required": false
  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": "sessionID",
  5324. "in": "path",
  5325. "schema": {
  5326. "type": "string",
  5327. "pattern": "^ses.*"
  5328. },
  5329. "required": true
  5330. },
  5331. {
  5332. "name": "messageID",
  5333. "in": "path",
  5334. "schema": {
  5335. "type": "string",
  5336. "pattern": "^msg.*"
  5337. },
  5338. "required": true
  5339. },
  5340. {
  5341. "name": "directory",
  5342. "in": "query",
  5343. "schema": {
  5344. "type": "string"
  5345. },
  5346. "required": false
  5347. },
  5348. {
  5349. "name": "workspace",
  5350. "in": "query",
  5351. "schema": {
  5352. "type": "string"
  5353. },
  5354. "required": false
  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": "sessionID",
  5418. "in": "path",
  5419. "schema": {
  5420. "type": "string",
  5421. "pattern": "^ses.*"
  5422. },
  5423. "required": true
  5424. },
  5425. {
  5426. "name": "messageID",
  5427. "in": "path",
  5428. "schema": {
  5429. "type": "string",
  5430. "pattern": "^msg.*"
  5431. },
  5432. "required": true
  5433. },
  5434. {
  5435. "name": "directory",
  5436. "in": "query",
  5437. "schema": {
  5438. "type": "string"
  5439. },
  5440. "required": false
  5441. },
  5442. {
  5443. "name": "workspace",
  5444. "in": "query",
  5445. "schema": {
  5446. "type": "string"
  5447. },
  5448. "required": false
  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": "sessionID",
  5501. "in": "path",
  5502. "schema": {
  5503. "type": "string",
  5504. "pattern": "^ses.*"
  5505. },
  5506. "required": true
  5507. },
  5508. {
  5509. "name": "directory",
  5510. "in": "query",
  5511. "schema": {
  5512. "type": "string"
  5513. },
  5514. "required": false
  5515. },
  5516. {
  5517. "name": "workspace",
  5518. "in": "query",
  5519. "schema": {
  5520. "type": "string"
  5521. },
  5522. "required": false
  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": "sessionID",
  5579. "in": "path",
  5580. "schema": {
  5581. "type": "string",
  5582. "pattern": "^ses.*"
  5583. },
  5584. "required": true
  5585. },
  5586. {
  5587. "name": "directory",
  5588. "in": "query",
  5589. "schema": {
  5590. "type": "string"
  5591. },
  5592. "required": false
  5593. },
  5594. {
  5595. "name": "workspace",
  5596. "in": "query",
  5597. "schema": {
  5598. "type": "string"
  5599. },
  5600. "required": false
  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": "sessionID",
  5653. "in": "path",
  5654. "schema": {
  5655. "type": "string",
  5656. "pattern": "^ses.*"
  5657. },
  5658. "required": true
  5659. },
  5660. {
  5661. "name": "directory",
  5662. "in": "query",
  5663. "schema": {
  5664. "type": "string"
  5665. },
  5666. "required": false
  5667. },
  5668. {
  5669. "name": "workspace",
  5670. "in": "query",
  5671. "schema": {
  5672. "type": "string"
  5673. },
  5674. "required": false
  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": "sessionID",
  5749. "in": "path",
  5750. "schema": {
  5751. "type": "string",
  5752. "pattern": "^ses.*"
  5753. },
  5754. "required": true
  5755. },
  5756. {
  5757. "name": "directory",
  5758. "in": "query",
  5759. "schema": {
  5760. "type": "string"
  5761. },
  5762. "required": false
  5763. },
  5764. {
  5765. "name": "workspace",
  5766. "in": "query",
  5767. "schema": {
  5768. "type": "string"
  5769. },
  5770. "required": false
  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": "sessionID",
  5820. "in": "path",
  5821. "schema": {
  5822. "type": "string",
  5823. "pattern": "^ses.*"
  5824. },
  5825. "required": true
  5826. },
  5827. {
  5828. "name": "directory",
  5829. "in": "query",
  5830. "schema": {
  5831. "type": "string"
  5832. },
  5833. "required": false
  5834. },
  5835. {
  5836. "name": "workspace",
  5837. "in": "query",
  5838. "schema": {
  5839. "type": "string"
  5840. },
  5841. "required": false
  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": "sessionID",
  5893. "in": "path",
  5894. "schema": {
  5895. "type": "string",
  5896. "pattern": "^ses.*"
  5897. },
  5898. "required": true
  5899. },
  5900. {
  5901. "name": "directory",
  5902. "in": "query",
  5903. "schema": {
  5904. "type": "string"
  5905. },
  5906. "required": false
  5907. },
  5908. {
  5909. "name": "workspace",
  5910. "in": "query",
  5911. "schema": {
  5912. "type": "string"
  5913. },
  5914. "required": false
  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": "sessionID",
  5989. "in": "path",
  5990. "schema": {
  5991. "type": "string",
  5992. "pattern": "^ses.*"
  5993. },
  5994. "required": true
  5995. },
  5996. {
  5997. "name": "directory",
  5998. "in": "query",
  5999. "schema": {
  6000. "type": "string"
  6001. },
  6002. "required": false
  6003. },
  6004. {
  6005. "name": "workspace",
  6006. "in": "query",
  6007. "schema": {
  6008. "type": "string"
  6009. },
  6010. "required": false
  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": "sessionID",
  6124. "in": "path",
  6125. "schema": {
  6126. "type": "string",
  6127. "pattern": "^ses.*"
  6128. },
  6129. "required": true
  6130. },
  6131. {
  6132. "name": "directory",
  6133. "in": "query",
  6134. "schema": {
  6135. "type": "string"
  6136. },
  6137. "required": false
  6138. },
  6139. {
  6140. "name": "workspace",
  6141. "in": "query",
  6142. "schema": {
  6143. "type": "string"
  6144. },
  6145. "required": false
  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": "sessionID",
  6269. "in": "path",
  6270. "schema": {
  6271. "type": "string",
  6272. "pattern": "^ses.*"
  6273. },
  6274. "required": true
  6275. },
  6276. {
  6277. "name": "directory",
  6278. "in": "query",
  6279. "schema": {
  6280. "type": "string"
  6281. },
  6282. "required": false
  6283. },
  6284. {
  6285. "name": "workspace",
  6286. "in": "query",
  6287. "schema": {
  6288. "type": "string"
  6289. },
  6290. "required": false
  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": "sessionID",
  6391. "in": "path",
  6392. "schema": {
  6393. "type": "string",
  6394. "pattern": "^ses.*"
  6395. },
  6396. "required": true
  6397. },
  6398. {
  6399. "name": "directory",
  6400. "in": "query",
  6401. "schema": {
  6402. "type": "string"
  6403. },
  6404. "required": false
  6405. },
  6406. {
  6407. "name": "workspace",
  6408. "in": "query",
  6409. "schema": {
  6410. "type": "string"
  6411. },
  6412. "required": false
  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": "sessionID",
  6483. "in": "path",
  6484. "schema": {
  6485. "type": "string",
  6486. "pattern": "^ses.*"
  6487. },
  6488. "required": true
  6489. },
  6490. {
  6491. "name": "directory",
  6492. "in": "query",
  6493. "schema": {
  6494. "type": "string"
  6495. },
  6496. "required": false
  6497. },
  6498. {
  6499. "name": "workspace",
  6500. "in": "query",
  6501. "schema": {
  6502. "type": "string"
  6503. },
  6504. "required": false
  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": "sessionID",
  6556. "in": "path",
  6557. "schema": {
  6558. "type": "string",
  6559. "pattern": "^ses.*"
  6560. },
  6561. "required": true
  6562. },
  6563. {
  6564. "name": "permissionID",
  6565. "in": "path",
  6566. "schema": {
  6567. "type": "string",
  6568. "pattern": "^per.*"
  6569. },
  6570. "required": true
  6571. },
  6572. {
  6573. "name": "directory",
  6574. "in": "query",
  6575. "schema": {
  6576. "type": "string"
  6577. },
  6578. "required": false
  6579. },
  6580. {
  6581. "name": "workspace",
  6582. "in": "query",
  6583. "schema": {
  6584. "type": "string"
  6585. },
  6586. "required": false
  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": "sessionID",
  6657. "in": "path",
  6658. "schema": {
  6659. "type": "string",
  6660. "pattern": "^ses.*"
  6661. },
  6662. "required": true
  6663. },
  6664. {
  6665. "name": "messageID",
  6666. "in": "path",
  6667. "schema": {
  6668. "type": "string",
  6669. "pattern": "^msg.*"
  6670. },
  6671. "required": true
  6672. },
  6673. {
  6674. "name": "partID",
  6675. "in": "path",
  6676. "schema": {
  6677. "type": "string",
  6678. "pattern": "^prt.*"
  6679. },
  6680. "required": true
  6681. },
  6682. {
  6683. "name": "directory",
  6684. "in": "query",
  6685. "schema": {
  6686. "type": "string"
  6687. },
  6688. "required": false
  6689. },
  6690. {
  6691. "name": "workspace",
  6692. "in": "query",
  6693. "schema": {
  6694. "type": "string"
  6695. },
  6696. "required": false
  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": "sessionID",
  6746. "in": "path",
  6747. "schema": {
  6748. "type": "string",
  6749. "pattern": "^ses.*"
  6750. },
  6751. "required": true
  6752. },
  6753. {
  6754. "name": "messageID",
  6755. "in": "path",
  6756. "schema": {
  6757. "type": "string",
  6758. "pattern": "^msg.*"
  6759. },
  6760. "required": true
  6761. },
  6762. {
  6763. "name": "partID",
  6764. "in": "path",
  6765. "schema": {
  6766. "type": "string",
  6767. "pattern": "^prt.*"
  6768. },
  6769. "required": true
  6770. },
  6771. {
  6772. "name": "directory",
  6773. "in": "query",
  6774. "schema": {
  6775. "type": "string"
  6776. },
  6777. "required": false
  6778. },
  6779. {
  6780. "name": "workspace",
  6781. "in": "query",
  6782. "schema": {
  6783. "type": "string"
  6784. },
  6785. "required": false
  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. "schema": {
  6847. "type": "string"
  6848. },
  6849. "required": false
  6850. },
  6851. {
  6852. "name": "workspace",
  6853. "in": "query",
  6854. "schema": {
  6855. "type": "string"
  6856. },
  6857. "required": false
  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. "schema": {
  6892. "type": "string"
  6893. },
  6894. "required": false
  6895. },
  6896. {
  6897. "name": "workspace",
  6898. "in": "query",
  6899. "schema": {
  6900. "type": "string"
  6901. },
  6902. "required": false
  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. "schema": {
  6997. "type": "string"
  6998. },
  6999. "required": false
  7000. },
  7001. {
  7002. "name": "workspace",
  7003. "in": "query",
  7004. "schema": {
  7005. "type": "string"
  7006. },
  7007. "required": false
  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. "schema": {
  7075. "type": "string"
  7076. },
  7077. "required": false
  7078. },
  7079. {
  7080. "name": "workspace",
  7081. "in": "query",
  7082. "schema": {
  7083. "type": "string"
  7084. },
  7085. "required": false
  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. "schema": {
  7166. "type": "string"
  7167. },
  7168. "required": false
  7169. },
  7170. {
  7171. "name": "workspace",
  7172. "in": "query",
  7173. "schema": {
  7174. "type": "string"
  7175. },
  7176. "required": false
  7177. },
  7178. {
  7179. "name": "limit",
  7180. "in": "query",
  7181. "schema": {
  7182. "type": "number"
  7183. },
  7184. "required": false
  7185. },
  7186. {
  7187. "name": "order",
  7188. "in": "query",
  7189. "schema": {
  7190. "type": "string",
  7191. "enum": ["asc", "desc"]
  7192. },
  7193. "required": false
  7194. },
  7195. {
  7196. "name": "path",
  7197. "in": "query",
  7198. "schema": {
  7199. "type": "string"
  7200. },
  7201. "required": false
  7202. },
  7203. {
  7204. "name": "roots",
  7205. "in": "query",
  7206. "schema": {
  7207. "anyOf": [
  7208. {
  7209. "type": "boolean"
  7210. },
  7211. {
  7212. "type": "string",
  7213. "enum": ["true", "false"]
  7214. }
  7215. ]
  7216. },
  7217. "required": false
  7218. },
  7219. {
  7220. "name": "start",
  7221. "in": "query",
  7222. "schema": {
  7223. "type": "number"
  7224. },
  7225. "required": false
  7226. },
  7227. {
  7228. "name": "search",
  7229. "in": "query",
  7230. "schema": {
  7231. "type": "string"
  7232. },
  7233. "required": false
  7234. },
  7235. {
  7236. "name": "cursor",
  7237. "in": "query",
  7238. "schema": {
  7239. "type": "string",
  7240. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order or filters."
  7241. },
  7242. "required": false
  7243. }
  7244. ],
  7245. "responses": {
  7246. "200": {
  7247. "description": "V2SessionsResponse",
  7248. "content": {
  7249. "application/json": {
  7250. "schema": {
  7251. "$ref": "#/components/schemas/V2SessionsResponse"
  7252. }
  7253. }
  7254. }
  7255. },
  7256. "400": {
  7257. "description": "Bad request",
  7258. "content": {
  7259. "application/json": {
  7260. "schema": {
  7261. "$ref": "#/components/schemas/BadRequestError"
  7262. }
  7263. }
  7264. }
  7265. }
  7266. },
  7267. "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.",
  7268. "summary": "List v2 sessions",
  7269. "x-codeSamples": [
  7270. {
  7271. "lang": "js",
  7272. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.list({\n ...\n})"
  7273. }
  7274. ]
  7275. }
  7276. },
  7277. "/api/session/{sessionID}/prompt": {
  7278. "post": {
  7279. "tags": ["v2"],
  7280. "operationId": "v2.session.prompt",
  7281. "parameters": [
  7282. {
  7283. "name": "sessionID",
  7284. "in": "path",
  7285. "schema": {
  7286. "type": "string",
  7287. "pattern": "^ses.*"
  7288. },
  7289. "required": true
  7290. },
  7291. {
  7292. "name": "directory",
  7293. "in": "query",
  7294. "schema": {
  7295. "type": "string"
  7296. },
  7297. "required": false
  7298. },
  7299. {
  7300. "name": "workspace",
  7301. "in": "query",
  7302. "schema": {
  7303. "type": "string"
  7304. },
  7305. "required": false
  7306. }
  7307. ],
  7308. "responses": {
  7309. "200": {
  7310. "description": "Session.Message",
  7311. "content": {
  7312. "application/json": {
  7313. "schema": {
  7314. "$ref": "#/components/schemas/SessionMessage"
  7315. }
  7316. }
  7317. }
  7318. }
  7319. },
  7320. "description": "Create a v2 session message and queue it for the agent loop.",
  7321. "summary": "Send v2 message",
  7322. "requestBody": {
  7323. "content": {
  7324. "application/json": {
  7325. "schema": {
  7326. "type": "object",
  7327. "properties": {
  7328. "prompt": {
  7329. "$ref": "#/components/schemas/Prompt"
  7330. },
  7331. "delivery": {
  7332. "$ref": "#/components/schemas/SessionDelivery"
  7333. }
  7334. },
  7335. "required": ["prompt"],
  7336. "additionalProperties": false
  7337. }
  7338. }
  7339. }
  7340. },
  7341. "x-codeSamples": [
  7342. {
  7343. "lang": "js",
  7344. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.prompt({\n ...\n})"
  7345. }
  7346. ]
  7347. }
  7348. },
  7349. "/api/session/{sessionID}/compact": {
  7350. "post": {
  7351. "tags": ["v2"],
  7352. "operationId": "v2.session.compact",
  7353. "parameters": [
  7354. {
  7355. "name": "sessionID",
  7356. "in": "path",
  7357. "schema": {
  7358. "type": "string",
  7359. "pattern": "^ses.*"
  7360. },
  7361. "required": true
  7362. },
  7363. {
  7364. "name": "directory",
  7365. "in": "query",
  7366. "schema": {
  7367. "type": "string"
  7368. },
  7369. "required": false
  7370. },
  7371. {
  7372. "name": "workspace",
  7373. "in": "query",
  7374. "schema": {
  7375. "type": "string"
  7376. },
  7377. "required": false
  7378. }
  7379. ],
  7380. "responses": {
  7381. "204": {
  7382. "description": "<No Content>"
  7383. }
  7384. },
  7385. "description": "Compact a v2 session conversation.",
  7386. "summary": "Compact v2 session",
  7387. "x-codeSamples": [
  7388. {
  7389. "lang": "js",
  7390. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.compact({\n ...\n})"
  7391. }
  7392. ]
  7393. }
  7394. },
  7395. "/api/session/{sessionID}/wait": {
  7396. "post": {
  7397. "tags": ["v2"],
  7398. "operationId": "v2.session.wait",
  7399. "parameters": [
  7400. {
  7401. "name": "sessionID",
  7402. "in": "path",
  7403. "schema": {
  7404. "type": "string",
  7405. "pattern": "^ses.*"
  7406. },
  7407. "required": true
  7408. },
  7409. {
  7410. "name": "directory",
  7411. "in": "query",
  7412. "schema": {
  7413. "type": "string"
  7414. },
  7415. "required": false
  7416. },
  7417. {
  7418. "name": "workspace",
  7419. "in": "query",
  7420. "schema": {
  7421. "type": "string"
  7422. },
  7423. "required": false
  7424. }
  7425. ],
  7426. "responses": {
  7427. "204": {
  7428. "description": "<No Content>"
  7429. }
  7430. },
  7431. "description": "Wait for a v2 session agent loop to become idle.",
  7432. "summary": "Wait for v2 session",
  7433. "x-codeSamples": [
  7434. {
  7435. "lang": "js",
  7436. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.wait({\n ...\n})"
  7437. }
  7438. ]
  7439. }
  7440. },
  7441. "/api/session/{sessionID}/context": {
  7442. "get": {
  7443. "tags": ["v2"],
  7444. "operationId": "v2.session.context",
  7445. "parameters": [
  7446. {
  7447. "name": "sessionID",
  7448. "in": "path",
  7449. "schema": {
  7450. "type": "string",
  7451. "pattern": "^ses.*"
  7452. },
  7453. "required": true
  7454. },
  7455. {
  7456. "name": "directory",
  7457. "in": "query",
  7458. "schema": {
  7459. "type": "string"
  7460. },
  7461. "required": false
  7462. },
  7463. {
  7464. "name": "workspace",
  7465. "in": "query",
  7466. "schema": {
  7467. "type": "string"
  7468. },
  7469. "required": false
  7470. }
  7471. ],
  7472. "responses": {
  7473. "200": {
  7474. "description": "Success",
  7475. "content": {
  7476. "application/json": {
  7477. "schema": {
  7478. "type": "array",
  7479. "items": {
  7480. "$ref": "#/components/schemas/SessionMessage"
  7481. }
  7482. }
  7483. }
  7484. }
  7485. }
  7486. },
  7487. "description": "Retrieve the active context messages for a v2 session (all messages after the last compaction).",
  7488. "summary": "Get v2 session context",
  7489. "x-codeSamples": [
  7490. {
  7491. "lang": "js",
  7492. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.context({\n ...\n})"
  7493. }
  7494. ]
  7495. }
  7496. },
  7497. "/api/session/{sessionID}/message": {
  7498. "get": {
  7499. "tags": ["v2 messages"],
  7500. "operationId": "v2.session.messages",
  7501. "parameters": [
  7502. {
  7503. "name": "sessionID",
  7504. "in": "path",
  7505. "schema": {
  7506. "type": "string",
  7507. "pattern": "^ses.*"
  7508. },
  7509. "required": true
  7510. },
  7511. {
  7512. "name": "directory",
  7513. "in": "query",
  7514. "schema": {
  7515. "type": "string"
  7516. },
  7517. "required": false
  7518. },
  7519. {
  7520. "name": "workspace",
  7521. "in": "query",
  7522. "schema": {
  7523. "type": "string"
  7524. },
  7525. "required": false
  7526. },
  7527. {
  7528. "name": "limit",
  7529. "in": "query",
  7530. "schema": {
  7531. "type": "number"
  7532. },
  7533. "required": false
  7534. },
  7535. {
  7536. "name": "order",
  7537. "in": "query",
  7538. "schema": {
  7539. "type": "string",
  7540. "enum": ["asc", "desc"]
  7541. },
  7542. "required": false
  7543. },
  7544. {
  7545. "name": "cursor",
  7546. "in": "query",
  7547. "schema": {
  7548. "type": "string",
  7549. "description": "Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order."
  7550. },
  7551. "required": false
  7552. }
  7553. ],
  7554. "responses": {
  7555. "200": {
  7556. "description": "V2SessionMessagesResponse",
  7557. "content": {
  7558. "application/json": {
  7559. "schema": {
  7560. "$ref": "#/components/schemas/V2SessionMessagesResponse"
  7561. }
  7562. }
  7563. }
  7564. },
  7565. "400": {
  7566. "description": "Bad request",
  7567. "content": {
  7568. "application/json": {
  7569. "schema": {
  7570. "$ref": "#/components/schemas/BadRequestError"
  7571. }
  7572. }
  7573. }
  7574. }
  7575. },
  7576. "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.",
  7577. "summary": "Get v2 session messages",
  7578. "x-codeSamples": [
  7579. {
  7580. "lang": "js",
  7581. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.session.messages({\n ...\n})"
  7582. }
  7583. ]
  7584. }
  7585. },
  7586. "/tui/append-prompt": {
  7587. "post": {
  7588. "tags": ["tui"],
  7589. "operationId": "tui.appendPrompt",
  7590. "parameters": [
  7591. {
  7592. "name": "directory",
  7593. "in": "query",
  7594. "schema": {
  7595. "type": "string"
  7596. },
  7597. "required": false
  7598. },
  7599. {
  7600. "name": "workspace",
  7601. "in": "query",
  7602. "schema": {
  7603. "type": "string"
  7604. },
  7605. "required": false
  7606. }
  7607. ],
  7608. "responses": {
  7609. "200": {
  7610. "description": "Prompt processed successfully",
  7611. "content": {
  7612. "application/json": {
  7613. "schema": {
  7614. "type": "boolean",
  7615. "description": "Prompt processed successfully"
  7616. }
  7617. }
  7618. }
  7619. },
  7620. "400": {
  7621. "description": "Bad request",
  7622. "content": {
  7623. "application/json": {
  7624. "schema": {
  7625. "$ref": "#/components/schemas/BadRequestError"
  7626. }
  7627. }
  7628. }
  7629. }
  7630. },
  7631. "description": "Append prompt to the TUI.",
  7632. "summary": "Append TUI prompt",
  7633. "requestBody": {
  7634. "content": {
  7635. "application/json": {
  7636. "schema": {
  7637. "type": "object",
  7638. "properties": {
  7639. "text": {
  7640. "type": "string"
  7641. }
  7642. },
  7643. "required": ["text"],
  7644. "additionalProperties": false
  7645. }
  7646. }
  7647. }
  7648. },
  7649. "x-codeSamples": [
  7650. {
  7651. "lang": "js",
  7652. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.appendPrompt({\n ...\n})"
  7653. }
  7654. ]
  7655. }
  7656. },
  7657. "/tui/open-help": {
  7658. "post": {
  7659. "tags": ["tui"],
  7660. "operationId": "tui.openHelp",
  7661. "parameters": [
  7662. {
  7663. "name": "directory",
  7664. "in": "query",
  7665. "schema": {
  7666. "type": "string"
  7667. },
  7668. "required": false
  7669. },
  7670. {
  7671. "name": "workspace",
  7672. "in": "query",
  7673. "schema": {
  7674. "type": "string"
  7675. },
  7676. "required": false
  7677. }
  7678. ],
  7679. "responses": {
  7680. "200": {
  7681. "description": "Help dialog opened successfully",
  7682. "content": {
  7683. "application/json": {
  7684. "schema": {
  7685. "type": "boolean",
  7686. "description": "Help dialog opened successfully"
  7687. }
  7688. }
  7689. }
  7690. }
  7691. },
  7692. "description": "Open the help dialog in the TUI to display user assistance information.",
  7693. "summary": "Open help dialog",
  7694. "x-codeSamples": [
  7695. {
  7696. "lang": "js",
  7697. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openHelp({\n ...\n})"
  7698. }
  7699. ]
  7700. }
  7701. },
  7702. "/tui/open-sessions": {
  7703. "post": {
  7704. "tags": ["tui"],
  7705. "operationId": "tui.openSessions",
  7706. "parameters": [
  7707. {
  7708. "name": "directory",
  7709. "in": "query",
  7710. "schema": {
  7711. "type": "string"
  7712. },
  7713. "required": false
  7714. },
  7715. {
  7716. "name": "workspace",
  7717. "in": "query",
  7718. "schema": {
  7719. "type": "string"
  7720. },
  7721. "required": false
  7722. }
  7723. ],
  7724. "responses": {
  7725. "200": {
  7726. "description": "Session dialog opened successfully",
  7727. "content": {
  7728. "application/json": {
  7729. "schema": {
  7730. "type": "boolean",
  7731. "description": "Session dialog opened successfully"
  7732. }
  7733. }
  7734. }
  7735. }
  7736. },
  7737. "description": "Open the session dialog.",
  7738. "summary": "Open sessions dialog",
  7739. "x-codeSamples": [
  7740. {
  7741. "lang": "js",
  7742. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openSessions({\n ...\n})"
  7743. }
  7744. ]
  7745. }
  7746. },
  7747. "/tui/open-themes": {
  7748. "post": {
  7749. "tags": ["tui"],
  7750. "operationId": "tui.openThemes",
  7751. "parameters": [
  7752. {
  7753. "name": "directory",
  7754. "in": "query",
  7755. "schema": {
  7756. "type": "string"
  7757. },
  7758. "required": false
  7759. },
  7760. {
  7761. "name": "workspace",
  7762. "in": "query",
  7763. "schema": {
  7764. "type": "string"
  7765. },
  7766. "required": false
  7767. }
  7768. ],
  7769. "responses": {
  7770. "200": {
  7771. "description": "Theme dialog opened successfully",
  7772. "content": {
  7773. "application/json": {
  7774. "schema": {
  7775. "type": "boolean",
  7776. "description": "Theme dialog opened successfully"
  7777. }
  7778. }
  7779. }
  7780. }
  7781. },
  7782. "description": "Open the theme dialog.",
  7783. "summary": "Open themes dialog",
  7784. "x-codeSamples": [
  7785. {
  7786. "lang": "js",
  7787. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openThemes({\n ...\n})"
  7788. }
  7789. ]
  7790. }
  7791. },
  7792. "/tui/open-models": {
  7793. "post": {
  7794. "tags": ["tui"],
  7795. "operationId": "tui.openModels",
  7796. "parameters": [
  7797. {
  7798. "name": "directory",
  7799. "in": "query",
  7800. "schema": {
  7801. "type": "string"
  7802. },
  7803. "required": false
  7804. },
  7805. {
  7806. "name": "workspace",
  7807. "in": "query",
  7808. "schema": {
  7809. "type": "string"
  7810. },
  7811. "required": false
  7812. }
  7813. ],
  7814. "responses": {
  7815. "200": {
  7816. "description": "Model dialog opened successfully",
  7817. "content": {
  7818. "application/json": {
  7819. "schema": {
  7820. "type": "boolean",
  7821. "description": "Model dialog opened successfully"
  7822. }
  7823. }
  7824. }
  7825. }
  7826. },
  7827. "description": "Open the model dialog.",
  7828. "summary": "Open models dialog",
  7829. "x-codeSamples": [
  7830. {
  7831. "lang": "js",
  7832. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.openModels({\n ...\n})"
  7833. }
  7834. ]
  7835. }
  7836. },
  7837. "/tui/submit-prompt": {
  7838. "post": {
  7839. "tags": ["tui"],
  7840. "operationId": "tui.submitPrompt",
  7841. "parameters": [
  7842. {
  7843. "name": "directory",
  7844. "in": "query",
  7845. "schema": {
  7846. "type": "string"
  7847. },
  7848. "required": false
  7849. },
  7850. {
  7851. "name": "workspace",
  7852. "in": "query",
  7853. "schema": {
  7854. "type": "string"
  7855. },
  7856. "required": false
  7857. }
  7858. ],
  7859. "responses": {
  7860. "200": {
  7861. "description": "Prompt submitted successfully",
  7862. "content": {
  7863. "application/json": {
  7864. "schema": {
  7865. "type": "boolean",
  7866. "description": "Prompt submitted successfully"
  7867. }
  7868. }
  7869. }
  7870. }
  7871. },
  7872. "description": "Submit the prompt.",
  7873. "summary": "Submit TUI prompt",
  7874. "x-codeSamples": [
  7875. {
  7876. "lang": "js",
  7877. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.submitPrompt({\n ...\n})"
  7878. }
  7879. ]
  7880. }
  7881. },
  7882. "/tui/clear-prompt": {
  7883. "post": {
  7884. "tags": ["tui"],
  7885. "operationId": "tui.clearPrompt",
  7886. "parameters": [
  7887. {
  7888. "name": "directory",
  7889. "in": "query",
  7890. "schema": {
  7891. "type": "string"
  7892. },
  7893. "required": false
  7894. },
  7895. {
  7896. "name": "workspace",
  7897. "in": "query",
  7898. "schema": {
  7899. "type": "string"
  7900. },
  7901. "required": false
  7902. }
  7903. ],
  7904. "responses": {
  7905. "200": {
  7906. "description": "Prompt cleared successfully",
  7907. "content": {
  7908. "application/json": {
  7909. "schema": {
  7910. "type": "boolean",
  7911. "description": "Prompt cleared successfully"
  7912. }
  7913. }
  7914. }
  7915. }
  7916. },
  7917. "description": "Clear the prompt.",
  7918. "summary": "Clear TUI prompt",
  7919. "x-codeSamples": [
  7920. {
  7921. "lang": "js",
  7922. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.clearPrompt({\n ...\n})"
  7923. }
  7924. ]
  7925. }
  7926. },
  7927. "/tui/execute-command": {
  7928. "post": {
  7929. "tags": ["tui"],
  7930. "operationId": "tui.executeCommand",
  7931. "parameters": [
  7932. {
  7933. "name": "directory",
  7934. "in": "query",
  7935. "schema": {
  7936. "type": "string"
  7937. },
  7938. "required": false
  7939. },
  7940. {
  7941. "name": "workspace",
  7942. "in": "query",
  7943. "schema": {
  7944. "type": "string"
  7945. },
  7946. "required": false
  7947. }
  7948. ],
  7949. "responses": {
  7950. "200": {
  7951. "description": "Command executed successfully",
  7952. "content": {
  7953. "application/json": {
  7954. "schema": {
  7955. "type": "boolean",
  7956. "description": "Command executed successfully"
  7957. }
  7958. }
  7959. }
  7960. },
  7961. "400": {
  7962. "description": "Bad request",
  7963. "content": {
  7964. "application/json": {
  7965. "schema": {
  7966. "$ref": "#/components/schemas/BadRequestError"
  7967. }
  7968. }
  7969. }
  7970. }
  7971. },
  7972. "description": "Execute a TUI command.",
  7973. "summary": "Execute TUI command",
  7974. "requestBody": {
  7975. "content": {
  7976. "application/json": {
  7977. "schema": {
  7978. "type": "object",
  7979. "properties": {
  7980. "command": {
  7981. "type": "string"
  7982. }
  7983. },
  7984. "required": ["command"],
  7985. "additionalProperties": false
  7986. }
  7987. }
  7988. }
  7989. },
  7990. "x-codeSamples": [
  7991. {
  7992. "lang": "js",
  7993. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.executeCommand({\n ...\n})"
  7994. }
  7995. ]
  7996. }
  7997. },
  7998. "/tui/show-toast": {
  7999. "post": {
  8000. "tags": ["tui"],
  8001. "operationId": "tui.showToast",
  8002. "parameters": [
  8003. {
  8004. "name": "directory",
  8005. "in": "query",
  8006. "schema": {
  8007. "type": "string"
  8008. },
  8009. "required": false
  8010. },
  8011. {
  8012. "name": "workspace",
  8013. "in": "query",
  8014. "schema": {
  8015. "type": "string"
  8016. },
  8017. "required": false
  8018. }
  8019. ],
  8020. "responses": {
  8021. "200": {
  8022. "description": "Toast notification shown successfully",
  8023. "content": {
  8024. "application/json": {
  8025. "schema": {
  8026. "type": "boolean",
  8027. "description": "Toast notification shown successfully"
  8028. }
  8029. }
  8030. }
  8031. }
  8032. },
  8033. "description": "Show a toast notification in the TUI.",
  8034. "summary": "Show TUI toast",
  8035. "requestBody": {
  8036. "content": {
  8037. "application/json": {
  8038. "schema": {
  8039. "type": "object",
  8040. "properties": {
  8041. "title": {
  8042. "type": "string"
  8043. },
  8044. "message": {
  8045. "type": "string"
  8046. },
  8047. "variant": {
  8048. "type": "string",
  8049. "enum": ["info", "success", "warning", "error"]
  8050. },
  8051. "duration": {
  8052. "type": "integer",
  8053. "exclusiveMinimum": 0
  8054. }
  8055. },
  8056. "required": ["message", "variant"],
  8057. "additionalProperties": false
  8058. }
  8059. }
  8060. }
  8061. },
  8062. "x-codeSamples": [
  8063. {
  8064. "lang": "js",
  8065. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.showToast({\n ...\n})"
  8066. }
  8067. ]
  8068. }
  8069. },
  8070. "/tui/publish": {
  8071. "post": {
  8072. "tags": ["tui"],
  8073. "operationId": "tui.publish",
  8074. "parameters": [
  8075. {
  8076. "name": "directory",
  8077. "in": "query",
  8078. "schema": {
  8079. "type": "string"
  8080. },
  8081. "required": false
  8082. },
  8083. {
  8084. "name": "workspace",
  8085. "in": "query",
  8086. "schema": {
  8087. "type": "string"
  8088. },
  8089. "required": false
  8090. }
  8091. ],
  8092. "responses": {
  8093. "200": {
  8094. "description": "Event published successfully",
  8095. "content": {
  8096. "application/json": {
  8097. "schema": {
  8098. "type": "boolean",
  8099. "description": "Event published successfully"
  8100. }
  8101. }
  8102. }
  8103. },
  8104. "400": {
  8105. "description": "Bad request",
  8106. "content": {
  8107. "application/json": {
  8108. "schema": {
  8109. "$ref": "#/components/schemas/BadRequestError"
  8110. }
  8111. }
  8112. }
  8113. }
  8114. },
  8115. "description": "Publish a TUI event.",
  8116. "summary": "Publish TUI event",
  8117. "requestBody": {
  8118. "content": {
  8119. "application/json": {
  8120. "schema": {
  8121. "anyOf": [
  8122. {
  8123. "$ref": "#/components/schemas/EventTuiPromptAppend"
  8124. },
  8125. {
  8126. "$ref": "#/components/schemas/EventTuiCommandExecute"
  8127. },
  8128. {
  8129. "$ref": "#/components/schemas/EventTuiToastShow"
  8130. },
  8131. {
  8132. "$ref": "#/components/schemas/EventTuiSessionSelect"
  8133. }
  8134. ]
  8135. }
  8136. }
  8137. }
  8138. },
  8139. "x-codeSamples": [
  8140. {
  8141. "lang": "js",
  8142. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.publish({\n ...\n})"
  8143. }
  8144. ]
  8145. }
  8146. },
  8147. "/tui/select-session": {
  8148. "post": {
  8149. "tags": ["tui"],
  8150. "operationId": "tui.selectSession",
  8151. "parameters": [
  8152. {
  8153. "name": "directory",
  8154. "in": "query",
  8155. "schema": {
  8156. "type": "string"
  8157. },
  8158. "required": false
  8159. },
  8160. {
  8161. "name": "workspace",
  8162. "in": "query",
  8163. "schema": {
  8164. "type": "string"
  8165. },
  8166. "required": false
  8167. }
  8168. ],
  8169. "responses": {
  8170. "200": {
  8171. "description": "Session selected successfully",
  8172. "content": {
  8173. "application/json": {
  8174. "schema": {
  8175. "type": "boolean",
  8176. "description": "Session selected successfully"
  8177. }
  8178. }
  8179. }
  8180. },
  8181. "400": {
  8182. "description": "Bad request",
  8183. "content": {
  8184. "application/json": {
  8185. "schema": {
  8186. "$ref": "#/components/schemas/BadRequestError"
  8187. }
  8188. }
  8189. }
  8190. },
  8191. "404": {
  8192. "description": "NotFoundError",
  8193. "content": {
  8194. "application/json": {
  8195. "schema": {
  8196. "$ref": "#/components/schemas/NotFoundError"
  8197. }
  8198. }
  8199. }
  8200. }
  8201. },
  8202. "description": "Navigate the TUI to display the specified session.",
  8203. "summary": "Select session",
  8204. "requestBody": {
  8205. "content": {
  8206. "application/json": {
  8207. "schema": {
  8208. "type": "object",
  8209. "properties": {
  8210. "sessionID": {
  8211. "type": "string",
  8212. "description": "Session ID to navigate to"
  8213. }
  8214. },
  8215. "required": ["sessionID"],
  8216. "additionalProperties": false
  8217. }
  8218. }
  8219. }
  8220. },
  8221. "x-codeSamples": [
  8222. {
  8223. "lang": "js",
  8224. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.selectSession({\n ...\n})"
  8225. }
  8226. ]
  8227. }
  8228. },
  8229. "/tui/control/next": {
  8230. "get": {
  8231. "tags": ["tui"],
  8232. "operationId": "tui.control.next",
  8233. "parameters": [
  8234. {
  8235. "name": "directory",
  8236. "in": "query",
  8237. "schema": {
  8238. "type": "string"
  8239. },
  8240. "required": false
  8241. },
  8242. {
  8243. "name": "workspace",
  8244. "in": "query",
  8245. "schema": {
  8246. "type": "string"
  8247. },
  8248. "required": false
  8249. }
  8250. ],
  8251. "responses": {
  8252. "200": {
  8253. "description": "Next TUI request",
  8254. "content": {
  8255. "application/json": {
  8256. "schema": {
  8257. "type": "object",
  8258. "properties": {
  8259. "path": {
  8260. "type": "string"
  8261. },
  8262. "body": {}
  8263. },
  8264. "required": ["path", "body"],
  8265. "additionalProperties": false,
  8266. "description": "Next TUI request"
  8267. }
  8268. }
  8269. }
  8270. }
  8271. },
  8272. "description": "Retrieve the next TUI request from the queue for processing.",
  8273. "summary": "Get next TUI request",
  8274. "x-codeSamples": [
  8275. {
  8276. "lang": "js",
  8277. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.next({\n ...\n})"
  8278. }
  8279. ]
  8280. }
  8281. },
  8282. "/tui/control/response": {
  8283. "post": {
  8284. "tags": ["tui"],
  8285. "operationId": "tui.control.response",
  8286. "parameters": [
  8287. {
  8288. "name": "directory",
  8289. "in": "query",
  8290. "schema": {
  8291. "type": "string"
  8292. },
  8293. "required": false
  8294. },
  8295. {
  8296. "name": "workspace",
  8297. "in": "query",
  8298. "schema": {
  8299. "type": "string"
  8300. },
  8301. "required": false
  8302. }
  8303. ],
  8304. "responses": {
  8305. "200": {
  8306. "description": "Response submitted successfully",
  8307. "content": {
  8308. "application/json": {
  8309. "schema": {
  8310. "type": "boolean",
  8311. "description": "Response submitted successfully"
  8312. }
  8313. }
  8314. }
  8315. }
  8316. },
  8317. "description": "Submit a response to the TUI request queue to complete a pending request.",
  8318. "summary": "Submit TUI response",
  8319. "requestBody": {
  8320. "content": {
  8321. "application/json": {
  8322. "schema": {}
  8323. }
  8324. }
  8325. },
  8326. "x-codeSamples": [
  8327. {
  8328. "lang": "js",
  8329. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.tui.control.response({\n ...\n})"
  8330. }
  8331. ]
  8332. }
  8333. },
  8334. "/experimental/workspace/adapter": {
  8335. "get": {
  8336. "tags": ["workspace"],
  8337. "operationId": "experimental.workspace.adapter.list",
  8338. "parameters": [
  8339. {
  8340. "name": "directory",
  8341. "in": "query",
  8342. "schema": {
  8343. "type": "string"
  8344. },
  8345. "required": false
  8346. },
  8347. {
  8348. "name": "workspace",
  8349. "in": "query",
  8350. "schema": {
  8351. "type": "string"
  8352. },
  8353. "required": false
  8354. }
  8355. ],
  8356. "responses": {
  8357. "200": {
  8358. "description": "Workspace adapters",
  8359. "content": {
  8360. "application/json": {
  8361. "schema": {
  8362. "type": "array",
  8363. "items": {
  8364. "type": "object",
  8365. "properties": {
  8366. "type": {
  8367. "type": "string"
  8368. },
  8369. "name": {
  8370. "type": "string"
  8371. },
  8372. "description": {
  8373. "type": "string"
  8374. }
  8375. },
  8376. "required": ["type", "name", "description"],
  8377. "additionalProperties": false
  8378. },
  8379. "description": "Workspace adapters"
  8380. }
  8381. }
  8382. }
  8383. }
  8384. },
  8385. "description": "List all available workspace adapters for the current project.",
  8386. "summary": "List workspace adapters",
  8387. "x-codeSamples": [
  8388. {
  8389. "lang": "js",
  8390. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.adapter.list({\n ...\n})"
  8391. }
  8392. ]
  8393. }
  8394. },
  8395. "/experimental/workspace": {
  8396. "get": {
  8397. "tags": ["workspace"],
  8398. "operationId": "experimental.workspace.list",
  8399. "parameters": [
  8400. {
  8401. "name": "directory",
  8402. "in": "query",
  8403. "schema": {
  8404. "type": "string"
  8405. },
  8406. "required": false
  8407. },
  8408. {
  8409. "name": "workspace",
  8410. "in": "query",
  8411. "schema": {
  8412. "type": "string"
  8413. },
  8414. "required": false
  8415. }
  8416. ],
  8417. "responses": {
  8418. "200": {
  8419. "description": "Workspaces",
  8420. "content": {
  8421. "application/json": {
  8422. "schema": {
  8423. "type": "array",
  8424. "items": {
  8425. "$ref": "#/components/schemas/Workspace"
  8426. },
  8427. "description": "Workspaces"
  8428. }
  8429. }
  8430. }
  8431. }
  8432. },
  8433. "description": "List all workspaces.",
  8434. "summary": "List workspaces",
  8435. "x-codeSamples": [
  8436. {
  8437. "lang": "js",
  8438. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.list({\n ...\n})"
  8439. }
  8440. ]
  8441. },
  8442. "post": {
  8443. "tags": ["workspace"],
  8444. "operationId": "experimental.workspace.create",
  8445. "parameters": [
  8446. {
  8447. "name": "directory",
  8448. "in": "query",
  8449. "schema": {
  8450. "type": "string"
  8451. },
  8452. "required": false
  8453. },
  8454. {
  8455. "name": "workspace",
  8456. "in": "query",
  8457. "schema": {
  8458. "type": "string"
  8459. },
  8460. "required": false
  8461. }
  8462. ],
  8463. "responses": {
  8464. "200": {
  8465. "description": "Workspace created",
  8466. "content": {
  8467. "application/json": {
  8468. "schema": {
  8469. "$ref": "#/components/schemas/Workspace"
  8470. }
  8471. }
  8472. }
  8473. },
  8474. "400": {
  8475. "description": "Bad request",
  8476. "content": {
  8477. "application/json": {
  8478. "schema": {
  8479. "$ref": "#/components/schemas/BadRequestError"
  8480. }
  8481. }
  8482. }
  8483. }
  8484. },
  8485. "description": "Create a workspace for the current project.",
  8486. "summary": "Create workspace",
  8487. "requestBody": {
  8488. "content": {
  8489. "application/json": {
  8490. "schema": {
  8491. "type": "object",
  8492. "properties": {
  8493. "id": {
  8494. "type": "string"
  8495. },
  8496. "type": {
  8497. "type": "string"
  8498. },
  8499. "branch": {
  8500. "anyOf": [
  8501. {
  8502. "type": "string"
  8503. },
  8504. {
  8505. "type": "null"
  8506. }
  8507. ]
  8508. },
  8509. "extra": {
  8510. "anyOf": [
  8511. {},
  8512. {
  8513. "type": "null"
  8514. }
  8515. ]
  8516. }
  8517. },
  8518. "required": ["type", "branch"],
  8519. "additionalProperties": false
  8520. }
  8521. }
  8522. }
  8523. },
  8524. "x-codeSamples": [
  8525. {
  8526. "lang": "js",
  8527. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.create({\n ...\n})"
  8528. }
  8529. ]
  8530. }
  8531. },
  8532. "/experimental/workspace/sync-list": {
  8533. "post": {
  8534. "tags": ["workspace"],
  8535. "operationId": "experimental.workspace.syncList",
  8536. "parameters": [
  8537. {
  8538. "name": "directory",
  8539. "in": "query",
  8540. "schema": {
  8541. "type": "string"
  8542. },
  8543. "required": false
  8544. },
  8545. {
  8546. "name": "workspace",
  8547. "in": "query",
  8548. "schema": {
  8549. "type": "string"
  8550. },
  8551. "required": false
  8552. }
  8553. ],
  8554. "responses": {
  8555. "204": {
  8556. "description": "Workspace list synced"
  8557. }
  8558. },
  8559. "description": "Register missing workspaces returned by workspace adapters.",
  8560. "summary": "Sync workspace list",
  8561. "x-codeSamples": [
  8562. {
  8563. "lang": "js",
  8564. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.syncList({\n ...\n})"
  8565. }
  8566. ]
  8567. }
  8568. },
  8569. "/experimental/workspace/status": {
  8570. "get": {
  8571. "tags": ["workspace"],
  8572. "operationId": "experimental.workspace.status",
  8573. "parameters": [
  8574. {
  8575. "name": "directory",
  8576. "in": "query",
  8577. "schema": {
  8578. "type": "string"
  8579. },
  8580. "required": false
  8581. },
  8582. {
  8583. "name": "workspace",
  8584. "in": "query",
  8585. "schema": {
  8586. "type": "string"
  8587. },
  8588. "required": false
  8589. }
  8590. ],
  8591. "responses": {
  8592. "200": {
  8593. "description": "Workspace status",
  8594. "content": {
  8595. "application/json": {
  8596. "schema": {
  8597. "type": "array",
  8598. "items": {
  8599. "type": "object",
  8600. "properties": {
  8601. "workspaceID": {
  8602. "type": "string"
  8603. },
  8604. "status": {
  8605. "type": "string",
  8606. "enum": ["connected", "connecting", "disconnected", "error"]
  8607. }
  8608. },
  8609. "required": ["workspaceID", "status"],
  8610. "additionalProperties": false
  8611. },
  8612. "description": "Workspace status"
  8613. }
  8614. }
  8615. }
  8616. }
  8617. },
  8618. "description": "Get connection status for workspaces in the current project.",
  8619. "summary": "Workspace status",
  8620. "x-codeSamples": [
  8621. {
  8622. "lang": "js",
  8623. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.status({\n ...\n})"
  8624. }
  8625. ]
  8626. }
  8627. },
  8628. "/experimental/workspace/{id}": {
  8629. "delete": {
  8630. "tags": ["workspace"],
  8631. "operationId": "experimental.workspace.remove",
  8632. "parameters": [
  8633. {
  8634. "name": "id",
  8635. "in": "path",
  8636. "schema": {
  8637. "type": "string",
  8638. "pattern": "^wrk.*"
  8639. },
  8640. "required": true
  8641. },
  8642. {
  8643. "name": "directory",
  8644. "in": "query",
  8645. "schema": {
  8646. "type": "string"
  8647. },
  8648. "required": false
  8649. },
  8650. {
  8651. "name": "workspace",
  8652. "in": "query",
  8653. "schema": {
  8654. "type": "string"
  8655. },
  8656. "required": false
  8657. }
  8658. ],
  8659. "responses": {
  8660. "200": {
  8661. "description": "Workspace removed",
  8662. "content": {
  8663. "application/json": {
  8664. "schema": {
  8665. "$ref": "#/components/schemas/Workspace"
  8666. }
  8667. }
  8668. }
  8669. },
  8670. "400": {
  8671. "description": "Bad request",
  8672. "content": {
  8673. "application/json": {
  8674. "schema": {
  8675. "$ref": "#/components/schemas/BadRequestError"
  8676. }
  8677. }
  8678. }
  8679. }
  8680. },
  8681. "description": "Remove an existing workspace.",
  8682. "summary": "Remove workspace",
  8683. "x-codeSamples": [
  8684. {
  8685. "lang": "js",
  8686. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.remove({\n ...\n})"
  8687. }
  8688. ]
  8689. }
  8690. },
  8691. "/experimental/workspace/warp": {
  8692. "post": {
  8693. "tags": ["workspace"],
  8694. "operationId": "experimental.workspace.warp",
  8695. "parameters": [
  8696. {
  8697. "name": "directory",
  8698. "in": "query",
  8699. "schema": {
  8700. "type": "string"
  8701. },
  8702. "required": false
  8703. },
  8704. {
  8705. "name": "workspace",
  8706. "in": "query",
  8707. "schema": {
  8708. "type": "string"
  8709. },
  8710. "required": false
  8711. }
  8712. ],
  8713. "responses": {
  8714. "204": {
  8715. "description": "Session warped"
  8716. },
  8717. "400": {
  8718. "description": "WorkspaceWarpError | VcsApplyError",
  8719. "content": {
  8720. "application/json": {
  8721. "schema": {
  8722. "anyOf": [
  8723. {
  8724. "$ref": "#/components/schemas/WorkspaceWarpError"
  8725. },
  8726. {
  8727. "$ref": "#/components/schemas/VcsApplyError"
  8728. }
  8729. ]
  8730. }
  8731. }
  8732. }
  8733. }
  8734. },
  8735. "description": "Move a session's sync history into the target workspace, or detach it to the local project.",
  8736. "summary": "Warp session into workspace",
  8737. "requestBody": {
  8738. "content": {
  8739. "application/json": {
  8740. "schema": {
  8741. "type": "object",
  8742. "properties": {
  8743. "id": {
  8744. "anyOf": [
  8745. {
  8746. "type": "string"
  8747. },
  8748. {
  8749. "type": "null"
  8750. }
  8751. ]
  8752. },
  8753. "sessionID": {
  8754. "type": "string"
  8755. },
  8756. "copyChanges": {
  8757. "type": "boolean"
  8758. }
  8759. },
  8760. "required": ["id", "sessionID"],
  8761. "additionalProperties": false
  8762. }
  8763. }
  8764. }
  8765. },
  8766. "x-codeSamples": [
  8767. {
  8768. "lang": "js",
  8769. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.experimental.workspace.warp({\n ...\n})"
  8770. }
  8771. ]
  8772. }
  8773. },
  8774. "/pty/{ptyID}/connect": {
  8775. "get": {
  8776. "tags": ["pty"],
  8777. "operationId": "pty.connect",
  8778. "parameters": [
  8779. {
  8780. "name": "ptyID",
  8781. "in": "path",
  8782. "schema": {
  8783. "type": "string",
  8784. "pattern": "^pty.*"
  8785. },
  8786. "required": true
  8787. },
  8788. {
  8789. "name": "directory",
  8790. "in": "query",
  8791. "schema": {
  8792. "type": "string"
  8793. },
  8794. "required": false
  8795. },
  8796. {
  8797. "name": "workspace",
  8798. "in": "query",
  8799. "schema": {
  8800. "type": "string"
  8801. },
  8802. "required": false
  8803. }
  8804. ],
  8805. "responses": {
  8806. "200": {
  8807. "description": "Connected session",
  8808. "content": {
  8809. "application/json": {
  8810. "schema": {
  8811. "type": "boolean",
  8812. "description": "Connected session"
  8813. }
  8814. }
  8815. }
  8816. },
  8817. "403": {
  8818. "description": "Forbidden",
  8819. "content": {
  8820. "application/json": {
  8821. "schema": {
  8822. "$ref": "#/components/schemas/effect_HttpApiError_Forbidden"
  8823. }
  8824. }
  8825. }
  8826. },
  8827. "404": {
  8828. "description": "Not found",
  8829. "content": {
  8830. "application/json": {
  8831. "schema": {
  8832. "$ref": "#/components/schemas/NotFoundError"
  8833. }
  8834. }
  8835. }
  8836. }
  8837. },
  8838. "description": "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
  8839. "summary": "Connect to PTY session",
  8840. "x-codeSamples": [
  8841. {
  8842. "lang": "js",
  8843. "source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.pty.connect({\n ...\n})"
  8844. }
  8845. ]
  8846. }
  8847. }
  8848. },
  8849. "components": {
  8850. "schemas": {
  8851. "Event": {
  8852. "anyOf": [
  8853. {
  8854. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  8855. },
  8856. {
  8857. "$ref": "#/components/schemas/EventFileEdited"
  8858. },
  8859. {
  8860. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  8861. },
  8862. {
  8863. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  8864. },
  8865. {
  8866. "$ref": "#/components/schemas/EventLspUpdated"
  8867. },
  8868. {
  8869. "$ref": "#/components/schemas/EventMessagePartDelta"
  8870. },
  8871. {
  8872. "$ref": "#/components/schemas/EventPermissionAsked"
  8873. },
  8874. {
  8875. "$ref": "#/components/schemas/EventPermissionReplied"
  8876. },
  8877. {
  8878. "$ref": "#/components/schemas/EventSessionDiff"
  8879. },
  8880. {
  8881. "$ref": "#/components/schemas/EventSessionError"
  8882. },
  8883. {
  8884. "$ref": "#/components/schemas/EventInstallationUpdated"
  8885. },
  8886. {
  8887. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  8888. },
  8889. {
  8890. "$ref": "#/components/schemas/EventQuestionAsked"
  8891. },
  8892. {
  8893. "$ref": "#/components/schemas/EventQuestionReplied"
  8894. },
  8895. {
  8896. "$ref": "#/components/schemas/EventQuestionRejected"
  8897. },
  8898. {
  8899. "$ref": "#/components/schemas/EventTodoUpdated"
  8900. },
  8901. {
  8902. "$ref": "#/components/schemas/EventSessionStatus"
  8903. },
  8904. {
  8905. "$ref": "#/components/schemas/EventSessionIdle"
  8906. },
  8907. {
  8908. "$ref": "#/components/schemas/EventSessionCompacted"
  8909. },
  8910. {
  8911. "$ref": "#/components/schemas/Event.tui.prompt.append"
  8912. },
  8913. {
  8914. "$ref": "#/components/schemas/Event.tui.command.execute"
  8915. },
  8916. {
  8917. "$ref": "#/components/schemas/EventTuiToastShow1"
  8918. },
  8919. {
  8920. "$ref": "#/components/schemas/Event.tui.session.select"
  8921. },
  8922. {
  8923. "$ref": "#/components/schemas/EventMcpToolsChanged"
  8924. },
  8925. {
  8926. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  8927. },
  8928. {
  8929. "$ref": "#/components/schemas/EventCommandExecuted"
  8930. },
  8931. {
  8932. "$ref": "#/components/schemas/EventProjectUpdated"
  8933. },
  8934. {
  8935. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  8936. },
  8937. {
  8938. "$ref": "#/components/schemas/EventWorkspaceReady"
  8939. },
  8940. {
  8941. "$ref": "#/components/schemas/EventWorkspaceFailed"
  8942. },
  8943. {
  8944. "$ref": "#/components/schemas/EventWorkspaceStatus"
  8945. },
  8946. {
  8947. "$ref": "#/components/schemas/EventWorktreeReady"
  8948. },
  8949. {
  8950. "$ref": "#/components/schemas/EventWorktreeFailed"
  8951. },
  8952. {
  8953. "$ref": "#/components/schemas/EventPtyCreated"
  8954. },
  8955. {
  8956. "$ref": "#/components/schemas/EventPtyUpdated"
  8957. },
  8958. {
  8959. "$ref": "#/components/schemas/EventPtyExited"
  8960. },
  8961. {
  8962. "$ref": "#/components/schemas/EventPtyDeleted"
  8963. },
  8964. {
  8965. "$ref": "#/components/schemas/EventMessageUpdated"
  8966. },
  8967. {
  8968. "$ref": "#/components/schemas/EventMessageRemoved"
  8969. },
  8970. {
  8971. "$ref": "#/components/schemas/EventMessagePartUpdated"
  8972. },
  8973. {
  8974. "$ref": "#/components/schemas/EventMessagePartRemoved"
  8975. },
  8976. {
  8977. "$ref": "#/components/schemas/EventSessionCreated"
  8978. },
  8979. {
  8980. "$ref": "#/components/schemas/EventSessionUpdated"
  8981. },
  8982. {
  8983. "$ref": "#/components/schemas/EventSessionDeleted"
  8984. },
  8985. {
  8986. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  8987. },
  8988. {
  8989. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  8990. },
  8991. {
  8992. "$ref": "#/components/schemas/EventSessionNextPrompted"
  8993. },
  8994. {
  8995. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  8996. },
  8997. {
  8998. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  8999. },
  9000. {
  9001. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  9002. },
  9003. {
  9004. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  9005. },
  9006. {
  9007. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  9008. },
  9009. {
  9010. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  9011. },
  9012. {
  9013. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  9014. },
  9015. {
  9016. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  9017. },
  9018. {
  9019. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  9020. },
  9021. {
  9022. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  9023. },
  9024. {
  9025. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  9026. },
  9027. {
  9028. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  9029. },
  9030. {
  9031. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  9032. },
  9033. {
  9034. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  9035. },
  9036. {
  9037. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  9038. },
  9039. {
  9040. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  9041. },
  9042. {
  9043. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  9044. },
  9045. {
  9046. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  9047. },
  9048. {
  9049. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  9050. },
  9051. {
  9052. "$ref": "#/components/schemas/EventSessionNextRetried"
  9053. },
  9054. {
  9055. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  9056. },
  9057. {
  9058. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  9059. },
  9060. {
  9061. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  9062. },
  9063. {
  9064. "$ref": "#/components/schemas/EventServerConnected"
  9065. },
  9066. {
  9067. "$ref": "#/components/schemas/EventGlobalDisposed"
  9068. }
  9069. ]
  9070. },
  9071. "OAuth": {
  9072. "type": "object",
  9073. "properties": {
  9074. "type": {
  9075. "type": "string",
  9076. "enum": ["oauth"]
  9077. },
  9078. "refresh": {
  9079. "type": "string"
  9080. },
  9081. "access": {
  9082. "type": "string"
  9083. },
  9084. "expires": {
  9085. "type": "integer",
  9086. "minimum": 0
  9087. },
  9088. "accountId": {
  9089. "type": "string"
  9090. },
  9091. "enterpriseUrl": {
  9092. "type": "string"
  9093. }
  9094. },
  9095. "required": ["type", "refresh", "access", "expires"],
  9096. "additionalProperties": false
  9097. },
  9098. "ApiAuth": {
  9099. "type": "object",
  9100. "properties": {
  9101. "type": {
  9102. "type": "string",
  9103. "enum": ["api"]
  9104. },
  9105. "key": {
  9106. "type": "string"
  9107. },
  9108. "metadata": {
  9109. "type": "object",
  9110. "additionalProperties": {
  9111. "type": "string"
  9112. }
  9113. }
  9114. },
  9115. "required": ["type", "key"],
  9116. "additionalProperties": false
  9117. },
  9118. "WellKnownAuth": {
  9119. "type": "object",
  9120. "properties": {
  9121. "type": {
  9122. "type": "string",
  9123. "enum": ["wellknown"]
  9124. },
  9125. "key": {
  9126. "type": "string"
  9127. },
  9128. "token": {
  9129. "type": "string"
  9130. }
  9131. },
  9132. "required": ["type", "key", "token"],
  9133. "additionalProperties": false
  9134. },
  9135. "Auth": {
  9136. "anyOf": [
  9137. {
  9138. "$ref": "#/components/schemas/OAuth"
  9139. },
  9140. {
  9141. "$ref": "#/components/schemas/ApiAuth"
  9142. },
  9143. {
  9144. "$ref": "#/components/schemas/WellKnownAuth"
  9145. }
  9146. ]
  9147. },
  9148. "PermissionRequest": {
  9149. "type": "object",
  9150. "properties": {
  9151. "id": {
  9152. "type": "string",
  9153. "pattern": "^per"
  9154. },
  9155. "sessionID": {
  9156. "type": "string"
  9157. },
  9158. "permission": {
  9159. "type": "string"
  9160. },
  9161. "patterns": {
  9162. "type": "array",
  9163. "items": {
  9164. "type": "string"
  9165. }
  9166. },
  9167. "metadata": {
  9168. "type": "object"
  9169. },
  9170. "always": {
  9171. "type": "array",
  9172. "items": {
  9173. "type": "string"
  9174. }
  9175. },
  9176. "tool": {
  9177. "type": "object",
  9178. "properties": {
  9179. "messageID": {
  9180. "type": "string"
  9181. },
  9182. "callID": {
  9183. "type": "string"
  9184. }
  9185. },
  9186. "required": ["messageID", "callID"],
  9187. "additionalProperties": false
  9188. }
  9189. },
  9190. "required": ["id", "sessionID", "permission", "patterns", "metadata", "always"],
  9191. "additionalProperties": false
  9192. },
  9193. "SnapshotFileDiff": {
  9194. "type": "object",
  9195. "properties": {
  9196. "file": {
  9197. "type": "string"
  9198. },
  9199. "patch": {
  9200. "type": "string"
  9201. },
  9202. "additions": {
  9203. "type": "number"
  9204. },
  9205. "deletions": {
  9206. "type": "number"
  9207. },
  9208. "status": {
  9209. "type": "string",
  9210. "enum": ["added", "deleted", "modified"]
  9211. }
  9212. },
  9213. "required": ["additions", "deletions"],
  9214. "additionalProperties": false
  9215. },
  9216. "ProviderAuthError": {
  9217. "type": "object",
  9218. "properties": {
  9219. "name": {
  9220. "type": "string",
  9221. "enum": ["ProviderAuthError"]
  9222. },
  9223. "data": {
  9224. "type": "object",
  9225. "properties": {
  9226. "providerID": {
  9227. "type": "string"
  9228. },
  9229. "message": {
  9230. "type": "string"
  9231. }
  9232. },
  9233. "required": ["providerID", "message"],
  9234. "additionalProperties": false
  9235. }
  9236. },
  9237. "required": ["name", "data"],
  9238. "additionalProperties": false
  9239. },
  9240. "UnknownError": {
  9241. "type": "object",
  9242. "properties": {
  9243. "name": {
  9244. "type": "string",
  9245. "enum": ["UnknownError"]
  9246. },
  9247. "data": {
  9248. "type": "object",
  9249. "properties": {
  9250. "message": {
  9251. "type": "string"
  9252. }
  9253. },
  9254. "required": ["message"],
  9255. "additionalProperties": false
  9256. }
  9257. },
  9258. "required": ["name", "data"],
  9259. "additionalProperties": false
  9260. },
  9261. "MessageOutputLengthError": {
  9262. "type": "object",
  9263. "properties": {
  9264. "name": {
  9265. "type": "string",
  9266. "enum": ["MessageOutputLengthError"]
  9267. },
  9268. "data": {
  9269. "type": "object",
  9270. "properties": {}
  9271. }
  9272. },
  9273. "required": ["name", "data"],
  9274. "additionalProperties": false
  9275. },
  9276. "MessageAbortedError": {
  9277. "type": "object",
  9278. "properties": {
  9279. "name": {
  9280. "type": "string",
  9281. "enum": ["MessageAbortedError"]
  9282. },
  9283. "data": {
  9284. "type": "object",
  9285. "properties": {
  9286. "message": {
  9287. "type": "string"
  9288. }
  9289. },
  9290. "required": ["message"],
  9291. "additionalProperties": false
  9292. }
  9293. },
  9294. "required": ["name", "data"],
  9295. "additionalProperties": false
  9296. },
  9297. "StructuredOutputError": {
  9298. "type": "object",
  9299. "properties": {
  9300. "name": {
  9301. "type": "string",
  9302. "enum": ["StructuredOutputError"]
  9303. },
  9304. "data": {
  9305. "type": "object",
  9306. "properties": {
  9307. "message": {
  9308. "type": "string"
  9309. },
  9310. "retries": {
  9311. "type": "integer",
  9312. "minimum": 0
  9313. }
  9314. },
  9315. "required": ["message", "retries"],
  9316. "additionalProperties": false
  9317. }
  9318. },
  9319. "required": ["name", "data"],
  9320. "additionalProperties": false
  9321. },
  9322. "ContextOverflowError": {
  9323. "type": "object",
  9324. "properties": {
  9325. "name": {
  9326. "type": "string",
  9327. "enum": ["ContextOverflowError"]
  9328. },
  9329. "data": {
  9330. "type": "object",
  9331. "properties": {
  9332. "message": {
  9333. "type": "string"
  9334. },
  9335. "responseBody": {
  9336. "type": "string"
  9337. }
  9338. },
  9339. "required": ["message"],
  9340. "additionalProperties": false
  9341. }
  9342. },
  9343. "required": ["name", "data"],
  9344. "additionalProperties": false
  9345. },
  9346. "APIError": {
  9347. "type": "object",
  9348. "properties": {
  9349. "name": {
  9350. "type": "string",
  9351. "enum": ["APIError"]
  9352. },
  9353. "data": {
  9354. "type": "object",
  9355. "properties": {
  9356. "message": {
  9357. "type": "string"
  9358. },
  9359. "statusCode": {
  9360. "type": "integer",
  9361. "minimum": 0
  9362. },
  9363. "isRetryable": {
  9364. "type": "boolean"
  9365. },
  9366. "responseHeaders": {
  9367. "type": "object",
  9368. "additionalProperties": {
  9369. "type": "string"
  9370. }
  9371. },
  9372. "responseBody": {
  9373. "type": "string"
  9374. },
  9375. "metadata": {
  9376. "type": "object",
  9377. "additionalProperties": {
  9378. "type": "string"
  9379. }
  9380. }
  9381. },
  9382. "required": ["message", "isRetryable"],
  9383. "additionalProperties": false
  9384. }
  9385. },
  9386. "required": ["name", "data"],
  9387. "additionalProperties": false
  9388. },
  9389. "QuestionOption": {
  9390. "type": "object",
  9391. "properties": {
  9392. "label": {
  9393. "type": "string",
  9394. "description": "Display text (1-5 words, concise)"
  9395. },
  9396. "description": {
  9397. "type": "string",
  9398. "description": "Explanation of choice"
  9399. }
  9400. },
  9401. "required": ["label", "description"],
  9402. "additionalProperties": false
  9403. },
  9404. "QuestionInfo": {
  9405. "type": "object",
  9406. "properties": {
  9407. "question": {
  9408. "type": "string",
  9409. "description": "Complete question"
  9410. },
  9411. "header": {
  9412. "type": "string",
  9413. "description": "Very short label (max 30 chars)"
  9414. },
  9415. "options": {
  9416. "type": "array",
  9417. "items": {
  9418. "$ref": "#/components/schemas/QuestionOption"
  9419. },
  9420. "description": "Available choices"
  9421. },
  9422. "multiple": {
  9423. "type": "boolean"
  9424. },
  9425. "custom": {
  9426. "type": "boolean"
  9427. }
  9428. },
  9429. "required": ["question", "header", "options"],
  9430. "additionalProperties": false
  9431. },
  9432. "QuestionTool": {
  9433. "type": "object",
  9434. "properties": {
  9435. "messageID": {
  9436. "type": "string"
  9437. },
  9438. "callID": {
  9439. "type": "string"
  9440. }
  9441. },
  9442. "required": ["messageID", "callID"],
  9443. "additionalProperties": false
  9444. },
  9445. "QuestionRequest": {
  9446. "type": "object",
  9447. "properties": {
  9448. "id": {
  9449. "type": "string",
  9450. "pattern": "^que"
  9451. },
  9452. "sessionID": {
  9453. "type": "string"
  9454. },
  9455. "questions": {
  9456. "type": "array",
  9457. "items": {
  9458. "$ref": "#/components/schemas/QuestionInfo"
  9459. },
  9460. "description": "Questions to ask"
  9461. },
  9462. "tool": {
  9463. "$ref": "#/components/schemas/QuestionTool"
  9464. }
  9465. },
  9466. "required": ["id", "sessionID", "questions"],
  9467. "additionalProperties": false
  9468. },
  9469. "QuestionAnswer": {
  9470. "type": "array",
  9471. "items": {
  9472. "type": "string"
  9473. }
  9474. },
  9475. "QuestionReplied": {
  9476. "type": "object",
  9477. "properties": {
  9478. "sessionID": {
  9479. "type": "string"
  9480. },
  9481. "requestID": {
  9482. "type": "string",
  9483. "pattern": "^que"
  9484. },
  9485. "answers": {
  9486. "type": "array",
  9487. "items": {
  9488. "$ref": "#/components/schemas/QuestionAnswer"
  9489. }
  9490. }
  9491. },
  9492. "required": ["sessionID", "requestID", "answers"],
  9493. "additionalProperties": false
  9494. },
  9495. "QuestionRejected": {
  9496. "type": "object",
  9497. "properties": {
  9498. "sessionID": {
  9499. "type": "string"
  9500. },
  9501. "requestID": {
  9502. "type": "string",
  9503. "pattern": "^que"
  9504. }
  9505. },
  9506. "required": ["sessionID", "requestID"],
  9507. "additionalProperties": false
  9508. },
  9509. "Todo": {
  9510. "type": "object",
  9511. "properties": {
  9512. "content": {
  9513. "type": "string",
  9514. "description": "Brief description of the task"
  9515. },
  9516. "status": {
  9517. "type": "string",
  9518. "description": "Current status of the task: pending, in_progress, completed, cancelled"
  9519. },
  9520. "priority": {
  9521. "type": "string",
  9522. "description": "Priority level of the task: high, medium, low"
  9523. }
  9524. },
  9525. "required": ["content", "status", "priority"],
  9526. "additionalProperties": false
  9527. },
  9528. "SessionStatus": {
  9529. "anyOf": [
  9530. {
  9531. "type": "object",
  9532. "properties": {
  9533. "type": {
  9534. "type": "string",
  9535. "enum": ["idle"]
  9536. }
  9537. },
  9538. "required": ["type"],
  9539. "additionalProperties": false
  9540. },
  9541. {
  9542. "type": "object",
  9543. "properties": {
  9544. "type": {
  9545. "type": "string",
  9546. "enum": ["retry"]
  9547. },
  9548. "attempt": {
  9549. "type": "integer",
  9550. "minimum": 0
  9551. },
  9552. "message": {
  9553. "type": "string"
  9554. },
  9555. "action": {
  9556. "type": "object",
  9557. "properties": {
  9558. "reason": {
  9559. "type": "string"
  9560. },
  9561. "provider": {
  9562. "type": "string"
  9563. },
  9564. "title": {
  9565. "type": "string"
  9566. },
  9567. "message": {
  9568. "type": "string"
  9569. },
  9570. "label": {
  9571. "type": "string"
  9572. },
  9573. "link": {
  9574. "type": "string"
  9575. }
  9576. },
  9577. "required": ["reason", "provider", "title", "message", "label"],
  9578. "additionalProperties": false
  9579. },
  9580. "next": {
  9581. "type": "integer",
  9582. "minimum": 0
  9583. }
  9584. },
  9585. "required": ["type", "attempt", "message", "next"],
  9586. "additionalProperties": false
  9587. },
  9588. {
  9589. "type": "object",
  9590. "properties": {
  9591. "type": {
  9592. "type": "string",
  9593. "enum": ["busy"]
  9594. }
  9595. },
  9596. "required": ["type"],
  9597. "additionalProperties": false
  9598. }
  9599. ]
  9600. },
  9601. "Event.tui.prompt.append": {
  9602. "type": "object",
  9603. "properties": {
  9604. "id": {
  9605. "type": "string"
  9606. },
  9607. "type": {
  9608. "type": "string",
  9609. "enum": ["tui.prompt.append"]
  9610. },
  9611. "properties": {
  9612. "type": "object",
  9613. "properties": {
  9614. "text": {
  9615. "type": "string"
  9616. }
  9617. },
  9618. "required": ["text"],
  9619. "additionalProperties": false
  9620. }
  9621. },
  9622. "required": ["id", "type", "properties"],
  9623. "additionalProperties": false
  9624. },
  9625. "Event.tui.command.execute": {
  9626. "type": "object",
  9627. "properties": {
  9628. "id": {
  9629. "type": "string"
  9630. },
  9631. "type": {
  9632. "type": "string",
  9633. "enum": ["tui.command.execute"]
  9634. },
  9635. "properties": {
  9636. "type": "object",
  9637. "properties": {
  9638. "command": {
  9639. "anyOf": [
  9640. {
  9641. "type": "string",
  9642. "enum": [
  9643. "session.list",
  9644. "session.new",
  9645. "session.share",
  9646. "session.interrupt",
  9647. "session.compact",
  9648. "session.page.up",
  9649. "session.page.down",
  9650. "session.line.up",
  9651. "session.line.down",
  9652. "session.half.page.up",
  9653. "session.half.page.down",
  9654. "session.first",
  9655. "session.last",
  9656. "prompt.clear",
  9657. "prompt.submit",
  9658. "agent.cycle"
  9659. ]
  9660. },
  9661. {
  9662. "type": "string"
  9663. }
  9664. ]
  9665. }
  9666. },
  9667. "required": ["command"],
  9668. "additionalProperties": false
  9669. }
  9670. },
  9671. "required": ["id", "type", "properties"],
  9672. "additionalProperties": false
  9673. },
  9674. "Event.tui.toast.show": {
  9675. "type": "object",
  9676. "properties": {
  9677. "id": {
  9678. "type": "string"
  9679. },
  9680. "type": {
  9681. "type": "string",
  9682. "enum": ["tui.toast.show"]
  9683. },
  9684. "properties": {
  9685. "type": "object",
  9686. "properties": {
  9687. "title": {
  9688. "type": "string"
  9689. },
  9690. "message": {
  9691. "type": "string"
  9692. },
  9693. "variant": {
  9694. "type": "string",
  9695. "enum": ["info", "success", "warning", "error"]
  9696. },
  9697. "duration": {
  9698. "type": "integer",
  9699. "exclusiveMinimum": 0
  9700. }
  9701. },
  9702. "required": ["message", "variant"],
  9703. "additionalProperties": false
  9704. }
  9705. },
  9706. "required": ["id", "type", "properties"],
  9707. "additionalProperties": false
  9708. },
  9709. "Event.tui.session.select": {
  9710. "type": "object",
  9711. "properties": {
  9712. "id": {
  9713. "type": "string"
  9714. },
  9715. "type": {
  9716. "type": "string",
  9717. "enum": ["tui.session.select"]
  9718. },
  9719. "properties": {
  9720. "type": "object",
  9721. "properties": {
  9722. "sessionID": {
  9723. "type": "string",
  9724. "description": "Session ID to navigate to"
  9725. }
  9726. },
  9727. "required": ["sessionID"],
  9728. "additionalProperties": false
  9729. }
  9730. },
  9731. "required": ["id", "type", "properties"],
  9732. "additionalProperties": false
  9733. },
  9734. "Project": {
  9735. "type": "object",
  9736. "properties": {
  9737. "id": {
  9738. "type": "string"
  9739. },
  9740. "worktree": {
  9741. "type": "string"
  9742. },
  9743. "vcs": {
  9744. "type": "string",
  9745. "enum": ["git"]
  9746. },
  9747. "name": {
  9748. "type": "string"
  9749. },
  9750. "icon": {
  9751. "type": "object",
  9752. "properties": {
  9753. "url": {
  9754. "type": "string"
  9755. },
  9756. "override": {
  9757. "type": "string"
  9758. },
  9759. "color": {
  9760. "type": "string"
  9761. }
  9762. },
  9763. "additionalProperties": false
  9764. },
  9765. "commands": {
  9766. "type": "object",
  9767. "properties": {
  9768. "start": {
  9769. "type": "string",
  9770. "description": "Startup script to run when creating a new workspace (worktree)"
  9771. }
  9772. },
  9773. "additionalProperties": false
  9774. },
  9775. "time": {
  9776. "type": "object",
  9777. "properties": {
  9778. "created": {
  9779. "type": "integer",
  9780. "minimum": 0
  9781. },
  9782. "updated": {
  9783. "type": "integer",
  9784. "minimum": 0
  9785. },
  9786. "initialized": {
  9787. "type": "integer",
  9788. "minimum": 0
  9789. }
  9790. },
  9791. "required": ["created", "updated"],
  9792. "additionalProperties": false
  9793. },
  9794. "sandboxes": {
  9795. "type": "array",
  9796. "items": {
  9797. "type": "string"
  9798. }
  9799. }
  9800. },
  9801. "required": ["id", "worktree", "time", "sandboxes"],
  9802. "additionalProperties": false
  9803. },
  9804. "Pty": {
  9805. "type": "object",
  9806. "properties": {
  9807. "id": {
  9808. "type": "string"
  9809. },
  9810. "title": {
  9811. "type": "string"
  9812. },
  9813. "command": {
  9814. "type": "string"
  9815. },
  9816. "args": {
  9817. "type": "array",
  9818. "items": {
  9819. "type": "string"
  9820. }
  9821. },
  9822. "cwd": {
  9823. "type": "string"
  9824. },
  9825. "status": {
  9826. "type": "string",
  9827. "enum": ["running", "exited"]
  9828. },
  9829. "pid": {
  9830. "type": "integer",
  9831. "exclusiveMinimum": 0
  9832. }
  9833. },
  9834. "required": ["id", "title", "command", "args", "cwd", "status", "pid"],
  9835. "additionalProperties": false
  9836. },
  9837. "OutputFormatText": {
  9838. "type": "object",
  9839. "properties": {
  9840. "type": {
  9841. "type": "string",
  9842. "enum": ["text"]
  9843. }
  9844. },
  9845. "required": ["type"],
  9846. "additionalProperties": false
  9847. },
  9848. "JSONSchema": {
  9849. "type": "object"
  9850. },
  9851. "OutputFormatJsonSchema": {
  9852. "type": "object",
  9853. "properties": {
  9854. "type": {
  9855. "type": "string",
  9856. "enum": ["json_schema"]
  9857. },
  9858. "schema": {
  9859. "$ref": "#/components/schemas/JSONSchema"
  9860. },
  9861. "retryCount": {
  9862. "type": "integer",
  9863. "minimum": 0
  9864. }
  9865. },
  9866. "required": ["type", "schema"],
  9867. "additionalProperties": false
  9868. },
  9869. "OutputFormat": {
  9870. "anyOf": [
  9871. {
  9872. "$ref": "#/components/schemas/OutputFormatText"
  9873. },
  9874. {
  9875. "$ref": "#/components/schemas/OutputFormatJsonSchema"
  9876. }
  9877. ]
  9878. },
  9879. "UserMessage": {
  9880. "type": "object",
  9881. "properties": {
  9882. "id": {
  9883. "type": "string"
  9884. },
  9885. "sessionID": {
  9886. "type": "string"
  9887. },
  9888. "role": {
  9889. "type": "string",
  9890. "enum": ["user"]
  9891. },
  9892. "time": {
  9893. "type": "object",
  9894. "properties": {
  9895. "created": {
  9896. "type": "integer",
  9897. "minimum": 0
  9898. }
  9899. },
  9900. "required": ["created"],
  9901. "additionalProperties": false
  9902. },
  9903. "format": {
  9904. "$ref": "#/components/schemas/OutputFormat"
  9905. },
  9906. "summary": {
  9907. "type": "object",
  9908. "properties": {
  9909. "title": {
  9910. "type": "string"
  9911. },
  9912. "body": {
  9913. "type": "string"
  9914. },
  9915. "diffs": {
  9916. "type": "array",
  9917. "items": {
  9918. "$ref": "#/components/schemas/SnapshotFileDiff"
  9919. }
  9920. }
  9921. },
  9922. "required": ["diffs"],
  9923. "additionalProperties": false
  9924. },
  9925. "agent": {
  9926. "type": "string"
  9927. },
  9928. "model": {
  9929. "type": "object",
  9930. "properties": {
  9931. "providerID": {
  9932. "type": "string"
  9933. },
  9934. "modelID": {
  9935. "type": "string"
  9936. },
  9937. "variant": {
  9938. "type": "string"
  9939. }
  9940. },
  9941. "required": ["providerID", "modelID"],
  9942. "additionalProperties": false
  9943. },
  9944. "system": {
  9945. "type": "string"
  9946. },
  9947. "tools": {
  9948. "type": "object",
  9949. "additionalProperties": {
  9950. "type": "boolean"
  9951. }
  9952. }
  9953. },
  9954. "required": ["id", "sessionID", "role", "time", "agent", "model"],
  9955. "additionalProperties": false
  9956. },
  9957. "AssistantMessage": {
  9958. "type": "object",
  9959. "properties": {
  9960. "id": {
  9961. "type": "string"
  9962. },
  9963. "sessionID": {
  9964. "type": "string"
  9965. },
  9966. "role": {
  9967. "type": "string",
  9968. "enum": ["assistant"]
  9969. },
  9970. "time": {
  9971. "type": "object",
  9972. "properties": {
  9973. "created": {
  9974. "type": "integer",
  9975. "minimum": 0
  9976. },
  9977. "completed": {
  9978. "type": "integer",
  9979. "minimum": 0
  9980. }
  9981. },
  9982. "required": ["created"],
  9983. "additionalProperties": false
  9984. },
  9985. "error": {
  9986. "anyOf": [
  9987. {
  9988. "$ref": "#/components/schemas/ProviderAuthError"
  9989. },
  9990. {
  9991. "$ref": "#/components/schemas/UnknownError"
  9992. },
  9993. {
  9994. "$ref": "#/components/schemas/MessageOutputLengthError"
  9995. },
  9996. {
  9997. "$ref": "#/components/schemas/MessageAbortedError"
  9998. },
  9999. {
  10000. "$ref": "#/components/schemas/StructuredOutputError"
  10001. },
  10002. {
  10003. "$ref": "#/components/schemas/ContextOverflowError"
  10004. },
  10005. {
  10006. "$ref": "#/components/schemas/APIError"
  10007. }
  10008. ]
  10009. },
  10010. "parentID": {
  10011. "type": "string"
  10012. },
  10013. "modelID": {
  10014. "type": "string"
  10015. },
  10016. "providerID": {
  10017. "type": "string"
  10018. },
  10019. "mode": {
  10020. "type": "string"
  10021. },
  10022. "agent": {
  10023. "type": "string"
  10024. },
  10025. "path": {
  10026. "type": "object",
  10027. "properties": {
  10028. "cwd": {
  10029. "type": "string"
  10030. },
  10031. "root": {
  10032. "type": "string"
  10033. }
  10034. },
  10035. "required": ["cwd", "root"],
  10036. "additionalProperties": false
  10037. },
  10038. "summary": {
  10039. "type": "boolean"
  10040. },
  10041. "cost": {
  10042. "type": "number"
  10043. },
  10044. "tokens": {
  10045. "type": "object",
  10046. "properties": {
  10047. "total": {
  10048. "type": "number"
  10049. },
  10050. "input": {
  10051. "type": "number"
  10052. },
  10053. "output": {
  10054. "type": "number"
  10055. },
  10056. "reasoning": {
  10057. "type": "number"
  10058. },
  10059. "cache": {
  10060. "type": "object",
  10061. "properties": {
  10062. "read": {
  10063. "type": "number"
  10064. },
  10065. "write": {
  10066. "type": "number"
  10067. }
  10068. },
  10069. "required": ["read", "write"],
  10070. "additionalProperties": false
  10071. }
  10072. },
  10073. "required": ["input", "output", "reasoning", "cache"],
  10074. "additionalProperties": false
  10075. },
  10076. "structured": {},
  10077. "variant": {
  10078. "type": "string"
  10079. },
  10080. "finish": {
  10081. "type": "string"
  10082. }
  10083. },
  10084. "required": [
  10085. "id",
  10086. "sessionID",
  10087. "role",
  10088. "time",
  10089. "parentID",
  10090. "modelID",
  10091. "providerID",
  10092. "mode",
  10093. "agent",
  10094. "path",
  10095. "cost",
  10096. "tokens"
  10097. ],
  10098. "additionalProperties": false
  10099. },
  10100. "Message": {
  10101. "anyOf": [
  10102. {
  10103. "$ref": "#/components/schemas/UserMessage"
  10104. },
  10105. {
  10106. "$ref": "#/components/schemas/AssistantMessage"
  10107. }
  10108. ]
  10109. },
  10110. "TextPart": {
  10111. "type": "object",
  10112. "properties": {
  10113. "id": {
  10114. "type": "string"
  10115. },
  10116. "sessionID": {
  10117. "type": "string"
  10118. },
  10119. "messageID": {
  10120. "type": "string"
  10121. },
  10122. "type": {
  10123. "type": "string",
  10124. "enum": ["text"]
  10125. },
  10126. "text": {
  10127. "type": "string"
  10128. },
  10129. "synthetic": {
  10130. "type": "boolean"
  10131. },
  10132. "ignored": {
  10133. "type": "boolean"
  10134. },
  10135. "time": {
  10136. "type": "object",
  10137. "properties": {
  10138. "start": {
  10139. "type": "integer",
  10140. "minimum": 0
  10141. },
  10142. "end": {
  10143. "type": "integer",
  10144. "minimum": 0
  10145. }
  10146. },
  10147. "required": ["start"],
  10148. "additionalProperties": false
  10149. },
  10150. "metadata": {
  10151. "type": "object"
  10152. }
  10153. },
  10154. "required": ["id", "sessionID", "messageID", "type", "text"],
  10155. "additionalProperties": false
  10156. },
  10157. "SubtaskPart": {
  10158. "type": "object",
  10159. "properties": {
  10160. "id": {
  10161. "type": "string"
  10162. },
  10163. "sessionID": {
  10164. "type": "string"
  10165. },
  10166. "messageID": {
  10167. "type": "string"
  10168. },
  10169. "type": {
  10170. "type": "string",
  10171. "enum": ["subtask"]
  10172. },
  10173. "prompt": {
  10174. "type": "string"
  10175. },
  10176. "description": {
  10177. "type": "string"
  10178. },
  10179. "agent": {
  10180. "type": "string"
  10181. },
  10182. "model": {
  10183. "type": "object",
  10184. "properties": {
  10185. "providerID": {
  10186. "type": "string"
  10187. },
  10188. "modelID": {
  10189. "type": "string"
  10190. }
  10191. },
  10192. "required": ["providerID", "modelID"],
  10193. "additionalProperties": false
  10194. },
  10195. "command": {
  10196. "type": "string"
  10197. }
  10198. },
  10199. "required": ["id", "sessionID", "messageID", "type", "prompt", "description", "agent"],
  10200. "additionalProperties": false
  10201. },
  10202. "ReasoningPart": {
  10203. "type": "object",
  10204. "properties": {
  10205. "id": {
  10206. "type": "string"
  10207. },
  10208. "sessionID": {
  10209. "type": "string"
  10210. },
  10211. "messageID": {
  10212. "type": "string"
  10213. },
  10214. "type": {
  10215. "type": "string",
  10216. "enum": ["reasoning"]
  10217. },
  10218. "text": {
  10219. "type": "string"
  10220. },
  10221. "metadata": {
  10222. "type": "object"
  10223. },
  10224. "time": {
  10225. "type": "object",
  10226. "properties": {
  10227. "start": {
  10228. "type": "integer",
  10229. "minimum": 0
  10230. },
  10231. "end": {
  10232. "type": "integer",
  10233. "minimum": 0
  10234. }
  10235. },
  10236. "required": ["start"],
  10237. "additionalProperties": false
  10238. }
  10239. },
  10240. "required": ["id", "sessionID", "messageID", "type", "text", "time"],
  10241. "additionalProperties": false
  10242. },
  10243. "FilePartSourceText": {
  10244. "type": "object",
  10245. "properties": {
  10246. "value": {
  10247. "type": "string"
  10248. },
  10249. "start": {
  10250. "type": "number"
  10251. },
  10252. "end": {
  10253. "type": "number"
  10254. }
  10255. },
  10256. "required": ["value", "start", "end"],
  10257. "additionalProperties": false
  10258. },
  10259. "FileSource": {
  10260. "type": "object",
  10261. "properties": {
  10262. "text": {
  10263. "$ref": "#/components/schemas/FilePartSourceText"
  10264. },
  10265. "type": {
  10266. "type": "string",
  10267. "enum": ["file"]
  10268. },
  10269. "path": {
  10270. "type": "string"
  10271. }
  10272. },
  10273. "required": ["text", "type", "path"],
  10274. "additionalProperties": false
  10275. },
  10276. "Range": {
  10277. "type": "object",
  10278. "properties": {
  10279. "start": {
  10280. "type": "object",
  10281. "properties": {
  10282. "line": {
  10283. "type": "integer",
  10284. "minimum": 0
  10285. },
  10286. "character": {
  10287. "type": "integer",
  10288. "minimum": 0
  10289. }
  10290. },
  10291. "required": ["line", "character"],
  10292. "additionalProperties": false
  10293. },
  10294. "end": {
  10295. "type": "object",
  10296. "properties": {
  10297. "line": {
  10298. "type": "integer",
  10299. "minimum": 0
  10300. },
  10301. "character": {
  10302. "type": "integer",
  10303. "minimum": 0
  10304. }
  10305. },
  10306. "required": ["line", "character"],
  10307. "additionalProperties": false
  10308. }
  10309. },
  10310. "required": ["start", "end"],
  10311. "additionalProperties": false
  10312. },
  10313. "SymbolSource": {
  10314. "type": "object",
  10315. "properties": {
  10316. "text": {
  10317. "$ref": "#/components/schemas/FilePartSourceText"
  10318. },
  10319. "type": {
  10320. "type": "string",
  10321. "enum": ["symbol"]
  10322. },
  10323. "path": {
  10324. "type": "string"
  10325. },
  10326. "range": {
  10327. "$ref": "#/components/schemas/Range"
  10328. },
  10329. "name": {
  10330. "type": "string"
  10331. },
  10332. "kind": {
  10333. "type": "integer",
  10334. "minimum": 0
  10335. }
  10336. },
  10337. "required": ["text", "type", "path", "range", "name", "kind"],
  10338. "additionalProperties": false
  10339. },
  10340. "ResourceSource": {
  10341. "type": "object",
  10342. "properties": {
  10343. "text": {
  10344. "$ref": "#/components/schemas/FilePartSourceText"
  10345. },
  10346. "type": {
  10347. "type": "string",
  10348. "enum": ["resource"]
  10349. },
  10350. "clientName": {
  10351. "type": "string"
  10352. },
  10353. "uri": {
  10354. "type": "string"
  10355. }
  10356. },
  10357. "required": ["text", "type", "clientName", "uri"],
  10358. "additionalProperties": false
  10359. },
  10360. "FilePartSource": {
  10361. "anyOf": [
  10362. {
  10363. "$ref": "#/components/schemas/FileSource"
  10364. },
  10365. {
  10366. "$ref": "#/components/schemas/SymbolSource"
  10367. },
  10368. {
  10369. "$ref": "#/components/schemas/ResourceSource"
  10370. }
  10371. ]
  10372. },
  10373. "FilePart": {
  10374. "type": "object",
  10375. "properties": {
  10376. "id": {
  10377. "type": "string"
  10378. },
  10379. "sessionID": {
  10380. "type": "string"
  10381. },
  10382. "messageID": {
  10383. "type": "string"
  10384. },
  10385. "type": {
  10386. "type": "string",
  10387. "enum": ["file"]
  10388. },
  10389. "mime": {
  10390. "type": "string"
  10391. },
  10392. "filename": {
  10393. "type": "string"
  10394. },
  10395. "url": {
  10396. "type": "string"
  10397. },
  10398. "source": {
  10399. "$ref": "#/components/schemas/FilePartSource"
  10400. }
  10401. },
  10402. "required": ["id", "sessionID", "messageID", "type", "mime", "url"],
  10403. "additionalProperties": false
  10404. },
  10405. "ToolStatePending": {
  10406. "type": "object",
  10407. "properties": {
  10408. "status": {
  10409. "type": "string",
  10410. "enum": ["pending"]
  10411. },
  10412. "input": {
  10413. "type": "object"
  10414. },
  10415. "raw": {
  10416. "type": "string"
  10417. }
  10418. },
  10419. "required": ["status", "input", "raw"],
  10420. "additionalProperties": false
  10421. },
  10422. "ToolStateRunning": {
  10423. "type": "object",
  10424. "properties": {
  10425. "status": {
  10426. "type": "string",
  10427. "enum": ["running"]
  10428. },
  10429. "input": {
  10430. "type": "object"
  10431. },
  10432. "title": {
  10433. "type": "string"
  10434. },
  10435. "metadata": {
  10436. "type": "object"
  10437. },
  10438. "time": {
  10439. "type": "object",
  10440. "properties": {
  10441. "start": {
  10442. "type": "integer",
  10443. "minimum": 0
  10444. }
  10445. },
  10446. "required": ["start"],
  10447. "additionalProperties": false
  10448. }
  10449. },
  10450. "required": ["status", "input", "time"],
  10451. "additionalProperties": false
  10452. },
  10453. "ToolStateCompleted": {
  10454. "type": "object",
  10455. "properties": {
  10456. "status": {
  10457. "type": "string",
  10458. "enum": ["completed"]
  10459. },
  10460. "input": {
  10461. "type": "object"
  10462. },
  10463. "output": {
  10464. "type": "string"
  10465. },
  10466. "title": {
  10467. "type": "string"
  10468. },
  10469. "metadata": {
  10470. "type": "object"
  10471. },
  10472. "time": {
  10473. "type": "object",
  10474. "properties": {
  10475. "start": {
  10476. "type": "integer",
  10477. "minimum": 0
  10478. },
  10479. "end": {
  10480. "type": "integer",
  10481. "minimum": 0
  10482. },
  10483. "compacted": {
  10484. "type": "integer",
  10485. "minimum": 0
  10486. }
  10487. },
  10488. "required": ["start", "end"],
  10489. "additionalProperties": false
  10490. },
  10491. "attachments": {
  10492. "type": "array",
  10493. "items": {
  10494. "$ref": "#/components/schemas/FilePart"
  10495. }
  10496. }
  10497. },
  10498. "required": ["status", "input", "output", "title", "metadata", "time"],
  10499. "additionalProperties": false
  10500. },
  10501. "ToolStateError": {
  10502. "type": "object",
  10503. "properties": {
  10504. "status": {
  10505. "type": "string",
  10506. "enum": ["error"]
  10507. },
  10508. "input": {
  10509. "type": "object"
  10510. },
  10511. "error": {
  10512. "type": "string"
  10513. },
  10514. "metadata": {
  10515. "type": "object"
  10516. },
  10517. "time": {
  10518. "type": "object",
  10519. "properties": {
  10520. "start": {
  10521. "type": "integer",
  10522. "minimum": 0
  10523. },
  10524. "end": {
  10525. "type": "integer",
  10526. "minimum": 0
  10527. }
  10528. },
  10529. "required": ["start", "end"],
  10530. "additionalProperties": false
  10531. }
  10532. },
  10533. "required": ["status", "input", "error", "time"],
  10534. "additionalProperties": false
  10535. },
  10536. "ToolState": {
  10537. "anyOf": [
  10538. {
  10539. "$ref": "#/components/schemas/ToolStatePending"
  10540. },
  10541. {
  10542. "$ref": "#/components/schemas/ToolStateRunning"
  10543. },
  10544. {
  10545. "$ref": "#/components/schemas/ToolStateCompleted"
  10546. },
  10547. {
  10548. "$ref": "#/components/schemas/ToolStateError"
  10549. }
  10550. ]
  10551. },
  10552. "ToolPart": {
  10553. "type": "object",
  10554. "properties": {
  10555. "id": {
  10556. "type": "string"
  10557. },
  10558. "sessionID": {
  10559. "type": "string"
  10560. },
  10561. "messageID": {
  10562. "type": "string"
  10563. },
  10564. "type": {
  10565. "type": "string",
  10566. "enum": ["tool"]
  10567. },
  10568. "callID": {
  10569. "type": "string"
  10570. },
  10571. "tool": {
  10572. "type": "string"
  10573. },
  10574. "state": {
  10575. "$ref": "#/components/schemas/ToolState"
  10576. },
  10577. "metadata": {
  10578. "type": "object"
  10579. }
  10580. },
  10581. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"],
  10582. "additionalProperties": false
  10583. },
  10584. "StepStartPart": {
  10585. "type": "object",
  10586. "properties": {
  10587. "id": {
  10588. "type": "string"
  10589. },
  10590. "sessionID": {
  10591. "type": "string"
  10592. },
  10593. "messageID": {
  10594. "type": "string"
  10595. },
  10596. "type": {
  10597. "type": "string",
  10598. "enum": ["step-start"]
  10599. },
  10600. "snapshot": {
  10601. "type": "string"
  10602. }
  10603. },
  10604. "required": ["id", "sessionID", "messageID", "type"],
  10605. "additionalProperties": false
  10606. },
  10607. "StepFinishPart": {
  10608. "type": "object",
  10609. "properties": {
  10610. "id": {
  10611. "type": "string"
  10612. },
  10613. "sessionID": {
  10614. "type": "string"
  10615. },
  10616. "messageID": {
  10617. "type": "string"
  10618. },
  10619. "type": {
  10620. "type": "string",
  10621. "enum": ["step-finish"]
  10622. },
  10623. "reason": {
  10624. "type": "string"
  10625. },
  10626. "snapshot": {
  10627. "type": "string"
  10628. },
  10629. "cost": {
  10630. "type": "number"
  10631. },
  10632. "tokens": {
  10633. "type": "object",
  10634. "properties": {
  10635. "total": {
  10636. "type": "number"
  10637. },
  10638. "input": {
  10639. "type": "number"
  10640. },
  10641. "output": {
  10642. "type": "number"
  10643. },
  10644. "reasoning": {
  10645. "type": "number"
  10646. },
  10647. "cache": {
  10648. "type": "object",
  10649. "properties": {
  10650. "read": {
  10651. "type": "number"
  10652. },
  10653. "write": {
  10654. "type": "number"
  10655. }
  10656. },
  10657. "required": ["read", "write"],
  10658. "additionalProperties": false
  10659. }
  10660. },
  10661. "required": ["input", "output", "reasoning", "cache"],
  10662. "additionalProperties": false
  10663. }
  10664. },
  10665. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"],
  10666. "additionalProperties": false
  10667. },
  10668. "SnapshotPart": {
  10669. "type": "object",
  10670. "properties": {
  10671. "id": {
  10672. "type": "string"
  10673. },
  10674. "sessionID": {
  10675. "type": "string"
  10676. },
  10677. "messageID": {
  10678. "type": "string"
  10679. },
  10680. "type": {
  10681. "type": "string",
  10682. "enum": ["snapshot"]
  10683. },
  10684. "snapshot": {
  10685. "type": "string"
  10686. }
  10687. },
  10688. "required": ["id", "sessionID", "messageID", "type", "snapshot"],
  10689. "additionalProperties": false
  10690. },
  10691. "PatchPart": {
  10692. "type": "object",
  10693. "properties": {
  10694. "id": {
  10695. "type": "string"
  10696. },
  10697. "sessionID": {
  10698. "type": "string"
  10699. },
  10700. "messageID": {
  10701. "type": "string"
  10702. },
  10703. "type": {
  10704. "type": "string",
  10705. "enum": ["patch"]
  10706. },
  10707. "hash": {
  10708. "type": "string"
  10709. },
  10710. "files": {
  10711. "type": "array",
  10712. "items": {
  10713. "type": "string"
  10714. }
  10715. }
  10716. },
  10717. "required": ["id", "sessionID", "messageID", "type", "hash", "files"],
  10718. "additionalProperties": false
  10719. },
  10720. "AgentPart": {
  10721. "type": "object",
  10722. "properties": {
  10723. "id": {
  10724. "type": "string"
  10725. },
  10726. "sessionID": {
  10727. "type": "string"
  10728. },
  10729. "messageID": {
  10730. "type": "string"
  10731. },
  10732. "type": {
  10733. "type": "string",
  10734. "enum": ["agent"]
  10735. },
  10736. "name": {
  10737. "type": "string"
  10738. },
  10739. "source": {
  10740. "type": "object",
  10741. "properties": {
  10742. "value": {
  10743. "type": "string"
  10744. },
  10745. "start": {
  10746. "type": "integer",
  10747. "minimum": 0
  10748. },
  10749. "end": {
  10750. "type": "integer",
  10751. "minimum": 0
  10752. }
  10753. },
  10754. "required": ["value", "start", "end"],
  10755. "additionalProperties": false
  10756. }
  10757. },
  10758. "required": ["id", "sessionID", "messageID", "type", "name"],
  10759. "additionalProperties": false
  10760. },
  10761. "RetryPart": {
  10762. "type": "object",
  10763. "properties": {
  10764. "id": {
  10765. "type": "string"
  10766. },
  10767. "sessionID": {
  10768. "type": "string"
  10769. },
  10770. "messageID": {
  10771. "type": "string"
  10772. },
  10773. "type": {
  10774. "type": "string",
  10775. "enum": ["retry"]
  10776. },
  10777. "attempt": {
  10778. "type": "integer",
  10779. "minimum": 0
  10780. },
  10781. "error": {
  10782. "$ref": "#/components/schemas/APIError"
  10783. },
  10784. "time": {
  10785. "type": "object",
  10786. "properties": {
  10787. "created": {
  10788. "type": "integer",
  10789. "minimum": 0
  10790. }
  10791. },
  10792. "required": ["created"],
  10793. "additionalProperties": false
  10794. }
  10795. },
  10796. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"],
  10797. "additionalProperties": false
  10798. },
  10799. "CompactionPart": {
  10800. "type": "object",
  10801. "properties": {
  10802. "id": {
  10803. "type": "string"
  10804. },
  10805. "sessionID": {
  10806. "type": "string"
  10807. },
  10808. "messageID": {
  10809. "type": "string"
  10810. },
  10811. "type": {
  10812. "type": "string",
  10813. "enum": ["compaction"]
  10814. },
  10815. "auto": {
  10816. "type": "boolean"
  10817. },
  10818. "overflow": {
  10819. "type": "boolean"
  10820. },
  10821. "tail_start_id": {
  10822. "type": "string"
  10823. }
  10824. },
  10825. "required": ["id", "sessionID", "messageID", "type", "auto"],
  10826. "additionalProperties": false
  10827. },
  10828. "Part": {
  10829. "anyOf": [
  10830. {
  10831. "$ref": "#/components/schemas/TextPart"
  10832. },
  10833. {
  10834. "$ref": "#/components/schemas/SubtaskPart"
  10835. },
  10836. {
  10837. "$ref": "#/components/schemas/ReasoningPart"
  10838. },
  10839. {
  10840. "$ref": "#/components/schemas/FilePart"
  10841. },
  10842. {
  10843. "$ref": "#/components/schemas/ToolPart"
  10844. },
  10845. {
  10846. "$ref": "#/components/schemas/StepStartPart"
  10847. },
  10848. {
  10849. "$ref": "#/components/schemas/StepFinishPart"
  10850. },
  10851. {
  10852. "$ref": "#/components/schemas/SnapshotPart"
  10853. },
  10854. {
  10855. "$ref": "#/components/schemas/PatchPart"
  10856. },
  10857. {
  10858. "$ref": "#/components/schemas/AgentPart"
  10859. },
  10860. {
  10861. "$ref": "#/components/schemas/RetryPart"
  10862. },
  10863. {
  10864. "$ref": "#/components/schemas/CompactionPart"
  10865. }
  10866. ]
  10867. },
  10868. "PermissionAction": {
  10869. "type": "string",
  10870. "enum": ["allow", "deny", "ask"]
  10871. },
  10872. "PermissionRule": {
  10873. "type": "object",
  10874. "properties": {
  10875. "permission": {
  10876. "type": "string"
  10877. },
  10878. "pattern": {
  10879. "type": "string"
  10880. },
  10881. "action": {
  10882. "$ref": "#/components/schemas/PermissionAction"
  10883. }
  10884. },
  10885. "required": ["permission", "pattern", "action"],
  10886. "additionalProperties": false
  10887. },
  10888. "PermissionRuleset": {
  10889. "type": "array",
  10890. "items": {
  10891. "$ref": "#/components/schemas/PermissionRule"
  10892. }
  10893. },
  10894. "Session": {
  10895. "type": "object",
  10896. "properties": {
  10897. "id": {
  10898. "type": "string"
  10899. },
  10900. "slug": {
  10901. "type": "string"
  10902. },
  10903. "projectID": {
  10904. "type": "string"
  10905. },
  10906. "workspaceID": {
  10907. "type": "string"
  10908. },
  10909. "directory": {
  10910. "type": "string"
  10911. },
  10912. "path": {
  10913. "type": "string"
  10914. },
  10915. "parentID": {
  10916. "type": "string"
  10917. },
  10918. "summary": {
  10919. "type": "object",
  10920. "properties": {
  10921. "additions": {
  10922. "type": "number"
  10923. },
  10924. "deletions": {
  10925. "type": "number"
  10926. },
  10927. "files": {
  10928. "type": "number"
  10929. },
  10930. "diffs": {
  10931. "type": "array",
  10932. "items": {
  10933. "$ref": "#/components/schemas/SnapshotFileDiff"
  10934. }
  10935. }
  10936. },
  10937. "required": ["additions", "deletions", "files"],
  10938. "additionalProperties": false
  10939. },
  10940. "share": {
  10941. "type": "object",
  10942. "properties": {
  10943. "url": {
  10944. "type": "string"
  10945. }
  10946. },
  10947. "required": ["url"],
  10948. "additionalProperties": false
  10949. },
  10950. "title": {
  10951. "type": "string"
  10952. },
  10953. "agent": {
  10954. "type": "string"
  10955. },
  10956. "model": {
  10957. "type": "object",
  10958. "properties": {
  10959. "id": {
  10960. "type": "string"
  10961. },
  10962. "providerID": {
  10963. "type": "string"
  10964. },
  10965. "variant": {
  10966. "type": "string"
  10967. }
  10968. },
  10969. "required": ["id", "providerID"],
  10970. "additionalProperties": false
  10971. },
  10972. "version": {
  10973. "type": "string"
  10974. },
  10975. "time": {
  10976. "type": "object",
  10977. "properties": {
  10978. "created": {
  10979. "type": "integer",
  10980. "minimum": 0
  10981. },
  10982. "updated": {
  10983. "type": "integer",
  10984. "minimum": 0
  10985. },
  10986. "compacting": {
  10987. "type": "integer",
  10988. "minimum": 0
  10989. },
  10990. "archived": {
  10991. "type": "number"
  10992. }
  10993. },
  10994. "required": ["created", "updated"],
  10995. "additionalProperties": false
  10996. },
  10997. "permission": {
  10998. "$ref": "#/components/schemas/PermissionRuleset"
  10999. },
  11000. "revert": {
  11001. "type": "object",
  11002. "properties": {
  11003. "messageID": {
  11004. "type": "string"
  11005. },
  11006. "partID": {
  11007. "type": "string"
  11008. },
  11009. "snapshot": {
  11010. "type": "string"
  11011. },
  11012. "diff": {
  11013. "type": "string"
  11014. }
  11015. },
  11016. "required": ["messageID"],
  11017. "additionalProperties": false
  11018. }
  11019. },
  11020. "required": ["id", "slug", "projectID", "directory", "title", "version", "time"],
  11021. "additionalProperties": false
  11022. },
  11023. "Prompt": {
  11024. "type": "object",
  11025. "properties": {
  11026. "text": {
  11027. "type": "string"
  11028. },
  11029. "files": {
  11030. "type": "array",
  11031. "items": {
  11032. "$ref": "#/components/schemas/PromptFileAttachment"
  11033. }
  11034. },
  11035. "agents": {
  11036. "type": "array",
  11037. "items": {
  11038. "$ref": "#/components/schemas/PromptAgentAttachment"
  11039. }
  11040. }
  11041. },
  11042. "required": ["text"],
  11043. "additionalProperties": false
  11044. },
  11045. "GlobalEvent": {
  11046. "type": "object",
  11047. "properties": {
  11048. "directory": {
  11049. "type": "string"
  11050. },
  11051. "project": {
  11052. "type": "string"
  11053. },
  11054. "workspace": {
  11055. "type": "string"
  11056. },
  11057. "payload": {
  11058. "anyOf": [
  11059. {
  11060. "$ref": "#/components/schemas/EventServerInstanceDisposed"
  11061. },
  11062. {
  11063. "$ref": "#/components/schemas/EventFileEdited"
  11064. },
  11065. {
  11066. "$ref": "#/components/schemas/EventFileWatcherUpdated"
  11067. },
  11068. {
  11069. "$ref": "#/components/schemas/EventLspClientDiagnostics"
  11070. },
  11071. {
  11072. "$ref": "#/components/schemas/EventLspUpdated"
  11073. },
  11074. {
  11075. "$ref": "#/components/schemas/EventMessagePartDelta"
  11076. },
  11077. {
  11078. "$ref": "#/components/schemas/EventPermissionAsked"
  11079. },
  11080. {
  11081. "$ref": "#/components/schemas/EventPermissionReplied"
  11082. },
  11083. {
  11084. "$ref": "#/components/schemas/EventSessionDiff"
  11085. },
  11086. {
  11087. "$ref": "#/components/schemas/EventSessionError"
  11088. },
  11089. {
  11090. "$ref": "#/components/schemas/EventInstallationUpdated"
  11091. },
  11092. {
  11093. "$ref": "#/components/schemas/EventInstallationUpdate-available"
  11094. },
  11095. {
  11096. "$ref": "#/components/schemas/EventQuestionAsked"
  11097. },
  11098. {
  11099. "$ref": "#/components/schemas/EventQuestionReplied"
  11100. },
  11101. {
  11102. "$ref": "#/components/schemas/EventQuestionRejected"
  11103. },
  11104. {
  11105. "$ref": "#/components/schemas/EventTodoUpdated"
  11106. },
  11107. {
  11108. "$ref": "#/components/schemas/EventSessionStatus"
  11109. },
  11110. {
  11111. "$ref": "#/components/schemas/EventSessionIdle"
  11112. },
  11113. {
  11114. "$ref": "#/components/schemas/EventSessionCompacted"
  11115. },
  11116. {
  11117. "$ref": "#/components/schemas/Event.tui.prompt.append"
  11118. },
  11119. {
  11120. "$ref": "#/components/schemas/Event.tui.command.execute"
  11121. },
  11122. {
  11123. "$ref": "#/components/schemas/Event.tui.toast.show"
  11124. },
  11125. {
  11126. "$ref": "#/components/schemas/Event.tui.session.select"
  11127. },
  11128. {
  11129. "$ref": "#/components/schemas/EventMcpToolsChanged"
  11130. },
  11131. {
  11132. "$ref": "#/components/schemas/EventMcpBrowserOpenFailed"
  11133. },
  11134. {
  11135. "$ref": "#/components/schemas/EventCommandExecuted"
  11136. },
  11137. {
  11138. "$ref": "#/components/schemas/EventProjectUpdated"
  11139. },
  11140. {
  11141. "$ref": "#/components/schemas/EventVcsBranchUpdated"
  11142. },
  11143. {
  11144. "$ref": "#/components/schemas/EventWorkspaceReady"
  11145. },
  11146. {
  11147. "$ref": "#/components/schemas/EventWorkspaceFailed"
  11148. },
  11149. {
  11150. "$ref": "#/components/schemas/EventWorkspaceStatus"
  11151. },
  11152. {
  11153. "$ref": "#/components/schemas/EventWorktreeReady"
  11154. },
  11155. {
  11156. "$ref": "#/components/schemas/EventWorktreeFailed"
  11157. },
  11158. {
  11159. "$ref": "#/components/schemas/EventPtyCreated"
  11160. },
  11161. {
  11162. "$ref": "#/components/schemas/EventPtyUpdated"
  11163. },
  11164. {
  11165. "$ref": "#/components/schemas/EventPtyExited"
  11166. },
  11167. {
  11168. "$ref": "#/components/schemas/EventPtyDeleted"
  11169. },
  11170. {
  11171. "$ref": "#/components/schemas/EventMessageUpdated"
  11172. },
  11173. {
  11174. "$ref": "#/components/schemas/EventMessageRemoved"
  11175. },
  11176. {
  11177. "$ref": "#/components/schemas/EventMessagePartUpdated"
  11178. },
  11179. {
  11180. "$ref": "#/components/schemas/EventMessagePartRemoved"
  11181. },
  11182. {
  11183. "$ref": "#/components/schemas/EventSessionCreated"
  11184. },
  11185. {
  11186. "$ref": "#/components/schemas/EventSessionUpdated"
  11187. },
  11188. {
  11189. "$ref": "#/components/schemas/EventSessionDeleted"
  11190. },
  11191. {
  11192. "$ref": "#/components/schemas/EventSessionNextAgentSwitched"
  11193. },
  11194. {
  11195. "$ref": "#/components/schemas/EventSessionNextModelSwitched"
  11196. },
  11197. {
  11198. "$ref": "#/components/schemas/EventSessionNextPrompted"
  11199. },
  11200. {
  11201. "$ref": "#/components/schemas/EventSessionNextSynthetic"
  11202. },
  11203. {
  11204. "$ref": "#/components/schemas/EventSessionNextShellStarted"
  11205. },
  11206. {
  11207. "$ref": "#/components/schemas/EventSessionNextShellEnded"
  11208. },
  11209. {
  11210. "$ref": "#/components/schemas/EventSessionNextStepStarted"
  11211. },
  11212. {
  11213. "$ref": "#/components/schemas/EventSessionNextStepEnded"
  11214. },
  11215. {
  11216. "$ref": "#/components/schemas/EventSessionNextStepFailed"
  11217. },
  11218. {
  11219. "$ref": "#/components/schemas/EventSessionNextTextStarted"
  11220. },
  11221. {
  11222. "$ref": "#/components/schemas/EventSessionNextTextDelta"
  11223. },
  11224. {
  11225. "$ref": "#/components/schemas/EventSessionNextTextEnded"
  11226. },
  11227. {
  11228. "$ref": "#/components/schemas/EventSessionNextReasoningStarted"
  11229. },
  11230. {
  11231. "$ref": "#/components/schemas/EventSessionNextReasoningDelta"
  11232. },
  11233. {
  11234. "$ref": "#/components/schemas/EventSessionNextReasoningEnded"
  11235. },
  11236. {
  11237. "$ref": "#/components/schemas/EventSessionNextToolInputStarted"
  11238. },
  11239. {
  11240. "$ref": "#/components/schemas/EventSessionNextToolInputDelta"
  11241. },
  11242. {
  11243. "$ref": "#/components/schemas/EventSessionNextToolInputEnded"
  11244. },
  11245. {
  11246. "$ref": "#/components/schemas/EventSessionNextToolCalled"
  11247. },
  11248. {
  11249. "$ref": "#/components/schemas/EventSessionNextToolProgress"
  11250. },
  11251. {
  11252. "$ref": "#/components/schemas/EventSessionNextToolSuccess"
  11253. },
  11254. {
  11255. "$ref": "#/components/schemas/EventSessionNextToolFailed"
  11256. },
  11257. {
  11258. "$ref": "#/components/schemas/EventSessionNextRetried"
  11259. },
  11260. {
  11261. "$ref": "#/components/schemas/EventSessionNextCompactionStarted"
  11262. },
  11263. {
  11264. "$ref": "#/components/schemas/EventSessionNextCompactionDelta"
  11265. },
  11266. {
  11267. "$ref": "#/components/schemas/EventSessionNextCompactionEnded"
  11268. },
  11269. {
  11270. "$ref": "#/components/schemas/EventServerConnected"
  11271. },
  11272. {
  11273. "$ref": "#/components/schemas/EventGlobalDisposed"
  11274. },
  11275. {
  11276. "$ref": "#/components/schemas/SyncEventMessageUpdated"
  11277. },
  11278. {
  11279. "$ref": "#/components/schemas/SyncEventMessageRemoved"
  11280. },
  11281. {
  11282. "$ref": "#/components/schemas/SyncEventMessagePartUpdated"
  11283. },
  11284. {
  11285. "$ref": "#/components/schemas/SyncEventMessagePartRemoved"
  11286. },
  11287. {
  11288. "$ref": "#/components/schemas/SyncEventSessionCreated"
  11289. },
  11290. {
  11291. "$ref": "#/components/schemas/SyncEventSessionUpdated"
  11292. },
  11293. {
  11294. "$ref": "#/components/schemas/SyncEventSessionDeleted"
  11295. },
  11296. {
  11297. "$ref": "#/components/schemas/SyncEventSessionNextAgentSwitched"
  11298. },
  11299. {
  11300. "$ref": "#/components/schemas/SyncEventSessionNextModelSwitched"
  11301. },
  11302. {
  11303. "$ref": "#/components/schemas/SyncEventSessionNextPrompted"
  11304. },
  11305. {
  11306. "$ref": "#/components/schemas/SyncEventSessionNextSynthetic"
  11307. },
  11308. {
  11309. "$ref": "#/components/schemas/SyncEventSessionNextShellStarted"
  11310. },
  11311. {
  11312. "$ref": "#/components/schemas/SyncEventSessionNextShellEnded"
  11313. },
  11314. {
  11315. "$ref": "#/components/schemas/SyncEventSessionNextStepStarted"
  11316. },
  11317. {
  11318. "$ref": "#/components/schemas/SyncEventSessionNextStepEnded"
  11319. },
  11320. {
  11321. "$ref": "#/components/schemas/SyncEventSessionNextStepFailed"
  11322. },
  11323. {
  11324. "$ref": "#/components/schemas/SyncEventSessionNextTextStarted"
  11325. },
  11326. {
  11327. "$ref": "#/components/schemas/SyncEventSessionNextTextDelta"
  11328. },
  11329. {
  11330. "$ref": "#/components/schemas/SyncEventSessionNextTextEnded"
  11331. },
  11332. {
  11333. "$ref": "#/components/schemas/SyncEventSessionNextReasoningStarted"
  11334. },
  11335. {
  11336. "$ref": "#/components/schemas/SyncEventSessionNextReasoningDelta"
  11337. },
  11338. {
  11339. "$ref": "#/components/schemas/SyncEventSessionNextReasoningEnded"
  11340. },
  11341. {
  11342. "$ref": "#/components/schemas/SyncEventSessionNextToolInputStarted"
  11343. },
  11344. {
  11345. "$ref": "#/components/schemas/SyncEventSessionNextToolInputDelta"
  11346. },
  11347. {
  11348. "$ref": "#/components/schemas/SyncEventSessionNextToolInputEnded"
  11349. },
  11350. {
  11351. "$ref": "#/components/schemas/SyncEventSessionNextToolCalled"
  11352. },
  11353. {
  11354. "$ref": "#/components/schemas/SyncEventSessionNextToolProgress"
  11355. },
  11356. {
  11357. "$ref": "#/components/schemas/SyncEventSessionNextToolSuccess"
  11358. },
  11359. {
  11360. "$ref": "#/components/schemas/SyncEventSessionNextToolFailed"
  11361. },
  11362. {
  11363. "$ref": "#/components/schemas/SyncEventSessionNextRetried"
  11364. },
  11365. {
  11366. "$ref": "#/components/schemas/SyncEventSessionNextCompactionStarted"
  11367. },
  11368. {
  11369. "$ref": "#/components/schemas/SyncEventSessionNextCompactionDelta"
  11370. },
  11371. {
  11372. "$ref": "#/components/schemas/SyncEventSessionNextCompactionEnded"
  11373. }
  11374. ]
  11375. }
  11376. },
  11377. "required": ["directory", "payload"],
  11378. "additionalProperties": false
  11379. },
  11380. "LogLevel": {
  11381. "type": "string",
  11382. "enum": ["DEBUG", "INFO", "WARN", "ERROR"],
  11383. "description": "Log level"
  11384. },
  11385. "ServerConfig": {
  11386. "type": "object",
  11387. "properties": {
  11388. "port": {
  11389. "type": "integer",
  11390. "exclusiveMinimum": 0
  11391. },
  11392. "hostname": {
  11393. "type": "string"
  11394. },
  11395. "mdns": {
  11396. "type": "boolean"
  11397. },
  11398. "mdnsDomain": {
  11399. "type": "string"
  11400. },
  11401. "cors": {
  11402. "type": "array",
  11403. "items": {
  11404. "type": "string"
  11405. }
  11406. }
  11407. },
  11408. "additionalProperties": false,
  11409. "description": "Server configuration for opencode serve and web commands"
  11410. },
  11411. "ReferenceConfigEntry": {
  11412. "anyOf": [
  11413. {
  11414. "type": "string"
  11415. },
  11416. {
  11417. "type": "object",
  11418. "properties": {
  11419. "repository": {
  11420. "type": "string",
  11421. "description": "Git repository URL, host/path reference, or GitHub owner/repo shorthand"
  11422. },
  11423. "branch": {
  11424. "type": "string"
  11425. }
  11426. },
  11427. "required": ["repository"],
  11428. "additionalProperties": false
  11429. },
  11430. {
  11431. "type": "object",
  11432. "properties": {
  11433. "path": {
  11434. "type": "string",
  11435. "description": "Absolute path, ~/ path, or workspace-relative path to a local reference directory"
  11436. }
  11437. },
  11438. "required": ["path"],
  11439. "additionalProperties": false
  11440. }
  11441. ]
  11442. },
  11443. "ReferenceConfig": {
  11444. "type": "object",
  11445. "additionalProperties": {
  11446. "$ref": "#/components/schemas/ReferenceConfigEntry"
  11447. }
  11448. },
  11449. "PermissionActionConfig": {
  11450. "type": "string",
  11451. "enum": ["ask", "allow", "deny"]
  11452. },
  11453. "PermissionObjectConfig": {
  11454. "type": "object",
  11455. "additionalProperties": {
  11456. "$ref": "#/components/schemas/PermissionActionConfig"
  11457. }
  11458. },
  11459. "PermissionRuleConfig": {
  11460. "anyOf": [
  11461. {
  11462. "$ref": "#/components/schemas/PermissionActionConfig"
  11463. },
  11464. {
  11465. "$ref": "#/components/schemas/PermissionObjectConfig"
  11466. }
  11467. ]
  11468. },
  11469. "PermissionConfig": {
  11470. "anyOf": [
  11471. {
  11472. "$ref": "#/components/schemas/PermissionActionConfig"
  11473. },
  11474. {
  11475. "type": "object",
  11476. "properties": {
  11477. "read": {
  11478. "$ref": "#/components/schemas/PermissionRuleConfig"
  11479. },
  11480. "edit": {
  11481. "$ref": "#/components/schemas/PermissionRuleConfig"
  11482. },
  11483. "glob": {
  11484. "$ref": "#/components/schemas/PermissionRuleConfig"
  11485. },
  11486. "grep": {
  11487. "$ref": "#/components/schemas/PermissionRuleConfig"
  11488. },
  11489. "list": {
  11490. "$ref": "#/components/schemas/PermissionRuleConfig"
  11491. },
  11492. "bash": {
  11493. "$ref": "#/components/schemas/PermissionRuleConfig"
  11494. },
  11495. "task": {
  11496. "$ref": "#/components/schemas/PermissionRuleConfig"
  11497. },
  11498. "external_directory": {
  11499. "$ref": "#/components/schemas/PermissionRuleConfig"
  11500. },
  11501. "todowrite": {
  11502. "$ref": "#/components/schemas/PermissionActionConfig"
  11503. },
  11504. "question": {
  11505. "$ref": "#/components/schemas/PermissionActionConfig"
  11506. },
  11507. "webfetch": {
  11508. "$ref": "#/components/schemas/PermissionActionConfig"
  11509. },
  11510. "websearch": {
  11511. "$ref": "#/components/schemas/PermissionActionConfig"
  11512. },
  11513. "codesearch": {
  11514. "$ref": "#/components/schemas/PermissionActionConfig"
  11515. },
  11516. "repo_clone": {
  11517. "$ref": "#/components/schemas/PermissionRuleConfig"
  11518. },
  11519. "repo_overview": {
  11520. "$ref": "#/components/schemas/PermissionRuleConfig"
  11521. },
  11522. "lsp": {
  11523. "$ref": "#/components/schemas/PermissionRuleConfig"
  11524. },
  11525. "doom_loop": {
  11526. "$ref": "#/components/schemas/PermissionActionConfig"
  11527. },
  11528. "skill": {
  11529. "$ref": "#/components/schemas/PermissionRuleConfig"
  11530. }
  11531. },
  11532. "additionalProperties": {
  11533. "$ref": "#/components/schemas/PermissionRuleConfig"
  11534. }
  11535. }
  11536. ]
  11537. },
  11538. "AgentConfig": {
  11539. "type": "object",
  11540. "properties": {
  11541. "model": {
  11542. "type": "string"
  11543. },
  11544. "variant": {
  11545. "type": "string"
  11546. },
  11547. "temperature": {
  11548. "type": "number"
  11549. },
  11550. "top_p": {
  11551. "type": "number"
  11552. },
  11553. "prompt": {
  11554. "type": "string"
  11555. },
  11556. "tools": {
  11557. "type": "object",
  11558. "additionalProperties": {
  11559. "type": "boolean"
  11560. }
  11561. },
  11562. "disable": {
  11563. "type": "boolean"
  11564. },
  11565. "description": {
  11566. "type": "string"
  11567. },
  11568. "mode": {
  11569. "type": "string",
  11570. "enum": ["subagent", "primary", "all"]
  11571. },
  11572. "hidden": {
  11573. "type": "boolean"
  11574. },
  11575. "options": {
  11576. "type": "object"
  11577. },
  11578. "color": {
  11579. "anyOf": [
  11580. {
  11581. "type": "string",
  11582. "pattern": "^#[0-9a-fA-F]{6}$"
  11583. },
  11584. {
  11585. "type": "string",
  11586. "enum": ["primary", "secondary", "accent", "success", "warning", "error", "info"]
  11587. }
  11588. ],
  11589. "description": "Hex color code (e.g., #FF5733) or theme color (e.g., primary)"
  11590. },
  11591. "steps": {
  11592. "type": "integer",
  11593. "exclusiveMinimum": 0
  11594. },
  11595. "maxSteps": {
  11596. "type": "integer",
  11597. "exclusiveMinimum": 0
  11598. },
  11599. "permission": {
  11600. "$ref": "#/components/schemas/PermissionConfig"
  11601. }
  11602. },
  11603. "additionalProperties": {}
  11604. },
  11605. "ProviderConfig": {
  11606. "type": "object",
  11607. "properties": {
  11608. "api": {
  11609. "type": "string"
  11610. },
  11611. "name": {
  11612. "type": "string"
  11613. },
  11614. "env": {
  11615. "type": "array",
  11616. "items": {
  11617. "type": "string"
  11618. }
  11619. },
  11620. "id": {
  11621. "type": "string"
  11622. },
  11623. "npm": {
  11624. "type": "string"
  11625. },
  11626. "whitelist": {
  11627. "type": "array",
  11628. "items": {
  11629. "type": "string"
  11630. }
  11631. },
  11632. "blacklist": {
  11633. "type": "array",
  11634. "items": {
  11635. "type": "string"
  11636. }
  11637. },
  11638. "options": {
  11639. "type": "object",
  11640. "properties": {
  11641. "apiKey": {
  11642. "type": "string"
  11643. },
  11644. "baseURL": {
  11645. "type": "string"
  11646. },
  11647. "enterpriseUrl": {
  11648. "type": "string"
  11649. },
  11650. "setCacheKey": {
  11651. "type": "boolean"
  11652. },
  11653. "timeout": {
  11654. "anyOf": [
  11655. {
  11656. "type": "integer",
  11657. "exclusiveMinimum": 0
  11658. },
  11659. {
  11660. "type": "boolean",
  11661. "enum": [false]
  11662. }
  11663. ],
  11664. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout."
  11665. },
  11666. "chunkTimeout": {
  11667. "type": "integer",
  11668. "exclusiveMinimum": 0
  11669. }
  11670. },
  11671. "additionalProperties": {}
  11672. },
  11673. "models": {
  11674. "type": "object",
  11675. "additionalProperties": {
  11676. "type": "object",
  11677. "properties": {
  11678. "id": {
  11679. "type": "string"
  11680. },
  11681. "name": {
  11682. "type": "string"
  11683. },
  11684. "family": {
  11685. "type": "string"
  11686. },
  11687. "release_date": {
  11688. "type": "string"
  11689. },
  11690. "attachment": {
  11691. "type": "boolean"
  11692. },
  11693. "reasoning": {
  11694. "type": "boolean"
  11695. },
  11696. "temperature": {
  11697. "type": "boolean"
  11698. },
  11699. "tool_call": {
  11700. "type": "boolean"
  11701. },
  11702. "interleaved": {
  11703. "anyOf": [
  11704. {
  11705. "type": "boolean",
  11706. "enum": [true]
  11707. },
  11708. {
  11709. "type": "object",
  11710. "properties": {
  11711. "field": {
  11712. "type": "string",
  11713. "enum": ["reasoning_content", "reasoning_details"]
  11714. }
  11715. },
  11716. "required": ["field"],
  11717. "additionalProperties": false
  11718. }
  11719. ]
  11720. },
  11721. "cost": {
  11722. "type": "object",
  11723. "properties": {
  11724. "input": {
  11725. "type": "number"
  11726. },
  11727. "output": {
  11728. "type": "number"
  11729. },
  11730. "cache_read": {
  11731. "type": "number"
  11732. },
  11733. "cache_write": {
  11734. "type": "number"
  11735. },
  11736. "context_over_200k": {
  11737. "type": "object",
  11738. "properties": {
  11739. "input": {
  11740. "type": "number"
  11741. },
  11742. "output": {
  11743. "type": "number"
  11744. },
  11745. "cache_read": {
  11746. "type": "number"
  11747. },
  11748. "cache_write": {
  11749. "type": "number"
  11750. }
  11751. },
  11752. "required": ["input", "output"],
  11753. "additionalProperties": false
  11754. }
  11755. },
  11756. "required": ["input", "output"],
  11757. "additionalProperties": false
  11758. },
  11759. "limit": {
  11760. "type": "object",
  11761. "properties": {
  11762. "context": {
  11763. "type": "number"
  11764. },
  11765. "input": {
  11766. "type": "number"
  11767. },
  11768. "output": {
  11769. "type": "number"
  11770. }
  11771. },
  11772. "required": ["context", "output"],
  11773. "additionalProperties": false
  11774. },
  11775. "modalities": {
  11776. "type": "object",
  11777. "properties": {
  11778. "input": {
  11779. "type": "array",
  11780. "items": {
  11781. "type": "string",
  11782. "enum": ["text", "audio", "image", "video", "pdf"]
  11783. }
  11784. },
  11785. "output": {
  11786. "type": "array",
  11787. "items": {
  11788. "type": "string",
  11789. "enum": ["text", "audio", "image", "video", "pdf"]
  11790. }
  11791. }
  11792. },
  11793. "required": ["input", "output"],
  11794. "additionalProperties": false
  11795. },
  11796. "experimental": {
  11797. "type": "boolean"
  11798. },
  11799. "status": {
  11800. "type": "string",
  11801. "enum": ["alpha", "beta", "deprecated", "active"]
  11802. },
  11803. "provider": {
  11804. "type": "object",
  11805. "properties": {
  11806. "npm": {
  11807. "type": "string"
  11808. },
  11809. "api": {
  11810. "type": "string"
  11811. }
  11812. },
  11813. "additionalProperties": false
  11814. },
  11815. "options": {
  11816. "type": "object"
  11817. },
  11818. "headers": {
  11819. "type": "object",
  11820. "additionalProperties": {
  11821. "type": "string"
  11822. }
  11823. },
  11824. "variants": {
  11825. "type": "object",
  11826. "additionalProperties": {
  11827. "type": "object",
  11828. "properties": {
  11829. "disabled": {
  11830. "type": "boolean"
  11831. }
  11832. },
  11833. "additionalProperties": {}
  11834. },
  11835. "description": "Variant-specific configuration"
  11836. }
  11837. },
  11838. "additionalProperties": false
  11839. }
  11840. }
  11841. },
  11842. "additionalProperties": false
  11843. },
  11844. "McpLocalConfig": {
  11845. "type": "object",
  11846. "properties": {
  11847. "type": {
  11848. "type": "string",
  11849. "enum": ["local"],
  11850. "description": "Type of MCP server connection"
  11851. },
  11852. "command": {
  11853. "type": "array",
  11854. "items": {
  11855. "type": "string"
  11856. },
  11857. "description": "Command and arguments to run the MCP server"
  11858. },
  11859. "environment": {
  11860. "type": "object",
  11861. "additionalProperties": {
  11862. "type": "string"
  11863. }
  11864. },
  11865. "enabled": {
  11866. "type": "boolean"
  11867. },
  11868. "timeout": {
  11869. "type": "integer",
  11870. "exclusiveMinimum": 0
  11871. }
  11872. },
  11873. "required": ["type", "command"],
  11874. "additionalProperties": false
  11875. },
  11876. "McpOAuthConfig": {
  11877. "type": "object",
  11878. "properties": {
  11879. "clientId": {
  11880. "type": "string"
  11881. },
  11882. "clientSecret": {
  11883. "type": "string"
  11884. },
  11885. "scope": {
  11886. "type": "string"
  11887. },
  11888. "redirectUri": {
  11889. "type": "string"
  11890. }
  11891. },
  11892. "additionalProperties": false
  11893. },
  11894. "McpRemoteConfig": {
  11895. "type": "object",
  11896. "properties": {
  11897. "type": {
  11898. "type": "string",
  11899. "enum": ["remote"],
  11900. "description": "Type of MCP server connection"
  11901. },
  11902. "url": {
  11903. "type": "string",
  11904. "description": "URL of the remote MCP server"
  11905. },
  11906. "enabled": {
  11907. "type": "boolean"
  11908. },
  11909. "headers": {
  11910. "type": "object",
  11911. "additionalProperties": {
  11912. "type": "string"
  11913. }
  11914. },
  11915. "oauth": {
  11916. "anyOf": [
  11917. {
  11918. "$ref": "#/components/schemas/McpOAuthConfig"
  11919. },
  11920. {
  11921. "type": "boolean",
  11922. "enum": [false]
  11923. }
  11924. ],
  11925. "description": "OAuth authentication configuration for the MCP server. Set to false to disable OAuth auto-detection."
  11926. },
  11927. "timeout": {
  11928. "type": "integer",
  11929. "exclusiveMinimum": 0
  11930. }
  11931. },
  11932. "required": ["type", "url"],
  11933. "additionalProperties": false
  11934. },
  11935. "LayoutConfig": {
  11936. "type": "string",
  11937. "enum": ["auto", "stretch"],
  11938. "description": "@deprecated Always uses stretch layout."
  11939. },
  11940. "Config": {
  11941. "type": "object",
  11942. "properties": {
  11943. "$schema": {
  11944. "type": "string"
  11945. },
  11946. "shell": {
  11947. "type": "string"
  11948. },
  11949. "logLevel": {
  11950. "$ref": "#/components/schemas/LogLevel"
  11951. },
  11952. "server": {
  11953. "$ref": "#/components/schemas/ServerConfig"
  11954. },
  11955. "command": {
  11956. "type": "object",
  11957. "additionalProperties": {
  11958. "type": "object",
  11959. "properties": {
  11960. "template": {
  11961. "type": "string"
  11962. },
  11963. "description": {
  11964. "type": "string"
  11965. },
  11966. "agent": {
  11967. "type": "string"
  11968. },
  11969. "model": {
  11970. "type": "string"
  11971. },
  11972. "subtask": {
  11973. "type": "boolean"
  11974. }
  11975. },
  11976. "required": ["template"],
  11977. "additionalProperties": false
  11978. }
  11979. },
  11980. "skills": {
  11981. "type": "object",
  11982. "properties": {
  11983. "paths": {
  11984. "type": "array",
  11985. "items": {
  11986. "type": "string"
  11987. }
  11988. },
  11989. "urls": {
  11990. "type": "array",
  11991. "items": {
  11992. "type": "string"
  11993. }
  11994. }
  11995. },
  11996. "additionalProperties": false
  11997. },
  11998. "reference": {
  11999. "$ref": "#/components/schemas/ReferenceConfig"
  12000. },
  12001. "watcher": {
  12002. "type": "object",
  12003. "properties": {
  12004. "ignore": {
  12005. "type": "array",
  12006. "items": {
  12007. "type": "string"
  12008. }
  12009. }
  12010. },
  12011. "additionalProperties": false
  12012. },
  12013. "snapshot": {
  12014. "type": "boolean"
  12015. },
  12016. "plugin": {
  12017. "type": "array",
  12018. "items": {
  12019. "anyOf": [
  12020. {
  12021. "type": "string"
  12022. },
  12023. {
  12024. "type": "array",
  12025. "prefixItems": [
  12026. {
  12027. "type": "string"
  12028. },
  12029. {
  12030. "type": "object"
  12031. }
  12032. ],
  12033. "maxItems": 2,
  12034. "minItems": 2
  12035. }
  12036. ]
  12037. }
  12038. },
  12039. "share": {
  12040. "type": "string",
  12041. "enum": ["manual", "auto", "disabled"]
  12042. },
  12043. "autoshare": {
  12044. "type": "boolean"
  12045. },
  12046. "autoupdate": {
  12047. "anyOf": [
  12048. {
  12049. "type": "boolean"
  12050. },
  12051. {
  12052. "type": "string",
  12053. "enum": ["notify"]
  12054. }
  12055. ],
  12056. "description": "Automatically update to the latest version. Set to true to auto-update, false to disable, or 'notify' to show update notifications"
  12057. },
  12058. "disabled_providers": {
  12059. "type": "array",
  12060. "items": {
  12061. "type": "string"
  12062. }
  12063. },
  12064. "enabled_providers": {
  12065. "type": "array",
  12066. "items": {
  12067. "type": "string"
  12068. }
  12069. },
  12070. "model": {
  12071. "type": "string"
  12072. },
  12073. "small_model": {
  12074. "type": "string"
  12075. },
  12076. "default_agent": {
  12077. "type": "string"
  12078. },
  12079. "username": {
  12080. "type": "string"
  12081. },
  12082. "mode": {
  12083. "type": "object",
  12084. "properties": {
  12085. "build": {
  12086. "$ref": "#/components/schemas/AgentConfig"
  12087. },
  12088. "plan": {
  12089. "$ref": "#/components/schemas/AgentConfig"
  12090. }
  12091. },
  12092. "additionalProperties": {
  12093. "$ref": "#/components/schemas/AgentConfig"
  12094. }
  12095. },
  12096. "agent": {
  12097. "type": "object",
  12098. "properties": {
  12099. "plan": {
  12100. "$ref": "#/components/schemas/AgentConfig"
  12101. },
  12102. "build": {
  12103. "$ref": "#/components/schemas/AgentConfig"
  12104. },
  12105. "general": {
  12106. "$ref": "#/components/schemas/AgentConfig"
  12107. },
  12108. "explore": {
  12109. "$ref": "#/components/schemas/AgentConfig"
  12110. },
  12111. "scout": {
  12112. "$ref": "#/components/schemas/AgentConfig"
  12113. },
  12114. "title": {
  12115. "$ref": "#/components/schemas/AgentConfig"
  12116. },
  12117. "summary": {
  12118. "$ref": "#/components/schemas/AgentConfig"
  12119. },
  12120. "compaction": {
  12121. "$ref": "#/components/schemas/AgentConfig"
  12122. }
  12123. },
  12124. "additionalProperties": {
  12125. "$ref": "#/components/schemas/AgentConfig"
  12126. }
  12127. },
  12128. "provider": {
  12129. "type": "object",
  12130. "additionalProperties": {
  12131. "$ref": "#/components/schemas/ProviderConfig"
  12132. }
  12133. },
  12134. "mcp": {
  12135. "type": "object",
  12136. "additionalProperties": {
  12137. "anyOf": [
  12138. {
  12139. "$ref": "#/components/schemas/McpLocalConfig"
  12140. },
  12141. {
  12142. "$ref": "#/components/schemas/McpRemoteConfig"
  12143. },
  12144. {
  12145. "type": "object",
  12146. "properties": {
  12147. "enabled": {
  12148. "type": "boolean"
  12149. }
  12150. },
  12151. "required": ["enabled"],
  12152. "additionalProperties": false
  12153. }
  12154. ]
  12155. }
  12156. },
  12157. "formatter": {
  12158. "anyOf": [
  12159. {
  12160. "type": "boolean"
  12161. },
  12162. {
  12163. "type": "object",
  12164. "additionalProperties": {
  12165. "type": "object",
  12166. "properties": {
  12167. "disabled": {
  12168. "type": "boolean"
  12169. },
  12170. "command": {
  12171. "type": "array",
  12172. "items": {
  12173. "type": "string"
  12174. }
  12175. },
  12176. "environment": {
  12177. "type": "object",
  12178. "additionalProperties": {
  12179. "type": "string"
  12180. }
  12181. },
  12182. "extensions": {
  12183. "type": "array",
  12184. "items": {
  12185. "type": "string"
  12186. }
  12187. }
  12188. },
  12189. "additionalProperties": false
  12190. }
  12191. }
  12192. ],
  12193. "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."
  12194. },
  12195. "lsp": {
  12196. "anyOf": [
  12197. {
  12198. "type": "boolean"
  12199. },
  12200. {
  12201. "type": "object",
  12202. "additionalProperties": {
  12203. "anyOf": [
  12204. {
  12205. "type": "object",
  12206. "properties": {
  12207. "disabled": {
  12208. "type": "boolean",
  12209. "enum": [true]
  12210. }
  12211. },
  12212. "required": ["disabled"],
  12213. "additionalProperties": false
  12214. },
  12215. {
  12216. "type": "object",
  12217. "properties": {
  12218. "command": {
  12219. "type": "array",
  12220. "items": {
  12221. "type": "string"
  12222. }
  12223. },
  12224. "extensions": {
  12225. "type": "array",
  12226. "items": {
  12227. "type": "string"
  12228. }
  12229. },
  12230. "disabled": {
  12231. "type": "boolean"
  12232. },
  12233. "env": {
  12234. "type": "object",
  12235. "additionalProperties": {
  12236. "type": "string"
  12237. }
  12238. },
  12239. "initialization": {
  12240. "type": "object"
  12241. }
  12242. },
  12243. "required": ["command"],
  12244. "additionalProperties": false
  12245. }
  12246. ]
  12247. }
  12248. }
  12249. ],
  12250. "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."
  12251. },
  12252. "instructions": {
  12253. "type": "array",
  12254. "items": {
  12255. "type": "string"
  12256. }
  12257. },
  12258. "layout": {
  12259. "$ref": "#/components/schemas/LayoutConfig"
  12260. },
  12261. "permission": {
  12262. "$ref": "#/components/schemas/PermissionConfig"
  12263. },
  12264. "tools": {
  12265. "type": "object",
  12266. "additionalProperties": {
  12267. "type": "boolean"
  12268. }
  12269. },
  12270. "enterprise": {
  12271. "type": "object",
  12272. "properties": {
  12273. "url": {
  12274. "type": "string"
  12275. }
  12276. },
  12277. "additionalProperties": false
  12278. },
  12279. "tool_output": {
  12280. "type": "object",
  12281. "properties": {
  12282. "max_lines": {
  12283. "type": "integer",
  12284. "exclusiveMinimum": 0
  12285. },
  12286. "max_bytes": {
  12287. "type": "integer",
  12288. "exclusiveMinimum": 0
  12289. }
  12290. },
  12291. "additionalProperties": false
  12292. },
  12293. "compaction": {
  12294. "type": "object",
  12295. "properties": {
  12296. "auto": {
  12297. "type": "boolean"
  12298. },
  12299. "prune": {
  12300. "type": "boolean"
  12301. },
  12302. "tail_turns": {
  12303. "type": "integer",
  12304. "minimum": 0
  12305. },
  12306. "preserve_recent_tokens": {
  12307. "type": "integer",
  12308. "minimum": 0
  12309. },
  12310. "reserved": {
  12311. "type": "integer",
  12312. "minimum": 0
  12313. }
  12314. },
  12315. "additionalProperties": false
  12316. },
  12317. "experimental": {
  12318. "type": "object",
  12319. "properties": {
  12320. "disable_paste_summary": {
  12321. "type": "boolean"
  12322. },
  12323. "batch_tool": {
  12324. "type": "boolean"
  12325. },
  12326. "openTelemetry": {
  12327. "type": "boolean"
  12328. },
  12329. "primary_tools": {
  12330. "type": "array",
  12331. "items": {
  12332. "type": "string"
  12333. }
  12334. },
  12335. "continue_loop_on_deny": {
  12336. "type": "boolean"
  12337. },
  12338. "mcp_timeout": {
  12339. "type": "integer",
  12340. "exclusiveMinimum": 0
  12341. }
  12342. },
  12343. "additionalProperties": false
  12344. }
  12345. },
  12346. "additionalProperties": false
  12347. },
  12348. "Model": {
  12349. "type": "object",
  12350. "properties": {
  12351. "id": {
  12352. "type": "string"
  12353. },
  12354. "providerID": {
  12355. "type": "string"
  12356. },
  12357. "api": {
  12358. "type": "object",
  12359. "properties": {
  12360. "id": {
  12361. "type": "string"
  12362. },
  12363. "url": {
  12364. "type": "string"
  12365. },
  12366. "npm": {
  12367. "type": "string"
  12368. }
  12369. },
  12370. "required": ["id", "url", "npm"],
  12371. "additionalProperties": false
  12372. },
  12373. "name": {
  12374. "type": "string"
  12375. },
  12376. "family": {
  12377. "type": "string"
  12378. },
  12379. "capabilities": {
  12380. "type": "object",
  12381. "properties": {
  12382. "temperature": {
  12383. "type": "boolean"
  12384. },
  12385. "reasoning": {
  12386. "type": "boolean"
  12387. },
  12388. "attachment": {
  12389. "type": "boolean"
  12390. },
  12391. "toolcall": {
  12392. "type": "boolean"
  12393. },
  12394. "input": {
  12395. "type": "object",
  12396. "properties": {
  12397. "text": {
  12398. "type": "boolean"
  12399. },
  12400. "audio": {
  12401. "type": "boolean"
  12402. },
  12403. "image": {
  12404. "type": "boolean"
  12405. },
  12406. "video": {
  12407. "type": "boolean"
  12408. },
  12409. "pdf": {
  12410. "type": "boolean"
  12411. }
  12412. },
  12413. "required": ["text", "audio", "image", "video", "pdf"],
  12414. "additionalProperties": false
  12415. },
  12416. "output": {
  12417. "type": "object",
  12418. "properties": {
  12419. "text": {
  12420. "type": "boolean"
  12421. },
  12422. "audio": {
  12423. "type": "boolean"
  12424. },
  12425. "image": {
  12426. "type": "boolean"
  12427. },
  12428. "video": {
  12429. "type": "boolean"
  12430. },
  12431. "pdf": {
  12432. "type": "boolean"
  12433. }
  12434. },
  12435. "required": ["text", "audio", "image", "video", "pdf"],
  12436. "additionalProperties": false
  12437. },
  12438. "interleaved": {
  12439. "anyOf": [
  12440. {
  12441. "type": "boolean"
  12442. },
  12443. {
  12444. "type": "object",
  12445. "properties": {
  12446. "field": {
  12447. "type": "string",
  12448. "enum": ["reasoning_content", "reasoning_details"]
  12449. }
  12450. },
  12451. "required": ["field"],
  12452. "additionalProperties": false
  12453. }
  12454. ]
  12455. }
  12456. },
  12457. "required": ["temperature", "reasoning", "attachment", "toolcall", "input", "output", "interleaved"],
  12458. "additionalProperties": false
  12459. },
  12460. "cost": {
  12461. "type": "object",
  12462. "properties": {
  12463. "input": {
  12464. "type": "number"
  12465. },
  12466. "output": {
  12467. "type": "number"
  12468. },
  12469. "cache": {
  12470. "type": "object",
  12471. "properties": {
  12472. "read": {
  12473. "type": "number"
  12474. },
  12475. "write": {
  12476. "type": "number"
  12477. }
  12478. },
  12479. "required": ["read", "write"],
  12480. "additionalProperties": false
  12481. },
  12482. "experimentalOver200K": {
  12483. "type": "object",
  12484. "properties": {
  12485. "input": {
  12486. "type": "number"
  12487. },
  12488. "output": {
  12489. "type": "number"
  12490. },
  12491. "cache": {
  12492. "type": "object",
  12493. "properties": {
  12494. "read": {
  12495. "type": "number"
  12496. },
  12497. "write": {
  12498. "type": "number"
  12499. }
  12500. },
  12501. "required": ["read", "write"],
  12502. "additionalProperties": false
  12503. }
  12504. },
  12505. "required": ["input", "output", "cache"],
  12506. "additionalProperties": false
  12507. }
  12508. },
  12509. "required": ["input", "output", "cache"],
  12510. "additionalProperties": false
  12511. },
  12512. "limit": {
  12513. "type": "object",
  12514. "properties": {
  12515. "context": {
  12516. "type": "number"
  12517. },
  12518. "input": {
  12519. "type": "number"
  12520. },
  12521. "output": {
  12522. "type": "number"
  12523. }
  12524. },
  12525. "required": ["context", "output"],
  12526. "additionalProperties": false
  12527. },
  12528. "status": {
  12529. "type": "string",
  12530. "enum": ["alpha", "beta", "deprecated", "active"]
  12531. },
  12532. "options": {
  12533. "type": "object"
  12534. },
  12535. "headers": {
  12536. "type": "object",
  12537. "additionalProperties": {
  12538. "type": "string"
  12539. }
  12540. },
  12541. "release_date": {
  12542. "type": "string"
  12543. },
  12544. "variants": {
  12545. "type": "object",
  12546. "additionalProperties": {
  12547. "type": "object"
  12548. }
  12549. }
  12550. },
  12551. "required": [
  12552. "id",
  12553. "providerID",
  12554. "api",
  12555. "name",
  12556. "capabilities",
  12557. "cost",
  12558. "limit",
  12559. "status",
  12560. "options",
  12561. "headers",
  12562. "release_date"
  12563. ],
  12564. "additionalProperties": false
  12565. },
  12566. "Provider": {
  12567. "type": "object",
  12568. "properties": {
  12569. "id": {
  12570. "type": "string"
  12571. },
  12572. "name": {
  12573. "type": "string"
  12574. },
  12575. "source": {
  12576. "type": "string",
  12577. "enum": ["env", "config", "custom", "api"]
  12578. },
  12579. "env": {
  12580. "type": "array",
  12581. "items": {
  12582. "type": "string"
  12583. }
  12584. },
  12585. "key": {
  12586. "type": "string"
  12587. },
  12588. "options": {
  12589. "type": "object"
  12590. },
  12591. "models": {
  12592. "type": "object",
  12593. "additionalProperties": {
  12594. "$ref": "#/components/schemas/Model"
  12595. }
  12596. }
  12597. },
  12598. "required": ["id", "name", "source", "env", "options", "models"],
  12599. "additionalProperties": false
  12600. },
  12601. "ConsoleState": {
  12602. "type": "object",
  12603. "properties": {
  12604. "consoleManagedProviders": {
  12605. "type": "array",
  12606. "items": {
  12607. "type": "string"
  12608. }
  12609. },
  12610. "activeOrgName": {
  12611. "type": "string"
  12612. },
  12613. "switchableOrgCount": {
  12614. "type": "integer",
  12615. "minimum": 0
  12616. }
  12617. },
  12618. "required": ["consoleManagedProviders", "switchableOrgCount"],
  12619. "additionalProperties": false
  12620. },
  12621. "effect_HttpApiError_InternalServerError": {
  12622. "type": "object",
  12623. "properties": {
  12624. "_tag": {
  12625. "type": "string",
  12626. "enum": ["InternalServerError"]
  12627. }
  12628. },
  12629. "required": ["_tag"],
  12630. "additionalProperties": false
  12631. },
  12632. "ToolListItem": {
  12633. "type": "object",
  12634. "properties": {
  12635. "id": {
  12636. "type": "string"
  12637. },
  12638. "description": {
  12639. "type": "string"
  12640. },
  12641. "parameters": {}
  12642. },
  12643. "required": ["id", "description", "parameters"],
  12644. "additionalProperties": false
  12645. },
  12646. "ToolList": {
  12647. "type": "array",
  12648. "items": {
  12649. "$ref": "#/components/schemas/ToolListItem"
  12650. }
  12651. },
  12652. "ToolIDs": {
  12653. "type": "array",
  12654. "items": {
  12655. "type": "string"
  12656. }
  12657. },
  12658. "WorktreeCreateInput": {
  12659. "type": "object",
  12660. "properties": {
  12661. "name": {
  12662. "type": "string"
  12663. },
  12664. "startCommand": {
  12665. "type": "string",
  12666. "description": "Additional startup script to run after the project's start command"
  12667. }
  12668. },
  12669. "additionalProperties": false
  12670. },
  12671. "Worktree": {
  12672. "type": "object",
  12673. "properties": {
  12674. "name": {
  12675. "type": "string"
  12676. },
  12677. "branch": {
  12678. "type": "string"
  12679. },
  12680. "directory": {
  12681. "type": "string"
  12682. }
  12683. },
  12684. "required": ["name", "branch", "directory"],
  12685. "additionalProperties": false
  12686. },
  12687. "WorktreeRemoveInput": {
  12688. "type": "object",
  12689. "properties": {
  12690. "directory": {
  12691. "type": "string"
  12692. }
  12693. },
  12694. "required": ["directory"],
  12695. "additionalProperties": false
  12696. },
  12697. "WorktreeResetInput": {
  12698. "type": "object",
  12699. "properties": {
  12700. "directory": {
  12701. "type": "string"
  12702. }
  12703. },
  12704. "required": ["directory"],
  12705. "additionalProperties": false
  12706. },
  12707. "ProjectSummary": {
  12708. "type": "object",
  12709. "properties": {
  12710. "id": {
  12711. "type": "string"
  12712. },
  12713. "name": {
  12714. "type": "string"
  12715. },
  12716. "worktree": {
  12717. "type": "string"
  12718. }
  12719. },
  12720. "required": ["id", "worktree"],
  12721. "additionalProperties": false
  12722. },
  12723. "GlobalSession": {
  12724. "type": "object",
  12725. "properties": {
  12726. "id": {
  12727. "type": "string"
  12728. },
  12729. "slug": {
  12730. "type": "string"
  12731. },
  12732. "projectID": {
  12733. "type": "string"
  12734. },
  12735. "workspaceID": {
  12736. "type": "string"
  12737. },
  12738. "directory": {
  12739. "type": "string"
  12740. },
  12741. "path": {
  12742. "type": "string"
  12743. },
  12744. "parentID": {
  12745. "type": "string"
  12746. },
  12747. "summary": {
  12748. "type": "object",
  12749. "properties": {
  12750. "additions": {
  12751. "type": "number"
  12752. },
  12753. "deletions": {
  12754. "type": "number"
  12755. },
  12756. "files": {
  12757. "type": "number"
  12758. },
  12759. "diffs": {
  12760. "type": "array",
  12761. "items": {
  12762. "$ref": "#/components/schemas/SnapshotFileDiff"
  12763. }
  12764. }
  12765. },
  12766. "required": ["additions", "deletions", "files"],
  12767. "additionalProperties": false
  12768. },
  12769. "share": {
  12770. "type": "object",
  12771. "properties": {
  12772. "url": {
  12773. "type": "string"
  12774. }
  12775. },
  12776. "required": ["url"],
  12777. "additionalProperties": false
  12778. },
  12779. "title": {
  12780. "type": "string"
  12781. },
  12782. "agent": {
  12783. "type": "string"
  12784. },
  12785. "model": {
  12786. "type": "object",
  12787. "properties": {
  12788. "id": {
  12789. "type": "string"
  12790. },
  12791. "providerID": {
  12792. "type": "string"
  12793. },
  12794. "variant": {
  12795. "type": "string"
  12796. }
  12797. },
  12798. "required": ["id", "providerID"],
  12799. "additionalProperties": false
  12800. },
  12801. "version": {
  12802. "type": "string"
  12803. },
  12804. "time": {
  12805. "type": "object",
  12806. "properties": {
  12807. "created": {
  12808. "type": "integer",
  12809. "minimum": 0
  12810. },
  12811. "updated": {
  12812. "type": "integer",
  12813. "minimum": 0
  12814. },
  12815. "compacting": {
  12816. "type": "integer",
  12817. "minimum": 0
  12818. },
  12819. "archived": {
  12820. "type": "number"
  12821. }
  12822. },
  12823. "required": ["created", "updated"],
  12824. "additionalProperties": false
  12825. },
  12826. "permission": {
  12827. "$ref": "#/components/schemas/PermissionRuleset"
  12828. },
  12829. "revert": {
  12830. "type": "object",
  12831. "properties": {
  12832. "messageID": {
  12833. "type": "string"
  12834. },
  12835. "partID": {
  12836. "type": "string"
  12837. },
  12838. "snapshot": {
  12839. "type": "string"
  12840. },
  12841. "diff": {
  12842. "type": "string"
  12843. }
  12844. },
  12845. "required": ["messageID"],
  12846. "additionalProperties": false
  12847. },
  12848. "project": {
  12849. "anyOf": [
  12850. {
  12851. "$ref": "#/components/schemas/ProjectSummary"
  12852. },
  12853. {
  12854. "type": "null"
  12855. }
  12856. ]
  12857. }
  12858. },
  12859. "required": ["id", "slug", "projectID", "directory", "title", "version", "time", "project"],
  12860. "additionalProperties": false
  12861. },
  12862. "McpResource": {
  12863. "type": "object",
  12864. "properties": {
  12865. "name": {
  12866. "type": "string"
  12867. },
  12868. "uri": {
  12869. "type": "string"
  12870. },
  12871. "description": {
  12872. "type": "string"
  12873. },
  12874. "mimeType": {
  12875. "type": "string"
  12876. },
  12877. "client": {
  12878. "type": "string"
  12879. }
  12880. },
  12881. "required": ["name", "uri", "client"],
  12882. "additionalProperties": false
  12883. },
  12884. "Symbol": {
  12885. "type": "object",
  12886. "properties": {
  12887. "name": {
  12888. "type": "string"
  12889. },
  12890. "kind": {
  12891. "type": "integer",
  12892. "minimum": 0
  12893. },
  12894. "location": {
  12895. "type": "object",
  12896. "properties": {
  12897. "uri": {
  12898. "type": "string"
  12899. },
  12900. "range": {
  12901. "$ref": "#/components/schemas/Range"
  12902. }
  12903. },
  12904. "required": ["uri", "range"],
  12905. "additionalProperties": false
  12906. }
  12907. },
  12908. "required": ["name", "kind", "location"],
  12909. "additionalProperties": false
  12910. },
  12911. "FileNode": {
  12912. "type": "object",
  12913. "properties": {
  12914. "name": {
  12915. "type": "string"
  12916. },
  12917. "path": {
  12918. "type": "string"
  12919. },
  12920. "absolute": {
  12921. "type": "string"
  12922. },
  12923. "type": {
  12924. "type": "string",
  12925. "enum": ["file", "directory"]
  12926. },
  12927. "ignored": {
  12928. "type": "boolean"
  12929. }
  12930. },
  12931. "required": ["name", "path", "absolute", "type", "ignored"],
  12932. "additionalProperties": false
  12933. },
  12934. "FileContent": {
  12935. "type": "object",
  12936. "properties": {
  12937. "type": {
  12938. "type": "string",
  12939. "enum": ["text", "binary"]
  12940. },
  12941. "content": {
  12942. "type": "string"
  12943. },
  12944. "diff": {
  12945. "type": "string"
  12946. },
  12947. "patch": {
  12948. "type": "object",
  12949. "properties": {
  12950. "oldFileName": {
  12951. "type": "string"
  12952. },
  12953. "newFileName": {
  12954. "type": "string"
  12955. },
  12956. "oldHeader": {
  12957. "type": "string"
  12958. },
  12959. "newHeader": {
  12960. "type": "string"
  12961. },
  12962. "hunks": {
  12963. "type": "array",
  12964. "items": {
  12965. "type": "object",
  12966. "properties": {
  12967. "oldStart": {
  12968. "type": "integer",
  12969. "minimum": 0
  12970. },
  12971. "oldLines": {
  12972. "type": "integer",
  12973. "minimum": 0
  12974. },
  12975. "newStart": {
  12976. "type": "integer",
  12977. "minimum": 0
  12978. },
  12979. "newLines": {
  12980. "type": "integer",
  12981. "minimum": 0
  12982. },
  12983. "lines": {
  12984. "type": "array",
  12985. "items": {
  12986. "type": "string"
  12987. }
  12988. }
  12989. },
  12990. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"],
  12991. "additionalProperties": false
  12992. }
  12993. },
  12994. "index": {
  12995. "type": "string"
  12996. }
  12997. },
  12998. "required": ["oldFileName", "newFileName", "hunks"],
  12999. "additionalProperties": false
  13000. },
  13001. "encoding": {
  13002. "type": "string",
  13003. "enum": ["base64"]
  13004. },
  13005. "mimeType": {
  13006. "type": "string"
  13007. }
  13008. },
  13009. "required": ["type", "content"],
  13010. "additionalProperties": false
  13011. },
  13012. "File": {
  13013. "type": "object",
  13014. "properties": {
  13015. "path": {
  13016. "type": "string"
  13017. },
  13018. "added": {
  13019. "type": "integer",
  13020. "minimum": 0
  13021. },
  13022. "removed": {
  13023. "type": "integer",
  13024. "minimum": 0
  13025. },
  13026. "status": {
  13027. "type": "string",
  13028. "enum": ["added", "deleted", "modified"]
  13029. }
  13030. },
  13031. "required": ["path", "added", "removed", "status"],
  13032. "additionalProperties": false
  13033. },
  13034. "Path": {
  13035. "type": "object",
  13036. "properties": {
  13037. "home": {
  13038. "type": "string"
  13039. },
  13040. "state": {
  13041. "type": "string"
  13042. },
  13043. "config": {
  13044. "type": "string"
  13045. },
  13046. "worktree": {
  13047. "type": "string"
  13048. },
  13049. "directory": {
  13050. "type": "string"
  13051. }
  13052. },
  13053. "required": ["home", "state", "config", "worktree", "directory"],
  13054. "additionalProperties": false
  13055. },
  13056. "VcsInfo": {
  13057. "type": "object",
  13058. "properties": {
  13059. "branch": {
  13060. "type": "string"
  13061. },
  13062. "default_branch": {
  13063. "type": "string"
  13064. }
  13065. },
  13066. "additionalProperties": false
  13067. },
  13068. "VcsFileStatus": {
  13069. "type": "object",
  13070. "properties": {
  13071. "file": {
  13072. "type": "string"
  13073. },
  13074. "additions": {
  13075. "type": "number"
  13076. },
  13077. "deletions": {
  13078. "type": "number"
  13079. },
  13080. "status": {
  13081. "type": "string",
  13082. "enum": ["added", "deleted", "modified"]
  13083. }
  13084. },
  13085. "required": ["file", "additions", "deletions", "status"],
  13086. "additionalProperties": false
  13087. },
  13088. "VcsFileDiff": {
  13089. "type": "object",
  13090. "properties": {
  13091. "file": {
  13092. "type": "string"
  13093. },
  13094. "patch": {
  13095. "type": "string"
  13096. },
  13097. "additions": {
  13098. "type": "number"
  13099. },
  13100. "deletions": {
  13101. "type": "number"
  13102. },
  13103. "status": {
  13104. "type": "string",
  13105. "enum": ["added", "deleted", "modified"]
  13106. }
  13107. },
  13108. "required": ["file", "additions", "deletions"],
  13109. "additionalProperties": false
  13110. },
  13111. "VcsApplyError": {
  13112. "type": "object",
  13113. "properties": {
  13114. "name": {
  13115. "type": "string",
  13116. "enum": ["VcsApplyError"]
  13117. },
  13118. "data": {
  13119. "type": "object",
  13120. "properties": {
  13121. "message": {
  13122. "type": "string"
  13123. },
  13124. "reason": {
  13125. "type": "string",
  13126. "enum": ["non-git", "not-clean"]
  13127. }
  13128. },
  13129. "required": ["message", "reason"],
  13130. "additionalProperties": false
  13131. }
  13132. },
  13133. "required": ["name", "data"],
  13134. "additionalProperties": false
  13135. },
  13136. "Command": {
  13137. "type": "object",
  13138. "properties": {
  13139. "name": {
  13140. "type": "string"
  13141. },
  13142. "description": {
  13143. "type": "string"
  13144. },
  13145. "agent": {
  13146. "type": "string"
  13147. },
  13148. "model": {
  13149. "type": "string"
  13150. },
  13151. "source": {
  13152. "type": "string",
  13153. "enum": ["command", "mcp", "skill"]
  13154. },
  13155. "template": {
  13156. "type": "string"
  13157. },
  13158. "subtask": {
  13159. "type": "boolean"
  13160. },
  13161. "hints": {
  13162. "type": "array",
  13163. "items": {
  13164. "type": "string"
  13165. }
  13166. }
  13167. },
  13168. "required": ["name", "template", "hints"],
  13169. "additionalProperties": false
  13170. },
  13171. "Agent": {
  13172. "type": "object",
  13173. "properties": {
  13174. "name": {
  13175. "type": "string"
  13176. },
  13177. "description": {
  13178. "type": "string"
  13179. },
  13180. "mode": {
  13181. "type": "string",
  13182. "enum": ["subagent", "primary", "all"]
  13183. },
  13184. "native": {
  13185. "type": "boolean"
  13186. },
  13187. "hidden": {
  13188. "type": "boolean"
  13189. },
  13190. "topP": {
  13191. "type": "number"
  13192. },
  13193. "temperature": {
  13194. "type": "number"
  13195. },
  13196. "color": {
  13197. "type": "string"
  13198. },
  13199. "permission": {
  13200. "$ref": "#/components/schemas/PermissionRuleset"
  13201. },
  13202. "model": {
  13203. "type": "object",
  13204. "properties": {
  13205. "modelID": {
  13206. "type": "string"
  13207. },
  13208. "providerID": {
  13209. "type": "string"
  13210. }
  13211. },
  13212. "required": ["modelID", "providerID"],
  13213. "additionalProperties": false
  13214. },
  13215. "variant": {
  13216. "type": "string"
  13217. },
  13218. "prompt": {
  13219. "type": "string"
  13220. },
  13221. "options": {
  13222. "type": "object"
  13223. },
  13224. "steps": {
  13225. "type": "number"
  13226. }
  13227. },
  13228. "required": ["name", "mode", "permission", "options"],
  13229. "additionalProperties": false
  13230. },
  13231. "LSPStatus": {
  13232. "type": "object",
  13233. "properties": {
  13234. "id": {
  13235. "type": "string"
  13236. },
  13237. "name": {
  13238. "type": "string"
  13239. },
  13240. "root": {
  13241. "type": "string"
  13242. },
  13243. "status": {
  13244. "type": "string",
  13245. "enum": ["connected", "error"]
  13246. }
  13247. },
  13248. "required": ["id", "name", "root", "status"],
  13249. "additionalProperties": false
  13250. },
  13251. "FormatterStatus": {
  13252. "type": "object",
  13253. "properties": {
  13254. "name": {
  13255. "type": "string"
  13256. },
  13257. "extensions": {
  13258. "type": "array",
  13259. "items": {
  13260. "type": "string"
  13261. }
  13262. },
  13263. "enabled": {
  13264. "type": "boolean"
  13265. }
  13266. },
  13267. "required": ["name", "extensions", "enabled"],
  13268. "additionalProperties": false
  13269. },
  13270. "MCPStatusConnected": {
  13271. "type": "object",
  13272. "properties": {
  13273. "status": {
  13274. "type": "string",
  13275. "enum": ["connected"]
  13276. }
  13277. },
  13278. "required": ["status"],
  13279. "additionalProperties": false
  13280. },
  13281. "MCPStatusDisabled": {
  13282. "type": "object",
  13283. "properties": {
  13284. "status": {
  13285. "type": "string",
  13286. "enum": ["disabled"]
  13287. }
  13288. },
  13289. "required": ["status"],
  13290. "additionalProperties": false
  13291. },
  13292. "MCPStatusFailed": {
  13293. "type": "object",
  13294. "properties": {
  13295. "status": {
  13296. "type": "string",
  13297. "enum": ["failed"]
  13298. },
  13299. "error": {
  13300. "type": "string"
  13301. }
  13302. },
  13303. "required": ["status", "error"],
  13304. "additionalProperties": false
  13305. },
  13306. "MCPStatusNeedsAuth": {
  13307. "type": "object",
  13308. "properties": {
  13309. "status": {
  13310. "type": "string",
  13311. "enum": ["needs_auth"]
  13312. }
  13313. },
  13314. "required": ["status"],
  13315. "additionalProperties": false
  13316. },
  13317. "MCPStatusNeedsClientRegistration": {
  13318. "type": "object",
  13319. "properties": {
  13320. "status": {
  13321. "type": "string",
  13322. "enum": ["needs_client_registration"]
  13323. },
  13324. "error": {
  13325. "type": "string"
  13326. }
  13327. },
  13328. "required": ["status", "error"],
  13329. "additionalProperties": false
  13330. },
  13331. "MCPStatus": {
  13332. "anyOf": [
  13333. {
  13334. "$ref": "#/components/schemas/MCPStatusConnected"
  13335. },
  13336. {
  13337. "$ref": "#/components/schemas/MCPStatusDisabled"
  13338. },
  13339. {
  13340. "$ref": "#/components/schemas/MCPStatusFailed"
  13341. },
  13342. {
  13343. "$ref": "#/components/schemas/MCPStatusNeedsAuth"
  13344. },
  13345. {
  13346. "$ref": "#/components/schemas/MCPStatusNeedsClientRegistration"
  13347. }
  13348. ]
  13349. },
  13350. "McpUnsupportedOAuthError": {
  13351. "type": "object",
  13352. "properties": {
  13353. "error": {
  13354. "type": "string"
  13355. }
  13356. },
  13357. "required": ["error"],
  13358. "additionalProperties": false
  13359. },
  13360. "NotFoundError": {
  13361. "type": "object",
  13362. "required": ["name", "data"],
  13363. "properties": {
  13364. "name": {
  13365. "type": "string",
  13366. "enum": ["NotFoundError"]
  13367. },
  13368. "data": {
  13369. "type": "object",
  13370. "required": ["message"],
  13371. "properties": {
  13372. "message": {
  13373. "type": "string"
  13374. }
  13375. }
  13376. }
  13377. }
  13378. },
  13379. "effect_HttpApiError_Forbidden": {
  13380. "type": "object",
  13381. "properties": {
  13382. "_tag": {
  13383. "type": "string",
  13384. "enum": ["Forbidden"]
  13385. }
  13386. },
  13387. "required": ["_tag"],
  13388. "additionalProperties": false
  13389. },
  13390. "ProviderAuthMethod": {
  13391. "type": "object",
  13392. "properties": {
  13393. "type": {
  13394. "type": "string",
  13395. "enum": ["oauth", "api"]
  13396. },
  13397. "label": {
  13398. "type": "string"
  13399. },
  13400. "prompts": {
  13401. "type": "array",
  13402. "items": {
  13403. "anyOf": [
  13404. {
  13405. "type": "object",
  13406. "properties": {
  13407. "type": {
  13408. "type": "string",
  13409. "enum": ["text"]
  13410. },
  13411. "key": {
  13412. "type": "string"
  13413. },
  13414. "message": {
  13415. "type": "string"
  13416. },
  13417. "placeholder": {
  13418. "type": "string"
  13419. },
  13420. "when": {
  13421. "type": "object",
  13422. "properties": {
  13423. "key": {
  13424. "type": "string"
  13425. },
  13426. "op": {
  13427. "type": "string",
  13428. "enum": ["eq", "neq"]
  13429. },
  13430. "value": {
  13431. "type": "string"
  13432. }
  13433. },
  13434. "required": ["key", "op", "value"],
  13435. "additionalProperties": false
  13436. }
  13437. },
  13438. "required": ["type", "key", "message"],
  13439. "additionalProperties": false
  13440. },
  13441. {
  13442. "type": "object",
  13443. "properties": {
  13444. "type": {
  13445. "type": "string",
  13446. "enum": ["select"]
  13447. },
  13448. "key": {
  13449. "type": "string"
  13450. },
  13451. "message": {
  13452. "type": "string"
  13453. },
  13454. "options": {
  13455. "type": "array",
  13456. "items": {
  13457. "type": "object",
  13458. "properties": {
  13459. "label": {
  13460. "type": "string"
  13461. },
  13462. "value": {
  13463. "type": "string"
  13464. },
  13465. "hint": {
  13466. "type": "string"
  13467. }
  13468. },
  13469. "required": ["label", "value"],
  13470. "additionalProperties": false
  13471. }
  13472. },
  13473. "when": {
  13474. "type": "object",
  13475. "properties": {
  13476. "key": {
  13477. "type": "string"
  13478. },
  13479. "op": {
  13480. "type": "string",
  13481. "enum": ["eq", "neq"]
  13482. },
  13483. "value": {
  13484. "type": "string"
  13485. }
  13486. },
  13487. "required": ["key", "op", "value"],
  13488. "additionalProperties": false
  13489. }
  13490. },
  13491. "required": ["type", "key", "message", "options"],
  13492. "additionalProperties": false
  13493. }
  13494. ]
  13495. }
  13496. }
  13497. },
  13498. "required": ["type", "label"],
  13499. "additionalProperties": false
  13500. },
  13501. "ProviderAuthAuthorization": {
  13502. "type": "object",
  13503. "properties": {
  13504. "url": {
  13505. "type": "string"
  13506. },
  13507. "method": {
  13508. "type": "string",
  13509. "enum": ["auto", "code"]
  13510. },
  13511. "instructions": {
  13512. "type": "string"
  13513. }
  13514. },
  13515. "required": ["url", "method", "instructions"],
  13516. "additionalProperties": false
  13517. },
  13518. "TextPartInput": {
  13519. "type": "object",
  13520. "properties": {
  13521. "id": {
  13522. "type": "string"
  13523. },
  13524. "type": {
  13525. "type": "string",
  13526. "enum": ["text"]
  13527. },
  13528. "text": {
  13529. "type": "string"
  13530. },
  13531. "synthetic": {
  13532. "type": "boolean"
  13533. },
  13534. "ignored": {
  13535. "type": "boolean"
  13536. },
  13537. "time": {
  13538. "type": "object",
  13539. "properties": {
  13540. "start": {
  13541. "type": "integer",
  13542. "minimum": 0
  13543. },
  13544. "end": {
  13545. "type": "integer",
  13546. "minimum": 0
  13547. }
  13548. },
  13549. "required": ["start"],
  13550. "additionalProperties": false
  13551. },
  13552. "metadata": {
  13553. "type": "object"
  13554. }
  13555. },
  13556. "required": ["type", "text"],
  13557. "additionalProperties": false
  13558. },
  13559. "FilePartInput": {
  13560. "type": "object",
  13561. "properties": {
  13562. "id": {
  13563. "type": "string"
  13564. },
  13565. "type": {
  13566. "type": "string",
  13567. "enum": ["file"]
  13568. },
  13569. "mime": {
  13570. "type": "string"
  13571. },
  13572. "filename": {
  13573. "type": "string"
  13574. },
  13575. "url": {
  13576. "type": "string"
  13577. },
  13578. "source": {
  13579. "$ref": "#/components/schemas/FilePartSource"
  13580. }
  13581. },
  13582. "required": ["type", "mime", "url"],
  13583. "additionalProperties": false
  13584. },
  13585. "AgentPartInput": {
  13586. "type": "object",
  13587. "properties": {
  13588. "id": {
  13589. "type": "string"
  13590. },
  13591. "type": {
  13592. "type": "string",
  13593. "enum": ["agent"]
  13594. },
  13595. "name": {
  13596. "type": "string"
  13597. },
  13598. "source": {
  13599. "type": "object",
  13600. "properties": {
  13601. "value": {
  13602. "type": "string"
  13603. },
  13604. "start": {
  13605. "type": "integer",
  13606. "minimum": 0
  13607. },
  13608. "end": {
  13609. "type": "integer",
  13610. "minimum": 0
  13611. }
  13612. },
  13613. "required": ["value", "start", "end"],
  13614. "additionalProperties": false
  13615. }
  13616. },
  13617. "required": ["type", "name"],
  13618. "additionalProperties": false
  13619. },
  13620. "SubtaskPartInput": {
  13621. "type": "object",
  13622. "properties": {
  13623. "id": {
  13624. "type": "string"
  13625. },
  13626. "type": {
  13627. "type": "string",
  13628. "enum": ["subtask"]
  13629. },
  13630. "prompt": {
  13631. "type": "string"
  13632. },
  13633. "description": {
  13634. "type": "string"
  13635. },
  13636. "agent": {
  13637. "type": "string"
  13638. },
  13639. "model": {
  13640. "type": "object",
  13641. "properties": {
  13642. "providerID": {
  13643. "type": "string"
  13644. },
  13645. "modelID": {
  13646. "type": "string"
  13647. }
  13648. },
  13649. "required": ["providerID", "modelID"],
  13650. "additionalProperties": false
  13651. },
  13652. "command": {
  13653. "type": "string"
  13654. }
  13655. },
  13656. "required": ["type", "prompt", "description", "agent"],
  13657. "additionalProperties": false
  13658. },
  13659. "V2SessionsResponse": {
  13660. "type": "object",
  13661. "properties": {
  13662. "items": {
  13663. "type": "array",
  13664. "items": {
  13665. "$ref": "#/components/schemas/SessionInfo"
  13666. }
  13667. },
  13668. "cursor": {
  13669. "type": "object",
  13670. "properties": {
  13671. "previous": {
  13672. "type": "string"
  13673. },
  13674. "next": {
  13675. "type": "string"
  13676. }
  13677. },
  13678. "additionalProperties": false
  13679. }
  13680. },
  13681. "required": ["items", "cursor"],
  13682. "additionalProperties": false
  13683. },
  13684. "V2SessionMessagesResponse": {
  13685. "type": "object",
  13686. "properties": {
  13687. "items": {
  13688. "type": "array",
  13689. "items": {
  13690. "$ref": "#/components/schemas/SessionMessage"
  13691. }
  13692. },
  13693. "cursor": {
  13694. "type": "object",
  13695. "properties": {
  13696. "previous": {
  13697. "type": "string"
  13698. },
  13699. "next": {
  13700. "type": "string"
  13701. }
  13702. },
  13703. "additionalProperties": false
  13704. }
  13705. },
  13706. "required": ["items", "cursor"],
  13707. "additionalProperties": false
  13708. },
  13709. "EventTuiPromptAppend": {
  13710. "type": "object",
  13711. "properties": {
  13712. "type": {
  13713. "type": "string",
  13714. "enum": ["tui.prompt.append"]
  13715. },
  13716. "properties": {
  13717. "type": "object",
  13718. "properties": {
  13719. "text": {
  13720. "type": "string"
  13721. }
  13722. },
  13723. "required": ["text"],
  13724. "additionalProperties": false
  13725. }
  13726. },
  13727. "required": ["type", "properties"],
  13728. "additionalProperties": false
  13729. },
  13730. "EventTuiCommandExecute": {
  13731. "type": "object",
  13732. "properties": {
  13733. "type": {
  13734. "type": "string",
  13735. "enum": ["tui.command.execute"]
  13736. },
  13737. "properties": {
  13738. "type": "object",
  13739. "properties": {
  13740. "command": {
  13741. "anyOf": [
  13742. {
  13743. "type": "string",
  13744. "enum": [
  13745. "session.list",
  13746. "session.new",
  13747. "session.share",
  13748. "session.interrupt",
  13749. "session.compact",
  13750. "session.page.up",
  13751. "session.page.down",
  13752. "session.line.up",
  13753. "session.line.down",
  13754. "session.half.page.up",
  13755. "session.half.page.down",
  13756. "session.first",
  13757. "session.last",
  13758. "prompt.clear",
  13759. "prompt.submit",
  13760. "agent.cycle"
  13761. ]
  13762. },
  13763. {
  13764. "type": "string"
  13765. }
  13766. ]
  13767. }
  13768. },
  13769. "required": ["command"],
  13770. "additionalProperties": false
  13771. }
  13772. },
  13773. "required": ["type", "properties"],
  13774. "additionalProperties": false
  13775. },
  13776. "EventTuiToastShow": {
  13777. "type": "object",
  13778. "properties": {
  13779. "type": {
  13780. "type": "string",
  13781. "enum": ["tui.toast.show"]
  13782. },
  13783. "properties": {
  13784. "type": "object",
  13785. "properties": {
  13786. "title": {
  13787. "type": "string"
  13788. },
  13789. "message": {
  13790. "type": "string"
  13791. },
  13792. "variant": {
  13793. "type": "string",
  13794. "enum": ["info", "success", "warning", "error"]
  13795. },
  13796. "duration": {
  13797. "type": "integer",
  13798. "exclusiveMinimum": 0
  13799. }
  13800. },
  13801. "required": ["message", "variant"],
  13802. "additionalProperties": false
  13803. }
  13804. },
  13805. "required": ["type", "properties"],
  13806. "additionalProperties": false
  13807. },
  13808. "EventTuiSessionSelect": {
  13809. "type": "object",
  13810. "properties": {
  13811. "type": {
  13812. "type": "string",
  13813. "enum": ["tui.session.select"]
  13814. },
  13815. "properties": {
  13816. "type": "object",
  13817. "properties": {
  13818. "sessionID": {
  13819. "type": "string",
  13820. "description": "Session ID to navigate to"
  13821. }
  13822. },
  13823. "required": ["sessionID"],
  13824. "additionalProperties": false
  13825. }
  13826. },
  13827. "required": ["type", "properties"],
  13828. "additionalProperties": false
  13829. },
  13830. "Workspace": {
  13831. "type": "object",
  13832. "properties": {
  13833. "id": {
  13834. "type": "string"
  13835. },
  13836. "type": {
  13837. "type": "string"
  13838. },
  13839. "name": {
  13840. "type": "string"
  13841. },
  13842. "branch": {
  13843. "anyOf": [
  13844. {
  13845. "type": "string"
  13846. },
  13847. {
  13848. "type": "null"
  13849. }
  13850. ]
  13851. },
  13852. "directory": {
  13853. "anyOf": [
  13854. {
  13855. "type": "string"
  13856. },
  13857. {
  13858. "type": "null"
  13859. }
  13860. ]
  13861. },
  13862. "extra": {
  13863. "anyOf": [
  13864. {},
  13865. {
  13866. "type": "null"
  13867. }
  13868. ]
  13869. },
  13870. "projectID": {
  13871. "type": "string"
  13872. },
  13873. "timeUsed": {
  13874. "anyOf": [
  13875. {
  13876. "type": "number"
  13877. },
  13878. {
  13879. "type": "string",
  13880. "enum": ["NaN"]
  13881. },
  13882. {
  13883. "type": "string",
  13884. "enum": ["Infinity"]
  13885. },
  13886. {
  13887. "type": "string",
  13888. "enum": ["-Infinity"]
  13889. },
  13890. {
  13891. "type": "string",
  13892. "enum": ["Infinity", "-Infinity", "NaN"]
  13893. }
  13894. ]
  13895. }
  13896. },
  13897. "required": ["id", "type", "name", "branch", "directory", "extra", "projectID", "timeUsed"],
  13898. "additionalProperties": false
  13899. },
  13900. "WorkspaceWarpError": {
  13901. "type": "object",
  13902. "properties": {
  13903. "name": {
  13904. "type": "string",
  13905. "enum": ["WorkspaceWarpError"]
  13906. },
  13907. "data": {
  13908. "type": "object",
  13909. "properties": {
  13910. "message": {
  13911. "type": "string"
  13912. }
  13913. },
  13914. "required": ["message"],
  13915. "additionalProperties": false
  13916. }
  13917. },
  13918. "required": ["name", "data"],
  13919. "additionalProperties": false
  13920. },
  13921. "SyncEventMessageUpdated": {
  13922. "type": "object",
  13923. "properties": {
  13924. "type": {
  13925. "type": "string",
  13926. "enum": ["sync"]
  13927. },
  13928. "name": {
  13929. "type": "string",
  13930. "enum": ["message.updated.1"]
  13931. },
  13932. "id": {
  13933. "type": "string"
  13934. },
  13935. "seq": {
  13936. "type": "number"
  13937. },
  13938. "aggregateID": {
  13939. "type": "string",
  13940. "enum": ["sessionID"]
  13941. },
  13942. "data": {
  13943. "type": "object",
  13944. "properties": {
  13945. "sessionID": {
  13946. "type": "string"
  13947. },
  13948. "info": {
  13949. "$ref": "#/components/schemas/Message"
  13950. }
  13951. },
  13952. "required": ["sessionID", "info"],
  13953. "additionalProperties": false
  13954. }
  13955. },
  13956. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  13957. "additionalProperties": false
  13958. },
  13959. "SyncEventMessageRemoved": {
  13960. "type": "object",
  13961. "properties": {
  13962. "type": {
  13963. "type": "string",
  13964. "enum": ["sync"]
  13965. },
  13966. "name": {
  13967. "type": "string",
  13968. "enum": ["message.removed.1"]
  13969. },
  13970. "id": {
  13971. "type": "string"
  13972. },
  13973. "seq": {
  13974. "type": "number"
  13975. },
  13976. "aggregateID": {
  13977. "type": "string",
  13978. "enum": ["sessionID"]
  13979. },
  13980. "data": {
  13981. "type": "object",
  13982. "properties": {
  13983. "sessionID": {
  13984. "type": "string"
  13985. },
  13986. "messageID": {
  13987. "type": "string"
  13988. }
  13989. },
  13990. "required": ["sessionID", "messageID"],
  13991. "additionalProperties": false
  13992. }
  13993. },
  13994. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  13995. "additionalProperties": false
  13996. },
  13997. "SyncEventMessagePartUpdated": {
  13998. "type": "object",
  13999. "properties": {
  14000. "type": {
  14001. "type": "string",
  14002. "enum": ["sync"]
  14003. },
  14004. "name": {
  14005. "type": "string",
  14006. "enum": ["message.part.updated.1"]
  14007. },
  14008. "id": {
  14009. "type": "string"
  14010. },
  14011. "seq": {
  14012. "type": "number"
  14013. },
  14014. "aggregateID": {
  14015. "type": "string",
  14016. "enum": ["sessionID"]
  14017. },
  14018. "data": {
  14019. "type": "object",
  14020. "properties": {
  14021. "sessionID": {
  14022. "type": "string"
  14023. },
  14024. "part": {
  14025. "$ref": "#/components/schemas/Part"
  14026. },
  14027. "time": {
  14028. "type": "integer",
  14029. "minimum": 0
  14030. }
  14031. },
  14032. "required": ["sessionID", "part", "time"],
  14033. "additionalProperties": false
  14034. }
  14035. },
  14036. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14037. "additionalProperties": false
  14038. },
  14039. "SyncEventMessagePartRemoved": {
  14040. "type": "object",
  14041. "properties": {
  14042. "type": {
  14043. "type": "string",
  14044. "enum": ["sync"]
  14045. },
  14046. "name": {
  14047. "type": "string",
  14048. "enum": ["message.part.removed.1"]
  14049. },
  14050. "id": {
  14051. "type": "string"
  14052. },
  14053. "seq": {
  14054. "type": "number"
  14055. },
  14056. "aggregateID": {
  14057. "type": "string",
  14058. "enum": ["sessionID"]
  14059. },
  14060. "data": {
  14061. "type": "object",
  14062. "properties": {
  14063. "sessionID": {
  14064. "type": "string"
  14065. },
  14066. "messageID": {
  14067. "type": "string"
  14068. },
  14069. "partID": {
  14070. "type": "string"
  14071. }
  14072. },
  14073. "required": ["sessionID", "messageID", "partID"],
  14074. "additionalProperties": false
  14075. }
  14076. },
  14077. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14078. "additionalProperties": false
  14079. },
  14080. "SyncEventSessionCreated": {
  14081. "type": "object",
  14082. "properties": {
  14083. "type": {
  14084. "type": "string",
  14085. "enum": ["sync"]
  14086. },
  14087. "name": {
  14088. "type": "string",
  14089. "enum": ["session.created.1"]
  14090. },
  14091. "id": {
  14092. "type": "string"
  14093. },
  14094. "seq": {
  14095. "type": "number"
  14096. },
  14097. "aggregateID": {
  14098. "type": "string",
  14099. "enum": ["sessionID"]
  14100. },
  14101. "data": {
  14102. "type": "object",
  14103. "properties": {
  14104. "sessionID": {
  14105. "type": "string"
  14106. },
  14107. "info": {
  14108. "$ref": "#/components/schemas/Session"
  14109. }
  14110. },
  14111. "required": ["sessionID", "info"],
  14112. "additionalProperties": false
  14113. }
  14114. },
  14115. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14116. "additionalProperties": false
  14117. },
  14118. "SyncEventSessionUpdated": {
  14119. "type": "object",
  14120. "properties": {
  14121. "type": {
  14122. "type": "string",
  14123. "enum": ["sync"]
  14124. },
  14125. "name": {
  14126. "type": "string",
  14127. "enum": ["session.updated.1"]
  14128. },
  14129. "id": {
  14130. "type": "string"
  14131. },
  14132. "seq": {
  14133. "type": "number"
  14134. },
  14135. "aggregateID": {
  14136. "type": "string",
  14137. "enum": ["sessionID"]
  14138. },
  14139. "data": {
  14140. "type": "object",
  14141. "properties": {
  14142. "sessionID": {
  14143. "type": "string"
  14144. },
  14145. "info": {
  14146. "type": "object",
  14147. "properties": {
  14148. "id": {
  14149. "anyOf": [
  14150. {
  14151. "type": "string"
  14152. },
  14153. {
  14154. "type": "null"
  14155. }
  14156. ]
  14157. },
  14158. "slug": {
  14159. "anyOf": [
  14160. {
  14161. "type": "string"
  14162. },
  14163. {
  14164. "type": "null"
  14165. }
  14166. ]
  14167. },
  14168. "projectID": {
  14169. "anyOf": [
  14170. {
  14171. "type": "string"
  14172. },
  14173. {
  14174. "type": "null"
  14175. }
  14176. ]
  14177. },
  14178. "workspaceID": {
  14179. "anyOf": [
  14180. {
  14181. "type": "string"
  14182. },
  14183. {
  14184. "type": "null"
  14185. }
  14186. ]
  14187. },
  14188. "directory": {
  14189. "anyOf": [
  14190. {
  14191. "type": "string"
  14192. },
  14193. {
  14194. "type": "null"
  14195. }
  14196. ]
  14197. },
  14198. "path": {
  14199. "anyOf": [
  14200. {
  14201. "type": "string"
  14202. },
  14203. {
  14204. "type": "null"
  14205. }
  14206. ]
  14207. },
  14208. "parentID": {
  14209. "anyOf": [
  14210. {
  14211. "type": "string"
  14212. },
  14213. {
  14214. "type": "null"
  14215. }
  14216. ]
  14217. },
  14218. "summary": {
  14219. "anyOf": [
  14220. {
  14221. "type": "object",
  14222. "properties": {
  14223. "additions": {
  14224. "type": "number"
  14225. },
  14226. "deletions": {
  14227. "type": "number"
  14228. },
  14229. "files": {
  14230. "type": "number"
  14231. },
  14232. "diffs": {
  14233. "type": "array",
  14234. "items": {
  14235. "$ref": "#/components/schemas/SnapshotFileDiff"
  14236. }
  14237. }
  14238. },
  14239. "required": ["additions", "deletions", "files"],
  14240. "additionalProperties": false
  14241. },
  14242. {
  14243. "type": "null"
  14244. }
  14245. ]
  14246. },
  14247. "share": {
  14248. "type": "object",
  14249. "properties": {
  14250. "url": {
  14251. "anyOf": [
  14252. {
  14253. "type": "string"
  14254. },
  14255. {
  14256. "type": "null"
  14257. }
  14258. ]
  14259. }
  14260. },
  14261. "additionalProperties": false
  14262. },
  14263. "title": {
  14264. "anyOf": [
  14265. {
  14266. "type": "string"
  14267. },
  14268. {
  14269. "type": "null"
  14270. }
  14271. ]
  14272. },
  14273. "agent": {
  14274. "anyOf": [
  14275. {
  14276. "type": "string"
  14277. },
  14278. {
  14279. "type": "null"
  14280. }
  14281. ]
  14282. },
  14283. "model": {
  14284. "anyOf": [
  14285. {
  14286. "type": "object",
  14287. "properties": {
  14288. "id": {
  14289. "type": "string"
  14290. },
  14291. "providerID": {
  14292. "type": "string"
  14293. },
  14294. "variant": {
  14295. "type": "string"
  14296. }
  14297. },
  14298. "required": ["id", "providerID"],
  14299. "additionalProperties": false
  14300. },
  14301. {
  14302. "type": "null"
  14303. }
  14304. ]
  14305. },
  14306. "version": {
  14307. "anyOf": [
  14308. {
  14309. "type": "string"
  14310. },
  14311. {
  14312. "type": "null"
  14313. }
  14314. ]
  14315. },
  14316. "time": {
  14317. "type": "object",
  14318. "properties": {
  14319. "created": {
  14320. "anyOf": [
  14321. {
  14322. "type": "integer",
  14323. "minimum": 0
  14324. },
  14325. {
  14326. "type": "null"
  14327. }
  14328. ]
  14329. },
  14330. "updated": {
  14331. "anyOf": [
  14332. {
  14333. "type": "integer",
  14334. "minimum": 0
  14335. },
  14336. {
  14337. "type": "null"
  14338. }
  14339. ]
  14340. },
  14341. "compacting": {
  14342. "anyOf": [
  14343. {
  14344. "type": "integer",
  14345. "minimum": 0
  14346. },
  14347. {
  14348. "type": "null"
  14349. }
  14350. ]
  14351. },
  14352. "archived": {
  14353. "anyOf": [
  14354. {
  14355. "type": "number"
  14356. },
  14357. {
  14358. "type": "null"
  14359. }
  14360. ]
  14361. }
  14362. },
  14363. "additionalProperties": false
  14364. },
  14365. "permission": {
  14366. "anyOf": [
  14367. {
  14368. "$ref": "#/components/schemas/PermissionRuleset"
  14369. },
  14370. {
  14371. "type": "null"
  14372. }
  14373. ]
  14374. },
  14375. "revert": {
  14376. "anyOf": [
  14377. {
  14378. "type": "object",
  14379. "properties": {
  14380. "messageID": {
  14381. "type": "string"
  14382. },
  14383. "partID": {
  14384. "type": "string"
  14385. },
  14386. "snapshot": {
  14387. "type": "string"
  14388. },
  14389. "diff": {
  14390. "type": "string"
  14391. }
  14392. },
  14393. "required": ["messageID"],
  14394. "additionalProperties": false
  14395. },
  14396. {
  14397. "type": "null"
  14398. }
  14399. ]
  14400. }
  14401. },
  14402. "additionalProperties": false
  14403. }
  14404. },
  14405. "required": ["sessionID", "info"],
  14406. "additionalProperties": false
  14407. }
  14408. },
  14409. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14410. "additionalProperties": false
  14411. },
  14412. "SyncEventSessionDeleted": {
  14413. "type": "object",
  14414. "properties": {
  14415. "type": {
  14416. "type": "string",
  14417. "enum": ["sync"]
  14418. },
  14419. "name": {
  14420. "type": "string",
  14421. "enum": ["session.deleted.1"]
  14422. },
  14423. "id": {
  14424. "type": "string"
  14425. },
  14426. "seq": {
  14427. "type": "number"
  14428. },
  14429. "aggregateID": {
  14430. "type": "string",
  14431. "enum": ["sessionID"]
  14432. },
  14433. "data": {
  14434. "type": "object",
  14435. "properties": {
  14436. "sessionID": {
  14437. "type": "string"
  14438. },
  14439. "info": {
  14440. "$ref": "#/components/schemas/Session"
  14441. }
  14442. },
  14443. "required": ["sessionID", "info"],
  14444. "additionalProperties": false
  14445. }
  14446. },
  14447. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14448. "additionalProperties": false
  14449. },
  14450. "SyncEventSessionNextAgentSwitched": {
  14451. "type": "object",
  14452. "properties": {
  14453. "type": {
  14454. "type": "string",
  14455. "enum": ["sync"]
  14456. },
  14457. "name": {
  14458. "type": "string",
  14459. "enum": ["session.next.agent.switched.1"]
  14460. },
  14461. "id": {
  14462. "type": "string"
  14463. },
  14464. "seq": {
  14465. "type": "number"
  14466. },
  14467. "aggregateID": {
  14468. "type": "string",
  14469. "enum": ["sessionID"]
  14470. },
  14471. "data": {
  14472. "type": "object",
  14473. "properties": {
  14474. "timestamp": {
  14475. "type": "number"
  14476. },
  14477. "sessionID": {
  14478. "type": "string"
  14479. },
  14480. "agent": {
  14481. "type": "string"
  14482. }
  14483. },
  14484. "required": ["timestamp", "sessionID", "agent"],
  14485. "additionalProperties": false
  14486. }
  14487. },
  14488. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14489. "additionalProperties": false
  14490. },
  14491. "SyncEventSessionNextModelSwitched": {
  14492. "type": "object",
  14493. "properties": {
  14494. "type": {
  14495. "type": "string",
  14496. "enum": ["sync"]
  14497. },
  14498. "name": {
  14499. "type": "string",
  14500. "enum": ["session.next.model.switched.1"]
  14501. },
  14502. "id": {
  14503. "type": "string"
  14504. },
  14505. "seq": {
  14506. "type": "number"
  14507. },
  14508. "aggregateID": {
  14509. "type": "string",
  14510. "enum": ["sessionID"]
  14511. },
  14512. "data": {
  14513. "type": "object",
  14514. "properties": {
  14515. "timestamp": {
  14516. "type": "number"
  14517. },
  14518. "sessionID": {
  14519. "type": "string"
  14520. },
  14521. "model": {
  14522. "type": "object",
  14523. "properties": {
  14524. "id": {
  14525. "type": "string"
  14526. },
  14527. "providerID": {
  14528. "type": "string"
  14529. },
  14530. "variant": {
  14531. "type": "string"
  14532. }
  14533. },
  14534. "required": ["id", "providerID", "variant"],
  14535. "additionalProperties": false
  14536. }
  14537. },
  14538. "required": ["timestamp", "sessionID", "model"],
  14539. "additionalProperties": false
  14540. }
  14541. },
  14542. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14543. "additionalProperties": false
  14544. },
  14545. "SyncEventSessionNextPrompted": {
  14546. "type": "object",
  14547. "properties": {
  14548. "type": {
  14549. "type": "string",
  14550. "enum": ["sync"]
  14551. },
  14552. "name": {
  14553. "type": "string",
  14554. "enum": ["session.next.prompted.1"]
  14555. },
  14556. "id": {
  14557. "type": "string"
  14558. },
  14559. "seq": {
  14560. "type": "number"
  14561. },
  14562. "aggregateID": {
  14563. "type": "string",
  14564. "enum": ["sessionID"]
  14565. },
  14566. "data": {
  14567. "type": "object",
  14568. "properties": {
  14569. "timestamp": {
  14570. "type": "number"
  14571. },
  14572. "sessionID": {
  14573. "type": "string"
  14574. },
  14575. "prompt": {
  14576. "$ref": "#/components/schemas/Prompt"
  14577. }
  14578. },
  14579. "required": ["timestamp", "sessionID", "prompt"],
  14580. "additionalProperties": false
  14581. }
  14582. },
  14583. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14584. "additionalProperties": false
  14585. },
  14586. "SyncEventSessionNextSynthetic": {
  14587. "type": "object",
  14588. "properties": {
  14589. "type": {
  14590. "type": "string",
  14591. "enum": ["sync"]
  14592. },
  14593. "name": {
  14594. "type": "string",
  14595. "enum": ["session.next.synthetic.1"]
  14596. },
  14597. "id": {
  14598. "type": "string"
  14599. },
  14600. "seq": {
  14601. "type": "number"
  14602. },
  14603. "aggregateID": {
  14604. "type": "string",
  14605. "enum": ["sessionID"]
  14606. },
  14607. "data": {
  14608. "type": "object",
  14609. "properties": {
  14610. "timestamp": {
  14611. "type": "number"
  14612. },
  14613. "sessionID": {
  14614. "type": "string"
  14615. },
  14616. "text": {
  14617. "type": "string"
  14618. }
  14619. },
  14620. "required": ["timestamp", "sessionID", "text"],
  14621. "additionalProperties": false
  14622. }
  14623. },
  14624. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14625. "additionalProperties": false
  14626. },
  14627. "SyncEventSessionNextShellStarted": {
  14628. "type": "object",
  14629. "properties": {
  14630. "type": {
  14631. "type": "string",
  14632. "enum": ["sync"]
  14633. },
  14634. "name": {
  14635. "type": "string",
  14636. "enum": ["session.next.shell.started.1"]
  14637. },
  14638. "id": {
  14639. "type": "string"
  14640. },
  14641. "seq": {
  14642. "type": "number"
  14643. },
  14644. "aggregateID": {
  14645. "type": "string",
  14646. "enum": ["sessionID"]
  14647. },
  14648. "data": {
  14649. "type": "object",
  14650. "properties": {
  14651. "timestamp": {
  14652. "type": "number"
  14653. },
  14654. "sessionID": {
  14655. "type": "string"
  14656. },
  14657. "callID": {
  14658. "type": "string"
  14659. },
  14660. "command": {
  14661. "type": "string"
  14662. }
  14663. },
  14664. "required": ["timestamp", "sessionID", "callID", "command"],
  14665. "additionalProperties": false
  14666. }
  14667. },
  14668. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14669. "additionalProperties": false
  14670. },
  14671. "SyncEventSessionNextShellEnded": {
  14672. "type": "object",
  14673. "properties": {
  14674. "type": {
  14675. "type": "string",
  14676. "enum": ["sync"]
  14677. },
  14678. "name": {
  14679. "type": "string",
  14680. "enum": ["session.next.shell.ended.1"]
  14681. },
  14682. "id": {
  14683. "type": "string"
  14684. },
  14685. "seq": {
  14686. "type": "number"
  14687. },
  14688. "aggregateID": {
  14689. "type": "string",
  14690. "enum": ["sessionID"]
  14691. },
  14692. "data": {
  14693. "type": "object",
  14694. "properties": {
  14695. "timestamp": {
  14696. "type": "number"
  14697. },
  14698. "sessionID": {
  14699. "type": "string"
  14700. },
  14701. "callID": {
  14702. "type": "string"
  14703. },
  14704. "output": {
  14705. "type": "string"
  14706. }
  14707. },
  14708. "required": ["timestamp", "sessionID", "callID", "output"],
  14709. "additionalProperties": false
  14710. }
  14711. },
  14712. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14713. "additionalProperties": false
  14714. },
  14715. "SyncEventSessionNextStepStarted": {
  14716. "type": "object",
  14717. "properties": {
  14718. "type": {
  14719. "type": "string",
  14720. "enum": ["sync"]
  14721. },
  14722. "name": {
  14723. "type": "string",
  14724. "enum": ["session.next.step.started.1"]
  14725. },
  14726. "id": {
  14727. "type": "string"
  14728. },
  14729. "seq": {
  14730. "type": "number"
  14731. },
  14732. "aggregateID": {
  14733. "type": "string",
  14734. "enum": ["sessionID"]
  14735. },
  14736. "data": {
  14737. "type": "object",
  14738. "properties": {
  14739. "timestamp": {
  14740. "type": "number"
  14741. },
  14742. "sessionID": {
  14743. "type": "string"
  14744. },
  14745. "agent": {
  14746. "type": "string"
  14747. },
  14748. "model": {
  14749. "type": "object",
  14750. "properties": {
  14751. "id": {
  14752. "type": "string"
  14753. },
  14754. "providerID": {
  14755. "type": "string"
  14756. },
  14757. "variant": {
  14758. "type": "string"
  14759. }
  14760. },
  14761. "required": ["id", "providerID", "variant"],
  14762. "additionalProperties": false
  14763. },
  14764. "snapshot": {
  14765. "type": "string"
  14766. }
  14767. },
  14768. "required": ["timestamp", "sessionID", "agent", "model"],
  14769. "additionalProperties": false
  14770. }
  14771. },
  14772. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14773. "additionalProperties": false
  14774. },
  14775. "SyncEventSessionNextStepEnded": {
  14776. "type": "object",
  14777. "properties": {
  14778. "type": {
  14779. "type": "string",
  14780. "enum": ["sync"]
  14781. },
  14782. "name": {
  14783. "type": "string",
  14784. "enum": ["session.next.step.ended.1"]
  14785. },
  14786. "id": {
  14787. "type": "string"
  14788. },
  14789. "seq": {
  14790. "type": "number"
  14791. },
  14792. "aggregateID": {
  14793. "type": "string",
  14794. "enum": ["sessionID"]
  14795. },
  14796. "data": {
  14797. "type": "object",
  14798. "properties": {
  14799. "timestamp": {
  14800. "type": "number"
  14801. },
  14802. "sessionID": {
  14803. "type": "string"
  14804. },
  14805. "finish": {
  14806. "type": "string"
  14807. },
  14808. "cost": {
  14809. "type": "number"
  14810. },
  14811. "tokens": {
  14812. "type": "object",
  14813. "properties": {
  14814. "input": {
  14815. "type": "number"
  14816. },
  14817. "output": {
  14818. "type": "number"
  14819. },
  14820. "reasoning": {
  14821. "type": "number"
  14822. },
  14823. "cache": {
  14824. "type": "object",
  14825. "properties": {
  14826. "read": {
  14827. "type": "number"
  14828. },
  14829. "write": {
  14830. "type": "number"
  14831. }
  14832. },
  14833. "required": ["read", "write"],
  14834. "additionalProperties": false
  14835. }
  14836. },
  14837. "required": ["input", "output", "reasoning", "cache"],
  14838. "additionalProperties": false
  14839. },
  14840. "snapshot": {
  14841. "type": "string"
  14842. }
  14843. },
  14844. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  14845. "additionalProperties": false
  14846. }
  14847. },
  14848. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14849. "additionalProperties": false
  14850. },
  14851. "SyncEventSessionNextStepFailed": {
  14852. "type": "object",
  14853. "properties": {
  14854. "type": {
  14855. "type": "string",
  14856. "enum": ["sync"]
  14857. },
  14858. "name": {
  14859. "type": "string",
  14860. "enum": ["session.next.step.failed.1"]
  14861. },
  14862. "id": {
  14863. "type": "string"
  14864. },
  14865. "seq": {
  14866. "type": "number"
  14867. },
  14868. "aggregateID": {
  14869. "type": "string",
  14870. "enum": ["sessionID"]
  14871. },
  14872. "data": {
  14873. "type": "object",
  14874. "properties": {
  14875. "timestamp": {
  14876. "type": "number"
  14877. },
  14878. "sessionID": {
  14879. "type": "string"
  14880. },
  14881. "error": {
  14882. "$ref": "#/components/schemas/SessionErrorUnknown"
  14883. }
  14884. },
  14885. "required": ["timestamp", "sessionID", "error"],
  14886. "additionalProperties": false
  14887. }
  14888. },
  14889. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14890. "additionalProperties": false
  14891. },
  14892. "SyncEventSessionNextTextStarted": {
  14893. "type": "object",
  14894. "properties": {
  14895. "type": {
  14896. "type": "string",
  14897. "enum": ["sync"]
  14898. },
  14899. "name": {
  14900. "type": "string",
  14901. "enum": ["session.next.text.started.1"]
  14902. },
  14903. "id": {
  14904. "type": "string"
  14905. },
  14906. "seq": {
  14907. "type": "number"
  14908. },
  14909. "aggregateID": {
  14910. "type": "string",
  14911. "enum": ["sessionID"]
  14912. },
  14913. "data": {
  14914. "type": "object",
  14915. "properties": {
  14916. "timestamp": {
  14917. "type": "number"
  14918. },
  14919. "sessionID": {
  14920. "type": "string"
  14921. }
  14922. },
  14923. "required": ["timestamp", "sessionID"],
  14924. "additionalProperties": false
  14925. }
  14926. },
  14927. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14928. "additionalProperties": false
  14929. },
  14930. "SyncEventSessionNextTextDelta": {
  14931. "type": "object",
  14932. "properties": {
  14933. "type": {
  14934. "type": "string",
  14935. "enum": ["sync"]
  14936. },
  14937. "name": {
  14938. "type": "string",
  14939. "enum": ["session.next.text.delta.1"]
  14940. },
  14941. "id": {
  14942. "type": "string"
  14943. },
  14944. "seq": {
  14945. "type": "number"
  14946. },
  14947. "aggregateID": {
  14948. "type": "string",
  14949. "enum": ["sessionID"]
  14950. },
  14951. "data": {
  14952. "type": "object",
  14953. "properties": {
  14954. "timestamp": {
  14955. "type": "number"
  14956. },
  14957. "sessionID": {
  14958. "type": "string"
  14959. },
  14960. "delta": {
  14961. "type": "string"
  14962. }
  14963. },
  14964. "required": ["timestamp", "sessionID", "delta"],
  14965. "additionalProperties": false
  14966. }
  14967. },
  14968. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  14969. "additionalProperties": false
  14970. },
  14971. "SyncEventSessionNextTextEnded": {
  14972. "type": "object",
  14973. "properties": {
  14974. "type": {
  14975. "type": "string",
  14976. "enum": ["sync"]
  14977. },
  14978. "name": {
  14979. "type": "string",
  14980. "enum": ["session.next.text.ended.1"]
  14981. },
  14982. "id": {
  14983. "type": "string"
  14984. },
  14985. "seq": {
  14986. "type": "number"
  14987. },
  14988. "aggregateID": {
  14989. "type": "string",
  14990. "enum": ["sessionID"]
  14991. },
  14992. "data": {
  14993. "type": "object",
  14994. "properties": {
  14995. "timestamp": {
  14996. "type": "number"
  14997. },
  14998. "sessionID": {
  14999. "type": "string"
  15000. },
  15001. "text": {
  15002. "type": "string"
  15003. }
  15004. },
  15005. "required": ["timestamp", "sessionID", "text"],
  15006. "additionalProperties": false
  15007. }
  15008. },
  15009. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15010. "additionalProperties": false
  15011. },
  15012. "SyncEventSessionNextReasoningStarted": {
  15013. "type": "object",
  15014. "properties": {
  15015. "type": {
  15016. "type": "string",
  15017. "enum": ["sync"]
  15018. },
  15019. "name": {
  15020. "type": "string",
  15021. "enum": ["session.next.reasoning.started.1"]
  15022. },
  15023. "id": {
  15024. "type": "string"
  15025. },
  15026. "seq": {
  15027. "type": "number"
  15028. },
  15029. "aggregateID": {
  15030. "type": "string",
  15031. "enum": ["sessionID"]
  15032. },
  15033. "data": {
  15034. "type": "object",
  15035. "properties": {
  15036. "timestamp": {
  15037. "type": "number"
  15038. },
  15039. "sessionID": {
  15040. "type": "string"
  15041. },
  15042. "reasoningID": {
  15043. "type": "string"
  15044. }
  15045. },
  15046. "required": ["timestamp", "sessionID", "reasoningID"],
  15047. "additionalProperties": false
  15048. }
  15049. },
  15050. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15051. "additionalProperties": false
  15052. },
  15053. "SyncEventSessionNextReasoningDelta": {
  15054. "type": "object",
  15055. "properties": {
  15056. "type": {
  15057. "type": "string",
  15058. "enum": ["sync"]
  15059. },
  15060. "name": {
  15061. "type": "string",
  15062. "enum": ["session.next.reasoning.delta.1"]
  15063. },
  15064. "id": {
  15065. "type": "string"
  15066. },
  15067. "seq": {
  15068. "type": "number"
  15069. },
  15070. "aggregateID": {
  15071. "type": "string",
  15072. "enum": ["sessionID"]
  15073. },
  15074. "data": {
  15075. "type": "object",
  15076. "properties": {
  15077. "timestamp": {
  15078. "type": "number"
  15079. },
  15080. "sessionID": {
  15081. "type": "string"
  15082. },
  15083. "reasoningID": {
  15084. "type": "string"
  15085. },
  15086. "delta": {
  15087. "type": "string"
  15088. }
  15089. },
  15090. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  15091. "additionalProperties": false
  15092. }
  15093. },
  15094. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15095. "additionalProperties": false
  15096. },
  15097. "SyncEventSessionNextReasoningEnded": {
  15098. "type": "object",
  15099. "properties": {
  15100. "type": {
  15101. "type": "string",
  15102. "enum": ["sync"]
  15103. },
  15104. "name": {
  15105. "type": "string",
  15106. "enum": ["session.next.reasoning.ended.1"]
  15107. },
  15108. "id": {
  15109. "type": "string"
  15110. },
  15111. "seq": {
  15112. "type": "number"
  15113. },
  15114. "aggregateID": {
  15115. "type": "string",
  15116. "enum": ["sessionID"]
  15117. },
  15118. "data": {
  15119. "type": "object",
  15120. "properties": {
  15121. "timestamp": {
  15122. "type": "number"
  15123. },
  15124. "sessionID": {
  15125. "type": "string"
  15126. },
  15127. "reasoningID": {
  15128. "type": "string"
  15129. },
  15130. "text": {
  15131. "type": "string"
  15132. }
  15133. },
  15134. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  15135. "additionalProperties": false
  15136. }
  15137. },
  15138. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15139. "additionalProperties": false
  15140. },
  15141. "SyncEventSessionNextToolInputStarted": {
  15142. "type": "object",
  15143. "properties": {
  15144. "type": {
  15145. "type": "string",
  15146. "enum": ["sync"]
  15147. },
  15148. "name": {
  15149. "type": "string",
  15150. "enum": ["session.next.tool.input.started.1"]
  15151. },
  15152. "id": {
  15153. "type": "string"
  15154. },
  15155. "seq": {
  15156. "type": "number"
  15157. },
  15158. "aggregateID": {
  15159. "type": "string",
  15160. "enum": ["sessionID"]
  15161. },
  15162. "data": {
  15163. "type": "object",
  15164. "properties": {
  15165. "timestamp": {
  15166. "type": "number"
  15167. },
  15168. "sessionID": {
  15169. "type": "string"
  15170. },
  15171. "callID": {
  15172. "type": "string"
  15173. },
  15174. "name": {
  15175. "type": "string"
  15176. }
  15177. },
  15178. "required": ["timestamp", "sessionID", "callID", "name"],
  15179. "additionalProperties": false
  15180. }
  15181. },
  15182. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15183. "additionalProperties": false
  15184. },
  15185. "SyncEventSessionNextToolInputDelta": {
  15186. "type": "object",
  15187. "properties": {
  15188. "type": {
  15189. "type": "string",
  15190. "enum": ["sync"]
  15191. },
  15192. "name": {
  15193. "type": "string",
  15194. "enum": ["session.next.tool.input.delta.1"]
  15195. },
  15196. "id": {
  15197. "type": "string"
  15198. },
  15199. "seq": {
  15200. "type": "number"
  15201. },
  15202. "aggregateID": {
  15203. "type": "string",
  15204. "enum": ["sessionID"]
  15205. },
  15206. "data": {
  15207. "type": "object",
  15208. "properties": {
  15209. "timestamp": {
  15210. "type": "number"
  15211. },
  15212. "sessionID": {
  15213. "type": "string"
  15214. },
  15215. "callID": {
  15216. "type": "string"
  15217. },
  15218. "delta": {
  15219. "type": "string"
  15220. }
  15221. },
  15222. "required": ["timestamp", "sessionID", "callID", "delta"],
  15223. "additionalProperties": false
  15224. }
  15225. },
  15226. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15227. "additionalProperties": false
  15228. },
  15229. "SyncEventSessionNextToolInputEnded": {
  15230. "type": "object",
  15231. "properties": {
  15232. "type": {
  15233. "type": "string",
  15234. "enum": ["sync"]
  15235. },
  15236. "name": {
  15237. "type": "string",
  15238. "enum": ["session.next.tool.input.ended.1"]
  15239. },
  15240. "id": {
  15241. "type": "string"
  15242. },
  15243. "seq": {
  15244. "type": "number"
  15245. },
  15246. "aggregateID": {
  15247. "type": "string",
  15248. "enum": ["sessionID"]
  15249. },
  15250. "data": {
  15251. "type": "object",
  15252. "properties": {
  15253. "timestamp": {
  15254. "type": "number"
  15255. },
  15256. "sessionID": {
  15257. "type": "string"
  15258. },
  15259. "callID": {
  15260. "type": "string"
  15261. },
  15262. "text": {
  15263. "type": "string"
  15264. }
  15265. },
  15266. "required": ["timestamp", "sessionID", "callID", "text"],
  15267. "additionalProperties": false
  15268. }
  15269. },
  15270. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15271. "additionalProperties": false
  15272. },
  15273. "SyncEventSessionNextToolCalled": {
  15274. "type": "object",
  15275. "properties": {
  15276. "type": {
  15277. "type": "string",
  15278. "enum": ["sync"]
  15279. },
  15280. "name": {
  15281. "type": "string",
  15282. "enum": ["session.next.tool.called.1"]
  15283. },
  15284. "id": {
  15285. "type": "string"
  15286. },
  15287. "seq": {
  15288. "type": "number"
  15289. },
  15290. "aggregateID": {
  15291. "type": "string",
  15292. "enum": ["sessionID"]
  15293. },
  15294. "data": {
  15295. "type": "object",
  15296. "properties": {
  15297. "timestamp": {
  15298. "type": "number"
  15299. },
  15300. "sessionID": {
  15301. "type": "string"
  15302. },
  15303. "callID": {
  15304. "type": "string"
  15305. },
  15306. "tool": {
  15307. "type": "string"
  15308. },
  15309. "input": {
  15310. "type": "object"
  15311. },
  15312. "provider": {
  15313. "type": "object",
  15314. "properties": {
  15315. "executed": {
  15316. "type": "boolean"
  15317. },
  15318. "metadata": {
  15319. "type": "object"
  15320. }
  15321. },
  15322. "required": ["executed"],
  15323. "additionalProperties": false
  15324. }
  15325. },
  15326. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  15327. "additionalProperties": false
  15328. }
  15329. },
  15330. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15331. "additionalProperties": false
  15332. },
  15333. "SyncEventSessionNextToolProgress": {
  15334. "type": "object",
  15335. "properties": {
  15336. "type": {
  15337. "type": "string",
  15338. "enum": ["sync"]
  15339. },
  15340. "name": {
  15341. "type": "string",
  15342. "enum": ["session.next.tool.progress.1"]
  15343. },
  15344. "id": {
  15345. "type": "string"
  15346. },
  15347. "seq": {
  15348. "type": "number"
  15349. },
  15350. "aggregateID": {
  15351. "type": "string",
  15352. "enum": ["sessionID"]
  15353. },
  15354. "data": {
  15355. "type": "object",
  15356. "properties": {
  15357. "timestamp": {
  15358. "type": "number"
  15359. },
  15360. "sessionID": {
  15361. "type": "string"
  15362. },
  15363. "callID": {
  15364. "type": "string"
  15365. },
  15366. "structured": {
  15367. "type": "object"
  15368. },
  15369. "content": {
  15370. "type": "array",
  15371. "items": {
  15372. "anyOf": [
  15373. {
  15374. "$ref": "#/components/schemas/ToolTextContent"
  15375. },
  15376. {
  15377. "$ref": "#/components/schemas/ToolFileContent"
  15378. }
  15379. ]
  15380. }
  15381. }
  15382. },
  15383. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  15384. "additionalProperties": false
  15385. }
  15386. },
  15387. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15388. "additionalProperties": false
  15389. },
  15390. "SyncEventSessionNextToolSuccess": {
  15391. "type": "object",
  15392. "properties": {
  15393. "type": {
  15394. "type": "string",
  15395. "enum": ["sync"]
  15396. },
  15397. "name": {
  15398. "type": "string",
  15399. "enum": ["session.next.tool.success.1"]
  15400. },
  15401. "id": {
  15402. "type": "string"
  15403. },
  15404. "seq": {
  15405. "type": "number"
  15406. },
  15407. "aggregateID": {
  15408. "type": "string",
  15409. "enum": ["sessionID"]
  15410. },
  15411. "data": {
  15412. "type": "object",
  15413. "properties": {
  15414. "timestamp": {
  15415. "type": "number"
  15416. },
  15417. "sessionID": {
  15418. "type": "string"
  15419. },
  15420. "callID": {
  15421. "type": "string"
  15422. },
  15423. "structured": {
  15424. "type": "object"
  15425. },
  15426. "content": {
  15427. "type": "array",
  15428. "items": {
  15429. "anyOf": [
  15430. {
  15431. "$ref": "#/components/schemas/ToolTextContent"
  15432. },
  15433. {
  15434. "$ref": "#/components/schemas/ToolFileContent"
  15435. }
  15436. ]
  15437. }
  15438. },
  15439. "provider": {
  15440. "type": "object",
  15441. "properties": {
  15442. "executed": {
  15443. "type": "boolean"
  15444. },
  15445. "metadata": {
  15446. "type": "object"
  15447. }
  15448. },
  15449. "required": ["executed"],
  15450. "additionalProperties": false
  15451. }
  15452. },
  15453. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  15454. "additionalProperties": false
  15455. }
  15456. },
  15457. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15458. "additionalProperties": false
  15459. },
  15460. "SyncEventSessionNextToolFailed": {
  15461. "type": "object",
  15462. "properties": {
  15463. "type": {
  15464. "type": "string",
  15465. "enum": ["sync"]
  15466. },
  15467. "name": {
  15468. "type": "string",
  15469. "enum": ["session.next.tool.failed.1"]
  15470. },
  15471. "id": {
  15472. "type": "string"
  15473. },
  15474. "seq": {
  15475. "type": "number"
  15476. },
  15477. "aggregateID": {
  15478. "type": "string",
  15479. "enum": ["sessionID"]
  15480. },
  15481. "data": {
  15482. "type": "object",
  15483. "properties": {
  15484. "timestamp": {
  15485. "type": "number"
  15486. },
  15487. "sessionID": {
  15488. "type": "string"
  15489. },
  15490. "callID": {
  15491. "type": "string"
  15492. },
  15493. "error": {
  15494. "$ref": "#/components/schemas/SessionErrorUnknown"
  15495. },
  15496. "provider": {
  15497. "type": "object",
  15498. "properties": {
  15499. "executed": {
  15500. "type": "boolean"
  15501. },
  15502. "metadata": {
  15503. "type": "object"
  15504. }
  15505. },
  15506. "required": ["executed"],
  15507. "additionalProperties": false
  15508. }
  15509. },
  15510. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  15511. "additionalProperties": false
  15512. }
  15513. },
  15514. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15515. "additionalProperties": false
  15516. },
  15517. "SyncEventSessionNextRetried": {
  15518. "type": "object",
  15519. "properties": {
  15520. "type": {
  15521. "type": "string",
  15522. "enum": ["sync"]
  15523. },
  15524. "name": {
  15525. "type": "string",
  15526. "enum": ["session.next.retried.1"]
  15527. },
  15528. "id": {
  15529. "type": "string"
  15530. },
  15531. "seq": {
  15532. "type": "number"
  15533. },
  15534. "aggregateID": {
  15535. "type": "string",
  15536. "enum": ["sessionID"]
  15537. },
  15538. "data": {
  15539. "type": "object",
  15540. "properties": {
  15541. "timestamp": {
  15542. "type": "number"
  15543. },
  15544. "sessionID": {
  15545. "type": "string"
  15546. },
  15547. "attempt": {
  15548. "type": "number"
  15549. },
  15550. "error": {
  15551. "$ref": "#/components/schemas/SessionNextRetry_error"
  15552. }
  15553. },
  15554. "required": ["timestamp", "sessionID", "attempt", "error"],
  15555. "additionalProperties": false
  15556. }
  15557. },
  15558. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15559. "additionalProperties": false
  15560. },
  15561. "SyncEventSessionNextCompactionStarted": {
  15562. "type": "object",
  15563. "properties": {
  15564. "type": {
  15565. "type": "string",
  15566. "enum": ["sync"]
  15567. },
  15568. "name": {
  15569. "type": "string",
  15570. "enum": ["session.next.compaction.started.1"]
  15571. },
  15572. "id": {
  15573. "type": "string"
  15574. },
  15575. "seq": {
  15576. "type": "number"
  15577. },
  15578. "aggregateID": {
  15579. "type": "string",
  15580. "enum": ["sessionID"]
  15581. },
  15582. "data": {
  15583. "type": "object",
  15584. "properties": {
  15585. "timestamp": {
  15586. "type": "number"
  15587. },
  15588. "sessionID": {
  15589. "type": "string"
  15590. },
  15591. "reason": {
  15592. "type": "string",
  15593. "enum": ["auto", "manual"]
  15594. }
  15595. },
  15596. "required": ["timestamp", "sessionID", "reason"],
  15597. "additionalProperties": false
  15598. }
  15599. },
  15600. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15601. "additionalProperties": false
  15602. },
  15603. "SyncEventSessionNextCompactionDelta": {
  15604. "type": "object",
  15605. "properties": {
  15606. "type": {
  15607. "type": "string",
  15608. "enum": ["sync"]
  15609. },
  15610. "name": {
  15611. "type": "string",
  15612. "enum": ["session.next.compaction.delta.1"]
  15613. },
  15614. "id": {
  15615. "type": "string"
  15616. },
  15617. "seq": {
  15618. "type": "number"
  15619. },
  15620. "aggregateID": {
  15621. "type": "string",
  15622. "enum": ["sessionID"]
  15623. },
  15624. "data": {
  15625. "type": "object",
  15626. "properties": {
  15627. "timestamp": {
  15628. "type": "number"
  15629. },
  15630. "sessionID": {
  15631. "type": "string"
  15632. },
  15633. "text": {
  15634. "type": "string"
  15635. }
  15636. },
  15637. "required": ["timestamp", "sessionID", "text"],
  15638. "additionalProperties": false
  15639. }
  15640. },
  15641. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15642. "additionalProperties": false
  15643. },
  15644. "SyncEventSessionNextCompactionEnded": {
  15645. "type": "object",
  15646. "properties": {
  15647. "type": {
  15648. "type": "string",
  15649. "enum": ["sync"]
  15650. },
  15651. "name": {
  15652. "type": "string",
  15653. "enum": ["session.next.compaction.ended.1"]
  15654. },
  15655. "id": {
  15656. "type": "string"
  15657. },
  15658. "seq": {
  15659. "type": "number"
  15660. },
  15661. "aggregateID": {
  15662. "type": "string",
  15663. "enum": ["sessionID"]
  15664. },
  15665. "data": {
  15666. "type": "object",
  15667. "properties": {
  15668. "timestamp": {
  15669. "type": "number"
  15670. },
  15671. "sessionID": {
  15672. "type": "string"
  15673. },
  15674. "text": {
  15675. "type": "string"
  15676. },
  15677. "include": {
  15678. "type": "string"
  15679. }
  15680. },
  15681. "required": ["timestamp", "sessionID", "text"],
  15682. "additionalProperties": false
  15683. }
  15684. },
  15685. "required": ["type", "name", "id", "seq", "aggregateID", "data"],
  15686. "additionalProperties": false
  15687. },
  15688. "EventServerInstanceDisposed": {
  15689. "type": "object",
  15690. "properties": {
  15691. "id": {
  15692. "type": "string"
  15693. },
  15694. "type": {
  15695. "type": "string",
  15696. "enum": ["server.instance.disposed"]
  15697. },
  15698. "properties": {
  15699. "type": "object",
  15700. "properties": {
  15701. "directory": {
  15702. "type": "string"
  15703. }
  15704. },
  15705. "required": ["directory"],
  15706. "additionalProperties": false
  15707. }
  15708. },
  15709. "required": ["id", "type", "properties"],
  15710. "additionalProperties": false
  15711. },
  15712. "EventFileEdited": {
  15713. "type": "object",
  15714. "properties": {
  15715. "id": {
  15716. "type": "string"
  15717. },
  15718. "type": {
  15719. "type": "string",
  15720. "enum": ["file.edited"]
  15721. },
  15722. "properties": {
  15723. "type": "object",
  15724. "properties": {
  15725. "file": {
  15726. "type": "string"
  15727. }
  15728. },
  15729. "required": ["file"],
  15730. "additionalProperties": false
  15731. }
  15732. },
  15733. "required": ["id", "type", "properties"],
  15734. "additionalProperties": false
  15735. },
  15736. "EventFileWatcherUpdated": {
  15737. "type": "object",
  15738. "properties": {
  15739. "id": {
  15740. "type": "string"
  15741. },
  15742. "type": {
  15743. "type": "string",
  15744. "enum": ["file.watcher.updated"]
  15745. },
  15746. "properties": {
  15747. "type": "object",
  15748. "properties": {
  15749. "file": {
  15750. "type": "string"
  15751. },
  15752. "event": {
  15753. "type": "string",
  15754. "enum": ["add", "change", "unlink"]
  15755. }
  15756. },
  15757. "required": ["file", "event"],
  15758. "additionalProperties": false
  15759. }
  15760. },
  15761. "required": ["id", "type", "properties"],
  15762. "additionalProperties": false
  15763. },
  15764. "EventLspClientDiagnostics": {
  15765. "type": "object",
  15766. "properties": {
  15767. "id": {
  15768. "type": "string"
  15769. },
  15770. "type": {
  15771. "type": "string",
  15772. "enum": ["lsp.client.diagnostics"]
  15773. },
  15774. "properties": {
  15775. "type": "object",
  15776. "properties": {
  15777. "serverID": {
  15778. "type": "string"
  15779. },
  15780. "path": {
  15781. "type": "string"
  15782. }
  15783. },
  15784. "required": ["serverID", "path"],
  15785. "additionalProperties": false
  15786. }
  15787. },
  15788. "required": ["id", "type", "properties"],
  15789. "additionalProperties": false
  15790. },
  15791. "EventLspUpdated": {
  15792. "type": "object",
  15793. "properties": {
  15794. "id": {
  15795. "type": "string"
  15796. },
  15797. "type": {
  15798. "type": "string",
  15799. "enum": ["lsp.updated"]
  15800. },
  15801. "properties": {
  15802. "type": "object",
  15803. "properties": {}
  15804. }
  15805. },
  15806. "required": ["id", "type", "properties"],
  15807. "additionalProperties": false
  15808. },
  15809. "EventMessagePartDelta": {
  15810. "type": "object",
  15811. "properties": {
  15812. "id": {
  15813. "type": "string"
  15814. },
  15815. "type": {
  15816. "type": "string",
  15817. "enum": ["message.part.delta"]
  15818. },
  15819. "properties": {
  15820. "type": "object",
  15821. "properties": {
  15822. "sessionID": {
  15823. "type": "string"
  15824. },
  15825. "messageID": {
  15826. "type": "string"
  15827. },
  15828. "partID": {
  15829. "type": "string"
  15830. },
  15831. "field": {
  15832. "type": "string"
  15833. },
  15834. "delta": {
  15835. "type": "string"
  15836. }
  15837. },
  15838. "required": ["sessionID", "messageID", "partID", "field", "delta"],
  15839. "additionalProperties": false
  15840. }
  15841. },
  15842. "required": ["id", "type", "properties"],
  15843. "additionalProperties": false
  15844. },
  15845. "EventPermissionAsked": {
  15846. "type": "object",
  15847. "properties": {
  15848. "id": {
  15849. "type": "string"
  15850. },
  15851. "type": {
  15852. "type": "string",
  15853. "enum": ["permission.asked"]
  15854. },
  15855. "properties": {
  15856. "$ref": "#/components/schemas/PermissionRequest"
  15857. }
  15858. },
  15859. "required": ["id", "type", "properties"],
  15860. "additionalProperties": false
  15861. },
  15862. "EventPermissionReplied": {
  15863. "type": "object",
  15864. "properties": {
  15865. "id": {
  15866. "type": "string"
  15867. },
  15868. "type": {
  15869. "type": "string",
  15870. "enum": ["permission.replied"]
  15871. },
  15872. "properties": {
  15873. "type": "object",
  15874. "properties": {
  15875. "sessionID": {
  15876. "type": "string"
  15877. },
  15878. "requestID": {
  15879. "type": "string",
  15880. "pattern": "^per"
  15881. },
  15882. "reply": {
  15883. "type": "string",
  15884. "enum": ["once", "always", "reject"]
  15885. }
  15886. },
  15887. "required": ["sessionID", "requestID", "reply"],
  15888. "additionalProperties": false
  15889. }
  15890. },
  15891. "required": ["id", "type", "properties"],
  15892. "additionalProperties": false
  15893. },
  15894. "EventSessionDiff": {
  15895. "type": "object",
  15896. "properties": {
  15897. "id": {
  15898. "type": "string"
  15899. },
  15900. "type": {
  15901. "type": "string",
  15902. "enum": ["session.diff"]
  15903. },
  15904. "properties": {
  15905. "type": "object",
  15906. "properties": {
  15907. "sessionID": {
  15908. "type": "string"
  15909. },
  15910. "diff": {
  15911. "type": "array",
  15912. "items": {
  15913. "$ref": "#/components/schemas/SnapshotFileDiff"
  15914. }
  15915. }
  15916. },
  15917. "required": ["sessionID", "diff"],
  15918. "additionalProperties": false
  15919. }
  15920. },
  15921. "required": ["id", "type", "properties"],
  15922. "additionalProperties": false
  15923. },
  15924. "EventSessionError": {
  15925. "type": "object",
  15926. "properties": {
  15927. "id": {
  15928. "type": "string"
  15929. },
  15930. "type": {
  15931. "type": "string",
  15932. "enum": ["session.error"]
  15933. },
  15934. "properties": {
  15935. "type": "object",
  15936. "properties": {
  15937. "sessionID": {
  15938. "type": "string"
  15939. },
  15940. "error": {
  15941. "anyOf": [
  15942. {
  15943. "$ref": "#/components/schemas/ProviderAuthError"
  15944. },
  15945. {
  15946. "$ref": "#/components/schemas/UnknownError"
  15947. },
  15948. {
  15949. "$ref": "#/components/schemas/MessageOutputLengthError"
  15950. },
  15951. {
  15952. "$ref": "#/components/schemas/MessageAbortedError"
  15953. },
  15954. {
  15955. "$ref": "#/components/schemas/StructuredOutputError"
  15956. },
  15957. {
  15958. "$ref": "#/components/schemas/ContextOverflowError"
  15959. },
  15960. {
  15961. "$ref": "#/components/schemas/APIError"
  15962. }
  15963. ]
  15964. }
  15965. },
  15966. "additionalProperties": false
  15967. }
  15968. },
  15969. "required": ["id", "type", "properties"],
  15970. "additionalProperties": false
  15971. },
  15972. "EventInstallationUpdated": {
  15973. "type": "object",
  15974. "properties": {
  15975. "id": {
  15976. "type": "string"
  15977. },
  15978. "type": {
  15979. "type": "string",
  15980. "enum": ["installation.updated"]
  15981. },
  15982. "properties": {
  15983. "type": "object",
  15984. "properties": {
  15985. "version": {
  15986. "type": "string"
  15987. }
  15988. },
  15989. "required": ["version"],
  15990. "additionalProperties": false
  15991. }
  15992. },
  15993. "required": ["id", "type", "properties"],
  15994. "additionalProperties": false
  15995. },
  15996. "EventInstallationUpdate-available": {
  15997. "type": "object",
  15998. "properties": {
  15999. "id": {
  16000. "type": "string"
  16001. },
  16002. "type": {
  16003. "type": "string",
  16004. "enum": ["installation.update-available"]
  16005. },
  16006. "properties": {
  16007. "type": "object",
  16008. "properties": {
  16009. "version": {
  16010. "type": "string"
  16011. }
  16012. },
  16013. "required": ["version"],
  16014. "additionalProperties": false
  16015. }
  16016. },
  16017. "required": ["id", "type", "properties"],
  16018. "additionalProperties": false
  16019. },
  16020. "EventQuestionAsked": {
  16021. "type": "object",
  16022. "properties": {
  16023. "id": {
  16024. "type": "string"
  16025. },
  16026. "type": {
  16027. "type": "string",
  16028. "enum": ["question.asked"]
  16029. },
  16030. "properties": {
  16031. "$ref": "#/components/schemas/QuestionRequest"
  16032. }
  16033. },
  16034. "required": ["id", "type", "properties"],
  16035. "additionalProperties": false
  16036. },
  16037. "EventQuestionReplied": {
  16038. "type": "object",
  16039. "properties": {
  16040. "id": {
  16041. "type": "string"
  16042. },
  16043. "type": {
  16044. "type": "string",
  16045. "enum": ["question.replied"]
  16046. },
  16047. "properties": {
  16048. "$ref": "#/components/schemas/QuestionReplied"
  16049. }
  16050. },
  16051. "required": ["id", "type", "properties"],
  16052. "additionalProperties": false
  16053. },
  16054. "EventQuestionRejected": {
  16055. "type": "object",
  16056. "properties": {
  16057. "id": {
  16058. "type": "string"
  16059. },
  16060. "type": {
  16061. "type": "string",
  16062. "enum": ["question.rejected"]
  16063. },
  16064. "properties": {
  16065. "$ref": "#/components/schemas/QuestionRejected"
  16066. }
  16067. },
  16068. "required": ["id", "type", "properties"],
  16069. "additionalProperties": false
  16070. },
  16071. "EventTodoUpdated": {
  16072. "type": "object",
  16073. "properties": {
  16074. "id": {
  16075. "type": "string"
  16076. },
  16077. "type": {
  16078. "type": "string",
  16079. "enum": ["todo.updated"]
  16080. },
  16081. "properties": {
  16082. "type": "object",
  16083. "properties": {
  16084. "sessionID": {
  16085. "type": "string"
  16086. },
  16087. "todos": {
  16088. "type": "array",
  16089. "items": {
  16090. "$ref": "#/components/schemas/Todo"
  16091. }
  16092. }
  16093. },
  16094. "required": ["sessionID", "todos"],
  16095. "additionalProperties": false
  16096. }
  16097. },
  16098. "required": ["id", "type", "properties"],
  16099. "additionalProperties": false
  16100. },
  16101. "EventSessionStatus": {
  16102. "type": "object",
  16103. "properties": {
  16104. "id": {
  16105. "type": "string"
  16106. },
  16107. "type": {
  16108. "type": "string",
  16109. "enum": ["session.status"]
  16110. },
  16111. "properties": {
  16112. "type": "object",
  16113. "properties": {
  16114. "sessionID": {
  16115. "type": "string"
  16116. },
  16117. "status": {
  16118. "$ref": "#/components/schemas/SessionStatus"
  16119. }
  16120. },
  16121. "required": ["sessionID", "status"],
  16122. "additionalProperties": false
  16123. }
  16124. },
  16125. "required": ["id", "type", "properties"],
  16126. "additionalProperties": false
  16127. },
  16128. "EventSessionIdle": {
  16129. "type": "object",
  16130. "properties": {
  16131. "id": {
  16132. "type": "string"
  16133. },
  16134. "type": {
  16135. "type": "string",
  16136. "enum": ["session.idle"]
  16137. },
  16138. "properties": {
  16139. "type": "object",
  16140. "properties": {
  16141. "sessionID": {
  16142. "type": "string"
  16143. }
  16144. },
  16145. "required": ["sessionID"],
  16146. "additionalProperties": false
  16147. }
  16148. },
  16149. "required": ["id", "type", "properties"],
  16150. "additionalProperties": false
  16151. },
  16152. "EventSessionCompacted": {
  16153. "type": "object",
  16154. "properties": {
  16155. "id": {
  16156. "type": "string"
  16157. },
  16158. "type": {
  16159. "type": "string",
  16160. "enum": ["session.compacted"]
  16161. },
  16162. "properties": {
  16163. "type": "object",
  16164. "properties": {
  16165. "sessionID": {
  16166. "type": "string"
  16167. }
  16168. },
  16169. "required": ["sessionID"],
  16170. "additionalProperties": false
  16171. }
  16172. },
  16173. "required": ["id", "type", "properties"],
  16174. "additionalProperties": false
  16175. },
  16176. "EventMcpToolsChanged": {
  16177. "type": "object",
  16178. "properties": {
  16179. "id": {
  16180. "type": "string"
  16181. },
  16182. "type": {
  16183. "type": "string",
  16184. "enum": ["mcp.tools.changed"]
  16185. },
  16186. "properties": {
  16187. "type": "object",
  16188. "properties": {
  16189. "server": {
  16190. "type": "string"
  16191. }
  16192. },
  16193. "required": ["server"],
  16194. "additionalProperties": false
  16195. }
  16196. },
  16197. "required": ["id", "type", "properties"],
  16198. "additionalProperties": false
  16199. },
  16200. "EventMcpBrowserOpenFailed": {
  16201. "type": "object",
  16202. "properties": {
  16203. "id": {
  16204. "type": "string"
  16205. },
  16206. "type": {
  16207. "type": "string",
  16208. "enum": ["mcp.browser.open.failed"]
  16209. },
  16210. "properties": {
  16211. "type": "object",
  16212. "properties": {
  16213. "mcpName": {
  16214. "type": "string"
  16215. },
  16216. "url": {
  16217. "type": "string"
  16218. }
  16219. },
  16220. "required": ["mcpName", "url"],
  16221. "additionalProperties": false
  16222. }
  16223. },
  16224. "required": ["id", "type", "properties"],
  16225. "additionalProperties": false
  16226. },
  16227. "EventCommandExecuted": {
  16228. "type": "object",
  16229. "properties": {
  16230. "id": {
  16231. "type": "string"
  16232. },
  16233. "type": {
  16234. "type": "string",
  16235. "enum": ["command.executed"]
  16236. },
  16237. "properties": {
  16238. "type": "object",
  16239. "properties": {
  16240. "name": {
  16241. "type": "string"
  16242. },
  16243. "sessionID": {
  16244. "type": "string"
  16245. },
  16246. "arguments": {
  16247. "type": "string"
  16248. },
  16249. "messageID": {
  16250. "type": "string"
  16251. }
  16252. },
  16253. "required": ["name", "sessionID", "arguments", "messageID"],
  16254. "additionalProperties": false
  16255. }
  16256. },
  16257. "required": ["id", "type", "properties"],
  16258. "additionalProperties": false
  16259. },
  16260. "EventProjectUpdated": {
  16261. "type": "object",
  16262. "properties": {
  16263. "id": {
  16264. "type": "string"
  16265. },
  16266. "type": {
  16267. "type": "string",
  16268. "enum": ["project.updated"]
  16269. },
  16270. "properties": {
  16271. "$ref": "#/components/schemas/Project"
  16272. }
  16273. },
  16274. "required": ["id", "type", "properties"],
  16275. "additionalProperties": false
  16276. },
  16277. "EventVcsBranchUpdated": {
  16278. "type": "object",
  16279. "properties": {
  16280. "id": {
  16281. "type": "string"
  16282. },
  16283. "type": {
  16284. "type": "string",
  16285. "enum": ["vcs.branch.updated"]
  16286. },
  16287. "properties": {
  16288. "type": "object",
  16289. "properties": {
  16290. "branch": {
  16291. "type": "string"
  16292. }
  16293. },
  16294. "additionalProperties": false
  16295. }
  16296. },
  16297. "required": ["id", "type", "properties"],
  16298. "additionalProperties": false
  16299. },
  16300. "EventWorkspaceReady": {
  16301. "type": "object",
  16302. "properties": {
  16303. "id": {
  16304. "type": "string"
  16305. },
  16306. "type": {
  16307. "type": "string",
  16308. "enum": ["workspace.ready"]
  16309. },
  16310. "properties": {
  16311. "type": "object",
  16312. "properties": {
  16313. "name": {
  16314. "type": "string"
  16315. }
  16316. },
  16317. "required": ["name"],
  16318. "additionalProperties": false
  16319. }
  16320. },
  16321. "required": ["id", "type", "properties"],
  16322. "additionalProperties": false
  16323. },
  16324. "EventWorkspaceFailed": {
  16325. "type": "object",
  16326. "properties": {
  16327. "id": {
  16328. "type": "string"
  16329. },
  16330. "type": {
  16331. "type": "string",
  16332. "enum": ["workspace.failed"]
  16333. },
  16334. "properties": {
  16335. "type": "object",
  16336. "properties": {
  16337. "message": {
  16338. "type": "string"
  16339. }
  16340. },
  16341. "required": ["message"],
  16342. "additionalProperties": false
  16343. }
  16344. },
  16345. "required": ["id", "type", "properties"],
  16346. "additionalProperties": false
  16347. },
  16348. "EventWorkspaceStatus": {
  16349. "type": "object",
  16350. "properties": {
  16351. "id": {
  16352. "type": "string"
  16353. },
  16354. "type": {
  16355. "type": "string",
  16356. "enum": ["workspace.status"]
  16357. },
  16358. "properties": {
  16359. "type": "object",
  16360. "properties": {
  16361. "workspaceID": {
  16362. "type": "string"
  16363. },
  16364. "status": {
  16365. "type": "string",
  16366. "enum": ["connected", "connecting", "disconnected", "error"]
  16367. }
  16368. },
  16369. "required": ["workspaceID", "status"],
  16370. "additionalProperties": false
  16371. }
  16372. },
  16373. "required": ["id", "type", "properties"],
  16374. "additionalProperties": false
  16375. },
  16376. "EventWorktreeReady": {
  16377. "type": "object",
  16378. "properties": {
  16379. "id": {
  16380. "type": "string"
  16381. },
  16382. "type": {
  16383. "type": "string",
  16384. "enum": ["worktree.ready"]
  16385. },
  16386. "properties": {
  16387. "type": "object",
  16388. "properties": {
  16389. "name": {
  16390. "type": "string"
  16391. },
  16392. "branch": {
  16393. "type": "string"
  16394. }
  16395. },
  16396. "required": ["name", "branch"],
  16397. "additionalProperties": false
  16398. }
  16399. },
  16400. "required": ["id", "type", "properties"],
  16401. "additionalProperties": false
  16402. },
  16403. "EventWorktreeFailed": {
  16404. "type": "object",
  16405. "properties": {
  16406. "id": {
  16407. "type": "string"
  16408. },
  16409. "type": {
  16410. "type": "string",
  16411. "enum": ["worktree.failed"]
  16412. },
  16413. "properties": {
  16414. "type": "object",
  16415. "properties": {
  16416. "message": {
  16417. "type": "string"
  16418. }
  16419. },
  16420. "required": ["message"],
  16421. "additionalProperties": false
  16422. }
  16423. },
  16424. "required": ["id", "type", "properties"],
  16425. "additionalProperties": false
  16426. },
  16427. "EventPtyCreated": {
  16428. "type": "object",
  16429. "properties": {
  16430. "id": {
  16431. "type": "string"
  16432. },
  16433. "type": {
  16434. "type": "string",
  16435. "enum": ["pty.created"]
  16436. },
  16437. "properties": {
  16438. "type": "object",
  16439. "properties": {
  16440. "info": {
  16441. "$ref": "#/components/schemas/Pty"
  16442. }
  16443. },
  16444. "required": ["info"],
  16445. "additionalProperties": false
  16446. }
  16447. },
  16448. "required": ["id", "type", "properties"],
  16449. "additionalProperties": false
  16450. },
  16451. "EventPtyUpdated": {
  16452. "type": "object",
  16453. "properties": {
  16454. "id": {
  16455. "type": "string"
  16456. },
  16457. "type": {
  16458. "type": "string",
  16459. "enum": ["pty.updated"]
  16460. },
  16461. "properties": {
  16462. "type": "object",
  16463. "properties": {
  16464. "info": {
  16465. "$ref": "#/components/schemas/Pty"
  16466. }
  16467. },
  16468. "required": ["info"],
  16469. "additionalProperties": false
  16470. }
  16471. },
  16472. "required": ["id", "type", "properties"],
  16473. "additionalProperties": false
  16474. },
  16475. "EventPtyExited": {
  16476. "type": "object",
  16477. "properties": {
  16478. "id": {
  16479. "type": "string"
  16480. },
  16481. "type": {
  16482. "type": "string",
  16483. "enum": ["pty.exited"]
  16484. },
  16485. "properties": {
  16486. "type": "object",
  16487. "properties": {
  16488. "id": {
  16489. "type": "string"
  16490. },
  16491. "exitCode": {
  16492. "type": "integer",
  16493. "minimum": 0
  16494. }
  16495. },
  16496. "required": ["id", "exitCode"],
  16497. "additionalProperties": false
  16498. }
  16499. },
  16500. "required": ["id", "type", "properties"],
  16501. "additionalProperties": false
  16502. },
  16503. "EventPtyDeleted": {
  16504. "type": "object",
  16505. "properties": {
  16506. "id": {
  16507. "type": "string"
  16508. },
  16509. "type": {
  16510. "type": "string",
  16511. "enum": ["pty.deleted"]
  16512. },
  16513. "properties": {
  16514. "type": "object",
  16515. "properties": {
  16516. "id": {
  16517. "type": "string"
  16518. }
  16519. },
  16520. "required": ["id"],
  16521. "additionalProperties": false
  16522. }
  16523. },
  16524. "required": ["id", "type", "properties"],
  16525. "additionalProperties": false
  16526. },
  16527. "EventMessageUpdated": {
  16528. "type": "object",
  16529. "properties": {
  16530. "id": {
  16531. "type": "string"
  16532. },
  16533. "type": {
  16534. "type": "string",
  16535. "enum": ["message.updated"]
  16536. },
  16537. "properties": {
  16538. "type": "object",
  16539. "properties": {
  16540. "sessionID": {
  16541. "type": "string"
  16542. },
  16543. "info": {
  16544. "$ref": "#/components/schemas/Message"
  16545. }
  16546. },
  16547. "required": ["sessionID", "info"],
  16548. "additionalProperties": false
  16549. }
  16550. },
  16551. "required": ["id", "type", "properties"],
  16552. "additionalProperties": false
  16553. },
  16554. "EventMessageRemoved": {
  16555. "type": "object",
  16556. "properties": {
  16557. "id": {
  16558. "type": "string"
  16559. },
  16560. "type": {
  16561. "type": "string",
  16562. "enum": ["message.removed"]
  16563. },
  16564. "properties": {
  16565. "type": "object",
  16566. "properties": {
  16567. "sessionID": {
  16568. "type": "string"
  16569. },
  16570. "messageID": {
  16571. "type": "string"
  16572. }
  16573. },
  16574. "required": ["sessionID", "messageID"],
  16575. "additionalProperties": false
  16576. }
  16577. },
  16578. "required": ["id", "type", "properties"],
  16579. "additionalProperties": false
  16580. },
  16581. "EventMessagePartUpdated": {
  16582. "type": "object",
  16583. "properties": {
  16584. "id": {
  16585. "type": "string"
  16586. },
  16587. "type": {
  16588. "type": "string",
  16589. "enum": ["message.part.updated"]
  16590. },
  16591. "properties": {
  16592. "type": "object",
  16593. "properties": {
  16594. "sessionID": {
  16595. "type": "string"
  16596. },
  16597. "part": {
  16598. "$ref": "#/components/schemas/Part"
  16599. },
  16600. "time": {
  16601. "type": "integer",
  16602. "minimum": 0
  16603. }
  16604. },
  16605. "required": ["sessionID", "part", "time"],
  16606. "additionalProperties": false
  16607. }
  16608. },
  16609. "required": ["id", "type", "properties"],
  16610. "additionalProperties": false
  16611. },
  16612. "EventMessagePartRemoved": {
  16613. "type": "object",
  16614. "properties": {
  16615. "id": {
  16616. "type": "string"
  16617. },
  16618. "type": {
  16619. "type": "string",
  16620. "enum": ["message.part.removed"]
  16621. },
  16622. "properties": {
  16623. "type": "object",
  16624. "properties": {
  16625. "sessionID": {
  16626. "type": "string"
  16627. },
  16628. "messageID": {
  16629. "type": "string"
  16630. },
  16631. "partID": {
  16632. "type": "string"
  16633. }
  16634. },
  16635. "required": ["sessionID", "messageID", "partID"],
  16636. "additionalProperties": false
  16637. }
  16638. },
  16639. "required": ["id", "type", "properties"],
  16640. "additionalProperties": false
  16641. },
  16642. "EventSessionCreated": {
  16643. "type": "object",
  16644. "properties": {
  16645. "id": {
  16646. "type": "string"
  16647. },
  16648. "type": {
  16649. "type": "string",
  16650. "enum": ["session.created"]
  16651. },
  16652. "properties": {
  16653. "type": "object",
  16654. "properties": {
  16655. "sessionID": {
  16656. "type": "string"
  16657. },
  16658. "info": {
  16659. "$ref": "#/components/schemas/Session"
  16660. }
  16661. },
  16662. "required": ["sessionID", "info"],
  16663. "additionalProperties": false
  16664. }
  16665. },
  16666. "required": ["id", "type", "properties"],
  16667. "additionalProperties": false
  16668. },
  16669. "EventSessionUpdated": {
  16670. "type": "object",
  16671. "properties": {
  16672. "id": {
  16673. "type": "string"
  16674. },
  16675. "type": {
  16676. "type": "string",
  16677. "enum": ["session.updated"]
  16678. },
  16679. "properties": {
  16680. "type": "object",
  16681. "properties": {
  16682. "sessionID": {
  16683. "type": "string"
  16684. },
  16685. "info": {
  16686. "$ref": "#/components/schemas/Session"
  16687. }
  16688. },
  16689. "required": ["sessionID", "info"],
  16690. "additionalProperties": false
  16691. }
  16692. },
  16693. "required": ["id", "type", "properties"],
  16694. "additionalProperties": false
  16695. },
  16696. "EventSessionDeleted": {
  16697. "type": "object",
  16698. "properties": {
  16699. "id": {
  16700. "type": "string"
  16701. },
  16702. "type": {
  16703. "type": "string",
  16704. "enum": ["session.deleted"]
  16705. },
  16706. "properties": {
  16707. "type": "object",
  16708. "properties": {
  16709. "sessionID": {
  16710. "type": "string"
  16711. },
  16712. "info": {
  16713. "$ref": "#/components/schemas/Session"
  16714. }
  16715. },
  16716. "required": ["sessionID", "info"],
  16717. "additionalProperties": false
  16718. }
  16719. },
  16720. "required": ["id", "type", "properties"],
  16721. "additionalProperties": false
  16722. },
  16723. "EventSessionNextAgentSwitched": {
  16724. "type": "object",
  16725. "properties": {
  16726. "id": {
  16727. "type": "string"
  16728. },
  16729. "type": {
  16730. "type": "string",
  16731. "enum": ["session.next.agent.switched"]
  16732. },
  16733. "properties": {
  16734. "type": "object",
  16735. "properties": {
  16736. "timestamp": {
  16737. "type": "number"
  16738. },
  16739. "sessionID": {
  16740. "type": "string"
  16741. },
  16742. "agent": {
  16743. "type": "string"
  16744. }
  16745. },
  16746. "required": ["timestamp", "sessionID", "agent"],
  16747. "additionalProperties": false
  16748. }
  16749. },
  16750. "required": ["id", "type", "properties"],
  16751. "additionalProperties": false
  16752. },
  16753. "EventSessionNextModelSwitched": {
  16754. "type": "object",
  16755. "properties": {
  16756. "id": {
  16757. "type": "string"
  16758. },
  16759. "type": {
  16760. "type": "string",
  16761. "enum": ["session.next.model.switched"]
  16762. },
  16763. "properties": {
  16764. "type": "object",
  16765. "properties": {
  16766. "timestamp": {
  16767. "type": "number"
  16768. },
  16769. "sessionID": {
  16770. "type": "string"
  16771. },
  16772. "model": {
  16773. "type": "object",
  16774. "properties": {
  16775. "id": {
  16776. "type": "string"
  16777. },
  16778. "providerID": {
  16779. "type": "string"
  16780. },
  16781. "variant": {
  16782. "type": "string"
  16783. }
  16784. },
  16785. "required": ["id", "providerID", "variant"],
  16786. "additionalProperties": false
  16787. }
  16788. },
  16789. "required": ["timestamp", "sessionID", "model"],
  16790. "additionalProperties": false
  16791. }
  16792. },
  16793. "required": ["id", "type", "properties"],
  16794. "additionalProperties": false
  16795. },
  16796. "PromptSource": {
  16797. "type": "object",
  16798. "properties": {
  16799. "start": {
  16800. "type": "number"
  16801. },
  16802. "end": {
  16803. "type": "number"
  16804. },
  16805. "text": {
  16806. "type": "string"
  16807. }
  16808. },
  16809. "required": ["start", "end", "text"],
  16810. "additionalProperties": false
  16811. },
  16812. "PromptFileAttachment": {
  16813. "type": "object",
  16814. "properties": {
  16815. "uri": {
  16816. "type": "string"
  16817. },
  16818. "mime": {
  16819. "type": "string"
  16820. },
  16821. "name": {
  16822. "type": "string"
  16823. },
  16824. "description": {
  16825. "type": "string"
  16826. },
  16827. "source": {
  16828. "$ref": "#/components/schemas/PromptSource"
  16829. }
  16830. },
  16831. "required": ["uri", "mime"],
  16832. "additionalProperties": false
  16833. },
  16834. "PromptAgentAttachment": {
  16835. "type": "object",
  16836. "properties": {
  16837. "name": {
  16838. "type": "string"
  16839. },
  16840. "source": {
  16841. "$ref": "#/components/schemas/PromptSource"
  16842. }
  16843. },
  16844. "required": ["name"],
  16845. "additionalProperties": false
  16846. },
  16847. "EventSessionNextPrompted": {
  16848. "type": "object",
  16849. "properties": {
  16850. "id": {
  16851. "type": "string"
  16852. },
  16853. "type": {
  16854. "type": "string",
  16855. "enum": ["session.next.prompted"]
  16856. },
  16857. "properties": {
  16858. "type": "object",
  16859. "properties": {
  16860. "timestamp": {
  16861. "type": "number"
  16862. },
  16863. "sessionID": {
  16864. "type": "string"
  16865. },
  16866. "prompt": {
  16867. "$ref": "#/components/schemas/Prompt"
  16868. }
  16869. },
  16870. "required": ["timestamp", "sessionID", "prompt"],
  16871. "additionalProperties": false
  16872. }
  16873. },
  16874. "required": ["id", "type", "properties"],
  16875. "additionalProperties": false
  16876. },
  16877. "EventSessionNextSynthetic": {
  16878. "type": "object",
  16879. "properties": {
  16880. "id": {
  16881. "type": "string"
  16882. },
  16883. "type": {
  16884. "type": "string",
  16885. "enum": ["session.next.synthetic"]
  16886. },
  16887. "properties": {
  16888. "type": "object",
  16889. "properties": {
  16890. "timestamp": {
  16891. "type": "number"
  16892. },
  16893. "sessionID": {
  16894. "type": "string"
  16895. },
  16896. "text": {
  16897. "type": "string"
  16898. }
  16899. },
  16900. "required": ["timestamp", "sessionID", "text"],
  16901. "additionalProperties": false
  16902. }
  16903. },
  16904. "required": ["id", "type", "properties"],
  16905. "additionalProperties": false
  16906. },
  16907. "EventSessionNextShellStarted": {
  16908. "type": "object",
  16909. "properties": {
  16910. "id": {
  16911. "type": "string"
  16912. },
  16913. "type": {
  16914. "type": "string",
  16915. "enum": ["session.next.shell.started"]
  16916. },
  16917. "properties": {
  16918. "type": "object",
  16919. "properties": {
  16920. "timestamp": {
  16921. "type": "number"
  16922. },
  16923. "sessionID": {
  16924. "type": "string"
  16925. },
  16926. "callID": {
  16927. "type": "string"
  16928. },
  16929. "command": {
  16930. "type": "string"
  16931. }
  16932. },
  16933. "required": ["timestamp", "sessionID", "callID", "command"],
  16934. "additionalProperties": false
  16935. }
  16936. },
  16937. "required": ["id", "type", "properties"],
  16938. "additionalProperties": false
  16939. },
  16940. "EventSessionNextShellEnded": {
  16941. "type": "object",
  16942. "properties": {
  16943. "id": {
  16944. "type": "string"
  16945. },
  16946. "type": {
  16947. "type": "string",
  16948. "enum": ["session.next.shell.ended"]
  16949. },
  16950. "properties": {
  16951. "type": "object",
  16952. "properties": {
  16953. "timestamp": {
  16954. "type": "number"
  16955. },
  16956. "sessionID": {
  16957. "type": "string"
  16958. },
  16959. "callID": {
  16960. "type": "string"
  16961. },
  16962. "output": {
  16963. "type": "string"
  16964. }
  16965. },
  16966. "required": ["timestamp", "sessionID", "callID", "output"],
  16967. "additionalProperties": false
  16968. }
  16969. },
  16970. "required": ["id", "type", "properties"],
  16971. "additionalProperties": false
  16972. },
  16973. "EventSessionNextStepStarted": {
  16974. "type": "object",
  16975. "properties": {
  16976. "id": {
  16977. "type": "string"
  16978. },
  16979. "type": {
  16980. "type": "string",
  16981. "enum": ["session.next.step.started"]
  16982. },
  16983. "properties": {
  16984. "type": "object",
  16985. "properties": {
  16986. "timestamp": {
  16987. "type": "number"
  16988. },
  16989. "sessionID": {
  16990. "type": "string"
  16991. },
  16992. "agent": {
  16993. "type": "string"
  16994. },
  16995. "model": {
  16996. "type": "object",
  16997. "properties": {
  16998. "id": {
  16999. "type": "string"
  17000. },
  17001. "providerID": {
  17002. "type": "string"
  17003. },
  17004. "variant": {
  17005. "type": "string"
  17006. }
  17007. },
  17008. "required": ["id", "providerID", "variant"],
  17009. "additionalProperties": false
  17010. },
  17011. "snapshot": {
  17012. "type": "string"
  17013. }
  17014. },
  17015. "required": ["timestamp", "sessionID", "agent", "model"],
  17016. "additionalProperties": false
  17017. }
  17018. },
  17019. "required": ["id", "type", "properties"],
  17020. "additionalProperties": false
  17021. },
  17022. "EventSessionNextStepEnded": {
  17023. "type": "object",
  17024. "properties": {
  17025. "id": {
  17026. "type": "string"
  17027. },
  17028. "type": {
  17029. "type": "string",
  17030. "enum": ["session.next.step.ended"]
  17031. },
  17032. "properties": {
  17033. "type": "object",
  17034. "properties": {
  17035. "timestamp": {
  17036. "type": "number"
  17037. },
  17038. "sessionID": {
  17039. "type": "string"
  17040. },
  17041. "finish": {
  17042. "type": "string"
  17043. },
  17044. "cost": {
  17045. "type": "number"
  17046. },
  17047. "tokens": {
  17048. "type": "object",
  17049. "properties": {
  17050. "input": {
  17051. "type": "number"
  17052. },
  17053. "output": {
  17054. "type": "number"
  17055. },
  17056. "reasoning": {
  17057. "type": "number"
  17058. },
  17059. "cache": {
  17060. "type": "object",
  17061. "properties": {
  17062. "read": {
  17063. "type": "number"
  17064. },
  17065. "write": {
  17066. "type": "number"
  17067. }
  17068. },
  17069. "required": ["read", "write"],
  17070. "additionalProperties": false
  17071. }
  17072. },
  17073. "required": ["input", "output", "reasoning", "cache"],
  17074. "additionalProperties": false
  17075. },
  17076. "snapshot": {
  17077. "type": "string"
  17078. }
  17079. },
  17080. "required": ["timestamp", "sessionID", "finish", "cost", "tokens"],
  17081. "additionalProperties": false
  17082. }
  17083. },
  17084. "required": ["id", "type", "properties"],
  17085. "additionalProperties": false
  17086. },
  17087. "SessionErrorUnknown": {
  17088. "type": "object",
  17089. "properties": {
  17090. "type": {
  17091. "type": "string",
  17092. "enum": ["unknown"]
  17093. },
  17094. "message": {
  17095. "type": "string"
  17096. }
  17097. },
  17098. "required": ["type", "message"],
  17099. "additionalProperties": false
  17100. },
  17101. "EventSessionNextStepFailed": {
  17102. "type": "object",
  17103. "properties": {
  17104. "id": {
  17105. "type": "string"
  17106. },
  17107. "type": {
  17108. "type": "string",
  17109. "enum": ["session.next.step.failed"]
  17110. },
  17111. "properties": {
  17112. "type": "object",
  17113. "properties": {
  17114. "timestamp": {
  17115. "type": "number"
  17116. },
  17117. "sessionID": {
  17118. "type": "string"
  17119. },
  17120. "error": {
  17121. "$ref": "#/components/schemas/SessionErrorUnknown"
  17122. }
  17123. },
  17124. "required": ["timestamp", "sessionID", "error"],
  17125. "additionalProperties": false
  17126. }
  17127. },
  17128. "required": ["id", "type", "properties"],
  17129. "additionalProperties": false
  17130. },
  17131. "EventSessionNextTextStarted": {
  17132. "type": "object",
  17133. "properties": {
  17134. "id": {
  17135. "type": "string"
  17136. },
  17137. "type": {
  17138. "type": "string",
  17139. "enum": ["session.next.text.started"]
  17140. },
  17141. "properties": {
  17142. "type": "object",
  17143. "properties": {
  17144. "timestamp": {
  17145. "type": "number"
  17146. },
  17147. "sessionID": {
  17148. "type": "string"
  17149. }
  17150. },
  17151. "required": ["timestamp", "sessionID"],
  17152. "additionalProperties": false
  17153. }
  17154. },
  17155. "required": ["id", "type", "properties"],
  17156. "additionalProperties": false
  17157. },
  17158. "EventSessionNextTextDelta": {
  17159. "type": "object",
  17160. "properties": {
  17161. "id": {
  17162. "type": "string"
  17163. },
  17164. "type": {
  17165. "type": "string",
  17166. "enum": ["session.next.text.delta"]
  17167. },
  17168. "properties": {
  17169. "type": "object",
  17170. "properties": {
  17171. "timestamp": {
  17172. "type": "number"
  17173. },
  17174. "sessionID": {
  17175. "type": "string"
  17176. },
  17177. "delta": {
  17178. "type": "string"
  17179. }
  17180. },
  17181. "required": ["timestamp", "sessionID", "delta"],
  17182. "additionalProperties": false
  17183. }
  17184. },
  17185. "required": ["id", "type", "properties"],
  17186. "additionalProperties": false
  17187. },
  17188. "EventSessionNextTextEnded": {
  17189. "type": "object",
  17190. "properties": {
  17191. "id": {
  17192. "type": "string"
  17193. },
  17194. "type": {
  17195. "type": "string",
  17196. "enum": ["session.next.text.ended"]
  17197. },
  17198. "properties": {
  17199. "type": "object",
  17200. "properties": {
  17201. "timestamp": {
  17202. "type": "number"
  17203. },
  17204. "sessionID": {
  17205. "type": "string"
  17206. },
  17207. "text": {
  17208. "type": "string"
  17209. }
  17210. },
  17211. "required": ["timestamp", "sessionID", "text"],
  17212. "additionalProperties": false
  17213. }
  17214. },
  17215. "required": ["id", "type", "properties"],
  17216. "additionalProperties": false
  17217. },
  17218. "EventSessionNextReasoningStarted": {
  17219. "type": "object",
  17220. "properties": {
  17221. "id": {
  17222. "type": "string"
  17223. },
  17224. "type": {
  17225. "type": "string",
  17226. "enum": ["session.next.reasoning.started"]
  17227. },
  17228. "properties": {
  17229. "type": "object",
  17230. "properties": {
  17231. "timestamp": {
  17232. "type": "number"
  17233. },
  17234. "sessionID": {
  17235. "type": "string"
  17236. },
  17237. "reasoningID": {
  17238. "type": "string"
  17239. }
  17240. },
  17241. "required": ["timestamp", "sessionID", "reasoningID"],
  17242. "additionalProperties": false
  17243. }
  17244. },
  17245. "required": ["id", "type", "properties"],
  17246. "additionalProperties": false
  17247. },
  17248. "EventSessionNextReasoningDelta": {
  17249. "type": "object",
  17250. "properties": {
  17251. "id": {
  17252. "type": "string"
  17253. },
  17254. "type": {
  17255. "type": "string",
  17256. "enum": ["session.next.reasoning.delta"]
  17257. },
  17258. "properties": {
  17259. "type": "object",
  17260. "properties": {
  17261. "timestamp": {
  17262. "type": "number"
  17263. },
  17264. "sessionID": {
  17265. "type": "string"
  17266. },
  17267. "reasoningID": {
  17268. "type": "string"
  17269. },
  17270. "delta": {
  17271. "type": "string"
  17272. }
  17273. },
  17274. "required": ["timestamp", "sessionID", "reasoningID", "delta"],
  17275. "additionalProperties": false
  17276. }
  17277. },
  17278. "required": ["id", "type", "properties"],
  17279. "additionalProperties": false
  17280. },
  17281. "EventSessionNextReasoningEnded": {
  17282. "type": "object",
  17283. "properties": {
  17284. "id": {
  17285. "type": "string"
  17286. },
  17287. "type": {
  17288. "type": "string",
  17289. "enum": ["session.next.reasoning.ended"]
  17290. },
  17291. "properties": {
  17292. "type": "object",
  17293. "properties": {
  17294. "timestamp": {
  17295. "type": "number"
  17296. },
  17297. "sessionID": {
  17298. "type": "string"
  17299. },
  17300. "reasoningID": {
  17301. "type": "string"
  17302. },
  17303. "text": {
  17304. "type": "string"
  17305. }
  17306. },
  17307. "required": ["timestamp", "sessionID", "reasoningID", "text"],
  17308. "additionalProperties": false
  17309. }
  17310. },
  17311. "required": ["id", "type", "properties"],
  17312. "additionalProperties": false
  17313. },
  17314. "EventSessionNextToolInputStarted": {
  17315. "type": "object",
  17316. "properties": {
  17317. "id": {
  17318. "type": "string"
  17319. },
  17320. "type": {
  17321. "type": "string",
  17322. "enum": ["session.next.tool.input.started"]
  17323. },
  17324. "properties": {
  17325. "type": "object",
  17326. "properties": {
  17327. "timestamp": {
  17328. "type": "number"
  17329. },
  17330. "sessionID": {
  17331. "type": "string"
  17332. },
  17333. "callID": {
  17334. "type": "string"
  17335. },
  17336. "name": {
  17337. "type": "string"
  17338. }
  17339. },
  17340. "required": ["timestamp", "sessionID", "callID", "name"],
  17341. "additionalProperties": false
  17342. }
  17343. },
  17344. "required": ["id", "type", "properties"],
  17345. "additionalProperties": false
  17346. },
  17347. "EventSessionNextToolInputDelta": {
  17348. "type": "object",
  17349. "properties": {
  17350. "id": {
  17351. "type": "string"
  17352. },
  17353. "type": {
  17354. "type": "string",
  17355. "enum": ["session.next.tool.input.delta"]
  17356. },
  17357. "properties": {
  17358. "type": "object",
  17359. "properties": {
  17360. "timestamp": {
  17361. "type": "number"
  17362. },
  17363. "sessionID": {
  17364. "type": "string"
  17365. },
  17366. "callID": {
  17367. "type": "string"
  17368. },
  17369. "delta": {
  17370. "type": "string"
  17371. }
  17372. },
  17373. "required": ["timestamp", "sessionID", "callID", "delta"],
  17374. "additionalProperties": false
  17375. }
  17376. },
  17377. "required": ["id", "type", "properties"],
  17378. "additionalProperties": false
  17379. },
  17380. "EventSessionNextToolInputEnded": {
  17381. "type": "object",
  17382. "properties": {
  17383. "id": {
  17384. "type": "string"
  17385. },
  17386. "type": {
  17387. "type": "string",
  17388. "enum": ["session.next.tool.input.ended"]
  17389. },
  17390. "properties": {
  17391. "type": "object",
  17392. "properties": {
  17393. "timestamp": {
  17394. "type": "number"
  17395. },
  17396. "sessionID": {
  17397. "type": "string"
  17398. },
  17399. "callID": {
  17400. "type": "string"
  17401. },
  17402. "text": {
  17403. "type": "string"
  17404. }
  17405. },
  17406. "required": ["timestamp", "sessionID", "callID", "text"],
  17407. "additionalProperties": false
  17408. }
  17409. },
  17410. "required": ["id", "type", "properties"],
  17411. "additionalProperties": false
  17412. },
  17413. "EventSessionNextToolCalled": {
  17414. "type": "object",
  17415. "properties": {
  17416. "id": {
  17417. "type": "string"
  17418. },
  17419. "type": {
  17420. "type": "string",
  17421. "enum": ["session.next.tool.called"]
  17422. },
  17423. "properties": {
  17424. "type": "object",
  17425. "properties": {
  17426. "timestamp": {
  17427. "type": "number"
  17428. },
  17429. "sessionID": {
  17430. "type": "string"
  17431. },
  17432. "callID": {
  17433. "type": "string"
  17434. },
  17435. "tool": {
  17436. "type": "string"
  17437. },
  17438. "input": {
  17439. "type": "object"
  17440. },
  17441. "provider": {
  17442. "type": "object",
  17443. "properties": {
  17444. "executed": {
  17445. "type": "boolean"
  17446. },
  17447. "metadata": {
  17448. "type": "object"
  17449. }
  17450. },
  17451. "required": ["executed"],
  17452. "additionalProperties": false
  17453. }
  17454. },
  17455. "required": ["timestamp", "sessionID", "callID", "tool", "input", "provider"],
  17456. "additionalProperties": false
  17457. }
  17458. },
  17459. "required": ["id", "type", "properties"],
  17460. "additionalProperties": false
  17461. },
  17462. "ToolTextContent": {
  17463. "type": "object",
  17464. "properties": {
  17465. "type": {
  17466. "type": "string",
  17467. "enum": ["text"]
  17468. },
  17469. "text": {
  17470. "type": "string"
  17471. }
  17472. },
  17473. "required": ["type", "text"],
  17474. "additionalProperties": false
  17475. },
  17476. "ToolFileContent": {
  17477. "type": "object",
  17478. "properties": {
  17479. "type": {
  17480. "type": "string",
  17481. "enum": ["file"]
  17482. },
  17483. "uri": {
  17484. "type": "string"
  17485. },
  17486. "mime": {
  17487. "type": "string"
  17488. },
  17489. "name": {
  17490. "type": "string"
  17491. }
  17492. },
  17493. "required": ["type", "uri", "mime"],
  17494. "additionalProperties": false
  17495. },
  17496. "EventSessionNextToolProgress": {
  17497. "type": "object",
  17498. "properties": {
  17499. "id": {
  17500. "type": "string"
  17501. },
  17502. "type": {
  17503. "type": "string",
  17504. "enum": ["session.next.tool.progress"]
  17505. },
  17506. "properties": {
  17507. "type": "object",
  17508. "properties": {
  17509. "timestamp": {
  17510. "type": "number"
  17511. },
  17512. "sessionID": {
  17513. "type": "string"
  17514. },
  17515. "callID": {
  17516. "type": "string"
  17517. },
  17518. "structured": {
  17519. "type": "object"
  17520. },
  17521. "content": {
  17522. "type": "array",
  17523. "items": {
  17524. "anyOf": [
  17525. {
  17526. "$ref": "#/components/schemas/ToolTextContent"
  17527. },
  17528. {
  17529. "$ref": "#/components/schemas/ToolFileContent"
  17530. }
  17531. ]
  17532. }
  17533. }
  17534. },
  17535. "required": ["timestamp", "sessionID", "callID", "structured", "content"],
  17536. "additionalProperties": false
  17537. }
  17538. },
  17539. "required": ["id", "type", "properties"],
  17540. "additionalProperties": false
  17541. },
  17542. "EventSessionNextToolSuccess": {
  17543. "type": "object",
  17544. "properties": {
  17545. "id": {
  17546. "type": "string"
  17547. },
  17548. "type": {
  17549. "type": "string",
  17550. "enum": ["session.next.tool.success"]
  17551. },
  17552. "properties": {
  17553. "type": "object",
  17554. "properties": {
  17555. "timestamp": {
  17556. "type": "number"
  17557. },
  17558. "sessionID": {
  17559. "type": "string"
  17560. },
  17561. "callID": {
  17562. "type": "string"
  17563. },
  17564. "structured": {
  17565. "type": "object"
  17566. },
  17567. "content": {
  17568. "type": "array",
  17569. "items": {
  17570. "anyOf": [
  17571. {
  17572. "$ref": "#/components/schemas/ToolTextContent"
  17573. },
  17574. {
  17575. "$ref": "#/components/schemas/ToolFileContent"
  17576. }
  17577. ]
  17578. }
  17579. },
  17580. "provider": {
  17581. "type": "object",
  17582. "properties": {
  17583. "executed": {
  17584. "type": "boolean"
  17585. },
  17586. "metadata": {
  17587. "type": "object"
  17588. }
  17589. },
  17590. "required": ["executed"],
  17591. "additionalProperties": false
  17592. }
  17593. },
  17594. "required": ["timestamp", "sessionID", "callID", "structured", "content", "provider"],
  17595. "additionalProperties": false
  17596. }
  17597. },
  17598. "required": ["id", "type", "properties"],
  17599. "additionalProperties": false
  17600. },
  17601. "EventSessionNextToolFailed": {
  17602. "type": "object",
  17603. "properties": {
  17604. "id": {
  17605. "type": "string"
  17606. },
  17607. "type": {
  17608. "type": "string",
  17609. "enum": ["session.next.tool.failed"]
  17610. },
  17611. "properties": {
  17612. "type": "object",
  17613. "properties": {
  17614. "timestamp": {
  17615. "type": "number"
  17616. },
  17617. "sessionID": {
  17618. "type": "string"
  17619. },
  17620. "callID": {
  17621. "type": "string"
  17622. },
  17623. "error": {
  17624. "$ref": "#/components/schemas/SessionErrorUnknown"
  17625. },
  17626. "provider": {
  17627. "type": "object",
  17628. "properties": {
  17629. "executed": {
  17630. "type": "boolean"
  17631. },
  17632. "metadata": {
  17633. "type": "object"
  17634. }
  17635. },
  17636. "required": ["executed"],
  17637. "additionalProperties": false
  17638. }
  17639. },
  17640. "required": ["timestamp", "sessionID", "callID", "error", "provider"],
  17641. "additionalProperties": false
  17642. }
  17643. },
  17644. "required": ["id", "type", "properties"],
  17645. "additionalProperties": false
  17646. },
  17647. "SessionNextRetry_error": {
  17648. "type": "object",
  17649. "properties": {
  17650. "message": {
  17651. "type": "string"
  17652. },
  17653. "statusCode": {
  17654. "type": "number"
  17655. },
  17656. "isRetryable": {
  17657. "type": "boolean"
  17658. },
  17659. "responseHeaders": {
  17660. "type": "object",
  17661. "additionalProperties": {
  17662. "type": "string"
  17663. }
  17664. },
  17665. "responseBody": {
  17666. "type": "string"
  17667. },
  17668. "metadata": {
  17669. "type": "object",
  17670. "additionalProperties": {
  17671. "type": "string"
  17672. }
  17673. }
  17674. },
  17675. "required": ["message", "isRetryable"],
  17676. "additionalProperties": false
  17677. },
  17678. "EventSessionNextRetried": {
  17679. "type": "object",
  17680. "properties": {
  17681. "id": {
  17682. "type": "string"
  17683. },
  17684. "type": {
  17685. "type": "string",
  17686. "enum": ["session.next.retried"]
  17687. },
  17688. "properties": {
  17689. "type": "object",
  17690. "properties": {
  17691. "timestamp": {
  17692. "type": "number"
  17693. },
  17694. "sessionID": {
  17695. "type": "string"
  17696. },
  17697. "attempt": {
  17698. "type": "number"
  17699. },
  17700. "error": {
  17701. "$ref": "#/components/schemas/SessionNextRetry_error"
  17702. }
  17703. },
  17704. "required": ["timestamp", "sessionID", "attempt", "error"],
  17705. "additionalProperties": false
  17706. }
  17707. },
  17708. "required": ["id", "type", "properties"],
  17709. "additionalProperties": false
  17710. },
  17711. "EventSessionNextCompactionStarted": {
  17712. "type": "object",
  17713. "properties": {
  17714. "id": {
  17715. "type": "string"
  17716. },
  17717. "type": {
  17718. "type": "string",
  17719. "enum": ["session.next.compaction.started"]
  17720. },
  17721. "properties": {
  17722. "type": "object",
  17723. "properties": {
  17724. "timestamp": {
  17725. "type": "number"
  17726. },
  17727. "sessionID": {
  17728. "type": "string"
  17729. },
  17730. "reason": {
  17731. "type": "string",
  17732. "enum": ["auto", "manual"]
  17733. }
  17734. },
  17735. "required": ["timestamp", "sessionID", "reason"],
  17736. "additionalProperties": false
  17737. }
  17738. },
  17739. "required": ["id", "type", "properties"],
  17740. "additionalProperties": false
  17741. },
  17742. "EventSessionNextCompactionDelta": {
  17743. "type": "object",
  17744. "properties": {
  17745. "id": {
  17746. "type": "string"
  17747. },
  17748. "type": {
  17749. "type": "string",
  17750. "enum": ["session.next.compaction.delta"]
  17751. },
  17752. "properties": {
  17753. "type": "object",
  17754. "properties": {
  17755. "timestamp": {
  17756. "type": "number"
  17757. },
  17758. "sessionID": {
  17759. "type": "string"
  17760. },
  17761. "text": {
  17762. "type": "string"
  17763. }
  17764. },
  17765. "required": ["timestamp", "sessionID", "text"],
  17766. "additionalProperties": false
  17767. }
  17768. },
  17769. "required": ["id", "type", "properties"],
  17770. "additionalProperties": false
  17771. },
  17772. "EventSessionNextCompactionEnded": {
  17773. "type": "object",
  17774. "properties": {
  17775. "id": {
  17776. "type": "string"
  17777. },
  17778. "type": {
  17779. "type": "string",
  17780. "enum": ["session.next.compaction.ended"]
  17781. },
  17782. "properties": {
  17783. "type": "object",
  17784. "properties": {
  17785. "timestamp": {
  17786. "type": "number"
  17787. },
  17788. "sessionID": {
  17789. "type": "string"
  17790. },
  17791. "text": {
  17792. "type": "string"
  17793. },
  17794. "include": {
  17795. "type": "string"
  17796. }
  17797. },
  17798. "required": ["timestamp", "sessionID", "text"],
  17799. "additionalProperties": false
  17800. }
  17801. },
  17802. "required": ["id", "type", "properties"],
  17803. "additionalProperties": false
  17804. },
  17805. "EventServerConnected": {
  17806. "type": "object",
  17807. "properties": {
  17808. "id": {
  17809. "type": "string"
  17810. },
  17811. "type": {
  17812. "type": "string",
  17813. "enum": ["server.connected"]
  17814. },
  17815. "properties": {
  17816. "type": "object",
  17817. "properties": {}
  17818. }
  17819. },
  17820. "required": ["id", "type", "properties"],
  17821. "additionalProperties": false
  17822. },
  17823. "EventGlobalDisposed": {
  17824. "type": "object",
  17825. "properties": {
  17826. "id": {
  17827. "type": "string"
  17828. },
  17829. "type": {
  17830. "type": "string",
  17831. "enum": ["global.disposed"]
  17832. },
  17833. "properties": {
  17834. "type": "object",
  17835. "properties": {}
  17836. }
  17837. },
  17838. "required": ["id", "type", "properties"],
  17839. "additionalProperties": false
  17840. },
  17841. "SessionInfo": {
  17842. "type": "object",
  17843. "properties": {
  17844. "id": {
  17845. "type": "string"
  17846. },
  17847. "parentID": {
  17848. "type": "string"
  17849. },
  17850. "projectID": {
  17851. "type": "string"
  17852. },
  17853. "workspaceID": {
  17854. "type": "string"
  17855. },
  17856. "path": {
  17857. "type": "string"
  17858. },
  17859. "agent": {
  17860. "type": "string"
  17861. },
  17862. "model": {
  17863. "type": "object",
  17864. "properties": {
  17865. "id": {
  17866. "type": "string"
  17867. },
  17868. "providerID": {
  17869. "type": "string"
  17870. },
  17871. "variant": {
  17872. "type": "string"
  17873. }
  17874. },
  17875. "required": ["id", "providerID", "variant"],
  17876. "additionalProperties": false
  17877. },
  17878. "time": {
  17879. "type": "object",
  17880. "properties": {
  17881. "created": {
  17882. "type": "number"
  17883. },
  17884. "updated": {
  17885. "type": "number"
  17886. },
  17887. "archived": {
  17888. "type": "number"
  17889. }
  17890. },
  17891. "required": ["created", "updated"],
  17892. "additionalProperties": false
  17893. },
  17894. "title": {
  17895. "type": "string"
  17896. }
  17897. },
  17898. "required": ["id", "projectID", "time", "title"],
  17899. "additionalProperties": false
  17900. },
  17901. "SessionDelivery": {
  17902. "type": "string",
  17903. "enum": ["immediate", "deferred"]
  17904. },
  17905. "SessionMessageAgentSwitched": {
  17906. "type": "object",
  17907. "properties": {
  17908. "id": {
  17909. "type": "string"
  17910. },
  17911. "metadata": {
  17912. "type": "object"
  17913. },
  17914. "time": {
  17915. "type": "object",
  17916. "properties": {
  17917. "created": {
  17918. "type": "number"
  17919. }
  17920. },
  17921. "required": ["created"],
  17922. "additionalProperties": false
  17923. },
  17924. "type": {
  17925. "type": "string",
  17926. "enum": ["agent-switched"]
  17927. },
  17928. "agent": {
  17929. "type": "string"
  17930. }
  17931. },
  17932. "required": ["id", "time", "type", "agent"],
  17933. "additionalProperties": false
  17934. },
  17935. "SessionMessageModelSwitched": {
  17936. "type": "object",
  17937. "properties": {
  17938. "id": {
  17939. "type": "string"
  17940. },
  17941. "metadata": {
  17942. "type": "object"
  17943. },
  17944. "time": {
  17945. "type": "object",
  17946. "properties": {
  17947. "created": {
  17948. "type": "number"
  17949. }
  17950. },
  17951. "required": ["created"],
  17952. "additionalProperties": false
  17953. },
  17954. "type": {
  17955. "type": "string",
  17956. "enum": ["model-switched"]
  17957. },
  17958. "model": {
  17959. "type": "object",
  17960. "properties": {
  17961. "id": {
  17962. "type": "string"
  17963. },
  17964. "providerID": {
  17965. "type": "string"
  17966. },
  17967. "variant": {
  17968. "type": "string"
  17969. }
  17970. },
  17971. "required": ["id", "providerID", "variant"],
  17972. "additionalProperties": false
  17973. }
  17974. },
  17975. "required": ["id", "time", "type", "model"],
  17976. "additionalProperties": false
  17977. },
  17978. "SessionMessageUser": {
  17979. "type": "object",
  17980. "properties": {
  17981. "id": {
  17982. "type": "string"
  17983. },
  17984. "metadata": {
  17985. "type": "object"
  17986. },
  17987. "time": {
  17988. "type": "object",
  17989. "properties": {
  17990. "created": {
  17991. "type": "number"
  17992. }
  17993. },
  17994. "required": ["created"],
  17995. "additionalProperties": false
  17996. },
  17997. "text": {
  17998. "type": "string"
  17999. },
  18000. "files": {
  18001. "type": "array",
  18002. "items": {
  18003. "$ref": "#/components/schemas/PromptFileAttachment"
  18004. }
  18005. },
  18006. "agents": {
  18007. "type": "array",
  18008. "items": {
  18009. "$ref": "#/components/schemas/PromptAgentAttachment"
  18010. }
  18011. },
  18012. "type": {
  18013. "type": "string",
  18014. "enum": ["user"]
  18015. }
  18016. },
  18017. "required": ["id", "time", "text", "type"],
  18018. "additionalProperties": false
  18019. },
  18020. "SessionMessageSynthetic": {
  18021. "type": "object",
  18022. "properties": {
  18023. "id": {
  18024. "type": "string"
  18025. },
  18026. "metadata": {
  18027. "type": "object"
  18028. },
  18029. "time": {
  18030. "type": "object",
  18031. "properties": {
  18032. "created": {
  18033. "type": "number"
  18034. }
  18035. },
  18036. "required": ["created"],
  18037. "additionalProperties": false
  18038. },
  18039. "sessionID": {
  18040. "type": "string"
  18041. },
  18042. "text": {
  18043. "type": "string"
  18044. },
  18045. "type": {
  18046. "type": "string",
  18047. "enum": ["synthetic"]
  18048. }
  18049. },
  18050. "required": ["id", "time", "sessionID", "text", "type"],
  18051. "additionalProperties": false
  18052. },
  18053. "SessionMessageShell": {
  18054. "type": "object",
  18055. "properties": {
  18056. "id": {
  18057. "type": "string"
  18058. },
  18059. "metadata": {
  18060. "type": "object"
  18061. },
  18062. "time": {
  18063. "type": "object",
  18064. "properties": {
  18065. "created": {
  18066. "type": "number"
  18067. },
  18068. "completed": {
  18069. "type": "number"
  18070. }
  18071. },
  18072. "required": ["created"],
  18073. "additionalProperties": false
  18074. },
  18075. "type": {
  18076. "type": "string",
  18077. "enum": ["shell"]
  18078. },
  18079. "callID": {
  18080. "type": "string"
  18081. },
  18082. "command": {
  18083. "type": "string"
  18084. },
  18085. "output": {
  18086. "type": "string"
  18087. }
  18088. },
  18089. "required": ["id", "time", "type", "callID", "command", "output"],
  18090. "additionalProperties": false
  18091. },
  18092. "SessionMessageAssistantText": {
  18093. "type": "object",
  18094. "properties": {
  18095. "type": {
  18096. "type": "string",
  18097. "enum": ["text"]
  18098. },
  18099. "text": {
  18100. "type": "string"
  18101. }
  18102. },
  18103. "required": ["type", "text"],
  18104. "additionalProperties": false
  18105. },
  18106. "SessionMessageAssistantReasoning": {
  18107. "type": "object",
  18108. "properties": {
  18109. "type": {
  18110. "type": "string",
  18111. "enum": ["reasoning"]
  18112. },
  18113. "id": {
  18114. "type": "string"
  18115. },
  18116. "text": {
  18117. "type": "string"
  18118. }
  18119. },
  18120. "required": ["type", "id", "text"],
  18121. "additionalProperties": false
  18122. },
  18123. "SessionMessageToolStatePending": {
  18124. "type": "object",
  18125. "properties": {
  18126. "status": {
  18127. "type": "string",
  18128. "enum": ["pending"]
  18129. },
  18130. "input": {
  18131. "type": "string"
  18132. }
  18133. },
  18134. "required": ["status", "input"],
  18135. "additionalProperties": false
  18136. },
  18137. "SessionMessageToolStateRunning": {
  18138. "type": "object",
  18139. "properties": {
  18140. "status": {
  18141. "type": "string",
  18142. "enum": ["running"]
  18143. },
  18144. "input": {
  18145. "type": "object"
  18146. },
  18147. "structured": {
  18148. "type": "object"
  18149. },
  18150. "content": {
  18151. "type": "array",
  18152. "items": {
  18153. "anyOf": [
  18154. {
  18155. "$ref": "#/components/schemas/ToolTextContent"
  18156. },
  18157. {
  18158. "$ref": "#/components/schemas/ToolFileContent"
  18159. }
  18160. ]
  18161. }
  18162. }
  18163. },
  18164. "required": ["status", "input", "structured", "content"],
  18165. "additionalProperties": false
  18166. },
  18167. "SessionMessageToolStateCompleted": {
  18168. "type": "object",
  18169. "properties": {
  18170. "status": {
  18171. "type": "string",
  18172. "enum": ["completed"]
  18173. },
  18174. "input": {
  18175. "type": "object"
  18176. },
  18177. "attachments": {
  18178. "type": "array",
  18179. "items": {
  18180. "$ref": "#/components/schemas/PromptFileAttachment"
  18181. }
  18182. },
  18183. "content": {
  18184. "type": "array",
  18185. "items": {
  18186. "anyOf": [
  18187. {
  18188. "$ref": "#/components/schemas/ToolTextContent"
  18189. },
  18190. {
  18191. "$ref": "#/components/schemas/ToolFileContent"
  18192. }
  18193. ]
  18194. }
  18195. },
  18196. "structured": {
  18197. "type": "object"
  18198. }
  18199. },
  18200. "required": ["status", "input", "content", "structured"],
  18201. "additionalProperties": false
  18202. },
  18203. "SessionMessageToolStateError": {
  18204. "type": "object",
  18205. "properties": {
  18206. "status": {
  18207. "type": "string",
  18208. "enum": ["error"]
  18209. },
  18210. "input": {
  18211. "type": "object"
  18212. },
  18213. "content": {
  18214. "type": "array",
  18215. "items": {
  18216. "anyOf": [
  18217. {
  18218. "$ref": "#/components/schemas/ToolTextContent"
  18219. },
  18220. {
  18221. "$ref": "#/components/schemas/ToolFileContent"
  18222. }
  18223. ]
  18224. }
  18225. },
  18226. "structured": {
  18227. "type": "object"
  18228. },
  18229. "error": {
  18230. "$ref": "#/components/schemas/SessionErrorUnknown"
  18231. }
  18232. },
  18233. "required": ["status", "input", "content", "structured", "error"],
  18234. "additionalProperties": false
  18235. },
  18236. "SessionMessageAssistantTool": {
  18237. "type": "object",
  18238. "properties": {
  18239. "type": {
  18240. "type": "string",
  18241. "enum": ["tool"]
  18242. },
  18243. "id": {
  18244. "type": "string"
  18245. },
  18246. "name": {
  18247. "type": "string"
  18248. },
  18249. "provider": {
  18250. "type": "object",
  18251. "properties": {
  18252. "executed": {
  18253. "type": "boolean"
  18254. },
  18255. "metadata": {
  18256. "type": "object"
  18257. }
  18258. },
  18259. "required": ["executed"],
  18260. "additionalProperties": false
  18261. },
  18262. "state": {
  18263. "anyOf": [
  18264. {
  18265. "$ref": "#/components/schemas/SessionMessageToolStatePending"
  18266. },
  18267. {
  18268. "$ref": "#/components/schemas/SessionMessageToolStateRunning"
  18269. },
  18270. {
  18271. "$ref": "#/components/schemas/SessionMessageToolStateCompleted"
  18272. },
  18273. {
  18274. "$ref": "#/components/schemas/SessionMessageToolStateError"
  18275. }
  18276. ]
  18277. },
  18278. "time": {
  18279. "type": "object",
  18280. "properties": {
  18281. "created": {
  18282. "type": "number"
  18283. },
  18284. "ran": {
  18285. "type": "number"
  18286. },
  18287. "completed": {
  18288. "type": "number"
  18289. },
  18290. "pruned": {
  18291. "type": "number"
  18292. }
  18293. },
  18294. "required": ["created"],
  18295. "additionalProperties": false
  18296. }
  18297. },
  18298. "required": ["type", "id", "name", "state", "time"],
  18299. "additionalProperties": false
  18300. },
  18301. "SessionMessageAssistant": {
  18302. "type": "object",
  18303. "properties": {
  18304. "id": {
  18305. "type": "string"
  18306. },
  18307. "metadata": {
  18308. "type": "object"
  18309. },
  18310. "time": {
  18311. "type": "object",
  18312. "properties": {
  18313. "created": {
  18314. "type": "number"
  18315. },
  18316. "completed": {
  18317. "type": "number"
  18318. }
  18319. },
  18320. "required": ["created"],
  18321. "additionalProperties": false
  18322. },
  18323. "type": {
  18324. "type": "string",
  18325. "enum": ["assistant"]
  18326. },
  18327. "agent": {
  18328. "type": "string"
  18329. },
  18330. "model": {
  18331. "type": "object",
  18332. "properties": {
  18333. "id": {
  18334. "type": "string"
  18335. },
  18336. "providerID": {
  18337. "type": "string"
  18338. },
  18339. "variant": {
  18340. "type": "string"
  18341. }
  18342. },
  18343. "required": ["id", "providerID", "variant"],
  18344. "additionalProperties": false
  18345. },
  18346. "content": {
  18347. "type": "array",
  18348. "items": {
  18349. "anyOf": [
  18350. {
  18351. "$ref": "#/components/schemas/SessionMessageAssistantText"
  18352. },
  18353. {
  18354. "$ref": "#/components/schemas/SessionMessageAssistantReasoning"
  18355. },
  18356. {
  18357. "$ref": "#/components/schemas/SessionMessageAssistantTool"
  18358. }
  18359. ]
  18360. }
  18361. },
  18362. "snapshot": {
  18363. "type": "object",
  18364. "properties": {
  18365. "start": {
  18366. "type": "string"
  18367. },
  18368. "end": {
  18369. "type": "string"
  18370. }
  18371. },
  18372. "additionalProperties": false
  18373. },
  18374. "finish": {
  18375. "type": "string"
  18376. },
  18377. "cost": {
  18378. "type": "number"
  18379. },
  18380. "tokens": {
  18381. "type": "object",
  18382. "properties": {
  18383. "input": {
  18384. "type": "number"
  18385. },
  18386. "output": {
  18387. "type": "number"
  18388. },
  18389. "reasoning": {
  18390. "type": "number"
  18391. },
  18392. "cache": {
  18393. "type": "object",
  18394. "properties": {
  18395. "read": {
  18396. "type": "number"
  18397. },
  18398. "write": {
  18399. "type": "number"
  18400. }
  18401. },
  18402. "required": ["read", "write"],
  18403. "additionalProperties": false
  18404. }
  18405. },
  18406. "required": ["input", "output", "reasoning", "cache"],
  18407. "additionalProperties": false
  18408. },
  18409. "error": {
  18410. "$ref": "#/components/schemas/SessionErrorUnknown"
  18411. }
  18412. },
  18413. "required": ["id", "time", "type", "agent", "model", "content"],
  18414. "additionalProperties": false
  18415. },
  18416. "SessionMessageCompaction": {
  18417. "type": "object",
  18418. "properties": {
  18419. "type": {
  18420. "type": "string",
  18421. "enum": ["compaction"]
  18422. },
  18423. "reason": {
  18424. "type": "string",
  18425. "enum": ["auto", "manual"]
  18426. },
  18427. "summary": {
  18428. "type": "string"
  18429. },
  18430. "include": {
  18431. "type": "string"
  18432. },
  18433. "id": {
  18434. "type": "string"
  18435. },
  18436. "metadata": {
  18437. "type": "object"
  18438. },
  18439. "time": {
  18440. "type": "object",
  18441. "properties": {
  18442. "created": {
  18443. "type": "number"
  18444. }
  18445. },
  18446. "required": ["created"],
  18447. "additionalProperties": false
  18448. }
  18449. },
  18450. "required": ["type", "reason", "summary", "id", "time"],
  18451. "additionalProperties": false
  18452. },
  18453. "SessionMessage": {
  18454. "anyOf": [
  18455. {
  18456. "$ref": "#/components/schemas/SessionMessageAgentSwitched"
  18457. },
  18458. {
  18459. "$ref": "#/components/schemas/SessionMessageModelSwitched"
  18460. },
  18461. {
  18462. "$ref": "#/components/schemas/SessionMessageUser"
  18463. },
  18464. {
  18465. "$ref": "#/components/schemas/SessionMessageSynthetic"
  18466. },
  18467. {
  18468. "$ref": "#/components/schemas/SessionMessageShell"
  18469. },
  18470. {
  18471. "$ref": "#/components/schemas/SessionMessageAssistant"
  18472. },
  18473. {
  18474. "$ref": "#/components/schemas/SessionMessageCompaction"
  18475. }
  18476. ]
  18477. },
  18478. "EventTuiToastShow1": {
  18479. "type": "object",
  18480. "properties": {
  18481. "id": {
  18482. "type": "string"
  18483. },
  18484. "type": {
  18485. "type": "string",
  18486. "enum": ["tui.toast.show"]
  18487. },
  18488. "properties": {
  18489. "type": "object",
  18490. "properties": {
  18491. "title": {
  18492. "type": "string"
  18493. },
  18494. "message": {
  18495. "type": "string"
  18496. },
  18497. "variant": {
  18498. "type": "string",
  18499. "enum": ["info", "success", "warning", "error"]
  18500. },
  18501. "duration": {
  18502. "type": "integer",
  18503. "exclusiveMinimum": 0
  18504. }
  18505. },
  18506. "required": ["message", "variant"],
  18507. "additionalProperties": false
  18508. }
  18509. },
  18510. "required": ["id", "type", "properties"],
  18511. "additionalProperties": false
  18512. },
  18513. "BadRequestError": {
  18514. "type": "object",
  18515. "required": ["data", "errors", "success"],
  18516. "properties": {
  18517. "data": {},
  18518. "errors": {
  18519. "type": "array",
  18520. "items": {
  18521. "type": "object",
  18522. "additionalProperties": {}
  18523. }
  18524. },
  18525. "success": {
  18526. "type": "boolean",
  18527. "enum": [false]
  18528. }
  18529. }
  18530. }
  18531. }
  18532. },
  18533. "security": [],
  18534. "tags": [
  18535. {
  18536. "name": "control",
  18537. "description": "Control plane routes."
  18538. },
  18539. {
  18540. "name": "global",
  18541. "description": "Global server routes."
  18542. },
  18543. {
  18544. "name": "event",
  18545. "description": "Instance event stream route."
  18546. },
  18547. {
  18548. "name": "config",
  18549. "description": "Experimental HttpApi config routes."
  18550. },
  18551. {
  18552. "name": "experimental",
  18553. "description": "Experimental HttpApi read-only routes."
  18554. },
  18555. {
  18556. "name": "file",
  18557. "description": "Experimental HttpApi file routes."
  18558. },
  18559. {
  18560. "name": "instance",
  18561. "description": "Experimental HttpApi instance read routes."
  18562. },
  18563. {
  18564. "name": "mcp",
  18565. "description": "Experimental HttpApi MCP routes."
  18566. },
  18567. {
  18568. "name": "project",
  18569. "description": "Experimental HttpApi project routes."
  18570. },
  18571. {
  18572. "name": "pty",
  18573. "description": "Experimental HttpApi PTY routes."
  18574. },
  18575. {
  18576. "name": "question",
  18577. "description": "Question routes."
  18578. },
  18579. {
  18580. "name": "permission",
  18581. "description": "Experimental HttpApi permission routes."
  18582. },
  18583. {
  18584. "name": "provider",
  18585. "description": "Experimental HttpApi provider routes."
  18586. },
  18587. {
  18588. "name": "session",
  18589. "description": "Experimental HttpApi session routes."
  18590. },
  18591. {
  18592. "name": "sync",
  18593. "description": "Experimental HttpApi sync routes."
  18594. },
  18595. {
  18596. "name": "v2",
  18597. "description": "Experimental v2 routes."
  18598. },
  18599. {
  18600. "name": "v2 messages",
  18601. "description": "Experimental v2 message routes."
  18602. },
  18603. {
  18604. "name": "tui",
  18605. "description": "Experimental HttpApi TUI routes."
  18606. },
  18607. {
  18608. "name": "workspace",
  18609. "description": "Experimental HttpApi workspace routes."
  18610. },
  18611. {
  18612. "name": "pty",
  18613. "description": "PTY websocket route."
  18614. }
  18615. ]
  18616. }