Files
AIPass/src/aipass/daemon/README.md
T
4c76040371 feat(system): S69: stale reference cleanup, scanner ignores, direct fixes (memory shebang, purge.py paths, commons function, backup bypasses) (#171)
* 📝 docs(STATUS): update last sync timestamp

- update last sync timestamp to reflect recent status synchronization

* feat(trigger): audit cleanup — fix timestamp parsing, CLI formatting, bypass entries

- Fix log_watcher timestamp parsing: log warning once after all formats fail,
  not on each format attempt (was generating hundreds of warnings per scan)
- Standardize rich formatting in branch_log_events and log_events print_help()
  to match medic.py/errors.py Panel+rule style
- Add bypass entries for intentional silent catches (timestamp loop, error display)
- Remove unused Path imports

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(memory): audit cleanup — handler tests + rollover timeout handling

- Add 32 handler-layer tests (extractor, line_counter, normalize) in test_handlers.py
- Add rollover run timeout message + try/except for graceful error handling
- Fix commons welcome_ops.py missing _get_unwelcomed_branches function

264 tests pass, 100% seedgo compliance.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(system): audit cleanup: spawn

Co-Authored-By: @devpulse <devpulse@aipass>

* feat(system): audit cleanup: drone — fix ANSI escape corruption, add --rebase to git sync

Co-Authored-By: @devpulse <devpulse@aipass>

* feat(api): audit cleanup — critical path tests + cleanup constants

- Add 19 critical path tests (test_critical_paths.py): get_api_key, validate_key, get_response, extract_response
- Tests: 207/207 passing, seedgo 100%

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(system): S69: stale reference cleanup, scanner ignores, direct fixes (memory shebang, purge.py paths, commons function, backup bypasses)

Co-Authored-By: @devpulse <devpulse@aipass>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: @devpulse <devpulse@aipass>
2026-04-01 01:00:21 -07:00

5.4 KiB

DAEMON

Purpose: Cron-triggered task scheduler with plugin system. Routes commands to modules for scheduled tasks, activity reports, action management, and status digests. Module: aipass.daemon Created: 2026-03-07 Citizen Class: builder Last Updated: 2026-03-28


Overview

Builder citizen -- full 3-layer architecture with identity and memory. DAEMON serves as the background orchestration branch: it discovers modules at startup, routes CLI commands to them, and provides introspection and help output via Rich console.

What I Do

  • Route CLI commands to discovered modules (update, schedule, activity_report, actions)
  • Provide scheduled task management and follow-ups
  • Generate activity reports across branches
  • Manage an action registry with toggle, info, reminders, and schedules
  • Produce status digest updates

Architecture

daemon/
├── __init__.py
├── README.md
├── DASHBOARD.local.json
├── apps/
│   ├── daemon.py              # Entry point (CLI) — module discovery + command routing
│   ├── daemon_wakeup.py       # Wakeup / cron trigger
│   ├── scheduler_cron.py      # Cron scheduler
│   ├── modules/
│   │   ├── update.py          # Status digest module — summarizes DAEMON activity
│   │   ├── schedule.py        # Scheduled follow-ups — fire-and-forget task management
│   │   ├── activity_report.py # Branch activity report generator
│   │   ├── actions.py         # Action registry CLI — list, toggle, info, reminders
│   │   ├── scheduler_ops.py   # Scheduler cron operations facade
│   │   └── wakeup_ops.py      # Wake-up cron operations facade
│   ├── handlers/
│   │   ├── actions/
│   │   │   └── actions_registry.py   # Action registry implementation
│   │   ├── json/
│   │   │   └── json_handler.py       # JSON data operations
│   │   ├── monitoring/
│   │   │   ├── activity_collector.py  # Collects branch activity data
│   │   │   ├── memory_health.py       # Memory health checks
│   │   │   └── red_flag_detector.py   # Detects anomalies / red flags
│   │   ├── schedule/
│   │   │   ├── task_registry.py       # Task registry for scheduled items
│   │   │   └── .archive/             # assistant_notifier, telegram_notifier (archived)
│   │   ├── telegram/                  # ARCHIVED — moving to skills system
│   │   │   └── .archive/             # assistant_chat (archived)
│   │   └── update/
│   │       └── data_loader.py         # Data loading for status digests
│   ├── extensions/             # Extension point for additional capabilities
│   ├── json_templates/         # JSON template definitions
│   └── plugins/
│       ├── community_rotation.py      # Community rotation plugin
│       ├── daily_audit.py             # Daily audit plugin
│       ├── heartbeat.py               # Heartbeat / liveness plugin
│       └── .archive/                  # botfather_reminder, devpulse_monitor (archived)
├── daemon_json/                # JSON tracking data
├── docs/                       # Documentation
├── dropbox/                    # Incoming file drops
├── logs/                       # Prax log output
├── tools/                      # Branch verification utilities
└── tests/                      # Test suite

Commands / Usage

drone @daemon                       # Show discovered modules (introspection)
drone @daemon --help                # Rich-formatted help with all commands
drone @daemon --version             # Print version

drone @daemon update [args...]      # Status digest — summarize DAEMON activity
drone @daemon schedule [args...]    # Manage scheduled follow-ups and tasks
drone @daemon activity_report [args...]  # Generate branch activity reports
drone @daemon actions [args...]     # Action registry — list, toggle, info, set reminder/schedule

Each module accepts --help for module-specific usage:

drone @daemon <command> --help

Modules

Module Description
update Status digest of DAEMON activity
schedule Fire-and-forget scheduled follow-ups and task management
activity_report Branch activity report generator (plain text output)
actions Action registry CLI -- list, toggle, info, set reminder, set schedule, plugin migration
scheduler_ops Scheduler cron operations facade for scheduler_cron.py
wakeup_ops Wake-up cron operations facade for daemon_wakeup.py

Integration Points

Depends On

  • rich -- Console output and formatted display
  • Python stdlib (sys, typing, logging)

Provides To

  • All modules -- background task scheduling, activity monitoring, action tracking
  • Plugins -- extensible plugin system for recurring tasks (heartbeat, daily audit, community rotation)
  • Note: Telegram handlers archived -- moving to skills system. See apps/handlers/telegram/.archive/

Identity

  • Passport: .trinity/passport.json
  • Session History: .trinity/local.json
  • Observations: .trinity/observations.json
  • Branch Prompt: .aipass/branch_system_prompt.md

Last Updated: 2026-03-28