dsh-jev-decide 0.1.0 → 0.1.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.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # dsh-jev-decide
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/dsh-jev-decide.svg)](https://www.npmjs.com/package/dsh-jev-decide)
4
+ [![license](https://img.shields.io/npm/l/dsh-jev-decide.svg)](./LICENSE)
5
+ [![DSH 插件市场](https://img.shields.io/badge/DSH-插件市场-blue)](https://awesome-dsh-plugin.com/)
6
+
3
7
  把 [TypeSafe Jev](https://docs.typesafe.ai/)("System One" 决策模型)接入 DSH:注册一个 agent 工具 **`jev_decide`**,让 agent 在需要"快而准的判断"时调用 Jev,而不是让对话模型凭感觉猜。
4
8
 
5
9
  ## 为什么不是"再加一个对话模型"
@@ -41,19 +45,31 @@ jev_decide({
41
45
  { "model": "jev-latest", "timeoutMs": 15000, "baseUrl": "https://api.typesafe.ai/v1" }
42
46
  ```
43
47
 
44
- ## 安装/接线
48
+ ## 安装 / 接线
45
49
 
46
- **插件市场(npm 上架后)**:
50
+ **方式一:npm(已上架,[包页](https://www.npmjs.com/package/dsh-jev-decide))**:
47
51
 
48
52
  ```sh
49
53
  dsh plugin --profile web add dsh-jev-decide
54
+ # 或纯 npm 侧安装(npm ≥7 / pnpm auto-install-peers 会自动装 @deepseek-ai/dsh-tools peer)
55
+ npm install dsh-jev-decide
50
56
  ```
51
57
 
52
- **手动接线(本机已完成的步骤)**:
58
+ v0.1.2 起包内自带 `dsh.bundle`(根目录 `cordis.patch.yml`):`dsh plugin add` 会自动把插件装配进 profile,无需手写任何接线;纯 `npm install` 仍只装包不装配。
59
+
60
+ > **v0.1.1 手动接线用户升级注意**:已按方式三手写 insert 的 profile,不要再对它跑 `dsh plugin add`——两处注册同一 id 会报 `duplicate loader entry id`,整份 profile 无法启动;先注释/删除手动条目,再交给 bundle 自动装配。
61
+
62
+ > peer 解析注意:宿主**不会**把捆绑的 `@deepseek-ai/dsh-tools` 注入插件的模块解析链。经 npm/pnpm 安装时 peer 会被自动物化;若以 `link:`/本地路径方式接入插件源码目录,需在插件目录内先跑一次 `npm install` 把 peer 物化(`>=0.1.0-rc.6` 的 semver 预发布匹配只会选到 0.1.0-rc.x 元组,属预期——插件只消费 `defineTool` 一个纯函数,跨宿主版本已实测兼容)。
63
+
64
+ 发版即自动发布:`git tag vX.Y.Z && git push --tags` → GitHub Actions 以 OIDC 免 token 发布(带 [provenance 签名](https://search.sigstore.dev/?logIndex=2890905882)),无需任何长期 npm 凭据。
65
+
66
+ **方式二:插件市场**(收录 PR [#5428](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin/pull/5428) 合并后自动出现在 `awesome-dsh-plugin.com` 与 DSH 内置市场)。
67
+
68
+ **方式三:手动接线**:
53
69
 
54
70
  1. 源码:`~/dsh/plugins/dsh-jev-decide/`
55
71
  2. `~/.dsh/profiles/web/package.json` 依赖:`"dsh-jev-decide": "link:~/dsh/plugins/dsh-jev-decide"`
56
- 3. `~/.dsh/profiles/web/cordis.patch.yml`:`- insert: [- id: dsh-jev-decide, name: dsh-jev-decide]`
72
+ 3. `~/.dsh/profiles/web/cordis.patch.yml` 加一条 insert(内容同仓库根目录 `cordis.patch.yml`):`- insert: [- id: dsh-jev-decide, name: dsh-jev-decide]`
57
73
  4. 因无 shell 无法建 pnpm symlink,`profiles/web/node_modules/dsh-jev-decide/` 放的是实体副本;下次 `pnpm install` 会把它规范成 link,无副作用。
58
74
  5. **生效需重启 DSH**(host 插件在进程启动时装配)。
59
75
 
@@ -0,0 +1,7 @@
1
+ # dsh-jev-decide — DSH bundle patch。
2
+ # `dsh plugin add` 读取 package.json 的 dsh.bundle.patch 应用本文件,
3
+ # 把插件装配进 profile——等价于旧版 README「方式三」里手写的 insert 条目。
4
+ # Host half: 注册 agent 工具 jev_decide(noul/choice/score → 校准概率)。
5
+ - insert:
6
+ - id: dsh-jev-decide
7
+ name: dsh-jev-decide
package/package.json CHANGED
@@ -1,21 +1,30 @@
1
1
  {
2
2
  "name": "dsh-jev-decide",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "DSH 插件:把 TypeSafe Jev(System One 决策模型)注册为 agent 工具 jev_decide。调用 https://api.typesafe.ai/v1/systemone,让 agent 在路由/分级/guardrail 等场景拿到带校准概率的结构化判定(noul/choice/score),而不是让大模型瞎猜。",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "main": "./lib/index.js",
8
8
  "files": [
9
9
  "lib",
10
+ "cordis.patch.yml",
10
11
  "README.md",
11
12
  "LICENSE"
12
13
  ],
13
14
  "publishConfig": {
14
15
  "access": "public"
15
16
  },
17
+ "peerDependencies": {
18
+ "@deepseek-ai/dsh-tools": ">=0.1.0-rc.6"
19
+ },
16
20
  "exports": {
17
21
  ".": "./lib/index.js"
18
22
  },
23
+ "dsh": {
24
+ "bundle": {
25
+ "patch": "./cordis.patch.yml"
26
+ }
27
+ },
19
28
  "keywords": [
20
29
  "dsh-plugin",
21
30
  "deepseek-harness",