@thanhthi2895/luna-ai 2.16.5 → 2.16.6
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/bin/commands/install.js +13 -3
- package/package.json +3 -3
package/bin/commands/install.js
CHANGED
|
@@ -159,13 +159,16 @@ export async function ensureRulesSymlink(targetDir) {
|
|
|
159
159
|
/**
|
|
160
160
|
* Copy agent folders from source .agents/ → ~/.claude/ for global install.
|
|
161
161
|
* No symlinks — everything is a real copy. Skips broken symlinks and dev-only skills.
|
|
162
|
+
* NOTE: hooks are sourced from canonical Claude profile, not .agents.
|
|
162
163
|
*/
|
|
163
164
|
async function copyAgentsFoldersToClaude(rootDir, claudeHome) {
|
|
164
|
-
const folders = ['rules', 'skills', 'agents', 'workflows'
|
|
165
|
+
const folders = ['rules', 'skills', 'agents', 'workflows'];
|
|
165
166
|
const srcAgents = getCanonicalAgentsDir(rootDir);
|
|
166
167
|
const devSkipPaths = DEV_ONLY_SKILLS.map(s => path.join(srcAgents, 'skills', s));
|
|
167
168
|
for (const folder of folders) {
|
|
168
169
|
const src = path.join(srcAgents, folder);
|
|
170
|
+
if (!await fs.pathExists(src)) continue;
|
|
171
|
+
|
|
169
172
|
const dest = path.join(claudeHome, folder);
|
|
170
173
|
// Remove existing (old symlink or directory) before copy
|
|
171
174
|
let st = null;
|
|
@@ -174,7 +177,7 @@ async function copyAgentsFoldersToClaude(rootDir, claudeHome) {
|
|
|
174
177
|
if (st.isSymbolicLink()) await unlink(dest);
|
|
175
178
|
else await fs.remove(dest);
|
|
176
179
|
}
|
|
177
|
-
|
|
180
|
+
|
|
178
181
|
await fs.copy(src, dest, {
|
|
179
182
|
dereference: true,
|
|
180
183
|
filter: (file) => {
|
|
@@ -194,7 +197,9 @@ async function copyAgentsFoldersToClaude(rootDir, claudeHome) {
|
|
|
194
197
|
}
|
|
195
198
|
|
|
196
199
|
/**
|
|
197
|
-
* Copy supporting files
|
|
200
|
+
* Copy supporting files for global install.
|
|
201
|
+
* - scripts/templates from .agents
|
|
202
|
+
* - hooks from canonical Claude profile
|
|
198
203
|
*/
|
|
199
204
|
async function copyAgentsSupportFiles(rootDir, claudeHome) {
|
|
200
205
|
const srcAgents = getCanonicalAgentsDir(rootDir);
|
|
@@ -205,6 +210,11 @@ async function copyAgentsSupportFiles(rootDir, claudeHome) {
|
|
|
205
210
|
await fs.copy(src, path.join(claudeHome, item), { overwrite: true, dereference: true });
|
|
206
211
|
}
|
|
207
212
|
}
|
|
213
|
+
|
|
214
|
+
const srcHooks = path.join(getCanonicalClaudeDir(rootDir), 'hooks');
|
|
215
|
+
if (await fs.pathExists(srcHooks)) {
|
|
216
|
+
await fs.copy(srcHooks, path.join(claudeHome, 'hooks'), { overwrite: true, dereference: true });
|
|
217
|
+
}
|
|
208
218
|
}
|
|
209
219
|
|
|
210
220
|
/** Copy .agents/ to local target project. Skip broken symlinks, dev-only, skills-optional. Protect project-memory.md. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thanhthi2895/luna-ai",
|
|
3
|
-
"version": "2.16.
|
|
3
|
+
"version": "2.16.6",
|
|
4
4
|
"description": "Agentic Workflow Framework cho Claude - Tự động hóa quy trình lập trình Vibe Coding",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"test": "node --test agentic/antigravity/.agents/skills/chrome-devtools/scripts/__tests__/*.test.js",
|
|
13
13
|
"prepack": "node scripts/resolve-symlinks.js",
|
|
14
14
|
"postpack": "git checkout -- agentic/ && git clean -fd agentic/",
|
|
15
|
-
"release": "npm publish --access public"
|
|
15
|
+
"release": "npm version patch && npm publish --access public"
|
|
16
16
|
},
|
|
17
17
|
"keywords": [
|
|
18
18
|
"claude",
|
|
@@ -42,4 +42,4 @@
|
|
|
42
42
|
"engines": {
|
|
43
43
|
"node": ">=14.18.0"
|
|
44
44
|
}
|
|
45
|
-
}
|
|
45
|
+
}
|