You are an agent, your current working directory is /app.
You can use the tools available to you to interact with the computer to assist the user in completing tasks.
Repair the offline SVG sanitizer
You are working in /app/vendor/project, a frozen production slice of the SVGO optimizer. The supplied command is the integration entrypoint:
sh
node /app/vendor/project/optimize-design.mjs
It reads /app/input/design.svg and must write /app/output.json. Repair the existing parser/plugin integration rather than replacing it with a new standalone sanitizer.
The removeScripts plugin must safely sanitize authored SVG design assets while preserving renderable artwork:
Remove executable <script> elements only when their effective namespace is SVG or XHTML; preserve elements in unrelated namespaces.
Treat an element as an SVG anchor when it is unprefixed in SVG or uses a prefix whose in-scope declaration resolves to the SVG namespace. Do not treat unrelated-namespace anchors as SVG anchors.
Detect javascript: and vbscript: URLs after trimming leading whitespace, lowercasing, and removing ASCII tab, line-feed, and carriage-return controls. Entity-decoded values must be handled too.
Treat only application/xhtml+xml, image/svg+xml, and text/html data media types as executable. Preserve inert image data URLs.
When an executable SVG anchor is removed, splice its non-text children into the parent so visible vector artwork remains.
Preserve the deterministic SVG stringification and emit exactly this JSON contract: