mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-07-10 08:13:46 +00:00
🪢 chore: Import ToolPolicyConfig From @librechat/agents
The SDK type now ships in 3.1.77 (already pinned on `dev`), so the structural mirror in `policy.ts` is redundant. Drop the local interface and import directly so future SDK changes to `ToolPolicyConfig` propagate without our `mapToolApprovalPolicy` going stale.
This commit is contained in:
parent
2335ae2805
commit
9c99ad7682
1 changed files with 1 additions and 16 deletions
|
|
@ -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.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue