Commit Graph

16 Commits

Author SHA1 Message Date
John Lin
ff7469c456
chore(ringcentral): update version to 2026.1.28 and enhance package metadata 2026-01-28 23:11:40 +08:00
John Lin
a494d9403a
refactor(ringcentral): rename clawdbot to moltbot
- Update package name to @moltbot/ringcentral
- Update all imports from clawdbot/plugin-sdk to moltbot/plugin-sdk
- Update ClawdbotConfig to MoltbotConfig
- Update ClawdbotPluginApi to MoltbotPluginApi
- Update README and config paths
- Add moltbot/plugin-sdk alias to vitest.config.ts

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-28 23:11:40 +08:00
John Lin
ab952fd8cd
test(ringcentral): add unit tests for targets, accounts, and monitor
- targets.test.ts: tests for target normalization and parsing
- accounts.test.ts: tests for credential resolution and account management
- monitor.test.ts: tests for sender allowlist matching

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-28 23:11:40 +08:00
John Lin
0b1aebe80f
feat(ringcentral): add markdown conversion for RingCentral Mini-Markdown
RingCentral uses a different markdown format where _text_ means underline,
not italic. This adds automatic conversion:
- _italic_ -> *italic* (preserve italic intent)
- __bold__ -> **bold**
- Remove unsupported: ~~strikethrough~~, `code`, ```code blocks```
- # Heading -> **Heading** (bold)
- Preserve URLs in links from underscore conversion

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-28 23:11:39 +08:00
John Lin
dba1763c81
refactor(ringcentral): remove obsolete webhook-related code
Removed webhook configuration and API methods since WebSocket is now used:
- Remove webhookPath and webhookVerificationToken from config/types
- Remove createRingCentralWebhookSubscription/deleteRingCentralWebhookSubscription APIs
- Remove resolveRingCentralWebhookPath helper
- Update blurb to say 'WebSocket' instead of 'webhooks'
- Fix dmPolicy default to 'allowlist' in buildAccountSnapshot

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-28 23:11:39 +08:00
John Lin
fac7419ca0
fix(ringcentral): change dmPolicy default to allowlist
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-28 23:11:39 +08:00
John Lin
7e57e324d1
refactor(ringcentral): simplify selfOnly mode, remove allowOtherChats
- selfOnly: true (default) = only respond to JWT user in Personal chat
- selfOnly: false = enable full DM/group policy controls

Removed redundant allowOtherChats option.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-28 23:11:38 +08:00
John Lin
f77aeeb34c
refactor(ringcentral): skip DM policy checks in selfOnly mode
In selfOnly mode, dmPolicy/allowFrom/groupPolicy settings are now
completely ignored since the owner is always allowed. This simplifies
the logic and avoids confusion.

Updated README to clarify which settings apply in selfOnly mode.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-28 23:11:38 +08:00
John Lin
857408d78d
chore(ringcentral): only log WebSocket notifications in verbose mode
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-28 23:11:38 +08:00
John Lin
f71da54d8f
security(ringcentral): remove sensitive data from logs and clean up schema
- Remove message text from log output to prevent leaking sensitive content
- Remove obsolete credentialsFile field from config schema
- Add missing selfOnly and allowOtherChats fields to schema

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-28 23:11:38 +08:00
John Lin
f8343a4100
docs(ringcentral): add README with installation and configuration guide
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-28 23:11:37 +08:00
John Lin
1d91d0ab73
feat(ringcentral): restrict selfOnly mode to Personal chat by default
In selfOnly mode, now only allows messages from 'Personal' chat
(conversation with yourself). Set allowOtherChats: true to enable
DMs and group chats.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-28 23:11:37 +08:00
John Lin
1ceaa31fb3
refactor(ringcentral): remove file-based credential support
Credentials now only loaded from:
1. Config file (~/.clawdbot/clawdbot.json)
2. Environment variables

This matches Telegram's approach for consistency.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-28 23:11:37 +08:00
John Lin
f9d6ec7106
fix(ringcentral): prevent infinite loop from bot's own messages
- Track sent message IDs to skip processing bot's replies
- Fix chat type detection (Personal vs PersonalChat vs Direct)
- Skip typing/thinking indicator messages by pattern
- Allow owner in selfOnly mode to bypass DM policy check
- Change typing indicator to ' _Clawdbot is thinking..._'

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-28 23:11:37 +08:00
John Lin
44b27d1ba0
feat(ringcentral): add selfOnly mode for JWT authentication
In JWT mode, bot uses the JWT user's identity. By default (selfOnly=true),
only messages from the JWT user are processed, creating a self-conversation
with the AI assistant.

Set selfOnly=false to allow other users (requires allowFrom configuration).

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-28 23:11:36 +08:00
John Lin
352227f435
feat: add RingCentral Team Messaging channel extension
- Add RingCentral channel plugin with WebSocket subscription support
- Implement JWT authentication via @ringcentral/sdk
- Support DM and group messaging with mention gating
- Add credential file support (rc-credentials.json)
- Implement full ChannelPlugin interface (pairing, security, messaging, etc.)
- Add .gitignore entries for credential files

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-01-28 23:11:36 +08:00