@launchdarkly/mcp-server 0.2.7 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. package/README.md +2 -2
  2. package/bin/mcp-server.js +74 -81
  3. package/bin/mcp-server.js.map +34 -34
  4. package/dist/commonjs/funcs/aiConfigsCreate.js +2 -0
  5. package/dist/commonjs/funcs/aiConfigsCreate.js.map +1 -1
  6. package/dist/commonjs/funcs/aiConfigsCreateVariation.js +2 -0
  7. package/dist/commonjs/funcs/aiConfigsCreateVariation.js.map +1 -1
  8. package/dist/commonjs/funcs/aiConfigsDelete.js +2 -0
  9. package/dist/commonjs/funcs/aiConfigsDelete.js.map +1 -1
  10. package/dist/commonjs/funcs/aiConfigsDeleteVariation.js +2 -0
  11. package/dist/commonjs/funcs/aiConfigsDeleteVariation.js.map +1 -1
  12. package/dist/commonjs/funcs/aiConfigsGet.js +2 -0
  13. package/dist/commonjs/funcs/aiConfigsGet.js.map +1 -1
  14. package/dist/commonjs/funcs/aiConfigsGetVariation.js +2 -0
  15. package/dist/commonjs/funcs/aiConfigsGetVariation.js.map +1 -1
  16. package/dist/commonjs/funcs/aiConfigsList.js +2 -0
  17. package/dist/commonjs/funcs/aiConfigsList.js.map +1 -1
  18. package/dist/commonjs/funcs/aiConfigsUpdate.js +2 -0
  19. package/dist/commonjs/funcs/aiConfigsUpdate.js.map +1 -1
  20. package/dist/commonjs/funcs/aiConfigsUpdateVariation.js +2 -0
  21. package/dist/commonjs/funcs/aiConfigsUpdateVariation.js.map +1 -1
  22. package/dist/commonjs/funcs/featureFlagsCreate.js +2 -0
  23. package/dist/commonjs/funcs/featureFlagsCreate.js.map +1 -1
  24. package/dist/commonjs/funcs/featureFlagsDelete.js +2 -0
  25. package/dist/commonjs/funcs/featureFlagsDelete.js.map +1 -1
  26. package/dist/commonjs/funcs/featureFlagsGet.js +2 -0
  27. package/dist/commonjs/funcs/featureFlagsGet.js.map +1 -1
  28. package/dist/commonjs/funcs/featureFlagsList.js +2 -0
  29. package/dist/commonjs/funcs/featureFlagsList.js.map +1 -1
  30. package/dist/commonjs/funcs/featureFlagsPatch.js +2 -0
  31. package/dist/commonjs/funcs/featureFlagsPatch.js.map +1 -1
  32. package/dist/commonjs/hooks/types.d.ts +2 -0
  33. package/dist/commonjs/hooks/types.d.ts.map +1 -1
  34. package/dist/commonjs/index.d.ts +2 -0
  35. package/dist/commonjs/index.d.ts.map +1 -1
  36. package/dist/commonjs/index.js +3 -1
  37. package/dist/commonjs/index.js.map +1 -1
  38. package/dist/commonjs/lib/config.d.ts +7 -3
  39. package/dist/commonjs/lib/config.d.ts.map +1 -1
  40. package/dist/commonjs/lib/config.js +3 -3
  41. package/dist/commonjs/lib/config.js.map +1 -1
  42. package/dist/commonjs/lib/sdks.d.ts +1 -0
  43. package/dist/commonjs/lib/sdks.d.ts.map +1 -1
  44. package/dist/commonjs/lib/sdks.js +3 -3
  45. package/dist/commonjs/lib/sdks.js.map +1 -1
  46. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  47. package/dist/commonjs/mcp-server/server.js +1 -1
  48. package/dist/commonjs/mcp-server/tools/aiConfigsCreate.d.ts.map +1 -1
  49. package/dist/commonjs/mcp-server/tools/aiConfigsCreate.js +2 -1
  50. package/dist/commonjs/mcp-server/tools/aiConfigsCreate.js.map +1 -1
  51. package/dist/commonjs/mcp-server/tools/aiConfigsCreateVariation.d.ts.map +1 -1
  52. package/dist/commonjs/mcp-server/tools/aiConfigsCreateVariation.js +3 -15
  53. package/dist/commonjs/mcp-server/tools/aiConfigsCreateVariation.js.map +1 -1
  54. package/dist/commonjs/mcp-server/tools/aiConfigsDelete.d.ts.map +1 -1
  55. package/dist/commonjs/mcp-server/tools/aiConfigsDelete.js +4 -4
  56. package/dist/commonjs/mcp-server/tools/aiConfigsDelete.js.map +1 -1
  57. package/dist/commonjs/mcp-server/tools/aiConfigsDeleteVariation.d.ts.map +1 -1
  58. package/dist/commonjs/mcp-server/tools/aiConfigsDeleteVariation.js +3 -4
  59. package/dist/commonjs/mcp-server/tools/aiConfigsDeleteVariation.js.map +1 -1
  60. package/dist/commonjs/mcp-server/tools/aiConfigsGet.js +3 -4
  61. package/dist/commonjs/mcp-server/tools/aiConfigsGet.js.map +1 -1
  62. package/dist/commonjs/mcp-server/tools/aiConfigsGetVariation.d.ts.map +1 -1
  63. package/dist/commonjs/mcp-server/tools/aiConfigsGetVariation.js +3 -4
  64. package/dist/commonjs/mcp-server/tools/aiConfigsGetVariation.js.map +1 -1
  65. package/dist/commonjs/mcp-server/tools/aiConfigsList.d.ts.map +1 -1
  66. package/dist/commonjs/mcp-server/tools/aiConfigsList.js +3 -2
  67. package/dist/commonjs/mcp-server/tools/aiConfigsList.js.map +1 -1
  68. package/dist/commonjs/mcp-server/tools/aiConfigsUpdate.d.ts.map +1 -1
  69. package/dist/commonjs/mcp-server/tools/aiConfigsUpdate.js +3 -15
  70. package/dist/commonjs/mcp-server/tools/aiConfigsUpdate.js.map +1 -1
  71. package/dist/commonjs/mcp-server/tools/aiConfigsUpdateVariation.d.ts.map +1 -1
  72. package/dist/commonjs/mcp-server/tools/aiConfigsUpdateVariation.js +3 -18
  73. package/dist/commonjs/mcp-server/tools/aiConfigsUpdateVariation.js.map +1 -1
  74. package/dist/commonjs/mcp-server/tools/featureFlagsCreate.d.ts.map +1 -1
  75. package/dist/commonjs/mcp-server/tools/featureFlagsCreate.js +2 -1
  76. package/dist/commonjs/mcp-server/tools/featureFlagsCreate.js.map +1 -1
  77. package/dist/commonjs/mcp-server/tools/featureFlagsDelete.d.ts.map +1 -1
  78. package/dist/commonjs/mcp-server/tools/featureFlagsDelete.js +2 -1
  79. package/dist/commonjs/mcp-server/tools/featureFlagsDelete.js.map +1 -1
  80. package/dist/commonjs/mcp-server/tools/featureFlagsGet.d.ts.map +1 -1
  81. package/dist/commonjs/mcp-server/tools/featureFlagsGet.js +2 -1
  82. package/dist/commonjs/mcp-server/tools/featureFlagsGet.js.map +1 -1
  83. package/dist/commonjs/mcp-server/tools/featureFlagsList.d.ts.map +1 -1
  84. package/dist/commonjs/mcp-server/tools/featureFlagsList.js +2 -1
  85. package/dist/commonjs/mcp-server/tools/featureFlagsList.js.map +1 -1
  86. package/dist/commonjs/mcp-server/tools/featureFlagsPatch.d.ts.map +1 -1
  87. package/dist/commonjs/mcp-server/tools/featureFlagsPatch.js +2 -1
  88. package/dist/commonjs/mcp-server/tools/featureFlagsPatch.js.map +1 -1
  89. package/dist/esm/funcs/aiConfigsCreate.js +2 -0
  90. package/dist/esm/funcs/aiConfigsCreate.js.map +1 -1
  91. package/dist/esm/funcs/aiConfigsCreateVariation.js +2 -0
  92. package/dist/esm/funcs/aiConfigsCreateVariation.js.map +1 -1
  93. package/dist/esm/funcs/aiConfigsDelete.js +2 -0
  94. package/dist/esm/funcs/aiConfigsDelete.js.map +1 -1
  95. package/dist/esm/funcs/aiConfigsDeleteVariation.js +2 -0
  96. package/dist/esm/funcs/aiConfigsDeleteVariation.js.map +1 -1
  97. package/dist/esm/funcs/aiConfigsGet.js +2 -0
  98. package/dist/esm/funcs/aiConfigsGet.js.map +1 -1
  99. package/dist/esm/funcs/aiConfigsGetVariation.js +2 -0
  100. package/dist/esm/funcs/aiConfigsGetVariation.js.map +1 -1
  101. package/dist/esm/funcs/aiConfigsList.js +2 -0
  102. package/dist/esm/funcs/aiConfigsList.js.map +1 -1
  103. package/dist/esm/funcs/aiConfigsUpdate.js +2 -0
  104. package/dist/esm/funcs/aiConfigsUpdate.js.map +1 -1
  105. package/dist/esm/funcs/aiConfigsUpdateVariation.js +2 -0
  106. package/dist/esm/funcs/aiConfigsUpdateVariation.js.map +1 -1
  107. package/dist/esm/funcs/featureFlagsCreate.js +2 -0
  108. package/dist/esm/funcs/featureFlagsCreate.js.map +1 -1
  109. package/dist/esm/funcs/featureFlagsDelete.js +2 -0
  110. package/dist/esm/funcs/featureFlagsDelete.js.map +1 -1
  111. package/dist/esm/funcs/featureFlagsGet.js +2 -0
  112. package/dist/esm/funcs/featureFlagsGet.js.map +1 -1
  113. package/dist/esm/funcs/featureFlagsList.js +2 -0
  114. package/dist/esm/funcs/featureFlagsList.js.map +1 -1
  115. package/dist/esm/funcs/featureFlagsPatch.js +2 -0
  116. package/dist/esm/funcs/featureFlagsPatch.js.map +1 -1
  117. package/dist/esm/hooks/types.d.ts +2 -0
  118. package/dist/esm/hooks/types.d.ts.map +1 -1
  119. package/dist/esm/index.d.ts +2 -0
  120. package/dist/esm/index.d.ts.map +1 -1
  121. package/dist/esm/index.js +1 -0
  122. package/dist/esm/index.js.map +1 -1
  123. package/dist/esm/lib/config.d.ts +7 -3
  124. package/dist/esm/lib/config.d.ts.map +1 -1
  125. package/dist/esm/lib/config.js +3 -3
  126. package/dist/esm/lib/config.js.map +1 -1
  127. package/dist/esm/lib/sdks.d.ts +1 -0
  128. package/dist/esm/lib/sdks.d.ts.map +1 -1
  129. package/dist/esm/lib/sdks.js +3 -3
  130. package/dist/esm/lib/sdks.js.map +1 -1
  131. package/dist/esm/mcp-server/mcp-server.js +1 -1
  132. package/dist/esm/mcp-server/server.js +1 -1
  133. package/dist/esm/mcp-server/tools/aiConfigsCreate.d.ts.map +1 -1
  134. package/dist/esm/mcp-server/tools/aiConfigsCreate.js +2 -1
  135. package/dist/esm/mcp-server/tools/aiConfigsCreate.js.map +1 -1
  136. package/dist/esm/mcp-server/tools/aiConfigsCreateVariation.d.ts.map +1 -1
  137. package/dist/esm/mcp-server/tools/aiConfigsCreateVariation.js +3 -15
  138. package/dist/esm/mcp-server/tools/aiConfigsCreateVariation.js.map +1 -1
  139. package/dist/esm/mcp-server/tools/aiConfigsDelete.d.ts.map +1 -1
  140. package/dist/esm/mcp-server/tools/aiConfigsDelete.js +4 -4
  141. package/dist/esm/mcp-server/tools/aiConfigsDelete.js.map +1 -1
  142. package/dist/esm/mcp-server/tools/aiConfigsDeleteVariation.d.ts.map +1 -1
  143. package/dist/esm/mcp-server/tools/aiConfigsDeleteVariation.js +3 -4
  144. package/dist/esm/mcp-server/tools/aiConfigsDeleteVariation.js.map +1 -1
  145. package/dist/esm/mcp-server/tools/aiConfigsGet.js +3 -4
  146. package/dist/esm/mcp-server/tools/aiConfigsGet.js.map +1 -1
  147. package/dist/esm/mcp-server/tools/aiConfigsGetVariation.d.ts.map +1 -1
  148. package/dist/esm/mcp-server/tools/aiConfigsGetVariation.js +3 -4
  149. package/dist/esm/mcp-server/tools/aiConfigsGetVariation.js.map +1 -1
  150. package/dist/esm/mcp-server/tools/aiConfigsList.d.ts.map +1 -1
  151. package/dist/esm/mcp-server/tools/aiConfigsList.js +3 -2
  152. package/dist/esm/mcp-server/tools/aiConfigsList.js.map +1 -1
  153. package/dist/esm/mcp-server/tools/aiConfigsUpdate.d.ts.map +1 -1
  154. package/dist/esm/mcp-server/tools/aiConfigsUpdate.js +3 -15
  155. package/dist/esm/mcp-server/tools/aiConfigsUpdate.js.map +1 -1
  156. package/dist/esm/mcp-server/tools/aiConfigsUpdateVariation.d.ts.map +1 -1
  157. package/dist/esm/mcp-server/tools/aiConfigsUpdateVariation.js +3 -18
  158. package/dist/esm/mcp-server/tools/aiConfigsUpdateVariation.js.map +1 -1
  159. package/dist/esm/mcp-server/tools/featureFlagsCreate.d.ts.map +1 -1
  160. package/dist/esm/mcp-server/tools/featureFlagsCreate.js +2 -1
  161. package/dist/esm/mcp-server/tools/featureFlagsCreate.js.map +1 -1
  162. package/dist/esm/mcp-server/tools/featureFlagsDelete.d.ts.map +1 -1
  163. package/dist/esm/mcp-server/tools/featureFlagsDelete.js +2 -1
  164. package/dist/esm/mcp-server/tools/featureFlagsDelete.js.map +1 -1
  165. package/dist/esm/mcp-server/tools/featureFlagsGet.d.ts.map +1 -1
  166. package/dist/esm/mcp-server/tools/featureFlagsGet.js +2 -1
  167. package/dist/esm/mcp-server/tools/featureFlagsGet.js.map +1 -1
  168. package/dist/esm/mcp-server/tools/featureFlagsList.d.ts.map +1 -1
  169. package/dist/esm/mcp-server/tools/featureFlagsList.js +2 -1
  170. package/dist/esm/mcp-server/tools/featureFlagsList.js.map +1 -1
  171. package/dist/esm/mcp-server/tools/featureFlagsPatch.d.ts.map +1 -1
  172. package/dist/esm/mcp-server/tools/featureFlagsPatch.js +2 -1
  173. package/dist/esm/mcp-server/tools/featureFlagsPatch.js.map +1 -1
  174. package/jsr.json +1 -1
  175. package/package.json +1 -1
  176. package/schemas/openapi.json +43882 -1
  177. package/src/funcs/aiConfigsCreate.ts +2 -0
  178. package/src/funcs/aiConfigsCreateVariation.ts +2 -0
  179. package/src/funcs/aiConfigsDelete.ts +2 -0
  180. package/src/funcs/aiConfigsDeleteVariation.ts +2 -0
  181. package/src/funcs/aiConfigsGet.ts +2 -0
  182. package/src/funcs/aiConfigsGetVariation.ts +2 -0
  183. package/src/funcs/aiConfigsList.ts +2 -0
  184. package/src/funcs/aiConfigsUpdate.ts +2 -0
  185. package/src/funcs/aiConfigsUpdateVariation.ts +2 -0
  186. package/src/funcs/featureFlagsCreate.ts +2 -0
  187. package/src/funcs/featureFlagsDelete.ts +2 -0
  188. package/src/funcs/featureFlagsGet.ts +2 -0
  189. package/src/funcs/featureFlagsList.ts +2 -0
  190. package/src/funcs/featureFlagsPatch.ts +2 -0
  191. package/src/hooks/types.ts +2 -0
  192. package/src/index.ts +2 -0
  193. package/src/lib/config.ts +7 -3
  194. package/src/lib/sdks.ts +10 -4
  195. package/src/mcp-server/mcp-server.ts +1 -1
  196. package/src/mcp-server/server.ts +1 -1
  197. package/src/mcp-server/tools/aiConfigsCreate.ts +2 -1
  198. package/src/mcp-server/tools/aiConfigsCreateVariation.ts +4 -15
  199. package/src/mcp-server/tools/aiConfigsDelete.ts +5 -4
  200. package/src/mcp-server/tools/aiConfigsDeleteVariation.ts +3 -4
  201. package/src/mcp-server/tools/aiConfigsGet.ts +4 -4
  202. package/src/mcp-server/tools/aiConfigsGetVariation.ts +3 -4
  203. package/src/mcp-server/tools/aiConfigsList.ts +3 -2
  204. package/src/mcp-server/tools/aiConfigsUpdate.ts +3 -15
  205. package/src/mcp-server/tools/aiConfigsUpdateVariation.ts +4 -18
  206. package/src/mcp-server/tools/featureFlagsCreate.ts +2 -1
  207. package/src/mcp-server/tools/featureFlagsDelete.ts +2 -1
  208. package/src/mcp-server/tools/featureFlagsGet.ts +2 -1
  209. package/src/mcp-server/tools/featureFlagsList.ts +2 -1
  210. package/src/mcp-server/tools/featureFlagsPatch.ts +2 -1
