@ghl-ai/aw 0.1.36-beta.62 → 0.1.36-beta.63
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/ecc.mjs +12 -25
- package/package.json +1 -1
package/ecc.mjs
CHANGED
|
@@ -16,13 +16,14 @@ const PLUGIN_KEY = `aw@${MARKETPLACE_NAME}`;
|
|
|
16
16
|
|
|
17
17
|
function eccDir() { return join(homedir(), ".aw-ecc"); }
|
|
18
18
|
|
|
19
|
-
// "claude"
|
|
20
|
-
//
|
|
21
|
-
//
|
|
22
|
-
//
|
|
23
|
-
const FILE_COPY_TARGETS = ["cursor", "codex"];
|
|
19
|
+
// "claude" runs install-apply.js --without baseline:commands so hooks, rules,
|
|
20
|
+
// and agents land in ~/.claude/ — but commands are skipped because the plugin
|
|
21
|
+
// marketplace (installClaudePlugin) already registers them under /aw:tdd.
|
|
22
|
+
// File-copying commands would create a duplicate flat /tdd alongside /aw:tdd.
|
|
23
|
+
const FILE_COPY_TARGETS = ["claude", "cursor", "codex"];
|
|
24
24
|
|
|
25
25
|
const TARGET_STATE = {
|
|
26
|
+
claude: { state: ".claude/ecc/install-state.json" },
|
|
26
27
|
cursor: { state: ".cursor/ecc-install-state.json" },
|
|
27
28
|
codex: { state: ".codex/ecc-install-state.json" },
|
|
28
29
|
};
|
|
@@ -131,7 +132,7 @@ export async function installAwEcc(
|
|
|
131
132
|
}
|
|
132
133
|
}
|
|
133
134
|
|
|
134
|
-
// Cursor + Codex: file-copy via install-apply.js
|
|
135
|
+
// Claude + Cursor + Codex: file-copy via install-apply.js
|
|
135
136
|
const fileCopyTargets = targets.filter((t) => FILE_COPY_TARGETS.includes(t));
|
|
136
137
|
if (fileCopyTargets.length > 0) {
|
|
137
138
|
run("npm install --no-audit --no-fund --ignore-scripts --loglevel=error", {
|
|
@@ -139,11 +140,13 @@ export async function installAwEcc(
|
|
|
139
140
|
});
|
|
140
141
|
for (const target of fileCopyTargets) {
|
|
141
142
|
try {
|
|
142
|
-
//
|
|
143
|
-
// land in ~/.cursor/ and ~/.codex/ globally, not in the project dir.
|
|
143
|
+
// Always use HOME as cwd so files land in ~/.<target>/ globally.
|
|
144
144
|
const runCwd = homedir();
|
|
145
|
+
// For claude: skip commands (plugin handles them as /aw:tdd) but
|
|
146
|
+
// install hooks, rules, agents into ~/.claude/.
|
|
147
|
+
const withoutFlag = target === "claude" ? " --without baseline:commands" : "";
|
|
145
148
|
run(
|
|
146
|
-
`node ${join(repoDir, "scripts/install-apply.js")} --target ${target} --profile full`,
|
|
149
|
+
`node ${join(repoDir, "scripts/install-apply.js")} --target ${target} --profile full${withoutFlag}`,
|
|
147
150
|
{ cwd: runCwd },
|
|
148
151
|
);
|
|
149
152
|
// Move cursor commands into aw/ subfolder for namespace consistency
|
|
@@ -190,22 +193,6 @@ export function uninstallAwEcc({ silent = false } = {}) {
|
|
|
190
193
|
} catch { /* corrupted state — skip */ }
|
|
191
194
|
}
|
|
192
195
|
|
|
193
|
-
// Clean leftover claude install-state from older file-copy versions
|
|
194
|
-
const claudeState = join(HOME, ".claude", "ecc", "install-state.json");
|
|
195
|
-
if (existsSync(claudeState)) {
|
|
196
|
-
try {
|
|
197
|
-
const data = JSON.parse(readFileSync(claudeState, "utf8"));
|
|
198
|
-
for (const op of data.operations || []) {
|
|
199
|
-
if (op.destinationPath && existsSync(op.destinationPath)) {
|
|
200
|
-
rmSync(op.destinationPath, { recursive: true, force: true });
|
|
201
|
-
removed++;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
rmSync(claudeState, { force: true });
|
|
205
|
-
pruneEmptyParents(claudeState, join(HOME, ".claude"));
|
|
206
|
-
} catch { /* best effort */ }
|
|
207
|
-
}
|
|
208
|
-
|
|
209
196
|
// Clean leftover manual plugin cache from older versions
|
|
210
197
|
const oldCache = join(HOME, ".claude", "plugins", "cache", "aw");
|
|
211
198
|
if (existsSync(oldCache)) {
|