@kya-os/mcp-i 1.2.5 → 1.2.7

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.
@@ -163,6 +163,25 @@ export declare const configSchema: z.ZodObject<{
163
163
  tools?: string | undefined;
164
164
  }>>;
165
165
  webpack: z.ZodOptional<z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodAny>>>;
166
+ identity: z.ZodOptional<z.ZodOptional<z.ZodObject<{
167
+ enabled: z.ZodBoolean;
168
+ environment: z.ZodOptional<z.ZodEnum<["development", "production"]>>;
169
+ devIdentityPath: z.ZodOptional<z.ZodString>;
170
+ privacyMode: z.ZodOptional<z.ZodBoolean>;
171
+ debug: z.ZodOptional<z.ZodBoolean>;
172
+ }, "strip", z.ZodTypeAny, {
173
+ enabled: boolean;
174
+ debug?: boolean | undefined;
175
+ environment?: "development" | "production" | undefined;
176
+ devIdentityPath?: string | undefined;
177
+ privacyMode?: boolean | undefined;
178
+ }, {
179
+ enabled: boolean;
180
+ debug?: boolean | undefined;
181
+ environment?: "development" | "production" | undefined;
182
+ devIdentityPath?: string | undefined;
183
+ privacyMode?: boolean | undefined;
184
+ }>>>;
166
185
  }, "strip", z.ZodTypeAny, {
167
186
  stdio?: boolean | {
168
187
  debug: boolean;
@@ -203,6 +222,13 @@ export declare const configSchema: z.ZodObject<{
203
222
  tools: string;
204
223
  } | undefined;
205
224
  webpack?: ((args_0: any, ...args: unknown[]) => any) | undefined;
225
+ identity?: {
226
+ enabled: boolean;
227
+ debug?: boolean | undefined;
228
+ environment?: "development" | "production" | undefined;
229
+ devIdentityPath?: string | undefined;
230
+ privacyMode?: boolean | undefined;
231
+ } | undefined;
206
232
  }, {
207
233
  stdio?: boolean | {
208
234
  debug?: boolean | undefined;
@@ -243,6 +269,13 @@ export declare const configSchema: z.ZodObject<{
243
269
  tools?: string | undefined;
244
270
  } | undefined;
245
271
  webpack?: ((args_0: any, ...args: unknown[]) => any) | undefined;
272
+ identity?: {
273
+ enabled: boolean;
274
+ debug?: boolean | undefined;
275
+ environment?: "development" | "production" | undefined;
276
+ devIdentityPath?: string | undefined;
277
+ privacyMode?: boolean | undefined;
278
+ } | undefined;
246
279
  }>;
247
280
  type WebpackConfig = {
248
281
  webpack?: (config: Configuration) => Configuration;
@@ -12,4 +12,5 @@ exports.configSchema = zod_1.z.object({
12
12
  experimental: schemas_1.experimentalConfigSchema.optional(),
13
13
  paths: schemas_1.pathsConfigSchema.optional(),
14
14
  webpack: schemas_1.webpackConfigSchema.optional(),
15
+ identity: schemas_1.identityConfigSchema.optional(),
15
16
  });
@@ -23,4 +23,8 @@ export declare function injectStdioVariables(stdioConfig: any): {
23
23
  STDIO_CONFIG: string;
24
24
  };
25
25
  export type StdioVariables = ReturnType<typeof injectStdioVariables>;
26
- export type InjectedVariables = HttpVariables | CorsVariables | OAuthVariables | PathsVariables | StdioVariables;
26
+ export declare function injectIdentityVariables(identityConfig: any, mode: string): {
27
+ IDENTITY_CONFIG: string;
28
+ };
29
+ export type IdentityVariables = ReturnType<typeof injectIdentityVariables>;
30
+ export type InjectedVariables = HttpVariables | CorsVariables | OAuthVariables | PathsVariables | StdioVariables | IdentityVariables;
@@ -5,6 +5,7 @@ exports.injectCorsVariables = injectCorsVariables;
5
5
  exports.injectOAuthVariables = injectOAuthVariables;
6
6
  exports.injectPathsVariables = injectPathsVariables;
7
7
  exports.injectStdioVariables = injectStdioVariables;
8
+ exports.injectIdentityVariables = injectIdentityVariables;
8
9
  const utils_1 = require("./utils");
9
10
  function injectHttpVariables(httpConfig, mode) {
10
11
  const resolvedConfig = (0, utils_1.getResolvedHttpConfig)(httpConfig);
@@ -56,3 +57,21 @@ function injectStdioVariables(stdioConfig) {
56
57
  }),
57
58
  };
58
59
  }
60
+ function injectIdentityVariables(identityConfig, mode) {
61
+ if (!identityConfig || !identityConfig.enabled) {
62
+ return {
63
+ IDENTITY_CONFIG: JSON.stringify({
64
+ enabled: false,
65
+ }),
66
+ };
67
+ }
68
+ return {
69
+ IDENTITY_CONFIG: JSON.stringify({
70
+ enabled: true,
71
+ environment: identityConfig.environment || mode,
72
+ devIdentityPath: identityConfig.devIdentityPath,
73
+ privacyMode: identityConfig.privacyMode || false,
74
+ debug: identityConfig.debug || mode === "development",
75
+ }),
76
+ };
77
+ }
@@ -0,0 +1,24 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Identity configuration schema
4
+ */
5
+ export declare const identityConfigSchema: z.ZodOptional<z.ZodObject<{
6
+ enabled: z.ZodBoolean;
7
+ environment: z.ZodOptional<z.ZodEnum<["development", "production"]>>;
8
+ devIdentityPath: z.ZodOptional<z.ZodString>;
9
+ privacyMode: z.ZodOptional<z.ZodBoolean>;
10
+ debug: z.ZodOptional<z.ZodBoolean>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ enabled: boolean;
13
+ debug?: boolean | undefined;
14
+ environment?: "development" | "production" | undefined;
15
+ devIdentityPath?: string | undefined;
16
+ privacyMode?: boolean | undefined;
17
+ }, {
18
+ enabled: boolean;
19
+ debug?: boolean | undefined;
20
+ environment?: "development" | "production" | undefined;
21
+ devIdentityPath?: string | undefined;
22
+ privacyMode?: boolean | undefined;
23
+ }>>;
24
+ export type IdentityConfig = z.infer<typeof identityConfigSchema>;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.identityConfigSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ /**
6
+ * Identity configuration schema
7
+ */
8
+ exports.identityConfigSchema = zod_1.z
9
+ .object({
10
+ enabled: zod_1.z.boolean().describe("Enable MCP-I identity layer"),
11
+ environment: zod_1.z
12
+ .enum(["development", "production"])
13
+ .optional()
14
+ .describe("Runtime environment"),
15
+ devIdentityPath: zod_1.z.string().optional().describe("Custom identity file path"),
16
+ privacyMode: zod_1.z
17
+ .boolean()
18
+ .optional()
19
+ .describe("Enable privacy mode (per-client DIDs)"),
20
+ debug: zod_1.z.boolean().optional().describe("Enable debug logging for identity"),
21
+ })
22
+ .optional();
@@ -4,3 +4,4 @@ export { oauthConfigSchema, type OAuthConfig } from "./experimental/oauth";
4
4
  export { experimentalConfigSchema, type ExperimentalConfig, } from "./experimental";
5
5
  export { pathsConfigSchema, type PathsConfig } from "./paths";
6
6
  export { webpackConfigSchema, type WebpackConfig } from "./webpack";
7
+ export { identityConfigSchema, type IdentityConfig } from "./identity";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.webpackConfigSchema = exports.pathsConfigSchema = exports.experimentalConfigSchema = exports.oauthConfigSchema = exports.stdioTransportConfigSchema = exports.corsConfigSchema = exports.httpTransportConfigSchema = void 0;
3
+ exports.identityConfigSchema = exports.webpackConfigSchema = exports.pathsConfigSchema = exports.experimentalConfigSchema = exports.oauthConfigSchema = exports.stdioTransportConfigSchema = exports.corsConfigSchema = exports.httpTransportConfigSchema = void 0;
4
4
  // re export
5
5
  var http_1 = require("./transport/http");
6
6
  Object.defineProperty(exports, "httpTransportConfigSchema", { enumerable: true, get: function () { return http_1.httpTransportConfigSchema; } });
@@ -15,3 +15,5 @@ var paths_1 = require("./paths");
15
15
  Object.defineProperty(exports, "pathsConfigSchema", { enumerable: true, get: function () { return paths_1.pathsConfigSchema; } });
16
16
  var webpack_1 = require("./webpack");
17
17
  Object.defineProperty(exports, "webpackConfigSchema", { enumerable: true, get: function () { return webpack_1.webpackConfigSchema; } });
18
+ var identity_1 = require("./identity");
19
+ Object.defineProperty(exports, "identityConfigSchema", { enumerable: true, get: function () { return identity_1.identityConfigSchema; } });
@@ -15,11 +15,13 @@ function getInjectedVariables(xmcpConfig) {
15
15
  const oauthVariables = (0, injection_1.injectOAuthVariables)(xmcpConfig);
16
16
  const pathsVariables = (0, injection_1.injectPathsVariables)(xmcpConfig);
17
17
  const stdioVariables = (0, injection_1.injectStdioVariables)(xmcpConfig.stdio);
18
+ const identityVariables = (0, injection_1.injectIdentityVariables)(xmcpConfig.identity, mode);
18
19
  return {
19
20
  ...httpVariables,
20
21
  ...corsVariables,
21
22
  ...oauthVariables,
22
23
  ...pathsVariables,
23
24
  ...stdioVariables,
25
+ ...identityVariables,
24
26
  };
25
27
  }
@@ -27,7 +27,7 @@ function getWebpackConfig(xmcpConfig) {
27
27
  const config = {
28
28
  mode,
29
29
  watch: mode === "development",
30
- devtool: mode === "development" ? "eval-cheap-module-source-map" : false,
30
+ devtool: false,
31
31
  output: {
32
32
  filename: outputFilename,
33
33
  path: outputPath,