Commit Graph
12962 Commits
Author SHA1 Message Date
t4we fan ebae8d32e3 fix(desktop): harden setup wizard dialogs 2026-08-26 12:57:40 +08:00
t4we fan 60a485f8e8 feat(desktop): make setup wizard sequential 2026-08-26 12:57:40 +08:00
Junkai Wang af3f855a4d Merge pull request #631 from JunkaiWang-TheoPhy/codex/market-github-verifier
feat(market): verify pinned GitHub package manifests
2026-08-26 12:37:21 +08:00
t4we fan d4fd71b7f1 Merge pull request #632 from anywhere-labs/codex/profile-setup-wizard
feat(desktop): add profile setup and LAN access
2026-08-26 12:21:27 +08:00
JunkaiWang-TheoPhy c6748c88fd Route pinned GitHub sources through Market preview
The contract and verifier are now connected to the current Market install service. Catalog entries with a pinned GitHub source are verified before Profile checks, receive their package identity from the pinned manifest, and execute only the constructed github target through the existing package-manager capability. Npm candidates retain their existing path.\n\nConstraint: Profile checkpoint recovery remains the next boundary; this commit does not invent a second WAL\nRejected: Keep GitHub entries manual-only | it would leave the current catalog contract unable to serve the user workflow\nConfidence: medium\nScope-risk: broad\nDirective: Add checkpoint-backed rollback and live Market adapter emission before treating GitHub installation as release-ready\nTested: 13 focused Market install/verifier tests, Market typecheck\nNot-tested: Live GitHub install, rollback after pnpm mutation, packaged Desktop run
2026-08-26 12:20:46 +08:00
t4we fan dce61554c8 feat(desktop): add profile setup and Windows hardening 2026-08-26 12:19:10 +08:00
t4we fan 12176f319a feat(desktop): add browser and LAN settings 2026-08-26 12:19:10 +08:00
JunkaiWang-TheoPhy b66de831dd Verify pinned GitHub package manifests safely
The install contract needs a Host-owned verifier before any GitHub source can reach pnpm. Fetch package.json from the exact raw.githubusercontent.com commit path, reject redirects and malformed DSH metadata, and construct the pinned target without accepting provider command text.\n\nConstraint: No automatic installation is wired in by this commit\nRejected: Trust the catalog repository and commit claims alone | the package manifest and bundle declaration still need independent verification\nConfidence: medium\nScope-risk: moderate\nDirective: Integrate this verifier with the Market intent and Profile checkpoint path before exposing a mutating action\nTested: 6 focused GitHub verifier tests, Market typecheck, diff check\nNot-tested: Live GitHub access and pnpm installation
2026-08-26 12:15:29 +08:00
Junkai Wang 804cf8504e Merge pull request #630 from JunkaiWang-TheoPhy/codex/market-github-source
feat(market): carry pinned GitHub install sources
2026-08-26 12:15:20 +08:00
JunkaiWang-TheoPhy 64d75fcdca Expose pinned GitHub sources as bounded manual hints
The current Market can already show a Host-derived manual install command when managed installation is unavailable. Reuse the new pinned source contract to expose a credential-free GitHub command without granting the Renderer or provider executable authority.\n\nConstraint: This commit does not enable automatic GitHub installation\nRejected: Show the provider's raw install command | provider text is not execution authority\nConfidence: high\nScope-risk: narrow\nDirective: Keep mutable HEAD-based GitHub hints separate from pinned commit sources\nTested: 21 Market contract/manual-hint tests, Market typecheck, diff check\nNot-tested: GitHub source resolution or package installation
2026-08-26 11:53:41 +08:00
JunkaiWang-TheoPhy d08f6b99ef Validate pinned GitHub sources against repository identity
A commit pin alone is insufficient when the catalog repository is missing, non-GitHub, or ambiguous. Normalize the repository first, derive owner and repository names from the canonical URL, and reject invalid source descriptors during both provider-page and snapshot parsing.\n\nConstraint: Providers remain unable to supply commands, credentials, or filesystem paths\nRejected: Validate only the installSource object | it would allow a commit to be paired with a different repository\nConfidence: high\nScope-risk: narrow\nDirective: Reuse this normalized identity when the Host-owned install executor is added\nTested: 19 catalog contract tests, Market typecheck, diff check\nNot-tested: GitHub network verification and package installation
2026-08-26 11:52:10 +08:00
JunkaiWang-TheoPhy 1237015c4b Define a pinned GitHub source shape for catalog entries
Catalog providers need a structured source identity before Desktop can safely support GitHub and monorepo installs. This additive contract records a GitHub kind and a full commit SHA without granting the provider executable package-manager input.\n\nConstraint: Existing catalog entries remain valid and install behavior stays unchanged\nRejected: Reuse repository URLs as executable targets | repository identity does not pin content or authorize installation\nConfidence: high\nScope-risk: moderate\nDirective: Keep install execution behind a separate Host-owned verification boundary\nTested: Generated contract types and schema compilation\nNot-tested: Provider adapters emitting installSource values
2026-08-26 11:51:56 +08:00
Junkai Wang c6135e76da Merge pull request #555 from JunkaiWang-TheoPhy/codex/host-apiproxy-model-modalities
fix(host): preserve model input modalities in the catalog
2026-08-26 11:04:19 +08:00
t4we fan fee60bf1c1 Merge pull request #626 from anywhere-labs/codex/market-live-adapters-master
feat(desktop): integrate recovery and live Market adapters
2026-08-26 10:55:14 +08:00
t4we fan 0f9b4a900c Merge latest origin/master into codex/market-live-adapters-master 2026-08-26 10:50:17 +08:00
JunkaiWang-TheoPhy b7a020d114 Preserve model capabilities across the Host catalog boundary
The Host session catalog previously discarded adapter-owned input modalities, so downstream Desktop consumers could not distinguish image-capable routes even when the provider declared them. Patch the exact published rc.2 bundle and keep schema, runtime projection, and public types aligned.

