@kya-os/contracts 1.5.2-canary.3 → 1.5.2-canary.5
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/agentshield-api/endpoints.d.ts +0 -1
- package/dist/agentshield-api/endpoints.js +0 -1
- package/dist/agentshield-api/index.d.ts +1 -1
- package/dist/agentshield-api/schemas.d.ts +250 -85
- package/dist/agentshield-api/schemas.js +41 -8
- package/dist/agentshield-api/types.d.ts +46 -9
- package/dist/config/builder.d.ts +0 -1
- package/dist/config/identity.d.ts +0 -1
- package/dist/config/identity.js +0 -1
- package/dist/config/index.d.ts +0 -1
- package/dist/config/index.js +0 -1
- package/dist/consent/schemas.d.ts +70 -70
- package/dist/dashboard-config/default-config.d.ts +0 -1
- package/dist/dashboard-config/default-config.js +0 -1
- package/dist/dashboard-config/index.d.ts +0 -1
- package/dist/dashboard-config/index.js +0 -1
- package/dist/dashboard-config/schemas.d.ts +564 -565
- package/dist/dashboard-config/schemas.js +0 -1
- package/dist/dashboard-config/types.d.ts +0 -1
- package/dist/dashboard-config/types.js +0 -1
- package/dist/delegation/constraints.d.ts +0 -1
- package/dist/delegation/constraints.js +0 -1
- package/dist/delegation/index.js +0 -1
- package/dist/delegation/schemas.d.ts +98 -99
- package/dist/delegation/schemas.js +0 -1
- package/dist/handshake.d.ts +9 -4
- package/dist/proof/index.d.ts +3 -2
- package/dist/proof/index.js +16 -2
- package/dist/proof.d.ts +28 -29
- package/dist/proof.js +0 -1
- package/package.json +5 -5
package/dist/handshake.d.ts
CHANGED
|
@@ -31,11 +31,11 @@ export declare const SessionContextSchema: z.ZodObject<{
|
|
|
31
31
|
clientDid: z.ZodOptional<z.ZodString>;
|
|
32
32
|
userDid: z.ZodOptional<z.ZodString>;
|
|
33
33
|
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
createdAt: number;
|
|
34
35
|
nonce: string;
|
|
35
36
|
audience: string;
|
|
36
37
|
timestamp: number;
|
|
37
38
|
sessionId: string;
|
|
38
|
-
createdAt: number;
|
|
39
39
|
lastActivity: number;
|
|
40
40
|
ttlMinutes: number;
|
|
41
41
|
agentDid?: string | undefined;
|
|
@@ -43,11 +43,11 @@ export declare const SessionContextSchema: z.ZodObject<{
|
|
|
43
43
|
clientDid?: string | undefined;
|
|
44
44
|
userDid?: string | undefined;
|
|
45
45
|
}, {
|
|
46
|
+
createdAt: number;
|
|
46
47
|
nonce: string;
|
|
47
48
|
audience: string;
|
|
48
49
|
timestamp: number;
|
|
49
50
|
sessionId: string;
|
|
50
|
-
createdAt: number;
|
|
51
51
|
lastActivity: number;
|
|
52
52
|
agentDid?: string | undefined;
|
|
53
53
|
ttlMinutes?: number | undefined;
|
|
@@ -74,13 +74,18 @@ export type NonceCacheEntry = z.infer<typeof NonceCacheEntrySchema>;
|
|
|
74
74
|
export interface NonceCache {
|
|
75
75
|
/**
|
|
76
76
|
* Check if a nonce exists in the cache
|
|
77
|
+
* @param nonce - The nonce to check
|
|
78
|
+
* @param agentDid - Optional agent DID for agent-scoped nonces (prevents cross-agent replay attacks)
|
|
77
79
|
*/
|
|
78
|
-
has(nonce: string): Promise<boolean>;
|
|
80
|
+
has(nonce: string, agentDid?: string): Promise<boolean>;
|
|
79
81
|
/**
|
|
80
82
|
* Add a nonce to the cache with TTL
|
|
81
83
|
* MUST ensure atomic add-if-absent semantics for replay prevention
|
|
84
|
+
* @param nonce - The nonce to add
|
|
85
|
+
* @param ttl - Time to live in seconds
|
|
86
|
+
* @param agentDid - Optional agent DID for agent-scoped nonces (prevents cross-agent replay attacks)
|
|
82
87
|
*/
|
|
83
|
-
add(nonce: string, ttl: number): Promise<void>;
|
|
88
|
+
add(nonce: string, ttl: number, agentDid?: string): Promise<void>;
|
|
84
89
|
/**
|
|
85
90
|
* Clean up expired entries
|
|
86
91
|
* Should be safe to call frequently and should be no-op for backends that auto-expire
|
package/dist/proof/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Proof Module Exports
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* This module exports all proof-related types including DetachedProof,
|
|
5
|
+
* proof records, and signing specs.
|
|
6
6
|
*/
|
|
7
|
+
export { DetachedProofSchema, ProofMetaSchema, CanonicalHashesSchema, AuditRecordSchema, ToolCallContextSchema, ProofSubmissionContextSchema, ProofSubmissionRequestSchema, JWS_ALGORITHM, HASH_ALGORITHM, AUDIT_VERSION, type DetachedProof, type ProofMeta, type CanonicalHashes, type AuditRecord, type ToolCallContext, type ProofSubmissionContext, type ProofSubmissionRequest, } from '../proof.js';
|
|
7
8
|
export * from './signing-spec.js';
|
|
8
9
|
export * from './proof-record.js';
|
package/dist/proof/index.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Proof Module Exports
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* This module exports all proof-related types including DetachedProof,
|
|
6
|
+
* proof records, and signing specs.
|
|
7
7
|
*/
|
|
8
8
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
9
|
if (k2 === undefined) k2 = k;
|
|
@@ -20,5 +20,19 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
20
20
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.AUDIT_VERSION = exports.HASH_ALGORITHM = exports.JWS_ALGORITHM = exports.ProofSubmissionRequestSchema = exports.ProofSubmissionContextSchema = exports.ToolCallContextSchema = exports.AuditRecordSchema = exports.CanonicalHashesSchema = exports.ProofMetaSchema = exports.DetachedProofSchema = void 0;
|
|
24
|
+
// Export DetachedProof and related schemas from root proof.ts
|
|
25
|
+
var proof_js_1 = require("../proof.js");
|
|
26
|
+
Object.defineProperty(exports, "DetachedProofSchema", { enumerable: true, get: function () { return proof_js_1.DetachedProofSchema; } });
|
|
27
|
+
Object.defineProperty(exports, "ProofMetaSchema", { enumerable: true, get: function () { return proof_js_1.ProofMetaSchema; } });
|
|
28
|
+
Object.defineProperty(exports, "CanonicalHashesSchema", { enumerable: true, get: function () { return proof_js_1.CanonicalHashesSchema; } });
|
|
29
|
+
Object.defineProperty(exports, "AuditRecordSchema", { enumerable: true, get: function () { return proof_js_1.AuditRecordSchema; } });
|
|
30
|
+
Object.defineProperty(exports, "ToolCallContextSchema", { enumerable: true, get: function () { return proof_js_1.ToolCallContextSchema; } });
|
|
31
|
+
Object.defineProperty(exports, "ProofSubmissionContextSchema", { enumerable: true, get: function () { return proof_js_1.ProofSubmissionContextSchema; } });
|
|
32
|
+
Object.defineProperty(exports, "ProofSubmissionRequestSchema", { enumerable: true, get: function () { return proof_js_1.ProofSubmissionRequestSchema; } });
|
|
33
|
+
Object.defineProperty(exports, "JWS_ALGORITHM", { enumerable: true, get: function () { return proof_js_1.JWS_ALGORITHM; } });
|
|
34
|
+
Object.defineProperty(exports, "HASH_ALGORITHM", { enumerable: true, get: function () { return proof_js_1.HASH_ALGORITHM; } });
|
|
35
|
+
Object.defineProperty(exports, "AUDIT_VERSION", { enumerable: true, get: function () { return proof_js_1.AUDIT_VERSION; } });
|
|
36
|
+
// Export proof record and signing spec types
|
|
23
37
|
__exportStar(require("./signing-spec.js"), exports);
|
|
24
38
|
__exportStar(require("./proof-record.js"), exports);
|
package/dist/proof.d.ts
CHANGED
|
@@ -24,27 +24,27 @@ export declare const ProofMetaSchema: z.ZodObject<{
|
|
|
24
24
|
}, "strip", z.ZodTypeAny, {
|
|
25
25
|
did: string;
|
|
26
26
|
kid: string;
|
|
27
|
-
ts: number;
|
|
28
27
|
nonce: string;
|
|
29
28
|
audience: string;
|
|
30
29
|
sessionId: string;
|
|
30
|
+
ts: number;
|
|
31
31
|
requestHash: string;
|
|
32
32
|
responseHash: string;
|
|
33
|
+
clientDid?: string | undefined;
|
|
33
34
|
scopeId?: string | undefined;
|
|
34
35
|
delegationRef?: string | undefined;
|
|
35
|
-
clientDid?: string | undefined;
|
|
36
36
|
}, {
|
|
37
37
|
did: string;
|
|
38
38
|
kid: string;
|
|
39
|
-
ts: number;
|
|
40
39
|
nonce: string;
|
|
41
40
|
audience: string;
|
|
42
41
|
sessionId: string;
|
|
42
|
+
ts: number;
|
|
43
43
|
requestHash: string;
|
|
44
44
|
responseHash: string;
|
|
45
|
+
clientDid?: string | undefined;
|
|
45
46
|
scopeId?: string | undefined;
|
|
46
47
|
delegationRef?: string | undefined;
|
|
47
|
-
clientDid?: string | undefined;
|
|
48
48
|
}>;
|
|
49
49
|
export declare const DetachedProofSchema: z.ZodObject<{
|
|
50
50
|
jws: z.ZodString;
|
|
@@ -63,57 +63,57 @@ export declare const DetachedProofSchema: z.ZodObject<{
|
|
|
63
63
|
}, "strip", z.ZodTypeAny, {
|
|
64
64
|
did: string;
|
|
65
65
|
kid: string;
|
|
66
|
-
ts: number;
|
|
67
66
|
nonce: string;
|
|
68
67
|
audience: string;
|
|
69
68
|
sessionId: string;
|
|
69
|
+
ts: number;
|
|
70
70
|
requestHash: string;
|
|
71
71
|
responseHash: string;
|
|
72
|
+
clientDid?: string | undefined;
|
|
72
73
|
scopeId?: string | undefined;
|
|
73
74
|
delegationRef?: string | undefined;
|
|
74
|
-
clientDid?: string | undefined;
|
|
75
75
|
}, {
|
|
76
76
|
did: string;
|
|
77
77
|
kid: string;
|
|
78
|
-
ts: number;
|
|
79
78
|
nonce: string;
|
|
80
79
|
audience: string;
|
|
81
80
|
sessionId: string;
|
|
81
|
+
ts: number;
|
|
82
82
|
requestHash: string;
|
|
83
83
|
responseHash: string;
|
|
84
|
+
clientDid?: string | undefined;
|
|
84
85
|
scopeId?: string | undefined;
|
|
85
86
|
delegationRef?: string | undefined;
|
|
86
|
-
clientDid?: string | undefined;
|
|
87
87
|
}>;
|
|
88
88
|
}, "strip", z.ZodTypeAny, {
|
|
89
89
|
jws: string;
|
|
90
90
|
meta: {
|
|
91
91
|
did: string;
|
|
92
92
|
kid: string;
|
|
93
|
-
ts: number;
|
|
94
93
|
nonce: string;
|
|
95
94
|
audience: string;
|
|
96
95
|
sessionId: string;
|
|
96
|
+
ts: number;
|
|
97
97
|
requestHash: string;
|
|
98
98
|
responseHash: string;
|
|
99
|
+
clientDid?: string | undefined;
|
|
99
100
|
scopeId?: string | undefined;
|
|
100
101
|
delegationRef?: string | undefined;
|
|
101
|
-
clientDid?: string | undefined;
|
|
102
102
|
};
|
|
103
103
|
}, {
|
|
104
104
|
jws: string;
|
|
105
105
|
meta: {
|
|
106
106
|
did: string;
|
|
107
107
|
kid: string;
|
|
108
|
-
ts: number;
|
|
109
108
|
nonce: string;
|
|
110
109
|
audience: string;
|
|
111
110
|
sessionId: string;
|
|
111
|
+
ts: number;
|
|
112
112
|
requestHash: string;
|
|
113
113
|
responseHash: string;
|
|
114
|
+
clientDid?: string | undefined;
|
|
114
115
|
scopeId?: string | undefined;
|
|
115
116
|
delegationRef?: string | undefined;
|
|
116
|
-
clientDid?: string | undefined;
|
|
117
117
|
};
|
|
118
118
|
}>;
|
|
119
119
|
export declare const CanonicalHashesSchema: z.ZodObject<{
|
|
@@ -138,22 +138,22 @@ export declare const AuditRecordSchema: z.ZodObject<{
|
|
|
138
138
|
verified: z.ZodEnum<["yes", "no"]>;
|
|
139
139
|
scope: z.ZodString;
|
|
140
140
|
}, "strip", z.ZodTypeAny, {
|
|
141
|
+
version: "audit.v1";
|
|
141
142
|
did: string;
|
|
142
143
|
kid: string;
|
|
143
|
-
ts: number;
|
|
144
144
|
audience: string;
|
|
145
|
-
|
|
145
|
+
ts: number;
|
|
146
146
|
session: string;
|
|
147
147
|
reqHash: string;
|
|
148
148
|
resHash: string;
|
|
149
149
|
verified: "yes" | "no";
|
|
150
150
|
scope: string;
|
|
151
151
|
}, {
|
|
152
|
+
version: "audit.v1";
|
|
152
153
|
did: string;
|
|
153
154
|
kid: string;
|
|
154
|
-
ts: number;
|
|
155
155
|
audience: string;
|
|
156
|
-
|
|
156
|
+
ts: number;
|
|
157
157
|
session: string;
|
|
158
158
|
reqHash: string;
|
|
159
159
|
resHash: string;
|
|
@@ -257,57 +257,57 @@ export declare const ProofSubmissionRequestSchema: z.ZodObject<{
|
|
|
257
257
|
}, "strip", z.ZodTypeAny, {
|
|
258
258
|
did: string;
|
|
259
259
|
kid: string;
|
|
260
|
-
ts: number;
|
|
261
260
|
nonce: string;
|
|
262
261
|
audience: string;
|
|
263
262
|
sessionId: string;
|
|
263
|
+
ts: number;
|
|
264
264
|
requestHash: string;
|
|
265
265
|
responseHash: string;
|
|
266
|
+
clientDid?: string | undefined;
|
|
266
267
|
scopeId?: string | undefined;
|
|
267
268
|
delegationRef?: string | undefined;
|
|
268
|
-
clientDid?: string | undefined;
|
|
269
269
|
}, {
|
|
270
270
|
did: string;
|
|
271
271
|
kid: string;
|
|
272
|
-
ts: number;
|
|
273
272
|
nonce: string;
|
|
274
273
|
audience: string;
|
|
275
274
|
sessionId: string;
|
|
275
|
+
ts: number;
|
|
276
276
|
requestHash: string;
|
|
277
277
|
responseHash: string;
|
|
278
|
+
clientDid?: string | undefined;
|
|
278
279
|
scopeId?: string | undefined;
|
|
279
280
|
delegationRef?: string | undefined;
|
|
280
|
-
clientDid?: string | undefined;
|
|
281
281
|
}>;
|
|
282
282
|
}, "strip", z.ZodTypeAny, {
|
|
283
283
|
jws: string;
|
|
284
284
|
meta: {
|
|
285
285
|
did: string;
|
|
286
286
|
kid: string;
|
|
287
|
-
ts: number;
|
|
288
287
|
nonce: string;
|
|
289
288
|
audience: string;
|
|
290
289
|
sessionId: string;
|
|
290
|
+
ts: number;
|
|
291
291
|
requestHash: string;
|
|
292
292
|
responseHash: string;
|
|
293
|
+
clientDid?: string | undefined;
|
|
293
294
|
scopeId?: string | undefined;
|
|
294
295
|
delegationRef?: string | undefined;
|
|
295
|
-
clientDid?: string | undefined;
|
|
296
296
|
};
|
|
297
297
|
}, {
|
|
298
298
|
jws: string;
|
|
299
299
|
meta: {
|
|
300
300
|
did: string;
|
|
301
301
|
kid: string;
|
|
302
|
-
ts: number;
|
|
303
302
|
nonce: string;
|
|
304
303
|
audience: string;
|
|
305
304
|
sessionId: string;
|
|
305
|
+
ts: number;
|
|
306
306
|
requestHash: string;
|
|
307
307
|
responseHash: string;
|
|
308
|
+
clientDid?: string | undefined;
|
|
308
309
|
scopeId?: string | undefined;
|
|
309
310
|
delegationRef?: string | undefined;
|
|
310
|
-
clientDid?: string | undefined;
|
|
311
311
|
};
|
|
312
312
|
}>, "many">;
|
|
313
313
|
context: z.ZodOptional<z.ZodObject<{
|
|
@@ -357,15 +357,15 @@ export declare const ProofSubmissionRequestSchema: z.ZodObject<{
|
|
|
357
357
|
meta: {
|
|
358
358
|
did: string;
|
|
359
359
|
kid: string;
|
|
360
|
-
ts: number;
|
|
361
360
|
nonce: string;
|
|
362
361
|
audience: string;
|
|
363
362
|
sessionId: string;
|
|
363
|
+
ts: number;
|
|
364
364
|
requestHash: string;
|
|
365
365
|
responseHash: string;
|
|
366
|
+
clientDid?: string | undefined;
|
|
366
367
|
scopeId?: string | undefined;
|
|
367
368
|
delegationRef?: string | undefined;
|
|
368
|
-
clientDid?: string | undefined;
|
|
369
369
|
};
|
|
370
370
|
}[];
|
|
371
371
|
delegation_id?: string | null | undefined;
|
|
@@ -386,15 +386,15 @@ export declare const ProofSubmissionRequestSchema: z.ZodObject<{
|
|
|
386
386
|
meta: {
|
|
387
387
|
did: string;
|
|
388
388
|
kid: string;
|
|
389
|
-
ts: number;
|
|
390
389
|
nonce: string;
|
|
391
390
|
audience: string;
|
|
392
391
|
sessionId: string;
|
|
392
|
+
ts: number;
|
|
393
393
|
requestHash: string;
|
|
394
394
|
responseHash: string;
|
|
395
|
+
clientDid?: string | undefined;
|
|
395
396
|
scopeId?: string | undefined;
|
|
396
397
|
delegationRef?: string | undefined;
|
|
397
|
-
clientDid?: string | undefined;
|
|
398
398
|
};
|
|
399
399
|
}[];
|
|
400
400
|
delegation_id?: string | null | undefined;
|
|
@@ -412,4 +412,3 @@ export declare const ProofSubmissionRequestSchema: z.ZodObject<{
|
|
|
412
412
|
export type ToolCallContext = z.infer<typeof ToolCallContextSchema>;
|
|
413
413
|
export type ProofSubmissionContext = z.infer<typeof ProofSubmissionContextSchema>;
|
|
414
414
|
export type ProofSubmissionRequest = z.infer<typeof ProofSubmissionRequestSchema>;
|
|
415
|
-
//# sourceMappingURL=proof.d.ts.map
|
package/dist/proof.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kya-os/contracts",
|
|
3
|
-
"version": "1.5.2-canary.
|
|
3
|
+
"version": "1.5.2-canary.5",
|
|
4
4
|
"description": "Shared types and schemas for XMCP-I ecosystem",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"require": "./dist/handshake.js"
|
|
19
19
|
},
|
|
20
20
|
"./proof": {
|
|
21
|
-
"types": "./dist/proof.d.ts",
|
|
22
|
-
"import": "./dist/proof.js",
|
|
23
|
-
"require": "./dist/proof.js"
|
|
21
|
+
"types": "./dist/proof/index.d.ts",
|
|
22
|
+
"import": "./dist/proof/index.js",
|
|
23
|
+
"require": "./dist/proof/index.js"
|
|
24
24
|
},
|
|
25
25
|
"./verifier": {
|
|
26
26
|
"types": "./dist/verifier.d.ts",
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
"test": "vitest run",
|
|
125
125
|
"test:watch": "vitest",
|
|
126
126
|
"test:coverage": "vitest run --coverage",
|
|
127
|
-
"prepublishOnly": "npm run build && node ../create-mcpi-app/scripts/validate-
|
|
127
|
+
"prepublishOnly": "npm run build && node ../create-mcpi-app/scripts/validate-dependencies.js"
|
|
128
128
|
},
|
|
129
129
|
"devDependencies": {
|
|
130
130
|
"@types/node": "^20.0.0",
|