@kya-os/contracts 1.3.3 → 1.3.4

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 (82) hide show
  1. package/package.json +3 -2
  2. package/README.md +0 -130
  3. package/dist/agentshield-api/endpoints.d.ts +0 -21
  4. package/dist/agentshield-api/endpoints.js +0 -20
  5. package/dist/agentshield-api/index.d.ts +0 -5
  6. package/dist/agentshield-api/index.js +0 -27
  7. package/dist/agentshield-api/schemas.d.ts +0 -9846
  8. package/dist/agentshield-api/schemas.js +0 -92
  9. package/dist/agentshield-api/types.d.ts +0 -92
  10. package/dist/agentshield-api/types.js +0 -12
  11. package/dist/cli.d.ts +0 -375
  12. package/dist/cli.js +0 -109
  13. package/dist/config/base.d.ts +0 -19
  14. package/dist/config/base.js +0 -2
  15. package/dist/config/delegation.d.ts +0 -46
  16. package/dist/config/delegation.js +0 -2
  17. package/dist/config/identity.d.ts +0 -22
  18. package/dist/config/identity.js +0 -2
  19. package/dist/config/index.d.ts +0 -17
  20. package/dist/config/index.js +0 -2
  21. package/dist/config/proofing.d.ts +0 -26
  22. package/dist/config/proofing.js +0 -2
  23. package/dist/config/tool-protection.d.ts +0 -36
  24. package/dist/config/tool-protection.js +0 -2
  25. package/dist/delegation/constraints.d.ts +0 -726
  26. package/dist/delegation/constraints.js +0 -103
  27. package/dist/delegation/index.d.ts +0 -2
  28. package/dist/delegation/index.js +0 -18
  29. package/dist/delegation/schemas.d.ts +0 -8042
  30. package/dist/delegation/schemas.js +0 -232
  31. package/dist/did/index.d.ts +0 -3
  32. package/dist/did/index.js +0 -19
  33. package/dist/did/resolve-contract.d.ts +0 -53
  34. package/dist/did/resolve-contract.js +0 -12
  35. package/dist/did/schemas.d.ts +0 -33
  36. package/dist/did/schemas.js +0 -80
  37. package/dist/did/types.d.ts +0 -38
  38. package/dist/did/types.js +0 -37
  39. package/dist/env/constants.d.ts +0 -13
  40. package/dist/env/constants.js +0 -15
  41. package/dist/env/index.d.ts +0 -1
  42. package/dist/env/index.js +0 -17
  43. package/dist/handshake.d.ts +0 -138
  44. package/dist/handshake.js +0 -50
  45. package/dist/index.d.ts +0 -11
  46. package/dist/index.js +0 -28
  47. package/dist/proof/index.d.ts +0 -2
  48. package/dist/proof/index.js +0 -18
  49. package/dist/proof/proof-record.d.ts +0 -728
  50. package/dist/proof/proof-record.js +0 -60
  51. package/dist/proof/signing-spec.d.ts +0 -73
  52. package/dist/proof/signing-spec.js +0 -52
  53. package/dist/proof.d.ts +0 -378
  54. package/dist/proof.js +0 -59
  55. package/dist/registry.d.ts +0 -326
  56. package/dist/registry.js +0 -98
  57. package/dist/runtime/errors.d.ts +0 -179
  58. package/dist/runtime/errors.js +0 -51
  59. package/dist/runtime/headers.d.ts +0 -34
  60. package/dist/runtime/headers.js +0 -52
  61. package/dist/runtime/index.d.ts +0 -2
  62. package/dist/runtime/index.js +0 -18
  63. package/dist/test.d.ts +0 -215
  64. package/dist/test.js +0 -83
  65. package/dist/tlkrc/index.d.ts +0 -1
  66. package/dist/tlkrc/index.js +0 -17
  67. package/dist/tlkrc/rotation.d.ts +0 -168
  68. package/dist/tlkrc/rotation.js +0 -55
  69. package/dist/tool-protection/index.d.ts +0 -129
  70. package/dist/tool-protection/index.js +0 -80
  71. package/dist/utils/validation.d.ts +0 -14
  72. package/dist/utils/validation.js +0 -56
  73. package/dist/vc/index.d.ts +0 -2
  74. package/dist/vc/index.js +0 -18
  75. package/dist/vc/schemas.d.ts +0 -1888
  76. package/dist/vc/schemas.js +0 -116
  77. package/dist/vc/statuslist.d.ts +0 -292
  78. package/dist/vc/statuslist.js +0 -61
  79. package/dist/verifier.d.ts +0 -202
  80. package/dist/verifier.js +0 -76
  81. package/dist/well-known/index.d.ts +0 -248
  82. package/dist/well-known/index.js +0 -104
