agent-Specialization/config
JOJO e2bbd767f7 feat(host-security+ui): unify host execution/approval behavior, runtime notices, and approval overlay UX
This commit consolidates a large set of host-mode security and UX fixes across backend and frontend.

Security / execution model:
- Make permission/execution mode switches apply immediately (no deferred pending-only behavior).
- Keep runtime mode change notices durable and visible via user-message guidance path.
- Add explicit runtime message source taxonomy support and persistence:
  user / presend / guidance / notify / sub_agent / background_command.
- Ensure guidance/notify insertion is batched per tool-cycle so mid-run inserts are committed together.
- Separate notify from guidance semantics for mode-change notices.
- Add direct-mode auto-fallback handling visibility on frontend.

Approval and command gating:
- Align run_command approval pre-check logic with docker behavior for approval/auto_approval modes in host execution paths.
- Keep approval retry flow and final-result semantics intact when permission errors trigger approval.
- Externalize forbidden command keyword list into JSON config:
  config/forbidden_commands.json.
- Update forbidden command rejection message to user-facing wording:
  用户不允许执行包含“... ”的指令.

Prompt/runtime guidance:
- Refine execution-mode runtime rule text to avoid endless workaround loops:
  one safe alternative first, then request switching to direct mode when truly required.

Chat rendering / message UX:
- Prevent injected guidance/notify user-messages from incorrectly triggering assistant work header/timer chain.
- Restore correct visibility after history reload while preserving runtime-source behavior.
- Update user-header icon/label rendering by message source:
  - guidance -> 引导 + navigation icon
  - notify/sub_agent/background_command -> 通知 + bell icon
  - user/presend -> keep normal user header.
- Add new icons: static/icons/navigation.svg, static/icons/bell.svg.

Approval panel UX:
- Convert desktop approval panel from layout-compress sidebar to overlay + blur sheet.
- Fix panel transition behavior (remove unintended vertical motion; use dedicated desktop overlay transition).
- Improve approval result display:
  - decision and reason split lines,
  - green/red status styling,
  - multiline reason rendering,
  - auto-collapse delay adjusted to 3s.

Execution mode TTL feedback:
- When direct mode auto-expires to sandbox, frontend menu state is updated from status snapshot.
- Show non-auto-dismiss warning toast to explicitly notify auto-fallback.

Misc consistency updates:
- Execution mode label text cleanup in composer.
- Runtime notice wording normalization (权限模式修改为..., 执行环境修改为...).

Build/test notes:
- Frontend rebuilt after UI changes.
- Smoke tests passed for server refactor path.
2026-05-12 19:16:38 +08:00
..
__init__.py feat: add MCP management and host-only runtime policy 2026-04-26 23:49:04 +08:00
api.py feat: containerize terminals and add resource controls 2025-11-23 18:49:35 +08:00
auth.py feat: add api admin ui and container status fix 2026-01-25 10:49:52 +08:00
auto_approval.json feat(permission): add auto-approval mode with approval agent, UI flow, and docs sync 2026-05-11 17:55:27 +08:00
conversation.py feat: enhance read tool and config structure 2025-11-14 18:33:55 +08:00
custom_models.json feat(host-security+ui): unify host execution/approval behavior, runtime notices, and approval overlay UX 2026-05-12 19:16:38 +08:00
custom_models.json.example fix(prompt): merge disabled-tool notice into leading system prompts 2026-05-09 18:56:49 +08:00
custom_tools.py chore: sync pending changes 2026-01-05 21:48:55 +08:00
docker_risk_markers.json fix(permission,docker): enforce docker-specific approval flow and polish permission menu layout 2026-05-11 22:56:10 +08:00
forbidden_commands.json feat(host-security+ui): unify host execution/approval behavior, runtime notices, and approval overlay UX 2026-05-12 19:16:38 +08:00
host_sandbox_policy.json feat(security): unify host sandbox controls across command/python/terminal/sub-agent and add path authorization UI 2026-05-11 13:41:30 +08:00
host_workspaces.json.example feat: add host workspace manager, mcp-tool-config skill, and UI enhancements 2026-04-28 13:04:51 +08:00
limits.py fix: extend run_command foreground timeout limit to 120s 2026-04-25 16:34:56 +08:00
mcp.py feat: add MCP management and host-only runtime policy 2026-04-26 23:49:04 +08:00
memory.py feat: enhance read tool and config structure 2025-11-14 18:33:55 +08:00
model_profiles.py fix: adapt deepseek custom models and harden todo/tool gating 2026-04-24 18:31:03 +08:00
ocr.py chore: snapshot before tool ui fix 2025-11-26 18:07:52 +08:00
paths.py fix(prompt): merge disabled-tool notice into leading system prompts 2026-05-09 18:56:49 +08:00
security.py feat(host-security+ui): unify host execution/approval behavior, runtime notices, and approval overlay UX 2026-05-12 19:16:38 +08:00
skill_hints.json fix: 完善工具约束与项目文档说明 2026-04-10 14:33:41 +08:00
sub_agent.py fix(prompt): merge disabled-tool notice into leading system prompts 2026-05-09 18:56:49 +08:00
terminal.py feat(security): harden host execution model with sandbox/direct controls 2026-05-10 19:19:01 +08:00
todo.py feat: enhance read tool and config structure 2025-11-14 18:33:55 +08:00
ui.py feat: inline workspace logo with theme adaptation and bump versions 2026-04-07 12:14:10 +08:00
uploads.py feat: improve onboarding and copy ux 2026-01-19 21:02:24 +08:00