@swarm-tips/client 0.2.3 → 0.2.4
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/SBOM.spdx.json +5 -5
- package/dist/http.js +6 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/swarm/index.js +1 -1
- package/package.json +1 -1
package/SBOM.spdx.json
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"spdxVersion": "SPDX-2.3",
|
|
3
3
|
"dataLicense": "CC0-1.0",
|
|
4
4
|
"SPDXID": "SPDXRef-DOCUMENT",
|
|
5
|
-
"name": "@swarm-tips/client-0.2.
|
|
6
|
-
"documentNamespace": "https://swarm.tips/sbom/client/0.2.
|
|
5
|
+
"name": "@swarm-tips/client-0.2.4",
|
|
6
|
+
"documentNamespace": "https://swarm.tips/sbom/client/0.2.4",
|
|
7
7
|
"creationInfo": {
|
|
8
|
-
"created": "2026-09-09T05:
|
|
8
|
+
"created": "2026-09-09T05:55:37.047Z",
|
|
9
9
|
"creators": [
|
|
10
10
|
"Tool: sdk/client/scripts/generate-sbom.mjs",
|
|
11
11
|
"Organization: Swarm Tips"
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
{
|
|
16
16
|
"name": "@swarm-tips/client",
|
|
17
17
|
"SPDXID": "SPDXRef-Package",
|
|
18
|
-
"versionInfo": "0.2.
|
|
19
|
-
"downloadLocation": "https://www.npmjs.com/package/@swarm-tips/client/v/0.2.
|
|
18
|
+
"versionInfo": "0.2.4",
|
|
19
|
+
"downloadLocation": "https://www.npmjs.com/package/@swarm-tips/client/v/0.2.4",
|
|
20
20
|
"filesAnalyzed": false,
|
|
21
21
|
"licenseConcluded": "MIT",
|
|
22
22
|
"licenseDeclared": "MIT"
|
package/dist/http.js
CHANGED
|
@@ -27,9 +27,14 @@ export class HttpClient {
|
|
|
27
27
|
const operation = `${init.method ?? "GET"} ${path}`;
|
|
28
28
|
const token = init.token ?? this.getToken?.();
|
|
29
29
|
const headers = {
|
|
30
|
-
"Content-Type": "application/json",
|
|
31
30
|
...init.headers,
|
|
32
31
|
};
|
|
32
|
+
// A Content-Type header on a bodyless GET turns an otherwise simple
|
|
33
|
+
// cross-origin read into a CORS preflight. Public browser reads should not
|
|
34
|
+
// require OPTIONS for a body that does not exist.
|
|
35
|
+
if (init.body !== undefined && !headers["Content-Type"]) {
|
|
36
|
+
headers["Content-Type"] = "application/json";
|
|
37
|
+
}
|
|
33
38
|
if (token)
|
|
34
39
|
headers.Authorization = `Bearer ${token}`;
|
|
35
40
|
let response;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** The unified client package version. Functional APIs live in typed subpaths. */
|
|
2
|
-
export declare const CLIENT_VERSION: "0.2.
|
|
2
|
+
export declare const CLIENT_VERSION: "0.2.4";
|
|
3
3
|
export declare const CLIENT_MANIFEST_SCHEMA: "swarm.client-manifest/v1";
|
|
4
4
|
export { SwarmClientError } from "./errors.js";
|
|
5
5
|
export type { SwarmClientErrorCode, SwarmClientErrorOptions } from "./errors.js";
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/** The unified client package version. Functional APIs live in typed subpaths. */
|
|
2
|
-
export const CLIENT_VERSION = "0.2.
|
|
2
|
+
export const CLIENT_VERSION = "0.2.4";
|
|
3
3
|
export const CLIENT_MANIFEST_SCHEMA = "swarm.client-manifest/v1";
|
|
4
4
|
export { SwarmClientError } from "./errors.js";
|
package/dist/swarm/index.js
CHANGED
|
@@ -49,7 +49,7 @@ export class SwarmClient {
|
|
|
49
49
|
async toolCount() {
|
|
50
50
|
const headers = { "Content-Type": "application/json", Accept: "application/json, text/event-stream" };
|
|
51
51
|
try {
|
|
52
|
-
const init = await this.fetchImpl(`${this.baseUrl}/mcp`, { method: "POST", headers, body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "initialize", params: { protocolVersion: "2025-03-26", capabilities: {}, clientInfo: { name: "swarm-client", version: "0.2.
|
|
52
|
+
const init = await this.fetchImpl(`${this.baseUrl}/mcp`, { method: "POST", headers, body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "initialize", params: { protocolVersion: "2025-03-26", capabilities: {}, clientInfo: { name: "swarm-client", version: "0.2.4" } } }) });
|
|
53
53
|
if (!init.ok)
|
|
54
54
|
return null;
|
|
55
55
|
const session = init.headers.get("mcp-session-id");
|