Skip to content

feat(ui): full access mode — opt-in auto-run without destructive-command pause (PR 0004) - #167

Open
tokg-venv wants to merge 1 commit into
deer-flow:mainfrom
tokg-venv:pr/0004-full-access-mode
Open

feat(ui): full access mode — opt-in auto-run without destructive-command pause (PR 0004)#167
tokg-venv wants to merge 1 commit into
deer-flow:mainfrom
tokg-venv:pr/0004-full-access-mode

Conversation

@tokg-venv

Copy link
Copy Markdown
Contributor

Summary

Implements spec 0004: an opt-in "Full access mode" for users who run the agent unattended on their own machine. When enabled together with auto-run tools, auto-run no longer pauses on bash commands flagged destructive (isDangerousBashCommand): every tool call executes automatically.

Safety posture (deliberate guardrail trade-off — please scrutinize):

  • Off by default; affects only local auto-run behavior, no runtime-layer changes.
  • First-time enable requires an explicit, unskippable risk-acknowledgement dialog (destructive confirm). Reinstalling or clearing storage re-asks.
  • A persistent amber "Full access" badge stays visible in the toolbar while the mode is on; each run shows a dismissible warning toast.
  • Scope is limited to the destructive-bash pause: control-flow tools such as terminate remain never-auto-executed. Without auto-run enabled, the mode has no effect.

Details

  • run-mode.ts: get/setFullAccessMode + get/setFullAccessAcknowledged (localStorage) + useSyncExternalStore subscription; useRunMode exposes fullAccessMode
  • thread-store.ts: getFullAccessMode option read fresh at run time; the destructive-bash interception skips the pause only when enabled; per-run warning toast
  • thread-playground.tsx: wires the option through and renders the badge
  • Experimental settings: toggle + confirmation dialog (en/zh copy)

Test plan

  • thread-store-full-access.test.ts: dangerous bash auto-runs when the mode is on, pauses when off, acknowledgement flow, badge wiring — passes
  • bun run typecheck:changed / bun run lint:changed clean

…and pause (PR 0004)

Add an opt-in 'Full access mode' for users who run the agent unattended on
their own machine. When enabled together with auto-run tools, auto-run no
longer pauses on bash commands flagged destructive (isDangerousBashCommand):
every tool call executes automatically.

Safety posture:
- Off by default; only affects local auto-run behavior (no runtime layer).
- First-time enable requires an explicit, unskippable risk acknowledgement
  dialog (destructive confirm). Reinstall/cleared storage re-asks.
- A persistent amber 'Full access' badge stays visible in the toolbar while
  the mode is on; each run shows a dismissible warning toast.
- Scope is limited to the destructive-bash pause: control-flow tools such as
  'terminate' remain never-auto-executed. Without auto-run enabled the mode
  has no effect.

- run-mode.ts: get/setFullAccessMode + get/setFullAccessAcknowledged
  (localStorage) + useSyncExternalStore subscription; useRunMode exposes
  fullAccessMode.
- thread-store.ts: getFullAccessMode option read fresh at run time; bash
  interception skips the pause when enabled; per-run warning toast.
- thread-playground.tsx: wires the option through and renders the badge.
- Experimental settings: toggle + confirmation dialog (en/zh copy).

Tests: thread-store-full-access.test.ts — dangerous bash auto-runs when
mode is on, pauses when off, acknowledged flow, badge wiring.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant