Skip to content

Commit 8c678e1

Browse files
package调整
1 parent 1936ff6 commit 8c678e1

6 files changed

Lines changed: 17 additions & 14 deletions

File tree

‎.agents/skills/dsh-plugin-release/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ grep -R -n -E '@your-scope/dsh-plugin-template|plugin-template|Plugin Authors|li
2828

2929
Review every match. Also reject template-only `src/README.md` in a completed plugin repository; it belongs only in `plugin-template`. This template does not permit repository-relative `link:`, `file:`, repository-external source, or repository-external project-reference paths. Registry packages and runtime host peers are package dependencies, not filesystem inputs; every consumer must resolve the ready-made build from the repository's own manifest and lockfile.
3030

31-
Confirm the explicitly selected package name, version, description, license, repository metadata, Node engine, package manager, Cordis plugin id, invariant package name, bundle rows, README examples, and lockfile all describe the same package. The package name may be scoped or unscoped; compare the exact name rather than requiring the template's `@scope/dsh-` prefix.
31+
Confirm the explicitly selected package name, version, description, keywords, license, repository metadata, Node engine, package manager, Cordis plugin id, invariant package name, bundle rows, README examples, and lockfile all describe the same package. The package name may be scoped or unscoped; compare the exact name rather than requiring the template's `@scope/dsh-` prefix.
3232

3333
If `pnpm-workspace.yaml` declares `patchedDependencies`, verify every project-root patch path exists under `patches/`, targets the exact installed version, has a documented reason, and is available during a clean install. A DSH host patch under `patches/` must be a self-contained diff with a documented pinned host snapshot, regenerated and applied through `scripts/extract-patch.mjs` and `scripts/patch.sh` (configured in `patches/host-patch.config.json`), and must not appear in the published package's `files`. If no dependency or DSH-host patch is declared or planned, do not require `patches/` or patch-only scripts; their absence is the expected state.
3434

‎.agents/skills/dsh-plugin-scaffold/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Preserve the pinned Node, pnpm, Cordis, TypeScript, Vitest, and tsdown ranges fr
3636

3737
Update identity deliberately in these owners:
3838

39-
- `package.json`: `name`, `description`, optional repository metadata, exports/files, and `private` according to the distribution plan;
39+
- `package.json`: `name`, `description`, `keywords`, `license`, optional repository metadata, exports/files, and `private` according to the distribution plan;
4040
- `src/index.ts`: module name, exported `name`, and Loader-facing exports;
4141
- the source, configuration, invariant, contract, and focused test owners named by the target package;
4242
- `tsconfig*.json`, `tsdown*.ts`, and `scripts/*` when present: local compiler, bundle, declaration, generated-asset, and artifact-contract topology;

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ The template's sample skeleton still uses `src/index.ts`, `src/config.ts`, `src/
5656

5757
1. Replace package identity in `package.json`, the Loader owner, configuration/runtime/invariant owners, focused test owners, bundle metadata, TypeScript metadata, `README.md`, and `AGENTS.md` as applicable. The sample skeleton names these owners explicitly; a deliberate replacement must update the package's local documentation and static-analysis configuration too.
5858
2. Choose and record the exact npm package name before replacing identity. It may be scoped or unscoped (for example, `comem`); do not assume the template's `@your-scope/dsh-` prefix. Use the selected name verbatim in `package.json`, bundle rows, invariant registration, exports, tests, and documentation. Replace the template package name `@your-scope/dsh-plugin-template` and plugin ids only in those identity owners. Do not perform a global replacement inside `.agents/skills/`; its generic examples and marker checks must remain reusable.
59-
3. Update `description`, `LICENSE`, and `cordis.patch.yml`.
59+
3. Update `description`, `keywords`, `LICENSE`, and `cordis.patch.yml`.
6060
4. Add only the DSH host services used by the implementation to the package contract and composition patch. Keep source and build dependencies resolvable from this repository's `node_modules`; host-provided runtime APIs remain consumer-supplied peers.
6161
5. Replace the empty invariant installer when the package owns an authoritative event or mutable data relationship.
6262
6. Implement activation and host-boundary behavior in the actual runtime/service owners, moving cohesive capabilities into project-specific modules as needed. Keep `src/index.ts` limited to Loader metadata and public re-exports when that matches the package, and scope registrations through `ctx.effect()`, `ctx.on()`, or registry disposers.
@@ -93,7 +93,7 @@ pnpm test
9393
pnpm run build
9494
```
9595

96-
`lint` runs Oxlint with type-aware analysis and denies warnings for the configured source and test projects. `build` runs the configured source-to-artifact pipeline, including any declaration assembly or final artifact verifier owned by the package, and emits ready-to-pack output; it does not run an install-time lifecycle build.
96+
`lint` runs Oxlint with type-aware analysis and denies warnings for the configured source and test projects. `build` runs the configured source-to-artifact pipeline, including any declaration assembly or final artifact verifier owned by the package, and emits ready-to-pack output; it does not run an install-time lifecycle build. Extra arguments are passed through to tsdown, so `pnpm run build --sourcemap` emits source maps for local debugging; the default `build` emits none.
9797

9898
The release artifact is built from the configured source owners before packing. Profile or consumer installation uses the ready-made `lib/` output and does not run `prepare`; `pnpm pack --dry-run --json` verifies the final archive contents.
9999

‎README.zh.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Turtle UI 的 chat、components、extension 目录描述的是那个产品,不
6464

6565
1. 在 `package.json`、`src/index.ts`、`src/config.ts`、`src/runtime.ts`、`src/invariant.ts`、`tests/plugin.spec.ts`、`cordis.patch.yml`、TypeScript 包元数据、`README.md` 与 `AGENTS.md` 中替换包身份。
6666
2. 在替换身份前先明确完整的 npm 包名。包名可以是 scoped 或 unscoped(例如 `comem`),不要默认继承模板的 `@your-scope/dsh-` 前缀。将选定包名原样用于 `package.json`、bundle 行、invariant 注册、exports、测试和文档。只在上述身份属主中替换模板包名 `@your-scope/dsh-plugin-template` 和插件 id。不要对 `.agents/skills/` 做全局替换;它的通用示例与标记检查必须保持可复用。
67-
3. 更新 `description`、`LICENSE` 与 `cordis.patch.yml`。
67+
3. 更新 `description`、`keywords`、`LICENSE` 与 `cordis.patch.yml`。
6868
4. 只把实现用到的 DSH 宿主服务加入包契约与组合补丁。源码和构建依赖必须能从本仓库的 `node_modules` 解析。
6969
5. 当包拥有权威事件或可变数据关系时,替换空的 invariant installer。
7070
6. 在 `src/runtime.ts` 实现激活与宿主边界行为,按需把内聚能力移入项目专属的 `src/<feature>/` 目录。保持 `src/index.ts` 只含 Loader 元数据与公共 re-export,并通过 `ctx.effect()`、`ctx.on()` 或 registry disposer 限定注册范围。
@@ -101,7 +101,7 @@ pnpm test
101101
pnpm run build
102102
```
103103

104-
`pnpm install` 只解析本包声明的依赖。`lint` 使用启用类型感知分析的 Oxlint 并拒绝警告,检查配置的源码与测试工程。`build` 直接从 `src/` 编译 host entry,向 `lib/` 输出可直接打包的运行时 JavaScript 与声明,不运行安装期 lifecycle build。
104+
`pnpm install` 只解析本包声明的依赖。`lint` 使用启用类型感知分析的 Oxlint 并拒绝警告,检查配置的源码与测试工程。`build` 直接从 `src/` 编译 host entry,向 `lib/` 输出可直接打包的运行时 JavaScript 与声明,不运行安装期 lifecycle build。额外参数会透传给 tsdown,因此本地调试可用 `pnpm run build --sourcemap` 产出 source map;默认 `build` 不产 map。
105105

106106
release 产物在打包前从 `src/` 构建。profile 或 consumer 安装消费现成的 `lib/` 输出,不运行 `prepare`;使用 `pnpm pack --dry-run --json` 检查最终归档内容。
107107

‎package.json‎

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
{
22
"name": "@your-scope/dsh-plugin-template",
33
"description": "Standalone Cordis plugin template for DeepSeek Harness",
4+
"keywords": [
5+
"cordis",
6+
"cordis-plugin",
7+
"deepseek-harness",
8+
"dsh",
9+
"dsh-plugin",
10+
"plugin-template"
11+
],
412
"license": "BSD-3-Clause",
513
"publishConfig": {
614
"access": "public"
@@ -15,10 +23,7 @@
1523
"#src/*": "./src/*.ts"
1624
},
1725
"files": [
18-
"lib/**/*.js",
19-
"lib/**/*.js.map",
20-
"lib/**/*.d.ts",
21-
"lib/**/*.d.ts.map",
26+
"lib",
2227
"cordis.patch.yml",
2328
"README.md"
2429
],
@@ -33,8 +38,8 @@
3338
},
3439
"./package.json": "./package.json"
3540
},
36-
"main": "lib/index.js",
37-
"types": "lib/index.d.ts",
41+
"main": "./lib/index.js",
42+
"types": "./lib/index.d.ts",
3843
"dsh": {
3944
"bundle": {
4045
"patch": "./cordis.patch.yml"

‎tsconfig.json‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
"target": "ES2024",
55
"module": "ESNext",
66
"moduleResolution": "bundler",
7-
"declaration": true,
87
"sourceMap": true,
9-
"declarationMap": true,
108
"skipLibCheck": true,
119
"esModuleInterop": true,
1210
"allowImportingTsExtensions": true,

0 commit comments

Comments
 (0)