Gate flow authoring/publishing behind approval#48
Merged
Conversation
flow_create/edit/publish/delete previously ran with no approval — the before_tool_call gate only covered flow_run. Authoring or publishing a flow is a write action that must not happen unattended, so gate all four on every call via native requireApproval, independently of approval.enabled (which governs flow_run) and ignoring skipSessionPatterns. No allow-always persist path, so every call re-prompts. Kill-switch: approval.gateMutations=false (default on). +6 hook tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
flow_create/flow_edit/flow_publish/flow_deleteran with no approval — thebefore_tool_callgate only coveredflow_run. Authoring or publishing a flow is a write action that shouldn't happen unattended.Change
requireApproval.approval.enabled(which governsflow_run) and ignoresskipSessionPatterns— a create/publish should never be silently skipped in an unattended session.approval.gateMutations=false(default on).Why in the plugin, not a host policy rule
Mutation-danger is intrinsic to the tool (true for every deployment), so it ships with the tool via the platform-native
requireApprovalprimitive — same pattern as the existingflow_rungate. Deployment-specific risk policy stays in@clawnify/agent-permissions. Part of clawnify#963.