Skip to content

feat: SMS/WhatsApp notifications for remote Claude interaction#5

Merged
jonathanpeterwu merged 40 commits intomainfrom
swarm/developer-implement-core-feature
Jan 25, 2026
Merged

feat: SMS/WhatsApp notifications for remote Claude interaction#5
jonathanpeterwu merged 40 commits intomainfrom
swarm/developer-implement-core-feature

Conversation

@jonathanpeterwu
Copy link
Collaborator

Summary

  • Auto-start webhook/ngrok on CLI startup for receiving SMS responses
  • AskUserQuestion triggers WhatsApp notification for remote response
  • Dual-channel support (WhatsApp primary, SMS fallback)
  • Settings command for notification configuration
  • Auto-execute actions from SMS responses

Features (0.5.9 - 0.5.15)

  • SMS notification hook for review alerts
  • SMS response action queue
  • WhatsApp/SMS dual-channel
  • Webhook setup scripts + status callback
  • Auto-start webhook/ngrok
  • Settings command + .env loading
  • Auto-execute on SMS response + check command

Test plan

  • Run stackmemory notify settings to configure
  • Trigger AskUserQuestion and verify WhatsApp received
  • Reply to WhatsApp and verify action queued
  • Run stackmemory notify check to see pending actions

Generated with Claude Code

jonathanpeterwu and others added 30 commits January 21, 2026 23:36
- Add session daemon with 15-min auto-saves and 30-min idle auto-exit
- Add service install command for launchd (macOS) and systemd (Linux)
- Make ChromaDB optional in init, default to SQLite-only storage
- Fix lint errors: unused imports/variables, non-null assertions
- Migrate .eslintignore to eslint.config.js ignores array
- Remove flaky time-sensitive performance test from lint scope
- Add agent_docs/ with documentation for hooks, storage, Linear, MCP
- Add storage-config.ts for storage mode management
- Add EnhancedHandoffGenerator for 70-85% efficacy handoffs
- Add decision capture command (decision add/list/clear/arch/tool)
- Add --enhanced flag to handoff capture command
- Add measurement script for validating handoff token impact
- Decisions capture what/why/alternatives for session continuity
- Replace hardcoded /private/tmp path with dynamic resolution
- Use glob to find agent output directories across platforms
- Add review feedback persistence to .stackmemory/review-feedback.json
- Load persisted feedback when no new feedback available
- Keep last 20 feedbacks, auto-expire after 24 hours
…tion

- Handoff versioning: Keep last 10 handoffs in .stackmemory/handoffs/
- Decision history: Archive decisions on clear, view with --history flag
- Accurate tokens: Use @anthropic-ai/tokenizer instead of char estimation
- Decision clear now archives to ~/.stackmemory/decision-history/
- Add @stackmemoryai/sweep-addon package with Python inference
- Integrate CLI commands: sweep setup, status, predict
- Model downloads from HuggingFace on first use
- Published to npm as @stackmemoryai/sweep-addon@0.1.0
- Add packages/ to eslint ignores
- Add sweep command tests (status, help, predict)
- Increase timeout for CLI integration tests
- Relax timing threshold for flaky database test
- All 324 tests passing
- post-edit-sweep.js hook runs after Edit/Write operations
- Tracks recent diffs and runs background predictions
- Shows prediction hints in Claude Code
- install-sweep-hook.sh for easy installation
- Add /api skill for zero-code API integration via OpenAPI specs
- Implement API auto-discovery from URLs (GCP, Railway, GitHub, Stripe, etc.)
- Create CLI commands: api add, list, describe, exec, discover
- Support REST, GraphQL, and Google Discovery format APIs
- Update shell keybindings (Shift+Tab → request, Tab → accept)
- Add comprehensive spec document for Specish API patterns