@@ -114,6 +114,7 @@ async function $do(
114
114
  const requestSecurity = resolveGlobalSecurity(securityInput);
115
115
 
116
116
  const context = {
117
+ options: client._options,
117
118
  baseURL: options?.serverURL ?? client._baseURL ?? "",
118
119
  operationID: "postAIConfig",
119
120
  oAuth2Scopes: [],
@@ -134,6 +135,7 @@ async function $do(
134
135
  path: path,
135
136
  headers: headers,
136
137
  body: body,
138
+ userAgent: client._options.userAgent,
137
139
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
138
140
  }, options);
139
141
  if (!requestRes.ok) {
@@ -132,6 +132,7 @@ async function $do(
132
132
  const requestSecurity = resolveGlobalSecurity(securityInput);
133
133
 
134
134
  const context = {
135
+ options: client._options,
135
136
  baseURL: options?.serverURL ?? client._baseURL ?? "",
136
137
  operationID: "postAIConfigVariation",
137
138
  oAuth2Scopes: [],
@@ -152,6 +153,7 @@ async function $do(
152
153
  path: path,
153
154
  headers: headers,
154
155
  body: body,
156
+ userAgent: client._options.userAgent,
155
157
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
156
158
  }, options);
157
159
  if (!requestRes.ok) {
@@ -117,6 +117,7 @@ async function $do(
117
117
  const requestSecurity = resolveGlobalSecurity(securityInput);
118
118
 
119
119
  const context = {
120
+ options: client._options,
120
121
  baseURL: options?.serverURL ?? client._baseURL ?? "",
121
122
  operationID: "deleteAIConfig",
122
123
  oAuth2Scopes: [],
@@ -137,6 +138,7 @@ async function $do(
137
138
  path: path,
138
139
  headers: headers,
139
140
  body: body,
141
+ userAgent: client._options.userAgent,
140
142
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
141
143
  }, options);
142
144
  if (!requestRes.ok) {
@@ -122,6 +122,7 @@ async function $do(
122
122
  const requestSecurity = resolveGlobalSecurity(securityInput);
123
123
 
124
124
  const context = {
125
+ options: client._options,
125
126
  baseURL: options?.serverURL ?? client._baseURL ?? "",
126
127
  operationID: "deleteAIConfigVariation",
127
128
  oAuth2Scopes: [],
@@ -142,6 +143,7 @@ async function $do(
142
143
  path: path,
143
144
  headers: headers,
144
145
  body: body,
146
+ userAgent: client._options.userAgent,
145
147
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
146
148
  }, options);
147
149
  if (!requestRes.ok) {
@@ -117,6 +117,7 @@ async function $do(
117
117
  const requestSecurity = resolveGlobalSecurity(securityInput);
118
118
 
119
119
  const context = {
120
+ options: client._options,
120
121
  baseURL: options?.serverURL ?? client._baseURL ?? "",
121
122
  operationID: "getAIConfig",
122
123
  oAuth2Scopes: [],
@@ -137,6 +138,7 @@ async function $do(
137
138
  path: path,
138
139
  headers: headers,
139
140
  body: body,
141
+ userAgent: client._options.userAgent,
140
142
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
141
143
  }, options);
142
144
  if (!requestRes.ok) {
@@ -122,6 +122,7 @@ async function $do(
122
122
  const requestSecurity = resolveGlobalSecurity(securityInput);
123
123
 
124
124
  const context = {
125
+ options: client._options,
125
126
  baseURL: options?.serverURL ?? client._baseURL ?? "",
126
127
  operationID: "getAIConfigVariation",
127
128
  oAuth2Scopes: [],
@@ -142,6 +143,7 @@ async function $do(
142
143
  path: path,
143
144
  headers: headers,
144
145
  body: body,
146
+ userAgent: client._options.userAgent,
145
147
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
146
148
  }, options);
147
149
  if (!requestRes.ok) {
@@ -120,6 +120,7 @@ async function $do(
120
120
  const requestSecurity = resolveGlobalSecurity(securityInput);
121
121
 
122
122
  const context = {
123
+ options: client._options,
123
124
  baseURL: options?.serverURL ?? client._baseURL ?? "",
124
125
  operationID: "getAIConfigs",
125
126
  oAuth2Scopes: [],
@@ -141,6 +142,7 @@ async function $do(
141
142
  headers: headers,
142
143
  query: query,
143
144
  body: body,
145
+ userAgent: client._options.userAgent,
144
146
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
145
147
  }, options);
146
148
  if (!requestRes.ok) {
@@ -128,6 +128,7 @@ async function $do(
128
128
  const requestSecurity = resolveGlobalSecurity(securityInput);
129
129
 
130
130
  const context = {
131
+ options: client._options,
131
132
  baseURL: options?.serverURL ?? client._baseURL ?? "",
132
133
  operationID: "patchAIConfig",
133
134
  oAuth2Scopes: [],
@@ -148,6 +149,7 @@ async function $do(
148
149
  path: path,
149
150
  headers: headers,
150
151
  body: body,
152
+ userAgent: client._options.userAgent,
151
153
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
152
154
  }, options);
153
155
  if (!requestRes.ok) {
@@ -139,6 +139,7 @@ async function $do(
139
139
  const requestSecurity = resolveGlobalSecurity(securityInput);
140
140
 
141
141
  const context = {
142
+ options: client._options,
142
143
  baseURL: options?.serverURL ?? client._baseURL ?? "",
143
144
  operationID: "patchAIConfigVariation",
144
145
  oAuth2Scopes: [],
@@ -159,6 +160,7 @@ async function $do(
159
160
  path: path,
160
161
  headers: headers,
161
162
  body: body,
163
+ userAgent: client._options.userAgent,
162
164
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
163
165
  }, options);
164
166
  if (!requestRes.ok) {
@@ -141,6 +141,7 @@ async function $do(
141
141
  const requestSecurity = resolveGlobalSecurity(securityInput);
142
142
 
143
143
  const context = {
144
+ options: client._options,
144
145
  baseURL: options?.serverURL ?? client._baseURL ?? "",
145
146
  operationID: "postFeatureFlag",
146
147
  oAuth2Scopes: [],
@@ -162,6 +163,7 @@ async function $do(
162
163
  headers: headers,
163
164
  query: query,
164
165
  body: body,
166
+ userAgent: client._options.userAgent,
165
167
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
166
168
  }, options);
167
169
  if (!requestRes.ok) {
@@ -116,6 +116,7 @@ async function $do(
116
116
  const requestSecurity = resolveGlobalSecurity(securityInput);
117
117
 
118
118
  const context = {
119
+ options: client._options,
119
120
  baseURL: options?.serverURL ?? client._baseURL ?? "",
120
121
  operationID: "deleteFeatureFlag",
121
122
  oAuth2Scopes: [],
@@ -136,6 +137,7 @@ async function $do(
136
137
  path: path,
137
138
  headers: headers,
138
139
  body: body,
140
+ userAgent: client._options.userAgent,
139
141
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
140
142
  }, options);
141
143
  if (!requestRes.ok) {
@@ -134,6 +134,7 @@ async function $do(
134
134
  const requestSecurity = resolveGlobalSecurity(securityInput);
135
135
 
136
136
  const context = {
137
+ options: client._options,
137
138
  baseURL: options?.serverURL ?? client._baseURL ?? "",
138
139
  operationID: "getFeatureFlag",
139
140
  oAuth2Scopes: [],
@@ -155,6 +156,7 @@ async function $do(
155
156
  headers: headers,
156
157
  query: query,
157
158
  body: body,
159
+ userAgent: client._options.userAgent,
158
160
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
159
161
  }, options);
160
162
  if (!requestRes.ok) {
@@ -188,6 +188,7 @@ async function $do(
188
188
  const requestSecurity = resolveGlobalSecurity(securityInput);
189
189
 
190
190
  const context = {
191
+ options: client._options,
191
192
  baseURL: options?.serverURL ?? client._baseURL ?? "",
192
193
  operationID: "getFeatureFlags",
193
194
  oAuth2Scopes: [],
@@ -209,6 +210,7 @@ async function $do(
209
210
  headers: headers,
210
211
  query: query,
211
212
  body: body,
213
+ userAgent: client._options.userAgent,
212
214
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
213
215
  }, options);
214
216
  if (!requestRes.ok) {
@@ -1313,6 +1313,7 @@ async function $do(
1313
1313
  const requestSecurity = resolveGlobalSecurity(securityInput);
1314
1314
 
1315
1315
  const context = {
1316
+ options: client._options,
1316
1317
  baseURL: options?.serverURL ?? client._baseURL ?? "",
1317
1318
  operationID: "patchFeatureFlag",
1318
1319
  oAuth2Scopes: [],
@@ -1334,6 +1335,7 @@ async function $do(
1334
1335
  headers: headers,
1335
1336
  query: query,
1336
1337
  body: body,
1338
+ userAgent: client._options.userAgent,
1337
1339
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
1338
1340
  }, options);
1339
1341
  if (!requestRes.ok) {
@@ -2,6 +2,7 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
+ import { SDKOptions } from "../lib/config.js";
5
6
  import { HTTPClient, RequestInput } from "../lib/http.js";
6
7
  import { RetryConfig } from "../lib/retries.js";
7
8
  import { SecurityState } from "../lib/security.js";
@@ -13,6 +14,7 @@ export type HookContext = {
13
14
  securitySource?: any | (() => Promise<any>);
14
15
  retryConfig: RetryConfig;
15
16
  resolvedSecurity: SecurityState | null;
17
+ options: SDKOptions;
16
18
  };
17
19
 
18
20
  export type Awaitable<T> = T | Promise<T>;
package/src/index.ts CHANGED
@@ -4,4 +4,6 @@
4
4
 
5
5
  export * from "./lib/config.js";
6
6
  export * as files from "./lib/files.js";
7
+ export { HTTPClient } from "./lib/http.js";
8
+ export type { Fetcher, HTTPClientOptions } from "./lib/http.js";
7
9
  export * from "./sdk/sdk.js";
package/src/lib/config.ts CHANGED
@@ -37,6 +37,10 @@ export type SDKOptions = {
37
37
  * Allows overriding the default server URL used by the SDK
38
38
  */
39
39
  serverURL?: string | undefined;
40
+ /**
41
+ * Allows overriding the default user agent used by the SDK
42
+ */
43
+ userAgent?: string | undefined;
40
44
  /**
41
45
  * Allows overriding the default retry config used by the SDK
42
46
  */
@@ -65,8 +69,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
65
69
  export const SDK_METADATA = {
66
70
  language: "typescript",
67
71
  openapiDocVersion: "2.0",
68
- sdkVersion: "0.2.7",
69
- genVersion: "2.610.0",
72
+ sdkVersion: "0.3.1",
73
+ genVersion: "2.618.0",
70
74
  userAgent:
71
- "speakeasy-sdk/typescript 0.2.7 2.610.0 2.0 @launchdarkly/mcp-server",
75
+ "speakeasy-sdk/typescript 0.3.1 2.618.0 2.0 @launchdarkly/mcp-server",
72
76
  } as const;
package/src/lib/sdks.ts CHANGED
@@ -65,6 +65,7 @@ type RequestConfig = {
65
65
  headers?: HeadersInit;
66
66
  security?: SecurityState | null;
67
67
  uaHeader?: string;
68
+ userAgent?: string | undefined;
68
69
  timeoutMs?: number;
69
70
  };
70
71
 
@@ -96,19 +97,21 @@ export class ClientSDK {
96
97
  } else {
97
98
  this.#hooks = new SDKHooks();
98
99
  }
99
- this._options = { ...options, hooks: this.#hooks };
100
-
101
100
  const url = serverURLFromOptions(options);
102
101
  if (url) {
103
102
  url.pathname = url.pathname.replace(/\/+$/, "") + "/";
104
103
  }
104
+
105
105
  const { baseURL, client } = this.#hooks.sdkInit({
106
106
  baseURL: url,
107
107
  client: options.httpClient || new HTTPClient(),
108
108
  });
109
109
  this._baseURL = baseURL;
110
110
  this.#httpClient = client;
111
- this.#logger = options.debugLogger;
111
+
112
+ this._options = { ...options, hooks: this.#hooks };
113
+
114
+ this.#logger = this._options.debugLogger;
112
115
  if (!this.#logger && env().LAUNCHDARKLY_DEBUG) {
113
116
  this.#logger = console;
114
117
  }
@@ -184,7 +187,10 @@ export class ClientSDK {
184
187
  // Only set user agent header in non-browser-like environments since CORS
185
188
  // policy disallows setting it in browsers e.g. Chrome throws an error.
186
189
  if (!isBrowserLike) {
187
- headers.set(conf.uaHeader ?? "user-agent", SDK_METADATA.userAgent);
190
+ headers.set(
191
+ conf.uaHeader ?? "user-agent",
192
+ conf.userAgent ?? SDK_METADATA.userAgent,
193
+ );
188
194
  }
189
195
 
190
196
  const fetchOptions: Omit<RequestInit, "method" | "body"> = {
@@ -19,7 +19,7 @@ const routes = buildRouteMap({
19
19
  export const app = buildApplication(routes, {
20
20
  name: "mcp",
21
21
  versionInfo: {
22
- currentVersion: "0.2.7",
22
+ currentVersion: "0.3.1",
23
23
  },
24
24
  });
25
25
 
@@ -38,7 +38,7 @@ export function createMCPServer(deps: {
38
38
  }) {
39
39
  const server = new McpServer({
40
40
  name: "LaunchDarkly",
41
- version: "0.2.7",
41
+ version: "0.3.1",
42
42
  });
43
43
 
44
44
  const client = new LaunchDarklyCore({
@@ -13,7 +13,8 @@ const args = {
13
13
  export const tool$aiConfigsCreate: ToolDefinition<typeof args> = {
14
14
  name: "create-ai-config",
15
15
  description:
16
- `Creates a new AI Config within a project. Useful for setting up LLM configurations programmatically.`,
16
+ `Creates a new AI Config within a project. Useful for setting up LLM configurations programmatically.
17
+ `,
17
18
  scopes: ["write"],
18
19
  args,
19
20
  tool: async (client, args, ctx) => {
@@ -11,22 +11,11 @@ const args = {
11
11
  };
12
12
 
13
13
  export const tool$aiConfigsCreateVariation: ToolDefinition<typeof args> = {
14
- name: "ai-configs-create-variation",
15
- description: `Create AI Config variation
16
-
17
- Create a new variation for a given AI Config.
18
-
19
- The <code>model</code> in the request body requires a <code>modelName</code> and <code>parameters</code>, for example:
20
-
21
- \`\`\`
22
- "model": {
23
- "modelName": "claude-3-opus-20240229",
24
- "parameters": {
25
- "max_tokens": 1024
26
- }
27
- }
28
- \`\`\`
14
+ name: "create-ai-config-variation",
15
+ description:
16
+ `Adds a new variation to an AI Config, supporting experimentation or multi-model strategies.
29
17
  `,
18
+ scopes: ["write"],
30
19
  args,
31
20
  tool: async (client, args, ctx) => {
32
21
  const [result, apiCall] = await aiConfigsCreateVariation(
@@ -11,10 +11,11 @@ const args = {
11
11
  };
12
12
 
13
13
  export const tool$aiConfigsDelete: ToolDefinition<typeof args> = {
14
- name: "ai-configs-delete",
15
- description: `Delete AI Config
16
-
17
- Delete an existing AI Config.`,
14
+ name: "delete-ai-config",
15
+ description:
16
+ `Deletes an AI Config and its associated variations. Intended for cleanup or deprecation workflows.
17
+ `,
18
+ scopes: ["write"],
18
19
  args,
19
20
  tool: async (client, args, ctx) => {
20
21
  const [result, apiCall] = await aiConfigsDelete(
@@ -11,10 +11,9 @@ const args = {
11
11
  };
12
12
 
13
13
  export const tool$aiConfigsDeleteVariation: ToolDefinition<typeof args> = {
14
- name: "ai-configs-delete-variation",
15
- description: `Delete AI Config variation
16
-
17
- Delete a specific variation of an AI Config by config key and variation key.`,
14
+ name: "delete-ai-config-variation",
15
+ description: `Deletes an AI Config variation.`,
16
+ scopes: ["write"],
18
17
  args,
19
18
  tool: async (client, args, ctx) => {
20
19
  const [result, apiCall] = await aiConfigsDeleteVariation(
@@ -11,10 +11,10 @@ const args = {
11
11
  };
12
12
 
13
13
  export const tool$aiConfigsGet: ToolDefinition<typeof args> = {
14
- name: "ai-configs-get",
15
- description: `Get AI Config
16
-
17
- Retrieve a specific AI Config by its key.`,
14
+ name: "get-ai-config",
15
+ description:
16
+ `Retrieves details of a specific AI Config, including variations and model settings.`,
17
+ scopes: ["read"],
18
18
  args,
19
19
  tool: async (client, args, ctx) => {
20
20
  const [result, apiCall] = await aiConfigsGet(
@@ -11,10 +11,9 @@ const args = {
11
11
  };
12
12
 
13
13
  export const tool$aiConfigsGetVariation: ToolDefinition<typeof args> = {
14
- name: "ai-configs-get-variation",
15
- description: `Get AI Config variation
16
-
17
- Get an AI Config variation by key. The response includes all variation versions for the given variation key.`,
14
+ name: "get-ai-config-variation",
15
+ description: `Retrieves an AI configuration variation.`,
16
+ scopes: ["read"],
18
17
  args,
19
18
  tool: async (client, args, ctx) => {
20
19
  const [result, apiCall] = await aiConfigsGetVariation(
@@ -13,8 +13,9 @@ const args = {
13
13
  export const tool$aiConfigsList: ToolDefinition<typeof args> = {
14
14
  name: "list-ai-configs",
15
15
  description:
16
- `Lists all AI Configs in a project, allowing agents to enumerate available configurations for analysis or testing.`,
17
- scopes: ["read", "read"],
16
+ `Retrieves AI configuration settings for a specific project. This endpoint allows agents to access and modify AI-related configurations, ensuring that the AI's behavior aligns with project requirements and user expectations.
17
+ `,
18
+ scopes: ["read"],
18
19
  args,
19
20
  tool: async (client, args, ctx) => {
20
21
  const [result, apiCall] = await aiConfigsList(
@@ -11,21 +11,9 @@ const args = {
11
11
  };
12
12
 
13
13
  export const tool$aiConfigsUpdate: ToolDefinition<typeof args> = {
14
- name: "ai-configs-update",
15
- description: `Update AI Config
16
-
17
- Edit an existing AI Config.
18
-
19
- The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields.
20
-
21
- Here's an example:
22
- \`\`\`
23
- {
24
- "description": "Example updated description",
25
- "tags": ["new-tag"]
26
- }
27
- \`\`\`
28
- `,
14
+ name: "update-ai-config",
15
+ description: `Updates metadata or configuration of an existing AI Config.`,
16
+ scopes: ["write"],
29
17
  args,
30
18
  tool: async (client, args, ctx) => {
31
19
  const [result, apiCall] = await aiConfigsUpdate(
@@ -11,25 +11,11 @@ const args = {
11
11
  };
12
12
 
13
13
  export const tool$aiConfigsUpdateVariation: ToolDefinition<typeof args> = {
14
- name: "ai-configs-update-variation",
15
- description: `Update AI Config variation
16
-
17
- Edit an existing variation of an AI Config. This creates a new version of the variation.
18
-
19
- The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields.
20
-
21
- Here's an example:
22
- \`\`\`
23
- {
24
- "messages": [
25
- {
26
- "role": "system",
27
- "content": "The new message"
28
- }
29
- ]
30
- }
31
- \`\`\`
14
+ name: "update-ai-config-variation",
15
+ description:
16
+ `Updates a specific variation within an AI Config. Enables fine-tuned control of model behavior.
32
17
  `,
18
+ scopes: ["write"],
33
19
  args,
34
20
  tool: async (client, args, ctx) => {
35
21
  const [result, apiCall] = await aiConfigsUpdateVariation(
@@ -13,7 +13,8 @@ const args = {
13
13
  export const tool$featureFlagsCreate: ToolDefinition<typeof args> = {
14
14
  name: "create-feature-flag",
15
15
  description:
16
- `Creates a new feature flag within a project. AI agents can use this operation to define feature toggles for controlled rollouts, experimentation, or gated features, automating the flag setup process.`,
16
+ `Creates a new feature flag within a project. AI agents can use this operation to define feature toggles for controlled rollouts, experimentation, or gated features, automating the flag setup process.
17
+ `,
17
18
  scopes: ["write"],
18
19
  args,
19
20
  tool: async (client, args, ctx) => {
@@ -13,7 +13,8 @@ const args = {
13
13
  export const tool$featureFlagsDelete: ToolDefinition<typeof args> = {
14
14
  name: "delete-feature-flag",
15
15
  description:
16
- `Removes a feature flag from the project. Used by AI agents to clean up deprecated toggles that are no longer in use, improving system hygiene and maintainability.`,
16
+ `Removes a feature flag from the project. Used by AI agents to clean up deprecated toggles that are no longer in use, improving system hygiene and maintainability.
17
+ `,
17
18
  scopes: ["write"],
18
19
  args,
19
20
  tool: async (client, args, ctx) => {
@@ -13,7 +13,8 @@ const args = {
13
13
  export const tool$featureFlagsGet: ToolDefinition<typeof args> = {
14
14
  name: "get-feature-flag",
15
15
  description:
16
- `Fetches the full configuration for a specific feature flag, including environments, variations, and targeting rules. Useful for agents auditing or managing specific feature toggles in a detailed, contextual manner.`,
16
+ `Fetches the full configuration for a specific feature flag, including environments, variations, and targeting rules. Useful for agents auditing or managing specific feature toggles in a detailed, contextual manner.
17
+ `,
17
18
  scopes: ["read"],
18
19
  args,
19
20
  tool: async (client, args, ctx) => {
@@ -13,7 +13,8 @@ const args = {
13
13
  export const tool$featureFlagsList: ToolDefinition<typeof args> = {
14
14
  name: "list-feature-flags",
15
15
  description:
16
- `Retrieves all feature flags within a project, including metadata and targeting rules. Enables AI agents to enumerate existing flags for inspection, configuration analysis, or generating flag usage reports across environments.`,
16
+ `Retrieves all feature flags within a project, including metadata and targeting rules. Enables AI agents to enumerate existing flags for inspection, configuration analysis, or generating flag usage reports across environments.
17
+ `,
17
18
  scopes: ["read"],
18
19
  args,
19
20
  tool: async (client, args, ctx) => {
@@ -13,7 +13,8 @@ const args = {
13
13
  export const tool$featureFlagsPatch: ToolDefinition<typeof args> = {
14
14
  name: "update-feature-flag",
15
15
  description:
16
- `Updates the configuration of an existing feature flag. Enables agents to change targeting rules, modify variations, or adapt rollout strategies dynamically in response to user behavior or experiment results.`,
16
+ `Updates the configuration of an existing feature flag. Enables agents to change targeting rules, modify variations, or adapt rollout strategies dynamically in response to user behavior or experiment results.
17
+ `,
17
18
  scopes: ["write"],
18
19
  args,
19
20
  tool: async (client, args, ctx) => {