mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-12 12:54:07 -07:00
policy: extract legacy policy from core tool scheduler to policy engine (#15902)
This commit is contained in:
@@ -72,14 +72,14 @@ describe('createPolicyUpdater', () => {
|
||||
1,
|
||||
expect.objectContaining({
|
||||
toolName: 'run_shell_command',
|
||||
argsPattern: new RegExp('"command":"echo(?:[\\s"]|$)'),
|
||||
argsPattern: new RegExp('"command":"echo(?:[\\s"]|\\\\")'),
|
||||
}),
|
||||
);
|
||||
expect(policyEngine.addRule).toHaveBeenNthCalledWith(
|
||||
2,
|
||||
expect.objectContaining({
|
||||
toolName: 'run_shell_command',
|
||||
argsPattern: new RegExp('"command":"ls(?:[\\s"]|$)'),
|
||||
argsPattern: new RegExp('"command":"ls(?:[\\s"]|\\\\")'),
|
||||
}),
|
||||
);
|
||||
});
|
||||
@@ -98,7 +98,7 @@ describe('createPolicyUpdater', () => {
|
||||
expect(policyEngine.addRule).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
toolName: 'run_shell_command',
|
||||
argsPattern: new RegExp('"command":"git(?:[\\s"]|$)'),
|
||||
argsPattern: new RegExp('"command":"git(?:[\\s"]|\\\\")'),
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user