mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-15 12:30:32 -07:00
Addressing feedback and fixing policy issues
This commit is contained in:
@@ -409,11 +409,13 @@ describe('extension tests', () => {
|
||||
toolName = "deny_tool"
|
||||
decision = "deny"
|
||||
priority = 500
|
||||
modes = ["plan", "default", "autoEdit"]
|
||||
|
||||
[[rule]]
|
||||
toolName = "ask_tool"
|
||||
decision = "ask_user"
|
||||
priority = 100
|
||||
modes = ["plan", "default", "autoEdit"]
|
||||
`;
|
||||
fs.writeFileSync(
|
||||
path.join(policiesDir, 'policies.toml'),
|
||||
@@ -454,6 +456,7 @@ priority = 100
|
||||
toolName = "allow_tool"
|
||||
decision = "allow"
|
||||
priority = 100
|
||||
modes = ["plan", "default", "autoEdit"]
|
||||
|
||||
[[rule]]
|
||||
toolName = "yolo_tool"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
|
||||
import {
|
||||
ApprovalMode,
|
||||
MODES_BY_PERMISSIVENESS,
|
||||
PolicyDecision,
|
||||
PolicyEngine,
|
||||
} from '@google/gemini-cli-core';
|
||||
@@ -385,6 +386,7 @@ describe('Policy Engine Integration Tests', () => {
|
||||
toolAnnotations: { readOnlyHint: true },
|
||||
decision: PolicyDecision.ALLOW,
|
||||
priority: 10,
|
||||
modes: MODES_BY_PERMISSIVENESS,
|
||||
});
|
||||
|
||||
const engine = new PolicyEngine(config);
|
||||
|
||||
@@ -23,6 +23,7 @@ import {
|
||||
ExtensionLoader,
|
||||
AuthType,
|
||||
ApprovalMode,
|
||||
MODES_BY_PERMISSIVENESS,
|
||||
createPolicyEngineConfig,
|
||||
PolicyDecision,
|
||||
ToolConfirmationOutcome,
|
||||
@@ -452,6 +453,7 @@ export class AppRig {
|
||||
toolName,
|
||||
decision,
|
||||
priority,
|
||||
modes: MODES_BY_PERMISSIVENESS,
|
||||
source: 'AppRig Override',
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user