diff --git a/packages/api/src/agents/hitl/policy.ts b/packages/api/src/agents/hitl/policy.ts index 34739db31b..e1ad02794a 100644 --- a/packages/api/src/agents/hitl/policy.ts +++ b/packages/api/src/agents/hitl/policy.ts @@ -1,4 +1,5 @@ import { randomUUID } from 'crypto'; +import type { ToolPolicyConfig } from '@librechat/agents'; import type { Agents, TToolApprovalPolicy } from 'librechat-data-provider'; /** @@ -10,22 +11,6 @@ import type { Agents, TToolApprovalPolicy } from 'librechat-data-provider'; */ const DEFAULT_REVIEW_DECISIONS: Agents.ToolApprovalDecisionType[] = ['approve', 'reject', 'edit']; -/** - * Structural mirror of `@librechat/agents`'s `ToolPolicyConfig`. - * - * Defined here (rather than imported) so this module compiles before the SDK - * version that ships `createToolPolicyHook` is published. When the SDK is - * pinned, callers in Slice B can `import type { ToolPolicyConfig }` and - * the structural identity holds. - */ -export interface ToolPolicyConfig { - mode?: 'default' | 'dontAsk' | 'bypass'; - allow?: string[]; - deny?: string[]; - ask?: string[]; - reason?: string; -} - /** * Whether the HITL machinery should run for this policy. *