|
permissions: remove broken client-side gate; add backend design doc
The terminal-TUI permission gate was a race: _execute_tools_with_sink emits ToolStarted and starts the tool on the backend immediately, so by the time the client dialog appeared the destructive action had already run -- 'deny' could only stop the session, not un-execute the tool. It also existed only in the terminal TUI (webclient/android had nothing), and the system-prompt 'Strict Confirmation' nudge was an unreliable duplicate. Remove the broken machinery for a clean slate and plan the real replacement from zero: - delete clients/terminal/tui/permissions.py, screens/permission_dialog.py and their tests - strip tui_app.py (engine, _deny_tool, _show_permission_dialog, _confirm_shell_command, _stop_session_worker, on_permission_request, tool_started gate) and the PermissionRequest TUI event; !cmd now runs directly (user-typed, no agent gate) - drop the 'Strict Confirmation' prompt rule from navi_code/developer/ tool_developer - add docs/permissions.md: authoritative backend gate design (engine + registry + event + endpoint + agent gate + postgres policy + global rules config, sub-agents gated) -- design only, not yet implemented - update docs/index.md, navi_code_cli.md, profiles.md, testing.md Until Phase 1 lands there is no destructive-action confirmation -- a conscious period without the false security of the old race-gate. |
|---|
|
|
| clients/terminal/tui/events.py |
|---|
| clients/terminal/tui/permissions.py 100644 → 0 |
|---|
| clients/terminal/tui/screens/permission_dialog.py 100644 → 0 |
|---|
| clients/terminal/tui/tui_app.py |
|---|
| docs/index.md |
|---|
| docs/navi_code_cli.md |
|---|
| docs/permissions.md 0 → 100644 |
|---|
| docs/profiles.md |
|---|
| docs/testing.md |
|---|
| navi/profiles/developer/system_prompt.txt |
|---|
| navi/profiles/navi_code/system_prompt.txt |
|---|
| navi/profiles/tool_developer/system_prompt.txt |
|---|
| tests/clients/test_permission_dialog.py 100644 → 0 |
|---|
| tests/clients/test_permissions.py 100644 → 0 |
|---|