@kya-os/checkpoint-shared 1.2.0 → 1.3.0
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/README.md +1 -1
- package/dist/beacon-types/index.d.mts +10 -1
- package/dist/beacon-types/index.d.ts +10 -1
- package/dist/beacon-types/index.js +20 -1
- package/dist/beacon-types/index.mjs +20 -2
- package/dist/browser.d.mts +6 -1
- package/dist/browser.d.ts +6 -1
- package/dist/browser.js +1 -1
- package/dist/browser.mjs +1 -1
- package/dist/canonical-signer/index.js +31 -2
- package/dist/canonical-signer/index.mjs +31 -2
- package/dist/deploy/index.d.mts +827 -0
- package/dist/deploy/index.d.ts +827 -0
- package/dist/deploy/index.js +458 -0
- package/dist/deploy/index.mjs +433 -0
- package/dist/gateway/index.d.mts +575 -0
- package/dist/gateway/index.d.ts +575 -0
- package/dist/gateway/index.js +98 -0
- package/dist/gateway/index.mjs +88 -0
- package/dist/index.d.mts +3071 -871
- package/dist/index.d.ts +3071 -871
- package/dist/index.js +3344 -1308
- package/dist/index.mjs +4593 -2667
- package/dist/mcpi/agentshield-api/index.d.mts +47 -0
- package/dist/mcpi/agentshield-api/index.d.ts +47 -0
- package/dist/mcpi/agentshield-api/index.js +2 -0
- package/dist/mcpi/agentshield-api/index.mjs +1 -0
- package/dist/mcpi/approval-grant/index.d.mts +79 -0
- package/dist/mcpi/approval-grant/index.d.ts +79 -0
- package/dist/mcpi/approval-grant/index.js +157 -0
- package/dist/mcpi/approval-grant/index.mjs +150 -0
- package/dist/mcpi/dashboard-config/index.d.mts +14075 -0
- package/dist/mcpi/dashboard-config/index.d.ts +14075 -0
- package/dist/mcpi/dashboard-config/index.js +517 -0
- package/dist/mcpi/dashboard-config/index.mjs +492 -0
- package/dist/mcpi/multibase-ed25519.d.mts +8 -0
- package/dist/mcpi/multibase-ed25519.d.ts +8 -0
- package/dist/mcpi/multibase-ed25519.js +125 -0
- package/dist/mcpi/multibase-ed25519.mjs +119 -0
- package/dist/signals/index.d.mts +158 -0
- package/dist/signals/index.d.ts +158 -0
- package/dist/signals/index.js +1574 -0
- package/dist/signals/index.mjs +1544 -0
- package/dist/test-fixtures/index.d.mts +53 -8
- package/dist/test-fixtures/index.d.ts +53 -8
- package/dist/test-fixtures/index.js +164 -7
- package/dist/test-fixtures/index.mjs +158 -8
- package/dist/tool-protection/index.d.mts +1120 -0
- package/dist/tool-protection/index.d.ts +1120 -0
- package/dist/tool-protection/index.js +370 -0
- package/dist/tool-protection/index.mjs +338 -0
- package/package.json +54 -8
- package/src/data/compiled/merged-rules.json +8 -2
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
// src/tool-protection/index.ts
|
|
4
|
+
var ENV_VAR_PATTERN = /^[A-Z][A-Z0-9_]*$/;
|
|
5
|
+
var envVarNameSchema = z.string().regex(ENV_VAR_PATTERN, "Must be a valid env var name (e.g., X_API_KEY)").max(255);
|
|
6
|
+
var AUTHORIZATION_TYPES = {
|
|
7
|
+
/** @deprecated Use OAUTH2 instead. Will be removed in v2.0.0. */
|
|
8
|
+
OAUTH: "oauth",
|
|
9
|
+
/** OAuth 2.0 provider authentication (canonical) */
|
|
10
|
+
OAUTH2: "oauth2",
|
|
11
|
+
PASSWORD: "password",
|
|
12
|
+
MDL: "mdl",
|
|
13
|
+
IDV: "idv",
|
|
14
|
+
VERIFIABLE_CREDENTIAL: "verifiable_credential",
|
|
15
|
+
/** WebAuthn/Passkey authentication */
|
|
16
|
+
WEBAUTHN: "webauthn",
|
|
17
|
+
/** Sign-In with Ethereum (EIP-4361) */
|
|
18
|
+
SIWE: "siwe",
|
|
19
|
+
/** API Key from per-user vault */
|
|
20
|
+
APIKEY: "apikey",
|
|
21
|
+
NONE: "none"
|
|
22
|
+
};
|
|
23
|
+
var AuthRequiredErrorDataSchema = z.object({
|
|
24
|
+
error: z.literal("auth_required"),
|
|
25
|
+
type: z.enum(["apikey", "oauth", "credential"]),
|
|
26
|
+
envVarNames: z.array(z.string()).optional(),
|
|
27
|
+
configUrl: z.string(),
|
|
28
|
+
message: z.string()
|
|
29
|
+
});
|
|
30
|
+
var AuthRequiredError = class extends Error {
|
|
31
|
+
type;
|
|
32
|
+
envVarNames;
|
|
33
|
+
configUrl;
|
|
34
|
+
constructor(opts) {
|
|
35
|
+
const message = opts.message ?? (opts.type === "apikey" && opts.envVarNames?.length ? `API key required: configure ${opts.envVarNames.join(", ")} in your project settings.` : "Authentication required to use this tool.");
|
|
36
|
+
super(message);
|
|
37
|
+
this.name = "AuthRequiredError";
|
|
38
|
+
this.type = opts.type;
|
|
39
|
+
this.envVarNames = opts.envVarNames;
|
|
40
|
+
this.configUrl = opts.configUrl;
|
|
41
|
+
}
|
|
42
|
+
/** Serialize to the wire format MCP clients expect */
|
|
43
|
+
toJSON() {
|
|
44
|
+
return {
|
|
45
|
+
error: "auth_required",
|
|
46
|
+
type: this.type,
|
|
47
|
+
...this.envVarNames && { envVarNames: this.envVarNames },
|
|
48
|
+
configUrl: this.configUrl,
|
|
49
|
+
message: this.message
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
var AuthorizationRequirementSchema = z.discriminatedUnion("type", [
|
|
54
|
+
// Deprecated: 'oauth' is an alias for 'oauth2'
|
|
55
|
+
// Will be removed in v2.0.0. Use 'oauth2' instead.
|
|
56
|
+
z.object({
|
|
57
|
+
type: z.literal("oauth"),
|
|
58
|
+
provider: z.string(),
|
|
59
|
+
requiredScopes: z.array(z.string()).optional()
|
|
60
|
+
}),
|
|
61
|
+
// OAuth 2.0 provider authentication (canonical)
|
|
62
|
+
z.object({
|
|
63
|
+
type: z.literal("oauth2"),
|
|
64
|
+
provider: z.string(),
|
|
65
|
+
requiredScopes: z.array(z.string()).optional()
|
|
66
|
+
}),
|
|
67
|
+
z.object({
|
|
68
|
+
type: z.literal("password"),
|
|
69
|
+
provider: z.string()
|
|
70
|
+
}),
|
|
71
|
+
z.object({
|
|
72
|
+
type: z.literal("mdl"),
|
|
73
|
+
issuer: z.string(),
|
|
74
|
+
credentialType: z.string().optional()
|
|
75
|
+
}),
|
|
76
|
+
z.object({
|
|
77
|
+
type: z.literal("idv"),
|
|
78
|
+
provider: z.string(),
|
|
79
|
+
verificationLevel: z.enum(["basic", "enhanced", "loa3"]).optional()
|
|
80
|
+
}),
|
|
81
|
+
z.object({
|
|
82
|
+
type: z.literal("verifiable_credential"),
|
|
83
|
+
credentialType: z.string(),
|
|
84
|
+
issuer: z.string().optional()
|
|
85
|
+
}),
|
|
86
|
+
// Deprecated: 'credential' is an alias for 'verifiable_credential'
|
|
87
|
+
// Will be removed in v2.0.0. Use 'verifiable_credential' instead.
|
|
88
|
+
z.object({
|
|
89
|
+
type: z.literal("credential"),
|
|
90
|
+
credentialType: z.string(),
|
|
91
|
+
issuer: z.string().optional()
|
|
92
|
+
}),
|
|
93
|
+
// WebAuthn/Passkey authentication
|
|
94
|
+
z.object({
|
|
95
|
+
type: z.literal("webauthn"),
|
|
96
|
+
rpId: z.string().optional(),
|
|
97
|
+
userVerification: z.enum(["required", "preferred", "discouraged"]).optional()
|
|
98
|
+
}),
|
|
99
|
+
// Sign-In with Ethereum (EIP-4361)
|
|
100
|
+
z.object({
|
|
101
|
+
type: z.literal("siwe"),
|
|
102
|
+
chainId: z.number().optional(),
|
|
103
|
+
domain: z.string().optional()
|
|
104
|
+
}),
|
|
105
|
+
// API Key from per-user vault
|
|
106
|
+
z.object({
|
|
107
|
+
type: z.literal("apikey"),
|
|
108
|
+
envVarNames: z.array(envVarNameSchema).min(1),
|
|
109
|
+
headerMapping: z.record(z.string(), z.string())
|
|
110
|
+
}),
|
|
111
|
+
z.object({
|
|
112
|
+
type: z.literal("none")
|
|
113
|
+
})
|
|
114
|
+
]);
|
|
115
|
+
var ToolProtectionSchema = z.object({
|
|
116
|
+
requiresDelegation: z.boolean(),
|
|
117
|
+
requiredScopes: z.array(z.string()),
|
|
118
|
+
riskLevel: z.enum(["low", "medium", "high", "critical"]).optional(),
|
|
119
|
+
oauthProvider: z.string().optional(),
|
|
120
|
+
// Phase 2: Tool-specific OAuth provider
|
|
121
|
+
authorization: AuthorizationRequirementSchema.optional()
|
|
122
|
+
});
|
|
123
|
+
var ToolProtectionMapSchema = z.record(z.string(), ToolProtectionSchema);
|
|
124
|
+
var ToolProtectionResponseSchema = z.object({
|
|
125
|
+
toolProtections: ToolProtectionMapSchema,
|
|
126
|
+
metadata: z.object({
|
|
127
|
+
lastUpdated: z.string().optional(),
|
|
128
|
+
version: z.string().optional(),
|
|
129
|
+
source: z.string().optional()
|
|
130
|
+
}).optional()
|
|
131
|
+
});
|
|
132
|
+
var DelegationRequiredErrorDataSchema = z.object({
|
|
133
|
+
toolName: z.string(),
|
|
134
|
+
requiredScopes: z.array(z.string()),
|
|
135
|
+
consentUrl: z.string().optional(),
|
|
136
|
+
authorizationUrl: z.string().optional(),
|
|
137
|
+
reason: z.string().optional()
|
|
138
|
+
});
|
|
139
|
+
function isToolProtection(obj) {
|
|
140
|
+
return ToolProtectionSchema.safeParse(obj).success;
|
|
141
|
+
}
|
|
142
|
+
function isToolProtectionMap(obj) {
|
|
143
|
+
return ToolProtectionMapSchema.safeParse(obj).success;
|
|
144
|
+
}
|
|
145
|
+
function isToolProtectionResponse(obj) {
|
|
146
|
+
return ToolProtectionResponseSchema.safeParse(obj).success;
|
|
147
|
+
}
|
|
148
|
+
function isDelegationRequiredErrorData(obj) {
|
|
149
|
+
return DelegationRequiredErrorDataSchema.safeParse(obj).success;
|
|
150
|
+
}
|
|
151
|
+
function isAuthorizationRequirement(obj) {
|
|
152
|
+
return AuthorizationRequirementSchema.safeParse(obj).success;
|
|
153
|
+
}
|
|
154
|
+
function hasOAuthAuthorization(protection) {
|
|
155
|
+
return protection.authorization?.type === "oauth" || protection.authorization?.type === "oauth2";
|
|
156
|
+
}
|
|
157
|
+
function hasPasswordAuthorization(protection) {
|
|
158
|
+
return protection.authorization?.type === "password";
|
|
159
|
+
}
|
|
160
|
+
function hasVerifiableCredentialAuthorization(protection) {
|
|
161
|
+
return protection.authorization?.type === "verifiable_credential" || protection.authorization?.type === "credential";
|
|
162
|
+
}
|
|
163
|
+
function hasApiKeyAuthorization(protection) {
|
|
164
|
+
return protection.authorization?.type === "apikey";
|
|
165
|
+
}
|
|
166
|
+
function validateToolProtection(obj) {
|
|
167
|
+
return ToolProtectionSchema.parse(obj);
|
|
168
|
+
}
|
|
169
|
+
function validateToolProtectionMap(obj) {
|
|
170
|
+
return ToolProtectionMapSchema.parse(obj);
|
|
171
|
+
}
|
|
172
|
+
function validateToolProtectionResponse(obj) {
|
|
173
|
+
return ToolProtectionResponseSchema.parse(obj);
|
|
174
|
+
}
|
|
175
|
+
function validateDelegationRequiredErrorData(obj) {
|
|
176
|
+
return DelegationRequiredErrorDataSchema.parse(obj);
|
|
177
|
+
}
|
|
178
|
+
function toolRequiresDelegation(toolName, protections) {
|
|
179
|
+
const protection = protections[toolName];
|
|
180
|
+
return protection?.requiresDelegation ?? false;
|
|
181
|
+
}
|
|
182
|
+
function getToolRequiredScopes(toolName, protections) {
|
|
183
|
+
const protection = protections[toolName];
|
|
184
|
+
return protection?.requiredScopes ?? [];
|
|
185
|
+
}
|
|
186
|
+
function getToolRiskLevel(toolName, protections) {
|
|
187
|
+
return protections[toolName]?.riskLevel;
|
|
188
|
+
}
|
|
189
|
+
function createDelegationRequiredError(toolName, requiredScopes, consentUrl) {
|
|
190
|
+
return {
|
|
191
|
+
toolName,
|
|
192
|
+
requiredScopes,
|
|
193
|
+
consentUrl,
|
|
194
|
+
authorizationUrl: consentUrl
|
|
195
|
+
// Include both for compatibility
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
function normalizeToolProtection(raw) {
|
|
199
|
+
const normalized = {
|
|
200
|
+
requiresDelegation: raw.requiresDelegation ?? false,
|
|
201
|
+
requiredScopes: raw.requiredScopes ?? [],
|
|
202
|
+
...raw.riskLevel && { riskLevel: raw.riskLevel },
|
|
203
|
+
...raw.oauthProvider && { oauthProvider: raw.oauthProvider }
|
|
204
|
+
};
|
|
205
|
+
if (raw.authorization) {
|
|
206
|
+
normalized.authorization = raw.authorization;
|
|
207
|
+
return normalized;
|
|
208
|
+
}
|
|
209
|
+
if (raw.oauthProvider) {
|
|
210
|
+
normalized.authorization = {
|
|
211
|
+
type: "oauth",
|
|
212
|
+
provider: raw.oauthProvider
|
|
213
|
+
};
|
|
214
|
+
return normalized;
|
|
215
|
+
}
|
|
216
|
+
if (normalized.requiresDelegation && !normalized.authorization && !normalized.oauthProvider) {
|
|
217
|
+
return normalized;
|
|
218
|
+
}
|
|
219
|
+
return normalized;
|
|
220
|
+
}
|
|
221
|
+
var CONSENT_PROVIDER_TYPES = {
|
|
222
|
+
/** Consent-only mode - no authentication, just clickwrap agreement */
|
|
223
|
+
NONE: "none",
|
|
224
|
+
/** OAuth2 provider authentication */
|
|
225
|
+
OAUTH2: "oauth2",
|
|
226
|
+
/** Password-based authentication (email/password, username/password) */
|
|
227
|
+
PASSWORD: "password",
|
|
228
|
+
/** @deprecated Use PASSWORD instead. Alias for backward compatibility */
|
|
229
|
+
CREDENTIAL: "credential",
|
|
230
|
+
/** Email magic link authentication */
|
|
231
|
+
MAGIC_LINK: "magic_link",
|
|
232
|
+
/** One-time password (SMS/email code) */
|
|
233
|
+
OTP: "otp"
|
|
234
|
+
};
|
|
235
|
+
function determineConsentProviderType(hasOAuthIdentity, isPasswordFlow = false, isMagicLinkFlow = false, isOtpFlow = false) {
|
|
236
|
+
if (isPasswordFlow) {
|
|
237
|
+
return CONSENT_PROVIDER_TYPES.PASSWORD;
|
|
238
|
+
}
|
|
239
|
+
if (isMagicLinkFlow) {
|
|
240
|
+
return CONSENT_PROVIDER_TYPES.MAGIC_LINK;
|
|
241
|
+
}
|
|
242
|
+
if (isOtpFlow) {
|
|
243
|
+
return CONSENT_PROVIDER_TYPES.OTP;
|
|
244
|
+
}
|
|
245
|
+
if (hasOAuthIdentity) {
|
|
246
|
+
return CONSENT_PROVIDER_TYPES.OAUTH2;
|
|
247
|
+
}
|
|
248
|
+
return CONSENT_PROVIDER_TYPES.NONE;
|
|
249
|
+
}
|
|
250
|
+
function getAuthorizationTypeLabel(auth) {
|
|
251
|
+
switch (auth.type) {
|
|
252
|
+
case "oauth":
|
|
253
|
+
case "oauth2":
|
|
254
|
+
return auth.provider ? auth.provider.charAt(0).toUpperCase() + auth.provider.slice(1) : "OAuth Provider";
|
|
255
|
+
case "password":
|
|
256
|
+
return "Password Authentication";
|
|
257
|
+
case "mdl":
|
|
258
|
+
return "Mobile Driver's License";
|
|
259
|
+
case "idv":
|
|
260
|
+
return "Identity Verification";
|
|
261
|
+
case "verifiable_credential":
|
|
262
|
+
return auth.credentialType || "Verifiable Credential";
|
|
263
|
+
case "credential":
|
|
264
|
+
return auth.credentialType || "Verifiable Credential";
|
|
265
|
+
case "webauthn":
|
|
266
|
+
return "Passkey / WebAuthn";
|
|
267
|
+
case "siwe":
|
|
268
|
+
return "Sign-In with Ethereum";
|
|
269
|
+
case "apikey":
|
|
270
|
+
return "API Key (Vault)";
|
|
271
|
+
case "none":
|
|
272
|
+
return "Consent Only";
|
|
273
|
+
default: {
|
|
274
|
+
return "Unknown";
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
function getAuthorizationTypeKey(auth) {
|
|
279
|
+
switch (auth.type) {
|
|
280
|
+
case "oauth":
|
|
281
|
+
return auth.provider ? `oauth:${auth.provider}` : "oauth";
|
|
282
|
+
case "oauth2":
|
|
283
|
+
return auth.provider ? `oauth2:${auth.provider}` : "oauth2";
|
|
284
|
+
case "password":
|
|
285
|
+
return auth.provider ? `password:${auth.provider}` : "password";
|
|
286
|
+
case "mdl":
|
|
287
|
+
return `mdl:${auth.issuer || "unknown"}:${auth.credentialType || ""}`;
|
|
288
|
+
case "idv":
|
|
289
|
+
return `idv:${auth.provider || "unknown"}:${auth.verificationLevel || ""}`;
|
|
290
|
+
case "verifiable_credential":
|
|
291
|
+
return `vc:${auth.issuer || "any"}:${auth.credentialType || "unknown"}`;
|
|
292
|
+
case "credential":
|
|
293
|
+
return `vc:${auth.issuer || "any"}:${auth.credentialType || "unknown"}`;
|
|
294
|
+
case "webauthn":
|
|
295
|
+
return `webauthn:${auth.rpId || "default"}`;
|
|
296
|
+
case "siwe":
|
|
297
|
+
return `siwe:${auth.chainId || 1}:${auth.domain || "any"}`;
|
|
298
|
+
case "apikey":
|
|
299
|
+
return `apikey:${[...auth.envVarNames].sort().join(",")}`;
|
|
300
|
+
case "none":
|
|
301
|
+
return "none";
|
|
302
|
+
default: {
|
|
303
|
+
return "unknown";
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
function normalizeAuthorizationType(auth, options = {}) {
|
|
308
|
+
const { warn = true, logger = console.warn } = options;
|
|
309
|
+
if (auth.type === "oauth") {
|
|
310
|
+
if (warn) {
|
|
311
|
+
logger(
|
|
312
|
+
`DEPRECATION: Authorization type 'oauth' is deprecated and will be removed in v2.0.0. Please update to 'oauth2'. See https://github.com/modelcontextprotocol-identity/xmcp-i/blob/main/docs/migrations/oauth-to-oauth2.md`
|
|
313
|
+
);
|
|
314
|
+
}
|
|
315
|
+
const normalized = {
|
|
316
|
+
type: "oauth2",
|
|
317
|
+
provider: auth.provider,
|
|
318
|
+
...auth.requiredScopes !== void 0 && { requiredScopes: auth.requiredScopes }
|
|
319
|
+
};
|
|
320
|
+
return normalized;
|
|
321
|
+
}
|
|
322
|
+
if (auth.type === "credential") {
|
|
323
|
+
if (warn) {
|
|
324
|
+
logger(
|
|
325
|
+
`DEPRECATION: Authorization type 'credential' is deprecated and will be removed in v2.0.0. Please update to 'verifiable_credential'. See https://github.com/modelcontextprotocol-identity/xmcp-i/blob/main/docs/migrations/credential-to-verifiable_credential.md`
|
|
326
|
+
);
|
|
327
|
+
}
|
|
328
|
+
const normalized = {
|
|
329
|
+
type: "verifiable_credential",
|
|
330
|
+
credentialType: auth.credentialType,
|
|
331
|
+
...auth.issuer !== void 0 && { issuer: auth.issuer }
|
|
332
|
+
};
|
|
333
|
+
return normalized;
|
|
334
|
+
}
|
|
335
|
+
return auth;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export { AUTHORIZATION_TYPES, AuthRequiredError, AuthRequiredErrorDataSchema, AuthorizationRequirementSchema, CONSENT_PROVIDER_TYPES, DelegationRequiredErrorDataSchema, ToolProtectionMapSchema, ToolProtectionResponseSchema, ToolProtectionSchema, createDelegationRequiredError, determineConsentProviderType, getAuthorizationTypeKey, getAuthorizationTypeLabel, getToolRequiredScopes, getToolRiskLevel, hasApiKeyAuthorization, hasOAuthAuthorization, hasPasswordAuthorization, hasVerifiableCredentialAuthorization, isAuthorizationRequirement, isDelegationRequiredErrorData, isToolProtection, isToolProtectionMap, isToolProtectionResponse, normalizeAuthorizationType, normalizeToolProtection, toolRequiresDelegation, validateDelegationRequiredErrorData, validateToolProtection, validateToolProtectionMap, validateToolProtectionResponse };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kya-os/checkpoint-shared",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Checkpoint shared types and schemas (formerly @kya-os/agentshield-shared)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
],
|
|
13
13
|
"license": "MIT OR Apache-2.0",
|
|
14
14
|
"author": "KnowThat.ai",
|
|
15
|
-
"homepage": "https://github.com/Know-That-Ai/
|
|
15
|
+
"homepage": "https://github.com/Know-That-Ai/checkpoint#readme",
|
|
16
16
|
"repository": {
|
|
17
17
|
"type": "git",
|
|
18
|
-
"url": "https://github.com/Know-That-Ai/
|
|
18
|
+
"url": "https://github.com/Know-That-Ai/checkpoint.git",
|
|
19
19
|
"directory": "packages/checkpoint-shared"
|
|
20
20
|
},
|
|
21
21
|
"bugs": {
|
|
22
|
-
"url": "https://github.com/Know-That-Ai/
|
|
22
|
+
"url": "https://github.com/Know-That-Ai/checkpoint/issues"
|
|
23
23
|
},
|
|
24
24
|
"main": "./dist/index.js",
|
|
25
25
|
"module": "./dist/index.mjs",
|
|
@@ -50,11 +50,51 @@
|
|
|
50
50
|
"import": "./dist/canonical-signer/index.mjs",
|
|
51
51
|
"require": "./dist/canonical-signer/index.js"
|
|
52
52
|
},
|
|
53
|
+
"./mcpi/approval-grant": {
|
|
54
|
+
"types": "./dist/mcpi/approval-grant/index.d.ts",
|
|
55
|
+
"import": "./dist/mcpi/approval-grant/index.mjs",
|
|
56
|
+
"require": "./dist/mcpi/approval-grant/index.js"
|
|
57
|
+
},
|
|
58
|
+
"./mcpi/multibase-ed25519": {
|
|
59
|
+
"types": "./dist/mcpi/multibase-ed25519.d.ts",
|
|
60
|
+
"import": "./dist/mcpi/multibase-ed25519.mjs",
|
|
61
|
+
"require": "./dist/mcpi/multibase-ed25519.js"
|
|
62
|
+
},
|
|
53
63
|
"./beacon-types": {
|
|
54
64
|
"types": "./dist/beacon-types/index.d.ts",
|
|
55
65
|
"import": "./dist/beacon-types/index.mjs",
|
|
56
66
|
"require": "./dist/beacon-types/index.js"
|
|
57
67
|
},
|
|
68
|
+
"./tool-protection": {
|
|
69
|
+
"types": "./dist/tool-protection/index.d.ts",
|
|
70
|
+
"import": "./dist/tool-protection/index.mjs",
|
|
71
|
+
"require": "./dist/tool-protection/index.js"
|
|
72
|
+
},
|
|
73
|
+
"./dashboard-config": {
|
|
74
|
+
"types": "./dist/mcpi/dashboard-config/index.d.ts",
|
|
75
|
+
"import": "./dist/mcpi/dashboard-config/index.mjs",
|
|
76
|
+
"require": "./dist/mcpi/dashboard-config/index.js"
|
|
77
|
+
},
|
|
78
|
+
"./agentshield-api": {
|
|
79
|
+
"types": "./dist/mcpi/agentshield-api/index.d.ts",
|
|
80
|
+
"import": "./dist/mcpi/agentshield-api/index.mjs",
|
|
81
|
+
"require": "./dist/mcpi/agentshield-api/index.js"
|
|
82
|
+
},
|
|
83
|
+
"./gateway": {
|
|
84
|
+
"types": "./dist/gateway/index.d.ts",
|
|
85
|
+
"import": "./dist/gateway/index.mjs",
|
|
86
|
+
"require": "./dist/gateway/index.js"
|
|
87
|
+
},
|
|
88
|
+
"./deploy": {
|
|
89
|
+
"types": "./dist/deploy/index.d.ts",
|
|
90
|
+
"import": "./dist/deploy/index.mjs",
|
|
91
|
+
"require": "./dist/deploy/index.js"
|
|
92
|
+
},
|
|
93
|
+
"./signals": {
|
|
94
|
+
"types": "./dist/signals/index.d.ts",
|
|
95
|
+
"import": "./dist/signals/index.mjs",
|
|
96
|
+
"require": "./dist/signals/index.js"
|
|
97
|
+
},
|
|
58
98
|
"./package.json": "./package.json"
|
|
59
99
|
},
|
|
60
100
|
"files": [
|
|
@@ -70,20 +110,21 @@
|
|
|
70
110
|
"dependencies": {
|
|
71
111
|
"@kya-os/provider-registry": "^0.1.7",
|
|
72
112
|
"@noble/ed25519": "^2.2.3",
|
|
113
|
+
"@noble/hashes": "^2.0.1",
|
|
73
114
|
"canonicalize": "^3.0.0",
|
|
74
|
-
"
|
|
75
|
-
"
|
|
115
|
+
"jose": "^5.10.0",
|
|
116
|
+
"js-yaml": "^5.0.0",
|
|
76
117
|
"zod": "^3.22.4"
|
|
77
118
|
},
|
|
78
119
|
"devDependencies": {
|
|
79
120
|
"@types/js-yaml": "^4.0.9",
|
|
80
121
|
"@types/node": "^20.11.24",
|
|
81
|
-
"@vitest/coverage-v8": "^
|
|
122
|
+
"@vitest/coverage-v8": "^3.2.6",
|
|
82
123
|
"rimraf": "^5.0.5",
|
|
83
124
|
"tsup": "^8.0.2",
|
|
84
125
|
"tsx": "^4.7.0",
|
|
85
126
|
"typescript": "^5.4.2",
|
|
86
|
-
"vitest": "^
|
|
127
|
+
"vitest": "^3.2.6",
|
|
87
128
|
"@kya-os/checkpoint-rules": "0.1.0"
|
|
88
129
|
},
|
|
89
130
|
"publishConfig": {
|
|
@@ -94,11 +135,16 @@
|
|
|
94
135
|
"compile-rules": "node ../../scripts/compile-rules.js",
|
|
95
136
|
"build:patterns": "tsx scripts/build-patterns-json.ts",
|
|
96
137
|
"build-wasm": "cd ../../ && ./scripts/build-detection-engine.sh",
|
|
138
|
+
"signals:snapshot": "tsx scripts/signal-registry-snapshot.ts",
|
|
139
|
+
"signals:snapshot:write": "tsx scripts/signal-registry-snapshot.ts --write",
|
|
140
|
+
"signals:docs": "tsx scripts/generate-signal-docs.ts",
|
|
141
|
+
"errors:docs": "tsx scripts/generate-error-docs.ts",
|
|
97
142
|
"build": "rimraf dist && pnpm run compile-rules && pnpm run build:patterns && tsup",
|
|
98
143
|
"build:watch": "tsup --watch",
|
|
99
144
|
"dev": "tsup --watch",
|
|
100
145
|
"clean": "rimraf dist .tsbuildinfo",
|
|
101
146
|
"test": "vitest run",
|
|
147
|
+
"test:unit": "vitest run",
|
|
102
148
|
"test:watch": "vitest",
|
|
103
149
|
"test:coverage": "vitest run --coverage",
|
|
104
150
|
"type-check": "tsc --noEmit",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"lastUpdated": "2025-01-10T00:00:00Z"
|
|
68
68
|
}
|
|
69
69
|
],
|
|
70
|
-
"hash": "
|
|
70
|
+
"hash": "01eccdc0313dec99ffa8128c3e4c20818a9e58cfb0c0b41f428d0be5b4dbe5bf"
|
|
71
71
|
},
|
|
72
72
|
"rules": {
|
|
73
73
|
"userAgents": {
|
|
@@ -342,9 +342,15 @@
|
|
|
342
342
|
"description": "Perplexity AI assistant (Perplexity-User, Perplexity/N, Comet browser)",
|
|
343
343
|
"category": "ai_assistant"
|
|
344
344
|
},
|
|
345
|
+
"amazon_quick_crawler": {
|
|
346
|
+
"patterns": ["Amazon-Quick", "aws-quick"],
|
|
347
|
+
"confidence": 0.95,
|
|
348
|
+
"category": "scraper",
|
|
349
|
+
"description": "Amazon Quick web crawler (formerly Amazon Q)"
|
|
350
|
+
},
|
|
345
351
|
"amazon_q": {
|
|
346
352
|
"patterns": ["NovaAct", "Amazon-Q"],
|
|
347
|
-
"confidence": 0.
|
|
353
|
+
"confidence": 0.85,
|
|
348
354
|
"description": "Amazon Q AI assistant",
|
|
349
355
|
"category": "ai_assistant"
|
|
350
356
|
},
|