Supported services:
- REST: GitHub, Stripe, Twilio, Slack, Discord, OpenAI, Anthropic, etc.
- GraphQL: Railway, Linear
- Google Discovery: GCP Compute, Storage, Cloud Run, BigQuery, AI Platform

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…eouts

- Add 'api' to expected skills list in claude-skills.test.ts
- Increase init command test timeout to 15s
- Increase status command test timeout to 10s
- Add cleanup-processes CLI command to kill stale stackmemory processes
  - Finds processes older than 24h (configurable) with no log activity
  - Supports --dry-run, --all, --force, --max-age flags
- Add comprehensive tests for API skill (18 tests)
  - Tests for add, list, describe, remove, help
  - Tests for API discovery (GitHub, Stripe, Railway, GCP)
- Bump version to 0.5.5
esbuild was tree-shaking the ESM polyfill for __dirname and __filename,
causing "ReferenceError: __dirname is not defined" in compiled CLI files.

- Add ESM banner to esbuild.config.js that injects the polyfill
- Remove redundant manual polyfills from source files
- Add claude-sm-danger wrapper for --dangerously-skip-permissions
- Auto-backgrounds builds, tests, installs, docker commands
- Configurable via stackmemory auto-bg CLI
- Claude Code hook for pre-tool-use interception
- Patterns for always/never background commands
Optional feature - requires Twilio setup:
- Send text when PR created, package published, or deployment done
- Interactive prompts with numbered options (1234) or yes/no
- Quiet hours to prevent late-night notifications
- Webhook handler for receiving SMS responses
- CLI: stackmemory notify [status|enable|test|review|ask]
- Actions from SMS responses are queued for execution
- Claude Code hook picks up responses and triggers next steps
- Response stored for hook to inject into conversation
- CLI commands: actions, run-actions, watch, install-response-hook
- Webhook stores response for hook pickup instead of immediate exec
- Add channel preference (whatsapp default, cheaper for conversations)
- Add separate env vars for WhatsApp and SMS numbers
- Add 'channel' CLI command to switch between WhatsApp/SMS
- Update status command to show channel info
- Update test command to show which channel was used
- Update help text with all env var options
- Add /sms/incoming and /sms/status endpoints for Twilio
- Add setup-notify-webhook.sh for auto-configuration
- Add stop-notify-webhook.sh for cleanup
- Track delivery status (sent/delivered/read)
- Auto-start webhook and ngrok when notifications enabled
- Display webhook URL on startup
- Save ngrok URL to ~/.stackmemory/ngrok-url.txt
- Add NOTIFICATIONS_SPEC.md for productization
- Add ngrok config template
- stackmemory settings: View all settings and missing config
- stackmemory settings notifications: Interactive setup wizard
- stackmemory settings env: Show required environment variables
- Load credentials from .env files (project, home, ~/.stackmemory)
- getMissingConfig() to check what's needed
- Webhook now auto-executes actions immediately when response received
- macOS notification triggered on response
- Add 'notify check' command for Claude to poll responses
- Add 'notify watch-responses' for background watching
- Signal file written for external process detection
- Send WhatsApp/SMS when AskUserQuestion tool is used
- Add dual-channel support (WhatsApp primary, SMS fallback)
- Load .env files from multiple locations
- Store pending prompts for response matching
- Better error handling with response body logging
- Save pending prompts to sms-notify.json instead of separate file
- Use correct format (key/label options, type field) for webhook matching
- Add debug logging to claude-session-debug.log
- Extend prompt TTL from 10 min to 1 hour
@jonathanpeterwu jonathanpeterwu merged commit 21e2826 into main Jan 25, 2026
0 of 5 checks passed
jonathanpeterwu added a commit that referenced this pull request Jan 28, 2026
* chore: Add external/ to gitignore

* 0.5.1

* chore: Release v0.5.1 - Clean dependencies

* feat: Implement hybrid auto-start architecture with session daemon

- Add session daemon with 15-min auto-saves and 30-min idle auto-exit
- Add service install command for launchd (macOS) and systemd (Linux)
- Make ChromaDB optional in init, default to SQLite-only storage
- Fix lint errors: unused imports/variables, non-null assertions
- Migrate .eslintignore to eslint.config.js ignores array
- Remove flaky time-sensitive performance test from lint scope
- Add agent_docs/ with documentation for hooks, storage, Linear, MCP
- Add storage-config.ts for storage mode management

* feat: Add high-efficacy enhanced handoff system

- Add EnhancedHandoffGenerator for 70-85% efficacy handoffs
- Add decision capture command (decision add/list/clear/arch/tool)
- Add --enhanced flag to handoff capture command
- Add measurement script for validating handoff token impact
- Decisions capture what/why/alternatives for session continuity

* chore: Make enhanced handoff the default

* fix: Dynamic path resolution and review feedback persistence

- Replace hardcoded /private/tmp path with dynamic resolution
- Use glob to find agent output directories across platforms
- Add review feedback persistence to .stackmemory/review-feedback.json
- Load persisted feedback when no new feedback available
- Keep last 20 feedbacks, auto-expire after 24 hours

* feat: Add handoff versioning, decision history, and accurate tokenization

- Handoff versioning: Keep last 10 handoffs in .stackmemory/handoffs/
- Decision history: Archive decisions on clear, view with --history flag
- Accurate tokens: Use @anthropic-ai/tokenizer instead of char estimation
- Decision clear now archives to ~/.stackmemory/decision-history/

* feat: Add memory command as alias for decision

* feat: Add Sweep 1.5B next-edit prediction addon

- Add @stackmemoryai/sweep-addon package with Python inference
- Integrate CLI commands: sweep setup, status, predict
- Model downloads from HuggingFace on first use
- Published to npm as @stackmemoryai/sweep-addon@0.1.0
- Add packages/ to eslint ignores

* chore: Release v0.5.2 - Add Sweep addon

* fix: Add sweep CLI tests and fix integration test timeouts

- Add sweep command tests (status, help, predict)
- Increase timeout for CLI integration tests
- Relax timing threshold for flaky database test
- All 324 tests passing

* chore: Release v0.5.3 - Add sweep tests, fix timeouts

* feat: Add Sweep prediction hook for Claude Code

- post-edit-sweep.js hook runs after Edit/Write operations
- Tracks recent diffs and runs background predictions
- Shows prediction hints in Claude Code
- install-sweep-hook.sh for easy installation

* feat: Add sweep hook CLI command and improve hook behavior

* feat: Add API skill with OpenAPI/Restish integration

- Add /api skill for zero-code API integration via OpenAPI specs
- Implement API auto-discovery from URLs (GCP, Railway, GitHub, Stripe, etc.)
- Create CLI commands: api add, list, describe, exec, discover
- Support REST, GraphQL, and Google Discovery format APIs
- Update shell keybindings (Shift+Tab → request, Tab → accept)
- Add comprehensive spec document for Specish API patterns

Supported services:
- REST: GitHub, Stripe, Twilio, Slack, Discord, OpenAI, Anthropic, etc.
- GraphQL: Railway, Linear
- Google Discovery: GCP Compute, Storage, Cloud Run, BigQuery, AI Platform

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix: Update test expectations for api skill and increase CLI test timeouts

- Add 'api' to expected skills list in claude-skills.test.ts
- Increase init command test timeout to 15s
- Increase status command test timeout to 10s

* feat: Add process cleanup utility and API skill tests

- Add cleanup-processes CLI command to kill stale stackmemory processes
  - Finds processes older than 24h (configurable) with no log activity
  - Supports --dry-run, --all, --force, --max-age flags
- Add comprehensive tests for API skill (18 tests)
  - Tests for add, list, describe, remove, help
  - Tests for API discovery (GitHub, Stripe, Railway, GCP)
- Bump version to 0.5.5

