@kya-os/create-mcpi-app 1.7.38-canary.1 → 1.7.38
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.
- package/.turbo/turbo-build.log +4 -0
- package/.turbo/turbo-test$colon$coverage.log +755 -0
- package/.turbo/turbo-test.log +200 -0
- package/dist/helpers/fetch-cloudflare-mcpi-template.d.ts.map +1 -1
- package/dist/helpers/fetch-cloudflare-mcpi-template.js +43 -912
- package/dist/helpers/fetch-cloudflare-mcpi-template.js.map +1 -1
- package/dist/utils/fetch-remote-config.d.ts.map +1 -1
- package/dist/utils/fetch-remote-config.js +2 -2
- package/dist/utils/fetch-remote-config.js.map +1 -1
- package/package/package.json +77 -0
- package/package.json +1 -1
- package/ARCHITECTURE_ANALYSIS.md +0 -392
- package/CHANGELOG.md +0 -372
- package/DEPRECATION_WARNINGS_ANALYSIS.md +0 -192
- package/IMPLEMENTATION_SUMMARY.md +0 -108
- package/REMEDIATION_PLAN.md +0 -99
- package/dist/.tsbuildinfo +0 -1
- package/scripts/prepare-pack.js +0 -47
- package/scripts/validate-no-workspace.js +0 -79
- package/src/__tests__/cloudflare-template.test.ts +0 -490
- package/src/__tests__/helpers/fetch-cloudflare-mcpi-template.test.ts +0 -337
- package/src/__tests__/helpers/generate-config.test.ts +0 -312
- package/src/__tests__/helpers/generate-identity.test.ts +0 -271
- package/src/__tests__/helpers/install.test.ts +0 -370
- package/src/__tests__/helpers/validate-project-structure.test.ts +0 -467
- package/src/__tests__.bak/regression.test.ts +0 -434
- package/src/effects/index.ts +0 -80
- package/src/helpers/__tests__/config-builder.spec.ts +0 -231
- package/src/helpers/apply-identity-preset.ts +0 -209
- package/src/helpers/config-builder.ts +0 -165
- package/src/helpers/copy-template.ts +0 -11
- package/src/helpers/create.ts +0 -239
- package/src/helpers/fetch-cloudflare-mcpi-template.ts +0 -2393
- package/src/helpers/fetch-cloudflare-template.ts +0 -361
- package/src/helpers/fetch-mcpi-template.ts +0 -236
- package/src/helpers/fetch-xmcp-template.ts +0 -153
- package/src/helpers/generate-config.ts +0 -118
- package/src/helpers/generate-identity.ts +0 -163
- package/src/helpers/identity-manager.ts +0 -186
- package/src/helpers/install.ts +0 -79
- package/src/helpers/rename.ts +0 -17
- package/src/helpers/validate-project-structure.ts +0 -127
- package/src/index.ts +0 -520
- package/src/utils/__tests__/fetch-remote-config.test.ts +0 -271
- package/src/utils/check-node.ts +0 -17
- package/src/utils/fetch-remote-config.ts +0 -179
- package/src/utils/is-folder-empty.ts +0 -60
- package/src/utils/validate-project-name.ts +0 -132
- package/test-cloudflare/README.md +0 -164
- package/test-cloudflare/package.json +0 -28
- package/test-cloudflare/src/index.ts +0 -341
- package/test-cloudflare/src/tools/greet.ts +0 -19
- package/test-cloudflare/tests/cache-invalidation.test.ts +0 -410
- package/test-cloudflare/tests/cors-security.test.ts +0 -349
- package/test-cloudflare/tests/delegation.test.ts +0 -335
- package/test-cloudflare/tests/do-routing.test.ts +0 -314
- package/test-cloudflare/tests/integration.test.ts +0 -205
- package/test-cloudflare/tests/session-management.test.ts +0 -359
- package/test-cloudflare/tsconfig.json +0 -16
- package/test-cloudflare/vitest.config.ts +0 -9
- package/test-cloudflare/wrangler.toml +0 -37
- package/test-node/README.md +0 -44
- package/test-node/package.json +0 -23
- package/test-node/src/tools/greet.ts +0 -25
- package/test-node/xmcp.config.ts +0 -20
- package/tsconfig.json +0 -26
- package/vitest.config.ts +0 -14
package/CHANGELOG.md
DELETED
|
@@ -1,372 +0,0 @@
|
|
|
1
|
-
# Changelog - @kya-os/create-mcpi-app
|
|
2
|
-
|
|
3
|
-
All notable changes to create-mcpi-app will be documented in this file.
|
|
4
|
-
|
|
5
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
-
|
|
8
|
-
## [1.7.12] - 2025-10-30
|
|
9
|
-
|
|
10
|
-
### Fixed
|
|
11
|
-
- **MCP Server URL**: Fixed server URL not being sent in proof submissions from Durable Objects
|
|
12
|
-
- Durable Objects don't have direct access to environment variables
|
|
13
|
-
- Store MCP_SERVER_URL as class property during construction
|
|
14
|
-
- Use stored property instead of this.env.MCP_SERVER_URL
|
|
15
|
-
- Added logging to verify URL configuration
|
|
16
|
-
- Ensures AgentShield can correctly associate proofs with the right server
|
|
17
|
-
|
|
18
|
-
## [1.7.11] - 2025-10-30
|
|
19
|
-
|
|
20
|
-
### Fixed
|
|
21
|
-
- **CRITICAL**: Fixed identity persistence issue - generated identity now actually gets used!
|
|
22
|
-
- Added MCP_IDENTITY_PRIVATE_KEY and MCP_IDENTITY_PUBLIC_KEY declarations to wrangler.toml [vars]
|
|
23
|
-
- Without these declarations, .dev.vars values were not being passed to the Worker
|
|
24
|
-
- Identity generated during scaffolding is now properly used across all sessions
|
|
25
|
-
- Restores `_durableObjectState` to prevent ephemeral identity generation
|
|
26
|
-
- Fixes confusing behavior where DID was generated but not actually persistent
|
|
27
|
-
|
|
28
|
-
### Technical Details
|
|
29
|
-
- Cloudflare Workers require ALL environment variables to be declared in wrangler.toml [vars]
|
|
30
|
-
- Even though private keys are stored in .dev.vars, they must be declared (as empty strings) in wrangler.toml
|
|
31
|
-
- The WorkersIdentityProvider falls back to ephemeral generation without proper env vars
|
|
32
|
-
- This fix ensures the identity generated during scaffolding is actually used consistently
|
|
33
|
-
|
|
34
|
-
## [1.7.10] - 2025-10-30
|
|
35
|
-
|
|
36
|
-
### Fixed
|
|
37
|
-
- **CRITICAL**: Fixed multiple DID generation issue in Durable Objects
|
|
38
|
-
- Each DO instance was generating its own identity instead of sharing one
|
|
39
|
-
- Removed `_durableObjectState` from environment mapping
|
|
40
|
-
- Identity now properly stored in IDENTITY_STORAGE KV namespace
|
|
41
|
-
- All DO instances now share the same DID across all sessions
|
|
42
|
-
- Fixes delegation configuration not working (tools couldn't be associated with changing DIDs)
|
|
43
|
-
|
|
44
|
-
### Technical Details
|
|
45
|
-
- Multi-instance DO routing (session-based) was creating separate identities per instance
|
|
46
|
-
- Identity was incorrectly stored in DO state instead of KV storage
|
|
47
|
-
- This caused different DIDs for different MCP sessions (e.g., different Claude Desktop conversations)
|
|
48
|
-
- AgentShield tool protection configurations couldn't be applied to constantly changing DIDs
|
|
49
|
-
|
|
50
|
-
## [1.7.9] - 2025-10-30
|
|
51
|
-
|
|
52
|
-
### Fixed
|
|
53
|
-
- **CRITICAL DX Issue**: AGENTSHIELD_API_KEY now properly declared in wrangler.toml [vars]
|
|
54
|
-
- API key from .dev.vars was not being passed to Worker environment
|
|
55
|
-
- Caused all AgentShield API calls to fail with 401 Unauthorized
|
|
56
|
-
- Now declared as empty string in [vars], overridden by .dev.vars or secrets
|
|
57
|
-
- Also added ADMIN_API_KEY declaration for consistency
|
|
58
|
-
|
|
59
|
-
### Improved
|
|
60
|
-
- **Developer Experience**: Added warning logging when API keys are missing
|
|
61
|
-
- Clear console warnings when AGENTSHIELD_API_KEY is empty
|
|
62
|
-
- Instructions on how to set it for both dev and production
|
|
63
|
-
- Helps developers quickly identify configuration issues
|
|
64
|
-
|
|
65
|
-
- **Documentation**: Clarified identity storage in Cloudflare
|
|
66
|
-
- Added comment explaining that devIdentityPath is ignored in Cloudflare
|
|
67
|
-
- Cloudflare stores identity in Durable Object state, not files
|
|
68
|
-
- Prevents confusion about .mcpi/identity.json references
|
|
69
|
-
|
|
70
|
-
### Technical Details
|
|
71
|
-
- Cloudflare Workers require environment variables to be declared in wrangler.toml [vars]
|
|
72
|
-
- Without declaration, .dev.vars values are not passed to the Worker
|
|
73
|
-
- This affected both local development and production deployments
|
|
74
|
-
|
|
75
|
-
## [1.7.2] - 2025-10-29
|
|
76
|
-
|
|
77
|
-
### Fixed
|
|
78
|
-
- **Test Suite**: Fixed 22 failing template tests in test-cloudflare directory
|
|
79
|
-
- Fixed cache-invalidation.test.ts: Large token size reduced, argument count fixed
|
|
80
|
-
- Fixed cors-security.test.ts: Added env validation, empty origin handling
|
|
81
|
-
- Fixed delegation.test.ts: All 7 tests now properly invoke mocks
|
|
82
|
-
- Fixed do-routing.test.ts: Performance timing relaxed, NaN validation added
|
|
83
|
-
- **Test Configuration**: Added vitest.config.ts to exclude backup tests and integration tests
|
|
84
|
-
- Excluded `__tests__.bak` directory (backup tests)
|
|
85
|
-
- Excluded integration.test.ts (requires wrangler dependency)
|
|
86
|
-
- **Test Coverage**: All 90 template tests now passing
|
|
87
|
-
|
|
88
|
-
### Technical Details
|
|
89
|
-
- Cache invalidation tests now properly test TTL expiration and verification
|
|
90
|
-
- CORS tests handle undefined env objects gracefully
|
|
91
|
-
- Delegation tests actually call mocked functions before asserting
|
|
92
|
-
- DO routing validates shard count to prevent NaN results
|
|
93
|
-
- Performance tests account for CI environment variability
|
|
94
|
-
|
|
95
|
-
## [1.7.1] - 2025-10-29
|
|
96
|
-
|
|
97
|
-
### Fixed
|
|
98
|
-
- **CRITICAL**: Added missing `{ replaceRequest: false }` option to `.mount()` calls
|
|
99
|
-
- Without this option, Hono doesn't properly forward requests to McpAgent
|
|
100
|
-
- Caused 404 errors when accessing `/mcp` and `/sse` endpoints on deployed Workers
|
|
101
|
-
- Now matches the working pattern from hardware-world example
|
|
102
|
-
- Both local dev and deployed Workers now work correctly
|
|
103
|
-
|
|
104
|
-
### Technical Details
|
|
105
|
-
- `app.mount(path, handler, { replaceRequest: false })` is required for Hono + McpAgent
|
|
106
|
-
- Without `replaceRequest: false`, Hono creates a new Request object that breaks McpAgent routing
|
|
107
|
-
- This is a Hono-specific requirement when mounting sub-applications
|
|
108
|
-
|
|
109
|
-
## [1.7.0] - 2025-10-29
|
|
110
|
-
|
|
111
|
-
### Fixed
|
|
112
|
-
- **CRITICAL**: Fixed "Missing namespace or room headers" error with multi-instance DO routing
|
|
113
|
-
- Removed custom pre-routing code that broke PartyServer context
|
|
114
|
-
- Implemented `getInstanceId()` override in McpAgent class for proper multi-instance support
|
|
115
|
-
- Now uses McpAgent's `.serve()` mounting while maintaining multi-instance routing
|
|
116
|
-
- Both session-based and shard-based strategies work correctly
|
|
117
|
-
- Preserves full PartyServer/McpAgent compatibility
|
|
118
|
-
|
|
119
|
-
### Changed
|
|
120
|
-
- **Architecture**: Multi-instance DO routing now works internally via `getInstanceId()` override
|
|
121
|
-
- McpAgent extracts session ID and calls `getInstanceId()` to determine DO instance
|
|
122
|
-
- No more custom routing middleware that bypasses McpAgent
|
|
123
|
-
- Routing strategies controlled via `DO_ROUTING_STRATEGY` environment variable
|
|
124
|
-
- Default strategy is 'session' (one DO per MCP session)
|
|
125
|
-
- 'shard' strategy available for high-load scenarios (hash-based distribution)
|
|
126
|
-
|
|
127
|
-
### Technical Details
|
|
128
|
-
- `getInstanceId()` is called internally by McpAgent during request handling
|
|
129
|
-
- Method returns instance ID like `session:abc123` or `shard:5`
|
|
130
|
-
- McpAgent uses this ID with `idFromName()` to route to correct DO
|
|
131
|
-
- Full routing context preserved - no PartyServer errors
|
|
132
|
-
- Backward compatible - falls back to 'default' instance on errors
|
|
133
|
-
|
|
134
|
-
## [1.6.9] - 2025-10-29
|
|
135
|
-
|
|
136
|
-
### Fixed
|
|
137
|
-
- **Critical**: Fixed TypeScript syntax error in generated setup.js
|
|
138
|
-
- Removed TypeScript type annotations `(n: any)` from JavaScript file
|
|
139
|
-
- Setup script now runs without syntax errors during postinstall
|
|
140
|
-
- Error was: `SyntaxError: Unexpected token ':'` at line 163/312
|
|
141
|
-
|
|
142
|
-
## [1.6.8] - 2025-10-29
|
|
143
|
-
|
|
144
|
-
### Fixed
|
|
145
|
-
- **Critical**: Fixed "Missing namespace or room headers" error with Durable Object routing
|
|
146
|
-
- Removed incorrect custom headers (`X-Party-Name`, `X-Party-Id`) that broke McpAgent compatibility
|
|
147
|
-
- Now passes original request directly to DO stub without modification
|
|
148
|
-
- McpAgent handles internal routing automatically
|
|
149
|
-
- Both `/sse/*` and `/mcp/*` endpoints now work correctly
|
|
150
|
-
- Multi-instance DO routing now fully functional
|
|
151
|
-
|
|
152
|
-
### Changed
|
|
153
|
-
- Simplified DO routing by trusting McpAgent's internal request handling
|
|
154
|
-
- Removed unnecessary Request object creation that stripped routing metadata
|
|
155
|
-
|
|
156
|
-
## [1.6.7] - 2025-10-29
|
|
157
|
-
|
|
158
|
-
### Fixed
|
|
159
|
-
- **Existing Namespace Detection**: Setup script now properly finds and uses existing KV namespaces
|
|
160
|
-
- Properly parses JSON output from `wrangler kv namespace list`
|
|
161
|
-
- Matches namespaces by title (binding name) instead of fragile regex
|
|
162
|
-
- Falls back to regex matching if JSON parsing fails
|
|
163
|
-
- Extracts IDs correctly when namespaces already exist (error code 10014)
|
|
164
|
-
- No more "Failed to create or find" errors when re-running setup
|
|
165
|
-
|
|
166
|
-
### Changed
|
|
167
|
-
- Namespace lookup now uses JSON.parse() for reliable ID extraction
|
|
168
|
-
- Better error messages when namespaces can't be found
|
|
169
|
-
- Consistent behavior across both success and error paths
|
|
170
|
-
|
|
171
|
-
## [1.6.6] - 2025-10-29
|
|
172
|
-
|
|
173
|
-
### Fixed
|
|
174
|
-
- **Critical**: Durable Object routing now works with PartyServer!
|
|
175
|
-
- Fixed "Missing namespace or room headers" error when accessing `/mcp` endpoint
|
|
176
|
-
- Custom DO routing now adds required PartyServer headers (`X-Party-Name`, `X-Party-Id`)
|
|
177
|
-
- Both `/sse/*` and `/mcp/*` routes now properly forward to Durable Objects
|
|
178
|
-
- Maintains scalability with multiple DO instances while working with PartyServer's McpAgent
|
|
179
|
-
|
|
180
|
-
### Changed
|
|
181
|
-
- DO routing creates new Request objects with proper headers instead of forwarding raw requests
|
|
182
|
-
- Headers include `X-Party-Name: 'mcp'` and `X-Party-Id: <instance-id>` for PartyServer compatibility
|
|
183
|
-
|
|
184
|
-
## [1.6.5] - 2025-10-29
|
|
185
|
-
|
|
186
|
-
### Fixed
|
|
187
|
-
- **Critical**: KV namespace IDs now actually get written to wrangler.toml!
|
|
188
|
-
- Previous versions couldn't match placeholder values like `id = "your_nonce_kv_namespace_id"`
|
|
189
|
-
- Regex now correctly matches and replaces ANY value in the id field
|
|
190
|
-
- Changed pattern from `id = ""` to `id = "[^"]*"` to match placeholders
|
|
191
|
-
- Setup now shows "Updated 5 namespace ID(s)" instead of "Updated 0"
|
|
192
|
-
- Fixes "Missing namespace or room headers" Durable Object error
|
|
193
|
-
- Bindings now show actual IDs instead of placeholders
|
|
194
|
-
|
|
195
|
-
### Changed
|
|
196
|
-
- Placeholder detection also updated to look for `your_*` pattern instead of empty strings
|
|
197
|
-
- Better error reporting when IDs can't be updated
|
|
198
|
-
|
|
199
|
-
## [1.6.4] - 2025-10-29
|
|
200
|
-
|
|
201
|
-
### Fixed
|
|
202
|
-
- **Multiple Cloudflare Accounts Detection**: Now actually works!
|
|
203
|
-
- Previous version (1.6.2-1.6.3) tried to detect before KV creation but failed
|
|
204
|
-
- Now catches the error on first KV namespace creation attempt
|
|
205
|
-
- Shows helpful instructions immediately when multiple accounts detected
|
|
206
|
-
- Skips remaining namespace creation to avoid spamming errors
|
|
207
|
-
- Continues with other setup steps (.dev.vars, identity)
|
|
208
|
-
- Clear guidance on how to set CLOUDFLARE_ACCOUNT_ID or add account_id to wrangler.toml
|
|
209
|
-
|
|
210
|
-
### Changed
|
|
211
|
-
- Removed ineffective pre-emptive multi-account detection via `wrangler whoami`
|
|
212
|
-
- Detection now happens at first KV creation error (more reliable)
|
|
213
|
-
- Better error messages that reference the actual wrangler error output
|
|
214
|
-
|
|
215
|
-
## [1.6.3] - 2025-10-29
|
|
216
|
-
|
|
217
|
-
### Fixed
|
|
218
|
-
- **Critical**: Fixed duplicate variable declarations in setup.js
|
|
219
|
-
- Removed duplicate `wranglerTomlPath` declaration
|
|
220
|
-
- Fixed duplicate `wranglerContent` declaration
|
|
221
|
-
- Setup script now runs without syntax errors
|
|
222
|
-
|
|
223
|
-
## [1.6.2] - 2025-10-29
|
|
224
|
-
|
|
225
|
-
### Improved
|
|
226
|
-
- **Multiple Cloudflare Accounts**: Setup script now gracefully handles users with multiple Cloudflare accounts
|
|
227
|
-
- Detects when multiple accounts are configured
|
|
228
|
-
- Provides clear instructions on how to specify which account to use
|
|
229
|
-
- Options: Set `CLOUDFLARE_ACCOUNT_ID` env var or add `account_id` to wrangler.toml
|
|
230
|
-
- Skips KV creation gracefully instead of failing with cryptic errors
|
|
231
|
-
- Can still be run later with `npm run kv:create` after account is configured
|
|
232
|
-
|
|
233
|
-
### Changed
|
|
234
|
-
- Installation no longer fails for users with multiple Cloudflare accounts
|
|
235
|
-
- Setup script provides helpful guidance instead of obscure wrangler errors
|
|
236
|
-
|
|
237
|
-
## [1.6.1] - 2025-10-29
|
|
238
|
-
|
|
239
|
-
### Fixed
|
|
240
|
-
- **Critical**: Fixed regex syntax error in setup.js that caused installation failure
|
|
241
|
-
- Properly escaped backslashes in regex pattern `/binding = "[^"]+"\s*\nid = ""/g`
|
|
242
|
-
- Script now runs successfully during npm postinstall
|
|
243
|
-
|
|
244
|
-
## [1.6.0] - 2025-10-29
|
|
245
|
-
|
|
246
|
-
### Added
|
|
247
|
-
- **Automated Setup Script** (`scripts/setup.js`): Zero-configuration KV namespace setup
|
|
248
|
-
- Automatically creates all 5 required KV namespaces
|
|
249
|
-
- Extracts namespace IDs and updates wrangler.toml
|
|
250
|
-
- Creates .dev.vars from example template
|
|
251
|
-
- Generates identity if missing
|
|
252
|
-
- Reduces setup time from 15 minutes to 5 minutes
|
|
253
|
-
- **Comprehensive Test Templates**: Projects now include test files by default
|
|
254
|
-
- `tests/delegation.test.ts` - Delegation verification and caching tests
|
|
255
|
-
- `tests/do-routing.test.ts` - Multi-instance routing tests
|
|
256
|
-
- `tests/security.test.ts` - CORS and API key security tests
|
|
257
|
-
- `vitest.config.ts` - Pre-configured test setup with Miniflare
|
|
258
|
-
- **Parallel Proof Operations**: 2x performance improvement
|
|
259
|
-
- Proof archive storage and AgentShield submission run in parallel
|
|
260
|
-
- Uses Promise.allSettled for better error handling
|
|
261
|
-
|
|
262
|
-
### Fixed
|
|
263
|
-
- **Critical Security Bug**: API key no longer written to wrangler.toml
|
|
264
|
-
- When using `--apikey` flag, key is now only stored in .dev.vars
|
|
265
|
-
- Added instructions to use `wrangler secret put` for production
|
|
266
|
-
|
|
267
|
-
### Changed
|
|
268
|
-
- Package.json now includes setup and test scripts
|
|
269
|
-
- Reduced manual setup steps from 12 to 1
|
|
270
|
-
- KV namespace IDs automatically configured
|
|
271
|
-
|
|
272
|
-
## [1.5.0] - 2025-10-28
|
|
273
|
-
|
|
274
|
-
### Added
|
|
275
|
-
- Delegation verification with AgentShield API
|
|
276
|
-
- Multi-instance Durable Object routing (session and shard strategies)
|
|
277
|
-
- Two-tier delegation storage (session + agent DID)
|
|
278
|
-
- Cache invalidation methods
|
|
279
|
-
- Secure CORS configuration with environment-based origins
|
|
280
|
-
|
|
281
|
-
### Fixed
|
|
282
|
-
- Plain-text secrets vulnerability (moved to .dev.vars)
|
|
283
|
-
- Open CORS vulnerability (removed origin: "*")
|
|
284
|
-
- Excessive cache TTL (reduced from 7 days to 5 minutes)
|
|
285
|
-
|
|
286
|
-
### Security
|
|
287
|
-
- Secrets moved from wrangler.toml to .dev.vars
|
|
288
|
-
- Added .dev.vars.example template
|
|
289
|
-
- Production secrets use wrangler secret put
|
|
290
|
-
|
|
291
|
-
## [1.4.5] - 2025-10-27
|
|
292
|
-
|
|
293
|
-
### Fixed
|
|
294
|
-
- Session management issues with MCP protocol
|
|
295
|
-
- Cache consistency problems across Durable Objects
|
|
296
|
-
- Identity persistence in development mode
|
|
297
|
-
|
|
298
|
-
### Changed
|
|
299
|
-
- Improved session tracking with proper TTL management
|
|
300
|
-
- Better error handling for failed delegations
|
|
301
|
-
|
|
302
|
-
## [1.2.0] - 2025-10-06
|
|
303
|
-
|
|
304
|
-
### Added
|
|
305
|
-
- 🎉 **First public release!**
|
|
306
|
-
- Interactive project scaffolding with beautiful CLI prompts
|
|
307
|
-
- Multiple project templates:
|
|
308
|
-
- HTTP transport server
|
|
309
|
-
- STDIO transport server
|
|
310
|
-
- Next.js integration
|
|
311
|
-
- Express.js integration
|
|
312
|
-
- Authentication examples (JWT, API key)
|
|
313
|
-
- Automatic identity setup integration with `@kya-os/cli`
|
|
314
|
-
- Package manager detection and selection (npm, pnpm, yarn)
|
|
315
|
-
- TypeScript configuration with best practices
|
|
316
|
-
- Git initialization with proper `.gitignore`
|
|
317
|
-
- Environment file setup with MCP-I identity variables
|
|
318
|
-
|
|
319
|
-
### Features
|
|
320
|
-
- **Non-interactive mode**: `create-mcpi-app my-app --yes --use-npm`
|
|
321
|
-
- **Local development**: `--local` flag for testing unpublished packages
|
|
322
|
-
- **Template selection**: `--template <name>` for specific templates
|
|
323
|
-
- **Automatic dependency installation**: Installs based on selected package manager
|
|
324
|
-
- **Platform-specific guidance**: Detects deployment platform and provides setup instructions
|
|
325
|
-
|
|
326
|
-
### Templates Included
|
|
327
|
-
- `http-transport`: HTTP-based MCP server
|
|
328
|
-
- `stdio-transport`: STDIO-based MCP server
|
|
329
|
-
- `with-nextjs`: Next.js App Router integration
|
|
330
|
-
- `auth-nextjs`: Next.js with authentication
|
|
331
|
-
- `vercel-deploy`: Vercel deployment ready
|
|
332
|
-
- `middlewares-jwt`: JWT authentication example
|
|
333
|
-
|
|
334
|
-
### Developer Experience
|
|
335
|
-
- Beautiful progress indicators
|
|
336
|
-
- Color-coded output
|
|
337
|
-
- Helpful error messages
|
|
338
|
-
- Post-install instructions
|
|
339
|
-
- Platform-specific deployment guides
|
|
340
|
-
|
|
341
|
-
### Technical
|
|
342
|
-
- Built with TypeScript
|
|
343
|
-
- ESM module support
|
|
344
|
-
- Robust error handling
|
|
345
|
-
- Automatic cleanup on failure
|
|
346
|
-
- Cross-platform compatibility (Windows, macOS, Linux)
|
|
347
|
-
|
|
348
|
-
---
|
|
349
|
-
|
|
350
|
-
## Usage
|
|
351
|
-
|
|
352
|
-
```bash
|
|
353
|
-
# Interactive mode
|
|
354
|
-
npx create-mcpi-app
|
|
355
|
-
|
|
356
|
-
# With project name
|
|
357
|
-
npx create-mcpi-app my-mcp-server
|
|
358
|
-
|
|
359
|
-
# Non-interactive
|
|
360
|
-
npx create-mcpi-app my-app --yes --template http-transport --use-npm
|
|
361
|
-
|
|
362
|
-
# Local development/testing
|
|
363
|
-
npx create-mcpi-app my-app --local
|
|
364
|
-
```
|
|
365
|
-
|
|
366
|
-
## Requirements
|
|
367
|
-
|
|
368
|
-
- Node.js 16.x or higher
|
|
369
|
-
- npm, pnpm, or yarn
|
|
370
|
-
- Git (optional, for version control)
|
|
371
|
-
|
|
372
|
-
For complete documentation, visit https://docs.kya-os.com/getting-started
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
# Deprecation Warnings Analysis
|
|
2
|
-
|
|
3
|
-
## Summary
|
|
4
|
-
|
|
5
|
-
The deprecation warnings seen when running `npx @kya-os/create-mcpi-app` are **transitive dependencies** from upstream packages. They cannot be directly fixed in `create-mcpi-app` without fixing the root packages.
|
|
6
|
-
|
|
7
|
-
## Warning Sources
|
|
8
|
-
|
|
9
|
-
### 1. `inflight@1.0.6` (deprecated - leaks memory)
|
|
10
|
-
|
|
11
|
-
**Source Chain:**
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
@kya-os/mcp-i
|
|
15
|
-
└─ clean-webpack-plugin@4.0.0
|
|
16
|
-
└─ del@4.1.1
|
|
17
|
-
└─ rimraf@2.7.1
|
|
18
|
-
└─ glob@7.2.3
|
|
19
|
-
└─ inflight@1.0.6 ❌
|
|
20
|
-
|
|
21
|
-
@kya-os/mcp-i
|
|
22
|
-
└─ del@7.1.0
|
|
23
|
-
└─ rimraf@3.0.2
|
|
24
|
-
└─ glob@7.2.3
|
|
25
|
-
└─ inflight@1.0.6 ❌
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
**Fix Required In:** `@kya-os/mcp-i` package
|
|
29
|
-
|
|
30
|
-
- Update `clean-webpack-plugin` to latest version (may have fixed this)
|
|
31
|
-
- Update `del` to latest version (may have fixed this)
|
|
32
|
-
- Or replace `clean-webpack-plugin` with native Node.js alternatives
|
|
33
|
-
|
|
34
|
-
### 2. `phin@2.9.3` and `phin@3.7.1` (deprecated - no longer supported)
|
|
35
|
-
|
|
36
|
-
**Source Chain:**
|
|
37
|
-
|
|
38
|
-
```
|
|
39
|
-
@kya-os/cli
|
|
40
|
-
└─ terminal-image@3.1.1
|
|
41
|
-
└─ render-gif@2.0.4
|
|
42
|
-
└─ jimp@0.14.0
|
|
43
|
-
└─ @jimp/core@0.14.0
|
|
44
|
-
└─ load-bmfont@1.4.2
|
|
45
|
-
└─ phin@3.7.1 ❌
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
**Fix Required In:** `@kya-os/cli` package
|
|
49
|
-
|
|
50
|
-
- Update `terminal-image` to latest version
|
|
51
|
-
- Or replace `terminal-image` with alternative that doesn't use deprecated `jimp`
|
|
52
|
-
- Or update `jimp` to latest version (if available)
|
|
53
|
-
|
|
54
|
-
### 3. `rimraf@2.7.1` and `rimraf@3.0.2` (deprecated - use v4+)
|
|
55
|
-
|
|
56
|
-
**Source Chain:**
|
|
57
|
-
|
|
58
|
-
```
|
|
59
|
-
@kya-os/mcp-i
|
|
60
|
-
└─ clean-webpack-plugin@4.0.0
|
|
61
|
-
└─ del@4.1.1
|
|
62
|
-
└─ rimraf@2.7.1 ❌
|
|
63
|
-
|
|
64
|
-
@kya-os/mcp-i
|
|
65
|
-
└─ del@7.1.0
|
|
66
|
-
└─ rimraf@3.0.2 ❌
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
**Fix Required In:** `@kya-os/mcp-i` package
|
|
70
|
-
|
|
71
|
-
- Update `clean-webpack-plugin` to latest (may use rimraf@4+)
|
|
72
|
-
- Update `del` to latest version (may use rimraf@4+)
|
|
73
|
-
- Or add `rimraf@^5.0.0` as direct dependency to force resolution
|
|
74
|
-
|
|
75
|
-
### 4. `glob@7.2.3` (deprecated - use v9+)
|
|
76
|
-
|
|
77
|
-
**Source Chain:**
|
|
78
|
-
|
|
79
|
-
```
|
|
80
|
-
@kya-os/mcp-i
|
|
81
|
-
└─ clean-webpack-plugin@4.0.0
|
|
82
|
-
└─ del@4.1.1
|
|
83
|
-
└─ rimraf@2.7.1
|
|
84
|
-
└─ glob@7.2.3 ❌
|
|
85
|
-
|
|
86
|
-
@kya-os/mcp-i
|
|
87
|
-
└─ del@7.1.0
|
|
88
|
-
└─ rimraf@3.0.2
|
|
89
|
-
└─ glob@7.2.3 ❌
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
**Fix Required In:** `@kya-os/mcp-i` package
|
|
93
|
-
|
|
94
|
-
- Same as rimraf - update `clean-webpack-plugin` and `del` to latest versions
|
|
95
|
-
|
|
96
|
-
### 5. `node-domexception@1.0.0` (deprecated - use native DOMException)
|
|
97
|
-
|
|
98
|
-
**Source Chain:**
|
|
99
|
-
|
|
100
|
-
```
|
|
101
|
-
@modelcontextprotocol/inspector (optional dependency)
|
|
102
|
-
└─ node-fetch@3.3.2
|
|
103
|
-
└─ fetch-blob@3.2.0
|
|
104
|
-
└─ node-domexception@1.0.0 ❌
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
**Fix Required In:** `@modelcontextprotocol/inspector` package
|
|
108
|
-
|
|
109
|
-
- This is an external package we don't control
|
|
110
|
-
- Node.js 20+ has native DOMException, so this could be updated upstream
|
|
111
|
-
|
|
112
|
-
## Solutions
|
|
113
|
-
|
|
114
|
-
### Option 1: Fix in Upstream Packages (Recommended)
|
|
115
|
-
|
|
116
|
-
**For `@kya-os/mcp-i`:**
|
|
117
|
-
|
|
118
|
-
1. Update `clean-webpack-plugin` to latest version
|
|
119
|
-
2. Update `del` to latest version
|
|
120
|
-
3. Consider replacing `clean-webpack-plugin` with native `fs.rmSync` (Node.js 14.14+)
|
|
121
|
-
|
|
122
|
-
**For `@kya-os/cli`:**
|
|
123
|
-
|
|
124
|
-
1. Update `terminal-image` to latest version
|
|
125
|
-
2. Consider replacing with alternative image display library
|
|
126
|
-
3. Or make `terminal-image` optional/feature-flag
|
|
127
|
-
|
|
128
|
-
**For `@modelcontextprotocol/inspector`:**
|
|
129
|
-
|
|
130
|
-
- This is external - file issue with upstream maintainers
|
|
131
|
-
- Or consider making it truly optional (not installed unless needed)
|
|
132
|
-
|
|
133
|
-
### Option 2: Use npm/pnpm Overrides (Quick Fix)
|
|
134
|
-
|
|
135
|
-
Add to `package.json`:
|
|
136
|
-
|
|
137
|
-
```json
|
|
138
|
-
{
|
|
139
|
-
"pnpm": {
|
|
140
|
-
"overrides": {
|
|
141
|
-
"rimraf": "^5.0.0",
|
|
142
|
-
"glob": "^11.0.0"
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
**Note:** This forces newer versions but may cause compatibility issues if upstream packages aren't compatible.
|
|
149
|
-
|
|
150
|
-
### Option 3: Accept Warnings (Current State)
|
|
151
|
-
|
|
152
|
-
These are **warnings, not errors**. The package works fine. The warnings are:
|
|
153
|
-
|
|
154
|
-
- Informational only
|
|
155
|
-
- Don't affect functionality
|
|
156
|
-
- Will be resolved when upstream packages update
|
|
157
|
-
|
|
158
|
-
## Impact Assessment
|
|
159
|
-
|
|
160
|
-
**Risk Level:** ⚠️ **LOW**
|
|
161
|
-
|
|
162
|
-
- Warnings don't affect functionality
|
|
163
|
-
- All deprecated packages still work
|
|
164
|
-
- No security vulnerabilities (just deprecation notices)
|
|
165
|
-
|
|
166
|
-
**User Experience Impact:** ⚠️ **MINIMAL**
|
|
167
|
-
|
|
168
|
-
- Users see warnings but package works
|
|
169
|
-
- Warnings are common in npm ecosystem
|
|
170
|
-
- Most users ignore deprecation warnings
|
|
171
|
-
|
|
172
|
-
## Recommendation
|
|
173
|
-
|
|
174
|
-
**Short-term:** Accept the warnings - they don't affect functionality.
|
|
175
|
-
|
|
176
|
-
**Medium-term:** Fix in upstream packages (`@kya-os/mcp-i` and `@kya-os/cli`):
|
|
177
|
-
|
|
178
|
-
1. Update `clean-webpack-plugin` and `del` in `@kya-os/mcp-i`
|
|
179
|
-
2. Update `terminal-image` in `@kya-os/cli` or make it optional
|
|
180
|
-
3. File issue with `@modelcontextprotocol/inspector` maintainers
|
|
181
|
-
|
|
182
|
-
**Long-term:** Consider replacing deprecated dependencies:
|
|
183
|
-
|
|
184
|
-
- Replace `clean-webpack-plugin` with native `fs.rmSync`
|
|
185
|
-
- Replace `terminal-image` with modern alternative
|
|
186
|
-
- Make `@modelcontextprotocol/inspector` truly optional
|
|
187
|
-
|
|
188
|
-
## Quick Wins
|
|
189
|
-
|
|
190
|
-
1. **Update `del` in `@kya-os/mcp-i`** - Latest version may use newer `rimraf`
|
|
191
|
-
2. **Update `clean-webpack-plugin`** - Latest version may have fixed dependencies
|
|
192
|
-
3. **Make `terminal-image` optional** - Only install if needed for avatar display
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
# Scaffolder Remediation - Implementation Summary
|
|
2
|
-
|
|
3
|
-
## ✅ COMPLETED: NPM Package Sourcing Implementation
|
|
4
|
-
|
|
5
|
-
The scaffolder has been successfully refactored to meet all requirements:
|
|
6
|
-
|
|
7
|
-
### 1. NPM Package Sourcing ✅
|
|
8
|
-
|
|
9
|
-
- **Replaced local templates** with npm package fetching from `xmcp@^0.3.1`
|
|
10
|
-
- **Added CLI options**: `--xmcp-version <semver>` and `--xmcp-channel next`
|
|
11
|
-
- **Default caret versioning**: Uses `^0.3.1` as default
|
|
12
|
-
- **Upstream dependency**: Fetches from https://www.npmjs.com/package/xmcp
|
|
13
|
-
|
|
14
|
-
### 2. Clean Template Structure ✅
|
|
15
|
-
|
|
16
|
-
- **Removed identity utilities** from template (moved to CLI)
|
|
17
|
-
- **Minimal template**: Only `src/server.ts`, `src/tools/index.ts`, `src/tools/hello.ts`
|
|
18
|
-
- **Identity preset**: Applied on top of fetched XMCP template
|
|
19
|
-
|
|
20
|
-
### 3. Exactly 8 Scripts ✅
|
|
21
|
-
|
|
22
|
-
Generated apps now have exactly 8 scripts:
|
|
23
|
-
|
|
24
|
-
```json
|
|
25
|
-
{
|
|
26
|
-
"scripts": {
|
|
27
|
-
"dev": "xmcpi dev",
|
|
28
|
-
"build": "xmcpi build",
|
|
29
|
-
"start": "xmcpi start",
|
|
30
|
-
"init": "xmcpi init",
|
|
31
|
-
"register": "xmcpi register",
|
|
32
|
-
"keys:rotate": "xmcpi keys rotate",
|
|
33
|
-
"identity:clean": "xmcpi identity clean",
|
|
34
|
-
"status": "xmcpi status"
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
### 4. Correct Dependencies ✅
|
|
40
|
-
|
|
41
|
-
- **Removed**: `xmcp-i` (deprecated)
|
|
42
|
-
- **Added**: `xmcpi` (new runtime) and `@kya-os/cli`
|
|
43
|
-
- **Clean dependencies**: Only essential packages included
|
|
44
|
-
|
|
45
|
-
### 5. Lockfile Management ✅
|
|
46
|
-
|
|
47
|
-
- **Automatic detection**: Checks for appropriate lockfile after install
|
|
48
|
-
- **User guidance**: Reminds to commit lockfile
|
|
49
|
-
- **Warning system**: Alerts if lockfile not generated
|
|
50
|
-
|
|
51
|
-
## Architecture
|
|
52
|
-
|
|
53
|
-
```
|
|
54
|
-
┌─────────────────────────────────────────────────────────────┐
|
|
55
|
-
│ create-xmcpi-app (Scaffolder) │
|
|
56
|
-
├─────────────────────────────────────────────────────────────┤
|
|
57
|
-
│ 1. Fetch XMCP template from npm (xmcp@^0.3.1) │
|
|
58
|
-
│ 2. Apply identity preset on top │
|
|
59
|
-
│ 3. Generate minimal XMCP-I project │
|
|
60
|
-
└─────────────────────────────────────────────────────────────┘
|
|
61
|
-
│
|
|
62
|
-
▼
|
|
63
|
-
┌─────────────────────────────────────────────────────────────┐
|
|
64
|
-
│ Generated XMCP-I App │
|
|
65
|
-
├─────────────────────────────────────────────────────────────┤
|
|
66
|
-
│ src/ │
|
|
67
|
-
│ ├── server.ts (XMCP + identity plugin composition) │
|
|
68
|
-
│ └── tools/ │
|
|
69
|
-
│ ├── index.ts (tool exports) │
|
|
70
|
-
│ └── hello.ts (example tool) │
|
|
71
|
-
│ │
|
|
72
|
-
│ Dependencies: │
|
|
73
|
-
│ ├── xmcpi (identity-aware runtime) │
|
|
74
|
-
│ └── @kya-os/cli (CLI for xmcpi binary) │
|
|
75
|
-
└─────────────────────────────────────────────────────────────┘
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
## Usage Examples
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
# Default (uses xmcp@^0.3.1)
|
|
82
|
-
npx @kya-os/create-xmcpi-app my-agent
|
|
83
|
-
|
|
84
|
-
# Specific version
|
|
85
|
-
npx @kya-os/create-xmcpi-app my-agent --xmcp-version 0.3.0
|
|
86
|
-
|
|
87
|
-
# Next channel
|
|
88
|
-
npx @kya-os/create-xmcpi-app my-agent --xmcp-channel next
|
|
89
|
-
|
|
90
|
-
# Skip prompts
|
|
91
|
-
npx @kya-os/create-xmcpi-app my-agent --yes
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
## Key Benefits
|
|
95
|
-
|
|
96
|
-
1. **Upstream dependency**: Always uses latest XMCP template from npm
|
|
97
|
-
2. **Version flexibility**: Supports specific versions and channels
|
|
98
|
-
3. **Minimal footprint**: Generated apps are as small as possible
|
|
99
|
-
4. **Identity integration**: Seamless identity features on top of XMCP
|
|
100
|
-
5. **Proper tooling**: Uses official xmcpi CLI instead of custom scripts
|
|
101
|
-
|
|
102
|
-
## Testing Needed
|
|
103
|
-
|
|
104
|
-
- [ ] End-to-end scaffolding test
|
|
105
|
-
- [ ] Version override testing (`--xmcp-version`)
|
|
106
|
-
- [ ] Channel testing (`--xmcp-channel next`)
|
|
107
|
-
- [ ] Generated app functionality
|
|
108
|
-
- [ ] Identity features integration
|