Complete rebrand from TaskPing to Claude-Code-Remote

- Update project name and metadata in package.json and package-lock.json
- Rename all CLI classes and main entry points
- Fix email notification sender from "TaskPing Notification System" to "Claude-Code-Remote Notification System"
- Update email subject headers from [TaskPing #token] to [Claude-Code-Remote #token]
- Rebrand daemon service and all console output messages
- Update configuration managers and installation scripts
- Modify notification channels and test templates
- Update GitHub repository URLs and author information
- Fix all remaining TaskPing references in codebase

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
panda 2025-07-28 02:21:38 +08:00
parent b1b50f09c3
commit 5ddda6217e
20 changed files with 142 additions and 142 deletions

View File

@ -1,7 +1,7 @@
#!/usr/bin/env node
/**
* TaskPing Unattended Remote Control Setup Assistant
* Claude-Code-Remote Unattended Remote Control Setup Assistant
*/
const { exec, spawn } = require('child_process');
@ -10,22 +10,22 @@ const path = require('path');
class RemoteControlSetup {
constructor(sessionName = null) {
this.sessionName = sessionName || 'claude-taskping';
this.taskpingHome = this.findTaskPingHome();
this.sessionName = sessionName || 'claude-code-remote';
this.claudeCodeRemoteHome = this.findClaudeCodeRemoteHome();
}
findTaskPingHome() {
// If TASKPING_HOME environment variable is set, use it
if (process.env.TASKPING_HOME) {
return process.env.TASKPING_HOME;
findClaudeCodeRemoteHome() {
// If CLAUDE_CODE_REMOTE_HOME environment variable is set, use it
if (process.env.CLAUDE_CODE_REMOTE_HOME) {
return process.env.CLAUDE_CODE_REMOTE_HOME;
}
// If running from the TaskPing directory, use current directory
// If running from the Claude-Code-Remote directory, use current directory
if (fs.existsSync(path.join(__dirname, 'package.json'))) {
const packagePath = path.join(__dirname, 'package.json');
try {
const packageJson = JSON.parse(fs.readFileSync(packagePath, 'utf8'));
if (packageJson.name && packageJson.name.includes('taskping')) {
if (packageJson.name && packageJson.name.toLowerCase().includes('claude-code-remote')) {
return __dirname;
}
} catch (e) {
@ -33,11 +33,11 @@ class RemoteControlSetup {
}
}
// Search for TaskPing in common locations
// Search for Claude-Code-Remote in common locations
const commonPaths = [
path.join(process.env.HOME, 'dev', 'TaskPing'),
path.join(process.env.HOME, 'Projects', 'TaskPing'),
path.join(process.env.HOME, 'taskping'),
path.join(process.env.HOME, 'dev', 'Claude-Code-Remote'),
path.join(process.env.HOME, 'Projects', 'Claude-Code-Remote'),
path.join(process.env.HOME, 'claude-code-remote'),
__dirname // fallback to current script directory
];
@ -45,7 +45,7 @@ class RemoteControlSetup {
if (fs.existsSync(searchPath) && fs.existsSync(path.join(searchPath, 'package.json'))) {
try {
const packageJson = JSON.parse(fs.readFileSync(path.join(searchPath, 'package.json'), 'utf8'));
if (packageJson.name && packageJson.name.toLowerCase().includes('taskping')) {
if (packageJson.name && packageJson.name.toLowerCase().includes('claude-code-remote')) {
return searchPath;
}
} catch (e) {
@ -59,7 +59,7 @@ class RemoteControlSetup {
}
async setup() {
console.log('🚀 TaskPing Unattended Remote Control Setup\n');
console.log('🚀 Claude-Code-Remote Unattended Remote Control Setup\n');
console.log('🎯 Goal: Remote access via mobile phone → Home computer Claude Code automatically executes commands\n');
try {
@ -162,8 +162,8 @@ class RemoteControlSetup {
}
createNewSession(resolve) {
// Use TaskPing home directory as working directory
const workingDir = this.taskpingHome;
// Use Claude-Code-Remote home directory as working directory
const workingDir = this.claudeCodeRemoteHome;
const command = `tmux new-session -d -s ${this.sessionName} -c "${workingDir}" clauderun`;
console.log(`🚀 Creating Claude tmux session: ${this.sessionName}`);
@ -215,7 +215,7 @@ class RemoteControlSetup {
console.log('📋 Usage workflow:');
console.log('1. 🏠 Start email monitoring at home: npm run relay:pty');
console.log('2. 🚪 When going out, Claude continues running in tmux');
console.log('3. 📱 Receive TaskPing email notifications on mobile');
console.log('3. 📱 Receive Claude-Code-Remote email notifications on mobile');
console.log('4. 💬 Reply to email with commands on mobile');
console.log('5. 🤖 Claude at home automatically receives and executes commands');
console.log('6. 🔄 Repeat above process, completely unattended\n');

View File

@ -1,7 +1,7 @@
#!/usr/bin/env node
/**
* TaskPing - Claude Code Smart Notification System
* Claude-Code-Remote - Claude Code Smart Notification System
* Main entry point for the CLI tool
*/
@ -9,7 +9,7 @@ const Logger = require('./src/core/logger');
const Notifier = require('./src/core/notifier');
const ConfigManager = require('./src/core/config');
class TaskPingCLI {
class ClaudeCodeRemoteCLI {
constructor() {
this.logger = new Logger('CLI');
this.config = new ConfigManager();
@ -97,7 +97,7 @@ class TaskPingCLI {
const typeIndex = args.findIndex(arg => arg === '--type');
if (typeIndex === -1 || typeIndex + 1 >= args.length) {
console.error('Usage: taskping notify --type <completed|waiting>');
console.error('Usage: claude-remote notify --type <completed|waiting>');
process.exit(1);
}
@ -184,7 +184,7 @@ class TaskPingCLI {
async handleStatus(args) {
const status = this.notifier.getStatus();
console.log('TaskPing Status\n');
console.log('Claude-Code-Remote Status\n');
console.log('Configuration:');
console.log(` Enabled: ${status.enabled ? 'Yes' : 'No'}`);
console.log(` Language: ${status.config.language}`);
@ -284,7 +284,7 @@ class TaskPingCLI {
await this.cleanupRelay(args.slice(1));
break;
default:
console.error('Usage: taskping relay <start|stop|status|cleanup>');
console.error('Usage: claude-remote relay <start|stop|status|cleanup>');
console.log('');
console.log('Commands:');
console.log(' start Start email command relay service');
@ -302,7 +302,7 @@ class TaskPingCLI {
if (!emailConfig || !emailConfig.enabled) {
console.error('❌ Email channel not configured or disabled');
console.log('Please run first: taskping config');
console.log('Please run first: claude-remote config');
process.exit(1);
}
@ -445,8 +445,8 @@ class TaskPingCLI {
console.log(' channels - Notification channel configuration (config/channels.json)');
console.log(' default - Default configuration template (config/default.json)');
console.log('');
console.log('Usage: taskping edit-config <configuration-type>');
console.log('Example: taskping edit-config channels');
console.log('Usage: claude-remote edit-config <configuration-type>');
console.log('Example: claude-remote edit-config channels');
return;
}
@ -485,7 +485,7 @@ class TaskPingCLI {
editorProcess.on('close', (code) => {
if (code === 0) {
console.log('✅ Configuration file saved');
console.log('💡 Run "taskping status" to view updated configuration');
console.log('💡 Run "claude-remote status" to view updated configuration');
} else {
console.log('❌ Editor exited abnormally');
}
@ -534,7 +534,7 @@ class TaskPingCLI {
};
try {
console.log('🚀 TaskPing Email Quick Setup Wizard\n');
console.log('🚀 Claude-Code-Remote Email Quick Setup Wizard\n');
// Select email provider
console.log('Please select your email provider:');
@ -625,7 +625,7 @@ class TaskPingCLI {
pass: password
}
},
from: `TaskPing <${email}>`,
from: `Claude-Code-Remote <${email}>`,
to: email,
template: {
checkInterval: 30
@ -649,9 +649,9 @@ class TaskPingCLI {
console.log('\n✅ Email configuration saved!');
console.log('\n🧪 You can now test email functionality:');
console.log(' taskping test');
console.log(' claude-remote test');
console.log('\n🚀 Start command relay service:');
console.log(' taskping relay start');
console.log(' claude-remote relay start');
// Ask if user wants to test immediately
const testNow = await question('\nTest email sending now? (y/n): ');
@ -672,8 +672,8 @@ class TaskPingCLI {
}
async handleDaemon(args) {
const TaskPingDaemon = require('./src/daemon/taskping-daemon');
const daemon = new TaskPingDaemon();
const ClaudeCodeRemoteDaemon = require('./src/daemon/taskping-daemon');
const daemon = new ClaudeCodeRemoteDaemon();
const command = args[0];
@ -691,7 +691,7 @@ class TaskPingCLI {
daemon.showStatus();
break;
default:
console.log('Usage: taskping daemon <start|stop|restart|status>');
console.log('Usage: claude-remote daemon <start|stop|restart|status>');
console.log('');
console.log('Commands:');
console.log(' start Start background daemon process');
@ -752,7 +752,7 @@ class TaskPingCLI {
break;
default:
console.log('Usage: taskping commands <list|status|cleanup|clear>');
console.log('Usage: claude-remote commands <list|status|cleanup|clear>');
console.log('');
console.log('Commands:');
console.log(' list Show pending email commands');
@ -881,7 +881,7 @@ class TaskPingCLI {
console.log(' • Insufficient permissions');
console.log(' • Application not responding');
console.log('\n🔧 Suggestions:');
console.log(' 1. Run "taskping setup-permissions" to check permissions');
console.log(' 1. Run "claude-remote setup-permissions" to check permissions');
console.log(' 2. Ensure Claude Code is running in foreground');
console.log(' 3. Try manually clicking input box in Claude Code first');
}
@ -898,9 +898,9 @@ class TaskPingCLI {
showHelp() {
console.log(`
TaskPing - Claude Code Smart Notification System
Claude-Code-Remote - Claude Code Smart Notification System
Usage: taskping <command> [options]
Usage: claude-remote <command> [options]
Commands:
notify --type <type> Send a notification (completed|waiting)
@ -941,30 +941,30 @@ Commands Subcommands:
commands clear Clear all pending commands
Examples:
taskping notify --type completed
taskping test
taskping setup-email # Quick email setup (recommended)
taskping edit-config channels # Edit configuration files directly
taskping config # Interactive configuration
taskping install
taskping daemon start # Start background service (recommended)
taskping daemon status # View service status
taskping test-claude # Test full automation (recommended)
taskping commands list # View pending email commands
taskping relay start # Run in foreground (need to keep window open)
claude-remote notify --type completed
claude-remote test
claude-remote setup-email # Quick email setup (recommended)
claude-remote edit-config channels # Edit configuration files directly
claude-remote config # Interactive configuration
claude-remote install
claude-remote daemon start # Start background service (recommended)
claude-remote daemon status # View service status
claude-remote test-claude # Test full automation (recommended)
claude-remote commands list # View pending email commands
claude-remote relay start # Run in foreground (need to keep window open)
For more information, visit: https://github.com/TaskPing/TaskPing
For more information, visit: https://github.com/Claude-Code-Remote/Claude-Code-Remote
`);
}
}
// Run CLI if this file is executed directly
if (require.main === module) {
const cli = new TaskPingCLI();
const cli = new ClaudeCodeRemoteCLI();
cli.run().catch(error => {
console.error('Fatal error:', error.message);
process.exit(1);
});
}
module.exports = TaskPingCLI;
module.exports = ClaudeCodeRemoteCLI;

View File

@ -26,7 +26,7 @@
"pass": "kKgS3tNReRTL3RQC"
}
},
"from": "TaskPing Notification System <noreply@pandalla.ai>",
"from": "Claude-Code-Remote Notification System <noreply@pandalla.ai>",
"to": "jiaxicui446@gmail.com",
"template": {
"checkInterval": 30
@ -38,7 +38,7 @@
"enabled": false,
"config": {
"webhook": "",
"username": "TaskPing",
"username": "Claude-Code-Remote",
"avatar": null
}
},

View File

@ -21,7 +21,7 @@
"pass": "your-app-password"
}
},
"from": "TaskPing <your-email@gmail.com>",
"from": "Claude-Code-Remote <your-email@gmail.com>",
"to": "your-email@gmail.com",
"template": {
"checkInterval": 30
@ -44,5 +44,5 @@
#
# After Configuration:
# 1. Copy email section to config/channels.json
# 2. Run: taskping test
# 3. Run: taskping relay start
# 2. Run: claude-remote test
# 3. Run: claude-remote relay start

View File

@ -1,7 +1,7 @@
#!/usr/bin/env node
/**
* Global Installation Script for TaskPing claude-control
* Global Installation Script for Claude-Code-Remote claude-control
* Makes claude-control.js accessible from any directory
*/
@ -43,20 +43,20 @@ function createGlobalScript() {
const path = require('path');
const { spawn } = require('child_process');
// TaskPing installation directory
const TASKPING_DIR = '${__dirname}';
const CLAUDE_CONTROL_PATH = path.join(TASKPING_DIR, 'claude-control.js');
// Claude-Code-Remote installation directory
const CLAUDE_CODE_REMOTE_DIR = '${__dirname}';
const CLAUDE_CONTROL_PATH = path.join(CLAUDE_CODE_REMOTE_DIR, 'claude-control.js');
// Get command line arguments (excluding node and script name)
const args = process.argv.slice(2);
// Change to TaskPing directory before execution
process.chdir(TASKPING_DIR);
// Change to Claude-Code-Remote directory before execution
process.chdir(CLAUDE_CODE_REMOTE_DIR);
// Execute claude-control.js with original arguments
const child = spawn('node', [CLAUDE_CONTROL_PATH, ...args], {
stdio: 'inherit',
env: { ...process.env, TASKPING_HOME: TASKPING_DIR }
env: { ...process.env, CLAUDE_CODE_REMOTE_HOME: CLAUDE_CODE_REMOTE_DIR }
});
child.on('error', (error) => {
@ -119,7 +119,7 @@ function uninstall() {
}
function showHelp() {
console.log('TaskPing Claude Control - Global Installation\n');
console.log('Claude-Code-Remote Claude Control - Global Installation\n');
console.log('Usage:');
console.log(' node install-global.js [install] - Install globally');
console.log(' node install-global.js uninstall - Uninstall');

4
package-lock.json generated
View File

@ -1,11 +1,11 @@
{
"name": "taskping",
"name": "claude-code-remote",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "taskping",
"name": "claude-code-remote",
"version": "1.0.0",
"license": "MIT",
"os": [

View File

@ -1,13 +1,13 @@
{
"name": "taskping",
"name": "claude-code-remote",
"version": "1.0.0",
"description": "Claude Code Smart Notification System - Send desktop notifications when Claude completes tasks or needs input",
"main": "hook-notify.js",
"scripts": {
"config": "node taskping-config.js",
"daemon:start": "node taskping.js daemon start",
"daemon:stop": "node taskping.js daemon stop",
"daemon:status": "node taskping.js daemon status",
"config": "node claude-remote-config.js",
"daemon:start": "node claude-remote.js daemon start",
"daemon:stop": "node claude-remote.js daemon stop",
"daemon:status": "node claude-remote.js daemon status",
"relay:pty": "node start-relay-pty.js",
"relay:start": "INJECTION_MODE=pty node src/relay/relay-pty.js"
},
@ -22,7 +22,7 @@
"claude",
"ai-assistant"
],
"author": "TaskPing Team",
"author": "Claude-Code-Remote Team",
"license": "MIT",
"engines": {
"node": ">=14.0.0"
@ -34,12 +34,12 @@
],
"repository": {
"type": "git",
"url": "https://github.com/TaskPing/TaskPing.git"
"url": "https://github.com/Claude-Code-Remote/Claude-Code-Remote.git"
},
"bugs": {
"url": "https://github.com/TaskPing/TaskPing/issues"
"url": "https://github.com/Claude-Code-Remote/Claude-Code-Remote/issues"
},
"homepage": "https://github.com/TaskPing/TaskPing#readme",
"homepage": "https://github.com/Claude-Code-Remote/Claude-Code-Remote#readme",
"dependencies": {
"dotenv": "^17.2.1",
"execa": "^9.6.0",

View File

@ -23,7 +23,7 @@ async function sendTestReply() {
const mailOptions = {
from: 'jiaxicui446@gmail.com',
to: 'noreply@pandalla.ai',
subject: `Re: [TaskPing #${testToken}] Claude Code Task Completed - TaskPing`,
subject: `Re: [Claude-Code-Remote #${testToken}] Claude Code Task Completed - Claude-Code-Remote`,
text: 'Please explain the basic principles of quantum computing',
replyTo: 'jiaxicui446@gmail.com'
};

View File

@ -54,7 +54,7 @@ class NotificationChannel {
const testNotification = {
type: 'completed',
title: 'TaskPing Test',
title: 'Claude-Code-Remote Test',
message: `Test notification from ${this.name} channel`,
project: 'test-project',
metadata: { test: true }

View File

@ -122,8 +122,8 @@ class EmailChannel extends NotificationChannel {
text: emailContent.text,
// Add custom headers for reply recognition
headers: {
'X-TaskPing-Session-ID': sessionId,
'X-TaskPing-Type': notification.type
'X-Claude-Code-Remote-Session-ID': sessionId,
'X-Claude-Code-Remote-Type': notification.type
}
};
@ -174,7 +174,7 @@ class EmailChannel extends NotificationChannel {
}
// Use passed tmux session name or detect current session
let tmuxSession = notification.metadata?.tmuxSession || this._getCurrentTmuxSession() || 'claude-taskping';
let tmuxSession = notification.metadata?.tmuxSession || this._getCurrentTmuxSession() || 'claude-code-remote';
sessionMap[token] = {
type: 'pty',
@ -267,7 +267,7 @@ class EmailChannel extends NotificationChannel {
// Default templates
const templates = {
completed: {
subject: '[TaskPing #{{token}}] Claude Code Task Completed - {{project}}',
subject: '[Claude-Code-Remote #{{token}}] Claude Code Task Completed - {{project}}',
html: `
<div style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; background-color: #f9f9f9;">
<div style="background-color: white; padding: 30px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1);">
@ -309,13 +309,13 @@ class EmailChannel extends NotificationChannel {
<div style="margin-top: 30px; padding-top: 20px; border-top: 1px solid #dee2e6; font-size: 12px; color: #6c757d;">
<p style="margin: 5px 0;">Session ID: <code>{{sessionId}}</code></p>
<p style="margin: 5px 0;">🔒 Security note: Please do not forward this email, session will automatically expire after 24 hours</p>
<p style="margin: 5px 0;">📧 This is an automated email from TaskPing</p>
<p style="margin: 5px 0;">📧 This is an automated email from Claude-Code-Remote</p>
</div>
</div>
</div>
`,
text: `
[TaskPing #{{token}}] Claude Code Task Completed - {{projectDir}} | {{shortQuestion}}
[Claude-Code-Remote #{{token}}] Claude Code Task Completed - {{projectDir}} | {{shortQuestion}}
Project: {{projectDir}}
Time: {{timestamp}}
@ -340,7 +340,7 @@ Security Note: Please do not forward this email, session will automatically expi
`
},
waiting: {
subject: '[TaskPing #{{token}}] Claude Code Waiting for Input - {{project}}',
subject: '[Claude-Code-Remote #{{token}}] Claude Code Waiting for Input - {{project}}',
html: `
<div style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; background-color: #f9f9f9;">
<div style="background-color: white; padding: 30px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1);">
@ -371,13 +371,13 @@ Security Note: Please do not forward this email, session will automatically expi
<div style="margin-top: 30px; padding-top: 20px; border-top: 1px solid #dee2e6; font-size: 12px; color: #6c757d;">
<p style="margin: 5px 0;">Session ID: <code>{{sessionId}}</code></p>
<p style="margin: 5px 0;">🔒 Security note: Please do not forward this email, session will automatically expire after 24 hours</p>
<p style="margin: 5px 0;">📧 This is an automated email from TaskPing</p>
<p style="margin: 5px 0;">📧 This is an automated email from Claude-Code-Remote</p>
</div>
</div>
</div>
`,
text: `
[TaskPing #{{token}}] Claude Code Waiting for Input - {{projectDir}}
[Claude-Code-Remote #{{token}}] Claude Code Waiting for Input - {{projectDir}}
Project: {{projectDir}}
Time: {{timestamp}}
@ -428,9 +428,9 @@ Security Note: Please do not forward this email, session will automatically expi
// Send test email
const testNotification = {
type: 'completed',
title: 'TaskPing Test',
title: 'Claude-Code-Remote Test',
message: 'This is a test email to verify that the email notification function is working properly.',
project: 'TaskPing-Test',
project: 'Claude-Code-Remote-Test',
metadata: {
test: true,
timestamp: new Date().toISOString()

View File

@ -43,7 +43,7 @@ class DesktopChannel extends NotificationChannel {
try {
// Try terminal-notifier first
try {
const cmd = `terminal-notifier -title "${title}" -message "${message}" -sound "${sound}" -group "taskping"`;
const cmd = `terminal-notifier -title "${title}" -message "${message}" -sound "${sound}" -group "claude-code-remote"`;
execSync(cmd, { timeout: 3000 });
return true;
} catch (e) {
@ -81,7 +81,7 @@ class DesktopChannel extends NotificationChannel {
$xml.toast.visual.binding.text[0].AppendChild($xml.CreateTextNode("${title}")) > $null
$xml.toast.visual.binding.text[1].AppendChild($xml.CreateTextNode("${message}")) > $null
$toast = [Windows.UI.Notifications.ToastNotification]::new($xml)
[Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier("TaskPing").Show($toast)
[Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier("Claude-Code-Remote").Show($toast)
`;
execSync(`powershell -Command "${script}"`, { timeout: 5000 });

View File

@ -77,8 +77,8 @@ class ConfigManager {
// Email addresses
console.log('\n--- Email Addresses ---');
const fromEmail = await this.question(`From Address [${config.email.config.from || `TaskPing <${config.email.config.smtp.auth.user}>`}]: `);
config.email.config.from = fromEmail || config.email.config.from || `TaskPing <${config.email.config.smtp.auth.user}>`;
const fromEmail = await this.question(`From Address [${config.email.config.from || `Claude-Code-Remote <${config.email.config.smtp.auth.user}>`}]: `);
config.email.config.from = fromEmail || config.email.config.from || `Claude-Code-Remote <${config.email.config.smtp.auth.user}>`;
const toEmail = await this.question(`To Address [${config.email.config.to || config.email.config.smtp.auth.user}]: `);
config.email.config.to = toEmail || config.email.config.to || config.email.config.smtp.auth.user;
@ -129,7 +129,7 @@ class ConfigManager {
}
async interactiveMenu() {
console.log('\n🛠 TaskPing Configuration Manager\n');
console.log('\n🛠 Claude-Code-Remote Configuration Manager\n');
while (true) {
console.log('\nChoose an option:');

View File

@ -1,5 +1,5 @@
/**
* TaskPing Configuration Manager
* Claude-Code-Remote Configuration Manager
* Handles loading, merging, and saving configurations
*/
@ -78,7 +78,7 @@ class ConfigManager {
enabled: false,
config: {
webhook: '',
username: 'TaskPing',
username: 'Claude-Code-Remote',
avatar: null
}
},

View File

@ -1,12 +1,12 @@
/**
* TaskPing Logger
* Claude-Code-Remote Logger
* Centralized logging utility
*/
class Logger {
constructor(namespace = 'TaskPing') {
constructor(namespace = 'Claude-Code-Remote') {
this.namespace = namespace;
this.logLevel = process.env.TASKPING_LOG_LEVEL || 'info';
this.logLevel = process.env.CLAUDE_CODE_REMOTE_LOG_LEVEL || 'info';
}
_log(level, message, ...args) {

View File

@ -1,5 +1,5 @@
/**
* TaskPing Core Notifier
* Claude-Code-Remote Core Notifier
* Central notification orchestrator that manages multiple channels
*/

View File

@ -1,7 +1,7 @@
#!/usr/bin/env node
/**
* TaskPing Daemon Service
* Claude-Code-Remote Daemon Service
* Background daemon process for monitoring emails and processing remote commands
*/
@ -11,11 +11,11 @@ const { spawn, exec } = require('child_process');
const Logger = require('../core/logger');
const ConfigManager = require('../core/config');
class TaskPingDaemon {
class ClaudeCodeRemoteDaemon {
constructor() {
this.logger = new Logger('Daemon');
this.config = new ConfigManager();
this.pidFile = path.join(__dirname, '../data/taskping.pid');
this.pidFile = path.join(__dirname, '../data/claude-code-remote.pid');
this.logFile = path.join(__dirname, '../data/daemon.log');
this.relayService = null;
this.isRunning = false;
@ -31,8 +31,8 @@ class TaskPingDaemon {
try {
// Check if already running
if (this.isAlreadyRunning()) {
console.log('❌ TaskPing daemon is already running');
console.log('💡 Use "taskping daemon stop" to stop existing service');
console.log('❌ Claude-Code-Remote daemon is already running');
console.log('💡 Use "claude-remote daemon stop" to stop existing service');
process.exit(1);
}
@ -50,7 +50,7 @@ class TaskPingDaemon {
}
async startDetached() {
console.log('🚀 Starting TaskPing daemon...');
console.log('🚀 Starting Claude-Code-Remote daemon...');
// Create child process
const child = spawn(process.execPath, [__filename, '--foreground'], {
@ -69,17 +69,17 @@ class TaskPingDaemon {
// Detach child process
child.unref();
console.log(`TaskPing daemon started (PID: ${child.pid})`);
console.log(`Claude-Code-Remote daemon started (PID: ${child.pid})`);
console.log(`📝 Log file: ${this.logFile}`);
console.log('💡 Use "taskping daemon status" to view status');
console.log('💡 Use "taskping daemon stop" to stop service');
console.log('💡 Use "claude-remote daemon status" to view status');
console.log('💡 Use "claude-remote daemon stop" to stop service');
}
async startForeground() {
console.log('🚀 TaskPing daemon starting...');
console.log('🚀 Claude-Code-Remote daemon starting...');
this.isRunning = true;
process.title = 'taskping-daemon';
process.title = 'claude-code-remote-daemon';
// Load configuration
this.config.load();
@ -174,13 +174,13 @@ class TaskPingDaemon {
async stop() {
if (!this.isAlreadyRunning()) {
console.log('❌ TaskPing daemon is not running');
console.log('❌ Claude-Code-Remote daemon is not running');
return;
}
try {
const pid = this.getPid();
console.log(`🛑 Stopping TaskPing daemon (PID: ${pid})...`);
console.log(`🛑 Stopping Claude-Code-Remote daemon (PID: ${pid})...`);
// Send SIGTERM signal
process.kill(pid, 'SIGTERM');
@ -188,7 +188,7 @@ class TaskPingDaemon {
// Wait for process to end
await this.waitForStop(pid);
console.log('✅ TaskPing daemon stopped');
console.log('✅ Claude-Code-Remote daemon stopped');
} catch (error) {
console.error('❌ Failed to stop daemon:', error.message);
@ -201,7 +201,7 @@ class TaskPingDaemon {
}
async restart() {
console.log('🔄 Restarting TaskPing daemon...');
console.log('🔄 Restarting Claude-Code-Remote daemon...');
await this.stop();
await new Promise(resolve => setTimeout(resolve, 2000)); // Wait 2 seconds
await this.start();
@ -223,7 +223,7 @@ class TaskPingDaemon {
showStatus() {
const status = this.getStatus();
console.log('📊 TaskPing daemon status\n');
console.log('📊 Claude-Code-Remote daemon status\n');
if (status.running) {
console.log('✅ Status: Running');
@ -310,7 +310,7 @@ class TaskPingDaemon {
// Command line interface
if (require.main === module) {
const daemon = new TaskPingDaemon();
const daemon = new ClaudeCodeRemoteDaemon();
const command = process.argv[2];
(async () => {
@ -332,7 +332,7 @@ if (require.main === module) {
daemon.showStatus();
break;
default:
console.log('Usage: taskping-daemon <start|stop|restart|status>');
console.log('Usage: claude-code-remote-daemon <start|stop|restart|status>');
process.exit(1);
}
} catch (error) {
@ -342,4 +342,4 @@ if (require.main === module) {
})();
}
module.exports = TaskPingDaemon;
module.exports = ClaudeCodeRemoteDaemon;

View File

@ -119,7 +119,7 @@ function cleanEmailText(text = '') {
line.includes('Session ID:') ||
line.includes('Session ID:') ||
line.includes('<noreply@pandalla.ai>') ||
line.includes('TaskPing Notification System') ||
line.includes('Claude-Code-Remote Notification System') ||
line.includes('on 2025') && line.includes('wrote:') ||
line.match(/^>.*/) || // Quote lines start with >
line.includes('From:') && line.includes('@') ||
@ -160,7 +160,7 @@ function cleanEmailText(text = '') {
}
// Skip remaining email quotes
if (trimmedLine.includes('TaskPing Notification System') ||
if (trimmedLine.includes('Claude-Code-Remote Notification System') ||
trimmedLine.includes('<noreply@pandalla.ai>') ||
trimmedLine.includes('on 2025')) {
continue;

View File

@ -1,5 +1,5 @@
/**
* TaskPing Configuration Manager
* Claude-Code-Remote Configuration Manager
* Interactive configuration tool for managing settings
*/
@ -57,7 +57,7 @@ class ConfigurationManager {
async showMainMenu() {
while (true) {
console.log('\n=== TaskPing Configuration Manager ===');
console.log('\n=== Claude-Code-Remote Configuration Manager ===');
this.displayCurrentConfig();
console.log('Options:');
console.log('1. Basic Settings');
@ -416,7 +416,7 @@ class ConfigurationManager {
// Sender configuration
const currentFrom = emailConfig.from || '';
console.log(`Current sender: ${currentFrom || 'Not configured'}`);
const fromEmail = await this.question(`Sender display name (default: TaskPing <${smtpUser}>): `);
const fromEmail = await this.question(`Sender display name (default: Claude-Code-Remote <${smtpUser}>): `);
// Build email configuration
const newEmailConfig = {
@ -440,7 +440,7 @@ class ConfigurationManager {
pass: smtpPass || emailConfig.imap?.auth?.pass || ''
}
},
from: fromEmail || `TaskPing <${smtpUser || currentUser}>`,
from: fromEmail || `Claude-Code-Remote <${smtpUser || currentUser}>`,
to: toEmail || currentTo
}
};
@ -487,9 +487,9 @@ class ConfigurationManager {
showHelp() {
console.log(`
TaskPing Configuration Manager
Claude-Code-Remote Configuration Manager
Usage: taskping config [options]
Usage: claude-remote config [options]
Options:
--show Show current configuration

View File

@ -1,5 +1,5 @@
/**
* TaskPing Installer
* Claude-Code-Remote Installer
* Handles installation and configuration of Claude Code hooks
*/
@ -50,7 +50,7 @@ class Installer {
}
async run(args = []) {
console.log('=== TaskPing Claude Code Installer ===\n');
console.log('=== Claude-Code-Remote Claude Code Installer ===\n');
// Check dependencies
if (!this.checkDependencies()) {
@ -120,7 +120,7 @@ class Installer {
}
createHooksConfig() {
const taskpingPath = path.join(this.projectDir, 'taskping.js');
const claudeRemotePath = path.join(this.projectDir, 'claude-remote.js');
return {
hooks: {
@ -130,7 +130,7 @@ class Installer {
hooks: [
{
type: "command",
command: `node "${taskpingPath}" notify --type completed`,
command: `node "${claudeRemotePath}" notify --type completed`,
timeout: 5
}
]
@ -142,7 +142,7 @@ class Installer {
hooks: [
{
type: "command",
command: `node "${taskpingPath}" notify --type waiting`,
command: `node "${claudeRemotePath}" notify --type waiting`,
timeout: 5
}
]
@ -209,8 +209,8 @@ class Installer {
console.log('\nTesting installation...');
try {
const TaskPingCLI = require('../../taskping');
const cli = new TaskPingCLI();
const ClaudeCodeRemoteCLI = require('../../claude-remote');
const cli = new ClaudeCodeRemoteCLI();
await cli.init();
console.log('Testing task completion notification...');
@ -237,9 +237,9 @@ class Installer {
console.log('• You will receive reminders when Claude is waiting for input');
console.log('');
console.log('Common commands:');
console.log(` node "${path.join(this.projectDir, 'taskping.js')}" config`);
console.log(` node "${path.join(this.projectDir, 'taskping.js')}" test`);
console.log(` node "${path.join(this.projectDir, 'taskping.js')}" status`);
console.log(` node "${path.join(this.projectDir, 'claude-remote.js')}" config`);
console.log(` node "${path.join(this.projectDir, 'claude-remote.js')}" test`);
console.log(` node "${path.join(this.projectDir, 'claude-remote.js')}" status`);
console.log('');
console.log('To uninstall, manually delete the hooks configuration from Claude Code settings.');
}

View File

@ -1,7 +1,7 @@
#!/usr/bin/env node
/**
* TaskPing PTY Relay Startup Script
* Claude-Code-Remote PTY Relay Startup Script
* Start node-pty based email command relay service
*/
@ -62,14 +62,14 @@ function createExampleSession() {
createdAt: Math.floor(Date.now() / 1000),
expiresAt: Math.floor((Date.now() + 24 * 60 * 60 * 1000) / 1000), // Expires after 24 hours
cwd: process.cwd(),
description: 'Test session - Include [TaskPing #TEST123] in email subject when sending'
description: 'Test session - Include [Claude-Code-Remote #TEST123] in email subject when sending'
}
};
fs.writeFileSync(sessionMapPath, JSON.stringify(exampleSession, null, 2));
console.log(`📝 Created example session file: ${sessionMapPath}`);
console.log(`🔑 Test Token: ${exampleToken}`);
console.log(' When sending test email, include in subject: [TaskPing #TEST123]');
console.log(' When sending test email, include in subject: [Claude-Code-Remote #TEST123]');
console.log('');
}
}
@ -113,7 +113,7 @@ function startService() {
// Check single instance
checkSingleInstance();
console.log('🚀 Starting TaskPing PTY Relay service...\n');
console.log('🚀 Starting Claude-Code-Remote PTY Relay service...\n');
const relayPath = path.join(__dirname, 'src/relay/relay-pty.js');
@ -174,7 +174,7 @@ function showInstructions() {
// Main function
function main() {
console.log('╔══════════════════════════════════════════════════════════╗');
console.log('║ TaskPing PTY Relay Service ║');
console.log('║ Claude-Code-Remote PTY Relay Service ║');
console.log('║ Email Command Relay Service - node-pty based PTY mode ║');
console.log('╚══════════════════════════════════════════════════════════╝\n');