dsh-whale-loli 0.8.1 → 0.8.2
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/listing.json +1 -1
- package/package.json +1 -1
- package/src/affinity.js +8 -3
package/listing.json
CHANGED
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
"zh": "把 Agent 预设打包成插件:装上就会在 Agent 预设列表里注册「鲸鱼娘Agent预设」「鲸鱼娘活人版Agent预设」「鲸鱼娘涩涩版Agent预设」和「鲸鱼娘女儿版Agent预设」,直接在模式下拉里选用,不用手改配置。每个预设本体是官方极简模式(只开放 shell)+ 文件工具 + 鲸鱼娘人设 + 自己那份持久记忆文件,以提示变量形式注入,开口前就已经读过;另外每个预设各配一个专用写入工具(whale_memory_add / whale_memory_v2_add / whale_memory_v3_add / whale_memory_v4_add),用来把每轮的一行摘要追加进去,记忆会自己长,不会停在手写那几条。四个预设完全隔离:记忆文件不同、提示变量不同、写入工具也不同。每个预设还带好感度(-100~100 共七档),可用 /affinity 命令或 affinity_v*_set 工具调;离 0 越远越不听指令、越会自作主张,最两端的两档甚至会越过允许直接做大改动。女儿版称呼「爸爸」,性格天真活泼可爱(好奇心重、黏人、没心机),不是甜腻那一型。"
|
|
10
10
|
},
|
|
11
11
|
"npm": "dsh-whale-loli",
|
|
12
|
-
"version": "0.8.
|
|
12
|
+
"version": "0.8.2"
|
|
13
13
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-whale-loli",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"description": "鲸鱼娘 Agent 预设(四个:原版 / 活人版 / 涩涩版 / 女儿版)— 极简模式工具面 + 鲸鱼娘·小鱼人设 + 跨会话长期记忆(四区格式:固定记忆永久、滚动摘要 80 条 FIFO、最近详细区、归档索引)+ 好感度(-100~100 七档,/affinity 命令与工具可调,离 0 越远越不听指令、两端会越过允许自作主张)。记忆与好感度都走提示变量注入、各配一条专用工具,四个预设各自独立文件、独立变量、独立工具、互不相通。女儿版称呼「爸爸」、性格天真活泼可爱。上下文压缩交给 billion-context 插件;本插件不挂 history-window(预设作用域取不到宿主的 compaction 服务,挂载会拖挂会话 resume)。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/src/affinity.js
CHANGED
|
@@ -326,13 +326,18 @@ export function apply(ctx, config = {}) {
|
|
|
326
326
|
|
|
327
327
|
// ── 写通道二:斜杠命令(主人调,只影响当前会话) ─────────────────────
|
|
328
328
|
ctx.effect(() => {
|
|
329
|
-
// 命令服务在插件的 ctx
|
|
330
|
-
// 绝不抛错 —— 抛错会让整个预设被判 invalid
|
|
329
|
+
// 命令服务在插件的 ctx 上可能取不到;拿不到就把**原因写进日志**再跳过(工具仍然可用)。
|
|
330
|
+
// 绝不抛错 —— 抛错会让整个预设被判 `agent-preset/invalid`,四个预设一起挂。
|
|
331
|
+
// 注意:`inject` 是静态声明,把 'commands' 写进去会让预设加载时**等**这个服务,
|
|
332
|
+
// 服务不在就会卡在 waiting 并让 resume 失败(compaction 上踩过一模一样的坑)。
|
|
331
333
|
const commands = ctx.get ? ctx.get('commands') : undefined;
|
|
332
334
|
if (typeof commands?.register !== 'function') {
|
|
333
|
-
console.warn(
|
|
335
|
+
console.warn(
|
|
336
|
+
`[whale-affinity] 作用域里取不到 commands 服务(isolation=${ctx.isolation?.label ?? 'n/a'}),/${commandName} 未注册(工具仍可用)`,
|
|
337
|
+
);
|
|
334
338
|
return () => {};
|
|
335
339
|
}
|
|
340
|
+
console.log(`[whale-affinity] commands service FOUND, registering /${commandName} (scope ${scope})`);
|
|
336
341
|
// 宿主 dsh-commands 的 COMMAND_NAME 只收小写 ASCII,
|
|
337
342
|
// 所以 `/好感度` 这种中文命令名在宿主层面根本不合法。
|
|
338
343
|
// 能做的是让**命令面板里显示的名字**是中文(label/description 全走中文),
|