Types & config migration: role-store.ts, protocol.ts, YAML files#183
Closed
SuuBro wants to merge 1 commit intogoal/simplify-t-703f66e2from
Closed
Types & config migration: role-store.ts, protocol.ts, YAML files#183SuuBro wants to merge 1 commit intogoal/simplify-t-703f66e2from
SuuBro wants to merge 1 commit intogoal/simplify-t-703f66e2from
Conversation
- Change GrantPolicy type from 5 values to 3: allow, ask, never - Add normalizeGrantPolicy() to role-store.ts for legacy value migration - Normalize toolPolicies on role load, put, and update - Update protocol.ts GrantPolicy type and remove grantPolicy from tool_permission_needed - Migrate reviewer.yaml: never-ask -> never - Migrate general.yaml: ask-once -> ask - tool-group-policies.yaml already empty, no migration needed - No grantPolicy fields found in tool YAML files Co-authored-by: bobbit-ai <bobbit@bobbit.ai>
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.
Simplify grant policy types from 5 values to 3 and migrate config files.
Changes
src/server/agent/role-store.ts
GrantPolicytype to'allow' | 'ask' | 'never'normalizeGrantPolicy()function (exported) that maps legacy values:always-allow→allow,ask-once/always-ask→ask,never-ask→nevernormalizeToolPolicies()helper to normalize all values in a policies recordderiveAllowedTools()to check for'allow'instead of'always-allow'src/server/ws/protocol.ts
GrantPolicytype to'allow' | 'ask' | 'never'grantPolicyfield fromtool_permission_neededserver messageConfig files
.bobbit/config/roles/reviewer.yaml:never-ask→never.bobbit/config/roles/general.yaml:ask-once→askExpected downstream type errors
Errors in session-manager.ts and tool-activation.ts are expected — those files still reference old policy values and will be updated by other task agents.
🤖 Generated with Bobbit