fix(agent): implement AgentProtocol disposal to prevent memory leaks

This commit is contained in:
Michael Bleigh
2026-05-11 14:56:10 -07:00
parent a7ae31d732
commit aa8eca7bfe
6 changed files with 26 additions and 11 deletions
+2 -9
View File
@@ -18,7 +18,7 @@
// limitations under the License.
import { execSync } from 'node:child_process';
import { writeFileSync, existsSync, cpSync, rmSync } from 'node:fs';
import { writeFileSync, existsSync, cpSync } from 'node:fs';
import { join, basename } from 'node:path';
if (!process.cwd().includes('packages')) {
@@ -48,14 +48,7 @@ if (packageName === 'core') {
const docsSource = join(process.cwd(), '..', '..', 'docs');
const docsTarget = join(process.cwd(), 'dist', 'docs');
if (existsSync(docsSource)) {
if (existsSync(docsTarget)) {
rmSync(docsTarget, { recursive: true, force: true });
}
cpSync(docsSource, docsTarget, {
recursive: true,
dereference: true,
force: true,
});
cpSync(docsSource, docsTarget, { recursive: true, dereference: true });
console.log('Copied documentation to dist/docs');
}
}