Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/netmindai-open/narranexus/artifact_fetch.rsgit clone --depth 1 https://github.com/NetMindAI-Open/NarraNexusWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/netmindai-open/narranexus/artifact_fetch.rs)<a href="https://agentmods.dev/commands/netmindai-open/narranexus/artifact_fetch.rs"><img src="https://agentmods.dev/badge/commands/netmindai-open/narranexus/artifact_fetch.rs.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.01030 |
| Opus 5 | $0.00000 | $0.00515 |
| Sonnet 5 | $0.00000 | $0.00206 |
| Haiku 4.5 | $0.00000 | $0.00103 |
Grade A, and why
artifact_fetch.rs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.
artifact_fetch.rs — Rust-side artifact bytes proxy for the dmg
Why it exists
In the dmg the Tauri webview origin is https://tauri.localhost (HTTPS)
while the local backend serves on http://localhost:8000 (HTTP).
WKWebView classifies any HTTP subresource loaded from an HTTPS document
as "active mixed content" and blocks it silently — both iframe loads
and fetch() from JS. The artifact panel rendered as a white iframe
for every test artifact (P0 reported 2026-05-27).
Header-level fixes (X-Frame-Options removal, frame-ancestors,
Cross-Origin-Resource-Policy: cross-origin) are necessary but not
sufficient — they only matter once the request actually reaches the
server. Mixed content blocking fires earlier, in the network layer.
HTTP requests originated by Rust (not the WKWebView) are immune
to the mixed-content blocker. This command pulls the artifact bytes
via reqwest and ships them back to the frontend as base64 over the IPC
channel. The frontend reconstructs a Blob and uses a blob: URL as
the iframe src. blob URLs inherit the creator document's origin
(https://tauri.localhost), so the iframe load is same-origin — the
mixed-content rule never applies.
Surface
fetch_artifact_via_backend(url: String) -> Result<ArtifactBytes, String>
ArtifactBytes:
status: u16— backend HTTP status (frontend checks=== 200).content_type: String— verbatimContent-Typeheader, defaults toapplication/octet-streamif absent.bytes_base64: String— base64-encoded body. IPC only ships JSON, so binary bytes need this round-trip.
Security: SSRF guard
The validator (validate(&str) -> Result<Url, String>) enforces a
strict whitelist before reqwest sees the URL:
- scheme ∈ {
http,https} - host ∈ {
localhost,127.0.0.1,::1} - port ∈ {
8000} (the bundled backend port — keep this list in sync withstate::bundled_servicesif we ever move the backend off 8000) - path prefix starts with
/api/public/artifacts/
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 92 lines · 0 tokens per session scan A 0f99e1addd2a
artifact_fetch.rs is a command published in the GitHub repository NetMindAI-Open/NarraNexus (85 stars, last pushed yesterday), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,030 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
document
Document a file or directory comprehensively - shaking the tree to truly understand it.
brand-generate
Generate an on-brand document from a saved Brand Profile.
tree
Show file tree with sync status indicators showing which files are indexed, modified, new, or deleted.
cti-report
Render case deliverables — relationship graph (PNG/SVG/Mermaid) and a polished PDF/DOCX assessment. Usage: /cti-report [--graph|--pdf].
ppt-image2-editable-rebuild
Rebuild image2 or imagegen reference slides as editable PowerPoint decks.
convert
Convert a file to Markdown using markitdown.