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