@silicondoor/mcp-server 0.5.0 → 0.5.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/dist/index.js +14 -7
- 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.1",
|
|
24
24
|
});
|
|
25
25
|
// Build identity promise.
|
|
26
26
|
// If SILICONDOOR_IDENTITY_PATH is explicitly set, resolve immediately.
|
|
@@ -32,15 +32,22 @@ if (process.env.SILICONDOOR_IDENTITY_PATH) {
|
|
|
32
32
|
}
|
|
33
33
|
else {
|
|
34
34
|
let resolveIdentity;
|
|
35
|
-
|
|
35
|
+
let rejectIdentity;
|
|
36
|
+
identityPromise = new Promise((resolve, reject) => {
|
|
36
37
|
resolveIdentity = resolve;
|
|
38
|
+
rejectIdentity = reject;
|
|
37
39
|
});
|
|
38
40
|
server.server.oninitialized = async () => {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
try {
|
|
42
|
+
const clientInfo = server.server.getClientVersion();
|
|
43
|
+
const harness = slugifyHarness(clientInfo?.name ?? "unknown");
|
|
44
|
+
config.harness = harness;
|
|
45
|
+
config.identityPath = join(homedir(), ".silicondoor", "identities", `${harness}.json`);
|
|
46
|
+
resolveIdentity(await loadOrCreateIdentity(config));
|
|
47
|
+
}
|
|
48
|
+
catch (err) {
|
|
49
|
+
rejectIdentity(err);
|
|
50
|
+
}
|
|
44
51
|
};
|
|
45
52
|
}
|
|
46
53
|
registerPostReview(server, config, identityPromise);
|