dsh-work-fish 0.1.1 → 0.2.0

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 (35) hide show
  1. package/README.md +42 -4
  2. package/THIRD-PARTY-NOTICES.md +1 -1
  3. package/cordis.patch.yml +1 -1
  4. package/{core → lib/core}/approve.mjs +1 -1
  5. package/{core → lib/core}/bootstrap.mjs +5 -4
  6. package/{core → lib/core}/guard.mjs +7 -7
  7. package/{tools → lib/tools}/lib/persona.mjs +2 -2
  8. package/{tools → lib/tools}/wf-rule.mjs +2 -2
  9. package/{tools → lib/tools}/wf-spec.mjs +2 -2
  10. package/package.json +10 -12
  11. package/rules/file-rules.md +2 -2
  12. package/skills/task-setup/SKILL.md +1 -1
  13. package/template/AGENTS.template.md +1 -1
  14. /package/{board → lib/board}/client.js +0 -0
  15. /package/{core → lib/core}/approve-paths.mjs +0 -0
  16. /package/{core → lib/core}/approve-paths.test.mjs +0 -0
  17. /package/{core → lib/core}/events.mjs +0 -0
  18. /package/{core → lib/core}/index.mjs +0 -0
  19. /package/{core → lib/core}/parse.mjs +0 -0
  20. /package/{core → lib/core}/persona.mjs +0 -0
  21. /package/{core → lib/core}/report.mjs +0 -0
  22. /package/{core → lib/core}/skills.mjs +0 -0
  23. /package/{tools → lib/tools}/lib/paths.mjs +0 -0
  24. /package/{tools → lib/tools}/lib/taskboard.mjs +0 -0
  25. /package/{tools → lib/tools}/wf-audit.cmd +0 -0
  26. /package/{tools → lib/tools}/wf-audit.ps1 +0 -0
  27. /package/{tools → lib/tools}/wf-mem.mjs +0 -0
  28. /package/{tools → lib/tools}/wf-metrics.mjs +0 -0
  29. /package/{tools → lib/tools}/wf-persona.mjs +0 -0
  30. /package/{tools → lib/tools}/wf-pool.mjs +0 -0
  31. /package/{tools → lib/tools}/wf-preview.mjs +0 -0
  32. /package/{tools → lib/tools}/wf-recent.mjs +0 -0
  33. /package/{tools → lib/tools}/wf-review.mjs +0 -0
  34. /package/{tools → lib/tools}/wf-snapshot.mjs +0 -0
  35. /package/{tools → lib/tools}/wf-task.mjs +0 -0
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Work Fish(大肥鱼)
1
+ # Work Fish (dsh-work-fish)
2
2
 
3
3
  A standing work assistant for DeepSeek Harness: it takes an assignment, breaks it down, executes, delivers, and keeps its own task board and memory.
4
4
 
@@ -69,9 +69,47 @@ Sandbox escalation asks you every time a call reaches outside the session worksp
69
69
  - DeepSeek Harness 0.2.x
70
70
  - Node.js 22 or newer (the runtime bundled with DSH is enough)
71
71
 
72
- ## Licence
73
72
 
