@kya-os/contracts 1.9.1 → 1.10.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.
@@ -1,25 +1,16 @@
1
1
  /**
2
- * Audit Types and Schemas
2
+ * Legacy diagnostic-audit contracts.
3
3
  *
4
- * Types and Zod schemas for audit logging in the MCP-I framework.
5
- * These types are platform-agnostic and used across all implementations.
4
+ * @deprecated New integrations must use the canonical protocol from
5
+ * `@kya-os/mcp/audit`. This compatibility module intentionally contains no
6
+ * recorder or assurance logic; it preserves the published type/schema import
7
+ * path until the next major release.
6
8
  */
7
9
  import { z } from "zod";
8
10
  import type { AgentIdentity } from "../config/identity.js";
9
11
  import type { SessionContext } from "../handshake.js";
10
- /**
11
- * Audit context schema for logging audit records
12
- *
13
- * Contains all metadata needed to generate an audit record.
14
- * Privacy Note: Only metadata is extracted from these objects.
15
- * The identity's private key, session's nonce, and other sensitive
16
- * fields are NEVER included in the audit log.
17
- */
12
+ /** @deprecated Use canonical `@kya-os/mcp/audit` event inputs. */
18
13
  export declare const AuditContextSchema: z.ZodObject<{
19
- /**
20
- * Agent identity
21
- * Only `did` and `keyId` are logged. Private key is NEVER logged.
22
- */
23
14
  identity: z.ZodObject<{
24
15
  did: z.ZodString;
25
16
  kid: z.ZodString;
@@ -30,10 +21,6 @@ export declare const AuditContextSchema: z.ZodObject<{
30
21
  did: z.ZodString;
31
22
  kid: z.ZodString;
32
23
  }, z.ZodTypeAny, "passthrough">>;
33
- /**
34
- * Session context
35
- * Only `sessionId` and `audience` are logged. Nonce is NEVER logged.
36
- */
37
24
  session: z.ZodObject<{
38
25
  sessionId: z.ZodString;
39
26
  audience: z.ZodString;
@@ -44,25 +31,9 @@ export declare const AuditContextSchema: z.ZodObject<{
44
31
  sessionId: z.ZodString;
45
32
  audience: z.ZodString;
46
33
  }, z.ZodTypeAny, "passthrough">>;
47
- /**
48
- * Request hash (SHA-256 with `sha256:` prefix)
49
- */
50
34
  requestHash: z.ZodString;
51
- /**
52
- * Response hash (SHA-256 with `sha256:` prefix)
53
- */
54
35
  responseHash: z.ZodString;
55
- /**
56
- * Verification result
57
- * - 'yes': Proof was verified successfully
58
- * - 'no': Proof verification failed
59
- */
60
36
  verified: z.ZodEnum<["yes", "no"]>;
61
- /**
62
- * Optional scope identifier
63
- * Application-level scope (e.g., 'orders.create', 'users.read').
64
- * If not provided, '-' is used in the audit log.
65
- */
66
37
  scopeId: z.ZodOptional<z.ZodString>;
67
38
  }, "strip", z.ZodTypeAny, {
68
39
  requestHash: string;
@@ -99,6 +70,7 @@ export declare const AuditContextSchema: z.ZodObject<{
99
70
  };
100
71
  scopeId?: string | undefined;
101
72
  }>;
73
+ /** @deprecated Use canonical `@kya-os/mcp/audit` event inputs. */
102
74
  export type AuditContext = {
103
75
  identity: AgentIdentity;
104
76
  session: SessionContext;
@@ -107,22 +79,9 @@ export type AuditContext = {
107
79
  verified: "yes" | "no";
108
80
  scopeId?: string;
109
81
  };
110
- /**
111
- * Event context schema for logging events that bypass session deduplication
112
- *
113
- * Used for consent events where multiple events occur in the same session.
114
- * Unlike AuditContext, this allows multiple events per session.
115
- */
82
+ /** @deprecated Use canonical `@kya-os/mcp/audit` event inputs. */
116
83
  export declare const AuditEventContextSchema: z.ZodObject<{
117
- /**
118
- * Event type identifier
119
- * @example "consent:page_viewed", "consent:approved", "runtime:initialized"
120
- */
121
84
  eventType: z.ZodString;
122
- /**
123
- * Agent identity
124
- * Only `did` and `keyId` are logged. Private key is NEVER logged.
125
- */
126
85
  identity: z.ZodObject<{
127
86
  did: z.ZodString;
128
87
  kid: z.ZodString;
@@ -133,10 +92,6 @@ export declare const AuditEventContextSchema: z.ZodObject<{
133
92
  did: z.ZodString;
134
93
  kid: z.ZodString;
135
94
  }, z.ZodTypeAny, "passthrough">>;
136
- /**
137
- * Session context
138
- * Only `sessionId` and `audience` are logged. Nonce is NEVER logged.
139
- */
140
95
  session: z.ZodObject<{
141
96
  sessionId: z.ZodString;
142
97
  audience: z.ZodString;
@@ -147,10 +102,6 @@ export declare const AuditEventContextSchema: z.ZodObject<{
147
102
  sessionId: z.ZodString;
148
103
  audience: z.ZodString;
149
104
  }, z.ZodTypeAny, "passthrough">>;
150
- /**
151
- * Optional event-specific data
152
- * Used for generating event hash. Not logged directly.
153
- */
154
105
  eventData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
155
106
  }, "strip", z.ZodTypeAny, {
156
107
  session: {
@@ -159,13 +110,13 @@ export declare const AuditEventContextSchema: z.ZodObject<{
159
110
  } & {
160
111
  [k: string]: unknown;
161
112
  };
113
+ eventType: string;
162
114
  identity: {
163
115
  did: string;
164
116
  kid: string;
165
117
  } & {
166
118
  [k: string]: unknown;
167
119
  };
168
- eventType: string;
169
120
  eventData?: Record<string, unknown> | undefined;
170
121
  }, {
171
122
  session: {
@@ -174,20 +125,23 @@ export declare const AuditEventContextSchema: z.ZodObject<{
174
125
  } & {
175
126
  [k: string]: unknown;
176
127
  };
128
+ eventType: string;
177
129
  identity: {
178
130
  did: string;
179
131
  kid: string;
180
132
  } & {
181
133
  [k: string]: unknown;
182
134
  };
183
- eventType: string;
184
135
  eventData?: Record<string, unknown> | undefined;
185
136
  }>;
137
+ /** @deprecated Use canonical `@kya-os/mcp/audit` event inputs. */
186
138
  export type AuditEventContext = {
187
139
  eventType: string;
188
140
  identity: AgentIdentity;
189
141
  session: SessionContext;
190
142
  eventData?: Record<string, any>;
191
143
  };
144
+ /** @deprecated Use canonical `@kya-os/mcp/audit` receipt and event types. */
192
145
  export type { AuditRecord } from "../proof.js";
146
+ /** @deprecated Use canonical `@kya-os/mcp/audit` schemas. */
193
147
  export { AuditRecordSchema } from "../proof.js";
@@ -1,100 +1,51 @@
1
1
  "use strict";
2
2
  /**
3
- * Audit Types and Schemas
3
+ * Legacy diagnostic-audit contracts.
4
4
  *
5
- * Types and Zod schemas for audit logging in the MCP-I framework.
6
- * These types are platform-agnostic and used across all implementations.
5
+ * @deprecated New integrations must use the canonical protocol from
6
+ * `@kya-os/mcp/audit`. This compatibility module intentionally contains no
7
+ * recorder or assurance logic; it preserves the published type/schema import
8
+ * path until the next major release.
7
9
  */
8
10
  Object.defineProperty(exports, "__esModule", { value: true });
9
11
  exports.AuditRecordSchema = exports.AuditEventContextSchema = exports.AuditContextSchema = void 0;
10
12
  const zod_1 = require("zod");
11
- /**
12
- * Audit context schema for logging audit records
13
- *
14
- * Contains all metadata needed to generate an audit record.
15
- * Privacy Note: Only metadata is extracted from these objects.
16
- * The identity's private key, session's nonce, and other sensitive
17
- * fields are NEVER included in the audit log.
18
- */
13
+ /** @deprecated Use canonical `@kya-os/mcp/audit` event inputs. */
19
14
  exports.AuditContextSchema = zod_1.z.object({
20
- /**
21
- * Agent identity
22
- * Only `did` and `keyId` are logged. Private key is NEVER logged.
23
- */
24
15
  identity: zod_1.z
25
16
  .object({
26
17
  did: zod_1.z.string().min(1),
27
18
  kid: zod_1.z.string().min(1),
28
19
  })
29
- .passthrough(), // Allow additional fields but only did/kid are used
30
- /**
31
- * Session context
32
- * Only `sessionId` and `audience` are logged. Nonce is NEVER logged.
33
- */
20
+ .passthrough(),
34
21
  session: zod_1.z
35
22
  .object({
36
23
  sessionId: zod_1.z.string().min(1),
37
24
  audience: zod_1.z.string().min(1),
38
25
  })
39
- .passthrough(), // Allow additional fields but only sessionId/audience are used
40
- /**
41
- * Request hash (SHA-256 with `sha256:` prefix)
42
- */
26
+ .passthrough(),
43
27
  requestHash: zod_1.z.string().regex(/^sha256:[a-f0-9]{64}$/),
44
- /**
45
- * Response hash (SHA-256 with `sha256:` prefix)
46
- */
47
28
  responseHash: zod_1.z.string().regex(/^sha256:[a-f0-9]{64}$/),
48
- /**
49
- * Verification result
50
- * - 'yes': Proof was verified successfully
51
- * - 'no': Proof verification failed
52
- */
53
29
  verified: zod_1.z.enum(["yes", "no"]),
54
- /**
55
- * Optional scope identifier
56
- * Application-level scope (e.g., 'orders.create', 'users.read').
57
- * If not provided, '-' is used in the audit log.
58
- */
59
30
  scopeId: zod_1.z.string().optional(),
60
31
  });
61
- /**
62
- * Event context schema for logging events that bypass session deduplication
63
- *
64
- * Used for consent events where multiple events occur in the same session.
65
- * Unlike AuditContext, this allows multiple events per session.
66
- */
32
+ /** @deprecated Use canonical `@kya-os/mcp/audit` event inputs. */
67
33
  exports.AuditEventContextSchema = zod_1.z.object({
68
- /**
69
- * Event type identifier
70
- * @example "consent:page_viewed", "consent:approved", "runtime:initialized"
71
- */
72
34
  eventType: zod_1.z.string().min(1),
73
- /**
74
- * Agent identity
75
- * Only `did` and `keyId` are logged. Private key is NEVER logged.
76
- */
77
35
  identity: zod_1.z
78
36
  .object({
79
37
  did: zod_1.z.string().min(1),
80
38
  kid: zod_1.z.string().min(1),
81
39
  })
82
- .passthrough(), // Allow additional fields but only did/kid are used
83
- /**
84
- * Session context
85
- * Only `sessionId` and `audience` are logged. Nonce is NEVER logged.
86
- */
40
+ .passthrough(),
87
41
  session: zod_1.z
88
42
  .object({
89
43
  sessionId: zod_1.z.string().min(1),
90
44
  audience: zod_1.z.string().min(1),
91
45
  })
92
- .passthrough(), // Allow additional fields but only sessionId/audience are used
93
- /**
94
- * Optional event-specific data
95
- * Used for generating event hash. Not logged directly.
96
- */
46
+ .passthrough(),
97
47
  eventData: zod_1.z.record(zod_1.z.unknown()).optional(),
98
48
  });
49
+ /** @deprecated Use canonical `@kya-os/mcp/audit` schemas. */
99
50
  var proof_js_1 = require("../proof.js");
100
51
  Object.defineProperty(exports, "AuditRecordSchema", { enumerable: true, get: function () { return proof_js_1.AuditRecordSchema; } });
@@ -44,34 +44,6 @@ export interface MCPIBaseConfig {
44
44
  */
45
45
  absoluteLifetime?: number;
46
46
  };
47
- /**
48
- * Audit logging configuration
49
- * Controls what gets logged for security and compliance
50
- */
51
- audit?: {
52
- /**
53
- * Enable audit logging
54
- * @default true in production, false in development
55
- */
56
- enabled: boolean;
57
- /**
58
- * Include proof hashes in audit logs
59
- * Useful for cryptographic verification but increases log size
60
- * @default false
61
- */
62
- includeProofHashes?: boolean;
63
- /**
64
- * Include full payloads in audit logs
65
- * WARNING: May include sensitive data
66
- * @default false
67
- */
68
- includePayloads?: boolean;
69
- /**
70
- * Custom log function for audit records
71
- * If not provided, uses console.log
72
- */
73
- logFunction?: (record: string) => void;
74
- };
75
47
  /**
76
48
  * Well-known endpoints configuration
77
49
  * Controls the /.well-known/* endpoints for identity discovery
@@ -25,7 +25,7 @@ export interface MCPIConfig extends MCPIBaseConfig {
25
25
  * Build base MCPIConfig that works across all platforms
26
26
  *
27
27
  * Creates a platform-agnostic configuration object with sensible defaults
28
- * for identity, proofing, delegation, audit, and session management.
28
+ * for identity, proofing, delegation, and session management.
29
29
  *
30
30
  * @param env - Environment variables object (works with process.env or Cloudflare env)
31
31
  * @returns Complete MCPIConfig object
@@ -13,7 +13,7 @@ exports.buildBaseConfig = buildBaseConfig;
13
13
  * Build base MCPIConfig that works across all platforms
14
14
  *
15
15
  * Creates a platform-agnostic configuration object with sensible defaults
16
- * for identity, proofing, delegation, audit, and session management.
16
+ * for identity, proofing, delegation, and session management.
17
17
  *
18
18
  * @param env - Environment variables object (works with process.env or Cloudflare env)
19
19
  * @returns Complete MCPIConfig object
@@ -60,11 +60,6 @@ function buildBaseConfig(env) {
60
60
  minReputationScore: 76
61
61
  }
62
62
  },
63
- audit: {
64
- enabled: true,
65
- includeProofHashes: false,
66
- includePayloads: false
67
- },
68
63
  session: {
69
64
  timestampSkewSeconds: 120,
70
65
  ttlMinutes: 30
@@ -61,11 +61,6 @@ const defaultConfigJson = {
61
61
  },
62
62
  fallback: {},
63
63
  },
64
- audit: {
65
- enabled: true,
66
- includeProofHashes: false,
67
- includePayloads: false,
68
- },
69
64
  session: {
70
65
  timestampSkewSeconds: 120,
71
66
  ttlMinutes: 30,
@@ -6,5 +6,5 @@
6
6
  * @package @kya-os/contracts/dashboard-config
7
7
  */
8
8
  export type { MCPIServerConfig, MergedMCPIServerConfig, GetServerConfigRequest, GetServerConfigResponse, GetMergedServerConfigResponse, UpdateServerConfigRequest, UpdateServerConfigResponse, ValidateServerConfigRequest, ValidateServerConfigResponse, } from './types.js';
9
- export { identityConfigSchema, proofingConfigSchema, delegationConfigSchema, toolProtectionConfigSchema, mergedToolProtectionConfigSchema, auditConfigSchema, sessionConfigSchema, platformConfigSchema, cloudflarePlatformConfigSchema, nodePlatformConfigSchema, vercelPlatformConfigSchema, configMetadataSchema, mcpIServerConfigSchema, mergedMcpIServerConfigSchema, getServerConfigRequestSchema, getServerConfigResponseSchema, getMergedServerConfigResponseSchema, updateServerConfigRequestSchema, updateServerConfigResponseSchema, validateServerConfigRequestSchema, validateServerConfigResponseSchema, } from './schemas.js';
9
+ export { identityConfigSchema, proofingConfigSchema, delegationConfigSchema, toolProtectionConfigSchema, mergedToolProtectionConfigSchema, sessionConfigSchema, platformConfigSchema, cloudflarePlatformConfigSchema, nodePlatformConfigSchema, vercelPlatformConfigSchema, configMetadataSchema, mcpIServerConfigSchema, mergedMcpIServerConfigSchema, getServerConfigRequestSchema, getServerConfigResponseSchema, getMergedServerConfigResponseSchema, updateServerConfigRequestSchema, updateServerConfigResponseSchema, validateServerConfigRequestSchema, validateServerConfigResponseSchema, } from './schemas.js';
10
10
  export { defaultConfig, getDefaultConfigForPlatform, mergeWithDefaults, } from './default-config.js';
@@ -7,7 +7,7 @@
7
7
  * @package @kya-os/contracts/dashboard-config
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.mergeWithDefaults = exports.getDefaultConfigForPlatform = exports.defaultConfig = exports.validateServerConfigResponseSchema = exports.validateServerConfigRequestSchema = exports.updateServerConfigResponseSchema = exports.updateServerConfigRequestSchema = exports.getMergedServerConfigResponseSchema = exports.getServerConfigResponseSchema = exports.getServerConfigRequestSchema = exports.mergedMcpIServerConfigSchema = exports.mcpIServerConfigSchema = exports.configMetadataSchema = exports.vercelPlatformConfigSchema = exports.nodePlatformConfigSchema = exports.cloudflarePlatformConfigSchema = exports.platformConfigSchema = exports.sessionConfigSchema = exports.auditConfigSchema = exports.mergedToolProtectionConfigSchema = exports.toolProtectionConfigSchema = exports.delegationConfigSchema = exports.proofingConfigSchema = exports.identityConfigSchema = void 0;
10
+ exports.mergeWithDefaults = exports.getDefaultConfigForPlatform = exports.defaultConfig = exports.validateServerConfigResponseSchema = exports.validateServerConfigRequestSchema = exports.updateServerConfigResponseSchema = exports.updateServerConfigRequestSchema = exports.getMergedServerConfigResponseSchema = exports.getServerConfigResponseSchema = exports.getServerConfigRequestSchema = exports.mergedMcpIServerConfigSchema = exports.mcpIServerConfigSchema = exports.configMetadataSchema = exports.vercelPlatformConfigSchema = exports.nodePlatformConfigSchema = exports.cloudflarePlatformConfigSchema = exports.platformConfigSchema = exports.sessionConfigSchema = exports.mergedToolProtectionConfigSchema = exports.toolProtectionConfigSchema = exports.delegationConfigSchema = exports.proofingConfigSchema = exports.identityConfigSchema = void 0;
11
11
  // Schema exports
12
12
  var schemas_js_1 = require("./schemas.js");
13
13
  Object.defineProperty(exports, "identityConfigSchema", { enumerable: true, get: function () { return schemas_js_1.identityConfigSchema; } });
@@ -15,7 +15,6 @@ Object.defineProperty(exports, "proofingConfigSchema", { enumerable: true, get:
15
15
  Object.defineProperty(exports, "delegationConfigSchema", { enumerable: true, get: function () { return schemas_js_1.delegationConfigSchema; } });
16
16
  Object.defineProperty(exports, "toolProtectionConfigSchema", { enumerable: true, get: function () { return schemas_js_1.toolProtectionConfigSchema; } });
17
17
  Object.defineProperty(exports, "mergedToolProtectionConfigSchema", { enumerable: true, get: function () { return schemas_js_1.mergedToolProtectionConfigSchema; } });
18
- Object.defineProperty(exports, "auditConfigSchema", { enumerable: true, get: function () { return schemas_js_1.auditConfigSchema; } });
19
18
  Object.defineProperty(exports, "sessionConfigSchema", { enumerable: true, get: function () { return schemas_js_1.sessionConfigSchema; } });
20
19
  Object.defineProperty(exports, "platformConfigSchema", { enumerable: true, get: function () { return schemas_js_1.platformConfigSchema; } });
21
20
  Object.defineProperty(exports, "cloudflarePlatformConfigSchema", { enumerable: true, get: function () { return schemas_js_1.cloudflarePlatformConfigSchema; } });
@@ -1164,22 +1164,6 @@ export declare const mergedToolProtectionConfigSchema: z.ZodObject<{
1164
1164
  oauthProvider?: string | undefined;
1165
1165
  }> | undefined;
1166
1166
  }>;
1167
- /**
1168
- * Audit configuration schema
1169
- */
1170
- export declare const auditConfigSchema: z.ZodObject<{
1171
- enabled: z.ZodBoolean;
1172
- includeProofHashes: z.ZodBoolean;
1173
- includePayloads: z.ZodBoolean;
1174
- }, "strip", z.ZodTypeAny, {
1175
- enabled: boolean;
1176
- includeProofHashes: boolean;
1177
- includePayloads: boolean;
1178
- }, {
1179
- enabled: boolean;
1180
- includeProofHashes: boolean;
1181
- includePayloads: boolean;
1182
- }>;
1183
1167
  /**
1184
1168
  * Session configuration schema
1185
1169
  */
@@ -2175,19 +2159,6 @@ export declare const mcpIServerConfigSchema: z.ZodObject<{
2175
2159
  oauthProvider?: string | undefined;
2176
2160
  }> | undefined;
2177
2161
  }>;
2178
- audit: z.ZodObject<{
2179
- enabled: z.ZodBoolean;
2180
- includeProofHashes: z.ZodBoolean;
2181
- includePayloads: z.ZodBoolean;
2182
- }, "strip", z.ZodTypeAny, {
2183
- enabled: boolean;
2184
- includeProofHashes: boolean;
2185
- includePayloads: boolean;
2186
- }, {
2187
- enabled: boolean;
2188
- includeProofHashes: boolean;
2189
- includePayloads: boolean;
2190
- }>;
2191
2162
  session: z.ZodObject<{
2192
2163
  timestampSkewSeconds: z.ZodDefault<z.ZodNumber>;
2193
2164
  ttlMinutes: z.ZodDefault<z.ZodNumber>;
@@ -2644,11 +2615,6 @@ export declare const mcpIServerConfigSchema: z.ZodObject<{
2644
2615
  maxRetries: number;
2645
2616
  };
2646
2617
  };
2647
- audit: {
2648
- enabled: boolean;
2649
- includeProofHashes: boolean;
2650
- includePayloads: boolean;
2651
- };
2652
2618
  }, {
2653
2619
  metadata: {
2654
2620
  version: string;
@@ -2796,11 +2762,6 @@ export declare const mcpIServerConfigSchema: z.ZodObject<{
2796
2762
  maxRetries?: number | undefined;
2797
2763
  };
2798
2764
  };
2799
- audit: {
2800
- enabled: boolean;
2801
- includeProofHashes: boolean;
2802
- includePayloads: boolean;
2803
- };
2804
2765
  }>;
2805
2766
  /** Merged MCP-I Server Configuration schema @since 1.6.0 */
2806
2767
  export declare const mergedMcpIServerConfigSchema: z.ZodObject<{
@@ -2937,19 +2898,6 @@ export declare const mergedMcpIServerConfigSchema: z.ZodObject<{
2937
2898
  cacheTtl?: number | undefined;
2938
2899
  };
2939
2900
  }>;
2940
- audit: z.ZodObject<{
2941
- enabled: z.ZodBoolean;
2942
- includeProofHashes: z.ZodBoolean;
2943
- includePayloads: z.ZodBoolean;
2944
- }, "strip", z.ZodTypeAny, {
2945
- enabled: boolean;
2946
- includeProofHashes: boolean;
2947
- includePayloads: boolean;
2948
- }, {
2949
- enabled: boolean;
2950
- includeProofHashes: boolean;
2951
- includePayloads: boolean;
2952
- }>;
2953
2901
  session: z.ZodObject<{
2954
2902
  timestampSkewSeconds: z.ZodDefault<z.ZodNumber>;
2955
2903
  ttlMinutes: z.ZodDefault<z.ZodNumber>;
@@ -4121,11 +4069,6 @@ export declare const mergedMcpIServerConfigSchema: z.ZodObject<{
4121
4069
  maxRetries: number;
4122
4070
  };
4123
4071
  };
4124
- audit: {
4125
- enabled: boolean;
4126
- includeProofHashes: boolean;
4127
- includePayloads: boolean;
4128
- };
4129
4072
  }, {
4130
4073
  metadata: {
4131
4074
  version: string;
@@ -4321,11 +4264,6 @@ export declare const mergedMcpIServerConfigSchema: z.ZodObject<{
4321
4264
  maxRetries?: number | undefined;
4322
4265
  };
4323
4266
  };
4324
- audit: {
4325
- enabled: boolean;
4326
- includeProofHashes: boolean;
4327
- includePayloads: boolean;
4328
- };
4329
4267
  }>;
4330
4268
  /**
4331
4269
  * Get server config request schema
@@ -4822,19 +4760,6 @@ export declare const getServerConfigResponseSchema: z.ZodObject<{
4822
4760
  oauthProvider?: string | undefined;
4823
4761
  }> | undefined;
4824
4762
  }>;
4825
- audit: z.ZodObject<{
4826
- enabled: z.ZodBoolean;
4827
- includeProofHashes: z.ZodBoolean;
4828
- includePayloads: z.ZodBoolean;
4829
- }, "strip", z.ZodTypeAny, {
4830
- enabled: boolean;
4831
- includeProofHashes: boolean;
4832
- includePayloads: boolean;
4833
- }, {
4834
- enabled: boolean;
4835
- includeProofHashes: boolean;
4836
- includePayloads: boolean;
4837
- }>;
4838
4763
  session: z.ZodObject<{
4839
4764
  timestampSkewSeconds: z.ZodDefault<z.ZodNumber>;
4840
4765
  ttlMinutes: z.ZodDefault<z.ZodNumber>;
@@ -5291,11 +5216,6 @@ export declare const getServerConfigResponseSchema: z.ZodObject<{
5291
5216
  maxRetries: number;
5292
5217
  };
5293
5218
  };
5294
- audit: {
5295
- enabled: boolean;
5296
- includeProofHashes: boolean;
5297
- includePayloads: boolean;
5298
- };
5299
5219
  }, {
5300
5220
  metadata: {
5301
5221
  version: string;
@@ -5443,11 +5363,6 @@ export declare const getServerConfigResponseSchema: z.ZodObject<{
5443
5363
  maxRetries?: number | undefined;
5444
5364
  };
5445
5365
  };
5446
- audit: {
5447
- enabled: boolean;
5448
- includeProofHashes: boolean;
5449
- includePayloads: boolean;
5450
- };
5451
5366
  }>;
5452
5367
  }, "strip", z.ZodTypeAny, {
5453
5368
  config: {
@@ -5597,11 +5512,6 @@ export declare const getServerConfigResponseSchema: z.ZodObject<{
5597
5512
  maxRetries: number;
5598
5513
  };
5599
5514
  };
5600
- audit: {
5601
- enabled: boolean;
5602
- includeProofHashes: boolean;
5603
- includePayloads: boolean;
5604
- };
5605
5515
  };
5606
5516
  }, {
5607
5517
  config: {
@@ -5751,11 +5661,6 @@ export declare const getServerConfigResponseSchema: z.ZodObject<{
5751
5661
  maxRetries?: number | undefined;
5752
5662
  };
5753
5663
  };
5754
- audit: {
5755
- enabled: boolean;
5756
- includeProofHashes: boolean;
5757
- includePayloads: boolean;
5758
- };
5759
5664
  };
5760
5665
  }>;
5761
5666
  metadata: z.ZodOptional<z.ZodObject<{
@@ -5918,11 +5823,6 @@ export declare const getServerConfigResponseSchema: z.ZodObject<{
5918
5823
  maxRetries: number;
5919
5824
  };
5920
5825
  };
5921
- audit: {
5922
- enabled: boolean;
5923
- includeProofHashes: boolean;
5924
- includePayloads: boolean;
5925
- };
5926
5826
  };
5927
5827
  };
5928
5828
  metadata?: {
@@ -6079,11 +5979,6 @@ export declare const getServerConfigResponseSchema: z.ZodObject<{
6079
5979
  maxRetries?: number | undefined;
6080
5980
  };
6081
5981
  };
6082
- audit: {
6083
- enabled: boolean;
6084
- includeProofHashes: boolean;
6085
- includePayloads: boolean;
6086
- };
6087
5982
  };
6088
5983
  };
6089
5984
  metadata?: {
@@ -6229,19 +6124,6 @@ export declare const getMergedServerConfigResponseSchema: z.ZodObject<{
6229
6124
  cacheTtl?: number | undefined;
6230
6125
  };
6231
6126
  }>;
6232
- audit: z.ZodObject<{
6233
- enabled: z.ZodBoolean;
6234
- includeProofHashes: z.ZodBoolean;
6235
- includePayloads: z.ZodBoolean;
6236
- }, "strip", z.ZodTypeAny, {
6237
- enabled: boolean;
6238
- includeProofHashes: boolean;
6239
- includePayloads: boolean;
6240
- }, {
6241
- enabled: boolean;
6242
- includeProofHashes: boolean;
6243
- includePayloads: boolean;
6244
- }>;
6245
6127
  session: z.ZodObject<{
6246
6128
  timestampSkewSeconds: z.ZodDefault<z.ZodNumber>;
6247
6129
  ttlMinutes: z.ZodDefault<z.ZodNumber>;
@@ -7413,11 +7295,6 @@ export declare const getMergedServerConfigResponseSchema: z.ZodObject<{
7413
7295
  maxRetries: number;
7414
7296
  };
7415
7297
  };
7416
- audit: {
7417
- enabled: boolean;
7418
- includeProofHashes: boolean;
7419
- includePayloads: boolean;
7420
- };
7421
7298
  }, {
7422
7299
  metadata: {
7423
7300
  version: string;
@@ -7613,11 +7490,6 @@ export declare const getMergedServerConfigResponseSchema: z.ZodObject<{
7613
7490
  maxRetries?: number | undefined;
7614
7491
  };
7615
7492
  };
7616
- audit: {
7617
- enabled: boolean;
7618
- includeProofHashes: boolean;
7619
- includePayloads: boolean;
7620
- };
7621
7493
  }>;
7622
7494
  /** @deprecated Use config.toolProtection.tools instead */
7623
7495
  toolProtections: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -8040,11 +7912,6 @@ export declare const getMergedServerConfigResponseSchema: z.ZodObject<{
8040
7912
  maxRetries: number;
8041
7913
  };
8042
7914
  };
8043
- audit: {
8044
- enabled: boolean;
8045
- includeProofHashes: boolean;
8046
- includePayloads: boolean;
8047
- };
8048
7915
  };
8049
7916
  toolProtections?: Record<string, {
8050
7917
  requiresDelegation: boolean;
@@ -8290,11 +8157,6 @@ export declare const getMergedServerConfigResponseSchema: z.ZodObject<{
8290
8157
  maxRetries?: number | undefined;
8291
8158
  };
8292
8159
  };
8293
- audit: {
8294
- enabled: boolean;
8295
- includeProofHashes: boolean;
8296
- includePayloads: boolean;
8297
- };
8298
8160
  };
8299
8161
  toolProtections?: Record<string, {
8300
8162
  requiresDelegation: boolean;
@@ -8556,11 +8418,6 @@ export declare const getMergedServerConfigResponseSchema: z.ZodObject<{
8556
8418
  maxRetries: number;
8557
8419
  };
8558
8420
  };
8559
- audit: {
8560
- enabled: boolean;
8561
- includeProofHashes: boolean;
8562
- includePayloads: boolean;
8563
- };
8564
8421
  };
8565
8422
  toolProtections?: Record<string, {
8566
8423
  requiresDelegation: boolean;
@@ -8814,11 +8671,6 @@ export declare const getMergedServerConfigResponseSchema: z.ZodObject<{
8814
8671
  maxRetries?: number | undefined;
8815
8672
  };
8816
8673
  };
8817
- audit: {
8818
- enabled: boolean;
8819
- includeProofHashes: boolean;
8820
- includePayloads: boolean;
8821
- };
8822
8674
  };
