dsh-brain/vendor/dsh-mnemon/docs/en/development/compatibility-register.md

14 KiB

Compatibility register

简体中文 | English | Documentation

Some code exists only so that something older keeps working: settings or data that an earlier dsh-mnemon stored, an older DSH, or a plugin built against an earlier SDK. Each row below says where that code lives, why it is there and the condition that lets it go. What users see of it is in Compatibility and upgrades.

Keep the register current: a change that adds such code adds its row, and the change that removes it removes the row. A removal that changes what a user, a stored profile or a plugin built on the public SDK sees needs a release note, and a public export goes only in a major release.

Shim Where it lives Why it exists When it can go
Cordis root metadata src/host/config/facade.ts Master 39163dd30f exposes the root as Symbol.for('cordis.root'); published DSH releases through 0.2.2-rc.3 still expose .root. Prefer the symbol without triggering an undeclared-service read, and keep legacy-import coordination shared across plugin remounts All supported Hosts expose the symbol; then remove the property fallback
Empty snapshot retirement cards src/client/retired-memory-snapshot.ts, optional uiConversation injection in src/client/index.ts DSH 0.2.2-rc.2 renders empty developer context injections. A Chat-only exclusive definition hides only Mnemon's empty retirement markers; audit/model projections and other producers stay intact. Older Hosts can omit the event registry All supported Hosts omit these empty markers themselves through a verified public presentation contract
Activation-owned DSH agents and visible task records src/host/agent-compat.ts, subagent-start.ts, review-tools.ts, continuation-turn.ts, task-continuation.ts, lifecycle.ts, subagent.ts; source resolution in scripts/dsh-host-packages.ts Official 0.2.2-rc.1 retains registry ownership, nested requests, provider enumeration and hidden detached roots. Master fcc0ad4 exposes Subagent rootOf() and flat requests instead. Reserved child identities preserve startup guards; ordinary titled roots preserve independent tasks. Resolved plugin configuration/events and optional subagentProviderNames cover provider discovery without private registries. Durable Mnemon IDs and proven legacy child history keep completed tasks out of automation. A direct user turn receives fresh authority; automatic notices cannot revive it or wake the old parent. New user-delegated work retains the current View and one descendant level Consolidate the old ownership/start branches only after those official Hosts leave support. Durable task-record recognition must remain while such histories exist. Replace discovery/visibility fallbacks only with a verified public replacement that preserves existing tasks and provider selection
DSH tool execution contracts src/host/tool-execution.ts and src/host/review-admission.ts; real-host composition in tests/helpers/installed-dsh.ts Older hosts dispatch one parsed call. DSH 0.2.2-alpha.2 exposes setExecutor() and dispatches raw model-call batches; the adapter preserves the selected executor and requires one matching outcome. The alpha executor owns run_code outside the capability registry. Admission still drains inside the real turn, and under the native auto permission preset on batch hosts with checkGuards checks agent visibility and guards plus a standalone unattached host probe so unlogged synthetic calls do not emit orphan PTC dispatches or trip Auto review's root-call log check The older single-call hosts leave the supported range; replace both branches with the required public executor contract
Readiness Entry of 0.5.18 and 0.5.19 src/starter.ts: the ./starter export, Entry dsh-mnemon-starter, which provides mnemonStarterReady 0.5.18 and 0.5.19 composed a separate dsh-mnemon/starter row, and the component group waited for it. From 0.5.20 the group (dsh-mnemon/bundle) prepares itself and the Starter's patch no longer inserts the row; a composition that still inserts it keeps loading (details) A major release that removes the public ./starter export
buildin display mode normalizeDisplayMode in src/host/display-mode.ts; the displayMode schema in src/host/config.ts; migrateLegacyDisplayMode and the settings descriptor in src/host/settings.ts dsh-mnemon 0.3 spelled the conversation-tab placement buildin. Since 0.4.2 the Host reads it as builtin and, where the profile is writable, saves builtin once through DSH's revision-checked writer; a read-only profile keeps the old spelling A major release that no longer upgrades a profile last saved by 0.3
mnemon-plugins settings namespace performImport in src/host/config/facade.ts (src/host/settings-service.ts); planLegacySettingsImport in src/host/config/migrations.ts (src/host/legacy-settings-import.ts) The 0.5.0 betas saved Source switches there. From 0.5.0-rc.1 the mnemon-view[-<hash>] document, now memoryView in profile Config, took them over, and from 0.5.17 DSH's plugin manager records the switches in the profile patch. Live reads of mnemon-plugins have been removed because the namespace always read empty on supported hosts; only the settings.yaml.imported recovery below remains active to import its retained values Goes together with the settings.yaml.imported recovery below
settings.yaml.imported recovery importLegacy in src/host/settings-service.ts; planLegacySettingsImport in src/host/legacy-settings-import.ts; the root field legacySettingsImported DSH 0.1.7 replaced settings.yaml with profile Config and keeps the old file as <profile home>/settings.yaml.imported. Mnemon recovers its own sections from it once, then records legacySettingsImported: true (details) A release whose notes say that a profile last written by DSH 0.1.6 or earlier must first upgrade through a release that still recovers it
toolviews preference The conversationInteraction schema in src/host/config.ts; Config in src/host/protocol.ts; the accepted fields in src/host/legacy-settings-import.ts 0.1.1 and 0.1.2 drew in-conversation tool cards behind it; nothing has read it since 0.1.3. Stored profiles and retained settings files may still hold it: they validate and import, settings writes refuse it, and the resolved config leaves it out Any release that accepts losing its switch from forms generated from the schema. The schema passes through keys it does not declare, so stored values keep validating
Main Strategy in the topology config memoryTopology.strategyId in src/host/config.ts; withMainStrategy and mainStrategyTypeId in src/host/main-strategy.ts, which apply the plugin choice and read the result for composition, idle review and the View dashboard. The status RPC also sends the whole topology, of which the client reads only the layers Before plugin choices, the topology config named the main Strategy. A profile may still set it; the plugin choice memoryView.strategyTypeId wins A major release that stops reading it. A profile that sets only it would then compose with the default Layered strategy, so that release needs a migration or a note
Provider factory memoryBodies MemoryProviderAdapterFactoryContext in Memory Spaces src/providers/adapter.ts, filled beside memorySpaces by src/service.ts; context.memorySpaces ?? context.memoryBodies in the src/index.ts of the eight Providers other than Mnemon Native Memory Spaces 0.5.4 named the factory's space authority memorySpaces. The Providers accept Memory Spaces ^0.5.1, so they fall back for 0.5.1 to 0.5.3, and a Provider built against those reads only memoryBodies The Providers' fallback goes once their Memory Spaces peer floor is 0.5.4 or later; Memory Spaces stops passing memoryBodies only in a major release
MemoryBody* type names, ProviderBodyStatus, HttpMemoryProvider.memoryBodies The deprecated aliases at the end of Memory Spaces src/contracts.ts, re-exported by src/provider-sdk.ts; ProviderBodyStatus in src/providers/adapter.ts; the protected field in src/providers/http.ts. The nine official Provider drivers still import the old names, and scripts/fixtures/plugin-consumer compiles against them The published spellings from before 0.5.4. The Starter and its tests use the MemorySpace* names. Wire and stored names (memoryBodyId, memoryBodies, the bodies RPC operations, the mnemon_memory_body* tools, .dsh-memory-bodies.json) are not aliases and stay The Providers switch once their Memory Spaces peer floor is 0.5.4 or later; the aliases and the field go in a Memory Spaces major release
Layered strategy without workflows strategyDrives in src/host/strategy-workflows.ts; the deprecated threeTierActionWorkflow in the Layered strategy's ./extension-sdk The Layered strategy declares idle-review and runtime-capacity from 0.5.10. A Profile can keep an earlier copy, which declares nothing, so a Strategy with the type id default-three-tier and no workflows counts as declaring both When no Profile can run a Layered strategy before 0.5.10 with this Starter: in practice a major release, which can also drop threeTierActionWorkflow
DSH 0.2.0: memory subagents src/host/subagent-start.ts, with the service shapes in src/host/dsh.ts DSH 0.2.0 starts a child with the one-shot subagents.start and takes its instructions and tool filter in the request; on DSH 0.2.1 the Host starts managed activations and registers the child's instructions and tools when DSH publishes it (details). Resuming a finished child exists only on DSH 0.2.1; the guard that refuses automatic continuations and admits only fresh user-directed memory turns is not a 0.2.0 branch and stays DSH 0.2.0 leaves the supported range (engines.dsh and the DSH peers in package.json), together with the CI job verify-installed-dsh
DSH 0.2.0: Check versions → Update src/host/version-updates.ts DSH 0.2.0 installs the new version through its own installBundle and names what an incompatible release needs by its peers; DSH 0.2.1 needs its dsh plugin add (runPluginCommand) and reports requirements DSH 0.2.0 leaves the supported range
DSH 0.2.0: working directory The optional working-directory service in src/host/lifecycle.ts DSH 0.2.1 keeps a working directory per session, which the Host sets for a task Agent whose workspace folder is gone; DSH 0.2.0 has no such service, so the Host goes without it DSH 0.2.0 leaves the supported range
DSH 0.2.0: grouping row src/client/component-list-seat.ts and the note it feeds in src/client/MnemonSettingsCard.tsx DSH 0.2.0 lists the Starter's grouping row as an off component, and the dsh-mnemon page says not to use its switch; DSH 0.2.1 lists only the components (details) DSH 0.2.0 leaves the supported range
Page-kit style maps memoryPageStyles and memorySidebarStyles in src/client/page-kit.tsx, public through dsh-mnemon/client; presentationNamespace in tsdown.config.ts Page-kit consumers from before the Sources owned their presentation keep one class map holding every default Source's classes, under the Starter's class names A major release of dsh-mnemon that removes those exports
Historical Session message kinds isMnemonMessageSource in src/host/lifecycle.ts Session V3 wrapped Mnemon's messages as { kind: 'plugin', plugin: 'dsh-mnemon' }, and DSH's V3-to-V4 migration turns them into plugin:dsh-mnemon. Mnemon recognizes both when it filters and deduplicates its own messages in existing Sessions When Sessions written before DSH 0.1.7 no longer have to be read; no such cut-off is planned, since Sessions persist
Legacy openViking request field openViking on CreateMemorySpaceRequest and UpdateMemorySpaceRequest in Memory Spaces src/contracts.ts; placementCandidates, create, update and the registry load in src/memory-spaces.ts Before the generic connection arrived in dsh-mnemon 0.2.0, an OpenViking space took its settings, and clearApiKey, in this field. A request that still sends it is applied as that space's connection, and a stored space that has only it is read the same way Removing the field from the public request types needs a Memory Spaces major release; reading it from stored spaces goes only with the registry files row below
Older Memory Spaces registry files loadAndReconcile in Memory Spaces src/memory-spaces.ts Earlier Source releases wrote a version 2 .dsh-memory-bodies.json that also listed Provider spaces, and versions 1 to 3 of memory-providers.json; the Source migrates them when it loads them Only with an Issue, a major release and a refusal that names the release to migrate through, since stored formats never change silently (CONTRIBUTING)
Redundant optional strategy bundles src/bundle.ts Installing a bundled strategy separately can select another stock bundle that inserts the same Loader id. Consolidate only a single default-disabled strategy insertion already owned by the Starter, through public profile APIs. Keep packages, patches and custom bundle layers Every supported Host deduplicates these bundle insertions while preserving configuration and manager addressability