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/traygit 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.00387 |
| Opus 5 | $0.00000 | $0.00193 |
| Sonnet 5 | $0.00000 | $0.00077 |
| Haiku 4.5 | $0.00000 | $0.00039 |
Grade A, and why
tray 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.
What it actually says
commands/tray.rs
为什么存在
Tauri IPC 命令 set_tray_badge(count)。前端 dashboard store 检测 running count 变化时 invoke;Rust 端更新 TrayIcon.set_title 让用户在桌面右上角/右下角一眼看到"有几个 agent 在跑"。
设计决策
- std::sync::Mutex(不是 tokio):tray ops 是 sync,不跨 await。setup 闭包也是 sync。tokio Mutex 在此无意义
- try_lock + best-effort:lock 争用时 skip 这次更新;tray 是 cosmetic,不能为更新等
- clamp [0, 999] + "999+":macOS menubar 长数字撑破 layout(security M-4)。u32::MAX 不会 panic 是因为 Rust u32 + format! 天然安全
- state.rs 持句柄:
AppState::tray_handle: Arc<StdMutex<Option<TrayIcon>>>;lib.rs::setup把create_tray()返回值存入
Gotcha
- 永远不要
unwrap()/ panic;任何错误转成 log + Ok(())。tray 挂了 dashboard 不能挂 - 若
tray_handle为 None(setup 时 tray 未成功创建),silently skip - 注册处:
lib.rs::invoke_handler!的commands::tray::set_tray_badge
测试
cargo test commands::tray::tests —— 5 个 clamp 单测(0 / 1 / 999 / 1000 / u32::MAX)
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 · 25 lines · 0 tokens per session scan A fa774ba862c2
tray 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 387 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
minutes-ideas
Surface recent voice memos and ideas captured from any device. Use when the user asks "what ideas did I have?", "what were my recent memos?", "what did I record while walking?", or wants to recall a captured thought.
autobot-result
Print the most recent result.md for an autobot session, so the user can see how a bot is doing without attaching to its tmux session.
engage.actions
Execute Phase 7 - Actions on Objectives and Goal Achievement.
version
Show installed vs latest ai-sdlc plugin version. Bypasses the 24h SessionStart cache.
thread
Manage conversation threads (create, switch, update, delete, show).
handoff
Generate or load a session handoff. Usage: /handoff [create|resume].