74
- MIT — see [`LICENSE`](LICENSE) for this package's own code. Four skills under `skills/`
73
+ ---
74
+
75
+ ## 中文说明 · 大肥鱼
76
+
77
+ > 常驻在 DeepSeek Harness 里的工作助手。接单、拆解、执行、交付,并自行维护任务板、记忆与规则。
78
+
79
+ > **非官方插件**:第三方作品,与 DeepSeek 官方无关,也未获其背书或授权。
80
+
81
+ 你说一句需求,它先把它变成一份可验收的任务卡,再动手;做完的事留在任务板上,交付物留在 `out/` 里。
82
+ 它不靠记忆里的印象推进工作,靠的是板上的记录和盘上的文件。
83
+
84
+ ## 为什么是它
85
+
86
+ - **模糊需求也接得住**。一句「帮我搞一下 XX」,先写清任务、验收标准、边界和截止,再开工,而不是先猜。
87
+ - **每件事都有账**。任务板一行一件,写验收、下一步、截止;谁在等谁、什么要到期,一眼可查。
88
+ - **做过的判断会沉淀**。重复出现的取舍被记成规则和偏好,下次不必重新交代。
89
+
90
+ ## 能做什么
91
+
92
+ | 场景 | 你可以说 | 它会做 |
93
+ |---|---|---|
94
+ | 说不清的需求 | 帮我搞一下 XX | 先出任务卡,确认验收标准后开工 |
95
+ | 改代码 | 给 XX 加个 YY | 读代码 → 最多问两个问题 → 给两三个方案 → 你点头才改 → 评审后交付 |
96
+ | 提交改动 | 把这几个改动提交了 | 先要授权,过四项检查,按仓库既有格式写消息 |
97
+ | 删东西 | 把 XX 清理掉 | 删除前定级信息损失,留证据,再动手 |
98
+ | 写文档 | 把这整理成一份说明 | 按文档骨架与内容规则产出,落到 `out/` |
99
+ | 长期跟进 | 这个项目你跟着,每周给我进展 | 记成任务板上的长线行,按期推进 |
100
+ | 定规矩 | 以后汇报都用表格 | 记成偏好,不改配置 |
101
+ | 本机出视频 | 在这台机器上生成一段 H3 视频 | 先测硬件,缺什么装什么,跑到出片为止 |
102
+
103
+ 任务面板从会话头部的「🐋 任务」按钮打开。
104
+
105
+ ---
106
+
107
+ ## Licence / 许可
108
+
109
+ MIT — see [LICENSE](LICENSE) for this package's own code. Four skills under `skills/`
75
110
  (`code-review`, `code-simplifier`, `feature-dev`, `frontend-design`) are Apache-2.0 works by
76
111
  Anthropic; their sources, versions, upstream commits and licence files are recorded in
77
- [`THIRD-PARTY-NOTICES.md`](THIRD-PARTY-NOTICES.md).
112
+ [THIRD-PARTY-NOTICES.md](THIRD-PARTY-NOTICES.md).
113
+
114
+ 本包自身的代码以 MIT 发布;`skills/` 下四个 skill 为 Anthropic 的 Apache-2.0 作品,来源与许可见
115
+ [THIRD-PARTY-NOTICES.md](THIRD-PARTY-NOTICES.md)。
@@ -1,6 +1,6 @@
1
1
  # Third-party notices
2
2
 
3
- This package's own code — `core/`, `board/`, `tools/`, `rules/`, `template/`, and the six skills
3
+ This package's own code — `lib/core/`, `lib/board/`, `lib/tools/`, `rules/`, `template/`, and the six skills under `skills/`
4
4
  that carry no licence file of their own — is released under the MIT licence in [`LICENSE`](LICENSE).
5
5
 
6
6
  Four skills under `skills/` are Apache-2.0 works by Anthropic, redistributed here. Their licence
package/cordis.patch.yml CHANGED
@@ -3,7 +3,7 @@
3
3
  # Three rows are inserted:
4
4
  # 1. `preset-work-fish` — @deepseek-ai/dsh-agent-preset declaration; mounts the
5
5
  # persona / tools / skills only in sessions that select this preset;
6
- # 2. `work-fish-host` — the ledger host (`core/index.mjs`), a global row:
6
+ # 2. `work-fish-host` — the ledger host (`lib/core/index.mjs`), a global row:
7
7
  # installing this bundle seeds the workbench and serves `/wf/*` regardless of
8
8
  # the selected preset. The browser half (task panel) is served from the same
9
9
  # package through `package.json` → `dsh.client`.
@@ -40,7 +40,7 @@ import { fileURLToPath } from 'node:url'
40
40
  import { bundleRoots, inspect, trustedRoots } from './approve-paths.mjs'
41
41
  import { resolveWorkHome } from '../tools/lib/paths.mjs'
42
42
 
43
- /** Absolute path of this package's directory (`app/`), the bundle's own root. */
43
+ /** Absolute path of this package's directory (`lib/`), the bundle's own root. */
44
44
  const PACKAGE_DIR = dirname(dirname(fileURLToPath(import.meta.url)))
45
45
 
46
46
  /** Plugin name used by the loader / Cordis row. */
@@ -22,9 +22,10 @@ import path from 'node:path'
22
22
  import { fileURLToPath } from 'node:url'
23
23
  import { parseSkillFile } from './skills.mjs'
24
24
 
25
- const HERE = path.dirname(fileURLToPath(import.meta.url)) // <pkg>/core
26
- /** `<pkg>`. The skeletons live beside the code, so a packed tarball carries them. */
27
- const PKG_ROOT = path.resolve(HERE, '..')
25
+ const HERE = path.dirname(fileURLToPath(import.meta.url)) // <pkg>/lib/core
26
+ /** `<pkg>`: code sits in `lib/`, skills/rules/template beside it at the package root. */
27
+ const PKG_ROOT = path.resolve(HERE, '..', '..')
28
+ const LIB_DIR = path.join(PKG_ROOT, 'lib')
28
29
  const SKILLS_DIR = path.join(PKG_ROOT, 'skills')
29
30
 
30
31
  /** Skeleton revision; bump when a new release adds required files. */
