wip: first run of implementation
This commit is contained in:
21
tests/engine/agentic/policy/actionPolicy.test.ts
Normal file
21
tests/engine/agentic/policy/actionPolicy.test.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { resolveActionPolicy } from '../../../../src/main/agentic/policy/actionPolicy';
|
||||
|
||||
describe('action policy', () => {
|
||||
it('marks dangerous actions as requiring explicit confirmation', () => {
|
||||
const policy = resolveActionPolicy('deletePost');
|
||||
expect(policy.level).toBe('danger');
|
||||
expect(policy.requiresConfirmation).toBe(true);
|
||||
});
|
||||
|
||||
it('marks configurable but safe navigation actions as confirm', () => {
|
||||
const policy = resolveActionPolicy('openSettings');
|
||||
expect(policy.level).toBe('confirm');
|
||||
expect(policy.requiresConfirmation).toBe(true);
|
||||
});
|
||||
|
||||
it('defaults unknown actions to danger', () => {
|
||||
const policy = resolveActionPolicy('unknownAction');
|
||||
expect(policy.level).toBe('danger');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user