@@ -1,138 +0,0 @@
1
- import { z } from "zod";
2
- export declare const HandshakeRequestSchema: z.ZodObject<{
3
- nonce: z.ZodString;
4
- audience: z.ZodString;
5
- timestamp: z.ZodNumber;
6
- agentDid: z.ZodOptional<z.ZodString>;
7
- }, "strip", z.ZodTypeAny, {
8
- nonce: string;
9
- audience: string;
10
- timestamp: number;
11
- agentDid?: string | undefined;
12
- }, {
13
- nonce: string;
14
- audience: string;
15
- timestamp: number;
16
- agentDid?: string | undefined;
17
- }>;
18
- export declare const SessionContextSchema: z.ZodObject<{
19
- sessionId: z.ZodString;
20
- audience: z.ZodString;
21
- nonce: z.ZodString;
22
- timestamp: z.ZodNumber;
23
- createdAt: z.ZodNumber;
24
- lastActivity: z.ZodNumber;
25
- ttlMinutes: z.ZodDefault<z.ZodNumber>;
26
- agentDid: z.ZodOptional<z.ZodString>;
27
- }, "strip", z.ZodTypeAny, {
28
- createdAt: number;
29
- nonce: string;
30
- audience: string;
31
- timestamp: number;
32
- sessionId: string;
33
- lastActivity: number;
34
- ttlMinutes: number;
35
- agentDid?: string | undefined;
36
- }, {
37
- createdAt: number;
38
- nonce: string;
39
- audience: string;
40
- timestamp: number;
41
- sessionId: string;
42
- lastActivity: number;
43
- agentDid?: string | undefined;
44
- ttlMinutes?: number | undefined;
45
- }>;
46
- export declare const NonceCacheEntrySchema: z.ZodObject<{
47
- sessionId: z.ZodString;
48
- expiresAt: z.ZodNumber;
49
- }, "strip", z.ZodTypeAny, {
50
- sessionId: string;
51
- expiresAt: number;
52
- }, {
53
- sessionId: string;
54
- expiresAt: number;
55
- }>;
56
- export type HandshakeRequest = z.infer<typeof HandshakeRequestSchema>;
57
- export type SessionContext = z.infer<typeof SessionContextSchema>;
58
- export type NonceCacheEntry = z.infer<typeof NonceCacheEntrySchema>;
59
- export interface NonceCache {
60
- has(nonce: string): Promise<boolean>;
61
- add(nonce: string, ttl: number): Promise<void>;
62
- cleanup(): Promise<void>;
63
- }
64
- export declare const NonceCacheConfigSchema: z.ZodObject<{
65
- type: z.ZodOptional<z.ZodEnum<["memory", "redis", "dynamodb", "cloudflare-kv"]>>;
66
- redis: z.ZodOptional<z.ZodObject<{
67
- url: z.ZodString;
68
- keyPrefix: z.ZodDefault<z.ZodString>;
69
- }, "strip", z.ZodTypeAny, {
70
- url: string;
71
- keyPrefix: string;
72
- }, {
73
- url: string;
74
- keyPrefix?: string | undefined;
75
- }>>;
76
- dynamodb: z.ZodOptional<z.ZodObject<{
77
- tableName: z.ZodString;
78
- region: z.ZodOptional<z.ZodString>;
79
- keyAttribute: z.ZodDefault<z.ZodString>;
80
- ttlAttribute: z.ZodDefault<z.ZodString>;
81
- }, "strip", z.ZodTypeAny, {
82
- tableName: string;
83
- keyAttribute: string;
84
- ttlAttribute: string;
85
- region?: string | undefined;
86
- }, {
87
- tableName: string;
88
- region?: string | undefined;
89
- keyAttribute?: string | undefined;
90
- ttlAttribute?: string | undefined;
91
- }>>;
92
- cloudflareKv: z.ZodOptional<z.ZodObject<{
93
- namespace: z.ZodString;
94
- keyPrefix: z.ZodDefault<z.ZodString>;
95
- }, "strip", z.ZodTypeAny, {
96
- keyPrefix: string;
97
- namespace: string;
98
- }, {
99
- namespace: string;
100
- keyPrefix?: string | undefined;
101
- }>>;
102
- }, "strip", z.ZodTypeAny, {
103
- type?: "memory" | "redis" | "dynamodb" | "cloudflare-kv" | undefined;
104
- redis?: {
105
- url: string;
106
- keyPrefix: string;
107
- } | undefined;
108
- dynamodb?: {
109
- tableName: string;
110
- keyAttribute: string;
111
- ttlAttribute: string;
112
- region?: string | undefined;
113
- } | undefined;
114
- cloudflareKv?: {
115
- keyPrefix: string;
116
- namespace: string;
117
- } | undefined;
118
- }, {
119
- type?: "memory" | "redis" | "dynamodb" | "cloudflare-kv" | undefined;
120
- redis?: {
121
- url: string;
122
- keyPrefix?: string | undefined;
123
- } | undefined;
124
- dynamodb?: {
125
- tableName: string;
126
- region?: string | undefined;
127
- keyAttribute?: string | undefined;
128
- ttlAttribute?: string | undefined;
129
- } | undefined;
130
- cloudflareKv?: {
131
- namespace: string;
132
- keyPrefix?: string | undefined;
133
- } | undefined;
134
- }>;
135
- export type NonceCacheConfig = z.infer<typeof NonceCacheConfigSchema>;
136
- export declare const DEFAULT_SESSION_TTL_MINUTES = 30;
137
- export declare const DEFAULT_TIMESTAMP_SKEW_SECONDS = 120;
138
- export declare const NONCE_LENGTH_BYTES = 16;
package/dist/handshake.js DELETED
@@ -1,50 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NONCE_LENGTH_BYTES = exports.DEFAULT_TIMESTAMP_SKEW_SECONDS = exports.DEFAULT_SESSION_TTL_MINUTES = exports.NonceCacheConfigSchema = exports.NonceCacheEntrySchema = exports.SessionContextSchema = exports.HandshakeRequestSchema = void 0;
4
- const zod_1 = require("zod");
5
- exports.HandshakeRequestSchema = zod_1.z.object({
6
- nonce: zod_1.z.string().min(1),
7
- audience: zod_1.z.string().min(1),
8
- timestamp: zod_1.z.number().int().positive(),
9
- agentDid: zod_1.z.string().startsWith("did:").optional(),
10
- });
11
- exports.SessionContextSchema = zod_1.z.object({
12
- sessionId: zod_1.z.string().min(1),
13
- audience: zod_1.z.string().min(1),
14
- nonce: zod_1.z.string().min(1),
15
- timestamp: zod_1.z.number().int().positive(),
16
- createdAt: zod_1.z.number().int().positive(),
17
- lastActivity: zod_1.z.number().int().positive(),
18
- ttlMinutes: zod_1.z.number().int().positive().default(30),
19
- agentDid: zod_1.z.string().optional(),
20
- });
21
- exports.NonceCacheEntrySchema = zod_1.z.object({
22
- sessionId: zod_1.z.string().min(1),
23
- expiresAt: zod_1.z.number().int().positive(),
24
- });
25
- exports.NonceCacheConfigSchema = zod_1.z.object({
26
- type: zod_1.z.enum(["memory", "redis", "dynamodb", "cloudflare-kv"]).optional(),
27
- redis: zod_1.z
28
- .object({
29
- url: zod_1.z.string().url(),
30
- keyPrefix: zod_1.z.string().default("mcpi:nonce:"),
31
- })
32
- .optional(),
33
- dynamodb: zod_1.z
34
- .object({
35
- tableName: zod_1.z.string(),
36
- region: zod_1.z.string().optional(),
37
- keyAttribute: zod_1.z.string().default("nonce"),
38
- ttlAttribute: zod_1.z.string().default("expiresAt"),
39
- })
40
- .optional(),
41
- cloudflareKv: zod_1.z
42
- .object({
43
- namespace: zod_1.z.string(),
44
- keyPrefix: zod_1.z.string().default("nonce:"),
45
- })
46
- .optional(),
47
- });
48
- exports.DEFAULT_SESSION_TTL_MINUTES = 30;
49
- exports.DEFAULT_TIMESTAMP_SKEW_SECONDS = 120;
50
- exports.NONCE_LENGTH_BYTES = 16;
package/dist/index.d.ts DELETED
@@ -1,11 +0,0 @@
1
- export * from "./handshake.js";
2
- export * from "./proof.js";
3
- export * from "./verifier.js";
4
- export * from "./registry.js";
5
- export * from "./cli.js";
6
- export * from "./test.js";
7
- export * from "./utils/validation.js";
8
- export * from "./vc/index.js";
9
- export * from "./delegation/index.js";
10
- export declare const CONTRACTS_VERSION = "1.2.1";
11
- export declare const SUPPORTED_XMCP_I_VERSION = "^1.0.0";
package/dist/index.js DELETED
@@ -1,28 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.SUPPORTED_XMCP_I_VERSION = exports.CONTRACTS_VERSION = void 0;
18
- __exportStar(require("./handshake.js"), exports);
19
- __exportStar(require("./proof.js"), exports);
20
- __exportStar(require("./verifier.js"), exports);
21
- __exportStar(require("./registry.js"), exports);
22
- __exportStar(require("./cli.js"), exports);
23
- __exportStar(require("./test.js"), exports);
24
- __exportStar(require("./utils/validation.js"), exports);
25
- __exportStar(require("./vc/index.js"), exports);
26
- __exportStar(require("./delegation/index.js"), exports);
27
- exports.CONTRACTS_VERSION = "1.2.1";
28
- exports.SUPPORTED_XMCP_I_VERSION = "^1.0.0";
@@ -1,2 +0,0 @@
1
- export * from './signing-spec.js';
2
- export * from './proof-record.js';
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./signing-spec.js"), exports);
18
- __exportStar(require("./proof-record.js"), exports);