@claude-collective/cli 0.2.0 → 0.8.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/CHANGELOG.md +178 -0
- package/README.md +1 -1
- package/dist/chunk-3HBTELJN.js +114 -0
- package/dist/chunk-3HBTELJN.js.map +1 -0
- package/dist/chunk-3ZCB5K33.js +54 -0
- package/dist/chunk-3ZCB5K33.js.map +1 -0
- package/dist/chunk-66UDJBF6.js +96 -0
- package/dist/chunk-66UDJBF6.js.map +1 -0
- package/dist/chunk-6LS7XO3H.js +31 -0
- package/dist/chunk-6LS7XO3H.js.map +1 -0
- package/dist/chunk-A3J6IAXK.js +57 -0
- package/dist/chunk-A3J6IAXK.js.map +1 -0
- package/dist/chunk-A65SBAAJ.js +69 -0
- package/dist/chunk-A65SBAAJ.js.map +1 -0
- package/dist/chunk-ALEPJ6YN.js +80 -0
- package/dist/chunk-ALEPJ6YN.js.map +1 -0
- package/dist/chunk-C4ZTIYFR.js +84 -0
- package/dist/chunk-C4ZTIYFR.js.map +1 -0
- package/dist/chunk-CIY5UBRB.js +453 -0
- package/dist/chunk-CIY5UBRB.js.map +1 -0
- package/dist/chunk-DHET7RCE.js +50 -0
- package/dist/chunk-DHET7RCE.js.map +1 -0
- package/dist/chunk-DHFFRMF6.js +31 -0
- package/dist/chunk-DHFFRMF6.js.map +1 -0
- package/dist/chunk-DKGL77IY.js +307 -0
- package/dist/chunk-DKGL77IY.js.map +1 -0
- package/dist/chunk-ED73HCW2.js +315 -0
- package/dist/chunk-ED73HCW2.js.map +1 -0
- package/dist/chunk-FNOYEXUE.js +308 -0
- package/dist/chunk-FNOYEXUE.js.map +1 -0
- package/dist/chunk-G2FBJOZG.js +141 -0
- package/dist/chunk-G2FBJOZG.js.map +1 -0
- package/dist/chunk-HNDT5QRB.js +120 -0
- package/dist/chunk-HNDT5QRB.js.map +1 -0
- package/dist/chunk-K7PTOVX4.js +158 -0
- package/dist/chunk-K7PTOVX4.js.map +1 -0
- package/dist/chunk-LQTST4WY.js +91 -0
- package/dist/chunk-LQTST4WY.js.map +1 -0
- package/dist/chunk-LVKRVFYR.js +54 -0
- package/dist/chunk-LVKRVFYR.js.map +1 -0
- package/dist/chunk-M7YCPFIX.js +108 -0
- package/dist/chunk-M7YCPFIX.js.map +1 -0
- package/dist/chunk-MJSFR562.js +57 -0
- package/dist/chunk-MJSFR562.js.map +1 -0
- package/dist/chunk-MMDXNZPF.js +69 -0
- package/dist/chunk-MMDXNZPF.js.map +1 -0
- package/dist/chunk-MYAVQ23U.js +356 -0
- package/dist/chunk-MYAVQ23U.js.map +1 -0
- package/dist/chunk-NGBFJJ7Q.js +124 -0
- package/dist/chunk-NGBFJJ7Q.js.map +1 -0
- package/dist/chunk-OLBOTK3O.js +64 -0
- package/dist/chunk-OLBOTK3O.js.map +1 -0
- package/dist/chunk-PPNTD5LO.js +330 -0
- package/dist/chunk-PPNTD5LO.js.map +1 -0
- package/dist/chunk-Q2LH2DAB.js +392 -0
- package/dist/chunk-Q2LH2DAB.js.map +1 -0
- package/dist/chunk-Q6DR5QUH.js +547 -0
- package/dist/chunk-Q6DR5QUH.js.map +1 -0
- package/dist/chunk-QESUUPOE.js +241 -0
- package/dist/chunk-QESUUPOE.js.map +1 -0
- package/dist/chunk-QGGSLMO3.js +607 -0
- package/dist/chunk-QGGSLMO3.js.map +1 -0
- package/dist/chunk-SEBPPFUW.js +478 -0
- package/dist/chunk-SEBPPFUW.js.map +1 -0
- package/dist/chunk-SYQ7R2JO.js +95 -0
- package/dist/chunk-SYQ7R2JO.js.map +1 -0
- package/dist/chunk-TOPAIL5W.js +22 -0
- package/dist/chunk-TOPAIL5W.js.map +1 -0
- package/dist/chunk-U4VYHKPM.js +110 -0
- package/dist/chunk-U4VYHKPM.js.map +1 -0
- package/dist/chunk-UOWHJ6BE.js +83 -0
- package/dist/chunk-UOWHJ6BE.js.map +1 -0
- package/dist/chunk-XKEG3SCV.js +86 -0
- package/dist/chunk-XKEG3SCV.js.map +1 -0
- package/dist/chunk-XY3XDVMI.js +15599 -0
- package/dist/chunk-XY3XDVMI.js.map +1 -0
- package/dist/chunk-Y3V43XCU.js +76 -0
- package/dist/chunk-Y3V43XCU.js.map +1 -0
- package/dist/chunk-YKXBGCFD.js +129 -0
- package/dist/chunk-YKXBGCFD.js.map +1 -0
- package/dist/cli-v2/defaults/agent-mappings.yaml +185 -0
- package/dist/commands/build/marketplace.js +254 -0
- package/dist/commands/build/marketplace.js.map +1 -0
- package/dist/commands/build/plugins.js +324 -0
- package/dist/commands/build/plugins.js.map +1 -0
- package/dist/commands/build/stack.js +169 -0
- package/dist/commands/build/stack.js.map +1 -0
- package/dist/commands/compile.js +461 -0
- package/dist/commands/compile.js.map +1 -0
- package/dist/commands/config/get.js +60 -0
- package/dist/commands/config/get.js.map +1 -0
- package/dist/commands/config/index.js +22 -0
- package/dist/commands/config/index.js.map +1 -0
- package/dist/commands/config/path.js +35 -0
- package/dist/commands/config/path.js.map +1 -0
- package/dist/commands/config/set-project.js +61 -0
- package/dist/commands/config/set-project.js.map +1 -0
- package/dist/commands/config/set.js +60 -0
- package/dist/commands/config/set.js.map +1 -0
- package/dist/commands/config/show.js +13 -0
- package/dist/commands/config/show.js.map +1 -0
- package/dist/commands/config/unset-project.js +57 -0
- package/dist/commands/config/unset-project.js.map +1 -0
- package/dist/commands/config/unset.js +56 -0
- package/dist/commands/config/unset.js.map +1 -0
- package/dist/commands/diff.js +755 -0
- package/dist/commands/diff.js.map +1 -0
- package/dist/commands/doctor.js +413 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/edit.js +254 -0
- package/dist/commands/edit.js.map +1 -0
- package/dist/commands/eject.js +208 -0
- package/dist/commands/eject.js.map +1 -0
- package/dist/commands/info.js +205 -0
- package/dist/commands/info.js.map +1 -0
- package/dist/commands/init.js +915 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/list.js +44 -0
- package/dist/commands/list.js.map +1 -0
- package/dist/commands/new/agent.js +230 -0
- package/dist/commands/new/agent.js.map +1 -0
- package/dist/commands/new/skill.js +204 -0
- package/dist/commands/new/skill.js.map +1 -0
- package/dist/commands/outdated.js +242 -0
- package/dist/commands/outdated.js.map +1 -0
- package/dist/commands/search.js +115 -0
- package/dist/commands/search.js.map +1 -0
- package/dist/commands/test-imports.js +92 -0
- package/dist/commands/test-imports.js.map +1 -0
- package/dist/commands/uninstall.js +309 -0
- package/dist/commands/uninstall.js.map +1 -0
- package/dist/commands/update.js +428 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/commands/validate.js +375 -0
- package/dist/commands/validate.js.map +1 -0
- package/dist/commands/version/bump.js +95 -0
- package/dist/commands/version/bump.js.map +1 -0
- package/dist/commands/version/index.js +70 -0
- package/dist/commands/version/index.js.map +1 -0
- package/dist/commands/version/set.js +101 -0
- package/dist/commands/version/set.js.map +1 -0
- package/dist/commands/version/show.js +70 -0
- package/dist/commands/version/show.js.map +1 -0
- package/dist/components/common/confirm.js +9 -0
- package/dist/components/common/confirm.js.map +1 -0
- package/dist/components/common/message.js +24 -0
- package/dist/components/common/message.js.map +1 -0
- package/dist/components/common/spinner.js +14 -0
- package/dist/components/common/spinner.js.map +1 -0
- package/dist/components/wizard/category-grid.js +9 -0
- package/dist/components/wizard/category-grid.js.map +1 -0
- package/dist/components/wizard/category-grid.test.js +728 -0
- package/dist/components/wizard/category-grid.test.js.map +1 -0
- package/dist/components/wizard/section-progress.js +9 -0
- package/dist/components/wizard/section-progress.js.map +1 -0
- package/dist/components/wizard/section-progress.test.js +281 -0
- package/dist/components/wizard/section-progress.test.js.map +1 -0
- package/dist/components/wizard/step-approach.js +11 -0
- package/dist/components/wizard/step-approach.js.map +1 -0
- package/dist/components/wizard/step-build.js +15 -0
- package/dist/components/wizard/step-build.js.map +1 -0
- package/dist/components/wizard/step-build.test.js +729 -0
- package/dist/components/wizard/step-build.test.js.map +1 -0
- package/dist/components/wizard/step-confirm.js +9 -0
- package/dist/components/wizard/step-confirm.js.map +1 -0
- package/dist/components/wizard/step-refine.js +9 -0
- package/dist/components/wizard/step-refine.js.map +1 -0
- package/dist/components/wizard/step-refine.test.js +235 -0
- package/dist/components/wizard/step-refine.test.js.map +1 -0
- package/dist/components/wizard/step-stack-options.js +11 -0
- package/dist/components/wizard/step-stack-options.js.map +1 -0
- package/dist/components/wizard/step-stack.js +11 -0
- package/dist/components/wizard/step-stack.js.map +1 -0
- package/dist/components/wizard/wizard-tabs.js +11 -0
- package/dist/components/wizard/wizard-tabs.js.map +1 -0
- package/dist/components/wizard/wizard.js +20 -0
- package/dist/components/wizard/wizard.js.map +1 -0
- package/dist/hooks/init.js +41 -0
- package/dist/hooks/init.js.map +1 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/magic-string.es-RGXYGAW3.js +1316 -0
- package/dist/magic-string.es-RGXYGAW3.js.map +1 -0
- package/dist/stores/wizard-store.js +10 -0
- package/dist/stores/wizard-store.js.map +1 -0
- package/dist/stores/wizard-store.test.js +405 -0
- package/dist/stores/wizard-store.test.js.map +1 -0
- package/package.json +44 -25
- package/dist/cli/index.js +0 -6314
- package/dist/cli/index.js.map +0 -1
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
getPluginInfo
|
|
4
|
+
} from "../chunk-YKXBGCFD.js";
|
|
5
|
+
import {
|
|
6
|
+
validatePluginManifest
|
|
7
|
+
} from "../chunk-CIY5UBRB.js";
|
|
8
|
+
import "../chunk-3ZCB5K33.js";
|
|
9
|
+
import "../chunk-MYAVQ23U.js";
|
|
10
|
+
import {
|
|
11
|
+
compileAllAgents,
|
|
12
|
+
resolveSkillReference
|
|
13
|
+
} from "../chunk-SEBPPFUW.js";
|
|
14
|
+
import "../chunk-3HBTELJN.js";
|
|
15
|
+
import {
|
|
16
|
+
loadSkillsMatrixFromSource
|
|
17
|
+
} from "../chunk-DKGL77IY.js";
|
|
18
|
+
import "../chunk-QGGSLMO3.js";
|
|
19
|
+
import "../chunk-NGBFJJ7Q.js";
|
|
20
|
+
import {
|
|
21
|
+
loadGlobalConfig,
|
|
22
|
+
resolveSource
|
|
23
|
+
} from "../chunk-QESUUPOE.js";
|
|
24
|
+
import "../chunk-A3J6IAXK.js";
|
|
25
|
+
import {
|
|
26
|
+
BaseCommand,
|
|
27
|
+
EXIT_CODES
|
|
28
|
+
} from "../chunk-SYQ7R2JO.js";
|
|
29
|
+
import {
|
|
30
|
+
verbose
|
|
31
|
+
} from "../chunk-TOPAIL5W.js";
|
|
32
|
+
import {
|
|
33
|
+
fileExists,
|
|
34
|
+
readFile
|
|
35
|
+
} from "../chunk-MMDXNZPF.js";
|
|
36
|
+
import {
|
|
37
|
+
init_esm_shims
|
|
38
|
+
} from "../chunk-DHET7RCE.js";
|
|
39
|
+
|
|
40
|
+
// src/cli-v2/commands/test-imports.ts
|
|
41
|
+
init_esm_shims();
|
|
42
|
+
var TestImports = class extends BaseCommand {
|
|
43
|
+
static summary = "Test that lib imports work (temporary command)";
|
|
44
|
+
static hidden = true;
|
|
45
|
+
// Hide from help
|
|
46
|
+
async run() {
|
|
47
|
+
this.log("Testing imports from cli/lib/...");
|
|
48
|
+
this.log("\nConfig from init hook:");
|
|
49
|
+
if (this.sourceConfig) {
|
|
50
|
+
this.log(` \u2713 Config loaded successfully`);
|
|
51
|
+
this.log(` Source: ${this.sourceConfig.source}`);
|
|
52
|
+
this.log(` Origin: ${this.sourceConfig.sourceOrigin}`);
|
|
53
|
+
if (this.sourceConfig.marketplace) {
|
|
54
|
+
this.log(` Marketplace: ${this.sourceConfig.marketplace}`);
|
|
55
|
+
}
|
|
56
|
+
} else {
|
|
57
|
+
this.warn(" Config not loaded - init hook may have failed");
|
|
58
|
+
}
|
|
59
|
+
this.log("\nLib utilities:");
|
|
60
|
+
this.log(` EXIT_CODES.SUCCESS = ${EXIT_CODES.SUCCESS}`);
|
|
61
|
+
this.log(
|
|
62
|
+
` loadGlobalConfig is a function: ${typeof loadGlobalConfig === "function"}`
|
|
63
|
+
);
|
|
64
|
+
this.log(
|
|
65
|
+
` resolveSource is a function: ${typeof resolveSource === "function"}`
|
|
66
|
+
);
|
|
67
|
+
this.log(
|
|
68
|
+
` getPluginInfo is a function: ${typeof getPluginInfo === "function"}`
|
|
69
|
+
);
|
|
70
|
+
this.log(
|
|
71
|
+
` loadSkillsMatrixFromSource is a function: ${typeof loadSkillsMatrixFromSource === "function"}`
|
|
72
|
+
);
|
|
73
|
+
this.log(
|
|
74
|
+
` validatePluginManifest is a function: ${typeof validatePluginManifest === "function"}`
|
|
75
|
+
);
|
|
76
|
+
this.log(
|
|
77
|
+
` compileAllAgents is a function: ${typeof compileAllAgents === "function"}`
|
|
78
|
+
);
|
|
79
|
+
this.log(
|
|
80
|
+
` resolveSkillReference is a function: ${typeof resolveSkillReference === "function"}`
|
|
81
|
+
);
|
|
82
|
+
this.log("\nUtils utilities:");
|
|
83
|
+
this.log(` fileExists is a function: ${typeof fileExists === "function"}`);
|
|
84
|
+
this.log(` readFile is a function: ${typeof readFile === "function"}`);
|
|
85
|
+
this.log(` verbose is a function: ${typeof verbose === "function"}`);
|
|
86
|
+
this.log("\n\u2713 All imports successful!");
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
export {
|
|
90
|
+
TestImports as default
|
|
91
|
+
};
|
|
92
|
+
//# sourceMappingURL=test-imports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/cli-v2/commands/test-imports.ts"],"sourcesContent":["import { BaseCommand } from \"../base-command.js\";\n\n// Test imports from the existing lib\nimport { loadGlobalConfig, resolveSource } from \"../lib/config.js\";\nimport { EXIT_CODES } from \"../lib/exit-codes.js\";\nimport { getPluginInfo } from \"../lib/plugin-info.js\";\nimport { loadSkillsMatrixFromSource } from \"../lib/source-loader.js\";\nimport { validatePluginManifest } from \"../lib/plugin-validator.js\";\nimport { compileAllAgents } from \"../lib/compiler.js\";\nimport { resolveSkillReference } from \"../lib/resolver.js\";\nimport { fileExists, readFile } from \"../utils/fs.js\";\nimport { verbose } from \"../utils/logger.js\";\n\nexport default class TestImports extends BaseCommand {\n static summary = \"Test that lib imports work (temporary command)\";\n static hidden = true; // Hide from help\n\n async run(): Promise<void> {\n this.log(\"Testing imports from cli/lib/...\");\n\n // Test config loading from init hook\n this.log(\"\\nConfig from init hook:\");\n if (this.sourceConfig) {\n this.log(` ✓ Config loaded successfully`);\n this.log(` Source: ${this.sourceConfig.source}`);\n this.log(` Origin: ${this.sourceConfig.sourceOrigin}`);\n if (this.sourceConfig.marketplace) {\n this.log(` Marketplace: ${this.sourceConfig.marketplace}`);\n }\n } else {\n this.warn(\" Config not loaded - init hook may have failed\");\n }\n\n // Test lib/ utilities\n this.log(\"\\nLib utilities:\");\n this.log(` EXIT_CODES.SUCCESS = ${EXIT_CODES.SUCCESS}`);\n this.log(\n ` loadGlobalConfig is a function: ${typeof loadGlobalConfig === \"function\"}`,\n );\n this.log(\n ` resolveSource is a function: ${typeof resolveSource === \"function\"}`,\n );\n this.log(\n ` getPluginInfo is a function: ${typeof getPluginInfo === \"function\"}`,\n );\n this.log(\n ` loadSkillsMatrixFromSource is a function: ${typeof loadSkillsMatrixFromSource === \"function\"}`,\n );\n this.log(\n ` validatePluginManifest is a function: ${typeof validatePluginManifest === \"function\"}`,\n );\n this.log(\n ` compileAllAgents is a function: ${typeof compileAllAgents === \"function\"}`,\n );\n this.log(\n ` resolveSkillReference is a function: ${typeof resolveSkillReference === \"function\"}`,\n );\n\n // Test utils/ utilities\n this.log(\"\\nUtils utilities:\");\n this.log(` fileExists is a function: ${typeof fileExists === \"function\"}`);\n this.log(` readFile is a function: ${typeof readFile === \"function\"}`);\n this.log(` verbose is a function: ${typeof verbose === \"function\"}`);\n\n this.log(\"\\n✓ All imports successful!\");\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAaA,IAAqB,cAArB,cAAyC,YAAY;AAAA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
|
+
import {
|
|
3
|
+
Confirm
|
|
4
|
+
} from "../chunk-DHFFRMF6.js";
|
|
5
|
+
import {
|
|
6
|
+
claudePluginUninstall,
|
|
7
|
+
isClaudeCLIAvailable
|
|
8
|
+
} from "../chunk-M7YCPFIX.js";
|
|
9
|
+
import {
|
|
10
|
+
getCollectivePluginDir
|
|
11
|
+
} from "../chunk-3HBTELJN.js";
|
|
12
|
+
import {
|
|
13
|
+
CLAUDE_DIR
|
|
14
|
+
} from "../chunk-A3J6IAXK.js";
|
|
15
|
+
import {
|
|
16
|
+
BaseCommand,
|
|
17
|
+
EXIT_CODES
|
|
18
|
+
} from "../chunk-SYQ7R2JO.js";
|
|
19
|
+
import "../chunk-TOPAIL5W.js";
|
|
20
|
+
import {
|
|
21
|
+
directoryExists,
|
|
22
|
+
fileExists,
|
|
23
|
+
remove
|
|
24
|
+
} from "../chunk-MMDXNZPF.js";
|
|
25
|
+
import {
|
|
26
|
+
init_esm_shims
|
|
27
|
+
} from "../chunk-DHET7RCE.js";
|
|
28
|
+
|
|
29
|
+
// src/cli-v2/commands/uninstall.tsx
|
|
30
|
+
init_esm_shims();
|
|
31
|
+
import { Flags } from "@oclif/core";
|
|
32
|
+
import { render, Box, Text, useApp } from "ink";
|
|
33
|
+
import path from "path";
|
|
34
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
35
|
+
var PLUGIN_NAME = "claude-collective";
|
|
36
|
+
async function detectInstallation(projectDir) {
|
|
37
|
+
const pluginDir = getCollectivePluginDir(projectDir);
|
|
38
|
+
const skillsDir = path.join(projectDir, CLAUDE_DIR, "skills");
|
|
39
|
+
const agentsDir = path.join(projectDir, CLAUDE_DIR, "agents");
|
|
40
|
+
const configPath = path.join(projectDir, CLAUDE_DIR, "config.yaml");
|
|
41
|
+
const [hasPlugin, hasLocalSkills, hasLocalAgents, hasLocalConfig] = await Promise.all([
|
|
42
|
+
directoryExists(pluginDir),
|
|
43
|
+
directoryExists(skillsDir),
|
|
44
|
+
directoryExists(agentsDir),
|
|
45
|
+
fileExists(configPath)
|
|
46
|
+
]);
|
|
47
|
+
return {
|
|
48
|
+
hasPlugin,
|
|
49
|
+
hasLocalSkills,
|
|
50
|
+
hasLocalAgents,
|
|
51
|
+
hasLocalConfig,
|
|
52
|
+
pluginDir,
|
|
53
|
+
skillsDir,
|
|
54
|
+
agentsDir,
|
|
55
|
+
configPath
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
var UninstallConfirm = ({
|
|
59
|
+
target,
|
|
60
|
+
uninstallPlugin,
|
|
61
|
+
uninstallLocal,
|
|
62
|
+
keepConfig,
|
|
63
|
+
onConfirm,
|
|
64
|
+
onCancel
|
|
65
|
+
}) => {
|
|
66
|
+
const { exit } = useApp();
|
|
67
|
+
const hasPluginToRemove = uninstallPlugin && target.hasPlugin;
|
|
68
|
+
const hasLocalToRemove = uninstallLocal && (target.hasLocalSkills || target.hasLocalAgents || target.hasLocalConfig);
|
|
69
|
+
return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
|
|
70
|
+
/* @__PURE__ */ jsx(Text, { bold: true, children: "The following will be removed:" }),
|
|
71
|
+
/* @__PURE__ */ jsx(Text, { children: " " }),
|
|
72
|
+
hasPluginToRemove && /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
|
|
73
|
+
/* @__PURE__ */ jsx(Text, { color: "red", children: " Plugin:" }),
|
|
74
|
+
/* @__PURE__ */ jsxs(Text, { dimColor: true, children: [
|
|
75
|
+
" ",
|
|
76
|
+
target.pluginDir
|
|
77
|
+
] })
|
|
78
|
+
] }),
|
|
79
|
+
hasLocalToRemove && /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
|
|
80
|
+
/* @__PURE__ */ jsx(Text, { color: "red", children: " Local files:" }),
|
|
81
|
+
target.hasLocalSkills && /* @__PURE__ */ jsxs(Text, { dimColor: true, children: [
|
|
82
|
+
" ",
|
|
83
|
+
target.skillsDir
|
|
84
|
+
] }),
|
|
85
|
+
target.hasLocalAgents && /* @__PURE__ */ jsxs(Text, { dimColor: true, children: [
|
|
86
|
+
" ",
|
|
87
|
+
target.agentsDir
|
|
88
|
+
] }),
|
|
89
|
+
target.hasLocalConfig && !keepConfig && /* @__PURE__ */ jsxs(Text, { dimColor: true, children: [
|
|
90
|
+
" ",
|
|
91
|
+
target.configPath
|
|
92
|
+
] })
|
|
93
|
+
] }),
|
|
94
|
+
keepConfig && target.hasLocalConfig && /* @__PURE__ */ jsxs(Box, { flexDirection: "column", marginTop: 1, children: [
|
|
95
|
+
/* @__PURE__ */ jsx(Text, { color: "yellow", children: " Keeping:" }),
|
|
96
|
+
/* @__PURE__ */ jsxs(Text, { dimColor: true, children: [
|
|
97
|
+
" ",
|
|
98
|
+
target.configPath
|
|
99
|
+
] })
|
|
100
|
+
] }),
|
|
101
|
+
/* @__PURE__ */ jsx(Text, { children: " " }),
|
|
102
|
+
/* @__PURE__ */ jsx(
|
|
103
|
+
Confirm,
|
|
104
|
+
{
|
|
105
|
+
message: "Are you sure you want to uninstall?",
|
|
106
|
+
onConfirm: () => {
|
|
107
|
+
onConfirm();
|
|
108
|
+
exit();
|
|
109
|
+
},
|
|
110
|
+
onCancel: () => {
|
|
111
|
+
onCancel();
|
|
112
|
+
exit();
|
|
113
|
+
},
|
|
114
|
+
defaultValue: false
|
|
115
|
+
}
|
|
116
|
+
)
|
|
117
|
+
] });
|
|
118
|
+
};
|
|
119
|
+
var Uninstall = class _Uninstall extends BaseCommand {
|
|
120
|
+
static summary = "Remove Claude Collective from this project";
|
|
121
|
+
static description = "Uninstall the Claude Collective plugin and/or local files (.claude/skills, .claude/agents, .claude/config.yaml). By default, removes everything.";
|
|
122
|
+
static examples = [
|
|
123
|
+
"<%= config.bin %> <%= command.id %>",
|
|
124
|
+
"<%= config.bin %> <%= command.id %> --yes",
|
|
125
|
+
"<%= config.bin %> <%= command.id %> --keep-config",
|
|
126
|
+
"<%= config.bin %> <%= command.id %> --plugin",
|
|
127
|
+
"<%= config.bin %> <%= command.id %> --local",
|
|
128
|
+
"<%= config.bin %> <%= command.id %> --dry-run"
|
|
129
|
+
];
|
|
130
|
+
static flags = {
|
|
131
|
+
...BaseCommand.baseFlags,
|
|
132
|
+
yes: Flags.boolean({
|
|
133
|
+
char: "y",
|
|
134
|
+
description: "Skip confirmation prompt",
|
|
135
|
+
default: false
|
|
136
|
+
}),
|
|
137
|
+
"keep-config": Flags.boolean({
|
|
138
|
+
description: "Keep .claude/config.yaml",
|
|
139
|
+
default: false
|
|
140
|
+
}),
|
|
141
|
+
plugin: Flags.boolean({
|
|
142
|
+
description: "Only uninstall the plugin (not local files)",
|
|
143
|
+
default: false
|
|
144
|
+
}),
|
|
145
|
+
local: Flags.boolean({
|
|
146
|
+
description: "Only remove local files (not the plugin)",
|
|
147
|
+
default: false
|
|
148
|
+
})
|
|
149
|
+
};
|
|
150
|
+
async run() {
|
|
151
|
+
const { flags } = await this.parse(_Uninstall);
|
|
152
|
+
const projectDir = process.cwd();
|
|
153
|
+
this.log("");
|
|
154
|
+
this.log("Claude Collective Uninstall");
|
|
155
|
+
this.log("");
|
|
156
|
+
if (flags["dry-run"]) {
|
|
157
|
+
this.log("[dry-run] Preview mode - no files will be removed");
|
|
158
|
+
this.log("");
|
|
159
|
+
}
|
|
160
|
+
const target = await detectInstallation(projectDir);
|
|
161
|
+
const uninstallPlugin = !flags.local;
|
|
162
|
+
const uninstallLocal = !flags.plugin;
|
|
163
|
+
const hasPluginToRemove = uninstallPlugin && target.hasPlugin;
|
|
164
|
+
const hasLocalToRemove = uninstallLocal && (target.hasLocalSkills || target.hasLocalAgents || target.hasLocalConfig);
|
|
165
|
+
if (!hasPluginToRemove && !hasLocalToRemove) {
|
|
166
|
+
this.warn("Nothing to uninstall.");
|
|
167
|
+
this.log("");
|
|
168
|
+
if (flags.plugin && !target.hasPlugin) {
|
|
169
|
+
this.log("No plugin installation found.");
|
|
170
|
+
}
|
|
171
|
+
if (flags.local && !target.hasLocalSkills && !target.hasLocalAgents) {
|
|
172
|
+
this.log("No local installation found.");
|
|
173
|
+
}
|
|
174
|
+
if (!flags.plugin && !flags.local) {
|
|
175
|
+
this.log("Claude Collective is not installed in this project.");
|
|
176
|
+
}
|
|
177
|
+
this.log("");
|
|
178
|
+
this.log("No changes made.");
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
if (!flags.yes && !flags["dry-run"]) {
|
|
182
|
+
const confirmed = await new Promise((resolve) => {
|
|
183
|
+
const { waitUntilExit } = render(
|
|
184
|
+
/* @__PURE__ */ jsx(
|
|
185
|
+
UninstallConfirm,
|
|
186
|
+
{
|
|
187
|
+
target,
|
|
188
|
+
uninstallPlugin,
|
|
189
|
+
uninstallLocal,
|
|
190
|
+
keepConfig: flags["keep-config"],
|
|
191
|
+
onConfirm: () => resolve(true),
|
|
192
|
+
onCancel: () => resolve(false)
|
|
193
|
+
}
|
|
194
|
+
)
|
|
195
|
+
);
|
|
196
|
+
waitUntilExit().catch(() => resolve(false));
|
|
197
|
+
});
|
|
198
|
+
if (!confirmed) {
|
|
199
|
+
this.log("");
|
|
200
|
+
this.log("Uninstall cancelled");
|
|
201
|
+
this.exit(EXIT_CODES.CANCELLED);
|
|
202
|
+
}
|
|
203
|
+
} else {
|
|
204
|
+
this.log("The following will be removed:");
|
|
205
|
+
this.log("");
|
|
206
|
+
if (hasPluginToRemove) {
|
|
207
|
+
this.log(" Plugin:");
|
|
208
|
+
this.log(` ${target.pluginDir}`);
|
|
209
|
+
}
|
|
210
|
+
if (hasLocalToRemove) {
|
|
211
|
+
this.log(" Local files:");
|
|
212
|
+
if (target.hasLocalSkills) {
|
|
213
|
+
this.log(` ${target.skillsDir}`);
|
|
214
|
+
}
|
|
215
|
+
if (target.hasLocalAgents) {
|
|
216
|
+
this.log(` ${target.agentsDir}`);
|
|
217
|
+
}
|
|
218
|
+
if (target.hasLocalConfig && !flags["keep-config"]) {
|
|
219
|
+
this.log(` ${target.configPath}`);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
if (flags["keep-config"] && target.hasLocalConfig) {
|
|
223
|
+
this.log("");
|
|
224
|
+
this.log(" Keeping:");
|
|
225
|
+
this.log(` ${target.configPath}`);
|
|
226
|
+
}
|
|
227
|
+
this.log("");
|
|
228
|
+
}
|
|
229
|
+
if (flags["dry-run"]) {
|
|
230
|
+
if (hasPluginToRemove) {
|
|
231
|
+
this.log(`[dry-run] Would uninstall plugin "${PLUGIN_NAME}"`);
|
|
232
|
+
this.log(`[dry-run] Would remove ${target.pluginDir}`);
|
|
233
|
+
}
|
|
234
|
+
if (hasLocalToRemove) {
|
|
235
|
+
if (target.hasLocalSkills) {
|
|
236
|
+
this.log(`[dry-run] Would remove ${target.skillsDir}`);
|
|
237
|
+
}
|
|
238
|
+
if (target.hasLocalAgents) {
|
|
239
|
+
this.log(`[dry-run] Would remove ${target.agentsDir}`);
|
|
240
|
+
}
|
|
241
|
+
if (target.hasLocalConfig && !flags["keep-config"]) {
|
|
242
|
+
this.log(`[dry-run] Would remove ${target.configPath}`);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
this.log("");
|
|
246
|
+
this.log("[dry-run] Preview complete - no files were removed");
|
|
247
|
+
this.log("");
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
if (hasPluginToRemove) {
|
|
251
|
+
this.log("Uninstalling plugin...");
|
|
252
|
+
try {
|
|
253
|
+
const cliAvailable = await isClaudeCLIAvailable();
|
|
254
|
+
if (cliAvailable) {
|
|
255
|
+
await claudePluginUninstall(PLUGIN_NAME, "project", projectDir);
|
|
256
|
+
}
|
|
257
|
+
await remove(target.pluginDir);
|
|
258
|
+
this.logSuccess("Plugin uninstalled");
|
|
259
|
+
} catch (error) {
|
|
260
|
+
this.log("Plugin uninstall failed");
|
|
261
|
+
this.error(
|
|
262
|
+
error instanceof Error ? error.message : "Unknown error occurred",
|
|
263
|
+
{ exit: EXIT_CODES.ERROR }
|
|
264
|
+
);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
if (hasLocalToRemove) {
|
|
268
|
+
this.log("Removing local files...");
|
|
269
|
+
try {
|
|
270
|
+
const removed = [];
|
|
271
|
+
if (target.hasLocalSkills) {
|
|
272
|
+
await remove(target.skillsDir);
|
|
273
|
+
removed.push(".claude/skills/");
|
|
274
|
+
}
|
|
275
|
+
if (target.hasLocalAgents) {
|
|
276
|
+
await remove(target.agentsDir);
|
|
277
|
+
removed.push(".claude/agents/");
|
|
278
|
+
}
|
|
279
|
+
if (target.hasLocalConfig && !flags["keep-config"]) {
|
|
280
|
+
await remove(target.configPath);
|
|
281
|
+
removed.push(".claude/config.yaml");
|
|
282
|
+
}
|
|
283
|
+
this.logSuccess(
|
|
284
|
+
`Removed ${removed.length} ${removed.length === 1 ? "item" : "items"}`
|
|
285
|
+
);
|
|
286
|
+
} catch (error) {
|
|
287
|
+
this.log("Failed to remove local files");
|
|
288
|
+
this.error(
|
|
289
|
+
error instanceof Error ? error.message : "Unknown error occurred",
|
|
290
|
+
{ exit: EXIT_CODES.ERROR }
|
|
291
|
+
);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
this.log("");
|
|
295
|
+
this.log("Claude Collective has been uninstalled.");
|
|
296
|
+
if (flags["keep-config"]) {
|
|
297
|
+
this.log("");
|
|
298
|
+
this.log("Configuration preserved at .claude/config.yaml");
|
|
299
|
+
this.log("Run `cc init` to reinstall with your existing configuration.");
|
|
300
|
+
}
|
|
301
|
+
this.log("");
|
|
302
|
+
this.logSuccess("Uninstall complete!");
|
|
303
|
+
this.log("");
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
export {
|
|
307
|
+
Uninstall as default
|
|
308
|
+
};
|
|
309
|
+
//# sourceMappingURL=uninstall.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/cli-v2/commands/uninstall.tsx"],"sourcesContent":["import React from \"react\";\nimport { Flags } from \"@oclif/core\";\nimport { render, Box, Text, useApp } from \"ink\";\nimport path from \"path\";\nimport { BaseCommand } from \"../base-command\";\nimport { Confirm } from \"../components/common/confirm\";\nimport { directoryExists, fileExists, remove } from \"../utils/fs\";\nimport { claudePluginUninstall, isClaudeCLIAvailable } from \"../utils/exec\";\nimport { getCollectivePluginDir } from \"../lib/plugin-finder\";\nimport { CLAUDE_DIR } from \"../consts\";\nimport { EXIT_CODES } from \"../lib/exit-codes\";\n\nconst PLUGIN_NAME = \"claude-collective\";\n\ninterface UninstallTarget {\n hasPlugin: boolean;\n hasLocalSkills: boolean;\n hasLocalAgents: boolean;\n hasLocalConfig: boolean;\n pluginDir: string;\n skillsDir: string;\n agentsDir: string;\n configPath: string;\n}\n\nasync function detectInstallation(\n projectDir: string,\n): Promise<UninstallTarget> {\n const pluginDir = getCollectivePluginDir(projectDir);\n const skillsDir = path.join(projectDir, CLAUDE_DIR, \"skills\");\n const agentsDir = path.join(projectDir, CLAUDE_DIR, \"agents\");\n const configPath = path.join(projectDir, CLAUDE_DIR, \"config.yaml\");\n\n const [hasPlugin, hasLocalSkills, hasLocalAgents, hasLocalConfig] =\n await Promise.all([\n directoryExists(pluginDir),\n directoryExists(skillsDir),\n directoryExists(agentsDir),\n fileExists(configPath),\n ]);\n\n return {\n hasPlugin,\n hasLocalSkills,\n hasLocalAgents,\n hasLocalConfig,\n pluginDir,\n skillsDir,\n agentsDir,\n configPath,\n };\n}\n\ninterface UninstallConfirmProps {\n target: UninstallTarget;\n uninstallPlugin: boolean;\n uninstallLocal: boolean;\n keepConfig: boolean;\n onConfirm: () => void;\n onCancel: () => void;\n}\n\nconst UninstallConfirm: React.FC<UninstallConfirmProps> = ({\n target,\n uninstallPlugin,\n uninstallLocal,\n keepConfig,\n onConfirm,\n onCancel,\n}) => {\n const { exit } = useApp();\n const hasPluginToRemove = uninstallPlugin && target.hasPlugin;\n const hasLocalToRemove =\n uninstallLocal &&\n (target.hasLocalSkills || target.hasLocalAgents || target.hasLocalConfig);\n\n return (\n <Box flexDirection=\"column\">\n <Text bold>The following will be removed:</Text>\n <Text> </Text>\n\n {hasPluginToRemove && (\n <Box flexDirection=\"column\">\n <Text color=\"red\"> Plugin:</Text>\n <Text dimColor> {target.pluginDir}</Text>\n </Box>\n )}\n\n {hasLocalToRemove && (\n <Box flexDirection=\"column\">\n <Text color=\"red\"> Local files:</Text>\n {target.hasLocalSkills && <Text dimColor> {target.skillsDir}</Text>}\n {target.hasLocalAgents && <Text dimColor> {target.agentsDir}</Text>}\n {target.hasLocalConfig && !keepConfig && (\n <Text dimColor> {target.configPath}</Text>\n )}\n </Box>\n )}\n\n {keepConfig && target.hasLocalConfig && (\n <Box flexDirection=\"column\" marginTop={1}>\n <Text color=\"yellow\"> Keeping:</Text>\n <Text dimColor> {target.configPath}</Text>\n </Box>\n )}\n\n <Text> </Text>\n <Confirm\n message=\"Are you sure you want to uninstall?\"\n onConfirm={() => {\n onConfirm();\n exit();\n }}\n onCancel={() => {\n onCancel();\n exit();\n }}\n defaultValue={false}\n />\n </Box>\n );\n};\n\nexport default class Uninstall extends BaseCommand {\n static summary = \"Remove Claude Collective from this project\";\n\n static description =\n \"Uninstall the Claude Collective plugin and/or local files (.claude/skills, .claude/agents, .claude/config.yaml). By default, removes everything.\";\n\n static examples = [\n \"<%= config.bin %> <%= command.id %>\",\n \"<%= config.bin %> <%= command.id %> --yes\",\n \"<%= config.bin %> <%= command.id %> --keep-config\",\n \"<%= config.bin %> <%= command.id %> --plugin\",\n \"<%= config.bin %> <%= command.id %> --local\",\n \"<%= config.bin %> <%= command.id %> --dry-run\",\n ];\n\n static flags = {\n ...BaseCommand.baseFlags,\n yes: Flags.boolean({\n char: \"y\",\n description: \"Skip confirmation prompt\",\n default: false,\n }),\n \"keep-config\": Flags.boolean({\n description: \"Keep .claude/config.yaml\",\n default: false,\n }),\n plugin: Flags.boolean({\n description: \"Only uninstall the plugin (not local files)\",\n default: false,\n }),\n local: Flags.boolean({\n description: \"Only remove local files (not the plugin)\",\n default: false,\n }),\n };\n\n async run(): Promise<void> {\n const { flags } = await this.parse(Uninstall);\n const projectDir = process.cwd();\n\n this.log(\"\");\n this.log(\"Claude Collective Uninstall\");\n this.log(\"\");\n\n if (flags[\"dry-run\"]) {\n this.log(\"[dry-run] Preview mode - no files will be removed\");\n this.log(\"\");\n }\n\n // Detect what's installed\n const target = await detectInstallation(projectDir);\n\n // Determine what to uninstall based on flags\n const uninstallPlugin = !flags.local;\n const uninstallLocal = !flags.plugin;\n\n // Check if there's anything to uninstall\n const hasPluginToRemove = uninstallPlugin && target.hasPlugin;\n const hasLocalToRemove =\n uninstallLocal &&\n (target.hasLocalSkills || target.hasLocalAgents || target.hasLocalConfig);\n\n if (!hasPluginToRemove && !hasLocalToRemove) {\n this.warn(\"Nothing to uninstall.\");\n this.log(\"\");\n\n if (flags.plugin && !target.hasPlugin) {\n this.log(\"No plugin installation found.\");\n }\n if (flags.local && !target.hasLocalSkills && !target.hasLocalAgents) {\n this.log(\"No local installation found.\");\n }\n if (!flags.plugin && !flags.local) {\n this.log(\"Claude Collective is not installed in this project.\");\n }\n\n this.log(\"\");\n this.log(\"No changes made.\");\n return;\n }\n\n // Show what will be removed and get confirmation (unless --yes or --dry-run)\n if (!flags.yes && !flags[\"dry-run\"]) {\n const confirmed = await new Promise<boolean>((resolve) => {\n const { waitUntilExit } = render(\n <UninstallConfirm\n target={target}\n uninstallPlugin={uninstallPlugin}\n uninstallLocal={uninstallLocal}\n keepConfig={flags[\"keep-config\"]}\n onConfirm={() => resolve(true)}\n onCancel={() => resolve(false)}\n />,\n );\n\n waitUntilExit().catch(() => resolve(false));\n });\n\n if (!confirmed) {\n this.log(\"\");\n this.log(\"Uninstall cancelled\");\n this.exit(EXIT_CODES.CANCELLED);\n }\n } else {\n // In dry-run or --yes mode, just show what will be removed\n this.log(\"The following will be removed:\");\n this.log(\"\");\n\n if (hasPluginToRemove) {\n this.log(\" Plugin:\");\n this.log(` ${target.pluginDir}`);\n }\n\n if (hasLocalToRemove) {\n this.log(\" Local files:\");\n if (target.hasLocalSkills) {\n this.log(` ${target.skillsDir}`);\n }\n if (target.hasLocalAgents) {\n this.log(` ${target.agentsDir}`);\n }\n if (target.hasLocalConfig && !flags[\"keep-config\"]) {\n this.log(` ${target.configPath}`);\n }\n }\n\n if (flags[\"keep-config\"] && target.hasLocalConfig) {\n this.log(\"\");\n this.log(\" Keeping:\");\n this.log(` ${target.configPath}`);\n }\n\n this.log(\"\");\n }\n\n // Dry run - show what would happen\n if (flags[\"dry-run\"]) {\n if (hasPluginToRemove) {\n this.log(`[dry-run] Would uninstall plugin \"${PLUGIN_NAME}\"`);\n this.log(`[dry-run] Would remove ${target.pluginDir}`);\n }\n if (hasLocalToRemove) {\n if (target.hasLocalSkills) {\n this.log(`[dry-run] Would remove ${target.skillsDir}`);\n }\n if (target.hasLocalAgents) {\n this.log(`[dry-run] Would remove ${target.agentsDir}`);\n }\n if (target.hasLocalConfig && !flags[\"keep-config\"]) {\n this.log(`[dry-run] Would remove ${target.configPath}`);\n }\n }\n this.log(\"\");\n this.log(\"[dry-run] Preview complete - no files were removed\");\n this.log(\"\");\n return;\n }\n\n // Uninstall plugin\n if (hasPluginToRemove) {\n this.log(\"Uninstalling plugin...\");\n\n try {\n // Try to use claude CLI to uninstall (handles settings.json)\n const cliAvailable = await isClaudeCLIAvailable();\n if (cliAvailable) {\n await claudePluginUninstall(PLUGIN_NAME, \"project\", projectDir);\n }\n\n // Remove plugin directory\n await remove(target.pluginDir);\n\n this.logSuccess(\"Plugin uninstalled\");\n } catch (error) {\n this.log(\"Plugin uninstall failed\");\n this.error(\n error instanceof Error ? error.message : \"Unknown error occurred\",\n { exit: EXIT_CODES.ERROR },\n );\n }\n }\n\n // Remove local files\n if (hasLocalToRemove) {\n this.log(\"Removing local files...\");\n\n try {\n const removed: string[] = [];\n\n if (target.hasLocalSkills) {\n await remove(target.skillsDir);\n removed.push(\".claude/skills/\");\n }\n\n if (target.hasLocalAgents) {\n await remove(target.agentsDir);\n removed.push(\".claude/agents/\");\n }\n\n if (target.hasLocalConfig && !flags[\"keep-config\"]) {\n await remove(target.configPath);\n removed.push(\".claude/config.yaml\");\n }\n\n this.logSuccess(\n `Removed ${removed.length} ${removed.length === 1 ? \"item\" : \"items\"}`,\n );\n } catch (error) {\n this.log(\"Failed to remove local files\");\n this.error(\n error instanceof Error ? error.message : \"Unknown error occurred\",\n { exit: EXIT_CODES.ERROR },\n );\n }\n }\n\n this.log(\"\");\n this.log(\"Claude Collective has been uninstalled.\");\n\n if (flags[\"keep-config\"]) {\n this.log(\"\");\n this.log(\"Configuration preserved at .claude/config.yaml\");\n this.log(\"Run `cc init` to reinstall with your existing configuration.\");\n }\n\n this.log(\"\");\n this.logSuccess(\"Uninstall complete!\");\n this.log(\"\");\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA,SAAS,aAAa;AACtB,SAAS,QAAQ,KAAK,MAAM,cAAc;AAC1C,OAAO,UAAU;AA2EX,cAMI,YANJ;AAlEN,IAAM,cAAc;AAapB,eAAe,mBACb,YAC0B;AAC1B,QAAM,YAAY,uBAAuB,UAAU;AACnD,QAAM,YAAY,KAAK,KAAK,YAAY,YAAY,QAAQ;AAC5D,QAAM,YAAY,KAAK,KAAK,YAAY,YAAY,QAAQ;AAC5D,QAAM,aAAa,KAAK,KAAK,YAAY,YAAY,aAAa;AAElE,QAAM,CAAC,WAAW,gBAAgB,gBAAgB,cAAc,IAC9D,MAAM,QAAQ,IAAI;AAAA,IAChB,gBAAgB,SAAS;AAAA,IACzB,gBAAgB,SAAS;AAAA,IACzB,gBAAgB,SAAS;AAAA,IACzB,WAAW,UAAU;AAAA,EACvB,CAAC;AAEH,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAWA,IAAM,mBAAoD,CAAC;AAAA,EACzD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AAC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