diff --git a/e2e/bub/src/powercontext_e2e/harbor_kimi_code.py b/e2e/bub/src/powercontext_e2e/harbor_kimi_code.py index ec44453b3a..b287ab4570 100644 --- a/e2e/bub/src/powercontext_e2e/harbor_kimi_code.py +++ b/e2e/bub/src/powercontext_e2e/harbor_kimi_code.py @@ -86,7 +86,9 @@ write(manifestPath, manifest) const skill = path.join(plugin, 'skills/powercontext-project-context/SKILL.md') const guidance = fs.readFileSync(skill, 'utf8') -fs.writeFileSync(skill, guidance.replaceAll('__POWERCONTEXT_SCOPE_JSON__', () => JSON.stringify(scopeId))) +fs.writeFileSync(skill, guidance + .replaceAll('__POWERCONTEXT_SCOPE_JSON__', () => JSON.stringify(scopeId)) + .replaceAll('__POWERCONTEXT_SCOPE_SCRIPT_JSON__', () => JSON.stringify(path.join(plugin, 'scripts/scope.mjs')))) const now = new Date().toISOString() write(path.join(home, 'plugins/installed.json'), {{ version: 1, plugins: [{{ id: 'powercontext', root: plugin, source: 'local-path', enabled: true, diff --git a/e2e/bub/tests/test_harbor_job_config.py b/e2e/bub/tests/test_harbor_job_config.py index 025cab79ae..b11847792e 100644 --- a/e2e/bub/tests/test_harbor_job_config.py +++ b/e2e/bub/tests/test_harbor_job_config.py @@ -845,7 +845,12 @@ def _kimi_installation(home: Path) -> dict[str, object]: for path in sorted((home / "plugins").rglob("*")): if path.is_file(): text = path.read_text(encoding="utf-8") - files[path.relative_to(home).as_posix()] = json.loads(text) if path.suffix == ".json" else text + if path.suffix == ".json": + files[path.relative_to(home).as_posix()] = json.loads(text) + else: + # The guidance names the installed Scope script by its path inside this test's directories. + text = text.replace(str(home.resolve()), "").replace(str(home), "") + files[path.relative_to(home).as_posix()] = text for record in files["plugins/installed.json"]["plugins"]: # type: ignore[index] # Each installation records its own time, and its source and root inside this test's directories. for name in ("installedAt", "updatedAt", "originalSource"):