@goodandready/dsh-dsml-artifact-guard 0.2.1 โ†’ 0.2.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/CHANGELOG.md ADDED
@@ -0,0 +1,74 @@
1
+ # Changelog
2
+
3
+ All notable changes to the `@goodandready/dsh-dsml-artifact-guard` plugin are documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ---
9
+
10
+ ## [0.2.2] - 2026-09-18
11
+
12
+ ### Fixed
13
+ - **Settings reachable again (`lib/client.js`)**: the settings card registered into `settings.plugin.item`, a slot the current DSH core no longer renders, so the plugin's settings were unreachable. The surface now registers into the Plugins page row seat `plugins.row.config`, keyed `@goodandready/dsh-dsml-artifact-guard#dsh-dsml-artifact-guard`: the plugin's row gains a configure control whose page is the settings form (`view: 'page'`, rendered bare โ€” `PluginCard` accepts `bare` and drops the card wrapper because the host page draws the title, icon, crumb and padding) plus a one-line state under the title (`view: 'summary'`). The legacy seat stays registered as a fallback for older cores ([#31](http://192.168.1.111:3005/goodandready/dsh-dsml-artifact-guard/issues/31)).
14
+ - **Row-seat guard (`test/row-config-seat.test.js`)**: asserts the row key, the seat order (row seat first, legacy seat kept) and the bare page render.
15
+
16
+ ---
17
+
18
+ ## [0.2.1] - 2026-09-18
19
+
20
+ ### Fixed
21
+ - **Theme Semantic Standardization (`lib/client.js`)**: Eliminated all 42 hardcoded hex/rgba color literals in favor of canonical DeepSeek Harness theme CSS custom properties (`--dsw-alias-...`) and `color-mix()` tints, guaranteeing high contrast and legibility across Dark and Light modes ([#26](https://github.com/GooDAnDReaDY/dsh-dsml-artifact-guard/issues/26)).
22
+ - **Theme Regression Test Guard (`test/theme.test.js`)**: Added automated regression test asserting zero hardcoded hex and rgba color literals in client surfaces.
23
+ - **Repository Hygiene**: Fixed `.gitignore` whitespace rule for `AGENTS.md` and untracked `package-lock.json` in alignment with zero-dependency architecture.
24
+
25
+ ---
26
+
27
+ ## [0.2.0] - 2026-09-17
28
+
29
+ ### Added
30
+ - **Native Settings Card (`lib/client.js`)**: Registered UI card in slot `settings.plugin.item` with snapshot status check, configuration inputs, and disabled warning indicator ([#17](https://github.com/GooDAnDReaDY/dsh-dsml-artifact-guard/issues/17)).
31
+ - **One-Click In-Place Updater (`lib/updater.js`)**: Standard HTTP endpoint `/api/dsh-dsml-artifact-guard/update` with SemVer comparison, loopback/same-origin protection, and update execution ([#18](https://github.com/GooDAnDReaDY/dsh-dsml-artifact-guard/issues/18)).
32
+ - **Core Primitive Chevron**: Requested `IconChevronDownOutline14` with SVG fallback.
33
+
34
+ ### Fixed
35
+ - **Package Hygiene**: Deduplicated multilingual READMEs in `docs/` and restricted `package.json#files` allowlist, reducing package size by ~40% ([#20](https://github.com/GooDAnDReaDY/dsh-dsml-artifact-guard/issues/20)).
36
+ - **Repository Cleanliness**: Removed `AGENTS.md` from git tracking ([#19](https://github.com/GooDAnDReaDY/dsh-dsml-artifact-guard/issues/19)) and eliminated legacy `.tgz` archives from source tree ([#21](https://github.com/GooDAnDReaDY/dsh-dsml-artifact-guard/issues/21)).
37
+
38
+ ---
39
+
40
+ ## [0.1.5] - 2026-09-17
41
+
42
+ ### Documentation
43
+ - Fixed Mermaid diagram edge label syntax on GitHub and added standard community support block ([#15](https://github.com/GooDAnDReaDY/dsh-dsml-artifact-guard/issues/15)).
44
+
45
+ ---
46
+
47
+ ## [0.1.4] - 2026-09-12
48
+
49
+ ### Changed
50
+ - Schema `mode` default set to `sanitize` for out-of-the-box protection ([#11](https://github.com/GooDAnDReaDY/dsh-dsml-artifact-guard/issues/11)).
51
+ - Added robust open/close tag balancing in `sanitizeDsmlArtifacts` to handle prior closed blocks in prose ([#11](https://github.com/GooDAnDReaDY/dsh-dsml-artifact-guard/issues/11)).
52
+ - Updated design contract documentation and verified package hygiene ([#11](https://github.com/GooDAnDReaDY/dsh-dsml-artifact-guard/issues/11)).
53
+
54
+ ---
55
+
56
+ ## [0.1.3] - 2026-09-06
57
+
58
+ ### Changed
59
+ - Wrapped `llm/stream` handler in `ctx.effect` for clean lifecycle unmount ([#8](https://github.com/GooDAnDReaDY/dsh-dsml-artifact-guard/issues/8)).
60
+ - Updated `cordis.patch.yml` to use `config: {}`, allowing schema defaults to apply automatically unless overridden ([#9](https://github.com/GooDAnDReaDY/dsh-dsml-artifact-guard/issues/9)).
61
+
62
+ ---
63
+
64
+ ## [0.1.2] - 2026-09-02
65
+
66
+ ### Fixed
67
+ - Packaging and runtime compatibility adjustments for DSH profile loader.
68
+
69
+ ---
70
+
71
+ ## [0.1.1] - 2026-08-30
72
+
73
+ ### Added
74
+ - Initial release: synchronous, fail-open DSML protocol closing tag sanitizer for DeepSeek Harness model streams.
package/README.md CHANGED
@@ -110,6 +110,21 @@ The guard retains a minimal 96-byte window until the next chunk or `finish` even
110
110
  * **`audit`**: Emits diagnostic logs with `ctx.logger.info(...)` without modifying the user-visible stream.
111
111
  * **`disabled`**: Bypasses processing entirely.
112
112
 
113
+ ### 5. Native Web UI Settings Card
114
+ Registered directly in the DeepSeek Harness `settings.plugin.item` slot (`lib/client.js`):
115
+ * **Reactive Configuration**: Adjust `mode`, `providerId`, and `modelId` on the fly without restarting the harness, powered by reactive `scope.watch`.
116
+ * **Snapshot State Awareness**: Gracefully handles snapshot loading, ready, and unavailable states.
117
+ * **Protection Bypass Warning**: Displays a prominent `OFF` badge and warning banner when the guard is set to `disabled`.
118
+
119
+ ### 6. One-Click In-Place Auto-Updater
120
+ A canonical HTTP management route (`/api/dsh-dsml-artifact-guard/update`) mounted via `lib/updater.js`:
121
+ * **SemVer Inspection**: Queries the registry and compares versions with full pre-release support.
122
+ * **Loopback & Same-Origin Protection**: Write mutations (`POST`) are strictly restricted to local loopback connections with valid origin headers.
123
+ * **Clean Invocation**: Executes package updates safely without risky CLI bypass flags.
124
+
125
+ ### 7. Full Dark & Light Theme Compliance
126
+ All client UI styles are strictly tokenized via DeepSeek Harness `--dsw-alias-...` CSS custom properties and `color-mix()` functions with zero hardcoded hex or rgba color literals. High contrast and accessibility are guaranteed in both Dark and Light themes, guarded by automated regression tests (`test/theme.test.js`).
127
+
113
128
  ---
114
129
 
115
130
  ## ๐Ÿ“ฆ Installation
@@ -144,6 +159,13 @@ dsh-dsml-artifact-guard:
144
159
  | `providerId` | `string` | `"opencode-go"` | Target provider identifier exhibiting leaked tags |
145
160
  | `modelId` | `string` | `"deepseek-v4-flash"` | Target model identifier exhibiting leaked tags |
146
161
 
162
+ ### HTTP Management Endpoints
163
+
164
+ | Method | Endpoint | Access | Description |
165
+ |:---|:---|:---|:---|
166
+ | `GET` | `/api/dsh-dsml-artifact-guard/update` | Web UI / Localhost | Retrieves current version, latest registry version, and update status |
167
+ | `POST` | `/api/dsh-dsml-artifact-guard/update` | Loopback & Same-Origin | Triggers in-place package update via DSH CLI |
168
+
147
169
  ---
148
170
 
149
171
  ## ๐Ÿงช Testing
@@ -161,31 +183,6 @@ npm run check
161
183
 
162
184
  MIT ยฉ [GooDAnDReaDY](https://github.com/GooDAnDReaDY)
163
185
 
164
- ## Changed in v0.1.3
165
-
166
- #8: wrap `llm/stream` in `ctx.effect` so unload unsubscribes.
167
- #9: `cordis.patch.yml` uses `config: {}` โ€” schema defaults (`mode: audit`, provider/model ids) apply unless overridden in host config.
168
-
169
- ## Changed in v0.1.4
170
-
171
- #11: schema `mode` default set to `sanitize` for out-of-the-box protection.
172
- #11: robust open/close tag balancing in `sanitizeDsmlArtifacts` to handle prior closed blocks in prose.
173
- #11: repo hygiene with tracked `package-lock.json` and design contract.
174
-
175
- ## Changed in v0.1.5
176
-
177
- #15: fix Mermaid diagram edge label syntax on GitHub and add mandatory repository support block.
178
-
179
- ## Changed in v0.2.0
180
-
181
- - #17: Native DSH Settings Card in slot settings.plugin.item with snapshot status checking, form inputs, and disabled warning indicator.
182
- - #18: One-click plugin updater with endpoint /api/dsh-dsml-artifact-guard/update, semver comparison, and loopback/same-origin protection.
183
- - #19: Sanitized repository from internal AGENTS.md and updated .gitignore.
184
- - #20: Optimized npm package allowlist, eliminating duplicate READMEs and reducing package size by ~40%.
185
- - #21: Removed legacy build archives from source tree.
186
-
187
- ## Changed in v0.2.1
186
+ ---
188
187
 
189
- - #26: Theme tokenization for settings card in `lib/client.js`: eliminated all 42 hardcoded hex/rgba color literals, migrating to canonical `--dsw-alias-...` CSS custom properties and `color-mix()` for flawless Dark and Light mode rendering.
190
- - #26: Added automated theme regression test guard (`test/theme.test.js`).
191
- - #26: Fixed `.gitignore` rule for `AGENTS.md` and untracked `package-lock.json` for pure zero-dependency repository hygiene.
188
+ For a complete release history and version migration notes, see [CHANGELOG.md](CHANGELOG.md).
package/README.ru.md CHANGED
@@ -161,31 +161,6 @@ npm run check
161
161
 
162
162
  MIT ยฉ [GooDAnDReaDY](https://github.com/GooDAnDReaDY)
163
163
 
164
- ## Changed in v0.1.3
165
-
166
- #8: wrap `llm/stream` in `ctx.effect` so unload unsubscribes.
167
- #9: `cordis.patch.yml` uses `config: {}` โ€” schema defaults (`mode: audit`, provider/model ids) apply unless overridden in host config.
168
-
169
- ## ะ˜ะทะผะตะฝะตะฝะธั ะฒ v0.1.4
170
-
171
- #11: ะทะฝะฐั‡ะตะฝะธะต `mode` ะฟะพ ัƒะผะพะปั‡ะฐะฝะธัŽ ะฒ ัั…ะตะผะต ะฟะตั€ะตะฒะตะดะตะฝะพ ะฝะฐ `sanitize` ะดะปั ะทะฐั‰ะธั‚ั‹ ยซะธะท ะบะพั€ะพะฑะบะธยป.
172
- #11: ะฑะฐะปะฐะฝัะธั€ะพะฒะบะฐ ะพั‚ะบั€ั‹ะฒะฐัŽั‰ะธั… ะธ ะทะฐะบั€ั‹ะฒะฐัŽั‰ะธั… ั‚ะตะณะพะฒ ะฒ `sanitizeDsmlArtifacts` ะฟั€ะธ ะฝะฐะปะธั‡ะธะธ ะทะฐะบั€ั‹ั‚ั‹ั… ะฑะปะพะบะพะฒ ะฒ ะฟั€ะพะทะต.
173
- #11: ะณะธะณะธะตะฝะฐ ั€ะตะฟะพะทะธั‚ะพั€ะธั ั ะพั‚ัะปะตะถะธะฒะฐะตะผั‹ะผ `package-lock.json` ะธ ะดะธะทะฐะนะฝ-ะบะพะฝั‚ั€ะฐะบั‚ะพะผ.
174
-
175
- ## ะ˜ะทะผะตะฝะตะฝะธั ะฒ v0.1.5
176
-
177
- #15: ะธัะฟั€ะฐะฒะปะตะฝ ัะธะฝั‚ะฐะบัะธั ัั‚ั€ะตะปะพะบ ะดะธะฐะณั€ะฐะผะผั‹ Mermaid ะฝะฐ GitHub ะธ ะดะพะฑะฐะฒะปะตะฝ ะพะฑัะทะฐั‚ะตะปัŒะฝั‹ะน ะฑะปะพะบ ะฟะพะดะดะตั€ะถะบะธ ั€ะตะฟะพะทะธั‚ะพั€ะธั.
178
-
179
- ## ะ˜ะทะผะตะฝะตะฝะธั ะฒ v0.2.0
180
-
181
- - #17: ะะฐั‚ะธะฒะฝะฐั ะบะฐั€ั‚ะพั‡ะบะฐ ะฝะฐัั‚ั€ะพะตะบ ะฒ ัะปะพั‚ะต settings.plugin.item ัะพ ัั‚ะฐั‚ัƒัะพะผ ัะฝะธะผะบะฐ, ั„ะพั€ะผะพะน ะธ ะฟั€ะตะดัƒะฟั€ะตะถะดะตะฝะธะตะผ ะพะฑ ะพั‚ะบะปัŽั‡ะตะฝะธะธ.
182
- - #18: ะœะพะดัƒะปัŒ ะฐะฒั‚ะพะพะฑะฝะพะฒะปะตะฝะธั ะฒ 1 ะบะปะธะบ ั ัะฝะดะฟะพะธะฝั‚ะพะผ /api/dsh-dsml-artifact-guard/update, ัั€ะฐะฒะฝะตะฝะธะตะผ ะฒะตั€ัะธะน ะธ ะทะฐั‰ะธั‚ะพะน same-origin/loopback.
183
- - #19: ะกะฐะฝะธั‚ะฐะนะทะธะฝะณ ั€ะตะฟะพะทะธั‚ะพั€ะธั ะพั‚ ะฒะฝัƒั‚ั€ะตะฝะฝะตะณะพ AGENTS.md ะธ ะพะฑะฝะพะฒะปะตะฝะธะต .gitignore.
184
- - #20: ะžะฟั‚ะธะผะธะทะฐั†ะธั ัะพัั‚ะฐะฒะฐ npm-ะฟะฐะบะตั‚ะฐ, ัƒะดะฐะปะตะฝะธะต ะดัƒะฑะปะธะบะฐั‚ะพะฒ README ะธ ัะพะบั€ะฐั‰ะตะฝะธะต ั€ะฐะทะผะตั€ะฐ ะฟะฐะบะตั‚ะฐ ะฝะฐ ~40%.
185
- - #21: ะžั‡ะธัั‚ะบะฐ ะดะตั€ะตะฒะฐ ะธัั…ะพะดะฝะธะบะพะฒ ะพั‚ ะฐั€ั…ะธะฒะฝั‹ั… ะฟะฐะบะตั‚ะพะฒ .tgz.
186
-
187
- ## ะ˜ะทะผะตะฝะตะฝะธั ะฒ v0.2.1
164
+ ---
188
165
 
189
- - #26: ะŸะพะปะฝะฐั ั‚ะพะบะตะฝะธะทะฐั†ะธั ั‚ะตะผั‹ ะดะปั ะบะฐั€ั‚ะพั‡ะบะธ ะฝะฐัั‚ั€ะพะตะบ ะฒ `lib/client.js`: ัƒัั‚ั€ะฐะฝะตะฝั‹ ะฒัะต 42 ะฒั…ะพะถะดะตะฝะธั ะทะฐั…ะฐั€ะดะบะพะถะตะฝะฝั‹ั… hex/rgba ั†ะฒะตั‚ะพะฒ ั ะฟะตั€ะตั…ะพะดะพะผ ะฝะฐ ะบะฐะฝะพะฝะธั‡ะตัะบะธะต ะฟะตั€ะตะผะตะฝะฝั‹ะต ัะดั€ะฐ `--dsw-alias-...` ะธ `color-mix()` ะดะปั ะธะดะตะฐะปัŒะฝะพะน ั‡ะธั‚ะฐะตะผะพัั‚ะธ ะฒ ั‚ั‘ะผะฝะพะน ะธ ัะฒะตั‚ะปะพะน ั‚ะตะผะฐั….
190
- - #26: ะ”ะพะฑะฐะฒะปะตะฝ ะฐะฒั‚ะพะผะฐั‚ะธั‡ะตัะบะธะน ั‚ะตัั‚-ัั‚ั€ะฐะถ ัะพะพั‚ะฒะตั‚ัั‚ะฒะธั ั‚ะตะผะต (`test/theme.test.js`).
191
- - #26: ะ˜ัะฟั€ะฐะฒะปะตะฝะพ ะฟั€ะฐะฒะธะปะพ ะธะณะฝะพั€ะธั€ะพะฒะฐะฝะธั `AGENTS.md` ะฒ `.gitignore` ะธ ัะฝัั‚ะพ ะพั‚ัะปะตะถะธะฒะฐะฝะธะต ั `package-lock.json` ะฒ ั€ะฐะผะบะฐั… ัั‚ะฐะฝะดะฐั€ั‚ะฐ ะฝัƒะปะตะฒั‹ั… ะทะฐะฒะธัะธะผะพัั‚ะตะน.
166
+ ะŸะพะปะฝะฐั ะธัั‚ะพั€ะธั ะฒะตั€ัะธะน ะธ ะธะทะผะตะฝะตะฝะธะน ะดะพัั‚ัƒะฟะฝะฐ ะฒ ั„ะฐะนะปะต [CHANGELOG.md](CHANGELOG.md).
package/README.zh.md CHANGED
@@ -161,31 +161,6 @@ npm run check
161
161
 
162
162
  MIT ยฉ [GooDAnDReaDY](https://github.com/GooDAnDReaDY)
163
163
 
164
- ## Changed in v0.1.3
165
-
166
- #8: wrap `llm/stream` in `ctx.effect` so unload unsubscribes.
167
- #9: `cordis.patch.yml` uses `config: {}` โ€” schema defaults (`mode: audit`, provider/model ids) apply unless overridden in host config.
168
-
169
- ## v0.1.4 ๅ˜ๆ›ด่ฏดๆ˜Ž
170
-
171
- #11: ๅฐ† schema ไธญ `mode` ้ป˜่ฎคๅ€ผ่ฎพ็ฝฎไธบ `sanitize`๏ผŒๅฎž็Žฐๅผ€็ฎฑๅณ็”จ็š„ๆธ…็†ไฟๆŠคใ€‚
172
- #11: ๅœจ `sanitizeDsmlArtifacts` ไธญๅฎž็Žฐไธฅๆ ผ็š„ๅผ€้—ญๆ ‡็ญพๆทฑๅบฆๅนณ่กก๏ผŒ็ฒพๅ‡†ๅค„็†ๆญฃๆ–‡ไธญๅทฒ้—ญๅˆๆ ‡็ญพไธŽๆœซๅฐพๆณ„ๆผๆ ‡็ญพใ€‚
173
- #11: ็บณๅ…ฅ `package-lock.json` ่ทŸ่ธชๅนถๅฎŒๅ–„่ฎพ่ฎกๅฅ‘็บฆใ€‚
174
-
175
- ## v0.1.5 ๅ˜ๆ›ด่ฏดๆ˜Ž
176
-
177
- #15: ไฟฎๅค GitHub ไธŠ Mermaid ๆต็จ‹ๅ›พ่พนๆ ‡็ญพ่ฏญๆณ•่งฃๆž้”™่ฏฏ๏ผŒๅนถ่กฅๅ…จๆ ‡ๅ‡†้กน็›ฎๆ”ฏๆŒๅผ•ๅฏผๅŒบใ€‚
178
-
179
- ## v0.2.0 ๆ›ดๆ–ฐๆ—ฅๅฟ—
180
-
181
- - #17: ๅœจ settings.plugin.item ๆ’ๆงฝไธญๆณจๅ†ŒๅŽŸ็”Ÿ่ฎพ็ฝฎๅก็‰‡๏ผŒๆ”ฏๆŒๅฟซ็…ง็Šถๆ€ๆฃ€ๆŸฅไธŽ็ฆ็”จ่ญฆ็คบๆจชๅน…ใ€‚
182
- - #18: ไธ€้”ฎๅœจ็บฟๆ›ดๆ–ฐๆจกๅ—๏ผŒๆไพ› /api/dsh-dsml-artifact-guard/update ็ซฏ็‚นไธŽๅŒๆบ/ๅ›ž็Žฏๅฎ‰ๅ…จๆ ก้ชŒใ€‚
183
- - #19: ๆธ…็†ๅ…ฌๅผ€ไปฃ็ ไป“ๅบ“ไธญ็š„ๅ†…้ƒจ AGENTS.md ่ง„ๅˆ™ๆ–‡ไปถๅนถๆ›ดๆ–ฐ .gitignoreใ€‚
184
- - #20: ไผ˜ๅŒ– npm ๅ‘ๅธƒๅŒ…็™ฝๅๅ•๏ผŒ็งป้™คๅ†—ไฝ™ README ๅ‰ฏๆœฌ๏ผŒๅฎ‰่ฃ…ๅŒ…ไฝ“็งฏ็ผฉๅ‡็บฆ 40%FDใ€‚
185
- - #21: ๆธ…็†ๆบไปฃ็ ็›ฎๅฝ•ไธญ็š„ๆ—ง็‰ˆๆœฌ .tgz ๆ‰“ๅŒ…ๅฝ’ๆกฃใ€‚
186
-
187
- ## v0.2.1 ๆ›ดๆ–ฐๆ—ฅๅฟ—
164
+ ---
188
165
 
189
- - #26๏ผš้…็ฝฎ้ขๆฟๅ…จ้‡ไธป้ข˜่ฏญไน‰ๅŒ–่ง„่Œƒ๏ผˆ`lib/client.js`๏ผ‰๏ผšๅฝปๅบ•ๆธ…้™คๅ…จ้ƒจ 42 ๅค„็กฌ็ผ–็  hex/rgba ้ขœ่‰ฒ๏ผŒๅ…จ้ขๆŽฅๅ…ฅ `--dsw-alias-...` ๆ ธๅฟƒๅ˜้‡ไธŽ `color-mix()`๏ผŒไฟ้šœๆทฑ่‰ฒไธŽๆต…่‰ฒไธป้ข˜ไธ‹็š„ๆž่‡ดๅฏนๆฏ”ๅบฆไธŽๅฏ่ฏปๆ€งใ€‚
190
- - #26๏ผšๆ–ฐๅขžๅ‰็ซฏไธป้ข˜่ง„่Œƒ่‡ชๅŠจๅŒ–ๅ›žๅฝ’้˜ฒๆŠคๆต‹่ฏ•๏ผˆ`test/theme.test.js`๏ผ‰ใ€‚
191
- - #26๏ผšไฟฎๅค `.gitignore` ๅฏน `AGENTS.md` ็š„ๅฟฝ็•ฅๅŒน้…๏ผŒ็งป้™ค `package-lock.json` ่ทŸ่ธชไปฅ่ทต่กŒๆž่‡ด้›ถไพ่ต–ๆ ‡ๅ‡†ใ€‚
166
+ ๅฎŒๆ•ด็‰ˆๆœฌๆผ”่ฟ›ไธŽๆ›ดๆ–ฐ่ฎฐๅฝ•่ฏฆ่ง [CHANGELOG.md](CHANGELOG.md)ใ€‚
package/lib/client.js CHANGED
@@ -6,6 +6,12 @@ window.__ModuleLoader__.load({
6
6
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
7
7
  const React = require('react');
8
8
  const NS = '@goodandready/dsh-dsml-artifact-guard';
9
+ // Row seat (#31): the Plugins page keys a row's configuration page by
10
+ // '<package name>#<row id>', with the row id exactly as cordis.patch.yml
11
+ // declares it. Keep all three in step with package.json and the patch.
12
+ const PKG = '@goodandready/dsh-dsml-artifact-guard';
13
+ const ROW_ID = 'dsh-dsml-artifact-guard';
14
+ const ROW_CONFIG_KEY = PKG + '#' + ROW_ID;
9
15
 
10
16
  // Query core chevron primitive when available; fallback SVG otherwise
11
17
  let CoreChevron = null;
@@ -77,7 +83,7 @@ window.__ModuleLoader__.load({
77
83
  modelId: 'deepseek-v4-flash',
78
84
  };
79
85
 
80
- function PluginCard({ ctx: _ctx, t }) {
86
+ function PluginCard({ ctx: _ctx, t, bare }) {
81
87
  const [expanded, setExpanded] = React.useState(false);
82
88
  const [draft, setDraft] = React.useState(DEFAULTS);
83
89
  const [status, setStatus] = React.useState('loading');
@@ -241,19 +247,7 @@ window.__ModuleLoader__.load({
241
247
 
242
248
  const isDisabled = draft.mode === 'disabled';
243
249
 
244
- return React.createElement('div', {
245
- 'data-dsh-plugin': NS,
246
- className: 'dsh-dsml-artifact-guard-card',
247
- style: {
248
- borderRadius: 12,
249
- border: '1px solid var(--dsw-alias-border-l2)',
250
- background: 'var(--dsw-alias-bg-card, var(--dsw-alias-bg-layer-3))',
251
- overflow: 'hidden',
252
- marginBottom: 12,
253
- },
254
- },
255
- // Header
256
- React.createElement('div', {
250
+ const header = React.createElement('div', {
257
251
  onClick: () => setExpanded(v => !v),
258
252
  style: {
259
253
  display: 'flex',
@@ -313,13 +307,15 @@ window.__ModuleLoader__.load({
313
307
  ? React.createElement(CoreChevron, { style: { transform: expanded ? 'rotate(180deg)' : 'none', transition: 'transform 0.2s' } })
314
308
  : React.createElement('span', { dangerouslySetInnerHTML: { __html: expanded ? CHEVRON_UP_SVG : CHEVRON_DOWN_SVG } })
315
309
  )
316
- ),
310
+ );
317
311
 
318
- // Body
319
- expanded && React.createElement('div', {
312
+ // Body. The row/page seat asks for the form alone: the host page draws
313
+ // the title, icon and crumb and supplies its own padding, so rendering
314
+ // our card chrome there would double the border and shift the block.
315
+ const body = React.createElement('div', {
320
316
  style: {
321
- padding: '0 16px 16px',
322
- borderTop: '1px solid var(--dsw-alias-border-l2)',
317
+ padding: bare ? '0' : '0 16px 16px',
318
+ borderTop: bare ? 'none' : '1px solid var(--dsw-alias-border-l2)',
323
319
  },
324
320
  },
325
321
  // One-Click Updater block
@@ -504,10 +500,47 @@ window.__ModuleLoader__.load({
504
500
  }, msg)
505
501
  )
506
502
  )
507
- )
503
+ );
504
+ if (bare) {
505
+ return React.createElement('div', {
506
+ 'data-dsh-plugin': NS,
507
+ className: 'dsh-dsml-artifact-guard-form',
508
+ }, body);
509
+ }
510
+ return React.createElement('div', {
511
+ 'data-dsh-plugin': NS,
512
+ className: 'dsh-dsml-artifact-guard-card',
513
+ style: {
514
+ borderRadius: 12,
515
+ border: '1px solid var(--dsw-alias-border-l2)',
516
+ background: 'var(--dsw-alias-bg-card, var(--dsw-alias-bg-layer-3))',
517
+ overflow: 'hidden',
518
+ marginBottom: 12,
519
+ },
520
+ },
521
+ header,
522
+ expanded && body
508
523
  );
509
524
  }
510
525
 
526
+ // View-aware entry for the host slots that carry a configuration page.
527
+ // 'plugins.row.config' asks for view:'summary' (the one-liner under the row
528
+ // title) and view:'page' (the form, bare). The older seat keeps the card.
529
+ function PluginItem(props) {
530
+ if (props && props.view === 'summary') {
531
+ const ctx = props && props.ctx;
532
+ const lang = (ctx && ctx.locale && typeof ctx.locale.get === 'function' ? ctx.locale.get() : null) || 'en';
533
+ const dict = String(lang).startsWith('zh') ? zh : en;
534
+ const tt = typeof props.t === 'function' ? props.t : (k) => dict[k] || en[k] || k;
535
+ return React.createElement('div', {
536
+ 'data-dsh-plugin': NS,
537
+ className: 'dsh-dsml-artifact-guard-sub',
538
+ style: { fontSize: 13, color: 'var(--dsw-alias-label-secondary)' },
539
+ }, tt('sub'));
540
+ }
541
+ return React.createElement(PluginCard, Object.assign({}, props, { bare: true }));
542
+ }
543
+
511
544
  exports.inject = ['slots', 'settingsScope', 'locale'];
512
545
  exports.apply = function apply(ctx) {
513
546
  if (typeof ctx.locale?.register === 'function') {
@@ -543,6 +576,21 @@ window.__ModuleLoader__.load({
543
576
  }
544
577
  }
545
578
 
579
+ // Newest seat first: the Plugins page renders a row's own configuration
580
+ // page from 'plugins.row.config'. Keep 'settings.plugin.item' below as the
581
+ // fallback for cores that still render the old card slot.
582
+ registerSlotWhenReady('plugins.row.config', () =>
583
+ ctx.slots.register(
584
+ {
585
+ name: 'plugins.row.config',
586
+ key: ROW_CONFIG_KEY,
587
+ locale: NS,
588
+ inject: () => ({ ctx }),
589
+ },
590
+ PluginItem
591
+ )
592
+ );
593
+
546
594
  registerSlotWhenReady('settings.plugin.item', () =>
547
595
  ctx.slots.register(
548
596
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodandready/dsh-dsml-artifact-guard",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Sanitizes leaked DeepSeek DSML closing tags from model text streams",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -11,7 +11,8 @@
11
11
  "README.md",
12
12
  "README.ru.md",
13
13
  "README.zh.md",
14
- "LICENSE"
14
+ "LICENSE",
15
+ "CHANGELOG.md"
15
16
  ],
16
17
  "scripts": {
17
18
  "check": "node --check lib/index.js",