Skip to content

Conversation

@theahura
Copy link
Contributor

@theahura theahura commented Jan 9, 2026

Summary

🤖 Generated with Nori

  • Add OS-level notifications when the CLI needs user attention for approval requests
  • Bundle and auto-deploy notify-hook.sh script for cross-platform notifications (Linux, macOS, Windows)
  • Track idle duration and include it in notifications when system has been waiting 5+ seconds
  • Integrate notification system with all approval types: exec commands, file edits, and MCP elicitations

Implementation Details

New Components

  • IdleDetector: Tracks how long the system has been idle, with a 5-second threshold
  • notify-hook.sh: Cross-platform shell script bundled with the CLI, deployed to ~/.nori/cli/
  • ApprovalRequested notification type: Includes request type, message, command/files, and idle duration

Integration Points

  • First-launch onboarding deploys the notify hook and configures it in config.toml
  • ChatWidget integrates UserNotifier and IdleDetector for approval events
  • Activity is tracked on user messages and agent work to reset the idle timer

Test Plan

  • Unit tests for IdleDetector logic (5 tests)
  • Unit tests for notify-hook deployment (7 tests)
  • Unit tests for ApprovalRequested notification serialization (3 tests)
  • Manual testing with actual OS notifications

Share Nori with your team: https://www.npmjs.com/package/nori-ai

theahura and others added 3 commits January 9, 2026 17:23
This implements OS-level notifications when the CLI needs user attention:

- Add ApprovalRequested variant to UserNotification for approval events
- Add IdleDetector to track how long the system has been idle
- Bundle notify-hook.sh script for cross-platform notifications
- Auto-deploy notify hook to ~/.nori/cli/ on first launch
- Configure notify setting in config.toml during onboarding
- Integrate UserNotifier into ChatWidget for approval events

The notification includes idle duration when the system has been waiting
for 5+ seconds before an approval request arrives.
🤖 Generated with [Nori](https://nori.ai)

Co-Authored-By: Nori <contact@tilework.tech>
Split `use std::time::{Duration, Instant}` into separate lines as
required by nightly rustfmt on CI.
🤖 Generated with [Nori](https://nori.ai)

Co-Authored-By: Nori <contact@tilework.tech>
Remove the dead code that clippy flagged in CI.
🤖 Generated with [Nori](https://nori.ai)

Co-Authored-By: Nori <contact@tilework.tech>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants