@kya-os/contracts 1.5.2-canary.4 → 1.5.2-canary.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/dist/agentshield-api/endpoints.d.ts +50 -0
  2. package/dist/agentshield-api/endpoints.js +46 -0
  3. package/dist/agentshield-api/index.d.ts +13 -0
  4. package/dist/agentshield-api/index.js +37 -0
  5. package/dist/agentshield-api/schemas.d.ts +6032 -0
  6. package/dist/agentshield-api/schemas.js +240 -0
  7. package/dist/agentshield-api/types.d.ts +231 -0
  8. package/dist/agentshield-api/types.js +26 -0
  9. package/dist/cli.d.ts +388 -0
  10. package/dist/cli.js +121 -0
  11. package/dist/config/base.d.ts +96 -0
  12. package/dist/config/base.js +11 -0
  13. package/dist/config/builder.d.ts +33 -0
  14. package/dist/config/builder.js +74 -0
  15. package/dist/config/delegation.d.ts +194 -0
  16. package/dist/config/delegation.js +10 -0
  17. package/dist/config/identity.d.ts +116 -0
  18. package/dist/config/identity.js +10 -0
  19. package/dist/config/index.d.ts +34 -0
  20. package/dist/config/index.js +14 -0
  21. package/dist/config/proofing.d.ts +120 -0
  22. package/dist/config/proofing.js +10 -0
  23. package/dist/config/tool-protection.d.ts +139 -0
  24. package/dist/config/tool-protection.js +10 -0
  25. package/dist/consent/index.d.ts +6 -0
  26. package/dist/consent/index.js +22 -0
  27. package/dist/consent/schemas.d.ts +738 -0
  28. package/dist/consent/schemas.js +186 -0
  29. package/dist/consent/types.d.ts +155 -0
  30. package/dist/consent/types.js +10 -0
  31. package/dist/dashboard-config/default-config.d.ts +49 -0
  32. package/dist/dashboard-config/default-config.js +240 -0
  33. package/dist/dashboard-config/index.d.ts +10 -0
  34. package/dist/dashboard-config/index.js +35 -0
  35. package/dist/dashboard-config/schemas.d.ts +5904 -0
  36. package/dist/dashboard-config/schemas.js +254 -0
  37. package/dist/dashboard-config/types.d.ts +337 -0
  38. package/dist/dashboard-config/types.js +10 -0
  39. package/dist/delegation/constraints.d.ts +1021 -0
  40. package/dist/delegation/constraints.js +218 -0
  41. package/dist/delegation/index.d.ts +7 -0
  42. package/dist/delegation/index.js +23 -0
  43. package/dist/delegation/schemas.d.ts +8457 -0
  44. package/dist/delegation/schemas.js +475 -0
  45. package/dist/did/index.d.ts +8 -0
  46. package/dist/did/index.js +24 -0
  47. package/dist/did/resolve-contract.d.ts +219 -0
  48. package/dist/did/resolve-contract.js +31 -0
  49. package/dist/did/schemas.d.ts +112 -0
  50. package/dist/did/schemas.js +172 -0
  51. package/dist/did/types.d.ts +163 -0
  52. package/dist/did/types.js +70 -0
  53. package/dist/env/constants.d.ts +57 -0
  54. package/dist/env/constants.js +59 -0
  55. package/dist/env/index.d.ts +4 -0
  56. package/dist/env/index.js +20 -0
  57. package/dist/handshake.d.ts +172 -0
  58. package/dist/handshake.js +60 -0
  59. package/dist/index.d.ts +25 -0
  60. package/dist/index.js +55 -0
  61. package/dist/proof/index.d.ts +9 -0
  62. package/dist/proof/index.js +38 -0
  63. package/dist/proof/proof-record.d.ts +837 -0
  64. package/dist/proof/proof-record.js +133 -0
  65. package/dist/proof/signing-spec.d.ts +146 -0
  66. package/dist/proof/signing-spec.js +122 -0
  67. package/dist/proof.d.ts +414 -0
  68. package/dist/proof.js +82 -0
  69. package/dist/registry.d.ts +342 -0
  70. package/dist/registry.js +118 -0
  71. package/dist/runtime/errors.d.ts +347 -0
  72. package/dist/runtime/errors.js +119 -0
  73. package/dist/runtime/headers.d.ts +83 -0
  74. package/dist/runtime/headers.js +81 -0
  75. package/dist/runtime/index.d.ts +5 -0
  76. package/dist/runtime/index.js +21 -0
  77. package/dist/test.d.ts +251 -0
  78. package/dist/test.js +119 -0
  79. package/dist/tlkrc/index.d.ts +4 -0
  80. package/dist/tlkrc/index.js +20 -0
  81. package/dist/tlkrc/rotation.d.ts +245 -0
  82. package/dist/tlkrc/rotation.js +126 -0
  83. package/dist/tool-protection/index.d.ts +227 -0
  84. package/dist/tool-protection/index.js +113 -0
  85. package/dist/utils/validation.d.ts +30 -0
  86. package/dist/utils/validation.js +69 -0
  87. package/dist/vc/index.d.ts +7 -0
  88. package/dist/vc/index.js +23 -0
  89. package/dist/vc/schemas.d.ts +2483 -0
  90. package/dist/vc/schemas.js +224 -0
  91. package/dist/vc/statuslist.d.ts +493 -0
  92. package/dist/vc/statuslist.js +132 -0
  93. package/dist/verifier.d.ts +205 -0
  94. package/dist/verifier.js +83 -0
  95. package/dist/well-known/index.d.ts +308 -0
  96. package/dist/well-known/index.js +134 -0
  97. package/package.json +1 -1
@@ -0,0 +1,254 @@
1
+ "use strict";
2
+ /**
3
+ * Dashboard Configuration Zod Schemas
4
+ *
5
+ * Runtime validation schemas for dashboard configuration types.
6
+ * Used for validating API requests and responses.
7
+ *
8
+ * @package @kya-os/contracts/dashboard-config
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.validateServerConfigResponseSchema = exports.validateServerConfigRequestSchema = exports.updateServerConfigResponseSchema = exports.updateServerConfigRequestSchema = exports.getServerConfigResponseSchema = exports.getServerConfigRequestSchema = exports.mcpIServerConfigSchema = exports.configMetadataSchema = exports.platformConfigSchema = exports.vercelPlatformConfigSchema = exports.nodePlatformConfigSchema = exports.cloudflarePlatformConfigSchema = exports.sessionConfigSchema = exports.auditConfigSchema = exports.toolProtectionConfigSchema = exports.delegationConfigSchema = exports.proofingConfigSchema = exports.identityConfigSchema = void 0;
12
+ const zod_1 = require("zod");
13
+ const index_js_1 = require("../tool-protection/index.js");
14
+ /**
15
+ * Identity configuration schema
16
+ */
17
+ exports.identityConfigSchema = zod_1.z.object({
18
+ /**
19
+ * @deprecated Use serverDid instead. Will be removed in v2.0
20
+ */
21
+ agentDid: zod_1.z.string().min(1).optional(),
22
+ serverDid: zod_1.z.string().min(1),
23
+ environment: zod_1.z.enum(['development', 'production']),
24
+ storageLocation: zod_1.z.enum(['cloudflare-kv', 'file-system', 'env-vars']),
25
+ });
26
+ /**
27
+ * Proofing configuration schema
28
+ */
29
+ exports.proofingConfigSchema = zod_1.z.object({
30
+ enabled: zod_1.z.boolean(),
31
+ destinations: zod_1.z.array(zod_1.z.object({
32
+ type: zod_1.z.enum(['agentshield', 'kta', 'custom']),
33
+ apiUrl: zod_1.z.string().url(),
34
+ apiKey: zod_1.z.string().optional(),
35
+ })),
36
+ batchQueue: zod_1.z.object({
37
+ maxBatchSize: zod_1.z.number().int().positive().default(10),
38
+ flushIntervalMs: zod_1.z.number().int().positive().default(5000),
39
+ maxRetries: zod_1.z.number().int().nonnegative().default(3),
40
+ }),
41
+ });
42
+ /**
43
+ * Delegation verifier type schema
44
+ */
45
+ const delegationVerifierTypeSchema = zod_1.z.enum([
46
+ 'agentshield',
47
+ 'kta',
48
+ 'memory',
49
+ 'cloudflare-kv',
50
+ 'redis',
51
+ 'dynamodb',
52
+ 'custom',
53
+ ]);
54
+ /**
55
+ * Delegation configuration schema
56
+ */
57
+ exports.delegationConfigSchema = zod_1.z.object({
58
+ enabled: zod_1.z.boolean(),
59
+ enforceStrictly: zod_1.z.boolean(),
60
+ verifier: zod_1.z.object({
61
+ type: delegationVerifierTypeSchema,
62
+ apiUrl: zod_1.z.string().url().optional(),
63
+ cacheTtl: zod_1.z.number().int().positive().optional(),
64
+ }),
65
+ authorization: zod_1.z.object({
66
+ authorizationUrl: zod_1.z.string().url().optional(),
67
+ minReputationScore: zod_1.z.number().int().min(0).max(100).optional(),
68
+ resumeTokenTtl: zod_1.z.number().int().positive().optional(),
69
+ requireAuthForUnknown: zod_1.z.boolean().optional(),
70
+ }),
71
+ });
72
+ /**
73
+ * Tool protection configuration schema
74
+ */
75
+ exports.toolProtectionConfigSchema = zod_1.z.object({
76
+ source: zod_1.z.enum(['agentshield', 'inline', 'file']),
77
+ agentShield: zod_1.z.object({
78
+ apiUrl: zod_1.z.string().url(),
79
+ cacheTtl: zod_1.z.number().int().positive(),
80
+ }).optional(),
81
+ fallback: index_js_1.ToolProtectionMapSchema.optional(),
82
+ });
83
+ /**
84
+ * Audit configuration schema
85
+ */
86
+ exports.auditConfigSchema = zod_1.z.object({
87
+ enabled: zod_1.z.boolean(),
88
+ includeProofHashes: zod_1.z.boolean(),
89
+ includePayloads: zod_1.z.boolean(),
90
+ });
91
+ /**
92
+ * Session configuration schema
93
+ */
94
+ exports.sessionConfigSchema = zod_1.z.object({
95
+ timestampSkewSeconds: zod_1.z.number().int().positive().default(120),
96
+ ttlMinutes: zod_1.z.number().int().positive().default(30),
97
+ absoluteLifetime: zod_1.z.number().int().positive().optional(),
98
+ });
99
+ /**
100
+ * Cloudflare platform configuration schema
101
+ */
102
+ exports.cloudflarePlatformConfigSchema = zod_1.z.object({
103
+ workers: zod_1.z.object({
104
+ cpuMs: zod_1.z.number().int().positive().default(50),
105
+ memoryMb: zod_1.z.number().int().positive().default(128),
106
+ }),
107
+ kvNamespaces: zod_1.z.array(zod_1.z.object({
108
+ name: zod_1.z.string().min(1),
109
+ purpose: zod_1.z.enum(['sessions', 'delegations', 'cache', 'general']),
110
+ })),
111
+ environmentVariables: zod_1.z.array(zod_1.z.object({
112
+ name: zod_1.z.string().min(1),
113
+ value: zod_1.z.string(),
114
+ source: zod_1.z.enum(['wrangler.toml', 'secrets', '.dev.vars']),
115
+ })),
116
+ });
117
+ /**
118
+ * Node.js platform configuration schema
119
+ */
120
+ exports.nodePlatformConfigSchema = zod_1.z.object({
121
+ server: zod_1.z.object({
122
+ port: zod_1.z.number().int().positive().default(3000),
123
+ host: zod_1.z.string().default('0.0.0.0'),
124
+ cors: zod_1.z.boolean().default(true),
125
+ timeout: zod_1.z.number().int().positive().default(30000),
126
+ }),
127
+ storage: zod_1.z.object({
128
+ type: zod_1.z.enum(['memory', 'redis', 'postgres', 'mongodb']),
129
+ connection: zod_1.z.object({
130
+ host: zod_1.z.string().optional(),
131
+ port: zod_1.z.number().int().positive().optional(),
132
+ database: zod_1.z.string().optional(),
133
+ }).optional(),
134
+ }),
135
+ });
136
+ /**
137
+ * Vercel platform configuration schema
138
+ */
139
+ exports.vercelPlatformConfigSchema = zod_1.z.object({
140
+ environmentVariables: zod_1.z.array(zod_1.z.object({
141
+ name: zod_1.z.string().min(1),
142
+ value: zod_1.z.string(),
143
+ source: zod_1.z.enum(['vercel-dashboard', '.env.local']),
144
+ })),
145
+ edgeRuntime: zod_1.z.object({
146
+ maxDuration: zod_1.z.number().int().positive().optional(),
147
+ regions: zod_1.z.array(zod_1.z.string()).optional(),
148
+ }).optional(),
149
+ });
150
+ /**
151
+ * Platform configuration schema
152
+ */
153
+ exports.platformConfigSchema = zod_1.z.object({
154
+ type: zod_1.z.enum(['cloudflare', 'node', 'vercel']),
155
+ cloudflare: exports.cloudflarePlatformConfigSchema.optional(),
156
+ node: exports.nodePlatformConfigSchema.optional(),
157
+ vercel: exports.vercelPlatformConfigSchema.optional(),
158
+ });
159
+ /**
160
+ * Metadata schema
161
+ */
162
+ exports.configMetadataSchema = zod_1.z.object({
163
+ version: zod_1.z.string(),
164
+ lastUpdated: zod_1.z.string(),
165
+ source: zod_1.z.enum(['dashboard', 'code', 'mixed']),
166
+ serverUrl: zod_1.z.string().url().optional(),
167
+ deploymentStatus: zod_1.z.enum(['active', 'inactive', 'error']).optional(),
168
+ });
169
+ /**
170
+ * Complete MCP-I Server Configuration schema
171
+ */
172
+ exports.mcpIServerConfigSchema = zod_1.z.object({
173
+ identity: exports.identityConfigSchema,
174
+ proofing: exports.proofingConfigSchema,
175
+ delegation: exports.delegationConfigSchema,
176
+ toolProtection: exports.toolProtectionConfigSchema,
177
+ audit: exports.auditConfigSchema,
178
+ session: exports.sessionConfigSchema,
179
+ platform: exports.platformConfigSchema,
180
+ metadata: exports.configMetadataSchema,
181
+ });
182
+ /**
183
+ * Get server config request schema
184
+ */
185
+ exports.getServerConfigRequestSchema = zod_1.z.object({
186
+ projectId: zod_1.z.string().min(1),
187
+ });
188
+ /**
189
+ * Get server config response schema
190
+ */
191
+ exports.getServerConfigResponseSchema = zod_1.z.object({
192
+ success: zod_1.z.boolean(),
193
+ data: zod_1.z.object({
194
+ config: exports.mcpIServerConfigSchema,
195
+ }),
196
+ metadata: zod_1.z.object({
197
+ requestId: zod_1.z.string().optional(),
198
+ timestamp: zod_1.z.string().optional(),
199
+ }).optional(),
200
+ });
201
+ /**
202
+ * Update server config request schema
203
+ */
204
+ exports.updateServerConfigRequestSchema = zod_1.z.object({
205
+ projectId: zod_1.z.string().min(1),
206
+ config: exports.mcpIServerConfigSchema.partial(),
207
+ });
208
+ /**
209
+ * Update server config response schema
210
+ */
211
+ exports.updateServerConfigResponseSchema = zod_1.z.object({
212
+ success: zod_1.z.boolean(),
213
+ data: zod_1.z.object({
214
+ config: exports.mcpIServerConfigSchema,
215
+ changes: zod_1.z.array(zod_1.z.object({
216
+ path: zod_1.z.string(),
217
+ oldValue: zod_1.z.unknown(),
218
+ newValue: zod_1.z.unknown(),
219
+ })),
220
+ }),
221
+ metadata: zod_1.z.object({
222
+ requestId: zod_1.z.string().optional(),
223
+ timestamp: zod_1.z.string().optional(),
224
+ }).optional(),
225
+ });
226
+ /**
227
+ * Validate server config request schema
228
+ */
229
+ exports.validateServerConfigRequestSchema = zod_1.z.object({
230
+ projectId: zod_1.z.string().min(1),
231
+ config: exports.mcpIServerConfigSchema.partial(),
232
+ });
233
+ /**
234
+ * Validate server config response schema
235
+ */
236
+ exports.validateServerConfigResponseSchema = zod_1.z.object({
237
+ success: zod_1.z.boolean(),
238
+ data: zod_1.z.object({
239
+ valid: zod_1.z.boolean(),
240
+ errors: zod_1.z.array(zod_1.z.object({
241
+ path: zod_1.z.string(),
242
+ message: zod_1.z.string(),
243
+ code: zod_1.z.string(),
244
+ })).optional(),
245
+ warnings: zod_1.z.array(zod_1.z.object({
246
+ path: zod_1.z.string(),
247
+ message: zod_1.z.string(),
248
+ })).optional(),
249
+ }),
250
+ metadata: zod_1.z.object({
251
+ requestId: zod_1.z.string().optional(),
252
+ timestamp: zod_1.z.string().optional(),
253
+ }).optional(),
254
+ });
@@ -0,0 +1,337 @@
1
+ /**
2
+ * Dashboard Configuration Types
3
+ *
4
+ * Type definitions for AgentShield dashboard server configuration management API.
5
+ * These types ensure parity between xmcp-i and AgentShield dashboard implementations.
6
+ *
7
+ * @package @kya-os/contracts/dashboard-config
8
+ */
9
+ import type { ToolProtectionMap } from '../tool-protection/index.js';
10
+ import type { DelegationVerifierType } from '../config/delegation.js';
11
+ /**
12
+ * MCP-I Server Configuration (Dashboard View Model)
13
+ *
14
+ * This is a flattened, UI-friendly representation of server configuration
15
+ * used by the AgentShield dashboard for configuration management.
16
+ *
17
+ * This type differs from MCPIConfig in that it:
18
+ * - Includes platform-specific details
19
+ * - Includes read-only metadata
20
+ * - Flattens nested structures for easier UI rendering
21
+ * - Includes deployment status information
22
+ */
23
+ export interface MCPIServerConfig {
24
+ identity: {
25
+ /**
26
+ * MCP-I Server DID (public identifier)
27
+ * Identifies this server instance
28
+ * @deprecated Use serverDid instead. Will be removed in v2.0
29
+ */
30
+ agentDid?: string;
31
+ /**
32
+ * MCP-I Server DID (public identifier)
33
+ * Identifies this server instance
34
+ * Read-only, displayed for reference
35
+ */
36
+ serverDid: string;
37
+ /**
38
+ * Environment mode
39
+ * Controls identity source: 'development' | 'production'
40
+ */
41
+ environment: 'development' | 'production';
42
+ /**
43
+ * Identity storage location (read-only)
44
+ * Shows where identity is stored based on platform
45
+ */
46
+ storageLocation: 'cloudflare-kv' | 'file-system' | 'env-vars';
47
+ };
48
+ proofing: {
49
+ /**
50
+ * Enable proof submission
51
+ */
52
+ enabled: boolean;
53
+ /**
54
+ * Proof destinations
55
+ * Where proofs are sent (AgentShield, KTA, etc.)
56
+ */
57
+ destinations: Array<{
58
+ type: 'agentshield' | 'kta' | 'custom';
59
+ apiUrl: string;
60
+ apiKey?: string;
61
+ }>;
62
+ /**
63
+ * Batch queue settings
64
+ */
65
+ batchQueue: {
66
+ maxBatchSize: number;
67
+ flushIntervalMs: number;
68
+ maxRetries: number;
69
+ };
70
+ };
71
+ delegation: {
72
+ /**
73
+ * Enable delegation enforcement
74
+ */
75
+ enabled: boolean;
76
+ /**
77
+ * Strict enforcement mode
78
+ * When true, blocks tools without delegation
79
+ * When false, logs warnings but allows execution
80
+ */
81
+ enforceStrictly: boolean;
82
+ /**
83
+ * Delegation verifier settings
84
+ */
85
+ verifier: {
86
+ type: DelegationVerifierType;
87
+ apiUrl?: string;
88
+ cacheTtl?: number;
89
+ };
90
+ /**
91
+ * Authorization flow settings
92
+ */
93
+ authorization: {
94
+ authorizationUrl?: string;
95
+ minReputationScore?: number;
96
+ resumeTokenTtl?: number;
97
+ requireAuthForUnknown?: boolean;
98
+ };
99
+ };
100
+ toolProtection: {
101
+ /**
102
+ * Source of tool protection config
103
+ * 'agentshield' = Fetched from AgentShield API (dashboard-controlled)
104
+ * 'inline' = Defined in code/config file
105
+ * 'file' = Loaded from external file
106
+ */
107
+ source: 'agentshield' | 'inline' | 'file';
108
+ /**
109
+ * AgentShield API settings (if source is 'agentshield')
110
+ */
111
+ agentShield?: {
112
+ apiUrl: string;
113
+ cacheTtl: number;
114
+ };
115
+ /**
116
+ * Fallback configuration
117
+ * Used when API is unavailable
118
+ * Displayed as read-only (managed via /tools page)
119
+ */
120
+ fallback?: ToolProtectionMap;
121
+ };
122
+ audit: {
123
+ /**
124
+ * Enable audit logging
125
+ */
126
+ enabled: boolean;
127
+ /**
128
+ * Include proof hashes in logs
129
+ */
130
+ includeProofHashes: boolean;
131
+ /**
132
+ * Include full payloads in logs
133
+ * WARNING: May include sensitive data
134
+ */
135
+ includePayloads: boolean;
136
+ };
137
+ session: {
138
+ /**
139
+ * Maximum time skew allowed (seconds)
140
+ * Default: 120
141
+ */
142
+ timestampSkewSeconds: number;
143
+ /**
144
+ * Session TTL (minutes)
145
+ * Default: 30
146
+ */
147
+ ttlMinutes: number;
148
+ /**
149
+ * Absolute session lifetime (minutes)
150
+ * Optional, max lifetime regardless of activity
151
+ */
152
+ absoluteLifetime?: number;
153
+ };
154
+ platform: {
155
+ /**
156
+ * Platform type
157
+ */
158
+ type: 'cloudflare' | 'node' | 'vercel';
159
+ /**
160
+ * Cloudflare-specific settings
161
+ */
162
+ cloudflare?: {
163
+ /**
164
+ * Workers runtime settings
165
+ */
166
+ workers: {
167
+ cpuMs: number;
168
+ memoryMb: number;
169
+ };
170
+ /**
171
+ * KV namespace bindings (read-only)
172
+ * Shows which KV namespaces are configured
173
+ */
174
+ kvNamespaces: Array<{
175
+ name: string;
176
+ purpose: 'sessions' | 'delegations' | 'cache' | 'general';
177
+ }>;
178
+ /**
179
+ * Environment variables (masked)
180
+ */
181
+ environmentVariables: Array<{
182
+ name: string;
183
+ value: string;
184
+ source: 'wrangler.toml' | 'secrets' | '.dev.vars';
185
+ }>;
186
+ };
187
+ /**
188
+ * Node.js-specific settings
189
+ */
190
+ node?: {
191
+ /**
192
+ * Server configuration
193
+ */
194
+ server: {
195
+ port: number;
196
+ host: string;
197
+ cors: boolean;
198
+ timeout: number;
199
+ };
200
+ /**
201
+ * Storage configuration
202
+ */
203
+ storage: {
204
+ type: 'memory' | 'redis' | 'postgres' | 'mongodb';
205
+ connection?: {
206
+ host?: string;
207
+ port?: number;
208
+ database?: string;
209
+ };
210
+ };
211
+ };
212
+ /**
213
+ * Vercel-specific settings
214
+ */
215
+ vercel?: {
216
+ /**
217
+ * Environment variables (masked)
218
+ */
219
+ environmentVariables: Array<{
220
+ name: string;
221
+ value: string;
222
+ source: 'vercel-dashboard' | '.env.local';
223
+ }>;
224
+ /**
225
+ * Edge runtime configuration
226
+ */
227
+ edgeRuntime?: {
228
+ maxDuration?: number;
229
+ regions?: string[];
230
+ };
231
+ };
232
+ };
233
+ metadata: {
234
+ /**
235
+ * Configuration version
236
+ */
237
+ version: string;
238
+ /**
239
+ * Last updated timestamp
240
+ */
241
+ lastUpdated: string;
242
+ /**
243
+ * Configuration source
244
+ * 'dashboard' = Managed via AgentShield dashboard
245
+ * 'code' = Defined in code (mcpi-runtime-config.ts)
246
+ * 'mixed' = Partially managed via dashboard
247
+ */
248
+ source: 'dashboard' | 'code' | 'mixed';
249
+ /**
250
+ * Server deployment URL
251
+ */
252
+ serverUrl?: string;
253
+ /**
254
+ * Server deployment status
255
+ */
256
+ deploymentStatus?: 'active' | 'inactive' | 'error';
257
+ };
258
+ }
259
+ /**
260
+ * API Request/Response types for dashboard config endpoints
261
+ */
262
+ /**
263
+ * Request to get server configuration
264
+ * GET /api/v1/bouncer/projects/{projectId}/config
265
+ */
266
+ export interface GetServerConfigRequest {
267
+ projectId: string;
268
+ }
269
+ /**
270
+ * Response from get server configuration endpoint
271
+ */
272
+ export interface GetServerConfigResponse {
273
+ success: boolean;
274
+ data: {
275
+ config: MCPIServerConfig;
276
+ };
277
+ metadata?: {
278
+ requestId?: string;
279
+ timestamp?: string;
280
+ };
281
+ }
282
+ /**
283
+ * Request to update server configuration
284
+ * PUT /api/v1/bouncer/projects/{projectId}/config
285
+ */
286
+ export interface UpdateServerConfigRequest {
287
+ projectId: string;
288
+ config: Partial<MCPIServerConfig>;
289
+ }
290
+ /**
291
+ * Response from update server configuration endpoint
292
+ */
293
+ export interface UpdateServerConfigResponse {
294
+ success: boolean;
295
+ data: {
296
+ config: MCPIServerConfig;
297
+ changes: Array<{
298
+ path: string;
299
+ oldValue: unknown;
300
+ newValue: unknown;
301
+ }>;
302
+ };
303
+ metadata?: {
304
+ requestId?: string;
305
+ timestamp?: string;
306
+ };
307
+ }
308
+ /**
309
+ * Request to validate server configuration without saving
310
+ * POST /api/v1/bouncer/projects/{projectId}/config/validate
311
+ */
312
+ export interface ValidateServerConfigRequest {
313
+ projectId: string;
314
+ config: Partial<MCPIServerConfig>;
315
+ }
316
+ /**
317
+ * Response from validate server configuration endpoint
318
+ */
319
+ export interface ValidateServerConfigResponse {
320
+ success: boolean;
321
+ data: {
322
+ valid: boolean;
323
+ errors?: Array<{
324
+ path: string;
325
+ message: string;
326
+ code: string;
327
+ }>;
328
+ warnings?: Array<{
329
+ path: string;
330
+ message: string;
331
+ }>;
332
+ };
333
+ metadata?: {
334
+ requestId?: string;
335
+ timestamp?: string;
336
+ };
337
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * Dashboard Configuration Types
4
+ *
5
+ * Type definitions for AgentShield dashboard server configuration management API.
6
+ * These types ensure parity between xmcp-i and AgentShield dashboard implementations.
7
+ *
8
+ * @package @kya-os/contracts/dashboard-config
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });