@qilin-agent/dsh-compat 3.1.3 → 3.1.5
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/README.i18n.yaml +15 -15
- package/README.md +2 -2
- package/README.zh.md +2 -2
- package/lib/index.js +35 -7
- package/lib/types/aliases.d.ts +10 -1
- package/lib/types/index.d.ts +1 -1
- package/package.json +1 -1
package/README.i18n.yaml
CHANGED
|
@@ -5,30 +5,30 @@
|
|
|
5
5
|
/:
|
|
6
6
|
en: 31f4d375f2c45aef
|
|
7
7
|
zh: 9beef4241a4e4953
|
|
8
|
-
/qilin-dsh-compat:
|
|
9
|
-
en:
|
|
10
|
-
zh:
|
|
11
|
-
/qilin-dsh-compat/summary:
|
|
8
|
+
/qilin-agent-dsh-compat:
|
|
9
|
+
en: d9c93221040cbdd1
|
|
10
|
+
zh: dd0b43d6e172f9fa
|
|
11
|
+
/qilin-agent-dsh-compat/summary:
|
|
12
12
|
en: 38552b541bcab51a
|
|
13
13
|
zh: b18b352279f6adda
|
|
14
|
-
/qilin-dsh-compat/table-of-contents:
|
|
14
|
+
/qilin-agent-dsh-compat/table-of-contents:
|
|
15
15
|
en: 76368b6b1da79c80
|
|
16
16
|
zh: b4a2a0e132e8ddf8
|
|
17
|
-
/qilin-dsh-compat/use-this-package:
|
|
18
|
-
en:
|
|
19
|
-
zh:
|
|
20
|
-
/qilin-dsh-compat/understand-the-implementation:
|
|
21
|
-
en:
|
|
22
|
-
zh:
|
|
23
|
-
/qilin-dsh-compat/model-experience:
|
|
17
|
+
/qilin-agent-dsh-compat/use-this-package:
|
|
18
|
+
en: 5b39a3886f762bb5
|
|
19
|
+
zh: 79907bd12094a6ce
|
|
20
|
+
/qilin-agent-dsh-compat/understand-the-implementation:
|
|
21
|
+
en: d68592a80cda03af
|
|
22
|
+
zh: 80169f5e2d9d6019
|
|
23
|
+
/qilin-agent-dsh-compat/model-experience:
|
|
24
24
|
en: 0c1978665c0886b0
|
|
25
25
|
zh: d0159681b5568bdb
|
|
26
|
-
/qilin-dsh-compat/model-experience/kv-cache-effect:
|
|
26
|
+
/qilin-agent-dsh-compat/model-experience/kv-cache-effect:
|
|
27
27
|
en: 5df5e153f56aec41
|
|
28
28
|
zh: 7f70d29d8d80cb58
|
|
29
|
-
/qilin-dsh-compat/known-limitations-and-deferred-work:
|
|
29
|
+
/qilin-agent-dsh-compat/known-limitations-and-deferred-work:
|
|
30
30
|
en: ff21fa030cc8c41b
|
|
31
31
|
zh: b4246c9cff73db62
|
|
32
|
-
/qilin-dsh-compat/known-limitations-and-deferred-work/dev-note:
|
|
32
|
+
/qilin-agent-dsh-compat/known-limitations-and-deferred-work/dev-note:
|
|
33
33
|
en: 6500ff89363ef9e9
|
|
34
34
|
zh: 2699e3038d5414cf
|
package/README.md
CHANGED
|
@@ -26,14 +26,14 @@ This package keeps the DSH plugin ecosystem usable in QiLin. It selects a bundle
|
|
|
26
26
|
|
|
27
27
|
Profile loading, the plugin manager's install gate and bundle inventory, and the client test runtime's roster use `bundlePatchOf` for `qilin.bundle.patch` and `dsh.bundle.patch`. The client module graph and browser loader use `clientDeclarationOf` and `dshCompatModuleId` so prebuilt DSH factories can keep their original `require()` names.
|
|
28
28
|
|
|
29
|
-
The exact platform aliases are exported as `DSH_PLATFORM_MODULE_ALIASES`. Unknown third-party names pass through unchanged; the compatibility layer does not replace service implementations or provide Electron-only APIs.
|
|
29
|
+
The exact platform aliases are exported as `DSH_PLATFORM_MODULE_ALIASES` and the DSH CLI application alias as `DSH_APPLICATION_MODULE_ALIASES`. Unknown third-party names pass through unchanged; the compatibility layer does not replace service implementations or provide Electron-only APIs.
|
|
30
30
|
|
|
31
31
|
-----
|
|
32
32
|
|
|
33
33
|
<a id="understand-the-implementation"></a>
|
|
34
34
|
## Understand the implementation
|
|
35
35
|
|
|
36
|
-
The manifest reader gives a QiLin declaration precedence when both keys exist. The module resolver applies explicit aliases first, then maps `@deepseek-ai/dsh-<name>` to `@qilin-agent/<name
|
|
36
|
+
The manifest reader gives a QiLin declaration precedence when both keys exist. The module resolver applies explicit aliases first, then maps `@deepseek-ai/dsh-<name>` to `@qilin-agent/<name>`, with renamed heads landing on their QiLin package: `client-runtime` → `client-modules`, `tool-cordis` → `tool-kylin`, `ui-cordis` → `client-ui-kylin`, `cordis-host-runner` → `kylin-host-runner`, `cordis-client-runner` → `kylin-client-runner`, `agent-preset` → `agent-presets`, `subagent-dsh-sdk` → `subagent-qilin-sdk`. The browser shell seeds static platform aliases, while dynamic graph edges and factory requests are canonicalized at their owning loaders.
|
|
37
37
|
|
|
38
38
|
-----
|
|
39
39
|
|
package/README.zh.md
CHANGED
|
@@ -26,14 +26,14 @@ kind: "package-library"
|
|
|
26
26
|
|
|
27
27
|
Profile 加载、插件管理器的安装门与 bundle 清单、以及客户端测试运行时的 roster 通过 `bundlePatchOf` 同时读取 `qilin.bundle.patch` 与 `dsh.bundle.patch`。客户端模块图和浏览器加载器通过 `clientDeclarationOf` 与 `dshCompatModuleId` 处理预构建 DSH 工厂,使其可以保留原有的 `require()` 名称。
|
|
28
28
|
|
|
29
|
-
精确的平台别名由 `DSH_PLATFORM_MODULE_ALIASES` 导出。未知的第三方名称保持不变;兼容层不会替换服务实现,也不会提供 Electron 专属 API。
|
|
29
|
+
精确的平台别名由 `DSH_PLATFORM_MODULE_ALIASES` 导出,DSH CLI 应用别名由 `DSH_APPLICATION_MODULE_ALIASES` 导出。未知的第三方名称保持不变;兼容层不会替换服务实现,也不会提供 Electron 专属 API。
|
|
30
30
|
|
|
31
31
|
-----
|
|
32
32
|
|
|
33
33
|
<a id="understand-the-implementation"></a>
|
|
34
34
|
## 实现说明
|
|
35
35
|
|
|
36
|
-
当两个键同时存在时,manifest 读取器优先使用 QiLin 声明。模块解析先应用精确别名,再把 `@deepseek-ai/dsh-<name>` 映射到 `@qilin-agent/<name
|
|
36
|
+
当两个键同时存在时,manifest 读取器优先使用 QiLin 声明。模块解析先应用精确别名,再把 `@deepseek-ai/dsh-<name>` 映射到 `@qilin-agent/<name>`,其中被改名的包头落到各自的 QiLin 包:`client-runtime` → `client-modules`、`tool-cordis` → `tool-kylin`、`ui-cordis` → `client-ui-kylin`、`cordis-host-runner` → `kylin-host-runner`、`cordis-client-runner` → `kylin-client-runner`、`agent-preset` → `agent-presets`、`subagent-dsh-sdk` → `subagent-qilin-sdk`。浏览器 shell 提供静态平台别名,动态图边与工厂请求在各自的加载器中归一化。
|
|
37
37
|
|
|
38
38
|
-----
|
|
39
39
|
|
package/lib/index.js
CHANGED
|
@@ -27,19 +27,47 @@ const DSH_PLATFORM_MODULE_ALIASES = {
|
|
|
27
27
|
"@deepseek-ai/dsh-client-ui-primitives": "@qilin-agent/client-ui-primitives",
|
|
28
28
|
"@deepseek-ai/dsh-client-ui-dockkit": "@qilin-agent/client-ui-dockkit"
|
|
29
29
|
};
|
|
30
|
+
/**
|
|
31
|
+
* Exact aliases for DSH-era application package names, which no prefix rule
|
|
32
|
+
* reaches: the DSH CLI application (`@deepseek-ai/dsh`) is
|
|
33
|
+
* `@qilin-agent/cli` here. Applications stay out of
|
|
34
|
+
* {@link DSH_PLATFORM_MODULE_ALIASES} because the browser shell resolves every
|
|
35
|
+
* value of that table against its static seed table, which carries platform
|
|
36
|
+
* modules only.
|
|
37
|
+
*/
|
|
38
|
+
const DSH_APPLICATION_MODULE_ALIASES = { "@deepseek-ai/dsh": "@qilin-agent/cli" };
|
|
30
39
|
/** The scoped prefix every renamed DSH engine package shares. */
|
|
31
40
|
const DSH_PACKAGE_PREFIX = "@deepseek-ai/dsh-";
|
|
32
41
|
/** The QiLin scope the prefix rule maps package heads onto. */
|
|
33
42
|
const QILIN_SCOPE = "@qilin-agent/";
|
|
34
43
|
/**
|
|
35
|
-
* Package heads whose QiLin name is not the mechanical `dsh-` strip
|
|
36
|
-
*
|
|
37
|
-
*
|
|
44
|
+
* Package heads whose QiLin name is not the mechanical `dsh-` strip. The DSH
|
|
45
|
+
* client module system (`client-runtime`) is QiLin's `client-modules`; the
|
|
46
|
+
* Cordis runner and tool family, the agent preset, and the DSH-SDK subagent
|
|
47
|
+
* provider carry QiLin names without a `cordis` or `dsh` head.
|
|
38
48
|
*/
|
|
39
|
-
const DSH_PACKAGE_RENAMES = {
|
|
49
|
+
const DSH_PACKAGE_RENAMES = {
|
|
50
|
+
"client-runtime": "client-modules",
|
|
51
|
+
"tool-cordis": "tool-kylin",
|
|
52
|
+
"ui-cordis": "client-ui-kylin",
|
|
53
|
+
"cordis-host-runner": "kylin-host-runner",
|
|
54
|
+
"cordis-client-runner": "kylin-client-runner",
|
|
55
|
+
"agent-preset": "agent-presets",
|
|
56
|
+
"subagent-dsh-sdk": "subagent-qilin-sdk",
|
|
57
|
+
"hook-protocol": "experimental-hook-protocol",
|
|
58
|
+
"hooks-claude-code": "experimental-hooks-claude-code",
|
|
59
|
+
"hooks-codex": "experimental-hooks-codex",
|
|
60
|
+
"webhook": "experimental-webhook",
|
|
61
|
+
"webhook-github": "experimental-webhook-github",
|
|
62
|
+
"tool-terminal": "experimental-tool-terminal",
|
|
63
|
+
"tool-ralph": "experimental-tool-ralph",
|
|
64
|
+
"tool-session-query": "experimental-tool-session-query",
|
|
65
|
+
"skill-badge": "experimental-skill-badge",
|
|
66
|
+
"session-title-all-prompts-llm": "experimental-session-title-all-prompts-llm"
|
|
67
|
+
};
|
|
40
68
|
/**
|
|
41
69
|
* Canonicalize one module specifier for QiLin's module graph: an exact
|
|
42
|
-
* platform alias wins; a scoped `@deepseek-ai/dsh-<pkg>[/subpath]` name maps
|
|
70
|
+
* platform or application alias wins; a scoped `@deepseek-ai/dsh-<pkg>[/subpath]` name maps
|
|
43
71
|
* onto `@qilin-agent/<pkg>[/subpath]` with the rename table applied to the package
|
|
44
72
|
* head; every other specifier (including unrenamed `@deepseek-ai/*` names such
|
|
45
73
|
* as `@qilin-agent/schemastery`, which QiLin keeps verbatim) passes through
|
|
@@ -48,7 +76,7 @@ const DSH_PACKAGE_RENAMES = { "client-runtime": "client-modules" };
|
|
|
48
76
|
* @returns the QiLin-canonical specifier for graph and seed-table lookups.
|
|
49
77
|
*/
|
|
50
78
|
function dshCompatModuleId(specifier) {
|
|
51
|
-
const exact = DSH_PLATFORM_MODULE_ALIASES[specifier];
|
|
79
|
+
const exact = DSH_PLATFORM_MODULE_ALIASES[specifier] ?? DSH_APPLICATION_MODULE_ALIASES[specifier];
|
|
52
80
|
if (exact !== void 0) return exact;
|
|
53
81
|
if (!specifier.startsWith(DSH_PACKAGE_PREFIX)) return specifier;
|
|
54
82
|
const [head = "", ...subpath] = specifier.slice(17).split("/");
|
|
@@ -105,4 +133,4 @@ function clientDeclarationOf(manifest) {
|
|
|
105
133
|
};
|
|
106
134
|
}
|
|
107
135
|
//#endregion
|
|
108
|
-
export { DSH_PLATFORM_MODULE_ALIASES, bundlePatchOf, clientDeclarationOf, dshCompatModuleId };
|
|
136
|
+
export { DSH_APPLICATION_MODULE_ALIASES, DSH_PLATFORM_MODULE_ALIASES, bundlePatchOf, clientDeclarationOf, dshCompatModuleId };
|
package/lib/types/aliases.d.ts
CHANGED
|
@@ -18,9 +18,18 @@
|
|
|
18
18
|
* values are QiLin platform module names (each also a static seed-table key).
|
|
19
19
|
*/
|
|
20
20
|
export declare const DSH_PLATFORM_MODULE_ALIASES: Readonly<Record<string, string>>;
|
|
21
|
+
/**
|
|
22
|
+
* Exact aliases for DSH-era application package names, which no prefix rule
|
|
23
|
+
* reaches: the DSH CLI application (`@deepseek-ai/dsh`) is
|
|
24
|
+
* `@qilin-agent/cli` here. Applications stay out of
|
|
25
|
+
* {@link DSH_PLATFORM_MODULE_ALIASES} because the browser shell resolves every
|
|
26
|
+
* value of that table against its static seed table, which carries platform
|
|
27
|
+
* modules only.
|
|
28
|
+
*/
|
|
29
|
+
export declare const DSH_APPLICATION_MODULE_ALIASES: Readonly<Record<string, string>>;
|
|
21
30
|
/**
|
|
22
31
|
* Canonicalize one module specifier for QiLin's module graph: an exact
|
|
23
|
-
* platform alias wins; a scoped `@deepseek-ai/dsh-<pkg>[/subpath]` name maps
|
|
32
|
+
* platform or application alias wins; a scoped `@deepseek-ai/dsh-<pkg>[/subpath]` name maps
|
|
24
33
|
* onto `@qilin-agent/<pkg>[/subpath]` with the rename table applied to the package
|
|
25
34
|
* head; every other specifier (including unrenamed `@deepseek-ai/*` names such
|
|
26
35
|
* as `@qilin-agent/schemastery`, which QiLin keeps verbatim) passes through
|
package/lib/types/index.d.ts
CHANGED
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* {@link ./manifest.ts}.
|
|
5
5
|
* @module @qilin-agent/dsh-compat
|
|
6
6
|
*/
|
|
7
|
-
export { DSH_PLATFORM_MODULE_ALIASES, dshCompatModuleId, } from './aliases.ts';
|
|
7
|
+
export { DSH_APPLICATION_MODULE_ALIASES, DSH_PLATFORM_MODULE_ALIASES, dshCompatModuleId, } from './aliases.ts';
|
|
8
8
|
export { bundlePatchOf, clientDeclarationOf, type ClientDeclaration, type ClientDeclarationKey, } from './manifest.ts';
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED