feat(admin): support admin-enforced settings for Agent Skills (#16406)

This commit is contained in:
N. Taylor Mullen
2026-01-13 23:40:23 -08:00
committed by GitHub
parent 66e7b479ae
commit bb6c574144
20 changed files with 350 additions and 52 deletions
+3 -3
View File
@@ -11,8 +11,6 @@ import nodePath from 'node:path';
import type { PolicySettings } from './types.js';
import { ApprovalMode, PolicyDecision, InProcessCheckerType } from './types.js';
import { Storage } from '../config/storage.js';
afterEach(() => {
vi.clearAllMocks();
vi.restoreAllMocks();
@@ -20,7 +18,9 @@ afterEach(() => {
});
describe('createPolicyEngineConfig', () => {
beforeEach(() => {
beforeEach(async () => {
vi.resetModules();
const { Storage } = await import('../config/storage.js');
// Mock Storage to avoid picking up real user/system policies from the host environment
vi.spyOn(Storage, 'getUserPoliciesDir').mockReturnValue(
'/non/existent/user/policies',