@a1st/aix 0.0.12 → 0.1.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/README.md +9 -3
- package/dist/base-command.d.ts +2 -1
- package/dist/base-command.d.ts.map +1 -1
- package/dist/base-command.js +8 -2
- package/dist/base-command.js.map +1 -1
- package/dist/commands/add/mcp.d.ts +5 -0
- package/dist/commands/add/mcp.d.ts.map +1 -1
- package/dist/commands/add/mcp.js +43 -9
- package/dist/commands/add/mcp.js.map +1 -1
- package/dist/commands/add/prompt.d.ts +5 -0
- package/dist/commands/add/prompt.d.ts.map +1 -1
- package/dist/commands/add/prompt.js +43 -88
- package/dist/commands/add/prompt.js.map +1 -1
- package/dist/commands/add/rule.d.ts +5 -0
- package/dist/commands/add/rule.d.ts.map +1 -1
- package/dist/commands/add/rule.js +43 -86
- package/dist/commands/add/rule.js.map +1 -1
- package/dist/commands/add/skill.d.ts +5 -0
- package/dist/commands/add/skill.d.ts.map +1 -1
- package/dist/commands/add/skill.js +51 -139
- package/dist/commands/add/skill.js.map +1 -1
- package/dist/commands/backups.d.ts.map +1 -1
- package/dist/commands/backups.js +0 -1
- package/dist/commands/backups.js.map +1 -1
- package/dist/commands/init.d.ts +5 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +65 -9
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/install.d.ts +16 -2
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +127 -28
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/list/index.d.ts +25 -2
- package/dist/commands/list/index.d.ts.map +1 -1
- package/dist/commands/list/index.js +366 -21
- package/dist/commands/list/index.js.map +1 -1
- package/dist/commands/{global/list.d.ts → list/prompts.d.ts} +2 -2
- package/dist/commands/list/prompts.d.ts.map +1 -0
- package/dist/commands/list/prompts.js +58 -0
- package/dist/commands/list/prompts.js.map +1 -0
- package/dist/commands/remove/mcp.d.ts +3 -0
- package/dist/commands/remove/mcp.d.ts.map +1 -1
- package/dist/commands/remove/mcp.js +20 -21
- package/dist/commands/remove/mcp.js.map +1 -1
- package/dist/commands/remove/skill.d.ts +3 -0
- package/dist/commands/remove/skill.d.ts.map +1 -1
- package/dist/commands/remove/skill.js +44 -21
- package/dist/commands/remove/skill.js.map +1 -1
- package/dist/commands/search.d.ts +0 -1
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/search.js +8 -21
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/sync.d.ts +29 -0
- package/dist/commands/sync.d.ts.map +1 -0
- package/dist/commands/sync.js +269 -0
- package/dist/commands/sync.js.map +1 -0
- package/dist/commands/validate.d.ts +3 -0
- package/dist/commands/validate.d.ts.map +1 -1
- package/dist/commands/validate.js +24 -2
- package/dist/commands/validate.js.map +1 -1
- package/dist/flags/lock.d.ts +4 -0
- package/dist/flags/lock.d.ts.map +1 -0
- package/dist/flags/lock.js +8 -0
- package/dist/flags/lock.js.map +1 -0
- package/dist/flags/scope.d.ts +48 -12
- package/dist/flags/scope.d.ts.map +1 -1
- package/dist/flags/scope.js +63 -16
- package/dist/flags/scope.js.map +1 -1
- package/dist/lib/add-helper.d.ts +2 -2
- package/dist/lib/add-helper.d.ts.map +1 -1
- package/dist/lib/add-helper.js +46 -21
- package/dist/lib/add-helper.js.map +1 -1
- package/dist/lib/delete-helper.d.ts +5 -1
- package/dist/lib/delete-helper.d.ts.map +1 -1
- package/dist/lib/delete-helper.js +20 -11
- package/dist/lib/delete-helper.js.map +1 -1
- package/dist/lib/install-helper.d.ts +23 -2
- package/dist/lib/install-helper.d.ts.map +1 -1
- package/dist/lib/install-helper.js +42 -4
- package/dist/lib/install-helper.js.map +1 -1
- package/dist/lib/lockfile-helper.d.ts +4 -0
- package/dist/lib/lockfile-helper.d.ts.map +1 -0
- package/dist/lib/lockfile-helper.js +25 -0
- package/dist/lib/lockfile-helper.js.map +1 -0
- package/dist/lib/search/registry.d.ts +4 -6
- package/dist/lib/search/registry.d.ts.map +1 -1
- package/dist/lib/search/registry.js +5 -12
- package/dist/lib/search/registry.js.map +1 -1
- package/dist/lib/search/skill-install.d.ts +7 -0
- package/dist/lib/search/skill-install.d.ts.map +1 -0
- package/dist/lib/search/skill-install.js +81 -0
- package/dist/lib/search/skill-install.js.map +1 -0
- package/dist/lib/search/sources/index.d.ts +1 -2
- package/dist/lib/search/sources/index.d.ts.map +1 -1
- package/dist/lib/search/sources/index.js +1 -2
- package/dist/lib/search/sources/index.js.map +1 -1
- package/dist/lib/search/sources/skills-library.d.ts +14 -0
- package/dist/lib/search/sources/skills-library.d.ts.map +1 -0
- package/dist/lib/search/sources/skills-library.js +42 -0
- package/dist/lib/search/sources/skills-library.js.map +1 -0
- package/dist/lib/search/types.d.ts +0 -8
- package/dist/lib/search/types.d.ts.map +1 -1
- package/dist/lib/search/types.js +1 -13
- package/dist/lib/search/types.js.map +1 -1
- package/dist/lib/skill-source.d.ts +11 -0
- package/dist/lib/skill-source.d.ts.map +1 -0
- package/dist/lib/skill-source.js +194 -0
- package/dist/lib/skill-source.js.map +1 -0
- package/dist/ui/search/components/DetailsPanel.d.ts.map +1 -1
- package/dist/ui/search/components/DetailsPanel.js +1 -1
- package/dist/ui/search/components/DetailsPanel.js.map +1 -1
- package/oclif.manifest.json +567 -177
- package/package.json +1 -1
- package/dist/commands/global/cleanup.d.ts +0 -14
- package/dist/commands/global/cleanup.d.ts.map +0 -1
- package/dist/commands/global/cleanup.js +0 -92
- package/dist/commands/global/cleanup.js.map +0 -1
- package/dist/commands/global/index.d.ts +0 -7
- package/dist/commands/global/index.d.ts.map +0 -1
- package/dist/commands/global/index.js +0 -10
- package/dist/commands/global/index.js.map +0 -1
- package/dist/commands/global/list.d.ts.map +0 -1
- package/dist/commands/global/list.js +0 -40
- package/dist/commands/global/list.js.map +0 -1
- package/dist/lib/search/sources/claude-plugins-dev.d.ts +0 -16
- package/dist/lib/search/sources/claude-plugins-dev.d.ts.map +0 -1
- package/dist/lib/search/sources/claude-plugins-dev.js +0 -44
- package/dist/lib/search/sources/claude-plugins-dev.js.map +0 -1
- package/dist/lib/search/sources/npm.d.ts +0 -14
- package/dist/lib/search/sources/npm.d.ts.map +0 -1
- package/dist/lib/search/sources/npm.js +0 -42
- package/dist/lib/search/sources/npm.js.map +0 -1
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
import { Args, Flags } from '@oclif/core';
|
|
2
|
+
import { getAvailableEditors, importFromEditor, normalizeEditorImport, buildConfigFromEditorImport, installToEditor, } from '@a1st/aix-core';
|
|
3
|
+
import { BaseCommand } from '../base-command.js';
|
|
4
|
+
const VALID_EDITORS = getAvailableEditors();
|
|
5
|
+
export default class Sync extends BaseCommand {
|
|
6
|
+
static description = 'Sync supported configuration from one editor to another';
|
|
7
|
+
static examples = [
|
|
8
|
+
'<%= config.bin %> <%= command.id %> cursor --to claude-code',
|
|
9
|
+
'<%= config.bin %> <%= command.id %> cursor --to opencode --scope project',
|
|
10
|
+
'<%= config.bin %> <%= command.id %> opencode --to windsurf --from-scope project --to-scope user',
|
|
11
|
+
'<%= config.bin %> <%= command.id %> cursor --to zed --dry-run',
|
|
12
|
+
];
|
|
13
|
+
static args = {
|
|
14
|
+
from: Args.string({
|
|
15
|
+
description: `Source editor (${VALID_EDITORS.join(', ')})`,
|
|
16
|
+
required: true,
|
|
17
|
+
options: VALID_EDITORS,
|
|
18
|
+
}),
|
|
19
|
+
};
|
|
20
|
+
static flags = {
|
|
21
|
+
to: Flags.string({
|
|
22
|
+
char: 't',
|
|
23
|
+
description: 'Destination editor',
|
|
24
|
+
required: true,
|
|
25
|
+
options: VALID_EDITORS,
|
|
26
|
+
}),
|
|
27
|
+
scope: Flags.string({
|
|
28
|
+
char: 's',
|
|
29
|
+
description: 'Apply the same scope to both source and destination',
|
|
30
|
+
options: ['user', 'project'],
|
|
31
|
+
}),
|
|
32
|
+
'from-scope': Flags.string({
|
|
33
|
+
description: 'Scope to read from on the source editor',
|
|
34
|
+
options: ['user', 'project'],
|
|
35
|
+
}),
|
|
36
|
+
'to-scope': Flags.string({
|
|
37
|
+
description: 'Scope to write to on the destination editor',
|
|
38
|
+
options: ['user', 'project'],
|
|
39
|
+
}),
|
|
40
|
+
'dry-run': Flags.boolean({
|
|
41
|
+
char: 'd',
|
|
42
|
+
description: 'Preview sync changes without applying them',
|
|
43
|
+
default: false,
|
|
44
|
+
}),
|
|
45
|
+
};
|
|
46
|
+
async run() {
|
|
47
|
+
const { args, flags } = await this.parse(Sync), from = args.from, to = flags.to, sharedScope = flags.scope, fromScope = flags['from-scope'] ?? sharedScope ?? 'user', toScope = flags['to-scope'] ?? sharedScope ?? 'user', projectRoot = process.cwd(), isDryRun = flags['dry-run'];
|
|
48
|
+
if (from === to) {
|
|
49
|
+
this.error('Source and destination editors must differ.');
|
|
50
|
+
}
|
|
51
|
+
this.output.startSpinner(isDryRun ? `Analyzing sync from ${from} to ${to}...` : `Syncing ${from} to ${to}...`);
|
|
52
|
+
try {
|
|
53
|
+
const imported = await importFromEditor(from, {
|
|
54
|
+
projectRoot,
|
|
55
|
+
scope: fromScope,
|
|
56
|
+
}), importWarnings = [...new Set(imported.warnings)], normalized = normalizeEditorImport(from, imported), importedCount = this.countImported(normalized);
|
|
57
|
+
this.showImportWarnings(importWarnings);
|
|
58
|
+
if (importedCount === 0) {
|
|
59
|
+
this.output.stopSpinner(true, `No supported configuration found in ${from} (${fromScope} scope)`);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
const result = await installToEditor(to, buildConfigFromEditorImport(from, imported), projectRoot, {
|
|
63
|
+
dryRun: isDryRun,
|
|
64
|
+
targetScope: toScope,
|
|
65
|
+
strictTargetScope: true,
|
|
66
|
+
});
|
|
67
|
+
if (!result.success) {
|
|
68
|
+
this.output.stopSpinner(false, `Failed to sync ${from} to ${to}`);
|
|
69
|
+
for (const error of result.errors) {
|
|
70
|
+
this.output.error(error);
|
|
71
|
+
}
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
this.output.stopSpinner(true, isDryRun ? `Sync preview for ${from} -> ${to}` : `Synced ${from} -> ${to}`);
|
|
75
|
+
this.displayImportSummary(from, fromScope, normalized);
|
|
76
|
+
this.displayChanges(result.changes, isDryRun);
|
|
77
|
+
this.displayGlobalChanges(result.globalChanges);
|
|
78
|
+
this.showUnsupportedFeatureWarnings(to, result.unsupportedFeatures);
|
|
79
|
+
this.showTargetScopeLimitations(to, toScope, result.targetScopeLimitations);
|
|
80
|
+
this.showNoWritableChangesMessage(to, result);
|
|
81
|
+
if (this.flags.json) {
|
|
82
|
+
this.output.json({
|
|
83
|
+
from,
|
|
84
|
+
to,
|
|
85
|
+
fromScope,
|
|
86
|
+
toScope,
|
|
87
|
+
dryRun: isDryRun,
|
|
88
|
+
imported: {
|
|
89
|
+
mcp: Object.keys(normalized.mcp).length,
|
|
90
|
+
rules: normalized.rules.length,
|
|
91
|
+
prompts: normalized.prompts.length,
|
|
92
|
+
skills: normalized.skills.length,
|
|
93
|
+
hooks: Object.keys(normalized.hooks).length,
|
|
94
|
+
},
|
|
95
|
+
importWarnings,
|
|
96
|
+
noWritableChanges: !this.hasWritableChanges(result),
|
|
97
|
+
result,
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
catch (error) {
|
|
102
|
+
this.output.stopSpinner(false, `Failed to sync ${from} to ${to}`);
|
|
103
|
+
throw error;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
countImported(normalized) {
|
|
107
|
+
return (Object.keys(normalized.mcp).length +
|
|
108
|
+
normalized.rules.length +
|
|
109
|
+
normalized.prompts.length +
|
|
110
|
+
normalized.skills.length +
|
|
111
|
+
Object.keys(normalized.hooks).length);
|
|
112
|
+
}
|
|
113
|
+
showImportWarnings(warnings) {
|
|
114
|
+
if (warnings.length === 0 || this.flags.quiet) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
for (const warning of warnings) {
|
|
118
|
+
this.output.warn(warning);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
displayImportSummary(from, fromScope, normalized) {
|
|
122
|
+
this.output.log('');
|
|
123
|
+
this.output.log(this.output.cyan(` Imported from ${from} (${fromScope})`));
|
|
124
|
+
this.output.log(` ${this.output.green('✓')} MCP servers: ${Object.keys(normalized.mcp).length}`);
|
|
125
|
+
this.output.log(` ${this.output.green('✓')} rules: ${normalized.rules.length}`);
|
|
126
|
+
this.output.log(` ${this.output.green('✓')} prompts: ${normalized.prompts.length}`);
|
|
127
|
+
this.output.log(` ${this.output.green('✓')} skills: ${normalized.skills.length}`);
|
|
128
|
+
this.output.log(` ${this.output.green('✓')} hooks: ${Object.keys(normalized.hooks).length}`);
|
|
129
|
+
this.output.log('');
|
|
130
|
+
}
|
|
131
|
+
showUnsupportedFeatureWarnings(editor, unsupported) {
|
|
132
|
+
if (!unsupported || this.flags.quiet) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
if (unsupported.mcp) {
|
|
136
|
+
this.output.warn(`${editor} does not support MCP. Skipped servers: ${unsupported.mcp.servers.join(', ')}`);
|
|
137
|
+
}
|
|
138
|
+
if (unsupported.hooks) {
|
|
139
|
+
if (unsupported.hooks.allUnsupported) {
|
|
140
|
+
this.output.warn(`${editor} does not support hooks. All hooks skipped.`);
|
|
141
|
+
}
|
|
142
|
+
else if (unsupported.hooks.unsupportedEvents?.length) {
|
|
143
|
+
this.output.warn(`${editor} does not support these hook events: ${unsupported.hooks.unsupportedEvents.join(', ')}`);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
if (unsupported.prompts) {
|
|
147
|
+
this.output.warn(`${editor} does not support prompts. Skipped: ${unsupported.prompts.prompts.join(', ')}`);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
showTargetScopeLimitations(editor, targetScope, limitations) {
|
|
151
|
+
if (!limitations || this.flags.quiet) {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
if (limitations.rules) {
|
|
155
|
+
this.output.warn(`${editor} cannot write rules at ${targetScope} scope. Skipped: ${limitations.rules.rules.join(', ')}`);
|
|
156
|
+
}
|
|
157
|
+
if (limitations.skills) {
|
|
158
|
+
this.output.warn(`${editor} cannot activate these skills at ${targetScope} scope. Skipped: ${limitations.skills.skills.join(', ')}`);
|
|
159
|
+
}
|
|
160
|
+
if (limitations.hooks) {
|
|
161
|
+
this.output.warn(`${editor} cannot write hooks at ${targetScope} scope. Skipped events: ${limitations.hooks.events.join(', ')}`);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
displayChanges(changes, showAction = false) {
|
|
165
|
+
if (changes.length === 0 || this.flags.quiet) {
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
const byCategory = new Map();
|
|
169
|
+
for (const change of changes) {
|
|
170
|
+
const category = change.category ?? 'other', list = byCategory.get(category) ?? [];
|
|
171
|
+
list.push(change);
|
|
172
|
+
byCategory.set(category, list);
|
|
173
|
+
}
|
|
174
|
+
const categoryOrder = [
|
|
175
|
+
{ key: 'skill', label: 'Skills' },
|
|
176
|
+
{ key: 'rule', label: 'Rules' },
|
|
177
|
+
{ key: 'workflow', label: 'Workflows' },
|
|
178
|
+
{ key: 'mcp', label: 'MCP' },
|
|
179
|
+
{ key: 'hook', label: 'Hooks' },
|
|
180
|
+
{ key: 'other', label: 'Other' },
|
|
181
|
+
];
|
|
182
|
+
for (const { key, label } of categoryOrder) {
|
|
183
|
+
const categoryChanges = byCategory.get(key);
|
|
184
|
+
if (!categoryChanges || categoryChanges.length === 0) {
|
|
185
|
+
continue;
|
|
186
|
+
}
|
|
187
|
+
this.output.log(this.output.cyan(` ${label}`));
|
|
188
|
+
const seenNames = new Set();
|
|
189
|
+
for (const change of categoryChanges) {
|
|
190
|
+
const name = key === 'skill' ? this.extractSkillName(change.path) : this.extractFileName(change.path);
|
|
191
|
+
if (key === 'skill') {
|
|
192
|
+
if (seenNames.has(name)) {
|
|
193
|
+
continue;
|
|
194
|
+
}
|
|
195
|
+
seenNames.add(name);
|
|
196
|
+
}
|
|
197
|
+
const prefix = this.getChangePrefix(change.action), action = showAction ? ` ${this.output.dim(`(${change.action})`)}` : '';
|
|
198
|
+
this.output.log(` ${prefix} ${name}${action}`);
|
|
199
|
+
}
|
|
200
|
+
this.output.log('');
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
getChangePrefix(action) {
|
|
204
|
+
switch (action) {
|
|
205
|
+
case 'create':
|
|
206
|
+
case 'update':
|
|
207
|
+
case 'unchanged':
|
|
208
|
+
return this.output.green('✓');
|
|
209
|
+
case 'delete':
|
|
210
|
+
return this.output.red('-');
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
displayGlobalChanges(globalChanges) {
|
|
214
|
+
if (!globalChanges || this.flags.quiet) {
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
const groups = [
|
|
218
|
+
{ label: 'Global MCP', type: 'mcp' },
|
|
219
|
+
{ label: 'Global Prompts', type: 'prompt' },
|
|
220
|
+
];
|
|
221
|
+
for (const { label, type } of groups) {
|
|
222
|
+
const applied = globalChanges.applied.filter((change) => change.type === type), skipped = globalChanges.skipped.filter((change) => change.type === type);
|
|
223
|
+
if (applied.length === 0 && skipped.length === 0) {
|
|
224
|
+
continue;
|
|
225
|
+
}
|
|
226
|
+
this.output.log(this.output.cyan(` ${label}`));
|
|
227
|
+
for (const change of applied) {
|
|
228
|
+
this.output.log(` ${this.output.green('✓')} ${change.name}`);
|
|
229
|
+
}
|
|
230
|
+
for (const change of skipped) {
|
|
231
|
+
this.output.log(` ${this.output.dim('-')} ${change.name} ${this.output.dim(`(${change.reason})`)}`);
|
|
232
|
+
}
|
|
233
|
+
this.output.log('');
|
|
234
|
+
}
|
|
235
|
+
for (const warning of globalChanges.warnings) {
|
|
236
|
+
this.output.warn(warning);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
hasWritableChanges(result) {
|
|
240
|
+
return (result.changes.some((change) => change.action !== 'unchanged') ||
|
|
241
|
+
Boolean(result.globalChanges && result.globalChanges.applied.length > 0));
|
|
242
|
+
}
|
|
243
|
+
showNoWritableChangesMessage(editor, result) {
|
|
244
|
+
if (this.flags.quiet || this.hasWritableChanges(result)) {
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
const hasSkippedFeatures = Boolean(result.globalChanges?.skipped.length ||
|
|
248
|
+
result.unsupportedFeatures?.mcp ||
|
|
249
|
+
result.unsupportedFeatures?.hooks ||
|
|
250
|
+
result.unsupportedFeatures?.prompts ||
|
|
251
|
+
result.targetScopeLimitations?.rules ||
|
|
252
|
+
result.targetScopeLimitations?.skills ||
|
|
253
|
+
result.targetScopeLimitations?.hooks);
|
|
254
|
+
if (hasSkippedFeatures) {
|
|
255
|
+
this.output.info(`No writable destination changes remain after applying ${editor} support and scope limits.`);
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
this.output.info(`No destination changes were needed for ${editor}.`);
|
|
259
|
+
}
|
|
260
|
+
extractSkillName(path) {
|
|
261
|
+
const match = path.match(/(?:\.aix|\.agents|\.windsurf|\.cursor|\.claude|\.github|\.codex|\.gemini|\.opencode)\/skills\/([^/]+)/);
|
|
262
|
+
return match?.[1] ?? this.extractFileName(path);
|
|
263
|
+
}
|
|
264
|
+
extractFileName(path) {
|
|
265
|
+
const parts = path.split('/'), last = parts[parts.length - 1];
|
|
266
|
+
return last !== undefined ? last : path;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
//# sourceMappingURL=sync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync.js","sourceRoot":"","sources":["../../src/commands/sync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAU1C,OAAO,EACJ,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,EACrB,2BAA2B,EAC3B,eAAe,GACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,o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/B,MAAM,CAAC,aAAa,EAAE,OAAO,CAAC,MAAM;YACpC,MAAM,CAAC,mBAAmB,EAAE,GAAG;YAC/B,MAAM,CAAC,mBAAmB,EAAE,KAAK;YACjC,MAAM,CAAC,mBAAmB,EAAE,OAAO;YACnC,MAAM,CAAC,sBAAsB,EAAE,KAAK;YACpC,MAAM,CAAC,sBAAsB,EAAE,MAAM;YACrC,MAAM,CAAC,sBAAsB,EAAE,KAAK,CACtC,CAAC;QAEF,IAAI,kBAAkB,EAAE,CAAC;YACtB,IAAI,CAAC,MAAM,CAAC,IAAI,CACb,yDAAyD,MAAM,4BAA4B,CAC7F,CAAC;YACF,OAAO;QACV,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,0CAA0C,MAAM,GAAG,CAAC,CAAC;IACzE,CAAC;IAEO,gBAAgB,CAAC,IAAY;QAClC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CACrB,uGAAuG,CACzG,CAAC;QAEF,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IACnD,CAAC;IAEO,eAAe,CAAC,IAAY;QACjC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EACvB,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAErC,OAAO,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IAC3C,CAAC"}
|
|
@@ -2,6 +2,9 @@ import { BaseCommand } from '../base-command.js';
|
|
|
2
2
|
export default class Validate extends BaseCommand<typeof Validate> {
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
lock: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
7
|
+
};
|
|
5
8
|
run(): Promise<void>;
|
|
6
9
|
}
|
|
7
10
|
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/commands/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/commands/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAKjD,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,WAAW,CAAC,OAAO,QAAQ,CAAC;IAC/D,OAAgB,WAAW,SAAoC;IAE/D,OAAgB,QAAQ,WAKtB;IAEF,OAAgB,KAAK;;MAKnB;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAuE5B"}
|
|
@@ -1,18 +1,29 @@
|
|
|
1
1
|
import { BaseCommand } from '../base-command.js';
|
|
2
|
-
import { loadConfig as coreLoadConfig } from '@a1st/aix-core';
|
|
2
|
+
import { loadConfig as coreLoadConfig, generateAndWriteLockfile } from '@a1st/aix-core';
|
|
3
3
|
import { ConfigValidationError } from '@a1st/aix-core';
|
|
4
|
+
import { Flags } from '@oclif/core';
|
|
4
5
|
export default class Validate extends BaseCommand {
|
|
5
6
|
static description = 'Validate ai.json configuration';
|
|
6
7
|
static examples = [
|
|
7
8
|
'<%= config.bin %> <%= command.id %>',
|
|
8
9
|
'<%= config.bin %> <%= command.id %> --config ./path/to/ai.json',
|
|
9
10
|
'<%= config.bin %> <%= command.id %> --json',
|
|
11
|
+
'<%= config.bin %> <%= command.id %> --lock',
|
|
10
12
|
];
|
|
13
|
+
static flags = {
|
|
14
|
+
lock: Flags.boolean({
|
|
15
|
+
description: 'Create or refresh ai.lock.json after validating',
|
|
16
|
+
default: false,
|
|
17
|
+
}),
|
|
18
|
+
};
|
|
11
19
|
async run() {
|
|
12
20
|
const configPath = this.flags.config;
|
|
13
21
|
this.output.startSpinner('Validating configuration...');
|
|
14
22
|
try {
|
|
15
|
-
const result = await coreLoadConfig(
|
|
23
|
+
const result = await coreLoadConfig({
|
|
24
|
+
explicitPath: configPath,
|
|
25
|
+
lockfileMode: this.flags.lock ? 'ignore' : 'auto',
|
|
26
|
+
});
|
|
16
27
|
if (!result) {
|
|
17
28
|
this.output.stopSpinner(false, 'No ai.json found');
|
|
18
29
|
if (this.flags.json) {
|
|
@@ -21,11 +32,22 @@ export default class Validate extends BaseCommand {
|
|
|
21
32
|
this.error('No ai.json found. Run `aix init` to create one.');
|
|
22
33
|
}
|
|
23
34
|
this.output.stopSpinner(true, 'Configuration is valid');
|
|
35
|
+
let lockfilePath = result.lockfilePath;
|
|
36
|
+
if (this.flags.lock) {
|
|
37
|
+
const written = await generateAndWriteLockfile({
|
|
38
|
+
config: result.config,
|
|
39
|
+
configPath: result.path,
|
|
40
|
+
configBaseDir: result.configBaseDir,
|
|
41
|
+
});
|
|
42
|
+
lockfilePath = written.lockfilePath;
|
|
43
|
+
this.output.success(`Updated ${lockfilePath}`);
|
|
44
|
+
}
|
|
24
45
|
if (this.flags.json) {
|
|
25
46
|
this.output.json({
|
|
26
47
|
valid: true,
|
|
27
48
|
path: result.path,
|
|
28
49
|
source: result.source,
|
|
50
|
+
lockfilePath,
|
|
29
51
|
config: result.config,
|
|
30
52
|
});
|
|
31
53
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../src/commands/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../src/commands/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,wBAAwB,EAAE,MA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;gBAED,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAChB,CAAC;YAED,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;gBAC1B,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;oBACnB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;gBAC5D,CAAC;gBACD,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YAC7B,CAAC;YAED,MAAM,KAAK,CAAC;QACf,CAAC;IACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lock.d.ts","sourceRoot":"","sources":["../../src/flags/lock.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW;;CAKvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lock.js","sourceRoot":"","sources":["../../src/flags/lock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC,MAAM,CAAC,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC;QACjB,WAAW,EAAE,6CAA6C;QAC1D,OAAO,EAAE,KAAK;KAChB,CAAC;CACJ,CAAC"}
|
package/dist/flags/scope.d.ts
CHANGED
|
@@ -1,20 +1,56 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
import type { ConfigScope } from '@a1st/aix-schema';
|
|
2
|
+
export declare const VALID_SECTIONS: readonly ["rules", "prompts", "mcp", "skills", "editors"];
|
|
3
|
+
export type Section = (typeof VALID_SECTIONS)[number];
|
|
3
4
|
/**
|
|
4
|
-
* Reusable --
|
|
5
|
-
*
|
|
5
|
+
* Reusable --only flag for filtering commands by config section.
|
|
6
|
+
* Replaces the old --scope flag (which now means user/project).
|
|
6
7
|
*/
|
|
7
|
-
export declare const
|
|
8
|
-
|
|
8
|
+
export declare const onlyFlag: {
|
|
9
|
+
only: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
10
|
};
|
|
10
11
|
/**
|
|
11
|
-
* Parse and validate
|
|
12
|
+
* Parse and validate --only flags, returning all sections if none specified.
|
|
13
|
+
*/
|
|
14
|
+
export declare function parseSections(flags: {
|
|
15
|
+
only?: string[];
|
|
16
|
+
}): Section[];
|
|
17
|
+
/**
|
|
18
|
+
* Check if a section is included in the filter.
|
|
19
|
+
*/
|
|
20
|
+
export declare function includesSection(sections: Section[], section: Section): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Reusable flags for targeting user or project scope.
|
|
23
|
+
* --scope user|project, --user/-u, --project/-p
|
|
12
24
|
*/
|
|
13
|
-
export declare
|
|
14
|
-
scope
|
|
15
|
-
|
|
25
|
+
export declare const configScopeFlags: {
|
|
26
|
+
scope: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
27
|
+
user: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
28
|
+
project: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
29
|
+
};
|
|
16
30
|
/**
|
|
17
|
-
*
|
|
31
|
+
* Resolve the target ConfigScope from the parsed flags.
|
|
32
|
+
* Priority: --scope > --user/--project > defaultScope.
|
|
18
33
|
*/
|
|
19
|
-
export declare function
|
|
34
|
+
export declare function resolveConfigScope(flags: {
|
|
35
|
+
scope?: string;
|
|
36
|
+
user?: boolean;
|
|
37
|
+
project?: boolean;
|
|
38
|
+
}, defaultScope?: ConfigScope): ConfigScope;
|
|
39
|
+
export declare function resolveConfigScope(flags: {
|
|
40
|
+
scope?: string;
|
|
41
|
+
user?: boolean;
|
|
42
|
+
project?: boolean;
|
|
43
|
+
}, defaultScope: undefined): ConfigScope | undefined;
|
|
44
|
+
/** @deprecated Use `onlyFlag` instead. */
|
|
45
|
+
export declare const scopeFlag: {
|
|
46
|
+
only: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
47
|
+
};
|
|
48
|
+
/** @deprecated Use `Section` instead. */
|
|
49
|
+
export type Scope = Section;
|
|
50
|
+
/** @deprecated Use `VALID_SECTIONS` instead. */
|
|
51
|
+
export declare const VALID_SCOPES: readonly ["rules", "prompts", "mcp", "skills", "editors"];
|
|
52
|
+
/** @deprecated Use `parseSections` instead. */
|
|
53
|
+
export declare const parseScopes: typeof parseSections;
|
|
54
|
+
/** @deprecated Use `includesSection` instead. */
|
|
55
|
+
export declare const includesScope: typeof includesSection;
|
|
20
56
|
//# sourceMappingURL=scope.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../src/flags/scope.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../src/flags/scope.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAIpD,eAAO,MAAM,cAAc,2DAA4D,CAAC;AACxF,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtD;;;GAGG;AACH,eAAO,MAAM,QAAQ;;CAMpB,CAAC;AAEF;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,OAAO,EAAE,CAKnE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAE9E;AAID;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;CAkB5B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,kBAAkB,CAC/B,KAAK,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,EAC5D,YAAY,CAAC,EAAE,WAAW,GAC1B,WAAW,CAAC;AACf,wBAAgB,kBAAkB,CAC/B,KAAK,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,EAC5D,YAAY,EAAE,SAAS,GACvB,WAAW,GAAG,SAAS,CAAC;AAsB3B,0CAA0C;AAC1C,eAAO,MAAM,SAAS;;CAAW,CAAC;AAClC,yCAAyC;AACzC,MAAM,MAAM,KAAK,GAAG,OAAO,CAAC;AAC5B,gDAAgD;AAChD,eAAO,MAAM,YAAY,2DAAiB,CAAC;AAC3C,+CAA+C;AAC/C,eAAO,MAAM,WAAW,sBAAgB,CAAC;AACzC,iDAAiD;AACjD,eAAO,MAAM,aAAa,wBAAkB,CAAC"}
|
package/dist/flags/scope.js
CHANGED
|
@@ -1,30 +1,77 @@
|
|
|
1
1
|
import { Flags } from '@oclif/core';
|
|
2
|
-
|
|
2
|
+
// --- Section filter (formerly --scope, now --only) ---
|
|
3
|
+
export const VALID_SECTIONS = ['rules', 'prompts', 'mcp', 'skills', 'editors'];
|
|
3
4
|
/**
|
|
4
|
-
* Reusable --
|
|
5
|
-
*
|
|
5
|
+
* Reusable --only flag for filtering commands by config section.
|
|
6
|
+
* Replaces the old --scope flag (which now means user/project).
|
|
6
7
|
*/
|
|
7
|
-
export const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
description: 'Filter to specific fields (repeatable)',
|
|
8
|
+
export const onlyFlag = {
|
|
9
|
+
only: Flags.string({
|
|
10
|
+
description: 'Filter to specific config sections (repeatable)',
|
|
11
11
|
multiple: true,
|
|
12
|
-
options: [...
|
|
12
|
+
options: [...VALID_SECTIONS],
|
|
13
13
|
}),
|
|
14
14
|
};
|
|
15
15
|
/**
|
|
16
|
-
* Parse and validate
|
|
16
|
+
* Parse and validate --only flags, returning all sections if none specified.
|
|
17
17
|
*/
|
|
18
|
-
export function
|
|
19
|
-
if (!flags.
|
|
20
|
-
return [...
|
|
18
|
+
export function parseSections(flags) {
|
|
19
|
+
if (!flags.only || flags.only.length === 0) {
|
|
20
|
+
return [...VALID_SECTIONS];
|
|
21
21
|
}
|
|
22
|
-
return flags.
|
|
22
|
+
return flags.only;
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
-
* Check if a
|
|
25
|
+
* Check if a section is included in the filter.
|
|
26
26
|
*/
|
|
27
|
-
export function
|
|
28
|
-
return
|
|
27
|
+
export function includesSection(sections, section) {
|
|
28
|
+
return sections.includes(section);
|
|
29
|
+
}
|
|
30
|
+
// --- Config scope (user vs project) ---
|
|
31
|
+
/**
|
|
32
|
+
* Reusable flags for targeting user or project scope.
|
|
33
|
+
* --scope user|project, --user/-u, --project/-p
|
|
34
|
+
*/
|
|
35
|
+
export const configScopeFlags = {
|
|
36
|
+
scope: Flags.string({
|
|
37
|
+
char: 's',
|
|
38
|
+
description: 'Target scope for installation',
|
|
39
|
+
options: ['user', 'project'],
|
|
40
|
+
}),
|
|
41
|
+
user: Flags.boolean({
|
|
42
|
+
char: 'u',
|
|
43
|
+
description: 'Target user scope (alias for --scope user)',
|
|
44
|
+
default: false,
|
|
45
|
+
exclusive: ['project'],
|
|
46
|
+
}),
|
|
47
|
+
project: Flags.boolean({
|
|
48
|
+
char: 'p',
|
|
49
|
+
description: 'Target project scope (alias for --scope project)',
|
|
50
|
+
default: false,
|
|
51
|
+
exclusive: ['user'],
|
|
52
|
+
}),
|
|
53
|
+
};
|
|
54
|
+
export function resolveConfigScope(flags, defaultScope) {
|
|
55
|
+
// Use 'user' as default only when argument is not passed at all
|
|
56
|
+
const resolvedDefault = arguments.length < 2 ? 'user' : defaultScope;
|
|
57
|
+
if (flags.scope) {
|
|
58
|
+
return flags.scope;
|
|
59
|
+
}
|
|
60
|
+
if (flags.user) {
|
|
61
|
+
return 'user';
|
|
62
|
+
}
|
|
63
|
+
if (flags.project) {
|
|
64
|
+
return 'project';
|
|
65
|
+
}
|
|
66
|
+
return resolvedDefault;
|
|
29
67
|
}
|
|
68
|
+
// --- Backward compatibility aliases ---
|
|
69
|
+
/** @deprecated Use `onlyFlag` instead. */
|
|
70
|
+
export const scopeFlag = onlyFlag;
|
|
71
|
+
/** @deprecated Use `VALID_SECTIONS` instead. */
|
|
72
|
+
export const VALID_SCOPES = VALID_SECTIONS;
|
|
73
|
+
/** @deprecated Use `parseSections` instead. */
|
|
74
|
+
export const parseScopes = parseSections;
|
|
75
|
+
/** @deprecated Use `includesSection` instead. */
|
|
76
|
+
export const includesScope = includesSection;
|
|
30
77
|
//# sourceMappingURL=scope.js.map
|
package/dist/flags/scope.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope.js","sourceRoot":"","sources":["../../src/flags/scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"scope.js","sourceRoot":"","sources":["../../src/flags/scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAGpC,wDAAwD;AAExD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,CAAU,CAAC;AAGxF;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC;QAChB,WAAW,EAAE,iDAAiD;QAC9D,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,CAAC,GAAG,cAAc,CAAC;KAC9B,CAAC;CACJ,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,KAA0B;IACrD,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,KAAK,CAA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AAO,SAAS,CAAC;IACpB,CAAC;IACD,OAAO,eAAe,CAAC;AAC1B,CAAC;AAED,yCAAyC;AAEzC,0CAA0C;AAC1C,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC;AAGlC,gDAAgD;AAChD,MAAM,CAAC,MAAM,YAAY,GAAG,cAAc,CAAC;AAC3C,+CAA+C;AAC/C,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAC;AACzC,iDAAiD;AACjD,MAAM,CAAC,MAAM,aAAa,GAAG,eAAe,CAAC"}
|
package/dist/lib/add-helper.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export interface AddSkillOptions {
|
|
|
2
2
|
configPath: string;
|
|
3
3
|
name: string;
|
|
4
4
|
source: string;
|
|
5
|
+
ref?: string;
|
|
5
6
|
skipInstall?: boolean;
|
|
6
7
|
}
|
|
7
8
|
export interface AddMcpOptions {
|
|
@@ -15,8 +16,7 @@ export interface AddResult {
|
|
|
15
16
|
error?: string;
|
|
16
17
|
}
|
|
17
18
|
/**
|
|
18
|
-
* Add a skill to ai.json programmatically.
|
|
19
|
-
* For npm packages, the source should be the package name (e.g., "aix-skill-typescript" or just "typescript").
|
|
19
|
+
* Add a skill to ai.json programmatically using aix-native source parsing.
|
|
20
20
|
*/
|
|
21
21
|
export declare function addSkill(options: AddSkillOptions): Promise<AddResult>;
|
|
22
22
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-helper.d.ts","sourceRoot":"","sources":["../../src/lib/add-helper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"add-helper.d.ts","sourceRoot":"","sources":["../../src/lib/add-helper.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,eAAe;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,OAAO,CAAC;C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