libero-mcp 0.2.22 → 0.2.23
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
-- S48 (2026-08-11): time_blocks 加 asked_at 字段
|
|
2
2
|
-- 用于 libero-cron-scan 幂等:每条 unverified/planned 只被扫描追问一次
|
|
3
|
-
-- 写入时机:sweepStale 把条目放进 to_ask
|
|
3
|
+
-- 写入时机:sweepStale 把条目放进 to_ask 后,caller 调 markAsked 标记
|
|
4
4
|
-- 复位规则:用户回报(completed / 软删)后这条不再被扫;asked_at 永久保留作审计
|
|
5
5
|
ALTER TABLE time_blocks ADD COLUMN asked_at TEXT;
|
package/dist/data/db.js
CHANGED
|
@@ -25,7 +25,24 @@ function runMigrations(db) {
|
|
|
25
25
|
if (applied.has(version))
|
|
26
26
|
continue;
|
|
27
27
|
const sql = readFileSync(join(migrationsDir, file), "utf-8");
|
|
28
|
-
|
|
28
|
+
try {
|
|
29
|
+
db.exec(sql);
|
|
30
|
+
}
|
|
31
|
+
catch (e) {
|
|
32
|
+
// §4.5 显式折叠声明:手动改过生产 DB(如 ALTER TABLE 加字段)但忘了在
|
|
33
|
+
// _migrations 补记,下次启动 runMigrations 重跑会撞"已存在"错误。
|
|
34
|
+
// 这类错误 = 字段/表/索引已在那,migration 的目标其实达成了 → 容错记为已应用,
|
|
35
|
+
// 不让 gateway 启动卡死。其他错误(语法错、真缺字段)仍真抛。
|
|
36
|
+
//
|
|
37
|
+
// 2026-08-11 S48 教训:手动 ALTER TABLE time_blocks ADD asked_at 后没补 _migrations,
|
|
38
|
+
// gateway 重启跑 015 撞 duplicate column → MCP 崩 → hermes parking。
|
|
39
|
+
const msg = e.message ?? "";
|
|
40
|
+
const isAlreadyExists = msg.includes("duplicate column name") ||
|
|
41
|
+
msg.includes("already exists") ||
|
|
42
|
+
msg.includes("duplicate object");
|
|
43
|
+
if (!isAlreadyExists)
|
|
44
|
+
throw e;
|
|
45
|
+
}
|
|
29
46
|
db.prepare("INSERT INTO _migrations (version, name) VALUES (?, ?)").run(version, file);
|
|
30
47
|
}
|
|
31
48
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
-- S48 (2026-08-11): time_blocks 加 asked_at 字段
|
|
2
2
|
-- 用于 libero-cron-scan 幂等:每条 unverified/planned 只被扫描追问一次
|
|
3
|
-
-- 写入时机:sweepStale 把条目放进 to_ask
|
|
3
|
+
-- 写入时机:sweepStale 把条目放进 to_ask 后,caller 调 markAsked 标记
|
|
4
4
|
-- 复位规则:用户回报(completed / 软删)后这条不再被扫;asked_at 永久保留作审计
|
|
5
5
|
ALTER TABLE time_blocks ADD COLUMN asked_at TEXT;
|
package/package.json
CHANGED
package/dist/data/libero.db
DELETED
|
Binary file
|