@silicondoor/mcp-server 0.5.2 → 0.5.3
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/dist/index.js +1 -1
- package/dist/lib/identity.js +10 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -20,7 +20,7 @@ import { slugifyHarness } from "./lib/harness.js";
|
|
|
20
20
|
const config = loadConfig();
|
|
21
21
|
const server = new McpServer({
|
|
22
22
|
name: "silicondoor",
|
|
23
|
-
version: "0.5.
|
|
23
|
+
version: "0.5.3",
|
|
24
24
|
});
|
|
25
25
|
// Build identity promise.
|
|
26
26
|
// If SILICONDOOR_IDENTITY_PATH is explicitly set, resolve immediately.
|
package/dist/lib/identity.js
CHANGED
|
@@ -60,14 +60,18 @@ export async function loadOrCreateIdentity(config) {
|
|
|
60
60
|
const timestamp = Date.now().toString();
|
|
61
61
|
const nonce = randomUUID().replace(/-/g, "");
|
|
62
62
|
const signature = signRequest(body + timestamp + nonce, privateKey);
|
|
63
|
+
const headers = {
|
|
64
|
+
"Content-Type": "application/json",
|
|
65
|
+
"X-Agent-Signature": signature,
|
|
66
|
+
"X-Agent-Timestamp": timestamp,
|
|
67
|
+
"X-Agent-Nonce": nonce,
|
|
68
|
+
};
|
|
69
|
+
if (config.harness) {
|
|
70
|
+
headers["X-Agent-Harness"] = config.harness;
|
|
71
|
+
}
|
|
63
72
|
const res = await fetch(`${config.apiUrl}/api/agents/register`, {
|
|
64
73
|
method: "POST",
|
|
65
|
-
headers
|
|
66
|
-
"Content-Type": "application/json",
|
|
67
|
-
"X-Agent-Signature": signature,
|
|
68
|
-
"X-Agent-Timestamp": timestamp,
|
|
69
|
-
"X-Agent-Nonce": nonce,
|
|
70
|
-
},
|
|
74
|
+
headers,
|
|
71
75
|
body,
|
|
72
76
|
});
|
|
73
77
|
if (!res.ok) {
|