8823
8675
  toolProtections?: Record<string, {
8824
8676
  requiresDelegation: boolean;
@@ -9359,19 +9211,6 @@ export declare const updateServerConfigRequestSchema: z.ZodObject<{
9359
9211
  oauthProvider?: string | undefined;
9360
9212
  }> | undefined;
9361
9213
  }>>;
9362
- audit: z.ZodOptional<z.ZodObject<{
9363
- enabled: z.ZodBoolean;
9364
- includeProofHashes: z.ZodBoolean;
9365
- includePayloads: z.ZodBoolean;
9366
- }, "strip", z.ZodTypeAny, {
9367
- enabled: boolean;
9368
- includeProofHashes: boolean;
9369
- includePayloads: boolean;
9370
- }, {
9371
- enabled: boolean;
9372
- includeProofHashes: boolean;
9373
- includePayloads: boolean;
9374
- }>>;
9375
9214
  session: z.ZodOptional<z.ZodObject<{
9376
9215
  timestampSkewSeconds: z.ZodDefault<z.ZodNumber>;
9377
9216
  ttlMinutes: z.ZodDefault<z.ZodNumber>;
@@ -9828,11 +9667,6 @@ export declare const updateServerConfigRequestSchema: z.ZodObject<{
9828
9667
  maxRetries: number;
9829
9668
  };
9830
9669
  } | undefined;