Constraint: Desktop consumes the published Host bundle and must not modify the pinned Harness submodule.

Rejected: Add model selection or attachment UI here | those are separate presentation concerns from the catalog contract.

Confidence: high

Scope-risk: narrow

Directive: Remove this patch when a future Host release preserves inputModalities natively.

Tested: focused package surface 32 passed, 1 skipped; schema behavior; full yarn check with Market 274 and Desktop 808 passed, 4 skipped; immutable install; three safety review rounds.

Not-tested: Live DeepSeek API catalog response against a packaged Desktop build.

Related: #460, #470
2026-08-26 10:49:55 +08:00
Junkai Wang 3d1cced28d Merge pull request #548 from JunkaiWang-TheoPhy/codex/issue-500-negative-token-projection
fix(runtime): recover negative token-meter projections
2026-08-26 10:48:24 +08:00
Junkai Wang 2439538073 Merge pull request #546 from JunkaiWang-TheoPhy/fix/issue-157-empty-tool-call
fix(agent): stop turns on empty tool-call names
2026-08-26 10:47:59 +08:00
Junkai Wang 6d011fd380 Merge pull request #545 from JunkaiWang-TheoPhy/fix-issue-499-projcache-guard
fix(desktop): quarantine oversized session projection caches
2026-08-26 10:47:45 +08:00
Junkai Wang 458ccea88c Merge pull request #544 from JunkaiWang-TheoPhy/codex/dialog-window-cross-platform-test
test(desktop): keep dialog-window assertions cross-platform
2026-08-26 10:47:21 +08:00
Junkai Wang b5f8dc364d Merge pull request #550 from JunkaiWang-TheoPhy/codex/issue-435-immediate-startup-window
feat(desktop): reveal the shell during renderer startup
2026-08-26 10:46:30 +08:00
Junkai Wang aa191092b5 Merge pull request #549 from JunkaiWang-TheoPhy/docs/issue-427-dev-sandbox
docs: add a lifecycle-safe external development sandbox recipe
2026-08-26 10:46:26 +08:00
Junkai Wang 3143136501 Merge pull request #539 from JunkaiWang-TheoPhy/docs/issue-template-diagnostics
docs: collect Profile and plugin context in bug reports
2026-08-26 10:46:21 +08:00
t4we fan 1768e96250 Merge origin/master into codex/market-live-adapters-master 2026-08-26 10:30:26 +08:00
Junkai Wang 6464c187f5 Merge pull request #560 from JunkaiWang-TheoPhy/codex/issue-408-restart-session-restore
fix(desktop): preserve restart selection until baseline
2026-08-26 09:44:26 +08:00
JunkaiWang-TheoPhy c261a472c1 Show the Desktop shell while startup work is still warming the renderer
Keep the main shell under generation-owned reveal control, but surface it before ready-to-show so users can see startup progress. Opaque shells now start on the same dark background used by the boot surface, while renderer health and recovery gating stay on their existing path.

Constraint: Perceived startup needed improvement without weakening renderer failure and recovery behavior
Rejected: BrowserWindow show:true at construction | would bypass generation-owned reveal timing and listener setup
Directive: Keep renderer-health acceptance tied to native mount completion; early reveal must stay a presentation-only change
Confidence: high
Scope-risk: narrow
Tested: corepack yarn workspace dsh-plugin-desktop exec vitest run tests/window-options.spec.ts tests/electron-runtime.spec.ts tests/profile-create-window.spec.ts tests/startup-recovery-window.spec.ts
Tested: corepack yarn workspace dsh-plugin-desktop exec vitest run tests/renderer-health.spec.ts
Tested: corepack yarn typecheck
Tested: corepack yarn build
Tested: git diff --check
Not-tested: Manual macOS/Windows startup visual verification in a real Electron session
2026-08-26 09:38:15 +08:00
JunkaiWang-TheoPhy 9ec920c400 Document a safe Desktop-backed path for external sandbox development
Issue #427 calls for plugin-author guidance that matches the current
Desktop public contract instead of ambient profile guesses or unmanaged
package-manager lifetimes. The guide now keeps the Desktop adapter in one
nested injection, describes the external `dsh web` mirror recipe, and
records the bilingual pair through the repository hash gate.

Constraint: Public plugin-author guidance must stay within desktopProfiles and desktopPnpm
Rejected: Document guessed `profiles/web` and ambient `pnpm` flows | they bypass the Desktop-selected profile and managed lifecycle
Directive: Keep this recipe scoped to external `dsh web` mirrors; native Electron verification still belongs in real Desktop runs
Confidence: high
Scope-risk: narrow
Tested: corepack yarn test:bilingual-docs
Tested: corepack yarn check:bilingual-docs
Tested: corepack yarn check
2026-08-26 09:38:15 +08:00
JunkaiWang-TheoPhy 719c615e85 Improve bug reports by separating Profile and plugin variables
Recurring startup and plugin reports lack the comparison data needed to distinguish upgraded Profile state from built-in Desktop behavior. Require reporters to identify Profile provenance, list third-party plugins, and record a fresh-Profile comparison while preserving a clear not-tested path.

Constraint: The form must remain usable when Desktop cannot start.
Rejected: Require diagnostic commands for every report | startup failures may prevent collection.
Confidence: high
Scope-risk: narrow
Directive: Keep the not-tested and no-plugin options when refining these fields.
Tested: YAML structure validation; layout checks; 1064 tests; typecheck; production build; three change-scoped safety inspections.
Not-tested: Live GitHub issue-form rendering before PR preview.
2026-08-26 09:38:15 +08:00
JunkaiWang-TheoPhy 8f84ad4727 Prevent oversized session projection caches from crashing Desktop startup
The Desktop launcher now checks the persisted session projection cache before the harness boots. If the cache file is already far beyond normal rebuilt sizes, Desktop moves it aside so startup can rebuild projections from session history instead of loading a file large enough to trigger V8 heap exhaustion.

