locadex 0.0.1 → 0.0.2-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.locadex-mcp-stdio.json +9 -0
- package/.locadex-mcp.json +8 -0
- package/LICENSE.md +1 -1
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +59 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/i18n.d.ts +2 -0
- package/dist/commands/i18n.d.ts.map +1 -0
- package/dist/commands/i18n.js +215 -0
- package/dist/commands/i18n.js.map +1 -0
- package/dist/commands/setup.d.ts +2 -0
- package/dist/commands/setup.d.ts.map +1 -0
- package/dist/commands/setup.js +89 -0
- package/dist/commands/setup.js.map +1 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -68
- package/dist/index.js.map +1 -1
- package/dist/logging/console.d.ts +45 -0
- package/dist/logging/console.d.ts.map +1 -0
- package/dist/logging/console.js +134 -0
- package/dist/logging/console.js.map +1 -0
- package/dist/logging/constructInfo.d.ts +3 -0
- package/dist/logging/constructInfo.d.ts.map +1 -0
- package/dist/logging/constructInfo.js +15 -0
- package/dist/logging/constructInfo.js.map +1 -0
- package/dist/logging/logger.d.ts +24 -0
- package/dist/logging/logger.d.ts.map +1 -0
- package/dist/logging/logger.js +70 -0
- package/dist/logging/logger.js.map +1 -0
- package/dist/mcp/debugger.d.ts +3 -0
- package/dist/mcp/debugger.d.ts.map +1 -0
- package/dist/mcp/debugger.js +37 -0
- package/dist/mcp/debugger.js.map +1 -0
- package/dist/mcp/getDocs.d.ts.map +1 -0
- package/dist/mcp/getDocs.js +56 -0
- package/dist/mcp/getDocs.js.map +1 -0
- package/dist/mcp/getGuide.d.ts +5 -0
- package/dist/mcp/getGuide.d.ts.map +1 -0
- package/dist/mcp/getGuide.js +17 -0
- package/dist/mcp/getGuide.js.map +1 -0
- package/dist/{tools → mcp/tools}/docs.d.ts +3 -0
- package/dist/mcp/tools/docs.d.ts.map +1 -0
- package/dist/mcp/tools/docs.js +86 -0
- package/dist/mcp/tools/docs.js.map +1 -0
- package/dist/mcp/tools/fileManager.d.ts +6 -0
- package/dist/mcp/tools/fileManager.d.ts.map +1 -0
- package/dist/mcp/tools/fileManager.js +233 -0
- package/dist/mcp/tools/fileManager.js.map +1 -0
- package/dist/mcp/tools/guides.d.ts +11 -0
- package/dist/mcp/tools/guides.d.ts.map +1 -0
- package/dist/mcp/tools/guides.js +130 -0
- package/dist/mcp/tools/guides.js.map +1 -0
- package/dist/mcp-sse.d.ts +3 -0
- package/dist/mcp-sse.d.ts.map +1 -0
- package/dist/mcp-sse.js +72 -0
- package/dist/mcp-sse.js.map +1 -0
- package/dist/mcp.d.ts +3 -0
- package/dist/mcp.d.ts.map +1 -0
- package/dist/mcp.js +36 -0
- package/dist/mcp.js.map +1 -0
- package/dist/prompts/system.d.ts +4 -0
- package/dist/prompts/system.d.ts.map +1 -0
- package/dist/prompts/system.js +23 -0
- package/dist/prompts/system.js.map +1 -0
- package/dist/telemetry.d.ts +11 -0
- package/dist/telemetry.d.ts.map +1 -0
- package/dist/telemetry.js +104 -0
- package/dist/telemetry.js.map +1 -0
- package/dist/types/claude-sdk.d.ts +39 -0
- package/dist/types/claude-sdk.d.ts.map +1 -0
- package/dist/types/claude-sdk.js +5 -0
- package/dist/types/claude-sdk.js.map +1 -0
- package/dist/types/cli.d.ts +7 -0
- package/dist/types/cli.d.ts.map +1 -0
- package/dist/types/cli.js +5 -0
- package/dist/types/cli.js.map +1 -0
- package/dist/utils/agentManager.d.ts +22 -0
- package/dist/utils/agentManager.d.ts.map +1 -0
- package/dist/utils/agentManager.js +110 -0
- package/dist/utils/agentManager.js.map +1 -0
- package/dist/utils/claudeCode.d.ts +24 -0
- package/dist/utils/claudeCode.d.ts.map +1 -0
- package/dist/utils/claudeCode.js +167 -0
- package/dist/utils/claudeCode.js.map +1 -0
- package/dist/utils/dag/createDag.d.ts +24 -0
- package/dist/utils/dag/createDag.d.ts.map +1 -0
- package/dist/utils/dag/createDag.js +175 -0
- package/dist/utils/dag/createDag.js.map +1 -0
- package/dist/utils/debugLogger.d.ts +3 -0
- package/dist/utils/debugLogger.d.ts.map +1 -0
- package/dist/utils/debugLogger.js +36 -0
- package/dist/utils/debugLogger.js.map +1 -0
- package/dist/utils/fs/findConfigs.d.ts +11 -0
- package/dist/utils/fs/findConfigs.d.ts.map +1 -0
- package/dist/utils/fs/findConfigs.js +63 -0
- package/dist/utils/fs/findConfigs.js.map +1 -0
- package/dist/utils/fs/getFiles.d.ts +2 -0
- package/dist/utils/fs/getFiles.d.ts.map +1 -0
- package/dist/utils/fs/getFiles.js +8 -0
- package/dist/utils/fs/getFiles.js.map +1 -0
- package/dist/utils/fs/writeFiles.d.ts +2 -0
- package/dist/utils/fs/writeFiles.d.ts.map +1 -0
- package/dist/utils/fs/writeFiles.js +19 -0
- package/dist/utils/fs/writeFiles.js.map +1 -0
- package/dist/utils/getFiles.d.ts +30 -0
- package/dist/utils/getFiles.d.ts.map +1 -0
- package/dist/utils/getFiles.js +152 -0
- package/dist/utils/getFiles.js.map +1 -0
- package/dist/utils/getPaths.d.ts +1 -0
- package/dist/utils/getPaths.d.ts.map +1 -1
- package/dist/utils/getPaths.js +19 -3
- package/dist/utils/getPaths.js.map +1 -1
- package/dist/utils/mcpConfig.d.ts +10 -0
- package/dist/utils/mcpConfig.d.ts.map +1 -0
- package/dist/utils/mcpConfig.js +13 -0
- package/dist/utils/mcpConfig.js.map +1 -0
- package/dist/utils/shared.d.ts +2 -0
- package/dist/utils/shared.d.ts.map +1 -0
- package/dist/utils/shared.js +15 -0
- package/dist/utils/shared.js.map +1 -0
- package/dist/utils/validateConfig.d.ts +2 -0
- package/dist/utils/validateConfig.d.ts.map +1 -0
- package/dist/utils/validateConfig.js +12 -0
- package/dist/utils/validateConfig.js.map +1 -0
- package/guides/next/advanced/complicated-mapping-expressions.md +200 -0
- package/guides/next/advanced/interpolated-strings.md +162 -0
- package/guides/next/advanced/migrating.md +86 -0
- package/guides/next/advanced/ternary-operators.md +217 -0
- package/guides/next/advanced/var-outside-client-component.md +446 -0
- package/guides/next/advanced/var-outside-client-server-component.md +550 -0
- package/guides/next/advanced/var-outside-server-component.md +545 -0
- package/guides/next/basic/branches.md +282 -0
- package/guides/next/basic/client-side-components.md +214 -0
- package/guides/next/basic/jsx.md +259 -0
- package/guides/next/basic/locale-selector.md +5 -0
- package/guides/next/basic/server-side-components.md +164 -0
- package/guides/next/basic/setup.md +139 -0
- package/guides/next/basic/translating-html.md +36 -0
- package/guides/next/basic/variables.md +185 -0
- package/guides/next/important/functions.md +37 -0
- package/package.json +32 -13
- package/dist/resources/docs.d.ts +0 -4
- package/dist/resources/docs.d.ts.map +0 -1
- package/dist/resources/docs.js +0 -176
- package/dist/resources/docs.js.map +0 -1
- package/dist/tools/docs.d.ts.map +0 -1
- package/dist/tools/docs.js +0 -140
- package/dist/tools/docs.js.map +0 -1
- package/dist/utils/getDocs.d.ts.map +0 -1
- package/dist/utils/getDocs.js +0 -113
- package/dist/utils/getDocs.js.map +0 -1
- /package/dist/{utils → mcp}/getDocs.d.ts +0 -0
|
@@ -0,0 +1,134 @@
|
|
|
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]="7181b308-455d-5583-992c-ba368ab8004a")}catch(e){}}();
|
|
3
|
+
import { log, spinner, intro, outro, text, select, confirm, isCancel, cancel, multiselect, taskLog, } from '@clack/prompts';
|
|
4
|
+
import chalk from 'chalk';
|
|
5
|
+
import { getLocadexVersion } from '../utils/getPaths.js';
|
|
6
|
+
// Basic logging functions
|
|
7
|
+
export function logInfo(message) {
|
|
8
|
+
log.info(message);
|
|
9
|
+
}
|
|
10
|
+
export function logWarning(message) {
|
|
11
|
+
log.warn(message);
|
|
12
|
+
}
|
|
13
|
+
export function logError(message) {
|
|
14
|
+
log.error(message);
|
|
15
|
+
}
|
|
16
|
+
export function logSuccess(message) {
|
|
17
|
+
log.success(message);
|
|
18
|
+
}
|
|
19
|
+
export function logStep(message) {
|
|
20
|
+
log.step(message);
|
|
21
|
+
}
|
|
22
|
+
export function logMessage(message) {
|
|
23
|
+
log.message(message, { symbol: chalk.cyan('~') });
|
|
24
|
+
}
|
|
25
|
+
export function logErrorAndExit(message) {
|
|
26
|
+
log.error(message);
|
|
27
|
+
process.exit(1);
|
|
28
|
+
}
|
|
29
|
+
// Clack prompts
|
|
30
|
+
export function startCommand(message) {
|
|
31
|
+
intro(chalk.cyan(message));
|
|
32
|
+
}
|
|
33
|
+
export function endCommand(message) {
|
|
34
|
+
outro(chalk.cyan(message));
|
|
35
|
+
}
|
|
36
|
+
// GT specific logging
|
|
37
|
+
export function displayHeader() {
|
|
38
|
+
displayAsciiTitle();
|
|
39
|
+
displayInitializingText();
|
|
40
|
+
startCommand(chalk.cyan(`Locadex v${getLocadexVersion()}`));
|
|
41
|
+
}
|
|
42
|
+
function displayAsciiTitle() {
|
|
43
|
+
// eslint-disable-next-line no-console
|
|
44
|
+
console.log(chalk.cyan(`\n ,ad8888ba, 888888888888
|
|
45
|
+
d8"' \`"8b 88
|
|
46
|
+
d8' 88
|
|
47
|
+
88 88
|
|
48
|
+
88 88888 88
|
|
49
|
+
Y8, 88 88
|
|
50
|
+
Y8a. .a88 88
|
|
51
|
+
\`"Y88888P" 88 `));
|
|
52
|
+
}
|
|
53
|
+
function displayInitializingText() {
|
|
54
|
+
// eslint-disable-next-line no-console
|
|
55
|
+
console.log(`\n${chalk.bold.blue('General Translation, Inc.')}
|
|
56
|
+
${chalk.dim('https://generaltranslation.com/docs')}
|
|
57
|
+
|
|
58
|
+
${chalk.dim('Locadex uses Sentry and PostHog to collect anonymous telemetry data. You can opt out by running with the --no-telemetry flag.')}
|
|
59
|
+
`);
|
|
60
|
+
}
|
|
61
|
+
// Spinner functionality
|
|
62
|
+
export function createSpinner(indicator = 'timer') {
|
|
63
|
+
return spinner({ indicator });
|
|
64
|
+
}
|
|
65
|
+
// Input prompts
|
|
66
|
+
export async function promptText({ message, defaultValue, validate, }) {
|
|
67
|
+
const result = await text({
|
|
68
|
+
message,
|
|
69
|
+
placeholder: defaultValue,
|
|
70
|
+
validate: validate
|
|
71
|
+
? (value) => {
|
|
72
|
+
const validation = validate(value || '');
|
|
73
|
+
return validation === true ? undefined : validation.toString();
|
|
74
|
+
}
|
|
75
|
+
: undefined,
|
|
76
|
+
});
|
|
77
|
+
if (isCancel(result)) {
|
|
78
|
+
cancel('Operation cancelled');
|
|
79
|
+
process.exit(0);
|
|
80
|
+
}
|
|
81
|
+
return result;
|
|
82
|
+
}
|
|
83
|
+
export async function promptSelect({ message, options, defaultValue, }) {
|
|
84
|
+
// Convert options to the format expected by clack
|
|
85
|
+
const clackOptions = options.map((opt) => ({
|
|
86
|
+
value: opt.value,
|
|
87
|
+
label: opt.label,
|
|
88
|
+
hint: opt.hint,
|
|
89
|
+
}));
|
|
90
|
+
const result = await select({
|
|
91
|
+
message,
|
|
92
|
+
options: clackOptions,
|
|
93
|
+
initialValue: defaultValue,
|
|
94
|
+
});
|
|
95
|
+
if (isCancel(result)) {
|
|
96
|
+
cancel('Operation cancelled');
|
|
97
|
+
process.exit(0);
|
|
98
|
+
}
|
|
99
|
+
return result;
|
|
100
|
+
}
|
|
101
|
+
export async function promptMultiSelect({ message, options, required = true, }) {
|
|
102
|
+
// Convert options to the format expected by clack
|
|
103
|
+
const clackOptions = options.map((opt) => ({
|
|
104
|
+
value: opt.value,
|
|
105
|
+
label: opt.label,
|
|
106
|
+
hint: opt.hint,
|
|
107
|
+
}));
|
|
108
|
+
const result = await multiselect({
|
|
109
|
+
message,
|
|
110
|
+
options: clackOptions,
|
|
111
|
+
required,
|
|
112
|
+
});
|
|
113
|
+
if (isCancel(result)) {
|
|
114
|
+
cancel('Operation cancelled');
|
|
115
|
+
process.exit(0);
|
|
116
|
+
}
|
|
117
|
+
return result;
|
|
118
|
+
}
|
|
119
|
+
export async function promptConfirm({ message, defaultValue = true, cancelMessage = 'Operation cancelled', }) {
|
|
120
|
+
const result = await confirm({
|
|
121
|
+
message,
|
|
122
|
+
initialValue: defaultValue,
|
|
123
|
+
});
|
|
124
|
+
if (isCancel(result)) {
|
|
125
|
+
cancel(cancelMessage);
|
|
126
|
+
process.exit(0);
|
|
127
|
+
}
|
|
128
|
+
return result;
|
|
129
|
+
}
|
|
130
|
+
export function createTaskLogger(message) {
|
|
131
|
+
return taskLog({ title: message });
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=console.js.map
|
|
134
|
+
//# debugId=7181b308-455d-5583-992c-ba368ab8004a
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"console.js","sources":["logging/console.ts"],"sourceRoot":"/","sourcesContent":["import {\n log,\n spinner,\n intro,\n outro,\n text,\n select,\n confirm,\n isCancel,\n cancel,\n multiselect,\n taskLog,\n} from '@clack/prompts';\nimport chalk from 'chalk';\nimport { getLocadexVersion } from '../utils/getPaths.js';\n\n// Basic logging functions\nexport function logInfo(message: string) {\n log.info(message);\n}\nexport function logWarning(message: string) {\n log.warn(message);\n}\nexport function logError(message: string) {\n log.error(message);\n}\nexport function logSuccess(message: string) {\n log.success(message);\n}\nexport function logStep(message: string) {\n log.step(message);\n}\nexport function logMessage(message: string) {\n log.message(message, { symbol: chalk.cyan('~') });\n}\n\nexport function logErrorAndExit(message: string) {\n log.error(message);\n process.exit(1);\n}\n\n// Clack prompts\nexport function startCommand(message: string) {\n intro(chalk.cyan(message));\n}\nexport function endCommand(message: string) {\n outro(chalk.cyan(message));\n}\n\n// GT specific logging\nexport function displayHeader() {\n displayAsciiTitle();\n displayInitializingText();\n startCommand(chalk.cyan(`Locadex v${getLocadexVersion()}`));\n}\n\nfunction displayAsciiTitle() {\n // eslint-disable-next-line no-console\n console.log(\n chalk.cyan(\n `\\n ,ad8888ba, 888888888888 \n d8\"' \\`\"8b 88 \nd8' 88 \n88 88 \n88 88888 88 \nY8, 88 88 \n Y8a. .a88 88 \n \\`\"Y88888P\" 88 `\n )\n );\n}\n\nfunction displayInitializingText() {\n // eslint-disable-next-line no-console\n console.log(\n `\\n${chalk.bold.blue('General Translation, Inc.')}\n${chalk.dim('https://generaltranslation.com/docs')}\n\n${chalk.dim('Locadex uses Sentry and PostHog to collect anonymous telemetry data. You can opt out by running with the --no-telemetry flag.')}\n`\n );\n}\n\n// Spinner functionality\nexport function createSpinner(indicator: 'dots' | 'timer' = 'timer') {\n return spinner({ indicator });\n}\n\n// Input prompts\nexport async function promptText({\n message,\n defaultValue,\n validate,\n}: {\n message: string;\n defaultValue?: string;\n validate?: (value: string) => boolean | string;\n}) {\n const result = await text({\n message,\n placeholder: defaultValue,\n validate: validate\n ? (value) => {\n const validation = validate(value || '');\n return validation === true ? undefined : validation.toString();\n }\n : undefined,\n });\n\n if (isCancel(result)) {\n cancel('Operation cancelled');\n process.exit(0);\n }\n\n return result;\n}\n\nexport async function promptSelect<T>({\n message,\n options,\n defaultValue,\n}: {\n message: string;\n options: Array<{ value: T; label: string; hint?: string }>;\n defaultValue?: T;\n}) {\n // Convert options to the format expected by clack\n const clackOptions = options.map((opt) => ({\n value: opt.value,\n label: opt.label,\n hint: opt.hint,\n }));\n\n const result = await select({\n message,\n options: clackOptions as any,\n initialValue: defaultValue,\n });\n\n if (isCancel(result)) {\n cancel('Operation cancelled');\n process.exit(0);\n }\n\n return result as T;\n}\n\nexport async function promptMultiSelect<T extends string>({\n message,\n options,\n required = true,\n}: {\n message: string;\n options: Array<{ value: T; label: string; hint?: string }>;\n required?: boolean;\n}) {\n // Convert options to the format expected by clack\n const clackOptions = options.map((opt) => ({\n value: opt.value,\n label: opt.label,\n hint: opt.hint,\n }));\n\n const result = await multiselect({\n message,\n options: clackOptions as any,\n required,\n });\n\n if (isCancel(result)) {\n cancel('Operation cancelled');\n process.exit(0);\n }\n\n return result as Array<T>;\n}\n\nexport async function promptConfirm({\n message,\n defaultValue = true,\n cancelMessage = 'Operation cancelled',\n}: {\n message: string;\n defaultValue?: boolean;\n cancelMessage?: string;\n}) {\n const result = await confirm({\n message,\n initialValue: defaultValue,\n });\n\n if (isCancel(result)) {\n cancel(cancelMessage);\n process.exit(0);\n }\n\n return result;\n}\n\nexport function createTaskLogger(message: string) {\n return taskLog({ title: message });\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EACL,GAAG,EACH,OAAO,EACP,KAAK,EACL,KAAK,EACL,IAAI,EACJ,MAAM,EACN,OAAO,EACP,QAAQ,EACR,MAAM,EACN,WAAW,EACX,OAAO,GACR,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,0BAA0B;AAC1B,MAAM,UAAU,OAAO,CAAC,OAAe;IACrC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACpB,CAAC;AACD,MAAM,UAAU,UAAU,CAAC,OAAe;IACxC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACpB,CAAC;AACD,MAAM,UAAU,QAAQ,CAAC,OAAe;IACtC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AACrB,CAAC;AACD,MAAM,UAAU,UAAU,CAAC,OAAe;IACxC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AACvB,CAAC;AACD,MAAM,UAAU,OAAO,CAAC,OAAe;IACrC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACpB,CAAC;AACD,MAAM,UAAU,UAAU,CAAC,OAAe;IACxC,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,eAAe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gB,UAc3D"}
|
|
@@ -0,0 +1,15 @@
|
|
|
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]="82a0b27e-2354-5b05-88ad-9a8482391e79")}catch(e){}}();
|
|
3
|
+
export function constructResultInfo(result) {
|
|
4
|
+
if (result.type === 'result') {
|
|
5
|
+
if (result.subtype === 'success') {
|
|
6
|
+
return `Done!\nCost: $${Number(result.cost_usd).toFixed(2)}\nDuration: ${Number(result.duration_ms) / 1000}s`;
|
|
7
|
+
}
|
|
8
|
+
else {
|
|
9
|
+
return `Error: ${result.subtype}\nCost: $${result.cost_usd}\nDuration: ${Number(result.duration_ms) / 1000}s`;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
return '';
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=constructInfo.js.map
|
|
15
|
+
//# debugId=82a0b27e-2354-5b05-88ad-9a8482391e79
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constructInfo.js","sources":["logging/constructInfo.ts"],"sourceRoot":"/","sourcesContent":["import { ClaudeSDKMessage } from '../types/claude-sdk.js';\n\nexport function constructResultInfo(result: ClaudeSDKMessage) {\n if (result.type === 'result') {\n if (result.subtype === 'success') {\n return `Done!\\nCost: $${Number(result.cost_usd).toFixed(2)}\\nDuration: ${\n Number(result.duration_ms) / 1000\n }s`;\n } else {\n return `Error: ${result.subtype}\\nCost: $${result.cost_usd}\\nDuration: ${\n Number(result.duration_ms) / 1000\n }s`;\n }\n }\n\n return '';\n}\n"],"names":[],"mappings":";;AAEA,MAAM,UAAU,mBAAmB,CAAC,MAAwB;IAC1D,IAAI,MAAM,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,IAAI,MAAM,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;YACjC,OAAO,iBAAiB,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,eACxD,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,IAC/B,GAAG,CAAC;QACN,CAAC;aAAM,CAAC;YACN,OAAO,UAAU,MAAM,CAAC,OAAO,YAAY,MAAM,CAAC,QAAQ,eACxD,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,IAC/B,GAAG,CAAC;QACN,CAAC;IACH,CAAC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC","debug_id":"82a0b27e-2354-5b05-88ad-9a8482391e79"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CliOptions } from '../types/cli.js';
|
|
2
|
+
declare class Logger {
|
|
3
|
+
private static instance;
|
|
4
|
+
private _verbose;
|
|
5
|
+
private _debug;
|
|
6
|
+
private constructor();
|
|
7
|
+
static getInstance(): Logger;
|
|
8
|
+
initialize(options: CliOptions): void;
|
|
9
|
+
get verbose(): boolean;
|
|
10
|
+
get debug(): boolean;
|
|
11
|
+
reset(): void;
|
|
12
|
+
info(message: string): void;
|
|
13
|
+
warning(message: string): void;
|
|
14
|
+
error(message: string): void;
|
|
15
|
+
success(message: string): void;
|
|
16
|
+
step(message: string): void;
|
|
17
|
+
message(message: string): void;
|
|
18
|
+
errorAndExit(message: string): void;
|
|
19
|
+
verboseMessage(message: string): void;
|
|
20
|
+
debugMessage(message: string): void;
|
|
21
|
+
}
|
|
22
|
+
export declare const logger: Logger;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"/","sources":["logging/logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAW7C,cAAM,MAAM;IACV,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAkB;IAClC,OAAO,CAAC,MAAM,CAAkB;IAEhC,OAAO;IAEP,MAAM,CAAC,WAAW,IAAI,MAAM;IAO5B,UAAU,CAAC,OAAO,EAAE,UAAU,GAAG,IAAI;IAUrC,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,IAAI,KAAK,IAAI,OAAO,CAEnB;IAED,KAAK,IAAI,IAAI;IAMb,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI3B,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI9B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI5B,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI9B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI3B,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAI9B,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAKnC,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAMrC,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;CAKpC;AAED,eAAO,MAAM,MAAM,QAAuB,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
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]="f1d3e974-9f19-5a69-b64a-94df87136b4c")}catch(e){}}();
|
|
3
|
+
import { logInfo, logWarning, logError, logSuccess, logStep, logMessage, logErrorAndExit, } from './console.js';
|
|
4
|
+
class Logger {
|
|
5
|
+
static instance;
|
|
6
|
+
_verbose = false;
|
|
7
|
+
_debug = false;
|
|
8
|
+
constructor() { }
|
|
9
|
+
static getInstance() {
|
|
10
|
+
if (!Logger.instance) {
|
|
11
|
+
Logger.instance = new Logger();
|
|
12
|
+
}
|
|
13
|
+
return Logger.instance;
|
|
14
|
+
}
|
|
15
|
+
initialize(options) {
|
|
16
|
+
if (options.debug) {
|
|
17
|
+
this._debug = true;
|
|
18
|
+
this._verbose = true;
|
|
19
|
+
}
|
|
20
|
+
if (options.verbose) {
|
|
21
|
+
this._verbose = true;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
get verbose() {
|
|
25
|
+
return this._verbose;
|
|
26
|
+
}
|
|
27
|
+
get debug() {
|
|
28
|
+
return this._debug;
|
|
29
|
+
}
|
|
30
|
+
reset() {
|
|
31
|
+
this._verbose = false;
|
|
32
|
+
this._debug = false;
|
|
33
|
+
}
|
|
34
|
+
// Basic logging methods using existing console functions
|
|
35
|
+
info(message) {
|
|
36
|
+
logInfo(message);
|
|
37
|
+
}
|
|
38
|
+
warning(message) {
|
|
39
|
+
logWarning(message);
|
|
40
|
+
}
|
|
41
|
+
error(message) {
|
|
42
|
+
logError(message);
|
|
43
|
+
}
|
|
44
|
+
success(message) {
|
|
45
|
+
logSuccess(message);
|
|
46
|
+
}
|
|
47
|
+
step(message) {
|
|
48
|
+
logStep(message);
|
|
49
|
+
}
|
|
50
|
+
message(message) {
|
|
51
|
+
logMessage(message);
|
|
52
|
+
}
|
|
53
|
+
errorAndExit(message) {
|
|
54
|
+
logErrorAndExit(message);
|
|
55
|
+
}
|
|
56
|
+
// Conditional logging methods
|
|
57
|
+
verboseMessage(message) {
|
|
58
|
+
if (this._verbose) {
|
|
59
|
+
this.message(message);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
debugMessage(message) {
|
|
63
|
+
if (this._debug) {
|
|
64
|
+
this.message(`[locadex] ${message}`);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
export const logger = Logger.getInstance();
|
|
69
|
+
//# sourceMappingURL=logger.js.map
|
|
70
|
+
//# debugId=f1d3e974-9f19-5a69-b64a-94df87136b4c
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.js","sources":["logging/logger.ts"],"sourceRoot":"/","sourcesContent":["import { CliOptions } from '../types/cli.js';\nimport {\n logInfo,\n logWarning,\n logError,\n logSuccess,\n logStep,\n logMessage,\n logErrorAndExit,\n} from './console.js';\n\nclass Logger {\n private static instance: Logger;\n private _verbose: boolean = false;\n private _debug: boolean = false;\n\n private constructor() {}\n\n static getInstance(): Logger {\n if (!Logger.instance) {\n Logger.instance = new Logger();\n }\n return Logger.instance;\n }\n\n initialize(options: CliOptions): void {\n if (options.debug) {\n this._debug = true;\n this._verbose = true;\n }\n if (options.verbose) {\n this._verbose = true;\n }\n }\n\n get verbose(): boolean {\n return this._verbose;\n }\n\n get debug(): boolean {\n return this._debug;\n }\n\n reset(): void {\n this._verbose = false;\n this._debug = false;\n }\n\n // Basic logging methods using existing console functions\n info(message: string): void {\n logInfo(message);\n }\n\n warning(message: string): void {\n logWarning(message);\n }\n\n error(message: string): void {\n logError(message);\n }\n\n success(message: string): void {\n logSuccess(message);\n }\n\n step(message: string): void {\n logStep(message);\n }\n\n message(message: string): void {\n logMessage(message);\n }\n\n errorAndExit(message: string): void {\n logErrorAndExit(message);\n }\n\n // Conditional logging methods\n verboseMessage(message: string): void {\n if (this._verbose) {\n this.message(message);\n }\n }\n\n debugMessage(message: string): void {\n if (this._debug) {\n this.message(`[locadex] ${message}`);\n }\n }\n}\n\nexport const logger = Logger.getInstance();\n"],"names":[],"mappings":";;AACA,OAAO,EACL,OAAO,EACP,UAAU,EACV,QAAQ,EACR,UAAU,EACV,OAAO,EACP,UAAU,EACV,eAAe,GAChB,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM;IACF,MAAM,CAAC,QAAQ,CAAS;IACxB,QAAQ,GAAY,KAAK,CAAC;IAC1B,MAAM,GAAY,KAAK,CAAC;IAEhC,gBAAuB,CAAC;IAExB,MAAM,CAAC,WAAW;QAChB,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;YACrB,MAA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AO,CAAC,OAAO,CAAC,CAAC;QACxB,CAAC;IACH,CAAC;IAED,YAAY,CAAC,OAAe;QAC1B,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,IAAI,CAAC,OAAO,CAAC,aAAa,OAAO,EAAE,CAAC,CAAC;QACvC,CAAC;IACH,CAAC;CACF;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC","debug_id":"f1d3e974-9f19-5a69-b64a-94df87136b4c"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debugger.d.ts","sourceRoot":"/","sources":["mcp/debugger.ts"],"names":[],"mappings":"AAqBA,wBAAgB,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI,CAiB1C;AAED,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
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]="0329310b-d542-544f-a626-1c13dd43b861")}catch(e){}}();
|
|
3
|
+
import { appendFileSync, existsSync, mkdirSync } 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 debug(...args) {
|
|
19
|
+
const logPath = getDebugLogPath();
|
|
20
|
+
const timestamp = new Date().toISOString();
|
|
21
|
+
const message = args
|
|
22
|
+
.map((arg) => typeof arg === 'object' ? JSON.stringify(arg, null, 2) : String(arg))
|
|
23
|
+
.join(' ');
|
|
24
|
+
const logEntry = `[${timestamp}] ${message}\n`;
|
|
25
|
+
try {
|
|
26
|
+
appendFileSync(logPath, logEntry);
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
// Fallback to console if file writing fails
|
|
30
|
+
console.error('Debug log write failed:', error);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
export function getDebugLocation() {
|
|
34
|
+
return getDebugLogPath();
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=debugger.js.map
|
|
37
|
+
//# debugId=0329310b-d542-544f-a626-1c13dd43b861
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debugger.js","sources":["mcp/debugger.ts"],"sourceRoot":"/","sourcesContent":["import { appendFileSync, existsSync, mkdirSync } from 'node:fs';\nimport { join } 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 debug(...args: any[]): void {\n const logPath = getDebugLogPath();\n const timestamp = new Date().toISOString();\n const message = args\n .map((arg) =>\n typeof arg === 'object' ? JSON.stringify(arg, null, 2) : String(arg)\n )\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 }\n}\n\nexport function getDebugLocation(): string {\n return getDebugLogPath();\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,OAAO,EAAE,QAAQ,CAAC,CAAC;IACpC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,4CAA4C;QAC5C,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC;IAClD,CAAC;AACH,CAAC;AAED,MAAM,UAAU,gBAAgB;IAC9B,OAAO,eAAe,EAAE,CAAC;AAC3B,CAAC","debug_id":"0329310b-d542-544f-a626-1c13dd43b861"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDocs.d.ts","sourceRoot":"/","sources":["mcp/getDocs.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,sGAC8E,CAAC;AAEtG,eAAO,MAAM,QAAQ,wCAAwC,CAAC;AAE9D,eAAO,MAAM,OAAO,GAAU,MAAM,MAAM,2BAWzC,CAAC;AAUF,eAAO,MAAM,SAAS,QAAgB,CAAC;AAEvC;;;GAGG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAwCnE"}
|
|
@@ -0,0 +1,56 @@
|
|
|
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]="c0126d24-a41a-57dc-a8f8-9b226f1c7ce3")}catch(e){}}();
|
|
3
|
+
export const GITHUB_URL = 'https://raw.githubusercontent.com/generaltranslation/gt/refs/heads/main/apps/docs/content/docs/en';
|
|
4
|
+
export const DOCS_URL = 'https://docs.generaltranslation.app';
|
|
5
|
+
export const getDocs = async (path) => {
|
|
6
|
+
const url = `${GITHUB_URL}/${path}`;
|
|
7
|
+
console.error(`Fetching document from: ${url}`);
|
|
8
|
+
try {
|
|
9
|
+
const response = await fetch(url);
|
|
10
|
+
return response.text();
|
|
11
|
+
}
|
|
12
|
+
catch (error) {
|
|
13
|
+
console.error(`Error fetching ${path}:`, error);
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
// Cache with 5-minute expiration
|
|
18
|
+
const cache = {};
|
|
19
|
+
export const CACHE_TTL = 5 * 60 * 1000; // 5 minutes in milliseconds
|
|
20
|
+
/**
|
|
21
|
+
* Fetches content from the docs URL with caching
|
|
22
|
+
* Refreshes cache every 5 minutes
|
|
23
|
+
*/
|
|
24
|
+
export async function fetchDocContent(path) {
|
|
25
|
+
const now = Date.now();
|
|
26
|
+
// Check if we have a valid cached entry
|
|
27
|
+
if (cache[path] && now - cache[path].timestamp < CACHE_TTL) {
|
|
28
|
+
return cache[path].content;
|
|
29
|
+
}
|
|
30
|
+
const url = `${DOCS_URL}/${path}`;
|
|
31
|
+
console.error(`Fetching document from: ${url}`);
|
|
32
|
+
try {
|
|
33
|
+
const response = await fetch(url);
|
|
34
|
+
if (!response.ok) {
|
|
35
|
+
throw new Error(`Failed to fetch ${path}: ${response.status} ${response.statusText}`);
|
|
36
|
+
}
|
|
37
|
+
const content = await response.text();
|
|
38
|
+
// Update cache
|
|
39
|
+
cache[path] = {
|
|
40
|
+
content,
|
|
41
|
+
timestamp: now,
|
|
42
|
+
};
|
|
43
|
+
return content;
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
console.error(`Error fetching ${path}:`, error);
|
|
47
|
+
// Return cached content if available, even if expired
|
|
48
|
+
if (cache[path]) {
|
|
49
|
+
console.error(`Returning stale cached content for ${path}`);
|
|
50
|
+
return cache[path].content;
|
|
51
|
+
}
|
|
52
|
+
throw error;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=getDocs.js.map
|
|
56
|
+
//# debugId=c0126d24-a41a-57dc-a8f8-9b226f1c7ce3
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDocs.js","sources":["mcp/getDocs.ts"],"sourceRoot":"/","sourcesContent":["export const GITHUB_URL =\n 'https://raw.githubusercontent.com/generaltranslation/gt/refs/heads/main/apps/docs/content/docs/en';\n\nexport const DOCS_URL = 'https://docs.generaltranslation.app';\n\nexport const getDocs = async (path: string) => {\n const url = `${GITHUB_URL}/${path}`;\n console.error(`Fetching document from: ${url}`);\n\n try {\n const response = await fetch(url);\n return response.text();\n } catch (error) {\n console.error(`Error fetching ${path}:`, error);\n return null;\n }\n};\n\n// Cache for storing fetched docs with expiration\ninterface CacheEntry {\n content: string;\n timestamp: number;\n}\n\n// Cache with 5-minute expiration\nconst cache: Record<string, CacheEntry> = {};\nexport const CACHE_TTL = 5 * 60 * 1000; // 5 minutes in milliseconds\n\n/**\n * Fetches content from the docs URL with caching\n * Refreshes cache every 5 minutes\n */\nexport async function fetchDocContent(path: string): Promise<string> {\n const now = Date.now();\n\n // Check if we have a valid cached entry\n if (cache[path] && now - cache[path].timestamp < CACHE_TTL) {\n return cache[path].content;\n }\n\n const url = `${DOCS_URL}/${path}`;\n console.error(`Fetching document from: ${url}`);\n\n try {\n const response = await fetch(url);\n\n if (!response.ok) {\n throw new Error(\n `Failed to fetch ${path}: ${response.status} ${response.statusText}`\n );\n }\n\n const content = await response.text();\n\n // Update cache\n cache[path] = {\n content,\n timestamp: now,\n };\n\n return content;\n } catch (error) {\n console.error(`Error fetching ${path}:`, error);\n\n // Return cached content if available, even if expired\n if (cache[path]) {\n console.error(`Returning stale cached content for ${path}`);\n return cache[path].content;\n }\n\n throw error;\n }\n}\n"],"names":[],"mappings":";;AAAA,MAAM,CAAC,MAAM,UAAU,GACrB,mGAAmG,CAAC;AAEtG,MAAM,CAAC,MAAM,QAAQ,GAAG,qCAAqC,CAAC;AAE9D,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,IAAY,EAAE,EAAE;IAC5C,MAAM,GAAG,GAAG,GAAG,UAAU,IAAI,IAAI,EAAE,CAAC;IACpC,OAAO,CAAC,KAAK,CAAC,2BAA2B,GAAG,EAAE,CAAC,CAAC;I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,OAAO;YACP,SAAS,EAAE,GAAG;SACf,CAAC;QAEF,OAAO,OAAO,CAAC;IACjB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,kBAAkB,IAAI,GAAG,EAAE,KAAK,CAAC,CAAC;QAEhD,sDAAsD;QACtD,IAAI,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;YAChB,OAAO,CAAC,KAAK,CAAC,sCAAsC,IAAI,EAAE,CAAC,CAAC;YAC5D,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC;QAC7B,CAAC;QAED,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC","debug_id":"c0126d24-a41a-57dc-a8f8-9b226f1c7ce3"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getGuide.d.ts","sourceRoot":"/","sources":["mcp/getGuide.ts"],"names":[],"mappings":"AAGA,wBAA8B,QAAQ,CACpC,IAAI,EAAE,MAAM,GACX,OAAO,CAAC;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAS/C"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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]="19738121-3425-5eef-af1f-7d1a526b0be4")}catch(e){}}();
|
|
3
|
+
import { readFile } from 'node:fs/promises';
|
|
4
|
+
import { fromPackageRoot } from '../utils/getPaths.js';
|
|
5
|
+
export default async function getGuide(path) {
|
|
6
|
+
try {
|
|
7
|
+
const filePath = fromPackageRoot(path);
|
|
8
|
+
const content = await readFile(filePath, 'utf-8');
|
|
9
|
+
return { content };
|
|
10
|
+
}
|
|
11
|
+
catch (error) {
|
|
12
|
+
console.error(`Error reading guide ${path}:`, error);
|
|
13
|
+
return { error: error instanceof Error ? error.message : String(error) };
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=getGuide.js.map
|
|
17
|
+
//# debugId=19738121-3425-5eef-af1f-7d1a526b0be4
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getGuide.js","sources":["mcp/getGuide.ts"],"sourceRoot":"/","sourcesContent":["import { readFile } from 'node:fs/promises';\nimport { fromPackageRoot } from '../utils/getPaths.js';\n\nexport default async function getGuide(\n path: string\n): Promise<{ content?: string; error?: string }> {\n try {\n const filePath = fromPackageRoot(path);\n const content = await readFile(filePath, 'utf-8');\n return { content };\n } catch (error) {\n console.error(`Error reading guide ${path}:`, error);\n return { error: error instanceof Error ? error.message : String(error) };\n }\n}\n"],"names":[],"mappings":";;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,QAAQ,CACpC,IAAY;IAEZ,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;QACvC,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAClD,OAAO,EAAE,OAAO,EAAE,CAAC;IACrB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,uBAAuB,IAAI,GAAG,EAAE,KAAK,CAAC,CAAC;QACrD,OAAO,EAAE,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;IAC3E,CAAC;AACH,CAAC","debug_id":"19738121-3425-5eef-af1f-7d1a526b0be4"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs.d.ts","sourceRoot":"/","sources":["mcp/tools/docs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIpE,eAAO,MAAM,SAAS,EAAE;IAAE,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;CAK7C,CAAC;AAEF,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,QAqF7C"}
|
|
@@ -0,0 +1,86 @@
|
|
|
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]="fe8eea23-413d-5db9-932f-f00e23d57034")}catch(e){}}();
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { fetchDocContent, getDocs } from '../getDocs.js';
|
|
5
|
+
export const docsTools = {
|
|
6
|
+
'fetch-docs': 'Fetches the content of a specific documentation file by its path.',
|
|
7
|
+
'list-docs': 'Lists available documentation files in the format of an llms.txt file. This is a list of all the documentation files available to you.',
|
|
8
|
+
};
|
|
9
|
+
export function addDocsTools(server) {
|
|
10
|
+
server.tool('fetch-docs', docsTools['fetch-docs'], {
|
|
11
|
+
path: z
|
|
12
|
+
.string()
|
|
13
|
+
.describe('The path to the documentation file (e.g., "platform/index.mdx" or "react/introduction.mdx")'),
|
|
14
|
+
}, async ({ path }) => {
|
|
15
|
+
try {
|
|
16
|
+
const content = await getDocs(path);
|
|
17
|
+
if (!content) {
|
|
18
|
+
return {
|
|
19
|
+
content: [
|
|
20
|
+
{
|
|
21
|
+
type: 'text',
|
|
22
|
+
text: `Failed to fetch documentation for path: ${path}`,
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
isError: true,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
content: [
|
|
30
|
+
{
|
|
31
|
+
type: 'text',
|
|
32
|
+
text: content,
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
return {
|
|
39
|
+
content: [
|
|
40
|
+
{
|
|
41
|
+
type: 'text',
|
|
42
|
+
text: `Error fetching documentation: ${error instanceof Error ? error.message : String(error)}`,
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
isError: true,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
server.tool('list-docs', docsTools['list-docs'], {}, async () => {
|
|
50
|
+
try {
|
|
51
|
+
const content = await fetchDocContent('llms.txt');
|
|
52
|
+
if (!content) {
|
|
53
|
+
return {
|
|
54
|
+
content: [
|
|
55
|
+
{
|
|
56
|
+
type: 'text',
|
|
57
|
+
text: `Failed to fetch documentation index`,
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
isError: true,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
content: [
|
|
65
|
+
{
|
|
66
|
+
type: 'text',
|
|
67
|
+
text: content,
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
return {
|
|
74
|
+
content: [
|
|
75
|
+
{
|
|
76
|
+
type: 'text',
|
|
77
|
+
text: `Error listing documentation: ${error instanceof Error ? error.message : String(error)}`,
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
isError: true,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=docs.js.map
|
|
86
|
+
//# debugId=fe8eea23-413d-5db9-932f-f00e23d57034
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs.js","sources":["mcp/tools/docs.ts"],"sourceRoot":"/","sourcesContent":["import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { z } from 'zod';\nimport { fetchDocContent, getDocs } from '../getDocs.js';\n\nexport const docsTools: { [id: string]: string } = {\n 'fetch-docs':\n 'Fetches the content of a specific documentation file by its path.',\n 'list-docs':\n 'Lists available documentation files in the format of an llms.txt file. This is a list of all the documentation files available to you.',\n};\n\nexport function addDocsTools(server: McpServer) {\n server.tool(\n 'fetch-docs',\n docsTools['fetch-docs'],\n {\n path: z\n .string()\n .describe(\n 'The path to the documentation file (e.g., \"platform/index.mdx\" or \"react/introduction.mdx\")'\n ),\n },\n async ({ path }) => {\n try {\n const content = await getDocs(path);\n\n if (!content) {\n return {\n content: [\n {\n type: 'text',\n text: `Failed to fetch documentation for path: ${path}`,\n },\n ],\n isError: true,\n };\n }\n\n return {\n content: [\n {\n type: 'text',\n text: content,\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text',\n text: `Error fetching documentation: ${error instanceof Error ? error.message : String(error)}`,\n },\n ],\n isError: true,\n };\n }\n }\n );\n\n server.tool('list-docs', docsTools['list-docs'], {}, async () => {\n try {\n const content = await fetchDocContent('llms.txt');\n\n if (!content) {\n return {\n content: [\n {\n type: 'text',\n text: `Failed to fetch documentation index`,\n },\n ],\n isError: true,\n };\n }\n\n return {\n content: [\n {\n type: 'text',\n text: content,\n },\n ],\n };\n } catch (error) {\n return {\n content: [\n {\n type: 'text',\n text: `Error listing documentation: ${error instanceof Error ? error.message : String(error)}`,\n },\n ],\n isError: true,\n };\n }\n });\n}\n"],"names":[],"mappings":";;AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAEzD,MAAM,CAAC,MAAM,SAAS,GAA6B;IACjD,YAAY,EACV,mEAAmE;IACrE,WAAW,EACT,wIAAwI;CAC3I,CAAC;AAEF,MAAM,UAAU,YAAY,CAAC,MAAiB;IAC5C,MAAM,CAAC,IAAI,CACT,YAAY,EACZ,SAAS,CAAC,YAAY,CAAC,E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E,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,OAAO;qBACd;iBACF;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,gCAAgC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;qBAC/F;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC","debug_id":"fe8eea23-413d-5db9-932f-f00e23d57034"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
export declare const fileManagerTools: {
|
|
3
|
+
[id: string]: string;
|
|
4
|
+
};
|
|
5
|
+
export declare function addFileManagerTools(server: McpServer, stateFilePath: string): void;
|
|
6
|
+
//# sourceMappingURL=fileManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fileManager.d.ts","sourceRoot":"/","sources":["mcp/tools/fileManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIpE,eAAO,MAAM,gBAAgB,EAAE;IAAE,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;CAYpD,CAAC;AAqCF,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,QA6O3E"}
|