Commit Graph

227 Commits

Author SHA1 Message Date
Lucas Berger 2cbf6e7ec7 feat(03-02): configure Telegram Trigger for callback queries
- Update Telegram Trigger to receive both message and callback_query updates
- Add Route Update Type switch to route messages vs callbacks
- Add IF Callback Authenticated node for callback query auth
- Restructure connections: message flow through auth, callback through separate auth
2026-01-30 08:40:15 -05:00
Lucas Berger 87d34b1a15 docs(03-01): complete basic container actions plan
Tasks completed: 3/3
- Add action command routing to workflow
- Implement container matching and action execution
- Handle action errors gracefully

SUMMARY: .planning/phases/03-container-actions/03-01-SUMMARY.md
2026-01-30 08:37:41 -05:00
Lucas Berger 2bd90c8a0c feat(03-01): add error handling for action flow
- Add docker-error route to Check Match Count switch (matchCount < 0)
- Add Send Docker Error node for Docker connection failures
- Route Docker API errors to user-facing error messages
- Ensure all error paths reach a Send Message node (no silent failures)
- Error messages include diagnostic details per CONTEXT.md requirements
2026-01-30 08:36:44 -05:00
Lucas Berger f466a2916e feat(03-01): implement container matching and action execution
- Add Docker List for Action node to get container list
- Add Match Container node with fuzzy matching (substring, prefix stripping)
- Add Check Match Count Switch node to route 0/1/>1 matches
- Add Build Action Command node to construct curl POST command
- Add Execute Action node to call Docker API start/stop/restart
- Add Parse Action Result node handling 204/304 success and error codes
- Add Send Action Result node for Telegram response
- Add placeholder nodes for No Match and Multiple Matches branches
- Use graceful ?t=10 timeout for stop/restart actions
2026-01-30 08:35:38 -05:00
Lucas Berger 4848e7db16 feat(03-01): add action command routing to workflow
- Add new route in Switch node for start/stop/restart commands
- Route matches case-insensitive startsWith for each action
- Add Parse Action Code node to extract action type and container name
- Action branch routes to Parse Action, ready for container matching
2026-01-30 08:33:47 -05:00
Lucas Berger 893412f405 docs(03): create phase plan
Phase 03: Container Actions
- 4 plans in 4 waves (sequential due to shared workflow file)
- Ready for execution
2026-01-29 21:48:58 -05:00
Lucas Berger f0694f6c8c phase 3 research 2026-01-29 15:02:50 -05:00
Lucas Berger cea1fba8b2 docs(03): capture phase context
Phase 03: Container Actions
- Implementation decisions documented
- Phase boundary established
2026-01-29 14:53:34 -05:00
Lucas Berger af5397306d docs(02): complete docker integration phase
Phase 2 complete with 2 plans:
- 02-01: Docker socket configuration
- 02-02: Docker query workflow

Delivers: REQ-02 (container status queries)
- "status" returns container summary
- "status <name>" returns detailed container info
- Fuzzy matching for container names

Ready for Phase 3: Container Actions
2026-01-29 14:43:13 -05:00
Lucas Berger 8e155c55de fix(02-02): fix false positive docker connection error
- Add -s (silent) flag to curl to suppress progress output
- Change error handling to only check stdout for valid JSON
- Ignore stderr which contains curl progress info
2026-01-29 14:39:14 -05:00
Lucas Berger 1252ff42f4 feat(02-02): add Docker query branch to workflow
- Add Switch node to route messages based on content
- Add Execute Command node with curl to Docker API
- Add Parse and Match code node with fuzzy matching
- Add Format Response code node with emoji mapping
- Preserve echo branch for non-docker messages
- Handle summary, single match, multiple matches, and errors
2026-01-29 14:28:01 -05:00
Lucas Berger 8d0829db50 docs(02-01): complete docker socket configuration plan
Tasks completed: 3/3
- Configure n8n container for Docker access
- Verify Docker API access
- Confirm Docker access working

Decisions:
- Static curl binary mount (hardened image lacks apk)
- --group-add 281 for docker socket permissions