9831
- audit?: {
9832
- enabled: boolean;
9833
- includeProofHashes: boolean;
9834
- includePayloads: boolean;
9835
- } | undefined;
9836
9670
  }, {
9837
9671
  metadata?: {
9838
9672
  version: string;
@@ -9980,11 +9814,6 @@ export declare const updateServerConfigRequestSchema: z.ZodObject<{
9980
9814
  maxRetries?: number | undefined;
9981
9815
  };
9982
9816
  } | undefined;
9983
- audit?: {
9984
- enabled: boolean;
9985
- includeProofHashes: boolean;
9986
- includePayloads: boolean;
9987
- } | undefined;
9988
9817
  }>;
9989
9818
  }, "strip", z.ZodTypeAny, {
9990
9819
  projectId: string;
@@ -10135,11 +9964,6 @@ export declare const updateServerConfigRequestSchema: z.ZodObject<{
10135
9964
  maxRetries: number;
10136
9965
  };
10137
9966
  } | undefined;
10138
- audit?: {
10139
- enabled: boolean;
10140
- includeProofHashes: boolean;
10141
- includePayloads: boolean;
10142
- } | undefined;
10143
9967
  };
10144
9968
  }, {
10145
9969
  projectId: string;
@@ -10290,11 +10114,6 @@ export declare const updateServerConfigRequestSchema: z.ZodObject<{
10290
10114
  maxRetries?: number | undefined;
10291
10115
  };
10292
10116
  } | undefined;
