@elliotding/ai-agent-mcp 0.1.3 → 0.1.4

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 (98) hide show
  1. package/.prompt-cache/cmd-cmd-client-sdk-ai-hub-generate-testcase.md +101 -0
  2. package/.prompt-cache/cmd-cmd-client-sdk-ai-hub-submit_zct_job.md +158 -0
  3. package/.prompt-cache/skill-skill-client-sdk-ai-hub-analyze-conf-status.md +311 -0
  4. package/.prompt-cache/skill-skill-client-sdk-ai-hub-analyze-sdk-log.md +64 -0
  5. package/.prompt-cache/skill-skill-client-sdk-ai-hub-analyze-zmb-log-errors.md +84 -0
  6. package/ai-resource-telemetry.json +22 -0
  7. package/dist/api/client.d.ts +39 -0
  8. package/dist/api/client.d.ts.map +1 -1
  9. package/dist/api/client.js +21 -3
  10. package/dist/api/client.js.map +1 -1
  11. package/dist/auth/permissions.d.ts.map +1 -1
  12. package/dist/auth/permissions.js +6 -0
  13. package/dist/auth/permissions.js.map +1 -1
  14. package/dist/config/index.d.ts +6 -1
  15. package/dist/config/index.d.ts.map +1 -1
  16. package/dist/config/index.js +1 -3
  17. package/dist/config/index.js.map +1 -1
  18. package/dist/index.js +12 -0
  19. package/dist/index.js.map +1 -1
  20. package/dist/prompts/cache.d.ts +69 -0
  21. package/dist/prompts/cache.d.ts.map +1 -0
  22. package/dist/prompts/cache.js +163 -0
  23. package/dist/prompts/cache.js.map +1 -0
  24. package/dist/prompts/generator.d.ts +49 -0
  25. package/dist/prompts/generator.d.ts.map +1 -0
  26. package/dist/prompts/generator.js +158 -0
  27. package/dist/prompts/generator.js.map +1 -0
  28. package/dist/prompts/index.d.ts +13 -0
  29. package/dist/prompts/index.d.ts.map +1 -0
  30. package/dist/prompts/index.js +24 -0
  31. package/dist/prompts/index.js.map +1 -0
  32. package/dist/prompts/manager.d.ts +106 -0
  33. package/dist/prompts/manager.d.ts.map +1 -0
  34. package/dist/prompts/manager.js +263 -0
  35. package/dist/prompts/manager.js.map +1 -0
  36. package/dist/server/http.d.ts.map +1 -1
  37. package/dist/server/http.js +61 -17
  38. package/dist/server/http.js.map +1 -1
  39. package/dist/server.d.ts.map +1 -1
  40. package/dist/server.js +43 -0
  41. package/dist/server.js.map +1 -1
  42. package/dist/telemetry/index.d.ts +3 -0
  43. package/dist/telemetry/index.d.ts.map +1 -0
  44. package/dist/telemetry/index.js +7 -0
  45. package/dist/telemetry/index.js.map +1 -0
  46. package/dist/telemetry/manager.d.ts +149 -0
  47. package/dist/telemetry/manager.d.ts.map +1 -0
  48. package/dist/telemetry/manager.js +368 -0
  49. package/dist/telemetry/manager.js.map +1 -0
  50. package/dist/tools/index.d.ts +1 -0
  51. package/dist/tools/index.d.ts.map +1 -1
  52. package/dist/tools/index.js +1 -0
  53. package/dist/tools/index.js.map +1 -1
  54. package/dist/tools/manage-subscription.d.ts.map +1 -1
  55. package/dist/tools/manage-subscription.js +19 -4
  56. package/dist/tools/manage-subscription.js.map +1 -1
  57. package/dist/tools/search-resources.d.ts.map +1 -1
  58. package/dist/tools/search-resources.js +2 -3
  59. package/dist/tools/search-resources.js.map +1 -1
  60. package/dist/tools/sync-resources.d.ts +9 -4
  61. package/dist/tools/sync-resources.d.ts.map +1 -1
  62. package/dist/tools/sync-resources.js +121 -7
  63. package/dist/tools/sync-resources.js.map +1 -1
  64. package/dist/tools/track-usage.d.ts +63 -0
  65. package/dist/tools/track-usage.d.ts.map +1 -0
  66. package/dist/tools/track-usage.js +90 -0
  67. package/dist/tools/track-usage.js.map +1 -0
  68. package/dist/tools/uninstall-resource.d.ts.map +1 -1
  69. package/dist/tools/uninstall-resource.js +53 -3
  70. package/dist/tools/uninstall-resource.js.map +1 -1
  71. package/dist/tools/upload-resource.d.ts.map +1 -1
  72. package/dist/tools/upload-resource.js +49 -5
  73. package/dist/tools/upload-resource.js.map +1 -1
  74. package/dist/utils/cursor-paths.d.ts +10 -0
  75. package/dist/utils/cursor-paths.d.ts.map +1 -1
  76. package/dist/utils/cursor-paths.js +13 -0
  77. package/dist/utils/cursor-paths.js.map +1 -1
  78. package/package.json +1 -1
  79. package/src/api/client.ts +52 -3
  80. package/src/auth/permissions.ts +6 -0
  81. package/src/config/index.ts +11 -5
  82. package/src/index.ts +18 -0
  83. package/src/prompts/cache.ts +140 -0
  84. package/src/prompts/generator.ts +142 -0
  85. package/src/prompts/index.ts +20 -0
  86. package/src/prompts/manager.ts +342 -0
  87. package/src/server/http.ts +69 -17
  88. package/src/server.ts +13 -0
  89. package/src/telemetry/index.ts +10 -0
  90. package/src/telemetry/manager.ts +419 -0
  91. package/src/tools/index.ts +1 -0
  92. package/src/tools/manage-subscription.ts +19 -4
  93. package/src/tools/search-resources.ts +2 -4
  94. package/src/tools/sync-resources.ts +131 -7
  95. package/src/tools/track-usage.ts +113 -0
  96. package/src/tools/uninstall-resource.ts +62 -4
  97. package/src/tools/upload-resource.ts +52 -5
  98. package/src/utils/cursor-paths.ts +13 -0
@@ -0,0 +1,163 @@
1
+ "use strict";
2
+ /**
3
+ * PromptCache: manages the .prompt-cache/ directory inside the MCP Server's
4
+ * runtime working directory.
5
+ *
6
+ * Cache files hold the fully-expanded Prompt content for each Command/Skill
7
+ * resource so that the MCP Prompt handler can serve them without re-generating
8
+ * on every invocation.
9
+ *
10
+ * The cache directory is intentionally NOT committed to Git — it is regenerated
11
+ * from the canonical source files after every git pull or resource upload.
12
+ *
13
+ * File naming: {type}-{resource_id}.md
14
+ * e.g. cmd-client-sdk-generate-testcase.md
15
+ * skill-client-sdk-analyze-sdk-log.md
16
+ */
17
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ var desc = Object.getOwnPropertyDescriptor(m, k);
20
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
21
+ desc = { enumerable: true, get: function() { return m[k]; } };
22
+ }
23
+ Object.defineProperty(o, k2, desc);
24
+ }) : (function(o, m, k, k2) {
25
+ if (k2 === undefined) k2 = k;
26
+ o[k2] = m[k];
27
+ }));
28
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
29
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
30
+ }) : function(o, v) {
31
+ o["default"] = v;
32
+ });
33
+ var __importStar = (this && this.__importStar) || (function () {
34
+ var ownKeys = function(o) {
35
+ ownKeys = Object.getOwnPropertyNames || function (o) {
36
+ var ar = [];
37
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
38
+ return ar;
39
+ };
40
+ return ownKeys(o);
41
+ };
42
+ return function (mod) {
43
+ if (mod && mod.__esModule) return mod;
44
+ var result = {};
45
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
46
+ __setModuleDefault(result, mod);
47
+ return result;
48
+ };
49
+ })();
50
+ Object.defineProperty(exports, "__esModule", { value: true });
51
+ exports.promptCache = exports.PromptCache = void 0;
52
+ const fs = __importStar(require("fs"));
53
+ const path = __importStar(require("path"));
54
+ const logger_js_1 = require("../utils/logger.js");
55
+ /** Relative directory name inside the MCP Server CWD for cached Prompt files. */
56
+ const CACHE_DIR_NAME = '.prompt-cache';
57
+ class PromptCache {
58
+ cacheDir;
59
+ /**
60
+ * @param baseDir Absolute base directory (defaults to process.cwd()).
61
+ */
62
+ constructor(baseDir = process.cwd()) {
63
+ this.cacheDir = path.join(baseDir, CACHE_DIR_NAME);
64
+ }
65
+ /** Absolute path to the cache directory. */
66
+ get directory() {
67
+ return this.cacheDir;
68
+ }
69
+ /** Ensure the cache directory exists (idempotent). */
70
+ ensureDir() {
71
+ fs.mkdirSync(this.cacheDir, { recursive: true });
72
+ }
73
+ /**
74
+ * Derive the cache file name for a resource.
75
+ * @param resourceType 'command' | 'skill'
76
+ * @param resourceId Canonical resource ID
77
+ */
78
+ cacheFileName(resourceType, resourceId) {
79
+ // Normalise type prefix: 'command' → 'cmd', 'skill' → 'skill'
80
+ const prefix = resourceType === 'command' ? 'cmd' : resourceType;
81
+ // Sanitise resourceId — remove characters unsafe in filenames.
82
+ const safeId = resourceId.replace(/[/\\:*?"<>|]/g, '-');
83
+ return `${prefix}-${safeId}.md`;
84
+ }
85
+ /** Absolute path to the cache file for a given resource. */
86
+ cachePath(resourceType, resourceId) {
87
+ return path.join(this.cacheDir, this.cacheFileName(resourceType, resourceId));
88
+ }
89
+ /**
90
+ * Write (or overwrite) a resource's Prompt content to the cache.
91
+ * Uses atomic write-then-rename to prevent partial reads.
92
+ *
93
+ * @param resourceType 'command' | 'skill'
94
+ * @param resourceId Canonical resource ID
95
+ * @param content Fully-expanded Prompt Markdown content
96
+ */
97
+ write(resourceType, resourceId, content) {
98
+ this.ensureDir();
99
+ const dest = this.cachePath(resourceType, resourceId);
100
+ const tmp = `${dest}.${process.pid}.tmp`;
101
+ try {
102
+ fs.writeFileSync(tmp, content, 'utf8');
103
+ fs.renameSync(tmp, dest);
104
+ logger_js_1.logger.debug({ resourceId, resourceType, path: dest }, 'Prompt cache written');
105
+ }
106
+ catch (err) {
107
+ // Best-effort cleanup of temp file
108
+ try {
109
+ fs.unlinkSync(tmp);
110
+ }
111
+ catch { /* ignore */ }
112
+ throw new Error(`Failed to write prompt cache for ${resourceId}: ${err.message}`);
113
+ }
114
+ }
115
+ /**
116
+ * Read the cached Prompt content for a resource.
117
+ * Returns null if the cache file does not exist or cannot be read.
118
+ *
119
+ * @param resourceType 'command' | 'skill'
120
+ * @param resourceId Canonical resource ID
121
+ */
122
+ read(resourceType, resourceId) {
123
+ const p = this.cachePath(resourceType, resourceId);
124
+ try {
125
+ return fs.readFileSync(p, 'utf8');
126
+ }
127
+ catch {
128
+ return null;
129
+ }
130
+ }
131
+ /**
132
+ * Delete the cache file for a resource.
133
+ * Silently succeeds if the file does not exist.
134
+ *
135
+ * @param resourceType 'command' | 'skill'
136
+ * @param resourceId Canonical resource ID
137
+ */
138
+ delete(resourceType, resourceId) {
139
+ const p = this.cachePath(resourceType, resourceId);
140
+ try {
141
+ fs.unlinkSync(p);
142
+ logger_js_1.logger.debug({ resourceId, resourceType }, 'Prompt cache deleted');
143
+ }
144
+ catch (err) {
145
+ if (err.code !== 'ENOENT') {
146
+ logger_js_1.logger.warn({ resourceId, error: err.message }, 'Failed to delete prompt cache file');
147
+ }
148
+ }
149
+ }
150
+ /**
151
+ * Check whether a valid cache entry exists for a resource.
152
+ *
153
+ * @param resourceType 'command' | 'skill'
154
+ * @param resourceId Canonical resource ID
155
+ */
156
+ exists(resourceType, resourceId) {
157
+ return fs.existsSync(this.cachePath(resourceType, resourceId));
158
+ }
159
+ }
160
+ exports.PromptCache = PromptCache;
161
+ /** Singleton cache instance using the process CWD as the base directory. */
162
+ exports.promptCache = new PromptCache();
163
+ //# sourceMappingURL=cache.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache.js","sourceRoot":"","sources":["../../src/prompts/cache.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,2CAA6B;AAC7B,kDAA4C;AAE5C,iFAAiF;AACjF,MAAM,cAAc,GAAG,eAAe,CAAC;AAEvC,MAAa,WAAW;IACL,QAAQ,CAAS;IAElC;;OAEG;IACH,YAAY,UAAkB,OAAO,CAAC,GAAG,EAAE;QACzC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;IACrD,CAAC;IAED,4CAA4C;IAC5C,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,sDAAsD;IACtD,SAAS;QACP,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACnD,CAAC;IAED;;;;OAIG;IACK,aAAa,CAAC,YAAoB,EAAE,UAAkB;QAC5D,8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AC;IACH,CAAC;IAED;;;;;;OAMG;IACH,IAAI,CAAC,YAAoB,EAAE,UAAkB;QAC3C,MAAM,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;QACnD,IAAI,CAAC;YACH,OAAO,EAAE,CAAC,YAAY,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;QACpC,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CAAC,YAAoB,EAAE,UAAkB;QAC7C,MAAM,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;QACnD,IAAI,CAAC;YACH,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YACjB,kBAAM,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,YAAY,EAAE,EAAE,sBAAsB,CAAC,CAAC;QACrE,CAAC;QAAC,OAAO,GAAY,EAAE,CAAC;YACtB,IAAK,GAA6B,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;gBACrD,kBAAM,CAAC,IAAI,CACT,EAAE,UAAU,EAAE,KAAK,EAAG,GAAa,CAAC,OAAO,EAAE,EAC7C,oCAAoC,CACrC,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IAED;;;;;OAKG;IACH,MAAM,CAAC,YAAoB,EAAE,UAAkB;QAC7C,OAAO,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC;IACjE,CAAC;CACF;AAjHD,kCAiHC;AAED,4EAA4E;AAC/D,QAAA,WAAW,GAAG,IAAI,WAAW,EAAE,CAAC"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * PromptGenerator: converts raw Command/Skill Markdown assets into MCP Prompt content.
3
+ *
4
+ * Two-step pipeline:
5
+ * 1. parseMarkdownWithImports — recursively inline `import 'path'` directives.
6
+ * 2. replaceMDVariables — substitute ${VAR} placeholders with runtime values.
7
+ *
8
+ * The resulting string is returned to the caller who can pass it directly as
9
+ * the MCP Prompt message text, or write it to the .prompt-cache/ directory.
10
+ */
11
+ /**
12
+ * Recursively resolve and inline all `import 'path'` statements in a Markdown
13
+ * file. Each imported file's content replaces its import statement in the
14
+ * parent document.
15
+ *
16
+ * @param filePath Absolute path to the root Markdown file.
17
+ * @param depth Current recursion depth (used for cycle detection).
18
+ * @returns Fully expanded Markdown string.
19
+ */
20
+ export declare function parseMarkdownWithImports(filePath: string, depth?: number): Promise<string>;
21
+ /**
22
+ * Replace ${VARIABLE_NAME} placeholders in content with values from the
23
+ * provided variable map. Variables not found in the map are left unchanged so
24
+ * they remain visible in the output for debugging.
25
+ *
26
+ * @param content Markdown string (after import expansion).
27
+ * @param variables Key-value map of variable names to their replacement strings.
28
+ * @returns Content with placeholders substituted.
29
+ */
30
+ export declare function replaceMDVariables(content: string, variables: Record<string, string>): string;
31
+ /**
32
+ * High-level entry point: expand imports then substitute variables.
33
+ *
34
+ * @param filePath Absolute path to the root Markdown file.
35
+ * @param variables Optional variable substitution map (defaults to empty).
36
+ * @returns Final Prompt content ready for MCP registration.
37
+ */
38
+ export declare function generatePromptContent(filePath: string, variables?: Record<string, string>): Promise<string>;
39
+ /**
40
+ * Generate Prompt content from a raw Markdown string (no file I/O).
41
+ * Used when the resource content has already been downloaded from the API.
42
+ *
43
+ * @param rawContent Raw Markdown string.
44
+ * @param basePath Absolute directory used to resolve relative `import` paths.
45
+ * @param variables Optional variable substitution map.
46
+ * @returns Final Prompt content.
47
+ */
48
+ export declare function generatePromptContentFromString(rawContent: string, basePath: string, variables?: Record<string, string>): Promise<string>;
49
+ //# sourceMappingURL=generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/prompts/generator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAYH;;;;;;;;GAQG;AACH,wBAAsB,wBAAwB,CAC5C,QAAQ,EAAE,MAAM,EAChB,KAAK,SAAI,GACR,OAAO,CAAC,MAAM,CAAC,CA6CjB;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAChC,MAAM,CAOR;AAED;;;;;;GAMG;AACH,wBAAsB,qBAAqB,CACzC,QAAQ,EAAE,MAAM,EAChB,SAAS,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GACrC,OAAO,CAAC,MAAM,CAAC,CAGjB;AAED;;;;;;;;GAQG;AACH,wBAAsB,+BAA+B,CACnD,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,SAAS,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GACrC,OAAO,CAAC,MAAM,CAAC,CAYjB"}
@@ -0,0 +1,158 @@
1
+ "use strict";
2
+ /**
3
+ * PromptGenerator: converts raw Command/Skill Markdown assets into MCP Prompt content.
4
+ *
5
+ * Two-step pipeline:
6
+ * 1. parseMarkdownWithImports — recursively inline `import 'path'` directives.
7
+ * 2. replaceMDVariables — substitute ${VAR} placeholders with runtime values.
8
+ *
9
+ * The resulting string is returned to the caller who can pass it directly as
10
+ * the MCP Prompt message text, or write it to the .prompt-cache/ directory.
11
+ */
12
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ var desc = Object.getOwnPropertyDescriptor(m, k);
15
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
16
+ desc = { enumerable: true, get: function() { return m[k]; } };
17
+ }
18
+ Object.defineProperty(o, k2, desc);
19
+ }) : (function(o, m, k, k2) {
20
+ if (k2 === undefined) k2 = k;
21
+ o[k2] = m[k];
22
+ }));
23
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
24
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
25
+ }) : function(o, v) {
26
+ o["default"] = v;
27
+ });
28
+ var __importStar = (this && this.__importStar) || (function () {
29
+ var ownKeys = function(o) {
30
+ ownKeys = Object.getOwnPropertyNames || function (o) {
31
+ var ar = [];
32
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
33
+ return ar;
34
+ };
35
+ return ownKeys(o);
36
+ };
37
+ return function (mod) {
38
+ if (mod && mod.__esModule) return mod;
39
+ var result = {};
40
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
41
+ __setModuleDefault(result, mod);
42
+ return result;
43
+ };
44
+ })();
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.parseMarkdownWithImports = parseMarkdownWithImports;
47
+ exports.replaceMDVariables = replaceMDVariables;
48
+ exports.generatePromptContent = generatePromptContent;
49
+ exports.generatePromptContentFromString = generatePromptContentFromString;
50
+ const fs = __importStar(require("fs"));
51
+ const path = __importStar(require("path"));
52
+ const logger_js_1 = require("../utils/logger.js");
53
+ // Maximum import recursion depth to guard against circular imports.
54
+ const MAX_IMPORT_DEPTH = 20;
55
+ // Matches lines like: import 'relative/path/to/file.md'
56
+ const IMPORT_REGEX = /^import\s+['"]([^'"]+)['"]\s*$/gm;
57
+ /**
58
+ * Recursively resolve and inline all `import 'path'` statements in a Markdown
59
+ * file. Each imported file's content replaces its import statement in the
60
+ * parent document.
61
+ *
62
+ * @param filePath Absolute path to the root Markdown file.
63
+ * @param depth Current recursion depth (used for cycle detection).
64
+ * @returns Fully expanded Markdown string.
65
+ */
66
+ async function parseMarkdownWithImports(filePath, depth = 0) {
67
+ if (depth > MAX_IMPORT_DEPTH) {
68
+ throw new Error(`Import depth exceeded ${MAX_IMPORT_DEPTH} levels at ${filePath}. ` +
69
+ 'Check for circular imports.');
70
+ }
71
+ let content;
72
+ try {
73
+ content = fs.readFileSync(filePath, 'utf8');
74
+ }
75
+ catch (err) {
76
+ throw new Error(`Cannot read Markdown file: ${filePath} — ${err.message}`);
77
+ }
78
+ const fileDir = path.dirname(filePath);
79
+ const matches = [];
80
+ let match;
81
+ // Reset lastIndex before each exec loop (regex is stateful with 'g' flag).
82
+ IMPORT_REGEX.lastIndex = 0;
83
+ while ((match = IMPORT_REGEX.exec(content)) !== null) {
84
+ const importPath = match[1];
85
+ if (importPath) {
86
+ matches.push({
87
+ statement: match[0],
88
+ resolvedPath: path.resolve(fileDir, importPath),
89
+ });
90
+ }
91
+ }
92
+ // Process imports sequentially to preserve insertion order.
93
+ for (const { statement, resolvedPath } of matches) {
94
+ try {
95
+ const importedContent = await parseMarkdownWithImports(resolvedPath, depth + 1);
96
+ content = content.replace(statement, importedContent);
97
+ }
98
+ catch (err) {
99
+ logger_js_1.logger.warn({ importPath: resolvedPath, parentFile: filePath, error: err.message }, 'Failed to resolve import — leaving placeholder in place');
100
+ }
101
+ }
102
+ return content;
103
+ }
104
+ /**
105
+ * Replace ${VARIABLE_NAME} placeholders in content with values from the
106
+ * provided variable map. Variables not found in the map are left unchanged so
107
+ * they remain visible in the output for debugging.
108
+ *
109
+ * @param content Markdown string (after import expansion).
110
+ * @param variables Key-value map of variable names to their replacement strings.
111
+ * @returns Content with placeholders substituted.
112
+ */
113
+ function replaceMDVariables(content, variables) {
114
+ let result = content;
115
+ for (const [key, value] of Object.entries(variables)) {
116
+ const regex = new RegExp(`\\$\\{${key}\\}`, 'g');
117
+ result = result.replace(regex, value);
118
+ }
119
+ return result;
120
+ }
121
+ /**
122
+ * High-level entry point: expand imports then substitute variables.
123
+ *
124
+ * @param filePath Absolute path to the root Markdown file.
125
+ * @param variables Optional variable substitution map (defaults to empty).
126
+ * @returns Final Prompt content ready for MCP registration.
127
+ */
128
+ async function generatePromptContent(filePath, variables = {}) {
129
+ const expanded = await parseMarkdownWithImports(filePath);
130
+ return replaceMDVariables(expanded, variables);
131
+ }
132
+ /**
133
+ * Generate Prompt content from a raw Markdown string (no file I/O).
134
+ * Used when the resource content has already been downloaded from the API.
135
+ *
136
+ * @param rawContent Raw Markdown string.
137
+ * @param basePath Absolute directory used to resolve relative `import` paths.
138
+ * @param variables Optional variable substitution map.
139
+ * @returns Final Prompt content.
140
+ */
141
+ async function generatePromptContentFromString(rawContent, basePath, variables = {}) {
142
+ // Write to a temp file so parseMarkdownWithImports can resolve relative imports.
143
+ const tmpPath = path.join(basePath, `.tmp-prompt-${Date.now()}-${process.pid}.md`);
144
+ let result;
145
+ try {
146
+ fs.mkdirSync(basePath, { recursive: true });
147
+ fs.writeFileSync(tmpPath, rawContent, 'utf8');
148
+ result = await parseMarkdownWithImports(tmpPath);
149
+ }
150
+ finally {
151
+ try {
152
+ fs.unlinkSync(tmpPath);
153
+ }
154
+ catch { /* best-effort cleanup */ }
155
+ }
156
+ return replaceMDVariables(result, variables);
157
+ }
158
+ //# sourceMappingURL=generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../src/prompts/generator.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBH,4DAgDC;AAWD,gDAUC;AASD,sDAMC;AAWD,0EAgBC;AAlID,uCAAyB;AACzB,2CAA6B;AAC7B,kDAA4C;AAE5C,oEAAoE;AACpE,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAE5B,yDAAyD;AACzD,MAAM,YAAY,GAAG,kCAAkC,CAAC;AAExD;;;;;;;;GAQG;AACI,KAAK,UAAU,wBAAwB,CAC5C,QAAgB,EAChB,KAAK,GAAG,CAAC;IAET,IAAI,KAAK,GAAG,gBAAgB,EAAE,CAAC;QAC7B,MAAM,IAAI,KAAK,CACb,yBAAyB,gBAAgB,cAAc,QAAQ,IAAI;YACnE,6BAA6B,CAC9B,CAAC;IACJ,CAAC;IAED,IAAI,OAAe,CAAC;IACpB,IAAI,CAAC;QACH,OAAO,GAAG,EAAE,CAAC,Y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,MAAM,CAAC,CAAC,yBAAyB,CAAC,CAAC;IACrE,CAAC;IACD,OAAO,kBAAkB,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAC/C,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * prompts module — public API
3
+ *
4
+ * Exports:
5
+ * - PromptGenerator utilities (parseMarkdownWithImports, replaceMDVariables,
6
+ * generatePromptContent, generatePromptContentFromString)
7
+ * - PromptCache class and the shared singleton `promptCache`
8
+ * - PromptManager class and the shared singleton `promptManager`
9
+ */
10
+ export { parseMarkdownWithImports, replaceMDVariables, generatePromptContent, generatePromptContentFromString, } from './generator.js';
11
+ export { PromptCache, promptCache } from './cache.js';
12
+ export { PromptManager, promptManager } from './manager.js';
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,qBAAqB,EACrB,+BAA+B,GAChC,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ /**
3
+ * prompts module — public API
4
+ *
5
+ * Exports:
6
+ * - PromptGenerator utilities (parseMarkdownWithImports, replaceMDVariables,
7
+ * generatePromptContent, generatePromptContentFromString)
8
+ * - PromptCache class and the shared singleton `promptCache`
9
+ * - PromptManager class and the shared singleton `promptManager`
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.promptManager = exports.PromptManager = exports.promptCache = exports.PromptCache = exports.generatePromptContentFromString = exports.generatePromptContent = exports.replaceMDVariables = exports.parseMarkdownWithImports = void 0;
13
+ var generator_js_1 = require("./generator.js");
14
+ Object.defineProperty(exports, "parseMarkdownWithImports", { enumerable: true, get: function () { return generator_js_1.parseMarkdownWithImports; } });
15
+ Object.defineProperty(exports, "replaceMDVariables", { enumerable: true, get: function () { return generator_js_1.replaceMDVariables; } });
16
+ Object.defineProperty(exports, "generatePromptContent", { enumerable: true, get: function () { return generator_js_1.generatePromptContent; } });
17
+ Object.defineProperty(exports, "generatePromptContentFromString", { enumerable: true, get: function () { return generator_js_1.generatePromptContentFromString; } });
18
+ var cache_js_1 = require("./cache.js");
19
+ Object.defineProperty(exports, "PromptCache", { enumerable: true, get: function () { return cache_js_1.PromptCache; } });
20
+ Object.defineProperty(exports, "promptCache", { enumerable: true, get: function () { return cache_js_1.promptCache; } });
21
+ var manager_js_1 = require("./manager.js");
22
+ Object.defineProperty(exports, "PromptManager", { enumerable: true, get: function () { return manager_js_1.PromptManager; } });
23
+ Object.defineProperty(exports, "promptManager", { enumerable: true, get: function () { return manager_js_1.promptManager; } });
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAEH,+CAKwB;AAJtB,wHAAA,wBAAwB,OAAA;AACxB,kHAAA,kBAAkB,OAAA;AAClB,qHAAA,qBAAqB,OAAA;AACrB,+HAAA,+BAA+B,OAAA;AAGjC,uCAAsD;AAA7C,uGAAA,WAAW,OAAA;AAAE,uGAAA,WAAW,OAAA;AAEjC,2CAA4D;AAAnD,2GAAA,aAAa,OAAA;AAAE,2GAAA,aAAa,OAAA"}
@@ -0,0 +1,106 @@
1
+ /**
2
+ * PromptManager: manages the lifecycle of MCP Prompts for Command and Skill resources.
3
+ *
4
+ * Design decisions:
5
+ * - Uses the low-level MCP SDK `Server` class (same as the rest of this project)
6
+ * via `setRequestHandler` for `ListPromptsRequestSchema` and `GetPromptRequestSchema`.
7
+ * - Maintains an in-memory registry of registered prompts so list/get handlers
8
+ * can be served without touching the disk on every request.
9
+ * - Prompt content is read from the `.prompt-cache/` directory written by
10
+ * PromptGenerator. If the cache file is missing, a fallback message is returned.
11
+ * - `jira_id` is an optional Prompt argument; when provided it is forwarded to
12
+ * TelemetryManager so usage can be correlated with a Jira issue.
13
+ *
14
+ * Prompt naming convention: `{type}/{team}/{resource-name}`
15
+ * e.g. command/client-sdk/generate-testcase
16
+ * skill/client-sdk/analyze-sdk-log
17
+ */
18
+ import type { Server } from '@modelcontextprotocol/sdk/server/index.js';
19
+ export interface PromptResourceMeta {
20
+ /** Canonical resource ID from the CSP platform (e.g. "cmd-client-sdk-001"). */
21
+ resource_id: string;
22
+ /** 'command' | 'skill' */
23
+ resource_type: 'command' | 'skill';
24
+ /** Human-readable resource name. */
25
+ resource_name: string;
26
+ /** Team that owns the resource. */
27
+ team: string;
28
+ /** Description shown in the Cursor slash command menu. */
29
+ description: string;
30
+ /** Raw Markdown content of the resource (from API download). */
31
+ rawContent: string;
32
+ }
33
+ export declare class PromptManager {
34
+ /** In-memory store: prompt name → prompt metadata. */
35
+ private readonly prompts;
36
+ /**
37
+ * Tracks which Server instances already have handlers installed.
38
+ * Each SSE connection creates a new Server instance, so we track per-instance
39
+ * rather than using a global boolean flag (which would skip registration on
40
+ * subsequent connections and cause "Method not found" errors).
41
+ */
42
+ private readonly installedServers;
43
+ /**
44
+ * Build the MCP Prompt name for a resource.
45
+ * Format: `{type}/{resource-name}`
46
+ *
47
+ * We deliberately omit the team segment: Cursor prepends the MCP server name
48
+ * already (e.g. "user-csp-ai-agent/"), so adding team would create an
49
+ * unnecessarily deep slash path in the UI. type + name is sufficient to be
50
+ * unique across commands and skills on this server.
51
+ */
52
+ buildPromptName(meta: Pick<PromptResourceMeta, 'resource_type' | 'resource_name'>): string;
53
+ /**
54
+ * Install `ListPrompts` and `GetPrompt` request handlers on the given MCP
55
+ * `Server` instance. Must be called once after the server is created, before
56
+ * `server.connect()`.
57
+ *
58
+ * @param server The MCP Server instance for this SSE connection.
59
+ * @param userToken The authenticated token for this connection's user.
60
+ * Used to attribute telemetry invocations to the correct user.
61
+ *
62
+ * Calling this a second time with the same server is a no-op.
63
+ */
64
+ installHandlers(server: Server, userToken?: string): void;
65
+ /**
66
+ * Register (or refresh) a single resource as an MCP Prompt.
67
+ * Generates the intermediate cache file and adds the prompt to the registry.
68
+ * Safe to call for an already-registered prompt — it will update the entry.
69
+ */
70
+ /**
71
+ * Build the telemetry header that is prepended to every Command/Skill prompt.
72
+ *
73
+ * When the AI receives this prompt it must call `track_usage` first so that
74
+ * the server records the invocation even though Cursor's slash command menu
75
+ * does not trigger `prompts/get`. The header is deliberately short and
76
+ * authoritative so the AI does not skip it.
77
+ */
78
+ private buildTrackingHeader;
79
+ registerPrompt(meta: PromptResourceMeta): Promise<void>;
80
+ /**
81
+ * Unregister a prompt and delete its cache file.
82
+ * @param resourceId The canonical resource ID.
83
+ * @param resourceType 'command' | 'skill'
84
+ * @param resourceName Resource name (used to reconstruct the prompt name).
85
+ */
86
+ unregisterPrompt(resourceId: string, resourceType: 'command' | 'skill', resourceName: string): void;
87
+ /**
88
+ * Refresh a prompt's cached content and description.
89
+ * Equivalent to calling registerPrompt() again.
90
+ */
91
+ refreshPrompt(meta: PromptResourceMeta): Promise<void>;
92
+ /**
93
+ * Re-register all provided resources as MCP Prompts.
94
+ * Existing prompts NOT in the list are NOT removed (use unregisterPrompt for that).
95
+ */
96
+ refreshAllPrompts(resources: PromptResourceMeta[]): Promise<void>;
97
+ /** Return the number of currently registered prompts. */
98
+ get size(): number;
99
+ /** Check if a prompt with the given name is currently registered. */
100
+ has(promptName: string): boolean;
101
+ /** Return a snapshot of all registered prompt names. */
102
+ promptNames(): string[];
103
+ }
104
+ /** Singleton PromptManager shared across the server process. */
105
+ export declare const promptManager: PromptManager;
106
+ //# sourceMappingURL=manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../src/prompts/manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgB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