Every `tracedecay_*` token mentioned anywhere in the embedded plugin bundle (skills, rules, agents, commands, README).
()
| 1076 | /// Every `tracedecay_*` token mentioned anywhere in the embedded plugin |
| 1077 | /// bundle (skills, rules, agents, commands, README). |
| 1078 | fn embedded_plugin_tool_mentions() -> std::collections::BTreeSet<String> { |
| 1079 | let mut mentions = std::collections::BTreeSet::new(); |
| 1080 | for (_, contents) in embedded_plugin_files() { |
| 1081 | let bytes = contents.as_bytes(); |
| 1082 | let mut search_from = 0; |
| 1083 | while let Some(found) = contents[search_from..].find("tracedecay_") { |
| 1084 | let start = search_from + found; |
| 1085 | let mut end = start + "tracedecay_".len(); |
| 1086 | while end < bytes.len() |
| 1087 | && (bytes[end].is_ascii_lowercase() |
| 1088 | || bytes[end].is_ascii_digit() |
| 1089 | || bytes[end] == b'_') |
| 1090 | { |
| 1091 | end += 1; |
| 1092 | } |
| 1093 | let token = contents[start..end].trim_end_matches('_'); |
| 1094 | if token.len() > "tracedecay_".len() { |
| 1095 | mentions.insert(token.to_string()); |
| 1096 | } |
| 1097 | search_from = end; |
| 1098 | } |
| 1099 | } |
| 1100 | mentions |
| 1101 | } |
| 1102 | |
| 1103 | /// The full registered tool-name set, independent of host capabilities |
| 1104 | /// (`tracedecay_ast_grep_rewrite` is filtered from `get_tool_definitions` |