@kya-os/mcp-i 1.5.3-canary.0 → 1.5.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/dist/auth/jwt.d.ts +1 -1
- package/dist/auth/oauth/router.js +3 -8
- package/dist/cli-adapter/index.js +1 -1
- package/dist/cli-adapter/kta-registration.d.ts +1 -1
- package/dist/cli-adapter/kta-registration.js +2 -2
- package/dist/compiler/config/injection.js +2 -2
- package/dist/compiler/get-webpack-config/get-entries.js +12 -8
- package/dist/providers/node-providers.d.ts +1 -1
- package/dist/providers/node-providers.js +4 -4
- package/dist/runtime/adapter-express.js +1 -1
- package/dist/runtime/adapter-nextjs.js +1 -1
- package/dist/runtime/audit.d.ts +287 -3
- package/dist/runtime/audit.js +169 -4
- package/dist/runtime/auth-handshake.d.ts +1 -1
- package/dist/runtime/auth-handshake.js +1 -1
- package/dist/runtime/debug.d.ts +2 -2
- package/dist/runtime/debug.js +3 -3
- package/dist/runtime/delegation/index.d.ts +7 -0
- package/dist/runtime/delegation/index.js +23 -0
- package/dist/runtime/delegation/vc-issuer.d.ts +119 -0
- package/dist/runtime/delegation/vc-issuer.js +220 -0
- package/dist/runtime/delegation/vc-verifier.d.ts +193 -0
- package/dist/runtime/delegation/vc-verifier.js +387 -0
- package/dist/runtime/http.js +1 -1
- package/dist/runtime/identity.d.ts +10 -2
- package/dist/runtime/identity.js +68 -11
- package/dist/runtime/mcpi-runtime.d.ts +28 -1
- package/dist/runtime/mcpi-runtime.js +2 -2
- package/dist/runtime/migrate-identity.d.ts +16 -0
- package/dist/runtime/migrate-identity.js +118 -0
- package/dist/runtime/proof.js +2 -2
- package/dist/runtime/stdio.js +1 -1
- package/dist/runtime/transports/http/index.js +3 -1
- package/dist/runtime/utils/time.d.ts +80 -0
- package/dist/runtime/utils/time.js +117 -0
- package/dist/runtime/utils/tools.js +22 -3
- package/dist/runtime/verifier-middleware.js +1 -1
- package/dist/runtime/well-known.d.ts +0 -4
- package/dist/runtime/well-known.js +12 -26
- package/dist/storage/delegation.js +2 -2
- package/dist/test/deterministic-keys.d.ts +1 -1
- package/dist/test/deterministic-keys.js +6 -6
- package/dist/test/examples/test-usage-example.d.ts +6 -6
- package/dist/test/examples/test-usage-example.js +5 -5
- package/dist/test/local-verification.d.ts +1 -1
- package/dist/test/local-verification.js +10 -10
- package/dist/test/mock-identity-provider.d.ts +4 -4
- package/dist/test/mock-identity-provider.js +7 -7
- package/dist/test/runtime-integration.d.ts +2 -2
- package/package.json +4 -3
|
@@ -64,7 +64,7 @@ class MockIdentityProvider {
|
|
|
64
64
|
Object.entries(predefined).forEach(([key, identity]) => {
|
|
65
65
|
this.identities.set(key, identity);
|
|
66
66
|
// Set all predefined identities as active by default
|
|
67
|
-
this.delegations.set(`${identity.did}:${identity.
|
|
67
|
+
this.delegations.set(`${identity.did}:${identity.kid}`, "active");
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
70
|
/**
|
|
@@ -91,7 +91,7 @@ class MockIdentityProvider {
|
|
|
91
91
|
seed: this.deterministicSeed,
|
|
92
92
|
});
|
|
93
93
|
this.setIdentity(key, identity);
|
|
94
|
-
this.setDelegation(`${identity.did}:${identity.
|
|
94
|
+
this.setDelegation(`${identity.did}:${identity.kid}`, "active");
|
|
95
95
|
return identity;
|
|
96
96
|
}
|
|
97
97
|
/**
|
|
@@ -104,9 +104,9 @@ class MockIdentityProvider {
|
|
|
104
104
|
/**
|
|
105
105
|
* Get delegation status
|
|
106
106
|
*/
|
|
107
|
-
getDelegationStatus(did,
|
|
107
|
+
getDelegationStatus(did, kid) {
|
|
108
108
|
(0, test_environment_1.ensureTestMode)();
|
|
109
|
-
return this.delegations.get(`${did}:${
|
|
109
|
+
return this.delegations.get(`${did}:${kid}`) || "revoked";
|
|
110
110
|
}
|
|
111
111
|
/**
|
|
112
112
|
* Simulate KTA failure scenarios
|
|
@@ -139,7 +139,7 @@ class MockIdentityProvider {
|
|
|
139
139
|
/**
|
|
140
140
|
* Mock KTA registration call
|
|
141
141
|
*/
|
|
142
|
-
async mockRegister(did,
|
|
142
|
+
async mockRegister(did, _kid) {
|
|
143
143
|
(0, test_environment_1.ensureTestMode)();
|
|
144
144
|
// Simulate network failure
|
|
145
145
|
if (this.shouldSimulateKTAFailure("network")) {
|
|
@@ -173,7 +173,7 @@ class MockIdentityProvider {
|
|
|
173
173
|
/**
|
|
174
174
|
* Mock KTA delegation check
|
|
175
175
|
*/
|
|
176
|
-
async mockCheckDelegation(did,
|
|
176
|
+
async mockCheckDelegation(did, kid) {
|
|
177
177
|
(0, test_environment_1.ensureTestMode)();
|
|
178
178
|
// Simulate failures if configured
|
|
179
179
|
if (this.shouldSimulateKTAFailure("network")) {
|
|
@@ -185,7 +185,7 @@ class MockIdentityProvider {
|
|
|
185
185
|
error: "Authentication failed",
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
|
-
const status = this.getDelegationStatus(did,
|
|
188
|
+
const status = this.getDelegationStatus(did, kid);
|
|
189
189
|
return { status };
|
|
190
190
|
}
|
|
191
191
|
/**
|
|
@@ -26,11 +26,11 @@ export declare function interceptKTACall<T>(operation: string, originalCall: ()
|
|
|
26
26
|
*/
|
|
27
27
|
export declare function getTestIdentityForRuntime(identityKey?: string): {
|
|
28
28
|
did: string;
|
|
29
|
-
|
|
29
|
+
kid: string;
|
|
30
30
|
privateKey: string;
|
|
31
31
|
publicKey: string;
|
|
32
32
|
createdAt: string;
|
|
33
|
-
lastRotated
|
|
33
|
+
lastRotated?: string | undefined;
|
|
34
34
|
};
|
|
35
35
|
/**
|
|
36
36
|
* Create test session context
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kya-os/mcp-i",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.4",
|
|
4
4
|
"description": "The TypeScript MCP framework with identity features built-in",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -53,14 +53,15 @@
|
|
|
53
53
|
"model-context-protocol"
|
|
54
54
|
],
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@kya-os/contracts": "^1.3.
|
|
57
|
-
"@kya-os/mcp-i-core": "^1.1.
|
|
56
|
+
"@kya-os/contracts": "^1.3.1-canary.3",
|
|
57
|
+
"@kya-os/mcp-i-core": "^1.1.1-canary.1",
|
|
58
58
|
"@modelcontextprotocol/sdk": "^1.11.4",
|
|
59
59
|
"@swc/core": "^1.11.24",
|
|
60
60
|
"@types/express": "^5.0.1",
|
|
61
61
|
"@types/webpack-node-externals": "^3.0.4",
|
|
62
62
|
"@vercel/mcp-adapter": "^0.11.1",
|
|
63
63
|
"axios": "^1.12.0",
|
|
64
|
+
"base-x": "^5.0.1",
|
|
64
65
|
"chalk": "^5.2.0",
|
|
65
66
|
"chokidar": "^3.6.0",
|
|
66
67
|
"clean-webpack-plugin": "^4.0.0",
|