import{DEFAULT_ROUTES as e}from"../../../packages/tool-routing/dist/index.mjs";function t(e){let t=e.toolName;if(e.commandPatterns&&e.commandPatterns.length>0){let n=e.description.match(/^(.*?)\s*→/);n&&(t=n[1].trim())}else if(e.heuristic){let n=e.description.match(/^(.*?)\s*→/);n&&(t=n[1].trim())}return{id:e.id,forbidden:t,alternative:e.alternative,severity:e.severity,reason:e.reason,matchPattern:e.commandPatterns?null:e.toolName,commandPatterns:e.commandPatterns??null,heuristic:e.heuristic??null}}const n=e.map(t);function r(){return[`| NEVER use this | USE THIS AI Kit TOOL INSTEAD | Why |`,`|---|---|---|`,...n.filter(e=>e.severity===`error`).map(e=>`| \`${e.forbidden}\` | \`${e.alternative}\` | ${e.reason} |`)].join(`
`)}function i(){return n.map(e=>({id:e.id,description:`${e.forbidden} → use ${e.alternative}`,toolMatch:e.matchPattern,commandPatterns:e.commandPatterns??null,heuristic:e.heuristic??null}))}export{n as POLICIES,r as generateForbiddenTable,i as generateScorerRules};