@kya-os/create-mcpi-app 1.7.42-canary.8 → 1.7.42-canary.81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,155 +1,68 @@
1
1
 
2
2
  
3
- > @kya-os/create-mcpi-app@1.7.42-canary.2 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
-
3
+ > @kya-os/create-mcpi-app@1.7.42-canary.73 test:coverage /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/create-mcpi-app
4
+ > vitest run --coverage
42
5
 
6
+ [?25l
43
7
   RUN  v4.0.5 /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/create-mcpi-app
44
8
  Coverage enabled with v8
45
9
 
46
10
  [?2026h
47
-  ❯ src/__tests__/helpers/generate-config.test.ts [queued]
11
+  ❯ src/__tests__/cloudflare-template.test.ts [queued]
48
12
 
49
-  Test Files 0 passed (13)
13
+  Test Files 0 passed (14)
50
14
   Tests 0 passed (0)
51
-  Start at 13:14:16
52
-  Duration 101ms
53
- [?2026l[?2026h ✓ test-cloudflare/tests/cors-security.test.ts (29 tests) 4ms
54
- ✓ test-cloudflare/tests/cache-invalidation.test.ts (18 tests) 5ms
55
- ✓ test-cloudflare/tests/delegation.test.ts (12 tests) 5ms
56
- stdout | test-cloudflare/tests/session-management.test.ts > Session Management > Session Security > should not expose session data in logs
57
- [Session] Created session: secure-session
58
-
59
-
15
+  Start at 15:24:22
16
+  Duration 209ms
17
+ [?2026l[?2026h
60
18
   ❯ src/__tests__/cloudflare-template.test.ts [queued]
61
19
   ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts [queued]
62
-  ❯ src/__tests__/helpers/generate-config.test.ts 0/25
63
-  ❯ src/__tests__/helpers/generate-identity.test.ts 0/24
20
+  ❯ src/__tests__/helpers/generate-config.test.ts [queued]
21
+  ❯ src/__tests__/helpers/generate-identity.test.ts [queued]
64
22
   ❯ src/__tests__/helpers/install.test.ts [queued]
65
23
   ❯ src/__tests__/helpers/validate-project-structure.test.ts [queued]
66
-  ❯ src/helpers/__tests__/config-builder.spec.ts 0/12
67
-  ❯ test-cloudflare/tests/do-routing.test.ts 0/14
24
+  ❯ src/__tests__/scaffolder-envprefix.test.ts [queued]
25
+  ❯ test-cloudflare/tests/cache-invalidation.test.ts [queued]
26
+  ❯ test-cloudflare/tests/cors-security.test.ts [queued]
27
+  ❯ test-cloudflare/tests/delegation.test.ts 0/12
28
+  ❯ test-cloudflare/tests/do-routing.test.ts [queued]
29
+  ❯ test-cloudflare/tests/session-management.test.ts [queued]
30
+
31
+  Test Files 0 passed (14)
32
+  Tests 0 passed (12)
33
+  Start at 15:24:22
34
+  Duration 310ms
35
+ [?2026l[?2026h ✓ test-cloudflare/tests/cache-invalidation.test.ts (18 tests) 7ms
36
+ stdout | test-cloudflare/tests/session-management.test.ts > Session Management > Session Security > should not expose session data in logs
37
+ [Session] Created session: secure-session
68
38
 
69
-  Test Files 5 passed (13)
70
-  Tests 85 passed (160)
71
-  Start at 13:14:16
72
-  Duration 204ms
73
- [?2026l[?2026hstderr | src/utils/__tests__/fetch-remote-config.test.ts > fetchRemoteConfig > Error handling > should return null if API request fails
74
- [RemoteConfig] API returned 404: Not Found
75
-
76
- stderr | src/utils/__tests__/fetch-remote-config.test.ts > fetchRemoteConfig > Error handling > should return null if API throws error
77
- [RemoteConfig] Failed to fetch config: Error: Network error
78
- at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/create-mcpi-app/src/utils/__tests__/fetch-remote-config.test.ts:173:35
79
- 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
80
- 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
81
- 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
82
- at new Promise (<anonymous>)
83
- 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)
84
- 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)
85
-  at processTicksAndRejections (node:internal/process/task_queues:103:5)
86
- 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)
87
- 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)
88
-
89
- stderr | src/utils/__tests__/fetch-remote-config.test.ts > fetchRemoteConfig > Error handling > should return null if neither projectId nor agentDid provided
90
- [RemoteConfig] Neither projectId nor agentDid provided
39
+ ✓ test-cloudflare/tests/delegation.test.ts (12 tests) 6ms
40
+ ✓ test-cloudflare/tests/cors-security.test.ts (29 tests) 4ms
41
+ ✓ test-cloudflare/tests/session-management.test.ts (17 tests) 36ms
42
+ ✓ src/__tests__/helpers/generate-identity.test.ts (24 tests) 49ms
43
+ stdout | src/__tests__/scaffolder-envprefix.test.ts > Scaffolder envPrefix Configuration > should include envPrefix in generated index.ts
44
+ 
45
+ 🏗️ Generating Cloudflare MCP-I project: test-agent...
91
46
 
92
- stderr | src/utils/__tests__/fetch-remote-config.test.ts > fetchRemoteConfig > Error handling > should handle cache read errors gracefully
93
- [RemoteConfig] Cache read failed: Error: Cache error
94
- at /Users/dylanhobbs/Documents/@kya-os/xmcp-i/packages/create-mcpi-app/src/utils/__tests__/fetch-remote-config.test.ts:201:50
95
- 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
96
- 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
97
- 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
98
- at new Promise (<anonymous>)
99
- 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)
100
- 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)
101
-  at processTicksAndRejections (node:internal/process/task_queues:103:5)
102
- 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)
103
- 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)
47
+ stdout | src/__tests__/scaffolder-envprefix.test.ts > Scaffolder envPrefix Configuration > should include envPrefix in generated index.ts
48
+ 🔑 Generating cryptographic identity...
104
49
 
105
50
 
106
-  ❯ src/__tests__/cloudflare-template.test.ts [queued]
107
-  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts [queued]
108
-  ❯ src/__tests__/helpers/generate-config.test.ts 0/25
109
-  ❯ src/__tests__/helpers/generate-identity.test.ts 0/24
110
-  ❯ src/__tests__/helpers/install.test.ts [queued]
111
-  ❯ src/__tests__/helpers/validate-project-structure.test.ts [queued]
112
-  ❯ src/helpers/__tests__/config-builder.spec.ts 0/12
113
-  ❯ test-cloudflare/tests/do-routing.test.ts 0/14
114
-
115
-  Test Files 5 passed (13)
116
-  Tests 85 passed (160)
117
-  Start at 13:14:16
118
-  Duration 204ms
119
- [?2026l[?2026h ✓ src/utils/__tests__/fetch-remote-config.test.ts (9 tests) 8ms
120
- ✓ test-cloudflare/tests/session-management.test.ts (17 tests) 15ms
121
51
 
122
-  ❯ src/__tests__/cloudflare-template.test.ts [queued]
123
-  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts [queued]
52
+  ❯ src/__tests__/cloudflare-template.test.ts 0/30
53
+  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 0/21
124
54
   ❯ src/__tests__/helpers/generate-config.test.ts 0/25
125
-  ❯ src/__tests__/helpers/generate-identity.test.ts 0/24
126
-  ❯ src/__tests__/helpers/install.test.ts [queued]
127
-  ❯ src/__tests__/helpers/validate-project-structure.test.ts [queued]
55
+  ❯ src/__tests__/helpers/install.test.ts 0/20
56
+  ❯ src/__tests__/helpers/validate-project-structure.test.ts 0/23
57
+  ❯ src/__tests__/scaffolder-envprefix.test.ts 0/4
128
58
   ❯ src/helpers/__tests__/config-builder.spec.ts 0/12
129
59
   ❯ test-cloudflare/tests/do-routing.test.ts 0/14
130
60
 
131
-  Test Files 5 passed (13)
132
-  Tests 85 passed (160)
133
-  Start at 13:14:16
134
-  Duration 204ms
135
- [?2026l[?2026hstderr | src/helpers/__tests__/config-builder.spec.ts > buildConfigWithRemote > should fallback to local config when remote fetch fails
136
- [RemoteConfig] Neither projectId nor agentDid provided
137
-
138
-
139
-
140
-
141
-
142
-
143
-  ❯ src/__tests__/cloudflare-template.test.ts 1/24
144
-  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 0/21
145
-
146
-  Test Files 11 passed (13)
147
-  Tests 204 passed (248)
148
-  Start at 13:14:16
149
-  Duration 404ms
150
- [?2026l[?2026h ✓ src/__tests__/helpers/generate-identity.test.ts (24 tests) 22ms
151
- ✓ src/helpers/__tests__/config-builder.spec.ts (12 tests) 4ms
152
- stdout | src/__tests__/helpers/install.test.ts > install > Dependency installation > should install dependencies with npm
61
+  Test Files 5 passed (14)
62
+  Tests 100 passed (249)
63
+  Start at 15:24:22
64
+  Duration 523ms
65
+ [?2026l[?2026hstdout | src/__tests__/helpers/install.test.ts > install > Dependency installation > should install dependencies with npm
153
66
  
154
67
  📦 Installing dependencies with npm...
155
68
  ✓ Lockfile created (package-lock.json) - remember to commit it
@@ -169,163 +82,321 @@
169
82
  📦 Installing dependencies with npm...
170
83
  ✓ Lockfile created (package-lock.json) - remember to commit it
171
84
 
172
- ✓ src/__tests__/helpers/generate-config.test.ts (25 tests) 27ms
173
85
 
174
-  ❯ src/__tests__/cloudflare-template.test.ts 1/24
175
-  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 0/21
176
86
 
177
-  Test Files 11 passed (13)
178
-  Tests 204 passed (248)
179
-  Start at 13:14:16
180
-  Duration 404ms
181
- [?2026l[?2026hstderr | src/__tests__/helpers/install.test.ts > install > Install progress reporting > should report correct package manager in log
87
+
88
+
89
+
90
+  ❯ src/__tests__/cloudflare-template.test.ts 7/30
91
+  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 6/21
92
+
93
+  Test Files 12 passed (14)
94
+  Tests 220 passed (258)
95
+  Start at 15:24:22
96
+  Duration 624ms
97
+ [?2026l[?2026hstderr | src/__tests__/helpers/install.test.ts > install > Install progress reporting > should report correct package manager in log
182
98
  ⚠️ Warning: No lockfile generated (pnpm-lock.yaml)
183
99
 
100
+ stderr | src/helpers/__tests__/config-builder.spec.ts > buildConfigWithRemote > should fallback to local config when remote fetch fails
101
+ [RemoteConfig] Neither projectId nor agentDid provided
102
+
184
103
 
185
-  ❯ src/__tests__/cloudflare-template.test.ts 1/24
186
-  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 0/21
187
104
 
188
-  Test Files 11 passed (13)
189
-  Tests 204 passed (248)
190
-  Start at 13:14:16
191
-  Duration 404ms
192
- [?2026l[?2026hstdout | src/__tests__/helpers/install.test.ts > install > Install progress reporting > should check for lockfile after installation
105
+
106
+  src/__tests__/cloudflare-template.test.ts 7/30
107
+  src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 6/21
108
+
109
+  Test Files 12 passed (14)
110
+  Tests 220 passed (258)
111
+  Start at 15:24:22
112
+  Duration 624ms
113
+ [?2026l[?2026hstdout | src/__tests__/helpers/install.test.ts > install > Install progress reporting > should check for lockfile after installation
193
114
  
194
115
  📦 Installing dependencies with npm...
195
116
  ✓ Lockfile created (package-lock.json) - remember to commit it
196
117
 
118
+ stdout | src/__tests__/scaffolder-envprefix.test.ts > Scaffolder envPrefix Configuration > should include envPrefix in generated index.ts
119
+ ✔ Created Cloudflare MCP-I template files
120
+ - Generated identity keys in .dev.vars
121
+ - Configured wrangler.toml with KV namespaces
122
+ - Created modular tool structure
123
+ - Created setup script for KV namespace creation
124
+
125
+ ============================================================
126
+ 🎉 Cloudflare MCP-I project created successfully!
127
+ ============================================================
128
+
129
+ 📝 Important Configuration Notes:
130
+
131
+ 1. ADMIN_API_KEY (in .dev.vars):
132
+ - Set to same value as AGENTSHIELD_API_KEY for convenience
133
+ - You can change it if you need separate admin endpoint security
134
+ - Required for admin endpoints like /admin/clear-cache
135
+
136
+ 2. KV Namespaces (in wrangler.toml):
137
+ - Required for MCP-I security features
138
+ - Auto-created by 'npm run setup' script
139
+ - Check wrangler.toml for 'TODO_REPLACE_WITH_ID' if setup failed
140
+
141
+ 🚀 Next Steps:
142
+ cd test-agent
143
+
144
+ stdout | src/__tests__/scaffolder-envprefix.test.ts > Scaffolder envPrefix Configuration > should include envPrefix in generated index.ts
145
+  wrangler login # Login to Cloudflare first!
146
+ npm run setup # Create KV namespaces
147
+ npm run dev # Start local development
148
+ npm run deploy # Deploy to Cloudflare
149
+
150
+
197
151
  stdout | src/__tests__/helpers/install.test.ts > install > Error handling > should throw error when installation fails
198
152
  
199
153
  📦 Installing dependencies with npm...
200
154
 
201
155
 
202
-  ❯ src/__tests__/cloudflare-template.test.ts 1/24
203
-  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 0/21
156
+  ❯ src/__tests__/cloudflare-template.test.ts 7/30
157
+  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 6/21
204
158
 
205
-  Test Files 11 passed (13)
206
-  Tests 204 passed (248)
207
-  Start at 13:14:16
208
-  Duration 404ms
159
+  Test Files 12 passed (14)
160
+  Tests 220 passed (258)
161
+  Start at 15:24:22
162
+  Duration 624ms
209
163
  [?2026l[?2026hstderr | src/__tests__/helpers/install.test.ts > install > Error handling > should throw error when installation fails
210
164
  Failed to install dependencies with npm.
211
165
 
212
166
 
213
-  ❯ src/__tests__/cloudflare-template.test.ts 1/24
214
-  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 0/21
167
+  ❯ src/__tests__/cloudflare-template.test.ts 7/30
168
+  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 6/21
215
169
 
216
-  Test Files 11 passed (13)
217
-  Tests 204 passed (248)
218
-  Start at 13:14:16
219
-  Duration 404ms
170
+  Test Files 12 passed (14)
171
+  Tests 220 passed (258)
172
+  Start at 15:24:22
173
+  Duration 624ms
220
174
  [?2026l[?2026hstdout | src/__tests__/helpers/install.test.ts > install > Error handling > should handle network errors during installation
221
175
  
222
176
  📦 Installing dependencies with npm...
223
177
 
224
178
 
225
-  ❯ src/__tests__/cloudflare-template.test.ts 1/24
226
-  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 0/21
179
+  ❯ src/__tests__/cloudflare-template.test.ts 7/30
180
+  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 6/21
227
181
 
228
-  Test Files 11 passed (13)
229
-  Tests 204 passed (248)
230
-  Start at 13:14:16
231
-  Duration 404ms
182
+  Test Files 12 passed (14)
183
+  Tests 220 passed (258)
184
+  Start at 15:24:22
185
+  Duration 624ms
232
186
  [?2026l[?2026hstderr | src/__tests__/helpers/install.test.ts > install > Error handling > should handle network errors during installation
233
187
  Failed to install dependencies with npm.
234
188
 
235
189
 
236
-  ❯ src/__tests__/cloudflare-template.test.ts 1/24
237
-  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 0/21
190
+  ❯ src/__tests__/cloudflare-template.test.ts 7/30
191
+  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 6/21
238
192
 
239
-  Test Files 11 passed (13)
240
-  Tests 204 passed (248)
241
-  Start at 13:14:16
242
-  Duration 404ms
193
+  Test Files 12 passed (14)
194
+  Tests 220 passed (258)
195
+  Start at 15:24:22
196
+  Duration 624ms
243
197
  [?2026l[?2026hstdout | src/__tests__/helpers/install.test.ts > install > Error handling > should handle permission errors during installation
244
198
  
245
199
  📦 Installing dependencies with npm...
246
200
 
247
201
 
248
-  ❯ src/__tests__/cloudflare-template.test.ts 1/24
249
-  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 0/21
202
+  ❯ src/__tests__/cloudflare-template.test.ts 7/30
203
+  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 6/21
250
204
 
251
-  Test Files 11 passed (13)
252
-  Tests 204 passed (248)
253
-  Start at 13:14:16
254
-  Duration 404ms
205
+  Test Files 12 passed (14)
206
+  Tests 220 passed (258)
207
+  Start at 15:24:22
208
+  Duration 624ms
255
209
  [?2026l[?2026hstderr | src/__tests__/helpers/install.test.ts > install > Error handling > should handle permission errors during installation
256
210
  Failed to install dependencies with npm.
257
211
 
258
212
 
259
-  ❯ src/__tests__/cloudflare-template.test.ts 1/24
260
-  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 0/21
213
+  ❯ src/__tests__/cloudflare-template.test.ts 7/30
214
+  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 6/21
261
215
 
262
-  Test Files 11 passed (13)
263
-  Tests 204 passed (248)
264
-  Start at 13:14:16
265
-  Duration 404ms
216
+  Test Files 12 passed (14)
217
+  Tests 220 passed (258)
218
+  Start at 15:24:22
219
+  Duration 624ms
266
220
  [?2026l[?2026hstdout | src/__tests__/helpers/install.test.ts > install > Error handling > should log error message when installation fails
267
221
  
268
222
  📦 Installing dependencies with npm...
269
223
 
224
+ ✓ src/helpers/__tests__/config-builder.spec.ts (12 tests) 5ms
270
225
  stdout | src/__tests__/helpers/install.test.ts > install > Error handling > should handle invalid package manager gracefully
271
226
  
272
227
  📦 Installing dependencies with unknown...
273
228
 
274
229
 
275
-  ❯ src/__tests__/cloudflare-template.test.ts 1/24
276
-  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 0/21
230
+  ❯ src/__tests__/cloudflare-template.test.ts 7/30
231
+  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 6/21
277
232
 
278
-  Test Files 11 passed (13)
279
-  Tests 204 passed (248)
280
-  Start at 13:14:16
281
-  Duration 404ms
233
+  Test Files 12 passed (14)
234
+  Tests 220 passed (258)
235
+  Start at 15:24:22
236
+  Duration 624ms
282
237
  [?2026l[?2026hstderr | src/__tests__/helpers/install.test.ts > install > Error handling > should handle invalid package manager gracefully
283
238
  ⚠️ Warning: Unknown package manager "unknown", cannot check lockfile
284
239
 
285
240
 
286
-  ❯ src/__tests__/cloudflare-template.test.ts 1/24
287
-  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 0/21
241
+  ❯ src/__tests__/cloudflare-template.test.ts 7/30
242
+  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 6/21
243
+
244
+  Test Files 12 passed (14)
245
+  Tests 220 passed (258)
246
+  Start at 15:24:22
247
+  Duration 624ms
248
+ [?2026l[?2026hstdout | src/__tests__/scaffolder-envprefix.test.ts > Scaffolder envPrefix Configuration > should use correct prefix format (uppercase with underscores)
249
+ 
250
+ 🏗️ Generating Cloudflare MCP-I project: my-awesome-agent...
251
+
252
+ stdout | src/__tests__/scaffolder-envprefix.test.ts > Scaffolder envPrefix Configuration > should use correct prefix format (uppercase with underscores)
253
+ 🔑 Generating cryptographic identity...
288
254
 
289
-  Test Files 11 passed (13)
290
-  Tests 204 passed (248)
291
-  Start at 13:14:16
292
-  Duration 404ms
293
- [?2026l[?2026hstdout | src/__tests__/helpers/install.test.ts > install > Lockfile validation > should warn when lockfile not created
255
+ stdout | src/__tests__/helpers/install.test.ts > install > Lockfile validation > should warn when lockfile not created
294
256
  
295
257
  📦 Installing dependencies with npm...
296
258
 
297
- ✓ src/__tests__/helpers/install.test.ts (20 tests) 28ms
298
- ✓ test-cloudflare/tests/do-routing.test.ts (14 tests) 85ms
299
- ✓ src/__tests__/helpers/validate-project-structure.test.ts (23 tests) 43ms
259
+ ✓ src/__tests__/helpers/install.test.ts (20 tests) 56ms
260
+ ✓ src/__tests__/helpers/validate-project-structure.test.ts (23 tests) 72ms
261
+ stdout | src/__tests__/scaffolder-envprefix.test.ts > Scaffolder envPrefix Configuration > should use correct prefix format (uppercase with underscores)
262
+ ✔ Created Cloudflare MCP-I template files
263
+ - Generated identity keys in .dev.vars
264
+ - Configured wrangler.toml with KV namespaces
265
+ - Created modular tool structure
266
+ - Created setup script for KV namespace creation
300
267
 
301
-  ❯ src/__tests__/cloudflare-template.test.ts 1/24
302
-  src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 0/21
268
+ ============================================================
269
+ 🎉 Cloudflare MCP-I project created successfully!
270
+ ============================================================
271
+
272
+ 📝 Important Configuration Notes:
273
+
274
+ 1. ADMIN_API_KEY (in .dev.vars):
275
+ - Set to same value as AGENTSHIELD_API_KEY for convenience
276
+ - You can change it if you need separate admin endpoint security
277
+ - Required for admin endpoints like /admin/clear-cache
278
+
279
+ 2. KV Namespaces (in wrangler.toml):
280
+ - Required for MCP-I security features
281
+ - Auto-created by 'npm run setup' script
282
+ - Check wrangler.toml for 'TODO_REPLACE_WITH_ID' if setup failed
283
+
284
+ 🚀 Next Steps:
285
+ cd my-awesome-agent
303
286
 
304
-  Test Files 11 passed (13)
305
-  Tests 204 passed (248)
306
-  Start at 13:14:16
307
-  Duration 404ms
308
- [?2026l ✓ src/__tests__/cloudflare-template.test.ts (24 tests) 108ms
309
- ✓ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts (21 tests) 95ms
287
+ stdout | src/__tests__/scaffolder-envprefix.test.ts > Scaffolder envPrefix Configuration > should use correct prefix format (uppercase with underscores)
288
+  wrangler login # Login to Cloudflare first!
289
+ npm run setup # Create KV namespaces
290
+ npm run dev # Start local development
291
+ npm run deploy # Deploy to Cloudflare
310
292
 
311
-  Test Files  13 passed (13)
312
-  Tests  248 passed (248)
313
-  Start at  13:14:16
314
-  Duration  446ms (transform 721ms, setup 0ms, collect 1.03s, tests 448ms, environment 1ms, prepare 168ms)
293
+
294
+ ✓ src/__tests__/helpers/generate-config.test.ts (25 tests) 91ms
295
+ stdout | src/__tests__/scaffolder-envprefix.test.ts > Scaffolder envPrefix Configuration > should include comment explaining envPrefix purpose
296
+ 
297
+ 🏗️ Generating Cloudflare MCP-I project: test-agent...
298
+
299
+ stdout | src/__tests__/scaffolder-envprefix.test.ts > Scaffolder envPrefix Configuration > should include comment explaining envPrefix purpose
300
+ 🔑 Generating cryptographic identity...
301
+
302
+ stdout | src/__tests__/scaffolder-envprefix.test.ts > Scaffolder envPrefix Configuration > should include comment explaining envPrefix purpose
303
+ ✔ Created Cloudflare MCP-I template files
304
+ - Generated identity keys in .dev.vars
305
+ - Configured wrangler.toml with KV namespaces
306
+ - Created modular tool structure
307
+ - Created setup script for KV namespace creation
308
+
309
+ ============================================================
310
+ 🎉 Cloudflare MCP-I project created successfully!
311
+ ============================================================
312
+
313
+ 📝 Important Configuration Notes:
314
+
315
+ 1. ADMIN_API_KEY (in .dev.vars):
316
+ - Set to same value as AGENTSHIELD_API_KEY for convenience
317
+ - You can change it if you need separate admin endpoint security
318
+ - Required for admin endpoints like /admin/clear-cache
319
+
320
+ 2. KV Namespaces (in wrangler.toml):
321
+ - Required for MCP-I security features
322
+ - Auto-created by 'npm run setup' script
323
+ - Check wrangler.toml for 'TODO_REPLACE_WITH_ID' if setup failed
324
+
325
+ 🚀 Next Steps:
326
+ cd test-agent
327
+
328
+ stdout | src/__tests__/scaffolder-envprefix.test.ts > Scaffolder envPrefix Configuration > should include comment explaining envPrefix purpose
329
+  wrangler login # Login to Cloudflare first!
330
+ npm run setup # Create KV namespaces
331
+ npm run dev # Start local development
332
+ npm run deploy # Deploy to Cloudflare
333
+
334
+
335
+ stdout | src/__tests__/scaffolder-envprefix.test.ts > Scaffolder envPrefix Configuration > should match envPrefix with KV binding names in wrangler.toml
336
+ 
337
+ 🏗️ Generating Cloudflare MCP-I project: test-agent...
338
+
339
+ stdout | src/__tests__/scaffolder-envprefix.test.ts > Scaffolder envPrefix Configuration > should match envPrefix with KV binding names in wrangler.toml
340
+ 🔑 Generating cryptographic identity...
341
+
342
+ stdout | src/__tests__/scaffolder-envprefix.test.ts > Scaffolder envPrefix Configuration > should match envPrefix with KV binding names in wrangler.toml
343
+ ✔ Created Cloudflare MCP-I template files
344
+ - Generated identity keys in .dev.vars
345
+ - Configured wrangler.toml with KV namespaces
346
+ - Created modular tool structure
347
+ - Created setup script for KV namespace creation
348
+
349
+ ============================================================
350
+ 🎉 Cloudflare MCP-I project created successfully!
351
+ ============================================================
352
+
353
+ 📝 Important Configuration Notes:
354
+
355
+ 1. ADMIN_API_KEY (in .dev.vars):
356
+ - Set to same value as AGENTSHIELD_API_KEY for convenience
357
+ - You can change it if you need separate admin endpoint security
358
+ - Required for admin endpoints like /admin/clear-cache
359
+
360
+ 2. KV Namespaces (in wrangler.toml):
361
+ - Required for MCP-I security features
362
+ - Auto-created by 'npm run setup' script
363
+ - Check wrangler.toml for 'TODO_REPLACE_WITH_ID' if setup failed
364
+
365
+ 🚀 Next Steps:
366
+ cd test-agent
367
+
368
+ stdout | src/__tests__/scaffolder-envprefix.test.ts > Scaffolder envPrefix Configuration > should match envPrefix with KV binding names in wrangler.toml
369
+  wrangler login # Login to Cloudflare first!
370
+ npm run setup # Create KV namespaces
371
+ npm run dev # Start local development
372
+ npm run deploy # Deploy to Cloudflare
373
+
374
+
375
+ ✓ src/utils/__tests__/fetch-remote-config.test.ts (9 tests) 4ms
376
+ ✓ src/__tests__/scaffolder-envprefix.test.ts (4 tests) 91ms
377
+ ✓ test-cloudflare/tests/do-routing.test.ts (14 tests) 185ms
378
+
379
+  ❯ src/__tests__/cloudflare-template.test.ts 7/30
380
+  ❯ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts 6/21
381
+
382
+  Test Files 12 passed (14)
383
+  Tests 220 passed (258)
384
+  Start at 15:24:22
385
+  Duration 624ms
386
+ [?2026l ✓ src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts (21 tests) 170ms
387
+ ✓ src/__tests__/cloudflare-template.test.ts (30 tests | 2 skipped) 211ms
388
+
389
+  Test Files  14 passed (14)
390
+  Tests  256 passed | 2 skipped (258)
391
+  Start at  15:24:22
392
+  Duration  792ms (transform 854ms, setup 0ms, collect 1.46s, tests 985ms, environment 2ms, prepare 531ms)
315
393
 
316
394
   % Coverage report from v8
317
- ------------------------------------|---------|----------|---------|---------|-------------------
318
- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
319
- ------------------------------------|---------|----------|---------|---------|-------------------
320
- All files  |  97.67 |  94.03 |  100 |  97.67 |  
321
-  helpers  |  98.88 |  95.04 |  100 |  98.88 |  
322
-  config-builder.ts  |  100 |  100 |  100 |  100 |  
323
-  fetch-cloudflare-mcpi-template.ts |  97.05 |  90.62 |  100 |  97.05 | 822,834 
324
-  generate-config.ts  |  100 |  100 |  100 |  100 |  
325
-  generate-identity.ts  |  100 |  100 |  100 |  100 |  
326
-  install.ts  |  100 |  100 |  100 |  100 |  
327
-  validate-project-structure.ts  |  100 |  100 |  100 |  100 |  
328
-  utils  |  91.42 |  90 |  100 |  91.42 |  
329
-  fetch-remote-config.ts  |  91.42 |  90 |  100 |  91.42 | 152-153,169 
330
- ------------------------------------|---------|----------|---------|---------|-------------------
395
+
396
+ =============================== Coverage summary ===============================
397
+ Statements : 26.5% ( 216/815 )
398
+ Branches : 24.63% ( 102/414 )
399
+ Functions : 32.14% ( 18/56 )
400
+ Lines : 26.69% ( 216/809 )
401
+ ================================================================================
331
402
  [?25h