@kya-os/create-mcpi-app 1.10.5 → 1.11.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-build.log +7 -7
- package/dist/bundles/blank.js +15290 -7495
- package/dist/bundles/ecommerce.js +15293 -7498
- package/dist/bundles/hardware-world.js +15298 -7503
- package/dist/bundles/manifest.json +12 -11
- package/dist/bundles/mix-station.js +15320 -7522
- package/dist/cli-runner.d.ts.map +1 -1
- package/dist/cli-runner.js +25 -2
- package/dist/cli-runner.js.map +1 -1
- package/dist/helpers/apply-identity-preset.d.ts.map +1 -1
- package/dist/helpers/apply-identity-preset.js +6 -1
- package/dist/helpers/apply-identity-preset.js.map +1 -1
- package/dist/helpers/fetch-cloudflare-mcpi-template.d.ts +2 -2
- package/dist/helpers/fetch-cloudflare-mcpi-template.d.ts.map +1 -1
- package/dist/helpers/fetch-cloudflare-mcpi-template.js +99 -56
- package/dist/helpers/fetch-cloudflare-mcpi-template.js.map +1 -1
- package/dist/helpers/fetch-mcpi-template.d.ts.map +1 -1
- package/dist/helpers/fetch-mcpi-template.js +7 -3
- package/dist/helpers/fetch-mcpi-template.js.map +1 -1
- package/dist/helpers/generate-cloudflare-files.d.ts.map +1 -1
- package/dist/helpers/generate-cloudflare-files.js +247 -90
- package/dist/helpers/generate-cloudflare-files.js.map +1 -1
- package/dist/helpers/generate-config.js +1 -1
- package/dist/helpers/get-package-versions.js +2 -2
- package/dist/helpers/get-package-versions.js.map +1 -1
- package/dist/helpers/kta-registration.d.ts.map +1 -1
- package/dist/helpers/kta-registration.js +14 -1
- package/dist/helpers/kta-registration.js.map +1 -1
- package/dist/helpers/pinned-dependencies.d.ts +39 -0
- package/dist/helpers/pinned-dependencies.d.ts.map +1 -0
- package/dist/helpers/pinned-dependencies.js +46 -0
- package/dist/helpers/pinned-dependencies.js.map +1 -0
- package/package.json +5 -13
- package/dist/helpers/generate-openapi-project.d.ts +0 -36
- package/dist/helpers/generate-openapi-project.d.ts.map +0 -1
- package/dist/helpers/generate-openapi-project.js +0 -114
- package/dist/helpers/generate-openapi-project.js.map +0 -1
- package/dist/helpers/generate-openapi-tools.d.ts +0 -43
- package/dist/helpers/generate-openapi-tools.d.ts.map +0 -1
- package/dist/helpers/generate-openapi-tools.js +0 -550
- package/dist/helpers/generate-openapi-tools.js.map +0 -1
- package/dist/helpers/generate-runtime-config.d.ts +0 -16
- package/dist/helpers/generate-runtime-config.d.ts.map +0 -1
- package/dist/helpers/generate-runtime-config.js +0 -49
- package/dist/helpers/generate-runtime-config.js.map +0 -1
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
import crypto from "crypto";
|
|
13
13
|
import { generateIdentity, } from "./generate-identity.js";
|
|
14
14
|
import { getPackageVersions } from "./get-package-versions.js";
|
|
15
|
+
import { applyPinnedDependencyOverrides } from "./pinned-dependencies.js";
|
|
15
16
|
/**
|
|
16
17
|
* Unified KV binding name (matches env-mapper.ts UNIFIED_KV_BINDING_NAME)
|
|
17
18
|
*
|
|
@@ -78,11 +79,18 @@ export async function generateCloudflareProjectFiles(options) {
|
|
|
78
79
|
}
|
|
79
80
|
// Generate OAuth encryption secret
|
|
80
81
|
const oauthEncryptionSecret = crypto.randomBytes(32).toString("hex");
|
|
82
|
+
// Isolates the audit Durable Object's administrative and delivery surface
|
|
83
|
+
// from any route the generated worker may expose in the future.
|
|
84
|
+
const auditProducerInternalToken = crypto.randomBytes(32).toString("hex");
|
|
85
|
+
const auditReferenceSecret = crypto.randomBytes(32).toString("hex");
|
|
81
86
|
const files = [];
|
|
82
87
|
// 1. package.json
|
|
88
|
+
// applyPinnedDependencyOverrides adds npm/pnpm/yarn overrides for
|
|
89
|
+
// json-canonicalize: a broken upstream 2.0.1 publish plus npm's hoisting
|
|
90
|
+
// order otherwise puts 2.0.1 at the root of every fresh install.
|
|
83
91
|
files.push({
|
|
84
92
|
path: "package.json",
|
|
85
|
-
content: JSON.stringify({
|
|
93
|
+
content: JSON.stringify(applyPinnedDependencyOverrides({
|
|
86
94
|
name: projectName,
|
|
87
95
|
version: "0.1.0",
|
|
88
96
|
private: true,
|
|
@@ -108,7 +116,7 @@ export async function generateCloudflareProjectFiles(options) {
|
|
|
108
116
|
vitest: "^2.0.5",
|
|
109
117
|
wrangler: "^4.53.0",
|
|
110
118
|
},
|
|
111
|
-
}, null, 2),
|
|
119
|
+
}), null, 2),
|
|
112
120
|
encoding: "utf-8",
|
|
113
121
|
});
|
|
114
122
|
// 2. wrangler.toml (NO private key - that goes to GitHub Secrets)
|
|
@@ -138,6 +146,13 @@ MCP_IDENTITY_PRIVATE_KEY="your-private-key-here"
|
|
|
138
146
|
# OAuth Encryption Secret (required for OAuth/delegation flows)
|
|
139
147
|
OAUTH_ENCRYPTION_SECRET="your-oauth-secret-here"
|
|
140
148
|
|
|
149
|
+
# Internal AuditProducer binding authentication (required when audit is enabled)
|
|
150
|
+
KYA_OS_AUDIT_PRODUCER_INTERNAL_TOKEN="your-random-32-byte-secret-here"
|
|
151
|
+
KYA_OS_AUDIT_REFERENCE_SECRET="your-separate-random-32-byte-secret-here"
|
|
152
|
+
|
|
153
|
+
# Managed/self-hosted recorder credential (only when audit is enabled)
|
|
154
|
+
# KYA_OS_AUDIT_INGEST_KEY="your-ledger-scoped-ingest-key-here"
|
|
155
|
+
|
|
141
156
|
# AgentShield API Key
|
|
142
157
|
AGENTSHIELD_API_KEY="sk_your_api_key_here"
|
|
143
158
|
|
|
@@ -182,16 +197,16 @@ dist/
|
|
|
182
197
|
content: generateIndexTs(doClassName),
|
|
183
198
|
encoding: "utf-8",
|
|
184
199
|
});
|
|
185
|
-
// 7. src/agent.ts
|
|
200
|
+
// 7. src/agent.ts (includes getRuntimeConfig)
|
|
186
201
|
files.push({
|
|
187
202
|
path: "src/agent.ts",
|
|
188
|
-
content: generateAgentTs(projectName, doClassName),
|
|
203
|
+
content: generateAgentTs(projectName, doClassName, template),
|
|
189
204
|
encoding: "utf-8",
|
|
190
205
|
});
|
|
191
|
-
// 8. src/
|
|
206
|
+
// 8. src/tools/index.ts (tool registry)
|
|
192
207
|
files.push({
|
|
193
|
-
path: "src/
|
|
194
|
-
content:
|
|
208
|
+
path: "src/tools/index.ts",
|
|
209
|
+
content: generateToolsIndexTs(template),
|
|
195
210
|
encoding: "utf-8",
|
|
196
211
|
});
|
|
197
212
|
// 9. src/tools/greet.ts (included for templates that use it)
|
|
@@ -229,6 +244,8 @@ dist/
|
|
|
229
244
|
const secrets = {
|
|
230
245
|
MCP_IDENTITY_PRIVATE_KEY: identity.privateKey,
|
|
231
246
|
OAUTH_ENCRYPTION_SECRET: oauthEncryptionSecret,
|
|
247
|
+
KYA_OS_AUDIT_PRODUCER_INTERNAL_TOKEN: auditProducerInternalToken,
|
|
248
|
+
KYA_OS_AUDIT_REFERENCE_SECRET: auditReferenceSecret,
|
|
232
249
|
};
|
|
233
250
|
// Include AgentShield API key if provided
|
|
234
251
|
if (agentShieldApiKey) {
|
|
@@ -274,10 +291,22 @@ compatibility_flags = ["nodejs_compat"]
|
|
|
274
291
|
name = "MCP_OBJECT"
|
|
275
292
|
class_name = "${doClassName}"
|
|
276
293
|
|
|
294
|
+
# Dedicated audit delivery state. This is intentionally separate from the MCP
|
|
295
|
+
# agent DO so recorder latency/retries cannot affect consent or session state.
|
|
296
|
+
[[durable_objects.bindings]]
|
|
297
|
+
name = "AUDIT_PRODUCER"
|
|
298
|
+
class_name = "AuditProducer"
|
|
299
|
+
|
|
277
300
|
[[migrations]]
|
|
278
301
|
tag = "v1"
|
|
279
302
|
new_sqlite_classes = ["${doClassName}"]
|
|
280
303
|
|
|
304
|
+
# Keep this separate from v1. Existing deployments can adopt audit without
|
|
305
|
+
# rewriting an already-applied migration tag.
|
|
306
|
+
[[migrations]]
|
|
307
|
+
tag = "v2-audit-producer"
|
|
308
|
+
new_sqlite_classes = ["AuditProducer"]
|
|
309
|
+
|
|
281
310
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
282
311
|
# KV NAMESPACE - Unified single namespace, auto-provisioned by Wrangler v4.45+
|
|
283
312
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
@@ -312,6 +341,13 @@ ${agentShieldProjectId ? `AGENTSHIELD_PROJECT_ID = "${agentShieldProjectId}"` :
|
|
|
312
341
|
|
|
313
342
|
MCPI_ENV = "development"
|
|
314
343
|
|
|
344
|
+
# Canonical audit recorder (opt-in; leave unset to keep audit disabled)
|
|
345
|
+
# KYA_OS_AUDIT_CONFIG is provisioned by Checkpoint with public recorder trust material.
|
|
346
|
+
# KYA_OS_AUDIT_RECORDER_URL = "https://kya.vouched.id/api/v1/audit/entries"
|
|
347
|
+
# KYA_OS_AUDIT_LEDGER_ID = "audit-ledger-..."
|
|
348
|
+
# KYA_OS_AUDIT_LEDGER_EPOCH_ID = "audit-epoch-..."
|
|
349
|
+
# KYA_OS_AUDIT_SOURCE_ID = "managed-worker:..."
|
|
350
|
+
|
|
315
351
|
# MCP Server URL (OPTIONAL - auto-detected from request origin by default)
|
|
316
352
|
# Only set this if you're using a custom domain or auto-detection isn't working
|
|
317
353
|
# Use base URL WITHOUT /mcp suffix - consent pages are at /consent, not /mcp/consent
|
|
@@ -326,8 +362,7 @@ ${templateVars}
|
|
|
326
362
|
}
|
|
327
363
|
function generateIndexTs(doClassName) {
|
|
328
364
|
return `import { createMCPIApp } from "@kya-os/mcp-i-cloudflare";
|
|
329
|
-
import { ${doClassName} } from "./agent";
|
|
330
|
-
import { getRuntimeConfig } from "./mcpi-runtime-config";
|
|
365
|
+
import { ${doClassName}, getRuntimeConfig } from "./agent";
|
|
331
366
|
|
|
332
367
|
export default createMCPIApp({
|
|
333
368
|
AgentClass: ${doClassName},
|
|
@@ -336,63 +371,27 @@ export default createMCPIApp({
|
|
|
336
371
|
|
|
337
372
|
// Export Durable Object class for Cloudflare Workers binding
|
|
338
373
|
export { ${doClassName} };
|
|
374
|
+
// Separate SQLite audit producer; it does not share authorization/session state.
|
|
375
|
+
export { AuditProducer } from "@kya-os/mcp-i-cloudflare";
|
|
339
376
|
`;
|
|
340
377
|
}
|
|
341
|
-
function generateAgentTs(projectName, doClassName) {
|
|
342
|
-
return `import { MCPICloudflareAgent, type CloudflareEnv } from "@kya-os/mcp-i-cloudflare";
|
|
343
|
-
import { getRuntimeConfig, getTools } from "./mcpi-runtime-config";
|
|
344
|
-
import type { CloudflareRuntimeConfig } from "@kya-os/mcp-i-cloudflare";
|
|
345
|
-
|
|
346
|
-
/**
|
|
347
|
-
* MCP-I Agent Implementation
|
|
348
|
-
*/
|
|
349
|
-
export class ${doClassName} extends MCPICloudflareAgent {
|
|
350
|
-
protected getAgentName(): string {
|
|
351
|
-
return (this.env as CloudflareEnv).MCP_SERVER_NAME || "${projectName}";
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
protected getAgentVersion(): string {
|
|
355
|
-
return "1.0.0";
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
protected getRuntimeConfigInternal(env: CloudflareEnv): CloudflareRuntimeConfig {
|
|
359
|
-
return getRuntimeConfig(env);
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
protected async registerTools(): Promise<void> {
|
|
363
|
-
const tools = getTools();
|
|
364
|
-
for (const toolDef of tools) {
|
|
365
|
-
this.registerToolWithProof(
|
|
366
|
-
toolDef.name,
|
|
367
|
-
toolDef.description,
|
|
368
|
-
toolDef.inputSchema,
|
|
369
|
-
toolDef.handler
|
|
370
|
-
);
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
`;
|
|
375
|
-
}
|
|
376
|
-
function generateRuntimeConfigTs(template) {
|
|
377
|
-
// Hardware World has different imports and tool protection
|
|
378
|
+
function generateAgentTs(projectName, doClassName, template) {
|
|
378
379
|
if (template === "hardware-world") {
|
|
379
|
-
return
|
|
380
|
+
return generateHardwareWorldAgentTs(projectName, doClassName);
|
|
380
381
|
}
|
|
381
|
-
// Mix Station has its own runtime config with Mixer API client
|
|
382
382
|
if (template === "mix-station") {
|
|
383
|
-
return
|
|
384
|
-
}
|
|
385
|
-
const imports = [`import { greetTool } from "./tools/greet";`];
|
|
386
|
-
const tools = ["greetTool"];
|
|
387
|
-
if (template === "ecommerce") {
|
|
388
|
-
imports.push(`import { addToCartTool } from "./tools/add-to-cart";`);
|
|
389
|
-
imports.push(`import { getCartTool } from "./tools/get-cart";`);
|
|
390
|
-
imports.push(`import { checkoutTool } from "./tools/checkout";`);
|
|
391
|
-
tools.push("addToCartTool", "getCartTool", "checkoutTool");
|
|
383
|
+
return generateMixStationAgentTs(projectName, doClassName);
|
|
392
384
|
}
|
|
393
|
-
return
|
|
394
|
-
|
|
395
|
-
|
|
385
|
+
return generateDefaultAgentTs(projectName, doClassName);
|
|
386
|
+
}
|
|
387
|
+
function generateDefaultAgentTs(projectName, doClassName) {
|
|
388
|
+
return `import {
|
|
389
|
+
MCPICloudflareAgent,
|
|
390
|
+
defineConfig,
|
|
391
|
+
type CloudflareEnv,
|
|
392
|
+
type CloudflareRuntimeConfig,
|
|
393
|
+
} from "@kya-os/mcp-i-cloudflare";
|
|
394
|
+
import { getTools } from "./tools";
|
|
396
395
|
|
|
397
396
|
export function getRuntimeConfig(env: CloudflareEnv): CloudflareRuntimeConfig {
|
|
398
397
|
const environment = (env.MCPI_ENV || env.ENVIRONMENT || "development") as "development" | "production";
|
|
@@ -424,15 +423,46 @@ export function getRuntimeConfig(env: CloudflareEnv): CloudflareRuntimeConfig {
|
|
|
424
423
|
});
|
|
425
424
|
}
|
|
426
425
|
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
426
|
+
/**
|
|
427
|
+
* MCP-I Agent Implementation
|
|
428
|
+
*/
|
|
429
|
+
export class ${doClassName} extends MCPICloudflareAgent {
|
|
430
|
+
protected getAgentName(): string {
|
|
431
|
+
return (this.env as CloudflareEnv).MCP_SERVER_NAME || "${projectName}";
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
protected getAgentVersion(): string {
|
|
435
|
+
return "1.0.0";
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
protected getRuntimeConfigInternal(env: CloudflareEnv): CloudflareRuntimeConfig {
|
|
439
|
+
return getRuntimeConfig(env);
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
protected async registerTools(): Promise<void> {
|
|
443
|
+
const tools = getTools();
|
|
444
|
+
for (const toolDef of tools) {
|
|
445
|
+
this.registerToolWithProof(
|
|
446
|
+
toolDef.name,
|
|
447
|
+
toolDef.description,
|
|
448
|
+
toolDef.inputSchema,
|
|
449
|
+
toolDef.handler
|
|
450
|
+
);
|
|
451
|
+
}
|
|
452
|
+
}
|
|
431
453
|
}
|
|
432
454
|
`;
|
|
433
455
|
}
|
|
434
|
-
function
|
|
435
|
-
return
|
|
456
|
+
function generateHardwareWorldAgentTs(projectName, doClassName) {
|
|
457
|
+
return `import {
|
|
458
|
+
MCPICloudflareAgent,
|
|
459
|
+
defineConfig,
|
|
460
|
+
type CloudflareEnv,
|
|
461
|
+
type CloudflareRuntimeConfig,
|
|
462
|
+
} from "@kya-os/mcp-i-cloudflare";
|
|
463
|
+
import { getTools } from "./tools";
|
|
464
|
+
|
|
465
|
+
/**
|
|
436
466
|
* MCP-I Runtime Configuration
|
|
437
467
|
*
|
|
438
468
|
* Defines tool protection, proofing, and other runtime settings.
|
|
@@ -440,21 +470,6 @@ function generateHardwareWorldRuntimeConfig() {
|
|
|
440
470
|
* AgentShield's auto-generated scope validation issues.
|
|
441
471
|
*/
|
|
442
472
|
|
|
443
|
-
import {
|
|
444
|
-
defineConfig,
|
|
445
|
-
type CloudflareRuntimeConfig,
|
|
446
|
-
type CloudflareEnv,
|
|
447
|
-
} from "@kya-os/mcp-i-cloudflare";
|
|
448
|
-
|
|
449
|
-
// Import tools
|
|
450
|
-
import { greetTool } from "./tools/greet";
|
|
451
|
-
import { getProductsTool } from "./tools/get-products";
|
|
452
|
-
import { getBrandsTool } from "./tools/get-brands";
|
|
453
|
-
import { getBrandTool } from "./tools/get-brand";
|
|
454
|
-
import { addToCartTool } from "./tools/add-to-cart";
|
|
455
|
-
import { getCartTool } from "./tools/get-cart";
|
|
456
|
-
import { getCustomerTool } from "./tools/get-customer";
|
|
457
|
-
|
|
458
473
|
/**
|
|
459
474
|
* Tool Protection Configuration
|
|
460
475
|
*
|
|
@@ -547,6 +562,69 @@ export function getRuntimeConfig(env: CloudflareEnv): CloudflareRuntimeConfig {
|
|
|
547
562
|
});
|
|
548
563
|
}
|
|
549
564
|
|
|
565
|
+
/**
|
|
566
|
+
* MCP-I Agent Implementation
|
|
567
|
+
*/
|
|
568
|
+
export class ${doClassName} extends MCPICloudflareAgent {
|
|
569
|
+
protected getAgentName(): string {
|
|
570
|
+
return (this.env as CloudflareEnv).MCP_SERVER_NAME || "${projectName}";
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
protected getAgentVersion(): string {
|
|
574
|
+
return "1.0.0";
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
protected getRuntimeConfigInternal(env: CloudflareEnv): CloudflareRuntimeConfig {
|
|
578
|
+
return getRuntimeConfig(env);
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
protected async registerTools(): Promise<void> {
|
|
582
|
+
const tools = getTools();
|
|
583
|
+
for (const toolDef of tools) {
|
|
584
|
+
this.registerToolWithProof(
|
|
585
|
+
toolDef.name,
|
|
586
|
+
toolDef.description,
|
|
587
|
+
toolDef.inputSchema,
|
|
588
|
+
toolDef.handler
|
|
589
|
+
);
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
`;
|
|
594
|
+
}
|
|
595
|
+
function generateToolsIndexTs(template) {
|
|
596
|
+
if (template === "hardware-world") {
|
|
597
|
+
return generateHardwareWorldToolsIndexTs();
|
|
598
|
+
}
|
|
599
|
+
if (template === "mix-station") {
|
|
600
|
+
return generateMixStationToolsIndexTs();
|
|
601
|
+
}
|
|
602
|
+
const imports = [`import { greetTool } from "./greet";`];
|
|
603
|
+
const tools = ["greetTool"];
|
|
604
|
+
if (template === "ecommerce") {
|
|
605
|
+
imports.push(`import { addToCartTool } from "./add-to-cart";`);
|
|
606
|
+
imports.push(`import { getCartTool } from "./get-cart";`);
|
|
607
|
+
imports.push(`import { checkoutTool } from "./checkout";`);
|
|
608
|
+
tools.push("addToCartTool", "getCartTool", "checkoutTool");
|
|
609
|
+
}
|
|
610
|
+
return `${imports.join("\n")}
|
|
611
|
+
|
|
612
|
+
export function getTools() {
|
|
613
|
+
return [
|
|
614
|
+
${tools.join(",\n ")},
|
|
615
|
+
];
|
|
616
|
+
}
|
|
617
|
+
`;
|
|
618
|
+
}
|
|
619
|
+
function generateHardwareWorldToolsIndexTs() {
|
|
620
|
+
return `import { greetTool } from "./greet";
|
|
621
|
+
import { getProductsTool } from "./get-products";
|
|
622
|
+
import { getBrandsTool } from "./get-brands";
|
|
623
|
+
import { getBrandTool } from "./get-brand";
|
|
624
|
+
import { addToCartTool } from "./add-to-cart";
|
|
625
|
+
import { getCartTool } from "./get-cart";
|
|
626
|
+
import { getCustomerTool } from "./get-customer";
|
|
627
|
+
|
|
550
628
|
/**
|
|
551
629
|
* Get all tools for this agent
|
|
552
630
|
*
|
|
@@ -1419,14 +1497,20 @@ export const addToCartTool: ToolDefinition = {
|
|
|
1419
1497
|
},
|
|
1420
1498
|
];
|
|
1421
1499
|
}
|
|
1422
|
-
function
|
|
1423
|
-
return `import {
|
|
1424
|
-
|
|
1500
|
+
function generateMixStationAgentTs(projectName, doClassName) {
|
|
1501
|
+
return `import {
|
|
1502
|
+
MCPICloudflareAgent,
|
|
1503
|
+
defineConfig,
|
|
1504
|
+
type CloudflareEnv,
|
|
1505
|
+
type CloudflareRuntimeConfig,
|
|
1506
|
+
} from "@kya-os/mcp-i-cloudflare";
|
|
1425
1507
|
import { createMixerClient } from "./lib/mixer-client";
|
|
1508
|
+
import { getTools } from "./tools";
|
|
1426
1509
|
|
|
1427
1510
|
// Cached env values for tool access (initialized by getRuntimeConfig)
|
|
1428
1511
|
let cachedProjectId: string | null = null;
|
|
1429
1512
|
let cachedMixerApiUrl: string | undefined = undefined;
|
|
1513
|
+
let cachedStationToken: string | undefined = undefined;
|
|
1430
1514
|
|
|
1431
1515
|
/**
|
|
1432
1516
|
* Get runtime configuration for MCP-I Cloudflare Worker
|
|
@@ -1434,6 +1518,7 @@ let cachedMixerApiUrl: string | undefined = undefined;
|
|
|
1434
1518
|
export function getRuntimeConfig(env: CloudflareEnv): CloudflareRuntimeConfig {
|
|
1435
1519
|
cachedProjectId = env.AGENTSHIELD_PROJECT_ID || null;
|
|
1436
1520
|
cachedMixerApiUrl = env.MIXER_API_URL || undefined;
|
|
1521
|
+
cachedStationToken = env.MIXER_STATION_TOKEN || undefined;
|
|
1437
1522
|
|
|
1438
1523
|
const environment = (env.MCPI_ENV || env.ENVIRONMENT || "development") as "development" | "production";
|
|
1439
1524
|
|
|
@@ -1464,12 +1549,46 @@ export function getRuntimeConfig(env: CloudflareEnv): CloudflareRuntimeConfig {
|
|
|
1464
1549
|
* Get mixer client lazily at execution time.
|
|
1465
1550
|
* Uses cached env values set by getRuntimeConfig.
|
|
1466
1551
|
*/
|
|
1467
|
-
function getMixerClientLazy(): { projectId: string; mixer: ReturnType<typeof createMixerClient> } | null {
|
|
1552
|
+
export function getMixerClientLazy(): { projectId: string; mixer: ReturnType<typeof createMixerClient> } | null {
|
|
1468
1553
|
const projectId = cachedProjectId;
|
|
1469
1554
|
if (!projectId) return null;
|
|
1470
|
-
return { projectId, mixer: createMixerClient(projectId, cachedMixerApiUrl) };
|
|
1555
|
+
return { projectId, mixer: createMixerClient(projectId, cachedMixerApiUrl, cachedStationToken) };
|
|
1471
1556
|
}
|
|
1472
1557
|
|
|
1558
|
+
/**
|
|
1559
|
+
* MCP-I Agent Implementation
|
|
1560
|
+
*/
|
|
1561
|
+
export class ${doClassName} extends MCPICloudflareAgent {
|
|
1562
|
+
protected getAgentName(): string {
|
|
1563
|
+
return (this.env as CloudflareEnv).MCP_SERVER_NAME || "${projectName}";
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
protected getAgentVersion(): string {
|
|
1567
|
+
return "1.0.0";
|
|
1568
|
+
}
|
|
1569
|
+
|
|
1570
|
+
protected getRuntimeConfigInternal(env: CloudflareEnv): CloudflareRuntimeConfig {
|
|
1571
|
+
return getRuntimeConfig(env);
|
|
1572
|
+
}
|
|
1573
|
+
|
|
1574
|
+
protected async registerTools(): Promise<void> {
|
|
1575
|
+
const tools = getTools();
|
|
1576
|
+
for (const toolDef of tools) {
|
|
1577
|
+
this.registerToolWithProof(
|
|
1578
|
+
toolDef.name,
|
|
1579
|
+
toolDef.description,
|
|
1580
|
+
toolDef.inputSchema,
|
|
1581
|
+
toolDef.handler
|
|
1582
|
+
);
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
}
|
|
1586
|
+
`;
|
|
1587
|
+
}
|
|
1588
|
+
function generateMixStationToolsIndexTs() {
|
|
1589
|
+
return `import type { ToolDefinition } from "@kya-os/mcp-i-cloudflare";
|
|
1590
|
+
import { getMixerClientLazy } from "../agent";
|
|
1591
|
+
|
|
1473
1592
|
/**
|
|
1474
1593
|
* Get all tools for this agent
|
|
1475
1594
|
*/
|
|
@@ -1747,6 +1866,12 @@ function generateMixStationTools() {
|
|
|
1747
1866
|
* Provides typed access to Mixer's MCP API endpoints.
|
|
1748
1867
|
* The project ID is passed via X-AgentShield-Project-Id header,
|
|
1749
1868
|
* which Mixer uses to look up the associated station.
|
|
1869
|
+
*
|
|
1870
|
+
* When the MIXER_STATION_TOKEN secret is present (injected by Checkpoint
|
|
1871
|
+
* at deploy time), it is also sent via the X-Station-Token header so
|
|
1872
|
+
* Mixer can authenticate the callback with a real secret instead of the
|
|
1873
|
+
* guessable project ID alone. Workers deployed without the secret simply
|
|
1874
|
+
* omit the header (backward compatible).
|
|
1750
1875
|
*/
|
|
1751
1876
|
|
|
1752
1877
|
const DEFAULT_MIXER_API_URL = "https://mixer-vouched.vercel.app";
|
|
@@ -1760,11 +1885,12 @@ export interface MixerApiClient {
|
|
|
1760
1885
|
graph: (args: { action: string; nodeId?: string; targetNodeId?: string; direction?: string; hops?: number; nodeTypes?: string; limit?: number }) => Promise<any>;
|
|
1761
1886
|
}
|
|
1762
1887
|
|
|
1763
|
-
export function createMixerClient(projectId: string, apiUrl?: string): MixerApiClient {
|
|
1888
|
+
export function createMixerClient(projectId: string, apiUrl?: string, stationToken?: string): MixerApiClient {
|
|
1764
1889
|
const mixerUrl = apiUrl || DEFAULT_MIXER_API_URL;
|
|
1765
|
-
const headers = {
|
|
1890
|
+
const headers: Record<string, string> = {
|
|
1766
1891
|
"Content-Type": "application/json",
|
|
1767
1892
|
"X-AgentShield-Project-Id": projectId,
|
|
1893
|
+
...(stationToken ? { "X-Station-Token": stationToken } : {}),
|
|
1768
1894
|
};
|
|
1769
1895
|
|
|
1770
1896
|
return {
|
|
@@ -1871,7 +1997,8 @@ jobs:
|
|
|
1871
1997
|
- name: Install dependencies
|
|
1872
1998
|
run: npm install
|
|
1873
1999
|
|
|
1874
|
-
- name: Deploy to Cloudflare
|
|
2000
|
+
- name: Deploy to Cloudflare (audit disabled)
|
|
2001
|
+
if: \${{ vars.KYA_OS_AUDIT_ENABLED != 'true' }}
|
|
1875
2002
|
uses: cloudflare/wrangler-action@v3
|
|
1876
2003
|
with:
|
|
1877
2004
|
apiToken: \${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
@@ -1883,6 +2010,26 @@ jobs:
|
|
|
1883
2010
|
MCP_IDENTITY_PRIVATE_KEY: \${{ secrets.MCP_IDENTITY_PRIVATE_KEY }}
|
|
1884
2011
|
OAUTH_ENCRYPTION_SECRET: \${{ secrets.OAUTH_ENCRYPTION_SECRET }}
|
|
1885
2012
|
AGENTSHIELD_API_KEY: \${{ secrets.AGENTSHIELD_API_KEY }}
|
|
2013
|
+
|
|
2014
|
+
- name: Deploy to Cloudflare (audit enabled)
|
|
2015
|
+
if: \${{ vars.KYA_OS_AUDIT_ENABLED == 'true' }}
|
|
2016
|
+
uses: cloudflare/wrangler-action@v3
|
|
2017
|
+
with:
|
|
2018
|
+
apiToken: \${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
2019
|
+
secrets: |
|
|
2020
|
+
MCP_IDENTITY_PRIVATE_KEY
|
|
2021
|
+
OAUTH_ENCRYPTION_SECRET
|
|
2022
|
+
AGENTSHIELD_API_KEY
|
|
2023
|
+
KYA_OS_AUDIT_PRODUCER_INTERNAL_TOKEN
|
|
2024
|
+
KYA_OS_AUDIT_REFERENCE_SECRET
|
|
2025
|
+
KYA_OS_AUDIT_INGEST_KEY
|
|
2026
|
+
env:
|
|
2027
|
+
MCP_IDENTITY_PRIVATE_KEY: \${{ secrets.MCP_IDENTITY_PRIVATE_KEY }}
|
|
2028
|
+
OAUTH_ENCRYPTION_SECRET: \${{ secrets.OAUTH_ENCRYPTION_SECRET }}
|
|
2029
|
+
AGENTSHIELD_API_KEY: \${{ secrets.AGENTSHIELD_API_KEY }}
|
|
2030
|
+
KYA_OS_AUDIT_PRODUCER_INTERNAL_TOKEN: \${{ secrets.KYA_OS_AUDIT_PRODUCER_INTERNAL_TOKEN }}
|
|
2031
|
+
KYA_OS_AUDIT_REFERENCE_SECRET: \${{ secrets.KYA_OS_AUDIT_REFERENCE_SECRET }}
|
|
2032
|
+
KYA_OS_AUDIT_INGEST_KEY: \${{ secrets.KYA_OS_AUDIT_INGEST_KEY }}
|
|
1886
2033
|
`;
|
|
1887
2034
|
}
|
|
1888
2035
|
function generateReadme(projectName, projectId) {
|
|
@@ -1937,8 +2084,18 @@ Configure your agent at: ${dashboardUrl}
|
|
|
1937
2084
|
| \`MCP_IDENTITY_PRIVATE_KEY\` | Agent's private key | Yes |
|
|
1938
2085
|
| \`OAUTH_ENCRYPTION_SECRET\` | OAuth state encryption | Yes |
|
|
1939
2086
|
| \`AGENTSHIELD_API_KEY\` | AgentShield API key | Yes |
|
|
2087
|
+
| \`KYA_OS_AUDIT_PRODUCER_INTERNAL_TOKEN\` | Internal audit DO authentication | When audit is enabled |
|
|
2088
|
+
| \`KYA_OS_AUDIT_REFERENCE_SECRET\` | HMAC key for privacy-safe audit references | When audit is enabled |
|
|
2089
|
+
| \`KYA_OS_AUDIT_INGEST_KEY\` | Ledger-scoped credential for the configured audit recorder | When audit is enabled |
|
|
2090
|
+
| \`KYA_OS_AUDIT_ENABLED\` | GitHub Actions repository variable selecting the audit-enabled deployment path | When audit is enabled (set to \`true\`) |
|
|
1940
2091
|
| \`CLOUDFLARE_API_TOKEN\` | Wrangler deployment token | For CI/CD |
|
|
1941
2092
|
|
|
2093
|
+
To enable audit in CI, configure all three audit secrets, set the GitHub Actions
|
|
2094
|
+
repository variable \`KYA_OS_AUDIT_ENABLED=true\`, and enable the recorder
|
|
2095
|
+
settings in \`wrangler.toml\`. The audit-enabled deployment path requires all
|
|
2096
|
+
three secrets, so a partial configuration fails closed instead of silently
|
|
2097
|
+
deploying.
|
|
2098
|
+
|
|
1942
2099
|
## Adding Tools
|
|
1943
2100
|
|
|
1944
2101
|
Add new tools in \`src/tools/\`:
|
|
@@ -1965,7 +2122,7 @@ export const myTool: ToolDefinition = {
|
|
|
1965
2122
|
};
|
|
1966
2123
|
\`\`\`
|
|
1967
2124
|
|
|
1968
|
-
Then register in \`src/
|
|
2125
|
+
Then register it in \`src/tools/index.ts\`.
|
|
1969
2126
|
|
|
1970
2127
|
## License
|
|
1971
2128
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-cloudflare-files.js","sourceRoot":"","sources":["../../src/helpers/generate-cloudflare-files.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EACL,gBAAgB,GAEjB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"generate-cloudflare-files.js","sourceRoot":"","sources":["../../src/helpers/generate-cloud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,EAAE,SAAkB;IAC7D,MAAM,YAAY,GAAG,SAAS;QAC5B,CAAC,CAAC,4CAA4C,SAAS,EAAE;QACzD,CAAC,CAAC,0CAA0C,CAAC;IAE/C,OAAO,KAAK,WAAW;;;;;;;;gDAQuB,WAAW;QACnD,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;2BA0BQ,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDtC,CAAC;AACF,CAAC"}
|
|
@@ -55,7 +55,7 @@ import { buildBaseConfig } from "@kya-os/create-mcpi-app/config-builder";
|
|
|
55
55
|
* Runtime configuration for MCP-I server
|
|
56
56
|
*
|
|
57
57
|
* This file configures runtime features like proof submission to AgentShield,
|
|
58
|
-
* delegation verification, and audit
|
|
58
|
+
* delegation verification, and canonical audit trail bindings.
|
|
59
59
|
*
|
|
60
60
|
* Note: Environment variables are automatically injected by the MCP-I compiler
|
|
61
61
|
* from wrangler.toml (Cloudflare) or .env (Node.js). Configure them there:
|
|
@@ -67,7 +67,7 @@ export async function getPackageVersions() {
|
|
|
67
67
|
cachedVersions = {
|
|
68
68
|
"@kya-os/mcp-i": normalizeVersion(deps["@kya-os/mcp-i"] || "^1.7.13"),
|
|
69
69
|
"@kya-os/cli": normalizeVersion(deps["@kya-os/cli"] || "^1.5.9"),
|
|
70
|
-
"@kya-os/mcp-i-cloudflare": normalizeVersion(deps["@kya-os/mcp-i-cloudflare"] || "^1.
|
|
70
|
+
"@kya-os/mcp-i-cloudflare": normalizeVersion(deps["@kya-os/mcp-i-cloudflare"] || "^1.13.5"),
|
|
71
71
|
"@kya-os/contracts": normalizeVersion(deps["@kya-os/contracts"] || "^1.7.21"),
|
|
72
72
|
};
|
|
73
73
|
return cachedVersions;
|
|
@@ -78,7 +78,7 @@ export async function getPackageVersions() {
|
|
|
78
78
|
return {
|
|
79
79
|
"@kya-os/mcp-i": "^1.7.13",
|
|
80
80
|
"@kya-os/cli": "^1.5.9",
|
|
81
|
-
"@kya-os/mcp-i-cloudflare": "^1.
|
|
81
|
+
"@kya-os/mcp-i-cloudflare": "^1.13.5",
|
|
82
82
|
"@kya-os/contracts": "^1.9.2",
|
|
83
83
|
};
|
|
84
84
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-package-versions.js","sourceRoot":"","sources":["../../src/helpers/get-package-versions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC,mCAAmC;AACnC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AAS3C,kDAAkD;AAClD,IAAI,cAAc,GAA2B,IAAI,CAAC;AAElD;;;;;;;;;;GAUG;AACH,SAAS,gBAAgB,CAAC,OAAe;IACvC,gCAAgC;IAChC,MAAM,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IAEnD,oDAAoD;IACpD,wDAAwD;IACxD,IAAI,YAAY,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;QACpC,OAAO,YAAY,CAAC,CAAC,2BAA2B;IAClD,CAAC;IAED,6CAA6C;IAC7C,OAAO,IAAI,YAAY,EAAE,CAAC,CAAC,WAAW;AACxC,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB;IACtC,IAAI,cAAc,EAAE,CAAC;QACnB,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,gDAAgD;IAChD,uCAAuC;IACvC,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;IAEtE,IAAI,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;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,0CAA0C;IAC1C,UAAU,EAAE,OAAO,CAAC;IACpB,yCAAyC;IACzC,YAAY,EAAE,MAAM,CAAC;IACrB,0EAA0E;IAC1E,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;
|
|
1
|
+
{"version":3,"file":"kta-registration.d.ts","sourceRoot":"","sources":["../../src/helpers/kta-registration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,0CAA0C;IAC1C,UAAU,EAAE,OAAO,CAAC;IACpB,yCAAyC;IACzC,YAAY,EAAE,MAAM,CAAC;IACrB,0EAA0E;IAC1E,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAmCD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,iBAAiB;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,SAAS,EAAE,MAAM,CAAC;IAClB,kBAAkB;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,iCAAiC;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;GASG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,kBAAkB,CAAC,CAyC7B;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,GAAG,IAAI,GACtB,eAAe,CAMjB"}
|
|
@@ -15,6 +15,19 @@ const REGISTRY_URL = "https://knowthat.ai";
|
|
|
15
15
|
const REPUTATION_API_PATHS = {
|
|
16
16
|
CLI_REGISTER: "/api/agents/cli-register",
|
|
17
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* Resolve the cli-register endpoint, honouring an explicit override.
|
|
20
|
+
* Mirrors the same override contract as `@kya-os/cli`'s register command
|
|
21
|
+
* (packages/cli/src/commands/register.ts): KTA_REGISTER_ENDPOINT, then
|
|
22
|
+
* KTA_API_URL, then the production default. This lets a build point
|
|
23
|
+
* registration at a staging registry instead of production.
|
|
24
|
+
*/
|
|
25
|
+
function resolveRegisterEndpoint() {
|
|
26
|
+
return (process.env.KTA_REGISTER_ENDPOINT ??
|
|
27
|
+
(process.env.KTA_API_URL
|
|
28
|
+
? new URL(REPUTATION_API_PATHS.CLI_REGISTER, process.env.KTA_API_URL).toString()
|
|
29
|
+
: `${REGISTRY_URL}${REPUTATION_API_PATHS.CLI_REGISTER}`));
|
|
30
|
+
}
|
|
18
31
|
/**
|
|
19
32
|
* Register an agent with Know That AI
|
|
20
33
|
*
|
|
@@ -28,7 +41,7 @@ const REPUTATION_API_PATHS = {
|
|
|
28
41
|
export async function registerWithKTA(options) {
|
|
29
42
|
const { name, publicKey, did, description } = options;
|
|
30
43
|
try {
|
|
31
|
-
const response = await fetch(
|
|
44
|
+
const response = await fetch(resolveRegisterEndpoint(), {
|
|
32
45
|
method: "POST",
|
|
33
46
|
headers: {
|
|
34
47
|
"Content-Type": "application/json",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kta-registration.js","sourceRoot":"","sources":["../../src/helpers/kta-registration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAmBH;;;GAGG;AACH,MAAM,YAAY,GAAG,qBAA8B,CAAC;AAEpD;;;GAGG;AACH,MAAM,oBAAoB,GAAG;IAC3B,YAAY,EAAE,0BAA0B;CAChC,CAAC;
|
|
1
|
+
{"version":3,"file":"kta-registration.js","sourceRoot":"","sources":["../../src/helpers/kta-registration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAmBH;;;GAGG;AACH,MAAM,YAAY,GAAG,qBAA8B,CAAC;A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