Repository navigation
Replies: 1 comment
|
The reading is real — But the step between "package declares only peers" and "index entry carries no requirements" does not exist in this repository's own index producer, and the actual defect is one layer earlier: the index format's documentation and its implementation disagree, in the same commit. 1. A peers-only package does reach the market with a range
So for the manifest in your reproduction, a generated entry carries that bounded union as 2. The real disagreement is in the format noteThe note that shipped with the format (
The implementation does the other thing:
Only the last bullet is a deliberate design change; the other three are the format quietly becoming permissive. The consequence is what you observed: on a hand-written or third-party index — indexes are arbitrary configured URLs ( One more mismatch while you are in there: the range's provenance is not carried. When 3. Suggested repair, and why not the peer-carrying oneCarrying
Either way, 4. Severity, honestly boundedThe listing is a claim; the install gate is truthful. For a registry spec, the pre-install lookup asks for Your point that |
Uh oh!
There was an error while loading. Please reload this page.
dsh-plugin-marketreportscompatible: truefor plugins that declare DSH support only viapeerDependenciesSummary
The market evaluates a listed version's DSH compatibility from the top-level
engines.dshof itsmarket-index entry alone. For a package that declares its DSH range only in
peerDependencies— thefallback DSH itself documents — the manifest handed to the evaluator then carries no requirements at
all, so the version is reported
compatible: truefor every runtime version, including ones belowits declared floor and arbitrary future majors.
The rule DSH documents
dsh-plugin-manager's own tool description states the rule (dsh-plugin-manager/lib/types/tools.js):dsh-app-boot'sunmetRequirements()implements exactly that: it reads the top-levelengines.dshand falls back to
peerDependencieswhen the field is absent. (A top-levelengines.dsh, when present,short-circuits the peer list entirely — which is why a multi-cohort range has to live in peers.)
What the market does instead
dsh-plugin-marketstates the same intent (dsh-plugin-market/lib/types/types.d.ts):But
compatibilityOf()builds the manifest from the market-index entry, which has no peers to pass:The index schema confirms there is nothing else available: the generated declaration for a listed
version is
MarketVersion = { readonly version, readonly publishTimestamp, readonly source, readonly engines }(see
dsh-plugin-market/lib/typert.host.js). AndMarketCompatibility.requirementsis documented as"keyed
engines.dsh", i.e. the type contract itself assumesengines.dshis the only possiblerequirement source.
Why it matters
peerDependenciesis the only place a range can express an upper bound. A caret range per testedcohort (
^0.1.7-rc.2 || ^0.2.0-rc.1 || …) expands to a bounded interval, so a line that has not beenadapted yet is correctly rejected until it becomes an explicit cohort.
engines.dshis a single>=segment with no upper bound.
Reporting
compatible: trueunconditionally therefore drops the guarantee in exactly the case where thedeclaration is strongest — and it never turns red, because it never consults the declaration at all.
Reproduction
Take any published plugin that declares its DSH support range in
peerDependenciesand carries notop-level
engines.dsh, for instance:{ "peerDependencies": { "@deepseek-ai/dsh": "^0.1.7-rc.2 || ^0.2.0-rc.1 || ^0.2.0-rc.2 || ^0.2.1-alpha.1 || ^0.2.1-alpha.2" } }Evaluating that package with the host's own
evaluatePluginCompatibilityat runtime0.2.1-alpha.5:engines.dshonly)peerDependenciespassed throughThe market reports the version compatible even for a runtime below the declared floor.
Minimal check (host runtime
0.2.1-alpha.5):Suggested fix
peerDependencies(or acanonical resolved-requirements field) to
MarketVersion, and pass it intoevaluatePluginCompatibilityin bothcompatibilityOf()copies so the market really does evaluate"as DSH's installation check evaluates it". Index producers must emit the field.
MarketCompatibility.requirementscontract from"keyed
engines.dsh" to "keyed by requirement source" (the key is already whatever the evaluatorreturns).
dsh-plugin-manager,dsh-app-boot,dsh-plugin-market) and one of them is partial. Extracting a single sharedrequirement resolver (e.g.
pluginRequirements(manifest)) and having all three consume it would stopthem drifting apart again.
Environment
0.2.1-alpha.5, macOS,@deepseek-ai/dshinstalled globally.dsh-plugin-market/lib/types/index.js(compatibilityOf),dsh-plugin-market/lib/index.js(same helper),dsh-plugin-market/lib/typert.host.js(
MarketVersionschema),dsh-plugin-market/lib/types/types.d.ts(MarketCompatibility), versusdsh-plugin-manager/lib/types/tools.js(the documented rule),dsh-plugin-manager/lib/index.js(fetchesenginesandpeerDependencies),dsh-app-boot/lib/index.js(unmetRequirements).All reactions