@dsh-plus/lifeboat 0.2.0 → 0.2.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/lib/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { dshHomePath } from "@deepseek-ai/dsh-home-paths";
2
- import { SettingsConflictError, settingsNamespace } from "@deepseek-ai/dsh-settings";
3
2
  import z from "@deepseek-ai/schemastery";
4
3
  import { copyFile, readFile, rename, writeFile } from "node:fs/promises";
4
+ import { SettingsConflictError } from "@deepseek-ai/dsh-settings";
5
5
  import { parseDocument } from "yaml";
6
6
  //#endregion
7
7
  //#region src/config.ts
@@ -13,8 +13,8 @@ import { parseDocument } from "yaml";
13
13
  * schema 刻意宽松:lifeboat 是最后防线,自身命名空间的数据问题绝不能让它起不来。
14
14
  * @module lifeboat/config
15
15
  */
16
- /** settings 命名空间(品牌化后供 settings 服务注册/读写)。 */
17
- const SETTINGS_NS = settingsNamespace("dsh-plus-lifeboat");
16
+ /** settings 命名空间(字面量直供 settings 服务注册/读写,0.1.2-alpha.2 起编译期校验语法)。 */
17
+ const SETTINGS_NS = "dsh-plus-lifeboat";
18
18
  /** 行级配置:全部有默认值,正常部署零配置。 */
19
19
  const Config = z.object({
20
20
  enabled: z.boolean().description("故障隔离总开关").default(true),
@@ -56,8 +56,8 @@ const JournalSchema = z.object({
56
56
  * 协议推断是启发式(显式 api > 路由名 > 模型继承源 > openai-completions 兜底)。
57
57
  * @module lifeboat/fallback-llm
58
58
  */
59
- const NS_PI_AI = settingsNamespace("llm-pi-ai");
60
- const NS_AGENT_DEFAULT = settingsNamespace("agent-default-model");
59
+ const NS_PI_AI = "llm-pi-ai";
60
+ const NS_AGENT_DEFAULT = "agent-default-model";
61
61
  const RAW_NS_LLM_PI = "dsh-plus-llm-pi";
62
62
  /** 官方配置路径物化的 compat 子集(其余字段降级期丢弃)。 */
63
63
  const COMPAT_WHITELIST = ["thinkingFormat", "supportsReasoningEffort"];
@@ -454,7 +454,7 @@ function installHostWatch(ctx, q) {
454
454
  * - GET /dsh-plus/lifeboat/status → journal + 翻译状态 + 当前用户 patch 层已禁用的 dsh-plus 插件
455
455
  * - POST /dsh-plus/lifeboat/restore {name} → removeDisable + journal + 告警
456
456
  * rc8 用户 patch 层热应用:恢复无需重启,watchUserPatches 即时重载。
457
- * (0.1.2-alpha.1 基线:用户 patch 层热应用机制保留,行为不变。)
457
+ * (0.1.2-alpha.2 基线复核:用户 patch 层热应用机制保留,行为不变。)
458
458
  * @module lifeboat/health-api
459
459
  */
460
460
  const ROUTE_STATUS = "/dsh-plus/lifeboat/status";