feat(team): manage and inject enabled global rules - #1284
Open
TyreeZhao wants to merge 14 commits into
Open
Conversation
added 14 commits
September 12, 2026 18:18
Add agent_rules.enabled and exclude disabled rules from ListActiveRules so later Create-path tasks are not injected. Existing sessions stay unchanged. G2-MOUNT-001 / AC-MOUNT-006
Lock Create-path injection of enabled rules, skip on empty or failed reads, and keep rebuild/switch-model from refreshing existing sessions. G2-MOUNT-001 / AC-MOUNT-001 / AC-MOUNT-002 / AC-MOUNT-006 / AC-MOUNT-007
Add /manager global-rule CRUD so admins can stop a rule without a new version. Disabled and soft-deleted rules stay out of ListActiveRules, so later Create-path tasks are not injected. G2-MOUNT-001 / AC-MOUNT-006
Add manager history/restore UI so restoring a version only switches the active version. Existing sessions stay unchanged; later tasks use the restored content.
Keep disabled rules out of later-task injection after restore, skip unknown versions, and lock the manager restore routes.
Keep the /manager rules surface admin-only so ordinary members cannot list, edit, or restore enterprise global rules.
Keep manager write audits for add/update/enable/delete/restore, but strip rule markdown so logs retain ids and names only.
Keep /manager/rules from rendering a 403 as an empty rule list, and lock CreateTaskReq JSON to configs with the OpenCode rule path.
Keep global rules on the ConfigFile path and out of system_prompt.
Keep the rules sidebar entry admin-only so ordinary members do not get a management link.
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.
Summary
Verification
go test ./...underbackend/tsc -b && vite build --mode onlineunderfrontend/git diff --check