openapi.json 158 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190
  1. {
  2. "openapi": "3.1.1",
  3. "info": {
  4. "title": "opencode",
  5. "description": "opencode api",
  6. "version": "1.0.0"
  7. },
  8. "paths": {
  9. "/project": {
  10. "get": {
  11. "operationId": "project.list",
  12. "parameters": [
  13. {
  14. "in": "query",
  15. "name": "directory",
  16. "schema": {
  17. "type": "string"
  18. }
  19. }
  20. ],
  21. "description": "List all projects",
  22. "responses": {
  23. "200": {
  24. "description": "List of projects",
  25. "content": {
  26. "application/json": {
  27. "schema": {
  28. "type": "array",
  29. "items": {
  30. "$ref": "#/components/schemas/Project"
  31. }
  32. }
  33. }
  34. }
  35. }
  36. }
  37. }
  38. },
  39. "/project/current": {
  40. "get": {
  41. "operationId": "project.current",
  42. "parameters": [
  43. {
  44. "in": "query",
  45. "name": "directory",
  46. "schema": {
  47. "type": "string"
  48. }
  49. }
  50. ],
  51. "description": "Get the current project",
  52. "responses": {
  53. "200": {
  54. "description": "Current project",
  55. "content": {
  56. "application/json": {
  57. "schema": {
  58. "$ref": "#/components/schemas/Project"
  59. }
  60. }
  61. }
  62. }
  63. }
  64. }
  65. },
  66. "/config": {
  67. "get": {
  68. "operationId": "config.get",
  69. "parameters": [
  70. {
  71. "in": "query",
  72. "name": "directory",
  73. "schema": {
  74. "type": "string"
  75. }
  76. }
  77. ],
  78. "description": "Get config info",
  79. "responses": {
  80. "200": {
  81. "description": "Get config info",
  82. "content": {
  83. "application/json": {
  84. "schema": {
  85. "$ref": "#/components/schemas/Config"
  86. }
  87. }
  88. }
  89. }
  90. }
  91. },
  92. "patch": {
  93. "operationId": "config.update",
  94. "parameters": [
  95. {
  96. "in": "query",
  97. "name": "directory",
  98. "schema": {
  99. "type": "string"
  100. }
  101. },
  102. {
  103. "in": "query",
  104. "name": "directory",
  105. "schema": {
  106. "type": "string"
  107. }
  108. }
  109. ],
  110. "description": "Update config",
  111. "responses": {
  112. "200": {
  113. "description": "Successfully updated config",
  114. "content": {
  115. "application/json": {
  116. "schema": {
  117. "$ref": "#/components/schemas/Config"
  118. }
  119. }
  120. }
  121. },
  122. "400": {
  123. "description": "Bad request",
  124. "content": {
  125. "application/json": {
  126. "schema": {
  127. "$ref": "#/components/schemas/BadRequestError"
  128. }
  129. }
  130. }
  131. }
  132. },
  133. "requestBody": {
  134. "content": {
  135. "application/json": {
  136. "schema": {
  137. "$ref": "#/components/schemas/Config"
  138. }
  139. }
  140. }
  141. }
  142. }
  143. },
  144. "/experimental/tool/ids": {
  145. "get": {
  146. "operationId": "tool.ids",
  147. "parameters": [
  148. {
  149. "in": "query",
  150. "name": "directory",
  151. "schema": {
  152. "type": "string"
  153. }
  154. }
  155. ],
  156. "description": "List all tool IDs (including built-in and dynamically registered)",
  157. "responses": {
  158. "200": {
  159. "description": "Tool IDs",
  160. "content": {
  161. "application/json": {
  162. "schema": {
  163. "$ref": "#/components/schemas/ToolIDs"
  164. }
  165. }
  166. }
  167. },
  168. "400": {
  169. "description": "Bad request",
  170. "content": {
  171. "application/json": {
  172. "schema": {
  173. "$ref": "#/components/schemas/BadRequestError"
  174. }
  175. }
  176. }
  177. }
  178. }
  179. }
  180. },
  181. "/experimental/tool": {
  182. "get": {
  183. "operationId": "tool.list",
  184. "parameters": [
  185. {
  186. "in": "query",
  187. "name": "directory",
  188. "schema": {
  189. "type": "string"
  190. }
  191. },
  192. {
  193. "in": "query",
  194. "name": "directory",
  195. "schema": {
  196. "type": "string"
  197. }
  198. },
  199. {
  200. "in": "query",
  201. "name": "provider",
  202. "schema": {
  203. "type": "string"
  204. },
  205. "required": true
  206. },
  207. {
  208. "in": "query",
  209. "name": "model",
  210. "schema": {
  211. "type": "string"
  212. },
  213. "required": true
  214. }
  215. ],
  216. "description": "List tools with JSON schema parameters for a provider/model",
  217. "responses": {
  218. "200": {
  219. "description": "Tools",
  220. "content": {
  221. "application/json": {
  222. "schema": {
  223. "$ref": "#/components/schemas/ToolList"
  224. }
  225. }
  226. }
  227. },
  228. "400": {
  229. "description": "Bad request",
  230. "content": {
  231. "application/json": {
  232. "schema": {
  233. "$ref": "#/components/schemas/BadRequestError"
  234. }
  235. }
  236. }
  237. }
  238. }
  239. }
  240. },
  241. "/path": {
  242. "get": {
  243. "operationId": "path.get",
  244. "parameters": [
  245. {
  246. "in": "query",
  247. "name": "directory",
  248. "schema": {
  249. "type": "string"
  250. }
  251. }
  252. ],
  253. "description": "Get the current path",
  254. "responses": {
  255. "200": {
  256. "description": "Path",
  257. "content": {
  258. "application/json": {
  259. "schema": {
  260. "$ref": "#/components/schemas/Path"
  261. }
  262. }
  263. }
  264. }
  265. }
  266. }
  267. },
  268. "/session": {
  269. "get": {
  270. "operationId": "session.list",
  271. "parameters": [
  272. {
  273. "in": "query",
  274. "name": "directory",
  275. "schema": {
  276. "type": "string"
  277. }
  278. }
  279. ],
  280. "description": "List all sessions",
  281. "responses": {
  282. "200": {
  283. "description": "List of sessions",
  284. "content": {
  285. "application/json": {
  286. "schema": {
  287. "type": "array",
  288. "items": {
  289. "$ref": "#/components/schemas/Session"
  290. }
  291. }
  292. }
  293. }
  294. }
  295. }
  296. },
  297. "post": {
  298. "operationId": "session.create",
  299. "parameters": [
  300. {
  301. "in": "query",
  302. "name": "directory",
  303. "schema": {
  304. "type": "string"
  305. }
  306. },
  307. {
  308. "in": "query",
  309. "name": "directory",
  310. "schema": {
  311. "type": "string"
  312. }
  313. }
  314. ],
  315. "description": "Create a new session",
  316. "responses": {
  317. "200": {
  318. "description": "Successfully created session",
  319. "content": {
  320. "application/json": {
  321. "schema": {
  322. "$ref": "#/components/schemas/Session"
  323. }
  324. }
  325. }
  326. },
  327. "400": {
  328. "description": "Bad request",
  329. "content": {
  330. "application/json": {
  331. "schema": {
  332. "$ref": "#/components/schemas/BadRequestError"
  333. }
  334. }
  335. }
  336. }
  337. },
  338. "requestBody": {
  339. "content": {
  340. "application/json": {
  341. "schema": {
  342. "type": "object",
  343. "properties": {
  344. "parentID": {
  345. "type": "string",
  346. "pattern": "^ses.*"
  347. },
  348. "title": {
  349. "type": "string"
  350. }
  351. }
  352. }
  353. }
  354. }
  355. }
  356. }
  357. },
  358. "/session/{id}": {
  359. "get": {
  360. "operationId": "session.get",
  361. "parameters": [
  362. {
  363. "in": "query",
  364. "name": "directory",
  365. "schema": {
  366. "type": "string"
  367. }
  368. },
  369. {
  370. "in": "query",
  371. "name": "directory",
  372. "schema": {
  373. "type": "string"
  374. }
  375. },
  376. {
  377. "in": "path",
  378. "name": "id",
  379. "schema": {
  380. "type": "string",
  381. "pattern": "^ses.*"
  382. },
  383. "required": true
  384. }
  385. ],
  386. "description": "Get session",
  387. "responses": {
  388. "200": {
  389. "description": "Get session",
  390. "content": {
  391. "application/json": {
  392. "schema": {
  393. "$ref": "#/components/schemas/Session"
  394. }
  395. }
  396. }
  397. },
  398. "400": {
  399. "description": "Bad request",
  400. "content": {
  401. "application/json": {
  402. "schema": {
  403. "$ref": "#/components/schemas/BadRequestError"
  404. }
  405. }
  406. }
  407. },
  408. "404": {
  409. "description": "Not found",
  410. "content": {
  411. "application/json": {
  412. "schema": {
  413. "$ref": "#/components/schemas/NotFoundError"
  414. }
  415. }
  416. }
  417. }
  418. }
  419. },
  420. "delete": {
  421. "operationId": "session.delete",
  422. "parameters": [
  423. {
  424. "in": "query",
  425. "name": "directory",
  426. "schema": {
  427. "type": "string"
  428. }
  429. },
  430. {
  431. "in": "query",
  432. "name": "directory",
  433. "schema": {
  434. "type": "string"
  435. }
  436. },
  437. {
  438. "in": "path",
  439. "name": "id",
  440. "schema": {
  441. "type": "string",
  442. "pattern": "^ses.*"
  443. },
  444. "required": true
  445. }
  446. ],
  447. "description": "Delete a session and all its data",
  448. "responses": {
  449. "200": {
  450. "description": "Successfully deleted session",
  451. "content": {
  452. "application/json": {
  453. "schema": {
  454. "type": "boolean"
  455. }
  456. }
  457. }
  458. },
  459. "400": {
  460. "description": "Bad request",
  461. "content": {
  462. "application/json": {
  463. "schema": {
  464. "$ref": "#/components/schemas/BadRequestError"
  465. }
  466. }
  467. }
  468. },
  469. "404": {
  470. "description": "Not found",
  471. "content": {
  472. "application/json": {
  473. "schema": {
  474. "$ref": "#/components/schemas/NotFoundError"
  475. }
  476. }
  477. }
  478. }
  479. }
  480. },
  481. "patch": {
  482. "operationId": "session.update",
  483. "parameters": [
  484. {
  485. "in": "query",
  486. "name": "directory",
  487. "schema": {
  488. "type": "string"
  489. }
  490. },
  491. {
  492. "in": "query",
  493. "name": "directory",
  494. "schema": {
  495. "type": "string"
  496. }
  497. },
  498. {
  499. "in": "query",
  500. "name": "directory",
  501. "schema": {
  502. "type": "string"
  503. }
  504. },
  505. {
  506. "in": "path",
  507. "name": "id",
  508. "schema": {
  509. "type": "string"
  510. },
  511. "required": true
  512. }
  513. ],
  514. "description": "Update session properties",
  515. "responses": {
  516. "200": {
  517. "description": "Successfully updated session",
  518. "content": {
  519. "application/json": {
  520. "schema": {
  521. "$ref": "#/components/schemas/Session"
  522. }
  523. }
  524. }
  525. },
  526. "400": {
  527. "description": "Bad request",
  528. "content": {
  529. "application/json": {
  530. "schema": {
  531. "$ref": "#/components/schemas/BadRequestError"
  532. }
  533. }
  534. }
  535. },
  536. "404": {
  537. "description": "Not found",
  538. "content": {
  539. "application/json": {
  540. "schema": {
  541. "$ref": "#/components/schemas/NotFoundError"
  542. }
  543. }
  544. }
  545. }
  546. },
  547. "requestBody": {
  548. "content": {
  549. "application/json": {
  550. "schema": {
  551. "type": "object",
  552. "properties": {
  553. "title": {
  554. "type": "string"
  555. }
  556. }
  557. }
  558. }
  559. }
  560. }
  561. }
  562. },
  563. "/session/{id}/children": {
  564. "get": {
  565. "operationId": "session.children",
  566. "parameters": [
  567. {
  568. "in": "query",
  569. "name": "directory",
  570. "schema": {
  571. "type": "string"
  572. }
  573. },
  574. {
  575. "in": "query",
  576. "name": "directory",
  577. "schema": {
  578. "type": "string"
  579. }
  580. },
  581. {
  582. "in": "path",
  583. "name": "id",
  584. "schema": {
  585. "type": "string",
  586. "pattern": "^ses.*"
  587. },
  588. "required": true
  589. }
  590. ],
  591. "description": "Get a session's children",
  592. "responses": {
  593. "200": {
  594. "description": "List of children",
  595. "content": {
  596. "application/json": {
  597. "schema": {
  598. "type": "array",
  599. "items": {
  600. "$ref": "#/components/schemas/Session"
  601. }
  602. }
  603. }
  604. }
  605. },
  606. "400": {
  607. "description": "Bad request",
  608. "content": {
  609. "application/json": {
  610. "schema": {
  611. "$ref": "#/components/schemas/BadRequestError"
  612. }
  613. }
  614. }
  615. },
  616. "404": {
  617. "description": "Not found",
  618. "content": {
  619. "application/json": {
  620. "schema": {
  621. "$ref": "#/components/schemas/NotFoundError"
  622. }
  623. }
  624. }
  625. }
  626. }
  627. }
  628. },
  629. "/session/{id}/todo": {
  630. "get": {
  631. "operationId": "session.todo",
  632. "parameters": [
  633. {
  634. "in": "query",
  635. "name": "directory",
  636. "schema": {
  637. "type": "string"
  638. }
  639. },
  640. {
  641. "in": "query",
  642. "name": "directory",
  643. "schema": {
  644. "type": "string"
  645. }
  646. },
  647. {
  648. "in": "path",
  649. "name": "id",
  650. "schema": {
  651. "type": "string"
  652. },
  653. "required": true,
  654. "description": "Session ID"
  655. }
  656. ],
  657. "description": "Get the todo list for a session",
  658. "responses": {
  659. "200": {
  660. "description": "Todo list",
  661. "content": {
  662. "application/json": {
  663. "schema": {
  664. "type": "array",
  665. "items": {
  666. "$ref": "#/components/schemas/Todo"
  667. }
  668. }
  669. }
  670. }
  671. },
  672. "400": {
  673. "description": "Bad request",
  674. "content": {
  675. "application/json": {
  676. "schema": {
  677. "$ref": "#/components/schemas/BadRequestError"
  678. }
  679. }
  680. }
  681. },
  682. "404": {
  683. "description": "Not found",
  684. "content": {
  685. "application/json": {
  686. "schema": {
  687. "$ref": "#/components/schemas/NotFoundError"
  688. }
  689. }
  690. }
  691. }
  692. }
  693. }
  694. },
  695. "/session/{id}/init": {
  696. "post": {
  697. "operationId": "session.init",
  698. "parameters": [
  699. {
  700. "in": "query",
  701. "name": "directory",
  702. "schema": {
  703. "type": "string"
  704. }
  705. },
  706. {
  707. "in": "query",
  708. "name": "directory",
  709. "schema": {
  710. "type": "string"
  711. }
  712. },
  713. {
  714. "in": "query",
  715. "name": "directory",
  716. "schema": {
  717. "type": "string"
  718. }
  719. },
  720. {
  721. "in": "path",
  722. "name": "id",
  723. "schema": {
  724. "type": "string"
  725. },
  726. "required": true,
  727. "description": "Session ID"
  728. }
  729. ],
  730. "description": "Analyze the app and create an AGENTS.md file",
  731. "responses": {
  732. "200": {
  733. "description": "200",
  734. "content": {
  735. "application/json": {
  736. "schema": {
  737. "type": "boolean"
  738. }
  739. }
  740. }
  741. },
  742. "400": {
  743. "description": "Bad request",
  744. "content": {
  745. "application/json": {
  746. "schema": {
  747. "$ref": "#/components/schemas/BadRequestError"
  748. }
  749. }
  750. }
  751. },
  752. "404": {
  753. "description": "Not found",
  754. "content": {
  755. "application/json": {
  756. "schema": {
  757. "$ref": "#/components/schemas/NotFoundError"
  758. }
  759. }
  760. }
  761. }
  762. },
  763. "requestBody": {
  764. "content": {
  765. "application/json": {
  766. "schema": {
  767. "type": "object",
  768. "properties": {
  769. "modelID": {
  770. "type": "string"
  771. },
  772. "providerID": {
  773. "type": "string"
  774. },
  775. "messageID": {
  776. "type": "string",
  777. "pattern": "^msg.*"
  778. }
  779. },
  780. "required": ["modelID", "providerID", "messageID"]
  781. }
  782. }
  783. }
  784. }
  785. }
  786. },
  787. "/session/{id}/fork": {
  788. "post": {
  789. "operationId": "session.fork",
  790. "parameters": [
  791. {
  792. "in": "query",
  793. "name": "directory",
  794. "schema": {
  795. "type": "string"
  796. }
  797. },
  798. {
  799. "in": "query",
  800. "name": "directory",
  801. "schema": {
  802. "type": "string"
  803. }
  804. },
  805. {
  806. "in": "query",
  807. "name": "directory",
  808. "schema": {
  809. "type": "string"
  810. }
  811. },
  812. {
  813. "in": "path",
  814. "name": "id",
  815. "schema": {
  816. "type": "string",
  817. "pattern": "^ses.*"
  818. },
  819. "required": true
  820. }
  821. ],
  822. "description": "Fork an existing session at a specific message",
  823. "responses": {
  824. "200": {
  825. "description": "200",
  826. "content": {
  827. "application/json": {
  828. "schema": {
  829. "$ref": "#/components/schemas/Session"
  830. }
  831. }
  832. }
  833. }
  834. },
  835. "requestBody": {
  836. "content": {
  837. "application/json": {
  838. "schema": {
  839. "type": "object",
  840. "properties": {
  841. "messageID": {
  842. "type": "string",
  843. "pattern": "^msg.*"
  844. }
  845. }
  846. }
  847. }
  848. }
  849. }
  850. }
  851. },
  852. "/session/{id}/abort": {
  853. "post": {
  854. "operationId": "session.abort",
  855. "parameters": [
  856. {
  857. "in": "query",
  858. "name": "directory",
  859. "schema": {
  860. "type": "string"
  861. }
  862. },
  863. {
  864. "in": "query",
  865. "name": "directory",
  866. "schema": {
  867. "type": "string"
  868. }
  869. },
  870. {
  871. "in": "path",
  872. "name": "id",
  873. "schema": {
  874. "type": "string"
  875. },
  876. "required": true
  877. }
  878. ],
  879. "description": "Abort a session",
  880. "responses": {
  881. "200": {
  882. "description": "Aborted session",
  883. "content": {
  884. "application/json": {
  885. "schema": {
  886. "type": "boolean"
  887. }
  888. }
  889. }
  890. },
  891. "400": {
  892. "description": "Bad request",
  893. "content": {
  894. "application/json": {
  895. "schema": {
  896. "$ref": "#/components/schemas/BadRequestError"
  897. }
  898. }
  899. }
  900. },
  901. "404": {
  902. "description": "Not found",
  903. "content": {
  904. "application/json": {
  905. "schema": {
  906. "$ref": "#/components/schemas/NotFoundError"
  907. }
  908. }
  909. }
  910. }
  911. }
  912. }
  913. },
  914. "/session/{id}/share": {
  915. "post": {
  916. "operationId": "session.share",
  917. "parameters": [
  918. {
  919. "in": "query",
  920. "name": "directory",
  921. "schema": {
  922. "type": "string"
  923. }
  924. },
  925. {
  926. "in": "query",
  927. "name": "directory",
  928. "schema": {
  929. "type": "string"
  930. }
  931. },
  932. {
  933. "in": "path",
  934. "name": "id",
  935. "schema": {
  936. "type": "string"
  937. },
  938. "required": true
  939. }
  940. ],
  941. "description": "Share a session",
  942. "responses": {
  943. "200": {
  944. "description": "Successfully shared session",
  945. "content": {
  946. "application/json": {
  947. "schema": {
  948. "$ref": "#/components/schemas/Session"
  949. }
  950. }
  951. }
  952. },
  953. "400": {
  954. "description": "Bad request",
  955. "content": {
  956. "application/json": {
  957. "schema": {
  958. "$ref": "#/components/schemas/BadRequestError"
  959. }
  960. }
  961. }
  962. },
  963. "404": {
  964. "description": "Not found",
  965. "content": {
  966. "application/json": {
  967. "schema": {
  968. "$ref": "#/components/schemas/NotFoundError"
  969. }
  970. }
  971. }
  972. }
  973. }
  974. },
  975. "delete": {
  976. "operationId": "session.unshare",
  977. "parameters": [
  978. {
  979. "in": "query",
  980. "name": "directory",
  981. "schema": {
  982. "type": "string"
  983. }
  984. },
  985. {
  986. "in": "query",
  987. "name": "directory",
  988. "schema": {
  989. "type": "string"
  990. }
  991. },
  992. {
  993. "in": "path",
  994. "name": "id",
  995. "schema": {
  996. "type": "string",
  997. "pattern": "^ses.*"
  998. },
  999. "required": true
  1000. }
  1001. ],
  1002. "description": "Unshare the session",
  1003. "responses": {
  1004. "200": {
  1005. "description": "Successfully unshared session",
  1006. "content": {
  1007. "application/json": {
  1008. "schema": {
  1009. "$ref": "#/components/schemas/Session"
  1010. }
  1011. }
  1012. }
  1013. },
  1014. "400": {
  1015. "description": "Bad request",
  1016. "content": {
  1017. "application/json": {
  1018. "schema": {
  1019. "$ref": "#/components/schemas/BadRequestError"
  1020. }
  1021. }
  1022. }
  1023. },
  1024. "404": {
  1025. "description": "Not found",
  1026. "content": {
  1027. "application/json": {
  1028. "schema": {
  1029. "$ref": "#/components/schemas/NotFoundError"
  1030. }
  1031. }
  1032. }
  1033. }
  1034. }
  1035. }
  1036. },
  1037. "/session/{id}/diff": {
  1038. "get": {
  1039. "operationId": "session.diff",
  1040. "parameters": [
  1041. {
  1042. "in": "query",
  1043. "name": "directory",
  1044. "schema": {
  1045. "type": "string"
  1046. }
  1047. },
  1048. {
  1049. "in": "query",
  1050. "name": "directory",
  1051. "schema": {
  1052. "type": "string"
  1053. }
  1054. },
  1055. {
  1056. "in": "query",
  1057. "name": "directory",
  1058. "schema": {
  1059. "type": "string"
  1060. }
  1061. },
  1062. {
  1063. "in": "path",
  1064. "name": "id",
  1065. "schema": {
  1066. "type": "string",
  1067. "pattern": "^ses.*"
  1068. },
  1069. "required": true
  1070. },
  1071. {
  1072. "in": "query",
  1073. "name": "messageID",
  1074. "schema": {
  1075. "type": "string",
  1076. "pattern": "^msg.*"
  1077. }
  1078. }
  1079. ],
  1080. "description": "Get the diff that resulted from this user message",
  1081. "responses": {
  1082. "200": {
  1083. "description": "Successfully retrieved diff",
  1084. "content": {
  1085. "application/json": {
  1086. "schema": {
  1087. "type": "array",
  1088. "items": {
  1089. "$ref": "#/components/schemas/FileDiff"
  1090. }
  1091. }
  1092. }
  1093. }
  1094. }
  1095. }
  1096. }
  1097. },
  1098. "/session/{id}/summarize": {
  1099. "post": {
  1100. "operationId": "session.summarize",
  1101. "parameters": [
  1102. {
  1103. "in": "query",
  1104. "name": "directory",
  1105. "schema": {
  1106. "type": "string"
  1107. }
  1108. },
  1109. {
  1110. "in": "query",
  1111. "name": "directory",
  1112. "schema": {
  1113. "type": "string"
  1114. }
  1115. },
  1116. {
  1117. "in": "query",
  1118. "name": "directory",
  1119. "schema": {
  1120. "type": "string"
  1121. }
  1122. },
  1123. {
  1124. "in": "path",
  1125. "name": "id",
  1126. "schema": {
  1127. "type": "string"
  1128. },
  1129. "required": true,
  1130. "description": "Session ID"
  1131. }
  1132. ],
  1133. "description": "Summarize the session",
  1134. "responses": {
  1135. "200": {
  1136. "description": "Summarized session",
  1137. "content": {
  1138. "application/json": {
  1139. "schema": {
  1140. "type": "boolean"
  1141. }
  1142. }
  1143. }
  1144. },
  1145. "400": {
  1146. "description": "Bad request",
  1147. "content": {
  1148. "application/json": {
  1149. "schema": {
  1150. "$ref": "#/components/schemas/BadRequestError"
  1151. }
  1152. }
  1153. }
  1154. },
  1155. "404": {
  1156. "description": "Not found",
  1157. "content": {
  1158. "application/json": {
  1159. "schema": {
  1160. "$ref": "#/components/schemas/NotFoundError"
  1161. }
  1162. }
  1163. }
  1164. }
  1165. },
  1166. "requestBody": {
  1167. "content": {
  1168. "application/json": {
  1169. "schema": {
  1170. "type": "object",
  1171. "properties": {
  1172. "providerID": {
  1173. "type": "string"
  1174. },
  1175. "modelID": {
  1176. "type": "string"
  1177. }
  1178. },
  1179. "required": ["providerID", "modelID"]
  1180. }
  1181. }
  1182. }
  1183. }
  1184. }
  1185. },
  1186. "/session/{id}/message": {
  1187. "get": {
  1188. "operationId": "session.messages",
  1189. "parameters": [
  1190. {
  1191. "in": "query",
  1192. "name": "directory",
  1193. "schema": {
  1194. "type": "string"
  1195. }
  1196. },
  1197. {
  1198. "in": "query",
  1199. "name": "directory",
  1200. "schema": {
  1201. "type": "string"
  1202. }
  1203. },
  1204. {
  1205. "in": "path",
  1206. "name": "id",
  1207. "schema": {
  1208. "type": "string"
  1209. },
  1210. "required": true,
  1211. "description": "Session ID"
  1212. }
  1213. ],
  1214. "description": "List messages for a session",
  1215. "responses": {
  1216. "200": {
  1217. "description": "List of messages",
  1218. "content": {
  1219. "application/json": {
  1220. "schema": {
  1221. "type": "array",
  1222. "items": {
  1223. "type": "object",
  1224. "properties": {
  1225. "info": {
  1226. "$ref": "#/components/schemas/Message"
  1227. },
  1228. "parts": {
  1229. "type": "array",
  1230. "items": {
  1231. "$ref": "#/components/schemas/Part"
  1232. }
  1233. }
  1234. },
  1235. "required": ["info", "parts"]
  1236. }
  1237. }
  1238. }
  1239. }
  1240. },
  1241. "400": {
  1242. "description": "Bad request",
  1243. "content": {
  1244. "application/json": {
  1245. "schema": {
  1246. "$ref": "#/components/schemas/BadRequestError"
  1247. }
  1248. }
  1249. }
  1250. },
  1251. "404": {
  1252. "description": "Not found",
  1253. "content": {
  1254. "application/json": {
  1255. "schema": {
  1256. "$ref": "#/components/schemas/NotFoundError"
  1257. }
  1258. }
  1259. }
  1260. }
  1261. }
  1262. },
  1263. "post": {
  1264. "operationId": "session.prompt",
  1265. "parameters": [
  1266. {
  1267. "in": "query",
  1268. "name": "directory",
  1269. "schema": {
  1270. "type": "string"
  1271. }
  1272. },
  1273. {
  1274. "in": "query",
  1275. "name": "directory",
  1276. "schema": {
  1277. "type": "string"
  1278. }
  1279. },
  1280. {
  1281. "in": "query",
  1282. "name": "directory",
  1283. "schema": {
  1284. "type": "string"
  1285. }
  1286. },
  1287. {
  1288. "in": "path",
  1289. "name": "id",
  1290. "schema": {
  1291. "type": "string"
  1292. },
  1293. "required": true,
  1294. "description": "Session ID"
  1295. }
  1296. ],
  1297. "description": "Create and send a new message to a session",
  1298. "responses": {
  1299. "200": {
  1300. "description": "Created message",
  1301. "content": {
  1302. "application/json": {
  1303. "schema": {
  1304. "type": "object",
  1305. "properties": {
  1306. "info": {
  1307. "$ref": "#/components/schemas/AssistantMessage"
  1308. },
  1309. "parts": {
  1310. "type": "array",
  1311. "items": {
  1312. "$ref": "#/components/schemas/Part"
  1313. }
  1314. }
  1315. },
  1316. "required": ["info", "parts"]
  1317. }
  1318. }
  1319. }
  1320. },
  1321. "400": {
  1322. "description": "Bad request",
  1323. "content": {
  1324. "application/json": {
  1325. "schema": {
  1326. "$ref": "#/components/schemas/BadRequestError"
  1327. }
  1328. }
  1329. }
  1330. },
  1331. "404": {
  1332. "description": "Not found",
  1333. "content": {
  1334. "application/json": {
  1335. "schema": {
  1336. "$ref": "#/components/schemas/NotFoundError"
  1337. }
  1338. }
  1339. }
  1340. }
  1341. },
  1342. "requestBody": {
  1343. "content": {
  1344. "application/json": {
  1345. "schema": {
  1346. "type": "object",
  1347. "properties": {
  1348. "messageID": {
  1349. "type": "string",
  1350. "pattern": "^msg.*"
  1351. },
  1352. "model": {
  1353. "type": "object",
  1354. "properties": {
  1355. "providerID": {
  1356. "type": "string"
  1357. },
  1358. "modelID": {
  1359. "type": "string"
  1360. }
  1361. },
  1362. "required": ["providerID", "modelID"]
  1363. },
  1364. "agent": {
  1365. "type": "string"
  1366. },
  1367. "noReply": {
  1368. "type": "boolean"
  1369. },
  1370. "system": {
  1371. "type": "string"
  1372. },
  1373. "tools": {
  1374. "type": "object",
  1375. "propertyNames": {
  1376. "type": "string"
  1377. },
  1378. "additionalProperties": {
  1379. "type": "boolean"
  1380. }
  1381. },
  1382. "parts": {
  1383. "type": "array",
  1384. "items": {
  1385. "anyOf": [
  1386. {
  1387. "$ref": "#/components/schemas/TextPartInput"
  1388. },
  1389. {
  1390. "$ref": "#/components/schemas/FilePartInput"
  1391. },
  1392. {
  1393. "$ref": "#/components/schemas/AgentPartInput"
  1394. }
  1395. ]
  1396. }
  1397. }
  1398. },
  1399. "required": ["parts"]
  1400. }
  1401. }
  1402. }
  1403. }
  1404. }
  1405. },
  1406. "/session/{id}/message/{messageID}": {
  1407. "get": {
  1408. "operationId": "session.message",
  1409. "parameters": [
  1410. {
  1411. "in": "query",
  1412. "name": "directory",
  1413. "schema": {
  1414. "type": "string"
  1415. }
  1416. },
  1417. {
  1418. "in": "query",
  1419. "name": "directory",
  1420. "schema": {
  1421. "type": "string"
  1422. }
  1423. },
  1424. {
  1425. "in": "path",
  1426. "name": "id",
  1427. "schema": {
  1428. "type": "string"
  1429. },
  1430. "required": true,
  1431. "description": "Session ID"
  1432. },
  1433. {
  1434. "in": "path",
  1435. "name": "messageID",
  1436. "schema": {
  1437. "type": "string"
  1438. },
  1439. "required": true,
  1440. "description": "Message ID"
  1441. }
  1442. ],
  1443. "description": "Get a message from a session",
  1444. "responses": {
  1445. "200": {
  1446. "description": "Message",
  1447. "content": {
  1448. "application/json": {
  1449. "schema": {
  1450. "type": "object",
  1451. "properties": {
  1452. "info": {
  1453. "$ref": "#/components/schemas/Message"
  1454. },
  1455. "parts": {
  1456. "type": "array",
  1457. "items": {
  1458. "$ref": "#/components/schemas/Part"
  1459. }
  1460. }
  1461. },
  1462. "required": ["info", "parts"]
  1463. }
  1464. }
  1465. }
  1466. },
  1467. "400": {
  1468. "description": "Bad request",
  1469. "content": {
  1470. "application/json": {
  1471. "schema": {
  1472. "$ref": "#/components/schemas/BadRequestError"
  1473. }
  1474. }
  1475. }
  1476. },
  1477. "404": {
  1478. "description": "Not found",
  1479. "content": {
  1480. "application/json": {
  1481. "schema": {
  1482. "$ref": "#/components/schemas/NotFoundError"
  1483. }
  1484. }
  1485. }
  1486. }
  1487. }
  1488. }
  1489. },
  1490. "/session/{id}/command": {
  1491. "post": {
  1492. "operationId": "session.command",
  1493. "parameters": [
  1494. {
  1495. "in": "query",
  1496. "name": "directory",
  1497. "schema": {
  1498. "type": "string"
  1499. }
  1500. },
  1501. {
  1502. "in": "query",
  1503. "name": "directory",
  1504. "schema": {
  1505. "type": "string"
  1506. }
  1507. },
  1508. {
  1509. "in": "query",
  1510. "name": "directory",
  1511. "schema": {
  1512. "type": "string"
  1513. }
  1514. },
  1515. {
  1516. "in": "path",
  1517. "name": "id",
  1518. "schema": {
  1519. "type": "string"
  1520. },
  1521. "required": true,
  1522. "description": "Session ID"
  1523. }
  1524. ],
  1525. "description": "Send a new command to a session",
  1526. "responses": {
  1527. "200": {
  1528. "description": "Created message",
  1529. "content": {
  1530. "application/json": {
  1531. "schema": {
  1532. "type": "object",
  1533. "properties": {
  1534. "info": {
  1535. "$ref": "#/components/schemas/AssistantMessage"
  1536. },
  1537. "parts": {
  1538. "type": "array",
  1539. "items": {
  1540. "$ref": "#/components/schemas/Part"
  1541. }
  1542. }
  1543. },
  1544. "required": ["info", "parts"]
  1545. }
  1546. }
  1547. }
  1548. },
  1549. "400": {
  1550. "description": "Bad request",
  1551. "content": {
  1552. "application/json": {
  1553. "schema": {
  1554. "$ref": "#/components/schemas/BadRequestError"
  1555. }
  1556. }
  1557. }
  1558. },
  1559. "404": {
  1560. "description": "Not found",
  1561. "content": {
  1562. "application/json": {
  1563. "schema": {
  1564. "$ref": "#/components/schemas/NotFoundError"
  1565. }
  1566. }
  1567. }
  1568. }
  1569. },
  1570. "requestBody": {
  1571. "content": {
  1572. "application/json": {
  1573. "schema": {
  1574. "type": "object",
  1575. "properties": {
  1576. "messageID": {
  1577. "type": "string",
  1578. "pattern": "^msg.*"
  1579. },
  1580. "agent": {
  1581. "type": "string"
  1582. },
  1583. "model": {
  1584. "type": "string"
  1585. },
  1586. "arguments": {
  1587. "type": "string"
  1588. },
  1589. "command": {
  1590. "type": "string"
  1591. }
  1592. },
  1593. "required": ["arguments", "command"]
  1594. }
  1595. }
  1596. }
  1597. }
  1598. }
  1599. },
  1600. "/session/{id}/shell": {
  1601. "post": {
  1602. "operationId": "session.shell",
  1603. "parameters": [
  1604. {
  1605. "in": "query",
  1606. "name": "directory",
  1607. "schema": {
  1608. "type": "string"
  1609. }
  1610. },
  1611. {
  1612. "in": "query",
  1613. "name": "directory",
  1614. "schema": {
  1615. "type": "string"
  1616. }
  1617. },
  1618. {
  1619. "in": "query",
  1620. "name": "directory",
  1621. "schema": {
  1622. "type": "string"
  1623. }
  1624. },
  1625. {
  1626. "in": "path",
  1627. "name": "id",
  1628. "schema": {
  1629. "type": "string"
  1630. },
  1631. "required": true,
  1632. "description": "Session ID"
  1633. }
  1634. ],
  1635. "description": "Run a shell command",
  1636. "responses": {
  1637. "200": {
  1638. "description": "Created message",
  1639. "content": {
  1640. "application/json": {
  1641. "schema": {
  1642. "$ref": "#/components/schemas/AssistantMessage"
  1643. }
  1644. }
  1645. }
  1646. },
  1647. "400": {
  1648. "description": "Bad request",
  1649. "content": {
  1650. "application/json": {
  1651. "schema": {
  1652. "$ref": "#/components/schemas/BadRequestError"
  1653. }
  1654. }
  1655. }
  1656. },
  1657. "404": {
  1658. "description": "Not found",
  1659. "content": {
  1660. "application/json": {
  1661. "schema": {
  1662. "$ref": "#/components/schemas/NotFoundError"
  1663. }
  1664. }
  1665. }
  1666. }
  1667. },
  1668. "requestBody": {
  1669. "content": {
  1670. "application/json": {
  1671. "schema": {
  1672. "type": "object",
  1673. "properties": {
  1674. "agent": {
  1675. "type": "string"
  1676. },
  1677. "command": {
  1678. "type": "string"
  1679. }
  1680. },
  1681. "required": ["agent", "command"]
  1682. }
  1683. }
  1684. }
  1685. }
  1686. }
  1687. },
  1688. "/session/{id}/revert": {
  1689. "post": {
  1690. "operationId": "session.revert",
  1691. "parameters": [
  1692. {
  1693. "in": "query",
  1694. "name": "directory",
  1695. "schema": {
  1696. "type": "string"
  1697. }
  1698. },
  1699. {
  1700. "in": "query",
  1701. "name": "directory",
  1702. "schema": {
  1703. "type": "string"
  1704. }
  1705. },
  1706. {
  1707. "in": "query",
  1708. "name": "directory",
  1709. "schema": {
  1710. "type": "string"
  1711. }
  1712. },
  1713. {
  1714. "in": "path",
  1715. "name": "id",
  1716. "schema": {
  1717. "type": "string"
  1718. },
  1719. "required": true
  1720. }
  1721. ],
  1722. "description": "Revert a message",
  1723. "responses": {
  1724. "200": {
  1725. "description": "Updated session",
  1726. "content": {
  1727. "application/json": {
  1728. "schema": {
  1729. "$ref": "#/components/schemas/Session"
  1730. }
  1731. }
  1732. }
  1733. },
  1734. "400": {
  1735. "description": "Bad request",
  1736. "content": {
  1737. "application/json": {
  1738. "schema": {
  1739. "$ref": "#/components/schemas/BadRequestError"
  1740. }
  1741. }
  1742. }
  1743. },
  1744. "404": {
  1745. "description": "Not found",
  1746. "content": {
  1747. "application/json": {
  1748. "schema": {
  1749. "$ref": "#/components/schemas/NotFoundError"
  1750. }
  1751. }
  1752. }
  1753. }
  1754. },
  1755. "requestBody": {
  1756. "content": {
  1757. "application/json": {
  1758. "schema": {
  1759. "type": "object",
  1760. "properties": {
  1761. "messageID": {
  1762. "type": "string",
  1763. "pattern": "^msg.*"
  1764. },
  1765. "partID": {
  1766. "type": "string",
  1767. "pattern": "^prt.*"
  1768. }
  1769. },
  1770. "required": ["messageID"]
  1771. }
  1772. }
  1773. }
  1774. }
  1775. }
  1776. },
  1777. "/session/{id}/unrevert": {
  1778. "post": {
  1779. "operationId": "session.unrevert",
  1780. "parameters": [
  1781. {
  1782. "in": "query",
  1783. "name": "directory",
  1784. "schema": {
  1785. "type": "string"
  1786. }
  1787. },
  1788. {
  1789. "in": "query",
  1790. "name": "directory",
  1791. "schema": {
  1792. "type": "string"
  1793. }
  1794. },
  1795. {
  1796. "in": "path",
  1797. "name": "id",
  1798. "schema": {
  1799. "type": "string"
  1800. },
  1801. "required": true
  1802. }
  1803. ],
  1804. "description": "Restore all reverted messages",
  1805. "responses": {
  1806. "200": {
  1807. "description": "Updated session",
  1808. "content": {
  1809. "application/json": {
  1810. "schema": {
  1811. "$ref": "#/components/schemas/Session"
  1812. }
  1813. }
  1814. }
  1815. },
  1816. "400": {
  1817. "description": "Bad request",
  1818. "content": {
  1819. "application/json": {
  1820. "schema": {
  1821. "$ref": "#/components/schemas/BadRequestError"
  1822. }
  1823. }
  1824. }
  1825. },
  1826. "404": {
  1827. "description": "Not found",
  1828. "content": {
  1829. "application/json": {
  1830. "schema": {
  1831. "$ref": "#/components/schemas/NotFoundError"
  1832. }
  1833. }
  1834. }
  1835. }
  1836. }
  1837. }
  1838. },
  1839. "/session/{id}/permissions/{permissionID}": {
  1840. "post": {
  1841. "operationId": "postSession:idPermissions:permissionID",
  1842. "parameters": [
  1843. {
  1844. "in": "query",
  1845. "name": "directory",
  1846. "schema": {
  1847. "type": "string"
  1848. }
  1849. },
  1850. {
  1851. "in": "query",
  1852. "name": "directory",
  1853. "schema": {
  1854. "type": "string"
  1855. }
  1856. },
  1857. {
  1858. "in": "query",
  1859. "name": "directory",
  1860. "schema": {
  1861. "type": "string"
  1862. }
  1863. },
  1864. {
  1865. "in": "path",
  1866. "name": "id",
  1867. "schema": {
  1868. "type": "string"
  1869. },
  1870. "required": true
  1871. },
  1872. {
  1873. "in": "path",
  1874. "name": "permissionID",
  1875. "schema": {
  1876. "type": "string"
  1877. },
  1878. "required": true
  1879. }
  1880. ],
  1881. "description": "Respond to a permission request",
  1882. "responses": {
  1883. "200": {
  1884. "description": "Permission processed successfully",
  1885. "content": {
  1886. "application/json": {
  1887. "schema": {
  1888. "type": "boolean"
  1889. }
  1890. }
  1891. }
  1892. },
  1893. "400": {
  1894. "description": "Bad request",
  1895. "content": {
  1896. "application/json": {
  1897. "schema": {
  1898. "$ref": "#/components/schemas/BadRequestError"
  1899. }
  1900. }
  1901. }
  1902. },
  1903. "404": {
  1904. "description": "Not found",
  1905. "content": {
  1906. "application/json": {
  1907. "schema": {
  1908. "$ref": "#/components/schemas/NotFoundError"
  1909. }
  1910. }
  1911. }
  1912. }
  1913. },
  1914. "requestBody": {
  1915. "content": {
  1916. "application/json": {
  1917. "schema": {
  1918. "type": "object",
  1919. "properties": {
  1920. "response": {
  1921. "type": "string",
  1922. "enum": ["once", "always", "reject"]
  1923. }
  1924. },
  1925. "required": ["response"]
  1926. }
  1927. }
  1928. }
  1929. }
  1930. }
  1931. },
  1932. "/command": {
  1933. "get": {
  1934. "operationId": "command.list",
  1935. "parameters": [
  1936. {
  1937. "in": "query",
  1938. "name": "directory",
  1939. "schema": {
  1940. "type": "string"
  1941. }
  1942. }
  1943. ],
  1944. "description": "List all commands",
  1945. "responses": {
  1946. "200": {
  1947. "description": "List of commands",
  1948. "content": {
  1949. "application/json": {
  1950. "schema": {
  1951. "type": "array",
  1952. "items": {
  1953. "$ref": "#/components/schemas/Command"
  1954. }
  1955. }
  1956. }
  1957. }
  1958. }
  1959. }
  1960. }
  1961. },
  1962. "/config/providers": {
  1963. "get": {
  1964. "operationId": "config.providers",
  1965. "parameters": [
  1966. {
  1967. "in": "query",
  1968. "name": "directory",
  1969. "schema": {
  1970. "type": "string"
  1971. }
  1972. }
  1973. ],
  1974. "description": "List all providers",
  1975. "responses": {
  1976. "200": {
  1977. "description": "List of providers",
  1978. "content": {
  1979. "application/json": {
  1980. "schema": {
  1981. "type": "object",
  1982. "properties": {
  1983. "providers": {
  1984. "type": "array",
  1985. "items": {
  1986. "$ref": "#/components/schemas/Provider"
  1987. }
  1988. },
  1989. "default": {
  1990. "type": "object",
  1991. "propertyNames": {
  1992. "type": "string"
  1993. },
  1994. "additionalProperties": {
  1995. "type": "string"
  1996. }
  1997. }
  1998. },
  1999. "required": ["providers", "default"]
  2000. }
  2001. }
  2002. }
  2003. }
  2004. }
  2005. }
  2006. },
  2007. "/find": {
  2008. "get": {
  2009. "operationId": "find.text",
  2010. "parameters": [
  2011. {
  2012. "in": "query",
  2013. "name": "directory",
  2014. "schema": {
  2015. "type": "string"
  2016. }
  2017. },
  2018. {
  2019. "in": "query",
  2020. "name": "directory",
  2021. "schema": {
  2022. "type": "string"
  2023. }
  2024. },
  2025. {
  2026. "in": "query",
  2027. "name": "pattern",
  2028. "schema": {
  2029. "type": "string"
  2030. },
  2031. "required": true
  2032. }
  2033. ],
  2034. "description": "Find text in files",
  2035. "responses": {
  2036. "200": {
  2037. "description": "Matches",
  2038. "content": {
  2039. "application/json": {
  2040. "schema": {
  2041. "type": "array",
  2042. "items": {
  2043. "type": "object",
  2044. "properties": {
  2045. "path": {
  2046. "type": "object",
  2047. "properties": {
  2048. "text": {
  2049. "type": "string"
  2050. }
  2051. },
  2052. "required": ["text"]
  2053. },
  2054. "lines": {
  2055. "type": "object",
  2056. "properties": {
  2057. "text": {
  2058. "type": "string"
  2059. }
  2060. },
  2061. "required": ["text"]
  2062. },
  2063. "line_number": {
  2064. "type": "number"
  2065. },
  2066. "absolute_offset": {
  2067. "type": "number"
  2068. },
  2069. "submatches": {
  2070. "type": "array",
  2071. "items": {
  2072. "type": "object",
  2073. "properties": {
  2074. "match": {
  2075. "type": "object",
  2076. "properties": {
  2077. "text": {
  2078. "type": "string"
  2079. }
  2080. },
  2081. "required": ["text"]
  2082. },
  2083. "start": {
  2084. "type": "number"
  2085. },
  2086. "end": {
  2087. "type": "number"
  2088. }
  2089. },
  2090. "required": ["match", "start", "end"]
  2091. }
  2092. }
  2093. },
  2094. "required": ["path", "lines", "line_number", "absolute_offset", "submatches"]
  2095. }
  2096. }
  2097. }
  2098. }
  2099. }
  2100. }
  2101. }
  2102. },
  2103. "/find/file": {
  2104. "get": {
  2105. "operationId": "find.files",
  2106. "parameters": [
  2107. {
  2108. "in": "query",
  2109. "name": "directory",
  2110. "schema": {
  2111. "type": "string"
  2112. }
  2113. },
  2114. {
  2115. "in": "query",
  2116. "name": "directory",
  2117. "schema": {
  2118. "type": "string"
  2119. }
  2120. },
  2121. {
  2122. "in": "query",
  2123. "name": "query",
  2124. "schema": {
  2125. "type": "string"
  2126. },
  2127. "required": true
  2128. }
  2129. ],
  2130. "description": "Find files",
  2131. "responses": {
  2132. "200": {
  2133. "description": "File paths",
  2134. "content": {
  2135. "application/json": {
  2136. "schema": {
  2137. "type": "array",
  2138. "items": {
  2139. "type": "string"
  2140. }
  2141. }
  2142. }
  2143. }
  2144. }
  2145. }
  2146. }
  2147. },
  2148. "/find/symbol": {
  2149. "get": {
  2150. "operationId": "find.symbols",
  2151. "parameters": [
  2152. {
  2153. "in": "query",
  2154. "name": "directory",
  2155. "schema": {
  2156. "type": "string"
  2157. }
  2158. },
  2159. {
  2160. "in": "query",
  2161. "name": "directory",
  2162. "schema": {
  2163. "type": "string"
  2164. }
  2165. },
  2166. {
  2167. "in": "query",
  2168. "name": "query",
  2169. "schema": {
  2170. "type": "string"
  2171. },
  2172. "required": true
  2173. }
  2174. ],
  2175. "description": "Find workspace symbols",
  2176. "responses": {
  2177. "200": {
  2178. "description": "Symbols",
  2179. "content": {
  2180. "application/json": {
  2181. "schema": {
  2182. "type": "array",
  2183. "items": {
  2184. "$ref": "#/components/schemas/Symbol"
  2185. }
  2186. }
  2187. }
  2188. }
  2189. }
  2190. }
  2191. }
  2192. },
  2193. "/file": {
  2194. "get": {
  2195. "operationId": "file.list",
  2196. "parameters": [
  2197. {
  2198. "in": "query",
  2199. "name": "directory",
  2200. "schema": {
  2201. "type": "string"
  2202. }
  2203. },
  2204. {
  2205. "in": "query",
  2206. "name": "directory",
  2207. "schema": {
  2208. "type": "string"
  2209. }
  2210. },
  2211. {
  2212. "in": "query",
  2213. "name": "path",
  2214. "schema": {
  2215. "type": "string"
  2216. },
  2217. "required": true
  2218. }
  2219. ],
  2220. "description": "List files and directories",
  2221. "responses": {
  2222. "200": {
  2223. "description": "Files and directories",
  2224. "content": {
  2225. "application/json": {
  2226. "schema": {
  2227. "type": "array",
  2228. "items": {
  2229. "$ref": "#/components/schemas/FileNode"
  2230. }
  2231. }
  2232. }
  2233. }
  2234. }
  2235. }
  2236. }
  2237. },
  2238. "/file/content": {
  2239. "get": {
  2240. "operationId": "file.read",
  2241. "parameters": [
  2242. {
  2243. "in": "query",
  2244. "name": "directory",
  2245. "schema": {
  2246. "type": "string"
  2247. }
  2248. },
  2249. {
  2250. "in": "query",
  2251. "name": "directory",
  2252. "schema": {
  2253. "type": "string"
  2254. }
  2255. },
  2256. {
  2257. "in": "query",
  2258. "name": "path",
  2259. "schema": {
  2260. "type": "string"
  2261. },
  2262. "required": true
  2263. }
  2264. ],
  2265. "description": "Read a file",
  2266. "responses": {
  2267. "200": {
  2268. "description": "File content",
  2269. "content": {
  2270. "application/json": {
  2271. "schema": {
  2272. "$ref": "#/components/schemas/FileContent"
  2273. }
  2274. }
  2275. }
  2276. }
  2277. }
  2278. }
  2279. },
  2280. "/file/status": {
  2281. "get": {
  2282. "operationId": "file.status",
  2283. "parameters": [
  2284. {
  2285. "in": "query",
  2286. "name": "directory",
  2287. "schema": {
  2288. "type": "string"
  2289. }
  2290. }
  2291. ],
  2292. "description": "Get file status",
  2293. "responses": {
  2294. "200": {
  2295. "description": "File status",
  2296. "content": {
  2297. "application/json": {
  2298. "schema": {
  2299. "type": "array",
  2300. "items": {
  2301. "$ref": "#/components/schemas/File"
  2302. }
  2303. }
  2304. }
  2305. }
  2306. }
  2307. }
  2308. }
  2309. },
  2310. "/log": {
  2311. "post": {
  2312. "operationId": "app.log",
  2313. "parameters": [
  2314. {
  2315. "in": "query",
  2316. "name": "directory",
  2317. "schema": {
  2318. "type": "string"
  2319. }
  2320. },
  2321. {
  2322. "in": "query",
  2323. "name": "directory",
  2324. "schema": {
  2325. "type": "string"
  2326. }
  2327. }
  2328. ],
  2329. "description": "Write a log entry to the server logs",
  2330. "responses": {
  2331. "200": {
  2332. "description": "Log entry written successfully",
  2333. "content": {
  2334. "application/json": {
  2335. "schema": {
  2336. "type": "boolean"
  2337. }
  2338. }
  2339. }
  2340. },
  2341. "400": {
  2342. "description": "Bad request",
  2343. "content": {
  2344. "application/json": {
  2345. "schema": {
  2346. "$ref": "#/components/schemas/BadRequestError"
  2347. }
  2348. }
  2349. }
  2350. }
  2351. },
  2352. "requestBody": {
  2353. "content": {
  2354. "application/json": {
  2355. "schema": {
  2356. "type": "object",
  2357. "properties": {
  2358. "service": {
  2359. "description": "Service name for the log entry",
  2360. "type": "string"
  2361. },
  2362. "level": {
  2363. "description": "Log level",
  2364. "type": "string",
  2365. "enum": ["debug", "info", "error", "warn"]
  2366. },
  2367. "message": {
  2368. "description": "Log message",
  2369. "type": "string"
  2370. },
  2371. "extra": {
  2372. "description": "Additional metadata for the log entry",
  2373. "type": "object",
  2374. "propertyNames": {
  2375. "type": "string"
  2376. },
  2377. "additionalProperties": {}
  2378. }
  2379. },
  2380. "required": ["service", "level", "message"]
  2381. }
  2382. }
  2383. }
  2384. }
  2385. }
  2386. },
  2387. "/agent": {
  2388. "get": {
  2389. "operationId": "app.agents",
  2390. "parameters": [
  2391. {
  2392. "in": "query",
  2393. "name": "directory",
  2394. "schema": {
  2395. "type": "string"
  2396. }
  2397. }
  2398. ],
  2399. "description": "List all agents",
  2400. "responses": {
  2401. "200": {
  2402. "description": "List of agents",
  2403. "content": {
  2404. "application/json": {
  2405. "schema": {
  2406. "type": "array",
  2407. "items": {
  2408. "$ref": "#/components/schemas/Agent"
  2409. }
  2410. }
  2411. }
  2412. }
  2413. }
  2414. }
  2415. }
  2416. },
  2417. "/mcp": {
  2418. "get": {
  2419. "operationId": "mcp.status",
  2420. "parameters": [
  2421. {
  2422. "in": "query",
  2423. "name": "directory",
  2424. "schema": {
  2425. "type": "string"
  2426. }
  2427. }
  2428. ],
  2429. "description": "Get MCP server status",
  2430. "responses": {
  2431. "200": {
  2432. "description": "MCP server status",
  2433. "content": {
  2434. "application/json": {
  2435. "schema": {}
  2436. }
  2437. }
  2438. }
  2439. }
  2440. }
  2441. },
  2442. "/tui/append-prompt": {
  2443. "post": {
  2444. "operationId": "tui.appendPrompt",
  2445. "parameters": [
  2446. {
  2447. "in": "query",
  2448. "name": "directory",
  2449. "schema": {
  2450. "type": "string"
  2451. }
  2452. },
  2453. {
  2454. "in": "query",
  2455. "name": "directory",
  2456. "schema": {
  2457. "type": "string"
  2458. }
  2459. }
  2460. ],
  2461. "description": "Append prompt to the TUI",
  2462. "responses": {
  2463. "200": {
  2464. "description": "Prompt processed successfully",
  2465. "content": {
  2466. "application/json": {
  2467. "schema": {
  2468. "type": "boolean"
  2469. }
  2470. }
  2471. }
  2472. },
  2473. "400": {
  2474. "description": "Bad request",
  2475. "content": {
  2476. "application/json": {
  2477. "schema": {
  2478. "$ref": "#/components/schemas/BadRequestError"
  2479. }
  2480. }
  2481. }
  2482. }
  2483. },
  2484. "requestBody": {
  2485. "content": {
  2486. "application/json": {
  2487. "schema": {
  2488. "type": "object",
  2489. "properties": {
  2490. "text": {
  2491. "type": "string"
  2492. }
  2493. },
  2494. "required": ["text"]
  2495. }
  2496. }
  2497. }
  2498. }
  2499. }
  2500. },
  2501. "/tui/open-help": {
  2502. "post": {
  2503. "operationId": "tui.openHelp",
  2504. "parameters": [
  2505. {
  2506. "in": "query",
  2507. "name": "directory",
  2508. "schema": {
  2509. "type": "string"
  2510. }
  2511. }
  2512. ],
  2513. "description": "Open the help dialog",
  2514. "responses": {
  2515. "200": {
  2516. "description": "Help dialog opened successfully",
  2517. "content": {
  2518. "application/json": {
  2519. "schema": {
  2520. "type": "boolean"
  2521. }
  2522. }
  2523. }
  2524. }
  2525. }
  2526. }
  2527. },
  2528. "/tui/open-sessions": {
  2529. "post": {
  2530. "operationId": "tui.openSessions",
  2531. "parameters": [
  2532. {
  2533. "in": "query",
  2534. "name": "directory",
  2535. "schema": {
  2536. "type": "string"
  2537. }
  2538. }
  2539. ],
  2540. "description": "Open the session dialog",
  2541. "responses": {
  2542. "200": {
  2543. "description": "Session dialog opened successfully",
  2544. "content": {
  2545. "application/json": {
  2546. "schema": {
  2547. "type": "boolean"
  2548. }
  2549. }
  2550. }
  2551. }
  2552. }
  2553. }
  2554. },
  2555. "/tui/open-themes": {
  2556. "post": {
  2557. "operationId": "tui.openThemes",
  2558. "parameters": [
  2559. {
  2560. "in": "query",
  2561. "name": "directory",
  2562. "schema": {
  2563. "type": "string"
  2564. }
  2565. }
  2566. ],
  2567. "description": "Open the theme dialog",
  2568. "responses": {
  2569. "200": {
  2570. "description": "Theme dialog opened successfully",
  2571. "content": {
  2572. "application/json": {
  2573. "schema": {
  2574. "type": "boolean"
  2575. }
  2576. }
  2577. }
  2578. }
  2579. }
  2580. }
  2581. },
  2582. "/tui/open-models": {
  2583. "post": {
  2584. "operationId": "tui.openModels",
  2585. "parameters": [
  2586. {
  2587. "in": "query",
  2588. "name": "directory",
  2589. "schema": {
  2590. "type": "string"
  2591. }
  2592. }
  2593. ],
  2594. "description": "Open the model dialog",
  2595. "responses": {
  2596. "200": {
  2597. "description": "Model dialog opened successfully",
  2598. "content": {
  2599. "application/json": {
  2600. "schema": {
  2601. "type": "boolean"
  2602. }
  2603. }
  2604. }
  2605. }
  2606. }
  2607. }
  2608. },
  2609. "/tui/submit-prompt": {
  2610. "post": {
  2611. "operationId": "tui.submitPrompt",
  2612. "parameters": [
  2613. {
  2614. "in": "query",
  2615. "name": "directory",
  2616. "schema": {
  2617. "type": "string"
  2618. }
  2619. }
  2620. ],
  2621. "description": "Submit the prompt",
  2622. "responses": {
  2623. "200": {
  2624. "description": "Prompt submitted successfully",
  2625. "content": {
  2626. "application/json": {
  2627. "schema": {
  2628. "type": "boolean"
  2629. }
  2630. }
  2631. }
  2632. }
  2633. }
  2634. }
  2635. },
  2636. "/tui/clear-prompt": {
  2637. "post": {
  2638. "operationId": "tui.clearPrompt",
  2639. "parameters": [
  2640. {
  2641. "in": "query",
  2642. "name": "directory",
  2643. "schema": {
  2644. "type": "string"
  2645. }
  2646. }
  2647. ],
  2648. "description": "Clear the prompt",
  2649. "responses": {
  2650. "200": {
  2651. "description": "Prompt cleared successfully",
  2652. "content": {
  2653. "application/json": {
  2654. "schema": {
  2655. "type": "boolean"
  2656. }
  2657. }
  2658. }
  2659. }
  2660. }
  2661. }
  2662. },
  2663. "/tui/execute-command": {
  2664. "post": {
  2665. "operationId": "tui.executeCommand",
  2666. "parameters": [
  2667. {
  2668. "in": "query",
  2669. "name": "directory",
  2670. "schema": {
  2671. "type": "string"
  2672. }
  2673. },
  2674. {
  2675. "in": "query",
  2676. "name": "directory",
  2677. "schema": {
  2678. "type": "string"
  2679. }
  2680. }
  2681. ],
  2682. "description": "Execute a TUI command (e.g. agent_cycle)",
  2683. "responses": {
  2684. "200": {
  2685. "description": "Command executed successfully",
  2686. "content": {
  2687. "application/json": {
  2688. "schema": {
  2689. "type": "boolean"
  2690. }
  2691. }
  2692. }
  2693. },
  2694. "400": {
  2695. "description": "Bad request",
  2696. "content": {
  2697. "application/json": {
  2698. "schema": {
  2699. "$ref": "#/components/schemas/BadRequestError"
  2700. }
  2701. }
  2702. }
  2703. }
  2704. },
  2705. "requestBody": {
  2706. "content": {
  2707. "application/json": {
  2708. "schema": {
  2709. "type": "object",
  2710. "properties": {
  2711. "command": {
  2712. "type": "string"
  2713. }
  2714. },
  2715. "required": ["command"]
  2716. }
  2717. }
  2718. }
  2719. }
  2720. }
  2721. },
  2722. "/tui/show-toast": {
  2723. "post": {
  2724. "operationId": "tui.showToast",
  2725. "parameters": [
  2726. {
  2727. "in": "query",
  2728. "name": "directory",
  2729. "schema": {
  2730. "type": "string"
  2731. }
  2732. },
  2733. {
  2734. "in": "query",
  2735. "name": "directory",
  2736. "schema": {
  2737. "type": "string"
  2738. }
  2739. }
  2740. ],
  2741. "description": "Show a toast notification in the TUI",
  2742. "responses": {
  2743. "200": {
  2744. "description": "Toast notification shown successfully",
  2745. "content": {
  2746. "application/json": {
  2747. "schema": {
  2748. "type": "boolean"
  2749. }
  2750. }
  2751. }
  2752. }
  2753. },
  2754. "requestBody": {
  2755. "content": {
  2756. "application/json": {
  2757. "schema": {
  2758. "type": "object",
  2759. "properties": {
  2760. "title": {
  2761. "type": "string"
  2762. },
  2763. "message": {
  2764. "type": "string"
  2765. },
  2766. "variant": {
  2767. "type": "string",
  2768. "enum": ["info", "success", "warning", "error"]
  2769. }
  2770. },
  2771. "required": ["message", "variant"]
  2772. }
  2773. }
  2774. }
  2775. }
  2776. }
  2777. },
  2778. "/auth/{id}": {
  2779. "put": {
  2780. "operationId": "auth.set",
  2781. "parameters": [
  2782. {
  2783. "in": "query",
  2784. "name": "directory",
  2785. "schema": {
  2786. "type": "string"
  2787. }
  2788. },
  2789. {
  2790. "in": "query",
  2791. "name": "directory",
  2792. "schema": {
  2793. "type": "string"
  2794. }
  2795. },
  2796. {
  2797. "in": "query",
  2798. "name": "directory",
  2799. "schema": {
  2800. "type": "string"
  2801. }
  2802. },
  2803. {
  2804. "in": "path",
  2805. "name": "id",
  2806. "schema": {
  2807. "type": "string"
  2808. },
  2809. "required": true
  2810. }
  2811. ],
  2812. "description": "Set authentication credentials",
  2813. "responses": {
  2814. "200": {
  2815. "description": "Successfully set authentication credentials",
  2816. "content": {
  2817. "application/json": {
  2818. "schema": {
  2819. "type": "boolean"
  2820. }
  2821. }
  2822. }
  2823. },
  2824. "400": {
  2825. "description": "Bad request",
  2826. "content": {
  2827. "application/json": {
  2828. "schema": {
  2829. "$ref": "#/components/schemas/BadRequestError"
  2830. }
  2831. }
  2832. }
  2833. }
  2834. },
  2835. "requestBody": {
  2836. "content": {
  2837. "application/json": {
  2838. "schema": {
  2839. "$ref": "#/components/schemas/Auth"
  2840. }
  2841. }
  2842. }
  2843. }
  2844. }
  2845. },
  2846. "/event": {
  2847. "get": {
  2848. "operationId": "event.subscribe",
  2849. "parameters": [
  2850. {
  2851. "in": "query",
  2852. "name": "directory",
  2853. "schema": {
  2854. "type": "string"
  2855. }
  2856. }
  2857. ],
  2858. "description": "Get events",
  2859. "responses": {
  2860. "200": {
  2861. "description": "Event stream",
  2862. "content": {
  2863. "text/event-stream": {
  2864. "schema": {
  2865. "$ref": "#/components/schemas/Event"
  2866. }
  2867. }
  2868. }
  2869. }
  2870. }
  2871. }
  2872. }
  2873. },
  2874. "components": {
  2875. "schemas": {
  2876. "Project": {
  2877. "type": "object",
  2878. "properties": {
  2879. "id": {
  2880. "type": "string"
  2881. },
  2882. "worktree": {
  2883. "type": "string"
  2884. },
  2885. "vcs": {
  2886. "type": "string",
  2887. "const": "git"
  2888. },
  2889. "time": {
  2890. "type": "object",
  2891. "properties": {
  2892. "created": {
  2893. "type": "number"
  2894. },
  2895. "initialized": {
  2896. "type": "number"
  2897. }
  2898. },
  2899. "required": ["created"]
  2900. }
  2901. },
  2902. "required": ["id", "worktree", "time"]
  2903. },
  2904. "KeybindsConfig": {
  2905. "description": "Custom keybind configurations",
  2906. "type": "object",
  2907. "properties": {
  2908. "leader": {
  2909. "description": "Leader key for keybind combinations",
  2910. "default": "ctrl+x",
  2911. "type": "string"
  2912. },
  2913. "app_help": {
  2914. "description": "Show help dialog",
  2915. "default": "<leader>h",
  2916. "type": "string"
  2917. },
  2918. "app_exit": {
  2919. "description": "Exit the application",
  2920. "default": "ctrl+c,<leader>q",
  2921. "type": "string"
  2922. },
  2923. "editor_open": {
  2924. "description": "Open external editor",
  2925. "default": "<leader>e",
  2926. "type": "string"
  2927. },
  2928. "theme_list": {
  2929. "description": "List available themes",
  2930. "default": "<leader>t",
  2931. "type": "string"
  2932. },
  2933. "project_init": {
  2934. "description": "Create/update AGENTS.md",
  2935. "default": "<leader>i",
  2936. "type": "string"
  2937. },
  2938. "tool_details": {
  2939. "description": "Toggle tool details",
  2940. "default": "<leader>d",
  2941. "type": "string"
  2942. },
  2943. "thinking_blocks": {
  2944. "description": "Toggle thinking blocks",
  2945. "default": "<leader>b",
  2946. "type": "string"
  2947. },
  2948. "session_export": {
  2949. "description": "Export session to editor",
  2950. "default": "<leader>x",
  2951. "type": "string"
  2952. },
  2953. "session_new": {
  2954. "description": "Create a new session",
  2955. "default": "<leader>n",
  2956. "type": "string"
  2957. },
  2958. "session_list": {
  2959. "description": "List all sessions",
  2960. "default": "<leader>l",
  2961. "type": "string"
  2962. },
  2963. "session_timeline": {
  2964. "description": "Show session timeline",
  2965. "default": "<leader>g",
  2966. "type": "string"
  2967. },
  2968. "session_share": {
  2969. "description": "Share current session",
  2970. "default": "<leader>s",
  2971. "type": "string"
  2972. },
  2973. "session_unshare": {
  2974. "description": "Unshare current session",
  2975. "default": "none",
  2976. "type": "string"
  2977. },
  2978. "session_interrupt": {
  2979. "description": "Interrupt current session",
  2980. "default": "esc",
  2981. "type": "string"
  2982. },
  2983. "session_compact": {
  2984. "description": "Compact the session",
  2985. "default": "<leader>c",
  2986. "type": "string"
  2987. },
  2988. "session_child_cycle": {
  2989. "description": "Cycle to next child session",
  2990. "default": "ctrl+right",
  2991. "type": "string"
  2992. },
  2993. "session_child_cycle_reverse": {
  2994. "description": "Cycle to previous child session",
  2995. "default": "ctrl+left",
  2996. "type": "string"
  2997. },
  2998. "messages_page_up": {
  2999. "description": "Scroll messages up by one page",
  3000. "default": "pgup",
  3001. "type": "string"
  3002. },
  3003. "messages_page_down": {
  3004. "description": "Scroll messages down by one page",
  3005. "default": "pgdown",
  3006. "type": "string"
  3007. },
  3008. "messages_half_page_up": {
  3009. "description": "Scroll messages up by half page",
  3010. "default": "ctrl+alt+u",
  3011. "type": "string"
  3012. },
  3013. "messages_half_page_down": {
  3014. "description": "Scroll messages down by half page",
  3015. "default": "ctrl+alt+d",
  3016. "type": "string"
  3017. },
  3018. "messages_first": {
  3019. "description": "Navigate to first message",
  3020. "default": "ctrl+g",
  3021. "type": "string"
  3022. },
  3023. "messages_last": {
  3024. "description": "Navigate to last message",
  3025. "default": "ctrl+alt+g",
  3026. "type": "string"
  3027. },
  3028. "messages_copy": {
  3029. "description": "Copy message",
  3030. "default": "<leader>y",
  3031. "type": "string"
  3032. },
  3033. "messages_undo": {
  3034. "description": "Undo message",
  3035. "default": "<leader>u",
  3036. "type": "string"
  3037. },
  3038. "messages_redo": {
  3039. "description": "Redo message",
  3040. "default": "<leader>r",
  3041. "type": "string"
  3042. },
  3043. "model_list": {
  3044. "description": "List available models",
  3045. "default": "<leader>m",
  3046. "type": "string"
  3047. },
  3048. "model_cycle_recent": {
  3049. "description": "Next recent model",
  3050. "default": "f2",
  3051. "type": "string"
  3052. },
  3053. "model_cycle_recent_reverse": {
  3054. "description": "Previous recent model",
  3055. "default": "shift+f2",
  3056. "type": "string"
  3057. },
  3058. "agent_list": {
  3059. "description": "List agents",
  3060. "default": "<leader>a",
  3061. "type": "string"
  3062. },
  3063. "agent_cycle": {
  3064. "description": "Next agent",
  3065. "default": "tab",
  3066. "type": "string"
  3067. },
  3068. "agent_cycle_reverse": {
  3069. "description": "Previous agent",
  3070. "default": "shift+tab",
  3071. "type": "string"
  3072. },
  3073. "input_clear": {
  3074. "description": "Clear input field",
  3075. "default": "ctrl+c",
  3076. "type": "string"
  3077. },
  3078. "input_paste": {
  3079. "description": "Paste from clipboard",
  3080. "default": "ctrl+v",
  3081. "type": "string"
  3082. },
  3083. "input_submit": {
  3084. "description": "Submit input",
  3085. "default": "enter",
  3086. "type": "string"
  3087. },
  3088. "input_newline": {
  3089. "description": "Insert newline in input",
  3090. "default": "shift+enter,ctrl+j",
  3091. "type": "string"
  3092. },
  3093. "switch_mode": {
  3094. "description": "@deprecated use agent_cycle. Next mode",
  3095. "default": "none",
  3096. "type": "string"
  3097. },
  3098. "switch_mode_reverse": {
  3099. "description": "@deprecated use agent_cycle_reverse. Previous mode",
  3100. "default": "none",
  3101. "type": "string"
  3102. },
  3103. "switch_agent": {
  3104. "description": "@deprecated use agent_cycle. Next agent",
  3105. "default": "tab",
  3106. "type": "string"
  3107. },
  3108. "switch_agent_reverse": {
  3109. "description": "@deprecated use agent_cycle_reverse. Previous agent",
  3110. "default": "shift+tab",
  3111. "type": "string"
  3112. },
  3113. "file_list": {
  3114. "description": "@deprecated Currently not available. List files",
  3115. "default": "none",
  3116. "type": "string"
  3117. },
  3118. "file_close": {
  3119. "description": "@deprecated Close file",
  3120. "default": "none",
  3121. "type": "string"
  3122. },
  3123. "file_search": {
  3124. "description": "@deprecated Search file",
  3125. "default": "none",
  3126. "type": "string"
  3127. },
  3128. "file_diff_toggle": {
  3129. "description": "@deprecated Split/unified diff",
  3130. "default": "none",
  3131. "type": "string"
  3132. },
  3133. "messages_previous": {
  3134. "description": "@deprecated Navigate to previous message",
  3135. "default": "none",
  3136. "type": "string"
  3137. },
  3138. "messages_next": {
  3139. "description": "@deprecated Navigate to next message",
  3140. "default": "none",
  3141. "type": "string"
  3142. },
  3143. "messages_layout_toggle": {
  3144. "description": "@deprecated Toggle layout",
  3145. "default": "none",
  3146. "type": "string"
  3147. },
  3148. "messages_revert": {
  3149. "description": "@deprecated use messages_undo. Revert message",
  3150. "default": "none",
  3151. "type": "string"
  3152. }
  3153. },
  3154. "additionalProperties": false
  3155. },
  3156. "AgentConfig": {
  3157. "type": "object",
  3158. "properties": {
  3159. "model": {
  3160. "type": "string"
  3161. },
  3162. "temperature": {
  3163. "type": "number"
  3164. },
  3165. "top_p": {
  3166. "type": "number"
  3167. },
  3168. "prompt": {
  3169. "type": "string"
  3170. },
  3171. "tools": {
  3172. "type": "object",
  3173. "propertyNames": {
  3174. "type": "string"
  3175. },
  3176. "additionalProperties": {
  3177. "type": "boolean"
  3178. }
  3179. },
  3180. "disable": {
  3181. "type": "boolean"
  3182. },
  3183. "description": {
  3184. "description": "Description of when to use the agent",
  3185. "type": "string"
  3186. },
  3187. "mode": {
  3188. "anyOf": [
  3189. {
  3190. "type": "string",
  3191. "const": "subagent"
  3192. },
  3193. {
  3194. "type": "string",
  3195. "const": "primary"
  3196. },
  3197. {
  3198. "type": "string",
  3199. "const": "all"
  3200. }
  3201. ]
  3202. },
  3203. "permission": {
  3204. "type": "object",
  3205. "properties": {
  3206. "edit": {
  3207. "anyOf": [
  3208. {
  3209. "type": "string",
  3210. "const": "ask"
  3211. },
  3212. {
  3213. "type": "string",
  3214. "const": "allow"
  3215. },
  3216. {
  3217. "type": "string",
  3218. "const": "deny"
  3219. }
  3220. ]
  3221. },
  3222. "bash": {
  3223. "anyOf": [
  3224. {
  3225. "anyOf": [
  3226. {
  3227. "type": "string",
  3228. "const": "ask"
  3229. },
  3230. {
  3231. "type": "string",
  3232. "const": "allow"
  3233. },
  3234. {
  3235. "type": "string",
  3236. "const": "deny"
  3237. }
  3238. ]
  3239. },
  3240. {
  3241. "type": "object",
  3242. "propertyNames": {
  3243. "type": "string"
  3244. },
  3245. "additionalProperties": {
  3246. "anyOf": [
  3247. {
  3248. "type": "string",
  3249. "const": "ask"
  3250. },
  3251. {
  3252. "type": "string",
  3253. "const": "allow"
  3254. },
  3255. {
  3256. "type": "string",
  3257. "const": "deny"
  3258. }
  3259. ]
  3260. }
  3261. }
  3262. ]
  3263. },
  3264. "webfetch": {
  3265. "anyOf": [
  3266. {
  3267. "type": "string",
  3268. "const": "ask"
  3269. },
  3270. {
  3271. "type": "string",
  3272. "const": "allow"
  3273. },
  3274. {
  3275. "type": "string",
  3276. "const": "deny"
  3277. }
  3278. ]
  3279. }
  3280. }
  3281. }
  3282. },
  3283. "additionalProperties": {}
  3284. },
  3285. "McpLocalConfig": {
  3286. "type": "object",
  3287. "properties": {
  3288. "type": {
  3289. "description": "Type of MCP server connection",
  3290. "type": "string",
  3291. "const": "local"
  3292. },
  3293. "command": {
  3294. "description": "Command and arguments to run the MCP server",
  3295. "type": "array",
  3296. "items": {
  3297. "type": "string"
  3298. }
  3299. },
  3300. "environment": {
  3301. "description": "Environment variables to set when running the MCP server",
  3302. "type": "object",
  3303. "propertyNames": {
  3304. "type": "string"
  3305. },
  3306. "additionalProperties": {
  3307. "type": "string"
  3308. }
  3309. },
  3310. "enabled": {
  3311. "description": "Enable or disable the MCP server on startup",
  3312. "type": "boolean"
  3313. }
  3314. },
  3315. "required": ["type", "command"],
  3316. "additionalProperties": false
  3317. },
  3318. "McpRemoteConfig": {
  3319. "type": "object",
  3320. "properties": {
  3321. "type": {
  3322. "description": "Type of MCP server connection",
  3323. "type": "string",
  3324. "const": "remote"
  3325. },
  3326. "url": {
  3327. "description": "URL of the remote MCP server",
  3328. "type": "string"
  3329. },
  3330. "enabled": {
  3331. "description": "Enable or disable the MCP server on startup",
  3332. "type": "boolean"
  3333. },
  3334. "headers": {
  3335. "description": "Headers to send with the request",
  3336. "type": "object",
  3337. "propertyNames": {
  3338. "type": "string"
  3339. },
  3340. "additionalProperties": {
  3341. "type": "string"
  3342. }
  3343. }
  3344. },
  3345. "required": ["type", "url"],
  3346. "additionalProperties": false
  3347. },
  3348. "LayoutConfig": {
  3349. "description": "@deprecated Always uses stretch layout.",
  3350. "type": "string",
  3351. "enum": ["auto", "stretch"]
  3352. },
  3353. "Config": {
  3354. "type": "object",
  3355. "properties": {
  3356. "$schema": {
  3357. "description": "JSON schema reference for configuration validation",
  3358. "type": "string"
  3359. },
  3360. "theme": {
  3361. "description": "Theme name to use for the interface",
  3362. "type": "string"
  3363. },
  3364. "keybinds": {
  3365. "$ref": "#/components/schemas/KeybindsConfig"
  3366. },
  3367. "tui": {
  3368. "description": "TUI specific settings",
  3369. "type": "object",
  3370. "properties": {
  3371. "scroll_speed": {
  3372. "description": "TUI scroll speed",
  3373. "default": 2,
  3374. "type": "number",
  3375. "minimum": 1
  3376. }
  3377. }
  3378. },
  3379. "command": {
  3380. "description": "Command configuration, see https://opencode.ai/docs/commands",
  3381. "type": "object",
  3382. "propertyNames": {
  3383. "type": "string"
  3384. },
  3385. "additionalProperties": {
  3386. "type": "object",
  3387. "properties": {
  3388. "template": {
  3389. "type": "string"
  3390. },
  3391. "description": {
  3392. "type": "string"
  3393. },
  3394. "agent": {
  3395. "type": "string"
  3396. },
  3397. "model": {
  3398. "type": "string"
  3399. },
  3400. "subtask": {
  3401. "type": "boolean"
  3402. }
  3403. },
  3404. "required": ["template"]
  3405. }
  3406. },
  3407. "watcher": {
  3408. "type": "object",
  3409. "properties": {
  3410. "ignore": {
  3411. "type": "array",
  3412. "items": {
  3413. "type": "string"
  3414. }
  3415. }
  3416. }
  3417. },
  3418. "plugin": {
  3419. "type": "array",
  3420. "items": {
  3421. "type": "string"
  3422. }
  3423. },
  3424. "snapshot": {
  3425. "type": "boolean"
  3426. },
  3427. "share": {
  3428. "description": "Control sharing behavior:'manual' allows manual sharing via commands, 'auto' enables automatic sharing, 'disabled' disables all sharing",
  3429. "type": "string",
  3430. "enum": ["manual", "auto", "disabled"]
  3431. },
  3432. "autoshare": {
  3433. "description": "@deprecated Use 'share' field instead. Share newly created sessions automatically",
  3434. "type": "boolean"
  3435. },
  3436. "autoupdate": {
  3437. "description": "Automatically update to the latest version",
  3438. "type": "boolean"
  3439. },
  3440. "disabled_providers": {
  3441. "description": "Disable providers that are loaded automatically",
  3442. "type": "array",
  3443. "items": {
  3444. "type": "string"
  3445. }
  3446. },
  3447. "model": {
  3448. "description": "Model to use in the format of provider/model, eg anthropic/claude-2",
  3449. "type": "string"
  3450. },
  3451. "small_model": {
  3452. "description": "Small model to use for tasks like title generation in the format of provider/model",
  3453. "type": "string"
  3454. },
  3455. "username": {
  3456. "description": "Custom username to display in conversations instead of system username",
  3457. "type": "string"
  3458. },
  3459. "mode": {
  3460. "description": "@deprecated Use `agent` field instead.",
  3461. "type": "object",
  3462. "properties": {
  3463. "build": {
  3464. "$ref": "#/components/schemas/AgentConfig"
  3465. },
  3466. "plan": {
  3467. "$ref": "#/components/schemas/AgentConfig"
  3468. }
  3469. },
  3470. "additionalProperties": {
  3471. "$ref": "#/components/schemas/AgentConfig"
  3472. }
  3473. },
  3474. "agent": {
  3475. "description": "Agent configuration, see https://opencode.ai/docs/agent",
  3476. "type": "object",
  3477. "properties": {
  3478. "plan": {
  3479. "$ref": "#/components/schemas/AgentConfig"
  3480. },
  3481. "build": {
  3482. "$ref": "#/components/schemas/AgentConfig"
  3483. },
  3484. "general": {
  3485. "$ref": "#/components/schemas/AgentConfig"
  3486. }
  3487. },
  3488. "additionalProperties": {
  3489. "$ref": "#/components/schemas/AgentConfig"
  3490. }
  3491. },
  3492. "provider": {
  3493. "description": "Custom provider configurations and model overrides",
  3494. "type": "object",
  3495. "propertyNames": {
  3496. "type": "string"
  3497. },
  3498. "additionalProperties": {
  3499. "type": "object",
  3500. "properties": {
  3501. "api": {
  3502. "type": "string"
  3503. },
  3504. "name": {
  3505. "type": "string"
  3506. },
  3507. "env": {
  3508. "type": "array",
  3509. "items": {
  3510. "type": "string"
  3511. }
  3512. },
  3513. "id": {
  3514. "type": "string"
  3515. },
  3516. "npm": {
  3517. "type": "string"
  3518. },
  3519. "models": {
  3520. "type": "object",
  3521. "propertyNames": {
  3522. "type": "string"
  3523. },
  3524. "additionalProperties": {
  3525. "type": "object",
  3526. "properties": {
  3527. "id": {
  3528. "type": "string"
  3529. },
  3530. "name": {
  3531. "type": "string"
  3532. },
  3533. "release_date": {
  3534. "type": "string"
  3535. },
  3536. "attachment": {
  3537. "type": "boolean"
  3538. },
  3539. "reasoning": {
  3540. "type": "boolean"
  3541. },
  3542. "temperature": {
  3543. "type": "boolean"
  3544. },
  3545. "tool_call": {
  3546. "type": "boolean"
  3547. },
  3548. "cost": {
  3549. "type": "object",
  3550. "properties": {
  3551. "input": {
  3552. "type": "number"
  3553. },
  3554. "output": {
  3555. "type": "number"
  3556. },
  3557. "cache_read": {
  3558. "type": "number"
  3559. },
  3560. "cache_write": {
  3561. "type": "number"
  3562. }
  3563. },
  3564. "required": ["input", "output"]
  3565. },
  3566. "limit": {
  3567. "type": "object",
  3568. "properties": {
  3569. "context": {
  3570. "type": "number"
  3571. },
  3572. "output": {
  3573. "type": "number"
  3574. }
  3575. },
  3576. "required": ["context", "output"]
  3577. },
  3578. "modalities": {
  3579. "type": "object",
  3580. "properties": {
  3581. "input": {
  3582. "type": "array",
  3583. "items": {
  3584. "type": "string",
  3585. "enum": ["text", "audio", "image", "video", "pdf"]
  3586. }
  3587. },
  3588. "output": {
  3589. "type": "array",
  3590. "items": {
  3591. "type": "string",
  3592. "enum": ["text", "audio", "image", "video", "pdf"]
  3593. }
  3594. }
  3595. },
  3596. "required": ["input", "output"]
  3597. },
  3598. "experimental": {
  3599. "type": "boolean"
  3600. },
  3601. "status": {
  3602. "type": "string",
  3603. "enum": ["alpha", "beta"]
  3604. },
  3605. "options": {
  3606. "type": "object",
  3607. "propertyNames": {
  3608. "type": "string"
  3609. },
  3610. "additionalProperties": {}
  3611. },
  3612. "provider": {
  3613. "type": "object",
  3614. "properties": {
  3615. "npm": {
  3616. "type": "string"
  3617. }
  3618. },
  3619. "required": ["npm"]
  3620. }
  3621. }
  3622. }
  3623. },
  3624. "options": {
  3625. "type": "object",
  3626. "properties": {
  3627. "apiKey": {
  3628. "type": "string"
  3629. },
  3630. "baseURL": {
  3631. "type": "string"
  3632. },
  3633. "timeout": {
  3634. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.",
  3635. "anyOf": [
  3636. {
  3637. "description": "Timeout in milliseconds for requests to this provider. Default is 300000 (5 minutes). Set to false to disable timeout.",
  3638. "type": "integer",
  3639. "exclusiveMinimum": 0,
  3640. "maximum": 9007199254740991
  3641. },
  3642. {
  3643. "description": "Disable timeout for this provider entirely.",
  3644. "type": "boolean",
  3645. "const": false
  3646. }
  3647. ]
  3648. }
  3649. },
  3650. "additionalProperties": {}
  3651. }
  3652. },
  3653. "additionalProperties": false
  3654. }
  3655. },
  3656. "mcp": {
  3657. "description": "MCP (Model Context Protocol) server configurations",
  3658. "type": "object",
  3659. "propertyNames": {
  3660. "type": "string"
  3661. },
  3662. "additionalProperties": {
  3663. "anyOf": [
  3664. {
  3665. "$ref": "#/components/schemas/McpLocalConfig"
  3666. },
  3667. {
  3668. "$ref": "#/components/schemas/McpRemoteConfig"
  3669. }
  3670. ]
  3671. }
  3672. },
  3673. "formatter": {
  3674. "type": "object",
  3675. "propertyNames": {
  3676. "type": "string"
  3677. },
  3678. "additionalProperties": {
  3679. "type": "object",
  3680. "properties": {
  3681. "disabled": {
  3682. "type": "boolean"
  3683. },
  3684. "command": {
  3685. "type": "array",
  3686. "items": {
  3687. "type": "string"
  3688. }
  3689. },
  3690. "environment": {
  3691. "type": "object",
  3692. "propertyNames": {
  3693. "type": "string"
  3694. },
  3695. "additionalProperties": {
  3696. "type": "string"
  3697. }
  3698. },
  3699. "extensions": {
  3700. "type": "array",
  3701. "items": {
  3702. "type": "string"
  3703. }
  3704. }
  3705. }
  3706. }
  3707. },
  3708. "lsp": {
  3709. "type": "object",
  3710. "propertyNames": {
  3711. "type": "string"
  3712. },
  3713. "additionalProperties": {
  3714. "anyOf": [
  3715. {
  3716. "type": "object",
  3717. "properties": {
  3718. "disabled": {
  3719. "type": "boolean",
  3720. "const": true
  3721. }
  3722. },
  3723. "required": ["disabled"]
  3724. },
  3725. {
  3726. "type": "object",
  3727. "properties": {
  3728. "command": {
  3729. "type": "array",
  3730. "items": {
  3731. "type": "string"
  3732. }
  3733. },
  3734. "extensions": {
  3735. "type": "array",
  3736. "items": {
  3737. "type": "string"
  3738. }
  3739. },
  3740. "disabled": {
  3741. "type": "boolean"
  3742. },
  3743. "env": {
  3744. "type": "object",
  3745. "propertyNames": {
  3746. "type": "string"
  3747. },
  3748. "additionalProperties": {
  3749. "type": "string"
  3750. }
  3751. },
  3752. "initialization": {
  3753. "type": "object",
  3754. "propertyNames": {
  3755. "type": "string"
  3756. },
  3757. "additionalProperties": {}
  3758. }
  3759. },
  3760. "required": ["command"]
  3761. }
  3762. ]
  3763. }
  3764. },
  3765. "instructions": {
  3766. "description": "Additional instruction files or patterns to include",
  3767. "type": "array",
  3768. "items": {
  3769. "type": "string"
  3770. }
  3771. },
  3772. "layout": {
  3773. "$ref": "#/components/schemas/LayoutConfig"
  3774. },
  3775. "permission": {
  3776. "type": "object",
  3777. "properties": {
  3778. "edit": {
  3779. "anyOf": [
  3780. {
  3781. "type": "string",
  3782. "const": "ask"
  3783. },
  3784. {
  3785. "type": "string",
  3786. "const": "allow"
  3787. },
  3788. {
  3789. "type": "string",
  3790. "const": "deny"
  3791. }
  3792. ]
  3793. },
  3794. "bash": {
  3795. "anyOf": [
  3796. {
  3797. "anyOf": [
  3798. {
  3799. "type": "string",
  3800. "const": "ask"
  3801. },
  3802. {
  3803. "type": "string",
  3804. "const": "allow"
  3805. },
  3806. {
  3807. "type": "string",
  3808. "const": "deny"
  3809. }
  3810. ]
  3811. },
  3812. {
  3813. "type": "object",
  3814. "propertyNames": {
  3815. "type": "string"
  3816. },
  3817. "additionalProperties": {
  3818. "anyOf": [
  3819. {
  3820. "type": "string",
  3821. "const": "ask"
  3822. },
  3823. {
  3824. "type": "string",
  3825. "const": "allow"
  3826. },
  3827. {
  3828. "type": "string",
  3829. "const": "deny"
  3830. }
  3831. ]
  3832. }
  3833. }
  3834. ]
  3835. },
  3836. "webfetch": {
  3837. "anyOf": [
  3838. {
  3839. "type": "string",
  3840. "const": "ask"
  3841. },
  3842. {
  3843. "type": "string",
  3844. "const": "allow"
  3845. },
  3846. {
  3847. "type": "string",
  3848. "const": "deny"
  3849. }
  3850. ]
  3851. }
  3852. }
  3853. },
  3854. "tools": {
  3855. "type": "object",
  3856. "propertyNames": {
  3857. "type": "string"
  3858. },
  3859. "additionalProperties": {
  3860. "type": "boolean"
  3861. }
  3862. },
  3863. "experimental": {
  3864. "type": "object",
  3865. "properties": {
  3866. "hook": {
  3867. "type": "object",
  3868. "properties": {
  3869. "file_edited": {
  3870. "type": "object",
  3871. "propertyNames": {
  3872. "type": "string"
  3873. },
  3874. "additionalProperties": {
  3875. "type": "array",
  3876. "items": {
  3877. "type": "object",
  3878. "properties": {
  3879. "command": {
  3880. "type": "array",
  3881. "items": {
  3882. "type": "string"
  3883. }
  3884. },
  3885. "environment": {
  3886. "type": "object",
  3887. "propertyNames": {
  3888. "type": "string"
  3889. },
  3890. "additionalProperties": {
  3891. "type": "string"
  3892. }
  3893. }
  3894. },
  3895. "required": ["command"]
  3896. }
  3897. }
  3898. },
  3899. "session_completed": {
  3900. "type": "array",
  3901. "items": {
  3902. "type": "object",
  3903. "properties": {
  3904. "command": {
  3905. "type": "array",
  3906. "items": {
  3907. "type": "string"
  3908. }
  3909. },
  3910. "environment": {
  3911. "type": "object",
  3912. "propertyNames": {
  3913. "type": "string"
  3914. },
  3915. "additionalProperties": {
  3916. "type": "string"
  3917. }
  3918. }
  3919. },
  3920. "required": ["command"]
  3921. }
  3922. }
  3923. }
  3924. },
  3925. "disable_paste_summary": {
  3926. "type": "boolean"
  3927. }
  3928. }
  3929. }
  3930. },
  3931. "additionalProperties": false
  3932. },
  3933. "BadRequestError": {
  3934. "type": "object",
  3935. "properties": {
  3936. "data": {
  3937. "anyOf": [
  3938. {},
  3939. {
  3940. "type": "null"
  3941. }
  3942. ]
  3943. },
  3944. "errors": {
  3945. "type": "array",
  3946. "items": {
  3947. "type": "object",
  3948. "propertyNames": {
  3949. "type": "string"
  3950. },
  3951. "additionalProperties": {}
  3952. }
  3953. },
  3954. "success": {
  3955. "type": "boolean",
  3956. "const": false
  3957. }
  3958. },
  3959. "required": ["data", "errors", "success"]
  3960. },
  3961. "ToolIDs": {
  3962. "type": "array",
  3963. "items": {
  3964. "type": "string"
  3965. }
  3966. },
  3967. "ToolListItem": {
  3968. "type": "object",
  3969. "properties": {
  3970. "id": {
  3971. "type": "string"
  3972. },
  3973. "description": {
  3974. "type": "string"
  3975. },
  3976. "parameters": {}
  3977. },
  3978. "required": ["id", "description", "parameters"]
  3979. },
  3980. "ToolList": {
  3981. "type": "array",
  3982. "items": {
  3983. "$ref": "#/components/schemas/ToolListItem"
  3984. }
  3985. },
  3986. "Path": {
  3987. "type": "object",
  3988. "properties": {
  3989. "state": {
  3990. "type": "string"
  3991. },
  3992. "config": {
  3993. "type": "string"
  3994. },
  3995. "worktree": {
  3996. "type": "string"
  3997. },
  3998. "directory": {
  3999. "type": "string"
  4000. }
  4001. },
  4002. "required": ["state", "config", "worktree", "directory"]
  4003. },
  4004. "FileDiff": {
  4005. "type": "object",
  4006. "properties": {
  4007. "file": {
  4008. "type": "string"
  4009. },
  4010. "before": {
  4011. "type": "string"
  4012. },
  4013. "after": {
  4014. "type": "string"
  4015. },
  4016. "additions": {
  4017. "type": "number"
  4018. },
  4019. "deletions": {
  4020. "type": "number"
  4021. }
  4022. },
  4023. "required": ["file", "before", "after", "additions", "deletions"]
  4024. },
  4025. "Session": {
  4026. "type": "object",
  4027. "properties": {
  4028. "id": {
  4029. "type": "string",
  4030. "pattern": "^ses.*"
  4031. },
  4032. "projectID": {
  4033. "type": "string"
  4034. },
  4035. "directory": {
  4036. "type": "string"
  4037. },
  4038. "parentID": {
  4039. "type": "string",
  4040. "pattern": "^ses.*"
  4041. },
  4042. "summary": {
  4043. "type": "object",
  4044. "properties": {
  4045. "diffs": {
  4046. "type": "array",
  4047. "items": {
  4048. "$ref": "#/components/schemas/FileDiff"
  4049. }
  4050. }
  4051. },
  4052. "required": ["diffs"]
  4053. },
  4054. "share": {
  4055. "type": "object",
  4056. "properties": {
  4057. "url": {
  4058. "type": "string"
  4059. }
  4060. },
  4061. "required": ["url"]
  4062. },
  4063. "title": {
  4064. "type": "string"
  4065. },
  4066. "version": {
  4067. "type": "string"
  4068. },
  4069. "time": {
  4070. "type": "object",
  4071. "properties": {
  4072. "created": {
  4073. "type": "number"
  4074. },
  4075. "updated": {
  4076. "type": "number"
  4077. },
  4078. "compacting": {
  4079. "type": "number"
  4080. }
  4081. },
  4082. "required": ["created", "updated"]
  4083. },
  4084. "revert": {
  4085. "type": "object",
  4086. "properties": {
  4087. "messageID": {
  4088. "type": "string"
  4089. },
  4090. "partID": {
  4091. "type": "string"
  4092. },
  4093. "snapshot": {
  4094. "type": "string"
  4095. },
  4096. "diff": {
  4097. "type": "string"
  4098. }
  4099. },
  4100. "required": ["messageID"]
  4101. }
  4102. },
  4103. "required": ["id", "projectID", "directory", "title", "version", "time"]
  4104. },
  4105. "NotFoundError": {
  4106. "type": "object",
  4107. "properties": {
  4108. "name": {
  4109. "type": "string",
  4110. "const": "NotFoundError"
  4111. },
  4112. "data": {
  4113. "type": "object",
  4114. "properties": {
  4115. "message": {
  4116. "type": "string"
  4117. }
  4118. },
  4119. "required": ["message"]
  4120. }
  4121. },
  4122. "required": ["name", "data"]
  4123. },
  4124. "Todo": {
  4125. "type": "object",
  4126. "properties": {
  4127. "content": {
  4128. "description": "Brief description of the task",
  4129. "type": "string"
  4130. },
  4131. "status": {
  4132. "description": "Current status of the task: pending, in_progress, completed, cancelled",
  4133. "type": "string"
  4134. },
  4135. "priority": {
  4136. "description": "Priority level of the task: high, medium, low",
  4137. "type": "string"
  4138. },
  4139. "id": {
  4140. "description": "Unique identifier for the todo item",
  4141. "type": "string"
  4142. }
  4143. },
  4144. "required": ["content", "status", "priority", "id"]
  4145. },
  4146. "UserMessage": {
  4147. "type": "object",
  4148. "properties": {
  4149. "id": {
  4150. "type": "string"
  4151. },
  4152. "sessionID": {
  4153. "type": "string"
  4154. },
  4155. "role": {
  4156. "type": "string",
  4157. "const": "user"
  4158. },
  4159. "time": {
  4160. "type": "object",
  4161. "properties": {
  4162. "created": {
  4163. "type": "number"
  4164. }
  4165. },
  4166. "required": ["created"]
  4167. },
  4168. "summary": {
  4169. "type": "object",
  4170. "properties": {
  4171. "title": {
  4172. "type": "string"
  4173. },
  4174. "body": {
  4175. "type": "string"
  4176. },
  4177. "diffs": {
  4178. "type": "array",
  4179. "items": {
  4180. "$ref": "#/components/schemas/FileDiff"
  4181. }
  4182. }
  4183. },
  4184. "required": ["diffs"]
  4185. }
  4186. },
  4187. "required": ["id", "sessionID", "role", "time"]
  4188. },
  4189. "ProviderAuthError": {
  4190. "type": "object",
  4191. "properties": {
  4192. "name": {
  4193. "type": "string",
  4194. "const": "ProviderAuthError"
  4195. },
  4196. "data": {
  4197. "type": "object",
  4198. "properties": {
  4199. "providerID": {
  4200. "type": "string"
  4201. },
  4202. "message": {
  4203. "type": "string"
  4204. }
  4205. },
  4206. "required": ["providerID", "message"]
  4207. }
  4208. },
  4209. "required": ["name", "data"]
  4210. },
  4211. "UnknownError": {
  4212. "type": "object",
  4213. "properties": {
  4214. "name": {
  4215. "type": "string",
  4216. "const": "UnknownError"
  4217. },
  4218. "data": {
  4219. "type": "object",
  4220. "properties": {
  4221. "message": {
  4222. "type": "string"
  4223. }
  4224. },
  4225. "required": ["message"]
  4226. }
  4227. },
  4228. "required": ["name", "data"]
  4229. },
  4230. "MessageOutputLengthError": {
  4231. "type": "object",
  4232. "properties": {
  4233. "name": {
  4234. "type": "string",
  4235. "const": "MessageOutputLengthError"
  4236. },
  4237. "data": {
  4238. "type": "object",
  4239. "properties": {}
  4240. }
  4241. },
  4242. "required": ["name", "data"]
  4243. },
  4244. "MessageAbortedError": {
  4245. "type": "object",
  4246. "properties": {
  4247. "name": {
  4248. "type": "string",
  4249. "const": "MessageAbortedError"
  4250. },
  4251. "data": {
  4252. "type": "object",
  4253. "properties": {
  4254. "message": {
  4255. "type": "string"
  4256. }
  4257. },
  4258. "required": ["message"]
  4259. }
  4260. },
  4261. "required": ["name", "data"]
  4262. },
  4263. "APIError": {
  4264. "type": "object",
  4265. "properties": {
  4266. "name": {
  4267. "type": "string",
  4268. "const": "APIError"
  4269. },
  4270. "data": {
  4271. "type": "object",
  4272. "properties": {
  4273. "message": {
  4274. "type": "string"
  4275. },
  4276. "statusCode": {
  4277. "type": "number"
  4278. },
  4279. "isRetryable": {
  4280. "type": "boolean"
  4281. },
  4282. "responseHeaders": {
  4283. "type": "object",
  4284. "propertyNames": {
  4285. "type": "string"
  4286. },
  4287. "additionalProperties": {
  4288. "type": "string"
  4289. }
  4290. },
  4291. "responseBody": {
  4292. "type": "string"
  4293. }
  4294. },
  4295. "required": ["message", "isRetryable"]
  4296. }
  4297. },
  4298. "required": ["name", "data"]
  4299. },
  4300. "AssistantMessage": {
  4301. "type": "object",
  4302. "properties": {
  4303. "id": {
  4304. "type": "string"
  4305. },
  4306. "sessionID": {
  4307. "type": "string"
  4308. },
  4309. "role": {
  4310. "type": "string",
  4311. "const": "assistant"
  4312. },
  4313. "time": {
  4314. "type": "object",
  4315. "properties": {
  4316. "created": {
  4317. "type": "number"
  4318. },
  4319. "completed": {
  4320. "type": "number"
  4321. }
  4322. },
  4323. "required": ["created"]
  4324. },
  4325. "error": {
  4326. "anyOf": [
  4327. {
  4328. "$ref": "#/components/schemas/ProviderAuthError"
  4329. },
  4330. {
  4331. "$ref": "#/components/schemas/UnknownError"
  4332. },
  4333. {
  4334. "$ref": "#/components/schemas/MessageOutputLengthError"
  4335. },
  4336. {
  4337. "$ref": "#/components/schemas/MessageAbortedError"
  4338. },
  4339. {
  4340. "$ref": "#/components/schemas/APIError"
  4341. }
  4342. ]
  4343. },
  4344. "system": {
  4345. "type": "array",
  4346. "items": {
  4347. "type": "string"
  4348. }
  4349. },
  4350. "parentID": {
  4351. "type": "string"
  4352. },
  4353. "modelID": {
  4354. "type": "string"
  4355. },
  4356. "providerID": {
  4357. "type": "string"
  4358. },
  4359. "mode": {
  4360. "type": "string"
  4361. },
  4362. "path": {
  4363. "type": "object",
  4364. "properties": {
  4365. "cwd": {
  4366. "type": "string"
  4367. },
  4368. "root": {
  4369. "type": "string"
  4370. }
  4371. },
  4372. "required": ["cwd", "root"]
  4373. },
  4374. "summary": {
  4375. "type": "boolean"
  4376. },
  4377. "cost": {
  4378. "type": "number"
  4379. },
  4380. "tokens": {
  4381. "type": "object",
  4382. "properties": {
  4383. "input": {
  4384. "type": "number"
  4385. },
  4386. "output": {
  4387. "type": "number"
  4388. },
  4389. "reasoning": {
  4390. "type": "number"
  4391. },
  4392. "cache": {
  4393. "type": "object",
  4394. "properties": {
  4395. "read": {
  4396. "type": "number"
  4397. },
  4398. "write": {
  4399. "type": "number"
  4400. }
  4401. },
  4402. "required": ["read", "write"]
  4403. }
  4404. },
  4405. "required": ["input", "output", "reasoning", "cache"]
  4406. }
  4407. },
  4408. "required": [
  4409. "id",
  4410. "sessionID",
  4411. "role",
  4412. "time",
  4413. "system",
  4414. "parentID",
  4415. "modelID",
  4416. "providerID",
  4417. "mode",
  4418. "path",
  4419. "cost",
  4420. "tokens"
  4421. ]
  4422. },
  4423. "Message": {
  4424. "anyOf": [
  4425. {
  4426. "$ref": "#/components/schemas/UserMessage"
  4427. },
  4428. {
  4429. "$ref": "#/components/schemas/AssistantMessage"
  4430. }
  4431. ]
  4432. },
  4433. "TextPart": {
  4434. "type": "object",
  4435. "properties": {
  4436. "id": {
  4437. "type": "string"
  4438. },
  4439. "sessionID": {
  4440. "type": "string"
  4441. },
  4442. "messageID": {
  4443. "type": "string"
  4444. },
  4445. "type": {
  4446. "type": "string",
  4447. "const": "text"
  4448. },
  4449. "text": {
  4450. "type": "string"
  4451. },
  4452. "synthetic": {
  4453. "type": "boolean"
  4454. },
  4455. "time": {
  4456. "type": "object",
  4457. "properties": {
  4458. "start": {
  4459. "type": "number"
  4460. },
  4461. "end": {
  4462. "type": "number"
  4463. }
  4464. },
  4465. "required": ["start"]
  4466. },
  4467. "metadata": {
  4468. "type": "object",
  4469. "propertyNames": {
  4470. "type": "string"
  4471. },
  4472. "additionalProperties": {}
  4473. }
  4474. },
  4475. "required": ["id", "sessionID", "messageID", "type", "text"]
  4476. },
  4477. "ReasoningPart": {
  4478. "type": "object",
  4479. "properties": {
  4480. "id": {
  4481. "type": "string"
  4482. },
  4483. "sessionID": {
  4484. "type": "string"
  4485. },
  4486. "messageID": {
  4487. "type": "string"
  4488. },
  4489. "type": {
  4490. "type": "string",
  4491. "const": "reasoning"
  4492. },
  4493. "text": {
  4494. "type": "string"
  4495. },
  4496. "metadata": {
  4497. "type": "object",
  4498. "propertyNames": {
  4499. "type": "string"
  4500. },
  4501. "additionalProperties": {}
  4502. },
  4503. "time": {
  4504. "type": "object",
  4505. "properties": {
  4506. "start": {
  4507. "type": "number"
  4508. },
  4509. "end": {
  4510. "type": "number"
  4511. }
  4512. },
  4513. "required": ["start"]
  4514. }
  4515. },
  4516. "required": ["id", "sessionID", "messageID", "type", "text", "time"]
  4517. },
  4518. "FilePartSourceText": {
  4519. "type": "object",
  4520. "properties": {
  4521. "value": {
  4522. "type": "string"
  4523. },
  4524. "start": {
  4525. "type": "integer",
  4526. "minimum": -9007199254740991,
  4527. "maximum": 9007199254740991
  4528. },
  4529. "end": {
  4530. "type": "integer",
  4531. "minimum": -9007199254740991,
  4532. "maximum": 9007199254740991
  4533. }
  4534. },
  4535. "required": ["value", "start", "end"]
  4536. },
  4537. "FileSource": {
  4538. "type": "object",
  4539. "properties": {
  4540. "text": {
  4541. "$ref": "#/components/schemas/FilePartSourceText"
  4542. },
  4543. "type": {
  4544. "type": "string",
  4545. "const": "file"
  4546. },
  4547. "path": {
  4548. "type": "string"
  4549. }
  4550. },
  4551. "required": ["text", "type", "path"]
  4552. },
  4553. "Range": {
  4554. "type": "object",
  4555. "properties": {
  4556. "start": {
  4557. "type": "object",
  4558. "properties": {
  4559. "line": {
  4560. "type": "number"
  4561. },
  4562. "character": {
  4563. "type": "number"
  4564. }
  4565. },
  4566. "required": ["line", "character"]
  4567. },
  4568. "end": {
  4569. "type": "object",
  4570. "properties": {
  4571. "line": {
  4572. "type": "number"
  4573. },
  4574. "character": {
  4575. "type": "number"
  4576. }
  4577. },
  4578. "required": ["line", "character"]
  4579. }
  4580. },
  4581. "required": ["start", "end"]
  4582. },
  4583. "SymbolSource": {
  4584. "type": "object",
  4585. "properties": {
  4586. "text": {
  4587. "$ref": "#/components/schemas/FilePartSourceText"
  4588. },
  4589. "type": {
  4590. "type": "string",
  4591. "const": "symbol"
  4592. },
  4593. "path": {
  4594. "type": "string"
  4595. },
  4596. "range": {
  4597. "$ref": "#/components/schemas/Range"
  4598. },
  4599. "name": {
  4600. "type": "string"
  4601. },
  4602. "kind": {
  4603. "type": "integer",
  4604. "minimum": -9007199254740991,
  4605. "maximum": 9007199254740991
  4606. }
  4607. },
  4608. "required": ["text", "type", "path", "range", "name", "kind"]
  4609. },
  4610. "FilePartSource": {
  4611. "anyOf": [
  4612. {
  4613. "$ref": "#/components/schemas/FileSource"
  4614. },
  4615. {
  4616. "$ref": "#/components/schemas/SymbolSource"
  4617. }
  4618. ]
  4619. },
  4620. "FilePart": {
  4621. "type": "object",
  4622. "properties": {
  4623. "id": {
  4624. "type": "string"
  4625. },
  4626. "sessionID": {
  4627. "type": "string"
  4628. },
  4629. "messageID": {
  4630. "type": "string"
  4631. },
  4632. "type": {
  4633. "type": "string",
  4634. "const": "file"
  4635. },
  4636. "mime": {
  4637. "type": "string"
  4638. },
  4639. "filename": {
  4640. "type": "string"
  4641. },
  4642. "url": {
  4643. "type": "string"
  4644. },
  4645. "source": {
  4646. "$ref": "#/components/schemas/FilePartSource"
  4647. }
  4648. },
  4649. "required": ["id", "sessionID", "messageID", "type", "mime", "url"]
  4650. },
  4651. "ToolStatePending": {
  4652. "type": "object",
  4653. "properties": {
  4654. "status": {
  4655. "type": "string",
  4656. "const": "pending"
  4657. }
  4658. },
  4659. "required": ["status"]
  4660. },
  4661. "ToolStateRunning": {
  4662. "type": "object",
  4663. "properties": {
  4664. "status": {
  4665. "type": "string",
  4666. "const": "running"
  4667. },
  4668. "input": {},
  4669. "title": {
  4670. "type": "string"
  4671. },
  4672. "metadata": {
  4673. "type": "object",
  4674. "propertyNames": {
  4675. "type": "string"
  4676. },
  4677. "additionalProperties": {}
  4678. },
  4679. "time": {
  4680. "type": "object",
  4681. "properties": {
  4682. "start": {
  4683. "type": "number"
  4684. }
  4685. },
  4686. "required": ["start"]
  4687. }
  4688. },
  4689. "required": ["status", "input", "time"]
  4690. },
  4691. "ToolStateCompleted": {
  4692. "type": "object",
  4693. "properties": {
  4694. "status": {
  4695. "type": "string",
  4696. "const": "completed"
  4697. },
  4698. "input": {
  4699. "type": "object",
  4700. "propertyNames": {
  4701. "type": "string"
  4702. },
  4703. "additionalProperties": {}
  4704. },
  4705. "output": {
  4706. "type": "string"
  4707. },
  4708. "title": {
  4709. "type": "string"
  4710. },
  4711. "metadata": {
  4712. "type": "object",
  4713. "propertyNames": {
  4714. "type": "string"
  4715. },
  4716. "additionalProperties": {}
  4717. },
  4718. "time": {
  4719. "type": "object",
  4720. "properties": {
  4721. "start": {
  4722. "type": "number"
  4723. },
  4724. "end": {
  4725. "type": "number"
  4726. },
  4727. "compacted": {
  4728. "type": "number"
  4729. }
  4730. },
  4731. "required": ["start", "end"]
  4732. },
  4733. "attachments": {
  4734. "type": "array",
  4735. "items": {
  4736. "$ref": "#/components/schemas/FilePart"
  4737. }
  4738. }
  4739. },
  4740. "required": ["status", "input", "output", "title", "metadata", "time"]
  4741. },
  4742. "ToolStateError": {
  4743. "type": "object",
  4744. "properties": {
  4745. "status": {
  4746. "type": "string",
  4747. "const": "error"
  4748. },
  4749. "input": {
  4750. "type": "object",
  4751. "propertyNames": {
  4752. "type": "string"
  4753. },
  4754. "additionalProperties": {}
  4755. },
  4756. "error": {
  4757. "type": "string"
  4758. },
  4759. "metadata": {
  4760. "type": "object",
  4761. "propertyNames": {
  4762. "type": "string"
  4763. },
  4764. "additionalProperties": {}
  4765. },
  4766. "time": {
  4767. "type": "object",
  4768. "properties": {
  4769. "start": {
  4770. "type": "number"
  4771. },
  4772. "end": {
  4773. "type": "number"
  4774. }
  4775. },
  4776. "required": ["start", "end"]
  4777. }
  4778. },
  4779. "required": ["status", "input", "error", "time"]
  4780. },
  4781. "ToolState": {
  4782. "anyOf": [
  4783. {
  4784. "$ref": "#/components/schemas/ToolStatePending"
  4785. },
  4786. {
  4787. "$ref": "#/components/schemas/ToolStateRunning"
  4788. },
  4789. {
  4790. "$ref": "#/components/schemas/ToolStateCompleted"
  4791. },
  4792. {
  4793. "$ref": "#/components/schemas/ToolStateError"
  4794. }
  4795. ]
  4796. },
  4797. "ToolPart": {
  4798. "type": "object",
  4799. "properties": {
  4800. "id": {
  4801. "type": "string"
  4802. },
  4803. "sessionID": {
  4804. "type": "string"
  4805. },
  4806. "messageID": {
  4807. "type": "string"
  4808. },
  4809. "type": {
  4810. "type": "string",
  4811. "const": "tool"
  4812. },
  4813. "callID": {
  4814. "type": "string"
  4815. },
  4816. "tool": {
  4817. "type": "string"
  4818. },
  4819. "state": {
  4820. "$ref": "#/components/schemas/ToolState"
  4821. },
  4822. "metadata": {
  4823. "type": "object",
  4824. "propertyNames": {
  4825. "type": "string"
  4826. },
  4827. "additionalProperties": {}
  4828. }
  4829. },
  4830. "required": ["id", "sessionID", "messageID", "type", "callID", "tool", "state"]
  4831. },
  4832. "StepStartPart": {
  4833. "type": "object",
  4834. "properties": {
  4835. "id": {
  4836. "type": "string"
  4837. },
  4838. "sessionID": {
  4839. "type": "string"
  4840. },
  4841. "messageID": {
  4842. "type": "string"
  4843. },
  4844. "type": {
  4845. "type": "string",
  4846. "const": "step-start"
  4847. },
  4848. "snapshot": {
  4849. "type": "string"
  4850. }
  4851. },
  4852. "required": ["id", "sessionID", "messageID", "type"]
  4853. },
  4854. "StepFinishPart": {
  4855. "type": "object",
  4856. "properties": {
  4857. "id": {
  4858. "type": "string"
  4859. },
  4860. "sessionID": {
  4861. "type": "string"
  4862. },
  4863. "messageID": {
  4864. "type": "string"
  4865. },
  4866. "type": {
  4867. "type": "string",
  4868. "const": "step-finish"
  4869. },
  4870. "reason": {
  4871. "type": "string"
  4872. },
  4873. "snapshot": {
  4874. "type": "string"
  4875. },
  4876. "cost": {
  4877. "type": "number"
  4878. },
  4879. "tokens": {
  4880. "type": "object",
  4881. "properties": {
  4882. "input": {
  4883. "type": "number"
  4884. },
  4885. "output": {
  4886. "type": "number"
  4887. },
  4888. "reasoning": {
  4889. "type": "number"
  4890. },
  4891. "cache": {
  4892. "type": "object",
  4893. "properties": {
  4894. "read": {
  4895. "type": "number"
  4896. },
  4897. "write": {
  4898. "type": "number"
  4899. }
  4900. },
  4901. "required": ["read", "write"]
  4902. }
  4903. },
  4904. "required": ["input", "output", "reasoning", "cache"]
  4905. }
  4906. },
  4907. "required": ["id", "sessionID", "messageID", "type", "reason", "cost", "tokens"]
  4908. },
  4909. "SnapshotPart": {
  4910. "type": "object",
  4911. "properties": {
  4912. "id": {
  4913. "type": "string"
  4914. },
  4915. "sessionID": {
  4916. "type": "string"
  4917. },
  4918. "messageID": {
  4919. "type": "string"
  4920. },
  4921. "type": {
  4922. "type": "string",
  4923. "const": "snapshot"
  4924. },
  4925. "snapshot": {
  4926. "type": "string"
  4927. }
  4928. },
  4929. "required": ["id", "sessionID", "messageID", "type", "snapshot"]
  4930. },
  4931. "PatchPart": {
  4932. "type": "object",
  4933. "properties": {
  4934. "id": {
  4935. "type": "string"
  4936. },
  4937. "sessionID": {
  4938. "type": "string"
  4939. },
  4940. "messageID": {
  4941. "type": "string"
  4942. },
  4943. "type": {
  4944. "type": "string",
  4945. "const": "patch"
  4946. },
  4947. "hash": {
  4948. "type": "string"
  4949. },
  4950. "files": {
  4951. "type": "array",
  4952. "items": {
  4953. "type": "string"
  4954. }
  4955. }
  4956. },
  4957. "required": ["id", "sessionID", "messageID", "type", "hash", "files"]
  4958. },
  4959. "AgentPart": {
  4960. "type": "object",
  4961. "properties": {
  4962. "id": {
  4963. "type": "string"
  4964. },
  4965. "sessionID": {
  4966. "type": "string"
  4967. },
  4968. "messageID": {
  4969. "type": "string"
  4970. },
  4971. "type": {
  4972. "type": "string",
  4973. "const": "agent"
  4974. },
  4975. "name": {
  4976. "type": "string"
  4977. },
  4978. "source": {
  4979. "type": "object",
  4980. "properties": {
  4981. "value": {
  4982. "type": "string"
  4983. },
  4984. "start": {
  4985. "type": "integer",
  4986. "minimum": -9007199254740991,
  4987. "maximum": 9007199254740991
  4988. },
  4989. "end": {
  4990. "type": "integer",
  4991. "minimum": -9007199254740991,
  4992. "maximum": 9007199254740991
  4993. }
  4994. },
  4995. "required": ["value", "start", "end"]
  4996. }
  4997. },
  4998. "required": ["id", "sessionID", "messageID", "type", "name"]
  4999. },
  5000. "RetryPart": {
  5001. "type": "object",
  5002. "properties": {
  5003. "id": {
  5004. "type": "string"
  5005. },
  5006. "sessionID": {
  5007. "type": "string"
  5008. },
  5009. "messageID": {
  5010. "type": "string"
  5011. },
  5012. "type": {
  5013. "type": "string",
  5014. "const": "retry"
  5015. },
  5016. "attempt": {
  5017. "type": "number"
  5018. },
  5019. "error": {
  5020. "$ref": "#/components/schemas/APIError"
  5021. },
  5022. "time": {
  5023. "type": "object",
  5024. "properties": {
  5025. "created": {
  5026. "type": "number"
  5027. }
  5028. },
  5029. "required": ["created"]
  5030. }
  5031. },
  5032. "required": ["id", "sessionID", "messageID", "type", "attempt", "error", "time"]
  5033. },
  5034. "Part": {
  5035. "anyOf": [
  5036. {
  5037. "$ref": "#/components/schemas/TextPart"
  5038. },
  5039. {
  5040. "$ref": "#/components/schemas/ReasoningPart"
  5041. },
  5042. {
  5043. "$ref": "#/components/schemas/FilePart"
  5044. },
  5045. {
  5046. "$ref": "#/components/schemas/ToolPart"
  5047. },
  5048. {
  5049. "$ref": "#/components/schemas/StepStartPart"
  5050. },
  5051. {
  5052. "$ref": "#/components/schemas/StepFinishPart"
  5053. },
  5054. {
  5055. "$ref": "#/components/schemas/SnapshotPart"
  5056. },
  5057. {
  5058. "$ref": "#/components/schemas/PatchPart"
  5059. },
  5060. {
  5061. "$ref": "#/components/schemas/AgentPart"
  5062. },
  5063. {
  5064. "$ref": "#/components/schemas/RetryPart"
  5065. }
  5066. ]
  5067. },
  5068. "TextPartInput": {
  5069. "type": "object",
  5070. "properties": {
  5071. "id": {
  5072. "type": "string"
  5073. },
  5074. "type": {
  5075. "type": "string",
  5076. "const": "text"
  5077. },
  5078. "text": {
  5079. "type": "string"
  5080. },
  5081. "synthetic": {
  5082. "type": "boolean"
  5083. },
  5084. "time": {
  5085. "type": "object",
  5086. "properties": {
  5087. "start": {
  5088. "type": "number"
  5089. },
  5090. "end": {
  5091. "type": "number"
  5092. }
  5093. },
  5094. "required": ["start"]
  5095. },
  5096. "metadata": {
  5097. "type": "object",
  5098. "propertyNames": {
  5099. "type": "string"
  5100. },
  5101. "additionalProperties": {}
  5102. }
  5103. },
  5104. "required": ["type", "text"]
  5105. },
  5106. "FilePartInput": {
  5107. "type": "object",
  5108. "properties": {
  5109. "id": {
  5110. "type": "string"
  5111. },
  5112. "type": {
  5113. "type": "string",
  5114. "const": "file"
  5115. },
  5116. "mime": {
  5117. "type": "string"
  5118. },
  5119. "filename": {
  5120. "type": "string"
  5121. },
  5122. "url": {
  5123. "type": "string"
  5124. },
  5125. "source": {
  5126. "$ref": "#/components/schemas/FilePartSource"
  5127. }
  5128. },
  5129. "required": ["type", "mime", "url"]
  5130. },
  5131. "AgentPartInput": {
  5132. "type": "object",
  5133. "properties": {
  5134. "id": {
  5135. "type": "string"
  5136. },
  5137. "type": {
  5138. "type": "string",
  5139. "const": "agent"
  5140. },
  5141. "name": {
  5142. "type": "string"
  5143. },
  5144. "source": {
  5145. "type": "object",
  5146. "properties": {
  5147. "value": {
  5148. "type": "string"
  5149. },
  5150. "start": {
  5151. "type": "integer",
  5152. "minimum": -9007199254740991,
  5153. "maximum": 9007199254740991
  5154. },
  5155. "end": {
  5156. "type": "integer",
  5157. "minimum": -9007199254740991,
  5158. "maximum": 9007199254740991
  5159. }
  5160. },
  5161. "required": ["value", "start", "end"]
  5162. }
  5163. },
  5164. "required": ["type", "name"]
  5165. },
  5166. "Command": {
  5167. "type": "object",
  5168. "properties": {
  5169. "name": {
  5170. "type": "string"
  5171. },
  5172. "description": {
  5173. "type": "string"
  5174. },
  5175. "agent": {
  5176. "type": "string"
  5177. },
  5178. "model": {
  5179. "type": "string"
  5180. },
  5181. "template": {
  5182. "type": "string"
  5183. },
  5184. "subtask": {
  5185. "type": "boolean"
  5186. }
  5187. },
  5188. "required": ["name", "template"]
  5189. },
  5190. "Model": {
  5191. "type": "object",
  5192. "properties": {
  5193. "id": {
  5194. "type": "string"
  5195. },
  5196. "name": {
  5197. "type": "string"
  5198. },
  5199. "release_date": {
  5200. "type": "string"
  5201. },
  5202. "attachment": {
  5203. "type": "boolean"
  5204. },
  5205. "reasoning": {
  5206. "type": "boolean"
  5207. },
  5208. "temperature": {
  5209. "type": "boolean"
  5210. },
  5211. "tool_call": {
  5212. "type": "boolean"
  5213. },
  5214. "cost": {
  5215. "type": "object",
  5216. "properties": {
  5217. "input": {
  5218. "type": "number"
  5219. },
  5220. "output": {
  5221. "type": "number"
  5222. },
  5223. "cache_read": {
  5224. "type": "number"
  5225. },
  5226. "cache_write": {
  5227. "type": "number"
  5228. }
  5229. },
  5230. "required": ["input", "output"]
  5231. },
  5232. "limit": {
  5233. "type": "object",
  5234. "properties": {
  5235. "context": {
  5236. "type": "number"
  5237. },
  5238. "output": {
  5239. "type": "number"
  5240. }
  5241. },
  5242. "required": ["context", "output"]
  5243. },
  5244. "modalities": {
  5245. "type": "object",
  5246. "properties": {
  5247. "input": {
  5248. "type": "array",
  5249. "items": {
  5250. "type": "string",
  5251. "enum": ["text", "audio", "image", "video", "pdf"]
  5252. }
  5253. },
  5254. "output": {
  5255. "type": "array",
  5256. "items": {
  5257. "type": "string",
  5258. "enum": ["text", "audio", "image", "video", "pdf"]
  5259. }
  5260. }
  5261. },
  5262. "required": ["input", "output"]
  5263. },
  5264. "experimental": {
  5265. "type": "boolean"
  5266. },
  5267. "status": {
  5268. "type": "string",
  5269. "enum": ["alpha", "beta"]
  5270. },
  5271. "options": {
  5272. "type": "object",
  5273. "propertyNames": {
  5274. "type": "string"
  5275. },
  5276. "additionalProperties": {}
  5277. },
  5278. "provider": {
  5279. "type": "object",
  5280. "properties": {
  5281. "npm": {
  5282. "type": "string"
  5283. }
  5284. },
  5285. "required": ["npm"]
  5286. }
  5287. },
  5288. "required": [
  5289. "id",
  5290. "name",
  5291. "release_date",
  5292. "attachment",
  5293. "reasoning",
  5294. "temperature",
  5295. "tool_call",
  5296. "cost",
  5297. "limit",
  5298. "options"
  5299. ]
  5300. },
  5301. "Provider": {
  5302. "type": "object",
  5303. "properties": {
  5304. "api": {
  5305. "type": "string"
  5306. },
  5307. "name": {
  5308. "type": "string"
  5309. },
  5310. "env": {
  5311. "type": "array",
  5312. "items": {
  5313. "type": "string"
  5314. }
  5315. },
  5316. "id": {
  5317. "type": "string"
  5318. },
  5319. "npm": {
  5320. "type": "string"
  5321. },
  5322. "models": {
  5323. "type": "object",
  5324. "propertyNames": {
  5325. "type": "string"
  5326. },
  5327. "additionalProperties": {
  5328. "$ref": "#/components/schemas/Model"
  5329. }
  5330. }
  5331. },
  5332. "required": ["name", "env", "id", "models"]
  5333. },
  5334. "Symbol": {
  5335. "type": "object",
  5336. "properties": {
  5337. "name": {
  5338. "type": "string"
  5339. },
  5340. "kind": {
  5341. "type": "number"
  5342. },
  5343. "location": {
  5344. "type": "object",
  5345. "properties": {
  5346. "uri": {
  5347. "type": "string"
  5348. },
  5349. "range": {
  5350. "$ref": "#/components/schemas/Range"
  5351. }
  5352. },
  5353. "required": ["uri", "range"]
  5354. }
  5355. },
  5356. "required": ["name", "kind", "location"]
  5357. },
  5358. "FileNode": {
  5359. "type": "object",
  5360. "properties": {
  5361. "name": {
  5362. "type": "string"
  5363. },
  5364. "path": {
  5365. "type": "string"
  5366. },
  5367. "absolute": {
  5368. "type": "string"
  5369. },
  5370. "type": {
  5371. "type": "string",
  5372. "enum": ["file", "directory"]
  5373. },
  5374. "ignored": {
  5375. "type": "boolean"
  5376. }
  5377. },
  5378. "required": ["name", "path", "absolute", "type", "ignored"]
  5379. },
  5380. "FileContent": {
  5381. "type": "object",
  5382. "properties": {
  5383. "type": {
  5384. "type": "string",
  5385. "const": "text"
  5386. },
  5387. "content": {
  5388. "type": "string"
  5389. },
  5390. "diff": {
  5391. "type": "string"
  5392. },
  5393. "patch": {
  5394. "type": "object",
  5395. "properties": {
  5396. "oldFileName": {
  5397. "type": "string"
  5398. },
  5399. "newFileName": {
  5400. "type": "string"
  5401. },
  5402. "oldHeader": {
  5403. "type": "string"
  5404. },
  5405. "newHeader": {
  5406. "type": "string"
  5407. },
  5408. "hunks": {
  5409. "type": "array",
  5410. "items": {
  5411. "type": "object",
  5412. "properties": {
  5413. "oldStart": {
  5414. "type": "number"
  5415. },
  5416. "oldLines": {
  5417. "type": "number"
  5418. },
  5419. "newStart": {
  5420. "type": "number"
  5421. },
  5422. "newLines": {
  5423. "type": "number"
  5424. },
  5425. "lines": {
  5426. "type": "array",
  5427. "items": {
  5428. "type": "string"
  5429. }
  5430. }
  5431. },
  5432. "required": ["oldStart", "oldLines", "newStart", "newLines", "lines"]
  5433. }
  5434. },
  5435. "index": {
  5436. "type": "string"
  5437. }
  5438. },
  5439. "required": ["oldFileName", "newFileName", "hunks"]
  5440. },
  5441. "encoding": {
  5442. "type": "string",
  5443. "const": "base64"
  5444. },
  5445. "mimeType": {
  5446. "type": "string"
  5447. }
  5448. },
  5449. "required": ["type", "content"]
  5450. },
  5451. "File": {
  5452. "type": "object",
  5453. "properties": {
  5454. "path": {
  5455. "type": "string"
  5456. },
  5457. "added": {
  5458. "type": "integer",
  5459. "minimum": -9007199254740991,
  5460. "maximum": 9007199254740991
  5461. },
  5462. "removed": {
  5463. "type": "integer",
  5464. "minimum": -9007199254740991,
  5465. "maximum": 9007199254740991
  5466. },
  5467. "status": {
  5468. "type": "string",
  5469. "enum": ["added", "deleted", "modified"]
  5470. }
  5471. },
  5472. "required": ["path", "added", "removed", "status"]
  5473. },
  5474. "Agent": {
  5475. "type": "object",
  5476. "properties": {
  5477. "name": {
  5478. "type": "string"
  5479. },
  5480. "description": {
  5481. "type": "string"
  5482. },
  5483. "mode": {
  5484. "anyOf": [
  5485. {
  5486. "type": "string",
  5487. "const": "subagent"
  5488. },
  5489. {
  5490. "type": "string",
  5491. "const": "primary"
  5492. },
  5493. {
  5494. "type": "string",
  5495. "const": "all"
  5496. }
  5497. ]
  5498. },
  5499. "builtIn": {
  5500. "type": "boolean"
  5501. },
  5502. "topP": {
  5503. "type": "number"
  5504. },
  5505. "temperature": {
  5506. "type": "number"
  5507. },
  5508. "permission": {
  5509. "type": "object",
  5510. "properties": {
  5511. "edit": {
  5512. "anyOf": [
  5513. {
  5514. "type": "string",
  5515. "const": "ask"
  5516. },
  5517. {
  5518. "type": "string",
  5519. "const": "allow"
  5520. },
  5521. {
  5522. "type": "string",
  5523. "const": "deny"
  5524. }
  5525. ]
  5526. },
  5527. "bash": {
  5528. "type": "object",
  5529. "propertyNames": {
  5530. "type": "string"
  5531. },
  5532. "additionalProperties": {
  5533. "anyOf": [
  5534. {
  5535. "type": "string",
  5536. "const": "ask"
  5537. },
  5538. {
  5539. "type": "string",
  5540. "const": "allow"
  5541. },
  5542. {
  5543. "type": "string",
  5544. "const": "deny"
  5545. }
  5546. ]
  5547. }
  5548. },
  5549. "webfetch": {
  5550. "anyOf": [
  5551. {
  5552. "type": "string",
  5553. "const": "ask"
  5554. },
  5555. {
  5556. "type": "string",
  5557. "const": "allow"
  5558. },
  5559. {
  5560. "type": "string",
  5561. "const": "deny"
  5562. }
  5563. ]
  5564. }
  5565. },
  5566. "required": ["edit", "bash"]
  5567. },
  5568. "model": {
  5569. "type": "object",
  5570. "properties": {
  5571. "modelID": {
  5572. "type": "string"
  5573. },
  5574. "providerID": {
  5575. "type": "string"
  5576. }
  5577. },
  5578. "required": ["modelID", "providerID"]
  5579. },
  5580. "prompt": {
  5581. "type": "string"
  5582. },
  5583. "tools": {
  5584. "type": "object",
  5585. "propertyNames": {
  5586. "type": "string"
  5587. },
  5588. "additionalProperties": {
  5589. "type": "boolean"
  5590. }
  5591. },
  5592. "options": {
  5593. "type": "object",
  5594. "propertyNames": {
  5595. "type": "string"
  5596. },
  5597. "additionalProperties": {}
  5598. }
  5599. },
  5600. "required": ["name", "mode", "builtIn", "permission", "tools", "options"]
  5601. },
  5602. "OAuth": {
  5603. "type": "object",
  5604. "properties": {
  5605. "type": {
  5606. "type": "string",
  5607. "const": "oauth"
  5608. },
  5609. "refresh": {
  5610. "type": "string"
  5611. },
  5612. "access": {
  5613. "type": "string"
  5614. },
  5615. "expires": {
  5616. "type": "number"
  5617. }
  5618. },
  5619. "required": ["type", "refresh", "access", "expires"]
  5620. },
  5621. "ApiAuth": {
  5622. "type": "object",
  5623. "properties": {
  5624. "type": {
  5625. "type": "string",
  5626. "const": "api"
  5627. },
  5628. "key": {
  5629. "type": "string"
  5630. }
  5631. },
  5632. "required": ["type", "key"]
  5633. },
  5634. "WellKnownAuth": {
  5635. "type": "object",
  5636. "properties": {
  5637. "type": {
  5638. "type": "string",
  5639. "const": "wellknown"
  5640. },
  5641. "key": {
  5642. "type": "string"
  5643. },
  5644. "token": {
  5645. "type": "string"
  5646. }
  5647. },
  5648. "required": ["type", "key", "token"]
  5649. },
  5650. "Auth": {
  5651. "anyOf": [
  5652. {
  5653. "$ref": "#/components/schemas/OAuth"
  5654. },
  5655. {
  5656. "$ref": "#/components/schemas/ApiAuth"
  5657. },
  5658. {
  5659. "$ref": "#/components/schemas/WellKnownAuth"
  5660. }
  5661. ]
  5662. },
  5663. "Event.installation.updated": {
  5664. "type": "object",
  5665. "properties": {
  5666. "type": {
  5667. "type": "string",
  5668. "const": "installation.updated"
  5669. },
  5670. "properties": {
  5671. "type": "object",
  5672. "properties": {
  5673. "version": {
  5674. "type": "string"
  5675. }
  5676. },
  5677. "required": ["version"]
  5678. }
  5679. },
  5680. "required": ["type", "properties"]
  5681. },
  5682. "Event.lsp.client.diagnostics": {
  5683. "type": "object",
  5684. "properties": {
  5685. "type": {
  5686. "type": "string",
  5687. "const": "lsp.client.diagnostics"
  5688. },
  5689. "properties": {
  5690. "type": "object",
  5691. "properties": {
  5692. "serverID": {
  5693. "type": "string"
  5694. },
  5695. "path": {
  5696. "type": "string"
  5697. }
  5698. },
  5699. "required": ["serverID", "path"]
  5700. }
  5701. },
  5702. "required": ["type", "properties"]
  5703. },
  5704. "Event.message.updated": {
  5705. "type": "object",
  5706. "properties": {
  5707. "type": {
  5708. "type": "string",
  5709. "const": "message.updated"
  5710. },
  5711. "properties": {
  5712. "type": "object",
  5713. "properties": {
  5714. "info": {
  5715. "$ref": "#/components/schemas/Message"
  5716. }
  5717. },
  5718. "required": ["info"]
  5719. }
  5720. },
  5721. "required": ["type", "properties"]
  5722. },
  5723. "Event.message.removed": {
  5724. "type": "object",
  5725. "properties": {
  5726. "type": {
  5727. "type": "string",
  5728. "const": "message.removed"
  5729. },
  5730. "properties": {
  5731. "type": "object",
  5732. "properties": {
  5733. "sessionID": {
  5734. "type": "string"
  5735. },
  5736. "messageID": {
  5737. "type": "string"
  5738. }
  5739. },
  5740. "required": ["sessionID", "messageID"]
  5741. }
  5742. },
  5743. "required": ["type", "properties"]
  5744. },
  5745. "Event.message.part.updated": {
  5746. "type": "object",
  5747. "properties": {
  5748. "type": {
  5749. "type": "string",
  5750. "const": "message.part.updated"
  5751. },
  5752. "properties": {
  5753. "type": "object",
  5754. "properties": {
  5755. "part": {
  5756. "$ref": "#/components/schemas/Part"
  5757. },
  5758. "delta": {
  5759. "type": "string"
  5760. }
  5761. },
  5762. "required": ["part"]
  5763. }
  5764. },
  5765. "required": ["type", "properties"]
  5766. },
  5767. "Event.message.part.removed": {
  5768. "type": "object",
  5769. "properties": {
  5770. "type": {
  5771. "type": "string",
  5772. "const": "message.part.removed"
  5773. },
  5774. "properties": {
  5775. "type": "object",
  5776. "properties": {
  5777. "sessionID": {
  5778. "type": "string"
  5779. },
  5780. "messageID": {
  5781. "type": "string"
  5782. },
  5783. "partID": {
  5784. "type": "string"
  5785. }
  5786. },
  5787. "required": ["sessionID", "messageID", "partID"]
  5788. }
  5789. },
  5790. "required": ["type", "properties"]
  5791. },
  5792. "Event.session.compacted": {
  5793. "type": "object",
  5794. "properties": {
  5795. "type": {
  5796. "type": "string",
  5797. "const": "session.compacted"
  5798. },
  5799. "properties": {
  5800. "type": "object",
  5801. "properties": {
  5802. "sessionID": {
  5803. "type": "string"
  5804. }
  5805. },
  5806. "required": ["sessionID"]
  5807. }
  5808. },
  5809. "required": ["type", "properties"]
  5810. },
  5811. "Permission": {
  5812. "type": "object",
  5813. "properties": {
  5814. "id": {
  5815. "type": "string"
  5816. },
  5817. "type": {
  5818. "type": "string"
  5819. },
  5820. "pattern": {
  5821. "anyOf": [
  5822. {
  5823. "type": "string"
  5824. },
  5825. {
  5826. "type": "array",
  5827. "items": {
  5828. "type": "string"
  5829. }
  5830. }
  5831. ]
  5832. },
  5833. "sessionID": {
  5834. "type": "string"
  5835. },
  5836. "messageID": {
  5837. "type": "string"
  5838. },
  5839. "callID": {
  5840. "type": "string"
  5841. },
  5842. "title": {
  5843. "type": "string"
  5844. },
  5845. "metadata": {
  5846. "type": "object",
  5847. "propertyNames": {
  5848. "type": "string"
  5849. },
  5850. "additionalProperties": {}
  5851. },
  5852. "time": {
  5853. "type": "object",
  5854. "properties": {
  5855. "created": {
  5856. "type": "number"
  5857. }
  5858. },
  5859. "required": ["created"]
  5860. }
  5861. },
  5862. "required": ["id", "type", "sessionID", "messageID", "title", "metadata", "time"]
  5863. },
  5864. "Event.permission.updated": {
  5865. "type": "object",
  5866. "properties": {
  5867. "type": {
  5868. "type": "string",
  5869. "const": "permission.updated"
  5870. },
  5871. "properties": {
  5872. "$ref": "#/components/schemas/Permission"
  5873. }
  5874. },
  5875. "required": ["type", "properties"]
  5876. },
  5877. "Event.permission.replied": {
  5878. "type": "object",
  5879. "properties": {
  5880. "type": {
  5881. "type": "string",
  5882. "const": "permission.replied"
  5883. },
  5884. "properties": {
  5885. "type": "object",
  5886. "properties": {
  5887. "sessionID": {
  5888. "type": "string"
  5889. },
  5890. "permissionID": {
  5891. "type": "string"
  5892. },
  5893. "response": {
  5894. "type": "string"
  5895. }
  5896. },
  5897. "required": ["sessionID", "permissionID", "response"]
  5898. }
  5899. },
  5900. "required": ["type", "properties"]
  5901. },
  5902. "Event.file.edited": {
  5903. "type": "object",
  5904. "properties": {
  5905. "type": {
  5906. "type": "string",
  5907. "const": "file.edited"
  5908. },
  5909. "properties": {
  5910. "type": "object",
  5911. "properties": {
  5912. "file": {
  5913. "type": "string"
  5914. }
  5915. },
  5916. "required": ["file"]
  5917. }
  5918. },
  5919. "required": ["type", "properties"]
  5920. },
  5921. "Event.file.watcher.updated": {
  5922. "type": "object",
  5923. "properties": {
  5924. "type": {
  5925. "type": "string",
  5926. "const": "file.watcher.updated"
  5927. },
  5928. "properties": {
  5929. "type": "object",
  5930. "properties": {
  5931. "file": {
  5932. "type": "string"
  5933. },
  5934. "event": {
  5935. "anyOf": [
  5936. {
  5937. "type": "string",
  5938. "const": "add"
  5939. },
  5940. {
  5941. "type": "string",
  5942. "const": "change"
  5943. },
  5944. {
  5945. "type": "string",
  5946. "const": "unlink"
  5947. }
  5948. ]
  5949. }
  5950. },
  5951. "required": ["file", "event"]
  5952. }
  5953. },
  5954. "required": ["type", "properties"]
  5955. },
  5956. "Event.todo.updated": {
  5957. "type": "object",
  5958. "properties": {
  5959. "type": {
  5960. "type": "string",
  5961. "const": "todo.updated"
  5962. },
  5963. "properties": {
  5964. "type": "object",
  5965. "properties": {
  5966. "sessionID": {
  5967. "type": "string"
  5968. },
  5969. "todos": {
  5970. "type": "array",
  5971. "items": {
  5972. "$ref": "#/components/schemas/Todo"
  5973. }
  5974. }
  5975. },
  5976. "required": ["sessionID", "todos"]
  5977. }
  5978. },
  5979. "required": ["type", "properties"]
  5980. },
  5981. "Event.session.idle": {
  5982. "type": "object",
  5983. "properties": {
  5984. "type": {
  5985. "type": "string",
  5986. "const": "session.idle"
  5987. },
  5988. "properties": {
  5989. "type": "object",
  5990. "properties": {
  5991. "sessionID": {
  5992. "type": "string"
  5993. }
  5994. },
  5995. "required": ["sessionID"]
  5996. }
  5997. },
  5998. "required": ["type", "properties"]
  5999. },
  6000. "Event.session.created": {
  6001. "type": "object",
  6002. "properties": {
  6003. "type": {
  6004. "type": "string",
  6005. "const": "session.created"
  6006. },
  6007. "properties": {
  6008. "type": "object",
  6009. "properties": {
  6010. "info": {
  6011. "$ref": "#/components/schemas/Session"
  6012. }
  6013. },
  6014. "required": ["info"]
  6015. }
  6016. },
  6017. "required": ["type", "properties"]
  6018. },
  6019. "Event.session.updated": {
  6020. "type": "object",
  6021. "properties": {
  6022. "type": {
  6023. "type": "string",
  6024. "const": "session.updated"
  6025. },
  6026. "properties": {
  6027. "type": "object",
  6028. "properties": {
  6029. "info": {
  6030. "$ref": "#/components/schemas/Session"
  6031. }
  6032. },
  6033. "required": ["info"]
  6034. }
  6035. },
  6036. "required": ["type", "properties"]
  6037. },
  6038. "Event.session.deleted": {
  6039. "type": "object",
  6040. "properties": {
  6041. "type": {
  6042. "type": "string",
  6043. "const": "session.deleted"
  6044. },
  6045. "properties": {
  6046. "type": "object",
  6047. "properties": {
  6048. "info": {
  6049. "$ref": "#/components/schemas/Session"
  6050. }
  6051. },
  6052. "required": ["info"]
  6053. }
  6054. },
  6055. "required": ["type", "properties"]
  6056. },
  6057. "Event.session.error": {
  6058. "type": "object",
  6059. "properties": {
  6060. "type": {
  6061. "type": "string",
  6062. "const": "session.error"
  6063. },
  6064. "properties": {
  6065. "type": "object",
  6066. "properties": {
  6067. "sessionID": {
  6068. "type": "string"
  6069. },
  6070. "error": {
  6071. "anyOf": [
  6072. {
  6073. "$ref": "#/components/schemas/ProviderAuthError"
  6074. },
  6075. {
  6076. "$ref": "#/components/schemas/UnknownError"
  6077. },
  6078. {
  6079. "$ref": "#/components/schemas/MessageOutputLengthError"
  6080. },
  6081. {
  6082. "$ref": "#/components/schemas/MessageAbortedError"
  6083. },
  6084. {
  6085. "$ref": "#/components/schemas/APIError"
  6086. }
  6087. ]
  6088. }
  6089. }
  6090. }
  6091. },
  6092. "required": ["type", "properties"]
  6093. },
  6094. "Event.server.connected": {
  6095. "type": "object",
  6096. "properties": {
  6097. "type": {
  6098. "type": "string",
  6099. "const": "server.connected"
  6100. },
  6101. "properties": {
  6102. "type": "object",
  6103. "properties": {}
  6104. }
  6105. },
  6106. "required": ["type", "properties"]
  6107. },
  6108. "Event.ide.installed": {
  6109. "type": "object",
  6110. "properties": {
  6111. "type": {
  6112. "type": "string",
  6113. "const": "ide.installed"
  6114. },
  6115. "properties": {
  6116. "type": "object",
  6117. "properties": {
  6118. "ide": {
  6119. "type": "string"
  6120. }
  6121. },
  6122. "required": ["ide"]
  6123. }
  6124. },
  6125. "required": ["type", "properties"]
  6126. },
  6127. "Event": {
  6128. "anyOf": [
  6129. {
  6130. "$ref": "#/components/schemas/Event.installation.updated"
  6131. },
  6132. {
  6133. "$ref": "#/components/schemas/Event.lsp.client.diagnostics"
  6134. },
  6135. {
  6136. "$ref": "#/components/schemas/Event.message.updated"
  6137. },
  6138. {
  6139. "$ref": "#/components/schemas/Event.message.removed"
  6140. },
  6141. {
  6142. "$ref": "#/components/schemas/Event.message.part.updated"
  6143. },
  6144. {
  6145. "$ref": "#/components/schemas/Event.message.part.removed"
  6146. },
  6147. {
  6148. "$ref": "#/components/schemas/Event.session.compacted"
  6149. },
  6150. {
  6151. "$ref": "#/components/schemas/Event.permission.updated"
  6152. },
  6153. {
  6154. "$ref": "#/components/schemas/Event.permission.replied"
  6155. },
  6156. {
  6157. "$ref": "#/components/schemas/Event.file.edited"
  6158. },
  6159. {
  6160. "$ref": "#/components/schemas/Event.file.watcher.updated"
  6161. },
  6162. {
  6163. "$ref": "#/components/schemas/Event.todo.updated"
  6164. },
  6165. {
  6166. "$ref": "#/components/schemas/Event.session.idle"
  6167. },
  6168. {
  6169. "$ref": "#/components/schemas/Event.session.created"
  6170. },
  6171. {
  6172. "$ref": "#/components/schemas/Event.session.updated"
  6173. },
  6174. {
  6175. "$ref": "#/components/schemas/Event.session.deleted"
  6176. },
  6177. {
  6178. "$ref": "#/components/schemas/Event.session.error"
  6179. },
  6180. {
  6181. "$ref": "#/components/schemas/Event.server.connected"
  6182. },
  6183. {
  6184. "$ref": "#/components/schemas/Event.ide.installed"
  6185. }
  6186. ]
  6187. }
  6188. }
  6189. }
  6190. }