agent-ctx 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.
- package/LICENSE +21 -0
- package/README.md +133 -0
- package/dist/bin/agent-ctx.d.ts +7 -0
- package/dist/bin/agent-ctx.d.ts.map +1 -0
- package/dist/bin/agent-ctx.js +8 -0
- package/dist/bin/agent-ctx.js.map +1 -0
- package/dist/bin/agentrc.d.ts +7 -0
- package/dist/bin/agentrc.d.ts.map +1 -0
- package/dist/bin/agentrc.js +8 -0
- package/dist/bin/agentrc.js.map +1 -0
- package/dist/commands/add.d.ts +12 -0
- package/dist/commands/add.d.ts.map +1 -0
- package/dist/commands/add.js +17 -0
- package/dist/commands/add.js.map +1 -0
- package/dist/commands/centralize.d.ts +12 -0
- package/dist/commands/centralize.d.ts.map +1 -0
- package/dist/commands/centralize.js +111 -0
- package/dist/commands/centralize.js.map +1 -0
- package/dist/commands/clean.d.ts +13 -0
- package/dist/commands/clean.d.ts.map +1 -0
- package/dist/commands/clean.js +109 -0
- package/dist/commands/clean.js.map +1 -0
- package/dist/commands/doctor.d.ts +12 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +168 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/init.d.ts +14 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +189 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/update.d.ts +13 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +97 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +76 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/bridges.d.ts +35 -0
- package/dist/lib/bridges.d.ts.map +1 -0
- package/dist/lib/bridges.js +171 -0
- package/dist/lib/bridges.js.map +1 -0
- package/dist/lib/config.d.ts +31 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +75 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/i18n.d.ts +22 -0
- package/dist/lib/i18n.d.ts.map +1 -0
- package/dist/lib/i18n.js +170 -0
- package/dist/lib/i18n.js.map +1 -0
- package/dist/lib/logger.d.ts +55 -0
- package/dist/lib/logger.d.ts.map +1 -0
- package/dist/lib/logger.js +168 -0
- package/dist/lib/logger.js.map +1 -0
- package/dist/lib/templates.d.ts +46 -0
- package/dist/lib/templates.d.ts.map +1 -0
- package/dist/lib/templates.js +88 -0
- package/dist/lib/templates.js.map +1 -0
- package/dist/lib/utils.d.ts +39 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +127 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/wizard.d.ts +22 -0
- package/dist/lib/wizard.d.ts.map +1 -0
- package/dist/lib/wizard.js +197 -0
- package/dist/lib/wizard.js.map +1 -0
- package/package.json +63 -0
- package/src/templates/en/base/_agents.md +62 -0
- package/src/templates/en/base/_architecture.md +90 -0
- package/src/templates/en/base/_bootstrap.md +89 -0
- package/src/templates/en/base/_doc.md +65 -0
- package/src/templates/en/base/_mcp.md +81 -0
- package/src/templates/en/base/_project_state.md +48 -0
- package/src/templates/en/base/_rule.md +56 -0
- package/src/templates/en/base/_skill.md +60 -0
- package/src/templates/en/docs/doc-readme.md +43 -0
- package/src/templates/en/docs/mcp-readme.md +21 -0
- package/src/templates/en/memory/active_context.md +38 -0
- package/src/templates/en/memory/progress.md +35 -0
- package/src/templates/en/memory/project_brief.md +34 -0
- package/src/templates/en/memory/tech_context.md +44 -0
- package/src/templates/en/rules/rule-coding-standards.md +22 -0
- package/src/templates/en/skills/skill-agents.md +74 -0
- package/src/templates/en/skills/skill-api.md +117 -0
- package/src/templates/en/skills/skill-architecture.md +87 -0
- package/src/templates/en/skills/skill-generating.md +116 -0
- package/src/templates/en/skills/skill-git.md +109 -0
- package/src/templates/en/skills/skill-project-state.md +99 -0
- package/src/templates/en/skills/skill-react.md +94 -0
- package/src/templates/en/skills/skill-rules.md +100 -0
- package/src/templates/en/skills/skill-testing.md +139 -0
- package/src/templates/es/base/_agents.md +62 -0
- package/src/templates/es/base/_architecture.md +90 -0
- package/src/templates/es/base/_bootstrap.md +89 -0
- package/src/templates/es/base/_doc.md +65 -0
- package/src/templates/es/base/_mcp.md +81 -0
- package/src/templates/es/base/_project_state.md +48 -0
- package/src/templates/es/base/_rule.md +56 -0
- package/src/templates/es/base/_skill.md +60 -0
- package/src/templates/es/docs/doc-readme.md +43 -0
- package/src/templates/es/docs/mcp-readme.md +21 -0
- package/src/templates/es/memory/active_context.md +38 -0
- package/src/templates/es/memory/progress.md +35 -0
- package/src/templates/es/memory/project_brief.md +34 -0
- package/src/templates/es/memory/tech_context.md +44 -0
- package/src/templates/es/rules/rule-coding-standards.md +22 -0
- package/src/templates/es/skills/skill-agents.md +74 -0
- package/src/templates/es/skills/skill-api.md +117 -0
- package/src/templates/es/skills/skill-architecture.md +87 -0
- package/src/templates/es/skills/skill-generating.md +116 -0
- package/src/templates/es/skills/skill-git.md +108 -0
- package/src/templates/es/skills/skill-project-state.md +99 -0
- package/src/templates/es/skills/skill-react.md +94 -0
- package/src/templates/es/skills/skill-rules.md +100 -0
- package/src/templates/es/skills/skill-testing.md +139 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Generación de archivos puente para diferentes editores/agentes AI
|
|
3
|
+
* @module lib/bridges
|
|
4
|
+
*/
|
|
5
|
+
export interface BridgeConfig {
|
|
6
|
+
name: string;
|
|
7
|
+
generator: () => string;
|
|
8
|
+
needsDir?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Genera contenido para .cursor/rules/global.md (nuevo formato con frontmatter)
|
|
12
|
+
*/
|
|
13
|
+
export declare function getCursorGlobalRules(): string;
|
|
14
|
+
/**
|
|
15
|
+
* Genera contenido de CLAUDE.md para Claude Code
|
|
16
|
+
*/
|
|
17
|
+
export declare function getClaudeMd(): string;
|
|
18
|
+
/**
|
|
19
|
+
* Genera contenido de .github/copilot-instructions.md para GitHub Copilot (global)
|
|
20
|
+
*/
|
|
21
|
+
export declare function getCopilotInstructions(): string;
|
|
22
|
+
/**
|
|
23
|
+
* Genera contenido para .github/instructions/context.instructions.md (escopado)
|
|
24
|
+
*/
|
|
25
|
+
export declare function getCopilotContextInstructions(): string;
|
|
26
|
+
/**
|
|
27
|
+
* Genera contenido de .agent/rules/context.md para Antigravity
|
|
28
|
+
*/
|
|
29
|
+
export declare function getAntigravityRules(): string;
|
|
30
|
+
/**
|
|
31
|
+
* Mapa de todos los archivos puente disponibles (solo formatos modernos)
|
|
32
|
+
* Los formatos legacy han sido eliminados - los editores ahora leen AGENTS.md directamente
|
|
33
|
+
*/
|
|
34
|
+
export declare const BRIDGE_FILES: Record<string, BridgeConfig>;
|
|
35
|
+
//# sourceMappingURL=bridges.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bridges.d.ts","sourceRoot":"","sources":["../../src/lib/bridges.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAeH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAsB7C;AAID;;GAEG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAmBpC;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAmB/C;AAED;;GAEG;AACH,wBAAgB,6BAA6B,IAAI,MAAM,CAetD;AAID;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAyB5C;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CA8BrD,CAAC"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Generación de archivos puente para diferentes editores/agentes AI
|
|
3
|
+
* @module lib/bridges
|
|
4
|
+
*/
|
|
5
|
+
import { readFileSync } from 'fs';
|
|
6
|
+
import { fileURLToPath } from 'url';
|
|
7
|
+
import { dirname, join } from 'path';
|
|
8
|
+
import { t } from './i18n.js';
|
|
9
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
10
|
+
const __dirname = dirname(__filename);
|
|
11
|
+
// Leer versión desde package.json
|
|
12
|
+
const pkg = JSON.parse(readFileSync(join(__dirname, '../../package.json'), 'utf-8'));
|
|
13
|
+
const VERSION = pkg.version;
|
|
14
|
+
/**
|
|
15
|
+
* Genera contenido para .cursor/rules/global.md (nuevo formato con frontmatter)
|
|
16
|
+
*/
|
|
17
|
+
export function getCursorGlobalRules() {
|
|
18
|
+
return `---
|
|
19
|
+
description: "Global project rules and context from .context/"
|
|
20
|
+
globs: "**/*"
|
|
21
|
+
alwaysApply: true
|
|
22
|
+
---
|
|
23
|
+
# ${t('bridge.generatedBy', { version: VERSION })}
|
|
24
|
+
|
|
25
|
+
${t('bridge.readAgents')}
|
|
26
|
+
|
|
27
|
+
## Context Structure
|
|
28
|
+
|
|
29
|
+
This project uses a centralized context structure in \`.context/\`:
|
|
30
|
+
|
|
31
|
+
- **Architecture:** .context/architecture.md
|
|
32
|
+
- **Rules:** .context/rules/
|
|
33
|
+
- **Skills:** .context/skills/
|
|
34
|
+
- **Docs:** .context/docs/
|
|
35
|
+
- **Project State:** .context/project_state.md
|
|
36
|
+
|
|
37
|
+
Please read AGENTS.md for the complete project overview.
|
|
38
|
+
`;
|
|
39
|
+
}
|
|
40
|
+
// Legacy generators removed - editors now read AGENTS.md directly
|
|
41
|
+
/**
|
|
42
|
+
* Genera contenido de CLAUDE.md para Claude Code
|
|
43
|
+
*/
|
|
44
|
+
export function getClaudeMd() {
|
|
45
|
+
return `# Claude Code Context
|
|
46
|
+
# ${t('bridge.generatedBy', { version: VERSION })}
|
|
47
|
+
|
|
48
|
+
## ${t('bridge.copilotInstructions')}
|
|
49
|
+
|
|
50
|
+
${t('bridge.claudeIntro')}
|
|
51
|
+
${t('bridge.claudeReadContext')}
|
|
52
|
+
|
|
53
|
+
1. **${t('bridge.architecture')}** .context/architecture.md
|
|
54
|
+
2. **${t('bridge.rules')}** .context/rules/coding-standards.md
|
|
55
|
+
3. **${t('bridge.skills')}** .context/skills/
|
|
56
|
+
4. **Project State:** .context/project_state.md
|
|
57
|
+
|
|
58
|
+
## ${t('bridge.principles')}
|
|
59
|
+
|
|
60
|
+
- ${t('bridge.followRules')}
|
|
61
|
+
- ${t('bridge.usePatterns')}
|
|
62
|
+
- ${t('bridge.maintainConsistency')}`;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Genera contenido de .github/copilot-instructions.md para GitHub Copilot (global)
|
|
66
|
+
*/
|
|
67
|
+
export function getCopilotInstructions() {
|
|
68
|
+
return `# GitHub Copilot Instructions
|
|
69
|
+
# ${t('bridge.generatedBy', { version: VERSION })}
|
|
70
|
+
|
|
71
|
+
## ${t('bridge.copilotContext')}
|
|
72
|
+
|
|
73
|
+
${t('bridge.copilotContextDesc')}
|
|
74
|
+
|
|
75
|
+
## ${t('bridge.copilotInstructions')}
|
|
76
|
+
|
|
77
|
+
1. ${t('bridge.copilotReadAgents')}
|
|
78
|
+
2. ${t('bridge.copilotFollowRules')}
|
|
79
|
+
3. ${t('bridge.copilotUsePatterns')}
|
|
80
|
+
|
|
81
|
+
## ${t('bridge.mainRules')}
|
|
82
|
+
|
|
83
|
+
- ${t('bridge.useStrictTS')}
|
|
84
|
+
- ${t('bridge.followNaming')}
|
|
85
|
+
- ${t('bridge.addErrorHandling')}`;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Genera contenido para .github/instructions/context.instructions.md (escopado)
|
|
89
|
+
*/
|
|
90
|
+
export function getCopilotContextInstructions() {
|
|
91
|
+
return `---
|
|
92
|
+
applyTo: "**/*"
|
|
93
|
+
---
|
|
94
|
+
# Project Context Instructions
|
|
95
|
+
# ${t('bridge.generatedBy', { version: VERSION })}
|
|
96
|
+
|
|
97
|
+
This project uses a centralized context structure in \`.context/\`.
|
|
98
|
+
|
|
99
|
+
Before making any changes, please review:
|
|
100
|
+
- **AGENTS.md** - Project overview and guidelines
|
|
101
|
+
- **.context/architecture.md** - Technical architecture
|
|
102
|
+
- **.context/rules/** - Coding standards
|
|
103
|
+
- **.context/project_state.md** - Current state and TODOs
|
|
104
|
+
`;
|
|
105
|
+
}
|
|
106
|
+
// Aider conventions generator removed - reads AGENTS.md directly
|
|
107
|
+
/**
|
|
108
|
+
* Genera contenido de .agent/rules/context.md para Antigravity
|
|
109
|
+
*/
|
|
110
|
+
export function getAntigravityRules() {
|
|
111
|
+
return `# Project Context Rules
|
|
112
|
+
# ${t('bridge.generatedBy', { version: VERSION })}
|
|
113
|
+
|
|
114
|
+
## ${t('bridge.copilotInstructions')}
|
|
115
|
+
|
|
116
|
+
${t('bridge.antigravityIntro')}
|
|
117
|
+
|
|
118
|
+
This project uses a centralized context structure in \`.context/\`:
|
|
119
|
+
|
|
120
|
+
- **Architecture:** .context/architecture.md
|
|
121
|
+
- **Rules:** .context/rules/
|
|
122
|
+
- **Skills:** .context/skills/
|
|
123
|
+
- **Docs:** .context/docs/
|
|
124
|
+
- **Project State:** .context/project_state.md
|
|
125
|
+
- **Memory Bank:** .context/memory/
|
|
126
|
+
|
|
127
|
+
## ${t('bridge.principles')}
|
|
128
|
+
|
|
129
|
+
- ${t('bridge.followRules')}
|
|
130
|
+
- ${t('bridge.usePatterns')}
|
|
131
|
+
- ${t('bridge.maintainConsistency')}
|
|
132
|
+
|
|
133
|
+
Please read AGENTS.md for the complete project overview.
|
|
134
|
+
`;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Mapa de todos los archivos puente disponibles (solo formatos modernos)
|
|
138
|
+
* Los formatos legacy han sido eliminados - los editores ahora leen AGENTS.md directamente
|
|
139
|
+
*/
|
|
140
|
+
export const BRIDGE_FILES = {
|
|
141
|
+
// Cursor - Formato moderno con frontmatter
|
|
142
|
+
'.cursor/rules/global.md': {
|
|
143
|
+
name: 'Cursor (Modern)',
|
|
144
|
+
generator: getCursorGlobalRules,
|
|
145
|
+
needsDir: '.cursor/rules'
|
|
146
|
+
},
|
|
147
|
+
// Claude Code
|
|
148
|
+
'CLAUDE.md': {
|
|
149
|
+
name: 'Claude Code',
|
|
150
|
+
generator: getClaudeMd
|
|
151
|
+
},
|
|
152
|
+
// Copilot - Global
|
|
153
|
+
'.github/copilot-instructions.md': {
|
|
154
|
+
name: 'GitHub Copilot (Global)',
|
|
155
|
+
generator: getCopilotInstructions,
|
|
156
|
+
needsDir: '.github'
|
|
157
|
+
},
|
|
158
|
+
// Copilot - Escopado
|
|
159
|
+
'.github/instructions/context.instructions.md': {
|
|
160
|
+
name: 'GitHub Copilot (Scoped)',
|
|
161
|
+
generator: getCopilotContextInstructions,
|
|
162
|
+
needsDir: '.github/instructions'
|
|
163
|
+
},
|
|
164
|
+
// Antigravity - Reglas de proyecto
|
|
165
|
+
'.agent/rules/context.md': {
|
|
166
|
+
name: 'Antigravity',
|
|
167
|
+
generator: getAntigravityRules,
|
|
168
|
+
needsDir: '.agent/rules'
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
//# sourceMappingURL=bridges.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bridges.js","sourceRoot":"","sources":["../../src/lib/bridges.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,CAAC,EAAE,MAAM,WAAW,CAAC;AAE9B,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAA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BAAyB,EAAE;QACzB,IAAI,EAAE,aAAa;QACnB,SAAS,EAAE,mBAAmB;QAC9B,QAAQ,EAAE,cAAc;KACzB;CACF,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Config - Manejo de configuración del proyecto
|
|
3
|
+
*/
|
|
4
|
+
import type { SupportedLanguage } from './i18n.js';
|
|
5
|
+
export interface AgentCtxConfig {
|
|
6
|
+
editors: string[];
|
|
7
|
+
language: SupportedLanguage;
|
|
8
|
+
backups: boolean;
|
|
9
|
+
customTemplates: string | null;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Carga la configuración del proyecto
|
|
13
|
+
*/
|
|
14
|
+
export declare function loadConfig(projectDir: string): AgentCtxConfig;
|
|
15
|
+
/**
|
|
16
|
+
* Verifica si existe un archivo de configuración
|
|
17
|
+
*/
|
|
18
|
+
export declare function hasConfig(projectDir: string): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Obtiene la configuración por defecto
|
|
21
|
+
*/
|
|
22
|
+
export declare function getDefaultConfig(): AgentCtxConfig;
|
|
23
|
+
/**
|
|
24
|
+
* Mapeo de nombres de archivos bridge a nombres de editor
|
|
25
|
+
*/
|
|
26
|
+
export declare const EDITOR_MAP: Record<string, string>;
|
|
27
|
+
/**
|
|
28
|
+
* Filtra los editores según la configuración
|
|
29
|
+
*/
|
|
30
|
+
export declare function filterEditorsByConfig(allEditors: string[], config: AgentCtxConfig): string[];
|
|
31
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAKnD,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAUD;;GAEG;AACH,wBAAgB,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,cAAc,CAqB7D;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAErD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,cAAc,CAEjD;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAO7C,CAAC;AAEF;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,cAAc,GAAG,MAAM,EAAE,CAU5F"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Config - Manejo de configuración del proyecto
|
|
3
|
+
*/
|
|
4
|
+
import { existsSync, readFileSync } from 'fs';
|
|
5
|
+
import { join } from 'path';
|
|
6
|
+
import { logger } from './logger.js';
|
|
7
|
+
// Nombre del archivo de configuración
|
|
8
|
+
const CONFIG_FILENAME = '.agent-ctx.json';
|
|
9
|
+
// Configuración por defecto
|
|
10
|
+
const DEFAULT_CONFIG = {
|
|
11
|
+
editors: ['cursor', 'antigravity', 'cline', 'roo', 'claude', 'copilot'],
|
|
12
|
+
language: 'en',
|
|
13
|
+
backups: true,
|
|
14
|
+
customTemplates: null
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Carga la configuración del proyecto
|
|
18
|
+
*/
|
|
19
|
+
export function loadConfig(projectDir) {
|
|
20
|
+
const configPath = join(projectDir, CONFIG_FILENAME);
|
|
21
|
+
if (!existsSync(configPath)) {
|
|
22
|
+
return { ...DEFAULT_CONFIG };
|
|
23
|
+
}
|
|
24
|
+
try {
|
|
25
|
+
const content = readFileSync(configPath, 'utf-8');
|
|
26
|
+
const userConfig = JSON.parse(content);
|
|
27
|
+
// Fusionar con defaults
|
|
28
|
+
return {
|
|
29
|
+
...DEFAULT_CONFIG,
|
|
30
|
+
...userConfig
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
35
|
+
logger.warning(`Error al leer ${CONFIG_FILENAME}: ${message}`);
|
|
36
|
+
return { ...DEFAULT_CONFIG };
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Verifica si existe un archivo de configuración
|
|
41
|
+
*/
|
|
42
|
+
export function hasConfig(projectDir) {
|
|
43
|
+
return existsSync(join(projectDir, CONFIG_FILENAME));
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Obtiene la configuración por defecto
|
|
47
|
+
*/
|
|
48
|
+
export function getDefaultConfig() {
|
|
49
|
+
return { ...DEFAULT_CONFIG };
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Mapeo de nombres de archivos bridge a nombres de editor
|
|
53
|
+
*/
|
|
54
|
+
export const EDITOR_MAP = {
|
|
55
|
+
'.cursorrules': 'cursor',
|
|
56
|
+
'.antigravityrules': 'antigravity',
|
|
57
|
+
'.clinerules': 'cline',
|
|
58
|
+
'.roomodes': 'roo',
|
|
59
|
+
'CLAUDE.md': 'claude',
|
|
60
|
+
'.github/copilot-instructions.md': 'copilot'
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Filtra los editores según la configuración
|
|
64
|
+
*/
|
|
65
|
+
export function filterEditorsByConfig(allEditors, config) {
|
|
66
|
+
if (!config.editors || config.editors.length === 0) {
|
|
67
|
+
return allEditors;
|
|
68
|
+
}
|
|
69
|
+
return allEditors.filter(editor => {
|
|
70
|
+
// Obtener el nombre del editor desde el archivo
|
|
71
|
+
const editorName = EDITOR_MAP[editor] || editor;
|
|
72
|
+
return config.editors.includes(editorName);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=config.js.map
|
|
@@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AC/D,OAAO,EAAE,GAAG,cAAc,EAAE,CAAC;IAC/B,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,UAAkB;IAC1C,OAAO,UAAU,CAAC,IAAI,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC;AACvD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB;IAC9B,OAAO,EAAE,GAAG,cAAc,EAAE,CAAC;AAC/B,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAA2B;IAChD,cAAc,EAAE,QAAQ;IACxB,mBAAmB,EAAE,aAAa;IAClC,aAAa,EAAE,OAAO;IACtB,WAAW,EAAE,KAAK;IAClB,WAAW,EAAE,QAAQ;IACrB,iCAAiC,EAAE,SAAS;CAC7C,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,UAAoB,EAAE,MAAsB;IAChF,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACnD,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,OAAO,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE;QAChC,gDAAgD;QAChD,MAAM,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC;QAChD,OAAO,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Internationalization (i18n) module for agent-ctx CLI
|
|
3
|
+
* @module lib/i18n
|
|
4
|
+
*/
|
|
5
|
+
export type SupportedLanguage = 'en' | 'es';
|
|
6
|
+
/**
|
|
7
|
+
* Available languages with their display names
|
|
8
|
+
*/
|
|
9
|
+
export declare const LANGUAGES: Record<SupportedLanguage, string>;
|
|
10
|
+
/**
|
|
11
|
+
* Get the current language
|
|
12
|
+
*/
|
|
13
|
+
export declare function getLanguage(): SupportedLanguage;
|
|
14
|
+
/**
|
|
15
|
+
* Set the current language
|
|
16
|
+
*/
|
|
17
|
+
export declare function setLanguage(lang: SupportedLanguage): void;
|
|
18
|
+
/**
|
|
19
|
+
* Translate a key to the current language
|
|
20
|
+
*/
|
|
21
|
+
export declare function t(key: string, params?: Record<string, string | number>): string;
|
|
22
|
+
//# sourceMappingURL=i18n.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/lib/i18n.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,iBAAiB,GAAG,IAAI,GAAG,IAAI,CAAC;AAI5C;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAGvD,CAAC;AAoJF;;GAEG;AACH,wBAAgB,WAAW,IAAI,iBAAiB,CAE/C;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,iBAAiB,GAAG,IAAI,CAIzD;AAED;;GAEG;AACH,wBAAgB,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAM,GAAG,MAAM,CAUnF"}
|
package/dist/lib/i18n.js
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Internationalization (i18n) module for agent-ctx CLI
|
|
3
|
+
* @module lib/i18n
|
|
4
|
+
*/
|
|
5
|
+
let currentLanguage = 'en';
|
|
6
|
+
/**
|
|
7
|
+
* Available languages with their display names
|
|
8
|
+
*/
|
|
9
|
+
export const LANGUAGES = {
|
|
10
|
+
en: 'English',
|
|
11
|
+
es: 'Español'
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Translation dictionaries
|
|
15
|
+
*/
|
|
16
|
+
const dictionaries = {
|
|
17
|
+
en: {
|
|
18
|
+
// CLI Header
|
|
19
|
+
'init.header': 'Initializing AI Agent environment configuration',
|
|
20
|
+
'init.targetDir': 'Target directory:',
|
|
21
|
+
'init.modeForce': 'FORCE mode: will overwrite existing files',
|
|
22
|
+
'init.modeNonInteractive': 'NON-INTERACTIVE mode',
|
|
23
|
+
'init.modeDryRun': 'DRY-RUN mode (simulation only)',
|
|
24
|
+
// Prompts
|
|
25
|
+
'prompt.selectLanguage': 'Select language / Selecciona idioma:',
|
|
26
|
+
'prompt.selectEditors': 'Which editors/agents do you want to configure?',
|
|
27
|
+
'prompt.selectInitType': 'Select initialization type:',
|
|
28
|
+
// Init types
|
|
29
|
+
'init.quickStart': 'Quick start (recommended) - Creates .context/ + AGENTS.md',
|
|
30
|
+
'init.customBridges': 'Custom bridges (advanced)',
|
|
31
|
+
'init.bridgesNotNeeded': 'Note: Most modern editors read AGENTS.md directly. Bridges are rarely needed now.',
|
|
32
|
+
// Spinners
|
|
33
|
+
'spinner.creatingContext': 'Creating .context/ structure...',
|
|
34
|
+
'spinner.contextCreated': '.context/ structure created',
|
|
35
|
+
'spinner.copyingTemplates': 'Copying template files...',
|
|
36
|
+
'spinner.templatesCopied': 'Templates copied',
|
|
37
|
+
'spinner.generatingBridges': 'Generating bridge files...',
|
|
38
|
+
'spinner.bridgesGenerated': '{count} bridge files generated',
|
|
39
|
+
'prompt.bootstrap': 'Do you want to generate an AI Setup Prompt? (Helps your AI learn this project)',
|
|
40
|
+
'init.bootstrapGenerated': 'Created AI_BOOTSTRAP.md - Pass this file to your AI agent to setup the project.',
|
|
41
|
+
// Summary
|
|
42
|
+
'summary.simulationComplete': 'SIMULATION COMPLETE',
|
|
43
|
+
'summary.runWithoutDryRun': 'Run without --dry-run to apply changes.',
|
|
44
|
+
'summary.initComplete': 'INITIALIZATION COMPLETE!',
|
|
45
|
+
'summary.projectConfigured': 'Project configured at:',
|
|
46
|
+
'summary.nextSteps': 'Next steps:',
|
|
47
|
+
'summary.step1': '1. Edit .context/architecture.md with your actual stack',
|
|
48
|
+
'summary.step2': '2. Adjust .context/rules/coding-standards.md',
|
|
49
|
+
'summary.step3': '3. Add specific skills in .context/skills/',
|
|
50
|
+
// Errors
|
|
51
|
+
'error.initFailed': 'Error during initialization',
|
|
52
|
+
// Bridge file comments
|
|
53
|
+
'bridge.generatedBy': 'Generated by agent-ctx v{version}',
|
|
54
|
+
'bridge.readAgents': 'Always read \'AGENTS.md\' to understand the global context.',
|
|
55
|
+
'bridge.resources': 'Resources:',
|
|
56
|
+
'bridge.architecture': 'Architecture:',
|
|
57
|
+
'bridge.rules': 'Rules:',
|
|
58
|
+
'bridge.skills': 'Skills:',
|
|
59
|
+
'bridge.docs': 'Docs:',
|
|
60
|
+
'bridge.projectExpert': 'Project Expert',
|
|
61
|
+
'bridge.projectExpertDesc': 'Expert mode with project context',
|
|
62
|
+
'bridge.claudeIntro': 'You are a senior expert developer working on this project.',
|
|
63
|
+
'bridge.claudeReadContext': 'Before generating code, read and understand the context:',
|
|
64
|
+
'bridge.principles': 'Principles',
|
|
65
|
+
'bridge.followRules': 'Strictly follow the rules defined in .context/rules/',
|
|
66
|
+
'bridge.usePatterns': 'Use the patterns documented in skills',
|
|
67
|
+
'bridge.maintainConsistency': 'Maintain consistency with existing architecture',
|
|
68
|
+
'bridge.copilotContext': 'Project Context',
|
|
69
|
+
'bridge.copilotContextDesc': 'This project uses a centralized context structure in `.context/`.',
|
|
70
|
+
'bridge.copilotInstructions': 'Instructions',
|
|
71
|
+
'bridge.copilotReadAgents': 'Read `AGENTS.md` for context index',
|
|
72
|
+
'bridge.copilotFollowRules': 'Follow the rules in `.context/rules/coding-standards.md`',
|
|
73
|
+
'bridge.copilotUsePatterns': 'Use patterns from `.context/skills/` when applicable',
|
|
74
|
+
'bridge.mainRules': 'Main Rules',
|
|
75
|
+
'bridge.useStrictTS': 'Use strict TypeScript (no `any`)',
|
|
76
|
+
'bridge.followNaming': 'Follow project naming conventions',
|
|
77
|
+
'bridge.addErrorHandling': 'Add appropriate error handling',
|
|
78
|
+
'bridge.antigravityIntro': 'You are a senior expert developer working on this project. Review the context structure below before making changes.'
|
|
79
|
+
},
|
|
80
|
+
es: {
|
|
81
|
+
// CLI Header
|
|
82
|
+
'init.header': 'Iniciando configuración del entorno de Agente AI',
|
|
83
|
+
'init.targetDir': 'Directorio destino:',
|
|
84
|
+
'init.modeForce': 'Modo FORCE: sobrescribirá archivos existentes',
|
|
85
|
+
'init.modeNonInteractive': 'Modo NO-INTERACTIVO',
|
|
86
|
+
'init.modeDryRun': 'Modo DRY-RUN (solo simulación)',
|
|
87
|
+
// Prompts
|
|
88
|
+
'prompt.selectLanguage': 'Selecciona idioma / Select language:',
|
|
89
|
+
'prompt.selectEditors': '¿Qué editores/agentes quieres configurar?',
|
|
90
|
+
'prompt.selectInitType': 'Selecciona tipo de inicialización:',
|
|
91
|
+
// Init types
|
|
92
|
+
'init.quickStart': 'Inicio rápido (recomendado) - Crea .context/ + AGENTS.md',
|
|
93
|
+
'init.customBridges': 'Bridges personalizados (avanzado)',
|
|
94
|
+
'init.bridgesNotNeeded': 'Nota: La mayoría de editores modernos leen AGENTS.md directamente. Los bridges ya casi no son necesarios.',
|
|
95
|
+
// Spinners
|
|
96
|
+
'spinner.creatingContext': 'Creando estructura .context/...',
|
|
97
|
+
'spinner.contextCreated': 'Estructura .context/ creada',
|
|
98
|
+
'spinner.copyingTemplates': 'Copiando archivos de plantilla...',
|
|
99
|
+
'spinner.templatesCopied': 'Plantillas copiadas',
|
|
100
|
+
'spinner.generatingBridges': 'Generando archivos puente...',
|
|
101
|
+
'spinner.bridgesGenerated': '{count} archivos puente generados',
|
|
102
|
+
'prompt.bootstrap': '¿Quieres generar un Prompt de Configuración IA? (Ayuda a tu IA a aprender este proyecto)',
|
|
103
|
+
'init.bootstrapGenerated': 'Creado AI_BOOTSTRAP.md - Pasa este archivo a tu agente IA para configurar el proyecto.',
|
|
104
|
+
// Summary
|
|
105
|
+
'summary.simulationComplete': 'SIMULACIÓN COMPLETADA',
|
|
106
|
+
'summary.runWithoutDryRun': 'Ejecuta sin --dry-run para aplicar los cambios.',
|
|
107
|
+
'summary.initComplete': '¡INICIALIZACIÓN COMPLETADA!',
|
|
108
|
+
'summary.projectConfigured': 'Proyecto configurado en:',
|
|
109
|
+
'summary.nextSteps': 'Próximos pasos:',
|
|
110
|
+
'summary.step1': '1. Edita .context/architecture.md con tu stack real',
|
|
111
|
+
'summary.step2': '2. Ajusta .context/rules/coding-standards.md',
|
|
112
|
+
'summary.step3': '3. Añade skills específicas en .context/skills/',
|
|
113
|
+
// Errors
|
|
114
|
+
'error.initFailed': 'Error durante inicialización',
|
|
115
|
+
// Bridge file comments
|
|
116
|
+
'bridge.generatedBy': 'Generado por agent-ctx v{version}',
|
|
117
|
+
'bridge.readAgents': 'Lee siempre \'AGENTS.md\' para entender el contexto global.',
|
|
118
|
+
'bridge.resources': 'Recursos:',
|
|
119
|
+
'bridge.architecture': 'Arquitectura:',
|
|
120
|
+
'bridge.rules': 'Reglas:',
|
|
121
|
+
'bridge.skills': 'Skills:',
|
|
122
|
+
'bridge.docs': 'Docs:',
|
|
123
|
+
'bridge.projectExpert': 'Experto del Proyecto',
|
|
124
|
+
'bridge.projectExpertDesc': 'Modo experto con contexto del proyecto',
|
|
125
|
+
'bridge.claudeIntro': 'Eres un desarrollador experto senior trabajando en este proyecto.',
|
|
126
|
+
'bridge.claudeReadContext': 'Antes de generar código, lee y entiende el contexto:',
|
|
127
|
+
'bridge.principles': 'Principios',
|
|
128
|
+
'bridge.followRules': 'Sigue estrictamente las reglas definidas en .context/rules/',
|
|
129
|
+
'bridge.usePatterns': 'Usa los patrones documentados en las skills',
|
|
130
|
+
'bridge.maintainConsistency': 'Mantén consistencia con la arquitectura existente',
|
|
131
|
+
'bridge.copilotContext': 'Contexto del Proyecto',
|
|
132
|
+
'bridge.copilotContextDesc': 'Este proyecto utiliza una estructura de contexto centralizada en `.context/`.',
|
|
133
|
+
'bridge.copilotInstructions': 'Instrucciones',
|
|
134
|
+
'bridge.copilotReadAgents': 'Lee `AGENTS.md` para el índice de contexto',
|
|
135
|
+
'bridge.copilotFollowRules': 'Sigue las reglas en `.context/rules/coding-standards.md`',
|
|
136
|
+
'bridge.copilotUsePatterns': 'Usa los patrones de `.context/skills/` cuando aplique',
|
|
137
|
+
'bridge.mainRules': 'Reglas Principales',
|
|
138
|
+
'bridge.useStrictTS': 'Usa TypeScript estricto (sin `any`)',
|
|
139
|
+
'bridge.followNaming': 'Sigue las convenciones de naming del proyecto',
|
|
140
|
+
'bridge.addErrorHandling': 'Añade manejo de errores apropiado',
|
|
141
|
+
'bridge.antigravityIntro': 'Eres un desarrollador experto senior trabajando en este proyecto. Revisa la estructura de contexto antes de hacer cambios.'
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
/**
|
|
145
|
+
* Get the current language
|
|
146
|
+
*/
|
|
147
|
+
export function getLanguage() {
|
|
148
|
+
return currentLanguage;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Set the current language
|
|
152
|
+
*/
|
|
153
|
+
export function setLanguage(lang) {
|
|
154
|
+
if (LANGUAGES[lang]) {
|
|
155
|
+
currentLanguage = lang;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Translate a key to the current language
|
|
160
|
+
*/
|
|
161
|
+
export function t(key, params = {}) {
|
|
162
|
+
const dict = dictionaries[currentLanguage] || dictionaries.en;
|
|
163
|
+
let text = dict[key] || dictionaries.en[key] || key;
|
|
164
|
+
// Replace parameters like {count}, {version}
|
|
165
|
+
for (const [param, value] of Object.entries(params)) {
|
|
166
|
+
text = text.replace(new RegExp(`\\{${param}\\}`, 'g'), String(value));
|
|
167
|
+
}
|
|
168
|
+
return text;
|
|
169
|
+
}
|
|
170
|
+
//# sourceMappingURL=i18n.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.js","sourceRoot":"","sources":["../../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AC,EAAE,CAAC;QACpB,eAAe,GAAG,IAAI,CAAC;IACzB,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,CAAC,CAAC,GAAW,EAAE,SAA0C,EAAE;IACzE,MAAM,IAAI,GAAG,YAAY,CAAC,eAAe,CAAC,IAAI,YAAY,CAAC,EAAE,CAAC;IAC9D,IAAI,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC;IAEpD,6CAA6C;IAC7C,KAAK,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QACpD,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,KAAK,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACxE,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logger - Utilidades de output con colores y soporte quiet
|
|
3
|
+
*/
|
|
4
|
+
import { type Ora } from 'ora';
|
|
5
|
+
/**
|
|
6
|
+
* Configura el modo quiet
|
|
7
|
+
*/
|
|
8
|
+
export declare function setQuietMode(enabled: boolean): void;
|
|
9
|
+
/**
|
|
10
|
+
* Verifica si está en modo quiet
|
|
11
|
+
*/
|
|
12
|
+
export declare function isQuiet(): boolean;
|
|
13
|
+
interface QuietSpinner {
|
|
14
|
+
succeed: () => void;
|
|
15
|
+
fail: () => void;
|
|
16
|
+
warn: () => void;
|
|
17
|
+
stop: () => void;
|
|
18
|
+
text: string;
|
|
19
|
+
}
|
|
20
|
+
export declare const logger: {
|
|
21
|
+
info: (msg: string) => void;
|
|
22
|
+
success: (msg: string) => void;
|
|
23
|
+
warning: (msg: string) => void;
|
|
24
|
+
error: (msg: string) => void;
|
|
25
|
+
skip: (msg: string) => void;
|
|
26
|
+
dryRun: (msg: string) => void;
|
|
27
|
+
header: (title: string) => void;
|
|
28
|
+
logo: () => void;
|
|
29
|
+
section: (title: string) => void;
|
|
30
|
+
divider: () => void;
|
|
31
|
+
item: (text: string, indent?: number) => void;
|
|
32
|
+
summary: (title: string, isSuccess?: boolean) => void;
|
|
33
|
+
newline: () => void;
|
|
34
|
+
log: (msg: string) => void;
|
|
35
|
+
clear: () => void;
|
|
36
|
+
box: (lines: string[], color?: "green" | "blue" | "cyan") => void;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Crea un spinner con mensaje
|
|
40
|
+
*/
|
|
41
|
+
export declare function startSpinner(text: string): Ora | QuietSpinner;
|
|
42
|
+
/**
|
|
43
|
+
* Detiene el spinner actual con éxito
|
|
44
|
+
*/
|
|
45
|
+
export declare function succeedSpinner(text?: string): void;
|
|
46
|
+
/**
|
|
47
|
+
* Detiene el spinner actual con error
|
|
48
|
+
*/
|
|
49
|
+
export declare function failSpinner(text?: string): void;
|
|
50
|
+
/**
|
|
51
|
+
* Detiene el spinner actual con warning
|
|
52
|
+
*/
|
|
53
|
+
export declare function warnSpinner(text?: string): void;
|
|
54
|
+
export {};
|
|
55
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/lib/logger.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAY,EAAE,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAOpC;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAEnD;AAED;;GAEG;AACH,wBAAgB,OAAO,IAAI,OAAO,CAEjC;AAED,UAAU,YAAY;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,IAAI,EAAE,MA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