Adds `npx atxp phone mark-read <id> [id...]` to mark SMS messages as
read via the new phone_mark_read MCP tool.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fixes TypeScript build error from missing property in the help flag
early-return path.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Allow users to pass custom lyrics to the music generation tool via
--lyrics, forwarded to the music_create_async MCP endpoint.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Support startPublishedDate and endPublishedDate parameters on the
search_search MCP tool, allowing users to restrict results by
publication date. Also fixes toolArgs extraction to properly skip
flag values that would otherwise leak into the query string.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add --attach flag (repeatable) to email send and reply commands. The CLI
reads local files, detects MIME type from extension, and base64-encodes
content before passing to the MCP tool. Inbox and search results now
display attachment metadata (filename, type, size) inline.
https://claude.ai/code/session_013ZfRLDGZ9mawSATTJ8ToQg
Replace /hooks/wake + HEARTBEAT.md approach with direct /hooks/agent
channel targeting. Discovered channels are now sent to the notifications
service which stores them and uses them for delivery.
- Remove HEARTBEAT.md read/write/section-replace logic (~100 lines)
- Simplify configureHooksOnInstance to only set hooks.token
- Send discovered channels in the enable API request
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Hoist sanitizeSessionValue to module scope (out of loop)
- Also strip quote/backtick chars to prevent LLM prompt injection
- Remove redundant sessionsPath alias, use SESSIONS_PATH directly
- Backtick-wrap channel/target values in HEARTBEAT.md output
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Strip newlines/control chars and limit length on channel/to values
parsed from session keys to prevent prompt injection via HEARTBEAT.md
- Ensure newline separator between preceding content and replaced section
- Remove extra blank line after configureHooksOnInstance
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Extract hardcoded paths as named constants
- Replace regex section replacement with split-on-header approach
- Reset stale heartbeat target when channels disappear
- Add error handling for fetch, getAccountId, and configureHooksOnInstance
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Instead of injecting instructions via /hooks/wake, directly write relay
instructions to HEARTBEAT.md and configure heartbeat delivery target from
discovered session channels. Adds sms.received to help text.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Send { text, mode } instead of { message, name } to match the
/hooks/wake endpoint which injects into the main session.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Use accountId directly instead of stripping email prefix, so
notifications match on atxp_acct_* rather than agent_* identities
- Fix heartbeat instruction: use 'message' field (not 'text'),
reference /hooks/agent endpoint, add sender name
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- sendHeartbeatInstruction now warns on non-OK responses instead of
silently treating them as success
- Guard webhook.eventTypes with optional chaining to prevent TypeError
- Replace Record<string, unknown> casts with typed EnableResponse interface
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Only show "try logging in again" for 401, not network errors
- Show HTTP status code for non-401 failures, "network error" otherwise
- Guard res.json() with .catch() for non-JSON responses
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add fetchAccountInfo() that returns HTTP status on failure so
whoamiCommand can distinguish 401 from other errors
- Keep getAccountInfo() as simple null-returning wrapper for callers
that don't need status details (e.g. notifications getEmailUserId)
- Document sendHeartbeatInstruction trust boundary for maintainers
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- getMachineId: only fall back to hostname if it matches Fly machine
ID pattern (hex, 10+ chars), preventing accidental registration
from developer machines
- Validate API response shape before accessing nested properties
- Remove unused positionalArg parameter and 'add' alias
- Remove os import (now require'd inline in getMachineId)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove ~200 lines of non-functional code (list, remove, test,
re-enable, rotate-secret, failures, replay) that depend on broken
OAuth auth. Simplify help text to only show `enable`. Improve
whoami error message to mention token may be invalid/expired.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Only `notifications enable` works currently. The other commands
(list, remove, test, re-enable, rotate-secret, failures, replay)
require OAuth auth that isn't wired up yet.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract getAccountInfo() as shared export from whoami.ts and use it
in webhook.ts to resolve the email local part (e.g. agent_xyz) for
cross-system event matching between email-mcp and atxp account IDs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fly sets FLY_MACHINE_ID on the VM but nested shells may not inherit it.
The hostname is also set to the machine ID, so use it as fallback.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Simplified flow: CLI posts machine_id to /notifications/enable,
no OAuth required. Includes enable, list, remove, test, re-enable,
rotate-secret, failures, and replay subcommands.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The previous fix only passed -y to npx (to auto-install the skills
package) but not to the skills add command itself, which has its own
interactive confirmation prompts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>