Revert "test(repository-plugin): drop the skill contribution from the preset-composed e2e"

This reverts commit f12c131ee9fdbc01b9294c8dc2c73cd36ab717cf.

The layered host skill registry closes the gap the bypass recorded: a
repository plugin's skill root registers into the global layer and reaches
every preset-composed session's catalog, so the fixture declares its skill
root again and the e2e proves the full skill, MCP, and TypeScript
contribution set. The accidental .claude/launch.json from that commit goes
with it.
This commit is contained in:
Yichen Jiang
2026-08-09 22:10:50 +08:00
parent 4788569889
commit 0b2f32740d
7 changed files with 18 additions and 28 deletions

View File

@@ -12,6 +12,9 @@
"prepack": "tsc --noEmit && tsdown src/plugin.ts src/mcp-server.ts --no-config --tsconfig tsconfig.json --out-dir lib --platform node --target es2024 --clean && dsh-plugin-prepare"
},
"dsh": {
"skills": [
"../skills"
],
"mcpServers": "./.mcp.json",
"entry": "./lib/plugin.mjs"
},

View File

@@ -0,0 +1,6 @@
---
name: github-source-proof
description: Proves that dsh installed a private repository Plugin from an exact GitHub source.
---
This skill exists only in the GitHub repository source fixture.

View File

@@ -125,11 +125,7 @@ async function startPublishedPackageRegistry(root: string): Promise<PublishedPac
}
describe.skipIf(!enabled)('dsh run GitHub repository Plugin installation', () => {
// The fixture deliberately carries no skill root: this composition's agent
// plane lives behind agent presets, whose per-preset `skills` realm has no
// seam for a deployment-level provider yet — see the repository-plugin
// README's Known Limitations.
it('installs the published prepare dependency, then builds and runs MCP and TypeScript Plugin contributions from a private exact GitHub source', async () => {
it('installs the published prepare dependency, then builds and runs skill, MCP, and TypeScript Plugin contributions from a private exact GitHub source', async () => {
expect(existsSync(dshBin), 'the repository Plugin acceptance must run the built dsh entry').toBe(true)
expect(source, 'DSH_GITHUB_REPOSITORY_PLUGIN_SOURCE is required by this CI lane').toMatch(
/^github:[^/\s#&]+\/[^/\s#&]+#[0-9a-f]{40}&path:\/.*\/\.dsh-plugin$/u,
@@ -205,6 +201,9 @@ describe.skipIf(!enabled)('dsh run GitHub repository Plugin installation', () =>
expect(registry.requests, runtimeDiagnostic).toContain('GET /@deepseek-ai/dsh-repository-plugin/-/dsh-repository-plugin-0.0.1.tgz')
const firstRequest = JSON.stringify(server.requests[0]!.body)
const secondRequest = JSON.stringify(server.requests[1]!.body)
expect(firstRequest, runtimeDiagnostic).toContain(
'Proves that dsh installed a private repository Plugin from an exact GitHub source.',
)
expect(firstRequest, runtimeDiagnostic).toContain('mcp__github_repository__proof')
expect(firstRequest, runtimeDiagnostic).toContain('Proves that an MCP server compiled from the exact GitHub repository package is active.')
expect(secondRequest, runtimeDiagnostic).toContain('MCP_FROM_GITHUB_REPOSITORY')
@@ -222,6 +221,7 @@ describe.skipIf(!enabled)('dsh run GitHub repository Plugin installation', () =>
prepack: 'tsc --noEmit && tsdown src/plugin.ts src/mcp-server.ts --no-config --tsconfig tsconfig.json --out-dir lib --platform node --target es2024 --clean && dsh-plugin-prepare',
},
dsh: {
skills: ['../skills'],
mcpServers: './.mcp.json',
entry: './lib/plugin.mjs',
},
@@ -235,6 +235,8 @@ describe.skipIf(!enabled)('dsh run GitHub repository Plugin installation', () =>
typescript: '6.0.3',
},
})
expect(readFileSync(join(installed, 'dsh-plugin-assets/skills/0/github-source-proof/SKILL.md'), 'utf8'))
.toContain('This skill exists only in the GitHub repository source fixture.')
expect(readFileSync(join(installed, 'dsh-plugin-assets/.mcp.json'), 'utf8')).toContain('lib/mcp-server.mjs')
expect(readFileSync(join(installed, 'lib/plugin.mjs'), 'utf8')).toContain('TS_PLUGIN_FROM_GITHUB_REPOSITORY')
expect(readFileSync(join(installed, 'lib/mcp-server.mjs'), 'utf8')).toContain('MCP_FROM_GITHUB_REPOSITORY')