@kya-os/contracts 1.0.0-alpha → 1.2.2

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.
Files changed (71) hide show
  1. package/dist/cli.d.ts +98 -0
  2. package/dist/cli.js +73 -60
  3. package/dist/delegation/constraints.d.ts +982 -0
  4. package/dist/delegation/constraints.js +205 -0
  5. package/dist/delegation/index.d.ts +8 -0
  6. package/dist/delegation/index.js +24 -0
  7. package/dist/delegation/schemas.d.ts +3787 -0
  8. package/dist/delegation/schemas.js +230 -0
  9. package/dist/did/index.d.ts +8 -0
  10. package/dist/did/index.js +24 -0
  11. package/dist/did/resolve-contract.d.ts +220 -0
  12. package/dist/did/resolve-contract.js +32 -0
  13. package/dist/did/types.d.ts +164 -0
  14. package/dist/did/types.js +71 -0
  15. package/dist/env/constants.d.ts +58 -0
  16. package/dist/env/constants.js +60 -0
  17. package/dist/env/index.d.ts +5 -0
  18. package/dist/env/index.js +21 -0
  19. package/dist/handshake.js +35 -32
  20. package/dist/index.d.ts +10 -1
  21. package/dist/index.js +42 -9
  22. package/dist/proof/index.d.ts +9 -0
  23. package/dist/proof/index.js +25 -0
  24. package/dist/proof/proof-record.d.ts +838 -0
  25. package/dist/proof/proof-record.js +134 -0
  26. package/dist/proof/signing-spec.d.ts +147 -0
  27. package/dist/proof/signing-spec.js +123 -0
  28. package/dist/proof.js +35 -32
  29. package/dist/registry.d.ts +46 -46
  30. package/dist/registry.js +79 -76
  31. package/dist/runtime/errors.d.ts +348 -0
  32. package/dist/runtime/errors.js +120 -0
  33. package/dist/runtime/headers.d.ts +84 -0
  34. package/dist/runtime/headers.js +82 -0
  35. package/dist/runtime/index.d.ts +6 -0
  36. package/dist/runtime/index.js +22 -0
  37. package/dist/test.js +50 -45
  38. package/dist/tlkrc/index.d.ts +5 -0
  39. package/dist/tlkrc/index.js +21 -0
  40. package/dist/tlkrc/rotation.d.ts +246 -0
  41. package/dist/tlkrc/rotation.js +127 -0
  42. package/dist/utils/validation.d.ts +31 -0
  43. package/dist/utils/validation.js +70 -0
  44. package/dist/vc/index.d.ts +8 -0
  45. package/dist/vc/index.js +24 -0
  46. package/dist/vc/schemas.d.ts +2484 -0
  47. package/dist/vc/schemas.js +225 -0
  48. package/dist/vc/statuslist.d.ts +494 -0
  49. package/dist/vc/statuslist.js +133 -0
  50. package/dist/verifier.d.ts +56 -0
  51. package/dist/verifier.js +34 -29
  52. package/package.json +67 -15
  53. package/schemas/cli/register-output/v1.0.0.json +2 -2
  54. package/schemas/proof/v1.0.0.json +1 -1
  55. package/schemas/registry/receipt-v1.0.0.json +2 -2
  56. package/schemas/verifier/verify-page/v1.0.0.json +2 -2
  57. package/schemas/well-known/agent/v1.0.0.json +1 -1
  58. package/dist/cli.d.ts.map +0 -1
  59. package/dist/cli.js.map +0 -1
  60. package/dist/handshake.d.ts.map +0 -1
  61. package/dist/handshake.js.map +0 -1
  62. package/dist/index.d.ts.map +0 -1
  63. package/dist/index.js.map +0 -1
  64. package/dist/proof.d.ts.map +0 -1
  65. package/dist/proof.js.map +0 -1
  66. package/dist/registry.d.ts.map +0 -1
  67. package/dist/registry.js.map +0 -1
  68. package/dist/test.d.ts.map +0 -1
  69. package/dist/test.js.map +0 -1
  70. package/dist/verifier.d.ts.map +0 -1
  71. package/dist/verifier.js.map +0 -1
@@ -32,23 +32,23 @@ export declare const RegistrationResultSchema: z.ZodObject<{
32
32
  mirrorStatus: z.ZodEnum<["pending", "success", "error"]>;
33
33
  mirrorLink: z.ZodOptional<z.ZodString>;
34
34
  }, "strip", z.ZodTypeAny, {
35
+ mirrorStatus: "success" | "pending" | "error";
35
36
  agentDID: string;
36
37
  agentURL: string;
37
38
  verificationEndpoint: string;
38
39
  conformanceCapabilities: ["handshake", "signing", "verification"];
39
40
  agentId: string;
40
41
  agentSlug: string;
41
- mirrorStatus: "pending" | "success" | "error";
42
42
  claimURL?: string | undefined;
43
43
  mirrorLink?: string | undefined;
44
44
  }, {
45
+ mirrorStatus: "success" | "pending" | "error";
45
46
  agentDID: string;
46
47
  agentURL: string;
47
48
  verificationEndpoint: string;
48
49
  conformanceCapabilities: ["handshake", "signing", "verification"];
49
50
  agentId: string;
50
51
  agentSlug: string;
51
- mirrorStatus: "pending" | "success" | "error";
52
52
  claimURL?: string | undefined;
53
53
  mirrorLink?: string | undefined;
54
54
  }>;
@@ -57,12 +57,12 @@ export declare const ClaimTokenSchema: z.ZodObject<{
57
57
  expiresAt: z.ZodNumber;
58
58
  ttlHours: z.ZodDefault<z.ZodNumber>;
59
59
  }, "strip", z.ZodTypeAny, {
60
- token: string;
61
60
  expiresAt: number;
61
+ token: string;
62
62
  ttlHours: number;
63
63
  }, {
64
- token: string;
65
64
  expiresAt: number;
65
+ token: string;
66
66
  ttlHours?: number | undefined;
67
67
  }>;
68
68
  export declare const MirrorStatusSchema: z.ZodObject<{
@@ -71,12 +71,12 @@ export declare const MirrorStatusSchema: z.ZodObject<{
71
71
  errorMessage: z.ZodOptional<z.ZodString>;
72
72
  registryURL: z.ZodOptional<z.ZodString>;
73
73
  }, "strip", z.ZodTypeAny, {
74
- status: "pending" | "success" | "error";
74
+ status: "success" | "pending" | "error";
75
75
  lastUpdated: number;
76
76
  errorMessage?: string | undefined;
77
77
  registryURL?: string | undefined;
78
78
  }, {
79
- status: "pending" | "success" | "error";
79
+ status: "success" | "pending" | "error";
80
80
  lastUpdated: number;
81
81
  errorMessage?: string | undefined;
82
82
  registryURL?: string | undefined;
@@ -91,38 +91,38 @@ export declare const AgentStatusSchema: z.ZodObject<{
91
91
  errorMessage: z.ZodOptional<z.ZodString>;
92
92
  registryURL: z.ZodOptional<z.ZodString>;
93
93
  }, "strip", z.ZodTypeAny, {
94
- status: "pending" | "success" | "error";
94
+ status: "success" | "pending" | "error";
95
95
  lastUpdated: number;
96
96
  errorMessage?: string | undefined;
97
97
  registryURL?: string | undefined;
98
98
  }, {
99
- status: "pending" | "success" | "error";
99
+ status: "success" | "pending" | "error";
100
100
  lastUpdated: number;
101
101
  errorMessage?: string | undefined;
102
102
  registryURL?: string | undefined;
103
103
  }>;
104
104
  lastHandshake: z.ZodOptional<z.ZodNumber>;
105
105
  }, "strip", z.ZodTypeAny, {
106
+ did: string;
107
+ keyId: string;
108
+ ktaURL: string;
106
109
  mirrorStatus: {
107
- status: "pending" | "success" | "error";
110
+ status: "success" | "pending" | "error";
108
111
  lastUpdated: number;
109
112
  errorMessage?: string | undefined;
110
113
  registryURL?: string | undefined;
111
114
  };
115
+ lastHandshake?: number | undefined;
116
+ }, {
112
117
  did: string;
113
118
  keyId: string;
114
119
  ktaURL: string;
115
- lastHandshake?: number | undefined;
116
- }, {
117
120
  mirrorStatus: {
118
- status: "pending" | "success" | "error";
121
+ status: "success" | "pending" | "error";
119
122
  lastUpdated: number;
120
123
  errorMessage?: string | undefined;
121
124
  registryURL?: string | undefined;
122
125
  };
123
- did: string;
124
- keyId: string;
125
- ktaURL: string;
126
126
  lastHandshake?: number | undefined;
127
127
  }>;
128
128
  /**
@@ -137,21 +137,21 @@ export declare const DelegationSchema: z.ZodObject<{
137
137
  aud: z.ZodOptional<z.ZodString>;
138
138
  delegationRef: z.ZodOptional<z.ZodString>;
139
139
  }, "strip", z.ZodTypeAny, {
140
- issuer: string;
141
140
  subject: string;
142
141
  scopes: string[];
142
+ issuer: string;
143
143
  nbf: number;
144
144
  exp: number;
145
- aud?: string | undefined;
146
145
  delegationRef?: string | undefined;
146
+ aud?: string | undefined;
147
147
  }, {
148
- issuer: string;
149
148
  subject: string;
150
149
  scopes: string[];
150
+ issuer: string;
151
151
  nbf: number;
152
152
  exp: number;
153
- aud?: string | undefined;
154
153
  delegationRef?: string | undefined;
154
+ aud?: string | undefined;
155
155
  }>;
156
156
  export declare const DelegationRequestSchema: z.ZodObject<{
157
157
  subject: z.ZodString;
@@ -161,13 +161,13 @@ export declare const DelegationRequestSchema: z.ZodObject<{
161
161
  }, "strip", z.ZodTypeAny, {
162
162
  subject: string;
163
163
  scopes: string[];
164
- duration?: number | undefined;
165
164
  audience?: string | undefined;
165
+ duration?: number | undefined;
166
166
  }, {
167
167
  subject: string;
168
168
  scopes: string[];
169
- duration?: number | undefined;
170
169
  audience?: string | undefined;
170
+ duration?: number | undefined;
171
171
  }>;
172
172
  /**
173
173
  * Storage mode configuration for verifiable credentials and delegations
@@ -175,10 +175,10 @@ export declare const DelegationRequestSchema: z.ZodObject<{
175
175
  export declare const StorageModeSchema: z.ZodEnum<["ktaEncrypted", "hybridReceiptsOnly", "selfHostedAuthoritative"]>;
176
176
  /**
177
177
  * Receipt object returned by KTA for verifiable operations
178
- * Schema ID: https://schemas.kya.dev/xmcpi/receipt/v1.0.0.json
178
+ * Schema ID: https://schemas.kya-os.ai/mcpi/receipt/v1.0.0.json
179
179
  */
180
180
  export declare const ReceiptSchema: z.ZodObject<{
181
- $schema: z.ZodOptional<z.ZodLiteral<"https://schemas.kya.dev/xmcpi/receipt/v1.0.0.json">>;
181
+ $schema: z.ZodOptional<z.ZodLiteral<"https://schemas.kya-os.ai/mcpi/receipt/v1.0.0.json">>;
182
182
  ref: z.ZodString;
183
183
  contentHash: z.ZodString;
184
184
  action: z.ZodEnum<["issue", "revoke"]>;
@@ -187,23 +187,23 @@ export declare const ReceiptSchema: z.ZodObject<{
187
187
  logRoot: z.ZodString;
188
188
  inclusionProof: z.ZodArray<z.ZodString, "many">;
189
189
  }, "strip", z.ZodTypeAny, {
190
+ ts: number;
190
191
  ref: string;
191
192
  contentHash: string;
192
193
  action: "issue" | "revoke";
193
- ts: number;
194
194
  logIndex: number;
195
195
  logRoot: string;
196
196
  inclusionProof: string[];
197
- $schema?: "https://schemas.kya.dev/xmcpi/receipt/v1.0.0.json" | undefined;
197
+ $schema?: "https://schemas.kya-os.ai/mcpi/receipt/v1.0.0.json" | undefined;
198
198
  }, {
199
+ ts: number;
199
200
  ref: string;
200
201
  contentHash: string;
201
202
  action: "issue" | "revoke";
202
- ts: number;
203
203
  logIndex: number;
204
204
  logRoot: string;
205
205
  inclusionProof: string[];
206
- $schema?: "https://schemas.kya.dev/xmcpi/receipt/v1.0.0.json" | undefined;
206
+ $schema?: "https://schemas.kya-os.ai/mcpi/receipt/v1.0.0.json" | undefined;
207
207
  }>;
208
208
  export declare const DelegationResponseSchema: z.ZodObject<{
209
209
  delegation: z.ZodObject<{
@@ -215,24 +215,24 @@ export declare const DelegationResponseSchema: z.ZodObject<{
215
215
  aud: z.ZodOptional<z.ZodString>;
216
216
  delegationRef: z.ZodOptional<z.ZodString>;
217
217
  }, "strip", z.ZodTypeAny, {
218
- issuer: string;
219
218
  subject: string;
220
219
  scopes: string[];
220
+ issuer: string;
221
221
  nbf: number;
222
222
  exp: number;
223
- aud?: string | undefined;
224
223
  delegationRef?: string | undefined;
224
+ aud?: string | undefined;
225
225
  }, {
226
- issuer: string;
227
226
  subject: string;
228
227
  scopes: string[];
228
+ issuer: string;
229
229
  nbf: number;
230
230
  exp: number;
231
- aud?: string | undefined;
232
231
  delegationRef?: string | undefined;
232
+ aud?: string | undefined;
233
233
  }>;
234
234
  receipt: z.ZodObject<{
235
- $schema: z.ZodOptional<z.ZodLiteral<"https://schemas.kya.dev/xmcpi/receipt/v1.0.0.json">>;
235
+ $schema: z.ZodOptional<z.ZodLiteral<"https://schemas.kya-os.ai/mcpi/receipt/v1.0.0.json">>;
236
236
  ref: z.ZodString;
237
237
  contentHash: z.ZodString;
238
238
  action: z.ZodEnum<["issue", "revoke"]>;
@@ -241,65 +241,65 @@ export declare const DelegationResponseSchema: z.ZodObject<{
241
241
  logRoot: z.ZodString;
242
242
  inclusionProof: z.ZodArray<z.ZodString, "many">;
243
243
  }, "strip", z.ZodTypeAny, {
244
+ ts: number;
244
245
  ref: string;
245
246
  contentHash: string;
246
247
  action: "issue" | "revoke";
247
- ts: number;
248
248
  logIndex: number;
249
249
  logRoot: string;
250
250
  inclusionProof: string[];
251
- $schema?: "https://schemas.kya.dev/xmcpi/receipt/v1.0.0.json" | undefined;
251
+ $schema?: "https://schemas.kya-os.ai/mcpi/receipt/v1.0.0.json" | undefined;
252
252
  }, {
253
+ ts: number;
253
254
  ref: string;
254
255
  contentHash: string;
255
256
  action: "issue" | "revoke";
256
- ts: number;
257
257
  logIndex: number;
258
258
  logRoot: string;
259
259
  inclusionProof: string[];
260
- $schema?: "https://schemas.kya.dev/xmcpi/receipt/v1.0.0.json" | undefined;
260
+ $schema?: "https://schemas.kya-os.ai/mcpi/receipt/v1.0.0.json" | undefined;
261
261
  }>;
262
262
  encryptedPayload: z.ZodOptional<z.ZodString>;
263
263
  }, "strip", z.ZodTypeAny, {
264
264
  delegation: {
265
- issuer: string;
266
265
  subject: string;
267
266
  scopes: string[];
267
+ issuer: string;
268
268
  nbf: number;
269
269
  exp: number;
270
- aud?: string | undefined;
271
270
  delegationRef?: string | undefined;
271
+ aud?: string | undefined;
272
272
  };
273
273
  receipt: {
274
+ ts: number;
274
275
  ref: string;
275
276
  contentHash: string;
276
277
  action: "issue" | "revoke";
277
- ts: number;
278
278
  logIndex: number;
279
279
  logRoot: string;
280
280
  inclusionProof: string[];
281
- $schema?: "https://schemas.kya.dev/xmcpi/receipt/v1.0.0.json" | undefined;
281
+ $schema?: "https://schemas.kya-os.ai/mcpi/receipt/v1.0.0.json" | undefined;
282
282
  };
283
283
  encryptedPayload?: string | undefined;
284
284
  }, {
285
285
  delegation: {
286
- issuer: string;
287
286
  subject: string;
288
287
  scopes: string[];
288
+ issuer: string;
289
289
  nbf: number;
290
290
  exp: number;
291
- aud?: string | undefined;
292
291
  delegationRef?: string | undefined;
292
+ aud?: string | undefined;
293
293
  };
294
294
  receipt: {
295
+ ts: number;
295
296
  ref: string;
296
297
  contentHash: string;
297
298
  action: "issue" | "revoke";
298
- ts: number;
299
299
  logIndex: number;
300
300
  logRoot: string;
301
301
  inclusionProof: string[];
302
- $schema?: "https://schemas.kya.dev/xmcpi/receipt/v1.0.0.json" | undefined;
302
+ $schema?: "https://schemas.kya-os.ai/mcpi/receipt/v1.0.0.json" | undefined;
303
303
  };
304
304
  encryptedPayload?: string | undefined;
305
305
  }>;
@@ -337,7 +337,7 @@ export declare const MCP_I_CAPABILITIES: readonly ["handshake", "signing", "veri
337
337
  export declare const CLAIM_TOKEN_TTL_HOURS = 24;
338
338
  export declare const KTA_BASE_URL = "https://knowthat.ai";
339
339
  export declare const DEFAULT_STORAGE_MODE: StorageMode;
340
- export declare const STORAGE_MODE_ENV_VAR = "XMCPI_STORAGE_MODE";
341
- export declare const RECEIPT_SCHEMA_ID = "https://schemas.kya.dev/xmcpi/receipt/v1.0.0.json";
340
+ export declare const STORAGE_MODE_ENV_VAR = "MCPI_STORAGE_MODE";
341
+ export declare const RECEIPT_SCHEMA_ID = "https://schemas.kya-os.ai/mcpi/receipt/v1.0.0.json";
342
342
  export declare const CONTENT_HASH_REGEX: RegExp;
343
343
  //# sourceMappingURL=registry.d.ts.map
package/dist/registry.js CHANGED
@@ -1,115 +1,118 @@
1
- import { z } from "zod";
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CONTENT_HASH_REGEX = exports.RECEIPT_SCHEMA_ID = exports.STORAGE_MODE_ENV_VAR = exports.DEFAULT_STORAGE_MODE = exports.KTA_BASE_URL = exports.CLAIM_TOKEN_TTL_HOURS = exports.MCP_I_CAPABILITIES = exports.StorageConfigSchema = exports.DelegationResponseSchema = exports.ReceiptSchema = exports.StorageModeSchema = exports.DelegationRequestSchema = exports.DelegationSchema = exports.AgentStatusSchema = exports.MirrorStatusSchema = exports.ClaimTokenSchema = exports.RegistrationResultSchema = exports.RegistrationInputSchema = void 0;
4
+ const zod_1 = require("zod");
2
5
  /**
3
6
  * Registry integration schemas (Know-That-AI and MCP Registry)
4
7
  */
5
- export const RegistrationInputSchema = z.object({
6
- agentDID: z.string().min(1),
7
- agentURL: z.string().url(),
8
- verificationEndpoint: z.string().url(),
9
- conformanceCapabilities: z.array(z.enum(["handshake", "signing", "verification"])),
10
- metadata: z.record(z.any()).optional(),
8
+ exports.RegistrationInputSchema = zod_1.z.object({
9
+ agentDID: zod_1.z.string().min(1),
10
+ agentURL: zod_1.z.string().url(),
11
+ verificationEndpoint: zod_1.z.string().url(),
12
+ conformanceCapabilities: zod_1.z.array(zod_1.z.enum(["handshake", "signing", "verification"])),
13
+ metadata: zod_1.z.record(zod_1.z.any()).optional(),
11
14
  });
12
- export const RegistrationResultSchema = z.object({
13
- agentDID: z.string().min(1),
14
- agentURL: z.string().url(),
15
- agentId: z.string().min(1),
16
- agentSlug: z.string().min(1),
17
- claimURL: z.string().url().optional(),
18
- verificationEndpoint: z.string().url(),
19
- conformanceCapabilities: z.tuple([
20
- z.literal("handshake"),
21
- z.literal("signing"),
22
- z.literal("verification"),
15
+ exports.RegistrationResultSchema = zod_1.z.object({
16
+ agentDID: zod_1.z.string().min(1),
17
+ agentURL: zod_1.z.string().url(),
18
+ agentId: zod_1.z.string().min(1),
19
+ agentSlug: zod_1.z.string().min(1),
20
+ claimURL: zod_1.z.string().url().optional(),
21
+ verificationEndpoint: zod_1.z.string().url(),
22
+ conformanceCapabilities: zod_1.z.tuple([
23
+ zod_1.z.literal("handshake"),
24
+ zod_1.z.literal("signing"),
25
+ zod_1.z.literal("verification"),
23
26
  ]),
24
- mirrorStatus: z.enum(["pending", "success", "error"]),
25
- mirrorLink: z.string().url().optional(),
27
+ mirrorStatus: zod_1.z.enum(["pending", "success", "error"]),
28
+ mirrorLink: zod_1.z.string().url().optional(),
26
29
  });
27
- export const ClaimTokenSchema = z.object({
28
- token: z.string().min(1),
29
- expiresAt: z.number().int().positive(),
30
- ttlHours: z.number().int().positive().default(24),
30
+ exports.ClaimTokenSchema = zod_1.z.object({
31
+ token: zod_1.z.string().min(1),
32
+ expiresAt: zod_1.z.number().int().positive(),
33
+ ttlHours: zod_1.z.number().int().positive().default(24),
31
34
  });
32
- export const MirrorStatusSchema = z.object({
33
- status: z.enum(["pending", "success", "error"]),
34
- lastUpdated: z.number().int().positive(),
35
- errorMessage: z.string().optional(),
36
- registryURL: z.string().url().optional(),
35
+ exports.MirrorStatusSchema = zod_1.z.object({
36
+ status: zod_1.z.enum(["pending", "success", "error"]),
37
+ lastUpdated: zod_1.z.number().int().positive(),
38
+ errorMessage: zod_1.z.string().optional(),
39
+ registryURL: zod_1.z.string().url().optional(),
37
40
  });
38
- export const AgentStatusSchema = z.object({
39
- did: z.string().min(1),
40
- keyId: z.string().min(1),
41
- ktaURL: z.string().url(),
42
- mirrorStatus: MirrorStatusSchema,
43
- lastHandshake: z.number().int().positive().optional(),
41
+ exports.AgentStatusSchema = zod_1.z.object({
42
+ did: zod_1.z.string().min(1),
43
+ keyId: zod_1.z.string().min(1),
44
+ ktaURL: zod_1.z.string().url(),
45
+ mirrorStatus: exports.MirrorStatusSchema,
46
+ lastHandshake: zod_1.z.number().int().positive().optional(),
44
47
  });
45
48
  /**
46
49
  * Delegation schemas for verifiable credentials
47
50
  */
48
- export const DelegationSchema = z.object({
49
- issuer: z.string().min(1), // DID of the issuer
50
- subject: z.string().min(1), // DID of the subject
51
- scopes: z.array(z.string()),
52
- nbf: z.number().int().positive(), // Not before (unix timestamp)
53
- exp: z.number().int().positive(), // Expires (unix timestamp)
54
- aud: z.string().optional(), // Audience (optional)
55
- delegationRef: z.string().optional(), // Reference to parent delegation
51
+ exports.DelegationSchema = zod_1.z.object({
52
+ issuer: zod_1.z.string().min(1), // DID of the issuer
53
+ subject: zod_1.z.string().min(1), // DID of the subject
54
+ scopes: zod_1.z.array(zod_1.z.string()),
55
+ nbf: zod_1.z.number().int().positive(), // Not before (unix timestamp)
56
+ exp: zod_1.z.number().int().positive(), // Expires (unix timestamp)
57
+ aud: zod_1.z.string().optional(), // Audience (optional)
58
+ delegationRef: zod_1.z.string().optional(), // Reference to parent delegation
56
59
  });
57
- export const DelegationRequestSchema = z.object({
58
- subject: z.string().min(1),
59
- scopes: z.array(z.string()),
60
- duration: z.number().int().positive().optional(), // Duration in seconds
61
- audience: z.string().optional(),
60
+ exports.DelegationRequestSchema = zod_1.z.object({
61
+ subject: zod_1.z.string().min(1),
62
+ scopes: zod_1.z.array(zod_1.z.string()),
63
+ duration: zod_1.z.number().int().positive().optional(), // Duration in seconds
64
+ audience: zod_1.z.string().optional(),
62
65
  });
63
66
  /**
64
67
  * Storage mode configuration for verifiable credentials and delegations
65
68
  */
66
- export const StorageModeSchema = z.enum([
69
+ exports.StorageModeSchema = zod_1.z.enum([
67
70
  "ktaEncrypted",
68
71
  "hybridReceiptsOnly",
69
72
  "selfHostedAuthoritative",
70
73
  ]);
71
74
  /**
72
75
  * Receipt object returned by KTA for verifiable operations
73
- * Schema ID: https://schemas.kya.dev/xmcpi/receipt/v1.0.0.json
76
+ * Schema ID: https://schemas.kya-os.ai/mcpi/receipt/v1.0.0.json
74
77
  */
75
- export const ReceiptSchema = z.object({
76
- $schema: z
77
- .literal("https://schemas.kya.dev/xmcpi/receipt/v1.0.0.json")
78
+ exports.ReceiptSchema = zod_1.z.object({
79
+ $schema: zod_1.z
80
+ .literal("https://schemas.kya-os.ai/mcpi/receipt/v1.0.0.json")
78
81
  .optional(),
79
- ref: z.string().min(1),
80
- contentHash: z.string().regex(/^sha256:[a-f0-9]{64}$/),
81
- action: z.enum(["issue", "revoke"]),
82
- ts: z.number().int().positive(),
83
- logIndex: z.number().int().nonnegative(),
84
- logRoot: z.string().min(1),
85
- inclusionProof: z.array(z.string()),
82
+ ref: zod_1.z.string().min(1),
83
+ contentHash: zod_1.z.string().regex(/^sha256:[a-f0-9]{64}$/),
84
+ action: zod_1.z.enum(["issue", "revoke"]),
85
+ ts: zod_1.z.number().int().positive(),
86
+ logIndex: zod_1.z.number().int().nonnegative(),
87
+ logRoot: zod_1.z.string().min(1),
88
+ inclusionProof: zod_1.z.array(zod_1.z.string()),
86
89
  });
87
- export const DelegationResponseSchema = z.object({
88
- delegation: DelegationSchema,
89
- receipt: ReceiptSchema,
90
- encryptedPayload: z.string().optional(), // For ktaEncrypted mode
90
+ exports.DelegationResponseSchema = zod_1.z.object({
91
+ delegation: exports.DelegationSchema,
92
+ receipt: exports.ReceiptSchema,
93
+ encryptedPayload: zod_1.z.string().optional(), // For ktaEncrypted mode
91
94
  });
92
95
  /**
93
96
  * Storage configuration for different deployment modes
94
97
  */
95
- export const StorageConfigSchema = z.object({
96
- mode: StorageModeSchema,
97
- encryptionEnabled: z.boolean().default(false),
98
- receiptVerificationEnabled: z.boolean().default(true),
99
- ktaBaseURL: z.string().url().default("https://knowthat.ai"),
98
+ exports.StorageConfigSchema = zod_1.z.object({
99
+ mode: exports.StorageModeSchema,
100
+ encryptionEnabled: zod_1.z.boolean().default(false),
101
+ receiptVerificationEnabled: zod_1.z.boolean().default(true),
102
+ ktaBaseURL: zod_1.z.string().url().default("https://knowthat.ai"),
100
103
  });
101
104
  // Constants
102
- export const MCP_I_CAPABILITIES = [
105
+ exports.MCP_I_CAPABILITIES = [
103
106
  "handshake",
104
107
  "signing",
105
108
  "verification",
106
109
  ];
107
- export const CLAIM_TOKEN_TTL_HOURS = 24;
108
- export const KTA_BASE_URL = "https://knowthat.ai"; // Placeholder for docs/tests
110
+ exports.CLAIM_TOKEN_TTL_HOURS = 24;
111
+ exports.KTA_BASE_URL = "https://knowthat.ai"; // Placeholder for docs/tests
109
112
  // Storage mode constants
110
- export const DEFAULT_STORAGE_MODE = "ktaEncrypted";
111
- export const STORAGE_MODE_ENV_VAR = "XMCPI_STORAGE_MODE";
113
+ exports.DEFAULT_STORAGE_MODE = "ktaEncrypted";
114
+ exports.STORAGE_MODE_ENV_VAR = "MCPI_STORAGE_MODE";
112
115
  // Receipt schema constants
113
- export const RECEIPT_SCHEMA_ID = "https://schemas.kya.dev/xmcpi/receipt/v1.0.0.json";
114
- export const CONTENT_HASH_REGEX = /^sha256:[a-f0-9]{64}$/;
116
+ exports.RECEIPT_SCHEMA_ID = "https://schemas.kya-os.ai/mcpi/receipt/v1.0.0.json";
117
+ exports.CONTENT_HASH_REGEX = /^sha256:[a-f0-9]{64}$/;
115
118
  //# sourceMappingURL=registry.js.map