@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.
Files changed (45) hide show
  1. package/.turbo/turbo-build.log +7 -7
  2. package/dist/bundles/blank.js +15290 -7495
  3. package/dist/bundles/ecommerce.js +15293 -7498
  4. package/dist/bundles/hardware-world.js +15298 -7503
  5. package/dist/bundles/manifest.json +12 -11
  6. package/dist/bundles/mix-station.js +15320 -7522
  7. package/dist/cli-runner.d.ts.map +1 -1
  8. package/dist/cli-runner.js +25 -2
  9. package/dist/cli-runner.js.map +1 -1
  10. package/dist/helpers/apply-identity-preset.d.ts.map +1 -1
  11. package/dist/helpers/apply-identity-preset.js +6 -1
  12. package/dist/helpers/apply-identity-preset.js.map +1 -1
  13. package/dist/helpers/fetch-cloudflare-mcpi-template.d.ts +2 -2
  14. package/dist/helpers/fetch-cloudflare-mcpi-template.d.ts.map +1 -1
  15. package/dist/helpers/fetch-cloudflare-mcpi-template.js +99 -56
  16. package/dist/helpers/fetch-cloudflare-mcpi-template.js.map +1 -1
  17. package/dist/helpers/fetch-mcpi-template.d.ts.map +1 -1
  18. package/dist/helpers/fetch-mcpi-template.js +7 -3
  19. package/dist/helpers/fetch-mcpi-template.js.map +1 -1
  20. package/dist/helpers/generate-cloudflare-files.d.ts.map +1 -1
  21. package/dist/helpers/generate-cloudflare-files.js +247 -90
  22. package/dist/helpers/generate-cloudflare-files.js.map +1 -1
  23. package/dist/helpers/generate-config.js +1 -1
  24. package/dist/helpers/get-package-versions.js +2 -2
  25. package/dist/helpers/get-package-versions.js.map +1 -1
  26. package/dist/helpers/kta-registration.d.ts.map +1 -1
  27. package/dist/helpers/kta-registration.js +14 -1
  28. package/dist/helpers/kta-registration.js.map +1 -1
  29. package/dist/helpers/pinned-dependencies.d.ts +39 -0
  30. package/dist/helpers/pinned-dependencies.d.ts.map +1 -0
  31. package/dist/helpers/pinned-dependencies.js +46 -0
  32. package/dist/helpers/pinned-dependencies.js.map +1 -0
  33. package/package.json +5 -13
  34. package/dist/helpers/generate-openapi-project.d.ts +0 -36
  35. package/dist/helpers/generate-openapi-project.d.ts.map +0 -1
  36. package/dist/helpers/generate-openapi-project.js +0 -114
  37. package/dist/helpers/generate-openapi-project.js.map +0 -1
  38. package/dist/helpers/generate-openapi-tools.d.ts +0 -43
  39. package/dist/helpers/generate-openapi-tools.d.ts.map +0 -1
  40. package/dist/helpers/generate-openapi-tools.js +0 -550
  41. package/dist/helpers/generate-openapi-tools.js.map +0 -1
  42. package/dist/helpers/generate-runtime-config.d.ts +0 -16
  43. package/dist/helpers/generate-runtime-config.d.ts.map +0 -1
  44. package/dist/helpers/generate-runtime-config.js +0 -49
  45. package/dist/helpers/generate-runtime-config.js.map +0 -1
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Dependency versions the scaffolder forces onto every generated project.
3
+ *
4
+ * Single source of truth for the monorepo is the repository-root
5
+ * pinned-dependencies.json. The published CLI bundle cannot read that file,
6
+ * so the value is duplicated here and a test asserts the two agree
7
+ * (src/__tests__/helpers/pinned-dependencies.test.ts).
8
+ *
9
+ * Why json-canonicalize is pinned in generated projects, not only in our own
10
+ * packages: json-canonicalize@2.0.1 (2026-08-14) is a source-only publish
11
+ * whose `main` points at a missing bundles/index.umd.js. Our packages declare
12
+ * 2.0.0 exactly, but a consumer tree still reaches 2.0.1 through
13
+ * @kya-os/cli -> @kya-os/mcp@1.11.0 (^2.0.0): npm hoists depth-1 nodes in
14
+ * path order and "@kya-os/mcp" sorts before "@kya-os/mcp-i", so mcp's caret
15
+ * edge claims the root node_modules slot and webpack resolves mcp's
16
+ * canonical-json against the broken copy. pnpm does not hoist at all, so each
17
+ * range resolves independently. Only a package-manager override fixes both,
18
+ * hence all three fields below (npm, pnpm, yarn).
19
+ */
20
+ export declare const PINNED_DEPENDENCY_OVERRIDES: Readonly<Record<string, string>>;
21
+ /** The three package-manager override fields the scaffolder writes. */
22
+ export interface PackageManagerOverrideFields {
23
+ /** npm */
24
+ overrides: Record<string, string>;
25
+ /** pnpm (nested under the "pnpm" key; other pnpm settings are preserved) */
26
+ pnpm: {
27
+ overrides: Record<string, string>;
28
+ } & Record<string, unknown>;
29
+ /** yarn */
30
+ resolutions: Record<string, string>;
31
+ }
32
+ /**
33
+ * Return a copy of `manifest` with the pinned overrides merged into the npm,
34
+ * pnpm, and yarn override fields. Existing user entries are kept; for a
35
+ * pinned name the pin wins, since the pin exists to defeat a broken upstream
36
+ * publish.
37
+ */
38
+ export declare function applyPinnedDependencyOverrides<T extends object>(manifest: T): T & PackageManagerOverrideFields;
39
+ //# sourceMappingURL=pinned-dependencies.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pinned-dependencies.d.ts","sourceRoot":"","sources":["../../src/helpers/pinned-dependencies.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAExE,CAAC;AAEF,uEAAuE;AACvE,MAAM,WAAW,4BAA4B;IAC3C,UAAU;IACV,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,4EAA4E;IAC5E,IAAI,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtE,WAAW;IACX,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC;AAQD;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAAC,CAAC,SAAS,MAAM,EAC7D,QAAQ,EAAE,CAAC,GACV,CAAC,GAAG,4BAA4B,CAkBlC"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Dependency versions the scaffolder forces onto every generated project.
3
+ *
4
+ * Single source of truth for the monorepo is the repository-root
5
+ * pinned-dependencies.json. The published CLI bundle cannot read that file,
6
+ * so the value is duplicated here and a test asserts the two agree
7
+ * (src/__tests__/helpers/pinned-dependencies.test.ts).
8
+ *
9
+ * Why json-canonicalize is pinned in generated projects, not only in our own
10
+ * packages: json-canonicalize@2.0.1 (2026-08-14) is a source-only publish
11
+ * whose `main` points at a missing bundles/index.umd.js. Our packages declare
12
+ * 2.0.0 exactly, but a consumer tree still reaches 2.0.1 through
13
+ * @kya-os/cli -> @kya-os/mcp@1.11.0 (^2.0.0): npm hoists depth-1 nodes in
14
+ * path order and "@kya-os/mcp" sorts before "@kya-os/mcp-i", so mcp's caret
15
+ * edge claims the root node_modules slot and webpack resolves mcp's
16
+ * canonical-json against the broken copy. pnpm does not hoist at all, so each
17
+ * range resolves independently. Only a package-manager override fixes both,
18
+ * hence all three fields below (npm, pnpm, yarn).
19
+ */
20
+ export const PINNED_DEPENDENCY_OVERRIDES = {
21
+ "json-canonicalize": "2.0.0",
22
+ };
23
+ /**
24
+ * Return a copy of `manifest` with the pinned overrides merged into the npm,
25
+ * pnpm, and yarn override fields. Existing user entries are kept; for a
26
+ * pinned name the pin wins, since the pin exists to defeat a broken upstream
27
+ * publish.
28
+ */
29
+ export function applyPinnedDependencyOverrides(manifest) {
30
+ const existing = manifest;
31
+ const existingPnpm = existing.pnpm ?? {};
32
+ const existingPnpmOverrides = existing.pnpm?.overrides ?? {};
33
+ return {
34
+ ...manifest,
35
+ overrides: { ...(existing.overrides ?? {}), ...PINNED_DEPENDENCY_OVERRIDES },
36
+ pnpm: {
37
+ ...existingPnpm,
38
+ overrides: { ...existingPnpmOverrides, ...PINNED_DEPENDENCY_OVERRIDES },
39
+ },
40
+ resolutions: {
41
+ ...(existing.resolutions ?? {}),
42
+ ...PINNED_DEPENDENCY_OVERRIDES,
43
+ },
44
+ };
45
+ }
46
+ //# sourceMappingURL=pinned-dependencies.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pinned-dependencies.js","sourceRoot":"","sources":["../../src/helpers/pinned-dependencies.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAqC;IAC3E,mBAAmB,EAAE,OAAO;CAC7B,CAAC;AAkBF;;;;;GAKG;AACH,MAAM,UAAU,8BAA8B,CAC5C,QAAW;IAEX,MAAM,QAAQ,GAAG,QAAsC,CAAC;IACxD,MAAM,YAAY,GAA4B,QAAQ,CAAC,IAAI,IAAI,EAAE,CAAC;IAClE,MAAM,qBAAqB,GACzB,QAAQ,CAAC,IAAI,EAAE,SAAS,IAAI,EAAE,CAAC;IAEjC,OAAO;QACL,GAAG,QAAQ;QACX,SAAS,EAAE,EAAE,GAAG,CAAC,QAAQ,CAAC,SAAS,IAAI,EAAE,CAAC,EAAE,GAAG,2BAA2B,EAAE;QAC5E,IAAI,EAAE;YACJ,GAAG,YAAY;YACf,SAAS,EAAE,EAAE,GAAG,qBAAqB,EAAE,GAAG,2BAA2B,EAAE;SACxE;QACD,WAAW,EAAE;YACX,GAAG,CAAC,QAAQ,CAAC,WAAW,IAAI,EAAE,CAAC;YAC/B,GAAG,2BAA2B;SAC/B;KACF,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kya-os/create-mcpi-app",
3
- "version": "1.10.5",
3
+ "version": "1.11.1",
4
4
  "description": "Scaffold a new MCP-I application",
