@lolkda/dsh-prompt-manager 3.0.1 → 3.0.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.
Files changed (2) hide show
  1. package/README.md +13 -0
  2. package/package.json +2 -1
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # dsh-prompt-manager
2
2
 
3
+ [![ci](https://github.com/lolkda/dsh-prompt-manager/actions/workflows/ci.yml/badge.svg)](https://github.com/lolkda/dsh-prompt-manager/actions/workflows/ci.yml)
4
+
3
5
  把提示词作为 **system prompt section** 注入 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(DSH),并在 Web GUI 的 **设置 → 提示词** 里管理它们:开关、排序、新增、删除、改正文(markdown)。
4
6
 
5
7
  正文里可以引用 `{{变量}}`。变量来自三类:插件注册的机器事实、挂载时跑的探测命令、你自己写的脚本(打印一个 JSON 对象,键就是变量名)。
@@ -338,8 +340,19 @@ npm run build # src/*.ts -> lib/*.js + lib/types/*.d.ts,并检查 clien
338
340
  npm run typecheck # tsc --noEmit
339
341
  npm test # 先构建,再跑十二个测试(test/*.mjs,各自文件头有说明)
340
342
  npm run check:build # 核对 lib/ 没有未提交的改动(提交前跑)
343
+ npm run check:pack # 核对 npm 会打包的内容里有 bundle patch、浏览器半边、构建产物
344
+ ```
345
+
346
+ **发布由 tag 触发**。`.github/workflows/ci.yml` 在每次 push / PR 上跑构建、测试、`check:build`、`check:pack`(ubuntu + windows 两个平台);`.github/workflows/release.yml` 只在 `v*` tag 上发布 —— 先校验 tag 与 `package.json` 版本一致,再跑同一套门禁,然后 `npm publish --provenance --access public` 并开一个 GitHub Release。发一版就三行:
347
+
348
+ ```bash
349
+ npm version patch --no-git-tag-version # 或手改 package.json
350
+ git add -A && git commit -m "chore: 3.0.2"
351
+ git tag v3.0.2 && git push origin main --follow-tags
341
352
  ```
342
353
 
354
+ 认证走 npm 的 **Trusted Publisher(OIDC)**,仓库里不放任何 npm token —— npm 正在淘汰"绕过 2FA、长期有效"的发布 token,而 OIDC 换来的凭证只活这一次运行,并顺带生成 provenance(包页面上会标出它是从哪个 commit 的哪次运行构建的)。首次要在 npm 包页 Settings → Trusted Publisher 里填 `lolkda` / `dsh-prompt-manager` / `release.yml`。
355
+
343
356
  `lib/` 与 `client/` 都提交进仓库,所以克隆下来就能按相对路径挂载,不需要工具链 —— 这正是 `check:build` 存在的原因:**`lib/` 与 `src/` 必须同一个提交**,否则挂载的是一份和源码对不上的代码(多出一个 `lib/foo.js` 而没 `git add` 时尤其隐蔽,挂载会直接 `ERR_MODULE_NOT_FOUND`)。改完源码:`npm run build && npm test && npm run check:build && git add -A && git commit`。
344
357
 
345
358
  清单里**没有生命周期脚本**(`prepare` 换成了 `prepublishOnly`):`npm install` 不构建、git 安装也不构建,因为 `lib/`/`client/` 就是构建产物;`prepublishOnly` 只在 `npm publish` 时构建一次。这不是洁癖 —— pnpm 12 会拒绝执行 git 依赖的构建脚本(`ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED`),留着 `prepare` 等于让每个用 `dsh plugin add github:…` 装的人都撞一次墙。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lolkda/dsh-prompt-manager",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "description": "Manage DeepSeek Harness system-prompt sections from the Web GUI: enable, edit, and subscribe markdown prompt entries, switch named presets from the composer, feed them machine facts as {{variables}}, and carry a preset to another machine as a JSON pack.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -25,6 +25,7 @@
25
25
  "build": "tsc -p tsconfig.json && node --check client/client.js",
26
26
  "typecheck": "tsc -p tsconfig.json --noEmit",
27
27
  "check:build": "npm run build && node tools/check-build.mjs",
28
+ "check:pack": "node tools/check-pack.mjs",
28
29
  "prepublishOnly": "npm run build",
29
30
  "pretest": "npm run build",
30
31
  "test": "node test/smoke.mjs && node test/probe.mjs && node test/guard.mjs && node test/store.mjs && node test/pack.mjs && node test/routes.mjs && node test/source.mjs && node test/net.mjs && node test/sync.mjs && node test/subscriptions.mjs && node test/scripts.mjs && node test/client.mjs"