bxctl: sanitize check shows which sanitizer rules a text breaks
Co-Authored-By: ornith-1.5-35b-a3b <agent@wntrmute.dev>
This commit is contained in:
+11
-2
@@ -33,8 +33,12 @@ usage: bxctl <command> [options]
|
||||
bxctl reindex [--memory-socket PATH]
|
||||
Rebuild memoryd's index from the session logs and notes.
|
||||
|
||||
bxctl memory log [N] | undo <id> | pending | accept <id> | reject <id> [--memory-socket PATH]
|
||||
List memory edits, undo the latest edit of a file, or answer writes waiting for review.";
|
||||
bxctl memory log [N] | undo <id> | pending | accept <id> | reject <id> [--memory-socket PATH]
|
||||
List memory edits, undo the latest edit of a file, or answer writes waiting for review.
|
||||
|
||||
bxctl sanitize check [TEXT]
|
||||
Show which sanitizer rules TEXT, or standard input, breaks; writes nothing. Refuse shows
|
||||
the first rule only, as memory answers. Exits 1 if any rule fires, 0 if none does.";
|
||||
|
||||
// The options every `chat` call carries. `socket` is the loop socket; `admin_socket` is the admin
|
||||
// socket the other subcommands use. Both default to the paths under `$BOXMAKER_HOME`.
|
||||
@@ -100,6 +104,10 @@ pub enum Command {
|
||||
socket: PathBuf,
|
||||
ask: crate::memory::Ask,
|
||||
},
|
||||
// `None`: the text is read from standard input.
|
||||
SanitizeCheck {
|
||||
text: Option<String>,
|
||||
},
|
||||
}
|
||||
|
||||
pub fn parse(args: &[String], home: &Path) -> Result<Command, UsageError> {
|
||||
@@ -116,6 +124,7 @@ pub fn parse(args: &[String], home: &Path) -> Result<Command, UsageError> {
|
||||
"audit" => parse_audit(rest, home),
|
||||
"reindex" => crate::memory::parse_reindex(rest, home),
|
||||
"memory" => crate::memory::parse_memory(rest, home),
|
||||
"sanitize" => crate::sanitize::parse_sanitize(rest),
|
||||
// A flag before the command, or any unknown command, is not valid.
|
||||
_ => Err(UsageError),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user