@kya-os/mcp-i
Version:
COMING SOON:Production-ready MCP Identity with automatic registration, key rotation, and optimized performance
33 lines (32 loc) • 1.02 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.enableMCPIdentityCLI = enableMCPIdentityCLI;
const index_js_1 = require("./index.js");
async function enableMCPIdentityCLI(options) {
let isNewIdentity = false;
let capturedClaimUrl;
const wrappedProgress = (event) => {
if (event.stage === 'complete' && event.data?.claimUrl) {
capturedClaimUrl = event.data.claimUrl;
}
if (event.stage === 'generating_keys') {
isNewIdentity = true;
}
options?.onProgress?.(event);
};
const identity = await (0, index_js_1.enableMCPIdentity)({
...options,
logLevel: options?.logLevel || 'silent',
onProgress: wrappedProgress
});
const did = identity.did;
return {
identity,
metadata: {
isNewIdentity,
did,
claimUrl: capturedClaimUrl,
registryUrl: 'https://knowthat.ai/agents/' + did.split(':').pop()
}
};
}