An LLM call that returns neither text nor tool calls was recorded as a
success and the run completed with an empty reply, so users got nothing
and no error (seen with gemini-3.8-flash on LangBot Models, whose gateway
swallowed an upstream schema error into an empty 200 stream).
LocalAgent 0.2.12: when the first answer of a run is empty, fall back to
the next configured model; with no fallback left, fail the run with
runner.empty_response (retryable) so the pipeline error handling replies.
An empty normal stop after tools ran stays a valid completion.
Core: a successful LLM call with no output or zero reported usage keeps
status success but records details.warnings and a visible message on the
monitoring LLM call, and logs a warning.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
Driven by a customer's lead-scoring rubric (A/B/C keyword tiers, bonuses,
deductions, compliance-risk words, lead fields):
- the judge returns score/signals/risk/risk_reason/reason; levels come
from configurable high_score (60) and ask_score (30), so medium and
high intent are asked once; 0.1/0.2-style strong_intent answers still
map to a score
- compliance risk (configurable risk_prompt) marks the lead "risk": no
contact request, no sales email, listed for review
- once contact details arrive, configurable lead_fields are extracted
from the whole conversation and shown at the top of the email (subject
now carries level and score) and on the page
- Page: score/level column, risk total and filter, lead fields and
per-judgment signals in the detail view
- bump to 0.3.0
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
Record every purchase-intent judgment per conversation (result, reason,
the user's message, an AI reply excerpt) plus the contact request,
captured contact, email attempts and errors as a per-user timeline
(latest 100 events). Users who were judged but not asked now get an
"idle" row; asking still happens at most once.
Add a read-only Page (留资判断记录 / Lead judgments): totals, a filterable
and searchable conversation list, and a detail panel with the timeline
and the 30 most recent messages. i18n en_US / zh_Hans. Bump to 0.2.0.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
Strict chat templates served by vLLM/SGLang (Qwen3.5/3.6, Mistral, Gemma)
reject a system message that is not first, and some APIs (DeepSeek reasoner)
reject successive user/assistant messages. LocalAgent sent the knowledge-base
context as a mid-conversation system message and the event-data message as a
second user turn, so any KB-backed run on Qwen3.5+ via vLLM/SGLang failed with
"Invalid request parameters".
- Retrieved KB context is untrusted data and now uses the user role.
- Every model call normalizes roles at the boundary: all system messages fold
into one leading system message and consecutive user (or tool-call-free
assistant) messages merge. Tool call/result turns are never merged.
- Bump LocalAgent to 0.2.11.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
httpx logs every request as "HTTP Request: <METHOD> <full URL>" at INFO, and the
shared plugin runtime logs at INFO. Two Dify requests carry a credential in the URL:
the human-input form token (a path segment that submits the form on its own via
Dify's web API) and input file URLs that may be signed.
A filter on the httpx logger now rewrites the target of exactly those requests to a
redacted form while they are being opened; it is inert for everything else, so
co-located plugins' logs and the logger level are unchanged.
Also correct SHARED_RUNTIME.md/README: human-input continuations live only in the
active run and are not stored. Bump to 0.2.10.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* fix(dify-agent): ask multi-field human input forms one field at a time
A Dify human-input node with an input plus several actions (comment +
approve/reject) or several inputs becomes a multi-field interaction.
Every platform except DingTalk renders at most one field, and text-only
platforms never split a form, so the run failed with 'Interaction is not
supported'. When the whole form is unsupported, ask each field and then
the action as separate interactions and submit them to Dify together.
Release 0.2.9.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* chore(plugins): refresh catalog for DifyAgent 0.2.9
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* refactor(agent): derive Runner input media from one ordered list
Every Runner input is now rendered once from the platform message chain
by agent/runner/input_media.py, replacing the contents/message-chain
cross matching, the descriptor merge from #2926 and the Box ref
reconciliation:
- contents place [attachment att-N: <type> <name>] at each media
position; quoted messages are wrapped in [quoted message from X] ...
[/quoted message] and their media marked source=quote.
- attachments describe the same media one-to-one as metadata only and
never carry inline content. Media added by user_message_alter stay
model-only.
- read_input_attachment(ref) serves bytes on demand (ExecutionAPI run
scope, available_apis.input_attachments): base64, http(s) URL,
adapter path, then adapter get_file_url for ID-only media; 10 MiB per
attachment, 50 MiB per run, no caching or payload logging.
- Event envelopes carry inline payloads Host-internally until
prepare_input_files registers them by ref; steering items drop refs
that would address the claimed run's own input.
- The media cache defaults to a 1024 MB cap (oldest removed first).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* docs(plugin): document input attachment refs and read_input_attachment
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* feat(plugins): read input attachments by ref in official Runners
Dify, Coze, Tbox and ACP read attachment bytes with
ctx.read_input_attachment when the SDK and Host support it, upload each
media once under an att-N prefixed name, and skip unreadable ones;
older SDKs or Hosts keep the previous inline/URL/contents logic.
DeerFlow takes images from contents only on current Hosts, n8n forwards
attachment metadata, and LocalAgent exposes refs to the model.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* chore(deps): pin langbot-plugin 0.7.23 from PyPI
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* docs(plugin): note the SDK version for read_input_attachment
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* fix(plugin): accept the SDK send_message timeout and route read_input_attachment
SDK 0.7.23 sends a client-side send_message timeout that the Runtime
strips; an older Runtime forwards it unchanged, so the Host now accepts
and ignores it instead of rejecting the call. The routing integration
test covers the new read_input_attachment operation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
QQ Official accepts 5 passive replies per user message, so an uncapped
"messages" progress run could use them all and lose the answer. Add
progress-max-messages (1-20, default 4) bounding progress lines, including
the closing line, in messages mode; stream mode is one message and is not
capped. Document that progress reaches non-streaming Pipeline platforms
only with langbot-app/LangBot#2954.
Refs LANG-325
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* 修复 ACPAgentRunner 会话时间显示与首帧等待反馈
两处用户可见问题:
1. `!list` 直接把 ACP 返回的 UTC ISO 时间切片显示,导致时间比本地
时区早 8 小时。新增 `_format_session_time()`,解析后按部署时区
格式化,非 ISO 输入仍回退到原有截断逻辑。
插件工作进程使用裁剪过的环境,通常不继承 `TZ`,此时
`datetime.astimezone()` 会回退到 UTC。因此新增 `_display_timezone()`,
优先读取 `TZ`,缺失时使用部署时区 `Asia/Shanghai`。
2. daemon 路径下,从收到消息到 agent 产出第一段文本之间没有任何
RunnerResult,平台不会创建流式卡片,用户在这段等待期内看不到任何
反馈(实测生成 PDF 时静默约 2 分钟)。在 `_run_daemon()` 入口先产
出一个 `⏳` 占位 chunk,让平台立即建立流式卡片;后续 delta 的
`all_content` 快照会覆盖该占位,最终回答不受影响。
插件版本提升至 0.1.20。
* fix(plugins): 同步 ACPAgentRunner 0.1.20 目录索引
* fix(acp-agent-runner): use host time zone and defer first-frame placeholder
- Drop the hardcoded Asia/Shanghai fallback: honour TZ, otherwise use the
host local zone, and label the displayed time with its zone abbreviation.
- Emit the streaming placeholder only after the daemon is reachable so an
offline daemon does not leave an orphaned placeholder card.
- Add tests for session time formatting and the placeholder behaviour.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
---------
Co-authored-by: Nikarhub <Nikarhub@users.noreply.github.com>
Co-authored-by: RockChinQ <rockchinq@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
Storage: MAX_SESSION_STORAGE_BYTES was only ever checked and raised; nothing
evicted by bytes. A 300-message cap cannot bound a session whose images are
stored inline as data: URLs, so two large images hit the 8 MiB ceiling and the
reply failed with "history has not been truncated". Evict the oldest messages
until the payload fits and keep the newest ones.
Console: the 5s poll only reloaded the session list and takeover status, never
the conversation, so replies from the other side never appeared without
switching sessions. Add a silent refresh that keeps the input enabled, preserves
scroll unless already at the bottom, and yields to scroll-up pagination.
Source was 0.1.7 while the shipped artifact is 0.2.7, so this also carries the
intermediate work; version 0.2.8.
Co-authored-by: multica-agent <github@multica.ai>
Review asked for copy to be synchronous instead of falling back to a `/item`
round trip: `/list` already returned the whole item and it is in `cache`, so
the URL is in hand. Removing the awaited hop matters beyond latency — the
`execCommand` tier needs the click's user-gesture window, and an await can
spend it before the write happens.
An empty URL still toasts instead of silently "succeeding", and the copy
handler no longer awaits anything. Verified in a real blob: iframe with the
real sandbox: the click issues no `/item` request at all, the clipboard ends up
byte-identical to the expected absolute URL, and it still does with
`navigator.clipboard` deleted.
Co-authored-by: multica-agent <github@multica.ai>
Copy was broken twice over. `langbot.api()` already resolves the unwrapped
payload (PageResponse.ok -> HTTP data -> resp.data.data -> the SDK's
resolve(data.data)), so `item.data.url` was always `undefined` and the page
copied an empty string. `writeText('')` resolves without throwing, so it also
never reached the fallback: the UI said "copied" while the clipboard stayed
empty.
The iframe is worse than assumed. It is a `blob:` document under
`sandbox="allow-scripts allow-forms"`, so its origin is opaque: `location.origin`
is "null", relative asset URLs do not load, and `navigator.clipboard` rejects
with NotAllowedError. `/list` returns relative URLs while `public_base_url` is
empty, so even a correct value would have pasted as an unusable path. URLs are
now made absolute against `location.ancestorOrigins[0]` before either the
clipboard or an `<img src>`, and copy reads `item.url` from the list cache
instead of making a redundant `/item` round trip.
Every other call had the same layer mistake: `res.error` is never set on a
resolved value, because failures reject the promise, so no failure ever
surfaced. All call sites now catch, and an empty URL toasts an error rather
than claiming success.
Verified in a real blob: iframe with the real sandbox: relative url -> absolute
-> clipboard read back byte for byte, and the same URL loads as the preview
(0 `/image` calls). Also passes with `navigator.clipboard` removed, proving the
execCommand tier is what carries it.
The host is untouched now, so this is plugin-only; the `allow-modals` flip is
dropped and the clear confirmation stays in-page.
Co-authored-by: multica-agent <github@multica.ai>
* feat(multica-agent): progress output and agent selection by name (0.2.0)
- progress-mode (messages/stream/off) and progress-interval report the
Multica task lifecycle (submitted, started, still running) while waiting;
failures and timeouts send a closing line first. off keeps 0.1.x output.
- agent accepts a name or UUID, resolved once per conversation; ambiguous
names list numbered candidates. agent-id stays as a deprecated UUID field.
- /multica agents|find <keyword> filter by name; /multica use <number>
picks from the latest numbered list.
- capabilities.streaming: true; manifest 0.2.0.
Refs LANG-325
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* feat(multica-agent): plugin-level language setting for chat output
- manifest spec.config.language (8 LangBot locales, default en_US, no auto).
- MulticaAgentPlugin.get_language() reads the invocation config; the runner
falls back to get_plugin_config() when not hosted by the plugin class.
- pkg/i18n.get_text: unknown locale or missing key falls back to en_US, then
to the key itself. Progress, commands, help, runner errors and config
errors are localized; agent answers and Multica error text are not.
- /multica find without a keyword shows usage; help shows the language.
Version stays 0.2.0 (unreleased). Refs LANG-325
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
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 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* 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 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* 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 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
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 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* 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 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* 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 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
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 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* fix(provider): keep models resolvable during reloads and report quota errors clearly
Cloud catalog syncs triggered by any directory change called
load_models_from_db(), which emptied every tenant's runtime model cache
before reloading Workspaces one by one. Messages arriving in that window
could not resolve their configured model, and LocalAgent failed with
"No authorized model for local-agent".
- Stage the reload in a separate manager and swap it in atomically;
adopt unchanged providers instead of retiring and rebuilding them.
- Isolate per-Workspace load failures so one tenant cannot leave later
Workspaces unloaded.
- Lazily load a persisted model on a cache miss (another replica,
failed startup load, keys invalidated by a racing write).
- Classify New API quota errors (insufficient_user_quota,
pre_consume_token_quota_failed, HTTP 402, quota wording) as
quota_exceeded with a clear message in the Workspace language
(English by default) instead of "Permission denied"/"API error".
- Read upstream codes from the response body and exception chain,
and append safe machine codes to otherwise generic API errors.
- Report a missing API key explicitly instead of a raw OpenAIError.
- Keep HTTP status and body in the leased LiteLLM HTTP handler, which
previously turned every HTTP error into "Connection failed".
Refs LANG-318
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* fix(local-agent): accept bare model UUIDs and explain missing models
- parse_model_config accepts the bare model UUID shape the Host
selector already accepts, instead of treating it as "no model".
- Replace "No authorized model for local-agent" with an actionable
message pointing at the pipeline's model selection.
- Bump LocalAgent to 0.2.8.
Refs LANG-318
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* 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 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
* 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 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
New Runner plugin plugins/Runner/multica-agent (plugin:langbot-team/MulticaAgent/default).
Each LangBot conversation maps to one Multica chat session; messages are posted
via the Multica chat API (PAT + X-Workspace-ID), and the runner polls until the
assistant reply for that task lands, then returns it.
In-chat commands (/multica agents|use|new) list agents and switch the agent per
conversation. Deleted sessions are recreated once; failed/cancelled/timed-out
agent tasks surface as run.failed with stable multica.* codes.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
Unified Workspace and execution APIs for LangBot (#2639).
- Versioned Application API shared by HTTP, MCP, the Workspace assistant
and plugins, with one authorization and error contract.
- Execution API facade for every plugin and Runner action.
- Plugin installation permissions: manifest declarations, member
confirmation, capability ceilings, compatibility mode, revocation and
audit. Typed Workspace API in the plugin SDK.
- Processor tool configuration: workspace operations, event and bot tools,
default tool sets for new Agents and Pipelines, and sensitive-tool
warnings.
- Plugin permission picker in the WebUI; LocalAgent declares every
plugin-callable permission.
- Documentation for plugin permissions and the Workspace API in English,
Chinese and Japanese.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LocalAgent declared langbot-plugin>=0.7.18, and the published 0.2.2 artifact
pinned langbot-plugin==0.7.16. The plugin runtime rejects any SDK requirement
its own SDK version does not satisfy, so both directions were dead ends: 4.11.4
(SDK 0.7.19) could not install the published build, and a 0.7.18 floor would
have locked out 4.11.2/4.11.3 (SDK 0.7.16) from the next one.
Use a bounded range from the 4.11.2 baseline instead, matching every other
official Runner and KnowledgeEngine plugin. Verified on SDK 0.7.16 and 0.7.19:
327 tests pass on both, including the runtime dependency admission contract.
Co-authored-by: multica-agent <github@multica.ai>