dsh-lite 0.6.1 → 0.6.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 CHANGED
@@ -2,7 +2,16 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
- Nothing yet.
5
+ ## 0.6.2 — 2026-12-05
6
+
7
+ ### Changed
8
+
9
+ - Wide layouts (≥720px) open the session list by default, and the desktop console (≥900px) is now a two-column grid like the foldable range: the list is a persistent sidebar with no backdrop (clicking the chat never closes it) and the console card centres in the remaining width. A user who closes the sidebar keeps it closed for the visit; a viewport that grows wide re-opens it unless they did. Selecting a session no longer closes the sidebar on wide screens.
10
+ - The desktop console header gains a "完整页面 / full page" button, so a desktop shell (where the full page's "Open in Lite" replaces the window, because the Electron host denies `window.open`) always has a one-click way back.
11
+
12
+ ### Added
13
+
14
+ - Install paths that need no npm: `dsh plugin --profile web add github:T-splines/dsh-lite` (any pnpm GitHub spec) and the prebuilt tarball attached to each GitHub Release (`dsh-lite-<version>.tgz`, plus the stable name `dsh-lite.tgz` for `releases/latest/download/`). Both verified in a throwaway profile. The publish workflow now attaches the tarballs; `screenshots.json` declares the six screenshots storefronts show.
6
15
 
7
16
  ## 0.6.1 — 2026-12-02
8
17
 
package/README.en.md CHANGED
@@ -132,8 +132,23 @@ Context usage comes from DSH's existing `contextPressure` projection. Goals, mod
132
132
 
133
133
  Requirements: DSH 0.2.2-rc.1 or compatible (`engines.dsh` declares `>=0.2.2-0 <0.3.0-0`), Node.js >= 22, Cordis 4 (peer dependency).
134
134
 
135
+ ### From GitHub (no npm needed)
136
+
137
+ ```bash
138
+ dsh plugin --profile web add github:T-splines/dsh-lite # follows main
139
+ dsh plugin --profile web add "github:T-splines/dsh-lite#v0.6.1" # pinned to a tag
140
+ ```
141
+
142
+ `dsh plugin add` forwards to pnpm verbatim, so any GitHub spec pnpm understands works; the plugin has zero dependencies and no build step, so a source install never triggers the `allowBuilds` approval. The prebuilt tarball attached to each GitHub Release works too:
143
+
144
+ ```bash
145
+ dsh plugin --profile web add https://github.com/T-splines/dsh-lite/releases/download/v0.6.1/dsh-lite-0.6.1.tgz
146
+ ```
147
+
135
148
  ### From npm
136
149
 
150
+ The package name is `dsh-lite` (unscoped). The first npm release is still pending; once published:
151
+
137
152
  ```bash
138
153
  dsh plugin --profile web add dsh-lite
139
154
  ```
@@ -161,7 +176,7 @@ Uninstall: `dsh plugin --profile web remove dsh-lite`.
161
176
  | Full page → Lite | "Open in Lite" in the session header's "More actions" menu; or open `/lite/` directly | Yes: `/lite/?session=<id>` opens the same session in Lite |
162
177
  | Lite → Full page | the "full page" button in the session drawer footer | Yes: Lite writes the full page's session selection (`dsh.sessions.current`) first, so the full page reopens the same session |
163
178
 
164
- A desktop app has no address bar, which is why the first row is how desktop users reach Lite — the menu item is there as soon as the plugin is installed in that host.
179
+ A desktop app has no address bar, which is why the first row is how desktop users reach Lite — the menu item is there as soon as the plugin is installed in that host. The desktop shell does not let pages open new windows, so Lite replaces the window's current page; on wide screens Lite's header has a "full page" button to go back in one click, and the session list opens by default.
165
180
 
166
181
  ## API
167
182
 
package/README.md CHANGED
@@ -153,8 +153,23 @@ DSH Lite 的取舍很直接:
153
153
  - Node.js >= 22;
154
154
  - Cordis 4(peer dependency)。
155
155
 
156
+ ### 从 GitHub 安装(不需要 npm)
157
+
158
+ ```bash
159
+ dsh plugin --profile web add github:T-splines/dsh-lite # 跟随 main
160
+ dsh plugin --profile web add "github:T-splines/dsh-lite#v0.6.1" # 钉住某个 tag
161
+ ```
162
+
163
+ `dsh plugin add` 原样转发给 pnpm,所以 pnpm 认的 GitHub 形式都行;本插件零依赖、没有构建步骤,从源码装不会触发 `allowBuilds` 授权。也可以装 GitHub Release 里的预构建包:
164
+
165
+ ```bash
166
+ dsh plugin --profile web add https://github.com/T-splines/dsh-lite/releases/download/v0.6.1/dsh-lite-0.6.1.tgz
167
+ ```
168
+
156
169
  ### 从 npm 安装
157
170
 
171
+ 包名 `dsh-lite`(不带 scope)。npm 上的首发仍在进行中;发布后:
172
+
158
173
  ```bash
159
174
  dsh plugin --profile web add dsh-lite
160
175
  ```
@@ -188,7 +203,7 @@ http://<DSH 主机>:<端口>/lite/
188
203
  | 完整页 → Lite | 会话头部「⋯」(More actions)菜单里的「打开 Lite 页面」;或直接访问 `/lite/` | 带:`/lite/?session=<id>`,Lite 打开同一会话 |
189
204
  | Lite → 完整页 | 会话抽屉底部的「完整页面」按钮 | 带:Lite 先写入完整页的会话选择(`dsh.sessions.current`),完整页打开同一会话 |
190
205
 
191
- 桌面版(desktop app)没有地址栏,所以第一条是桌面用户到达 Lite 的方式——只要该桌面版装了本插件,菜单项就在。
206
+ 桌面版(desktop app)没有地址栏,所以第一条是桌面用户到达 Lite 的方式——只要该桌面版装了本插件,菜单项就在。桌面壳不允许页面新开窗口,所以 Lite 会替换当前窗口的页面;宽屏下 Lite 的头部有「完整页面」按钮一键回去,会话列表在宽屏默认展开。
192
207
 
193
208
  ## API
194
209
 
@@ -137,6 +137,6 @@
137
137
 
138
138
  | # | 项 | 状态 |
139
139
  |:--|:--|:--|
140
- | D1 | 仓库转公开:命名查重、description / topics、branch protection、GitHub Release(v0.5.0 / v0.5.1 / v0.6.0) | ⏳ 需批准 |
141
- | D2 | npm 发布(如决定):包名**定为 `dsh-lite`(不带 scope,2026-12-02 决定)**;tarball 200、全新隔离 `DSH_HOME` 安装 + `--dump-config`;npm 侧一次性配置 trusted publisher(见 publish.yml 头部)。**另三个已发布插件维持 `@magic6/*` 不改名**(2026-12-02 决定):npm 不支持重命名,改掉等于让已安装用户 remove + add,不给用户添加迁移负担 | ⏳ 需批准 |
142
- | D3 | 市场目录 PR:`awesome-dsh-plugin` 的 `data/plugins/T-splines__dsh-lite.yml`(仓库需满 1 天) | ⏳ 需批准 |
140
+ | D1 | 仓库转公开(2026-12-02 完成):公开仓库 `T-splines/dsh-lite` 从 `release/v0.6.1` 生成无父种子提交(`96c9dd7`,tag `v0.6.1`),私有完整历史归档在 `T-splines/dsh-lite-dev`;description / topics 已设;`main` 保护 = 必需检查 `test (22)` / `test (24)` / `test-windows` / `e2e` + 线性历史;GitHub Release `v0.6.1` 已建(旧 tag 只存在于私有历史) | ✅ |
141
+ | D2 | npm 发布:包名 `dsh-lite`(不带 scope)。**改为可选**:npm 不给不存在的包预配 trusted publisher、现有 token 只覆盖 `@magic6`,而市场规则里 npm 只是「推荐不强制」——没有 npm 时商店给 GitHub 源码安装,Release 附带的预构建包(`dsh-lite-<ver>.tgz` + 固定名 `dsh-lite.tgz`)供 `tarball:` 字段一键安装。2026-12-02 晚:用户用了恢复码,npm 账号 **72 小时内(到 2026-12-05 ~20:00)无法操作**;之后由本会话按 `npm-web-ops` 技能(本机真 Chrome + CDP)代管登录与设置,用户只输密码;首发后配置 trusted publisher 走 OIDC | ⏳ 2026-12-05 20:05 本会话定时提醒(schedule-718d0e94) |
142
+ | D3 | 市场目录 PR:条目 `data/plugins/T-splines__dsh-lite.yml` 已在 fork 分支 `add-dsh-lite`(category `ui`,双语描述,`tarball:` 指向 `releases/latest/download/dsh-lite.tgz`);**定时:2026-12-03 04:00 自动开 PR**(PR 不依赖 npm;用户 12-02 晚确认不等 npm,尽快提);条目与 PR 正文已备好,恢复定时或手动执行都可以(目录硬门槛「仓库满 1 天」已于 12-03 03:22 满足)。`screenshots.json` 已随仓库声明 6 张展示图 | ✅ 2026-12-03 用户一键提交 PR:https://github.com/awesome-dsh-plugin/awesome-dsh-plugin/pull/20717(目录 CI 跑中;API 开 PR 需经典 public_repo token,PAT 不够) |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-lite",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "Minimal, low-traffic bilingual mobile Web/PWA surface for DeepSeek Harness: paged sessions, approvals, images, plan/insights, fork/export, workspaces, permission presets, and three theme families.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
package/public/app.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  languageToggleText,
8
8
  setLanguage,
9
9
  t,
10
- } from './i18n.js?v=29'
10
+ } from './i18n.js?v=30'
11
11
  import {
12
12
  COLOR_MODES,
13
13
  THEME_CHANGE_EVENT,
@@ -17,8 +17,8 @@ import {
17
17
  setColorMode,
18
18
  setThemeFamily,
19
19
  toggleColorMode,
20
- } from './theme.js?v=29'
21
- import { buildAnswerBatch, hasOptions, isAnswered } from './question-answers.js?v=29'
20
+ } from './theme.js?v=30'
21
+ import { buildAnswerBatch, hasOptions, isAnswered } from './question-answers.js?v=30'
22
22
 
23
23
  const API = {
24
24
  bootstrap: '/api/lite/bootstrap',
@@ -181,6 +181,7 @@ const el = {
181
181
  themeModeOptions: document.getElementById('themeModeOptions'),
182
182
  langToggle: document.getElementById('langToggle'),
183
183
  fullPageButton: document.getElementById('fullPageButton'),
184
+ fullPageHeaderButton: document.getElementById('fullPageHeaderButton'),
184
185
  notifyToggle: document.getElementById('notifyToggle'),
185
186
  notifyLabel: document.getElementById('notifyLabel'),
186
187
  sessionSearchBar: document.getElementById('sessionSearchBar'),
@@ -890,7 +891,7 @@ function openSession(id) {
890
891
  state.goalEditing = false
891
892
  state.answeredCalls.clear()
892
893
  clearPendingImages()
893
- closeSheet()
894
+ if (!sheetSidebarQuery().matches) closeSheet()
894
895
  restoreDraft()
895
896
  renderHeader(findSession(id))
896
897
  renderEmpty(t('加载中…'))
@@ -3586,6 +3587,15 @@ async function saveGoalEdit() {
3586
3587
  await goalCommand(goal ? `/goal edit ${objective}` : `/goal ${objective}`)
3587
3588
  }
3588
3589
 
3590
+ // From tablet width up the session list is a persistent sidebar, so it starts
3591
+ // open; below that it is an overlay and stays closed until asked for. A user who
3592
+ // closes it on a wide screen keeps it closed for the visit; a viewport that grows
3593
+ // wide again re-opens it unless they did.
3594
+ const SHEET_SIDEBAR_MIN_WIDTH = 720
3595
+ const sheetSidebarQuery = () => window.matchMedia('(min-width: ' + SHEET_SIDEBAR_MIN_WIDTH + 'px)')
3596
+ let sheetClosedByUser = false
3597
+ let sheetOpenedByDefault = false
3598
+
3589
3599
  function openSheet() {
3590
3600
  el.sheet.hidden = false
3591
3601
  document.body.classList.add('sheet-open')
@@ -3593,11 +3603,24 @@ function openSheet() {
3593
3603
  if (archivedVisible()) void loadArchivedSessions()
3594
3604
  }
3595
3605
 
3596
- function closeSheet() {
3606
+ function closeSheet(byUser = false) {
3597
3607
  closeViewMenu()
3598
3608
  closeAppearancePanel()
3599
3609
  el.sheet.hidden = true
3600
3610
  document.body.classList.remove('sheet-open')
3611
+ if (byUser) sheetClosedByUser = true
3612
+ sheetOpenedByDefault = false
3613
+ }
3614
+
3615
+ function syncSheetForViewport() {
3616
+ if (sheetSidebarQuery().matches) {
3617
+ if (el.sheet.hidden && !sheetClosedByUser) {
3618
+ openSheet()
3619
+ sheetOpenedByDefault = true
3620
+ }
3621
+ } else if (!el.sheet.hidden && sheetOpenedByDefault) {
3622
+ closeSheet()
3623
+ }
3601
3624
  }
3602
3625
 
3603
3626
  function resizePrompt() {
@@ -3657,6 +3680,7 @@ function wireEvents() {
3657
3680
  })
3658
3681
  el.langToggle.addEventListener('click', toggleLanguage)
3659
3682
  el.fullPageButton.addEventListener('click', openFullPage)
3683
+ el.fullPageHeaderButton.addEventListener('click', openFullPage)
3660
3684
  el.notifyToggle.addEventListener('click', () => void toggleNotifications())
3661
3685
  el.contextMeter.addEventListener('click', () => void showInsights())
3662
3686
  el.planChip.addEventListener('click', () => void exitPlanMode())
@@ -3724,7 +3748,7 @@ function wireEvents() {
3724
3748
  el.goalSave.addEventListener('click', () => void saveGoalEdit())
3725
3749
  el.goalCancel.addEventListener('click', cancelGoalEdit)
3726
3750
  el.sheet.addEventListener('click', (event) => {
3727
- if (event.target.closest('[data-close-sheet]')) closeSheet()
3751
+ if (event.target.closest('[data-close-sheet]')) closeSheet(true)
3728
3752
  })
3729
3753
  el.dialog.addEventListener('click', (event) => {
3730
3754
  if (event.target.closest('[data-dialog-cancel]')) closeDialog(null)
@@ -3854,7 +3878,8 @@ async function boot() {
3854
3878
  await loadBootstrap()
3855
3879
  if (archivedVisible()) void loadArchivedSessions(true)
3856
3880
  if (state.session === null && state.sessionId !== null && state.loadingSession === 0) void loadSession()
3857
- if (window.matchMedia('(min-width: 720px) and (max-width: 899px)').matches) openSheet()
3881
+ syncSheetForViewport()
3882
+ sheetSidebarQuery().addEventListener?.('change', syncSheetForViewport)
3858
3883
  resizePrompt()
3859
3884
  if ('serviceWorker' in navigator) {
3860
3885
  navigator.serviceWorker.addEventListener('message', (event) => {
package/public/index.html CHANGED
@@ -10,8 +10,8 @@
10
10
  <link rel="manifest" href="/lite/manifest.webmanifest">
11
11
  <link rel="icon" href="/lite/favicon.svg" type="image/svg+xml">
12
12
  <link rel="apple-touch-icon" href="/lite/icon-192.png">
13
- <link rel="stylesheet" href="/lite/style.css?v=29">
14
- <link rel="stylesheet" href="/lite/theme.css?v=29">
13
+ <link rel="stylesheet" href="/lite/style.css?v=30">
14
+ <link rel="stylesheet" href="/lite/theme.css?v=30">
15
15
  </head>
16
16
  <body>
17
17
  <div id="app">
@@ -23,6 +23,7 @@
23
23
  </div>
24
24
  <span id="planChip" class="plan-chip" hidden>Plan</span>
25
25
  <button id="contextMeter" class="context-meter" type="button" hidden></button>
26
+ <button id="fullPageHeaderButton" class="icon-button desktop-only" type="button" aria-label="完整页面" data-i18n-aria-label="完整页面" title="打开完整页面(打开当前会话)" data-i18n-title="打开完整页面(打开当前会话)"><span data-i18n="完整页面">完整页面</span></button>
26
27
  <button id="refreshButton" class="icon-button" type="button" aria-label="刷新" data-i18n-aria-label="刷新">↻</button>
27
28
  </header>
28
29
 
@@ -190,6 +191,6 @@
190
191
  </div>
191
192
  </div>
192
193
 
193
- <script type="module" src="/lite/app.js?v=29"></script>
194
+ <script type="module" src="/lite/app.js?v=30"></script>
194
195
  </body>
195
196
  </html>
package/public/style.css CHANGED
@@ -3001,8 +3001,32 @@ body.dialog-open .sheet-foot {
3001
3001
 
3002
3002
  /* ── desktop console ─────────────────────────────────────── */
3003
3003
 
3004
+ /* Only meaningful where the session list is a persistent sidebar: a one-click way back to the full page. */
3005
+ .desktop-only {
3006
+ display: none !important;
3007
+ }
3008
+
3004
3009
  @media (min-width: 900px) {
3010
+ .desktop-only {
3011
+ display: inline-flex !important;
3012
+ align-items: center;
3013
+ gap: 6px;
3014
+ }
3015
+
3016
+ .topbar .icon-button.desktop-only {
3017
+ width: auto;
3018
+ padding: 0 12px;
3019
+ font-size: 12.5px;
3020
+ color: var(--muted);
3021
+ }
3022
+
3023
+ /* Same two-column grid as the foldable range: the session list is a persistent
3024
+ sidebar (no backdrop, clicks on the chat never close it) and the console card
3025
+ centres in what is left. Column 1 collapses to 0 while the sidebar is closed. */
3005
3026
  body {
3027
+ display: grid;
3028
+ grid-template-columns: 0 minmax(0, 1fr);
3029
+ transition: grid-template-columns 0.18s ease;
3006
3030
  overflow: hidden;
3007
3031
  background:
3008
3032
  radial-gradient(70% 50% at 50% -12%, var(--desk-glow), transparent 62%),
@@ -3021,7 +3045,13 @@ body.dialog-open .sheet-foot {
3021
3045
  pointer-events: none;
3022
3046
  }
3023
3047
 
3048
+ body.sheet-open {
3049
+ grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
3050
+ }
3051
+
3024
3052
  #app {
3053
+ grid-column: 2;
3054
+ grid-row: 1;
3025
3055
  z-index: 1;
3026
3056
  --desk-gutter: max(28px, calc((100% - 800px) / 2));
3027
3057
  width: min(1024px, calc(100% - 48px));
@@ -3104,9 +3134,31 @@ body.dialog-open .sheet-foot {
3104
3134
  border-radius: 22px;
3105
3135
  }
3106
3136
 
3107
- .sheet-backdrop {
3108
- backdrop-filter: blur(4px);
3109
- -webkit-backdrop-filter: blur(4px);
3137
+ #sessionSheet {
3138
+ position: sticky;
3139
+ inset: auto;
3140
+ top: 0;
3141
+ left: 0;
3142
+ grid-column: 1;
3143
+ grid-row: 1;
3144
+ width: 100%;
3145
+ height: 100dvh;
3146
+ z-index: 10;
3147
+ }
3148
+
3149
+ #sessionSheet .sheet-backdrop {
3150
+ display: none;
3151
+ }
3152
+
3153
+ #sessionSheet .sheet-panel {
3154
+ position: relative;
3155
+ inset: auto;
3156
+ width: 100%;
3157
+ height: 100%;
3158
+ border: 1px solid var(--border);
3159
+ border-radius: 0;
3160
+ box-shadow: none;
3161
+ animation: none;
3110
3162
  }
3111
3163
 
3112
3164
  .dialog-card {
package/public/sw.js CHANGED
@@ -1,12 +1,12 @@
1
- const CACHE = 'dsh-lite-v29'
1
+ const CACHE = 'dsh-lite-v30'
2
2
  const SHELL = [
3
3
  '/lite/',
4
- '/lite/app.js?v=29',
5
- '/lite/i18n.js?v=29',
6
- '/lite/style.css?v=29',
7
- '/lite/theme.css?v=29',
8
- '/lite/theme.js?v=29',
9
- '/lite/question-answers.js?v=29',
4
+ '/lite/app.js?v=30',
5
+ '/lite/i18n.js?v=30',
6
+ '/lite/style.css?v=30',
7
+ '/lite/theme.css?v=30',
8
+ '/lite/theme.js?v=30',
9
+ '/lite/question-answers.js?v=30',
10
10
  '/lite/manifest.webmanifest',
11
11
  '/lite/icon-192.png',
12
12
  '/lite/icon-512.png',