@kya-os/mcp-i-core 1.4.8 → 1.4.10

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.
@@ -18,10 +18,13 @@
18
18
  export declare function canonicalizeJSON(obj: any): string;
19
19
  /**
20
20
  * JWT Header for EdDSA (Ed25519) signed credentials
21
+ *
22
+ * W3C VC-JWT spec recommends 'vc+jwt' for typ, but 'JWT' is also valid.
23
+ * Both are accepted for compatibility with different implementations.
21
24
  */
22
25
  export interface VCJWTHeader {
23
26
  alg: 'EdDSA';
24
- typ: 'JWT';
27
+ typ: 'JWT' | 'vc+jwt';
25
28
  kid?: string;
26
29
  }
27
30
  /**
@@ -38,6 +38,7 @@ class AuthorizationRegistry {
38
38
  return toolProtection.authorization;
39
39
  }
40
40
  // Legacy fallback: oauthProvider field
41
+ // Note: Returns 'oauth' for backward compat; consumers should normalize to 'oauth2'
41
42
  if (toolProtection.oauthProvider) {
42
43
  return {
43
44
  type: 'oauth',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kya-os/mcp-i-core",
3
- "version": "1.4.8",
3
+ "version": "1.4.10",
4
4
  "description": "Core runtime and types for MCP-I framework",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "prepublishOnly": "npm run build && node ../create-mcpi-app/scripts/validate-no-workspace.js"
29
29
  },
30
30
  "dependencies": {
31
- "@kya-os/contracts": "^1.7.12",
31
+ "@kya-os/contracts": "^1.7.17",
32
32
  "jose": "^5.6.3",
33
33
  "json-canonicalize": "^2.0.0",
34
34
  "zod": "^3.25.76"
@@ -0,0 +1,56 @@
1
+ import { defineConfig } from "vitest/config";
2
+ import path from "path";
3
+
4
+ export default defineConfig({
5
+ resolve: {
6
+ alias: {
7
+ // Map contracts subpath exports to their actual dist paths for vitest resolution
8
+ // These aliases work for both source files and bundled code in node_modules
9
+ "@kya-os/contracts/proof": path.resolve(__dirname, "../contracts/dist/proof/index.js"),
10
+ "@kya-os/contracts/delegation": path.resolve(__dirname, "../contracts/dist/delegation/index.js"),
11
+ "@kya-os/contracts/agentshield-api": path.resolve(__dirname, "../contracts/dist/agentshield-api/index.js"),
12
+ "@kya-os/contracts/config": path.resolve(__dirname, "../contracts/dist/config/index.js"),
13
+ "@kya-os/contracts/tool-protection": path.resolve(__dirname, "../contracts/dist/tool-protection/index.js"),
14
+ "@kya-os/contracts/well-known": path.resolve(__dirname, "../contracts/dist/well-known/index.js"),
15
+ "@kya-os/contracts/runtime": path.resolve(__dirname, "../contracts/dist/runtime/index.js"),
16
+ "@kya-os/contracts/handshake": path.resolve(__dirname, "../contracts/dist/handshake.js"),
17
+ "@kya-os/contracts/test": path.resolve(__dirname, "../contracts/dist/test.js"),
18
+ "@kya-os/contracts": path.resolve(__dirname, "../contracts/dist/index.js"),
19
+ },
20
+ // Ensure aliases are resolved before node_modules
21
+ dedupe: ["@kya-os/contracts"],
22
+ // Force resolution to use workspace contracts
23
+ conditions: ["node", "import", "require"],
24
+ },
25
+ // Force vitest to inline contracts and mcp-i-core packages so aliases work
26
+ // This ensures that bundled code in node_modules can resolve contracts subpath exports
27
+ server: {
28
+ deps: {
29
+ inline: ["@kya-os/contracts", "@kya-os/mcp-i-core"],
30
+ },
31
+ },
32
+ test: {
33
+ globals: true,
34
+ environment: "node",
35
+ coverage: {
36
+ provider: "v8",
37
+ reporter: ["json", "text-summary"],
38
+ include: ["src/**/*.ts"],
39
+ exclude: [
40
+ "src/**/__tests__/**",
41
+ "src/**/*.test.ts",
42
+ "dist/**",
43
+ "node_modules/**",
44
+ ],
45
+ reportsDirectory: "./coverage",
46
+ clean: true,
47
+ // Coverage thresholds removed - will be re-enabled when coverage improves
48
+ // thresholds: {
49
+ // lines: 80,
50
+ // branches: 70,
51
+ // functions: 80,
52
+ // statements: 80,
53
+ // },
54
+ },
55
+ },
56
+ });
@@ -1,9 +0,0 @@
1
- {
2
- "permissions": {
3
- "allow": [
4
- "Read(//Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/contracts/**)"
5
- ],
6
- "deny": [],
7
- "ask": []
8
- }
9
- }