@kya-os/create-mcpi-app 1.7.38-canary.2 → 1.7.39-canary.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.
Files changed (71) hide show
  1. package/.turbo/turbo-build.log +4 -0
  2. package/.turbo/turbo-test$colon$coverage.log +378 -0
  3. package/.turbo/turbo-test.log +164 -0
  4. package/dist/helpers/config-builder.d.ts +4 -10
  5. package/dist/helpers/config-builder.d.ts.map +1 -1
  6. package/dist/helpers/config-builder.js +7 -64
  7. package/dist/helpers/config-builder.js.map +1 -1
  8. package/dist/helpers/fetch-cloudflare-mcpi-template.d.ts.map +1 -1
  9. package/dist/helpers/fetch-cloudflare-mcpi-template.js +35 -914
  10. package/dist/helpers/fetch-cloudflare-mcpi-template.js.map +1 -1
  11. package/dist/utils/fetch-remote-config.d.ts.map +1 -1
  12. package/dist/utils/fetch-remote-config.js +2 -2
  13. package/dist/utils/fetch-remote-config.js.map +1 -1
  14. package/package/package.json +77 -0
  15. package/package.json +5 -3
  16. package/ARCHITECTURE_ANALYSIS.md +0 -392
  17. package/CHANGELOG.md +0 -372
  18. package/DEPRECATION_WARNINGS_ANALYSIS.md +0 -192
  19. package/IMPLEMENTATION_SUMMARY.md +0 -108
  20. package/REMEDIATION_PLAN.md +0 -99
  21. package/dist/.tsbuildinfo +0 -1
  22. package/scripts/prepare-pack.js +0 -47
  23. package/scripts/validate-no-workspace.js +0 -79
  24. package/src/__tests__/cloudflare-template.test.ts +0 -490
  25. package/src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts +0 -337
  26. package/src/__tests__/helpers/generate-config.test.ts +0 -312
  27. package/src/__tests__/helpers/generate-identity.test.ts +0 -271
  28. package/src/__tests__/helpers/install.test.ts +0 -370
  29. package/src/__tests__/helpers/validate-project-structure.test.ts +0 -467
  30. package/src/__tests__.bak/regression.test.ts +0 -434
  31. package/src/effects/index.ts +0 -80
  32. package/src/helpers/__tests__/config-builder.spec.ts +0 -231
  33. package/src/helpers/apply-identity-preset.ts +0 -209
  34. package/src/helpers/config-builder.ts +0 -165
  35. package/src/helpers/copy-template.ts +0 -11
  36. package/src/helpers/create.ts +0 -239
  37. package/src/helpers/fetch-cloudflare-mcpi-template.ts +0 -2404
  38. package/src/helpers/fetch-cloudflare-template.ts +0 -361
  39. package/src/helpers/fetch-mcpi-template.ts +0 -236
  40. package/src/helpers/fetch-xmcp-template.ts +0 -153
  41. package/src/helpers/generate-config.ts +0 -118
  42. package/src/helpers/generate-identity.ts +0 -163
  43. package/src/helpers/identity-manager.ts +0 -186
  44. package/src/helpers/install.ts +0 -79
  45. package/src/helpers/rename.ts +0 -17
  46. package/src/helpers/validate-project-structure.ts +0 -127
  47. package/src/index.ts +0 -520
  48. package/src/utils/__tests__/fetch-remote-config.test.ts +0 -271
  49. package/src/utils/check-node.ts +0 -17
  50. package/src/utils/fetch-remote-config.ts +0 -179
  51. package/src/utils/is-folder-empty.ts +0 -60
  52. package/src/utils/validate-project-name.ts +0 -132
  53. package/test-cloudflare/README.md +0 -164
  54. package/test-cloudflare/package.json +0 -28
  55. package/test-cloudflare/src/index.ts +0 -341
  56. package/test-cloudflare/src/tools/greet.ts +0 -19
  57. package/test-cloudflare/tests/cache-invalidation.test.ts +0 -410
  58. package/test-cloudflare/tests/cors-security.test.ts +0 -349
  59. package/test-cloudflare/tests/delegation.test.ts +0 -335
  60. package/test-cloudflare/tests/do-routing.test.ts +0 -314
  61. package/test-cloudflare/tests/integration.test.ts +0 -205
  62. package/test-cloudflare/tests/session-management.test.ts +0 -359
  63. package/test-cloudflare/tsconfig.json +0 -16
  64. package/test-cloudflare/vitest.config.ts +0 -9
  65. package/test-cloudflare/wrangler.toml +0 -37
  66. package/test-node/README.md +0 -44
  67. package/test-node/package.json +0 -23
  68. package/test-node/src/tools/greet.ts +0 -25
  69. package/test-node/xmcp.config.ts +0 -20
  70. package/tsconfig.json +0 -26
  71. package/vitest.config.ts +0 -14