SUMMARY: .planning/phases/02-docker-integration/02-01-SUMMARY.md
2026-01-29 14:23:27 -05:00
Lucas Berger 75995b5cd6 docs(02): create Docker integration phase plans
Phase 02: Docker Integration
- 2 plan(s) in 2 wave(s)
- Plan 01: Infrastructure setup (Docker socket, curl, env vars)
- Plan 02: Container query workflow with fuzzy matching
- Sequential execution (02 depends on 01)
- Ready for execution

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 08:25:34 -05:00
Lucas Berger aeae1e4377 docs(02): research phase domain with Context7
Phase 02: Docker Integration
- Docker Engine API endpoints documented (Context7 /docker/docs)
- n8n Execute Command and Code node patterns (Context7 /n8n-io/n8n-docs)
- Custom Dockerfile needed for curl in n8n container
- Fuzzy matching and response formatting patterns
2026-01-29 08:22:32 -05:00
Lucas Berger 6f36c4a307 docs(02): research phase domain
Phase 2: Docker Integration
- Docker Engine API v1.53 identified as standard
- Execute Command + curl recommended approach
- Fuzzy matching patterns documented
- Security considerations catalogued
2026-01-29 08:19:50 -05:00
Lucas Berger 8e620c0935 docs(02): capture phase context
Phase 02: Docker Integration
- Implementation decisions documented
- Phase boundary established
2026-01-29 08:12:22 -05:00
Lucas Berger fb01073001 docs(01): complete foundation phase
- 2/2 plans executed and verified
- REQ-01 (send/receive messages) satisfied
- REQ-09 (user ID auth) satisfied
- All 8 must-haves verified

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 20:35:36 -05:00
Lucas Berger 0bf0008569 docs(01-02): complete workflow import and verification plan
Tasks completed: 3/3
- Import and Activate Workflow in n8n
- Verify Authorized User Echo
- Verify Unauthorized User Blocked

Phase 1 Foundation complete (2/2 plans)
Deviation: Hardcoded user ID (n8n CE env var limitation)

SUMMARY: .planning/phases/01-foundation/01-02-SUMMARY.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 20:32:06 -05:00
Lucas Berger 23c5705050 fix(01-01): hardcode user ID instead of env var
n8n community edition blocks env var access in expressions.
Hardcoded TELEGRAM_USER_ID for single-user authentication.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 20:25:33 -05:00
Lucas Berger 216a73e0d0 docs(01-01): complete telegram echo bot plan
Tasks completed: 2/2
- Task 1: Create Telegram Bot and Configure n8n (human action)
- Task 2: Create n8n Workflow for Telegram Echo

SUMMARY: .planning/phases/01-foundation/01-01-SUMMARY.md
2026-01-28 19:48:46 -05:00
Lucas Berger 9d503bb9a8 feat(01-01): create n8n workflow for telegram echo bot
- Telegram Trigger node listens for messages
- IF node authenticates via $env.TELEGRAM_USER_ID
- Code node formats echo with timestamp
- Telegram Send node replies to authorized users
- False branch has no connections (silent ignore)
2026-01-28 19:47:39 -05:00
Lucas Berger f330097906 docs(01): create phase plan
Phase 01: Foundation
- 2 plan(s) in 2 wave(s)
- Wave 1: Workflow setup (has human action checkpoint)
- Wave 2: Verification (human verify checkpoints)
- Ready for execution

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 18:47:27 -05:00
Lucas Berger 2cb6f3a689 docs(01): research phase domain
Phase 1: Foundation
- Standard stack identified (n8n Telegram nodes, Bot API)
- Architecture patterns documented (auth, echo, formatting)
- Pitfalls catalogued (webhook SSL, merge deadlock, rate limits)
- Code examples from official sources

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 18:28:17 -05:00
Lucas Berger 1f4caa775d docs(01): capture phase context
Phase 01: Foundation
- Implementation decisions documented
- Phase boundary established
2026-01-28 17:52:41 -05:00
Lucas Berger e953333ad4 chore: add initial planning documents and configuration 2026-01-28 16:36:43 -05:00
Lucas Berger b955096341 docs: initialize project
Conversational Telegram bot for managing Docker containers on Unraid using natural language, powered by Claude API and n8n orchestration.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 16:24:42 -05:00
Luc 1906b20039 Initial commit 2026-01-28 16:05:47 -05:00