@bedrockio/ai 0.8.0 → 0.8.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.8.1
2
+
3
+ - Change to minimum protocol version to avoid supporing fixed versions.
4
+
1
5
  ## 0.8.0
2
6
 
3
7
  - Simplified return values.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const SUPPORTED_VERSIONS = ['2025-03-26', '2025-06-18'];
3
+ const MIN_SUPPORTED_VERSION = '2025-03-26';
4
4
  const ERROR_INVALID_SESSION = -32000;
5
5
  const ERROR_UNAUTHORIZED = -32001;
6
6
  const ERROR_METHOD_NOT_FOUND = -32601;
@@ -158,7 +158,7 @@ class McpServer {
158
158
  message: 'Unsupported protocol version',
159
159
  data: {
160
160
  requested: request.params.protocolVersion,
161
- supported: SUPPORTED_VERSIONS,
161
+ minimum: MIN_SUPPORTED_VERSION,
162
162
  },
163
163
  },
164
164
  };
@@ -199,7 +199,7 @@ class McpServer {
199
199
  }
200
200
  // Version helpers
201
201
  isSupportedVersion(version) {
202
- return SUPPORTED_VERSIONS.includes(version);
202
+ return version >= MIN_SUPPORTED_VERSION;
203
203
  }
204
204
  }
205
205
  exports.default = McpServer;
@@ -1,4 +1,4 @@
1
- const SUPPORTED_VERSIONS = ['2025-03-26', '2025-06-18'];
1
+ const MIN_SUPPORTED_VERSION = '2025-03-26';
2
2
  const ERROR_INVALID_SESSION = -32000;
3
3
  const ERROR_UNAUTHORIZED = -32001;
4
4
  const ERROR_METHOD_NOT_FOUND = -32601;
@@ -156,7 +156,7 @@ export default class McpServer {
156
156
  message: 'Unsupported protocol version',
157
157
  data: {
158
158
  requested: request.params.protocolVersion,
159
- supported: SUPPORTED_VERSIONS,
159
+ minimum: MIN_SUPPORTED_VERSION,
160
160
  },
161
161
  },
162
162
  };
@@ -197,7 +197,7 @@ export default class McpServer {
197
197
  }
198
198
  // Version helpers
199
199
  isSupportedVersion(version) {
200
- return SUPPORTED_VERSIONS.includes(version);
200
+ return version >= MIN_SUPPORTED_VERSION;
201
201
  }
202
202
  }
203
203
  class InvalidRequestError extends Error {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bedrockio/ai",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "Bedrock wrapper for common AI chatbots.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -23,7 +23,7 @@ export default class McpServer {
23
23
  message: string;
24
24
  data: {
25
25
  requested: any;
26
- supported: string[];
26
+ minimum: string;
27
27
  };
28
28
  };
29
29
  } | {
@@ -85,7 +85,7 @@ export default class McpServer {
85
85
  message: string;
86
86
  data: {
87
87
  requested: any;
88
- supported: string[];
88
+ minimum: string;
89
89
  };
90
90
  };
91
91
  };