fix(#1925): correct _isSkillsRuntime discriminator + zcode install contract

The descriptor-driven gate must treat a runtime as layout-driven when its scoped
artifactLayout is non-empty (any kind), not only when it has a skills kind —
windsurf's global layout is agents-only and is a legitimate layout-driven runtime.
Preserve the three legacy special-cased paths (opencode/kilo combined path,
claude-local copyWithPathReplacement).

zcode falls into the default package.json+hooks path (not in the CommonJS-mode
exclusion roster), so its install contract is packageJson: true — matching
observed install output. No runtime === 'zcode' branch is added (AC#3): zcode
gets the default by not being excluded.
This commit is contained in:
Tom Boucher
2026-07-06 07:48:28 -04:00
parent 50aaf09342
commit d6cf377064
2 changed files with 11 additions and 8 deletions

View File

@@ -40,7 +40,7 @@ const RUNTIME_INSTALL_CONTRACTS = {
qwen: { surface: 'flat-skills', settings: true, packageJson: true },
trae: { surface: 'flat-skills', settings: false, packageJson: false },
windsurf: { surface: 'global-artifacts-noop', settings: false, packageJson: false },
zcode: { surface: 'flat-skills', settings: false, packageJson: false },
zcode: { surface: 'flat-skills', settings: false, packageJson: true },
};
function sha256(content) {