@aiwayds/dsh-tui-pi 2.6.0 → 2.7.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aiwayds/dsh-tui-pi",
3
- "version": "2.6.0",
4
- "description": "pi-style terminal UI for DeepSeek Harness (dsh) — pi-tui look & feel, dsh slash commands, GitHub light/dark themes, powerline footer",
3
+ "version": "2.7.1",
4
+ "description": "A fully-featured pi-style terminal UI for DeepSeek Harness (dsh) — history look-back & fork-at-turn, guided preset switching, live subagent steering, model profiles & themes",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/fan56/dsh-tui-pi.git"
@@ -17,13 +17,17 @@
17
17
  // loader error (a healthy boot is silent and survives to the kill
18
18
  // signal; a broken plugin dies within ~1s with the loader error), and
19
19
  // the seeded record must come out backfilled + backed up
20
+ // 7. `dsh plugin --profile smoke remove` must reconcile the profile back
21
+ // to stock: the bundles entry spliced and the patch layer dropped —
22
+ // the post-removal dump shows no tui-pi entries and the stock
23
+ // projection-cache row re-enabled
20
24
  //
21
25
  // The boot runs piped (no TTY). Verified empirically: the TUI plugin's
22
26
  // apply() tolerates a non-terminal (pi-tui guards raw mode), so the piped
23
27
  // boot is a valid load proof without dragging a pty shim into CI.
24
28
  //
25
- // Exit 0 = mounted and boots clean. Temp dir is kept and printed on failure,
26
- // removed on success.
29
+ // Exit 0 = mounted, boots and removes clean. Temp dir is kept and printed on
30
+ // failure, removed on success.
27
31
 
28
32
  import { spawnSync } from 'node:child_process'
29
33
  import { mkdtempSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from 'node:fs'
@@ -163,5 +167,28 @@ if (migrated.identity?.isSeeded !== false || migrated.identity?.inheritedEventCo
163
167
  fail('the seeded legacy record survived the boot without being backfilled', JSON.stringify(migrated.identity))
164
168
  }
165
169
 
166
- console.log(`smoke-boot: PASS${ownName} composed into the scratch profile tree and booted clean in real dsh (${survived ? `survived the ${bootSeconds}s boot window` : `exited ${boot.status}`}); the seeded legacy projection-cache record was migrated with a backup`)
170
+ // Phase 4 uninstall proof: `dsh plugin remove` must reconcile the profile
171
+ // back to stock — the bundles entry spliced and every patch effect gone (the
172
+ // stock projection-cache row re-enabled, the wrapper and tool inserts
173
+ // dropped).
174
+ const remove = spawnSync('dsh', ['plugin', '--profile', 'smoke', 'remove', ownName], { cwd: profile, encoding: 'utf8', env: dshEnv })
175
+ if (remove.status !== 0 || remove.error) fail('dsh plugin remove failed', `${remove.stdout}\n${remove.stderr}`)
176
+ const dumpAfter = spawnSync('dsh', ['--profile', 'smoke', '--dump-config'], { cwd: profile, encoding: 'utf8', env: dshEnv })
177
+ if (dumpAfter.status !== 0 || dumpAfter.error) fail('dsh --dump-config failed after removal', `${dumpAfter.stdout}\n${dumpAfter.stderr}`)
178
+ if (dumpAfter.stdout.includes('tui-pi')) {
179
+ fail('the composed tree still contains tui-pi entries after removal (bundles entry not spliced / patch layer not dropped)', dumpAfter.stdout)
180
+ }
181
+ // The stock row must still be composed (it comes from dsh-base) but enabled
182
+ // again — `disabled: true` may not appear anywhere inside its own entry
183
+ // block (the row carries indented config fields, so the check is scoped to
184
+ // the block ending at the next top-level entry).
185
+ const stockRowAfter = /- id: session-projection-cache[\s\S]*?(?=\n- id:|\n#|$)/.exec(dumpAfter.stdout)?.[0] ?? ''
186
+ if (!stockRowAfter) {
187
+ fail('the stock session-projection-cache row vanished from the composed tree after removal', dumpAfter.stdout)
188
+ }
189
+ if (stockRowAfter.includes('disabled: true')) {
190
+ fail('the stock session-projection-cache row is still disabled after removal', stockRowAfter)
191
+ }
192
+
193
+ console.log(`smoke-boot: PASS — ${ownName} composed into the scratch profile tree and booted clean in real dsh (${survived ? `survived the ${bootSeconds}s boot window` : `exited ${boot.status}`}); the seeded legacy projection-cache record was migrated with a backup; removal restored the stock tree`)
167
194
  rmSync(work, { recursive: true, force: true })