fix(ENG-12465): use absolute URLs for README images to fix npm display#27
fix(ENG-12465): use absolute URLs for README images to fix npm display#27
Conversation
Replaces baseline ONNX model with full-aug-dojo-jailbreak-jbv2. Training additions over baseline: - jasperls: JasperLS jailbreak dataset - jailbreakbench (527): DAN, roleplay, persona-override attacks - toxic-chat (113): human-verified real jailbreaks - chatgpt-jailbreaks (79): classic named templates AgentShield: 73.7 → 79.8 (composite 77.2 → 87.4, penalty 3.51 → 7.54) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Relative paths (assets/banner-*.svg, assets/demo-*.svg) resolve correctly on GitHub but break on npm's markdown renderer which has no base URL context. Replaced with raw.githubusercontent.com URLs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Closing in favour of a clean single-commit PR. |
There was a problem hiding this comment.
Pull request overview
Updates package-facing documentation so README images render correctly on npm (which doesn’t resolve relative asset paths), and adjusts tooling config around vendored model artifacts.
Changes:
- Replace relative
assets/*.svgreferences inREADME.mdwith absoluteraw.githubusercontent.comURLs. - Update Biome file inclusion rules to exclude
src/classifiers/models/**. - Modify vendored MiniLM model JSON artifacts (
config.json,tokenizer_config.json) (appears unrelated to README image rendering).
Reviewed changes
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/classifiers/models/minilm-full-aug/tokenizer_config.json | Updates tokenizer config fields (incl. a new max_length), affecting bundled model artifacts. |
| src/classifiers/models/minilm-full-aug/config.json | Reformats and changes transformers_version in vendored model config. |
| biome.json | Excludes src/classifiers/models/** from Biome processing. |
| README.md | Switches README image sources to absolute URLs for npm rendering. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/StackOneHQ/defender/main/assets/banner-dark.svg" /> | ||
| <img src="https://raw.githubusercontent.com/StackOneHQ/defender/main/assets/banner-light.svg" alt="Defender by StackOne — Indirect prompt injection protection for MCP tool calls" width="800" /> |
There was a problem hiding this comment.
These image URLs are pinned to the main branch on GitHub. That makes the README for older published npm versions non-deterministic (images can change or break if assets move). Consider pinning to a release tag/commit SHA (or a CDN URL that includes a tag) so the npm README stays stable per package version.
| <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/StackOneHQ/defender/main/assets/banner-dark.svg" /> | |
| <img src="https://raw.githubusercontent.com/StackOneHQ/defender/main/assets/banner-light.svg" alt="Defender by StackOne — Indirect prompt injection protection for MCP tool calls" width="800" /> | |
| <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/StackOneHQ/defender/v0.1.0/assets/banner-dark.svg" /> | |
| <img src="https://raw.githubusercontent.com/StackOneHQ/defender/v0.1.0/assets/banner-light.svg" alt="Defender by StackOne — Indirect prompt injection protection for MCP tool calls" width="800" /> |
Summary
assets/banner-*.svg,assets/demo-*.svg) with absoluteraw.githubusercontent.comURLsTest plan
🤖 Generated with Claude Code