@@ -164,7 +165,7 @@ export function bootstrap(homeDir, env = process.env) {
164
165
  const indexTemplate = path.join(PKG_ROOT, 'template', 'rules-index.md')
165
166
  if (fs.existsSync(indexTemplate)) {
166
167
  const rulesDir = path.join(PKG_ROOT, 'rules').split(path.sep).join('/')
167
- const toolsDir = path.join(PKG_ROOT, 'tools').split(path.sep).join('/')
168
+ const toolsDir = path.join(LIB_DIR, 'tools').split(path.sep).join('/')
168
169
  const index = fs.readFileSync(indexTemplate, 'utf8').replace(/\{\{(\w+)\}\}/g, (placeholder, name) => {
169
170
  // One pass, so text inserted for one placeholder is never re-scanned and
170
171
  // a skill description that mentions {{TOOLS_DIR}} stays literal.
@@ -29,29 +29,29 @@ export const inject = ['tools']
29
29
  const GUARDED = new Set(['write', 'edit', 'apply_patch'])
30
30
 
31
31
  /** Where the rule-write tool lives, for the refusal text. */
32
- const WF_RULE = 'node app/tools/wf-rule.mjs'
32
+ const WF_RULE = 'node lib/tools/wf-rule.mjs'
33
33
 
34
34
  /** First match wins: which tool owns a protected path. */
35
35
  const OWNERS = [
36
36
  {
37
37
  test: (p) => p === 'persona.md' || p === 'persona.full.md',
38
38
  tool: 'wf-persona',
39
- how: 'node app/tools/wf-persona.mjs',
39
+ how: 'node lib/tools/wf-persona.mjs',
40
40
  },
41
41
  {
42
42
  test: (p) => p.startsWith('tasks/') || p.startsWith('board/'),
43
43
  tool: 'wf-task',
44
- how: 'node app/tools/wf-task.mjs',
44
+ how: 'node lib/tools/wf-task.mjs',
45
45
  },
46
46
  {
47
47
  test: (p) => p === 'memory/pool/experience.md',
48
48
  tool: 'wf-pool',
49
- how: 'node app/tools/wf-pool.mjs',
49
+ how: 'node lib/tools/wf-pool.mjs',
50
50
  },
51
51
  {
52
52
  test: (p) => p.startsWith('memory/'),
53
53
  tool: 'wf-mem',
54
- how: 'node app/tools/wf-mem.mjs',
54
+ how: 'node lib/tools/wf-mem.mjs',
55
55
  },
56
56
  {
57
57
  test: (p) => p === 'rules/INDEX.md',
@@ -65,11 +65,11 @@ const OWNERS = [
65
65
  },
66
66
  ]
67
67
 
68
- /** The package root: app/core → package root. Rules there ship with the plugin. */
68
+ /** The package root: lib/core → package root. Rules there ship with the plugin. */
69
69
  function pluginRoot() {
70
70
  const override = process.env.WF_PLUGIN_ROOT
71
71
  if (override && override.trim()) return resolve(override)
72
- return resolve(dirname(fileURLToPath(import.meta.url)), '..')
72
+ return resolve(dirname(fileURLToPath(import.meta.url)), '..', '..')
73
73
  }
74
74
 
75
75
  /**
@@ -27,8 +27,8 @@ import { fileURLToPath } from 'node:url'
27
27
  import { resolveWorkHome } from './paths.mjs'
28
28
 
29
29
  const HERE = path.dirname(fileURLToPath(import.meta.url))
30
- /** `<pkg>/tools/lib` → `<pkg>` (holds `template/`). */
31
- const SOURCE_ROOT = path.resolve(HERE, '..', '..')
30
+ /** `<pkg>/lib/tools/lib` → `<pkg>` (holds `template/`). */
31
+ const SOURCE_ROOT = path.resolve(HERE, '..', '..', '..')
32
32
 
33
33
  /** Hard ceiling for either mode, in UTF-8 bytes. */
34
34
  export const LIMIT_BYTES = 32 * 1024
@@ -52,11 +52,11 @@ function workHome() {
52
52
  return join(dshHome, 'work-fish')
53
53
  }
54
54
 
55
- /** Package root, derived from this file: app/tools → package root. */
55
+ /** Package root, derived from this file: lib/tools → package root. */
56
56
  function pluginRoot() {
57
57
  const override = process.env.WF_PLUGIN_ROOT
58
58
  if (override && override.trim()) return resolve(override)
59
- const root = resolve(dirname(fileURLToPath(import.meta.url)), '..')
59
+ const root = resolve(dirname(fileURLToPath(import.meta.url)), '..', '..')
60
60
  if (root.includes('app.asar')) fail(1, `插件包是只读副本,规则写不进去:${root}`)
61
61
  return root
62
62
  }
@@ -594,9 +594,9 @@ function checkSpec() {
594
594
  // ── 引用完整性(--refs)────────────────────────────────────────────────────
595
595
  // 说明性文件里引用的路径如果指不到东西,就是配置漂移:改名、删文件之后没跟上的地方。
596
596
 
597
- /** The plugin package root (`app/`), one level above `app/tools/`. */
597
+ /** The package root, two levels above `lib/tools/`; it holds `rules/`, `template/` and `lib/`. */
598
598
  function pluginRoot() {
599
- return resolve(dirname(fileURLToPath(import.meta.url)), '..')
599
+ return resolve(dirname(fileURLToPath(import.meta.url)), '..', '..')
600
600
  }
601
601
 
602
602
  // 只查带目录的引用:裸文件名通常是「泛指某类文件」,不是可解析的路径。
package/package.json CHANGED
@@ -1,27 +1,25 @@
1
1
  {
2
2
  "name": "dsh-work-fish",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "license": "MIT",
5
5
  "description": "Unofficial Work Fish plugin for DeepSeek Harness: task setup, task board tracking and delivery, with a floating task panel. Not affiliated with DeepSeek.",
6
6
  "type": "module",
7
- "main": "./core/index.mjs",
7
+ "main": "./lib/core/index.mjs",
8
8
  "exports": {
9
- ".": "./core/index.mjs",
10
- "./board": "./board/client.js",
11
- "./core/guard": "./core/guard.mjs",
12
- "./core/approve": "./core/approve.mjs",
13
- "./core/persona": "./core/persona.mjs",
14
- "./core/skills": "./core/skills.mjs",
15
- "./client": "./board/client.js",
9
+ ".": "./lib/core/index.mjs",
10
+ "./board": "./lib/board/client.js",
11
+ "./client": "./lib/board/client.js",
12
+ "./core/guard": "./lib/core/guard.mjs",
13
+ "./core/approve": "./lib/core/approve.mjs",
14
+ "./core/persona": "./lib/core/persona.mjs",
15
+ "./core/skills": "./lib/core/skills.mjs",
16
16
  "./locale/*.json": "./locale/*.json",
17
17
  "./icon": "./icon.png",
18
18
  "./package.json": "./package.json"
19
19
  },
20
20
  "files": [
21
- "board/**",
22
- "core/**",
21
+ "lib/**",
23
22
  "skills/**",
24
- "tools/**",
25
23
  "rules/**",
26
24
  "template/**",
27
25
  "locale/*.json",
@@ -18,7 +18,7 @@
18
18
  | Output | `out/` | Deliverables handed to the user | Drafts, scratch files |
19
19
  | Archive | `archive/` | Finished or voided task documents | Live work |
20
20
 
21
- Inside the package (read-only for the user): `board/` (browser half, the task panel), `core/` (host half, routes and seeding), `skills/` (methods), `tools/` (CLI), `rules/` and `template/` (copied to the workbench on first run).
21
+ Inside the package (read-only for the user): code lives under `lib/` — `lib/board/` (browser half, the task panel), `lib/core/` (host half, routes and seeding), `lib/tools/` (CLI); `skills/` (methods), `rules/` and `template/` sit at the package root, the latter two copied to the workbench on first run.
22
22
 
23
23
  ## 2. Admission and placement test (ask in order)
24
24
 
@@ -86,7 +86,7 @@ memory/projects/<code>/{profile.md, state.md, journal/, sources/}
86
86
  | Kind | Pattern | Example |
87
87
  |---|---|---|
88
88
  | CLI | `<tools>/wf-<action>.mjs` | `wf-task.mjs`, `wf-spec.mjs` |
89
- | Library | `tools/lib/<object>.mjs` | `taskboard.mjs`, `paths.mjs` |
89
+ | Library | `lib/tools/lib/<object>.mjs` | `taskboard.mjs`, `paths.mjs` |
90
90
  | Skill | `skills/<domain>-<action>/SKILL.md` | `task-setup`, `git-flow` |
91
91
  | Rule file | `rules/<object>-rules.md` | `task-rules.md` |
92
92
 
@@ -83,7 +83,7 @@ node <tools>/wf-task.mjs brief # summary firs
83
83
  node <tools>/wf-task.mjs decide --kind amend --task T-... --expect-rev 3 --relation 协作
84
84
  ```
85
85
 
86
- - `<tools>` is the absolute path printed in `rules/INDEX.md`: the workbench has no `tools/` directory, so a bare `tools/wf-task.mjs` resolves to nothing.
86
+ - `<tools>` is the absolute path printed in `rules/INDEX.md`: the workbench has no `tools/` directory, so a bare `lib/tools/wf-task.mjs` resolves to nothing.
87
87
  - Continue only on `ACC`. `STALE` means the board moved — re-read it and decide again. `MISSING` means the id is wrong.
88
88
  - `new` needs no expectRev but must state a relation.
89
89
  - Quick tasks never open a row; only accepted and standing work gets this far.
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Root: `WF_HOME` or `$DSH_HOME/work-fish`; every path absolute.
4
4
  > Your own rules go to `rules/user-rules.md` and `rules/projects/<code>.md` (tool `wf-rule`); layout and token budget are in `rules/INDEX.md`.
5
- > `<tools>` = the plugin package's `tools/`; the absolute path is in `rules/INDEX.md`.
5
+ > `<tools>` = the plugin package's `lib/tools/`; the absolute path is in `rules/INDEX.md`.
6
6
 
7
7
  ## Start-up
8
8
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes