@dsh-plus/web-search-services 0.1.13 → 0.1.15
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 +6 -6
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/package.json +2 -2
- package/src/client/i18n.ts +2 -2
- package/src/config.ts +3 -3
- package/src/index.ts +1 -1
- package/src/ns.ts +2 -2
package/lib/client.js
CHANGED
|
@@ -238,7 +238,7 @@ window.__ModuleLoader__.load({
|
|
|
238
238
|
unsaved: "未保存",
|
|
239
239
|
loading: "加载中…",
|
|
240
240
|
unavailable: "配置服务不可用。",
|
|
241
|
-
readOnly: "当前部署无 settings provider
|
|
241
|
+
readOnly: "当前部署无 settings provider,配置为只读;请在 profile 的 cordis.patch.yml 行级配置。",
|
|
242
242
|
invalidNumber: "请输入正整数。",
|
|
243
243
|
collapse: "收起",
|
|
244
244
|
expand: "展开",
|
|
@@ -255,7 +255,7 @@ window.__ModuleLoader__.load({
|
|
|
255
255
|
unsaved: "Unsaved",
|
|
256
256
|
loading: "Loading…",
|
|
257
257
|
unavailable: "Settings service unavailable.",
|
|
258
|
-
readOnly: "No settings provider in this deployment; config is read-only.
|
|
258
|
+
readOnly: "No settings provider in this deployment; config is read-only. Configure it at the profile row in cordis.patch.yml.",
|
|
259
259
|
invalidNumber: "Enter a positive integer.",
|
|
260
260
|
collapse: "Collapse",
|
|
261
261
|
expand: "Expand",
|
|
@@ -462,8 +462,8 @@ ${extra}
|
|
|
462
462
|
//#region src/ns.ts
|
|
463
463
|
/**
|
|
464
464
|
* settings 命名空间字面量(纯常量,零依赖)。
|
|
465
|
-
* 服务端以字面量注册 settings section(用户层配置落
|
|
466
|
-
*
|
|
465
|
+
* 服务端以字面量注册 settings section(用户层配置落 profile 行级覆盖层
|
|
466
|
+
* cordis.patch.yml,热生效);与行级 cordis Config 共用同一份 schema。
|
|
467
467
|
* @module web-search-services/ns
|
|
468
468
|
*/
|
|
469
469
|
const SETTINGS_NS = "dsh-plus-web-search-services";
|
|
@@ -694,7 +694,7 @@ ${extra}
|
|
|
694
694
|
invalidTimeout: "请输入不小于 1000 的整数",
|
|
695
695
|
keysGroup: "密钥与覆盖项(本卡片不编辑)",
|
|
696
696
|
keysHint: "密钥主来源是上面的 env 文件,保持 skill 单事实源:TAVILY_API_KEY、EXA_API_KEY、SEARCH_OPENAI_API_KEY,以及可选的 SEARCH_OPENAI_BASE_URL、SEARCH_OPENAI_MODEL。",
|
|
697
|
-
keysUserLayerHint: "schema 里的 keys 段是行级覆盖逃生舱(role(secret) 字段只允许 profile 行级注入);写入 settings
|
|
697
|
+
keysUserLayerHint: "schema 里的 keys 段是行级覆盖逃生舱(role(secret) 字段只允许 profile 行级注入);写入 settings 用户层会被脱敏遮蔽,因此配置卡片不提供编辑。需要覆盖时请改 env 文件,或在 profile 的 cordis.patch.yml 行级注入。",
|
|
698
698
|
reloadHint: "改动热生效(下一次 web_search 调用即用新配置);scriptPath / python 变化无需重启。"
|
|
699
699
|
};
|
|
700
700
|
const ownEn = {
|
|
@@ -715,7 +715,7 @@ ${extra}
|
|
|
715
715
|
invalidTimeout: "Enter an integer of at least 1000",
|
|
716
716
|
keysGroup: "Credentials and overrides (not edited here)",
|
|
717
717
|
keysHint: "Credentials come from the env file above, keeping the skill as the single source: TAVILY_API_KEY, EXA_API_KEY, SEARCH_OPENAI_API_KEY, plus optional SEARCH_OPENAI_BASE_URL and SEARCH_OPENAI_MODEL.",
|
|
718
|
-
keysUserLayerHint: "The keys section in the schema is a line-level escape hatch (role(secret) fields accept profile-line injection only); values written to the settings
|
|
718
|
+
keysUserLayerHint: "The keys section in the schema is a line-level escape hatch (role(secret) fields accept profile-line injection only); values written to the settings user layer are masked, so this card offers no editor. To override, edit the env file or inject at the profile row in cordis.patch.yml.",
|
|
719
719
|
reloadHint: "Changes apply hot (the next web_search call uses them); scriptPath / python need no restart."
|
|
720
720
|
};
|
|
721
721
|
const zh = mergeDict(commonZh, ownZh);
|
package/lib/index.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ declare const Config: z<Schemastery.ObjectS<NoInfer<{
|
|
|
44
44
|
openaiModel: z<string, string, "defined">;
|
|
45
45
|
}>>>, "volatile-defined">;
|
|
46
46
|
}>>, "plain">;
|
|
47
|
-
/** 活动字段形态(
|
|
47
|
+
/** 活动字段形态(loader 解析产物:volatile 字段为活动引用)。 */
|
|
48
48
|
type WebSearchServicesConfigFields = Schemastery.TypeT<typeof Config>;
|
|
49
49
|
/** 平面配置形态(消费面的读取形态,由活动引用解包得到)。 */
|
|
50
50
|
type WebSearchServicesConfig = UnwrapVolatile<WebSearchServicesConfigFields>;
|
package/lib/index.js
CHANGED
|
@@ -614,7 +614,7 @@ var SearchServicesProvider = class {
|
|
|
614
614
|
//#region src/config.ts
|
|
615
615
|
/**
|
|
616
616
|
* 配置单一事实源:cordis 行级 Config(组合默认值,patch 层可覆盖)与 settings
|
|
617
|
-
* namespace
|
|
617
|
+
* namespace(用户层=profile 行级覆盖层 cordis.patch.yml,热生效)共用同一 schemastery schema。
|
|
618
618
|
*
|
|
619
619
|
* 密钥主来源是 search-services skill 的 env 文件(envFile,默认
|
|
620
620
|
* ~/.config/search-services/env),保持 skill 单事实源、零搬迁。行级 keys 仅为
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dsh-plus/web-search-services",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15",
|
|
4
4
|
"description": "dsh-plus service plugin: web_search 免费后端聚合——经官方 ctx.web provider 扩展点桥接 search-services skill(Tavily/Exa/OpenAI Chat 免费额度,优先级+自动回退+key 配置),官方 web_search 工具与输出格式零修改",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@dsh-plus/shared": "0.1.
|
|
35
|
+
"@dsh-plus/shared": "0.1.37"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@deepseek-ai/cordis": "^4.0.5-alpha.1",
|
package/src/client/i18n.ts
CHANGED
|
@@ -30,7 +30,7 @@ const ownZh = {
|
|
|
30
30
|
keysHint:
|
|
31
31
|
'密钥主来源是上面的 env 文件,保持 skill 单事实源:TAVILY_API_KEY、EXA_API_KEY、SEARCH_OPENAI_API_KEY,以及可选的 SEARCH_OPENAI_BASE_URL、SEARCH_OPENAI_MODEL。',
|
|
32
32
|
keysUserLayerHint:
|
|
33
|
-
'schema 里的 keys 段是行级覆盖逃生舱(role(secret) 字段只允许 profile 行级注入);写入 settings
|
|
33
|
+
'schema 里的 keys 段是行级覆盖逃生舱(role(secret) 字段只允许 profile 行级注入);写入 settings 用户层会被脱敏遮蔽,因此配置卡片不提供编辑。需要覆盖时请改 env 文件,或在 profile 的 cordis.patch.yml 行级注入。',
|
|
34
34
|
reloadHint: '改动热生效(下一次 web_search 调用即用新配置);scriptPath / python 变化无需重启。',
|
|
35
35
|
} as const
|
|
36
36
|
|
|
@@ -59,7 +59,7 @@ const ownEn = {
|
|
|
59
59
|
keysHint:
|
|
60
60
|
'Credentials come from the env file above, keeping the skill as the single source: TAVILY_API_KEY, EXA_API_KEY, SEARCH_OPENAI_API_KEY, plus optional SEARCH_OPENAI_BASE_URL and SEARCH_OPENAI_MODEL.',
|
|
61
61
|
keysUserLayerHint:
|
|
62
|
-
'The keys section in the schema is a line-level escape hatch (role(secret) fields accept profile-line injection only); values written to the settings
|
|
62
|
+
'The keys section in the schema is a line-level escape hatch (role(secret) fields accept profile-line injection only); values written to the settings user layer are masked, so this card offers no editor. To override, edit the env file or inject at the profile row in cordis.patch.yml.',
|
|
63
63
|
reloadHint:
|
|
64
64
|
'Changes apply hot (the next web_search call uses them); scriptPath / python need no restart.',
|
|
65
65
|
} as const
|
package/src/config.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 配置单一事实源:cordis 行级 Config(组合默认值,patch 层可覆盖)与 settings
|
|
3
|
-
* namespace
|
|
3
|
+
* namespace(用户层=profile 行级覆盖层 cordis.patch.yml,热生效)共用同一 schemastery schema。
|
|
4
4
|
*
|
|
5
5
|
* 密钥主来源是 search-services skill 的 env 文件(envFile,默认
|
|
6
6
|
* ~/.config/search-services/env),保持 skill 单事实源、零搬迁。行级 keys 仅为
|
|
@@ -50,7 +50,7 @@ const KeysSchema = z.object({
|
|
|
50
50
|
.default(''),
|
|
51
51
|
})
|
|
52
52
|
|
|
53
|
-
//
|
|
53
|
+
// 全字段 `.volatile()`——条目进入 settings describe 视图(卡片可读写;
|
|
54
54
|
// keys 内 role('secret') 字段由 describe/write 层做密文遮蔽,用户层勿填),
|
|
55
55
|
// loader 原位提交活动引用,current() 现取即热。
|
|
56
56
|
export const Config = z.object({
|
|
@@ -91,7 +91,7 @@ export const Config = z.object({
|
|
|
91
91
|
}).volatile(),
|
|
92
92
|
})
|
|
93
93
|
|
|
94
|
-
/** 活动字段形态(
|
|
94
|
+
/** 活动字段形态(loader 解析产物:volatile 字段为活动引用)。 */
|
|
95
95
|
export type WebSearchServicesConfigFields = Schemastery.TypeT<typeof Config>
|
|
96
96
|
/** 平面配置形态(消费面的读取形态,由活动引用解包得到)。 */
|
|
97
97
|
export type WebSearchServicesConfig = UnwrapVolatile<WebSearchServicesConfigFields>
|
package/src/index.ts
CHANGED
|
@@ -24,7 +24,7 @@ export { Config, SETTINGS_NS } from './config.ts'
|
|
|
24
24
|
export { PROVIDER_ID, SearchServicesProvider } from './provider.ts'
|
|
25
25
|
|
|
26
26
|
// config 运行期为 loader 解析的 volatile 活动字段(用户层 override 并入行级
|
|
27
|
-
// config
|
|
27
|
+
// config,写入原位提交)——每次读现取平面快照,替代已删除的 installSection/setSource。
|
|
28
28
|
export function apply(
|
|
29
29
|
ctx: Context,
|
|
30
30
|
config: WebSearchServicesConfig | WebSearchServicesConfigFields,
|
package/src/ns.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* settings 命名空间字面量(纯常量,零依赖)。
|
|
3
|
-
* 服务端以字面量注册 settings section(用户层配置落
|
|
4
|
-
*
|
|
3
|
+
* 服务端以字面量注册 settings section(用户层配置落 profile 行级覆盖层
|
|
4
|
+
* cordis.patch.yml,热生效);与行级 cordis Config 共用同一份 schema。
|
|
5
5
|
* @module web-search-services/ns
|
|
6
6
|
*/
|
|
7
7
|
export const SETTINGS_NS = 'dsh-plus-web-search-services'
|