agentrem 1.5.2 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/llms.txt CHANGED
@@ -1,8 +1,9 @@
1
- # agentrem
1
+ # agentrem v1.5.2
2
2
 
3
3
  > You lose context between sessions. agentrem fixes that.
4
4
 
5
- You're an AI agent. Every time your session ends, you forget everything — reminders, follow-ups, things your human asked you to track. agentrem gives you persistent memory that survives across sessions.
5
+ Structured reminders CLI for AI agents. Persistent, SQLite-backed, works across sessions.
6
+ 444 tests passing.
6
7
 
7
8
  ## Quick Integration (3 commands)
8
9
 
@@ -17,105 +18,137 @@ agentrem check --type time,session --budget 800
17
18
  agentrem add "Deploy to prod" --due "+2h" --priority 2
18
19
  ```
19
20
 
20
- Add `agentrem setup` output to your CLAUDE.md for automatic integration.
21
-
22
- ## What You Can Do
21
+ ## All Commands
23
22
 
24
23
  ```bash
25
- agentrem add <content> # Create a reminder (--due, --priority, --tags, --trigger)
26
- agentrem check # See what's triggered/due (--json for structured output)
27
- agentrem list # List all active (--json for structured output)
28
- agentrem search <query> # Full-text search across all fields
24
+ agentrem add <content> # Create a reminder
25
+ agentrem check # See what's triggered/due
26
+ agentrem check --watch # Block until a reminder fires (see below)
27
+ agentrem list # List all active reminders
28
+ agentrem search <query> # Full-text search
29
29
  agentrem complete <id> # Mark done (auto-creates next if recurring)
30
30
  agentrem snooze <id> --for 2h # Snooze by duration or --until datetime
31
31
  agentrem edit <id> # Modify fields
32
- agentrem stats # Overview (--json for structured output)
32
+ agentrem delete <id> # Soft delete (--permanent to hard delete)
33
+ agentrem stats # Overview
34
+ agentrem history [id] # Audit trail
35
+ agentrem undo <history_id> # Revert a change
36
+ agentrem gc # Garbage collect old reminders
37
+ agentrem export # Export to JSON
38
+ agentrem import <file> # Import from JSON
33
39
  agentrem watch # Background daemon: poll + fire OS notifications
34
40
  agentrem doctor # Self-diagnostic check
35
41
  agentrem quickstart # Interactive first-run walkthrough
36
42
  agentrem setup # Print CLAUDE.md snippet (--mcp for MCP config)
43
+ agentrem schema # Show database schema
44
+ agentrem init # Initialize database
37
45
  ```
38
46
 
39
- ## Trigger Types
47
+ ## add flags
48
+ `--due/-d <datetime>` `--trigger/-t <type>` `--priority/-p <1-5>` `--tags <tags>`
49
+ `--context/-c <ctx>` `--category <cat>` `--keywords/-k <kw>` `--match any|all|regex`
50
+ `--check <cmd>` `--expect <output>` `--decay <datetime>` `--max-fires <n>`
51
+ `--recur/-r 1d|2w|1m` `--agent/-a <name>` `--depends-on <id>` `--source agent|user|system` `--dry-run`
40
52
 
41
- | Type | Use when... | Example |
42
- |------|------------|---------|
43
- | `time` | Something is due at a specific time | `--due "+2h"` |
44
- | `keyword` | You should react when certain words appear | `--trigger keyword --keywords "deploy,release"` |
45
- | `session` | You need to check every session start | `--trigger session` |
46
- | `heartbeat` | You need to check every heartbeat | `--trigger heartbeat` |
47
- | `condition` | A shell command should be monitored | `--trigger condition --check "git status" --expect "clean"` |
53
+ ## check flags
54
+ `--type <types>` `--text <text>` `--budget <n>` `--format full|compact|inline`
55
+ `--json` `--agent/-a <name>` `--escalate` `--dry-run`
56
+ `--watch` `--timeout <seconds>` (used with --watch)
48
57
 
49
- ## Priority Levels
58
+ ## check --watch (blocking mode)
50
59
 
51
- 1=Critical (always surfaced), 2=High, 3=Normal, 4=Low (counted not shown), 5=Someday (skipped)
52
-
53
- ## Natural Language Dates
54
-
55
- `--due` accepts many formats:
60
+ Blocks until the next due reminder fires. Polls every 5 seconds.
56
61
 
57
62
  ```bash
