faf-mcp 1.0.0

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 (207) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/CLAUDE.md +73 -0
  3. package/LICENSE +22 -0
  4. package/README.md +165 -0
  5. package/assets/Project-faf-pckg-json-README.png +0 -0
  6. package/assets/icons/faf-icon-128.png +0 -0
  7. package/assets/icons/faf-icon-256.png +0 -0
  8. package/assets/icons/faf-icon-48.png +0 -0
  9. package/assets/icons/faf-icon-512.png +0 -0
  10. package/assets/icons/orange-smiley.svg +6 -0
  11. package/dist/src/compiler/index.d.ts +7 -0
  12. package/dist/src/compiler/index.js +24 -0
  13. package/dist/src/compiler/index.js.map +1 -0
  14. package/dist/src/compiler/scorer.d.ts +53 -0
  15. package/dist/src/compiler/scorer.js +189 -0
  16. package/dist/src/compiler/scorer.js.map +1 -0
  17. package/dist/src/compiler/slot-validator.d.ts +32 -0
  18. package/dist/src/compiler/slot-validator.js +293 -0
  19. package/dist/src/compiler/slot-validator.js.map +1 -0
  20. package/dist/src/compiler/type-detector.d.ts +62 -0
  21. package/dist/src/compiler/type-detector.js +388 -0
  22. package/dist/src/compiler/type-detector.js.map +1 -0
  23. package/dist/src/config/visibility.d.ts +41 -0
  24. package/dist/src/config/visibility.js +158 -0
  25. package/dist/src/config/visibility.js.map +1 -0
  26. package/dist/src/faf-core/commands/audit.d.ts +21 -0
  27. package/dist/src/faf-core/commands/audit.js +83 -0
  28. package/dist/src/faf-core/commands/audit.js.map +1 -0
  29. package/dist/src/faf-core/commands/auto.d.ts +25 -0
  30. package/dist/src/faf-core/commands/auto.js +74 -0
  31. package/dist/src/faf-core/commands/auto.js.map +1 -0
  32. package/dist/src/faf-core/commands/bi-sync.d.ts +26 -0
  33. package/dist/src/faf-core/commands/bi-sync.js +157 -0
  34. package/dist/src/faf-core/commands/bi-sync.js.map +1 -0
  35. package/dist/src/faf-core/commands/doctor.d.ts +17 -0
  36. package/dist/src/faf-core/commands/doctor.js +198 -0
  37. package/dist/src/faf-core/commands/doctor.js.map +1 -0
  38. package/dist/src/faf-core/commands/enhance.d.ts +46 -0
  39. package/dist/src/faf-core/commands/enhance.js +360 -0
  40. package/dist/src/faf-core/commands/enhance.js.map +1 -0
  41. package/dist/src/faf-core/commands/formats.d.ts +22 -0
  42. package/dist/src/faf-core/commands/formats.js +117 -0
  43. package/dist/src/faf-core/commands/formats.js.map +1 -0
  44. package/dist/src/faf-core/commands/init.d.ts +26 -0
  45. package/dist/src/faf-core/commands/init.js +114 -0
  46. package/dist/src/faf-core/commands/init.js.map +1 -0
  47. package/dist/src/faf-core/commands/innit.d.ts +7 -0
  48. package/dist/src/faf-core/commands/innit.js +13 -0
  49. package/dist/src/faf-core/commands/innit.js.map +1 -0
  50. package/dist/src/faf-core/commands/migrate.d.ts +15 -0
  51. package/dist/src/faf-core/commands/migrate.js +86 -0
  52. package/dist/src/faf-core/commands/migrate.js.map +1 -0
  53. package/dist/src/faf-core/commands/quick.d.ts +16 -0
  54. package/dist/src/faf-core/commands/quick.js +184 -0
  55. package/dist/src/faf-core/commands/quick.js.map +1 -0
  56. package/dist/src/faf-core/commands/score.d.ts +47 -0
  57. package/dist/src/faf-core/commands/score.js +49 -0
  58. package/dist/src/faf-core/commands/score.js.map +1 -0
  59. package/dist/src/faf-core/commands/sync.d.ts +16 -0
  60. package/dist/src/faf-core/commands/sync.js +210 -0
  61. package/dist/src/faf-core/commands/sync.js.map +1 -0
  62. package/dist/src/faf-core/commands/update.d.ts +12 -0
  63. package/dist/src/faf-core/commands/update.js +46 -0
  64. package/dist/src/faf-core/commands/update.js.map +1 -0
  65. package/dist/src/faf-core/commands/validate.d.ts +21 -0
  66. package/dist/src/faf-core/commands/validate.js +81 -0
  67. package/dist/src/faf-core/commands/validate.js.map +1 -0
  68. package/dist/src/faf-core/compiler/faf-compiler.d.ts +138 -0
  69. package/dist/src/faf-core/compiler/faf-compiler.js +794 -0
  70. package/dist/src/faf-core/compiler/faf-compiler.js.map +1 -0
  71. package/dist/src/faf-core/engines/dependency-tsa.d.ts +88 -0
  72. package/dist/src/faf-core/engines/dependency-tsa.js +361 -0
  73. package/dist/src/faf-core/engines/dependency-tsa.js.map +1 -0
  74. package/dist/src/faf-core/engines/fab-formats-processor.d.ts +166 -0
  75. package/dist/src/faf-core/engines/fab-formats-processor.js +1274 -0
  76. package/dist/src/faf-core/engines/fab-formats-processor.js.map +1 -0
  77. package/dist/src/faf-core/engines/faf-dna.d.ts +159 -0
  78. package/dist/src/faf-core/engines/faf-dna.js +554 -0
  79. package/dist/src/faf-core/engines/faf-dna.js.map +1 -0
  80. package/dist/src/faf-core/engines/relentless-context-extractor.d.ts +100 -0
  81. package/dist/src/faf-core/engines/relentless-context-extractor.js +625 -0
  82. package/dist/src/faf-core/engines/relentless-context-extractor.js.map +1 -0
  83. package/dist/src/faf-core/fix-once/colors.d.ts +104 -0
  84. package/dist/src/faf-core/fix-once/colors.js +236 -0
  85. package/dist/src/faf-core/fix-once/colors.js.map +1 -0
  86. package/dist/src/faf-core/fix-once/types.d.ts +257 -0
  87. package/dist/src/faf-core/fix-once/types.js +26 -0
  88. package/dist/src/faf-core/fix-once/types.js.map +1 -0
  89. package/dist/src/faf-core/fix-once/yaml.d.ts +57 -0
  90. package/dist/src/faf-core/fix-once/yaml.js +172 -0
  91. package/dist/src/faf-core/fix-once/yaml.js.map +1 -0
  92. package/dist/src/faf-core/generators/faf-generator-championship.d.ts +16 -0
  93. package/dist/src/faf-core/generators/faf-generator-championship.js +462 -0
  94. package/dist/src/faf-core/generators/faf-generator-championship.js.map +1 -0
  95. package/dist/src/faf-core/utils/balance-visualizer.d.ts +37 -0
  96. package/dist/src/faf-core/utils/balance-visualizer.js +197 -0
  97. package/dist/src/faf-core/utils/balance-visualizer.js.map +1 -0
  98. package/dist/src/faf-core/utils/championship-style.d.ts +109 -0
  99. package/dist/src/faf-core/utils/championship-style.js +219 -0
  100. package/dist/src/faf-core/utils/championship-style.js.map +1 -0
  101. package/dist/src/faf-core/utils/chrome-extension-detector.d.ts +73 -0
  102. package/dist/src/faf-core/utils/chrome-extension-detector.js +268 -0
  103. package/dist/src/faf-core/utils/chrome-extension-detector.js.map +1 -0
  104. package/dist/src/faf-core/utils/fafignore-parser.d.ts +20 -0
  105. package/dist/src/faf-core/utils/fafignore-parser.js +178 -0
  106. package/dist/src/faf-core/utils/fafignore-parser.js.map +1 -0
  107. package/dist/src/faf-core/utils/file-utils.d.ts +112 -0
  108. package/dist/src/faf-core/utils/file-utils.js +846 -0
  109. package/dist/src/faf-core/utils/file-utils.js.map +1 -0
  110. package/dist/src/faf-core/utils/native-file-finder.d.ts +115 -0
  111. package/dist/src/faf-core/utils/native-file-finder.js +211 -0
  112. package/dist/src/faf-core/utils/native-file-finder.js.map +1 -0
  113. package/dist/src/faf-core/utils/platform-detector.d.ts +30 -0
  114. package/dist/src/faf-core/utils/platform-detector.js +218 -0
  115. package/dist/src/faf-core/utils/platform-detector.js.map +1 -0
  116. package/dist/src/faf-core/utils/technical-credit.d.ts +35 -0
  117. package/dist/src/faf-core/utils/technical-credit.js +286 -0
  118. package/dist/src/faf-core/utils/technical-credit.js.map +1 -0
  119. package/dist/src/faf-core/utils/yaml-generator.d.ts +41 -0
  120. package/dist/src/faf-core/utils/yaml-generator.js +360 -0
  121. package/dist/src/faf-core/utils/yaml-generator.js.map +1 -0
  122. package/dist/src/handlers/behavioral-instruction.d.ts +16 -0
  123. package/dist/src/handlers/behavioral-instruction.js +43 -0
  124. package/dist/src/handlers/behavioral-instruction.js.map +1 -0
  125. package/dist/src/handlers/championship-tools.d.ts +113 -0
  126. package/dist/src/handlers/championship-tools.js +2602 -0
  127. package/dist/src/handlers/championship-tools.js.map +1 -0
  128. package/dist/src/handlers/engine-adapter.d.ts +28 -0
  129. package/dist/src/handlers/engine-adapter.js +603 -0
  130. package/dist/src/handlers/engine-adapter.js.map +1 -0
  131. package/dist/src/handlers/fileHandler.d.ts +36 -0
  132. package/dist/src/handlers/fileHandler.js +246 -0
  133. package/dist/src/handlers/fileHandler.js.map +1 -0
  134. package/dist/src/handlers/resources.d.ts +18 -0
  135. package/dist/src/handlers/resources.js +78 -0
  136. package/dist/src/handlers/resources.js.map +1 -0
  137. package/dist/src/handlers/tool-registry.d.ts +23 -0
  138. package/dist/src/handlers/tool-registry.js +68 -0
  139. package/dist/src/handlers/tool-registry.js.map +1 -0
  140. package/dist/src/handlers/tool-types.d.ts +167 -0
  141. package/dist/src/handlers/tool-types.js +7 -0
  142. package/dist/src/handlers/tool-types.js.map +1 -0
  143. package/dist/src/handlers/tools.d.ts +25 -0
  144. package/dist/src/handlers/tools.js +1168 -0
  145. package/dist/src/handlers/tools.js.map +1 -0
  146. package/dist/src/index.d.ts +2 -0
  147. package/dist/src/index.js +17 -0
  148. package/dist/src/index.js.map +1 -0
  149. package/dist/src/server.d.ts +28 -0
  150. package/dist/src/server.js +179 -0
  151. package/dist/src/server.js.map +1 -0
  152. package/dist/src/test-all-functions.d.ts +15 -0
  153. package/dist/src/test-all-functions.js +163 -0
  154. package/dist/src/test-all-functions.js.map +1 -0
  155. package/dist/src/types/mcp-tools.d.ts +53 -0
  156. package/dist/src/types/mcp-tools.js +77 -0
  157. package/dist/src/types/mcp-tools.js.map +1 -0
  158. package/dist/src/types/project-types.d.ts +22 -0
  159. package/dist/src/types/project-types.js +85 -0
  160. package/dist/src/types/project-types.js.map +1 -0
  161. package/dist/src/types/slots.d.ts +39 -0
  162. package/dist/src/types/slots.js +162 -0
  163. package/dist/src/types/slots.js.map +1 -0
  164. package/dist/src/types/tool-visibility.d.ts +36 -0
  165. package/dist/src/types/tool-visibility.js +510 -0
  166. package/dist/src/types/tool-visibility.js.map +1 -0
  167. package/dist/src/utils/auto-path-detection.d.ts +26 -0
  168. package/dist/src/utils/auto-path-detection.js +198 -0
  169. package/dist/src/utils/auto-path-detection.js.map +1 -0
  170. package/dist/src/utils/championship-format.d.ts +30 -0
  171. package/dist/src/utils/championship-format.js +79 -0
  172. package/dist/src/utils/championship-format.js.map +1 -0
  173. package/dist/src/utils/cli-detector.d.ts +20 -0
  174. package/dist/src/utils/cli-detector.js +230 -0
  175. package/dist/src/utils/cli-detector.js.map +1 -0
  176. package/dist/src/utils/display-protocol.d.ts +57 -0
  177. package/dist/src/utils/display-protocol.js +131 -0
  178. package/dist/src/utils/display-protocol.js.map +1 -0
  179. package/dist/src/utils/faf-file-finder.d.ts +59 -0
  180. package/dist/src/utils/faf-file-finder.js +139 -0
  181. package/dist/src/utils/faf-file-finder.js.map +1 -0
  182. package/dist/src/utils/fuzzy-detector.d.ts +56 -0
  183. package/dist/src/utils/fuzzy-detector.js +221 -0
  184. package/dist/src/utils/fuzzy-detector.js.map +1 -0
  185. package/dist/src/utils/path-resolver.d.ts +51 -0
  186. package/dist/src/utils/path-resolver.js +214 -0
  187. package/dist/src/utils/path-resolver.js.map +1 -0
  188. package/dist/src/utils/type-guards.d.ts +9 -0
  189. package/dist/src/utils/type-guards.js +27 -0
  190. package/dist/src/utils/type-guards.js.map +1 -0
  191. package/dist/src/utils/username-detector.d.ts +27 -0
  192. package/dist/src/utils/username-detector.js +90 -0
  193. package/dist/src/utils/username-detector.js.map +1 -0
  194. package/dist/src/utils/visual-style.d.ts +62 -0
  195. package/dist/src/utils/visual-style.js +164 -0
  196. package/dist/src/utils/visual-style.js.map +1 -0
  197. package/dist/src/version.d.ts +9 -0
  198. package/dist/src/version.js +37 -0
  199. package/dist/src/version.js.map +1 -0
  200. package/package.json +114 -0
  201. package/scripts/discord-sync-curated.js +233 -0
  202. package/scripts/discord-sync-final.js +218 -0
  203. package/scripts/discord-sync-simple.js +175 -0
  204. package/scripts/discord-sync-working.js +187 -0
  205. package/scripts/discord-sync.js +181 -0
  206. package/scripts/postinstall.js +46 -0
  207. package/skill/SKILL.md +385 -0
@@ -0,0 +1,214 @@
1
+ "use strict";
2
+ /**
3
+ * ๐ŸŽฏ Projects Convention Path Resolver
4
+ *
5
+ * Default: ~/Projects/[project-name]/project.faf
6
+ *
7
+ * Project name inference order:
8
+ * 1. User explicit path (always wins)
9
+ * 2. User project name statement
10
+ * 3. AI inference from README, files, conversation context
11
+ * 4. Fallback to 'unnamed-project'
12
+ */
13
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ var desc = Object.getOwnPropertyDescriptor(m, k);
16
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
+ desc = { enumerable: true, get: function() { return m[k]; } };
18
+ }
19
+ Object.defineProperty(o, k2, desc);
20
+ }) : (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ o[k2] = m[k];
23
+ }));
24
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
26
+ }) : function(o, v) {
27
+ o["default"] = v;
28
+ });
29
+ var __importStar = (this && this.__importStar) || (function () {
30
+ var ownKeys = function(o) {
31
+ ownKeys = Object.getOwnPropertyNames || function (o) {
32
+ var ar = [];
33
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
34
+ return ar;
35
+ };
36
+ return ownKeys(o);
37
+ };
38
+ return function (mod) {
39
+ if (mod && mod.__esModule) return mod;
40
+ var result = {};
41
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
42
+ __setModuleDefault(result, mod);
43
+ return result;
44
+ };
45
+ })();
46
+ Object.defineProperty(exports, "__esModule", { value: true });
47
+ exports.getHomeDirectory = getHomeDirectory;
48
+ exports.getProjectsDirectory = getProjectsDirectory;
49
+ exports.resolveProjectPath = resolveProjectPath;
50
+ exports.ensureProjectsDirectory = ensureProjectsDirectory;
51
+ exports.isRealFilesystemPath = isRealFilesystemPath;
52
+ exports.formatPathConfirmation = formatPathConfirmation;
53
+ const path = __importStar(require("path"));
54
+ const os = __importStar(require("os"));
55
+ const fs = __importStar(require("fs"));
56
+ /**
57
+ * Slugify project name for filesystem
58
+ */
59
+ function slugify(name) {
60
+ return name
61
+ .toLowerCase()
62
+ .replace(/[^\w\s-]/g, '') // Remove emojis/special chars
63
+ .trim()
64
+ .replace(/\s+/g, '-')
65
+ .replace(/-+/g, '-'); // Collapse multiple dashes
66
+ }
67
+ /**
68
+ * Infer project name from context
69
+ */
70
+ function inferFromContext(context) {
71
+ if (!context)
72
+ return null;
73
+ // Try README title
74
+ if (context.readme) {
75
+ const titleMatch = context.readme.match(/^#\s+(.+)/m);
76
+ if (titleMatch) {
77
+ return slugify(titleMatch[1]);
78
+ }
79
+ }
80
+ // Try explicit project name
81
+ if (context.projectName) {
82
+ return slugify(context.projectName);
83
+ }
84
+ // Try uploaded files (package.json name, etc.)
85
+ if (context.uploadedFiles && context.uploadedFiles.length > 0) {
86
+ for (const file of context.uploadedFiles) {
87
+ try {
88
+ const basename = path.basename(file);
89
+ // package.json
90
+ if (basename === 'package.json' && fs.existsSync(file)) {
91
+ const content = fs.readFileSync(file, 'utf8');
92
+ const pkg = JSON.parse(content);
93
+ if (pkg.name) {
94
+ // Handle scoped packages: @org/name โ†’ name
95
+ return slugify(pkg.name.replace(/^@[\w-]+\//, ''));
96
+ }
97
+ }
98
+ }
99
+ catch {
100
+ continue;
101
+ }
102
+ }
103
+ }
104
+ return null;
105
+ }
106
+ /**
107
+ * Get user's home directory cross-platform
108
+ */
109
+ function getHomeDirectory() {
110
+ return os.homedir();
111
+ }
112
+ /**
113
+ * Get default Projects directory
114
+ */
115
+ function getProjectsDirectory() {
116
+ const home = getHomeDirectory();
117
+ return path.join(home, 'Projects');
118
+ }
119
+ /**
120
+ * Resolve project path using Projects convention
121
+ *
122
+ * @param userInput - User-provided path or project name
123
+ * @param context - Context for AI inference (README, files, etc.)
124
+ * @returns Path resolution with project directory and .faf file path
125
+ */
126
+ function resolveProjectPath(userInput, context) {
127
+ // USER EXPLICIT PATH ALWAYS WINS
128
+ if (userInput && (userInput.includes('/') || userInput.includes('\\'))) {
129
+ const normalized = path.resolve(userInput);
130
+ const projectName = path.basename(normalized);
131
+ const fafFilePath = path.join(normalized, 'project.faf');
132
+ return {
133
+ projectPath: normalized,
134
+ fafFilePath,
135
+ projectName,
136
+ source: 'user-explicit'
137
+ };
138
+ }
139
+ // USER PROVIDED NAME (not path)
140
+ if (userInput) {
141
+ const projectName = slugify(userInput);
142
+ const projectPath = path.join(getProjectsDirectory(), projectName);
143
+ const fafFilePath = path.join(projectPath, 'project.faf');
144
+ return {
145
+ projectPath,
146
+ fafFilePath,
147
+ projectName,
148
+ source: 'user-name'
149
+ };
150
+ }
151
+ // AI INFERENCE FROM CONTEXT
152
+ const inferredName = inferFromContext(context);
153
+ if (inferredName) {
154
+ const projectPath = path.join(getProjectsDirectory(), inferredName);
155
+ const fafFilePath = path.join(projectPath, 'project.faf');
156
+ return {
157
+ projectPath,
158
+ fafFilePath,
159
+ projectName: inferredName,
160
+ source: 'ai-inference'
161
+ };
162
+ }
163
+ // FALLBACK
164
+ const projectName = 'unnamed-project';
165
+ const projectPath = path.join(getProjectsDirectory(), projectName);
166
+ const fafFilePath = path.join(projectPath, 'project.faf');
167
+ return {
168
+ projectPath,
169
+ fafFilePath,
170
+ projectName,
171
+ source: 'fallback'
172
+ };
173
+ }
174
+ /**
175
+ * Ensure Projects directory exists
176
+ */
177
+ function ensureProjectsDirectory() {
178
+ const projectsDir = getProjectsDirectory();
179
+ if (!fs.existsSync(projectsDir)) {
180
+ fs.mkdirSync(projectsDir, { recursive: true });
181
+ }
182
+ }
183
+ /**
184
+ * Validate that path is on real filesystem (not container)
185
+ */
186
+ function isRealFilesystemPath(inputPath) {
187
+ // Container paths to reject
188
+ const containerPaths = [
189
+ '/mnt/user-data/',
190
+ '/home/claude/',
191
+ '/tmp/uploads/'
192
+ ];
193
+ return !containerPaths.some(cp => inputPath.startsWith(cp));
194
+ }
195
+ /**
196
+ * Format confirmation message for user
197
+ */
198
+ function formatPathConfirmation(resolution) {
199
+ const sourceEmoji = {
200
+ 'user-explicit': 'โœ“',
201
+ 'user-name': 'โœ“',
202
+ 'ai-inference': '๐Ÿค–',
203
+ 'fallback': 'โš ๏ธ'
204
+ };
205
+ const emoji = sourceEmoji[resolution.source];
206
+ if (resolution.source === 'ai-inference') {
207
+ return `${emoji} Inferred project: "${resolution.projectName}"\nCreating at: ${resolution.projectPath}/`;
208
+ }
209
+ if (resolution.source === 'fallback') {
210
+ return `${emoji} Using fallback name: "${resolution.projectName}"\nCreating at: ${resolution.projectPath}/\n(Tip: Provide project name or upload README for auto-detection)`;
211
+ }
212
+ return `${emoji} Creating at: ${resolution.projectPath}/`;
213
+ }
214
+ //# sourceMappingURL=path-resolver.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"path-resolver.js","sourceRoot":"","sources":["../../../src/utils/path-resolver.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8EH,4CAEC;AAKD,oDAGC;AASD,gDAyDC;AAKD,0DAKC;AAKD,oDASC;AAKD,wDAmBC;AAxMD,2CAA6B;AAC7B,uCAAyB;AACzB,uCAAyB;AAgBzB;;GAEG;AACH,SAAS,OAAO,CAAC,IAAY;IAC3B,OAAO,IAAI;SACR,WAAW,EAAE;SACb,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,8BAA8B;SACvD,IAAI,EAAE;SACN,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;SACpB,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,2BAA2B;AACrD,CAAC;AAED;;GAEG;AACH,SAAS,gBAAgB,CAAC,OAAwB;IAChD,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAE1B,mBAAmB;IACnB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;QACnB,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAA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U,CAAC,WAAW,mBAAmB,UAAU,CAAC,WAAW,GAAG,CAAC;IAC3G,CAAC;IAED,IAAI,UAAU,CAAC,MAAM,KAAK,UAAU,EAAE,CAAC;QACrC,OAAO,GAAG,KAAK,0BAA0B,UAAU,CAAC,WAAW,mBAAmB,UAAU,CAAC,WAAW,oEAAoE,CAAC;IAC/K,CAAC;IAED,OAAO,GAAG,KAAK,iBAAiB,UAAU,CAAC,WAAW,GAAG,CAAC;AAC5D,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * ๐ŸŽ๏ธ Type Guards - Championship Type Safety
3
+ * Stage 2: strictNullChecks enabled
4
+ */
5
+ export declare function isError(value: unknown): value is Error;
6
+ export declare function isString(value: unknown): value is string;
7
+ export declare function isNumber(value: unknown): value is number;
8
+ export declare function isDefined<T>(value: T | undefined | null): value is T;
9
+ export declare function hasProperty<K extends string>(obj: unknown, key: K): obj is Record<K, unknown>;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ /**
3
+ * ๐ŸŽ๏ธ Type Guards - Championship Type Safety
4
+ * Stage 2: strictNullChecks enabled
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.isError = isError;
8
+ exports.isString = isString;
9
+ exports.isNumber = isNumber;
10
+ exports.isDefined = isDefined;
11
+ exports.hasProperty = hasProperty;
12
+ function isError(value) {
13
+ return value instanceof Error;
14
+ }
15
+ function isString(value) {
16
+ return typeof value === 'string';
17
+ }
18
+ function isNumber(value) {
19
+ return typeof value === 'number';
20
+ }
21
+ function isDefined(value) {
22
+ return value !== undefined && value !== null;
23
+ }
24
+ function hasProperty(obj, key) {
25
+ return typeof obj === 'object' && obj !== null && key in obj;
26
+ }
27
+ //# sourceMappingURL=type-guards.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type-guards.js","sourceRoot":"","sources":["../../../src/utils/type-guards.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAEH,0BAEC;AAED,4BAEC;AAED,4BAEC;AAED,8BAEC;AAED,kCAKC;AArBD,SAAgB,OAAO,CAAC,KAAc;IACpC,OAAO,KAAK,YAAY,KAAK,CAAC;AAChC,CAAC;AAED,SAAgB,QAAQ,CAAC,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;AACnC,CAAC;AAED,SAAgB,QAAQ,CAAC,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;AACnC,CAAC;AAED,SAAgB,SAAS,CAAI,KAA2B;IACtD,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC;AAC/C,CAAC;AAED,SAAgB,WAAW,CACzB,GAAY,EACZ,GAAM;IAEN,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,IAAI,GAAG,CAAC;AAC/D,CAAC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * ๐Ÿ” Username & Home Directory Detection
3
+ *
4
+ * Cross-platform detection of current user and home directory
5
+ * for Projects convention path resolution.
6
+ */
7
+ export interface UserInfo {
8
+ username: string;
9
+ homeDir: string;
10
+ platform: 'darwin' | 'linux' | 'win32' | 'unknown';
11
+ }
12
+ /**
13
+ * Detect current user information
14
+ */
15
+ export declare function detectUser(): UserInfo;
16
+ /**
17
+ * Get platform-specific home directory notation
18
+ */
19
+ export declare function getHomeDirNotation(): string;
20
+ /**
21
+ * Expand ~ to full home directory path
22
+ */
23
+ export declare function expandTilde(inputPath: string): string;
24
+ /**
25
+ * Contract full home directory path to ~
26
+ */
27
+ export declare function contractToTilde(fullPath: string): string;
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+ /**
3
+ * ๐Ÿ” Username & Home Directory Detection
4
+ *
5
+ * Cross-platform detection of current user and home directory
6
+ * for Projects convention path resolution.
7
+ */
8
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ var desc = Object.getOwnPropertyDescriptor(m, k);
11
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
+ desc = { enumerable: true, get: function() { return m[k]; } };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
15
+ }) : (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ o[k2] = m[k];
18
+ }));
19
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
20
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
21
+ }) : function(o, v) {
22
+ o["default"] = v;
23
+ });
24
+ var __importStar = (this && this.__importStar) || (function () {
25
+ var ownKeys = function(o) {
26
+ ownKeys = Object.getOwnPropertyNames || function (o) {
27
+ var ar = [];
28
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
+ return ar;
30
+ };
31
+ return ownKeys(o);
32
+ };
33
+ return function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ })();
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ exports.detectUser = detectUser;
43
+ exports.getHomeDirNotation = getHomeDirNotation;
44
+ exports.expandTilde = expandTilde;
45
+ exports.contractToTilde = contractToTilde;
46
+ const os = __importStar(require("os"));
47
+ /**
48
+ * Detect current user information
49
+ */
50
+ function detectUser() {
51
+ const userInfo = os.userInfo();
52
+ const platform = os.platform();
53
+ return {
54
+ username: userInfo.username,
55
+ homeDir: os.homedir(),
56
+ platform: platform === 'darwin' ? 'darwin' :
57
+ platform === 'linux' ? 'linux' :
58
+ platform === 'win32' ? 'win32' : 'unknown'
59
+ };
60
+ }
61
+ /**
62
+ * Get platform-specific home directory notation
63
+ */
64
+ function getHomeDirNotation() {
65
+ const platform = os.platform();
66
+ if (platform === 'win32') {
67
+ return process.env.USERPROFILE || os.homedir();
68
+ }
69
+ return '~'; // Unix-like systems
70
+ }
71
+ /**
72
+ * Expand ~ to full home directory path
73
+ */
74
+ function expandTilde(inputPath) {
75
+ if (inputPath.startsWith('~')) {
76
+ return inputPath.replace('~', os.homedir());
77
+ }
78
+ return inputPath;
79
+ }
80
+ /**
81
+ * Contract full home directory path to ~
82
+ */
83
+ function contractToTilde(fullPath) {
84
+ const homeDir = os.homedir();
85
+ if (fullPath.startsWith(homeDir)) {
86
+ return fullPath.replace(homeDir, '~');
87
+ }
88
+ return fullPath;
89
+ }
90
+ //# sourceMappingURL=username-detector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"username-detector.js","sourceRoot":"","sources":["../../../src/utils/username-detector.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaH,gCAWC;AAKD,gDAQC;AAKD,kCAKC;AAKD,0CAMC;AAxDD,uCAAyB;AAQzB;;GAEG;AACH,SAAgB,UAAU;IACxB,MAAM,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;IAC/B,MAAM,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;IAE/B,OAAO;QACL,QAAQ,EAAE,QAAQ,CAAC,QAAQ;QAC3B,OAAO,EAAE,EAAE,CAAC,OAAO,EAAE;QACrB,QAAQ,EAAE,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;YACnC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;gBAChC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS;KACpD,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAgB,kBAAkB;IAChC,MAAM,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;IAE/B,IAAI,QAAQ,KAAK,OAAO,EAAE,CAAC;QACzB,OAAO,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;IACjD,CAAC;IAED,OAAO,GAAG,CAAC,CAAC,oBAAoB;AAClC,CAAC;AAED;;GAEG;AACH,SAAgB,WAAW,CAAC,SAAiB;IAC3C,IAAI,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QAC9B,OAAO,SAAS,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;IAC9C,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;GAEG;AACH,SAAgB,eAAe,CAAC,QAAgB;IAC9C,MAAM,OAAO,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;IAC7B,IAAI,QAAQ,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QACjC,OAAO,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;IACxC,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * ๐Ÿงก๐Ÿฉต BIG ORANGE + CYAN Visual Style for FAF MCP
3
+ * 3 Lines, 3 Words, 1 Emoji with Bar
4
+ * Orange emojis with cyan text for championship look!
5
+ */
6
+ export interface DisplayStyle {
7
+ line1: string;
8
+ line2: string;
9
+ line3: string;
10
+ }
11
+ /**
12
+ * Create an orange-themed progress bar
13
+ * Uses orange blocks for filled, gray for empty
14
+ */
15
+ export declare function createProgressBar(percentage: number, width?: number): string;
16
+ /**
17
+ * Alternative ASCII bar when emojis aren't suitable
18
+ */
19
+ export declare function createASCIIBar(percentage: number, width?: number): string;
20
+ /**
21
+ * Get championship medal emoji and status based on score
22
+ */
23
+ export declare function getScoreMedal(score: number): {
24
+ medal: string;
25
+ status: string;
26
+ };
27
+ /**
28
+ * Format score display with Championship Medal System
29
+ */
30
+ export declare function formatScore(score: number): DisplayStyle;
31
+ /**
32
+ * Format file operations with style
33
+ */
34
+ export declare function formatFileOp(operation: string, count: number, total?: number): DisplayStyle;
35
+ /**
36
+ * Format sync operations
37
+ */
38
+ export declare function formatSync(synced: number, total: number): DisplayStyle;
39
+ /**
40
+ * Format directory tree with orange accents
41
+ */
42
+ export declare function formatTree(tree: string): string;
43
+ /**
44
+ * Format project detection
45
+ */
46
+ export declare function formatDetection(projectType: string, confidence: number): DisplayStyle;
47
+ /**
48
+ * Format generic success message
49
+ */
50
+ export declare function formatSuccess(action: string, detail?: string): DisplayStyle;
51
+ /**
52
+ * Format error message (still styled but clear)
53
+ */
54
+ export declare function formatError(action: string, error: string): DisplayStyle;
55
+ /**
56
+ * The main formatter - always returns 3 lines
57
+ */
58
+ export declare function format3Lines(style: DisplayStyle): string;
59
+ /**
60
+ * Special Big Orange celebration for perfect scores
61
+ */
62
+ export declare function formatBigOrange(): DisplayStyle;
@@ -0,0 +1,164 @@
1
+ "use strict";
2
+ /**
3
+ * ๐Ÿงก๐Ÿฉต BIG ORANGE + CYAN Visual Style for FAF MCP
4
+ * 3 Lines, 3 Words, 1 Emoji with Bar
5
+ * Orange emojis with cyan text for championship look!
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.createProgressBar = createProgressBar;
9
+ exports.createASCIIBar = createASCIIBar;
10
+ exports.getScoreMedal = getScoreMedal;
11
+ exports.formatScore = formatScore;
12
+ exports.formatFileOp = formatFileOp;
13
+ exports.formatSync = formatSync;
14
+ exports.formatTree = formatTree;
15
+ exports.formatDetection = formatDetection;
16
+ exports.formatSuccess = formatSuccess;
17
+ exports.formatError = formatError;
18
+ exports.format3Lines = format3Lines;
19
+ exports.formatBigOrange = formatBigOrange;
20
+ // ANSI color codes for terminal output
21
+ const CYAN = '\x1b[36m';
22
+ const BRIGHT_CYAN = '\x1b[96m';
23
+ const ORANGE = '\x1b[38;5;208m'; // Terminal orange approximation
24
+ const RESET = '\x1b[0m';
25
+ const BOLD = '\x1b[1m';
26
+ /**
27
+ * Create an orange-themed progress bar
28
+ * Uses orange blocks for filled, gray for empty
29
+ */
30
+ function createProgressBar(percentage, width = 24) {
31
+ const filled = Math.round((percentage / 100) * width);
32
+ const empty = width - filled;
33
+ // Orange blocks for progress (using standard blocks since terminal orange is limited)
34
+ // In Claude Desktop, we use the emoji for orange feel
35
+ const bar = '๐ŸŸง'.repeat(filled) + 'โฌœ'.repeat(empty);
36
+ return `${bar} ${percentage}%`;
37
+ }
38
+ /**
39
+ * Alternative ASCII bar when emojis aren't suitable
40
+ */
41
+ function createASCIIBar(percentage, width = 24) {
42
+ const filled = Math.round((percentage / 100) * width);
43
+ const empty = width - filled;
44
+ const bar = 'โ–ˆ'.repeat(filled) + 'โ–‘'.repeat(empty);
45
+ return `${bar} ${percentage}%`;
46
+ }
47
+ /**
48
+ * Get championship medal emoji and status based on score
49
+ */
50
+ function getScoreMedal(score) {
51
+ if (score >= 100)
52
+ return { medal: '๐Ÿ†', status: 'Trophy - Championship' };
53
+ if (score >= 99)
54
+ return { medal: '๐Ÿฅ‡', status: 'Gold' };
55
+ if (score >= 95)
56
+ return { medal: '๐Ÿฅˆ', status: 'Target 2 - Silver' };
57
+ if (score >= 85)
58
+ return { medal: '๐Ÿฅ‰', status: 'Target 1 - Bronze' };
59
+ if (score >= 70)
60
+ return { medal: '๐ŸŸข', status: 'GO! - Ready for Target 1' };
61
+ if (score >= 55)
62
+ return { medal: '๐ŸŸก', status: 'Caution - Getting ready' };
63
+ return { medal: '๐Ÿ”ด', status: 'Stop - Needs work' };
64
+ }
65
+ /**
66
+ * Format score display with Championship Medal System
67
+ */
68
+ function formatScore(score) {
69
+ const { medal, status } = getScoreMedal(score);
70
+ return {
71
+ line1: `${medal} ${BRIGHT_CYAN}Score: ${score}/100${RESET}`,
72
+ line2: createASCIIBar(score),
73
+ line3: `๐ŸŽ๏ธ ${CYAN}Status: ${status}${RESET}`
74
+ };
75
+ }
76
+ /**
77
+ * Format file operations with style
78
+ */
79
+ function formatFileOp(operation, count, total) {
80
+ const percentage = total ? Math.round((count / total) * 100) : 100;
81
+ return {
82
+ line1: `๐Ÿ“ ${BRIGHT_CYAN}${operation}: ${count}${total ? `/${total}` : ' files'}${RESET}`,
83
+ line2: createASCIIBar(percentage),
84
+ line3: `๐Ÿงก ${CYAN}Speed: Fast${RESET}`
85
+ };
86
+ }
87
+ /**
88
+ * Format sync operations
89
+ */
90
+ function formatSync(synced, total) {
91
+ const percentage = Math.round((synced / total) * 100);
92
+ let status = '';
93
+ if (percentage === 100) {
94
+ status = 'Complete!';
95
+ }
96
+ else if (percentage >= 50) {
97
+ status = 'In Progress';
98
+ }
99
+ else {
100
+ status = 'Starting';
101
+ }
102
+ return {
103
+ line1: `๐Ÿ”„ ${BRIGHT_CYAN}Synced: ${synced}/${total}${RESET}`,
104
+ line2: createASCIIBar(percentage),
105
+ line3: `๐Ÿงก ${CYAN}Status: ${status}${RESET}`
106
+ };
107
+ }
108
+ /**
109
+ * Format directory tree with orange accents
110
+ */
111
+ function formatTree(tree) {
112
+ // Add orange folder emojis
113
+ return tree
114
+ .replace(/โ”œโ”€โ”€/g, 'โ”œโ”€โ”€ ๐Ÿงก')
115
+ .replace(/โ””โ”€โ”€/g, 'โ””โ”€โ”€ ๐Ÿงก')
116
+ .replace(/โ”‚/g, 'โ”‚');
117
+ }
118
+ /**
119
+ * Format project detection
120
+ */
121
+ function formatDetection(projectType, confidence) {
122
+ return {
123
+ line1: `๐Ÿ—๏ธ ${BRIGHT_CYAN}Type: ${projectType}${RESET}`,
124
+ line2: createASCIIBar(confidence),
125
+ line3: `๐Ÿงก ${CYAN}Confidence: ${confidence}%${RESET}`
126
+ };
127
+ }
128
+ /**
129
+ * Format generic success message
130
+ */
131
+ function formatSuccess(action, detail) {
132
+ return {
133
+ line1: `โœ… ${BRIGHT_CYAN}${action}: Success${RESET}`,
134
+ line2: `โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 100%`,
135
+ line3: `๐Ÿงก ${CYAN}${detail || 'Complete!'}${RESET}`
136
+ };
137
+ }
138
+ /**
139
+ * Format error message (still styled but clear)
140
+ */
141
+ function formatError(action, error) {
142
+ return {
143
+ line1: `โŒ ${action}: Failed`,
144
+ line2: `โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 0%`,
145
+ line3: `๐Ÿ’ก Fix: ${error}`
146
+ };
147
+ }
148
+ /**
149
+ * The main formatter - always returns 3 lines
150
+ */
151
+ function format3Lines(style) {
152
+ return `${style.line1}\n${style.line2}\n${style.line3}`;
153
+ }
154
+ /**
155
+ * Special Big Orange celebration for perfect scores
156
+ */
157
+ function formatBigOrange() {
158
+ return {
159
+ line1: `๐Ÿงก ${BRIGHT_CYAN}${BOLD}BIG ORANGE: 100/100${RESET}`,
160
+ line2: `๐ŸŸง๐ŸŸง๐ŸŸง๐ŸŸง๐ŸŸง๐ŸŸง๐ŸŸง๐ŸŸง๐ŸŸง๐ŸŸง๐ŸŸง๐ŸŸง ${ORANGE}MAX!${RESET}`,
161
+ line3: `๐Ÿ† ${BRIGHT_CYAN}${BOLD}Status: CHAMPION!${RESET}`
162
+ };
163
+ }
164
+ //# sourceMappingURL=visual-style.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"visual-style.js","sourceRoot":"","sources":["../../../src/utils/visual-style.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAmBH,8CASC;AAKD,wCAOC;AAKD,sCAQC;AAKD,kCAQC;AAKD,oCAQC;AAKD,gCAiBC;AAKD,gCAMC;AAKD,0CAMC;AAKD,sCAMC;AAKD,kCAMC;AAKD,oCAEC;AAKD,0CAMC;AAjKD,uCAAuC;AACvC,MAAM,IAAI,GAAG,U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,MAAc,EAAE,MAAe;IAC3D,OAAO;QACL,KAAK,EAAE,KAAK,WAAW,GAAG,MAAM,YAAY,KAAK,EAAE;QACnD,KAAK,EAAE,+BAA+B;QACtC,KAAK,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,WAAW,GAAG,KAAK,EAAE;KACpD,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAgB,WAAW,CAAC,MAAc,EAAE,KAAa;IACvD,OAAO;QACL,KAAK,EAAE,KAAK,MAAM,UAAU;QAC5B,KAAK,EAAE,6BAA6B;QACpC,KAAK,EAAE,WAAW,KAAK,EAAE;KAC1B,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAgB,YAAY,CAAC,KAAmB;IAC9C,OAAO,GAAG,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,EAAE,CAAC;AAC1D,CAAC;AAED;;GAEG;AACH,SAAgB,eAAe;IAC7B,OAAO;QACL,KAAK,EAAE,MAAM,WAAW,GAAG,IAAI,sBAAsB,KAAK,EAAE;QAC5D,KAAK,EAAE,4BAA4B,MAAM,OAAO,KAAK,EAAE;QACvD,KAAK,EAAE,MAAM,WAAW,GAAG,IAAI,oBAAoB,KAAK,EAAE;KAC3D,CAAC;AACJ,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Get the current version from package.json
3
+ * Caches the result for performance
4
+ */
5
+ export declare function getVersion(): string;
6
+ /**
7
+ * Version constant for convenience
8
+ */
9
+ export declare const VERSION: string;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VERSION = void 0;
4
+ exports.getVersion = getVersion;
5
+ /**
6
+ * Version information - Single source of truth
7
+ * Imports from package.json to avoid hardcoding
8
+ */
9
+ const fs_1 = require("fs");
10
+ const path_1 = require("path");
11
+ let cachedVersion = '';
12
+ /**
13
+ * Get the current version from package.json
14
+ * Caches the result for performance
15
+ */
16
+ function getVersion() {
17
+ if (cachedVersion) {
18
+ return cachedVersion;
19
+ }
20
+ try {
21
+ // __dirname in compiled code is dist/src, so we need to go up two levels to reach package.json
22
+ const packageJsonPath = (0, path_1.join)(__dirname, '..', '..', 'package.json');
23
+ const packageJson = JSON.parse((0, fs_1.readFileSync)(packageJsonPath, 'utf-8'));
24
+ cachedVersion = packageJson.version;
25
+ return cachedVersion;
26
+ }
27
+ catch (error) {
28
+ // Fallback if package.json read fails (should never happen in production)
29
+ console.error('Failed to read version from package.json:', error);
30
+ return 'unknown';
31
+ }
32
+ }
33
+ /**
34
+ * Version constant for convenience
35
+ */
36
+ exports.VERSION = getVersion();
37
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";;;AAaA,gCAgBC;AA7BD;;;GAGG;AACH,2BAAkC;AAClC,+BAA4B;AAE5B,IAAI,aAAa,GAAW,EAAE,CAAC;AAE/B;;;GAGG;AACH,SAAgB,UAAU;IACxB,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO,aAAa,CAAC;IACvB,CAAC;IAED,IAAI,CAAC;QACH,+FAA+F;QAC/F,MAAM,eAAe,GAAG,IAAA,WAAI,EAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;QACpE,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,IAAA,iBAAY,EAAC,eAAe,EAAE,OAAO,CAAC,CAAC,CAAC;QACvE,aAAa,GAAG,WAAW,CAAC,OAAO,CAAC;QACpC,OAAO,aAAa,CAAC;IACvB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,0EAA0E;QAC1E,OAAO,CAAC,KAAK,CAAC,2CAA2C,EAAE,KAAK,CAAC,CAAC;QAClE,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED;;GAEG;AACU,QAAA,OAAO,GAAG,UAAU,EAAE,CAAC"}