@kya-os/create-mcpi-app 1.7.38 → 1.7.39-canary.1

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.
@@ -39,162 +39,126 @@
39
39
  ╵ ~~~~~~~~~
40
40
 
41
41
 
42
-  RUN  v4.0.5 /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/create-mcpi-app
43
-
44
- stdout | test-cloudflare/tests/session-management.test.ts > Session Management > Session Security > should not expose session data in logs
45
- [Session] Created session: secure-session
46
-
47
- ✓ test-cloudflare/tests/session-management.test.ts (17 tests) 41ms
48
- ✓ test-cloudflare/tests/cors-security.test.ts (29 tests) 4ms
49
- ✓ test-cloudflare/tests/delegation.test.ts (12 tests) 5ms
50
- ✓ test-cloudflare/tests/cache-invalidation.test.ts (18 tests) 7ms
51
- stderr | src/utils/__tests__/fetch-remote-config.test.ts > fetchRemoteConfig > Error handling > should return null if API request fails
52
- [RemoteConfig] API returned 404: Not Found
53
-
54
- stderr | src/utils/__tests__/fetch-remote-config.test.ts > fetchRemoteConfig > Error handling > should return null if API throws error
55
- [RemoteConfig] Failed to fetch config: Error: Network error
56
- at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/create-mcpi-app/src/utils/__tests__/fetch-remote-config.test.ts:173:35
57
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
58
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
59
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
42
+ RUN v4.0.5 /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/create-mcpi-app
43
+
44
+ test-cloudflare/tests/delegation.test.ts (12 tests) 6ms
45
+ test-cloudflare/tests/cache-invalidation.test.ts (18 tests) 5ms
46
+ ✓ test-cloudflare/tests/cors-security.test.ts (29 tests) 4ms
47
+ stdout | test-cloudflare/tests/session-management.test.ts > Session Management > Session Security > should not expose session data in logs
48
+ [Session] Created session: secure-session
49
+
50
+ stderr | src/utils/__tests__/fetch-remote-config.test.ts > fetchRemoteConfig > Error handling > should return null if API request fails
51
+ [RemoteConfig] API returned 404: Not Found
52
+
53
+ ✓ test-cloudflare/tests/session-management.test.ts (17 tests) 15ms
54
+ stderr | src/utils/__tests__/fetch-remote-config.test.ts > fetchRemoteConfig > Error handling > should return null if API throws error
55
+ [RemoteConfig] Failed to fetch config: Error: Network error
56
+ at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/create-mcpi-app/src/utils/__tests__/fetch-remote-config.test.ts:173:35
57
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
58
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
59
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
60
60
  at new Promise (<anonymous>)
61
- at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
62
- at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
63
-  at processTicksAndRejections (node:internal/process/task_queues:103:5)
64
- at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
65
- at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
66
-
67
- stderr | src/utils/__tests__/fetch-remote-config.test.ts > fetchRemoteConfig > Error handling > should return null if neither projectId nor agentDid provided
68
- [RemoteConfig] Neither projectId nor agentDid provided
69
-
70
- stderr | src/utils/__tests__/fetch-remote-config.test.ts > fetchRemoteConfig > Error handling > should handle cache read errors gracefully
71
- [RemoteConfig] Cache read failed: Error: Cache error
72
- at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/create-mcpi-app/src/utils/__tests__/fetch-remote-config.test.ts:201:50
73
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
74
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
75
- at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
61
+ at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
62
+ at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
63
+ at processTicksAndRejections (node:internal/process/task_queues:103:5)
64
+ at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
65
+ at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
66
+
67
+ stderr | src/utils/__tests__/fetch-remote-config.test.ts > fetchRemoteConfig > Error handling > should return null if neither projectId nor agentDid provided
68
+ [RemoteConfig] Neither projectId nor agentDid provided
69
+
70
+ stderr | src/utils/__tests__/fetch-remote-config.test.ts > fetchRemoteConfig > Error handling > should handle cache read errors gracefully
71
+ [RemoteConfig] Cache read failed: Error: Cache error
72
+ at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/create-mcpi-app/src/utils/__tests__/fetch-remote-config.test.ts:201:50
73
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:157:11
74
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:753:26
75
+ at file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1636:20
76
76
  at new Promise (<anonymous>)
77
- at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
78
- at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
79
-  at processTicksAndRejections (node:internal/process/task_queues:103:5)
80
- at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
81
- at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
82
-
83
- ✓ src/utils/__tests__/fetch-remote-config.test.ts (9 tests) 5ms
84
- stderr | src/helpers/__tests__/config-builder.spec.ts > buildConfigWithRemote > should fallback to local config when remote fetch fails
85
- [RemoteConfig] Neither projectId nor agentDid provided
86
-
87
- ✓ src/helpers/__tests__/config-builder.spec.ts (12 tests) 3ms
88
- ✓ src/__tests__/helpers/generate-config.test.ts (25 tests) 35ms
89
- ✓ src/__tests__/helpers/generate-identity.test.ts (24 tests) 38ms
90
- stdout | src/__tests__/helpers/install.test.ts > install > Dependency installation > should install dependencies with npm
91
- 
77
+ at runWithTimeout (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1602:10)
78
+ at runTest (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1309:12)
79
+ at processTicksAndRejections (node:internal/process/task_queues:103:5)
80
+ at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
81
+ at runSuite (file:///Users/dylanhobbs/Documents/@kya-os/xmcp-i/node_modules/.pnpm/@vitest+runner@4.0.5/node_modules/@vitest/runner/dist/index.js:1468:8)
82
+
83
+ src/utils/__tests__/fetch-remote-config.test.ts (9 tests) 8ms
84
+ stderr | src/helpers/__tests__/config-builder.spec.ts > buildConfigWithRemote > should fallback to local config when remote fetch fails
85
+ [RemoteConfig] Neither projectId nor agentDid provided
86
+
87
+ src/helpers/__tests__/config-builder.spec.ts (12 tests) 5ms
88
+ stdout | src/__tests__/helpers/install.test.ts > install > Dependency installation > should install dependencies with npm
89
+
92
90
  📦 Installing dependencies with npm...
93
91
  ✓ Lockfile created (package-lock.json) - remember to commit it
94
92
 
95
- stdout | src/__tests__/helpers/install.test.ts > install > Dependency installation > should install dependencies with yarn
96
- 
93
+ src/__tests__/helpers/generate-identity.test.ts (24 tests) 29ms
94
+ ✓ test-cloudflare/tests/do-routing.test.ts (14 tests) 63ms
95
+ stdout | src/__tests__/helpers/install.test.ts > install > Dependency installation > should install dependencies with yarn
96
+
97
97
  📦 Installing dependencies with yarn...
98
98
  ✓ Lockfile created (yarn.lock) - remember to commit it
99
99
 
100
- stdout | src/__tests__/helpers/install.test.ts > install > Dependency installation > should install dependencies with pnpm
101
- stderr | src/__tests__/helpers/install.test.ts > install > Install progress reporting > should report correct package manager in log
102
- ⚠️ Warning: No lockfile generated (pnpm-lock.yaml)
103
- 
100
+ stdout | src/__tests__/helpers/install.test.ts > install > Dependency installation > should install dependencies with pnpm
101
+
104
102
  📦 Installing dependencies with pnpm...
105
103
  ✓ Lockfile created (pnpm-lock.yaml) - remember to commit it
106
104
 
105
+ stdout | src/__tests__/helpers/install.test.ts > install > Dependency installation > should use correct working directory
107
106
 
108
- stdout | src/__tests__/helpers/install.test.ts > install > Dependency installation > should use correct working directory
109
- 
110
107
  📦 Installing dependencies with npm...
111
108
  ✓ Lockfile created (package-lock.json) - remember to commit it
112
109
 
113
- stdout | src/__tests__/helpers/install.test.ts > install > Install progress reporting > should check for lockfile after installation
114
- 
110
+ src/__tests__/helpers/generate-config.test.ts (25 tests) 49ms
111
+ stderr | src/__tests__/helpers/install.test.ts > install > Install progress reporting > should report correct package manager in log
112
+ ⚠️ Warning: No lockfile generated (pnpm-lock.yaml)
113
+
114
+ stdout | src/__tests__/helpers/install.test.ts > install > Install progress reporting > should check for lockfile after installation
115
+
115
116
  📦 Installing dependencies with npm...
116
- stderr | src/__tests__/helpers/install.test.ts > install > Error handling > should throw error when installation fails
117
117
  ✓ Lockfile created (package-lock.json) - remember to commit it
118
118
 
119
- stdout | src/__tests__/helpers/install.test.ts > install > Error handling > should throw error when installation fails
120
- Failed to install dependencies with npm.
121
- 
119
+ stderr | src/__tests__/helpers/install.test.ts > install > Error handling > should throw error when installation fails
120
+ stdout | src/__tests__/helpers/install.test.ts > install > Error handling > should throw error when installation fails
121
+
122
+ Failed to install dependencies with npm.
122
123
  📦 Installing dependencies with npm...
123
124
 
124
- stderr | src/__tests__/helpers/install.test.ts > install > Error handling > should handle network errors during installation
125
125
 
126
- stdout | src/__tests__/helpers/install.test.ts > install > Error handling > should handle network errors during installation
127
- 
126
+ stdout | src/__tests__/helpers/install.test.ts > install > Error handling > should handle network errors during installation
127
+
128
128
  📦 Installing dependencies with npm...
129
129
 
130
- stdout | src/__tests__/helpers/install.test.ts > install > Error handling > should handle permission errors during installation
131
- 
132
- Failed to install dependencies with npm.
130
+ stderr | src/__tests__/helpers/install.test.ts > install > Error handling > should handle network errors during installation
131
+ Failed to install dependencies with npm.
132
+
133
+ stdout | src/__tests__/helpers/install.test.ts > install > Error handling > should handle permission errors during installation
134
+
133
135
  📦 Installing dependencies with npm...
134
136
 
137
+ stderr | src/__tests__/helpers/install.test.ts > install > Error handling > should handle permission errors during installation
138
+ Failed to install dependencies with npm.
139
+
140
+ stdout | src/__tests__/helpers/install.test.ts > install > Error handling > should log error message when installation fails
135
141
 
136
- stdout | src/__tests__/helpers/install.test.ts > install > Error handling > should log error message when installation fails
137
- 
138
142
  📦 Installing dependencies with npm...
139
143
 
140
- stdout | src/__tests__/helpers/install.test.ts > install > Error handling > should handle invalid package manager gracefully
141
- 
142
- stderr | src/__tests__/helpers/install.test.ts > install > Error handling > should handle permission errors during installation
144
+ stderr | src/__tests__/helpers/install.test.ts > install > Error handling > should handle invalid package manager gracefully
145
+ ⚠️ Warning: Unknown package manager "unknown", cannot check lockfile
146
+ stdout | src/__tests__/helpers/install.test.ts > install > Error handling > should handle invalid package manager gracefully
147
+
148
+
143
149
  📦 Installing dependencies with unknown...
144
- Failed to install dependencies with npm.
145
150
 
146
- stdout | src/__tests__/helpers/install.test.ts > install > Lockfile validation > should warn when lockfile not created
147
- 
151
+ stdout | src/__tests__/helpers/install.test.ts > install > Lockfile validation > should warn when lockfile not created
152
+
148
153
  📦 Installing dependencies with npm...
149
154
 
150
- stderr | src/__tests__/helpers/install.test.ts > install > Error handling > should handle invalid package manager gracefully
151
- ⚠️ Warning: Unknown package manager "unknown", cannot check lockfile
152
-
153
-
154
- ❯ src/__tests__/helpers/install.test.ts (20 tests | 1 failed) 33ms
155
-  × should detect npm from package-lock.json 4ms
156
- ✓ should detect yarn from yarn.lock 1ms
157
- ✓ should detect pnpm from pnpm-lock.yaml 1ms
158
- ✓ should return null when no lockfile exists 0ms
159
- ✓ should prioritize pnpm over npm 3ms
160
- ✓ should prioritize yarn over npm 1ms
161
- ✓ should install dependencies with npm 3ms
162
- ✓ should install dependencies with yarn 1ms
163
- ✓ should install dependencies with pnpm 1ms
164
- ✓ should use correct working directory 2ms
165
- ✓ should log installation start message 1ms
166
- ✓ should report correct package manager in log 1ms
167
- ✓ should check for lockfile after installation 5ms
168
- ✓ should throw error when installation fails 1ms
169
- ✓ should handle network errors during installation 1ms
170
- ✓ should handle permission errors during installation 1ms
171
- ✓ should log error message when installation fails 1ms
172
- ✓ should handle invalid package manager gracefully 1ms
173
- ✓ should validate npm lockfile after installation 2ms
174
- ✓ should warn when lockfile not created 1ms
175
- ✓ src/__tests__/helpers/validate-project-structure.test.ts (23 tests) 37ms
176
- ✓ test-cloudflare/tests/do-routing.test.ts (14 tests) 160ms
177
- ✓ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts (19 tests) 218ms
178
- ✓ src/__tests__/cloudflare-template.test.ts (24 tests) 210ms
179
-
180
- ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯
181
-
182
-  FAIL  src/__tests__/helpers/install.test.ts > detectPackageManager > Package manager detection > should detect npm from package-lock.json
183
- Error: ENOENT: no such file or directory, scandir '/Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/create-mcpi-app/test-temp'
184
-  ❯ src/__tests__/helpers/install.test.ts:40:35
185
-  38|  }
186
-  39|  if (fs.existsSync(path.join(process.cwd(), 'test-temp'))) {
187
-  40|  const testTempContents = fs.readdirSync(path.join(process.cwd(),…
188
-  |  ^
189
-  41|  if (testTempContents.length === 0) {
190
-  42|  fs.removeSync(path.join(process.cwd(), 'test-temp'));
191
-
192
- ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯
193
-
194
-
195
-  Test Files  1 failed | 12 passed (13)
196
-  Tests  1 failed | 245 passed (246)
197
-  Start at  03:37:49
198
-  Duration  1.74s (transform 2.33s, setup 0ms, collect 3.78s, tests 797ms, environment 1ms, prepare 328ms)
199
-
200
-  ELIFECYCLE  Test failed. See above for more details.
155
+ src/__tests__/helpers/install.test.ts (20 tests) 29ms
156
+ src/__tests__/helpers/validate-project-structure.test.ts (23 tests) 63ms
157
+ ✓ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts (19 tests) 139ms
158
+ ✓ src/__tests__/cloudflare-template.test.ts (24 tests) 179ms
159
+
160
+ Test Files 13 passed (13)
161
+ Tests 246 passed (246)
162
+ Start at 05:43:19
163
+ Duration 596ms (transform 704ms, setup 0ms, collect 1.23s, tests 593ms, environment 10ms, prepare 88ms)
164
+
@@ -5,7 +5,11 @@
5
5
  * all platforms (Node.js, Cloudflare Workers, etc.).
6
6
  *
7
7
  * @module @kya-os/create-mcpi-app/config-builder
8
+ *
9
+ * NOTE: buildBaseConfig has been moved to @kya-os/contracts/config for shared use.
10
+ * This module re-exports it for backward compatibility and adds remote fetching support.
8
11
  */
12
+ export { buildBaseConfig } from '@kya-os/contracts/config';
9
13
  import type { MCPIConfig } from '@kya-os/contracts/config';
10
14
  import { type RemoteConfigCache } from '../utils/fetch-remote-config.js';
11
15
  /**
@@ -34,16 +38,6 @@ export interface ConfigBuilderOptions {
34
38
  */
35
39
  agentDid?: string;
36
40
  }
37
- /**
38
- * Build base MCPIConfig that works across all platforms
39
- *
40
- * Creates a platform-agnostic configuration object with sensible defaults
41
- * for identity, proofing, delegation, audit, and session management.
42
- *
43
- * @param env - Environment variables object (works with process.env or Cloudflare env)
44
- * @returns Complete MCPIConfig object
45
- */
46
- export declare function buildBaseConfig(env: Record<string, any>): MCPIConfig;
47
41
  /**
48
42
  * Build config with remote fetching support
49
43
  *
@@ -1 +1 @@
1
- {"version":3,"file":"config-builder.d.ts","sourceRoot":"","sources":["../../src/helpers/config-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,UAAU,EAQX,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,iCAAiC,CAAC;AAEzC;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAEzB;;;;OAIG;IACH,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IAEzE;;;OAGG;IACH,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAE1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,UAAU,CA4DpE;AAED;;;;;;;;;GASG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,UAAU,CAAC,CAwBrB"}
1
+ {"version":3,"file":"config-builder.d.ts","sourceRoot":"","sources":["../../src/helpers/config-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAG3D,OAAO,KAAK,EACV,UAAU,EAQX,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,iCAAiC,CAAC;AAEzC;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAEzB;;;;OAIG;IACH,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IAEzE;;;OAGG;IACH,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAE1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;GASG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,UAAU,CAAC,CAwBrB"}
@@ -5,71 +5,14 @@
5
5
  * all platforms (Node.js, Cloudflare Workers, etc.).
6
6
  *
7
7
  * @module @kya-os/create-mcpi-app/config-builder
8
- */
9
- import { fetchRemoteConfig } from '../utils/fetch-remote-config.js';
10
- /**
11
- * Build base MCPIConfig that works across all platforms
12
- *
13
- * Creates a platform-agnostic configuration object with sensible defaults
14
- * for identity, proofing, delegation, audit, and session management.
15
8
  *
16
- * @param env - Environment variables object (works with process.env or Cloudflare env)
17
- * @returns Complete MCPIConfig object
9
+ * NOTE: buildBaseConfig has been moved to @kya-os/contracts/config for shared use.
10
+ * This module re-exports it for backward compatibility and adds remote fetching support.
18
11
  */
19
- export function buildBaseConfig(env) {
20
- const environment = (env.MCPI_ENV || env.ENVIRONMENT || 'development');
21
- const isDevelopment = environment === 'development';
22
- const baseConfig = {
23
- environment,
24
- identity: {
25
- enabled: true,
26
- environment,
27
- devIdentityPath: '.mcpi/identity.json'
28
- },
29
- proofing: {
30
- enabled: true,
31
- batchQueue: {
32
- destinations: [
33
- {
34
- type: 'agentshield',
35
- apiUrl: env.AGENTSHIELD_API_URL || 'https://kya.vouched.id',
36
- apiKey: env.AGENTSHIELD_API_KEY || ''
37
- }
38
- ],
39
- maxBatchSize: 10,
40
- flushIntervalMs: 5000,
41
- maxRetries: 3,
42
- debug: isDevelopment
43
- }
44
- },
45
- delegation: {
46
- enabled: true,
47
- enforceDelegations: true,
48
- verifier: {
49
- type: 'agentshield',
50
- apiUrl: env.AGENTSHIELD_API_URL || 'https://kya.vouched.id',
51
- apiKey: env.AGENTSHIELD_API_KEY || '',
52
- cacheTtl: 60000, // 1 minute cache
53
- debug: isDevelopment
54
- },
55
- authorization: {
56
- authorizationUrl: env.AUTHORIZATION_URL || `${env.AGENTSHIELD_API_URL || 'https://kya.vouched.id'}/authorize`,
57
- resumeTokenTtl: 600000, // 10 minutes
58
- minReputationScore: 76
59
- }
60
- },
61
- audit: {
62
- enabled: true,
63
- includeProofHashes: false,
64
- includePayloads: false
65
- },
66
- session: {
67
- timestampSkewSeconds: 120,
68
- ttlMinutes: 30
69
- }
70
- };
71
- return baseConfig;
72
- }
12
+ // Re-export buildBaseConfig from contracts (single source of truth)
13
+ export { buildBaseConfig } from '@kya-os/contracts/config';
14
+ import { buildBaseConfig } from '@kya-os/contracts/config';
15
+ import { fetchRemoteConfig } from '../utils/fetch-remote-config.js';
73
16
  /**
74
17
  * Build config with remote fetching support
75
18
  *
@@ -96,7 +39,7 @@ export async function buildConfigWithRemote(options) {
96
39
  return remote;
97
40
  }
98
41
  }
99
- // Fallback to local env-based config
42
+ // Fallback to local env-based config (using buildBaseConfig from contracts)
100
43
  return buildBaseConfig(env);
101
44
  }
102
45
  //# sourceMappingURL=config-builder.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"config-builder.js","sourceRoot":"","sources":["../../src/helpers/config-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAaH,OAAO,EACL,iBAAiB,EAGlB,MAAM,iCAAiC,CAAC;AAgCzC;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAAC,GAAwB;IACtD,MAAM,WAAW,GAAG,CAAC,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC,WAAW,IAAI,aAAa,CAAiC,CAAC;IACvG,MAAM,aAAa,GAAG,WAAW,KAAK,aAAa,CAAC;IAEpD,MAAM,UAAU,GAAe;QAC7B,WAAW;QAEX,QAAQ,EAAE;YACR,OAAO,EAAE,IAAI;YACb,WAAW;YACX,eAAe,EAAE,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AI,MAAM,EAAE,CAAC;YACX,OAAO,MAAM,CAAC;QAChB,CAAC;IACH,CAAC;IAED,4EAA4E;IAC5E,OAAO,eAAe,CAAC,GAAG,CAAC,CAAC;AAC9B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kya-os/create-mcpi-app",
3
- "version": "1.7.38",
3
+ "version": "1.7.39-canary.1",
4
4
  "description": "Bootstrap MCP applications with identity features",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -28,7 +28,7 @@
28
28
  "prepublishOnly": "npm run build && node scripts/validate-no-workspace.js"
29
29
  },
30
30
  "dependencies": {
31
- "@kya-os/cli": "^1.3.3",
31
+ "@kya-os/cli": "1.3.4-canary.0",
32
32
  "@kya-os/cli-effects": "^1.0.19",
33
33
  "base-x": "^5.0.0",
34
34
  "chalk": "^5.3.0",
@@ -37,7 +37,9 @@
37
37
  "inquirer": "^12.9.4",
38
38
  "node-fetch": "^3.3.2",
39
39
  "ora": "^8.0.1",
40
- "zod": "^3.25.76"
40
+ "zod": "^3.25.76",
41
+ "@kya-os/mcp-i": "1.5.6-canary.0",
42
+ "@kya-os/mcp-i-cloudflare": "1.4.1-canary.0"
41
43
  },
42
44
  "_comment": {
43
45
  "node-fetch": "Required by @kya-os/cli-effects (transitive dependency). cli-effects imports node-fetch but doesn't declare it. TODO: Update cli-effects to declare node-fetch or use native fetch (Node 20+)."