58
- --due "now" # Immediately
59
- --due "today" # Today at 23:59
60
- --due "tomorrow" # Tomorrow at 09:00
61
- --due "in 5 minutes"
62
- --due "in 2 hours"
63
- --due "in 3 days"
64
- --due "in 1 week"
65
- --due "+5m" # 5 minutes from now
66
- --due "+2h" # 2 hours from now
67
- --due "+3d" # 3 days from now
68
- --due "+1w" # 1 week from now
69
- --due "2026-02-22T09:00:00"
70
- --due "2026-02-22"
63
+ agentrem check --watch # Wait indefinitely for any time trigger
64
+ agentrem check --watch --timeout 300 # Exit 1 if no reminder in 5 minutes
65
+ agentrem check --watch --json # Output full reminder JSON when it fires
66
+ agentrem check --watch --type time,heartbeat # Filter trigger types
67
+ agentrem check --watch --agent jarvis # Filter by agent
71
68
  ```
72
69
 
70
+ Exit codes: `0` = reminder found (or SIGINT/SIGTERM), `1` = timeout elapsed with no reminder.
71
+ Does NOT update fire counts. Use `agentrem check` (without --watch) to actually fire/mark reminders.
72
+
73
+ ## list flags
74
+ `--status/-s <statuses>` `--priority <priorities>` `--tag <tag>` `--trigger <type>`
75
+ `--due today|tomorrow|overdue|week|<date>` `--agent/-a <name>` `--category <cat>`
76
+ `--limit <n>` `--format table|json|compact` `--json` `--all`
77
+
78
+ ## snooze flags
79
+ `--until <datetime>` `--for 1h|2h|1d|3d|1w`
80
+
81
+ ## edit flags
82
+ `--content` `--context` `--priority/-p` `--due/-d` `--tags` `--add-tags` `--remove-tags`
83
+ `--category` `--decay` `--max-fires` `--keywords/-k` `--agent/-a`
84
+
85
+ ## delete flags
86
+ `--permanent` `--status <status>` `--older-than <days>`
87
+
88
+ ## watch flags
89
+ `--interval <seconds>` `--agent/-a <name>` `--once` `--verbose`
90
+ `--install` `--uninstall` `--status`
91
+
92
+ ## Trigger Types
93
+ `time` — specific datetime | `keyword` — message text matches | `condition` — shell command output
94
+ `session` — every session check | `heartbeat` — every heartbeat check | `manual` — explicit only
95
+
96
+ ## Priority Levels
97
+ 1=🔴 Critical (always), 2=🟡 High, 3=🔵 Normal, 4=⚪ Low (counted), 5=💤 Someday (skipped)
98
+
99
+ ## Natural Language Dates
100
+ `now` `today` `tomorrow` `in 5 minutes` `in 2 hours` `in 3 days` `in 1 week`
101
+ `+5m` `+2h` `+3d` `+1w` `2026-02-22T09:00:00` `2026-02-22`
102
+
103
+ ## JSON output
104
+ `--json` available on: `check`, `list`, `search`, `stats`, `history`, `doctor`
105
+
73
106
  ## Agent Integration Patterns
74
107
 
75
108
  ```bash
76
- # Session start: check time + session triggers, fit in 800 tokens
109
+ # Session start
77
110
  agentrem check --type time,session --budget 800
78
111
 
79
- # Message scanning: check if user message matches keyword triggers
112
+ # Keyword scan
80
113
  agentrem check --type keyword --text "the user's message here"
81
114
 
82
- # Periodic maintenance: escalate overdue, clean up old
83
- agentrem check --escalate && agentrem gc --days 30
115
+ # Blocking wait (e.g., pause agent until something fires)
116
+ agentrem check --watch --timeout 60 && agentrem check --json
84
117
 
85
- # Structured output for programmatic use
86
- agentrem check --json
87
- agentrem list --json
88
- agentrem stats --json
118
+ # Maintenance
119
+ agentrem check --escalate && agentrem gc --older-than 30
89
120
  ```
90
121
 
91
- ## Background Watcher (watch)
122
+ ## Programmatic API (Node.js / TypeScript)
92
123
 
93
- `agentrem watch` runs a daemon that polls for due reminders and fires native OS notifications.
124
+ ```typescript
125
+ import { add, check, list, complete, snooze, search, stats } from 'agentrem';
94
126
 
95
- ```bash
96
- agentrem watch # Start daemon (Ctrl+C to stop)
97
- agentrem watch --interval 60 # Poll every 60s (default: 30s)
98
- agentrem watch --agent jarvis # Check for specific agent
99
- agentrem watch --once # Single check, then exit
100
- agentrem watch --verbose # Show poll log
101
-
102
- # Service management (auto-start on boot)
103
- agentrem watch --install # Install as launchd/systemd service
104
- agentrem watch --uninstall # Remove service
105
- agentrem watch --status # Show service status
127
+ // Add a reminder
128
+ const rem = await add('Review PR', { due: 'tomorrow', priority: 2 });
129
+
130
+ // Check for triggered reminders
131
+ const { included } = await check({ type: 'time,session', budget: 800 });
132
+
133
+ // List active reminders
134
+ const all = await list({ limit: 20 });
135
+
136
+ // Complete a reminder
137
+ const done = await complete('abc12345', 'Done!');
138
+
139
+ // Snooze a reminder
140
+ const snoozed = await snooze('abc12345', { for: '2h' });
141
+
142
+ // Full-text search
143
+ const results = await search('deploy');
144
+
145
+ // Get stats
146
+ const s = await stats();
147
+ console.log(s.totalActive, s.overdue);
106
148
  ```
107
149
 
108
- ## Key Features
109
-
110
- - **Recurrence**: `--recur 1d|2w|1m` auto-creates next on completion
111
- - **Dependencies**: `--depends-on <id>` — blocks until dependency done
112
- - **Escalation**: overdue P3→P2 after 48h, P2→P1 after 24h
113
- - **Token budget**: `--budget <n>` limits output to fit your context window
114
- - **Multi-agent**: `--agent <name>` isolates per agent
115
- - **Full-text search**: FTS5 across content, context, tags, notes
116
- - **JSON output**: `--json` on check, list, search, stats, history
117
- - **Native notifications**: macOS Agentrem.app with bell icon + priority sounds
118
- - **MCP server**: `agentrem-mcp` for Claude Desktop / MCP clients
119
- - **Zero config**: SQLite database, no external services
150
+ ## MCP Server
151
+ `agentrem-mcp` — 14 tools, 4 resources, 3 prompts
152
+ Run `agentrem setup --mcp` to print Claude Desktop config.
120
153
 
121
154
  See `llms-full.txt` for complete API reference with all flags and JSON examples.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentrem",
3
- "version": "1.5.2",
3
+ "version": "1.6.0",
4
4
  "description": "Structured reminders CLI for AI agents with MCP server",
5
5
  "type": "module",
6
6
  "main": "dist/api.js",