@kya-os/mcp 1.5.0 → 1.6.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/CHANGELOG.md +82 -0
- package/dist/authz/accountability.d.ts +35 -0
- package/dist/authz/accountability.d.ts.map +1 -0
- package/dist/authz/accountability.js +28 -0
- package/dist/authz/accountability.js.map +1 -0
- package/dist/authz/adapter.d.ts +47 -0
- package/dist/authz/adapter.d.ts.map +1 -0
- package/dist/authz/adapter.js +10 -0
- package/dist/authz/adapter.js.map +1 -0
- package/dist/authz/examples/inmemory-oidc.d.ts +29 -0
- package/dist/authz/examples/inmemory-oidc.d.ts.map +1 -0
- package/dist/authz/examples/inmemory-oidc.js +68 -0
- package/dist/authz/examples/inmemory-oidc.js.map +1 -0
- package/dist/authz/index.d.ts +19 -0
- package/dist/authz/index.d.ts.map +1 -0
- package/dist/authz/index.js +19 -0
- package/dist/authz/index.js.map +1 -0
- package/dist/authz/oidc/authorize.d.ts +25 -0
- package/dist/authz/oidc/authorize.d.ts.map +1 -0
- package/dist/authz/oidc/authorize.js +24 -0
- package/dist/authz/oidc/authorize.js.map +1 -0
- package/dist/authz/oidc/metadata.d.ts +43 -0
- package/dist/authz/oidc/metadata.d.ts.map +1 -0
- package/dist/authz/oidc/metadata.js +32 -0
- package/dist/authz/oidc/metadata.js.map +1 -0
- package/dist/authz/oidc/oidc-adapter.d.ts +52 -0
- package/dist/authz/oidc/oidc-adapter.d.ts.map +1 -0
- package/dist/authz/oidc/oidc-adapter.js +131 -0
- package/dist/authz/oidc/oidc-adapter.js.map +1 -0
- package/dist/authz/oidc/pkce.d.ts +20 -0
- package/dist/authz/oidc/pkce.d.ts.map +1 -0
- package/dist/authz/oidc/pkce.js +29 -0
- package/dist/authz/oidc/pkce.js.map +1 -0
- package/dist/authz/registry.d.ts +29 -0
- package/dist/authz/registry.d.ts.map +1 -0
- package/dist/authz/registry.js +48 -0
- package/dist/authz/registry.js.map +1 -0
- package/dist/authz/requirement.d.ts +38 -0
- package/dist/authz/requirement.d.ts.map +1 -0
- package/dist/authz/requirement.js +45 -0
- package/dist/authz/requirement.js.map +1 -0
- package/dist/delegation/chain-enforcement.d.ts +86 -0
- package/dist/delegation/chain-enforcement.d.ts.map +1 -0
- package/dist/delegation/chain-enforcement.js +224 -0
- package/dist/delegation/chain-enforcement.js.map +1 -0
- package/dist/delegation/holder-binding.d.ts +128 -0
- package/dist/delegation/holder-binding.d.ts.map +1 -0
- package/dist/delegation/holder-binding.js +175 -0
- package/dist/delegation/holder-binding.js.map +1 -0
- package/dist/delegation/index.d.ts +2 -0
- package/dist/delegation/index.d.ts.map +1 -1
- package/dist/delegation/index.js +2 -0
- package/dist/delegation/index.js.map +1 -1
- package/dist/errors.d.ts +1 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +1 -0
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/middleware/with-kya-os.d.ts +35 -1
- package/dist/middleware/with-kya-os.d.ts.map +1 -1
- package/dist/middleware/with-kya-os.js +94 -192
- package/dist/middleware/with-kya-os.js.map +1 -1
- package/dist/providers/grant-store.d.ts +98 -0
- package/dist/providers/grant-store.d.ts.map +1 -0
- package/dist/providers/grant-store.js +92 -0
- package/dist/providers/grant-store.js.map +1 -0
- package/dist/providers/index.d.ts +2 -0
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.js +2 -0
- package/dist/providers/index.js.map +1 -1
- package/dist/providers/runtime-fetch.d.ts +14 -0
- package/dist/providers/runtime-fetch.d.ts.map +1 -1
- package/dist/providers/runtime-fetch.js +22 -0
- package/dist/providers/runtime-fetch.js.map +1 -1
- package/dist/providers/web-crypto.d.ts +35 -0
- package/dist/providers/web-crypto.d.ts.map +1 -0
- package/dist/providers/web-crypto.js +91 -0
- package/dist/providers/web-crypto.js.map +1 -0
- package/dist/types/protocol.d.ts +1 -1
- package/dist/types/protocol.d.ts.map +1 -1
- package/dist/types/protocol.js +1 -1
- package/dist/types/protocol.js.map +1 -1
- package/package.json +25 -16
- package/schemas/README.md +1 -1
- package/schemas/delegation-credential.json +2 -2
- package/schemas/detached-proof.json +1 -1
- package/schemas/handshake-request.json +1 -1
- package/schemas/handshake-response.json +1 -1
- package/schemas/well-known-mcpi.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kya-os/mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"description": "Reference implementation of the KYA-OS protocol for Model Context Protocol servers: delegation, proof, and session primitives",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -47,6 +47,10 @@
|
|
|
47
47
|
"types": "./dist/policy/index.d.ts",
|
|
48
48
|
"default": "./dist/policy/index.js"
|
|
49
49
|
},
|
|
50
|
+
"./authz": {
|
|
51
|
+
"types": "./dist/authz/index.d.ts",
|
|
52
|
+
"default": "./dist/authz/index.js"
|
|
53
|
+
},
|
|
50
54
|
"./schemas/*.json": "./schemas/*.json",
|
|
51
55
|
"./package.json": "./package.json"
|
|
52
56
|
},
|
|
@@ -57,6 +61,25 @@
|
|
|
57
61
|
"README.md",
|
|
58
62
|
"CHANGELOG.md"
|
|
59
63
|
],
|
|
64
|
+
"scripts": {
|
|
65
|
+
"build": "tsc",
|
|
66
|
+
"test": "vitest run",
|
|
67
|
+
"test:watch": "vitest",
|
|
68
|
+
"test:coverage": "vitest run --coverage",
|
|
69
|
+
"typecheck": "tsc --noEmit",
|
|
70
|
+
"lint": "eslint src --ext .ts",
|
|
71
|
+
"clean": "rm -rf dist",
|
|
72
|
+
"prepublishOnly": "npm run clean && npm run build && npm run test",
|
|
73
|
+
"demo": "bash scripts/demo.sh",
|
|
74
|
+
"example:server": "npx tsx examples/node-server/server.ts",
|
|
75
|
+
"example:inspector": "npx @modelcontextprotocol/inspector npx tsx examples/node-server/server.ts --stdio",
|
|
76
|
+
"example:verify-proof": "npx tsx examples/verify-proof/verify.ts",
|
|
77
|
+
"example:anti-mitm": "npx tsx examples/verify-proof/anti-mitm-demo.ts",
|
|
78
|
+
"example:authz-inspector": "npx @modelcontextprotocol/inspector npx tsx examples/authz-inspector/src/stdio.ts",
|
|
79
|
+
"example:authz-inspector:http": "npx tsx examples/authz-inspector/src/inspector-http.ts",
|
|
80
|
+
"example:authz-inspector:http:server": "npx tsx examples/authz-inspector/src/http.ts",
|
|
81
|
+
"example:authz-inspector:stdio:server": "npx tsx examples/authz-inspector/src/stdio.ts"
|
|
82
|
+
},
|
|
60
83
|
"dependencies": {
|
|
61
84
|
"jose": "^5.6.3",
|
|
62
85
|
"json-canonicalize": "^2.0.0",
|
|
@@ -102,19 +125,5 @@
|
|
|
102
125
|
},
|
|
103
126
|
"publishConfig": {
|
|
104
127
|
"access": "public"
|
|
105
|
-
},
|
|
106
|
-
"scripts": {
|
|
107
|
-
"build": "tsc",
|
|
108
|
-
"test": "vitest run",
|
|
109
|
-
"test:watch": "vitest",
|
|
110
|
-
"test:coverage": "vitest run --coverage",
|
|
111
|
-
"typecheck": "tsc --noEmit",
|
|
112
|
-
"lint": "eslint src --ext .ts",
|
|
113
|
-
"clean": "rm -rf dist",
|
|
114
|
-
"demo": "bash scripts/demo.sh",
|
|
115
|
-
"example:server": "npx tsx examples/node-server/server.ts",
|
|
116
|
-
"example:inspector": "npx @modelcontextprotocol/inspector npx tsx examples/node-server/server.ts --stdio",
|
|
117
|
-
"example:verify-proof": "npx tsx examples/verify-proof/verify.ts",
|
|
118
|
-
"example:anti-mitm": "npx tsx examples/verify-proof/anti-mitm-demo.ts"
|
|
119
128
|
}
|
|
120
|
-
}
|
|
129
|
+
}
|
package/schemas/README.md
CHANGED
|
@@ -67,7 +67,7 @@ except ValidationError as e:
|
|
|
67
67
|
All schemas use JSON Schema draft 2020-12 and are published at:
|
|
68
68
|
|
|
69
69
|
```
|
|
70
|
-
https://schema.kya-os.
|
|
70
|
+
https://schema.kya-os.org/v1/protocol/{family}/{resource}/v1.0.0
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
Schemas can reference each other using `$ref`. For example, the delegation credential schema references shared definitions for constraints and proof structures.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://schema.kya-os.
|
|
3
|
+
"$id": "https://schema.kya-os.org/v1/protocol/delegation/credential/v1.0.0",
|
|
4
4
|
"title": "KYA-OS Delegation Credential",
|
|
5
5
|
"description": "W3C Verifiable Credential containing a KYA-OS delegation with CRISP constraints.",
|
|
6
6
|
"type": "object",
|
|
@@ -286,7 +286,7 @@
|
|
|
286
286
|
{
|
|
287
287
|
"@context": [
|
|
288
288
|
"https://www.w3.org/2018/credentials/v1",
|
|
289
|
-
"https://schema.kya-os.
|
|
289
|
+
"https://schema.kya-os.org/v1/protocol/delegation/context/v1.0.0"
|
|
290
290
|
],
|
|
291
291
|
"id": "urn:uuid:12345678-1234-1234-1234-123456789abc",
|
|
292
292
|
"type": ["VerifiableCredential", "DelegationCredential"],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://schema.kya-os.
|
|
3
|
+
"$id": "https://schema.kya-os.org/v1/protocol/proof/detached/v1.0.0",
|
|
4
4
|
"title": "KYA-OS Detached Proof",
|
|
5
5
|
"description": "Cryptographic proof binding an MCP tool request/response pair to an agent's identity and session context.",
|
|
6
6
|
"type": "object",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://schema.kya-os.
|
|
3
|
+
"$id": "https://schema.kya-os.org/v1/protocol/handshake/request/v1.0.0",
|
|
4
4
|
"title": "KYA-OS Handshake Request",
|
|
5
5
|
"description": "Client-initiated handshake request to establish a KYA-OS session with nonce-based replay protection.",
|
|
6
6
|
"type": "object",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://schema.kya-os.
|
|
3
|
+
"$id": "https://schema.kya-os.org/v1/protocol/handshake/response/v1.0.0",
|
|
4
4
|
"title": "KYA-OS Handshake Response",
|
|
5
5
|
"description": "Server response to a successful handshake request, establishing session context.",
|
|
6
6
|
"type": "object",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://schema.kya-os.
|
|
3
|
+
"$id": "https://schema.kya-os.org/v1/protocol/well-known/v1.0.0",
|
|
4
4
|
"title": "KYA-OS Discovery Document",
|
|
5
5
|
"description": "Well-known discovery document served at /.well-known/mcp for KYA-OS service discovery.",
|
|
6
6
|
"type": "object",
|