Commit Graph
13 Commits
Author SHA1 Message Date
670ec4f59b feat(plugins): add LeadCapture (purchase intent → contact → Resend email) (#2919)
New misc plugin langbot-team/LeadCapture 0.1.0 (购买意向留资):

- after each AI reply (NormalMessageResponded) a configured LLM judges
  strong purchase intent against a configurable prompt over the recent
  conversation (monitoring.messages, read-only)
- on strong intent, a fixed contact-request text is appended to that
  reply, once per bot+user
- user messages are then checked for contact details (patterns for CN
  mobile/landline, email, WeChat; LLM extraction as fallback)
- on capture, the full conversation is emailed via Resend (configurable
  API key, sender, recipients) with a .txt transcript attachment; failed
  sends are retried on later replies, up to 3 attempts; an optional
  thank-you is appended to the next reply
- every failure is logged and never breaks the conversation

Misc plugin CI now uses any plugin's own requirements-dev.txt.

Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: multica-agent <[email protected]>
2026-11-06 18:18:23 +08:00
4ddb350a9f feat(plugins): generalize OASlackBridge into HandoffBridge (any platform → any platform) (#2917)
* feat(plugins): generalize OASlackBridge into HandoffBridge

Rename langbot-team/OASlackBridge to langbot-team/HandoffBridge (人工客服
转接 / Human Handoff Bridge) 0.1.0 and make it platform-neutral:

- customer side: any bot (source_bot); staff side: any bot whose
  send_message returns message_id and whose inbound replies carry a Quote
  (Slack, Lark, QQ OneBot v11), posting to a group/channel or a private chat
- staff can reply to (quote) the request or any forwarded message; every
  forwarded message is mapped and all mappings are removed on close
- Slack escaping/decoding only when the staff bot is Slack (bot.read)
- the WeChat 48-hour rule becomes reply_window_hours (0 = no limit)
- components renamed to handoff (EventListener) and staff_reply (Runner)

READMEs rewritten for users, including how to find group IDs on each
platform and how to migrate from OASlackBridge. Misc plugin CI now uses
any plugin's own requirements-dev.txt.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-authored-by: multica-agent <[email protected]>

* feat(HandoffBridge): platform-neutral handoff between any customer and staff bots

Content changes for the rename in the previous commit: generic config
(source_bot, staff_bot, staff_target_type/id, reply_window_hours),
per-message reply references, Slack formatting only for Slack staff bots,
user-facing READMEs, catalog/index/CI updates and tests for non-Slack and
private-chat staff targets.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-authored-by: multica-agent <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: multica-agent <[email protected]>
2026-11-06 18:00:23 +08:00
63ac89a5f1 feat(OASlackBridge): post user details in the takeover thread (#2914)
After the Slack root message, reply in its thread with the user's full
OpenID, session ID, Official Account bot, message count, first contact
time and the most recent user/AI messages (history_messages, default 10,
max 50). Data comes from the read-only monitoring.messages Workspace
operation, now declared; without the grant the details fall back to the
basic fields with a hint. Never blocks the takeover. Toggle with
send_user_details. Bump to 0.4.0.

Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: multica-agent <[email protected]>
2026-11-06 17:34:26 +08:00
RockChinQandmultica-agent e18195bc7c fix(plugins): name the installation binding instead of re-creating an invocation (#2915)
ai-source-v2 finding F-01 for RockChinQ/GitHubKit 0.2.3: the background poller
wrapped its whole lifetime in bind_invocation(handler, config, binding), so
after the scheduling command ended the loop still ran under a freshly created,
active invocation - tenant config, GitHub token and Host authority retained
outside the SDK's invocation lifetime.

Background Host calls (plugin KV read/write and message pushes) now pass the
immutable installation binding as their explicit action_context. call_action
validates it against the live connection (Workspace, installation, revision and
artifact), so the Host decides whether that installation may still act and
refuses a detached or superseded revision. The poller task starts in an empty
Context and keeps no invocation and no config snapshot; GC-visible token,
interval and language settings are re-read when the poller is (re)created.

Co-authored-by: multica-agent <[email protected]>
2026-11-06 17:19:20 +08:00
RockChinQandmultica-agent f66adde797 fix(plugins): deliver scheduled reminders with an explicit installation binding (#2912)
ai-source-v2 finding F1 for langbot-team/ScheNotify 0.2.7: the detached
scheduler wrapped its whole lifetime in bind_invocation, so a reminder fired
after the scheduling call ended still ran under a freshly created, active
invocation - authority re-established outside the SDK's invocation lifetime.

Each delivery now passes the immutable installation binding as the explicit
action_context of the Host action. call_action resolves and validates that
context against the connection binding (Workspace, installation, revision and
artifact), so the Host - not the plugin - decides whether this installation may
still act, a superseded revision or detached installation is refused, and the
loop needs neither an invocation nor a configuration snapshot. The manifest and
permissions are unchanged: delivery is still the bot.message.send capability.

Co-authored-by: multica-agent <[email protected]>
2026-11-06 16:53:59 +08:00
a814616204 feat(OASlackBridge): notify the Official Account user when takeover starts and ends (#2913)
* feat(OASlackBridge): notify the Official Account user when takeover starts and ends

Add start_notice / end_notice config (default Chinese texts, empty
disables). The start notice is sent after the Slack root message; the end
notice after !close or an observed expiration, before the AI reply. No
end notice past the 48-hour window or when the expired user's message
starts a new takeover. A failed notice never undoes the takeover change
and is reported in the Slack thread with the readable errcode.

Bump to 0.3.0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-authored-by: multica-agent <[email protected]>

* docs(OASlackBridge): rewrite README for end users

Step-by-step setup (Official Account auto mode, Slack app scopes/events,
finding the channel ID, permissions, processor subscription), staff usage,
troubleshooting and limits, in en and zh_Hans.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-authored-by: multica-agent <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: multica-agent <[email protected]>
2026-11-06 16:35:29 +08:00
RockChinQandmultica-agent ba08a6d082 fix(plugins): refuse control characters before building a request target (#2910)
ai-source-v2 finding F1 for langbot-team/URLSummary 0.1.10: the URL extraction
pattern keeps control characters (a DEL survives the trailing punctuation
strip), so http.client raised InvalidURL quoting the whole relative request
target — query string included. The redaction boundaries only matched absolute
URLs, so a signed query reached the shared log verbatim.

Refuse control characters in validate_url before a request target exists,
skip such URLs during detection, and log only an exception class instead of
raw exception text (and frames only, not traceback.format_exc() tail).

Co-authored-by: multica-agent <[email protected]>
2026-11-06 15:34:14 +08:00
RockChinQandmultica-agent 12f7b315f5 fix(plugins): send the QWeather API key as a request header (#2907)
The API key travelled as a `key` query parameter. httpx logs
`HTTP Request: GET <full url>` at INFO level, so a successful request wrote
the installation's credential into the shared plugin runtime log (ai-source-v2
finding F-01 for langbot-team/QWeather 0.1.7). QWeather supports API KEY
authentication through the `X-QW-Api-Key` header, so pass the key there and
keep it out of the URL, and stop logging whole provider payloads at debug
level.

Co-authored-by: multica-agent <[email protected]>
2026-11-06 15:20:52 +08:00
f78a5176d5 chore(plugins): bump versions of plugins changed since their Marketplace release (LANG-323) (#2899)
Every listed version still carries the old langbot-plugins repository link,
and many also have unpublished source changes. Bump the patch version so
each can be republished from the LangBot repository. SDK requirements stay
as ranges.

Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: multica-agent <[email protected]>
2026-11-06 11:57:09 +08:00
afc426826d feat(plugins): add timezone config to ScheNotify for all tools (LANG-319) (#2894)
* feat(plugins): add timezone config to ScheNotify for all tools (LANG-319)

Add a `timezone` plugin config (IANA name, UTC, or an offset such as
UTC+8; empty keeps the server's local timezone). get_current_time_str
reports the time in it, schedule_notify interprets time_str in it, and
!sche / !dsche display reminder times in it. Reminders now store aware
instants, so the detached scheduler compares against UTC without reading
installation config. Bump to 0.2.7 and add tzdata.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-authored-by: multica-agent <[email protected]>

* fix(plugins): deliver ScheNotify reminders under audit-correlating SDKs (LANG-319)

The scheduler task was created with a copy of the scheduling invocation's
context, which carries the SDK's per-action audit correlation. SDKs that
close that correlation when the action returns (langbot-plugin 0.7.21,
pinned by Core) then rejected every delivery with "Plugin audit
invocation has ended", so no reminder was ever sent. Start the loop from
an empty context; it already re-enters the captured invocation.

Found during live acceptance; adds a regression test that relays the
audit correlation like the real handler.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-authored-by: multica-agent <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: multica-agent <[email protected]>
2026-11-05 23:54:13 +08:00
RockChinQandmultica-agent 045a7ccd8e LANG-313: register OASlackBridge Slack reply processor (#2887)
* feat(plugins): register OASlackBridge Slack reply processor

Co-authored-by: multica-agent <[email protected]>

* fix(plugins): keep pipeline open on bridge permission denial

Co-authored-by: multica-agent <[email protected]>

---------

Co-authored-by: multica-agent <[email protected]>
2026-11-05 19:48:19 +08:00
RockChinQandmultica-agent e2645a28c2 LANG-296: add Official Account–Slack support bridge (#2872)
* feat(plugins): add Official Account Slack bridge

Co-authored-by: multica-agent <[email protected]>

* fix(OASlackBridge): decode Slack replies before forwarding

Co-authored-by: multica-agent <[email protected]>

---------

Co-authored-by: multica-agent <[email protected]>
2026-11-04 19:21:34 +08:00
RockChinQandmultica-agent 3a77306c3c feat(plugins): consolidate official plugins with independent releases (LANG-180) (#2797)
Co-authored-by: multica-agent <[email protected]>
2026-10-28 17:32:24 +08:00