Commit Graph

9 Commits

Author SHA1 Message Date
Pine 8e79ec4942 feat: enhance desktop packaging process with self-contained harness verification
- Updated README and README.zh to clarify packaging commands and added verification step.
- Improved packaging scripts to automatically build the self-contained runtime and verify its integrity.
- Introduced new scripts for verifying harness self-containment and booting the web profile.
- Added comprehensive tests for relinking harness symlinks and ensuring self-containment.
- Updated package.json scripts to reflect new build and verification processes.
2026-08-16 00:31:19 +08:00
Pine 604a817546 refactor(desktop): shell polish — register the dsh launcher, use vendored pnpm, docs
Register the dsh CLI launcher from the desktop shell, prefer the vendored
pnpm in the CLI plugin command, and update the desktop and CLI reference docs.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-15 17:04:36 +08:00
Pine 5f348f9b1c fix(desktop): bundle the preload to CommonJS so the dshApp bridge loads under sandbox
The renderer opens with sandbox:true, and Electron sandboxed preload scripts
only support CommonJS. The preload was emitted as ESM (package.json is
"type": "module"), so it failed to load silently and window.dshApp was never
injected. The About section then fell back to plain-web mode: current version
stayed on the '—' fallback and check-for-updates reported up-to-date without
querying. Build the preload with esbuild into lib/types/preload.cjs and point
the main process at it.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-14 23:25:54 +08:00
Pine aaa434afbd feat(desktop): dynamic About version, update manifest date, and a unified publish flow
The About section hardcoded its version; the main process now exposes
get-app-info so it reads app.getVersion() dynamically, and the update result
carries the manifest release date. The manifest generator orders versions
numerically (0.10.0 outranks 0.9.0). A new stage-release script copies
releases.json plus installers into the deepseek-harness-web site root's
updates/, which deploy.py publishes to OSS alongside the download page, so the
app and web share one update channel. The About section also gains links to the
release site and official site.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-14 23:01:36 +08:00
Pine e87a3084ea feat(desktop): manual-download update check and OSS release manifest
Adds an unsigned, manual-download update flow. The main process fetches the OSS
updates/releases.json manifest (DSH_UPDATE_URL overrides), compares the latest
version, and on startup and hourly prompts to open the per-platform installer
URL; a preload bridge exposes the same check to the SPA's About "check for
updates" button, which renders the version, notes, and a download link.
scripts/generate-release-json.mjs builds the manifest from the packaged
.dmg/.exe. Windows nsis packaging is configured.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-14 20:45:21 +08:00
Pine 6cd7c5a590 feat(plugin-inventory): offline bundle and pnpm plugin install for the desktop
Adds an install surface to the plugin-inventory gateway: availableBundles lists
the curated offline-installable optional bundles (AVAILABLE_BUNDLES); install
composes an offline bundle into the profile's dsh.profile.bundles, or for a
registry spec runs pnpm against the writable profile via the bundled Node and a
vendored pnpm (gated behind the dshAllowPluginInstall context flag, set only by
the desktop boot); uninstall removes a bundle layer. The reconcile logic from
`dsh plugin add` moves into app-boot as shared helpers. The desktop vendored
pnpm into the harness and sets the allow-install env; the plugin-list SPA gains
an installable-bundles section. Tests cover the guard, install helpers, and the
SPA section at 100% host coverage.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-14 18:46:39 +08:00
Pine 79ae82fa48 feat(desktop): Chinese menu, branded icon, and a self-contained harness bundle
Localizes the Electron application menu (文件/编辑/视图/窗口/帮助 plus the
macOS app menu), adds a branded 1024px app icon (window + per-target icns/ico),
and makes the packaged app fully self-contained. Because the harness's pnpm
workspace does not cleanly materialize via pnpm deploy or electron-builder's
dependency resolution (per-package symlinks to vendored sources, native addons,
a separate frontend dist), scripts/build-harness.mjs assembles the repository's
working runtime — node_modules, vendor, packages, native, apps/cli, apps/web,
and a bundled Node binary — into build/harness. electron-builder ships it as an
extraResource at Resources/harness, and the main process spawns that bundled
node + dsh entry when packaged (keeping the system-Node child during dev). Adds
a comprehensive README and ignores the multi-GB harness/dist from git.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-14 17:39:26 +08:00
Pine 6c2b292a58 fix(desktop): restore a valid package name so the workspace filter resolves
The package name must be a valid npm/pnpm workspace name; the display name
belongs in electron-builder productName. The invalid rename broke
pnpm --filter @deepseek-ai/dsh-desktop in desktop:dev.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-14 12:12:45 +08:00
Pine 0cdbbfbf1a feat(desktop): add Electron desktop shell over the web profile
Spawn the real dsh CLI running the web profile on loopback (OS-assigned
port), parse the printed readiness URL, and open a native window at it.
The harness and its native addons stay on the system Node ABI; the main
imports only electron and node builtins.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-14 10:23:22 +08:00