feat(#1173): wire the 8 agent converters into the descriptor-driven install path
The descriptor-driven install path (resolveRuntimeArtifactLayout) installed no agents for copilot/antigravity/cursor/windsurf/augment/trae/codebuddy/cline — their per-runtime agent conversion ran only via the legacy bin/install.js loop. This wires each runtime's agent converter into the descriptor so the new path applies per-runtime conversion (follow-up to #1099; ADR-1235 cutover). - capabilities/<rt>/capability.json: declare an `agents` kind with the runtime's converter (global+local; cline global-only). Regenerated capability-registry.cjs. - convertedAgentsKind threads install scope -> isGlobal so the scope-aware copilot/antigravity converters choose global vs workspace-relative paths; the six single-arg converters ignore the extra arg. stageAgentsForRuntimeWithConverter passes isGlobal to the converter. - Tests: feat-1173 gains a real-registry block asserting each runtime's descriptor applies the correct converter (== conv(src, isGlobal), != raw copy) with scope threading (fails-first on pristine next). The ADR-857 equivalence golden + per-runtime kind-count assertions now include the agents kind, each annotated as an intentional #1173 change. Scope: this wires the per-runtime CONVERTER. The remaining byte-parity behaviors of the legacy loop (copilot `.agent.md` rename, cross-cutting path/attribution rewrites, config-reading) stay with the legacy loop -- which runs after installRuntimeArtifacts and is authoritative for the real install -- and are tracked by ADR-1235's later cutover steps. No user-facing change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -548,12 +548,16 @@ function stageSkillsForRuntimeAsSkills(
|
||||
*
|
||||
* @param srcAgentsDir source agents directory (e.g. agents/)
|
||||
* @param resolvedProfile profile filter from resolveProfile()
|
||||
* @param converter (content: string) → string pure per-file converter
|
||||
* @param converter (content: string, isGlobal?: boolean) → string per-file
|
||||
* converter; scope-aware converters (copilot/antigravity)
|
||||
* read isGlobal, single-arg converters ignore it (#1173)
|
||||
* @param isGlobal install scope passed through to the converter
|
||||
*/
|
||||
function stageAgentsForRuntimeWithConverter(
|
||||
srcAgentsDir: string,
|
||||
resolvedProfile: ResolvedProfile,
|
||||
converter: (content: string) => string,
|
||||
converter: (content: string, isGlobal?: boolean) => string,
|
||||
isGlobal = false,
|
||||
): string {
|
||||
if (!fs.existsSync(srcAgentsDir)) return srcAgentsDir;
|
||||
|
||||
@@ -571,7 +575,7 @@ function stageAgentsForRuntimeWithConverter(
|
||||
}
|
||||
}
|
||||
const content = fs.readFileSync(path.join(srcAgentsDir, entry.name), 'utf8');
|
||||
const converted = converter(content);
|
||||
const converted = converter(content, isGlobal);
|
||||
fs.writeFileSync(path.join(stageDir, entry.name), converted, 'utf8');
|
||||
}
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user