* fix: Add ESM banner for __dirname/__filename compatibility

esbuild was tree-shaking the ESM polyfill for __dirname and __filename,
causing "ReferenceError: __dirname is not defined" in compiled CLI files.

- Add ESM banner to esbuild.config.js that injects the polyfill
- Remove redundant manual polyfills from source files
- Add claude-sm-danger wrapper for --dangerously-skip-permissions

* chore: bump version to 0.5.6

* feat: Add auto-background hook for long-running commands

- Auto-backgrounds builds, tests, installs, docker commands
- Configurable via stackmemory auto-bg CLI
- Claude Code hook for pre-tool-use interception
- Patterns for always/never background commands

* chore: bump version to 0.5.7

* feat: Add SMS notification hook for review alerts

Optional feature - requires Twilio setup:
- Send text when PR created, package published, or deployment done
- Interactive prompts with numbered options (1234) or yes/no
- Quiet hours to prevent late-night notifications
- Webhook handler for receiving SMS responses
- CLI: stackmemory notify [status|enable|test|review|ask]

* chore: bump version to 0.5.8

* feat: Add SMS response action queue and hooks

- Actions from SMS responses are queued for execution
- Claude Code hook picks up responses and triggers next steps
- Response stored for hook to inject into conversation
- CLI commands: actions, run-actions, watch, install-response-hook
- Webhook stores response for hook pickup instead of immediate exec

* chore: bump version to 0.5.9

* feat: Add WhatsApp/SMS dual-channel support for notifications

- Add channel preference (whatsapp default, cheaper for conversations)
- Add separate env vars for WhatsApp and SMS numbers
- Add 'channel' CLI command to switch between WhatsApp/SMS
- Update status command to show channel info
- Update test command to show which channel was used
- Update help text with all env var options

* feat: Add webhook setup scripts and status callback endpoint

- Add /sms/incoming and /sms/status endpoints for Twilio
- Add setup-notify-webhook.sh for auto-configuration
- Add stop-notify-webhook.sh for cleanup
- Track delivery status (sent/delivered/read)

* chore: bump version to 0.5.11

* feat: Auto-start webhook/ngrok on CLI startup + add notifications spec

- Auto-start webhook and ngrok when notifications enabled
- Display webhook URL on startup
- Save ngrok URL to ~/.stackmemory/ngrok-url.txt
- Add NOTIFICATIONS_SPEC.md for productization
- Add ngrok config template

* chore: bump to 0.5.12

* feat: Add settings command and .env loading for notifications

- stackmemory settings: View all settings and missing config
- stackmemory settings notifications: Interactive setup wizard
- stackmemory settings env: Show required environment variables
- Load credentials from .env files (project, home, ~/.stackmemory)
- getMissingConfig() to check what's needed

* chore: bump to 0.5.13

* feat: Auto-execute actions on SMS response + check command

- Webhook now auto-executes actions immediately when response received
- macOS notification triggered on response
- Add 'notify check' command for Claude to poll responses
- Add 'notify watch-responses' for background watching
- Signal file written for external process detection

* chore: bump to 0.5.14

* fix: Read version from package.json instead of hardcoding

* chore: bump to 0.5.15

* feat(hooks): Add AskUserQuestion notifications + WhatsApp support

- Send WhatsApp/SMS when AskUserQuestion tool is used
- Add dual-channel support (WhatsApp primary, SMS fallback)
- Load .env files from multiple locations
- Store pending prompts for response matching
- Better error handling with response body logging

* fix(hooks): Write pending prompts to correct config location

- Save pending prompts to sms-notify.json instead of separate file
- Use correct format (key/label options, type field) for webhook matching
- Add debug logging to claude-session-debug.log
- Extend prompt TTL from 10 min to 1 hour

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
@jonathanpeterwu jonathanpeterwu deleted the swarm/developer-implement-core-feature branch February 13, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant