@linxin666/dsh-liangshen 0.2.0 → 0.2.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/README.i18n.yaml CHANGED
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # node scripts/verify-docs.mjs --write <dir>
5
- README.md: dec9b2799940de0bfe3d8f6517df7848d8d2faa5
6
- README.zh.md: a70a4821f0f2126ea49d32dfa7f6b06a6d7b10b9
5
+ README.md: 5699b2aee7b9cfdec6184e042a48ab359a76b5d7
6
+ README.zh.md: 44295097d6561d0d5db7388b438f4bef8509ff4e
package/README.md CHANGED
@@ -35,10 +35,10 @@ Plan mode is supported: phase 1 filters the assembled prompt sections down to th
35
35
 
36
36
  ```sh
37
37
  # Option 1: family bundle (recommended)
38
- dsh plugin --profile web add @linxin666/dsh-web-ui-all
38
+ dsh plugin --profile web add @linxin666/dsh-web-ui-all@latest
39
39
 
40
40
  # Option 2: standalone
41
- dsh plugin --profile web add @linxin666/dsh-liangshen
41
+ dsh plugin --profile web add @linxin666/dsh-liangshen@latest
42
42
 
43
43
  # Pick ONE of the two: the bundle and the standalone @linxin666/dsh-liangshen
44
44
  # both mount this preset. If you switch between them, remove the other first:
package/README.zh.md CHANGED
@@ -35,10 +35,10 @@ preset 在参考机制之上内置了额外保护,全部在 `agent.cordis.yml`
35
35
 
36
36
  ```sh
37
37
  # 方式一:全家桶(推荐)
38
- dsh plugin --profile web add @linxin666/dsh-web-ui-all
38
+ dsh plugin --profile web add @linxin666/dsh-web-ui-all@latest
39
39
 
40
40
  # 方式二:单独安装
41
- dsh plugin --profile web add @linxin666/dsh-liangshen
41
+ dsh plugin --profile web add @linxin666/dsh-liangshen@latest
42
42
 
43
43
  # 两种方式二选一:聚合包与独立 @linxin666/dsh-liangshen 都会挂载本 preset。
44
44
  # 需要在两者之间切换时,先 dsh plugin remove 移除另一个再安装:
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@linxin666/dsh-liangshen",
3
3
  "description": "LiangShen (梁神) agent preset for the dsh web GUI: a two-phase anchored-standard preset — the first model request exposes only the builtin Minimal exact two-tool surface (persistent bash plus str_replace_editor) with no runtime contexts or injected instructions (Minimal-aligned trajectory anchor), promotion is gated on the first minimal-like reasoning block with a fallback, and the wire then switches to PTC Mode (a single run_code tool over the full registry) with the ordinary injections returning afterwards. The preset files are synced into ~/.dsh/.agent-presets on host startup. Hot-pluggable — mounted via cordis.patch.yml + a profile node_modules symlink, no dsh source changes.",
4
- "version": "0.2.0",
4
+ "version": "0.2.1",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "node": "^22.19.0 || >=24.0.0"
@@ -179,8 +179,15 @@ function extractInstructionPaths(message) {
179
179
  }
180
180
 
181
181
  /** The one-time non-imperative hint replacing the full-text dump (E1.5 wording). */
182
- function buildInstructionHint(paths) {
182
+ function buildInstructionHint(original, paths) {
183
183
  return {
184
+ // Session persistence validates every replayed user/message for a
185
+ // non-empty string id; a plugin-built message without one corrupts the
186
+ // durable journal (SessionPersistenceCorruptionError on load). Inherit
187
+ // the original instructions message id when present (#510), else mint one.
188
+ id: typeof original?.id === 'string' && original.id !== ''
189
+ ? original.id
190
+ : globalThis.crypto.randomUUID(),
184
191
  role: 'user',
185
192
  content: [{
186
193
  type: 'text',
@@ -214,7 +221,7 @@ function instructionHintMessages(messages, state) {
214
221
  continue
215
222
  }
216
223
  state.instructionHinted = true
217
- kept.push(buildInstructionHint(paths))
224
+ kept.push(buildInstructionHint(message, paths))
218
225
  }
219
226
  return kept
220
227
  }