10293
- audit?: {
10294
- enabled: boolean;
10295
- includeProofHashes: boolean;
10296
- includePayloads: boolean;
10297
- } | undefined;
10298
10117
  };
10299
10118
  }>;
10300
10119
  /**
@@ -10782,19 +10601,6 @@ export declare const updateServerConfigResponseSchema: z.ZodObject<{
10782
10601
  oauthProvider?: string | undefined;
10783
10602
  }> | undefined;
10784
10603
  }>;
10785
- audit: z.ZodObject<{
10786
- enabled: z.ZodBoolean;
10787
- includeProofHashes: z.ZodBoolean;
10788
- includePayloads: z.ZodBoolean;
10789
- }, "strip", z.ZodTypeAny, {
10790
- enabled: boolean;
10791
- includeProofHashes: boolean;
10792
- includePayloads: boolean;
10793
- }, {
10794
- enabled: boolean;
10795
- includeProofHashes: boolean;
10796
- includePayloads: boolean;
10797
- }>;
10798
10604
  session: z.ZodObject<{
10799
10605
  timestampSkewSeconds: z.ZodDefault<z.ZodNumber>;
10800
10606
  ttlMinutes: z.ZodDefault<z.ZodNumber>;
@@ -11251,11 +11057,6 @@ export declare const updateServerConfigResponseSchema: z.ZodObject<{
11251
11057
  maxRetries: number;
11252
11058
  };
11253
11059
  };
11254
- audit: {
11255
- enabled: boolean;
11256
- includeProofHashes: boolean;
11257
- includePayloads: boolean;
11258
- };
11259
11060
  }, {
11260
11061
  metadata: {
11261
11062
  version: string;
@@ -11403,11 +11204,6 @@ export declare const updateServerConfigResponseSchema: z.ZodObject<{
11403
11204
  maxRetries?: number | undefined;
11404
11205
  };
11405
11206
  };
11406
- audit: {
11407
- enabled: boolean;
11408
- includeProofHashes: boolean;
11409
- includePayloads: boolean;
11410
- };
11411
11207
  }>;
11412
11208
  changes: z.ZodArray<z.ZodObject<{
11413
11209
  path: z.ZodString;
@@ -11575,11 +11371,6 @@ export declare const updateServerConfigResponseSchema: z.ZodObject<{
11575
11371
  maxRetries: number;
11576
11372
  };
11577
11373
  };
11578
- audit: {
11579
- enabled: boolean;
11580
- includeProofHashes: boolean;
11581
- includePayloads: boolean;
11582
- };
11583
11374
  };
11584
11375
  }, {
11585
11376
  changes: {
@@ -11734,11 +11525,6 @@ export declare const updateServerConfigResponseSchema: z.ZodObject<{
11734
11525
  maxRetries?: number | undefined;
11735
11526
  };
11736
11527
  };
11737
- audit: {
11738
- enabled: boolean;
11739
- includeProofHashes: boolean;
11740
- includePayloads: boolean;
11741
- };
11742
11528
  };
11743
11529
  }>;
11744
11530
  metadata: z.ZodOptional<z.ZodObject<{
@@ -11906,11 +11692,6 @@ export declare const updateServerConfigResponseSchema: z.ZodObject<{
11906
11692
  maxRetries: number;
11907
11693
  };
11908
11694
  };
11909
- audit: {
11910
- enabled: boolean;
11911
- includeProofHashes: boolean;
11912
- includePayloads: boolean;
11913
- };
11914
11695
  };
11915
11696
  };
11916
11697
  metadata?: {
@@ -12072,11 +11853,6 @@ export declare const updateServerConfigResponseSchema: z.ZodObject<{
12072
11853
  maxRetries?: number | undefined;
12073
11854
  };
12074
11855
  };
12075
- audit: {
12076
- enabled: boolean;
12077
- includeProofHashes: boolean;
12078
- includePayloads: boolean;
12079
- };
12080
11856
  };
12081
11857
  };
12082
11858
  metadata?: {
@@ -12568,19 +12344,6 @@ export declare const validateServerConfigRequestSchema: z.ZodObject<{
12568
12344
  oauthProvider?: string | undefined;
12569
12345
  }> | undefined;
12570
12346
  }>>;
12571
- audit: z.ZodOptional<z.ZodObject<{
12572
- enabled: z.ZodBoolean;
12573
- includeProofHashes: z.ZodBoolean;
12574
- includePayloads: z.ZodBoolean;
12575
- }, "strip", z.ZodTypeAny, {
12576
- enabled: boolean;
12577
- includeProofHashes: boolean;
12578
- includePayloads: boolean;
12579
- }, {
12580
- enabled: boolean;
12581
- includeProofHashes: boolean;
12582
- includePayloads: boolean;
12583
- }>>;
12584
12347
  session: z.ZodOptional<z.ZodObject<{
12585
12348
  timestampSkewSeconds: z.ZodDefault<z.ZodNumber>;
12586
12349
  ttlMinutes: z.ZodDefault<z.ZodNumber>;
@@ -13037,11 +12800,6 @@ export declare const validateServerConfigRequestSchema: z.ZodObject<{
13037
12800
  maxRetries: number;
13038
12801
  };
13039
12802
  } | undefined;
13040
- audit?: {
13041
- enabled: boolean;
13042
- includeProofHashes: boolean;
13043
- includePayloads: boolean;
13044
- } | undefined;
13045
12803
  }, {
13046
12804
  metadata?: {
13047
12805
  version: string;
@@ -13189,11 +12947,6 @@ export declare const validateServerConfigRequestSchema: z.ZodObject<{
13189
12947
  maxRetries?: number | undefined;
13190
12948
  };
13191
12949
  } | undefined;
13192
- audit?: {
13193
- enabled: boolean;
13194
- includeProofHashes: boolean;
13195
- includePayloads: boolean;
13196
- } | undefined;
13197
12950
  }>;
13198
12951
  }, "strip", z.ZodTypeAny, {
13199
12952
  projectId: string;
@@ -13344,11 +13097,6 @@ export declare const validateServerConfigRequestSchema: z.ZodObject<{
13344
13097
  maxRetries: number;
13345
13098
  };
13346
13099
  } | undefined;
13347
- audit?: {
13348
- enabled: boolean;
13349
- includeProofHashes: boolean;
13350
- includePayloads: boolean;
13351
- } | undefined;
13352
13100
  };
13353
13101
  }, {
13354
13102
  projectId: string;
@@ -13499,11 +13247,6 @@ export declare const validateServerConfigRequestSchema: z.ZodObject<{
13499
13247
  maxRetries?: number | undefined;
13500
13248
  };
13501
13249
  } | undefined;
13502
- audit?: {
13503
- enabled: boolean;
13504
- includeProofHashes: boolean;
13505
- includePayloads: boolean;
13506
- } | undefined;
13507
13250
  };
13508
13251
  }>;
13509
13252
  /**
@@ -8,7 +8,7 @@
8
8
  * @package @kya-os/contracts/dashboard-config
9
9
  */
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.validateServerConfigResponseSchema = exports.validateServerConfigRequestSchema = exports.updateServerConfigResponseSchema = exports.updateServerConfigRequestSchema = exports.getMergedServerConfigResponseSchema = exports.getServerConfigResponseSchema = exports.getServerConfigRequestSchema = exports.mergedMcpIServerConfigSchema = exports.mcpIServerConfigSchema = exports.configMetadataSchema = exports.platformConfigSchema = exports.vercelPlatformConfigSchema = exports.nodePlatformConfigSchema = exports.cloudflarePlatformConfigSchema = exports.sessionConfigSchema = exports.auditConfigSchema = exports.mergedToolProtectionConfigSchema = exports.toolProtectionConfigSchema = exports.delegationConfigSchema = exports.proofingConfigSchema = exports.identityConfigSchema = void 0;
11
+ exports.validateServerConfigResponseSchema = exports.validateServerConfigRequestSchema = exports.updateServerConfigResponseSchema = exports.updateServerConfigRequestSchema = exports.getMergedServerConfigResponseSchema = exports.getServerConfigResponseSchema = exports.getServerConfigRequestSchema = exports.mergedMcpIServerConfigSchema = exports.mcpIServerConfigSchema = exports.configMetadataSchema = exports.platformConfigSchema = exports.vercelPlatformConfigSchema = exports.nodePlatformConfigSchema = exports.cloudflarePlatformConfigSchema = exports.sessionConfigSchema = exports.mergedToolProtectionConfigSchema = exports.toolProtectionConfigSchema = exports.delegationConfigSchema = exports.proofingConfigSchema = exports.identityConfigSchema = void 0;
12
12
  const zod_1 = require("zod");
13
13
  const index_js_1 = require("../tool-protection/index.js");
14
14
  /**
@@ -84,14 +84,6 @@ exports.toolProtectionConfigSchema = zod_1.z.object({
84
84
  exports.mergedToolProtectionConfigSchema = exports.toolProtectionConfigSchema.extend({
85
85
  tools: index_js_1.ToolProtectionMapSchema,
86
86
  });
87
- /**
88
- * Audit configuration schema
89
- */
90
- exports.auditConfigSchema = zod_1.z.object({
91
- enabled: zod_1.z.boolean(),
92
- includeProofHashes: zod_1.z.boolean(),
93
- includePayloads: zod_1.z.boolean(),
94
- });
95
87
  /**
96
88
  * Session configuration schema
97
89
  */
@@ -178,7 +170,6 @@ exports.mcpIServerConfigSchema = zod_1.z.object({
178
170
  proofing: exports.proofingConfigSchema,
179
171
  delegation: exports.delegationConfigSchema,
180
172
  toolProtection: exports.toolProtectionConfigSchema,
181
- audit: exports.auditConfigSchema,
182
173
  session: exports.sessionConfigSchema,
183
174
  platform: exports.platformConfigSchema,
184
175
  metadata: exports.configMetadataSchema,
@@ -120,21 +120,6 @@ export interface MCPIServerConfig {
120
120
  */
121
121
  fallback?: ToolProtectionMap;
122
122
  };
123
- audit: {
124
- /**
125
- * Enable audit logging
126
- */
127
- enabled: boolean;
128
- /**
129
- * Include proof hashes in logs
130
- */
131
- includeProofHashes: boolean;
132
- /**
133
- * Include full payloads in logs
134
- * WARNING: May include sensitive data
135
- */
136
- includePayloads: boolean;
137
- };
138
123
  session: {
139
124
  /**
140
125
  * Maximum time skew allowed (seconds)
@@ -0,0 +1,17 @@
1
+ export interface FleetPrincipal {
2
+ orgId: string;
3
+ subject: string;
4
+ }
5
+ export type FleetAuthenticator = (authorization: string | undefined) => FleetPrincipal | null;
6
+ export interface FleetAgentIdentity {
7
+ did: string;
8
+ name: string;
9
+ capabilities?: readonly string[];
10
+ }
11
+ /**
12
+ * Build a fail-closed authenticator from deployment-managed credential hashes.
13
+ * Plaintext bearer tokens are never stored in configuration or logs.
14
+ */
15
+ export declare function createFleetAuthenticator(rawConfiguration: string | undefined): FleetAuthenticator;
16
+ /** Resolve a target only within an already tenant-filtered agent collection. */
17
+ export declare function resolveFleetAgent(agents: readonly FleetAgentIdentity[], target: string): string | null;
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createFleetAuthenticator = createFleetAuthenticator;
4
+ exports.resolveFleetAgent = resolveFleetAgent;
5
+ const node_crypto_1 = require("node:crypto");
6
+ /**
7
+ * Build a fail-closed authenticator from deployment-managed credential hashes.
8
+ * Plaintext bearer tokens are never stored in configuration or logs.
9
+ */
10
+ function createFleetAuthenticator(rawConfiguration) {
11
+ if (!rawConfiguration) {
12
+ throw new Error("FLEET_MCP_CREDENTIALS_JSON is required");
13
+ }
14
+ let decoded;
15
+ try {
16
+ decoded = JSON.parse(rawConfiguration);
17
+ }
18
+ catch {
19
+ throw new Error("FLEET_MCP_CREDENTIALS_JSON must be valid JSON");
20
+ }
21
+ if (!Array.isArray(decoded) || decoded.length === 0) {
22
+ throw new Error("FLEET_MCP_CREDENTIALS_JSON must contain at least one credential");
23
+ }
24
+ const credentials = new Map();
25
+ for (const [index, candidate] of decoded.entries()) {
26
+ if (!isRecord(candidate)) {
27
+ throw new Error(`Fleet credential ${index} must be an object`);
28
+ }
29
+ const tokenSha256 = candidate.tokenSha256;
30
+ const orgId = candidate.orgId;
31
+ const subject = candidate.subject;
32
+ if (typeof tokenSha256 !== "string" ||
33
+ !/^[a-f0-9]{64}$/.test(tokenSha256)) {
34
+ throw new Error(`Fleet credential ${index} tokenSha256 must be lowercase SHA-256 hex`);
35
+ }
36
+ if (typeof orgId !== "string" || orgId.trim().length === 0) {
37
+ throw new Error(`Fleet credential ${index} orgId must be non-empty`);
38
+ }
39
+ if (typeof subject !== "string" || subject.trim().length === 0) {
40
+ throw new Error(`Fleet credential ${index} subject must be non-empty`);
41
+ }
42
+ if (credentials.has(tokenSha256)) {
43
+ throw new Error("Duplicate Fleet credential hash");
44
+ }
45
+ credentials.set(tokenSha256, {
46
+ orgId: orgId.trim(),
47
+ subject: subject.trim(),
48
+ });
49
+ }
50
+ return (authorization) => {
51
+ const match = authorization?.match(/^Bearer ([^\s]+)$/);
52
+ if (!match || match[1].length < 32 || match[1].length > 512)
53
+ return null;
54
+ const digest = (0, node_crypto_1.createHash)("sha256").update(match[1], "utf8").digest("hex");
55
+ const principal = credentials.get(digest);
56
+ return principal ? { ...principal } : null;
57
+ };
58
+ }
59
+ /** Resolve a target only within an already tenant-filtered agent collection. */
60
+ function resolveFleetAgent(agents, target) {
61
+ const normalized = target.toLowerCase();
62
+ return (agents.find((agent) => agent.did === target)?.did ??
63
+ agents.find((agent) => agent.name.toLowerCase() === normalized)?.did ??
64
+ agents.find((agent) => agent.capabilities?.some((capability) => capability.toLowerCase() === normalized))?.did ??
65
+ null);
66
+ }
67
+ function isRecord(value) {
68
+ return typeof value === "object" && value !== null && !Array.isArray(value);
69
+ }
package/dist/index.d.ts CHANGED
@@ -21,7 +21,6 @@ export * from "./test.js";
21
21
  export * from "./utils/validation.js";
22
22
  export * from "./vc/index.js";
23
23
  export * from "./delegation/index.js";
24
- export * from "./audit/index.js";
25
24
  export * from "./policy/index.js";
26
25
  export * from "./pairing/index.js";
27
26
  export declare const CONTRACTS_VERSION = "1.2.1";
package/dist/index.js CHANGED
@@ -40,8 +40,6 @@ __exportStar(require("./utils/validation.js"), exports);
40
40
  // W3C VC and Delegation exports (for mcp-i-core compatibility)
41
41
  __exportStar(require("./vc/index.js"), exports);
42
42
  __exportStar(require("./delegation/index.js"), exports);
43
- // Audit types (platform-agnostic)
44
- __exportStar(require("./audit/index.js"), exports);
45
43
  // Policy types (for mcp-i-core compatibility with webpack alias)
46
44
  __exportStar(require("./policy/index.js"), exports);
47
45
  // Pairing WS event types (compute → dashboard)
@@ -7,4 +7,3 @@
7
7
  */
8
8
  export { ENV_VAR_PATTERN, envVarNameSchema, upsertSecretSchema, resolveSecretsRequestSchema, resolveSecretsResponseSchema } from './schemas';
9
9
  export type { UpsertSecretInput, ResolveSecretsRequest, ResolveSecretsResponse } from './types';
10
- export { VAULT_AUDIT_EVENTS, type VaultAuditEvent } from './audit-events';
@@ -7,12 +7,10 @@
7
7
  * @module @kya-os/contracts/vault
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.VAULT_AUDIT_EVENTS = exports.resolveSecretsResponseSchema = exports.resolveSecretsRequestSchema = exports.upsertSecretSchema = exports.envVarNameSchema = exports.ENV_VAR_PATTERN = void 0;
10
+ exports.resolveSecretsResponseSchema = exports.resolveSecretsRequestSchema = exports.upsertSecretSchema = exports.envVarNameSchema = exports.ENV_VAR_PATTERN = void 0;
11
11
  var schemas_1 = require("./schemas");
12
12
  Object.defineProperty(exports, "ENV_VAR_PATTERN", { enumerable: true, get: function () { return schemas_1.ENV_VAR_PATTERN; } });
13
13
  Object.defineProperty(exports, "envVarNameSchema", { enumerable: true, get: function () { return schemas_1.envVarNameSchema; } });
14
14
  Object.defineProperty(exports, "upsertSecretSchema", { enumerable: true, get: function () { return schemas_1.upsertSecretSchema; } });
15
15
  Object.defineProperty(exports, "resolveSecretsRequestSchema", { enumerable: true, get: function () { return schemas_1.resolveSecretsRequestSchema; } });
16
16
  Object.defineProperty(exports, "resolveSecretsResponseSchema", { enumerable: true, get: function () { return schemas_1.resolveSecretsResponseSchema; } });
17
- var audit_events_1 = require("./audit-events");
18
- Object.defineProperty(exports, "VAULT_AUDIT_EVENTS", { enumerable: true, get: function () { return audit_events_1.VAULT_AUDIT_EVENTS; } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kya-os/contracts",
3
- "version": "1.9.1",
3
+ "version": "1.10.0",
4
4
  "description": "Shared contracts, types, and schemas for MCP-I framework",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -25,6 +25,10 @@
25
25
  "types": "./dist/runtime/index.d.ts",
26
26
  "default": "./dist/runtime/index.js"
27
27
  },
28
+ "./fleet": {
29
+ "types": "./dist/fleet/index.d.ts",
30
+ "default": "./dist/fleet/index.js"
31
+ },
28
32
  "./proof": {
29
33
  "types": "./dist/proof/index.d.ts",
30
34
  "default": "./dist/proof/index.js"
@@ -1,21 +0,0 @@
1
- /**
2
- * Vault Audit Event Taxonomy
3
- *
4
- * Constants for audit logging of vault operations.
5
- *
6
- * @module @kya-os/contracts/vault
7
- */
8
- /** Audit events emitted by the vault system */
9
- export declare const VAULT_AUDIT_EVENTS: {
10
- /** A secret was created or updated */
11
- readonly SECRET_UPSERTED: "vault.secret.upserted";
12
- /** A secret was deleted */
13
- readonly SECRET_DELETED: "vault.secret.deleted";
14
- /** A runtime secret resolution was requested */
15
- readonly RESOLVE_REQUESTED: "vault.secret.resolve.requested";
16
- /** A runtime secret resolution was granted */
17
- readonly RESOLVE_GRANTED: "vault.secret.resolve.granted";
18
- /** A runtime secret resolution was denied */
19
- readonly RESOLVE_DENIED: "vault.secret.resolve.denied";
20
- };
21
- export type VaultAuditEvent = (typeof VAULT_AUDIT_EVENTS)[keyof typeof VAULT_AUDIT_EVENTS];
@@ -1,23 +0,0 @@
1
- "use strict";
2
- /**
3
- * Vault Audit Event Taxonomy
4
- *
5
- * Constants for audit logging of vault operations.
6
- *
7
- * @module @kya-os/contracts/vault
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.VAULT_AUDIT_EVENTS = void 0;
11
- /** Audit events emitted by the vault system */
12
- exports.VAULT_AUDIT_EVENTS = {
13
- /** A secret was created or updated */
14
- SECRET_UPSERTED: 'vault.secret.upserted',
15
- /** A secret was deleted */
16
- SECRET_DELETED: 'vault.secret.deleted',
17
- /** A runtime secret resolution was requested */
18
- RESOLVE_REQUESTED: 'vault.secret.resolve.requested',
19
- /** A runtime secret resolution was granted */
20
- RESOLVE_GRANTED: 'vault.secret.resolve.granted',
21
- /** A runtime secret resolution was denied */
22
- RESOLVE_DENIED: 'vault.secret.resolve.denied',
23
- };