From ce7ceb6071a600b91dff6b6d72c16080afeea370 Mon Sep 17 00:00:00 2001 From: Yichen Jiang Date: Thu, 10 Sep 2026 13:38:36 +0800 Subject: [PATCH] refactor(manifest): remove discovery categories --- .../architecture/2026-09-10-public-package-manifest.i18n.yaml | 4 ++-- .../architecture/2026-09-10-public-package-manifest.md | 2 +- .../architecture/2026-09-10-public-package-manifest.zh.md | 2 +- packages/util/package-manifest/README.i18n.yaml | 4 ++-- packages/util/package-manifest/README.md | 4 +--- packages/util/package-manifest/README.zh.md | 4 +--- packages/util/package-manifest/src/types.ts | 2 -- 7 files changed, 8 insertions(+), 14 deletions(-) diff --git a/.agents/notes/implemented/architecture/2026-09-10-public-package-manifest.i18n.yaml b/.agents/notes/implemented/architecture/2026-09-10-public-package-manifest.i18n.yaml index 2dbaeb2625..8c5140bfb7 100644 --- a/.agents/notes/implemented/architecture/2026-09-10-public-package-manifest.i18n.yaml +++ b/.agents/notes/implemented/architecture/2026-09-10-public-package-manifest.i18n.yaml @@ -2,5 +2,5 @@ # side as of the last confirmed-consistent state. Both languages carry equal authority; # after editing either side, bring the other along and re-record with: # pnpm run verify-translation-pairing --write .agents/notes/implemented/architecture/2026-09-10-public-package-manifest.md -2026-09-10-public-package-manifest.md: 222cdb58af580678136f269b60aa8271024dc8ca -2026-09-10-public-package-manifest.zh.md: c3659586f340dfb5bcfbbd0cc8266772207e63de +2026-09-10-public-package-manifest.md: 0e6c1650a6b04e98aeba1aa6ef45df78e3f2cb44 +2026-09-10-public-package-manifest.zh.md: 9b7d15f479ca1aab7bea655b2dee43625728a442 diff --git a/.agents/notes/implemented/architecture/2026-09-10-public-package-manifest.md b/.agents/notes/implemented/architecture/2026-09-10-public-package-manifest.md index 222cdb58af..0e6c1650a6 100644 --- a/.agents/notes/implemented/architecture/2026-09-10-public-package-manifest.md +++ b/.agents/notes/implemented/architecture/2026-09-10-public-package-manifest.md @@ -12,7 +12,7 @@ Plugin authors need npm identity, runtime requirements, and DSH declarations fro [`DshPackageManifest`](../../../../packages/util/package-manifest/src/types.ts) describes the package.json fields DSH uses, with required `name` and `version`. Its optional `dsh` member uses `DshManifest` for public composition and author metadata. The type is a selected npm field set, not a complete package.json schema. App-boot adapts it with `Partial` for local profiles, which need no published identity. -Runtime requirements live at top-level `engines`: `dsh`, `node`, and `npm` are optional version strings, and other engine names are allowed. `dsh.manifestVersion` identifies declaration format `1`; `dsh.categories` carries free-form discovery tags without restricting package composition. Format and DSH compatibility declarations are not enforced by current installers or loaders. +Runtime requirements live at top-level `engines`: `dsh`, `node`, and `npm` are optional version strings, and other engine names are allowed. `dsh.manifestVersion` identifies declaration format `1`. Format and DSH compatibility declarations are not enforced by current installers or loaders. The image packer owns `configTrees`, the workspace catalog generator owns Session migration declarations, and app-boot owns generated module-fallback metadata. Their existing on-disk keys remain readable by those internal tools, but the public manifest types do not expose them. This scope refines the [shared declaration ownership decision](2026-09-05-package-manifest-types.md), whose package placement and dependency rules remain active. diff --git a/.agents/notes/implemented/architecture/2026-09-10-public-package-manifest.zh.md b/.agents/notes/implemented/architecture/2026-09-10-public-package-manifest.zh.md index c3659586f3..9b7d15f479 100644 --- a/.agents/notes/implemented/architecture/2026-09-10-public-package-manifest.zh.md +++ b/.agents/notes/implemented/architecture/2026-09-10-public-package-manifest.zh.md @@ -12,7 +12,7 @@ Status: implemented [`DshPackageManifest`](../../../../packages/util/package-manifest/src/types.ts) 描述 DSH 使用的 package.json 字段,其中 `name` 和 `version` 必填。其可选的 `dsh` 成员使用 `DshManifest` 描述公共组合与作者元数据。该类型只选取所需 npm 字段,不是完整的 package.json schema(模式)。App-boot 通过 `Partial` 适配无需发布身份的本地 profile。 -运行时要求位于顶层 `engines`:`dsh`、`node` 和 `npm` 均为可选版本字符串,也允许其他 engine 名称。`dsh.manifestVersion` 标识声明格式 `1`;`dsh.categories` 承载自由发现标签,不限制包的组合。当前安装器和加载器不强制检查格式与 DSH 兼容性声明。 +运行时要求位于顶层 `engines`:`dsh`、`node` 和 `npm` 均为可选版本字符串,也允许其他 engine 名称。`dsh.manifestVersion` 标识声明格式 `1`。当前安装器和加载器不强制检查格式与 DSH 兼容性声明。 镜像打包器拥有 `configTrees`,工作区目录生成器拥有 Session 迁移声明,app-boot 拥有生成的模块后备元数据。这些内部工具仍可读取既有磁盘字段,但公共 manifest 类型不暴露这些字段。此范围细化了[共享声明归属决策](2026-09-05-package-manifest-types.zh.md),后者的包位置与依赖规则仍然有效。 diff --git a/packages/util/package-manifest/README.i18n.yaml b/packages/util/package-manifest/README.i18n.yaml index e97a7af7ae..0a57d9a493 100644 --- a/packages/util/package-manifest/README.i18n.yaml +++ b/packages/util/package-manifest/README.i18n.yaml @@ -2,5 +2,5 @@ # side as of the last confirmed-consistent state. Both languages carry equal authority; # after editing either side, bring the other along and re-record with: # pnpm run verify-translation-pairing --write packages/util/package-manifest/README.md -README.md: e68426f667532267f947f94215d363862e6ea17d -README.zh.md: bad2f65e0b01ff5b1517b9195fafb01e30b50872 +README.md: 36e25a7bee7ce6cc31133e0c815c0dc607c58de7 +README.zh.md: d46ae346c2a654a0bfbfb4e7e7b2ba317f85a762 diff --git a/packages/util/package-manifest/README.md b/packages/util/package-manifest/README.md index e68426f667..36e25a7bee 100644 --- a/packages/util/package-manifest/README.md +++ b/packages/util/package-manifest/README.md @@ -37,7 +37,6 @@ const manifest: DshPackageManifest = { engines: { node: '>=24', dsh: '0.1.5-alpha.1' }, dsh: { manifestVersion: 1, - categories: ['skills', 'tools'], bundle: { patch: './cordis.patch.yml' }, client, }, @@ -46,12 +45,11 @@ const manifest: DshPackageManifest = { `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` 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. -The following metadata fields are optional. Omitting them leaves the format version, tags, or compatible host versions undeclared; readers do not infer defaults. +The following metadata fields are optional. Omitting them leaves the format version or compatible host versions undeclared; readers do not infer defaults. | Field | Meaning | |---|---| | `dsh.manifestVersion` | Manifest format identifier; the declared format is `1`, independent of the npm package version and Session format version. | -| `dsh.categories` | Free-form discovery tags such as `skills` and `tools`, with no fixed taxonomy or effect on plugin loading. | | `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`. | 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. diff --git a/packages/util/package-manifest/README.zh.md b/packages/util/package-manifest/README.zh.md index bad2f65e0b..d46ae346c2 100644 --- a/packages/util/package-manifest/README.zh.md +++ b/packages/util/package-manifest/README.zh.md @@ -37,7 +37,6 @@ const manifest: DshPackageManifest = { engines: { node: '>=24', dsh: '0.1.5-alpha.1' }, dsh: { manifestVersion: 1, - categories: ['skills', 'tools'], bundle: { patch: './cordis.patch.yml' }, client, }, @@ -46,12 +45,11 @@ const manifest: DshPackageManifest = { `DshPackageManifest` 描述 DSH 使用的 package.json 字段,其中 `name` 和 `version` 必填;它不是完整的 npm schema(模式)。本地 profile 读取方使用 `Partial`,因为 profile 无需发布版本。`DshManifest` 仅描述 `dsh` 下的公共作者字段。TypeScript 检查示例并删除 `import type`;这些接口不解析 JSON,也不写入文件。 -以下元数据字段均可选。省略时,格式版本、标签或兼容的宿主版本保持未声明状态;读取方不推断默认值。 +以下元数据字段均可选。省略时,格式版本或兼容的宿主版本保持未声明状态;读取方不推断默认值。 | 字段 | 含义 | |---|---| | `dsh.manifestVersion` | manifest(元数据清单)格式标识;声明的格式为 `1`,独立于 npm 包版本和 Session 格式版本。 | -| `dsh.categories` | `skills`、`tools` 等自由发现标签,无固定分类体系,不影响插件加载。 | | `engines.dsh` | 作者声明的兼容 DSH 版本,使用 SemVer 范围,也可填写精确的预发布版本。此字段与 `engines.node`、`engines.npm` 并列;engines 对象可省略 `dsh`。 | 公共组合声明定义在 [`src/types.ts`](src/types.ts) 中。内部 `configTrees`、`sessionFormatMigration` 和生成的 `moduleFallback` 元数据分别由镜像打包器、目录生成器和启动器读取方拥有;公共类型不暴露这些字段。 diff --git a/packages/util/package-manifest/src/types.ts b/packages/util/package-manifest/src/types.ts index c034feb274..f0f727647a 100644 --- a/packages/util/package-manifest/src/types.ts +++ b/packages/util/package-manifest/src/types.ts @@ -28,8 +28,6 @@ export interface DshPackageManifest { export interface DshManifest { /** Manifest format version, independent of the npm package and Session format versions. */ manifestVersion?: 1 - /** Free-form discovery tags, such as `skills` or `tools`; do not affect plugin loading. */ - categories?: string[] /** Bundle metadata consumed by the profile launcher. */ bundle?: DshBundleManifest /** Profile metadata consumed by the profile launcher. */