@deepseek-ai/dsh-loader-smoke 0.1.6-alpha.2 → 0.1.7-alpha.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/README.i18n.yaml +2 -2
- package/README.md +2 -2
- package/README.zh.md +2 -2
- package/lib/index.js +1 -0
- package/lib/types/index.d.ts +2 -0
- package/package.json +12 -12
package/README.i18n.yaml
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/test-support/loader-smoke/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: 2bdee79f8e6d769f9713466128c931d749fc6950
|
|
6
|
+
README.zh.md: ba83f0def2be1a77c7d2514b9c7b9ed76b3ec0ad
|
package/README.md
CHANGED
|
@@ -41,11 +41,11 @@ const result = await runLoaderSmoke({
|
|
|
41
41
|
})
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
Set `expectedExitCode` when the scenario pins a designed failure surface — a one-shot turn ending in an error result — and a run that exits any other way, including succeeding, still fails the smoke.
|
|
44
|
+
Set `sourceImport: 'tsx/esm'` when a source smoke exercises the supported `dsh` launcher; built mode ignores this option. Set `expectedExitCode` when the scenario pins a designed failure surface — a one-shot turn ending in an error result — and a run that exits any other way, including succeeding, still fails the smoke.
|
|
45
45
|
|
|
46
46
|
### Testing a shipped profile
|
|
47
47
|
|
|
48
|
-
Profile integration drivers use the repository-only `tests/fixtures/production-profile.ts` helper. It loads the named shipped profile and its bundle patches through `loadProfile`,
|
|
48
|
+
Profile integration drivers use the repository-only `tests/fixtures/production-profile.ts` helper. It loads the named shipped profile and its bundle patches through `loadProfile`, computes the runtime resolution, installs it through `PluginPackages`, and passes the bundle patches followed by the test's `*.patch.yml` files to the root `cordis:include` mounted by `boot`. Those patches should contain only the test provider or model, isolated persistence paths, and subject-specific changes. Package-level unit tests that need an agent loop without profile integration mount `dsh-agent-loop-testkit` locally instead.
|
|
49
49
|
|
|
50
50
|
### Driving a fixture turn
|
|
51
51
|
|
package/README.zh.md
CHANGED
|
@@ -41,11 +41,11 @@ const result = await runLoaderSmoke({
|
|
|
41
41
|
})
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
源码 smoke 测试支持的 `dsh` 启动器时,设置 `sourceImport: 'tsx/esm'`;built 模式忽略此选项。当场景固定一个设计好的失败面——即一次性轮次以错误结果结束——时设置 `expectedExitCode`;以任何其他方式退出(包括成功退出)都会使冒烟测试失败。
|
|
45
45
|
|
|
46
46
|
### 测试交付 profile
|
|
47
47
|
|
|
48
|
-
Profile 集成 driver 使用仅限仓库内部的 `tests/fixtures/production-profile.ts` helper。它通过 `loadProfile` 加载指定的已交付 profile 及其组合包 patch
|
|
48
|
+
Profile 集成 driver 使用仅限仓库内部的 `tests/fixtures/production-profile.ts` helper。它通过 `loadProfile` 加载指定的已交付 profile 及其组合包 patch,计算 runtime resolution,并通过 `PluginPackages` 安装它,然后把组合包 patch 与测试 `*.patch.yml` 文件依次交给 `boot` 挂载的根 `cordis:include`。这些 patch 应只包含测试提供方或模型、隔离持久化路径及被测对象专用变更。只需要 agent loop 而不测试 profile 集成的包级单元测试改为在本地挂载 `dsh-agent-loop-testkit`。
|
|
49
49
|
|
|
50
50
|
### 驱动 fixture 轮次
|
|
51
51
|
|
package/lib/index.js
CHANGED
|
@@ -197,6 +197,7 @@ async function runLoaderSmoke(options) {
|
|
|
197
197
|
libBin: options.libBinScript,
|
|
198
198
|
configArgs: options.binArgs ?? [options.configPath],
|
|
199
199
|
...options.mode !== void 0 ? { mode: options.mode } : {},
|
|
200
|
+
...options.sourceImport !== void 0 ? { sourceImport: options.sourceImport } : {},
|
|
200
201
|
tsconfigPath: options.tsconfigPath,
|
|
201
202
|
env: {
|
|
202
203
|
DSH_HOME: join(cwd, ".dsh"),
|
package/lib/types/index.d.ts
CHANGED
|
@@ -81,6 +81,8 @@ interface LoaderSmokeBaseOptions {
|
|
|
81
81
|
readonly tsconfigPath: string;
|
|
82
82
|
/** Boot from source via tsx (`src`) or built lib via plain Node (`lib`); defaults to the environment's mode. */
|
|
83
83
|
readonly mode?: ExampleMode;
|
|
84
|
+
/** Source hook selection; see {@link ExampleLaunchOptions.sourceImport}. */
|
|
85
|
+
readonly sourceImport?: 'tsx/esm';
|
|
84
86
|
/** Environment overrides layered over the parent and isolated DSH homes. */
|
|
85
87
|
readonly env?: Readonly<NodeJS.ProcessEnv>;
|
|
86
88
|
/** Process deadline override for harness tests. */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-loader-smoke",
|
|
3
3
|
"description": "Shared subprocess and direct-agent harness for keyless real-Loader example smoke tests",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.7-alpha.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -31,18 +31,18 @@
|
|
|
31
31
|
"tsx": "^4.22.4"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@deepseek-ai/cordis": "^4.0.
|
|
35
|
-
"@deepseek-ai/dsh-agent": "^0.1.
|
|
36
|
-
"@deepseek-ai/dsh-llm": "^0.1.
|
|
37
|
-
"@deepseek-ai/dsh-session": "^0.1.
|
|
38
|
-
"@deepseek-ai/dsh-http-proxy": "^0.1.
|
|
34
|
+
"@deepseek-ai/cordis": "^4.0.3",
|
|
35
|
+
"@deepseek-ai/dsh-agent": "^0.1.7-alpha.1",
|
|
36
|
+
"@deepseek-ai/dsh-llm": "^0.1.7-alpha.1",
|
|
37
|
+
"@deepseek-ai/dsh-session": "^0.1.7-alpha.1",
|
|
38
|
+
"@deepseek-ai/dsh-http-proxy": "^0.1.7-alpha.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@deepseek-ai/cordis": "^4.0.
|
|
42
|
-
"@deepseek-ai/dsh-agent": "^0.1.
|
|
43
|
-
"@deepseek-ai/dsh-app-boot": "^0.1.
|
|
44
|
-
"@deepseek-ai/dsh-llm": "^0.1.
|
|
45
|
-
"@deepseek-ai/dsh-session": "^0.1.
|
|
46
|
-
"@deepseek-ai/dsh-http-proxy": "^0.1.
|
|
41
|
+
"@deepseek-ai/cordis": "^4.0.3",
|
|
42
|
+
"@deepseek-ai/dsh-agent": "^0.1.7-alpha.1",
|
|
43
|
+
"@deepseek-ai/dsh-app-boot": "^0.1.7-alpha.1",
|
|
44
|
+
"@deepseek-ai/dsh-llm": "^0.1.7-alpha.1",
|
|
45
|
+
"@deepseek-ai/dsh-session": "^0.1.7-alpha.1",
|
|
46
|
+
"@deepseek-ai/dsh-http-proxy": "^0.1.7-alpha.1"
|
|
47
47
|
}
|
|
48
48
|
}
|