memory-bank-skill 5.7.2 → 5.7.4
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/dist/cli.js +16 -9
- package/dist/plugin.js +1 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -10,7 +10,7 @@ import { fileURLToPath } from "url";
|
|
|
10
10
|
// package.json
|
|
11
11
|
var package_default = {
|
|
12
12
|
name: "memory-bank-skill",
|
|
13
|
-
version: "5.7.
|
|
13
|
+
version: "5.7.4",
|
|
14
14
|
description: "Memory Bank - \u9879\u76EE\u8BB0\u5FC6\u7CFB\u7EDF\uFF0C\u8BA9 AI \u52A9\u624B\u5728\u6BCF\u6B21\u5BF9\u8BDD\u4E2D\u90FD\u80FD\u5FEB\u901F\u7406\u89E3\u9879\u76EE\u4E0A\u4E0B\u6587",
|
|
15
15
|
type: "module",
|
|
16
16
|
main: "dist/plugin.js",
|
|
@@ -183,17 +183,24 @@ async function cleanupBackups(undoStack) {
|
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
async function installSkillFiles(packageRoot, undoStack, manifestFiles) {
|
|
186
|
-
const
|
|
187
|
-
const
|
|
188
|
-
|
|
189
|
-
|
|
186
|
+
const skills = ["memory-bank", "memory-bank-writer"];
|
|
187
|
+
const baseDestDir = join(homedir(), ".config", "opencode", "skill");
|
|
188
|
+
let anyExisted = false;
|
|
189
|
+
for (const skill of skills) {
|
|
190
|
+
const srcDir = join(packageRoot, "skill", skill);
|
|
191
|
+
const destDir = join(baseDestDir, skill);
|
|
192
|
+
if (!await exists(srcDir)) {
|
|
193
|
+
throw new Error(`Skill source not found: ${srcDir}`);
|
|
194
|
+
}
|
|
195
|
+
if (await exists(destDir)) {
|
|
196
|
+
anyExisted = true;
|
|
197
|
+
}
|
|
198
|
+
await atomicCopyDir(srcDir, destDir, undoStack, manifestFiles);
|
|
190
199
|
}
|
|
191
|
-
const existed = await exists(destDir);
|
|
192
|
-
await atomicCopyDir(srcDir, destDir, undoStack, manifestFiles);
|
|
193
200
|
return {
|
|
194
201
|
step: "Installing skill files",
|
|
195
|
-
status:
|
|
196
|
-
details:
|
|
202
|
+
status: anyExisted ? "updated" : "created",
|
|
203
|
+
details: baseDestDir
|
|
197
204
|
};
|
|
198
205
|
}
|
|
199
206
|
async function installPluginToConfig(undoStack) {
|
package/dist/plugin.js
CHANGED
|
@@ -882,7 +882,7 @@ ${triggers.join(`
|
|
|
882
882
|
if (!hasShellOperators) {
|
|
883
883
|
const readOnlyPatterns = [
|
|
884
884
|
/^\s*(ls|cat|head|tail|less|more|grep|rg|ag|find|tree|wc|file|stat)\b/i,
|
|
885
|
-
/^\s*git\
|
|
885
|
+
/^\s*git\b/i
|
|
886
886
|
];
|
|
887
887
|
if (readOnlyPatterns.some((p) => p.test(command)))
|
|
888
888
|
return;
|
|
@@ -900,7 +900,6 @@ ${triggers.join(`
|
|
|
900
900
|
/\brm\b/i,
|
|
901
901
|
/\bmkdir\b/i,
|
|
902
902
|
/\btouch\b/i,
|
|
903
|
-
/\bgit\s+(rm|mv|apply|checkout|restore|reset|clean|stash)\b/i,
|
|
904
903
|
/\bpython\b.*\bopen\b/i
|
|
905
904
|
];
|
|
906
905
|
const isWriteOperation = writePatterns.some((p) => p.test(command));
|