@deepseek-ai/dsh-package-manifest 0.1.3-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/LICENSE +21 -0
- package/README.i18n.yaml +6 -0
- package/README.md +85 -0
- package/README.zh.md +85 -0
- package/lib/index.js +1 -0
- package/lib/types/index.d.ts +6 -0
- package/lib/types/types.d.ts +92 -0
- package/package.json +35 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DeepSeek
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.i18n.yaml
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
|
|
2
|
+
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
|
+
# after editing either side, bring the other along and re-record with:
|
|
4
|
+
# pnpm run verify-translation-pairing --write packages/util/package-manifest/README.md
|
|
5
|
+
README.md: 971df84d7db3205eb8be75ba895046d4151780d2
|
|
6
|
+
README.zh.md: 8989cbe9bc29bbf8112d5465eac9806c211fa88d
|
package/README.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Shared TypeScript declarations for package.json.dsh metadata, usable by boot, client, build, and external packages."
|
|
3
|
+
kind: "package-library"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# @deepseek-ai/dsh-package-manifest
|
|
7
|
+
|
|
8
|
+
English | [中文](README.zh.md)
|
|
9
|
+
|
|
10
|
+
## Summary
|
|
11
|
+
|
|
12
|
+
Use `DshManifest` to type a package's Harness metadata, or a member type such as `DshClientManifest` for one declaration. Boot, client, build, and external packages import the same types; each reader owns JSON validation and default resolution.
|
|
13
|
+
|
|
14
|
+
## Table of Contents
|
|
15
|
+
|
|
16
|
+
- [Use this package](#use-this-package)
|
|
17
|
+
- [Understand the implementation](#understand-the-implementation)
|
|
18
|
+
- [Further Exploration](#further-exploration)
|
|
19
|
+
- [Model Experience](#model-experience)
|
|
20
|
+
- [Known Limitations and Deferred Work](#known-limitations-and-deferred-work)
|
|
21
|
+
- [Dev Note](#dev-note)
|
|
22
|
+
|
|
23
|
+
-----
|
|
24
|
+
|
|
25
|
+
<a id="use-this-package"></a>
|
|
26
|
+
## Use this package
|
|
27
|
+
|
|
28
|
+
Import from the package root. Use a development dependency when only checking your own source; use a production dependency if your published declarations reference these types.
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
import type { DshClientManifest, DshManifest } from '@deepseek-ai/dsh-package-manifest'
|
|
32
|
+
|
|
33
|
+
const client: DshClientManifest = { platform: 'web' }
|
|
34
|
+
const dsh: DshManifest = {
|
|
35
|
+
bundle: { patch: './cordis.patch.yml' },
|
|
36
|
+
client,
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
`DshManifest` describes `bundle`, `profile`, `client`, `configTrees`, `sessionFormatMigration`, and `moduleFallback`, not the surrounding npm manifest. `moduleFallback` is launcher-generated metadata and is not an author configuration entry. TypeScript checks this object and erases `import type` during compilation; JSON files cannot import types, and this example does not write a `package.json`. See [`src/types.ts`](src/types.ts) for the declarations.
|
|
41
|
+
|
|
42
|
+
-----
|
|
43
|
+
|
|
44
|
+
<a id="understand-the-implementation"></a>
|
|
45
|
+
## Understand the implementation
|
|
46
|
+
|
|
47
|
+
<details>
|
|
48
|
+
<summary>Implementation internals — click to expand</summary>
|
|
49
|
+
|
|
50
|
+
The package root only re-exports declarations from [`src/types.ts`](src/types.ts). No runtime invariant companion is published because the package has no runtime state or independently observable relationships.
|
|
51
|
+
|
|
52
|
+
</details>
|
|
53
|
+
|
|
54
|
+
-----
|
|
55
|
+
|
|
56
|
+
<a id="further-exploration"></a>
|
|
57
|
+
## Further Exploration
|
|
58
|
+
|
|
59
|
+
- [Profile launcher](../../boot/app-boot/README.md#profiles) — manifest loading and composition.
|
|
60
|
+
- [Declaration ownership](../../../.agents/notes/implemented/architecture/2026-09-05-package-manifest-types.md) — scope and dependency rationale.
|
|
61
|
+
|
|
62
|
+
<a id="model-experience"></a>
|
|
63
|
+
## Model Experience
|
|
64
|
+
|
|
65
|
+
None, as this package only exports types.
|
|
66
|
+
|
|
67
|
+
#### KV Cache effect
|
|
68
|
+
|
|
69
|
+
Type declarations add no model input, so provider cache reuse is unaffected.
|
|
70
|
+
|
|
71
|
+
## Known Limitations and Deferred Work
|
|
72
|
+
|
|
73
|
+
<a id="known-limitations-and-deferred-work"></a>
|
|
74
|
+
|
|
75
|
+
- **Static typing only.** These declarations do not validate JSON, check file existence, or supply defaults. `configTrees` serves the experimental image packer, and `sessionFormatMigration` is discovered only for workspace migration packages; declaring them does not register external plugin behavior.
|
|
76
|
+
|
|
77
|
+
<a id="dev-note"></a>
|
|
78
|
+
### Dev Note
|
|
79
|
+
|
|
80
|
+
<details>
|
|
81
|
+
<summary>Working context for maintainers — click to expand</summary>
|
|
82
|
+
|
|
83
|
+
None.
|
|
84
|
+
|
|
85
|
+
</details>
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "供启动器、客户端、构建工具和外部包共同使用的 package.json.dsh 元数据 TypeScript 声明。"
|
|
3
|
+
kind: "package-library"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# @deepseek-ai/dsh-package-manifest
|
|
7
|
+
|
|
8
|
+
[English](README.md) | 中文
|
|
9
|
+
|
|
10
|
+
## 概述
|
|
11
|
+
|
|
12
|
+
使用 `DshManifest` 为包的 Harness 元数据添加类型,也可用 `DshClientManifest` 等成员类型描述单项声明。启动器、客户端、构建工具和外部包导入同一组类型;各读取方负责 JSON 校验和默认值解析。
|
|
13
|
+
|
|
14
|
+
## 目录
|
|
15
|
+
|
|
16
|
+
- [使用本包](#use-this-package)
|
|
17
|
+
- [理解实现](#understand-the-implementation)
|
|
18
|
+
- [进一步探索](#further-exploration)
|
|
19
|
+
- [模型体验](#model-experience)
|
|
20
|
+
- [已知限制与后续工作](#known-limitations-and-deferred-work)
|
|
21
|
+
- [开发备注](#dev-note)
|
|
22
|
+
|
|
23
|
+
-----
|
|
24
|
+
|
|
25
|
+
<a id="use-this-package"></a>
|
|
26
|
+
## 使用本包
|
|
27
|
+
|
|
28
|
+
从包根导入类型。仅检查自己的源码时使用开发依赖;若发布的声明文件引用这些类型,则使用生产依赖。
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
import type { DshClientManifest, DshManifest } from '@deepseek-ai/dsh-package-manifest'
|
|
32
|
+
|
|
33
|
+
const client: DshClientManifest = { platform: 'web' }
|
|
34
|
+
const dsh: DshManifest = {
|
|
35
|
+
bundle: { patch: './cordis.patch.yml' },
|
|
36
|
+
client,
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
`DshManifest` 描述 `bundle`、`profile`、`client`、`configTrees`、`sessionFormatMigration` 和 `moduleFallback`,不包含外层 npm manifest。`moduleFallback` 是启动器生成的元数据,不是作者配置项。TypeScript 检查该对象,并在编译时删除 `import type`;JSON 文件不能导入类型,此示例也不会写入 `package.json`。声明见 [`src/types.ts`](src/types.ts)。
|
|
41
|
+
|
|
42
|
+
-----
|
|
43
|
+
|
|
44
|
+
<a id="understand-the-implementation"></a>
|
|
45
|
+
## 理解实现
|
|
46
|
+
|
|
47
|
+
<details>
|
|
48
|
+
<summary>实现细节——点击展开</summary>
|
|
49
|
+
|
|
50
|
+
包根仅重新导出 [`src/types.ts`](src/types.ts) 中的声明。本包不发布运行时不变量伴随模块,因为它没有运行时状态或可独立观察的关系。
|
|
51
|
+
|
|
52
|
+
</details>
|
|
53
|
+
|
|
54
|
+
-----
|
|
55
|
+
|
|
56
|
+
<a id="further-exploration"></a>
|
|
57
|
+
## 进一步探索
|
|
58
|
+
|
|
59
|
+
- [Profile 启动器](../../boot/app-boot/README.zh.md#profiles)——manifest 加载与组合。
|
|
60
|
+
- [声明归属](../../../.agents/notes/implemented/architecture/2026-09-05-package-manifest-types.zh.md)——范围与依赖依据。
|
|
61
|
+
|
|
62
|
+
<a id="model-experience"></a>
|
|
63
|
+
## 模型体验
|
|
64
|
+
|
|
65
|
+
无,因为本包仅导出类型。
|
|
66
|
+
|
|
67
|
+
#### KV Cache 影响
|
|
68
|
+
|
|
69
|
+
类型声明不增加模型输入,因此不影响提供方的缓存复用。
|
|
70
|
+
|
|
71
|
+
## 已知限制与后续工作
|
|
72
|
+
|
|
73
|
+
<a id="known-limitations-and-deferred-work"></a>
|
|
74
|
+
|
|
75
|
+
- **仅提供静态类型。** 这些声明不校验 JSON、不检查文件存在性,也不提供默认值。`configTrees` 服务于实验性镜像打包器,`sessionFormatMigration` 仅从工作区迁移包中发现;声明它们不会注册外部插件行为。
|
|
76
|
+
|
|
77
|
+
<a id="dev-note"></a>
|
|
78
|
+
### 开发备注
|
|
79
|
+
|
|
80
|
+
<details>
|
|
81
|
+
<summary>维护者的工作上下文——点击展开</summary>
|
|
82
|
+
|
|
83
|
+
无。
|
|
84
|
+
|
|
85
|
+
</details>
|
package/lib/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public package manifest types, with no runtime exports.
|
|
3
|
+
* @module @deepseek-ai/dsh-package-manifest
|
|
4
|
+
*/
|
|
5
|
+
export type { DshBundleManifest, DshClientManifest, DshConfigTreeDeclaration, DshManifest, DshModuleFallbackManifest, DshProfileManifest, DshSessionFormatMigrationManifest, ProfilePatchReload, } from './types.ts';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared declarations for `package.json.dsh`.
|
|
3
|
+
* Each reader owns JSON validation and resolved defaults.
|
|
4
|
+
* @module @deepseek-ai/dsh-package-manifest/types
|
|
5
|
+
*/
|
|
6
|
+
/** The `dsh` property of an npm manifest; a package may declare several roles. */
|
|
7
|
+
export interface DshManifest {
|
|
8
|
+
/** Bundle metadata consumed by the profile launcher. */
|
|
9
|
+
bundle?: DshBundleManifest;
|
|
10
|
+
/** Profile metadata consumed by the profile launcher. */
|
|
11
|
+
profile?: DshProfileManifest;
|
|
12
|
+
/** Client module loading and build metadata. */
|
|
13
|
+
client?: DshClientManifest;
|
|
14
|
+
/** Config directories consumed by the experimental deployment-image packer. */
|
|
15
|
+
configTrees?: DshConfigTreeDeclaration[];
|
|
16
|
+
/** Adjacent Session migration metadata consumed by the workspace catalog generator. */
|
|
17
|
+
sessionFormatMigration?: DshSessionFormatMigrationManifest;
|
|
18
|
+
/**
|
|
19
|
+
* Launcher-generated module proxy metadata, not an author configuration entry.
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
moduleFallback?: DshModuleFallbackManifest;
|
|
23
|
+
}
|
|
24
|
+
/** The configuration layer exported by a bundle package. */
|
|
25
|
+
export interface DshBundleManifest {
|
|
26
|
+
/** Patch file path relative to the declaring package root. */
|
|
27
|
+
patch: string;
|
|
28
|
+
}
|
|
29
|
+
/** The bundle composition declared by a profile directory. */
|
|
30
|
+
export interface DshProfileManifest {
|
|
31
|
+
/** Ordered bundle layer list, using installed package names. */
|
|
32
|
+
bundles?: string[];
|
|
33
|
+
/** User patch lifecycle; omitted means `live` for custom profiles. */
|
|
34
|
+
patchReload?: ProfilePatchReload;
|
|
35
|
+
}
|
|
36
|
+
/** Whether user patch files reload while a profile remains active or apply only at startup. */
|
|
37
|
+
export type ProfilePatchReload = 'live' | 'startup';
|
|
38
|
+
/** Client module declaration read by client-modules and the client build. */
|
|
39
|
+
export interface DshClientManifest {
|
|
40
|
+
/** Client platform identifier; the Web consumer selects `web`. */
|
|
41
|
+
platform: string;
|
|
42
|
+
/** Informational package-name dependencies, not Cordis service injection. */
|
|
43
|
+
inject?: string[];
|
|
44
|
+
/** Boot phase-one registration barrier; absent means the shared application batch. */
|
|
45
|
+
immediately?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Exact module-table requests beyond the implicit client baseline, including
|
|
48
|
+
* subpaths such as `<pkg>/client`; absent means baseline externals only.
|
|
49
|
+
* Type-only imports are erased and create no module request.
|
|
50
|
+
*/
|
|
51
|
+
external?: string[];
|
|
52
|
+
}
|
|
53
|
+
/** One config directory read from the CLI package by the experimental image packer. */
|
|
54
|
+
export interface DshConfigTreeDeclaration {
|
|
55
|
+
/** Non-empty destination path in the image; mount values must be unique. */
|
|
56
|
+
mount: string;
|
|
57
|
+
/** Non-empty source directory path relative to the declaring package root. */
|
|
58
|
+
path: string;
|
|
59
|
+
/** Include the directory's YAML plugin rows in the package roster; absent means false. */
|
|
60
|
+
scanRoster?: boolean;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Adjacent Session migration metadata declared on disk. The catalog generator
|
|
64
|
+
* discovers only packages/session/session-format-vN-to-vN+1, not external plugins.
|
|
65
|
+
*/
|
|
66
|
+
export interface DshSessionFormatMigrationManifest {
|
|
67
|
+
/** Non-negative safe integer source version; negative zero is rejected. */
|
|
68
|
+
from: number;
|
|
69
|
+
/** Non-negative safe integer target version, exactly from + 1. */
|
|
70
|
+
to: number;
|
|
71
|
+
/** Non-empty package export path, such as `.` or `./migration`. */
|
|
72
|
+
export: string;
|
|
73
|
+
/** Non-empty named export of the migration implementation. */
|
|
74
|
+
migration: string;
|
|
75
|
+
/** Non-empty named export of the source version codec. */
|
|
76
|
+
sourceCodec: string;
|
|
77
|
+
/** Non-empty named export of the target version codec. */
|
|
78
|
+
targetCodec: string;
|
|
79
|
+
/** Non-empty named export of the target header validator. */
|
|
80
|
+
targetHeaderValidator: string;
|
|
81
|
+
/** Non-empty named export of the target version restorer. */
|
|
82
|
+
targetRestorer: string;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Metadata generated and read by the launcher's module fallback proxies.
|
|
86
|
+
* @internal
|
|
87
|
+
*/
|
|
88
|
+
export interface DshModuleFallbackManifest {
|
|
89
|
+
/** Package export subpaths mapped to resolved target file URLs. */
|
|
90
|
+
targets: Record<string, string>;
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=types.d.ts.map
|
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@deepseek-ai/dsh-package-manifest",
|
|
3
|
+
"description": "Shared type declarations for package.json.dsh configuration fields",
|
|
4
|
+
"version": "0.1.3-alpha.2",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/deepseek-ai/deepseek-harness.git",
|
|
11
|
+
"directory": "packages/util/package-manifest"
|
|
12
|
+
},
|
|
13
|
+
"type": "module",
|
|
14
|
+
"main": "lib/index.js",
|
|
15
|
+
"types": "lib/types/index.d.ts",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./lib/types/index.d.ts",
|
|
19
|
+
"default": "./lib/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./src/*": "./src/*",
|
|
22
|
+
"./package.json": "./package.json"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"lib/index.js",
|
|
26
|
+
"lib/types/**/*.d.ts"
|
|
27
|
+
],
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"peerDependencies": {
|
|
30
|
+
"@deepseek-ai/cordis": "^4.0.2"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@deepseek-ai/cordis": "^4.0.2"
|
|
34
|
+
}
|
|
35
|
+
}
|