dsh-plugin-infj-pet 1.0.1 → 1.0.4

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/ASSETS-LICENSE.md CHANGED
@@ -8,9 +8,13 @@ The sources, prompts and quality reports are kept in `Sage/`; `Sage/README.md`
8
8
  records the pet's stable id and provenance.
9
9
 
10
10
  `assets/sage.png` is the sprite sheet, copied unmodified from
11
- `Sage/final/spritesheet-extended.png` (SHA-256
12
- `58deaf03132eee98634d101661682c1faf45906186bea30e7aa0f951f32631d1`, as recorded
13
- in `Sage/pet-record.json`). Everything else in `assets/` is derived from it:
11
+ `Sage/updates/reading/final/spritesheet-reading.png` (SHA-256
12
+ `c62020fa4b634d037e72d9fbad270494e96622603978431c3f7fdadde4a3ecdb`). It is the
13
+ original sheet with one revision: row 4, the engine's `jumping` slot, was redrawn
14
+ as the sage standing with an open book. A pixel comparison confirms the other ten
15
+ rows are byte-identical to the original.
16
+
17
+ Everything else in `assets/` is derived from it:
14
18
 
15
19
  | File | Derived how |
16
20
  |---|---|
@@ -18,12 +22,21 @@ in `Sage/pet-record.json`). Everything else in `assets/` is derived from it:
18
22
  | `sage.png.b64` | the same bytes, base64, for embedding in the bundle |
19
23
  | `icon.png` | head crop of the resting frame, 3× nearest-neighbour |
20
24
  | `preview.png` | one frame per animation, on a flat backdrop |
25
+ | `provenance/` | the sheet's validation report, change audit and generation notes |
21
26
 
22
27
  **The artwork is not covered by the MIT code license.** It is released under
23
28
  [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/): share and
24
29
  adapt it for non-commercial use with attribution, under the same license.
25
30
  Commercial use needs the copyright holder's permission.
26
31
 
32
+ ## Quoted text
33
+
34
+ Some reading lines are short quotations from **史铁生 (Shi Tiesheng)**, each
35
+ attributed in the interface under the line it belongs to. They are brief,
36
+ individually attributed, and used in a non-commercial companion; the project
37
+ claims no rights in them, and no passage is reproduced beyond those short lines.
38
+ See the quotation table in the README for the exact lines and their sources.
39
+
27
40
  Attribution form:
28
41
 
29
42
  > Sage artwork — dsh-plugin-infj-pet — CC BY-NC-SA 4.0
package/CHANGELOG.md CHANGED
@@ -3,55 +3,125 @@
3
3
  All notable changes to this plugin are documented here. This project follows
4
4
  [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5
5
 
6
- ## Unreleased
7
-
8
- **Artwork replaced**
9
-
10
- - The character is now **Sage**, the pixel-art INFJ pet produced with the
11
- built-in image generator (`Sage/`). The hand-drawn SVG sage is gone.
12
- - Nine animations and sixteen head poses come from one 1536×2288 sprite sheet,
13
- embedded in the bundle so the plugin makes no network request at all.
6
+ ## 1.0.4
7
+
8
+ **Fix: the plugin never activated**
9
+
10
+ `1.0.3` shipped a Host half that could not start. In Cordis an `inject` entry
11
+ names a service the plugin waits for, and the entry stays pending until that name
12
+ is provided — an object form does not mean "optional". The Host half declared
13
+ `{ optional: ['agents'] }`, which asks for a service literally called `optional`.
14
+ Nothing provides it, so the entry stayed pending forever and the whole plugin,
15
+ browser half included, never loaded. DSH reported it as:
16
+
17
+ ```
18
+ 1 entry did not activate infj-pet (dsh-plugin-infj-pet):
19
+ pending (waiting for service: optional)
20
+ ```
21
+
22
+ The `inject` declaration is gone. The optional agents registry is read with
23
+ `ctx.get('agents')` instead, which returns `undefined` when it is absent and
24
+ costs only the coarse `isSubagent` hint on a recorded boundary.
25
+
26
+ Guards added so this cannot come back:
27
+
28
+ - a test asserts `inject` is `undefined`, with the reason in the failure path
29
+ - a test asserts the Host half still activates and records a boundary when no
30
+ agents registry is present
31
+ - the fake Cordis context no longer needs `agents`, because the plugin must not
32
+ ask for it
33
+
34
+ **A note on why this was missed.** Forty-six of the forty-seven tests exercised
35
+ the browser half, which was never the part failing. The Host half was tested
36
+ against a fake context — and a fake context does not enforce the `inject` gate,
37
+ because that gate is framework behaviour. A complete stub hid a framework-level
38
+ failure; the new assertions target exactly that blind spot.
39
+
40
+ ## 1.0.3
41
+
42
+ **The sage no longer paces about**
43
+
44
+ - Working is a reading now. While any session is busy the sage sits with its open
45
+ book and turns the pages; it does not switch to a walking loop after a while,
46
+ and the twenty-second timer that used to trigger one is gone from the machine
47
+ entirely.
48
+ - Running belongs to being carried. Drag the sage and it runs in the direction
49
+ you take it, facing left or right, and it turns around at the screen edge so it
50
+ never appears to run out of the window it is pinned to. Letting go stops it at
51
+ once.
52
+ - `run-left` finally has a job: it is the inward-facing run when the sage is
53
+ pinned against a wall.
54
+
55
+ **Drag robustness**
56
+
57
+ Six bugs surfaced in the drag path while testing this, all of them fixed:
58
+
59
+ - A drag origin that came back `null` from an unmeasured node poisoned every
60
+ distance after it; the origin is now validated and latched from the first real
61
+ position.
62
+ - The drag anchor did not advance, so a reversal was measured from the original
63
+ grab and could not be expressed until the pointer returned past it.
64
+ - The screen-edge turnaround tested the clamped result instead of the requested
65
+ distance, so pulling away from a wall flipped the facing the wrong way.
66
+ - A pointer press now clears a stale facing, and letting go always stops the run.
67
+
68
+ ## 1.0.2
69
+
70
+ **The reading revision**
71
+
72
+ - The leap is gone. When a watched turn finishes, the sage now sits down with an
73
+ open book: steady stance, eye movement, a short blink and a page turn. The
74
+ `celebrating` state is renamed `reading` throughout — the state, its timing
75
+ setting and its internal flag — because that is what actually happens now.
76
+ - The animation is a sheet revision, not new code: row 4, the engine's `jumping`
77
+ slot, was redrawn. A pixel comparison in the build verifies the other ten rows
78
+ are unchanged, and the new sheet's SHA-256 is checked against the value
79
+ recorded in its change audit.
80
+
81
+ **Quoted lines**
82
+
83
+ - Reading lines are now quotations, attributed in the interface beneath the text
84
+ they belong to, in a smaller and quieter line. A quoted line is never
85
+ presented as the sage's own.
86
+ - Only lines that could be checked against a published source are presented as
87
+ quotations; one supplied line is recorded as unpublished rather than silently
88
+ attributed. See the quotation table in the README.
89
+ - The bubble grew a source row and the stylesheet a quoted-line variant, so a
90
+ longer line wraps left-aligned instead of sitting centred like a quip.
91
+
92
+ ## 1.0.1
93
+
94
+ First published release. `1.0.0` was consumed by npm's staged-publish pipeline —
95
+ the upload was accepted but never finalised, and the registry then refused to
96
+ reuse the version — so the release moved to 1.0.1 with no code change.
97
+
98
+ **Artwork**
99
+
100
+ - The character is **Sage**, a pixel-art INFJ pet generated with the built-in
101
+ image generator. One 1536×2288 sprite sheet, an 8×11 grid of 192×208 cells:
102
+ nine animations and sixteen head poses, embedded in the bundle so the plugin
103
+ makes no network request at all.
14
104
  - The sheet's SHA-256 is checked against the value recorded in its validation
15
105
  report, so the plugin cannot ship artwork that differs from what was validated.
16
106
 
17
- **New behaviour**
107
+ **Behaviour**
18
108
 
19
109
  - **Keeps pace** — after twenty seconds of uninterrupted work the sage switches
20
- from thinking to a walking loop, then celebrates or slumps when the run ends.
110
+ from thinking to a walking loop, then leaps or slumps when the run ends.
21
111
  - **Idle glances** — while resting, it looks around using the drawn head poses.
22
- - Display sizes are now exact integer multiples of the sprite pixels (1×, 2×, 3×),
23
- which is what keeps pixel art crisp; the old fractional sizes are gone.
24
-
25
- **Build**
26
-
27
- - `lib/client.js` is generated from readable regions in `lib/src/`, so gaps
28
- between source and bundle show up in review rather than in a diff of a 2 MB
29
- file.
30
- - `tools/png.mjs` decodes the sheet without any dependency, and the broken
31
- `--sprite` build path was removed.
32
- - `npm run check` now verifies the sheet hash, the frame boundaries, the gaze
33
- coverage, the generated icon, and that the bundle matches its sources.
34
- - `npm run build` regenerates the index, icon, contact sheet, bundle and offline
35
- preview in one pass.
36
-
37
- ## 1.0.0
38
-
39
- First release of the plugin.
40
-
41
- **The companion**
42
-
43
112
  - Six semantic states — 静观 resting, 洞察 working, 共情 waiting, 笃定
44
113
  celebrating, 充电 sleeping, 受挫 error — each mapped to one facet of the INFJ
45
114
  description on the reference card.
46
- - Per-pose animation, disabled by `prefers-reduced-motion` or by the motion
47
- setting.
115
+ - Display sizes are exact integer multiples of the sprite pixels (1×, 2×, 3×),
116
+ which is what keeps pixel art crisp.
117
+ - Animation follows `prefers-reduced-motion` and the motion setting.
48
118
 
49
119
  **Interaction**
50
120
 
51
121
  - Click to hear a line in character; drag to reposition with edge snapping and a
52
122
  remembered position.
53
- - Right-click settings: session scope, size, nap delay, palette, motion,
54
- auto-tips, reset position, tuck away, and a trait explainer.
123
+ - Right-click settings: session scope, size, nap delay, palette, motion, idle
124
+ glances, auto-tips, reset position, tuck away, and a trait explainer.
55
125
  - Bilingual (English / 简体中文), following the DSH language until you choose one.
56
126
  - Tuck away collapses the sage to a corner restore button.
57
127
 
@@ -67,4 +137,11 @@ First release of the plugin.
67
137
 
68
138
  - Zero runtime dependencies; the client bundle is committed, so a Git install
69
139
  needs no build step.
70
- - Structural checks and a behavioural test suite ship with the package.
140
+ - 19 files, 3.4 MB packed, 4.0 MB unpacked. `lib/src/` and `assets/sage.png.b64`
141
+ are build inputs and stay out of the tarball; the bundle already embeds the
142
+ sheet.
143
+ - `prepublishOnly` runs the structural checks and the test suite, so a broken
144
+ build cannot be published.
145
+ - `lib/client.js` is generated from readable regions in `lib/src/`, and both the
146
+ checker and the test suite rebuild it, so the shipped bundle can never drift
147
+ from its sources.
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  **A pixel-art INFJ companion that lives inside your DeepSeek Harness window.**
4
4
 
5
+ **Just here to accompany Qiangwei.**
6
+
5
7
  一只住在 DSH 窗口里的 INFJ 贤者:陪你专注、等你决定,也陪你安静地打个盹。
6
8
 
7
9
  <p align="center">
@@ -9,7 +11,7 @@
9
11
  </p>
10
12
 
11
13
  <p align="center">
12
- <img src="assets/preview.png" width="820" alt="Every animation: idle, run-right, run-left, wave, jump, failed, waiting, working, pondering">
14
+ <img src="assets/preview.png" width="820" alt="Every animation: idle, run-right, run-left, wave, reading, failed, waiting, working, pondering">
13
15
  </p>
14
16
 
15
17
  The sage is not a progress bar. It reads what your agents are already doing —
@@ -18,6 +20,9 @@ character. Six semantic states, drawn from a nine-animation sprite sheet where
18
20
  each pose expresses a different facet of the INFJ description on the reference
19
21
  card.
20
22
 
23
+ While you work it sits and reads, turning its pages. It only runs when you pick
24
+ it up.
25
+
21
26
  ---
22
27
 
23
28
  ## What it does
@@ -25,41 +30,64 @@ card.
25
30
  | Pose | When it appears | Trait it expresses |
26
31
  |---|---|---|
27
32
  | 静观 Observing | Nothing is running | 独处即充电 — recharged alone |
28
- | 洞察 Insight | At least one session is working | 先看模式,再看任务 — patterns before tasks |
29
- | 陪伴 Keeping pace | Work has run for 20s without a break | 理想主义的续航 — idealist stamina |
33
+ | 阅读 Reading | At least one session is working, or a watched turn just finished | 先看模式,再看任务 — patterns before tasks |
30
34
  | 共情 Empathy | A session is waiting on your answer | 先接住情绪 — feelings first |
31
- | 笃定 Resolve | A turn the sage watched just finished | 低调地笃定 — quiet conviction |
32
35
  | 充电 Recharging | Idle past the nap delay | 独处即充电 — the quiet half |
33
36
  | 受挫 Setback | A turn ended in an error | 过载时向内自责 — overload turns inward |
37
+ | 带我去哪儿 Carried | While you are dragging it | 理想主义的续航 — carried, not chasing |
34
38
 
35
39
  Around that core:
36
40
 
37
41
  - **Click** the sage and it says something in character.
38
42
  - **Drag** it anywhere; it snaps to the edge and remembers where you left it.
43
+ - **It reads while you work** — an open book, eyes following the page, a quiet
44
+ page turn. It never paces about on its own.
45
+ - **It runs only when carried** — pick it up and it runs in the direction you
46
+ take it, turning around at the screen edge so it never looks like it is
47
+ running out of the window.
39
48
  - **Right-click** for settings: session scope, size, nap delay, palette, motion,
40
49
  idle glances, auto-tips, position reset, tuck away, and a trait panel.
41
50
  - **Idle glances** — while resting, the sage looks around using the sheet's
42
51
  sixteen drawn head poses.
43
- - **Keeps pace** — after twenty seconds of uninterrupted work it starts walking,
44
- then celebrates or slumps when the run ends.
45
52
  - Follows DSH's language, light/dark theme, and reduce-motion preference.
46
53
  - No build step to install, no runtime dependencies, no network calls, no model
47
54
  calls.
48
55
 
49
56
  This is an **in-window** companion, not an operating-system desktop overlay.
50
57
 
58
+ ### Words borrowed from 史铁生 (Shi Tiesheng)
59
+
60
+ Several of the reading lines are his, and the sage is careful to say so: a
61
+ quoted line renders its attribution directly under the text, in a smaller line,
62
+ never as if the sage had written it.
63
+
64
+ | Line | Source |
65
+ |---|---|
66
+ | 如果我进来,走进你独处的时间……我只是来给你的窗上装好玻璃,冬天的风就要来了。 | 史铁生 — supplied by the project owner; publication not yet identified |
67
+ | 死是一件不必急于求成的事。 | 史铁生《我与地坛》 |
68
+ | 太阳,他每时每刻都是夕阳也都是旭日。 | 史铁生《我与地坛》 |
69
+ | 我常觉得这中间有着宿命的味道。 | 史铁生《我与地坛》 |
70
+
71
+ Where a line could not be verified against a published source, this project says
72
+ so rather than presenting a guess as a quotation — the first row above is
73
+ recorded as unverified for exactly that reason. Titles are referenced for the
74
+ remaining states; no passage is reproduced beyond the short lines listed here.
75
+
51
76
  ---
52
77
 
53
78
  ## Install
54
79
 
55
80
  ### 1. From npm
56
81
 
57
- ```
82
+ Package page: [dsh-plugin-infj-pet on npm](https://www.npmjs.com/package/dsh-plugin-infj-pet).
83
+
84
+ Enter the package name in DSH's plugin installation page (sidebar → **Plugins**):
85
+
86
+ ```text
58
87
  dsh-plugin-infj-pet
59
88
  ```
60
89
 
61
- Enter that name in DSH's plugin installation page (sidebar → **Plugins**). To
62
- pin this release, use `dsh-plugin-infj-pet@1.0.0`.
90
+ To pin this release, use `dsh-plugin-infj-pet@1.0.1`.
63
91
 
64
92
  ### 2. From GitHub
65
93
 
@@ -70,7 +98,7 @@ github:CN-Mg/dsh_infj_pet
70
98
  Or with a pinned tag:
71
99
 
72
100
  ```
73
- github:CN-Mg/dsh_infj_pet#v1.0.0
101
+ github:CN-Mg/dsh_infj_pet#v1.0.1
74
102
  ```
75
103
 
76
104
  The committed source already contains the built client bundle, so a Git install
@@ -139,8 +167,12 @@ contract:
139
167
  - injected shares: `slots`, `sessions`, `connection`, `locale`
140
168
  - only `react` and `react-dom/client` are required from the platform module table
141
169
 
142
- The Host half declares no required service and registers one optional listener,
143
- so a Host-side change degrades the companion rather than failing the plugin.
170
+ The Host half declares **no `inject`**, on purpose. A Cordis `inject` entry names a
171
+ service the plugin waits for, and the entry stays pending until that service is
172
+ provided — so an `inject` that never resolves stops the whole plugin, browser half
173
+ included, from ever activating. The optional agents registry is read with
174
+ `ctx.get('agents')` instead, which returns `undefined` when it is missing and
175
+ costs only the coarse `isSubagent` hint.
144
176
 
145
177
  DSH is evolving quickly. If a future release changes the slot or store contract,
146
178
  the sage is written to fail quietly: it falls back to a non-reactive pose rather
Binary file
@@ -7,10 +7,11 @@
7
7
  "active_pet_id": "default",
8
8
  "verified_in_pets": true,
9
9
  "spritesheet": "assets/sage.png",
10
- "sha256": "58deaf03132eee98634d101661682c1faf45906186bea30e7aa0f951f32631d1",
10
+ "sha256": "c62020fa4b634d037e72d9fbad270494e96622603978431c3f7fdadde4a3ecdb",
11
11
  "artifact_storage": "local workspace; ChatGPT Library tools unavailable",
12
12
  "generation": "built-in imagegen",
13
13
  "quality_report": "assets/provenance/sage-validation.json",
14
14
  "visual_review": "qa/final-visual-review.json",
15
- "note": "Provenance copy. The full generation workspace (prompts, frames, QA renders) is not published; see assets/provenance/sage-README.md."
15
+ "note": "Provenance copy. The full generation workspace (prompts, frames, QA renders) is not published; see assets/provenance/sage-README.md.",
16
+ "revision": "reading: row 4 (engine slot jumping) redrawn as the sage holding an open book"
16
17
  }
@@ -0,0 +1,11 @@
1
+ # Reading revision
2
+
3
+ User request: "Jumping up looks too clumsy, switch to reading instead."
4
+
5
+ Sage now stands steadily holding an open book, follows its pages with his eyes, blinks and gently turns an attached page. This replaces only the five frames of row 4. All other RGBA pixels are unchanged from the stored pet. Stable ID and active selection preserved.
6
+
7
+ Artwork generated with built-in imagegen using the stored pet spritesheet as an identity reference. Exact production prompt: `prompt.md`.
8
+
9
+ Current sprite sheet: `final/spritesheet-reading.png`. Motion previews and stills: `qa/previews/`. Official pipeline reports, explicit reading semantic override and stored-artwork verification: `qa/`.
10
+
11
+ The stored Pets sprite sheet was fetched after update and verified pixel-identical to the submitted revision. Expiring URLs and temporary upload-session identities were not saved.
@@ -0,0 +1,22 @@
1
+ {
2
+ "changed_row": 4,
3
+ "requested_action": "reading",
4
+ "engine_slot_name": "jumping",
5
+ "required_frame_count": 5,
6
+ "preserved_rows": [
7
+ 0,
8
+ 1,
9
+ 2,
10
+ 3,
11
+ 5,
12
+ 6,
13
+ 7,
14
+ 8,
15
+ 9,
16
+ 10
17
+ ],
18
+ "source_sha256": "3efc8fa70db42c226b3ac1baebd07dc3323f0cf697f6bf503b08552de9654963",
19
+ "final_sha256": "c62020fa4b634d037e72d9fbad270494e96622603978431c3f7fdadde4a3ecdb",
20
+ "semantic_override": "User explicitly requested reading in place of jump; the supported quality CLI minimum lift is zero for this revision. No vertical lift is expected.",
21
+ "all_other_rgba_pixels_unchanged": true
22
+ }
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "ok": true,
3
3
  "file": "assets/sage.png",
4
- "encoded_bytes": 1564801,
5
- "sha256": "58deaf03132eee98634d101661682c1faf45906186bea30e7aa0f951f32631d1",
4
+ "sha256": "c62020fa4b634d037e72d9fbad270494e96622603978431c3f7fdadde4a3ecdb",
6
5
  "format": "PNG",
7
6
  "mode": "RGBA",
8
7
  "columns": 8,
@@ -307,7 +306,7 @@
307
306
  "row": 4,
308
307
  "column": 0,
309
308
  "used": true,
310
- "nontransparent_pixels": 8631,
309
+ "nontransparent_pixels": 8645,
311
310
  "opaque_chroma_key_pixels": 0,
312
311
  "chroma_fringe_pixels": 0
313
312
  },
@@ -316,7 +315,7 @@
316
315
  "row": 4,
317
316
  "column": 1,
318
317
  "used": true,
319
- "nontransparent_pixels": 9126,
318
+ "nontransparent_pixels": 8658,
320
319
  "opaque_chroma_key_pixels": 0,
321
320
  "chroma_fringe_pixels": 0
322
321
  },
@@ -325,7 +324,7 @@
325
324
  "row": 4,
326
325
  "column": 2,
327
326
  "used": true,
328
- "nontransparent_pixels": 8956,
327
+ "nontransparent_pixels": 8840,
329
328
  "opaque_chroma_key_pixels": 0,
330
329
  "chroma_fringe_pixels": 0
331
330
  },
@@ -334,7 +333,7 @@
334
333
  "row": 4,
335
334
  "column": 3,
336
335
  "used": true,
337
- "nontransparent_pixels": 9085,
336
+ "nontransparent_pixels": 8676,
338
337
  "opaque_chroma_key_pixels": 0,
339
338
  "chroma_fringe_pixels": 0
340
339
  },
@@ -343,7 +342,7 @@
343
342
  "row": 4,
344
343
  "column": 4,
345
344
  "used": true,
346
- "nontransparent_pixels": 8558,
345
+ "nontransparent_pixels": 8646,
347
346
  "opaque_chroma_key_pixels": 0,
348
347
  "chroma_fringe_pixels": 0
349
348
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "sheet": "sage.png",
3
- "sha256": "58deaf03132eee98634d101661682c1faf45906186bea30e7aa0f951f32631d1",
3
+ "sha256": "c62020fa4b634d037e72d9fbad270494e96622603978431c3f7fdadde4a3ecdb",
4
4
  "sheetWidth": 1536,
5
5
  "sheetHeight": 2288,
6
6
  "columns": 8,
@@ -11,10 +11,10 @@
11
11
  "width": 192,
12
12
  "height": 208,
13
13
  "art": {
14
- "x": 33,
15
- "y": 6,
16
- "width": 125,
17
- "height": 198
14
+ "x": 37,
15
+ "y": 46,
16
+ "width": 117,
17
+ "height": 158
18
18
  },
19
19
  "ground": 204
20
20
  },
@@ -218,12 +218,12 @@
218
218
  }
219
219
  },
220
220
  {
221
- "state": "jump",
221
+ "state": "reading",
222
222
  "label": {
223
- "zh": "跃起",
224
- "en": "Leaping"
223
+ "zh": "阅读",
224
+ "en": "Reading"
225
225
  },
226
- "fps": 8,
226
+ "fps": 5,
227
227
  "row": 4,
228
228
  "frames": [
229
229
  {
@@ -253,10 +253,10 @@
253
253
  }
254
254
  ],
255
255
  "art": {
256
- "x": 33,
257
- "y": 6,
258
- "width": 125,
259
- "height": 196
256
+ "x": 53,
257
+ "y": 49,
258
+ "width": 86,
259
+ "height": 155
260
260
  }
261
261
  },
262
262
  {
package/assets/sage.png CHANGED
Binary file