@shirayner/ace 0.1.9-SNAPSHOT → 0.1.10-SNAPSHOT
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/package.json +1 -1
- package/src/commands/init.js +1 -2
- package/src/commands/uninstall.js +25 -19
- package/src/core/constants.js +3 -17
- package/src/core/ui.js +0 -1
- package/templates/settings.json +5 -0
package/package.json
CHANGED
package/src/commands/init.js
CHANGED
|
@@ -14,7 +14,6 @@ const componentLabels = {
|
|
|
14
14
|
rules: 'Rules',
|
|
15
15
|
plugin: 'Plugin',
|
|
16
16
|
hooks: 'Hooks',
|
|
17
|
-
hookify: 'Safety Guards',
|
|
18
17
|
memory: 'Memory',
|
|
19
18
|
};
|
|
20
19
|
|
|
@@ -155,7 +154,7 @@ export async function initCommand(options) {
|
|
|
155
154
|
'Customize',
|
|
156
155
|
' Change role edit ~/.claude/memory/user_profile.md',
|
|
157
156
|
' Adjust rules edit ~/.claude/ace/rules/',
|
|
158
|
-
' Safety guards edit ~/.claude/
|
|
157
|
+
' Safety guards edit ~/.claude/hooks/ace.*.sh',
|
|
159
158
|
' Verify setup ace doctor',
|
|
160
159
|
].join('\n'),
|
|
161
160
|
'Next steps'
|
|
@@ -17,7 +17,7 @@ export async function uninstallCommand(options) {
|
|
|
17
17
|
const { confirm } = await inquirer.prompt([{
|
|
18
18
|
type: 'confirm',
|
|
19
19
|
name: 'confirm',
|
|
20
|
-
message: 'This will remove all ace-managed files (rules, plugin, hooks
|
|
20
|
+
message: 'This will remove all ace-managed files (rules, plugin, hooks). Continue?',
|
|
21
21
|
default: false,
|
|
22
22
|
}]);
|
|
23
23
|
if (!confirm) {
|
|
@@ -96,38 +96,44 @@ export async function uninstallCommand(options) {
|
|
|
96
96
|
errors.push({ component: 'plugin', error: err.message });
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
// 3. Remove
|
|
100
|
-
const spinner3 = ora('Removing
|
|
99
|
+
// 3. Remove hook scripts
|
|
100
|
+
const spinner3 = ora('Removing hooks...').start();
|
|
101
101
|
try {
|
|
102
|
-
const
|
|
103
|
-
for (const file of
|
|
102
|
+
const hookFiles = [...(COMPONENTS.hooks.files || []), ...(COMPONENTS.hooks.conditional || [])];
|
|
103
|
+
for (const file of hookFiles) {
|
|
104
104
|
const destPath = path.join(CLAUDE_DIR, file.dest);
|
|
105
105
|
if (await fs.pathExists(destPath)) {
|
|
106
106
|
await fs.remove(destPath);
|
|
107
107
|
removed.push(file.dest);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
spinner3.succeed('
|
|
110
|
+
spinner3.succeed('hooks removed');
|
|
111
111
|
} catch (err) {
|
|
112
|
-
spinner3.fail('
|
|
113
|
-
errors.push({ component: '
|
|
112
|
+
spinner3.fail('hooks removal failed');
|
|
113
|
+
errors.push({ component: 'hooks', error: err.message });
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
// 4. Remove
|
|
117
|
-
const spinner4 = ora('Removing
|
|
116
|
+
// 4. Remove legacy hookify rules (cleanup from older versions)
|
|
117
|
+
const spinner4 = ora('Removing legacy hookify rules...').start();
|
|
118
118
|
try {
|
|
119
|
-
const
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
119
|
+
const hookifyPattern = /^hookify\.ace\..+\.local\.md$/;
|
|
120
|
+
const claudeFiles = await fs.readdir(CLAUDE_DIR);
|
|
121
|
+
let hookifyRemoved = 0;
|
|
122
|
+
for (const file of claudeFiles) {
|
|
123
|
+
if (hookifyPattern.test(file)) {
|
|
124
|
+
await fs.remove(path.join(CLAUDE_DIR, file));
|
|
125
|
+
removed.push(file);
|
|
126
|
+
hookifyRemoved++;
|
|
125
127
|
}
|
|
126
128
|
}
|
|
127
|
-
|
|
129
|
+
if (hookifyRemoved > 0) {
|
|
130
|
+
spinner4.succeed(`legacy hookify rules removed (${hookifyRemoved})`);
|
|
131
|
+
} else {
|
|
132
|
+
spinner4.succeed('no legacy hookify rules found');
|
|
133
|
+
}
|
|
128
134
|
} catch (err) {
|
|
129
|
-
spinner4.fail('
|
|
130
|
-
errors.push({ component: '
|
|
135
|
+
spinner4.fail('legacy hookify removal failed');
|
|
136
|
+
errors.push({ component: 'hookify-legacy', error: err.message });
|
|
131
137
|
}
|
|
132
138
|
|
|
133
139
|
// 5. Restore CLAUDE.md and settings.json from pre-install backups
|
package/src/core/constants.js
CHANGED
|
@@ -17,9 +17,9 @@ export const MARKETPLACE_DIR = path.join(CLAUDE_DIR, 'plugins', 'marketplaces',
|
|
|
17
17
|
export const PLUGIN_KEY = `${PLUGIN_NAME}@${MARKETPLACE_NAME}`;
|
|
18
18
|
|
|
19
19
|
export const PRESETS = {
|
|
20
|
-
full: ['core', 'rules', 'plugin', 'hooks', '
|
|
20
|
+
full: ['core', 'rules', 'plugin', 'hooks', 'memory'],
|
|
21
21
|
minimal: ['core', 'rules', 'plugin'],
|
|
22
|
-
safe: ['core', 'rules', 'plugin', '
|
|
22
|
+
safe: ['core', 'rules', 'plugin', 'memory'],
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
export const ROLES = {
|
|
@@ -58,13 +58,12 @@ export const SPEC_TEMPLATE_FILES = [
|
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
60
|
* Patterns for files owned by ACE - these are overwritten directly on init without prompting.
|
|
61
|
-
* Used to identify ACE-owned content in ace
|
|
61
|
+
* Used to identify ACE-owned content in ace/ and hooks/.
|
|
62
62
|
*/
|
|
63
63
|
export const ACE_OWNED_PATTERNS = [
|
|
64
64
|
/^ace\/rules\//, // ace/rules/*.md (v2.0+)
|
|
65
65
|
/^rules\/ace\//, // rules/ace/*.md (legacy, for migration detection)
|
|
66
66
|
/^hooks\/ace\./, // hooks/ace.*.sh
|
|
67
|
-
/^hookify\.ace\./, // hookify.ace.*.local.md
|
|
68
67
|
];
|
|
69
68
|
|
|
70
69
|
/**
|
|
@@ -120,19 +119,6 @@ export const COMPONENTS = {
|
|
|
120
119
|
{ src: 'hooks/ace.java-compile-check.sh', dest: 'hooks/ace.java-compile-check.sh', roles: ['backend', 'fullstack'] },
|
|
121
120
|
],
|
|
122
121
|
},
|
|
123
|
-
hookify: {
|
|
124
|
-
description: 'Safety guard rules (block dangerous ops, protect secrets, safe git, code quality, require verification)',
|
|
125
|
-
required: false,
|
|
126
|
-
files: [
|
|
127
|
-
{ src: 'hookify/hookify.ace.block-dangerous-ops.local.md', dest: 'hookify.ace.block-dangerous-ops.local.md' },
|
|
128
|
-
{ src: 'hookify/hookify.ace.protect-secrets.local.md', dest: 'hookify.ace.protect-secrets.local.md' },
|
|
129
|
-
{ src: 'hookify/hookify.ace.safe-git-commands.local.md', dest: 'hookify.ace.safe-git-commands.local.md' },
|
|
130
|
-
{ src: 'hookify/hookify.ace.code-quality-gate.local.md', dest: 'hookify.ace.code-quality-gate.local.md' },
|
|
131
|
-
{ src: 'hookify/hookify.ace.require-verification.local.md', dest: 'hookify.ace.require-verification.local.md' },
|
|
132
|
-
{ src: 'hookify/hookify.ace.dangerous-commands.local.md', dest: 'hookify.ace.dangerous-commands.local.md' },
|
|
133
|
-
{ src: 'hookify/hookify.ace.sensitive-data.local.md', dest: 'hookify.ace.sensitive-data.local.md' },
|
|
134
|
-
],
|
|
135
|
-
},
|
|
136
122
|
memory: {
|
|
137
123
|
description: 'Global memory templates',
|
|
138
124
|
required: false,
|
package/src/core/ui.js
CHANGED
package/templates/settings.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
+
"effortLevel": "high",
|
|
2
3
|
"permissions": {
|
|
3
4
|
"allow": [
|
|
4
5
|
"Bash(*)",
|
|
@@ -92,6 +93,10 @@
|
|
|
92
93
|
}
|
|
93
94
|
]
|
|
94
95
|
},
|
|
96
|
+
"statusLine": {
|
|
97
|
+
"type": "command",
|
|
98
|
+
"command": "bash ~/.claude/scripts/statusline-command.sh"
|
|
99
|
+
},
|
|
95
100
|
"enabledPlugins": {
|
|
96
101
|
"revealjs@revealjs-skill": true,
|
|
97
102
|
"ace@ace-local": true
|