claude-notification-plugin 1.1.62 → 1.1.64
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/bin/install.js +1 -2
- package/bin/listener-cli.js +7 -7
- package/commit-sha +1 -1
- package/listener/listener.js +9 -0
- package/listener/telegram-poller.js +12 -0
- 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.64",
|
|
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/bin/install.js
CHANGED
|
@@ -546,8 +546,7 @@ Claude Notification Plugin - Setup
|
|
|
546
546
|
`);
|
|
547
547
|
|
|
548
548
|
if (existingToken) {
|
|
549
|
-
|
|
550
|
-
console.log(`Telegram token found: ${masked}`);
|
|
549
|
+
console.log(`Telegram token found: ${existingToken}`);
|
|
551
550
|
const reuse = await ask(rl, 'Keep existing token? (Y/n): ');
|
|
552
551
|
if (reuse.toLowerCase() === 'n') {
|
|
553
552
|
token = await ask(rl, 'New Bot Token: ');
|
package/bin/listener-cli.js
CHANGED
|
@@ -68,7 +68,7 @@ Commands:
|
|
|
68
68
|
process.exit(command ? 1 : 0);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
function startDaemon () {
|
|
71
|
+
async function startDaemon () {
|
|
72
72
|
// Check if already running
|
|
73
73
|
const existingPid = readPid();
|
|
74
74
|
if (existingPid && isProcessAlive(existingPid)) {
|
|
@@ -145,9 +145,12 @@ function startDaemon () {
|
|
|
145
145
|
fs.mkdirSync(path.dirname(PID_PATH), { recursive: true });
|
|
146
146
|
fs.writeFileSync(PID_PATH, String(child.pid));
|
|
147
147
|
|
|
148
|
-
|
|
148
|
+
// Show full status then green start confirmation
|
|
149
|
+
await showStatus();
|
|
150
|
+
console.log(`\x1b[32m
|
|
151
|
+
Listener started (PID: ${child.pid})
|
|
149
152
|
Log: ${logFile}
|
|
150
|
-
Projects: ${Object.keys(config.listener.projects).join(', ')}`);
|
|
153
|
+
Projects: ${Object.keys(config.listener.projects).join(', ')}\x1b[0m`);
|
|
151
154
|
}
|
|
152
155
|
|
|
153
156
|
function stopDaemon () {
|
|
@@ -221,10 +224,7 @@ async function showStatus () {
|
|
|
221
224
|
// Telegram info
|
|
222
225
|
console.log('\nTelegram:');
|
|
223
226
|
if (token) {
|
|
224
|
-
|
|
225
|
-
? token.slice(0, 5) + '...' + token.slice(-4)
|
|
226
|
-
: '***';
|
|
227
|
-
console.log(` Token: ${masked}`);
|
|
227
|
+
console.log(` Token: ${token}`);
|
|
228
228
|
|
|
229
229
|
// Fetch bot name
|
|
230
230
|
try {
|
package/commit-sha
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
d5685ffd9943f3a2c72084a5411c85af1b6956a1
|
package/listener/listener.js
CHANGED
|
@@ -1044,5 +1044,14 @@ async function mainLoop () {
|
|
|
1044
1044
|
|
|
1045
1045
|
(async () => {
|
|
1046
1046
|
await poller.flush();
|
|
1047
|
+
await poller.setMyCommands([
|
|
1048
|
+
{ command: 'status', description: 'Status of all projects' },
|
|
1049
|
+
{ command: 'queue', description: 'Show all queues' },
|
|
1050
|
+
{ command: 'projects', description: 'List projects' },
|
|
1051
|
+
{ command: 'history', description: 'Recent task history' },
|
|
1052
|
+
{ command: 'pty', description: 'PTY session diagnostics' },
|
|
1053
|
+
{ command: 'help', description: 'Show all commands' },
|
|
1054
|
+
{ command: 'stop', description: 'Stop listener' },
|
|
1055
|
+
]);
|
|
1047
1056
|
await mainLoop();
|
|
1048
1057
|
})();
|
|
@@ -219,6 +219,18 @@ export class TelegramPoller {
|
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
+
async setMyCommands (commands) {
|
|
223
|
+
try {
|
|
224
|
+
await fetch(`${this.baseUrl}/setMyCommands`, {
|
|
225
|
+
method: 'POST',
|
|
226
|
+
headers: { 'Content-Type': 'application/json' },
|
|
227
|
+
body: JSON.stringify({ commands }),
|
|
228
|
+
});
|
|
229
|
+
} catch (err) {
|
|
230
|
+
this.logger.error(`setMyCommands error: ${err.message}`);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
222
234
|
async sendDocument (buffer, filename, caption) {
|
|
223
235
|
try {
|
|
224
236
|
const formData = new FormData();
|
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.64",
|
|
5
5
|
"description": "Claude Code task-completion notifications: Telegram, desktop notifications (Windows/macOS/Linux), sound, and voice",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|