- Create detailed discord-setup.md with step-by-step bot creation, permissions, and troubleshooting
- Show quick setup steps and link to guide during Discord onboarding wizard
- Add Discord Setup link in getting-started.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 5fd77a225732
- Keep GET /api/tunnel returning { enabled, url, provider } for backward
compat. New list endpoint at GET /api/tunnel/list.
- Re-attach inline keyboard after stop callback so remaining tunnels
keep their Stop buttons.
- Remove unnecessary (config as any) cast for maxUserTunnels.
- Skip system entries in restore() to prevent double-registration.
- Rename stopAll() → shutdown() (kills everything including system).
Add stopAllUser() for user-facing operations.
- Added text processing to strip leading slashes from unrecognized commands in the Telegram adapter to prevent agent subprocesses from hanging.
- Updated session cancellation messages for clarity, changing "Cancel session command" to "Abort prompt command" and adjusting user feedback for session status.
- Modified session resumption logic to allow resuming cancelled sessions while preventing errors from being resumed.
- Implemented abort functionality in the prompt queue to handle ongoing processes more gracefully.
- Fix session storage: use `platform.threadId` instead of `topicId` for Discord
- Fix private field access: use getForumChannel(), getGuildId(), getGuild() accessors
- Fix error path: archive+lock orphaned threads instead of permanent delete
- Fix cleanup: read both threadId and topicId for backward compat with old records
- Add getGuild() public accessor for commands that need the Guild object
- Add debug/info logging for incoming attachments and processing results
- Filter unsupported image MIME types in agent-instance prompt
- Update README roadmap: Discord adapter status ✅ → 🚧
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 718e9f65637b
Handle 'attachment' case in sendMessage() — sends agent-generated
files, images, and audio to Discord threads. 25MB size limit.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: f8074d7879ae
Extract attachments from Discord messages, download files, convert
voice messages (OGG→WAV), save via FileService, route to agent.
Supports multiple attachments per message with parallel downloads.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 452041c47940
Tunnel Registry:
- Multi-port registry: each port gets its own cloudflared process + URL
- Two entry types: system (file viewer, hidden) and user (managed)
- Persistence to ~/.openacp/tunnels.json with debounced writes
- Restore tunnels on restart (re-spawn with new URLs)
- Max concurrent user tunnels (default: 5, configurable)
- Race condition handling for stop during spawn
- Provider-per-entry from TunnelProvider abstraction
Telegram:
- /tunnel <port> [label] — create tunnel
- /tunnels — list with inline Stop buttons
- /tunnel stop <port> — stop tunnel
- Session destroy auto-stops user tunnels with notification
CLI:
- openacp tunnel add/list/stop/stop-all subcommands
- Calls daemon API endpoints
Daemon API:
- POST /api/tunnel — create tunnel
- GET /api/tunnel — list user tunnels
- DELETE /api/tunnel/:port — stop tunnel
- DELETE /api/tunnel — stop all user tunnels
Agent Integration:
- Tunnel skill installed via openacp integrate claude
- ~/.claude/skills/openacp-tunnel/SKILL.md
- Broad trigger: "expose port", "share app", "preview on phone", etc.
- Product guide updated with tunnel CLI docs
Config:
- Added tunnel.maxUserTunnels (default: 5)
Resolves conflicts in package.json (keep both discord.js and
fastest-levenshtein) and pnpm-lock.yaml (regenerated).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: d7e8e9299f36
Discord config editor now asks for bot token and guild ID together,
validates both against the Discord API (including guild membership check),
and auto-enables on success. Clears old channel IDs to force recreation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Forum channels require Community mode. Instead of throwing an error,
now falls back to a regular text channel with threads for sessions.
- ensureForums: create GuildForum if Community enabled, GuildText otherwise
- createSessionThread: handle both Forum posts and Text channel threads
- setupAssistant: reuse createSessionThread for consistent thread creation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- #6: Normalize userId to string in allowedUserIds check (supports both
Telegram numeric IDs and Discord snowflake strings)
- #9: Validate guild has Community mode before creating forum channel,
throw helpful error message if not enabled
- #4/#5: Wire discord.js REST rateLimited event to DiscordSendQueue.onRateLimited()
to drop queued text edits when rate limited
- #7: Archive + lock threads instead of permanently deleting them,
preserving conversation history
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- ensureForums: fetch existing forum/notification channels by saved ID before creating new ones
- setupAssistant: verify assistant thread exists and unarchive if needed
- Gracefully recreate channels if saved IDs point to deleted channels
- Log "Reusing existing..." on restart for clarity
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add enable/disable toggle for both Telegram and Discord in config editor
- Auto-set enabled=true when bot token is configured
- Show enabled status in channel settings display
- Fix Discord not starting because config was missing enabled=true
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add "Channels" parent menu in config editor (choose Telegram/Discord inside)
- Add editDiscord() function for editing Discord bot token and guild ID
- Make setup step numbering dynamic based on channel selection
- Update hardcoded Telegram references to be channel-agnostic
- Update product guide to mention both Telegram and Discord
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- stopDaemon: handle EPERM on initial check by cleaning stale PID file
- stopDaemon: return stopped:false when process survives SIGKILL
- escapeSystemdValue: escape $ to prevent systemd variable expansion
- api-server: warn when secret file has insecure permissions (like SSH)
- api-server: explicit utf-8 encoding in Buffer.from for timingSafeEqual
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implements Task 11: spawnAssistant, buildWelcomeMessage, buildAssistantSystemPrompt,
and handleAssistantMessage for Discord-specific assistant sessions with full
system prompt including current state, action playbook, and product guide.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implements Task 10: complete Discord slash command infrastructure with
SLASH_COMMANDS array, central router, and all command handlers (new-session,
session, admin, menu, agents, doctor, integrate, settings).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude was pre-installed before the checkbox was shown, then filtered
out as "already installed", making it invisible. Now installed agents
appear as pre-checked disabled items so users can see Claude is ready.
Fixes#36
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Generate a random 64-char hex secret on first start, store at ~/.openacp/api-secret
with 0600 permissions. Validate Bearer token on every request except GET /api/health
and GET /api/version. Update api-client to auto-attach the token, and fix the adopt
command in commands.ts to use apiCall instead of raw fetch.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The createRequire import from 'node:module' was unused since the code
was refactored to use readFileSync instead of require() in ESM.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace Claude-only handoff with data-driven integration engine:
- Add AgentIntegrationSpec to define hooks, settings paths, output formats per agent
- Extend AGENT_CAPABILITIES with resume commands for 7 agents (Claude, Cursor, Gemini, Cline, Codex, Kilo, Amp)
- Add integration specs for 4 agents with hooks systems (Claude, Cursor, Gemini, Cline)
- Rewrite integrate.ts as generic engine: generates scripts, merges settings based on spec data
- Support both settings_json (Claude/Gemini/Cline) and hooks_json (Cursor) config formats
- Support both markdown commands (Claude) and skills (Cursor) for handoff triggers
- Auto-integrate handoff on agent install (CLI + Telegram bot)
- Auto-unintegrate on agent uninstall
- Backward compat: Claude keeps CLAUDE_SESSION_ID/CLAUDE_WORKING_DIR variable names
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>