@dsh-plus/llm-pi 0.1.45 → 0.2.1

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/client.js CHANGED
@@ -184,7 +184,7 @@ window.__ModuleLoader__.load({
184
184
  unsaved: "未保存",
185
185
  loading: "加载中…",
186
186
  unavailable: "配置服务不可用。",
187
- readOnly: "当前部署无 settings provider,配置为只读;请编辑 settings.yaml。",
187
+ readOnly: "当前部署无 settings provider,配置为只读;请在 profile 的 cordis.patch.yml 行级配置。",
188
188
  invalidNumber: "请输入正整数。",
189
189
  collapse: "收起",
190
190
  expand: "展开",
@@ -201,7 +201,7 @@ window.__ModuleLoader__.load({
201
201
  unsaved: "Unsaved",
202
202
  loading: "Loading…",
203
203
  unavailable: "Settings service unavailable.",
204
- readOnly: "No settings provider in this deployment; config is read-only. Edit settings.yaml.",
204
+ readOnly: "No settings provider in this deployment; config is read-only. Configure it at the profile row in cordis.patch.yml.",
205
205
  invalidNumber: "Enter a positive integer.",
206
206
  collapse: "Collapse",
207
207
  expand: "Expand",
@@ -408,7 +408,7 @@ ${extra}
408
408
  //#region src/ns.ts
409
409
  /**
410
410
  * settings 命名空间字面量(纯常量,零依赖,浏览器半可安全引入)。
411
- * 服务端直接以字面量注册(0.1.2-alpha.2 起 dsh-settings 对命名空间做编译期
411
+ * 服务端直接以字面量注册(dsh-settings 对命名空间做编译期
412
412
  * 语法校验,见 config.ts);浏览器半把它作为配置卡片的注册键
413
413
  * (插件页配置卡片挂在 row/bundle config 槽位上,与命名空间解耦,
414
414
  * 见 shared/config-slots),
@@ -1147,6 +1147,13 @@ ${extra}
1147
1147
  function sourceLabel(t, source) {
1148
1148
  return source === "official" ? t("runtimeDerived") : t("runtimeFallback");
1149
1149
  }
1150
+ /** 应急副本状态行:路径 · route 数 · 生成时间;未生成/失败显式提示。 */
1151
+ function officialCopyText(kit, t) {
1152
+ const copy = kit.officialCopy;
1153
+ if (copy.error !== void 0) return `${t("officialCopyFailed")}${copy.error}`;
1154
+ if (copy.updatedAt === void 0) return t("officialCopyPending");
1155
+ return `${copy.path} · ${copy.routes} ${t("officialCopyRoutes")} · ${formatTime(copy.updatedAt, t("runtimeVersionUnknown"))}`;
1156
+ }
1150
1157
  function RootFields(props) {
1151
1158
  const { t, draft, disabled, kit, onEdit } = props;
1152
1159
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
@@ -1190,6 +1197,10 @@ ${extra}
1190
1197
  className: "lpc-statusRow",
1191
1198
  children: `${t("runtimeCompat")}:${sourceLabel(t, kit.compatSource)}`
1192
1199
  }),
1200
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1201
+ className: "lpc-statusRow",
1202
+ children: `${t("runtimeOfficialCopy")}:${officialCopyText(kit, t)}`
1203
+ }),
1193
1204
  kit.versionNotice !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1194
1205
  className: "lpc-invalid",
1195
1206
  children: `${t("runtimeNotice")}:${kit.versionNotice}`
@@ -2851,6 +2862,10 @@ ${extra}
2851
2862
  runtimeCatalog: "内置模型目录",
2852
2863
  runtimeProtocols: "可服务协议",
2853
2864
  runtimeCompat: "compat 门控表",
2865
+ runtimeOfficialCopy: "应急副本",
2866
+ officialCopyPending: "尚未生成",
2867
+ officialCopyFailed: "生成失败:",
2868
+ officialCopyRoutes: "个 route",
2854
2869
  runtimeDiagnostics: "诊断",
2855
2870
  runtimeVersionUnknown: "未知",
2856
2871
  runtimeCatalogUnit: "个 provider /",
@@ -2981,6 +2996,10 @@ ${extra}
2981
2996
  runtimeCatalog: "Built-in catalog",
2982
2997
  runtimeProtocols: "Servable protocols",
2983
2998
  runtimeCompat: "compat gates",
2999
+ runtimeOfficialCopy: "Emergency copy",
3000
+ officialCopyPending: "not generated yet",
3001
+ officialCopyFailed: "generation failed: ",
3002
+ officialCopyRoutes: "routes",
2984
3003
  runtimeDiagnostics: "Diagnostics",
2985
3004
  runtimeVersionUnknown: "unknown",
2986
3005
  runtimeCatalogUnit: "providers /",
package/lib/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import z from "@deepseek-ai/schemastery";
2
2
  import { VolatileFields } from "@dsh-plus/shared";
3
3
  import { Context } from "@deepseek-ai/cordis";
4
4
  //#region src/config.d.ts
5
- /** settings 命名空间(字面量即合法命名空间,0.1.2-alpha.2 起编译期校验;webui 配置卡片与插件运行期读取同一份)。 */
5
+ /** settings 命名空间(字面量即合法命名空间,编译期校验;webui 配置卡片与插件运行期读取同一份)。 */
6
6
  declare const SETTINGS_NS = "dsh-plus-llm-pi";
7
7
  /** 线协议标识;合法集合运行期推导,故此处是开放字符串而非字面量联合。 */
8
8
  type ProtocolId = string;
@@ -89,13 +89,13 @@ interface LlmPiConfig {
89
89
  * (2 个根字段均有 schema 默认值),解析输出仍是完整的 {@link LlmPiConfig}。
90
90
  */
91
91
  type LlmPiConfigInput = Partial<LlmPiConfig>;
92
- /** 活动字段形态(0.1.7 loader 解析产物:volatile 字段为活动引用)。 */
92
+ /** 活动字段形态(loader 解析产物:volatile 字段为活动引用)。 */
93
93
  type LlmPiConfigFields = VolatileFields<LlmPiConfig>;
94
94
  declare const Config: z<LlmPiConfigInput, LlmPiConfigFields>;
95
95
  //#endregion
96
96
  //#region src/index.d.ts
97
97
  declare const name = "dsh-plus-llm-pi";
98
- declare const inject: readonly ['credentials', 'llm'];
98
+ declare const inject: readonly ['credentials', 'llm', 'settings'];
99
99
  declare function apply(ctx: Context, config: LlmPiConfig): Promise<void>;
100
100
  //#endregion
101
101
  export { Config, type LlmPiConfig, type ModelEntryConfig, type ProviderProfileConfig, SETTINGS_NS, apply, inject, name };