@axiomatic-labs/claudeflow 2.13.133 → 2.13.134
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/lib/install.js +30 -9
- package/package.json +1 -1
package/lib/install.js
CHANGED
|
@@ -64,9 +64,17 @@ async function run() {
|
|
|
64
64
|
try {
|
|
65
65
|
ui.step('Extracting template files...');
|
|
66
66
|
execSync(`unzip -o "${tmpZip}" -d "${tmpExtract}"`, { stdio: 'pipe' });
|
|
67
|
-
const srcClaude = path.join(tmpExtract, '.claude');
|
|
68
67
|
const srcClaudeflow = path.join(tmpExtract, '.claudeflow');
|
|
69
|
-
const
|
|
68
|
+
const dstActiveModePath = path.join(cwd, '.claudeflow', 'active-mode');
|
|
69
|
+
const zipActiveModePath = path.join(srcClaudeflow, 'active-mode');
|
|
70
|
+
let activeMode = 'normal';
|
|
71
|
+
if (fs.existsSync(dstActiveModePath)) {
|
|
72
|
+
activeMode = fs.readFileSync(dstActiveModePath, 'utf8').trim() || 'normal';
|
|
73
|
+
} else if (fs.existsSync(zipActiveModePath)) {
|
|
74
|
+
activeMode = fs.readFileSync(zipActiveModePath, 'utf8').trim() || 'normal';
|
|
75
|
+
}
|
|
76
|
+
const srcClaude = path.join(srcClaudeflow, 'variants', activeMode);
|
|
77
|
+
const nextManagedPaths = collectManagedPathsFromRelease(tmpExtract, activeMode);
|
|
70
78
|
const previousManifest = readTemplateManagedManifest(cwd);
|
|
71
79
|
const previousManagedPaths = previousManifest
|
|
72
80
|
? previousManifest.managedPaths
|
|
@@ -950,18 +958,25 @@ function collectFilesRecursive(rootDir) {
|
|
|
950
958
|
return files;
|
|
951
959
|
}
|
|
952
960
|
|
|
953
|
-
function addFilesFromDir(set, rootBase, targetDir) {
|
|
961
|
+
function addFilesFromDir(set, rootBase, targetDir, opts = {}) {
|
|
962
|
+
const { destPrefix } = opts;
|
|
954
963
|
for (const filePath of collectFilesRecursive(targetDir)) {
|
|
955
|
-
|
|
964
|
+
let relPath;
|
|
965
|
+
if (destPrefix !== undefined) {
|
|
966
|
+
const subRel = normalizeRelativePath(path.relative(targetDir, filePath));
|
|
967
|
+
relPath = normalizeRelativePath(subRel ? `${destPrefix}/${subRel}` : destPrefix);
|
|
968
|
+
} else {
|
|
969
|
+
relPath = normalizeRelativePath(path.relative(rootBase, filePath));
|
|
970
|
+
}
|
|
956
971
|
if (relPath.startsWith('.claude/')) {
|
|
957
972
|
set.add(relPath);
|
|
958
973
|
}
|
|
959
974
|
}
|
|
960
975
|
}
|
|
961
976
|
|
|
962
|
-
function collectManagedPathsFromRelease(extractRoot) {
|
|
963
|
-
const srcClaude = path.join(extractRoot, '.claude');
|
|
977
|
+
function collectManagedPathsFromRelease(extractRoot, mode = 'normal') {
|
|
964
978
|
const srcClaudeflow = path.join(extractRoot, '.claudeflow');
|
|
979
|
+
const srcClaude = path.join(srcClaudeflow, 'variants', mode);
|
|
965
980
|
const managed = new Set();
|
|
966
981
|
|
|
967
982
|
const settingsPath = path.join(srcClaude, 'settings.json');
|
|
@@ -969,8 +984,12 @@ function collectManagedPathsFromRelease(extractRoot) {
|
|
|
969
984
|
managed.add('.claude/settings.json');
|
|
970
985
|
}
|
|
971
986
|
|
|
972
|
-
// Claude Code native dirs: hooks stay in .claude
|
|
973
|
-
|
|
987
|
+
// Claude Code native dirs: hooks stay in .claude/. Source from the variant
|
|
988
|
+
// but record paths under the install destination (.claude/hooks/...) so
|
|
989
|
+
// stale-pruning resolves correctly against the user's project.
|
|
990
|
+
addFilesFromDir(managed, extractRoot, path.join(srcClaude, 'hooks'), {
|
|
991
|
+
destPrefix: '.claude/hooks',
|
|
992
|
+
});
|
|
974
993
|
|
|
975
994
|
// Claudeflow dirs: runtime, templates, docs, cli, variants in .claudeflow/
|
|
976
995
|
['runtime', 'templates', 'docs', 'cli', 'variants'].forEach((folder) => {
|
|
@@ -989,7 +1008,9 @@ function collectManagedPathsFromRelease(extractRoot) {
|
|
|
989
1008
|
const entries = fs.readdirSync(skillsDir, { withFileTypes: true });
|
|
990
1009
|
for (const entry of entries) {
|
|
991
1010
|
if (entry.isDirectory() && entry.name.startsWith('claudeflow-')) {
|
|
992
|
-
addFilesFromDir(managed, extractRoot, path.join(skillsDir, entry.name)
|
|
1011
|
+
addFilesFromDir(managed, extractRoot, path.join(skillsDir, entry.name), {
|
|
1012
|
+
destPrefix: `.claude/skills/${entry.name}`,
|
|
1013
|
+
});
|
|
993
1014
|
}
|
|
994
1015
|
}
|
|
995
1016
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axiomatic-labs/claudeflow",
|
|
3
|
-
"version": "2.13.
|
|
3
|
+
"version": "2.13.134",
|
|
4
4
|
"description": "Claudeflow — AI-powered development toolkit for Claude Code. Skills, agents, hooks, and quality gates that ship production apps.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"claudeflow": "./bin/cli.js"
|