dsh-working-activity 0.1.0 → 0.1.1

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/LICENSE ADDED
@@ -0,0 +1,28 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2026, chimney (ccch1mneyyy)
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ 3. Neither the name of the copyright holder nor the names of its
16
+ contributors may be used to endorse or promote products derived from
17
+ this software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/README.md CHANGED
@@ -18,26 +18,37 @@ Two optional sinks, both off by default only when their seam is absent:
18
18
 
19
19
  ## Installation
20
20
 
21
+ The package is a self-mounting bundle: it declares `dsh.bundle.patch`
22
+ (`cordis.patch.yml`), so the official CLI both installs it and appends it to
23
+ the profile's bundle layer stack:
24
+
25
+ ```sh
26
+ dsh plugin --profile <profile> add dsh-working-activity
27
+ ```
28
+
29
+ At boot, app-boot applies the bundle's patch list over the profile root and
30
+ the package inserts its own `working-activity` row — no manual configuration
31
+ required. To tune a value, override the row's config by id in the profile's
32
+ user layer (`$DSH_HOME/profiles/<profile>/cordis.patch.yml`) instead of
33
+ inserting a second same-id row:
34
+
21
35
  ```yaml
22
- # cordis.yml
23
- plugins:
24
- - id: working-activity
25
- name: 'dsh-working-activity'
36
+ - id: working-activity
37
+ config:
38
+ publishIntervalMs: 500
26
39
  ```
27
40
 
28
41
  ## TUI usage
29
42
 
30
- Enable the plugin alongside `dsh-tui` and add the slot to the left prompt template:
43
+ Install the plugin into a profile that composes the official `dsh-tui`, then
44
+ add the `${activity}` slot to the left prompt template in the profile's user
45
+ layer (`$DSH_HOME/profiles/<profile>/cordis.patch.yml`):
31
46
 
32
47
  ```yaml
33
- plugins:
34
- - id: tui
35
- name: '@deepseek-ai/dsh-tui'
36
- config:
37
- theme:
38
- leftPrompt: '${cwd}${git/worktree}${activity}${model}${token_meter/cache_hit_rate}${context}'
39
- - id: working-activity
40
- name: 'dsh-working-activity'
48
+ - id: tui
49
+ config:
50
+ theme:
51
+ leftPrompt: '${cwd}${git/worktree}${activity}${model}${token_meter/cache_hit_rate}${context}'
41
52
  ```
42
53
 
43
54
  While a turn runs, the prompt line shows e.g. `dsh main 跑个命令 npm test · 12s deepseek-chat …`; while thinking, `嗯…让我捋捋 · 总1m23s`; after the turn, `搞定 ✓ · 4 工具 · 想12s 干11s` briefly. Without `${activity}` in the template, the plugin is inert in the TUI (the slot is unregistered values are omitted by the template renderer).
@@ -57,7 +68,7 @@ Both fall back to the previous static label while the plugin is absent, so the W
57
68
  |---|---|---|---|
58
69
  | `phrases` | `boolean` | `true` | Playful copy pool; `false` renders plain functional labels |
59
70
  | `publish` | `boolean` | `true` | Append `activity/status` session events for UI consumers |
60
- | `tickMs` | `number` | `500` | Status render tick interval (50–5000) |
71
+ | `tickMs` | `number` | `500` | Status render tick interval (100–5000) |
61
72
  | `publishIntervalMs` | `number` | `2000` | Minimum interval between published events while the line is stable (500–30000) |
62
73
  | `detailLimit` | `number` | `40` | Max displayed detail length (paths/commands/patterns), 8–120 |
63
74
  | `customActions` | `object` | `{}` | Exact tool-name → action-copy pools, e.g. `{"my_deploy": ["部署一下", "上线中"]}` |
@@ -0,0 +1,19 @@
1
+ # dsh-working-activity bundle patch: mount the plugin itself into the
2
+ # profile composition tree.
3
+ #
4
+ # `dsh plugin --profile <name> add dsh-working-activity` auto-initializes the
5
+ # profile (first layer @deepseek-ai/dsh-base), pnpm-installs this package into
6
+ # the profile, and the CLI's reconcile step appends it to the profile's
7
+ # dsh.profile.bundles because this package.json declares `dsh.bundle.patch`.
8
+ # At boot, app-boot applies every bundle's patch list in bundle order over the
9
+ # empty root; this insert list is what actually mounts the working-activity
10
+ # row — no manual configuration is needed.
11
+ #
12
+ # All row config stays at schema defaults (phrases/publish/tickMs/
13
+ # publishIntervalMs/detailLimit/customActions/narrate). To tune a value (for
14
+ # dsh-cc, set publishIntervalMs to 500), override this row's config by id in
15
+ # the profile's own cordis.patch.yml user layer — do NOT insert a second
16
+ # same-id row.
17
+ - insert:
18
+ - id: working-activity
19
+ name: 'dsh-working-activity'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-working-activity",
3
3
  "description": "Live model working-status line: playful copy, running tool, turn elapsed — for TUI prompt and Web UI",
4
- "version": "0.1.0",
4
+ "version": "0.1.1",
5
5
  "type": "module",
6
6
  "main": "lib/types/index.js",
7
7
  "types": "lib/types/index.d.ts",
@@ -22,12 +22,14 @@
22
22
  "types": "./lib/types/status.d.ts",
23
23
  "default": "./lib/types/status.js"
24
24
  },
25
+ "./cordis.patch.yml": "./cordis.patch.yml",
25
26
  "./src/*": "./src/*",
26
27
  "./package.json": "./package.json"
27
28
  },
28
29
  "files": [
29
30
  "lib",
30
- "src"
31
+ "src",
32
+ "cordis.patch.yml"
31
33
  ],
32
34
  "engines": {
33
35
  "node": "^22.19 || >=24"
@@ -36,6 +38,11 @@
36
38
  "build": "tsc -p tsconfig.json"
37
39
  },
38
40
  "license": "BSD-3-Clause",
41
+ "dsh": {
42
+ "bundle": {
43
+ "patch": "./cordis.patch.yml"
44
+ }
45
+ },
39
46
  "dependencies": {
40
47
  "@deepseek-ai/schemastery": "^3.18.1"
41
48
  },