@@ -0,0 +1,4 @@
1
+
2
+ > @kya-os/create-mcpi-app@1.7.38 build /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/create-mcpi-app
3
+ > tsc --build && chmod +x dist/index.js
4
+
@@ -0,0 +1,378 @@
1
+
2
+ 
3
+ > @kya-os/create-mcpi-app@1.7.38 test:coverage /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/create-mcpi-app
4
+ > vitest --run --coverage
5
+
6
+ [?25l▲ [WARNING] The condition "types" here will never be used as it comes after both "import" and "require" [package.json]
7
+
8
+ package.json:15:6:
9
+  15 │ "types": "./dist/index.d.ts"
10
+ ╵ ~~~~~~~
11
+
12
+ The "import" condition comes earlier and will be used for all "import" statements:
13
+
14
+ package.json:13:6:
15
+  13 │ "import": "./dist/index.js",
16
+ ╵ ~~~~~~~~
17
+
18
+ The "require" condition comes earlier and will be used for all "require" calls:
19
+
20
+ package.json:14:6:
21
+  14 │ "require": "./dist/index.js",
22
+ ╵ ~~~~~~~~~
23
+
24
+ ▲ [WARNING] The condition "types" here will never be used as it comes after both "import" and "require" [package.json]
25
+
26
+ package.json:20:6:
27
+  20 │ "types": "./dist/helpers/config-builder.d.ts"
28
+ ╵ ~~~~~~~
29
+
30
+ The "import" condition comes earlier and will be used for all "import" statements:
31
+
32
+ package.json:18:6:
33
+  18 │ "import": "./dist/helpers/config-builder.js",
34
+ ╵ ~~~~~~~~
35
+
36
+ The "require" condition comes earlier and will be used for all "require" calls:
37
+
38
+ package.json:19:6:
39
+  19 │ "require": "./dist/helpers/config-builder.js",
40
+ ╵ ~~~~~~~~~
41
+
42
+
43
+  RUN  v4.0.5 /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/create-mcpi-app
44
+ Coverage enabled with v8
45
+
46
+ [?2026h
47
+  ❯ test-cloudflare/tests/session-management.test.ts [queued]
48
+
49
+  Test Files 0 passed (13)
50
+  Tests 0 passed (0)
51
+  Start at 05:49:13
52
+  Duration 314ms
53
+ [?2026l[?2026hstdout | test-cloudflare/tests/session-management.test.ts > Session Management > Session Security > should not expose session data in logs
54
+ [Session] Created session: secure-session
55
+
56
+
57
+  ❯ src/__tests__/cloudflare-template.test.ts [queued]
58
+  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts [queued]
59
+  ❯ src/__tests__/helpers/generate-config.test.ts [queued]
60
+  ❯ src/__tests__/helpers/generate-identity.test.ts [queued]
61
+  ❯ src/__tests__/helpers/install.test.ts [queued]
62
+  ❯ src/utils/__tests__/fetch-remote-config.test.ts [queued]
63
+  ❯ test-cloudflare/tests/cache-invalidation.test.ts [queued]
64
+  ❯ test-cloudflare/tests/cors-security.test.ts 0/29
65
+  ❯ test-cloudflare/tests/delegation.test.ts 0/12
66
+  ❯ test-cloudflare/tests/session-management.test.ts 0/17
67
+
68
+  Test Files 0 passed (13)
69
+  Tests 0 passed (58)
70
+  Start at 05:49:13
71
+  Duration 422ms
72
+ [?2026l[?2026h ✓ test-cloudflare/tests/delegation.test.ts (12 tests) 7ms
73
+ ✓ test-cloudflare/tests/cors-security.test.ts (29 tests) 6ms
74
+ ✓ test-cloudflare/tests/session-management.test.ts (17 tests) 29ms
75
+
76
+  ❯ src/__tests__/cloudflare-template.test.ts [queued]
77
+  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts [queued]
78
+  ❯ src/__tests__/helpers/generate-config.test.ts [queued]
79
+  ❯ src/__tests__/helpers/generate-identity.test.ts [queued]
80
+  ❯ src/__tests__/helpers/install.test.ts [queued]
81
+  ❯ src/__tests__/helpers/validate-project-structure.test.ts [queued]
82
+  ❯ src/helpers/__tests__/config-builder.spec.ts [queued]
83
+  ❯ src/utils/__tests__/fetch-remote-config.test.ts [queued]
84
+  ❯ test-cloudflare/tests/cache-invalidation.test.ts 0/18
85
+  ❯ test-cloudflare/tests/do-routing.test.ts 0/14
86
+
87
+  Test Files 3 passed (13)
88
+  Tests 58 passed (90)
89
+  Start at 05:49:13
90
+  Duration 529ms
91
+ [?2026l[?2026h ✓ test-cloudflare/tests/cache-invalidation.test.ts (18 tests) 49ms
92
+
93
+
94
+  ❯ src/__tests__/cloudflare-template.test.ts 0/24
95
+  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 0/19
96
+  ❯ src/__tests__/helpers/generate-config.test.ts 0/25
97
+  ❯ src/__tests__/helpers/generate-identity.test.ts 0/24
98
+  ❯ src/__tests__/helpers/install.test.ts 0/20
99
+  ❯ src/__tests__/helpers/validate-project-structure.test.ts [queued]
100
+  ❯ src/helpers/__tests__/config-builder.spec.ts 1/12
101
+  ❯ test-cloudflare/tests/do-routing.test.ts 0/14
102
+
103
+  Test Files 5 passed (13)
104
+  Tests 86 passed (223)
105
+  Start at 05:49:13
106
+  Duration 729ms
107
+ [?2026l[?2026hstderr | src/utils/__tests__/fetch-remote-config.test.ts > fetchRemoteConfig > Error handling > should return null if API request fails
108
+ [RemoteConfig] API returned 404: Not Found
109
+
110
+ stderr | src/utils/__tests__/fetch-remote-config.test.ts > fetchRemoteConfig > Error handling > should return null if API throws error
111
+ [RemoteConfig] Failed to fetch config: Error: Network error
112
+ at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/create-mcpi-app/src/utils/__tests__/fetch-remote-config.test.ts:173:35
113
+ 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
114
+ 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
115
+ 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
116
+ at new Promise (<anonymous>)
117
+ 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)
118
+ 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)
119
+  at processTicksAndRejections (node:internal/process/task_queues:103:5)
120
+ 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)
121
+ 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)
122
+
123
+ stderr | src/utils/__tests__/fetch-remote-config.test.ts > fetchRemoteConfig > Error handling > should return null if neither projectId nor agentDid provided
124
+ [RemoteConfig] Neither projectId nor agentDid provided
125
+
126
+ stderr | src/utils/__tests__/fetch-remote-config.test.ts > fetchRemoteConfig > Error handling > should handle cache read errors gracefully
127
+ [RemoteConfig] Cache read failed: Error: Cache error
128
+ at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/create-mcpi-app/src/utils/__tests__/fetch-remote-config.test.ts:201:50
129
+ 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
130
+ 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
131
+ 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
132
+ at new Promise (<anonymous>)
133
+ 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)
134
+ 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)
135
+  at processTicksAndRejections (node:internal/process/task_queues:103:5)
136
+ 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)
137
+ 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)
138
+
139
+
140
+  ❯ src/__tests__/cloudflare-template.test.ts 0/24
141
+  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 0/19
142
+  ❯ src/__tests__/helpers/generate-config.test.ts 0/25
143
+  ❯ src/__tests__/helpers/generate-identity.test.ts 0/24
144
+  ❯ src/__tests__/helpers/install.test.ts 0/20
145
+  ❯ src/__tests__/helpers/validate-project-structure.test.ts [queued]
146
+  ❯ src/helpers/__tests__/config-builder.spec.ts 1/12
147
+  ❯ test-cloudflare/tests/do-routing.test.ts 0/14
148
+
149
+  Test Files 5 passed (13)
150
+  Tests 86 passed (223)
151
+  Start at 05:49:13
152
+  Duration 729ms
153
+ [?2026l[?2026hstdout | src/__tests__/helpers/install.test.ts > install > Dependency installation > should install dependencies with npm
154
+ 
155
+ 📦 Installing dependencies with npm...
156
+ ✓ Lockfile created (package-lock.json) - remember to commit it
157
+
158
+ ✓ src/utils/__tests__/fetch-remote-config.test.ts (9 tests) 37ms
159
+
160
+  ❯ src/__tests__/cloudflare-template.test.ts 0/24
161
+  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 0/19
162
+  ❯ src/__tests__/helpers/generate-config.test.ts 0/25
163
+  ❯ src/__tests__/helpers/generate-identity.test.ts 0/24
164
+  ❯ src/__tests__/helpers/install.test.ts 0/20
165
+  ❯ src/__tests__/helpers/validate-project-structure.test.ts [queued]
166
+  ❯ src/helpers/__tests__/config-builder.spec.ts 1/12
167
+  ❯ test-cloudflare/tests/do-routing.test.ts 0/14
168
+
169
+  Test Files 5 passed (13)
170
+  Tests 86 passed (223)
171
+  Start at 05:49:13
172
+  Duration 729ms
173
+ [?2026l[?2026hstderr | src/helpers/__tests__/config-builder.spec.ts > buildConfigWithRemote > should fallback to local config when remote fetch fails
174
+ [RemoteConfig] Neither projectId nor agentDid provided
175
+
176
+
177
+  ❯ src/__tests__/cloudflare-template.test.ts 0/24
178
+  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 0/19
179
+  ❯ src/__tests__/helpers/generate-config.test.ts 0/25
180
+  ❯ src/__tests__/helpers/generate-identity.test.ts 0/24
181
+  ❯ src/__tests__/helpers/install.test.ts 0/20
182
+  ❯ src/__tests__/helpers/validate-project-structure.test.ts [queued]
183
+  ❯ src/helpers/__tests__/config-builder.spec.ts 1/12
184
+  ❯ test-cloudflare/tests/do-routing.test.ts 0/14
185
+
186
+  Test Files 5 passed (13)
187
+  Tests 86 passed (223)
188
+  Start at 05:49:13
189
+  Duration 729ms
190
+ [?2026l[?2026hstdout | src/__tests__/helpers/install.test.ts > install > Dependency installation > should install dependencies with yarn
191
+ 
192
+ 📦 Installing dependencies with yarn...
193
+ ✓ Lockfile created (yarn.lock) - remember to commit it
194
+
195
+ stdout | src/__tests__/helpers/install.test.ts > install > Dependency installation > should install dependencies with pnpm
196
+ 
197
+ 📦 Installing dependencies with pnpm...
198
+ ✓ Lockfile created (pnpm-lock.yaml) - remember to commit it
199
+
200
+ stdout | src/__tests__/helpers/install.test.ts > install > Dependency installation > should use correct working directory
201
+ 
202
+ 📦 Installing dependencies with npm...
203
+ ✓ Lockfile created (package-lock.json) - remember to commit it
204
+
205
+
206
+  ❯ src/__tests__/cloudflare-template.test.ts 0/24
207
+  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 0/19
208
+  ❯ src/__tests__/helpers/generate-config.test.ts 0/25
209
+  ❯ src/__tests__/helpers/generate-identity.test.ts 0/24
210
+  ❯ src/__tests__/helpers/install.test.ts 0/20
211
+  ❯ src/__tests__/helpers/validate-project-structure.test.ts [queued]
212
+  ❯ src/helpers/__tests__/config-builder.spec.ts 1/12
213
+  ❯ test-cloudflare/tests/do-routing.test.ts 0/14
214
+
215
+  Test Files 5 passed (13)
216
+  Tests 86 passed (223)
217
+  Start at 05:49:13
218
+  Duration 729ms
219
+ [?2026l[?2026hstderr | src/__tests__/helpers/install.test.ts > install > Install progress reporting > should report correct package manager in log
220
+ ⚠️ Warning: No lockfile generated (pnpm-lock.yaml)
221
+
222
+
223
+  ❯ src/__tests__/cloudflare-template.test.ts 0/24
224
+  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 0/19
225
+  ❯ src/__tests__/helpers/generate-config.test.ts 0/25
226
+  ❯ src/__tests__/helpers/generate-identity.test.ts 0/24
227
+  ❯ src/__tests__/helpers/install.test.ts 0/20
228
+  ❯ src/__tests__/helpers/validate-project-structure.test.ts [queued]
229
+  ❯ src/helpers/__tests__/config-builder.spec.ts 1/12
230
+  ❯ test-cloudflare/tests/do-routing.test.ts 0/14
231
+
232
+  Test Files 5 passed (13)
233
+  Tests 86 passed (223)
234
+  Start at 05:49:13
235
+  Duration 729ms
236
+ [?2026l[?2026h ✓ src/helpers/__tests__/config-builder.spec.ts (12 tests) 22ms
237
+ stdout | src/__tests__/helpers/install.test.ts > install > Install progress reporting > should check for lockfile after installation
238
+ 
239
+ 📦 Installing dependencies with npm...
240
+ ✓ Lockfile created (package-lock.json) - remember to commit it
241
+
242
+ stdout | src/__tests__/helpers/install.test.ts > install > Error handling > should throw error when installation fails
243
+ 
244
+ 📦 Installing dependencies with npm...
245
+
246
+
247
+  ❯ src/__tests__/cloudflare-template.test.ts 5/24
248
+  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 2/19
249
+
250
+  Test Files 11 passed (13)
251
+  Tests 210 passed (246)
252
+  Start at 05:49:13
253
+  Duration 831ms
254
+ [?2026l[?2026hstderr | src/__tests__/helpers/install.test.ts > install > Error handling > should throw error when installation fails
255
+ Failed to install dependencies with npm.
256
+
257
+
258
+  ❯ src/__tests__/cloudflare-template.test.ts 5/24
259
+  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 2/19
260
+
261
+  Test Files 11 passed (13)
262
+  Tests 210 passed (246)
263
+  Start at 05:49:13
264
+  Duration 831ms
265
+ [?2026l[?2026hstdout | src/__tests__/helpers/install.test.ts > install > Error handling > should handle network errors during installation
266
+ 
267
+ 📦 Installing dependencies with npm...
268
+
269
+
270
+  ❯ src/__tests__/cloudflare-template.test.ts 5/24
271
+  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 2/19
272
+
273
+  Test Files 11 passed (13)
274
+  Tests 210 passed (246)
275
+  Start at 05:49:13
276
+  Duration 831ms
277
+ [?2026l[?2026hstderr | src/__tests__/helpers/install.test.ts > install > Error handling > should handle network errors during installation
278
+ Failed to install dependencies with npm.
279
+
280
+
281
+  ❯ src/__tests__/cloudflare-template.test.ts 5/24
282
+  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 2/19
283
+
284
+  Test Files 11 passed (13)
285
+  Tests 210 passed (246)
286
+  Start at 05:49:13
287
+  Duration 831ms
288
+ [?2026l[?2026hstdout | src/__tests__/helpers/install.test.ts > install > Error handling > should handle permission errors during installation
289
+ 
290
+ 📦 Installing dependencies with npm...
291
+
292
+
293
+  ❯ src/__tests__/cloudflare-template.test.ts 5/24
294
+  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 2/19
295
+
296
+  Test Files 11 passed (13)
297
+  Tests 210 passed (246)
298
+  Start at 05:49:13
299
+  Duration 831ms
300
+ [?2026l[?2026hstderr | src/__tests__/helpers/install.test.ts > install > Error handling > should handle permission errors during installation
301
+ Failed to install dependencies with npm.
302
+
303
+
304
+  ❯ src/__tests__/cloudflare-template.test.ts 5/24
305
+  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 2/19
306
+
307
+  Test Files 11 passed (13)
308
+  Tests 210 passed (246)
309
+  Start at 05:49:13
310
+  Duration 831ms
311
+ [?2026l[?2026hstdout | src/__tests__/helpers/install.test.ts > install > Error handling > should log error message when installation fails
312
+ 
313
+ 📦 Installing dependencies with npm...
314
+
315
+ stdout | src/__tests__/helpers/install.test.ts > install > Error handling > should handle invalid package manager gracefully
316
+ 
317
+ 📦 Installing dependencies with unknown...
318
+
319
+
320
+  ❯ src/__tests__/cloudflare-template.test.ts 5/24
321
+  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 2/19
322
+
323
+  Test Files 11 passed (13)
324
+  Tests 210 passed (246)
325
+  Start at 05:49:13
326
+  Duration 831ms
327
+ [?2026l[?2026hstderr | src/__tests__/helpers/install.test.ts > install > Error handling > should handle invalid package manager gracefully
328
+ ⚠️ Warning: Unknown package manager "unknown", cannot check lockfile
329
+
330
+
331
+  ❯ src/__tests__/cloudflare-template.test.ts 5/24
332
+  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 2/19
333
+
334
+  Test Files 11 passed (13)
335
+  Tests 210 passed (246)
336
+  Start at 05:49:13
337
+  Duration 831ms
338
+ [?2026l[?2026hstdout | src/__tests__/helpers/install.test.ts > install > Lockfile validation > should warn when lockfile not created
339
+ 
340
+ 📦 Installing dependencies with npm...
341
+
342
+ ✓ src/__tests__/helpers/generate-config.test.ts (25 tests) 148ms
343
+ ✓ src/__tests__/helpers/generate-identity.test.ts (24 tests) 131ms
344
+ ✓ src/__tests__/helpers/install.test.ts (20 tests) 159ms
345
+ ✓ test-cloudflare/tests/do-routing.test.ts (14 tests) 198ms
346
+ ✓ src/__tests__/helpers/validate-project-structure.test.ts (23 tests) 61ms
347
+
348
+  ❯ src/__tests__/cloudflare-template.test.ts 5/24
349
+  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 2/19
350
+
351
+  Test Files 11 passed (13)
352
+  Tests 210 passed (246)
353
+  Start at 05:49:13
354
+  Duration 831ms
355
+ [?2026l ✓ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts (19 tests) 278ms
356
+ ✓ src/__tests__/cloudflare-template.test.ts (24 tests) 321ms
357
+
358
+  Test Files  13 passed (13)
359
+  Tests  246 passed (246)
360
+  Start at  05:49:13
361
+  Duration  994ms (transform 1.04s, setup 0ms, collect 1.87s, tests 1.45s, environment 3ms, prepare 763ms)
362
+
363
+  % Coverage report from v8
364
+ -------------------------------|---------|----------|---------|---------|-------------------
365
+ File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
366
+ -------------------------------|---------|----------|---------|---------|-------------------
367
+ All files  |  96.52 |  93.79 |  100 |  96.52 |  
368
+  helpers  |  97.32 |  94.78 |  100 |  97.32 |  
369
+  config-builder.ts  |  100 |  100 |  100 |  100 |  
370
+  ...oudflare-mcpi-template.ts |  94.64 |  89.65 |  100 |  94.64 | ...1013,1118-1126
371
+  generate-config.ts  |  100 |  100 |  100 |  100 |  
372
+  generate-identity.ts  |  100 |  100 |  100 |  100 |  
373
+  install.ts  |  100 |  100 |  100 |  100 |  
374
+  ...date-project-structure.ts |  100 |  100 |  100 |  100 |  
375
+  utils  |  91.42 |  90 |  100 |  91.42 |  
376
+  fetch-remote-config.ts  |  91.42 |  90 |  100 |  91.42 | 152-153,169 
377
+ -------------------------------|---------|----------|---------|---------|-------------------
378
+ [?25h
@@ -0,0 +1,164 @@
1
+
2
+ > @kya-os/create-mcpi-app@1.7.38 test /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/create-mcpi-app
3
+ > vitest --run
4
+
5
+ ▲ [WARNING] The condition "types" here will never be used as it comes after both "import" and "require" [package.json]
6
+
7
+ package.json:15:6:
8
+ 15 │ "types": "./dist/index.d.ts"
9
+ ╵ ~~~~~~~
10
+
11
+ The "import" condition comes earlier and will be used for all "import" statements:
12
+
13
+ package.json:13:6:
14
+ 13 │ "import": "./dist/index.js",
15
+ ╵ ~~~~~~~~
16
+
17
+ The "require" condition comes earlier and will be used for all "require" calls:
18
+
19
+ package.json:14:6:
20
+ 14 │ "require": "./dist/index.js",
21
+ ╵ ~~~~~~~~~
22
+
23
+ ▲ [WARNING] The condition "types" here will never be used as it comes after both "import" and "require" [package.json]
24
+
25
+ package.json:20:6:
26
+ 20 │ "types": "./dist/helpers/config-builder.d.ts"
27
+ ╵ ~~~~~~~
28
+
29
+ The "import" condition comes earlier and will be used for all "import" statements:
30
+
31
+ package.json:18:6:
32
+ 18 │ "import": "./dist/helpers/config-builder.js",
33
+ ╵ ~~~~~~~~
34
+
35
+ The "require" condition comes earlier and will be used for all "require" calls:
36
+
37
+ package.json:19:6:
38
+ 19 │ "require": "./dist/helpers/config-builder.js",
39
+ ╵ ~~~~~~~~~
40
+
41
+
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
+ 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
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) 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
+
90
+ 📦 Installing dependencies with npm...
91
+ ✓ Lockfile created (package-lock.json) - remember to commit it
92
+
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
+ 📦 Installing dependencies with yarn...
98
+ ✓ Lockfile created (yarn.lock) - remember to commit it
99
+
100
+ stdout | src/__tests__/helpers/install.test.ts > install > Dependency installation > should install dependencies with pnpm
101
+
102
+ 📦 Installing dependencies with pnpm...
103
+ ✓ Lockfile created (pnpm-lock.yaml) - remember to commit it
104
+
105
+ stdout | src/__tests__/helpers/install.test.ts > install > Dependency installation > should use correct working directory
106
+
107
+ 📦 Installing dependencies with npm...
108
+ ✓ Lockfile created (package-lock.json) - remember to commit it
109
+
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
+
116
+ 📦 Installing dependencies with npm...
117
+ ✓ Lockfile created (package-lock.json) - remember to commit it
118
+
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.
123
+ 📦 Installing dependencies with npm...
124
+
125
+
126
+ stdout | src/__tests__/helpers/install.test.ts > install > Error handling > should handle network errors during installation
127
+
128
+ 📦 Installing dependencies with npm...
129
+
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
+
135
+ 📦 Installing dependencies with npm...
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
141
+
142
+ 📦 Installing dependencies with npm...
143
+
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
+
149
+ 📦 Installing dependencies with unknown...
150
+
151
+ stdout | src/__tests__/helpers/install.test.ts > install > Lockfile validation > should warn when lockfile not created
152
+
153
+ 📦 Installing dependencies with npm...
154
+
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"}