@huanlin/dsh-plugin-sleep 0.1.1 → 0.1.3

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 (3) hide show
  1. package/README.md +10 -4
  2. package/lib/index.d.ts +1 -1
  3. package/package.json +23 -14
package/README.md CHANGED
@@ -1,18 +1,24 @@
1
+ <p align="center">
2
+ <a href="https://dshfind.com/zh/plugins/huanlinoto/dsh-plugin-sleep"><img src="https://dshfind.com/api/card/huanlinoto/dsh-plugin-sleep?lang=zh" alt="dsh-plugin-sleep card"></a>
3
+ </p>
4
+
1
5
  # dsh-sleep
2
6
 
7
+ [![npm version](https://img.shields.io/npm/v/@huanlin/dsh-plugin-sleep)](https://www.npmjs.com/package/@huanlin/dsh-plugin-sleep)
8
+
3
9
  DSH 插件:向模型暴露一个 `sleep` 工具,让模型按指定毫秒数暂停执行后再返回。适合等待时间相关条件成立(服务重启、debounce 窗口、retry backoff)且没有事件型工具可用的场景。
4
10
 
5
11
  ## 安装
6
12
 
7
13
  ```sh
8
- # 从 git 安装(推荐):
9
- dsh plugin --profile <profile> add github:huanlinoto/dsh-plugin-sleep
14
+ # 从 npm 安装(推荐):
15
+ dsh plugin --profile web add @huanlin/dsh-plugin-sleep
10
16
 
11
17
  # 从本地 checkout 开发安装:
12
- dsh plugin --profile <profile> add link:D:\Projects\deepseek-harness\dsh-sleep
18
+ dsh plugin --profile web add link:D:\Projects\deepseek-harness\dsh-sleep
13
19
  ```
14
20
 
15
- 预构建策略:`lib/` 入库,无 `prepare` 脚本,`github:` 安装开箱即用,无需 `allowBuilds`。
21
+ 预构建策略:`lib/` 入库,无 `prepare` 脚本,npm 安装开箱即用,无需 `allowBuilds`。
16
22
 
17
23
  ## 配置
18
24
 
package/lib/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import z from "schemastery";
2
- import { Context } from "cordis";
2
+ import { Context } from "@deepseek-ai/cordis";
3
3
  //#region src/tools.d.ts
4
4
  interface ResolvedConfig {
5
5
  maxDurationMs: number;
package/package.json CHANGED
@@ -1,10 +1,12 @@
1
1
  {
2
2
  "name": "@huanlin/dsh-plugin-sleep",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "keywords": ["dsh-plugin"],
7
+ "keywords": [
8
+ "dsh-plugin"
9
+ ],
8
10
  "description": "DSH plugin exposing a single `sleep` tool that lets the model pause for a configurable number of milliseconds, honoring cancellation.",
9
11
  "type": "module",
10
12
  "license": "AGPL-3.0",
@@ -26,25 +28,26 @@
26
28
  "patch": "./cordis.patch.yml"
27
29
  }
28
30
  },
29
- "scripts": {
30
- "typecheck": "tsc -p tsconfig.json --noEmit",
31
- "test": "vitest run",
32
- "test:watch": "vitest",
33
- "build": "tsc -p tsconfig.json && tsdown -c tsdown.config.ts"
34
- },
35
31
  "dependencies": {
36
32
  "schemastery": "^3.18.0"
37
33
  },
38
34
  "peerDependencies": {
39
- "@deepseek-ai/dsh-tools": "^0.0.1-rc.1",
40
- "cordis": "^4.0.0-rc.7"
35
+ "@deepseek-ai/cordis": "^4.0.1",
36
+ "@deepseek-ai/dsh-tools": "^0.1.2-rc.1",
37
+ "@deepseek-ai/dsh-llm": "^0.1.2-rc.1"
41
38
  },
42
39
  "peerDependenciesMeta": {
43
- "@deepseek-ai/dsh-tools": { "optional": true },
44
- "cordis": { "optional": true }
40
+ "@deepseek-ai/cordis": {
41
+ "optional": true
42
+ },
43
+ "@deepseek-ai/dsh-tools": {
44
+ "optional": true
45
+ },
46
+ "@deepseek-ai/dsh-llm": {
47
+ "optional": true
48
+ }
45
49
  },
46
50
  "devDependencies": {
47
- "@deepseek-ai/dsh-tools": "^0.0.1-rc.1",
48
51
  "@types/node": "^22.20.0",
49
52
  "tsdown": "^0.22.2",
50
53
  "typescript": "^5.9.0",
@@ -52,5 +55,11 @@
52
55
  },
53
56
  "engines": {
54
57
  "node": ">=18.0.0"
58
+ },
59
+ "scripts": {
60
+ "typecheck": "tsc -p tsconfig.json --noEmit",
61
+ "test": "vitest run",
62
+ "test:watch": "vitest",
63
+ "build": "tsc -p tsconfig.json && tsdown -c tsdown.config.ts"
55
64
  }
56
- }
65
+ }