Skip to content

Commit 546edca

Browse files
committed
perf(gateway): trim hooks import graph
1 parent 66701d5 commit 546edca

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/gateway/hooks-mapping.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import fs from "node:fs";
22
import path from "node:path";
3-
import { CONFIG_PATH, type HookMappingConfig, type HooksConfig } from "../config/config.js";
3+
import { CONFIG_PATH } from "../config/paths.js";
4+
import type { HookMappingConfig, HooksConfig } from "../config/types.hooks.js";
45
import { importFileModule, resolveFunctionModuleExport } from "../hooks/module-loader.js";
56
import { normalizeOptionalString, readStringValue } from "../shared/string-coerce.js";
67
import type { HookMessageChannel } from "./hooks.types.js";

src/gateway/hooks.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { randomUUID } from "node:crypto";
22
import type { IncomingMessage } from "node:http";
3-
import { listAgentIds, resolveDefaultAgentId } from "../agents/agent-scope.js";
3+
import { listAgentIds, resolveDefaultAgentId } from "../agents/agent-scope-config.js";
44
import { listChannelPlugins } from "../channels/plugins/index.js";
55
import type { OpenClawConfig } from "../config/types.openclaw.js";
66
import { readJsonBodyWithLimit, requestBodyErrorToText } from "../infra/http-body.js";
@@ -10,7 +10,7 @@ import {
1010
normalizeLowercaseStringOrEmpty,
1111
normalizeOptionalString,
1212
} from "../shared/string-coerce.js";
13-
import { normalizeMessageChannel } from "../utils/message-channel.js";
13+
import { normalizeMessageChannel } from "../utils/message-channel-core.js";
1414
import { type HookMappingResolved, resolveHookMappings } from "./hooks-mapping.js";
1515
import { resolveAllowedAgentIds } from "./hooks-policy.js";
1616
import type { HookMessageChannel } from "./hooks.types.js";

0 commit comments

Comments
 (0)