DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.
refactor(ssh): 插件构建管线适配上游 v0.14.1
Menghuan19182aa822d17918
diff --git a/packages/dsh-tauri-ssh-ui/package.json b/packages/dsh-tauri-ssh-ui/package.jsonindex cb023e5d..5889758b 100644--- a/packages/dsh-tauri-ssh-ui/package.json+++ b/packages/dsh-tauri-ssh-ui/package.json@@ -24,10 +24,7 @@],"sideEffects": false,"exports": {- ".": {- "types": "./dist/index.d.ts",- "default": "./dist/index.js"- },+ ".": "./dist/index.js","./client": "./dist/client.cjs","./package.json": "./package.json"},@@ -43,8 +40,14 @@"inject": ["@deepseek-ai/dsh-client-ui-renderer","@deepseek-ai/dsh-client-ui-settings",+ "@deepseek-ai/dsh-client-ui-primitives","@deepseek-ai/dsh-client-locale",- "dsh-tauri"+ "dsh-tauri",+ "dsh-tauri-ui"+ ],+ "external": [+ "dsh-tauri/client",+ "dsh-tauri-ui/client"],"platform": "web"},@@ -56,9 +59,14 @@"build": "tsdown","dev": "tsdown --watch","prepublishOnly": "nr build",+ "start": "tsx src/index.ts","test": "vitest run","typecheck": "tsc"},+ "dependencies": {+ "dsh-tauri": "workspace:*",+ "dsh-tauri-ui": "workspace:*"+ },"devDependencies": {"@deepseek-ai/dsh-client-ui-primitives": "catalog:dsh","@testing-library/dom": "catalog:testing",diff --git a/packages/dsh-tauri-ssh-ui/src/client/components/machines-section.module.css b/packages/dsh-tauri-ssh-ui/src/client/components/machines-section.module.cssdeleted file mode 100644index ea917231..00000000--- a/packages/dsh-tauri-ssh-ui/src/client/components/machines-section.module.css+++ /dev/null@@ -1,486 +0,0 @@-/* SSH-machines settings section, on the official UI primitives (Button /- * Input / StateDot / Modal / Pill draw the controls); this sheet keeps only- * layout and token alignment: 14/22 body, 12/18 caption, hairline- * `border-l2` cards, and the few custom visuals the primitives do not own- * (the hollow idle dot, the color swatches, the tint switch). Every color- * resolves through a `--dsw-alias-*` token, so light and dark themes both- * work without literals. */--.section {- display: flex;- flex-direction: column;- gap: 12px;- max-width: 760px;- color: var(--dsw-alias-label-primary);-}--.title {- margin: 0;- font-size: 18px;- line-height: 28px;- font-weight: 600;- color: var(--dsw-alias-label-primary);-}--.intro {- margin: 0;- font-size: 13px;- line-height: 20px;- color: var(--dsw-alias-label-tertiary);-}--/* The page chrome: refresh / add / save. */-.chrome {- display: flex;- align-items: center;- gap: 8px;- flex-wrap: wrap;-}--/* The danger seat of an otherwise primitive button (token-aligned color). */-.dangerAction {- color: var(--dsw-alias-state-error-primary);-}--/* "Add machine" keeps the dashed affordance of every other empty-list entry. */-.addAction {- border-style: dashed;-}--/* The machine list: one hairline card per machine. */-.rows {- list-style: none;- margin: 12px 0 0;- padding: 0;- display: flex;- flex-direction: column;- gap: 8px;-}--/* The read-only ~/.ssh/config group header. */-.group {- display: flex;- flex-direction: column;- gap: 2px;- margin-top: 12px;-}--.groupTitle {- margin: 0;- font-size: 12px;- line-height: 18px;- font-weight: 500;- color: var(--dsw-alias-label-secondary);-}--.groupHint {- margin: 0;- font-size: 12px;- line-height: 18px;- color: var(--dsw-alias-label-tertiary);-}--.rowCard {- border: 1px solid var(--dsw-alias-border-l2);- border-radius: 12px;- padding: 12px 14px;- display: flex;- flex-direction: column;- gap: 12px;- background: var(--dsw-alias-bg-layer-3);-}--.rowHead {- display: flex;- align-items: center;- gap: 10px;-}--.rowIdentity {- display: inline-flex;- align-items: center;- gap: 6px;- min-width: 0;-}--.rowName {- font-size: 14px;- line-height: 22px;- font-weight: 500;- color: var(--dsw-alias-label-primary);-}--/* The host as a pill annotation on the name (the settings badge idiom). */-.rowTag {- flex: none;- padding: 2px 8px;- border: none;- border-radius: 999px;- background: var(--dsw-alias-bg-module-platform);- font-size: 11px;- line-height: 16px;- color: var(--dsw-alias-label-secondary);-}--/* Connection state caption text (the dot itself is StateDot). */-.status {- font-size: 12px;- line-height: 18px;- color: var(--dsw-alias-label-tertiary);-}--/* The hollow idle dot: the one connection state StateDot has no glyph for. */-.stateDot {- position: relative;- display: inline-block;- flex: none;- width: 8px;- height: 8px;- border-radius: 50%;- background: currentColor;- color: var(--dsw-alias-label-caption);-}--.stateDot::after {- content: '';- position: absolute;- inset: 25%;- border-radius: 50%;- background: currentColor;-}--/* Identity color pip next to the machine name. */-.colorPip {- display: inline-block;- flex: none;- width: 10px;- height: 10px;- border-radius: 50%;- box-shadow: inset 0 0 0 1px rgb(0 0 0 / 12%);-}--/* The appearance row: swatches + the tint-border switch. */-.appearance {- display: flex;- align-items: center;- gap: 10px;- flex-wrap: wrap;-}--.swatches {- display: inline-flex;- align-items: center;- gap: 6px;- flex-wrap: wrap;-}--.swatch {- box-sizing: border-box;- width: 20px;- height: 20px;- padding: 0;- border: 1px solid var(--dsw-alias-border-l2);- border-radius: 50%;- background: var(--swatch-color);- cursor: pointer;-}--.swatch:hover {- border-color: var(--dsw-alias-border-l4);-}--.swatch[data-selected='true'] {- outline: 2px solid var(--dsw-alias-brand-primary);- outline-offset: 2px;-}--/* The "default" reset swatch: hollow with a diagonal strike. */-.swatchNone {- background: linear-gradient(- to top right,- transparent calc(50% - 1px),- var(--dsw-alias-label-tertiary),- transparent calc(50% + 1px)- );-}--.switchRow {- display: inline-flex;- align-items: center;- gap: 8px;- margin-left: 4px;-}--/* The hand-rolled toggle (the SubagentModelSelectionCard vocabulary). */-.switch {- position: relative;- width: 36px;- height: 20px;- padding: 0;- border: none;- border-radius: 10px;- background: var(--dsw-alias-border-l3);- cursor: pointer;- transition: background 0.15s var(--ds-ease-in-out);-}--.switch::after {- content: '';- position: absolute;- top: 2px;- left: 2px;- width: 16px;- height: 16px;- border-radius: 50%;- background: var(--dsw-alias-bg-layer-1);- box-shadow: 0 1px 2px rgb(0 0 0 / 20%);- transition: transform 0.15s var(--ds-ease-in-out);-}--.switch[aria-checked='true'] {- background: var(--dsw-alias-state-business-primary);-}--.switch[aria-checked='true']::after {- transform: translateX(16px);-}--.switch:disabled {- opacity: 0.4;- cursor: default;-}--.rowActions {- display: inline-flex;- align-items: center;- gap: 4px;- margin-left: auto;-}--/* The editing surface: a filled module on the panel. */-.editor {- border-radius: 12px;- background: var(--dsw-alias-bg-module-platform);- padding: 14px 16px;- display: flex;- flex-direction: column;- gap: 12px;-}--.grid {- display: grid;- grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));- gap: 8px 12px;-}--.field {- display: flex;- flex-direction: column;- gap: 6px;-}--.fieldLabel {- font-size: 12px;- line-height: 18px;- font-weight: 500;- color: var(--dsw-alias-label-secondary);-}--/* The Input primitive draws the box; the field makes it fill the grid cell. */-.fieldInput {- width: 100%;-}--/* Per-machine status lines. */-.statusError {- margin: 0;- font-size: 12px;- line-height: 18px;- color: var(--dsw-alias-state-error-primary);-}--.link {- margin: 0;- font-size: 12px;- line-height: 18px;- font-family: var(--ds-font-family-code);- color: var(--dsw-alias-label-tertiary);- overflow-wrap: anywhere;-}--/* The streaming log surface (machine.events lines, or the progress log). */-.logStream {- margin: 0;- max-height: 160px;- overflow: auto;- white-space: pre-wrap;- overflow-wrap: anywhere;- font-family: var(--ds-font-family-code);- font-size: 11px;- line-height: 16px;- color: var(--dsw-alias-label-tertiary);-}--/* The one-click install surface (dsh missing on the remote). */-.installBox {- display: flex;- flex-direction: column;- gap: 8px;- padding: 10px 12px;- border: 1px solid var(--dsw-alias-border-l2);- border-radius: 8px;- background: var(--dsw-alias-surface-tinted);-}--.installHint {- margin: 0;- font-size: 12px;- line-height: 18px;- color: var(--dsw-alias-label-secondary);-}--.installNote {- margin: 0;- font-size: 12px;- line-height: 18px;- color: var(--dsw-alias-label-secondary);-}--/* Page-level banners. */-.notice {- margin: 0;- font-size: 12px;- line-height: 18px;- color: var(--dsw-alias-label-secondary);-}--.error {- margin: 0;- font-size: 12px;- line-height: 18px;- color: var(--dsw-alias-state-error-primary);-}--.hint {- margin: 0;- font-size: 12px;- line-height: 18px;- color: var(--dsw-alias-label-tertiary);-}--.empty {- margin: 0;- padding: 12px;- border: 1px dashed var(--dsw-alias-border-l3);- border-radius: 8px;- text-align: center;- font-size: 12px;- line-height: 18px;- color: var(--dsw-alias-label-tertiary);-}--/* The load-failure block: empty state plus the retry affordance. */-.emptyBlock {- display: flex;- flex-direction: column;- align-items: flex-start;- gap: 8px;-}--/* The sync panel (a section-level group under the machine list). */-.syncPanel {- display: flex;- flex-direction: column;- gap: 10px;- margin-top: 12px;- padding-top: 12px;- border-top: 1px solid var(--dsw-alias-border-l2);-}--.syncTargets {- display: flex;- align-items: center;- gap: 6px;- flex-wrap: wrap;-}--.syncGroups {- display: flex;- flex-direction: column;- gap: 10px;-}--.syncGroup {- display: flex;- flex-direction: column;- gap: 6px;-}--.syncItems {- list-style: none;- margin: 0;- padding: 0;- display: flex;- flex-direction: column;- gap: 4px;-}--.syncItem {- display: flex;- align-items: center;- gap: 8px;- flex-wrap: wrap;-}--.syncReason {- font-size: 12px;- line-height: 18px;- color: var(--dsw-alias-state-warning-primary, var(--dsw-alias-label-tertiary));-}--/* The root tag inside a skill pill. */-.syncRoot {- margin-left: 6px;- font-size: 10px;- line-height: 14px;- color: var(--dsw-alias-label-tertiary);-}--.syncActions {- display: flex;- align-items: center;- gap: 8px;-}--.syncResults {- display: flex;- flex-direction: column;- gap: 6px;-}--.syncSummary {- margin: 0;- font-size: 12px;- line-height: 18px;- color: var(--dsw-alias-label-secondary);-}--.syncResult {- display: flex;- align-items: center;- gap: 8px;- flex-wrap: wrap;-}--.syncResultName {- font-size: 12px;- line-height: 18px;- font-weight: 500;- color: var(--dsw-alias-label-primary);-}--.syncOk {- font-size: 12px;- line-height: 18px;- color: var(--dsw-alias-state-success-primary);-}diff --git a/packages/dsh-tauri-ssh-ui/src/client/components/machines-section.test.tsx b/packages/dsh-tauri-ssh-ui/src/client/components/machines-section.test.tsxindex 5440c43d..75b0bf98 100644--- a/packages/dsh-tauri-ssh-ui/src/client/components/machines-section.test.tsx+++ b/packages/dsh-tauri-ssh-ui/src/client/components/machines-section.test.tsx@@ -1,13 +1,22 @@-import type { SshKey } from '../locales/index.js'-import type { FetchFn, MachineRow, SshApiResponse } from '../store/index.js'-import type { RemoteBridge } from '../types/index.js'+import type { SshKey } from '../locales/index'+import type { FetchFn, MachineRow, SshApiResponse } from '../store/index'+import type { RemoteBridge } from '../types/index'import { fireEvent, screen, waitFor, within } from '@testing-library/dom'import { act, cleanup, render } from '@testing-library/react'// @vitest-environment jsdomimport { afterEach, describe, expect, it, vi } from 'vitest'-import { en } from '../locales/index.js'-import { MachinesStore } from '../store/index.js'-import { MachinesSection } from './machines-section.js'+import { en } from '../locales/index'+import { MachinesStore } from '../store/index'+import { MachinesSection } from './machines-section'+++// dsh-tauri-ui/client 的 dist bundle 以 ModuleLoader 工厂包裹,脱离宿主加载器+// 无法在 node 求值;mock 到同一 cssr 实例的源文件(与 dsh-tauri-panel 同款做法),+// 组件渲染只消费 cls 字符串,不需要真实样式。+vi.mock('dsh-tauri-ui/client', async () => {+ const mod = await import('../../../../dsh-tauri-ui/src/client/utils/cssr.ts')+ return { cssr: mod.cssr }+})afterEach(() => {cleanup()diff --git a/packages/dsh-tauri-ssh-ui/src/client/components/sync-panel.test.tsx b/packages/dsh-tauri-ssh-ui/src/client/components/sync-panel.test.tsxindex 635ef013..c8e429bd 100644--- a/packages/dsh-tauri-ssh-ui/src/client/components/sync-panel.test.tsx+++ b/packages/dsh-tauri-ssh-ui/src/client/components/sync-panel.test.tsx@@ -1,12 +1,21 @@-import type { SshKey } from '../locales/index.js'-import type { FetchFn, MachineRow } from '../store/index.js'+import type { SshKey } from '../locales/index'+import type { FetchFn, MachineRow } from '../store/index'import { fireEvent, screen, waitFor } from '@testing-library/dom'import { cleanup, render } from '@testing-library/react'// @vitest-environment jsdomimport { afterEach, describe, expect, it, vi } from 'vitest'-import { en } from '../locales/index.js'-import { MachinesStore } from '../store/index.js'-import { SyncPanel } from './sync-panel.js'+import { en } from '../locales/index'+import { MachinesStore } from '../store/index'+import { SyncPanel } from './sync-panel'+++// dsh-tauri-ui/client 的 dist bundle 以 ModuleLoader 工厂包裹,脱离宿主加载器+// 无法在 node 求值;mock 到同一 cssr 实例的源文件(与 dsh-tauri-panel 同款做法),+// 组件渲染只消费 cls 字符串,不需要真实样式。+vi.mock('dsh-tauri-ui/client', async () => {+ const mod = await import('../../../../dsh-tauri-ui/src/client/utils/cssr.ts')+ return { cssr: mod.cssr }+})afterEach(() => {cleanup()diff --git a/packages/dsh-tauri-ssh-ui/src/client/components/sync-panel.tsx b/packages/dsh-tauri-ssh-ui/src/client/components/sync-panel.tsxindex 91a07852..2f2d6f92 100644--- a/packages/dsh-tauri-ssh-ui/src/client/components/sync-panel.tsx+++ b/packages/dsh-tauri-ssh-ui/src/client/components/sync-panel.tsx@@ -12,13 +12,13 @@*/import type { ReactNode } from 'react'-import type { SshKey } from '../locales/index.js'-import type { MachineRow, MachinesStore } from '../store/index.js'-import type { SyncItemResult } from '../types/index.js'+import type { SshKey } from '../locales/index'+import type { MachineRow, MachinesStore } from '../store/index'+import type { SyncItemResult } from '../types/index'import { Button, Pill, StateDot } from '@deepseek-ai/dsh-client-ui-primitives'import { useEffect, useState, useSyncExternalStore } from 'react'-import { toggleSelection } from '../store/index.js'-import css from './machines-section.module.css'+import { toggleSelection } from '../store/index'+import { cls } from '../styles'/** The panel props: the framework `t` seat plus the injected store. */export interface SyncPanelProps {@@ -51,15 +51,15 @@ export function SyncPanel({ store, t }: SyncPanelProps): ReactNode {}return (- <section className={css.syncPanel} data-testid="sync-panel">- <h3 className={css.groupTitle}>{t('sync.title')}</h3>- <p className={css.groupHint}>{t('sync.desc')}</p>+ <section className={cls.syncPanel} data-testid="sync-panel">+ <h3 className={cls.groupTitle}>{t('sync.title')}</h3>+ <p className={cls.groupHint}>{t('sync.desc')}</p>{connected.length === 0- ? <p className={css.hint}>{t('sync.notConnected')}</p>+ ? <p className={cls.hint}>{t('sync.notConnected')}</p>: (<>- <div className={css.syncTargets}>- <span className={css.fieldLabel}>{t('sync.target')}</span>+ <div className={cls.syncTargets}>+ <span className={cls.fieldLabel}>{t('sync.target')}</span>{connected.map(machine => (<Pillkey={machine.id}@@ -74,17 +74,17 @@ export function SyncPanel({ store, t }: SyncPanelProps): ReactNode {{state.sync.status === 'error'? null: preview === null || state.sync.status === 'loading'- ? <p className={css.hint}>{t('loading')}</p>+ ? <p className={cls.hint}>{t('loading')}</p>: (- <div className={css.syncGroups}>- <div className={css.syncGroup}>- <span className={css.fieldLabel}>{t('sync.plugins')}</span>+ <div className={cls.syncGroups}>+ <div className={cls.syncGroup}>+ <span className={cls.fieldLabel}>{t('sync.plugins')}</span>{preview.plugins.length === 0- ? <p className={css.hint}>{t('sync.noPlugins')}</p>+ ? <p className={cls.hint}>{t('sync.noPlugins')}</p>: (- <ul className={css.syncItems}>+ <ul className={cls.syncItems}>{preview.plugins.map(plugin => (- <li key={`plugin:${plugin.spec}`} className={css.syncItem}>+ <li key={`plugin:${plugin.spec}`} className={cls.syncItem}><Pillactive={selected.has(`plugin:${plugin.spec}`)}disabled={!plugin.syncable}@@ -96,21 +96,21 @@ export function SyncPanel({ store, t }: SyncPanelProps): ReactNode {{plugin.name}</Pill>{!plugin.syncable && plugin.reason !== undefined- ? <span className={css.syncReason}>{plugin.reason}</span>+ ? <span className={cls.syncReason}>{plugin.reason}</span>: null}</li>))}</ul>)}</div>- <div className={css.syncGroup}>- <span className={css.fieldLabel}>{t('sync.skills')}</span>+ <div className={cls.syncGroup}>+ <span className={cls.fieldLabel}>{t('sync.skills')}</span>{preview.skills.length === 0- ? <p className={css.hint}>{t('sync.noSkills')}</p>+ ? <p className={cls.hint}>{t('sync.noSkills')}</p>: (- <ul className={css.syncItems}>+ <ul className={cls.syncItems}>{preview.skills.map(skill => (- <li key={`skill:${skill.root}:${skill.name}`} className={css.syncItem}>+ <li key={`skill:${skill.root}:${skill.name}`} className={cls.syncItem}><Pillactive={selected.has(`skill:${skill.root}:${skill.name}`)}aria-pressed={selected.has(`skill:${skill.root}:${skill.name}`)}@@ -118,7 +118,7 @@ export function SyncPanel({ store, t }: SyncPanelProps): ReactNode {onClick={() => setSelected(current => toggleSelection(current, `skill:${skill.root}:${skill.name}`))}>{skill.name}- <span className={css.syncRoot}>{skill.root}</span>+ <span className={cls.syncRoot}>{skill.root}</span></Pill></li>))}@@ -127,7 +127,7 @@ export function SyncPanel({ store, t }: SyncPanelProps): ReactNode {</div></div>)}- <div className={css.syncActions}>+ <div className={cls.syncActions}><Button variant="primary" size="sm" disabled={!canApply} data-testid="sync-apply" onClick={apply}>{state.sync.applying ? t('sync.applying') : t('sync.apply')}</Button>@@ -139,7 +139,7 @@ export function SyncPanel({ store, t }: SyncPanelProps): ReactNode {)}{state.sync.status === 'error'? (- <p className={css.error} role="alert">+ <p className={cls.error} role="alert">{t('sync.loadFailed')}{state.sync.error}</p>@@ -147,7 +147,7 @@ export function SyncPanel({ store, t }: SyncPanelProps): ReactNode {: null}{state.sync.error !== null && state.sync.status !== 'error'? (- <p className={css.error} role="alert">+ <p className={cls.error} role="alert">{t('sync.applyFailed')}{state.sync.error}</p>@@ -164,25 +164,25 @@ export function SyncPanel({ store, t }: SyncPanelProps): ReactNode {function SyncResults({ results, t }: { results: SyncItemResult[], t: (key: SshKey) => string }): ReactNode {const okCount = results.filter(item => item.ok).lengthreturn (- <div className={css.syncResults} data-testid="sync-results">- <p className={css.syncSummary}>{t('sync.done').replace('{ok}', String(okCount)).replace('{total}', String(results.length))}</p>- <ul className={css.syncItems}>+ <div className={cls.syncResults} data-testid="sync-results">+ <p className={cls.syncSummary}>{t('sync.done').replace('{ok}', String(okCount)).replace('{total}', String(results.length))}</p>+ <ul className={cls.syncItems}>{results.map(item => (<likey={`${item.kind}:${item.root ?? ''}:${item.name}`}- className={css.syncResult}+ className={cls.syncResult}data-testid={`sync-result-${item.name}`}data-ok={item.ok}><StateDot state={item.ok ? 'done' : 'error'} size={8} />- <span className={css.syncResultName}>+ <span className={cls.syncResultName}>{item.name}{item.root !== undefined ? ` (${item.root})` : ''}</span>{item.ok- ? <span className={css.syncOk}>{t('sync.itemOk')}</span>+ ? <span className={cls.syncOk}>{t('sync.itemOk')}</span>: (- <span className={css.statusError} role="alert">+ <span className={cls.statusError} role="alert">{t('sync.itemFailed')}{item.error === undefined ? '' : `:${item.error}`}</span>diff --git a/packages/dsh-tauri-ssh-ui/src/client/css-modules.d.ts b/packages/dsh-tauri-ssh-ui/src/client/css-modules.d.tsdeleted file mode 100644index d49faa1c..00000000--- a/packages/dsh-tauri-ssh-ui/src/client/css-modules.d.ts+++ /dev/null@@ -1,5 +0,0 @@-declare module '*.module.css' {- /** Hashed class map compiled by the DSH client bundle preset. */- const classes: Record<string, string>- export default classes-}diff --git a/packages/dsh-tauri-ssh-ui/src/client/index.test.ts b/packages/dsh-tauri-ssh-ui/src/client/index.test.tsindex b63d8842..398846e5 100644--- a/packages/dsh-tauri-ssh-ui/src/client/index.test.ts+++ b/packages/dsh-tauri-ssh-ui/src/client/index.test.ts@@ -1,16 +1,24 @@-import type { UiContext } from './types/index.js'+import type { UiContext } from './types/index'import { afterEach, describe, expect, it, vi } from 'vitest'-import { apply as hostApply } from '../index.js'+import { apply as hostApply } from '../index'import { MachinesSection } from './components/machines-section.tsx'-import { apply, inject } from './index.js'-import { en, zh } from './locales/index.js'-import { desktopBridge } from './service/bridge.js'-import { MachinesStore } from './store/index.js'+import { apply, inject } from './index'+import { en, zh } from './locales/index'+import { desktopBridge } from './service/bridge'+import { MachinesStore } from './store/index'// The desktop invoke bridge resolves through the runtime module table, which// does not exist under vitest; the registrant tests only need its shape.// (vitest hoists vi.mock above the imports, so placement here is safe.)-vi.mock('dsh-tauri/client', () => ({ invokeBridgedTauri: vi.fn(async () => undefined) }))+vi.mock('dsh-tauri/client', () => ({ invoke: vi.fn(async () => undefined) }))++// dsh-tauri-ui/client 的 dist bundle 以 ModuleLoader 工厂包裹,脱离宿主加载器+// 无法在 node 求值;样式挂载只需要一个可观察的 mountStyle 桩,cssr 用源文件+// 实例(与 dsh-tauri-panel 的 cssr 测试同款做法)。+vi.mock('dsh-tauri-ui/client', async () => {+ const mod = await import('../../../dsh-tauri-ui/src/client/utils/cssr.ts')+ return { cssr: mod.cssr, mountStyle: vi.fn(() => () => {}) }+})function scriptedCtx(): {ctx: UiContext@@ -48,7 +56,7 @@ describe('ui-ssh client plugin', () => {it('registers the ssh dictionaries on activation', () => {const { ctx, locale, effects } = scriptedCtx()apply(ctx)- expect(effects).toHaveLength(1)+ expect(effects).toHaveLength(2)effects[0]?.()expect(locale.register).toHaveBeenCalledWith('ssh', { zh, en })expect(locale.bind).toHaveBeenCalledWith('ssh')diff --git a/packages/dsh-tauri-ssh-ui/src/client/index.ts b/packages/dsh-tauri-ssh-ui/src/client/index.tsindex 01769b0e..fa8869f9 100644--- a/packages/dsh-tauri-ssh-ui/src/client/index.ts+++ b/packages/dsh-tauri-ssh-ui/src/client/index.ts@@ -2,17 +2,20 @@* SSH-machines settings page, browser half. Registers the `ssh` dictionary* and one `settings.section` entry; the page state lives in the injected* MachinesStore (machine CRUD and the connection plane, all through the host- * plugin's /api-ssh route). Export discipline: thin apply, everything else- * in feature modules.+ * plugin's /api-ssh route). The css-render style tree mounts once here via+ * ctx.effect (unmounts with the plugin). Export discipline: thin apply,+ * everything else in feature modules.* @module dsh-tauri-ssh-ui/client*/-import type { UiContext } from './types/index.js'-import { MachinesSection } from './components/machines-section.js'-import { SETTINGS_SECTION_ID, SETTINGS_SECTION_ORDER, SETTINGS_SECTION_SLOT, SSH_LOCALE_NS } from './constants/index.js'-import { en, zh } from './locales/index.js'-import { desktopBridge } from './service/bridge.js'-import { MachinesStore } from './store/index.js'+import type { UiContext } from './types'+import { mountStyle } from 'dsh-tauri-ui/client'+import { MachinesSection } from './components/machines-section'+import { SETTINGS_SECTION_ID, SETTINGS_SECTION_ORDER, SETTINGS_SECTION_SLOT, SSH_LOCALE_NS } from './constants'+import { en, zh } from './locales'+import { desktopBridge } from './service/bridge'+import { MachinesStore } from './store'+import { SSH_STYLE_ID, sshStyle } from './styles'/** Required services: the settings slot seam and the locale seat. */export const inject = ['slots', 'locale']@@ -24,6 +27,7 @@ export const inject = ['slots', 'locale']*/export function apply(ctx: UiContext): void {ctx.effect(() => ctx.locale.register(SSH_LOCALE_NS, { zh, en }), 'dsh-tauri-ssh-ui: dictionaries')+ ctx.effect(() => mountStyle(sshStyle, SSH_STYLE_ID), 'dsh-tauri-ssh-ui: styles')const t = ctx.locale.bind(SSH_LOCALE_NS)const store = new MachinesStore((url, init) => fetch(url, init))ctx.slots.inject(SETTINGS_SECTION_SLOT, () => ctx.slots.register({@@ -37,4 +41,4 @@ export function apply(ctx: UiContext): void {}/** The dictionary key union, re-exported for the section props. */-export type { SshKey } from './locales/index.js'+export type { SshKey } from './locales'diff --git a/packages/dsh-tauri-ssh-ui/src/client/locales/index.test.ts b/packages/dsh-tauri-ssh-ui/src/client/locales/index.test.tsindex fb750546..e33d44fc 100644--- a/packages/dsh-tauri-ssh-ui/src/client/locales/index.test.ts+++ b/packages/dsh-tauri-ssh-ui/src/client/locales/index.test.ts@@ -1,5 +1,5 @@import { describe, expect, it } from 'vitest'-import { en, zh } from './index.js'+import { en, zh } from './index'describe('locales', () => {it('en covers every zh key with no extras', () => {diff --git a/packages/dsh-tauri-ssh-ui/src/client/service/bridge.ts b/packages/dsh-tauri-ssh-ui/src/client/service/bridge.tsindex 05960cc6..93ca1004 100644--- a/packages/dsh-tauri-ssh-ui/src/client/service/bridge.ts+++ b/packages/dsh-tauri-ssh-ui/src/client/service/bridge.ts@@ -2,17 +2,17 @@* The desktop-bridge face (C-BRIDGE, S5 owns the shell commands): probing* whether this page sits inside the desktop's iframe invoke bridge, and* asking the shell to open (or focus) a machine's remote window. Both rides- * go through `invokeBridgedTauri` — a timeout or rejection on the ping means- * pure web, where the popup affordance simply never shows.+ * go through `invoke` (the dsh-tauri/client bridge) — a timeout or rejection+ * on the ping means pure web, where the popup affordance simply never shows.* @module dsh-tauri-ssh-ui/client/service/bridge*/-import type { RemoteBridge } from '../types/index.js'-import { invokeBridgedTauri } from 'dsh-tauri/client'-import { REMOTE_BRIDGE_PING_COMMAND, REMOTE_OPEN_WINDOW_COMMAND } from '../constants/index.js'+import type { RemoteBridge } from '../types/index'+import { invoke } from 'dsh-tauri/client'+import { REMOTE_BRIDGE_PING_COMMAND, REMOTE_OPEN_WINDOW_COMMAND } from '../constants/index'/** The real desktop bridge: Tauri commands over the iframe postMessage relay. */export const desktopBridge: RemoteBridge = {- probe: () => invokeBridgedTauri(REMOTE_BRIDGE_PING_COMMAND),- openWindow: (machineId, url) => invokeBridgedTauri(REMOTE_OPEN_WINDOW_COMMAND, { machineId, url }),+ probe: () => invoke(REMOTE_BRIDGE_PING_COMMAND),+ openWindow: (machineId, url) => invoke(REMOTE_OPEN_WINDOW_COMMAND, { machineId, url }),}diff --git a/packages/dsh-tauri-ssh-ui/src/client/store/index.test.ts b/packages/dsh-tauri-ssh-ui/src/client/store/index.test.tsindex 84e53f68..c2a5d0ec 100644--- a/packages/dsh-tauri-ssh-ui/src/client/store/index.test.ts+++ b/packages/dsh-tauri-ssh-ui/src/client/store/index.test.ts@@ -1,6 +1,6 @@-import type { FetchFn, MachineRow, SshApiResponse } from './index.js'+import type { FetchFn, MachineRow, SshApiResponse } from './index'import { describe, expect, it, vi } from 'vitest'-import { machineEventsOf, machineRowOf, MachinesStore, savePayloadOf, toggleSelection } from './index.js'+import { machineEventsOf, machineRowOf, MachinesStore, savePayloadOf, toggleSelection } from './index'type FetchMock = ReturnType<typeof vi.fn<FetchFn>>diff --git a/packages/dsh-tauri-ssh-ui/src/client/store/index.ts b/packages/dsh-tauri-ssh-ui/src/client/store/index.tsindex 546c347a..7a9213ac 100644--- a/packages/dsh-tauri-ssh-ui/src/client/store/index.ts+++ b/packages/dsh-tauri-ssh-ui/src/client/store/index.ts@@ -9,9 +9,9 @@* @module dsh-tauri-ssh-ui/client/store*/-import type { MachineLifecycleState, SshMachineEvent, SyncApplyResult, SyncItemResult, SyncPreview } from '../types/index.js'-import { SSH_API_PATH } from '../constants/index.js'-import { isLifecycleState } from '../types/index.js'+import type { MachineLifecycleState, SshMachineEvent, SyncApplyResult, SyncItemResult, SyncPreview } from '../types/index'+import { SSH_API_PATH } from '../constants/index'+import { isLifecycleState } from '../types/index'/** One redacted machine row (secret fields live only in the form). */export interface MachineRow {diff --git a/packages/dsh-tauri-ssh-ui/src/client/styles/index.cssr.ts b/packages/dsh-tauri-ssh-ui/src/client/styles/index.cssr.tsnew file mode 100644index 00000000..2561cf38--- /dev/null+++ b/packages/dsh-tauri-ssh-ui/src/client/styles/index.cssr.ts@@ -0,0 +1,491 @@+import { cssr } from 'dsh-tauri-ui/client'++const { c } = cssr++/**+ * SSH-machines settings section styles (css-render tree, mounted once by the+ * client apply through ctx.effect). Ported 1:1 from the former CSS Modules+ * sheet: the official primitives (Button / Input / StateDot / Modal / Pill)+ * draw the controls; this tree keeps only layout and token alignment —+ * 14/22 body, 12/18 caption, hairline `border-l2` cards, and the few custom+ * visuals the primitives do not own (the hollow idle dot, the color+ * swatches, the tint switch). Every color resolves through a `--dsw-alias-*`+ * token, so light and dark themes both work without literals.+ *+ * Class names are flat with the plugin prefix (`dshp-ssh-*`); the TSX side+ * consumes them through the `cls` map in `./index.ts` — never hand-write the+ * prefixed strings in components.+ */+export default c([++ c('.dshp-ssh-section', {+ display: 'flex',+ flexDirection: 'column',+ gap: '12px',+ maxWidth: '760px',+ color: 'var(--dsw-alias-label-primary)',+ }),++ c('.dshp-ssh-title', {+ margin: 0,+ fontSize: '18px',+ lineHeight: '28px',+ fontWeight: 600,+ color: 'var(--dsw-alias-label-primary)',+ }),++ c('.dshp-ssh-intro', {+ margin: 0,+ fontSize: '13px',+ lineHeight: '20px',+ color: 'var(--dsw-alias-label-tertiary)',+ }),++ /* The page chrome: refresh / add / save. */+ c('.dshp-ssh-chrome', {+ display: 'flex',+ alignItems: 'center',+ gap: '8px',+ flexWrap: 'wrap',+ }),++ /* The danger seat of an otherwise primitive button (token-aligned color). */+ c('.dshp-ssh-danger-action', {+ color: 'var(--dsw-alias-state-error-primary)',+ }),++ /* "Add machine" keeps the dashed affordance of every other empty-list entry. */+ c('.dshp-ssh-add-action', {+ borderStyle: 'dashed',+ }),++ /* The machine list: one hairline card per machine. */+ c('.dshp-ssh-rows', {+ listStyle: 'none',+ margin: '12px 0 0',+ padding: 0,+ display: 'flex',+ flexDirection: 'column',+ gap: '8px',+ }),++ /* The read-only ~/.ssh/config group header. */+ c('.dshp-ssh-group', {+ display: 'flex',+ flexDirection: 'column',+ gap: '2px',+ marginTop: '12px',+ }),++ c('.dshp-ssh-group-title', {+ margin: 0,+ fontSize: '12px',+ lineHeight: '18px',+ fontWeight: 500,+ color: 'var(--dsw-alias-label-secondary)',+ }),++ c('.dshp-ssh-group-hint', {+ margin: 0,+ fontSize: '12px',+ lineHeight: '18px',+ color: 'var(--dsw-alias-label-tertiary)',+ }),++ c('.dshp-ssh-row-card', {+ border: '1px solid var(--dsw-alias-border-l2)',+ borderRadius: '12px',+ padding: '12px 14px',+ display: 'flex',+ flexDirection: 'column',+ gap: '12px',+ background: 'var(--dsw-alias-bg-layer-3)',+ }),++ c('.dshp-ssh-row-head', {+ display: 'flex',+ alignItems: 'center',+ gap: '10px',+ }),++ c('.dshp-ssh-row-identity', {+ display: 'inline-flex',+ alignItems: 'center',+ gap: '6px',+ minWidth: 0,+ }),++ c('.dshp-ssh-row-name', {+ fontSize: '14px',+ lineHeight: '22px',+ fontWeight: 500,+ color: 'var(--dsw-alias-label-primary)',+ }),++ /* The host as a pill annotation on the name (the settings badge idiom). */+ c('.dshp-ssh-row-tag', {+ flex: 'none',+ padding: '2px 8px',+ border: 'none',+ borderRadius: '999px',+ background: 'var(--dsw-alias-bg-module-platform)',+ fontSize: '11px',+ lineHeight: '16px',+ color: 'var(--dsw-alias-label-secondary)',+ }),++ /* Connection state caption text (the dot itself is StateDot). */+ c('.dshp-ssh-status', {+ fontSize: '12px',+ lineHeight: '18px',+ color: 'var(--dsw-alias-label-tertiary)',+ }),++ /* The hollow idle dot: the one connection state StateDot has no glyph for. */+ c('.dshp-ssh-state-dot', {+ position: 'relative',+ display: 'inline-block',+ flex: 'none',+ width: '8px',+ height: '8px',+ borderRadius: '50%',+ background: 'currentColor',+ color: 'var(--dsw-alias-label-caption)',+ }, [+ c('&::after', {+ content: '\'\'',+ position: 'absolute',+ inset: '25%',+ borderRadius: '50%',+ background: 'currentColor',+ }),+ ]),++ /* Identity color pip next to the machine name. */+ c('.dshp-ssh-color-pip', {+ display: 'inline-block',+ flex: 'none',+ width: '10px',+ height: '10px',+ borderRadius: '50%',+ boxShadow: 'inset 0 0 0 1px rgb(0 0 0 / 12%)',+ }),++ /* The appearance row: swatches + the tint-border switch. */+ c('.dshp-ssh-appearance', {+ display: 'flex',+ alignItems: 'center',+ gap: '10px',+ flexWrap: 'wrap',+ }),++ c('.dshp-ssh-swatches', {+ display: 'inline-flex',+ alignItems: 'center',+ gap: '6px',+ flexWrap: 'wrap',+ }),++ c('.dshp-ssh-swatch', {+ boxSizing: 'border-box',+ width: '20px',+ height: '20px',+ padding: 0,+ border: '1px solid var(--dsw-alias-border-l2)',+ borderRadius: '50%',+ background: 'var(--swatch-color)',+ cursor: 'pointer',+ }, [+ c('&:hover', {+ borderColor: 'var(--dsw-alias-border-l4)',+ }),+ c('&[data-selected=\'true\']', {+ outline: '2px solid var(--dsw-alias-brand-primary)',+ outlineOffset: '2px',+ }),+ ]),++ /* The "default" reset swatch: hollow with a diagonal strike. */+ c('.dshp-ssh-swatch-none', {+ background: 'linear-gradient(to top right, transparent calc(50% - 1px), var(--dsw-alias-label-tertiary), transparent calc(50% + 1px))',+ }),++ c('.dshp-ssh-switch-row', {+ display: 'inline-flex',+ alignItems: 'center',+ gap: '8px',+ marginLeft: '4px',+ }),++ /* The hand-rolled toggle (the SubagentModelSelectionCard vocabulary). */+ c('.dshp-ssh-switch', {+ position: 'relative',+ width: '36px',+ height: '20px',+ padding: 0,+ border: 'none',+ borderRadius: '10px',+ background: 'var(--dsw-alias-border-l3)',+ cursor: 'pointer',+ transition: 'background 0.15s var(--ds-ease-in-out)',+ }, [+ c('&::after', {+ content: '\'\'',+ position: 'absolute',+ top: '2px',+ left: '2px',+ width: '16px',+ height: '16px',+ borderRadius: '50%',+ background: 'var(--dsw-alias-bg-layer-1)',+ boxShadow: '0 1px 2px rgb(0 0 0 / 20%)',+ transition: 'transform 0.15s var(--ds-ease-in-out)',+ }),+ c('&[aria-checked=\'true\']', {+ background: 'var(--dsw-alias-state-business-primary)',+ }, [+ c('&::after', {+ transform: 'translateX(16px)',+ }),+ ]),+ c('&:disabled', {+ opacity: 0.4,+ cursor: 'default',+ }),+ ]),++ c('.dshp-ssh-row-actions', {+ display: 'inline-flex',+ alignItems: 'center',+ gap: '4px',+ marginLeft: 'auto',+ }),++ /* The editing surface: a filled module on the panel. */+ c('.dshp-ssh-editor', {+ borderRadius: '12px',+ background: 'var(--dsw-alias-bg-module-platform)',+ padding: '14px 16px',+ display: 'flex',+ flexDirection: 'column',+ gap: '12px',+ }),++ c('.dshp-ssh-grid', {+ display: 'grid',+ gridTemplateColumns: 'repeat(auto-fit, minmax(170px, 1fr))',+ gap: '8px 12px',+ }),++ c('.dshp-ssh-field', {+ display: 'flex',+ flexDirection: 'column',+ gap: '6px',+ }),++ c('.dshp-ssh-field-label', {+ fontSize: '12px',+ lineHeight: '18px',+ fontWeight: 500,+ color: 'var(--dsw-alias-label-secondary)',+ }),++ /* The Input primitive draws the box; the field makes it fill the grid cell. */+ c('.dshp-ssh-field-input', {+ width: '100%',+ }),++ /* Per-machine status lines. */+ c('.dshp-ssh-status-error', {+ margin: 0,+ fontSize: '12px',+ lineHeight: '18px',+ color: 'var(--dsw-alias-state-error-primary)',+ }),++ c('.dshp-ssh-link', {+ margin: 0,+ fontSize: '12px',+ lineHeight: '18px',+ fontFamily: 'var(--ds-font-family-code)',+ color: 'var(--dsw-alias-label-tertiary)',+ overflowWrap: 'anywhere',+ }),++ /* The streaming log surface (machine.events lines, or the progress log). */+ c('.dshp-ssh-log-stream', {+ margin: 0,+ maxHeight: '160px',+ overflow: 'auto',+ whiteSpace: 'pre-wrap',+ overflowWrap: 'anywhere',+ fontFamily: 'var(--ds-font-family-code)',+ fontSize: '11px',+ lineHeight: '16px',+ color: 'var(--dsw-alias-label-tertiary)',+ }),++ /* The one-click install surface (dsh missing on the remote). */+ c('.dshp-ssh-install-box', {+ display: 'flex',+ flexDirection: 'column',+ gap: '8px',+ padding: '10px 12px',+ border: '1px solid var(--dsw-alias-border-l2)',+ borderRadius: '8px',+ background: 'var(--dsw-alias-surface-tinted)',+ }),++ c('.dshp-ssh-install-hint', {+ margin: 0,+ fontSize: '12px',+ lineHeight: '18px',+ color: 'var(--dsw-alias-label-secondary)',+ }),++ c('.dshp-ssh-install-note', {+ margin: 0,+ fontSize: '12px',+ lineHeight: '18px',+ color: 'var(--dsw-alias-label-secondary)',+ }),++ /* Page-level banners. */+ c('.dshp-ssh-notice', {+ margin: 0,+ fontSize: '12px',+ lineHeight: '18px',+ color: 'var(--dsw-alias-label-secondary)',+ }),++ c('.dshp-ssh-error', {+ margin: 0,+ fontSize: '12px',+ lineHeight: '18px',+ color: 'var(--dsw-alias-state-error-primary)',+ }),++ c('.dshp-ssh-hint', {+ margin: 0,+ fontSize: '12px',+ lineHeight: '18px',+ color: 'var(--dsw-alias-label-tertiary)',+ }),++ c('.dshp-ssh-empty', {+ margin: 0,+ padding: '12px',+ border: '1px dashed var(--dsw-alias-border-l3)',+ borderRadius: '8px',+ textAlign: 'center',+ fontSize: '12px',+ lineHeight: '18px',+ color: 'var(--dsw-alias-label-tertiary)',+ }),++ /* The load-failure block: empty state plus the retry affordance. */+ c('.dshp-ssh-empty-block', {+ display: 'flex',+ flexDirection: 'column',+ alignItems: 'flex-start',+ gap: '8px',+ }),++ /* The sync panel (a section-level group under the machine list). */+ c('.dshp-ssh-sync-panel', {+ display: 'flex',+ flexDirection: 'column',+ gap: '10px',+ marginTop: '12px',+ paddingTop: '12px',+ borderTop: '1px solid var(--dsw-alias-border-l2)',+ }),++ c('.dshp-ssh-sync-targets', {+ display: 'flex',+ alignItems: 'center',+ gap: '6px',+ flexWrap: 'wrap',+ }),++ c('.dshp-ssh-sync-groups', {+ display: 'flex',+ flexDirection: 'column',+ gap: '10px',+ }),++ c('.dshp-ssh-sync-group', {+ display: 'flex',+ flexDirection: 'column',+ gap: '6px',+ }),++ c('.dshp-ssh-sync-items', {+ listStyle: 'none',+ margin: 0,+ padding: 0,+ display: 'flex',+ flexDirection: 'column',+ gap: '4px',+ }),++ c('.dshp-ssh-sync-item', {+ display: 'flex',+ alignItems: 'center',+ gap: '8px',+ flexWrap: 'wrap',+ }),++ c('.dshp-ssh-sync-reason', {+ fontSize: '12px',+ lineHeight: '18px',+ color: 'var(--dsw-alias-state-warning-primary, var(--dsw-alias-label-tertiary))',+ }),++ /* The root tag inside a skill pill. */+ c('.dshp-ssh-sync-root', {+ marginLeft: '6px',+ fontSize: '10px',+ lineHeight: '14px',+ color: 'var(--dsw-alias-label-tertiary)',+ }),++ c('.dshp-ssh-sync-actions', {+ display: 'flex',+ alignItems: 'center',+ gap: '8px',+ }),++ c('.dshp-ssh-sync-results', {+ display: 'flex',+ flexDirection: 'column',+ gap: '6px',+ }),++ c('.dshp-ssh-sync-summary', {+ margin: 0,+ fontSize: '12px',+ lineHeight: '18px',+ color: 'var(--dsw-alias-label-secondary)',+ }),++ c('.dshp-ssh-sync-result', {+ display: 'flex',+ alignItems: 'center',+ gap: '8px',+ flexWrap: 'wrap',+ }),++ c('.dshp-ssh-sync-result-name', {+ fontSize: '12px',+ lineHeight: '18px',+ fontWeight: 500,+ color: 'var(--dsw-alias-label-primary)',+ }),++ c('.dshp-ssh-sync-ok', {+ fontSize: '12px',+ lineHeight: '18px',+ color: 'var(--dsw-alias-state-success-primary)',+ }),+])diff --git a/packages/dsh-tauri-ssh-ui/src/client/styles/index.ts b/packages/dsh-tauri-ssh-ui/src/client/styles/index.tsnew file mode 100644index 00000000..17e6da56--- /dev/null+++ b/packages/dsh-tauri-ssh-ui/src/client/styles/index.ts@@ -0,0 +1,78 @@+/**+ * Style barrel of the SSH-machines settings page: the css-render tree (in+ * `index.cssr.ts`), its mount id, and the `cls` map the components consume.+ * Class names keep the plugin prefix (`dshp-ssh-*`); components never+ * hand-write the prefixed strings.+ * @module dsh-tauri-ssh-ui/client/styles+ */++import sshStyle from './index.cssr'++/** The mounted stylesheet id (style tag identity, plugin-prefixed). */+export const SSH_STYLE_ID = 'dsh-tauri-ssh-ui-styles'++/** The css-render tree, mounted once by the client apply via ctx.effect. */+export { sshStyle }++/**+ * Logical class map (the former CSS-Modules keys) → prefixed class names.+ * Keys mirror the old `css.*` references one-to-one so the components read+ * unchanged in shape.+ */+export const cls = {+ section: 'dshp-ssh-section',+ title: 'dshp-ssh-title',+ intro: 'dshp-ssh-intro',+ chrome: 'dshp-ssh-chrome',+ dangerAction: 'dshp-ssh-danger-action',+ addAction: 'dshp-ssh-add-action',+ rows: 'dshp-ssh-rows',+ group: 'dshp-ssh-group',+ groupTitle: 'dshp-ssh-group-title',+ groupHint: 'dshp-ssh-group-hint',+ rowCard: 'dshp-ssh-row-card',+ rowHead: 'dshp-ssh-row-head',+ rowIdentity: 'dshp-ssh-row-identity',+ rowName: 'dshp-ssh-row-name',+ rowTag: 'dshp-ssh-row-tag',+ status: 'dshp-ssh-status',+ stateDot: 'dshp-ssh-state-dot',+ colorPip: 'dshp-ssh-color-pip',+ appearance: 'dshp-ssh-appearance',+ swatches: 'dshp-ssh-swatches',+ swatch: 'dshp-ssh-swatch',+ swatchNone: 'dshp-ssh-swatch-none',+ switchRow: 'dshp-ssh-switch-row',+ switch: 'dshp-ssh-switch',+ rowActions: 'dshp-ssh-row-actions',+ editor: 'dshp-ssh-editor',+ grid: 'dshp-ssh-grid',+ field: 'dshp-ssh-field',+ fieldLabel: 'dshp-ssh-field-label',+ fieldInput: 'dshp-ssh-field-input',+ statusError: 'dshp-ssh-status-error',+ link: 'dshp-ssh-link',+ logStream: 'dshp-ssh-log-stream',+ installBox: 'dshp-ssh-install-box',+ installHint: 'dshp-ssh-install-hint',+ installNote: 'dshp-ssh-install-note',+ notice: 'dshp-ssh-notice',+ error: 'dshp-ssh-error',+ hint: 'dshp-ssh-hint',+ empty: 'dshp-ssh-empty',+ emptyBlock: 'dshp-ssh-empty-block',+ syncPanel: 'dshp-ssh-sync-panel',+ syncTargets: 'dshp-ssh-sync-targets',+ syncGroups: 'dshp-ssh-sync-groups',+ syncGroup: 'dshp-ssh-sync-group',+ syncItems: 'dshp-ssh-sync-items',+ syncItem: 'dshp-ssh-sync-item',+ syncReason: 'dshp-ssh-sync-reason',+ syncRoot: 'dshp-ssh-sync-root',+ syncActions: 'dshp-ssh-sync-actions',+ syncResults: 'dshp-ssh-sync-results',+ syncSummary: 'dshp-ssh-sync-summary',+ syncResult: 'dshp-ssh-sync-result',+ syncResultName: 'dshp-ssh-sync-result-name',+ syncOk: 'dshp-ssh-sync-ok',+} as constdiff --git a/packages/dsh-tauri-ssh-ui/src/client/types/index.ts b/packages/dsh-tauri-ssh-ui/src/client/types/index.tsindex f585fa29..a27555b7 100644--- a/packages/dsh-tauri-ssh-ui/src/client/types/index.ts+++ b/packages/dsh-tauri-ssh-ui/src/client/types/index.ts@@ -48,5 +48,5 @@ export type {SyncPluginItem,SyncPreview,SyncSkillItem,-} from './sync.js'-export { isLifecycleState } from './sync.js'+} from './sync'+export { isLifecycleState } from './sync'diff --git a/packages/dsh-tauri-ssh-ui/src/client/utils/retry.test.ts b/packages/dsh-tauri-ssh-ui/src/client/utils/retry.test.tsnew file mode 100644index 00000000..65a27d25--- /dev/null+++ b/packages/dsh-tauri-ssh-ui/src/client/utils/retry.test.ts@@ -0,0 +1,17 @@+import { describe, expect, it } from 'vitest'+import { retrySecondsOf } from './retry'++describe('retrySecondsOf', () => {+ const now = 1_700_000_000_000++ it('rounds a partial remaining second up to a full one', () => {+ expect(retrySecondsOf(now + 8_000, now)).toBe(8)+ expect(retrySecondsOf(now + 7_001, now)).toBe(8)+ expect(retrySecondsOf(now + 7_000, now)).toBe(7)+ })++ it('reads zero for a retry that is due now or already overdue', () => {+ expect(retrySecondsOf(now, now)).toBe(0)+ expect(retrySecondsOf(now - 5_000, now)).toBe(0)+ })+})diff --git a/packages/dsh-tauri-ssh-ui/src/types/dsh.d.ts b/packages/dsh-tauri-ssh-ui/src/types/dsh.d.tsdeleted file mode 100644index 77aad9a6..00000000--- a/packages/dsh-tauri-ssh-ui/src/types/dsh.d.ts+++ /dev/null@@ -1,20 +0,0 @@-/**- * Host-runtime compile-time declarations for the modules this plugin's client- * bundle requires through the DSH module table (the scheduler-plugin- * precedent): the desktop invoke bridge re-exported by `dsh-tauri/client`.- * No runtime dependency is declared — the loader resolves the specifier- * against the module table (see the `dsh-tauri` inject entry in- * package.json), so these mirrors exist purely for `tsc`.- */--declare module 'dsh-tauri/client' {- /**- * Call one Tauri command through the desktop iframe invoke bridge; the- * promise rejects on a command error or when the host never answers- * (timeout — i.e. this page is not embedded in the desktop shell).- */- export function invokeBridgedTauri<T>(- cmd: string,- args?: Record<string, unknown>,- ): Promise<T>-}diff --git a/packages/dsh-tauri-ssh-ui/tsdown.config.ts b/packages/dsh-tauri-ssh-ui/tsdown.config.tsindex 99cdeba5..3280fec7 100644--- a/packages/dsh-tauri-ssh-ui/tsdown.config.ts+++ b/packages/dsh-tauri-ssh-ui/tsdown.config.ts@@ -1,4 +1,4 @@-import { defineDshConfig } from 'dsh-tauri-tsdown'+import { defineDshConfig } from '../dsh-tauri-tsdown/src/index.ts'// Host stub (src/index.ts) + browser client bundle (src/client/index.ts)// wrapped in the dsh-client-modules closure factory.diff --git a/packages/dsh-tauri-ssh/e2e/give-up.e2e.ts b/packages/dsh-tauri-ssh/e2e/give-up.e2e.tsindex 08d7e5d7..0c55d94a 100644--- a/packages/dsh-tauri-ssh/e2e/give-up.e2e.ts+++ b/packages/dsh-tauri-ssh/e2e/give-up.e2e.ts@@ -6,9 +6,9 @@* @module dsh-tauri-ssh/e2e/give-up*/-import type { MachineProfile } from '../src/host/types/index.js'+import type { MachineProfile } from '../src/host/types/index'import { describe, expect, it } from 'vitest'-import { bootHarness, id, waitFor } from './helpers.js'+import { bootHarness, id, waitFor } from './helpers'const profile: MachineProfile = {id: id('unreachable'),diff --git a/packages/dsh-tauri-ssh/e2e/password-chain.e2e.ts b/packages/dsh-tauri-ssh/e2e/password-chain.e2e.tsindex 161389e2..3dbb2239 100644--- a/packages/dsh-tauri-ssh/e2e/password-chain.e2e.ts+++ b/packages/dsh-tauri-ssh/e2e/password-chain.e2e.ts@@ -15,14 +15,14 @@*/import type { Connection, Server as SshServer } from 'ssh2'-import type { MachineProfile } from '../src/host/types/index.js'+import type { MachineProfile } from '../src/host/types/index'import { generateKeyPairSync } from 'node:crypto'import { mkdtempSync, rmSync, writeFileSync } from 'node:fs'import { tmpdir } from 'node:os'import { join } from 'pathe'import { Server } from 'ssh2'import { afterAll, beforeAll, describe, expect, it } from 'vitest'-import { bootHarness, id } from './helpers.js'+import { bootHarness, id } from './helpers'const PASSWORD = 'e2e-trustno1'diff --git a/packages/dsh-tauri-ssh/e2e/reconnect-drop.e2e.ts b/packages/dsh-tauri-ssh/e2e/reconnect-drop.e2e.tsindex 9fdf4f73..c389e33c 100644--- a/packages/dsh-tauri-ssh/e2e/reconnect-drop.e2e.ts+++ b/packages/dsh-tauri-ssh/e2e/reconnect-drop.e2e.ts@@ -12,10 +12,10 @@* @module dsh-tauri-ssh/e2e/reconnect-drop*/-import type { MachineProfile } from '../src/host/types/index.js'+import type { MachineProfile } from '../src/host/types/index'import { execSync } from 'node:child_process'import { describe, expect, it } from 'vitest'-import { bootHarness, id, waitFor } from './helpers.js'+import { bootHarness, id, waitFor } from './helpers'const REMOTE_PORT = 3100diff --git a/packages/dsh-tauri-ssh/e2e/watchdog.e2e.ts b/packages/dsh-tauri-ssh/e2e/watchdog.e2e.tsindex 8e13369f..445bafb0 100644--- a/packages/dsh-tauri-ssh/e2e/watchdog.e2e.ts+++ b/packages/dsh-tauri-ssh/e2e/watchdog.e2e.ts@@ -8,17 +8,17 @@*/import type { Connection, Server as SshServer } from 'ssh2'-import type { MachineProfile } from '../src/host/types/index.js'+import type { MachineProfile } from '../src/host/types/index'import { mkdtempSync, rmSync, writeFileSync } from 'node:fs'import { createServer, connect as tcpConnect } from 'node:net'import { homedir, tmpdir } from 'node:os'import { join } from 'pathe'import { Server } from 'ssh2'import { afterAll, beforeAll, describe, expect, it } from 'vitest'-import { SshConfigResolver } from '../src/host/service/ssh-config.js'-import { Ssh2Transport } from '../src/host/service/transport.js'-import { MachineId } from '../src/host/types/index.js'-import { freshRsaPem } from './helpers.js'+import { SshConfigResolver } from '../src/host/service/ssh-config'+import { Ssh2Transport } from '../src/host/service/transport'+import { MachineId } from '../src/host/types/index'+import { freshRsaPem } from './helpers'const PASSWORD = 'e2e-watchdog'const KEEPALIVE_INTERVAL_MS = 1_000diff --git a/packages/dsh-tauri-ssh/package.json b/packages/dsh-tauri-ssh/package.jsonindex 70f44930..8dff1cbf 100644--- a/packages/dsh-tauri-ssh/package.json+++ b/packages/dsh-tauri-ssh/package.json@@ -24,10 +24,7 @@],"sideEffects": false,"exports": {- ".": {- "types": "./dist/index.d.ts",- "default": "./dist/index.js"- },+ ".": "./dist/index.js","./package.json": "./package.json"},"main": "./dist/index.js",@@ -46,6 +43,7 @@"build": "tsdown","dev": "tsdown --watch","prepublishOnly": "nr build",+ "start": "tsx src/index.ts","test": "vitest run","typecheck": "tsc","test:e2e": "vitest run --config e2e.vitest.config.ts"diff --git a/packages/dsh-tauri-ssh/src/host/apply.test.ts b/packages/dsh-tauri-ssh/src/host/apply.test.tsindex bfac405e..4166fce2 100644--- a/packages/dsh-tauri-ssh/src/host/apply.test.ts+++ b/packages/dsh-tauri-ssh/src/host/apply.test.ts@@ -1,13 +1,13 @@import type z from 'schemastery'-import type { Config as SshRemoteConfig } from './storage/index.js'-import type { SshHostContext } from './types/index.js'+import type { Config as SshRemoteConfig } from './storage/index'+import type { SshHostContext } from './types/index'import { mkdtempSync, rmSync, writeFileSync } from 'node:fs'import { homedir, tmpdir } from 'node:os'import { join } from 'pathe'import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'-import { apply, inject, name, SshRemoteService } from './apply.js'-import { MACHINES_NAMESPACE } from './storage/index.js'-import { MachineId } from './types/index.js'+import { apply, inject, name, SshRemoteService } from './apply'+import { MACHINES_NAMESPACE } from './storage/index'+import { MachineId } from './types/index'/** Scripted settings scope double. */function scriptedSettings() {@@ -158,7 +158,7 @@ describe('ssh-remote plugin', () => {})it('ships the cordis plugin descriptor as the default export', async () => {- const descriptor = (await import('./apply.js')).default+ const descriptor = (await import('./apply')).defaultexpect(descriptor).toMatchObject({name: 'dsh-tauri-ssh',inject: ['settings', 'webServer'],diff --git a/packages/dsh-tauri-ssh/src/host/routes/index.test.ts b/packages/dsh-tauri-ssh/src/host/routes/index.test.tsindex 3afcd7d5..0f492e37 100644--- a/packages/dsh-tauri-ssh/src/host/routes/index.test.ts+++ b/packages/dsh-tauri-ssh/src/host/routes/index.test.ts@@ -1,12 +1,12 @@-import type { MachineView, SshTestResult } from '../types/index.js'-import type { SshApiHost, SshApiResponse } from './index.js'+import type { MachineView, SshTestResult } from '../types/index'+import type { SshApiHost, SshApiResponse } from './index'import { Buffer } from 'node:buffer'import { IncomingMessage, ServerResponse } from 'node:http'import { Socket } from 'node:net'import { describe, expect, it, vi } from 'vitest'-import { SshMachineEvents } from '../service/events.js'-import { MachineId, SshError } from '../types/index.js'-import { createSshApiHandler, isLoopbackPeer } from './index.js'+import { SshMachineEvents } from '../service/events'+import { MachineId, SshError } from '../types/index'+import { createSshApiHandler, isLoopbackPeer } from './index'const view: MachineView = {id: MachineId('m1'),diff --git a/packages/dsh-tauri-ssh/src/host/service/assets.test.ts b/packages/dsh-tauri-ssh/src/host/service/assets.test.tsindex c56649b6..65077d0d 100644--- a/packages/dsh-tauri-ssh/src/host/service/assets.test.ts+++ b/packages/dsh-tauri-ssh/src/host/service/assets.test.ts@@ -9,7 +9,7 @@ import {parsePlatform,pnpmDownloadUrls,UnsupportedRemotePlatformError,-} from './assets.js'+} from './assets'describe('parsePlatform', () => {it('maps uname output onto repo identifiers (amd64/aarch64 aliases included)', () => {diff --git a/packages/dsh-tauri-ssh/src/host/service/boot-html.test.ts b/packages/dsh-tauri-ssh/src/host/service/boot-html.test.tsindex 0b2530f1..d2148e52 100644--- a/packages/dsh-tauri-ssh/src/host/service/boot-html.test.ts+++ b/packages/dsh-tauri-ssh/src/host/service/boot-html.test.ts@@ -1,5 +1,5 @@import { describe, expect, it } from 'vitest'-import { clientUrlsFromBootHtml, decodeHtmlAttribute, isClientBundlePath, looksLikePluginBundle } from './boot-html.js'+import { clientUrlsFromBootHtml, decodeHtmlAttribute, isClientBundlePath, looksLikePluginBundle } from './boot-html'/** A realistic rc-line boot page: combo preload script + entries graph. */const BOOT_HTML = [diff --git a/packages/dsh-tauri-ssh/src/host/service/bootstrap.arm64-dryrun.test.ts b/packages/dsh-tauri-ssh/src/host/service/bootstrap.arm64-dryrun.test.tsindex 6f27ff83..5e535ed9 100644--- a/packages/dsh-tauri-ssh/src/host/service/bootstrap.arm64-dryrun.test.ts+++ b/packages/dsh-tauri-ssh/src/host/service/bootstrap.arm64-dryrun.test.ts@@ -11,7 +11,7 @@*/import { describe, expect, it } from 'vitest'-import { buildInstallScript, planRemoteInstall } from './bootstrap.js'+import { buildInstallScript, planRemoteInstall } from './bootstrap'const RUN = process.env.DSH_SSH_ARM64_DRYRUN === '1'diff --git a/packages/dsh-tauri-ssh/src/host/service/bootstrap.e2e.test.ts b/packages/dsh-tauri-ssh/src/host/service/bootstrap.e2e.test.tsindex bdda85ed..918a988c 100644--- a/packages/dsh-tauri-ssh/src/host/service/bootstrap.e2e.test.ts+++ b/packages/dsh-tauri-ssh/src/host/service/bootstrap.e2e.test.ts@@ -15,18 +15,18 @@*//* eslint-disable no-console -- the run's console output IS the recorded evidence */-import type { MachineProfile, SshLink } from '../types/index.js'-import type { SshTransport } from './transport.js'+import type { MachineProfile, SshLink } from '../types/index'+import type { SshTransport } from './transport'import { mkdtempSync, rmSync } from 'node:fs'import { tmpdir } from 'node:os'import { join } from 'pathe'import { afterAll, beforeAll, describe, expect, it } from 'vitest'-import { MachineId } from '../types/index.js'-import { SshMachineEvents } from './events.js'-import { KnownHostsStore } from './host-keys.js'-import { SshManager } from './manager.js'-import { SshConfigResolver } from './ssh-config.js'-import { Ssh2Transport } from './transport.js'+import { MachineId } from '../types/index'+import { SshMachineEvents } from './events'+import { KnownHostsStore } from './host-keys'+import { SshManager } from './manager'+import { SshConfigResolver } from './ssh-config'+import { Ssh2Transport } from './transport'/** The shared dev machine alias from `~/.ssh/config` (key auth). */const HOST = process.env.DSH_SSH_E2E_HOSTdiff --git a/packages/dsh-tauri-ssh/src/host/service/bootstrap.test.ts b/packages/dsh-tauri-ssh/src/host/service/bootstrap.test.tsindex 23e86077..60c7190a 100644--- a/packages/dsh-tauri-ssh/src/host/service/bootstrap.test.ts+++ b/packages/dsh-tauri-ssh/src/host/service/bootstrap.test.ts@@ -1,6 +1,6 @@-import type { MachineProfile } from '../types/index.js'-import type { RemoteInstallPlan } from './bootstrap.js'-import type { SshExecOptions, SshExecResult, SshSession } from './transport.js'+import type { MachineProfile } from '../types/index'+import type { RemoteInstallPlan } from './bootstrap'+import type { SshExecOptions, SshExecResult, SshSession } from './transport'import { Buffer } from 'node:buffer'import { execFile } from 'node:child_process'import { createHash } from 'node:crypto'@@ -9,7 +9,7 @@ import { tmpdir } from 'node:os'import { promisify } from 'node:util'import { join } from 'pathe'import { afterEach, describe, expect, it } from 'vitest'-import { MachineId } from '../types/index.js'+import { MachineId } from '../types/index'import {buildInstallScript,bundleProbeCommand,@@ -31,7 +31,7 @@ import {skippedVerificationSummary,splitBundleProbeStdout,startCommandFor,-} from './bootstrap.js'+} from './bootstrap'const profile: MachineProfile = {id: MachineId('m1'),diff --git a/packages/dsh-tauri-ssh/src/host/service/bootstrap.ts b/packages/dsh-tauri-ssh/src/host/service/bootstrap.tsindex 62600bc1..0e0743be 100644--- a/packages/dsh-tauri-ssh/src/host/service/bootstrap.ts+++ b/packages/dsh-tauri-ssh/src/host/service/bootstrap.ts@@ -13,16 +13,16 @@* @module dsh-tauri-ssh/host/service/bootstrap*/-import type { Config } from '../storage/index.js'-import type { MachineProfile, SshMachineStage, SshMachineTerminal, SshProgress } from '../types/index.js'-import type { RemoteArch, RemoteAssetMatrix, RemoteOs } from './assets.js'-import type { SshSession } from './transport.js'+import type { Config } from '../storage/index'+import type { MachineProfile, SshMachineStage, SshMachineTerminal, SshProgress } from '../types/index'+import type { RemoteArch, RemoteAssetMatrix, RemoteOs } from './assets'+import type { SshSession } from './transport'import { Buffer } from 'node:buffer'import { readFileSync } from 'node:fs'-import { assetMatrixFor, dshNpmTarballUrls, dshZipDownloadUrls, nodeDownloadUrls, nodeFilenameFor, nodeShasumUrls, parsePlatform, PNPM_SHA256, PNPM_VERSION, pnpmDownloadUrls } from './assets.js'-import { clientUrlsFromBootHtml, looksLikePluginBundle } from './boot-html.js'-import { shQuote } from './transport.js'-import { listGithubAssets, listGithubReleases, npmDistMetadata, parseGitHubRepo, pickReleaseTag, pkgRepoOf } from './version.js'+import { assetMatrixFor, dshNpmTarballUrls, dshZipDownloadUrls, nodeDownloadUrls, nodeFilenameFor, nodeShasumUrls, parsePlatform, PNPM_SHA256, PNPM_VERSION, pnpmDownloadUrls } from './assets'+import { clientUrlsFromBootHtml, looksLikePluginBundle } from './boot-html'+import { shQuote } from './transport'+import { listGithubAssets, listGithubReleases, npmDistMetadata, parseGitHubRepo, pickReleaseTag, pkgRepoOf } from './version'/** Log file of the auto-started remote instance, under the remote home. */export const REMOTE_WEB_LOG = '.dsh/dsh-remote-web.log'diff --git a/packages/dsh-tauri-ssh/src/host/service/events.test.ts b/packages/dsh-tauri-ssh/src/host/service/events.test.tsindex 9661d059..c8a35296 100644--- a/packages/dsh-tauri-ssh/src/host/service/events.test.ts+++ b/packages/dsh-tauri-ssh/src/host/service/events.test.ts@@ -1,6 +1,6 @@import { describe, expect, it } from 'vitest'-import { MachineId } from '../types/index.js'-import { EVENT_RING_CAPACITY, SshMachineEvents } from './events.js'+import { MachineId } from '../types/index'+import { EVENT_RING_CAPACITY, SshMachineEvents } from './events'const m1 = MachineId('m1')const m2 = MachineId('m2')diff --git a/packages/dsh-tauri-ssh/src/host/service/events.ts b/packages/dsh-tauri-ssh/src/host/service/events.tsindex 02b71eae..c4856f07 100644--- a/packages/dsh-tauri-ssh/src/host/service/events.ts+++ b/packages/dsh-tauri-ssh/src/host/service/events.ts@@ -7,7 +7,7 @@* @module dsh-tauri-ssh/host/service/events*/-import type { MachineId, SshMachineEvent, SshMachineEventsPage, SshMachineStage, SshMachineTerminal } from '../types/index.js'+import type { MachineId, SshMachineEvent, SshMachineEventsPage, SshMachineStage, SshMachineTerminal } from '../types/index'export type { SshMachineEvent, SshMachineEventsPage, SshMachineStage, SshMachineTerminal }diff --git a/packages/dsh-tauri-ssh/src/host/service/host-keys.test.ts b/packages/dsh-tauri-ssh/src/host/service/host-keys.test.tsindex bc430b2c..e76fc073 100644--- a/packages/dsh-tauri-ssh/src/host/service/host-keys.test.ts+++ b/packages/dsh-tauri-ssh/src/host/service/host-keys.test.ts@@ -4,8 +4,8 @@ import * as fsPromises from 'node:fs/promises'import { tmpdir } from 'node:os'import { dirname, join } from 'pathe'import { afterEach, describe, expect, it, vi } from 'vitest'-import { MachineId } from '../types/index.js'-import { fingerprintHostKey, KnownHostsStore } from './host-keys.js'+import { MachineId } from '../types/index'+import { fingerprintHostKey, KnownHostsStore } from './host-keys'// Wrap the real fs/promises so one test can force an atomic-rename failure;// every other call passes through to the actual implementation.diff --git a/packages/dsh-tauri-ssh/src/host/service/host-keys.ts b/packages/dsh-tauri-ssh/src/host/service/host-keys.tsindex 6fa6ff9d..53517f9d 100644--- a/packages/dsh-tauri-ssh/src/host/service/host-keys.ts+++ b/packages/dsh-tauri-ssh/src/host/service/host-keys.ts@@ -10,7 +10,7 @@*/import type { Buffer } from 'node:buffer'-import type { MachineId } from '../types/index.js'+import type { MachineId } from '../types/index'import { createHash, randomBytes } from 'node:crypto'import { mkdir, readFile, rename, rm, writeFile } from 'node:fs/promises'import { dirname } from 'pathe'diff --git a/packages/dsh-tauri-ssh/src/host/service/manager.ts b/packages/dsh-tauri-ssh/src/host/service/manager.tsindex 62c4a74a..ca445a2a 100644--- a/packages/dsh-tauri-ssh/src/host/service/manager.ts+++ b/packages/dsh-tauri-ssh/src/host/service/manager.ts@@ -1,5 +1,5 @@import type { Buffer } from 'node:buffer'-import type { Config } from '../storage/index.js'+import type { Config } from '../storage/index'/*** Per-machine connection manager: profile map, the disconnected/connecting/* connected state machine, TOFU host-key gating, remote-instance assurance,@@ -8,17 +8,17 @@ import type { Config } from '../storage/index.js'* @module dsh-tauri-ssh/host/service/manager*/-import type { MachineId, MachineProfile, MachineView, SshInstallResult, SshLink, SshMachineStatus, SshProgress, SshTestResult } from '../types/index.js'-import type { BootstrapHooks } from './bootstrap.js'-import type { SshMachineEvents } from './events.js'-import type { KnownHostsStore } from './host-keys.js'-import type { SshSession, SshTransport, SshTunnelHandle } from './transport.js'+import type { MachineId, MachineProfile, MachineView, SshInstallResult, SshLink, SshMachineStatus, SshProgress, SshTestResult } from '../types/index'+import type { BootstrapHooks } from './bootstrap'+import type { SshMachineEvents } from './events'+import type { KnownHostsStore } from './host-keys'+import type { SshSession, SshTransport, SshTunnelHandle } from './transport'import { homedir } from 'node:os'import process from 'node:process'import { join } from 'pathe'-import { SshError } from '../types/index.js'-import { checkMissingCommand, credentialsCopyCommand, describeExecFailure, ensureRemoteInstance, firstLineOf, missingComponentsOf, planRemoteInstall, readEnvCredentials, REMOTE_ROOT, runInstallScript, skippedVerificationSummary } from './bootstrap.js'-import { fingerprintHostKey } from './host-keys.js'+import { SshError } from '../types/index'+import { checkMissingCommand, credentialsCopyCommand, describeExecFailure, ensureRemoteInstance, firstLineOf, missingComponentsOf, planRemoteInstall, readEnvCredentials, REMOTE_ROOT, runInstallScript, skippedVerificationSummary } from './bootstrap'+import { fingerprintHostKey } from './host-keys'/** One machine's live connection state. */interface MachineState {@@ -52,7 +52,7 @@ export interface SshManagerDeps {/** The machine event channel (C-EVENT): bootstrap log/progress events. */events: SshMachineEvents/** The install-plan resolver (overridable so tests never touch the network). */- planInstall?: (unameOut: string, config: Pick<Config, 'installRepo' | 'installRef'>) => Promise<import('./bootstrap.js').RemoteInstallPlan>+ planInstall?: (unameOut: string, config: Pick<Config, 'installRepo' | 'installRef'>) => Promise<import('./bootstrap').RemoteInstallPlan>/** Publish one machine's status change (the service emits the seam event). */emitStatus: (machineId: MachineId, status: SshMachineStatus) => void/** Local dsh `.env` credentials to copy after an install (defaults to the host's own). */diff --git a/packages/dsh-tauri-ssh/src/host/service/ssh-config.test.ts b/packages/dsh-tauri-ssh/src/host/service/ssh-config.test.tsindex b4dbcc9e..25e291f2 100644--- a/packages/dsh-tauri-ssh/src/host/service/ssh-config.test.ts+++ b/packages/dsh-tauri-ssh/src/host/service/ssh-config.test.ts@@ -5,12 +5,12 @@* read.*/-import type { MachineProfile } from '../types/index.js'+import type { MachineProfile } from '../types/index'import { copyFile, mkdir, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises'import { tmpdir } from 'node:os'import { join } from 'pathe'import { afterEach, beforeEach, describe, expect, it } from 'vitest'-import { MachineId } from '../types/index.js'+import { MachineId } from '../types/index'import {DEFAULT_IDENTITY_FILES,discoverableHosts,@@ -21,7 +21,7 @@ import {lookupSshConfig,parseSshConfig,SshConfigResolver,-} from './ssh-config.js'+} from './ssh-config'const FIXTURES = join(import.meta.dirname, 'fixtures')diff --git a/packages/dsh-tauri-ssh/src/host/service/ssh-config.ts b/packages/dsh-tauri-ssh/src/host/service/ssh-config.tsindex 4f59d060..5e8cbe1a 100644--- a/packages/dsh-tauri-ssh/src/host/service/ssh-config.ts+++ b/packages/dsh-tauri-ssh/src/host/service/ssh-config.ts@@ -1,4 +1,4 @@-import type { MachineProfile } from '../types/index.js'+import type { MachineProfile } from '../types/index'/*** The host's own `~/.ssh` as the credential source: `ssh_config` parsing* (Host blocks, HostName/User/Port/IdentityFile, Include expansion), thediff --git a/packages/dsh-tauri-ssh/src/host/service/sync-local.ts b/packages/dsh-tauri-ssh/src/host/service/sync-local.tsindex 860a4ea3..4d1e7872 100644--- a/packages/dsh-tauri-ssh/src/host/service/sync-local.ts+++ b/packages/dsh-tauri-ssh/src/host/service/sync-local.ts@@ -7,7 +7,7 @@*/import type { Buffer } from 'node:buffer'-import type { SyncSkillRoot } from '../types/index.js'+import type { SyncSkillRoot } from '../types/index'import { execFile } from 'node:child_process'import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs'import { homedir } from 'node:os'diff --git a/packages/dsh-tauri-ssh/src/host/service/sync.test.ts b/packages/dsh-tauri-ssh/src/host/service/sync.test.tsindex a2bd9c67..fcb4e10c 100644--- a/packages/dsh-tauri-ssh/src/host/service/sync.test.ts+++ b/packages/dsh-tauri-ssh/src/host/service/sync.test.ts@@ -1,8 +1,8 @@-import type { SshExecResult, SshSession } from './transport.js'+import type { SshExecResult, SshSession } from './transport'import { Buffer } from 'node:buffer'import { describe, expect, it, vi } from 'vitest'-import { MachineId } from '../types/index.js'-import { buildPreview, classifySpec, pluginAddCommand, skillExtractCommand, SyncEngine } from './sync.js'+import { MachineId } from '../types/index'+import { buildPreview, classifySpec, pluginAddCommand, skillExtractCommand, SyncEngine } from './sync'/** A scripted SSH session: commands dispatched by order or by matcher. */function fakeSession(respond: (command: string, options?: { stdinData?: Buffer }) => SshExecResult): SshSession & { execSpy: ReturnType<typeof vi.fn>, closed: () => boolean } {diff --git a/packages/dsh-tauri-ssh/src/host/service/transport.test.ts b/packages/dsh-tauri-ssh/src/host/service/transport.test.tsindex 9a27be64..fb8e0b33 100644--- a/packages/dsh-tauri-ssh/src/host/service/transport.test.ts+++ b/packages/dsh-tauri-ssh/src/host/service/transport.test.ts@@ -1,12 +1,12 @@import type { AddressInfo } from 'node:net'-import type { MachineProfile } from '../types/index.js'+import type { MachineProfile } from '../types/index'import { Buffer } from 'node:buffer'import { EventEmitter } from 'node:events'import { Server, connect as tcpConnect } from 'node:net'import { PassThrough } from 'node:stream'import { describe, expect, it, vi } from 'vitest'-import { MachineId } from '../types/index.js'-import { classifyConnectFailure, describeConnectFailure, loginShell, shQuote, Ssh2Transport } from './transport.js'+import { MachineId } from '../types/index'+import { classifyConnectFailure, describeConnectFailure, loginShell, shQuote, Ssh2Transport } from './transport'const profile: MachineProfile = {id: MachineId('m1'),diff --git a/packages/dsh-tauri-ssh/src/host/service/transport.ts b/packages/dsh-tauri-ssh/src/host/service/transport.tsindex b3f53b62..b1b28292 100644--- a/packages/dsh-tauri-ssh/src/host/service/transport.ts+++ b/packages/dsh-tauri-ssh/src/host/service/transport.ts@@ -8,8 +8,8 @@import type { Buffer } from 'node:buffer'import type { AddressInfo, Server } from 'node:net'import type { ConnectConfig } from 'ssh2'-import type { MachineProfile, SshAuthMethod } from '../types/index.js'-import type { ResolvedSshAuth } from './ssh-config.js'+import type { MachineProfile, SshAuthMethod } from '../types/index'+import type { ResolvedSshAuth } from './ssh-config'import { createServer } from 'node:net'import process from 'node:process'import { Client } from 'ssh2'diff --git a/packages/dsh-tauri-ssh/src/host/service/version.test.ts b/packages/dsh-tauri-ssh/src/host/service/version.test.tsindex 296a534e..7db6a33e 100644--- a/packages/dsh-tauri-ssh/src/host/service/version.test.ts+++ b/packages/dsh-tauri-ssh/src/host/service/version.test.ts@@ -9,7 +9,7 @@ import {pickReleaseTag,pkgRepoOf,RECOMMENDED_DSH_VERSION,-} from './version.js'+} from './version'/** A realistic newest-first release list (test tags republishing included). */const RELEASES = [diff --git a/packages/dsh-tauri-ssh/src/host/storage/index.ts b/packages/dsh-tauri-ssh/src/host/storage/index.tsindex 5adb6500..7777a7c1 100644--- a/packages/dsh-tauri-ssh/src/host/storage/index.ts+++ b/packages/dsh-tauri-ssh/src/host/storage/index.ts@@ -7,9 +7,9 @@* @module dsh-tauri-ssh/host/storage*/-import type { MachineProfile } from '../types/index.js'+import type { MachineProfile } from '../types/index'import z from 'schemastery'-import { MachineId } from '../types/index.js'+import { MachineId } from '../types/index'/** One settings-namespace key (the harness brands these; the wire treats them as strings). */export type SettingsNamespace = string & { readonly __namespace: unique symbol }diff --git a/packages/dsh-tauri-ssh/src/index.ts b/packages/dsh-tauri-ssh/src/index.tsindex 939087fc..a4ceaf41 100644--- a/packages/dsh-tauri-ssh/src/index.ts+++ b/packages/dsh-tauri-ssh/src/index.ts@@ -16,6 +16,6 @@* @module dsh-tauri-ssh*/-export { apply, Config, default, inject, name, SshRemoteService } from './host/apply.js'-export type { SshMachineEvent, SshMachineEventsPage, SshMachineStage, SshMachineTerminal } from './host/types/index.js'-export { SSH_API_PREFIX } from './shared/constants.js'+export { apply, Config, default, inject, name, SshRemoteService } from './host/apply'+export type { SshMachineEvent, SshMachineEventsPage, SshMachineStage, SshMachineTerminal } from './host/types/index'+export { SSH_API_PREFIX } from './shared/constants'diff --git a/packages/dsh-tauri-ssh/tsdown.config.ts b/packages/dsh-tauri-ssh/tsdown.config.tsindex a90bae13..636ec92c 100644--- a/packages/dsh-tauri-ssh/tsdown.config.ts+++ b/packages/dsh-tauri-ssh/tsdown.config.ts@@ -1,4 +1,4 @@-import { defineConfig, dshExternal } from 'dsh-tauri-tsdown'+import { defineConfig, dshExternal } from '../dsh-tauri-tsdown/src/index.ts'// Host-only plugin (no client half — the settings page is dsh-tauri-ssh-ui):// one ESM entry with dts, mirroring defineDshConfig's server half.diff --git a/packages/dsh-tauri-tsdown/package.json b/packages/dsh-tauri-tsdown/package.jsonindex ba2f2834..47c29069 100644--- a/packages/dsh-tauri-tsdown/package.json+++ b/packages/dsh-tauri-tsdown/package.json@@ -13,7 +13,6 @@"typecheck": "tsc --noEmit"},"devDependencies": {- "lightningcss": "catalog:ui","tsdown": "catalog:cli","typescript": "catalog:cli"}