memory-bank-skill 5.7.5 → 5.7.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/README.md +13 -5
- package/dist/cli.js +27 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -30,6 +30,14 @@ bunx memory-bank-skill install
|
|
|
30
30
|
|
|
31
31
|
然后 **重启 OpenCode**,完成!
|
|
32
32
|
|
|
33
|
+
### 自定义模型
|
|
34
|
+
|
|
35
|
+
默认使用 `cliproxy/claude-opus-4-5-20251101`,可通过 `--model` 指定:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
bunx memory-bank-skill install --model anthropic/claude-sonnet-4-5
|
|
39
|
+
```
|
|
40
|
+
|
|
33
41
|
### 验证安装
|
|
34
42
|
|
|
35
43
|
```bash
|
|
@@ -40,10 +48,10 @@ bunx memory-bank-skill doctor
|
|
|
40
48
|
|
|
41
49
|
| 操作 | 目标路径 |
|
|
42
50
|
|------|----------|
|
|
43
|
-
| 复制 Skill 文件 | `~/.config/opencode/skill/memory-bank/` |
|
|
44
|
-
| 配置 opencode.json | 添加 `permission.skill=allow
|
|
51
|
+
| 复制 Skill 文件 | `~/.config/opencode/skill/memory-bank/` 和 `memory-bank-writer/` |
|
|
52
|
+
| 配置 opencode.json | 添加 `permission.skill=allow`,注册插件和 agent |
|
|
53
|
+
| 注册 Agent | 添加 `memory-bank-writer` agent(用于写入守卫) |
|
|
45
54
|
| 写入 manifest | `~/.config/opencode/skill/memory-bank/.manifest.json` |
|
|
46
|
-
| 依赖安装 | 不自动执行;如需手动运行 `cd ~/.config/opencode && bun install` |
|
|
47
55
|
|
|
48
56
|
---
|
|
49
57
|
|
|
@@ -184,5 +192,5 @@ service=memory-bank Plugin initialized (unified) {"projectRoot":"..."}
|
|
|
184
192
|
|
|
185
193
|
## 版本
|
|
186
194
|
|
|
187
|
-
- **版本**: 5.
|
|
188
|
-
- **主要更新**:
|
|
195
|
+
- **版本**: 5.7.5
|
|
196
|
+
- **主要更新**: 写入守卫 + Writer Agent 自动注册
|
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.6",
|
|
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",
|
|
@@ -203,7 +203,7 @@ async function installSkillFiles(packageRoot, undoStack, manifestFiles) {
|
|
|
203
203
|
details: baseDestDir
|
|
204
204
|
};
|
|
205
205
|
}
|
|
206
|
-
async function installPluginToConfig(undoStack) {
|
|
206
|
+
async function installPluginToConfig(undoStack, customModel) {
|
|
207
207
|
const configPath = join(homedir(), ".config", "opencode", "opencode.json");
|
|
208
208
|
const pluginPackageWithVersion = `memory-bank-skill@${VERSION}`;
|
|
209
209
|
const pluginPackagePrefix = "memory-bank-skill";
|
|
@@ -274,9 +274,10 @@ async function installPluginToConfig(undoStack) {
|
|
|
274
274
|
if (!config.agent) {
|
|
275
275
|
config.agent = {};
|
|
276
276
|
}
|
|
277
|
+
const defaultModel = "cliproxy/claude-opus-4-5-20251101";
|
|
277
278
|
const writerAgent = {
|
|
278
279
|
description: "Memory Bank \u4E13\u7528\u5199\u5165\u4EE3\u7406",
|
|
279
|
-
model:
|
|
280
|
+
model: customModel || defaultModel,
|
|
280
281
|
tools: {
|
|
281
282
|
write: true,
|
|
282
283
|
edit: true,
|
|
@@ -364,7 +365,7 @@ async function checkAndCleanOpenCodeCache() {
|
|
|
364
365
|
}
|
|
365
366
|
return { cleaned: false };
|
|
366
367
|
}
|
|
367
|
-
async function install() {
|
|
368
|
+
async function install(customModel) {
|
|
368
369
|
log(`
|
|
369
370
|
${colors.bold}Memory Bank Skill Installer v${VERSION}${colors.reset}
|
|
370
371
|
`);
|
|
@@ -383,7 +384,7 @@ ${colors.bold}Memory Bank Skill Installer v${VERSION}${colors.reset}
|
|
|
383
384
|
logDetail(r1.details || "");
|
|
384
385
|
results.push(r1);
|
|
385
386
|
logStep(2, 2, "Configuring plugin...");
|
|
386
|
-
const r2 = await installPluginToConfig(undoStack);
|
|
387
|
+
const r2 = await installPluginToConfig(undoStack, customModel);
|
|
387
388
|
logDetail(r2.details || "");
|
|
388
389
|
results.push(r2);
|
|
389
390
|
await writeManifest(manifestFiles, undoStack);
|
|
@@ -491,21 +492,39 @@ function showHelp() {
|
|
|
491
492
|
${colors.bold}Memory Bank Skill v${VERSION}${colors.reset}
|
|
492
493
|
|
|
493
494
|
Usage:
|
|
494
|
-
bunx memory-bank-skill <command>
|
|
495
|
+
bunx memory-bank-skill <command> [options]
|
|
495
496
|
|
|
496
497
|
Commands:
|
|
497
498
|
install Install Memory Bank skill and plugin
|
|
498
499
|
doctor Check installation status
|
|
499
500
|
|
|
501
|
+
Options:
|
|
502
|
+
--model <model> Specify model for memory-bank-writer agent
|
|
503
|
+
Default: cliproxy/claude-opus-4-5-20251101
|
|
504
|
+
|
|
500
505
|
Examples:
|
|
501
506
|
bunx memory-bank-skill install
|
|
507
|
+
bunx memory-bank-skill install --model anthropic/claude-sonnet-4-5
|
|
502
508
|
bunx memory-bank-skill doctor
|
|
503
509
|
`);
|
|
504
510
|
}
|
|
505
|
-
|
|
511
|
+
function parseArgs() {
|
|
512
|
+
const args = process.argv.slice(2);
|
|
513
|
+
let command;
|
|
514
|
+
let model;
|
|
515
|
+
for (let i = 0;i < args.length; i++) {
|
|
516
|
+
if (args[i] === "--model" && args[i + 1]) {
|
|
517
|
+
model = args[++i];
|
|
518
|
+
} else if (!args[i].startsWith("-")) {
|
|
519
|
+
command = args[i];
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
return { command, model };
|
|
523
|
+
}
|
|
524
|
+
var { command, model } = parseArgs();
|
|
506
525
|
switch (command) {
|
|
507
526
|
case "install":
|
|
508
|
-
install();
|
|
527
|
+
install(model);
|
|
509
528
|
break;
|
|
510
529
|
case "doctor":
|
|
511
530
|
doctor();
|