



























@@ -30,10 +30,7 @@ import * as authBridge from "./auth-bridge.js";
3030import { resolveCodexAppServerEnvApiKeyCacheKey } from "./auth-bridge.js";
3131import type { CodexAppServerClientFactory } from "./client-factory.js";
3232import { readCodexPluginConfig, resolveCodexAppServerRuntimeOptions } from "./config.js";
33-import {
34-CODEX_OPENCLAW_DYNAMIC_TOOL_NAMESPACE,
35-createCodexDynamicToolBridge,
36-} from "./dynamic-tools.js";
33+import { CODEX_OPENCLAW_DYNAMIC_TOOL_NAMESPACE } from "./dynamic-tools.js";
3734import * as elicitationBridge from "./elicitation-bridge.js";
3835import {
3936buildCodexPluginAppCacheKey,
@@ -609,6 +606,10 @@ describe("runCodexAppServerAttempt", () => {
609606"exec",
610607"process",
611608"update_plan",
609+"tool_call",
610+"tool_describe",
611+"tool_search",
612+"tool_search_code",
612613"web_search",
613614"message",
614615"heartbeat_respond",
@@ -654,6 +655,10 @@ describe("runCodexAppServerAttempt", () => {
654655"exec",
655656"process",
656657"update_plan",
658+"tool_call",
659+"tool_describe",
660+"tool_search",
661+"tool_search_code",
657662"web_search",
658663"message",
659664].map(createNamedDynamicTool),
@@ -684,6 +689,10 @@ describe("runCodexAppServerAttempt", () => {
684689"exec",
685690"process",
686691"update_plan",
692+"tool_call",
693+"tool_describe",
694+"tool_search",
695+"tool_search_code",
687696]) {
688697expect(dynamicToolNames).not.toContain(toolName);
689698}
@@ -792,52 +801,6 @@ describe("runCodexAppServerAttempt", () => {
792801expect((await readCodexAppServerBinding(sessionFile))?.mcpServersFingerprint).toBeUndefined();
793802});
794803795-it("does not expose OpenClaw Tool Search controls through Codex dynamic tools", async () => {
796-const sessionFile = path.join(tempDir, "session.jsonl");
797-const workspaceDir = path.join(tempDir, "workspace");
798-const params = createParams(sessionFile, workspaceDir);
799-params.disableTools = false;
800-params.config = {
801-tools: {
802-toolSearch: true,
803-},
804-};
805-const sandboxSessionKey = params.sessionKey;
806-if (!sandboxSessionKey) {
807-throw new Error("createParams must provide a sessionKey for Codex dynamic tool tests.");
808-}
809-__testing.setOpenClawCodingToolsFactoryForTests(() => [
810-createRuntimeDynamicTool("message"),
811-createRuntimeDynamicTool("tool_search_code"),
812-createRuntimeDynamicTool("tool_search"),
813-createRuntimeDynamicTool("tool_describe"),
814-createRuntimeDynamicTool("tool_call"),
815-]);
816-817-const tools = await __testing.buildDynamicTools({
818- params,
819-resolvedWorkspace: workspaceDir,
820-effectiveWorkspace: workspaceDir,
821- sandboxSessionKey,
822-sandbox: null as never,
823-runAbortController: new AbortController(),
824-sessionAgentId: "main",
825-pluginConfig: {},
826-onYieldDetected: () => undefined,
827-});
828-const bridge = createCodexDynamicToolBridge({
829- tools,
830-signal: new AbortController().signal,
831-loading: "searchable",
832-});
833-const dynamicToolNames = bridge.specs.map((tool) => tool.name);
834-835-for (const toolName of ["tool_search_code", "tool_search", "tool_describe", "tool_call"]) {
836-expect(dynamicToolNames).not.toContain(toolName);
837-}
838-expect(dynamicToolNames).toContain("message");
839-});
840-841804it("passes auth profiles into Codex dynamic tool construction", async () => {
842805const sessionFile = path.join(tempDir, "session.jsonl");
843806const workspaceDir = path.join(tempDir, "workspace");
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。