feat: add the free-text flag constraint type text #122
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/text-flag-constraint"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements design/free-text-sanitization-tier.md. An operator marks one flag of one allow rule type text and its value accepts newlines, tabs, Markdown, punctuation and every shell metacharacter the strict rule refuses. The relaxed value is still refused when it starts with a dash, holds a carriage return or any other control character including ESC, or exceeds 64 KiB. Flag names, positional arguments, placeholder values and all other flag values keep the strict rule byte for byte. The type joins the single-source ConstraintType enum with a new Kind axis Relaxed. whitelist checks the relaxed rule where pattern and integer checks already run so a bad value is a policy denial with a reason, and reports the matched rule text flags in Decision.TextFlags. executor.Run takes that list and applies the classes per token in SanitizeCall. A flag not named there is strict even if an upstream caller forgets and a named one is still control-character and length checked, so a bug can under-relax but never over-relax. text is rejected for a placeholder. wraptool_request_capability accepts text in flag_types, both review UI type selects list it, a text flag MCP parameter description says free text is accepted, and doctor policy.unpatterned-value-flag treats text as a deliberate choice. The seam test gains a third sanitization half. Docs: configuration flag constraints table and a Free-text flags subsection, security argument sanitization, an examples recipe for fj pr create, changelog Added entry. Design status set to implemented with the section 4 checklist ticked and the TODO item closed. This PR body is flat prose because the live server has no text flag yet. Suggested host config after merge: under tools.fj allow rule pr create add flag_constraints with --title and --body of type text. 🤖 Generated with Claude Code
text