24 Commits

Author SHA1 Message Date
0xmrpeter
40777e75e2 chore: update package.json and pnpm-lock.yaml for dependency management and build configuration
- Added new dependencies: @agentclientprotocol/sdk, @inquirer/prompts, grammy, nanoid, and zod.
- Updated build scripts to use TypeScript compiler directly and modified entry points for the CLI.
- Removed outdated pnpm workspace and TypeScript configuration files.
- Adjusted tsup configuration for improved output structure and TypeScript declaration generation.
v0.2.11
2026-03-19 19:03:47 +07:00
0xmrpeter
c26657b4d8 feat: enhance TypeScript configuration and main.ts for Telegram adapter integration
- Updated tsconfig.publish.json to exclude build artifacts and test files.
- Modified tsup.config.ts to include the Telegram adapter as a separate entry point and removed unnecessary noExternal configuration.
- Refactored main.ts to load the Telegram adapter using a dedicated function for improved modularity and clarity.
v0.2.10 v0.2.6 v0.2.7 v0.2.8 v0.2.9
2026-03-19 18:46:46 +07:00
0xmrpeter
3302bb4612 chore: update tsup.config.ts to include @inquirer/prompts in external dependencies v0.2.5 2026-03-19 18:38:31 +07:00
Mr.Peter
b43b59760f
Merge pull request #5 from dylan-112/develop
Create quick onboarding feature
v0.2.4
2026-03-19 18:32:15 +07:00
dylan
37794db457 feat: interactive CLI onboarding setup wizard
- Auto-detect agents from PATH and node_modules/.bin (prefer claude-agent-acp)
- Validate Telegram bot token and chat ID against API
- Streamlined 3-step setup: Telegram, Agents, Workspace
- Auto-save config and auto-start after setup
- Fix bin entry to use cli.js for proper command routing
- Update setup-guide.md and README.md to match new flow
- Security defaults applied automatically (editable in config)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 605d217b3192
2026-03-19 18:26:29 +07:00
dylan
3feaf9a92d test: add integration test for full setup flow with mocked prompts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 7e8b554cd9a9
2026-03-19 18:26:29 +07:00
dylan
b03bed24cf feat: integrate interactive setup into main.ts for first-run detection
Entire-Checkpoint: ccd84bff2fb9
2026-03-19 18:26:29 +07:00
dylan
b170820471 feat: add interactive setup steps and runSetup() orchestrator
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: fe76785f3d6b
2026-03-19 18:26:29 +07:00
dylan
4004cc77eb feat: add Telegram and agent validation helpers for setup
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 0483b929fe16
2026-03-19 18:26:29 +07:00
dylan
298e96c786 chore: add @inquirer/prompts dependency to core
Entire-Checkpoint: 555e99a5a7b3
2026-03-19 18:26:29 +07:00
dylan
9af14523dc feat: add exists(), getConfigPath(), writeNew() to ConfigManager
Entire-Checkpoint: 1879a5c8bbe7
2026-03-19 18:26:29 +07:00
dylan
41a92aa685 chore: add vitest test infrastructure to core package
Entire-Checkpoint: 72ef8d5f3dd8
2026-03-19 18:26:28 +07:00
dylan
029266d77f Fix spec review issues in CLI onboarding design
- Use Zod-inferred types instead of non-existent type names
- Add writeNew() and getConfigPath() methods to ConfigManager
- Set enabled: true and note topic IDs are auto-created
- Use command -v instead of which for portability
- Match agent detection to actual binary names (claude-agent-acp)
- Clarify allowedUserIds parsing to string[]

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 6af3b249cdc2
2026-03-19 18:26:28 +07:00
dylan
23fb598a87 Add CLI onboarding setup design spec
Interactive first-run wizard that guides users through Telegram, agent,
workspace, and security configuration when no config file exists.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 9eb56d895bc1
2026-03-19 18:26:28 +07:00
liam
46da695cc0 Fix permission button deadlock and improve tool call display
- Fix deadlock: message handler was blocking grammy polling with await,
  preventing callback_query updates from being received. Changed to
  fire-and-forget pattern so polling remains unblocked.
