130 Commits

Author SHA1 Message Date
0xmrpeter
498c4530f7 feat(session): implement session name persistence and skillMsgId handling
- Added `getSessionRecord` method to `SessionManager` for retrieving session data.
- Introduced `skillMsgId` field in `TelegramPlatformData` to persist message IDs across sessions.
- Updated `TelegramAdapter` to restore and persist `skillMsgId` during command handling and cleanup.
- Enhanced session name persistence to ensure it is retained after bot restarts.
- Included verification steps for manual testing of new functionality.
v0.2.30
2026-03-20 21:48:08 +07:00
0xmrpeter
f1b02dc22a feat(telegram): update grammY to v1.41.1 and remove outdated Telegram streaming redesign documents
- Upgraded grammY dependency from v1.30.0 to v1.41.1 in package.json and pnpm-lock.yaml.
- Deleted obsolete Telegram streaming redesign implementation and specification documents as they are no longer relevant.
2026-03-20 20:36:55 +07:00
0xmrpeter
8771a363e1 feat(telegram): wire 429 handler, finalize draft on new prompt, remove streamThrottleMs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 19:58:50 +07:00
0xmrpeter
6e33598063 feat(telegram): rewrite MessageDraft with 5s flush and send queue coalescing
Replace old MessageDraft (sendMessageDraft, ChatType, draftUnsupportedChats,
fallback logic) with a simpler design using only sendMessage + editMessageText.
Flushes buffered text every 5s via TelegramSendQueue with coalescing support.
Update adapter.ts constructor call to match new signature.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 19:53:22 +07:00
0xmrpeter
1383ddf7ab feat(telegram): rewrite TelegramSendQueue with coalescing and 3s interval
Replace simple promise-chain throttler with explicit item array supporting
per-session text coalescing (type/key dedup) and 429 rate-limit drop via
onRateLimited(). Default interval changed from 100ms to 3000ms.

Also add non-null assertions to existing callers for the new T | undefined
return type (callers without coalescing always receive defined values).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 19:47:02 +07:00
0xmrpeter
92491df98e refactor(tests, action-detect): update test cases and regex patterns for English commands
- Updated regex patterns in action-detect.ts to match English command phrases.
- Adjusted inline keyboard text responses to English for consistency in user interaction.
- Ensured that the detection logic accommodates both command patterns and keywords in English.
2026-03-20 18:18:48 +07:00
Mr.Peter
e89d3ad619
Merge pull request #23 from lngdao/feat/tunnel-service
feat(tunnel): viewer link extraction, md preview, port auto-retry
v0.2.28 v0.2.29
2026-03-20 18:01:43 +07:00
lngdao
8d9caad666 feat(tunnel): viewer link extraction, md preview, port auto-retry
Viewer links:
- Pass _meta and rawInput from ACP events to extractFileInfo
- Extract file content from _meta.claudeCode.toolResponse.file
  (where Claude Code stores raw file data)
- Carry forward viewerFilePath in tool state for display

File viewer:
- Markdown preview toggle (marked.js) for .md files
- Fix preview scrollbar — wrapper div for full-width scroll

Display:
- Viewer links show file name (e.g. "View index.html" not "View file")
- Extra line break before viewer links for spacing

Tunnel service:
- Auto-retry next port when configured port is in use (up to 10 attempts)
- Log actual port used if different from configured
2026-03-20 17:59:45 +07:00
0xmrpeter
1051a66f32 feat(agent): implement findPackageRoot function to dynamically locate package.json
- Replaced hardcoded path resolution with findPackageRoot to support various directory structures for agent commands.
- Ensures compatibility with both TypeScript compilation and bundling scenarios.
v0.2.27
2026-03-20 17:54:43 +07:00
Mr.Peter
1828213caa
Merge pull request #22 from rex-qa-bot/develop
feat: forward incomplete commands to assistant for conversational input
v0.2.26
2026-03-20 17:48:22 +07:00
Leo Agent
8ce9c913c5 Merge remote-tracking branch 'upstream/develop' into develop 2026-03-20 17:45:58 +07:00
Leo Agent
834cb4a677 feat(commands): forward incomplete commands to assistant in assistant topic
- /new without full params → assistant asks for missing agent/workspace
- /cancel in assistant topic → assistant confirms which session to cancel
- Only applies to assistant topic, session topics unchanged

Entire-Checkpoint: 1424524a9044
2026-03-20 17:42:05 +07:00
0xmrpeter
41289a83ca Merge branch 'develop' of github.com-peter:Open-ACP/OpenACP into develop v0.2.25 2026-03-20 17:40:34 +07:00
0xmrpeter
54b1e018ed fix: resolve agent command from package's own node_modules for global installs
When installed globally, claude-agent-acp binary lives in @openacp/cli's
own node_modules, not in cwd. Search both locations.
2026-03-20 17:40:01 +07:00
0xmrpeter
bf67de2c35 Merge branch 'develop' of github.com:Open-ACP/OpenACP into develop v0.2.24 2026-03-20 17:22:12 +07:00
0xmrpeter
8a3ad9b970 docs: add telegram streaming redesign spec and plan
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 17:18:45 +07:00
0xmrpeter
a9bfc03590 fix: update repository URL in build-publish script 2026-03-20 17:15:02 +07:00
0xmrpeter
36aea72534 feat(telegram): integrate send queue for all non-streaming API calls
Wrap tool_call, tool_update, plan, usage, session_end, error,
notification, sendSkillCommands, and sendPermissionRequest through
TelegramSendQueue. Pass streamThrottleMs and sendQueue to MessageDraft.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 17:13:29 +07:00
Mr.Peter
0d43630cff
Merge pull request #19 from dylan-112/develop
Feat: Update cli for full handling function
2026-03-20 17:11:39 +07:00
0xmrpeter
9c698dfbfc feat(telegram): rewrite MessageDraft to use sendMessageDraft with fallback
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-20 17:10:23 +07:00
dylan
6bc887f3fd feat(config-editor): add tunnel configuration UI
Support configuring tunnel provider (cloudflare, ngrok, bore, tailscale),
port, auth, and provider-specific options via openacp config.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: ab23c769533a
2026-03-20 17:09:03 +07:00
Mr.Peter
0c3a83b9fe
Merge pull request #20 from Zysd836/develop
fix: improve error logging and message formatting in session creation
2026-03-20 17:04:57 +07:00
0xmrpeter
2f4bc52cc3 feat(telegram): add streamThrottleMs config option
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 17:02:21 +07:00
0xmrpeter
927c5c8d28 feat(telegram): add TelegramSendQueue for rate limit protection 2026-03-20 17:01:38 +07:00
0xmrpeter
c4da1f0cea Merge branch 'develop' of github.com-peter:Open-ACP/OpenACP into develop 2026-03-20 17:00:42 +07:00
hoangnv
8a99e551fb fix: improve error logging and message formatting in session creation 2026-03-20 17:00:18 +07:00
0xmrpeter
37a08b821f Telegram streaming 2026-03-20 16:58:54 +07:00
Mr.Peter
9a79b1b59a
Merge pull request #17 from rex-qa-bot/develop
feat: assistant action detection with inline confirm buttons
2026-03-20 16:58:14 +07:00
Mr.Peter
a41ef49610
Merge pull request #18 from lngdao/feat/tunnel-service
feat(tunnel): auto-install cloudflared binary if not present
2026-03-20 16:57:47 +07:00
dylan
daa1385206 merge: sync upstream/develop into develop
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 16:57:31 +07:00
dylan
84b7890623 fix(api): wire API sessions to Telegram adapter and fix warmup status
- API sessions now create Telegram topics and wire events (like /new command)
- Fix warmup() not setting status to 'active' after completion
- Auto-approve permissions for headless sessions (no adapter fallback)
- Support positional workspace arg: openacp runtime new [agent] [workspace]
- Add auto-update check, bot admin validation, and improved autostart

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 7c2ecfa24084
2026-03-20 16:53:05 +07:00
lngdao
1eb74cf899 feat(setup): pre-download cloudflared during onboarding wizard 2026-03-20 16:42:48 +07:00
lngdao
2832e351d7 feat(tunnel): auto-install cloudflared binary if not present 2026-03-20 16:34:12 +07:00
dylan
4b2bba9205 fix(api): warmup API sessions and include workspace in responses
- Call session.warmup() after API session creation so sessions progress
  from 'initializing' to 'active'
