@lmzhen/dsh-evolution-curator 0.23.0 → 0.24.0
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/lib/index.js +13 -13
- package/package.json +7 -7
package/lib/index.js
CHANGED
|
@@ -609,7 +609,7 @@ var EvolutionCurator = class extends Service {
|
|
|
609
609
|
instanceHeldRefusal(operation) {
|
|
610
610
|
return {
|
|
611
611
|
ok: false,
|
|
612
|
-
message: `instance-held
|
|
612
|
+
message: `instance-held:本 curator 行已把每 home 的占用权让给本进程的另一 curator 行。为保证持有行是唯一的控制面写入方,${operation} 与 run() 一并被拒绝(请在持有它的那一行上运行)。`
|
|
613
613
|
};
|
|
614
614
|
}
|
|
615
615
|
async runCore(options = {}) {
|
|
@@ -968,7 +968,7 @@ var EvolutionCurator = class extends Service {
|
|
|
968
968
|
continue;
|
|
969
969
|
}
|
|
970
970
|
const archived = await this.skills.archive(name, {
|
|
971
|
-
reason: "
|
|
971
|
+
reason: "生命周期:已达归档阈值",
|
|
972
972
|
allowBundled: this.pruneBuiltins
|
|
973
973
|
});
|
|
974
974
|
if (!archived.ok) {
|
|
@@ -990,7 +990,7 @@ var EvolutionCurator = class extends Service {
|
|
|
990
990
|
archivedSkills.push({
|
|
991
991
|
name,
|
|
992
992
|
path: archived.path ?? "",
|
|
993
|
-
reason: "
|
|
993
|
+
reason: "生命周期:已达归档阈值"
|
|
994
994
|
});
|
|
995
995
|
alreadyArchived.add(name);
|
|
996
996
|
if (bundledNames.has(name)) {
|
|
@@ -1035,7 +1035,7 @@ var EvolutionCurator = class extends Service {
|
|
|
1035
1035
|
});
|
|
1036
1036
|
archivedSkills.push({
|
|
1037
1037
|
name: nomination.from,
|
|
1038
|
-
reason:
|
|
1038
|
+
reason: `已合并进 ${nomination.into}(精确归档路径见 evolution/skill-mutated 事件里的 archivedPath)`
|
|
1039
1039
|
});
|
|
1040
1040
|
}
|
|
1041
1041
|
if (suppressedChanged) try {
|
|
@@ -1262,7 +1262,7 @@ var EvolutionCurator = class extends Service {
|
|
|
1262
1262
|
const blocked = [...new Set([target, ...sources])].filter((name) => gates.isBlocked(name));
|
|
1263
1263
|
if (blocked.length > 0) return {
|
|
1264
1264
|
ok: false,
|
|
1265
|
-
message:
|
|
1265
|
+
message: `以下技能受保护、无法合并(被排除/被引用/被抑制/受保护的内置):${blocked.join(", ")}`
|
|
1266
1266
|
};
|
|
1267
1267
|
await this.snapshotFull("pre-consolidate");
|
|
1268
1268
|
const result = await this.skills.consolidate(target, sources);
|
|
@@ -1360,46 +1360,46 @@ var EvolutionCurator = class extends Service {
|
|
|
1360
1360
|
const versions = await this.skills.listVersions(name);
|
|
1361
1361
|
if (versions.length === 0) return {
|
|
1362
1362
|
ok: false,
|
|
1363
|
-
message:
|
|
1363
|
+
message: `技能「${name}」还没有记录内容版本 —— 没有可撤销的。`
|
|
1364
1364
|
};
|
|
1365
1365
|
const live = await this.skills.read(name);
|
|
1366
1366
|
if (live === null) return {
|
|
1367
1367
|
ok: false,
|
|
1368
|
-
message:
|
|
1368
|
+
message: `「${name}」不在活动目录树里 —— 撤销恢复的是存活技能的正文;若它已归档,请用 '/evolution skill restore ${name}'。`
|
|
1369
1369
|
};
|
|
1370
1370
|
const liveHash = contentHash(live);
|
|
1371
1371
|
const target = v ?? this.previousVersionOf(versions, liveHash);
|
|
1372
1372
|
if (target === void 0) return {
|
|
1373
1373
|
ok: false,
|
|
1374
|
-
message:
|
|
1374
|
+
message: `「${name}」已处于其记录的内容 —— 没有更早的版本可撤销。`
|
|
1375
1375
|
};
|
|
1376
1376
|
if (!versions.some((candidate) => candidate.v === target)) {
|
|
1377
1377
|
const listed = versions.map((candidate) => `v${candidate.v}`).join(", ");
|
|
1378
1378
|
return {
|
|
1379
1379
|
ok: false,
|
|
1380
|
-
message:
|
|
1380
|
+
message: `技能「${name}」的版本 v${target} 不在已记录的历史里(已记录:${listed === "" ? "无" : listed})。`
|
|
1381
1381
|
};
|
|
1382
1382
|
}
|
|
1383
1383
|
const entry = versions.find((candidate) => candidate.v === target);
|
|
1384
1384
|
if (entry !== void 0 && entryTarget(entry, versions) === "support") return {
|
|
1385
1385
|
ok: false,
|
|
1386
|
-
message:
|
|
1386
|
+
message: `技能「${name}」的版本 v${target} ${entry.path === void 0 ? `由 ${entry.action} 写入,并且` : `由 ${entry.action} 写入到 ${entry.path},并且`} 存的是支撑文件的字节,而不是该技能的 SKILL.md —— 撤销只会恢复正文。 已记录的字节仍留在历史存储里;要恢复它们,请把该 blob 复制回那个文件。`
|
|
1387
1387
|
};
|
|
1388
1388
|
const content = await this.skills.readVersion(name, target);
|
|
1389
1389
|
if (content === null) return {
|
|
1390
1390
|
ok: false,
|
|
1391
|
-
message:
|
|
1391
|
+
message: `技能「${name}」的版本 v${target} 虽在索引里,但它的存储内容读不出来 —— 拒绝瞎猜、不做写入。`
|
|
1392
1392
|
};
|
|
1393
1393
|
const anchor = { sha256: liveHash };
|
|
1394
1394
|
const result = await this.skills.update(name, content, "foreground", anchor);
|
|
1395
1395
|
if (!result.ok) return result;
|
|
1396
1396
|
if (result.noop === true) return {
|
|
1397
1397
|
ok: true,
|
|
1398
|
-
message:
|
|
1398
|
+
message: `「${name}」已持有 v${target} 的内容 —— 未写入任何内容,也没有记录新版本。`
|
|
1399
1399
|
};
|
|
1400
1400
|
return {
|
|
1401
1401
|
ok: true,
|
|
1402
|
-
message: `${result.message}
|
|
1402
|
+
message: `${result.message} (已撤销到 v${target} —— 仅内容:标记、使用计数与策展状态不变,且这次撤销本身就是一个新版本。)`
|
|
1403
1403
|
};
|
|
1404
1404
|
}
|
|
1405
1405
|
/** The content the live bytes replaced: the CHAIN first, the recorded order as the fallback.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmzhen/dsh-evolution-curator",
|
|
3
3
|
"description": "Deterministic skill lifecycle and recovery (community build)",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.24.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -27,20 +27,20 @@
|
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@deepseek-ai/schemastery": "^3.18.4",
|
|
30
|
-
"@lmzhen/dsh-evolution-core": "^0.
|
|
30
|
+
"@lmzhen/dsh-evolution-core": "^0.24.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
34
34
|
"@deepseek-ai/dsh-llm": "^0.2.0-rc.1",
|
|
35
35
|
"@deepseek-ai/dsh-session": "^0.2.0-rc.1",
|
|
36
|
-
"@lmzhen/dsh-evolution-io": "^0.
|
|
37
|
-
"@lmzhen/dsh-evolution-state": "^0.
|
|
36
|
+
"@lmzhen/dsh-evolution-io": "^0.24.0",
|
|
37
|
+
"@lmzhen/dsh-evolution-state": "^0.24.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@deepseek-ai/dsh-llm": "^0.2.0-rc.1",
|
|
41
41
|
"@deepseek-ai/dsh-session": "^0.2.0-rc.1",
|
|
42
|
-
"@lmzhen/dsh-evolution-core": "^0.
|
|
43
|
-
"@lmzhen/dsh-evolution-io": "^0.
|
|
44
|
-
"@lmzhen/dsh-evolution-state": "^0.
|
|
42
|
+
"@lmzhen/dsh-evolution-core": "^0.24.0",
|
|
43
|
+
"@lmzhen/dsh-evolution-io": "^0.24.0",
|
|
44
|
+
"@lmzhen/dsh-evolution-state": "^0.24.0"
|
|
45
45
|
}
|
|
46
46
|
}
|