Skip to content

feat: PicoWatch — trial monitoring menu bar app + WhatsApp status counter#2369

Open
diegofornalha wants to merge 7 commits intosipeed:mainfrom
diegofornalha:feat/picowatch
Open

feat: PicoWatch — trial monitoring menu bar app + WhatsApp status counter#2369
diegofornalha wants to merge 7 commits intosipeed:mainfrom
diegofornalha:feat/picowatch

Conversation

@diegofornalha
Copy link
Copy Markdown

Summary

  • macOS menu bar app (Swift/SwiftUI) that monitors the PicoClaw WhatsApp agent in real-time
  • Detects trial users from session JSONL files and sends macOS notifications
  • Updates WhatsApp Status with daily trial counter (dd/MM: N) with black background + white bold text
  • Adds POST /api/send-status gateway endpoint for WhatsApp Status broadcast
  • Weekly report with trial stats persisted across sessions

Gateway changes

  • POST /api/send-status endpoint for WhatsApp Status broadcast
  • SendStatus() on WhatsAppNativeChannel (ExtendedTextMessage with black bg, white bold)
  • HandleFunc() on Manager to register custom HTTP handlers

Build & Run

cd tools/PicoWatch
bash build.sh
open build/PicoWatch.app

Test plan

  • bash build.sh compiles without errors
  • curl -X POST localhost:18790/api/send-status -d '{"text":"test"}' -H 'Content-Type: application/json' returns ok
  • New trial user triggers macOS notification + WhatsApp status update

🤖 Generated with Claude Code

diegofornalha and others added 7 commits March 30, 2026 11:23
Wire the previously isolated SkillManager and ContextCompressor into
the PicoClaw agent loop so they actually work at runtime:

SkillManager integration:
- New tool `skill_manage` (create/read/update/delete/list workspace skills)
- Registered in loop.go alongside find_skills/install_skill
- Added to ToolsConfig with `skill_manage` toggle

ContextCompressor integration:
- New `structuredContextManager` implementing ContextManager interface
- Registered as "structured" via RegisterContextManager factory
- Activated by config: agents.defaults.context_manager = "structured"
- Zero breaking change — defaults to "legacy" if unconfigured

All tests passing (pkg/skills, pkg/agent, pkg/tools).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… patch operation

Add system prompt guidance that tells the LLM when to create/update skills
(after 5+ tool calls, fixing errors, discovering workflows). Enrich the
skill_manage tool description with create/update triggers and quality
criteria. Add "patch" operation for targeted skill fixes.

Introduce skills security guard (pkg/skills/guard.go) with 43 regex
threat patterns across 8 categories (exfiltration, injection, destructive,
persistence, reverse shells, obfuscation, hardcoded secrets, invisible
unicode). Trust-level-aware install policy with automatic rollback on
blocked writes.

Integrate guard into SkillManager — every CreateSkill/EditSkill/PatchSkill
now runs a security scan after write, rolling back to original content if
the scan blocks the skill.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add 6 SkillManager+Guard integration tests verifying:
- Clean skill creation succeeds
- Malicious create is blocked with rollback
- Malicious patch is blocked, original content preserved
- Malicious edit is blocked, original content preserved
- Guard disabled allows everything
- Clean-to-clean patch succeeds

Add 4 system prompt guidance tests verifying:
- Skills guidance appears when skill_manage is enabled
- Skills guidance absent when disabled
- Memory rule has enriched guidance text
- Dynamic rule numbering works correctly

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… counter

macOS menu bar app that monitors the PicoClaw WhatsApp agent:
- Detects trial users from session JSONL files (STATUS: TRIAL)
- Sends macOS notifications on new trial conversations
- Updates WhatsApp Status with daily trial counter (dd/MM: N)
- Weekly report with trial stats persisted to picowatch_stats.json
- Resolves LID to real phone number from check-access.sh output

Gateway changes:
- POST /api/send-status endpoint for WhatsApp Status broadcast
- SendStatus() on WhatsAppNativeChannel (black bg, white bold text)
- HandleFunc() on Manager to register custom HTTP handlers

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant