@kya-os/mcp-i 1.6.9 → 1.6.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.
- package/dist/runtime/auth-handshake.d.ts +12 -0
- package/dist/runtime/auth-handshake.js +1 -0
- package/dist/runtime/delegation-verifier-agentshield.js +2 -0
- package/dist/runtime/delegation-verifier.d.ts +12 -0
- package/dist/runtime/http.js +3 -3
- package/dist/runtime/stdio.js +1 -1
- package/dist/runtime/tool-protection.d.ts +6 -0
- package/dist/runtime/utils/tools.js +55 -0
- package/package.json +3 -3
|
@@ -71,6 +71,18 @@ export interface VerifyOrHintsResult {
|
|
|
71
71
|
authorized: boolean;
|
|
72
72
|
/** Delegation record (if authorized) */
|
|
73
73
|
delegation?: DelegationRecord;
|
|
74
|
+
/** Credential from AgentShield API (includes authorization method) */
|
|
75
|
+
credential?: {
|
|
76
|
+
agent_did: string;
|
|
77
|
+
user_did: string;
|
|
78
|
+
scopes: string[];
|
|
79
|
+
authorization: {
|
|
80
|
+
type: 'oauth' | 'credential' | 'none';
|
|
81
|
+
provider?: string;
|
|
82
|
+
credentialType?: string;
|
|
83
|
+
};
|
|
84
|
+
[key: string]: unknown;
|
|
85
|
+
};
|
|
74
86
|
/** needs_authorization error (if not authorized) */
|
|
75
87
|
authError?: NeedsAuthorizationError;
|
|
76
88
|
/** Agent reputation data (if available) */
|
|
@@ -136,6 +136,7 @@ async function verifyOrHints(agentDid, scopes, config, _resumeToken) {
|
|
|
136
136
|
return {
|
|
137
137
|
authorized: true,
|
|
138
138
|
delegation: delegationResult.delegation,
|
|
139
|
+
credential: delegationResult.credential, // Include credential for auth method validation
|
|
139
140
|
reputation,
|
|
140
141
|
reason: 'Valid delegation found',
|
|
141
142
|
};
|
|
@@ -144,6 +144,8 @@ class AgentShieldAPIDelegationVerifier {
|
|
|
144
144
|
const result = {
|
|
145
145
|
valid: data.valid,
|
|
146
146
|
delegation: data.delegation,
|
|
147
|
+
// Include credential for authorization method validation
|
|
148
|
+
credential: data.credential,
|
|
147
149
|
reason: data.error ? data.error.message : data.reason,
|
|
148
150
|
cached: false,
|
|
149
151
|
};
|
|
@@ -21,6 +21,18 @@ export interface VerifyDelegationResult {
|
|
|
21
21
|
valid: boolean;
|
|
22
22
|
/** The delegation record (if found) */
|
|
23
23
|
delegation?: DelegationRecord;
|
|
24
|
+
/** Credential from AgentShield API (includes authorization method) */
|
|
25
|
+
credential?: {
|
|
26
|
+
agent_did: string;
|
|
27
|
+
user_did: string;
|
|
28
|
+
scopes: string[];
|
|
29
|
+
authorization: {
|
|
30
|
+
type: 'oauth' | 'credential' | 'none';
|
|
31
|
+
provider?: string;
|
|
32
|
+
credentialType?: string;
|
|
33
|
+
};
|
|
34
|
+
[key: string]: unknown;
|
|
35
|
+
};
|
|
24
36
|
/** Reason for invalid result */
|
|
25
37
|
reason?: string;
|
|
26
38
|
/** Whether result came from cache */
|