claude-notification-plugin 1.1.78 → 1.1.83
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/.claude-plugin/plugin.json +1 -1
- package/README.md +1 -0
- package/commit-sha +1 -1
- package/listener/LISTENER-DETAILED.md +8 -0
- package/listener/listener.js +27 -2
- package/listener/pty-runner.js +4 -3
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-notification-plugin",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.83",
|
|
4
4
|
"description": "Claude Code task-completion notifications: Telegram, desktop notifications (Windows/macOS/Linux), sound, and voice",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Viacheslav Makarov",
|
package/README.md
CHANGED
|
@@ -253,6 +253,7 @@ Projects are referenced with the `&` prefix (e.g. `&api`, `&api/branch`).
|
|
|
253
253
|
| `/addproject <alias> <path>` | Register a project alias |
|
|
254
254
|
| `/addproject <alias> /<basename>` | Register using basename from `/seen` |
|
|
255
255
|
| `/seen` | Recent folders seen by notifier |
|
|
256
|
+
| `/seen clear` | Wipe the seen list |
|
|
256
257
|
| `/setdefault` | Change the default project |
|
|
257
258
|
| `/worktrees &project` | List worktrees |
|
|
258
259
|
| `/worktree &project/branch` | Create a worktree |
|
package/commit-sha
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
0567928a0b6df6aaefebbb8e507bc8fef8ae5942
|
|
@@ -717,6 +717,14 @@ The seen file (`~/.claude/claude-notify.seen.json`) is written atomically
|
|
|
717
717
|
by the notifier on every hook event; oldest entries are evicted when the
|
|
718
718
|
count exceeds 30.
|
|
719
719
|
|
|
720
|
+
`/seen clear` (alias: `/seen reset`) wipes the file — useful when the
|
|
721
|
+
list is full of stale entries after reorganizing project folders.
|
|
722
|
+
|
|
723
|
+
```
|
|
724
|
+
You: /seen clear
|
|
725
|
+
Bot: ✅ Seen file cleared (17 entries removed).
|
|
726
|
+
```
|
|
727
|
+
|
|
720
728
|
### /worktrees — project worktrees
|
|
721
729
|
|
|
722
730
|
```
|
package/listener/listener.js
CHANGED
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
CONFIG_PATH,
|
|
17
17
|
LISTENER_LOG_FILENAME,
|
|
18
18
|
MAX_SEEN_ENTRIES,
|
|
19
|
+
SEEN_PROJECTS_PATH,
|
|
19
20
|
getDefaultProject,
|
|
20
21
|
saveConfig,
|
|
21
22
|
normalizeForCompare,
|
|
@@ -528,7 +529,7 @@ async function handleCommand (cmd, args) {
|
|
|
528
529
|
case '/addproject':
|
|
529
530
|
return handleAddProject(args);
|
|
530
531
|
case '/seen':
|
|
531
|
-
return handleSeen();
|
|
532
|
+
return handleSeen(args);
|
|
532
533
|
case '/setdefault':
|
|
533
534
|
return handleSetDefault(args);
|
|
534
535
|
case '/worktrees':
|
|
@@ -973,7 +974,30 @@ Aliases for this command: /add-project, /add_project`;
|
|
|
973
974
|
return `✅ Project added: <b>&${escapeHtml(alias)}</b> → <code>${escapeHtml(absPath)}</code>`;
|
|
974
975
|
}
|
|
975
976
|
|
|
976
|
-
function handleSeen () {
|
|
977
|
+
function handleSeen (args) {
|
|
978
|
+
const sub = (args || '').trim().toLowerCase();
|
|
979
|
+
|
|
980
|
+
if (sub === 'clear' || sub === 'reset') {
|
|
981
|
+
let count = 0;
|
|
982
|
+
try {
|
|
983
|
+
const data = loadSeenProjects();
|
|
984
|
+
count = data.entries.length;
|
|
985
|
+
// Atomic overwrite with an empty list
|
|
986
|
+
const tmp = `${SEEN_PROJECTS_PATH}.${process.pid}.tmp`;
|
|
987
|
+
fs.writeFileSync(tmp, JSON.stringify({ entries: [] }, null, 2));
|
|
988
|
+
fs.renameSync(tmp, SEEN_PROJECTS_PATH);
|
|
989
|
+
} catch (err) {
|
|
990
|
+
logger.error(`Failed to clear seen file: ${err.message}`);
|
|
991
|
+
return `❌ Failed to clear seen file: ${escapeHtml(err.message)}`;
|
|
992
|
+
}
|
|
993
|
+
logger.info(`Seen file cleared (${count} entries removed)`);
|
|
994
|
+
return `✅ Seen file cleared (${count} entries removed).`;
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
if (sub && sub !== '') {
|
|
998
|
+
return `❌ Unknown subcommand "<b>${escapeHtml(sub)}</b>". Usage: /seen [clear]`;
|
|
999
|
+
}
|
|
1000
|
+
|
|
977
1001
|
const { entries } = loadSeenProjects();
|
|
978
1002
|
if (!entries || entries.length === 0) {
|
|
979
1003
|
return 'ℹ No seen folders yet. Notifier will populate this list as you receive notifications.';
|
|
@@ -1199,6 +1223,7 @@ function handleHelp () {
|
|
|
1199
1223
|
/projects — list projects
|
|
1200
1224
|
/addproject <alias> <path-or-/basename> — register a project
|
|
1201
1225
|
/seen — recent folders seen by notifier
|
|
1226
|
+
/seen clear — wipe the seen list
|
|
1202
1227
|
/setdefault — change default project
|
|
1203
1228
|
/worktrees &project — project worktrees
|
|
1204
1229
|
/worktree &project/branch — create worktree
|
package/listener/pty-runner.js
CHANGED
|
@@ -406,9 +406,10 @@ export class PtyRunner extends EventEmitter {
|
|
|
406
406
|
// Filter out pipe-mode-specific args
|
|
407
407
|
const args = claudeArgs.filter(a => a !== '-p' && a !== '--output-format' && a !== 'json');
|
|
408
408
|
|
|
409
|
-
// Ensure --permission-mode is set
|
|
410
|
-
|
|
411
|
-
|
|
409
|
+
// Ensure --permission-mode is set to prevent interactive permission prompts.
|
|
410
|
+
// Use bypassPermissions as default — "auto" is not available on all plans/providers.
|
|
411
|
+
if (!args.includes('--permission-mode') && !args.includes('--dangerously-skip-permissions')) {
|
|
412
|
+
args.push('--permission-mode', 'bypassPermissions');
|
|
412
413
|
}
|
|
413
414
|
|
|
414
415
|
// Reduce PTY output noise: disable animations, progress bar, tips
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-notification-plugin",
|
|
3
3
|
"productName": "claude-notification-plugin",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.83",
|
|
5
5
|
"description": "Claude Code task-completion notifications: Telegram, desktop notifications (Windows/macOS/Linux), sound, and voice",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|