Add architecture package and application skeleton
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
# ADR 005: Policy Evaluation Model
|
||||
|
||||
## Status
|
||||
|
||||
Accepted
|
||||
|
||||
## Context
|
||||
|
||||
Ключевой принцип проекта: без hardcoded bans.
|
||||
Система должна принимать решения через policy engine, а не через встроенные запреты по имени tool или по содержимому команды.
|
||||
|
||||
## Decision
|
||||
|
||||
Policy engine работает в 4 шага:
|
||||
|
||||
1. request/action нормализуется в `ActionDescriptor`;
|
||||
2. descriptor классифицируется по `resource` и `risk_level`;
|
||||
3. policy evaluator находит эффективное правило;
|
||||
4. возвращается `PolicyDecision`.
|
||||
|
||||
## Core Types
|
||||
|
||||
`resource`:
|
||||
|
||||
- `filesystem`
|
||||
- `shell`
|
||||
- `sql`
|
||||
- `mcp`
|
||||
- `external_models`
|
||||
- `desktop`
|
||||
- `browser`
|
||||
- `network`
|
||||
- `cost`
|
||||
- `system`
|
||||
|
||||
`risk_level`:
|
||||
|
||||
- `safe`
|
||||
- `write`
|
||||
- `destructive`
|
||||
- `system`
|
||||
- `cost`
|
||||
|
||||
`decision`:
|
||||
|
||||
- `allow`
|
||||
- `confirm`
|
||||
- `manual`
|
||||
- `disabled_by_config`
|
||||
|
||||
## Important Rule
|
||||
|
||||
Policy engine не получает “tool name only” как источник истины.
|
||||
Он должен опираться на action classification и metadata от tool/model/worker adapters.
|
||||
|
||||
Reference in New Issue
Block a user