feat(#2094): migrate Trae onto EoS imperative adapter + SOLO stage-metadata upgrade (ADR-1239)
Fold trae logic branches into descriptor-driven reads: skipSharedHooksInstall gates (dropped && !isTrae), and the case 'trae' path-rewrite arm now computes the self-alias from the descriptor-driven dirName (.trae). Dead isTrae bindings removed from uninstall/writeManifest/finishInstall. trae's skills dispatch was already descriptor-driven (converter-by-name). RUNTIME_CONTENT_DISPATCH.trae is left as a runtime-keyed table registration (its regex/callback rewrites can't be a byte-identical descriptor map — matches cursor/windsurf/cline). trae stays in RUNTIME_FLAG_IDS: isTrae still gates the agents-converter selection (agents out of scope; removal gated on the cross-runtime agents-dispatch migration). Byte-identical golden parity for all 16 runtimes. UPGRADE: SOLO stage/trigger metadata — emitted Trae SKILL.md now carries stage: workflow (descriptor-gated via hostBehaviors.soloStageMetadata) so Trae's SOLO Agent can auto-invoke GSD skills at the corresponding stage. Field shape is best-effort/inferred (Trae publishes no formal schema). trae.json golden regenerated. Tests: trae-imperative-reference (adapter/axes/fail-closed shouldFlattenDispatch + no runtime==='trae' source-grep, isTrae exempted for agents) + trae-upgrades (stage: workflow on installed SKILL.md, descriptor-gated). Matrix note + changeset added. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -19,6 +19,7 @@ const {
|
||||
convertClaudeAgentToAntigravityAgent,
|
||||
convertClaudeCommandToOpencodeSkill,
|
||||
convertClaudeCommandToKiloSkill,
|
||||
convertClaudeCommandToTraeSkill,
|
||||
neutralizeAgentReferences,
|
||||
} = require('../bin/install.js');
|
||||
|
||||
@@ -267,6 +268,48 @@ describe('convertClaudeToKiloFrontmatter output parity: bin/install.js vs runtim
|
||||
});
|
||||
});
|
||||
|
||||
// ─────────────────────────────────────────────────────────────────────────────
|
||||
// DEFECT.GENERATIVE-FIX output-parity guard: convertClaudeCommandToTraeSkill is
|
||||
// defined TWICE — once in bin/install.js (dead for the live skills-install
|
||||
// path; kept for this file's own module-level export/test surface) and once in
|
||||
// src/runtime-artifact-conversion.cts, compiled to
|
||||
// gsd-core/bin/lib/runtime-artifact-conversion.cjs (used by
|
||||
// src/install-engine.cts's skills-install path via SKILLS_CONVERTER_REGISTRY,
|
||||
// see install-engine.cts ~L754). Both copies are LIVE call surfaces — neither
|
||||
// re-exports the other — so #2094's `stage:` emission had to be applied to
|
||||
// bin/install.js's copy by hand to keep parity. Source-text identity can't be
|
||||
// asserted (they live in different module systems: plain CJS vs a
|
||||
// tsc-compiled .cts output with different surrounding comments), so this
|
||||
// instead proves the two implementations still produce IDENTICAL output for
|
||||
// representative command input. If a future edit changes one copy's behavior
|
||||
// without mirroring it into the other, this test is the guard that catches
|
||||
// the divergence.
|
||||
// ─────────────────────────────────────────────────────────────────────────────
|
||||
describe('convertClaudeCommandToTraeSkill output parity: bin/install.js vs runtime-artifact-conversion.cjs (#2094)', () => {
|
||||
const { convertClaudeCommandToTraeSkill: convertViaConversionModule } =
|
||||
require('../gsd-core/bin/lib/runtime-artifact-conversion.cjs');
|
||||
|
||||
test('identical output for a representative command, including the #2094 stage: field', () => {
|
||||
const viaInstall = convertClaudeCommandToTraeSkill(SAMPLE_COMMAND, 'gsd-execute-phase');
|
||||
const viaModule = convertViaConversionModule(SAMPLE_COMMAND, 'gsd-execute-phase');
|
||||
assert.equal(viaInstall, viaModule, 'bin/install.js and runtime-artifact-conversion.cjs must emit identical command output');
|
||||
assert.match(viaInstall, /\nstage: workflow\n/, 'both copies must emit the #2094 stage: field');
|
||||
});
|
||||
|
||||
test('identical output when the source has no description (falls back to generic description)', () => {
|
||||
const noDescriptionCommand = `---
|
||||
name: gsd-noop
|
||||
allowed-tools:
|
||||
- Read
|
||||
---
|
||||
|
||||
Do nothing.`;
|
||||
const viaInstall = convertClaudeCommandToTraeSkill(noDescriptionCommand, 'gsd-noop');
|
||||
const viaModule = convertViaConversionModule(noDescriptionCommand, 'gsd-noop');
|
||||
assert.equal(viaInstall, viaModule, 'bin/install.js and runtime-artifact-conversion.cjs must emit identical output when description is absent');
|
||||
});
|
||||
});
|
||||
|
||||
// ─────────────────────────────────────────────────────────────────────────────
|
||||
// Antigravity agent conversion — shared Gemini-backend tool mapping (#1394 / #1928)
|
||||
// ─────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user