@kya-os/mcp-i 1.6.14 → 1.6.15
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/cli-adapter/index.js +23 -4
- package/dist/runtime/adapter-express.js +3 -3
- package/dist/runtime/adapter-nextjs.js +3 -3
- package/dist/runtime/auth-handshake.d.ts +5 -5
- package/dist/runtime/auth-handshake.js +31 -31
- package/dist/runtime/delegation-hooks.d.ts +1 -1
- package/dist/runtime/delegation-hooks.js +36 -8
- package/dist/runtime/delegation-verifier-agentshield.js +8 -6
- package/dist/runtime/delegation-verifier-kv.d.ts +2 -2
- package/dist/runtime/delegation-verifier-kv.js +24 -18
- package/dist/runtime/delegation-verifier-memory.d.ts +2 -2
- package/dist/runtime/delegation-verifier-memory.js +11 -7
- package/dist/runtime/http.js +3 -3
- package/dist/runtime/mcpi-runtime-wrapper.js +1 -1
- package/dist/runtime/migrate-identity.js +6 -6
- package/dist/runtime/proof-batch-queue.d.ts +1 -1
- package/dist/runtime/proof-batch-queue.js +24 -21
- package/dist/runtime/stdio.js +3 -3
- package/dist/runtime/transports/http/stateless-streamable-http.js +9 -9
- package/dist/storage/encryption.js +3 -2
- package/package.json +3 -3
|
@@ -18,9 +18,28 @@ const kta_registration_1 = require("./kta-registration");
|
|
|
18
18
|
* It recreates the alpha `enableMCPIdentityCLI` function.
|
|
19
19
|
*/
|
|
20
20
|
async function enableMCPIdentityCLI(options = {}) {
|
|
21
|
-
const { name, description, repository, endpoint = "https://knowthat.ai", onProgress, skipRegistration = false, } = options;
|
|
21
|
+
const { name, description, repository, endpoint = "https://knowthat.ai", logLevel = "info", onProgress, skipRegistration = false, } = options;
|
|
22
22
|
let isNewIdentity = false;
|
|
23
23
|
let capturedClaimUrl;
|
|
24
|
+
// Helper to log based on logLevel
|
|
25
|
+
const log = {
|
|
26
|
+
silent: () => { },
|
|
27
|
+
info: (...args) => {
|
|
28
|
+
if (logLevel === "info" || logLevel === "debug") {
|
|
29
|
+
console.log(...args);
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
debug: (...args) => {
|
|
33
|
+
if (logLevel === "debug") {
|
|
34
|
+
console.log(...args);
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
warn: (...args) => {
|
|
38
|
+
if (logLevel !== "silent") {
|
|
39
|
+
console.warn(...args);
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
};
|
|
24
43
|
// Helper to emit progress events
|
|
25
44
|
const emitProgress = async (stage, message, data) => {
|
|
26
45
|
if (onProgress) {
|
|
@@ -29,7 +48,7 @@ async function enableMCPIdentityCLI(options = {}) {
|
|
|
29
48
|
}
|
|
30
49
|
catch (error) {
|
|
31
50
|
// Continue even if progress callback throws
|
|
32
|
-
|
|
51
|
+
log.warn("Warning: Progress callback threw an error:", error);
|
|
33
52
|
}
|
|
34
53
|
}
|
|
35
54
|
};
|
|
@@ -66,8 +85,8 @@ async function enableMCPIdentityCLI(options = {}) {
|
|
|
66
85
|
capturedClaimUrl = registrationResult.claimURL;
|
|
67
86
|
}
|
|
68
87
|
catch (error) {
|
|
69
|
-
|
|
70
|
-
|
|
88
|
+
log.warn("Warning: KTA registration failed:", error.message);
|
|
89
|
+
log.warn("Continuing with local identity only");
|
|
71
90
|
}
|
|
72
91
|
}
|
|
73
92
|
// Step 4: Save (already done by IdentityManager, but emit event for CLI)
|