- Fix middleware: callback queries were dropped because ctx.chat was
  undefined; now falls back to ctx.callbackQuery.message.chat.id.
- Fix race condition: set session.pendingPermission before sending
  permission UI to prevent timing issues.
- Fix allowed_updates: force inclusion of callback_query on every
  getUpdates call via API config transformer.
- Improve tool display: pass content from ACP events through to
  formatting, show tool name/kind/content in code blocks instead of
  bare status text. Fix [object Object] by properly extracting nested
  ACP content structures.
- Add bot error handler to prevent unhandled errors from crashing.
- Remove duplicate permission notification (adapter already sends it).
- Handle expired callback queries gracefully with try/catch.
2026-03-19 18:26:28 +07:00
Mr.Peter
ec851411c5
Merge pull request #1 from rex-qa-bot/develop
Fix Telegram adapter and add interactive menu
v0.2.3
2026-03-19 17:41:17 +07:00
0xmrpeter
31f3d5dd56 Update package.json to specify pnpm version 10.5.0 as the package manager. v0.2.1 2026-03-19 17:39:40 +07:00
Leo Agent
d1f8583844 fix(telegram): address PR review feedback
- Replace `as never` with proper type inference via `Parameters<typeof fn>[0]`
- Fix `bot.catch()` to use `err.error` (grammy BotError root cause)
- Clean up orphaned forum topic when session creation fails
- Clarify assistant.ts comment: enqueuePrompt awaits full response,
  system prompt response is intentionally discarded (not a race)
- Switch welcome message from Vietnamese to English for consistency
- Add CLAUDE.md for codebase guidance

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: d6de879eb433
2026-03-19 17:38:38 +07:00
0xmrpeter
d19032d779 Enhance OpenACP setup by adding support for plugin adapters and improving configuration management. Update .gitignore to exclude dist-publish, modify package.json to include versioning and new build scripts, and expand README with installation and plugin instructions. Refactor config schema to support dynamic channel configurations and improve main execution flow for better adapter registration. v0.2.0 2026-03-19 17:29:37 +07:00
Leo Agent
7bc4a660d9 revert(telegram): inline assistant spawn instead of onBotReady
The onBotReady/retry approach caused build issues. Revert to the
simpler inline pattern that is confirmed working.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 103f5e24c518
2026-03-19 17:06:36 +07:00
Leo Agent
01b96e1484 fix(telegram): defer assistant spawn until bot is fully ready
Move spawnAssistant and welcome message into onStart callback so
sendMessage is only called after the bot's polling connection is
established, preventing HttpError network failures on startup.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: da7a404aae60
2026-03-19 16:57:52 +07:00
Leo Agent
93775348de feat(telegram): dynamic welcome message with menu keyboard
Show available agents, default agent, workspace from config in the
welcome message, and attach the inline menu keyboard so users can
take action immediately on startup.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 5440da1e2275
2026-03-19 16:54:39 +07:00
Leo Agent
98df60b1b3 feat(telegram): apply all adapter fixes on clean develop branch
- Use native fetch to fix ETIMEDOUT on Node 20
- Add global bot.catch() error handler to prevent crashes
- Fix menu/permission callbacks using bot.callbackQuery() filter pattern
- Fix race condition: create topic before session so threadId is set
- Add threadId guard in sendMessage to drop early events
- Add inline keyboard menu system with /menu command
- Separate assistant spawn and welcome message error handling
- Suppress assistant system prompt response by deferring event wiring
- Fix ctx.match type handling for callback query context
- Wrap answerCallbackQuery in try-catch for expired callbacks

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: e1b57053426b
2026-03-19 16:50:40 +07:00
0xmrpeter
f81d96892e Initialize OpenACP project with core structure, including package.json, pnpm workspace, and essential configurations. Add .gitignore, README, and TypeScript settings. Implement initial ACP documentation and roadmap. 2026-03-19 15:55:33 +07:00