Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

refactor(spawn): import and facts purge-verify launch through src/core/spawn.ts (#4992)

garrytan57f33a312273
diff --git a/scripts/check-windows-hide.ts b/scripts/check-windows-hide.ts
index 957959ee86..84f7e06ff5 100644
--- a/scripts/check-windows-hide.ts
+++ b/scripts/check-windows-hide.ts
@@ -44,13 +44,11 @@ const NOT_YET_MIGRATED: Record<string, string> = {
'src/commands/bootstrap.ts': 'not yet migrated: open PR #6283, #6319 edits this file',
'src/commands/claw-test.ts': 'not yet migrated: open PR #6775 edits this file',
'src/commands/eval-longmemeval.ts': 'not yet migrated: open PR #6790 edits this file',
- 'src/commands/import.ts': 'not yet migrated: open PR #6787 edits this file',
'src/commands/serve.ts': 'not yet migrated: open PR #6437 edits this file',
'src/commands/setup.ts': 'not yet migrated: open PR #6406 edits this file',
'src/commands/takes.ts': 'not yet migrated: open PR #6505 edits this file',
'src/commands/upgrade.ts': 'not yet migrated: open PR #6769 edits this file',
'src/core/bootstrap/verify.ts': 'not yet migrated: open PR #6793 edits this file',
- 'src/core/facts/purge-verify.ts': 'not yet migrated: open PR #6787 edits this file',
'src/core/harness/install.ts': 'not yet migrated: open PR #6319, #6406 edits this file',
'src/core/persistence/engine-graduation.ts': 'not yet migrated: persistence write path, migrated with its owning work (GBRA-101)',
'src/core/persistence/sync-blobs.ts': 'not yet migrated: persistence write path, migrated with its owning work (GBRA-101)',
diff --git a/src/commands/import.ts b/src/commands/import.ts
index 2fea42b6f4..73d45717f5 100644
--- a/src/commands/import.ts
+++ b/src/commands/import.ts
@@ -4,7 +4,7 @@ import { opError } from '../core/ops/contract.ts';
import { hasSourceFilesystemLock, withSourceFilesystemLock, currentSourceFilesystemSignal } from '../core/minions/source-filesystem.ts';
import { readdirSync, lstatSync, existsSync, mkdirSync } from 'fs';
import { recordFunnelEvent } from '../core/funnel.ts';
-import { execFileSync } from 'child_process';
+import { execFileSync } from '../core/spawn.ts';
import { basename, dirname, isAbsolute, join, relative, resolve, sep } from 'path';
import { cpus, totalmem } from 'os';
import type { BrainEngine } from '../core/engine.ts';
diff --git a/src/core/facts/purge-verify.ts b/src/core/facts/purge-verify.ts
index 72982f4e88..b4641f7b6e 100644
--- a/src/core/facts/purge-verify.ts
+++ b/src/core/facts/purge-verify.ts
@@ -15,7 +15,7 @@
* stored receipt, the effects and a fingerprint probe.
*/
-import { spawn } from 'node:child_process';
+import { spawn } from '../spawn.ts';
import { existsSync, readFileSync, unlinkSync } from 'node:fs';
import { join } from 'node:path';
import type { BrainEngine } from '../engine.ts';