5
5
  "type": "module",
6
6
  "main": "./dist/helpers/index.js",
@@ -22,14 +22,6 @@
22
22
  "types": "./dist/helpers/openapi-ingestion.d.ts",
23
23
  "import": "./dist/helpers/openapi-ingestion.js"
24
24
  },
25
- "./helpers/generate-openapi-tools": {
26
- "types": "./dist/helpers/generate-openapi-tools.d.ts",
27
- "import": "./dist/helpers/generate-openapi-tools.js"
28
- },
29
- "./helpers/generate-openapi-project": {
30
- "types": "./dist/helpers/generate-openapi-project.d.ts",
31
- "import": "./dist/helpers/generate-openapi-project.js"
32
- },
33
25
  "./helpers/generate-identity": {
34
26
  "types": "./dist/helpers/generate-identity.d.ts",
35
27
  "import": "./dist/helpers/generate-identity.js"
@@ -55,11 +47,11 @@
55
47
  },
56
48
  "dependencies": {
57
49
  "@apidevtools/swagger-parser": "^10.1.1",
58
- "@kya-os/cli": "^1.6.3",
50
+ "@kya-os/cli": "^1.7.0",
59
51
  "@kya-os/cli-effects": "^1.0.19",
60
- "@kya-os/contracts": "^1.9.2",
61
- "@kya-os/mcp-i": "^1.7.13",
62
- "@kya-os/mcp-i-cloudflare": "^1.12.3",
52
+ "@kya-os/contracts": "^1.12.1",
53
+ "@kya-os/mcp-i": "^1.12.2",
54
+ "@kya-os/mcp-i-cloudflare": "^1.13.6",
63
55
  "base-x": "^5.0.0",
64
56
  "chalk": "^4.1.2",
65
57
  "commander": "^12.1.0",
@@ -1,36 +0,0 @@
1
- /**
2
- * OpenAPI Project File Generator
3
- *
4
- * Generates a complete Cloudflare Workers MCP-I project from an OpenAPI spec.
5
- * Follows the same patterns as generate-cloudflare-files.ts.
6
- *
7
- * @module @kya-os/create-mcpi-app/helpers/generate-openapi-project
8
- */
9
- import type { OperationModel, SecuritySchemeMap } from "../types/openapi-generator.js";
10
- import type { GeneratedIdentity } from "./generate-identity.js";
11
- /**
12
- * Generate a complete MCP-I Cloudflare Workers project from OpenAPI operations.
13
- *
14
- * Creates the following structure:
15
- * package.json
16
- * tsconfig.json
17
- * .gitignore
18
- * src/index.ts
19
- * src/agent.ts
20
- * src/auth.ts
21
- * src/mcpi-runtime-config.ts
22
- * src/tools/<toolName>.ts
23
- * wrangler.toml
24
- * .dev.vars.example
25
- * README.md
26
- *
27
- * The private key is placed ONLY in .dev.vars.example (not in wrangler.toml).
28
- * The DID is placed in wrangler.toml [vars] as MCP_IDENTITY_AGENT_DID.
29
- *
30
- * @param operations - Operations from ingestOpenAPI
31
- * @param securitySchemes - Security scheme map
32
- * @param targetDir - Absolute path to project output directory
33
- * @param identity - Generated agent identity
34
- */
35
- export declare function generateOpenAPIProjectFiles(operations: OperationModel[], securitySchemes: SecuritySchemeMap, targetDir: string, identity: GeneratedIdentity): Promise<void>;
36
- //# sourceMappingURL=generate-openapi-project.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generate-openapi-project.d.ts","sourceRoot":"","sources":["../../src/helpers/generate-openapi-project.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EAClB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAQhE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,2BAA2B,CAC/C,UAAU,EAAE,cAAc,EAAE,EAC5B,eAAe,EAAE,iBAAiB,EAClC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,iBAAiB,GAC1B,OAAO,CAAC,IAAI,CAAC,CAwCf"}
@@ -1,114 +0,0 @@
1
- /**
2
- * OpenAPI Project File Generator
3
- *
4
- * Generates a complete Cloudflare Workers MCP-I project from an OpenAPI spec.
5
- * Follows the same patterns as generate-cloudflare-files.ts.
6
- *
7
- * @module @kya-os/create-mcpi-app/helpers/generate-openapi-project
8
- */
9
- import { writeFile, mkdir } from "fs/promises";
10
- import { join } from "path";
11
- import { generateToolFiles } from "./generate-openapi-tools.js";
12
- import { getPackageVersions } from "./get-package-versions.js";
13
- // ============================================================================
14
- // Public API
15
- // ============================================================================
16
- /**
17
- * Generate a complete MCP-I Cloudflare Workers project from OpenAPI operations.
18
- *
19
- * Creates the following structure:
20
- * package.json
21
- * tsconfig.json
22
- * .gitignore
23
- * src/index.ts
24
- * src/agent.ts
25
- * src/auth.ts
26
- * src/mcpi-runtime-config.ts
27
- * src/tools/<toolName>.ts
28
- * wrangler.toml
29
- * .dev.vars.example
30
- * README.md
31
- *
32
- * The private key is placed ONLY in .dev.vars.example (not in wrangler.toml).
33
- * The DID is placed in wrangler.toml [vars] as MCP_IDENTITY_AGENT_DID.
34
- *
35
- * @param operations - Operations from ingestOpenAPI
36
- * @param securitySchemes - Security scheme map
37
- * @param targetDir - Absolute path to project output directory
38
- * @param identity - Generated agent identity
39
- */
40
- export async function generateOpenAPIProjectFiles(operations, securitySchemes, targetDir, identity) {
41
- // Ensure directory exists
42
- await mkdir(targetDir, { recursive: true });
43
- // Get package versions from scaffolder's package.json
44
- const versions = await getPackageVersions();
45
- const mcpICloudflareVersion = versions["@kya-os/mcp-i-cloudflare"];
46
- // 1. package.json
47
- await writeFile(join(targetDir, "package.json"), JSON.stringify(generatePackageJson(mcpICloudflareVersion), null, 2), "utf-8");
48
- // 2. tsconfig.json
49
- await writeFile(join(targetDir, "tsconfig.json"), JSON.stringify(generateTsConfig(), null, 2), "utf-8");
50
- // 3. .gitignore
51
- await writeFile(join(targetDir, ".gitignore"), generateGitignore(), "utf-8");
52
- // 4. src/mcpi-runtime-config.ts is written by generateToolFiles below,
53
- // which handles it for both standalone and project-scaffolding callers.
54
- // Writing it here again would be a redundant double-write.
55
- // 5. All tool files, agent.ts, index.ts, auth.ts, wrangler.toml,
56
- // .dev.vars.example, README.md (delegated to generate-openapi-tools)
57
- await generateToolFiles(operations, securitySchemes, targetDir, identity);
58
- }
59
- // ============================================================================
60
- // File content generators
61
- // ============================================================================
62
- function generatePackageJson(mcpICloudflareVersion) {
63
- return {
64
- name: "openapi-agent",
65
- version: "0.1.0",
66
- private: true,
67
- scripts: {
68
- deploy: "wrangler deploy",
69
- dev: "wrangler dev",
70
- start: "wrangler dev",
71
- test: "vitest",
72
- "cf-typegen": "wrangler types",
73
- },
74
- dependencies: {
75
- "@kya-os/mcp-i-cloudflare": mcpICloudflareVersion,
76
- "@modelcontextprotocol/sdk": "1.25.2",
77
- agents: "0.3.6",
78
- hono: "4.12.4",
79
- },
80
- devDependencies: {
81
- "@cloudflare/vitest-pool-workers": "^0.5.41",
82
- "@cloudflare/workers-types": "^4.20251126.0",
83
- "@types/node": "^20.8.3",
84
- typescript: "^5.5.2",
85
- vitest: "^2.0.5",
86
- wrangler: "^4.53.0",
87
- },
88
- };
89
- }
90
- function generateTsConfig() {
91
- return {
92
- compilerOptions: {
93
- target: "esnext",
94
- module: "esnext",
95
- moduleResolution: "bundler",
96
- types: ["@cloudflare/workers-types", "vitest/globals"],
97
- strict: true,
98
- skipLibCheck: true,
99
- noEmit: true,
100
- },
101
- include: ["src/**/*"],
102
- exclude: ["node_modules"],
103
- };
104
- }
105
- function generateGitignore() {
106
- return `node_modules/
107
- dist/
108
- .wrangler/
109
- .dev.vars
110
- *.log
111
- .DS_Store
112
- `;
113
- }
114
- //# sourceMappingURL=generate-openapi-project.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generate-openapi-project.js","sourceRoot":"","sources":["../../src/helpers/generate-openapi-project.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAM5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,+EAA+E;AAC/E,aAAa;AACb,+EAA+E;AAE/E;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAC/C,UAA4B,EAC5B,eAAkC,EAClC,SAAiB,EACjB,QAA2B;IAE3B,0BAA0B;IAC1B,MAAM,KAAK,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAE5C,sDAAsD;IACtD,MAAM,QAAQ,GAAG,MAAM,kBAAkB,EAAE,CAAC;IAC5C,MAAM,qBAAqB,GAAG,QAAQ,CAAC,0BAA0B,CAAC,CAAC;IAEnE,kBAAkB;IAClB,MAAM,SAAS,CACb,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,EAC/B,IAAI,CAAC,SAAS,CACZ,mBAAmB,CAAC,qBAAqB,CAAC,EAC1C,IAAI,EACJ,CAAC,CACF,EACD,OAAO,CACR,CAAC;IAEF,mBAAmB;IACnB,MAAM,SAAS,CACb,IAAI,CAAC,SAAS,EAAE,eAAe,CAAC,EAChC,IAAI,CAAC,SAAS,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,EAC3C,OAAO,CACR,CAAC;IAEF,gBAAgB;IAChB,MAAM,SAAS,CACb,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,EAC7B,iBAAiB,EAAE,EACnB,OAAO,CACR,CAAC;IAEF,uEAAuE;IACvE,2EAA2E;IAC3E,8DAA8D;IAE9D,iEAAiE;IACjE,wEAAwE;IACxE,MAAM,iBAAiB,CAAC,UAAU,EAAE,eAAe,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;AAC5E,CAAC;AAED,+EAA+E;AAC/E,0BAA0B;AAC1B,+EAA+E;AAE/E,SAAS,mBAAmB,CAAC,qBAA6B;IACxD,OAAO;QACL,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE,OAAO;QAChB,OAAO,EAAE,IAAI;QACb,OAAO,EAAE;YACP,MAAM,EAAE,iBAAiB;YACzB,GAAG,EAAE,cAAc;YACnB,KAAK,EAAE,cAAc;YACrB,IAAI,EAAE,QAAQ;YACd,YAAY,EAAE,gBAAgB;SAC/B;QACD,YAAY,EAAE;YACZ,0BAA0B,EAAE,qBAAqB;YACjD,2BAA2B,EAAE,QAAQ;YACrC,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,QAAQ;SACf;QACD,eAAe,EAAE;YACf,iCAAiC,EAAE,SAAS;YAC5C,2BAA2B,EAAE,eAAe;YAC5C,aAAa,EAAE,SAAS;YACxB,UAAU,EAAE,QAAQ;YACpB,MAAM,EAAE,QAAQ;YAChB,QAAQ,EAAE,SAAS;SACpB;KACF,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB;IACvB,OAAO;QACL,eAAe,EAAE;YACf,MAAM,EAAE,QAAQ;YAChB,MAAM,EAAE,QAAQ;YAChB,gBAAgB,EAAE,SAAS;YAC3B,KAAK,EAAE,CAAC,2BAA2B,EAAE,gBAAgB,CAAC;YACtD,MAAM,EAAE,IAAI;YACZ,YAAY,EAAE,IAAI;YAClB,MAAM,EAAE,IAAI;SACb;QACD,OAAO,EAAE,CAAC,UAAU,CAAC;QACrB,OAAO,EAAE,CAAC,cAAc,CAAC;KAC1B,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB;IACxB,OAAO;;;;;;CAMR,CAAC;AACF,CAAC"}
@@ -1,43 +0,0 @@
1
- /**
2
- * OpenAPI Tool File Generator
3
- *
4
- * Generates TypeScript tool files from OperationModel instances.
5
- * Each tool is a factory function that accepts environment variables
6
- * and returns a ToolDefinition compatible with @kya-os/mcp-i-cloudflare.
7
- *
8
- * @module @kya-os/create-mcpi-app/helpers/generate-openapi-tools
9
- */
10
- import type { OperationModel, SecuritySchemeMap } from "../types/openapi-generator.js";
11
- import type { GeneratedIdentity } from "./generate-identity.js";
12
- /**
13
- * Generate TypeScript source code for a single tool file.
14
- *
15
- * @param operation - The OperationModel to generate a tool for
16
- * @param securitySchemes - The full security scheme map (for env type generation)
17
- * @returns TypeScript source string for the tool file
18
- */
19
- export declare function generateToolFile(operation: OperationModel, _securitySchemes: SecuritySchemeMap): string;
20
- /**
21
- * Generate all tool files plus supporting project files and write them to disk.
22
- *
23
- * Files generated:
24
- * src/tools/<toolName>.ts (one per operation)
25
- * src/auth.ts (auth helpers)
26
- * src/agent.ts (MCPIAgent class)
27
- * src/index.ts (createMCPIApp entry point)
28
- * wrangler.toml
29
- * .dev.vars.example
30
- * README.md
31
- *
32
- * @param operations - Parsed operations from ingestOpenAPI
33
- * @param securitySchemes - Security scheme map
34
- * @param targetDir - Absolute path to output directory
35
- * @param identity - Generated agent identity
36
- */
37
- export declare function generateToolFiles(operations: OperationModel[], securitySchemes: SecuritySchemeMap, targetDir: string, identity: GeneratedIdentity): Promise<void>;
38
- /**
39
- * Generate the shared AgentEnv interface imported by all generated tool files.
40
- * Includes API_BASE_URL, MCPI_REQUEST_TIMEOUT_MS, and scheme-specific vars.
41
- */
42
- export declare function generateAgentEnvTs(securitySchemes: SecuritySchemeMap): string;
43
- //# sourceMappingURL=generate-openapi-tools.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generate-openapi-tools.d.ts","sourceRoot":"","sources":["../../src/helpers/generate-openapi-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EAIlB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAMhE;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,cAAc,EACzB,gBAAgB,EAAE,iBAAiB,GAClC,MAAM,CAkBR;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,cAAc,EAAE,EAC5B,eAAe,EAAE,iBAAiB,EAClC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,iBAAiB,GAC1B,OAAO,CAAC,IAAI,CAAC,CAmEf;AAgOD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,eAAe,EAAE,iBAAiB,GAAG,MAAM,CAoC7E"}