Commit Graph
38 Commits
Author SHA1 Message Date
huanghuoguoguo 278667d690 feat(artifact): persist run output files behind authorized handles 2026-11-17 11:10:54 +08:00
huanghuoguoguo d83294ec08 test(artifact): cover released SDK and refresh contract fixtures 2026-11-16 21:39:23 +08:00
huanghuoguoguo 33dd118872 feat(artifact): add run-scoped on-demand attachment reads 2026-11-16 21:24:36 +08:00
huanghuoguoguo 35d5e8c05d chore(plugins): sync Runner versions with Marketplace releases (#3013) 2026-11-12 20:23:44 +08:00
huanghuoguoguoandRockChinQ d9806dc5e1 feat(agent-runner): complete lifecycle contract and recovery (#2881)
* feat(agent-runner): close runner contract gaps

* fix(dify-agent): cap configurable stream budget

* feat(agent-runner): add retry resume and cancel ack

* feat(agent-runner): persist steering delivery state

* fix(agent-runner): requeue unacknowledged steering safely

* style(dify-agent): order stream budget imports

* style(agent-runner): format durable delivery changes

* style(dify-agent): format stream budget helpers

* fix(agent-runner): preserve direct ledger event writes

* fix(agent-runner): make steering durable and dispatch recovery attempts

* test(runner): use real event envelope in PostgreSQL lifecycle contract

* feat(runner): add resilient lifecycle protocol

* test(runner): cover steering ack and finalize metadata

* feat(runner): expose retry resume and cancel ack

* style(runtime): format plugin action handler

* fix(runner): preserve delivery compatibility and recovery boundaries

* style(runner): format rebased lifecycle tests

* fix(runner): route lifecycle actions through execution API

* fix(runner): preserve durable steering and recovery delivery

---------

Co-authored-by: RockChinQ <rockchinq@gmail.com>
2026-11-12 17:28:11 +08:00
9e31f971e5 fix(local-agent): fail runs on empty model answers and flag empty LLM calls (LANG-427) (#3001)
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>
2026-11-12 15:47:19 +08:00
b038555b5a fix(local-agent): send one leading system message and alternating roles to models (LANG-426) (#2997)
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>
2026-11-12 14:56:55 +08:00
huanghuoguoguo cfa905a444 fix(n8n): fail runs on streaming workflow errors (#2994) 2026-11-12 10:13:09 +08:00
0d84c334ba feat(sdk): move the plugin SDK into the monorepo with independent releases (LANG-420) (#2993)
* chore(sdk): import langbot-plugin-sdk v0.7.24 snapshot into sdk/ (LANG-420)

Snapshot of langbot-app/langbot-plugin-sdk at 76443bb8 (tag v0.7.24),
without history. The repository's .github/ workflows are not imported;
they are replaced by sdk-*.yml workflows in the next commit. The root
.gitignore keeps the template .vscode/launch.json.example tracked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>

* feat(sdk): move the plugin SDK into the monorepo with independent releases (LANG-420)

- CI: sdk-tests.yml / sdk-box-docker.yml run the SDK suite from sdk/ in
  its own environment (Python 3.10-3.12); run-tests.yml gains a
  "Core with in-tree SDK" job that overlays sdk/ on Core's venv.
- Releases: sdk-publish.yml publishes langbot-plugin from sdk/vX.Y.Z tag
  pushes and never creates a GitHub Release. Core release workflows now
  only accept v* tags, and scripts/check_sdk_release_pin.py blocks a Core
  PyPI/Docker release whose langbot-plugin pin differs from the released,
  unchanged sdk/.
- Packaging: Core still installs the PyPI pin. Core wheel/sdist, git
  export, Docker context, release ZIP and fnOS package exclude sdk/.
- Generator/tests: generate_plugin_workspace_api.py writes sdk/ directly;
  the SDK's generator drift tests now run instead of skipping.
- Docs: AGENTS/ARCHITECTURE, sdk/ guides (+ RELEASING.md, SOURCE.json),
  agent skills and lbs probes, public docs (zh/en/ja) and dev-docs
  point at sdk/ instead of the sibling langbot-plugin-sdk checkout.

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>
2026-11-11 23:12:53 +08:00
d3435a6a54 fix(dify-agent): keep form tokens and signed URLs out of httpx request logs (LANG-413) (#2988)
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>
2026-11-11 18:52:34 +08:00
a8929bf3ff fix(dify-agent): ask multi-field human input forms one field at a time (#2984)
* 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>
2026-11-11 17:35:23 +08:00
69b7b45682 fix(agent): bound token counting and continue text turns on failure (#2969)
* fix(provider): decouple token counting from reasoning validation

Co-authored-by: multica-agent <github@multica.ai>

* fix(plugins): 修复 EssentialCommands !func 兼容性并清理 HelloPlugin 调试输出 (LANG-391) (#2967)

Co-authored-by: multica-agent <github@multica.ai>

* fix(plugin): wait for runtime recovery before workspace dispatch (#2968)

Co-authored-by: multica-agent <github@multica.ai>

* fix(runner): wait for installed plugins to initialize (LANG-393) (#2971)

Co-authored-by: multica-agent <github@multica.ai>

* fix(persistence): release SQLite writer during image refresh (#2973)

Co-authored-by: multica-agent <github@multica.ai>

* fix(telemetry): report cancellations as cancelled, keep route failure detail, tolerate already-terminal runs (#2974)

- Cancelled ingress / handed-off lanes / event deliveries close as `cancelled`
  instead of `failed` (CancelledError and GeneratorExit).
- Every `runner_failed` event-route record carries the exception type and
  message in `error`, including invalid Agent configuration.
- Closing the stream of a run another writer already finalized no longer
  raises "Cannot transition terminal run"; the ledger status is kept and
  reported, and the Runner's own error propagates.
- Platform API calls that return None without raising are `success`, not
  `unknown`.
- Command lanes name their adapter and no longer claim the Pipeline's
  configured Runner; only a Runner that actually ran is attributed.

LANG-395

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>

* fix(agent): bound token counting and preserve text turns on failure

Co-authored-by: multica-agent <github@multica.ai>

---------

Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 12:31:59 +08:00
RockChinQandmultica-agent 3a56fa65a4 fix(runners): normalize reasoning config and handle completed/workflow outputs in Coze/Dify (LANG-398) (#2972)
Co-authored-by: multica-agent <github@multica.ai>
2026-11-11 12:31:31 +08:00
6a709005a4 fix(acp): 修复文件回复的调用上下文与原始消息定位 (#2937)
* fix(acp): 修复文件回复的调用上下文与原始消息定位

* style(acp): 修正上下文回归测试的 Ruff 格式

* fix(acp): send ACP-shaped MCP descriptors and dispatch daemon MCP calls concurrently

- Serialize MCP servers for ACP through one shared helper so HTTP headers and
  stdio env are always [{name, value}] arrays (local and daemon paths alike);
  OpenCode rejects session/new with -32602 when headers is missing.
- Dispatch daemon mcp.request in its own task inside the owning job's
  Context so a slow tool call no longer blocks pings, run events or other
  jobs on the same daemon socket; cancel in-flight calls on disconnect after
  the daemon ID is released.
- Keep runtime internals out of the public Runner API docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>

---------

Co-authored-by: Junyan Qin (Chin) <rockchinq@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-11-10 12:17:09 +08:00
d79f7f631b refactor(agent): one ordered media list for Runner inputs, attachments read by ref (#2959)
* 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>
2026-11-09 20:40:13 +08:00
2577ea2155 feat(multica-agent): cap progress messages per run (0.2.1) (#2955)
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>
2026-11-09 18:57:58 +08:00
b526fd81c7 修复 ACPAgentRunner 会话时间显示与首帧等待反馈 (#2930)
* 修复 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>
2026-11-09 16:36:35 +08:00
MartinandNikarhub 004af33276 修复 ACPAgentRunner 超长 stdout 帧导致的 daemon 自毁 (#2929)
ACP 使用行分隔的 JSON-RPC,单个帧可能携带较大的工具结果(文件内容、
diff、base64 媒体)。`asyncio.create_subprocess_exec` 未指定 `limit`,
StreamReader 沿用 64 KiB 默认值,`readline()` 遇到超长单行会抛
`LimitOverrunError`。

该异常会让 `_read_stdout` 任务直接崩溃,daemon 随即把读流失败判定为
“远程任务清理未确认”,主动退出并拒绝重连;hub 收到关闭码后永久 fence
该 daemon ID,之后所有请求都报 `daemon ... fenced`,只能重启插件运行时
才能恢复。

本次修改:

- 将 ACP 子进程 stdout 的行上限提升到 32 MiB;
- 即使超过该上限,也把 `LimitOverrunError` 转成单个请求的
  `AcpProtocolError`,不再让 reader 任务异常逃逸、拖垮整个 daemon。

复现验证:200 KB 单行在默认 64 KiB 下抛 `ValueError`,补丁后可正常读取。

Co-authored-by: Nikarhub <Nikarhub@users.noreply.github.com>
2026-11-09 16:08:15 +08:00
20383eccd4 feat(multica-agent): progress output and agent selection by name (0.2.0) (#2903)
* 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>
2026-11-07 00:08:02 +08:00
45fbf367b1 fix(plugins): upload host-deduplicated inline images in Dify/Coze/Tbox runners (#2921)
* fix(plugins): skip host-deduplicated image refs in Dify/Coze/Tbox runners

Signed-off-by: ShryukGrandhi <85529990+ShryukGrandhi@users.noreply.github.com>
Co-authored-by: multica-agent <github@multica.ai>

* fix(plugins): give extensionless Dify uploads a MIME-derived extension

Signed-off-by: ShryukGrandhi <85529990+ShryukGrandhi@users.noreply.github.com>
Co-authored-by: multica-agent <github@multica.ai>

---------

Signed-off-by: ShryukGrandhi <85529990+ShryukGrandhi@users.noreply.github.com>
Co-authored-by: ShryukGrandhi <85529990+ShryukGrandhi@users.noreply.github.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-11-06 19:33:38 +08:00
c00110fd80 fix(dify-agent): make the SSE stream byte budget configurable (#2875)
* fix(dify-agent): make the SSE stream byte budget configurable

The Dify runner hardcoded a 16 MiB budget for the whole SSE stream and
described it as a 'runtime limit', so long agent runs whose tool
observations consume the budget failed with a misleading error and no
way to tune it.

- add a stream-budget-mb runner config (default 16 MiB, kept for
  compatibility) wired through AsyncDifyClient into limited_bytes /
  limited_lines
- report the actual received bytes and the configured limit when the
  budget is exceeded, distinct from the total deadline error

Addresses part 1 of #2851 (configurable budget and observable error).
The image attachment fallback (part 2) is intentionally not touched.

* fix(dify-agent): scale the event cap with the stream budget and name the last event

A single Dify SSE event larger than 1 MiB (one big tool observation or
node output) still failed with "Provider event exceeds the runtime limit",
and raising stream-budget-mb did not help. The per-event cap now stays at
the native 1 MiB for the default budget and grows to 1/16 of a raised one.

Budget errors now name the last SSE event and tool/node seen, carry the
dify.stream_limit_exceeded code and are logged as a warning, so long Agent
runs can be diagnosed from info-level logs (#2851).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>

---------

Co-authored-by: ShaoLOWu <310076244+ShaoLOWu@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>
2026-11-06 19:33:34 +08:00
eab66af7e2 feat(api): let plugins and Agents read the Workspace language (LANG-334) (#2916)
- Document workspace.language.get with exposure 'all' and risk 'read' so
  plugins can declare it and Agents/Pipelines can select it as a workspace
  tool. It requires workspace.view, takes no arguments and reads the
  Workspace only from the trusted context. workspace.language.update stays
  member/API-key only.
- Declare the operation in LocalAgent.
- Document it in zh/en/ja plugin Workspace API references and dev-docs.
- Cover grants, denial, invalid input, the unset default and the processor
  tool path.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-11-06 17:42:33 +08:00
RockChinQandmultica-agent 3ccccff1f7 fix(plugins): create shared asset gateway listeners tenant-free (#2901)
CozeAgent, DifyAgent and N8nAgent built their shared asset gateway listener
and per-connection service tasks inside the registering invocation, so the
listener's accept handle retained the first caller's invocation Context
(configuration plus revocable authority) and later connections inherited it.
Create the listener and connection tasks in an explicit empty Context; an
invocation Context is entered only per validated run token. Applies the same
fix already used by DashScopeAgent and LangflowAgent, with a regression test.

Co-authored-by: multica-agent <github@multica.ai>
2026-11-06 13:39:13 +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 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-11-06 11:57:09 +08:00
1c8cc9a122 fix: keep models resolvable during Cloud reloads and report quota errors clearly (LANG-318) (#2896)
* 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>
2026-11-06 01:24:27 +08:00
ac0622ea3f feat(api): open marketplace search and install to plugins and Agents (#2891)
* feat(api): open marketplace search and install to plugins and Agents

- Add plugin.marketplace.search, a read operation that proxies the configured
  Space plugin search, honours plugin.enable_marketplace and returns only the
  fields needed to install.
- Expose plugin.install.marketplace to plugins and processors as a dangerous
  operation. Plugins and Agents cannot auto-confirm permissions or replace an
  installed plugin; new installations stay disabled until a member confirms.
  GitHub and local installs keep their current exposure.
- Expose task.get so callers can follow installation progress; non-member
  principals receive the public projection, now including
  pending_permission_confirmation.
- Declare the new operations in LocalAgent, document them in zh/en/ja and
  localize the new errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>

* test(api): include marketplace search and task status in processor read sweep

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>
2026-11-05 21:19:30 +08:00
4daa494cb8 feat(plugins): add MulticaAgent runner to chat with Multica agents (LANG-315) (#2889)
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>
2026-11-05 20:10:23 +08:00
huanghuoguoguoandClaude Opus 5.5 97ef5b457d feat(api): provide Workspace and execution API foundations (#2648)
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>
2026-11-05 16:36:22 +08:00
0a962769b9 修复 ACPAgentRunner 存储缺失识别与会话删除参数 (#2849)
* fix(acp-agent-runner): 识别嵌套的存储缺失错误

* fix(acp-agent-runner): 支持按序号删除会话

* fix(acp-agent-runner): guard deletion indices and unwrap storage errors

Co-authored-by: multica-agent <github@multica.ai>

---------

Co-authored-by: Chin Rock <rockchinq@gmail.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-11-04 13:12:15 +08:00
532b8ce204 feat(agent): add cross-platform interactive cards for QQ, WeCom, Feishu and DingTalk (#2787)
* feat(agent): add cross-platform interactive card tool

* fix(agent): create pipelines with selected runner defaults

* fix(agent): enable reliable cross-platform card interactions

* feat(dingtalk): deliver A2UI cards and restore agent replies

* Fix DingTalk A2UI form submissions and agent replies

* Restore LangBot branding on DingTalk A2UI cards

* Use compatible Markdown link in DingTalk A2UI branding

* Place LangBot branding above DingTalk card content

* Stream DingTalk replies without a source message

* Move DingTalk branding into compact card footer

* fix(wecombot): handle native select card callbacks

* fix(wecombot): stream replies after HITL cards

* fix(dingtalk): show submitted HITL choices in cards

* fix(lark): stream replies after HITL submissions

* fix(plugins): refresh LocalAgent source hashes

* fix(dify): merge HITL resume streaming into in-tree plugin

* feat(interactions): resume runner in place after card submission

* fix(interactions): respect live adapter APIs and preserve deadlines

* fix(ci): lock blocking interaction SDK for dependent checks

* test(runner): keep legacy SDK probe importable

* fix(interactions): align adapter manifests and close timed-out streams

* fix(agent): avoid duplicate replies and enable LocalAgent cards

* chore(plugins): sync LocalAgent catalog version

* refactor(agent): unify blocking interaction callbacks and adapters

* chore(deps): pin blocking interaction SDK revision

* test(agent): remove obsolete async fixture mark

* test(interaction): update legacy admission assertions

* fix(qqofficial): keep card callbacks responsive

* fix(runner): keep blocking card interactions alive

* ci(plugins): expect SDK 0.7.20 in Runner workflows

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>

* ci(plugins): test coding Runners against SDK 0.7.20

Claude Code and Codex now call ctx.request_interaction, first released in 0.7.20.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>

* fix(discord): deliver guild interaction cards to the originating channel

Pipeline group conversations are keyed by guild id, so send_interaction
targeted the guild and Discord returned Unknown Channel. Resolve the channel
from the message being answered, edit cards in that channel, and report the
card's conversation on callbacks so the Host scope check matches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>

---------

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>
2026-11-03 21:45:49 +08:00
huanghuoguoguo 8ee321f8c1 test(n8n): exercise latest DefaultRunner in daily regression (#2830)
* fix(n8n): validate runner timeout values

* fix(n8n): validate runner timeout values

* test(n8n): add latest DefaultRunner regression

* test(n8n): add latest DefaultRunner regression

* test(n8n): add latest DefaultRunner regression

* test(n8n): fix latest Runner response assertion
2026-10-31 22:24:22 +08:00
Martin 5aa1b0f5ae 完善 ACPAgentRunner 会话管理与权限边界 (#2822)
* feat(acp-agent-runner): add ACP session commands

* fix(acp-agent-runner): 收紧会话管理契约

* fix(acp-agent-runner): 修复 event-first 会话身份与切换能力校验
2026-10-31 21:53:46 +08:00
huanghuoguoguo f750bb96ac test(ci): add daily Dify Cloud Agent regression
Add daily Dify Cloud Agent regression via Runner
2026-10-31 15:35:55 +08:00
Chin Rockandmultica-agent 75e1630550 fix(localagent): keep the SDK constraint installable across 0.7.x
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>
2026-10-29 15:48:06 +00:00
Chin Rockandmultica-agent 117e3bb350 fix(dify-agent): separate final answers and release 0.2.5
Co-authored-by: multica-agent <github@multica.ai>
2026-10-28 15:15:48 +00:00
huanghuoguoguo b21d150c4c fix(localagent): test against the latest stable SDK 2026-10-28 20:31:31 +08:00
RockChinQandmultica-agent 0219007acd fix(qqofficial): correct group mentions and reply sequences (LANG-181) (#2799)
* fix(qqofficial): preserve native mentions and reply sequences (LANG-181)

Co-authored-by: multica-agent <github@multica.ai>

* fix(qqofficial): respect group mention rendering capability

Co-authored-by: multica-agent <github@multica.ai>

---------

Co-authored-by: multica-agent <github@multica.ai>
2026-10-28 18:43:18 +08:00
RockChinQandmultica-agent 3a77306c3c feat(plugins): consolidate official plugins with independent releases (LANG-180) (#2797)
Co-authored-by: multica-agent <github@multica.ai>
2026-10-28 17:32:24 +08:00