locadex 0.0.2-alpha.5 → 0.0.2-alpha.7

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 (110) hide show
  1. package/dist/cli.d.ts.map +1 -1
  2. package/dist/cli.js +67 -9
  3. package/dist/cli.js.map +1 -1
  4. package/dist/commands/i18n.d.ts +1 -2
  5. package/dist/commands/i18n.d.ts.map +1 -1
  6. package/dist/commands/i18n.js +5 -256
  7. package/dist/commands/i18n.js.map +1 -1
  8. package/dist/commands/setup.d.ts +1 -1
  9. package/dist/commands/setup.d.ts.map +1 -1
  10. package/dist/commands/setup.js +5 -142
  11. package/dist/commands/setup.js.map +1 -1
  12. package/dist/logging/console.d.ts +3 -3
  13. package/dist/logging/console.d.ts.map +1 -1
  14. package/dist/logging/console.js +9 -8
  15. package/dist/logging/console.js.map +1 -1
  16. package/dist/logging/logger.d.ts +4 -2
  17. package/dist/logging/logger.d.ts.map +1 -1
  18. package/dist/logging/logger.js +33 -7
  19. package/dist/logging/logger.js.map +1 -1
  20. package/dist/mcp/getDocs.d.ts.map +1 -1
  21. package/dist/mcp/getDocs.js +2 -3
  22. package/dist/mcp/getDocs.js.map +1 -1
  23. package/dist/mcp/getPort.d.ts +2 -0
  24. package/dist/mcp/getPort.d.ts.map +1 -0
  25. package/dist/mcp/getPort.js +25 -0
  26. package/dist/mcp/getPort.js.map +1 -0
  27. package/dist/mcp/tools/docs.d.ts.map +1 -1
  28. package/dist/mcp/tools/docs.js +9 -2
  29. package/dist/mcp/tools/docs.js.map +1 -1
  30. package/dist/mcp/tools/guides.d.ts.map +1 -1
  31. package/dist/mcp/tools/guides.js +5 -2
  32. package/dist/mcp/tools/guides.js.map +1 -1
  33. package/dist/mcp-sse.d.ts.map +1 -1
  34. package/dist/mcp-sse.js +10 -28
  35. package/dist/mcp-sse.js.map +1 -1
  36. package/dist/tasks/i18n.d.ts +2 -0
  37. package/dist/tasks/i18n.d.ts.map +1 -0
  38. package/dist/tasks/i18n.js +317 -0
  39. package/dist/tasks/i18n.js.map +1 -0
  40. package/dist/tasks/setup.d.ts +2 -0
  41. package/dist/tasks/setup.d.ts.map +1 -0
  42. package/dist/tasks/setup.js +171 -0
  43. package/dist/tasks/setup.js.map +1 -0
  44. package/dist/telemetry.d.ts +1 -3
  45. package/dist/telemetry.d.ts.map +1 -1
  46. package/dist/telemetry.js +27 -25
  47. package/dist/telemetry.js.map +1 -1
  48. package/dist/types/cli.d.ts +9 -0
  49. package/dist/types/cli.d.ts.map +1 -1
  50. package/dist/types/cli.js +2 -2
  51. package/dist/types/cli.js.map +1 -1
  52. package/dist/utils/claudeCode.d.ts +7 -2
  53. package/dist/utils/claudeCode.d.ts.map +1 -1
  54. package/dist/utils/claudeCode.js +50 -31
  55. package/dist/utils/claudeCode.js.map +1 -1
  56. package/dist/utils/config.d.ts +10 -0
  57. package/dist/utils/config.d.ts.map +1 -0
  58. package/dist/utils/config.js +66 -0
  59. package/dist/utils/config.js.map +1 -0
  60. package/dist/utils/dag/createDag.d.ts +1 -1
  61. package/dist/utils/dag/createDag.d.ts.map +1 -1
  62. package/dist/utils/dag/createDag.js +4 -41
  63. package/dist/utils/dag/createDag.js.map +1 -1
  64. package/dist/utils/dag/matchFiles.d.ts +2 -0
  65. package/dist/utils/dag/matchFiles.d.ts.map +1 -0
  66. package/dist/utils/dag/matchFiles.js +40 -0
  67. package/dist/utils/dag/matchFiles.js.map +1 -0
  68. package/dist/utils/getFiles.d.ts +2 -3
  69. package/dist/utils/getFiles.d.ts.map +1 -1
  70. package/dist/utils/getFiles.js +23 -14
  71. package/dist/utils/getFiles.js.map +1 -1
  72. package/dist/utils/locadexManager.d.ts +69 -0
  73. package/dist/utils/locadexManager.d.ts.map +1 -0
  74. package/dist/utils/locadexManager.js +250 -0
  75. package/dist/utils/locadexManager.js.map +1 -0
  76. package/dist/utils/session.d.ts +2 -0
  77. package/dist/utils/session.d.ts.map +1 -0
  78. package/dist/utils/session.js +12 -0
  79. package/dist/utils/session.js.map +1 -0
  80. package/dist/utils/shared.d.ts +2 -1
  81. package/dist/utils/shared.d.ts.map +1 -1
  82. package/dist/utils/shared.js +37 -14
  83. package/dist/utils/shared.js.map +1 -1
  84. package/dist/utils/shutdown.d.ts +20 -0
  85. package/dist/utils/shutdown.d.ts.map +1 -0
  86. package/dist/utils/shutdown.js +63 -0
  87. package/dist/utils/shutdown.js.map +1 -0
  88. package/dist/utils/stats.d.ts +13 -0
  89. package/dist/utils/stats.d.ts.map +1 -1
  90. package/dist/utils/stats.js +55 -2
  91. package/dist/utils/stats.js.map +1 -1
  92. package/package.json +2 -5
  93. package/.locadex-mcp-stdio.json +0 -9
  94. package/.locadex-mcp.json +0 -8
  95. package/dist/utils/agentManager.d.ts +0 -34
  96. package/dist/utils/agentManager.d.ts.map +0 -1
  97. package/dist/utils/agentManager.js +0 -123
  98. package/dist/utils/agentManager.js.map +0 -1
  99. package/dist/utils/debugLogger.d.ts +0 -3
  100. package/dist/utils/debugLogger.d.ts.map +0 -1
  101. package/dist/utils/debugLogger.js +0 -36
  102. package/dist/utils/debugLogger.js.map +0 -1
  103. package/dist/utils/mcpConfig.d.ts +0 -10
  104. package/dist/utils/mcpConfig.d.ts.map +0 -1
  105. package/dist/utils/mcpConfig.js +0 -13
  106. package/dist/utils/mcpConfig.js.map +0 -1
  107. package/dist/utils/validateConfig.d.ts +0 -2
  108. package/dist/utils/validateConfig.d.ts.map +0 -1
  109. package/dist/utils/validateConfig.js +0 -12
  110. package/dist/utils/validateConfig.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"stats.js","sources":["utils/stats.ts"],"sourceRoot":"/","sourcesContent":["export class AgentStats {\n private totalFiles: number = 0;\n private processedFiles: number = 0;\n private totalCost: number = 0;\n private totalToolCalls: number = 0;\n private totalApiDuration: number = 0;\n private totalWallDuration: number = 0;\n private startTime: number;\n\n constructor() {\n this.startTime = Date.now();\n }\n\n updateStats(stats: {\n newProcessedFiles?: number;\n newCost?: number;\n newToolCalls?: number;\n newApiDuration?: number;\n newWallDuration?: number;\n }) {\n if (stats.newProcessedFiles) {\n this.processedFiles += stats.newProcessedFiles;\n }\n if (stats.newCost) {\n this.totalCost += stats.newCost;\n }\n if (stats.newToolCalls) {\n this.totalToolCalls += stats.newToolCalls;\n }\n if (stats.newApiDuration) {\n this.totalApiDuration += stats.newApiDuration;\n }\n if (stats.newWallDuration) {\n this.totalWallDuration += stats.newWallDuration;\n }\n }\n\n getStats(): {\n totalFiles: number;\n processedFiles: number;\n totalCost: number;\n totalToolCalls: number;\n totalApiDuration: number;\n totalWallDuration: number;\n startTime: number;\n } {\n return {\n totalFiles: this.totalFiles,\n processedFiles: this.processedFiles,\n totalCost: this.totalCost,\n totalToolCalls: this.totalToolCalls,\n totalApiDuration: this.totalApiDuration,\n totalWallDuration: this.totalWallDuration,\n startTime: this.startTime,\n };\n }\n}\n"],"names":[],"mappings":";;AAAA,MAAM,OAAO,UAAU;IACb,UAAU,GAAW,CAAC,CAAC;IACvB,cAAc,GAAW,CAAC,CAAC;IAC3B,SAAS,GAAW,CAAC,CAAC;IACtB,cAAc,GAAW,CAAC,CAAC;IAC3B,gBAAgB,GAAW,CAAC,CAAC;IAC7B,iBAAiB,GAAW,CAAC,CAAC;IAC9B,SAAS,CAAS;IAE1B;QACE,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAC9B,CAAC;IAED,WAAW,CAAC,KAMX;QACC,IAAI,KAAK,CAAC,iBAAiB,EAAE,CAAC;YAC5B,IAAI,CAAC,cAAc,IAAI,KAAK,CAAC,iBAAiB,CAAC;QACjD,CAAC;QACD,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;YAClB,IAAI,CAAC,SAAS,IAAI,KAAK,CAAC,OAAO,CAAC;QAClC,CAAC;QACD,IAAI,KAAK,CAAC,YAAY,EAAE,CAAC;YACvB,IAAI,CAAC,cAAc,IAAI,KAAK,CAAC,YAAY,CAAC;QAC5C,CAAC;QACD,IAAI,KAAK,CAAC,cAAc,EAAE,CAAC;YACzB,IAAI,CAAC,gBAAgB,IAAI,KAAK,CAAC,cAAc,CAAC;QAChD,CAAC;QACD,IAAI,KAAK,CAAC,eAAe,EAAE,CAAC;YAC1B,IAAI,CAAC,iBAAiB,IAAI,KAAK,CAAC,eAAe,CAAC;QAClD,CAAC;IACH,CAAC;IAED,QAAQ;QASN,OAAO;YACL,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;YACvC,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;YACzC,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC;IACJ,CAAC;CACF","debug_id":"cae70ec6-4bdd-5777-af0d-5eea7935c485"}
