@kya-os/contracts 1.0.0-alpha
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 +130 -0
- package/dist/cli.d.ts +242 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +91 -0
- package/dist/cli.js.map +1 -0
- package/dist/handshake.d.ts +153 -0
- package/dist/handshake.d.ts.map +1 -0
- package/dist/handshake.js +53 -0
- package/dist/handshake.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/proof.d.ts +155 -0
- package/dist/proof.d.ts.map +1 -0
- package/dist/proof.js +41 -0
- package/dist/proof.js.map +1 -0
- package/dist/registry.d.ts +343 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +115 -0
- package/dist/registry.js.map +1 -0
- package/dist/test.d.ts +252 -0
- package/dist/test.d.ts.map +1 -0
- package/dist/test.js +115 -0
- package/dist/test.js.map +1 -0
- package/dist/verifier.d.ts +136 -0
- package/dist/verifier.d.ts.map +1 -0
- package/dist/verifier.js +63 -0
- package/dist/verifier.js.map +1 -0
- package/package.json +72 -0
- package/schemas/cli/register-output/v1.0.0.json +69 -0
- package/schemas/proof/v1.0.0.json +80 -0
- package/schemas/registry/receipt-v1.0.0.json +60 -0
- package/schemas/verifier/verify-page/v1.0.0.json +94 -0
- package/schemas/well-known/agent/v1.0.0.json +49 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @kya-os/contracts - Shared types and schemas for XMCP-I ecosystem
|
|
3
|
+
*
|
|
4
|
+
* This package provides a single source of truth for all types and contracts
|
|
5
|
+
* used across the XMCP-I ecosystem, including runtime, CLI, verifier, and registry.
|
|
6
|
+
*/
|
|
7
|
+
export * from "./handshake.js";
|
|
8
|
+
export * from "./proof.js";
|
|
9
|
+
export * from "./verifier.js";
|
|
10
|
+
export * from "./registry.js";
|
|
11
|
+
export * from "./cli.js";
|
|
12
|
+
export * from "./test.js";
|
|
13
|
+
export declare const CONTRACTS_VERSION = "1.0.0";
|
|
14
|
+
export declare const SUPPORTED_XMCP_I_VERSION = "^1.0.0";
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAG1B,eAAO,MAAM,iBAAiB,UAAU,CAAC;AACzC,eAAO,MAAM,wBAAwB,WAAW,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @kya-os/contracts - Shared types and schemas for XMCP-I ecosystem
|
|
3
|
+
*
|
|
4
|
+
* This package provides a single source of truth for all types and contracts
|
|
5
|
+
* used across the XMCP-I ecosystem, including runtime, CLI, verifier, and registry.
|
|
6
|
+
*/
|
|
7
|
+
// Re-export all schemas and types from submodules
|
|
8
|
+
export * from "./handshake.js";
|
|
9
|
+
export * from "./proof.js";
|
|
10
|
+
export * from "./verifier.js";
|
|
11
|
+
export * from "./registry.js";
|
|
12
|
+
export * from "./cli.js";
|
|
13
|
+
export * from "./test.js";
|
|
14
|
+
// Version information
|
|
15
|
+
export const CONTRACTS_VERSION = "1.0.0";
|
|
16
|
+
export const SUPPORTED_XMCP_I_VERSION = "^1.0.0";
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,kDAAkD;AAClD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAE1B,sBAAsB;AACtB,MAAM,CAAC,MAAM,iBAAiB,GAAG,OAAO,CAAC;AACzC,MAAM,CAAC,MAAM,wBAAwB,GAAG,QAAQ,CAAC"}
|
package/dist/proof.d.ts
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Detached proof and signature schemas
|
|
4
|
+
*/
|
|
5
|
+
export declare const ProofMetaSchema: z.ZodObject<{
|
|
6
|
+
did: z.ZodString;
|
|
7
|
+
kid: z.ZodString;
|
|
8
|
+
ts: z.ZodNumber;
|
|
9
|
+
nonce: z.ZodString;
|
|
10
|
+
audience: z.ZodString;
|
|
11
|
+
sessionId: z.ZodString;
|
|
12
|
+
requestHash: z.ZodString;
|
|
13
|
+
responseHash: z.ZodString;
|
|
14
|
+
scopeId: z.ZodOptional<z.ZodString>;
|
|
15
|
+
delegationRef: z.ZodOptional<z.ZodString>;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
did: string;
|
|
18
|
+
nonce: string;
|
|
19
|
+
audience: string;
|
|
20
|
+
sessionId: string;
|
|
21
|
+
kid: string;
|
|
22
|
+
ts: number;
|
|
23
|
+
requestHash: string;
|
|
24
|
+
responseHash: string;
|
|
25
|
+
scopeId?: string | undefined;
|
|
26
|
+
delegationRef?: string | undefined;
|
|
27
|
+
}, {
|
|
28
|
+
did: string;
|
|
29
|
+
nonce: string;
|
|
30
|
+
audience: string;
|
|
31
|
+
sessionId: string;
|
|
32
|
+
kid: string;
|
|
33
|
+
ts: number;
|
|
34
|
+
requestHash: string;
|
|
35
|
+
responseHash: string;
|
|
36
|
+
scopeId?: string | undefined;
|
|
37
|
+
delegationRef?: string | undefined;
|
|
38
|
+
}>;
|
|
39
|
+
export declare const DetachedProofSchema: z.ZodObject<{
|
|
40
|
+
jws: z.ZodString;
|
|
41
|
+
meta: z.ZodObject<{
|
|
42
|
+
did: z.ZodString;
|
|
43
|
+
kid: z.ZodString;
|
|
44
|
+
ts: z.ZodNumber;
|
|
45
|
+
nonce: z.ZodString;
|
|
46
|
+
audience: z.ZodString;
|
|
47
|
+
sessionId: z.ZodString;
|
|
48
|
+
requestHash: z.ZodString;
|
|
49
|
+
responseHash: z.ZodString;
|
|
50
|
+
scopeId: z.ZodOptional<z.ZodString>;
|
|
51
|
+
delegationRef: z.ZodOptional<z.ZodString>;
|
|
52
|
+
}, "strip", z.ZodTypeAny, {
|
|
53
|
+
did: string;
|
|
54
|
+
nonce: string;
|
|
55
|
+
audience: string;
|
|
56
|
+
sessionId: string;
|
|
57
|
+
kid: string;
|
|
58
|
+
ts: number;
|
|
59
|
+
requestHash: string;
|
|
60
|
+
responseHash: string;
|
|
61
|
+
scopeId?: string | undefined;
|
|
62
|
+
delegationRef?: string | undefined;
|
|
63
|
+
}, {
|
|
64
|
+
did: string;
|
|
65
|
+
nonce: string;
|
|
66
|
+
audience: string;
|
|
67
|
+
sessionId: string;
|
|
68
|
+
kid: string;
|
|
69
|
+
ts: number;
|
|
70
|
+
requestHash: string;
|
|
71
|
+
responseHash: string;
|
|
72
|
+
scopeId?: string | undefined;
|
|
73
|
+
delegationRef?: string | undefined;
|
|
74
|
+
}>;
|
|
75
|
+
}, "strip", z.ZodTypeAny, {
|
|
76
|
+
jws: string;
|
|
77
|
+
meta: {
|
|
78
|
+
did: string;
|
|
79
|
+
nonce: string;
|
|
80
|
+
audience: string;
|
|
81
|
+
sessionId: string;
|
|
82
|
+
kid: string;
|
|
83
|
+
ts: number;
|
|
84
|
+
requestHash: string;
|
|
85
|
+
responseHash: string;
|
|
86
|
+
scopeId?: string | undefined;
|
|
87
|
+
delegationRef?: string | undefined;
|
|
88
|
+
};
|
|
89
|
+
}, {
|
|
90
|
+
jws: string;
|
|
91
|
+
meta: {
|
|
92
|
+
did: string;
|
|
93
|
+
nonce: string;
|
|
94
|
+
audience: string;
|
|
95
|
+
sessionId: string;
|
|
96
|
+
kid: string;
|
|
97
|
+
ts: number;
|
|
98
|
+
requestHash: string;
|
|
99
|
+
responseHash: string;
|
|
100
|
+
scopeId?: string | undefined;
|
|
101
|
+
delegationRef?: string | undefined;
|
|
102
|
+
};
|
|
103
|
+
}>;
|
|
104
|
+
export declare const CanonicalHashesSchema: z.ZodObject<{
|
|
105
|
+
requestHash: z.ZodString;
|
|
106
|
+
responseHash: z.ZodString;
|
|
107
|
+
}, "strip", z.ZodTypeAny, {
|
|
108
|
+
requestHash: string;
|
|
109
|
+
responseHash: string;
|
|
110
|
+
}, {
|
|
111
|
+
requestHash: string;
|
|
112
|
+
responseHash: string;
|
|
113
|
+
}>;
|
|
114
|
+
export declare const AuditRecordSchema: z.ZodObject<{
|
|
115
|
+
version: z.ZodLiteral<"audit.v1">;
|
|
116
|
+
ts: z.ZodNumber;
|
|
117
|
+
session: z.ZodString;
|
|
118
|
+
audience: z.ZodString;
|
|
119
|
+
did: z.ZodString;
|
|
120
|
+
kid: z.ZodString;
|
|
121
|
+
reqHash: z.ZodString;
|
|
122
|
+
resHash: z.ZodString;
|
|
123
|
+
verified: z.ZodEnum<["yes", "no"]>;
|
|
124
|
+
scope: z.ZodString;
|
|
125
|
+
}, "strip", z.ZodTypeAny, {
|
|
126
|
+
version: "audit.v1";
|
|
127
|
+
did: string;
|
|
128
|
+
audience: string;
|
|
129
|
+
kid: string;
|
|
130
|
+
ts: number;
|
|
131
|
+
session: string;
|
|
132
|
+
reqHash: string;
|
|
133
|
+
resHash: string;
|
|
134
|
+
verified: "yes" | "no";
|
|
135
|
+
scope: string;
|
|
136
|
+
}, {
|
|
137
|
+
version: "audit.v1";
|
|
138
|
+
did: string;
|
|
139
|
+
audience: string;
|
|
140
|
+
kid: string;
|
|
141
|
+
ts: number;
|
|
142
|
+
session: string;
|
|
143
|
+
reqHash: string;
|
|
144
|
+
resHash: string;
|
|
145
|
+
verified: "yes" | "no";
|
|
146
|
+
scope: string;
|
|
147
|
+
}>;
|
|
148
|
+
export type ProofMeta = z.infer<typeof ProofMetaSchema>;
|
|
149
|
+
export type DetachedProof = z.infer<typeof DetachedProofSchema>;
|
|
150
|
+
export type CanonicalHashes = z.infer<typeof CanonicalHashesSchema>;
|
|
151
|
+
export type AuditRecord = z.infer<typeof AuditRecordSchema>;
|
|
152
|
+
export declare const JWS_ALGORITHM = "EdDSA";
|
|
153
|
+
export declare const HASH_ALGORITHM = "sha256";
|
|
154
|
+
export declare const AUDIT_VERSION = "audit.v1";
|
|
155
|
+
//# sourceMappingURL=proof.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proof.d.ts","sourceRoot":"","sources":["../src/proof.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAW1B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG9B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;EAGhC,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAW5B,CAAC;AAGH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAG5D,eAAO,MAAM,aAAa,UAAU,CAAC;AACrC,eAAO,MAAM,cAAc,WAAW,CAAC;AACvC,eAAO,MAAM,aAAa,aAAa,CAAC"}
|
package/dist/proof.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Detached proof and signature schemas
|
|
4
|
+
*/
|
|
5
|
+
export const ProofMetaSchema = z.object({
|
|
6
|
+
did: z.string().min(1),
|
|
7
|
+
kid: z.string().min(1),
|
|
8
|
+
ts: z.number().int().positive(),
|
|
9
|
+
nonce: z.string().min(1),
|
|
10
|
+
audience: z.string().min(1),
|
|
11
|
+
sessionId: z.string().min(1),
|
|
12
|
+
requestHash: z.string().regex(/^sha256:[a-f0-9]{64}$/),
|
|
13
|
+
responseHash: z.string().regex(/^sha256:[a-f0-9]{64}$/),
|
|
14
|
+
scopeId: z.string().optional(),
|
|
15
|
+
delegationRef: z.string().optional(),
|
|
16
|
+
});
|
|
17
|
+
export const DetachedProofSchema = z.object({
|
|
18
|
+
jws: z.string().min(1), // Compact JWS format
|
|
19
|
+
meta: ProofMetaSchema,
|
|
20
|
+
});
|
|
21
|
+
export const CanonicalHashesSchema = z.object({
|
|
22
|
+
requestHash: z.string().regex(/^sha256:[a-f0-9]{64}$/),
|
|
23
|
+
responseHash: z.string().regex(/^sha256:[a-f0-9]{64}$/),
|
|
24
|
+
});
|
|
25
|
+
export const AuditRecordSchema = z.object({
|
|
26
|
+
version: z.literal("audit.v1"),
|
|
27
|
+
ts: z.number().int().positive(),
|
|
28
|
+
session: z.string().min(1),
|
|
29
|
+
audience: z.string().min(1),
|
|
30
|
+
did: z.string().min(1),
|
|
31
|
+
kid: z.string().min(1),
|
|
32
|
+
reqHash: z.string().regex(/^sha256:[a-f0-9]{64}$/),
|
|
33
|
+
resHash: z.string().regex(/^sha256:[a-f0-9]{64}$/),
|
|
34
|
+
verified: z.enum(["yes", "no"]),
|
|
35
|
+
scope: z.string().min(1), // "-" for no scope
|
|
36
|
+
});
|
|
37
|
+
// Constants
|
|
38
|
+
export const JWS_ALGORITHM = "EdDSA";
|
|
39
|
+
export const HASH_ALGORITHM = "sha256";
|
|
40
|
+
export const AUDIT_VERSION = "audit.v1";
|
|
41
|
+
//# sourceMappingURL=proof.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proof.js","sourceRoot":"","sources":["../src/proof.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACtB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACtB,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IAC/B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,uBAAuB,CAAC;IACtD,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,uBAAuB,CAAC;IACvD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,GAAG,EAAE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ACrC,MAAM,CAAC,MAAM,cAAc,GAAG,QAAQ,CAAC;AACvC,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CAAC"}
|
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Registry integration schemas (Know-That-AI and MCP Registry)
|
|
4
|
+
*/
|
|
5
|
+
export declare const RegistrationInputSchema: z.ZodObject<{
|
|
6
|
+
agentDID: z.ZodString;
|
|
7
|
+
agentURL: z.ZodString;
|
|
8
|
+
verificationEndpoint: z.ZodString;
|
|
9
|
+
conformanceCapabilities: z.ZodArray<z.ZodEnum<["handshake", "signing", "verification"]>, "many">;
|
|
10
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
agentDID: string;
|
|
13
|
+
agentURL: string;
|
|
14
|
+
verificationEndpoint: string;
|
|
15
|
+
conformanceCapabilities: ("handshake" | "signing" | "verification")[];
|
|
16
|
+
metadata?: Record<string, any> | undefined;
|
|
17
|
+
}, {
|
|
18
|
+
agentDID: string;
|
|
19
|
+
agentURL: string;
|
|
20
|
+
verificationEndpoint: string;
|
|
21
|
+
conformanceCapabilities: ("handshake" | "signing" | "verification")[];
|
|
22
|
+
metadata?: Record<string, any> | undefined;
|
|
23
|
+
}>;
|
|
24
|
+
export declare const RegistrationResultSchema: z.ZodObject<{
|
|
25
|
+
agentDID: z.ZodString;
|
|
26
|
+
agentURL: z.ZodString;
|
|
27
|
+
agentId: z.ZodString;
|
|
28
|
+
agentSlug: z.ZodString;
|
|
29
|
+
claimURL: z.ZodOptional<z.ZodString>;
|
|
30
|
+
verificationEndpoint: z.ZodString;
|
|
31
|
+
conformanceCapabilities: z.ZodTuple<[z.ZodLiteral<"handshake">, z.ZodLiteral<"signing">, z.ZodLiteral<"verification">], null>;
|
|
32
|
+
mirrorStatus: z.ZodEnum<["pending", "success", "error"]>;
|
|
33
|
+
mirrorLink: z.ZodOptional<z.ZodString>;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
agentDID: string;
|
|
36
|
+
agentURL: string;
|
|
37
|
+
verificationEndpoint: string;
|
|
38
|
+
conformanceCapabilities: ["handshake", "signing", "verification"];
|
|
39
|
+
agentId: string;
|
|
40
|
+
agentSlug: string;
|
|
41
|
+
mirrorStatus: "pending" | "success" | "error";
|
|
42
|
+
claimURL?: string | undefined;
|
|
43
|
+
mirrorLink?: string | undefined;
|
|
44
|
+
}, {
|
|
45
|
+
agentDID: string;
|
|
46
|
+
agentURL: string;
|
|
47
|
+
verificationEndpoint: string;
|
|
48
|
+
conformanceCapabilities: ["handshake", "signing", "verification"];
|
|
49
|
+
agentId: string;
|
|
50
|
+
agentSlug: string;
|
|
51
|
+
mirrorStatus: "pending" | "success" | "error";
|
|
52
|
+
claimURL?: string | undefined;
|
|
53
|
+
mirrorLink?: string | undefined;
|
|
54
|
+
}>;
|
|
55
|
+
export declare const ClaimTokenSchema: z.ZodObject<{
|
|
56
|
+
token: z.ZodString;
|
|
57
|
+
expiresAt: z.ZodNumber;
|
|
58
|
+
ttlHours: z.ZodDefault<z.ZodNumber>;
|
|
59
|
+
}, "strip", z.ZodTypeAny, {
|
|
60
|
+
token: string;
|
|
61
|
+
expiresAt: number;
|
|
62
|
+
ttlHours: number;
|
|
63
|
+
}, {
|
|
64
|
+
token: string;
|
|
65
|
+
expiresAt: number;
|
|
66
|
+
ttlHours?: number | undefined;
|
|
67
|
+
}>;
|
|
68
|
+
export declare const MirrorStatusSchema: z.ZodObject<{
|
|
69
|
+
status: z.ZodEnum<["pending", "success", "error"]>;
|
|
70
|
+
lastUpdated: z.ZodNumber;
|
|
71
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
72
|
+
registryURL: z.ZodOptional<z.ZodString>;
|
|
73
|
+
}, "strip", z.ZodTypeAny, {
|
|
74
|
+
status: "pending" | "success" | "error";
|
|
75
|
+
lastUpdated: number;
|
|
76
|
+
errorMessage?: string | undefined;
|
|
77
|
+
registryURL?: string | undefined;
|
|
78
|
+
}, {
|
|
79
|
+
status: "pending" | "success" | "error";
|
|
80
|
+
lastUpdated: number;
|
|
81
|
+
errorMessage?: string | undefined;
|
|
82
|
+
registryURL?: string | undefined;
|
|
83
|
+
}>;
|
|
84
|
+
export declare const AgentStatusSchema: z.ZodObject<{
|
|
85
|
+
did: z.ZodString;
|
|
86
|
+
keyId: z.ZodString;
|
|
87
|
+
ktaURL: z.ZodString;
|
|
88
|
+
mirrorStatus: z.ZodObject<{
|
|
89
|
+
status: z.ZodEnum<["pending", "success", "error"]>;
|
|
90
|
+
lastUpdated: z.ZodNumber;
|
|
91
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
92
|
+
registryURL: z.ZodOptional<z.ZodString>;
|
|
93
|
+
}, "strip", z.ZodTypeAny, {
|
|
94
|
+
status: "pending" | "success" | "error";
|
|
95
|
+
lastUpdated: number;
|
|
96
|
+
errorMessage?: string | undefined;
|
|
97
|
+
registryURL?: string | undefined;
|
|
98
|
+
}, {
|
|
99
|
+
status: "pending" | "success" | "error";
|
|
100
|
+
lastUpdated: number;
|
|
101
|
+
errorMessage?: string | undefined;
|
|
102
|
+
registryURL?: string | undefined;
|
|
103
|
+
}>;
|
|
104
|
+
lastHandshake: z.ZodOptional<z.ZodNumber>;
|
|
105
|
+
}, "strip", z.ZodTypeAny, {
|
|
106
|
+
mirrorStatus: {
|
|
107
|
+
status: "pending" | "success" | "error";
|
|
108
|
+
lastUpdated: number;
|
|
109
|
+
errorMessage?: string | undefined;
|
|
110
|
+
registryURL?: string | undefined;
|
|
111
|
+
};
|
|
112
|
+
did: string;
|
|
113
|
+
keyId: string;
|
|
114
|
+
ktaURL: string;
|
|
115
|
+
lastHandshake?: number | undefined;
|
|
116
|
+
}, {
|
|
117
|
+
mirrorStatus: {
|
|
118
|
+
status: "pending" | "success" | "error";
|
|
119
|
+
lastUpdated: number;
|
|
120
|
+
errorMessage?: string | undefined;
|
|
121
|
+
registryURL?: string | undefined;
|
|
122
|
+
};
|
|
123
|
+
did: string;
|
|
124
|
+
keyId: string;
|
|
125
|
+
ktaURL: string;
|
|
126
|
+
lastHandshake?: number | undefined;
|
|
127
|
+
}>;
|
|
128
|
+
/**
|
|
129
|
+
* Delegation schemas for verifiable credentials
|
|
130
|
+
*/
|
|
131
|
+
export declare const DelegationSchema: z.ZodObject<{
|
|
132
|
+
issuer: z.ZodString;
|
|
133
|
+
subject: z.ZodString;
|
|
134
|
+
scopes: z.ZodArray<z.ZodString, "many">;
|
|
135
|
+
nbf: z.ZodNumber;
|
|
136
|
+
exp: z.ZodNumber;
|
|
137
|
+
aud: z.ZodOptional<z.ZodString>;
|
|
138
|
+
delegationRef: z.ZodOptional<z.ZodString>;
|
|
139
|
+
}, "strip", z.ZodTypeAny, {
|
|
140
|
+
issuer: string;
|
|
141
|
+
subject: string;
|
|
142
|
+
scopes: string[];
|
|
143
|
+
nbf: number;
|
|
144
|
+
exp: number;
|
|
145
|
+
aud?: string | undefined;
|
|
146
|
+
delegationRef?: string | undefined;
|
|
147
|
+
}, {
|
|
148
|
+
issuer: string;
|
|
149
|
+
subject: string;
|
|
150
|
+
scopes: string[];
|
|
151
|
+
nbf: number;
|
|
152
|
+
exp: number;
|
|
153
|
+
aud?: string | undefined;
|
|
154
|
+
delegationRef?: string | undefined;
|
|
155
|
+
}>;
|
|
156
|
+
export declare const DelegationRequestSchema: z.ZodObject<{
|
|
157
|
+
subject: z.ZodString;
|
|
158
|
+
scopes: z.ZodArray<z.ZodString, "many">;
|
|
159
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
160
|
+
audience: z.ZodOptional<z.ZodString>;
|
|
161
|
+
}, "strip", z.ZodTypeAny, {
|
|
162
|
+
subject: string;
|
|
163
|
+
scopes: string[];
|
|
164
|
+
duration?: number | undefined;
|
|
165
|
+
audience?: string | undefined;
|
|
166
|
+
}, {
|
|
167
|
+
subject: string;
|
|
168
|
+
scopes: string[];
|
|
169
|
+
duration?: number | undefined;
|
|
170
|
+
audience?: string | undefined;
|
|
171
|
+
}>;
|
|
172
|
+
/**
|
|
173
|
+
* Storage mode configuration for verifiable credentials and delegations
|
|
174
|
+
*/
|
|
175
|
+
export declare const StorageModeSchema: z.ZodEnum<["ktaEncrypted", "hybridReceiptsOnly", "selfHostedAuthoritative"]>;
|
|
176
|
+
/**
|
|
177
|
+
* Receipt object returned by KTA for verifiable operations
|
|
178
|
+
* Schema ID: https://schemas.kya.dev/xmcpi/receipt/v1.0.0.json
|
|
179
|
+
*/
|
|
180
|
+
export declare const ReceiptSchema: z.ZodObject<{
|
|
181
|
+
$schema: z.ZodOptional<z.ZodLiteral<"https://schemas.kya.dev/xmcpi/receipt/v1.0.0.json">>;
|
|
182
|
+
ref: z.ZodString;
|
|
183
|
+
contentHash: z.ZodString;
|
|
184
|
+
action: z.ZodEnum<["issue", "revoke"]>;
|
|
185
|
+
ts: z.ZodNumber;
|
|
186
|
+
logIndex: z.ZodNumber;
|
|
187
|
+
logRoot: z.ZodString;
|
|
188
|
+
inclusionProof: z.ZodArray<z.ZodString, "many">;
|
|
189
|
+
}, "strip", z.ZodTypeAny, {
|
|
190
|
+
ref: string;
|
|
191
|
+
contentHash: string;
|
|
192
|
+
action: "issue" | "revoke";
|
|
193
|
+
ts: number;
|
|
194
|
+
logIndex: number;
|
|
195
|
+
logRoot: string;
|
|
196
|
+
inclusionProof: string[];
|
|
197
|
+
$schema?: "https://schemas.kya.dev/xmcpi/receipt/v1.0.0.json" | undefined;
|
|
198
|
+
}, {
|
|
199
|
+
ref: string;
|
|
200
|
+
contentHash: string;
|
|
201
|
+
action: "issue" | "revoke";
|
|
202
|
+
ts: number;
|
|
203
|
+
logIndex: number;
|
|
204
|
+
logRoot: string;
|
|
205
|
+
inclusionProof: string[];
|
|
206
|
+
$schema?: "https://schemas.kya.dev/xmcpi/receipt/v1.0.0.json" | undefined;
|
|
207
|
+
}>;
|
|
208
|
+
export declare const DelegationResponseSchema: z.ZodObject<{
|
|
209
|
+
delegation: z.ZodObject<{
|
|
210
|
+
issuer: z.ZodString;
|
|
211
|
+
subject: z.ZodString;
|
|
212
|
+
scopes: z.ZodArray<z.ZodString, "many">;
|
|
213
|
+
nbf: z.ZodNumber;
|
|
214
|
+
exp: z.ZodNumber;
|
|
215
|
+
aud: z.ZodOptional<z.ZodString>;
|
|
216
|
+
delegationRef: z.ZodOptional<z.ZodString>;
|
|
217
|
+
}, "strip", z.ZodTypeAny, {
|
|
218
|
+
issuer: string;
|
|
219
|
+
subject: string;
|
|
220
|
+
scopes: string[];
|
|
221
|
+
nbf: number;
|
|
222
|
+
exp: number;
|
|
223
|
+
aud?: string | undefined;
|
|
224
|
+
delegationRef?: string | undefined;
|
|
225
|
+
}, {
|
|
226
|
+
issuer: string;
|
|
227
|
+
subject: string;
|
|
228
|
+
scopes: string[];
|
|
229
|
+
nbf: number;
|
|
230
|
+
exp: number;
|
|
231
|
+
aud?: string | undefined;
|
|
232
|
+
delegationRef?: string | undefined;
|
|
233
|
+
}>;
|
|
234
|
+
receipt: z.ZodObject<{
|
|
235
|
+
$schema: z.ZodOptional<z.ZodLiteral<"https://schemas.kya.dev/xmcpi/receipt/v1.0.0.json">>;
|
|
236
|
+
ref: z.ZodString;
|
|
237
|
+
contentHash: z.ZodString;
|
|
238
|
+
action: z.ZodEnum<["issue", "revoke"]>;
|
|
239
|
+
ts: z.ZodNumber;
|
|
240
|
+
logIndex: z.ZodNumber;
|
|
241
|
+
logRoot: z.ZodString;
|
|
242
|
+
inclusionProof: z.ZodArray<z.ZodString, "many">;
|
|
243
|
+
}, "strip", z.ZodTypeAny, {
|
|
244
|
+
ref: string;
|
|
245
|
+
contentHash: string;
|
|
246
|
+
action: "issue" | "revoke";
|
|
247
|
+
ts: number;
|
|
248
|
+
logIndex: number;
|
|
249
|
+
logRoot: string;
|
|
250
|
+
inclusionProof: string[];
|
|
251
|
+
$schema?: "https://schemas.kya.dev/xmcpi/receipt/v1.0.0.json" | undefined;
|
|
252
|
+
}, {
|
|
253
|
+
ref: string;
|
|
254
|
+
contentHash: string;
|
|
255
|
+
action: "issue" | "revoke";
|
|
256
|
+
ts: number;
|
|
257
|
+
logIndex: number;
|
|
258
|
+
logRoot: string;
|
|
259
|
+
inclusionProof: string[];
|
|
260
|
+
$schema?: "https://schemas.kya.dev/xmcpi/receipt/v1.0.0.json" | undefined;
|
|
261
|
+
}>;
|
|
262
|
+
encryptedPayload: z.ZodOptional<z.ZodString>;
|
|
263
|
+
}, "strip", z.ZodTypeAny, {
|
|
264
|
+
delegation: {
|
|
265
|
+
issuer: string;
|
|
266
|
+
subject: string;
|
|
267
|
+
scopes: string[];
|
|
268
|
+
nbf: number;
|
|
269
|
+
exp: number;
|
|
270
|
+
aud?: string | undefined;
|
|
271
|
+
delegationRef?: string | undefined;
|
|
272
|
+
};
|
|
273
|
+
receipt: {
|
|
274
|
+
ref: string;
|
|
275
|
+
contentHash: string;
|
|
276
|
+
action: "issue" | "revoke";
|
|
277
|
+
ts: number;
|
|
278
|
+
logIndex: number;
|
|
279
|
+
logRoot: string;
|
|
280
|
+
inclusionProof: string[];
|
|
281
|
+
$schema?: "https://schemas.kya.dev/xmcpi/receipt/v1.0.0.json" | undefined;
|
|
282
|
+
};
|
|
283
|
+
encryptedPayload?: string | undefined;
|
|
284
|
+
}, {
|
|
285
|
+
delegation: {
|
|
286
|
+
issuer: string;
|
|
287
|
+
subject: string;
|
|
288
|
+
scopes: string[];
|
|
289
|
+
nbf: number;
|
|
290
|
+
exp: number;
|
|
291
|
+
aud?: string | undefined;
|
|
292
|
+
delegationRef?: string | undefined;
|
|
293
|
+
};
|
|
294
|
+
receipt: {
|
|
295
|
+
ref: string;
|
|
296
|
+
contentHash: string;
|
|
297
|
+
action: "issue" | "revoke";
|
|
298
|
+
ts: number;
|
|
299
|
+
logIndex: number;
|
|
300
|
+
logRoot: string;
|
|
301
|
+
inclusionProof: string[];
|
|
302
|
+
$schema?: "https://schemas.kya.dev/xmcpi/receipt/v1.0.0.json" | undefined;
|
|
303
|
+
};
|
|
304
|
+
encryptedPayload?: string | undefined;
|
|
305
|
+
}>;
|
|
306
|
+
/**
|
|
307
|
+
* Storage configuration for different deployment modes
|
|
308
|
+
*/
|
|
309
|
+
export declare const StorageConfigSchema: z.ZodObject<{
|
|
310
|
+
mode: z.ZodEnum<["ktaEncrypted", "hybridReceiptsOnly", "selfHostedAuthoritative"]>;
|
|
311
|
+
encryptionEnabled: z.ZodDefault<z.ZodBoolean>;
|
|
312
|
+
receiptVerificationEnabled: z.ZodDefault<z.ZodBoolean>;
|
|
313
|
+
ktaBaseURL: z.ZodDefault<z.ZodString>;
|
|
314
|
+
}, "strip", z.ZodTypeAny, {
|
|
315
|
+
mode: "ktaEncrypted" | "hybridReceiptsOnly" | "selfHostedAuthoritative";
|
|
316
|
+
encryptionEnabled: boolean;
|
|
317
|
+
receiptVerificationEnabled: boolean;
|
|
318
|
+
ktaBaseURL: string;
|
|
319
|
+
}, {
|
|
320
|
+
mode: "ktaEncrypted" | "hybridReceiptsOnly" | "selfHostedAuthoritative";
|
|
321
|
+
encryptionEnabled?: boolean | undefined;
|
|
322
|
+
receiptVerificationEnabled?: boolean | undefined;
|
|
323
|
+
ktaBaseURL?: string | undefined;
|
|
324
|
+
}>;
|
|
325
|
+
export type RegistrationInput = z.infer<typeof RegistrationInputSchema>;
|
|
326
|
+
export type RegistrationResult = z.infer<typeof RegistrationResultSchema>;
|
|
327
|
+
export type ClaimToken = z.infer<typeof ClaimTokenSchema>;
|
|
328
|
+
export type MirrorStatus = z.infer<typeof MirrorStatusSchema>;
|
|
329
|
+
export type AgentStatus = z.infer<typeof AgentStatusSchema>;
|
|
330
|
+
export type StorageMode = z.infer<typeof StorageModeSchema>;
|
|
331
|
+
export type Receipt = z.infer<typeof ReceiptSchema>;
|
|
332
|
+
export type StorageConfig = z.infer<typeof StorageConfigSchema>;
|
|
333
|
+
export type Delegation = z.infer<typeof DelegationSchema>;
|
|
334
|
+
export type DelegationRequest = z.infer<typeof DelegationRequestSchema>;
|
|
335
|
+
export type DelegationResponse = z.infer<typeof DelegationResponseSchema>;
|
|
336
|
+
export declare const MCP_I_CAPABILITIES: readonly ["handshake", "signing", "verification"];
|
|
337
|
+
export declare const CLAIM_TOKEN_TTL_HOURS = 24;
|
|
338
|
+
export declare const KTA_BASE_URL = "https://knowthat.ai";
|
|
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";
|
|
342
|
+
export declare const CONTENT_HASH_REGEX: RegExp;
|
|
343
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;EAQlC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAcnC,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;EAI3B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;EAK7B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAM5B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;EAQ3B,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;EAKlC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,iBAAiB,8EAI5B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,aAAa;;;;;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