The recovery lives in the launcher boundary because this repository treats the upstream DeepSeek Harness checkout as pinned and unmodified from desktop feature branches. The regression test uses a tiny synthetic file with a lowered threshold, which proves the quarantine path without manufacturing an actual OOM case.

Constraint: The pinned deepseek-harness submodule must remain unchanged from this desktop branch
Rejected: Patch the upstream session projection cache implementation in the submodule | repository rules forbid desktop-branch edits there
Rejected: Keep the fix as a best-effort warning only | continuing startup with a known oversized cache would not reliably avoid the OOM
Confidence: high
Scope-risk: narrow
Directive: Keep this preflight at the launcher boundary unless the upstream runtime gains its own durable projcache compaction or guardrail
Tested: corepack yarn workspace dsh-plugin-desktop exec vitest run tests/session-projcache-recovery.spec.ts
Tested: corepack yarn workspace dsh-plugin-desktop exec vitest run tests/package.spec.ts
Tested: corepack yarn workspace dsh-plugin-desktop typecheck
Tested: corepack yarn workspace dsh-plugin-desktop build
2026-08-26 09:17:58 +08:00
JunkaiWang-TheoPhy 9bd483bfcc Prevent stale token-meter cache rows from bricking session history
Desktop ships the published token-meter package, and that package can persist negative projection totals after compaction drift. Clamp the two O(1) totals and bump their state versions so existing bad cache rows are invalidated and rebuilt from the session log instead of failing history restore.

Constraint: deepseek-harness is a pinned submodule and must stay untouched on desktop branches
Rejected: Patch SessionProjectionRegistry checkpoint validation only | does not self-heal already persisted bad rows
Rejected: Edit deepseek-harness directly | repository policy requires Desktop fixes through the patch layer
Confidence: high
Scope-risk: narrow
Directive: Remove this Desktop token-meter patch once a published @deepseek-ai/dsh-token-meter release includes the clamp and state-version bump
Tested: corepack yarn workspace dsh-plugin-desktop test tests/token-meter-negative-projection.spec.ts
Tested: corepack yarn workspace dsh-plugin-desktop typecheck
Tested: corepack yarn workspace dsh-plugin-desktop build
Tested: corepack yarn install --immutable
Not-tested: Full workspace test suite
Not-tested: Packaged desktop smoke
2026-08-26 09:11:09 +08:00
JunkaiWang-TheoPhy 02d719f888 Stop empty-name tool calls from re-entering the model loop
Desktop ships upstream rc packages through Yarn patch resolutions, so the empty-name guard belongs in the patched agent loop rather than in a desktop-only wrapper. The new regression loads the installed loop implementation, exercises an empty-name tool call directly, and proves the turn now ends after one synthetic error with new-session guidance instead of entering normal unknown-tool dispatch.

Constraint: Desktop consumes upstream Harness rc packages through local Yarn patches
Rejected: Patch dsh-llm-deepseek again | adapter already preserves prior non-empty tool-call deltas, but finalized empty names still need loop-level termination
Rejected: Treat all unknown tools as terminal | would broaden behavior beyond the proxy-corruption case from issue #157
Confidence: high
Scope-risk: narrow
Directive: Keep the empty-name guard in the agent loop until upstream ships an rc that closes the loop at source
Tested: yarn workspace dsh-plugin-desktop vitest run tests/empty-tool-call-loop.spec.ts
Tested: yarn workspace dsh-plugin-desktop vitest run tests/deepseek-streaming-tool-call.spec.ts tests/empty-tool-call-loop.spec.ts
Tested: yarn workspace dsh-plugin-desktop vitest run tests/package.spec.ts -t 'patches the agent loop to stop after one empty-name tool call'
Tested: yarn workspace dsh-plugin-desktop typecheck
Tested: yarn workspace dsh-plugin-desktop build
2026-08-26 09:11:09 +08:00
JunkaiWang-TheoPhy 46572baad4 Keep dialog-window checks portable across CI platforms
The dialog integration test asserted macOS-only chrome while the shared check job runs on Linux. Keep this test focused on the cross-platform modal and hardened renderer contract; auxiliary-window tests retain platform-specific chrome coverage.

Constraint: The primary check workflow executes Desktop tests on Linux.

Rejected: Force process.platform in the integration test | it would hide the behavior of the platform actually running CI.

Confidence: high

Scope-risk: narrow

Directive: Keep platform-specific chrome assertions in auxiliary-window-options.spec.ts.

Tested: Focused dialog-window tests (3/3); full yarn check (81 Desktop files, 805 tests passed, 4 skipped; 274 Market tests); layout, runtime closure, licenses.

Not-tested: Windows runner; no production code changed.
2026-08-26 08:26:30 +08:00
Junkai Wang 3bbed30c27 Merge pull request #540 from JunkaiWang-TheoPhy/codex/upgrade-bundled-pnpm-security
fix(desktop): upgrade bundled pnpm past path-traversal advisory
2026-08-26 08:25:02 +08:00
Junkai Wang 58be43eaf6 Merge pull request #569 from anywhere-labs/codex/issue-453-model-provider-search-clear
feat(models): search large provider catalogs
2026-08-26 08:17:43 +08:00
Junkai Wang 9231ba1456 Merge pull request #567 from JunkaiWang-TheoPhy/codex/issue-558-1024store-search
fix(market): search beyond the 1024Store local prefix
2026-08-26 08:17:18 +08:00
Junkai Wang 837d918f64 Merge pull request #621 from zp-home/fix/495-474-windows-caption-drag
fix(desktop): keep Windows caption draggable after scrolling
2026-08-26 04:24:04 +08:00
Junkai Wang e0d2cd554d Merge pull request #618 from anywhere-labs/fix/windows-installer-upgrade-evidence
fix(win): allow installer upgrades while Desktop is running
2026-08-26 04:23:49 +08:00
ZP 69cd90021f fix(desktop): keep Windows caption draggable after scrolling 2026-08-26 03:40:19 +08:00
t4we fan 847c429e53 perf(market): fetch 200 installable records per page 2026-08-26 00:57:29 +08:00
t4we fan f919b8158f fix(market): paginate 1024Store v2 catalog 2026-08-26 00:35:52 +08:00
ZP d06b7622ee docs: add Chinese Windows installer evidence 2026-08-26 00:31:27 +08:00
ZP 46decd44b6 fix(win): allow installer upgrades while desktop is running 2026-08-26 00:16:15 +08:00
t4we fan 7b3207914c fix(market): restore live catalog adapters 2026-08-25 22:42:51 +08:00
t4we fan 82aa780f11 fix(recovery): checkpoint shared desktop configuration 2026-08-25 20:36:34 +08:00
t4we fan 7ec8213e81 fix(market): simplify npm installs and unify plugin inventory 2026-08-25 19:43:14 +08:00
t4we fan 392091ab94 fix(desktop): preserve recovery frame inset 2026-08-25 18:15:30 +08:00
t4we fan e3723baf61 fix(desktop): expose terminal in recovery 2026-08-25 18:09:44 +08:00
t4we fan ff58f69363 fix(desktop): apply pnpm policy once 2026-08-25 18:04:56 +08:00
t4we fan a6aea257d2 fix(desktop): ignore package release age 2026-08-25 17:55:32 +08:00
t4we fan ffc5d797a0 fix(desktop): uninstall plugins from recovery 2026-08-25 17:33:50 +08:00