- Include workspace path in session creation and list responses
- Show workspace in CLI runtime new output

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 2500863c4b70
2026-03-20 16:23:57 +07:00
0xmrpeter
e490d7b1fe chore: remove outdated grammy patch references from pnpm-lock.yaml v0.2.23 2026-03-20 16:18:22 +07:00
0xmrpeter
7f0c386071 Fix node 24 2026-03-20 16:17:48 +07:00
0xmrpeter
6b5fd7a4b1 Fix node 24 build production 2026-03-20 16:16:53 +07:00
0xmrpeter
7496aadfcc chore: update grammy patch hash in pnpm-lock.yaml v0.2.22 2026-03-20 16:09:53 +07:00
Mr.Peter
4a085055e9
Merge pull request #16 from lngdao/feat/tunnel-service
fix(setup): enable tunnel by default in setup wizard
v0.2.21
2026-03-20 16:04:51 +07:00
Leo Agent
831105bece docs: add assistant action detection spec and implementation plan
Entire-Checkpoint: b76f7ff5852f
2026-03-20 16:04:50 +07:00
0xmrpeter
839c638300 Merge branch 'develop' of github.com-peter:Open-ACP/OpenACP into develop v0.2.20 2026-03-20 16:02:13 +07:00
0xmrpeter
d42de77a11 Fixbug node 24 2026-03-20 16:01:37 +07:00
lngdao
3fae34b90e fix(setup): enable tunnel by default in setup wizard 2026-03-20 15:59:40 +07:00
dylan
2f164e08de feat(exports): add ApiServer export
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 359d05b0260a
2026-03-20 15:59:29 +07:00
dylan
6a51e69cdd feat(config-editor): add API port configuration
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 32f9c8606d30
2026-03-20 15:58:34 +07:00
dylan
ffb9f23691 feat(main): integrate API server into daemon lifecycle
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 9569dae83511
2026-03-20 15:58:15 +07:00
Leo Agent
14cad86629 fix: pass keyboard to finalize() to avoid 429 rate limit
- MessageDraft.finalize() accepts optional InlineKeyboard param
- Keyboard attached to last chunk in single API call
- finalizeDraft() detects action before finalize, passes keyboard directly
- Add finalizeDraft() call before usage event

Entire-Checkpoint: 989dc8ff346a
2026-03-20 15:56:23 +07:00
dylan
a770460e04 feat(cli): add runtime subcommand for session and agent management
Adds api-client module with readApiPort/removeStalePortFile/apiCall utilities,
and a runtime CLI subcommand to interact with a running daemon via HTTP API.
Also fixes setup.ts to include the api config field required by the schema.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 94b35b0575cf
2026-03-20 15:56:20 +07:00
dylan
b359c35339 feat(api): add HTTP API server with session and agent endpoints
Implements ApiServer class with 4 REST endpoints (POST/GET/DELETE /api/sessions, GET /api/agents), port file management at ~/.openacp/api.port, EADDRINUSE graceful degradation, and max concurrent session enforcement.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: b01e13e8cb74
2026-03-20 15:50:50 +07:00
dylan
eda322e115 feat(config): add api section with port and host defaults
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 8d075f40d25a
2026-03-20 15:47:58 +07:00