@deepseek-ai/dsh-package-manifest 0.1.6-alpha.2 → 0.1.7-alpha.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/README.i18n.yaml +2 -2
- package/README.md +3 -1
- package/README.zh.md +3 -1
- package/lib/types/index.d.ts +2 -2
- package/lib/types/types.d.ts +21 -3
- package/package.json +3 -3
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/util/package-manifest/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: 7c4c4935412ca481dc5db2f9c182abf471faf269
|
|
6
|
+
README.zh.md: 58a150ae32a7129c1f213f9268869b99ada99655
|
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@ const manifest: DshPackageManifest = {
|
|
|
43
43
|
}
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
`DshPackageManifest` describes the package.json fields used by DSH, with required `name` and `version`; it is not an exhaustive npm schema. Local profile readers use `Partial<DshPackageManifest>` because profiles need no published version. `DshManifest` describes only public author fields under `dsh`. TypeScript checks the example and erases `import type`; these interfaces do not parse JSON or write a file.
|
|
46
|
+
`DshPackageManifest` describes the package.json fields used by DSH, with required `name` and `version`; it is not an exhaustive npm schema. Local profile readers use `Partial<DshPackageManifest>` because profiles need no published version. `DshManifest` describes only public author fields under `dsh`. `DshBundleManifest.patch` is one patch file path or an ordered list of them, each relative to the package root; the launcher applies a list in order as one bundle layer. TypeScript checks the example and erases `import type`; these interfaces do not parse JSON or write a file.
|
|
47
47
|
|
|
48
48
|
The following metadata fields are optional. Omitting them leaves the format version or compatible host versions undeclared; readers do not infer defaults.
|
|
49
49
|
|
|
@@ -52,6 +52,8 @@ The following metadata fields are optional. Omitting them leaves the format vers
|
|
|
52
52
|
| `dsh.manifestVersion` | Manifest format identifier; the declared format is `1`, independent of the npm package version and Session format version. |
|
|
53
53
|
| `engines.dsh` | Author-declared compatible DSH versions as a SemVer range, including exact prerelease versions. This field sits beside `engines.node` and `engines.npm`; an engines object may omit `dsh`. |
|
|
54
54
|
|
|
55
|
+
`LocalizedText` carries literal text or a language map with a required English fallback. `PluginLocalizedMeta` carries optional display title, description, an image data URL resolved from `package.json.icon`, and metadata diagnostics for installed plugins. [App boot](../../boot/app-boot/README.md) reads these values; this package only supplies their types.
|
|
56
|
+
|
|
55
57
|
Public composition declarations are defined in [`src/types.ts`](src/types.ts). Internal `configTrees`, `sessionFormatMigration`, and generated `moduleFallback` metadata remain owned by their image-packer, catalog, and launcher readers; the public types do not expose them.
|
|
56
58
|
|
|
57
59
|
-----
|
package/README.zh.md
CHANGED
|
@@ -43,7 +43,7 @@ const manifest: DshPackageManifest = {
|
|
|
43
43
|
}
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
`DshPackageManifest` 描述 DSH 使用的 package.json 字段,其中 `name` 和 `version` 必填;它不是完整的 npm schema(模式)。本地 profile 读取方使用 `Partial<DshPackageManifest>`,因为 profile 无需发布版本。`DshManifest` 仅描述 `dsh`
|
|
46
|
+
`DshPackageManifest` 描述 DSH 使用的 package.json 字段,其中 `name` 和 `version` 必填;它不是完整的 npm schema(模式)。本地 profile 读取方使用 `Partial<DshPackageManifest>`,因为 profile 无需发布版本。`DshManifest` 仅描述 `dsh` 下的公共作者字段。`DshBundleManifest.patch` 是一个 patch 文件路径,或一个有序的路径列表,均相对于包根目录;launcher 按列表顺序把它们作为同一个组合包层应用。TypeScript 检查示例并删除 `import type`;这些接口不解析 JSON,也不写入文件。
|
|
47
47
|
|
|
48
48
|
以下元数据字段均可选。省略时,格式版本或兼容的宿主版本保持未声明状态;读取方不推断默认值。
|
|
49
49
|
|
|
@@ -52,6 +52,8 @@ const manifest: DshPackageManifest = {
|
|
|
52
52
|
| `dsh.manifestVersion` | manifest(元数据清单)格式标识;声明的格式为 `1`,独立于 npm 包版本和 Session 格式版本。 |
|
|
53
53
|
| `engines.dsh` | 作者声明的兼容 DSH 版本,使用 SemVer 范围,也可填写精确的预发布版本。此字段与 `engines.node`、`engines.npm` 并列;engines 对象可省略 `dsh`。 |
|
|
54
54
|
|
|
55
|
+
`LocalizedText` 携带字面文本或带必需英文回退值的语言映射。`PluginLocalizedMeta` 携带已安装插件的可选展示标题、描述、从 `package.json.icon` 解析的图片 data URL,以及元信息诊断。[App boot](../../boot/app-boot/README.zh.md) 读取这些值;本包只提供其类型。
|
|
56
|
+
|
|
55
57
|
公共组合声明定义在 [`src/types.ts`](src/types.ts) 中。内部 `configTrees`、`sessionFormatMigration` 和生成的 `moduleFallback` 元数据分别由镜像打包器、目录生成器和启动器读取方拥有;公共类型不暴露这些字段。
|
|
56
58
|
|
|
57
59
|
-----
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Public package manifest types, with no runtime exports.
|
|
2
|
+
* Public package manifest and plugin display types, with no runtime exports.
|
|
3
3
|
* @module @deepseek-ai/dsh-package-manifest
|
|
4
4
|
*/
|
|
5
|
-
export type { DshBundleManifest, DshClientManifest, DshEnginesManifest, DshManifest, DshPackageManifest, DshProfileManifest, } from './types.ts';
|
|
5
|
+
export type { DshBundleManifest, DshClientManifest, DshEnginesManifest, DshManifest, DshPackageManifest, DshProfileManifest, LocalizedText, PluginLocalizedMeta, } from './types.ts';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/types/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Shared declarations for
|
|
2
|
+
* Shared declarations for package.json fields and plugin display metadata.
|
|
3
3
|
* Each reader owns JSON validation and resolved defaults.
|
|
4
4
|
* @module @deepseek-ai/dsh-package-manifest/types
|
|
5
5
|
*/
|
|
@@ -11,6 +11,8 @@ export interface DshPackageManifest {
|
|
|
11
11
|
version: string;
|
|
12
12
|
/** Package summary for discovery and display. */
|
|
13
13
|
description?: string;
|
|
14
|
+
/** SVG, PNG, JPEG, or WebP file relative to this manifest's directory, at most 256 KiB and contained there after realpath resolution. */
|
|
15
|
+
icon?: string;
|
|
14
16
|
/** Prevent npm publication, for example for local profile projects. */
|
|
15
17
|
private?: boolean;
|
|
16
18
|
/** Packages installed alongside this package. */
|
|
@@ -33,6 +35,22 @@ export interface DshManifest {
|
|
|
33
35
|
/** Client module loading and build metadata. */
|
|
34
36
|
client?: DshClientManifest;
|
|
35
37
|
}
|
|
38
|
+
/** Literal text or translations indexed by lowercase language id, with a required English fallback. */
|
|
39
|
+
export type LocalizedText = string | {
|
|
40
|
+
readonly en: string;
|
|
41
|
+
readonly [locale: string]: string;
|
|
42
|
+
};
|
|
43
|
+
/** Validated plugin display fields and diagnostics from exported locales, manifests, or icon files. */
|
|
44
|
+
export interface PluginLocalizedMeta {
|
|
45
|
+
/** Display title; omission preserves the consumer's technical-name fallback. */
|
|
46
|
+
readonly title?: LocalizedText;
|
|
47
|
+
/** Display introduction after locale and package-field fallback. */
|
|
48
|
+
readonly description?: LocalizedText;
|
|
49
|
+
/** Base64 image data URL read from the manifest's icon file; render as an image, not inline markup. */
|
|
50
|
+
readonly icon?: string;
|
|
51
|
+
/** Unmodified local metadata diagnostic; the plugin remains manageable. */
|
|
52
|
+
readonly error?: string;
|
|
53
|
+
}
|
|
36
54
|
/** Runtime version requirements under `package.json.engines`. */
|
|
37
55
|
export interface DshEnginesManifest {
|
|
38
56
|
/** Compatible DSH versions as a SemVer range, including an exact version. */
|
|
@@ -46,8 +64,8 @@ export interface DshEnginesManifest {
|
|
|
46
64
|
}
|
|
47
65
|
/** The configuration layer exported by a bundle package. */
|
|
48
66
|
export interface DshBundleManifest {
|
|
49
|
-
/**
|
|
50
|
-
patch: string;
|
|
67
|
+
/** One patch file path, or an ordered list applied in sequence, each relative to the declaring package root. */
|
|
68
|
+
patch: string | string[];
|
|
51
69
|
}
|
|
52
70
|
/** The bundle composition declared by a profile directory. */
|
|
53
71
|
export interface DshProfileManifest {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-package-manifest",
|
|
3
3
|
"description": "Shared type declarations for package.json.dsh configuration fields",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.7-alpha.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
],
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@deepseek-ai/cordis": "
|
|
30
|
+
"@deepseek-ai/cordis": "~4.0.4"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@deepseek-ai/cordis": "
|
|
33
|
+
"@deepseek-ai/cordis": "~4.0.4"
|
|
34
34
|
}
|
|
35
35
|
}
|