Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
test/docs: follow the dispatcher move
time-attackfaed51f2f95d
diff --git a/docs/architecture/wave-1-moves.json b/docs/architecture/wave-1-moves.jsonindex 8f9e99916f..b5c7913433 100644--- a/docs/architecture/wave-1-moves.json+++ b/docs/architecture/wave-1-moves.json@@ -12,7 +12,7 @@{"old": "src/cli.ts:CLI_ONLY","kind": "moved",- "facade": "src/cli.ts:CLI_ONLY",+ "facade": "src/cli/main.ts:CLI_ONLY","wasExported": true,"new": ["src/cli/command-table.ts:CLI_ONLY"@@ -39,7 +39,7 @@{"old": "src/cli.ts:THIN_CLIENT_REFUSED_COMMANDS","kind": "moved",- "facade": "src/cli.ts:THIN_CLIENT_REFUSED_COMMANDS",+ "facade": "src/cli/main.ts:THIN_CLIENT_REFUSED_COMMANDS","wasExported": true,"new": ["src/cli/command-table.ts:THIN_CLIENT_REFUSED_COMMANDS"@@ -48,14 +48,14 @@{"old": "src/cli.ts:handleCliOnly","kind": "split",- "facade": "src/cli.ts:handleCliOnly",+ "facade": "src/cli/main.ts:handleCliOnly","wasExported": false,"new": [- "src/cli.ts:connectCliOnlyEngine",- "src/cli.ts:prepareConnectedDispatch",- "src/cli.ts:routeCliOnlyBeforeTable",- "src/cli.ts:routeEngineFreeSubcommands",- "src/cli.ts:runReadOnlyTimeoutDispatch",+ "src/cli/main.ts:connectCliOnlyEngine",+ "src/cli/main.ts:prepareConnectedDispatch",+ "src/cli/main.ts:routeCliOnlyBeforeTable",+ "src/cli/main.ts:routeEngineFreeSubcommands",+ "src/cli/main.ts:runReadOnlyTimeoutDispatch","src/cli/commands/advisor.ts:run","src/cli/commands/agent.ts:run","src/cli/commands/anomalies.ts:run",@@ -151,10 +151,10 @@{"old": "src/cli.ts:main","kind": "extracted",- "facade": "src/cli.ts:main",+ "facade": "src/cli/main.ts:main","wasExported": false,"new": [- "src/cli.ts:runSharedOperation"+ "src/cli/main.ts:runSharedOperation"]},{diff --git a/docs/architecture/wave-1-porting.md b/docs/architecture/wave-1-porting.mdindex eaab279c6d..67f23b77c4 100644--- a/docs/architecture/wave-1-porting.md+++ b/docs/architecture/wave-1-porting.md@@ -135,12 +135,12 @@ module path when it keeps exporting the name; "module-private" means the old mod| Old symbol | Kind | Still importable from | New location(s) ||---|---|---|---|-| `CLI_ONLY` | moved | `src/cli.ts:CLI_ONLY` | `src/cli/command-table.ts:CLI_ONLY` |+| `CLI_ONLY` | moved | `src/cli/main.ts:CLI_ONLY` | `src/cli/command-table.ts:CLI_ONLY` || `CLI_ONLY_SELF_HELP` | moved | module-private | `src/cli/command-table.ts:CLI_ONLY_SELF_HELP` || `STARTUP_HOOK_SKIP_COMMANDS` | moved | module-private | `src/cli/command-table.ts:STARTUP_HOOK_SKIP_COMMANDS` |-| `THIN_CLIENT_REFUSED_COMMANDS` | moved | `src/cli.ts:THIN_CLIENT_REFUSED_COMMANDS` | `src/cli/command-table.ts:THIN_CLIENT_REFUSED_COMMANDS` |-| `handleCliOnly` | split | `src/cli.ts:handleCliOnly` | `src/cli.ts:connectCliOnlyEngine`<br>`src/cli.ts:prepareConnectedDispatch`<br>`src/cli.ts:routeCliOnlyBeforeTable`<br>`src/cli.ts:routeEngineFreeSubcommands`<br>`src/cli.ts:runReadOnlyTimeoutDispatch`<br>`src/cli/commands/advisor.ts:run`<br>`src/cli/commands/agent.ts:run`<br>`src/cli/commands/anomalies.ts:run`<br>… and 87 more (see the JSON) |-| `main` | extracted | `src/cli.ts:main` | `src/cli.ts:runSharedOperation` |+| `THIN_CLIENT_REFUSED_COMMANDS` | moved | `src/cli/main.ts:THIN_CLIENT_REFUSED_COMMANDS` | `src/cli/command-table.ts:THIN_CLIENT_REFUSED_COMMANDS` |+| `handleCliOnly` | split | `src/cli/main.ts:handleCliOnly` | `src/cli/main.ts:connectCliOnlyEngine`<br>`src/cli/main.ts:prepareConnectedDispatch`<br>`src/cli/main.ts:routeCliOnlyBeforeTable`<br>`src/cli/main.ts:routeEngineFreeSubcommands`<br>`src/cli/main.ts:runReadOnlyTimeoutDispatch`<br>`src/cli/commands/advisor.ts:run`<br>`src/cli/commands/agent.ts:run`<br>`src/cli/commands/anomalies.ts:run`<br>… and 87 more (see the JSON) |+| `main` | extracted | `src/cli/main.ts:main` | `src/cli/main.ts:runSharedOperation` |### `src/commands/autopilot.ts`diff --git a/test/cycle/regression-pr-wave-r1-r2-r4.test.ts b/test/cycle/regression-pr-wave-r1-r2-r4.test.tsindex 9b50938565..d5d0f22f83 100644--- a/test/cycle/regression-pr-wave-r1-r2-r4.test.ts+++ b/test/cycle/regression-pr-wave-r1-r2-r4.test.ts@@ -120,7 +120,7 @@ describe('R4 — cross-platform stdin via fd 0 (PR #1325 regression pin)', () =>const root = join(import.meta.dir ?? '.', '..', '..', 'src');// test-reads-source-ok[structural]: the R4 regression pins the absence of the /dev/stdin read in the CLI shim (moved there by A5).const src = readFileSync(join(root, 'core', 'interaction.ts'), 'utf-8');- expect(readFileSync(join(root, 'cli.ts'), 'utf-8')).not.toMatch(/readFileSync\(\s*['"]\/dev\/stdin['"]/);+ expect(readFileSync(join(root, 'cli', 'main.ts'), 'utf-8')).not.toMatch(/readFileSync\(\s*['"]\/dev\/stdin['"]/);// The exact pattern the PR replaced. If anyone reintroduces it, R4 fires.// Look for `'/dev/stdin'` with surrounding quote so we don't false-fire@@ -141,7 +141,7 @@ describe('R4 — cross-platform stdin via fd 0 (PR #1325 regression pin)', () =>// the surrounding shape of the parseOpArgs stdin-reading branch hasn't// drifted (existence of the branch + 5MB cap), since the branch itself// is what was modified by PR #1325.- const path = join(import.meta.dir ?? '.', '..', '..', 'src', 'cli.ts');+ const path = join(import.meta.dir ?? '.', '..', '..', 'src', 'cli', 'main.ts');const src = readFileSync(path, 'utf-8');// Stdin reading branch still exists in parseOpArgs.diff --git a/test/reindex-code-recovery.test.ts b/test/reindex-code-recovery.test.tsindex 31cba640e9..1c9ff842da 100644--- a/test/reindex-code-recovery.test.ts+++ b/test/reindex-code-recovery.test.ts@@ -105,7 +105,7 @@ describe('doctor code_chunk_metadata (#3970 surface 2)', () => {describe('CLI help line (#3970 surface 1)', () => {test('reindex-code help documents --force', () => {- const cli = surfaceFileSource('cli', 'src/cli.ts');+ const cli = surfaceFileSource('cli', 'src/cli/top-help.ts');const line = cli.split('\n').find((l) => l.trimStart().startsWith('reindex-code ['));expect(line).toBeDefined();expect(line!).toContain('--force');