권한 모드 동등화: Plan 추가 및 claw-code 권한 별칭 정규화 반영
Some checks failed
Release Gate / gate (push) Has been cancelled

- 전역 권한 모드를 Ask/Plan/Auto/Deny 4단계로 확장

- claw-code 계열 권한 값(default/acceptEdits/dontAsk/bypassPermissions) 입력 시 내부 모드로 정규화

- AgentContext 권한 판정 경로(전역/도구 오버라이드/패턴 오버라이드) 정규화 적용

- Chat/Settings UI에서 Plan 모드 노출 및 인라인 순환(Ask->Plan->Auto->Deny) 반영

- AppState/SettingsViewModel/SettingsService에 권한값 정규화 및 저장 시 일관성 적용

- Permission lifecycle 이벤트 메시지에 유효 모드 표기 보강

- 빌드/테스트 검증: dotnet build 경고0 오류0, dotnet test 372/372 통과
This commit is contained in:
2026-04-03 21:02:55 +09:00
parent 23f42502d0
commit b30c5f124e
10 changed files with 140 additions and 39 deletions

View File

@@ -4068,6 +4068,9 @@ public partial class AgentLoopService
case "ask":
normalized = "ask";
return true;
case "plan":
normalized = "ask";
return true;
case "auto":
normalized = "auto";
return true;
@@ -4153,16 +4156,16 @@ public partial class AgentLoopService
messages,
success: true);
var effectivePerm = context.GetEffectiveToolPermission(toolName, target);
var effectivePerm = PermissionModeCatalog.NormalizeGlobalMode(context.GetEffectiveToolPermission(toolName, target));
if (string.Equals(effectivePerm, "Ask", StringComparison.OrdinalIgnoreCase))
EmitEvent(AgentEventType.PermissionRequest, toolName, $"권한 확인 필요 · 대상: {target}");
if (PermissionModeCatalog.RequiresUserApproval(effectivePerm))
EmitEvent(AgentEventType.PermissionRequest, toolName, $"권한 확인 필요({effectivePerm}) · 대상: {target}");
var allowed = await context.CheckToolPermissionAsync(toolName, target);
if (allowed)
{
if (string.Equals(effectivePerm, "Ask", StringComparison.OrdinalIgnoreCase))
EmitEvent(AgentEventType.PermissionGranted, toolName, $"권한 승인됨 · 대상: {target}");
if (PermissionModeCatalog.RequiresUserApproval(effectivePerm))
EmitEvent(AgentEventType.PermissionGranted, toolName, $"권한 승인됨({effectivePerm}) · 대상: {target}");
await RunPermissionLifecycleHooksAsync(
"__permission_granted__",
"post",