Use Pi runtime hooks for research context hygiene

This commit is contained in:
Advait Paliwal
2026-04-17 10:38:42 -07:00
parent 9841342866
commit f0bbb25910
18 changed files with 480 additions and 25 deletions

View File

@@ -258,7 +258,7 @@ test("updateConfiguredPackages batches multiple npm updates into a single instal
globalThis.fetch = (async () => ({
ok: true,
json: async () => ({ version: "2.0.0" }),
})) as typeof fetch;
})) as unknown as typeof fetch;
try {
const result = await updateConfiguredPackages(workingDir, agentDir);
@@ -306,7 +306,7 @@ test("updateConfiguredPackages skips native package updates on unsupported Node
globalThis.fetch = (async () => ({
ok: true,
json: async () => ({ version: "2.0.0" }),
})) as typeof fetch;
})) as unknown as typeof fetch;
Object.defineProperty(process.versions, "node", { value: "25.0.0", configurable: true });
try {