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/auth.rsgit clone --depth 1 https://github.com/NetMindAI-Open/NarraNexusWhat 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.01170 |
| Opus 5 | $0.00000 | $0.00585 |
| Sonnet 5 | $0.00000 | $0.00234 |
| Haiku 4.5 | $0.00000 | $0.00117 |
Grade A, and why
auth.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 3d 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 — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.
auth.rs — IPC commands for Claude Code OAuth login/logout/status
Four commands exposed to the frontend:
trigger_claude_login→ spawnsclaude auth login, records the child PID intoAppState::claude_login_pid, then awaits the OAuth flowtrigger_claude_logout→ spawnsclaude auth logout, revokes local credentialscancel_claude_login→ SIGTERMs the recorded login PID; used by the frontend's 600s timeout (and any future explicit Cancel button) to abort a stuck login without holding the Child handle across awaitsget_claude_login_status→ClaudeLoginStatus { cli_installed, logged_in }, non-blocking
Why exists
The DMG-packaged app ships its own bundled claude CLI under
Contents/Resources/resources/nodejs/node_modules/.bin/claude, but a
Finder-launched .app inherits the launchd minimal PATH
(/usr/bin:/bin:/usr/sbin:/sbin) which never sees that bin dir. Without
an in-app login flow, users had to drop to Terminal to run
claude auth login — defeating the purpose of bundling the CLI.
These commands inject the bundled paths into PATH (same trick
process_manager.rs uses for the Python sidecars) so the frontend can
fire login/logout/status checks without ever leaving the app.
Design decisions
build_child_path() helper — DRYs the PATH-augmentation logic that
all three commands need. Earlier inline copies drifted; the helper makes
intent obvious and removes accidental divergence.
Login + Logout are blocking, status is not — claude auth login
opens a browser and waits for the user to finish OAuth, so the Tauri
command awaits .status(). Status is fire-and-parse so the frontend can
poll cheaply.
Credentials shared with user-installed CLI — both write to
~/.claude/.credentials.json. There's no isolation, which is desired:
logging in via the DMG's CLI also unlocks the user's terminal CLI, and
vice versa.
Stdio drainers (drain_to_log)
Both login and logout pipe stdout+stderr from the spawned claude
binary. A piped fd that nobody reads is a deadlock waiting to happen
— once the kernel pipe buffer (~16 KB on macOS) fills, the child
blocks on its next write(). This is the same failure mode that hit
process_manager.rs Python sidecars before its log drainer was
added (commit 5cf8c1d — "chat hangs at agent loop step 3.2").
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.
- 3d ago First seen · 99 lines · 0 tokens per session scan A 18c8ffaa3367
auth.rs is a command published in the GitHub repository NetMindAI-Open/NarraNexus (84 stars, last pushed 9d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,170 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
rust-features
Get Rust version changelog and new features.
cargo-metadata
Command "cargo-metadata" from olorehq/olore, covering cargo-metadata(1), name, synopsis, description and output format.
rust-review
Rust code review for ownership, safety, and idiomatic patterns.
cargo-bench
Command "cargo-bench" from olorehq/olore, covering cargo-bench(1), name, synopsis, description and working directory of benchmarks.
cargo-fix
Command "cargo-fix" from olorehq/olore, covering cargo-fix(1), name, synopsis, description and edition migration.
cargo-build
Command "cargo-build" from olorehq/olore, covering cargo-build(1), name, synopsis, description and options.