1
+ {"version":3,"file":"stats.js","sources":["utils/stats.ts"],"sourceRoot":"/","sourcesContent":["import { posthog } from '../telemetry.js';\nimport { getSessionId } from './session.js';\nimport * as Sentry from '@sentry/node';\n\nexport class AgentStats {\n private totalFiles: number = 0;\n private processedFiles: number = 0;\n private totalCost: number = 0;\n private totalToolCalls: number = 0;\n private totalApiDuration: number = 0;\n private totalWallDuration: number = 0;\n private startTime: number;\n private inputTokens: number = 0;\n private outputTokens: number = 0;\n private cachedInputTokens: number = 0;\n private turns: number = 0;\n\n constructor() {\n this.startTime = Date.now();\n }\n\n updateStats(stats: {\n newProcessedFiles?: number;\n newCost?: number;\n newToolCalls?: number;\n newApiDuration?: number;\n newWallDuration?: number;\n newInputTokens?: number;\n newOutputTokens?: number;\n newCachedInputTokens?: number;\n newTurns?: number;\n }) {\n if (stats.newProcessedFiles) {\n this.processedFiles += stats.newProcessedFiles;\n }\n if (stats.newCost) {\n this.totalCost += stats.newCost;\n }\n if (stats.newToolCalls) {\n this.totalToolCalls += stats.newToolCalls;\n }\n if (stats.newApiDuration) {\n this.totalApiDuration += stats.newApiDuration;\n }\n if (stats.newWallDuration) {\n this.totalWallDuration += stats.newWallDuration;\n }\n if (stats.newInputTokens) {\n this.inputTokens += stats.newInputTokens;\n }\n if (stats.newOutputTokens) {\n this.outputTokens += stats.newOutputTokens;\n }\n if (stats.newCachedInputTokens) {\n this.cachedInputTokens += stats.newCachedInputTokens;\n }\n if (stats.newTurns) {\n this.turns += stats.newTurns;\n }\n }\n\n getStats() {\n return {\n totalFiles: this.totalFiles,\n processedFiles: this.processedFiles,\n totalCost: this.totalCost,\n totalToolCalls: this.totalToolCalls,\n totalApiDuration: this.totalApiDuration,\n totalWallDuration: this.totalWallDuration,\n startTime: this.startTime,\n inputTokens: this.inputTokens,\n outputTokens: this.outputTokens,\n cachedInputTokens: this.cachedInputTokens,\n turns: this.turns,\n };\n }\n\n recordTelemetry(success: boolean) {\n Sentry.getActiveSpan()?.setAttributes({\n 'agent.total_input_tokens': this.inputTokens,\n 'agent.total_cached_input_tokens': this.cachedInputTokens,\n 'agent.total_output_tokens': this.outputTokens,\n 'agent.total_turns': this.turns,\n 'agent.total_cost_usd': this.totalCost,\n 'agent.total_wall_duration_ms': this.totalWallDuration,\n 'agent.total_api_duration_ms': this.totalApiDuration,\n 'agent.total_files_processed': this.processedFiles,\n 'agent.total_tool_calls': this.totalToolCalls,\n 'agent.success': success,\n });\n\n posthog.capture({\n distinctId: getSessionId(),\n event: 'agent_stats',\n properties: {\n total_files: this.processedFiles,\n total_turns: this.turns,\n total_input_tokens: this.inputTokens,\n total_output_tokens: this.outputTokens,\n total_cost_usd: this.totalCost,\n total_wall_duration_ms: this.totalWallDuration,\n total_api_duration_ms: this.totalApiDuration,\n total_files_processed: this.processedFiles,\n total_tool_calls: this.totalToolCalls,\n success: success,\n },\n });\n }\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc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,OAAO,CAAC;YACd,UAAU,EAAE,YAAY,EAAE;YAC1B,KAAK,EAAE,aAAa;YACpB,UAAU,EAAE;gBACV,WAAW,EAAE,IAAI,CAAC,cAAc;gBAChC,WAAW,EAAE,IAAI,CAAC,KAAK;gBACvB,kBAAkB,EAAE,IAAI,CAAC,WAAW;gBACpC,mBAAmB,EAAE,IAAI,CAAC,YAAY;gBACtC,cAAc,EAAE,IAAI,CAAC,SAAS;gBAC9B,sBAAsB,EAAE,IAAI,CAAC,iBAAiB;gBAC9C,qBAAqB,EAAE,IAAI,CAAC,gBAAgB;gBAC5C,qBAAqB,EAAE,IAAI,CAAC,cAAc;gBAC1C,gBAAgB,EAAE,IAAI,CAAC,cAAc;gBACrC,OAAO,EAAE,OAAO;aACjB;SACF,CAAC,CAAC;IACL,CAAC;CACF","debug_id":"24d19598-ee2b-5e12-9264-36c1477ffac0"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "locadex",
3
- "version": "0.0.2-alpha.5",
3
+ "version": "0.0.2-alpha.7",
4
4
  "description": "An AI agent for internationalization",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -12,12 +12,9 @@
12
12
  "files": [
13
13
  "dist",
14
14
  "CHANGELOG.md",
15
- ".locadex-mcp.json",
16
- ".locadex-mcp-stdio.json",
17
15
  "guides"
18
16
  ],
19
17
  "dependencies": {
20
- "@anthropic-ai/claude-code": "^1.0.16",
21
18
  "@anthropic-ai/sdk": "^0.52.0",
22
19
  "@clack/prompts": "^1.0.0-alpha.1",
23
20
  "@modelcontextprotocol/sdk": "^1.12.0",
@@ -28,7 +25,7 @@
28
25
  "dependency-tree": "^11.1.1",
29
26
  "dotenv": "^16.4.5",
30
27
  "express": "^5.1.0",
31
- "gtx-cli": "^1.2.23",
28
+ "gtx-cli": "^1.2.24-alpha.2",
32
29
  "posthog-node": "^4.18.0"
33
30
  },
34
31
  "devDependencies": {
@@ -1,9 +0,0 @@
1
- {
2
- "mcpServers": {
3
- "locadex": {
4
- "command": "npx",
5
- "args": ["locadex-mcp"],
6
- "env": {}
7
- }
8
- }
9
- }
package/.locadex-mcp.json DELETED
@@ -1,8 +0,0 @@
1
- {
2
- "mcpServers": {
3
- "locadex": {
4
- "type": "sse",
5
- "url": "http://localhost:8888/sse"
6
- }
7
- }
8
- }
@@ -1,34 +0,0 @@
1
- import { ClaudeCodeRunner } from './claudeCode.js';
2
- import { AgentStats } from './stats.js';
3
- export interface LocadexMetadata {
4
- createdAt: string;
5
- locadexVersion: string;
6
- workingDirectory: string;
7
- projectName: string;
8
- transport: 'sse' | 'stdio';
9
- tempDirectory: string;
10
- nodeVersion: string;
11
- platform: string;
12
- arch: string;
13
- batchSize?: number;
14
- [key: string]: any;
15
- }
16
- export declare class LocadexManager {
17
- private mcpProcess;
18
- private mcpConfigPath;
19
- private filesStateFilePath;
20
- private metadataFilePath;
21
- private tempDir;
22
- private apiKey?;
23
- stats: AgentStats;
24
- constructor(options: {
25
- mcpTransport: 'sse' | 'stdio';
26
- apiKey?: string;
27
- metadata?: Partial<LocadexMetadata>;
28
- });
29
- createAgent(): ClaudeCodeRunner;
30
- getFilesStateFilePath(): string;
31
- getMetadataFilePath(): string;
32
- cleanup(): void;
33
- }
34
- //# sourceMappingURL=agentManager.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agentManager.d.ts","sourceRoot":"/","sources":["utils/agentManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AASnD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,KAAK,GAAG,OAAO,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAYD,qBAAa,cAAc;IACzB,OAAO,CAAC,UAAU,CAA2B;IAC7C,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,kBAAkB,CAAS;IACnC,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,MAAM,CAAC,CAAS;IACxB,KAAK,EAAE,UAAU,CAAC;gBAEN,OAAO,EAAE;QACnB,YAAY,EAAE,KAAK,GAAG,OAAO,CAAC;QAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,QAAQ,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;KACrC;IA2FD,WAAW,IAAI,gBAAgB;IAO/B,qBAAqB,IAAI,MAAM;IAI/B,mBAAmB,IAAI,MAAM;IAI7B,OAAO,IAAI,IAAI;CAUhB"}
@@ -1,123 +0,0 @@
1
-
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="72460f4b-3120-52fb-a586-974a085b144e")}catch(e){}}();
3
- import { ClaudeCodeRunner } from './claudeCode.js';
4
- import { fromPackageRoot } from './getPaths.js';
5
- import fs from 'node:fs';
6
- import path from 'node:path';
7
- import { logger } from '../logging/logger.js';
8
- import { addToGitIgnore } from './fs/writeFiles.js';
9
- import { spawn } from 'node:child_process';
10
- import { AgentStats } from './stats.js';
11
- const mcpStdioConfig = {
12
- mcpServers: {
13
- locadex: {
14
- command: 'npx',
15
- args: ['locadex-mcp'],
16
- env: {},
17
- },
18
- },
19
- };
20
- export class LocadexManager {
21
- mcpProcess;
22
- mcpConfigPath;
23
- filesStateFilePath;
24
- metadataFilePath;
25
- tempDir;
26
- apiKey;
27
- stats;
28
- constructor(options) {
29
- this.apiKey = options.apiKey || process.env.ANTHROPIC_API_KEY;
30
- this.stats = new AgentStats();
31
- const cwd = process.cwd();
32
- this.tempDir = path.resolve(cwd, '.locadex', Date.now().toString());
33
- fs.mkdirSync(this.tempDir, { recursive: true });
34
- logger.debugMessage(`Temp directory created at: ${this.tempDir}`);
35
- addToGitIgnore(cwd, '.locadex');
36
- logger.debugMessage(`Added .locadex to .gitignore`);
37
- this.mcpConfigPath = path.resolve(this.tempDir, 'mcp.json');
38
- this.filesStateFilePath = path.resolve(this.tempDir, 'files-state.json');
39
- this.metadataFilePath = path.resolve(this.tempDir, 'metadata.json');
40
- // Create files-state.json
41
- const filesState = [];
42
- fs.writeFileSync(this.filesStateFilePath, JSON.stringify(filesState, null, 2));
43
- // Create metadata.json
44
- const metadata = {
45
- createdAt: new Date().toISOString(),
46
- locadexVersion: JSON.parse(fs.readFileSync(fromPackageRoot('package.json'), 'utf8')).version,
47
- workingDirectory: cwd,
48
- projectName: path.basename(cwd),
49
- transport: options.mcpTransport,
50
- tempDirectory: this.tempDir,
51
- nodeVersion: process.version,
52
- platform: process.platform,
53
- arch: process.arch,
54
- ...options.metadata,
55
- };
56
- fs.writeFileSync(this.metadataFilePath, JSON.stringify(metadata, null, 2));
57
- logger.debugMessage(`Created metadata.json at: ${this.metadataFilePath}`);
58
- if (options.mcpTransport === 'stdio') {
59
- mcpStdioConfig.mcpServers.locadex.env = {
60
- LOCADEX_FILES_STATE_FILE_PATH: this.filesStateFilePath,
61
- };
62
- try {
63
- fs.writeFileSync(this.mcpConfigPath, JSON.stringify(mcpStdioConfig, null, 2));
64
- }
65
- catch {
66
- this.mcpConfigPath = fromPackageRoot('.locadex-mcp-stdio.json');
67
- }
68
- }
69
- else {
70
- this.mcpProcess = spawn('node', [fromPackageRoot('dist/mcp-sse.js')], {
71
- env: {
72
- LOCADEX_FILES_STATE_FILE_PATH: this.filesStateFilePath,
73
- LOCADEX_VERBOSE: logger.verbose ? 'true' : 'false',
74
- LOCADEX_DEBUG: logger.debug ? 'true' : 'false',
75
- ...process.env,
76
- },
77
- stdio: 'inherit',
78
- });
79
- this.mcpProcess.on('error', (error) => {
80
- logger.error(`MCP server failed to start: ${error.message}`);
81
- process.exit(1);
82
- });
83
- this.mcpProcess.on('exit', (code, signal) => {
84
- if (code !== 0 && code !== null) {
85
- logger.error(`MCP server exited with code ${code}`);
86
- process.exit(code);
87
- }
88
- if (signal) {
89
- logger.error(`MCP server was killed with signal ${signal}`);
90
- process.exit(1);
91
- }
92
- });
93
- process.on('exit', () => {
94
- this.cleanup();
95
- });
96
- this.mcpConfigPath = fromPackageRoot('.locadex-mcp.json');
97
- }
98
- }
99
- createAgent() {
100
- return new ClaudeCodeRunner(this, {
101
- apiKey: this.apiKey,
102
- mcpConfig: this.mcpConfigPath,
103
- });
104
- }
105
- getFilesStateFilePath() {
106
- return this.filesStateFilePath;
107
- }
108
- getMetadataFilePath() {
109
- return this.metadataFilePath;
110
- }
111
- cleanup() {
112
- if (this.mcpProcess && !this.mcpProcess.killed) {
113
- this.mcpProcess.kill('SIGTERM');
114
- setTimeout(() => {
115
- if (this.mcpProcess && !this.mcpProcess.killed) {
116
- this.mcpProcess.kill('SIGKILL');
117
- }
118
- }, 1000);
119
- }
120
- }
121
- }
122
- //# sourceMappingURL=agentManager.js.map
123
- //# debugId=72460f4b-3120-52fb-a586-974a085b144e
@@ -1 +0,0 @@
1
- {"version":3,"file":"agentManager.js","sources":["utils/agentManager.ts"],"sourceRoot":"/","sourcesContent":["import { ClaudeCodeRunner } from './claudeCode.js';\nimport { fromPackageRoot } from './getPaths.js';\nimport fs from 'node:fs';\nimport path from 'node:path';\nimport { FileEntry } from './getFiles.js';\nimport { logger } from '../logging/logger.js';\nimport { addToGitIgnore } from './fs/writeFiles.js';\nimport { spawn } from 'node:child_process';\nimport type { ChildProcess } from 'node:child_process';\nimport { AgentStats } from './stats.js';\n\nexport interface LocadexMetadata {\n createdAt: string;\n locadexVersion: string;\n workingDirectory: string;\n projectName: string;\n transport: 'sse' | 'stdio';\n tempDirectory: string;\n nodeVersion: string;\n platform: string;\n arch: string;\n batchSize?: number;\n [key: string]: any;\n}\n\nconst mcpStdioConfig = {\n mcpServers: {\n locadex: {\n command: 'npx',\n args: ['locadex-mcp'],\n env: {},\n },\n },\n};\n\nexport class LocadexManager {\n private mcpProcess: ChildProcess | undefined;\n private mcpConfigPath: string;\n private filesStateFilePath: string;\n private metadataFilePath: string;\n private tempDir: string;\n private apiKey?: string;\n stats: AgentStats;\n\n constructor(options: {\n mcpTransport: 'sse' | 'stdio';\n apiKey?: string;\n metadata?: Partial<LocadexMetadata>;\n }) {\n this.apiKey = options.apiKey || process.env.ANTHROPIC_API_KEY;\n this.stats = new AgentStats();\n\n const cwd = process.cwd();\n this.tempDir = path.resolve(cwd, '.locadex', Date.now().toString());\n fs.mkdirSync(this.tempDir, { recursive: true });\n\n logger.debugMessage(`Temp directory created at: ${this.tempDir}`);\n\n addToGitIgnore(cwd, '.locadex');\n\n logger.debugMessage(`Added .locadex to .gitignore`);\n\n this.mcpConfigPath = path.resolve(this.tempDir, 'mcp.json');\n this.filesStateFilePath = path.resolve(this.tempDir, 'files-state.json');\n this.metadataFilePath = path.resolve(this.tempDir, 'metadata.json');\n\n // Create files-state.json\n const filesState: FileEntry[] = [];\n fs.writeFileSync(\n this.filesStateFilePath,\n JSON.stringify(filesState, null, 2)\n );\n\n // Create metadata.json\n const metadata: LocadexMetadata = {\n createdAt: new Date().toISOString(),\n locadexVersion: JSON.parse(\n fs.readFileSync(fromPackageRoot('package.json'), 'utf8')\n ).version,\n workingDirectory: cwd,\n projectName: path.basename(cwd),\n transport: options.mcpTransport,\n tempDirectory: this.tempDir,\n nodeVersion: process.version,\n platform: process.platform,\n arch: process.arch,\n ...options.metadata,\n };\n fs.writeFileSync(this.metadataFilePath, JSON.stringify(metadata, null, 2));\n\n logger.debugMessage(`Created metadata.json at: ${this.metadataFilePath}`);\n\n if (options.mcpTransport === 'stdio') {\n mcpStdioConfig.mcpServers.locadex.env = {\n LOCADEX_FILES_STATE_FILE_PATH: this.filesStateFilePath,\n };\n try {\n fs.writeFileSync(\n this.mcpConfigPath,\n JSON.stringify(mcpStdioConfig, null, 2)\n );\n } catch {\n this.mcpConfigPath = fromPackageRoot('.locadex-mcp-stdio.json');\n }\n } else {\n this.mcpProcess = spawn('node', [fromPackageRoot('dist/mcp-sse.js')], {\n env: {\n LOCADEX_FILES_STATE_FILE_PATH: this.filesStateFilePath,\n LOCADEX_VERBOSE: logger.verbose ? 'true' : 'false',\n LOCADEX_DEBUG: logger.debug ? 'true' : 'false',\n ...process.env,\n },\n stdio: 'inherit',\n });\n\n this.mcpProcess.on('error', (error) => {\n logger.error(`MCP server failed to start: ${error.message}`);\n process.exit(1);\n });\n\n this.mcpProcess.on('exit', (code, signal) => {\n if (code !== 0 && code !== null) {\n logger.error(`MCP server exited with code ${code}`);\n process.exit(code);\n }\n if (signal) {\n logger.error(`MCP server was killed with signal ${signal}`);\n process.exit(1);\n }\n });\n\n process.on('exit', () => {\n this.cleanup();\n });\n\n this.mcpConfigPath = fromPackageRoot('.locadex-mcp.json');\n }\n }\n\n createAgent(): ClaudeCodeRunner {\n return new ClaudeCodeRunner(this, {\n apiKey: this.apiKey,\n mcpConfig: this.mcpConfigPath,\n });\n }\n\n getFilesStateFilePath(): string {\n return this.filesStateFilePath;\n }\n\n getMetadataFilePath(): string {\n return this.metadataFilePath;\n }\n\n cleanup(): void {\n if (this.mcpProcess && !this.mcpProcess.killed) {\n this.mcpProcess.kill('SIGTERM');\n setTimeout(() => {\n if (this.mcpProcess && !this.mcpProcess.killed) {\n this.mcpProcess.kill('SIGKILL');\n }\n }, 1000);\n }\n }\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,eA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974a085b144e"}
@@ -1,3 +0,0 @@
1
- export declare function debugLog(...args: any[]): void;
2
- export declare function getDebugLogLocation(): string;
3
- //# sourceMappingURL=debugLogger.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"debugLogger.d.ts","sourceRoot":"/","sources":["utils/debugLogger.ts"],"names":[],"mappings":"AAqBA,wBAAgB,QAAQ,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAgB7C;AAED,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C"}
@@ -1,36 +0,0 @@
1
-
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="728d6d1d-2ed7-569b-8a04-bbe65558e2ba")}catch(e){}}();
3
- import { existsSync, mkdirSync, appendFileSync } from 'node:fs';
4
- import { join } from 'node:path';
5
- import { randomBytes } from 'node:crypto';
6
- let debugLogPath = null;
7
- function getDebugLogPath() {
8
- if (!debugLogPath) {
9
- const uniqueId = randomBytes(8).toString('hex');
10
- const debugDir = join(process.cwd(), '.tmp', uniqueId);
11
- if (!existsSync(debugDir)) {
12
- mkdirSync(debugDir, { recursive: true });
13
- }
14
- debugLogPath = join(debugDir, 'out.txt');
15
- }
16
- return debugLogPath;
17
- }
18
- export function debugLog(...args) {
19
- const logPath = getDebugLogPath();
20
- const timestamp = new Date().toISOString();
21
- const message = args.map(arg => typeof arg === 'object' ? JSON.stringify(arg, null, 2) : String(arg)).join(' ');
22
- const logEntry = `[${timestamp}] ${message}\n`;
23
- try {
24
- appendFileSync(logPath, logEntry);
25
- }
26
- catch (error) {
27
- // Fallback to console if file writing fails
28
- console.error('Debug log write failed:', error);
29
- console.log(...args);
30
- }
31
- }
32
- export function getDebugLogLocation() {
33
- return getDebugLogPath();
34
- }
35
- //# sourceMappingURL=debugLogger.js.map
36
- //# debugId=728d6d1d-2ed7-569b-8a04-bbe65558e2ba
@@ -1 +0,0 @@
1
- {"version":3,"file":"debugLogger.js","sources":["utils/debugLogger.ts"],"sourceRoot":"/","sourcesContent":["import { writeFileSync, existsSync, mkdirSync, appendFileSync } from 'node:fs';\nimport { join, dirname } from 'node:path';\nimport { randomBytes } from 'node:crypto';\n\nlet debugLogPath: string | null = null;\n\nfunction getDebugLogPath(): string {\n if (!debugLogPath) {\n const uniqueId = randomBytes(8).toString('hex');\n const debugDir = join(process.cwd(), '.tmp', uniqueId);\n \n if (!existsSync(debugDir)) {\n mkdirSync(debugDir, { recursive: true });\n }\n \n debugLogPath = join(debugDir, 'out.txt');\n }\n \n return debugLogPath;\n}\n\nexport function debugLog(...args: any[]): void {\n const logPath = getDebugLogPath();\n const timestamp = new Date().toISOString();\n const message = args.map(arg => \n typeof arg === 'object' ? JSON.stringify(arg, null, 2) : String(arg)\n ).join(' ');\n \n const logEntry = `[${timestamp}] ${message}\\n`;\n \n try {\n appendFileSync(logPath, logEntry);\n } catch (error) {\n // Fallback to console if file writing fails\n console.error('Debug log write failed:', error);\n console.log(...args);\n }\n}\n\nexport function getDebugLogLocation(): string {\n return getDebugLogPath();\n}"],"names":[],"mappings":";;AAAA,OAAO,EAAiB,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC/E,OAAO,EAAE,IAAI,EAAW,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,IAAI,YAAY,GAAkB,IAAI,CAAC;AAEvC,SAAS,eAAe;IACtB,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAChD,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;QAEvD,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC1B,SAAS,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAC3C,CAAC;QAED,YAAY,GAAG,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IAC3C,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,GAAG,IAAW;IACrC,MAAM,OAAO,GAAG,eAAe,EAAE,CAAC;IAClC,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC3C,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAC7B,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CACrE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAEZ,MAAM,QAAQ,GAAG,IAAI,SAAS,KAAK,OAAO,IAAI,CAAC;IAE/C,IAAI,CAAC;QACH,cAAc,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IACpC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,4CAA4C;QAC5C,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;QAChD,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;IACvB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,mBAAmB;IACjC,OAAO,eAAe,EAAE,CAAC;AAC3B,CAAC","debug_id":"728d6d1d-2ed7-569b-8a04-bbe65558e2ba"}
@@ -1,10 +0,0 @@
1
- export declare const mcpConfig: {
2
- mcpServers: {
3
- locadex: {
4
- command: string;
5
- args: string[];
6
- env: {};
7
- };
8
- };
9
- };
10
- //# sourceMappingURL=mcpConfig.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mcpConfig.d.ts","sourceRoot":"/","sources":["utils/mcpConfig.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;;;CAQrB,CAAC"}
@@ -1,13 +0,0 @@
1
-
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="7f14296e-5624-5b6f-8a78-0532dfec7bd1")}catch(e){}}();
3
- export const mcpConfig = {
4
- mcpServers: {
5
- locadex: {
6
- command: 'npx',
7
- args: ['-y', 'locadex-mcp'],
8
- env: {},
9
- },
10
- },
11
- };
12
- //# sourceMappingURL=mcpConfig.js.map
13
- //# debugId=7f14296e-5624-5b6f-8a78-0532dfec7bd1
@@ -1 +0,0 @@
1
- {"version":3,"file":"mcpConfig.js","sources":["utils/mcpConfig.ts"],"sourceRoot":"/","sourcesContent":["export const mcpConfig = {\n mcpServers: {\n locadex: {\n command: 'npx',\n args: ['-y', 'locadex-mcp'],\n env: {},\n },\n },\n};\n"],"names":[],"mappings":";;AAAA,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,UAAU,EAAE;QACV,OAAO,EAAE;YACP,OAAO,EAAE,KAAK;YACd,IAAI,EAAE,CAAC,IAAI,EAAE,aAAa,CAAC;YAC3B,GAAG,EAAE,EAAE;SACR;KACF;CACF,CAAC","debug_id":"7f14296e-5624-5b6f-8a78-0532dfec7bd1"}
@@ -1,2 +0,0 @@
1
- export declare function validateInitialConfig(): void;
2
- //# sourceMappingURL=validateConfig.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validateConfig.d.ts","sourceRoot":"/","sources":["utils/validateConfig.ts"],"names":[],"mappings":"AAEA,wBAAgB,qBAAqB,SAQpC"}
@@ -1,12 +0,0 @@
1
-
2
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="58e02bc2-5220-52f6-873e-12b0d3b04571")}catch(e){}}();
3
- import { logger } from '../logging/logger.js';
4
- export function validateInitialConfig() {
5
- // Validate ANTHROPIC_API_KEY
6
- if (!process.env.ANTHROPIC_API_KEY) {
7
- logger.error('ANTHROPIC_API_KEY is not set! Please set it as an environment variable or in a .env | .env.local file.');
8
- process.exit(1);
9
- }
10
- }
11
- //# sourceMappingURL=validateConfig.js.map
12
- //# debugId=58e02bc2-5220-52f6-873e-12b0d3b04571
@@ -1 +0,0 @@
1
- {"version":3,"file":"validateConfig.js","sources":["utils/validateConfig.ts"],"sourceRoot":"/","sourcesContent":["import { logger } from '../logging/logger.js';\n\nexport function validateInitialConfig() {\n // Validate ANTHROPIC_API_KEY\n if (!process.env.ANTHROPIC_API_KEY) {\n logger.error(\n 'ANTHROPIC_API_KEY is not set! Please set it as an environment variable or in a .env | .env.local file.'\n );\n process.exit(1);\n }\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,MAAM,UAAU,qBAAqB;IACnC,6BAA6B;IAC7B,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,CAAC;QACnC,MAAM,CAAC,KAAK,CACV,wGAAwG,CACzG,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC","debug_id":"58e02bc2-5220-52f6-873e-12b0d3b04571"}