mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-24 09:19:34 +00:00
chore(deadcode): remove stale agent helper reexports
This commit is contained in:
@@ -11,7 +11,6 @@ import type { OpenClawConfig } from "../config/config.js";
|
||||
import { createWarnLogCapture } from "../logging/test-helpers/warn-log-capture.js";
|
||||
import {
|
||||
filterToolsByPolicy,
|
||||
isToolAllowedByPolicyName,
|
||||
resolveEffectiveToolPolicy,
|
||||
resolveGroupToolPolicy,
|
||||
resolveInheritedToolPolicyForSession,
|
||||
@@ -19,6 +18,7 @@ import {
|
||||
resolveTrustedGroupId,
|
||||
} from "./agent-tools.policy.js";
|
||||
import { createStubTool } from "./test-helpers/agent-tool-stubs.js";
|
||||
import { isToolAllowedByPolicyName } from "./tool-policy-match.js";
|
||||
|
||||
vi.mock("../channels/plugins/session-conversation.js", () => ({
|
||||
resolveSessionConversation: ({ rawId }: { rawId: string }) => ({
|
||||
|
||||
@@ -570,5 +570,3 @@ export function resolveGroupToolPolicy(params: {
|
||||
});
|
||||
return pickSandboxToolPolicy(configTools);
|
||||
}
|
||||
|
||||
export { isToolAllowedByPolicies, isToolAllowedByPolicyName } from "./tool-policy-match.js";
|
||||
|
||||
@@ -7,15 +7,13 @@ import { runAgentLoop, type AgentEvent, type StreamFn } from "openclaw/plugin-sd
|
||||
import { createAssistantMessageEventStream, validateToolArguments } from "openclaw/plugin-sdk/llm";
|
||||
import { Type, type TSchema } from "typebox";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { normalizeToolParameterSchema } from "./agent-tools-parameter-schema.js";
|
||||
import {
|
||||
isToolWrappedWithBeforeToolCallHook,
|
||||
testing as beforeToolCallTesting,
|
||||
wrapToolWithBeforeToolCallHook,
|
||||
} from "./agent-tools.before-tool-call.js";
|
||||
import {
|
||||
normalizeToolParameterSchema,
|
||||
normalizeToolParameters,
|
||||
} from "./agent-tools.schema.js";
|
||||
import { normalizeToolParameters } from "./agent-tools.schema.js";
|
||||
import type { AnyAgentTool } from "./agent-tools.types.js";
|
||||
|
||||
const TEST_USAGE = {
|
||||
|
||||
@@ -13,8 +13,6 @@ import type { AnyAgentTool } from "./agent-tools.types.js";
|
||||
import { copyChannelAgentToolMeta } from "./channel-tools.js";
|
||||
import { copyToolTerminalPresentation } from "./tool-terminal-presentation.js";
|
||||
|
||||
export { normalizeToolParameterSchema };
|
||||
|
||||
function isObjectSchemaWithNoRequiredParams(schema: unknown): boolean {
|
||||
if (!schema || typeof schema !== "object" || Array.isArray(schema)) {
|
||||
return false;
|
||||
|
||||
@@ -39,7 +39,6 @@ import {
|
||||
import { applyDeferredFollowupToolDescriptions } from "./agent-tools.deferred-followup.js";
|
||||
import { filterToolsByMessageProvider } from "./agent-tools.message-provider-policy.js";
|
||||
import {
|
||||
isToolAllowedByPolicies,
|
||||
resolveEffectiveToolPolicy,
|
||||
resolveGroupToolPolicy,
|
||||
resolveInheritedToolPolicyForSession,
|
||||
@@ -93,6 +92,7 @@ import {
|
||||
import { createToolFsPolicy, resolveToolFsConfig } from "./tool-fs-policy.js";
|
||||
import { resolveToolLoopDetectionConfig } from "./tool-loop-detection-config.js";
|
||||
import { buildDeclaredToolAllowlistContext } from "./tool-policy-declared-context.js";
|
||||
import { isToolAllowedByPolicies } from "./tool-policy-match.js";
|
||||
import {
|
||||
applyToolPolicyPipeline,
|
||||
buildDefaultToolPolicyPipelineSteps,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// validation compatibility for cron jobs.
|
||||
import { Value } from "typebox/value";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { normalizeToolParameterSchema } from "../agent-tools.schema.js";
|
||||
import { normalizeToolParameterSchema } from "../agent-tools-parameter-schema.js";
|
||||
import { createCronToolSchema } from "./cron-tool.js";
|
||||
|
||||
/** Walk a TypeBox schema by dot-separated property path and return sorted keys. */
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import type { OpenClawConfig } from "../config/types.openclaw.js";
|
||||
import {
|
||||
isToolAllowedByPolicies,
|
||||
resolveEffectiveToolPolicy,
|
||||
resolveGroupToolPolicy,
|
||||
resolveInheritedToolPolicyForSession,
|
||||
@@ -12,6 +11,7 @@ import {
|
||||
isSubagentEnvelopeSession,
|
||||
resolveSubagentCapabilityStore,
|
||||
} from "./subagent-capabilities.js";
|
||||
import { isToolAllowedByPolicies } from "./tool-policy-match.js";
|
||||
import { mergeAlsoAllowPolicy, resolveToolProfilePolicy } from "./tool-policy.js";
|
||||
|
||||
export type WebSearchToolPolicyParams = {
|
||||
|
||||
@@ -17,7 +17,6 @@ import {
|
||||
resolveSessionAgentId,
|
||||
} from "../../agents/agent-scope.js";
|
||||
import {
|
||||
isToolAllowedByPolicies,
|
||||
resolveEffectiveToolPolicy,
|
||||
resolveGroupToolPolicy,
|
||||
resolveInheritedToolPolicyForSession,
|
||||
@@ -35,6 +34,7 @@ import {
|
||||
isSubagentEnvelopeSession,
|
||||
resolveSubagentCapabilityStore,
|
||||
} from "../../agents/subagent-capabilities.js";
|
||||
import { isToolAllowedByPolicies } from "../../agents/tool-policy-match.js";
|
||||
import { mergeAlsoAllowPolicy, resolveToolProfilePolicy } from "../../agents/tool-policy.js";
|
||||
import {
|
||||
resolveConversationBindingRecord,
|
||||
|
||||
Reference in New Issue
Block a user