Update stable and beta runtimes and release versions, remove the built-in DSH Marketplace source, and bind the strict details slot through the session provider.
The published model settings bundle already supports model search and filtered bulk selection. Extend that same patched artifact so custom model rows can explicitly inherit text-only or text-and-image input modalities, and preserve provider-discovered modalities during adoption.\n\nConstraint: The patch must retain the existing model-search behavior\nRejected: Add a separate model settings surface | the published bundle already owns this editor and its validation path\nConfidence: medium\nScope-risk: moderate\nDirective: Keep image attachment transport validation separate from capability editing\nTested: Built client artifact and package surface tests\nNot-tested: Live multimodal request against a provider
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
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
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
Desktop can project a persisted session before the first session.list baseline has arrived. Preserve that durable target only while the list phase is pending; once a successful baseline confirms it missing, clear the stale target and let the existing recent-workspace startup policy select its default.
The runtime fix ships as a Desktop-owned Yarn patch, with paired regressions for the temporary pre-baseline mask and a deleted session missing from an authoritative baseline.
Constraint: deepseek-harness submodule must remain unmodified; compatibility fixes ship through Desktop-owned patches
Rejected: Treat every absent selected id as pending | deleted or permanently invisible sessions would block startup forever
Rejected: Add an elapsed-time timeout | time does not establish session-list authority and would make restoration nondeterministic
Confidence: high
Scope-risk: narrow
Directive: Preserve a missing persisted selection only while session.list phase is pending; ready is the authority boundary for stale-selection cleanup
Tested: corepack yarn workspace dsh-plugin-desktop test tests/client-runtime-startup-restore.spec.ts; corepack yarn check; git diff --check
Not-tested: Packaged Windows GUI restart on a live machine