fix(sdk): enforce runtime dependency boundary

This commit is contained in:
2026-09-05 08:01:07 +08:00
parent 471e2e9479
commit dfaa4f0ef4
4 changed files with 45 additions and 11 deletions
@@ -122,14 +122,6 @@ test('Task 1 route validator is the shared authority for game-route admission',
for (const route of ['platform', 'agent', 'room']) {
assert.throws(() => assertGameRoute(route), /reserved.*route/i);
}
const validatorSource = readFileSync(new URL(
'../../YouleNexus/assets/framework/sdk/runtime/game-session-host.ts',
import.meta.url,
), 'utf8');
assert.match(validatorSource, /import \{ Route \} from '\.\.\/\.\.\/core\/constants\.ts';/);
assert.match(validatorSource, /new Set<string>\(Object\.values\(Route\)\)/);
assert.doesNotMatch(validatorSource, /new Set\(\[['"]platform['"]/);
});
test('execute exposes only the GameHost command union and delegates semantic commands', () => {