Commit Graph
169 Commits
Author SHA1 Message Date
huanghuoguoguo 1df989eb20 feat(artifact): reference fixed skill package resources without copying 2026-11-17 07:48:33 +00:00
huanghuoguoguo ad3b559ff5 Merge remote-tracking branch 'origin/master' into feat/3051-artifact-run-outputs 2026-11-17 12:29:31 +08:00
huanghuoguoguo b919333426 test(artifact): account for publication operations in catalog contracts 2026-11-17 12:29:30 +08:00
huanghuoguoguo 278667d690 feat(artifact): persist run output files behind authorized handles 2026-11-17 11:10:54 +08:00
huanghuoguoguo 8cc2143ced test(ci): add P0 acceptance and evaluate mutation protection (#3053)
Run affected persistence/network, permission lifecycle and production-image upgrade/replacement acceptance before the existing required Core smoke status. Share persistence acceptance with Daily Endurance and fail the required status for missing, unsuccessful or cancelled P0 results.

Add authorization and content boundary tests and record a bounded mutation evaluation: 102 selected variants, with 87 killed and 15 explained survivors, stable across two executions. Product implementation and application dependencies are unchanged.
2026-11-17 10:24:43 +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
RockChinQandmultica-agent 4e7127d234 LANG-503: add application operations API and API-key plugin confirmation (#3046)
* feat(api): expose application operations and API key plugin confirmation

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

* test(api): include operation transport capability flags

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

* fix: encode operation binary outputs as standard base64

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

---------

Co-authored-by: multica-agent <github@multica.ai>
2026-11-16 15:15:02 +08:00
32d70dd756 perf(cloud): cut event-loop hotspots found by profiling Cloud Core (#3036)
Cloud Core's main thread sat at 100% of one core while the 8-core node
was ~77% idle. A py-spy profile of production showed four avoidable
hotspots, each of which scaled with the number of Workspaces:

- Model list serializers scanned the whole runtime LLM cache (~125k
  models across ~3.4k Workspaces) once per model. Resolve the
  Workspace's runtime models once via the per-scope key index.
- Cloud model catalog sync reconciled every Workspace on every directory
  change. Directory-triggered passes now skip Workspaces whose desired
  state (catalog + owner key) is unchanged; a full reconcile still runs
  every sync interval to repair drift.
- Inline media TTL cleanup selected agent_run_event candidates globally,
  so every Workspace walked 100 other Workspaces' old events per hour,
  one transaction each. Candidates now come from the Workspace's own
  expired runs and only rows that can contain an inline image are
  visited.
- An unset storage.media_cache key logged two warnings per Workspace on
  every maintenance pass.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-11-15 00:50:20 +08:00
482c47d5da fix(auth): stop logging Cloud users out on transient server failures; plugin detail upload button (#3033)
* fix(auth): stop logging Cloud users out on transient server failures

On Cloud, valid sessions were bounced to /login: authentication that
failed for infrastructure reasons (BlockingWorkCapacityError from the
2-thread DNS pool, socket.gaierror, database blips) answered 401, and the
WebUI tears down the session on any 401. Production logs showed 47
capacity and 2 DNS failures answered as 401 in one hour.

- Transient authentication failures now answer 503
  'authentication_unavailable' with Retry-After; credential failures keep 401.
- The resolver pool scales with the main pool (64 workers -> 16 DNS
  workers / 256 queued, minimum 4 / 64) instead of a fixed 2 / 32.
- WebUI retries a request once on that 503, and on a 401 confirms with
  /user/check-token before clearing the session.

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

* feat(plugins): upload button on the plugin detail page

Debug, local and GitHub installs get the same 'Upload to marketplace'
action on their detail page as on the installed-plugin card.

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-14 23:49:09 +08:00
9ff492ac41 feat(space-share): prompt library and sharing prompts/skills/remote MCPs/local plugins to Space (LANG-439) (#3027)
* feat(space-share): share prompts, skills, remote MCPs and local plugins to LangBot Space (LANG-439)

- Prompt library dialog on Pipeline (messaging) and Agent (agent) prompt
  fields: search, preview, replace/append, favorites tied to the bound
  LangBot Account; share the current prompt for review
- Share to Space for Skills (file list + credential scan) and remote MCP
  servers (credentials become ${VAR} placeholders before anything leaves
  Core; stdio stays private)
- Community MCP installs with required inputs are created disabled and the
  detail page lists the placeholders to fill (unfilled_inputs)
- Locally / GitHub-installed plugins share their exact installed .lbpkg via
  the existing space-upload flow
- docs (zh/en/ja) and dev-docs contract note

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

* fix(web): use a star for prompt favorites (LANG-439)

The heart is the anonymous extension like; favorites need a LangBot Account.

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

* fix(i18n): call messaging prompts "Messaging" in English (LANG-439)

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

* feat(web): marketplace type tiles matching Space, shadcn prompt list (LANG-439)

- the in-app marketplace shows All / Plugins / MCP / Skills as tiles with a
  description and count, plugin components and Runner usage as ToggleGroup
  chips; the Filters popover is gone (same layout as space.langbot.app)
- prompt library rows use the shadcn Item component

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

* style(market): soften extension type tiles; type-tinted selected state

Drop the dark outline/ring on the selected tile. Idle tiles use a muted
fill; the selected tile gets a soft type-tinted fill with an inset ring
and a solid icon badge.

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

* style(market): use a fixed blue for the selected All tile

The theme primary is near-black in Core, which brought back the dark
selected border on the All tile.

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

* feat(web): switch market type on press and keep results while loading

Type tiles switch on mouse press (keyboard/touch still use click).
Filter changes keep the current cards dimmed until the new page arrives,
and stale responses are ignored.

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

* feat(web): apply library prompts in the WebUI language; one-language share note

- Prompt library applies the version matching the WebUI language (exact
  -> same family -> en_US -> original), with a language switcher.
- Share dialogs say one language is enough; other languages are
  translated automatically after upload.
- extractI18nObject falls back across Chinese scripts and to any
  available language instead of rendering an empty label.

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

* feat(web): one-click LangBot Account binding from share and library

- Share dialogs: the 'bind a LangBot Account' state now has a button that
  starts the bind flow and returns to the same page; the creator-profile
  state gets a button too, with clearer copy.
- Prompt library: when no account is bound, the preview shows a
  'bind to favorite' button instead of only a disabled tab tooltip.
- Shared useSpaceBind hook.

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

* feat(web): friendly empty state for templates; contributors no longer tag

- Empty template list: short, playful 'on their way, be the first to
  share' state (Space /templates, Core prompt library).
- Share dialogs drop the tags field; Space assigns tags during review.

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

* feat(space-share): update an existing item; clearer identifier field

- Share dialogs list the bound account's published items of the same type
  (prompts: same kind) and offer 'Update existing': pick an identifier,
  metadata is prefilled, a changelog is asked for and the submission
  becomes the next version. Sharing something with the same identifier
  preselects update mode.
- The identifier field now looks like a normal input with the fixed
  '@creator/' prefix and a format hint.
- GET /api/v1/space-share/items proxies the Space owner item list.

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-14 21:20:18 +08:00
huanghuoguoguo 86e9ac59ca feat(skills): persist versioned packages and assets 2026-11-13 15:41:05 +08:00
huanghuoguoguo ac0b1eaac5 feat: workspace sandbox selection, lightweight validation and limits (#2882)
* feat: configure workspace sandbox backends and E2B templates

* fix: accept user supplied E2B templates without listing API

* feat: separate sandbox test runs and add workspace resource limits

* feat(box): pin workspace backends and validate E2B templates

* fix(box): validate user templates without modifying E2B services

* feat(box): lightweight E2B validation and workspace limit enforcement

* test(box): retain identity cleanup guard for workspace backends

* style(box): satisfy checks on migrated sandbox tests

* fix(box): preserve SDK startup and pin MCP sandbox configuration

* fix(box): retain legacy bound-session execution contract

* fix(mcp): reject untrusted sandbox selection overrides

* test(web): match Workspace settings heading exactly

* test(runner): wait for the managed runtime handshake

* test(runner): align boot fixture with runtime readiness

* fix(box): keep default configuration usable with the published SDK

* fix(box): preserve E2B proxy routing on sandbox reconnect
2026-11-12 21:13:45 +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
b33237107f fix(plugin): serialize call_tool results to JSON (#2999) (#3008)
MCP tools return list[ContentElement] Pydantic models. The CALL_TOOL
handler passed them through unserialized for both Runner (`result`) and
plugin (`tool_response`) calls, so the Execution API's strict JsonValue
output check failed with "Output does not match call_tool". Serialize
with _serialize_plugin_api_result, as the platform-tool branch already did.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-11-12 16:59:26 +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
0b7c137f33 fix(plugin): stop member-driven install paths from stalling on permission confirmation (#2961)
* fix(plugin): stop member-driven install paths from stalling on permission confirmation

- Runner/event-processor installs from the Agent and Pipeline forms and
  knowledge-engine installs from the knowledge base form now auto-confirm
  declared permissions, so their registration polling no longer times out.
- RAG migration confirms the plugins it installs on behalf of the member
  running it and reports plugin_permission_confirmation_required otherwise.
- Upgrading a confirmed compatibility-mode installation to another
  compatibility-mode package keeps it enabled with the full legacy grant set.
- The WebUI install task reads pending_permission_confirmation, the key the
  backend actually writes; the marketplace task clears it after auto-confirm.

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

* test(web): expect auto-confirm on inline marketplace installs

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 22:08:41 +08:00
ece1f3fdf9 fix(plugin): resolve the WebSocket debug proxy bot from the runtime, not the bots table (#2953)
The pipeline debug chat runs on a per-Workspace in-memory RuntimeBot with the
reserved uuid websocket-proxy-bot. It never has a bots row, yet three plugin
guards looked data["bot_uuid"] up in that table, so SEND_MESSAGE (and
call_platform_api send_message), GET_BOT_INFO and authorize_action all
rejected it with "Bot ... not found" / "Bot is not available in this
Workspace". GET_BOT_INFO additionally called bot_service.get_runtime_bot_info,
which queries the table again.

- utils/constants: WEBSOCKET_PROXY_BOT_UUID; replace the 9 hardcoded literals.
- PlatformManager.has_websocket_proxy_bot(workspace_uuid): presence check
  that never creates a proxy.
- authorize_action and the handler's new _bot_available() accept the proxy
  uuid only while this Workspace has a live proxy; persisted bots still go
  through the bots table, and capability checks are unchanged.
- GET_BOT_INFO builds the proxy's info from the live runtime (no adapter
  config, no webhook). bot_service / the bot.runtime.get operation are
  untouched, so HTTP/MCP/Workspace API behavior does not change.

Closes #2935

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-11-09 18:19:42 +08:00
2c5afaea9e fix(pipeline-migration): wait for the installed Runner before migrating (#2934)
'Migrate all' with plugin installation could install the target plugin
and still block every pipeline with runner_unavailable: install_plugin
returns once the package is installed, while the plugin worker registers
its Runner a moment later, and the migration checked the registry right
away. Re-running the migration then succeeded.

After installing (or activating a pending installation) the migration now
waits up to 60s, the same window the WebUI Runner installer uses, for the
target Runner to register at the planned version, and only then verifies
and migrates. Declared permissions are still auto-confirmed as before.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
2026-11-08 12:39:23 +08:00
a1e9c87b6d fix(bots): stop routing to deleted Pipelines and Agents (LANG-357) (#2927)
* fix(bots): stop routing to deleted Pipelines and Agents (LANG-357)

Deleting a Pipeline or Agent left Bot event bindings pointing at it, so
every matching message was queued to a missing Pipeline and silently
dropped ('Query dropped before its Pipeline ran' in telemetry).

- Refuse to delete a Pipeline or Agent that a Bot event binding or plugin
  processor subscription still uses (409 resource_in_use, lists the bots).
- At route time, a Pipeline target that no longer exists fails the route
  with processor_not_found instead of queueing a query that is dropped.

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

* test(api): wire BotService into the application resources fixture

pipeline.delete now checks Bot bindings before deleting.

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-08 02:19:52 +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
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
RockChinQandmultica-agent 045a7ccd8e LANG-313: register OASlackBridge Slack reply processor (#2887)
* feat(plugins): register OASlackBridge Slack reply processor

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

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

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

---------

Co-authored-by: multica-agent <github@multica.ai>
2026-11-05 19:48:19 +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
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
43c0ba7e44 feat(speech): implement TTS and STT model layer and pipeline stages (LANG-251) (#2839)
* feat(speech): implement TTS and STT model layer and pipeline stages (LANG-251)

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

* fix(speech): fix invoke signatures and provider lookup in speech stages and model testing

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

* feat(speech): rename STT to ASR, improve TTS voice parameter handling and failure recovery

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

* fix(persistence, lint, web): fix migration revision id, legacy table check, ruff duplicates, and frontend types

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

* fix(speech): restore migration and CI contracts

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

* fix(pipeline,ui): fix select dropdown width gap, add speech to guided tour, and configure show_if for speech options

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

* feat(speech,openclaw): support silk audio transcoding, graceful fallback, duration estimation, and multi-lang deploy docs

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

* fix(audio): enhance ffmpeg executable detection via venv and imageio_ffmpeg

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

* fix(provider): improve LiteLLM error classification and avoid falling back to Unknown error

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

* fix(openclaw): serialize voice_item attributes and improve transcoding fallback logging

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

* fix(audio,openclaw): handle transient TMPDIR deletion and add size attribute to voice_item

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

* fix(openclaw): download and convert inbound voice messages and align voice sending protocol

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

* fix(models): redesign add model popover tabs layout and include ASR/TTS models in provider counts and scanning

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

* fix(audio): decrypt and transcode wecombot voice to mp3, align openclaw weixin voice delivery

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

* fix(wecombot): transcode outbound voice to silk and support voice_delivery mode

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

* fix(discord,web): map audio attachments to voice for ASR, prefer base64 voice in webui

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

* fix(telegram): deliver voice replies in streaming and non-streaming modes with quote origin

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

* feat(dingtalk): route voice messages through pipeline ASR and send TTS replies as voice

Inbound DingTalk audio now arrives as a Voice component with its duration,
so the pipeline speech recognition switch decides how it is transcribed.
DingTalk's own recognition text is used only when the audio cannot be
downloaded.

Outbound Voice components are transcoded to ogg/opus, uploaded as voice
media and sent as native sampleAudio messages in both the omni and legacy
adapters. Audio over 60 seconds, or audio that cannot be transcoded or is
rejected as a voice message, is sent as a file instead. Voice parts no longer
leak into the reply text as "[Voice]".

Also estimate ogg durations from the granule position and ignore non-audio
MIME hints when extracting voice bytes, so ffmpeg can probe the input.

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

* fix(ci): include speech model counts in provider responses and fix lint/image build

- Copy every count returned by get_provider_model_counts into the provider
  payload instead of indexing asr_count/tts_count, and update the test fakes
  to return the speech model counts.
- Install libc6-dev in the runtime image so the pilk audio extra can compile.
- Apply ruff and prettier formatting required by the lint jobs.

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

* test(e2e): expect the speech step in the pipeline setup guide

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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-02 23:51:22 +08:00
huanghuoguoguo 70fb56e274 fix(agent): keep reset generation out of external conversation ID (#2818)
Fixes #2814

After a session reset, keep the reset generation marker out of provider-facing external conversation state so Runner plugins start a new remote conversation.
2026-10-30 10:21:33 +08:00
huanghuoguoguo 3969c3d25d fix(mcp): reject unsupported modes before persistence 2026-10-29 10:14:02 +08:00
Chin Rockandmultica-agent 4687fc96e7 fix(auth): allow sole OSS account to adopt Space email
Co-authored-by: multica-agent <github@multica.ai>
2026-10-28 10:21:35 +00:00
huanghuoguoguo 82eef2496a fix(http-bot): reset persistent conversation context through shared service (#2788) 2026-10-28 10:29:17 +08:00
BiFangKNT 93e5ae4689 fix(persistence): replace online SQLite VACUUM with incremental reclamation
- Add migration 0042 to enable incremental vacuum with verified backup and restore
- Enable incremental vacuum before creating tables in new SQLite databases
- Adapt reclamation batches to elapsed time and lock contention
- Cover migration recovery, WAL mode, and concurrent writes with regression tests
2026-10-23 23:59:00 +08:00
BiFangKNT 3456668497 feat(media): centralize resource URLs and persist refreshed image URLs
- Deduplicate message and history resource URLs using stable catalog references
- Persist renewed URLs with concurrent refresh protection
- Refresh OneBot images via get_msg intervals or NapCat rkey TTL
- Migrate historical payloads and cover SQLite and PostgreSQL behavior
2026-10-23 12:49:56 +08:00
BiFangKNT 1be47ae925 fix(monitoring): refresh image URLs in execution details
- Refresh images in inputs, outputs, deliveries, and conversation history
- Reuse OneBot refresh logic without rewriting persisted records
- Cover existing image URLs across agent and pipeline execution views
2026-10-23 10:21:54 +08:00
RockChinQ 7fa9c0e426 fix: 修复独立环境登录 404 与「添加第一个模型」500(4.11 回归) (#2755)
* fix(space): keep dedicated-environment Space login working

A dedicated environment runs the OSS runtime with system.edition=cloud. The
process-level 'LangBot Models' compatibility provider is part of the OSS
single-Workspace contract, but write_space_model_providers() skipped creating it
for every non-community edition. The Space OAuth callback then unconditionally
rewarded the provider row by api key, so provider_service raised
WorkspaceNotFoundError('Provider not found') and the whole callback returned 404
-- after the Account and its Workspace had already been created. Every retry
failed the same way, making dedicated-environment login impossible on 4.11.x.

Gate the compatibility provider on the deployment shape instead of the edition
(genuine multi-tenant Cloud runs in CLOUD_RUNTIME persistence and never reaches
this path), and treat a missing provider row as a model-routing warning rather
than an authentication failure so a data anomaly can never block login.

* fix(agent): bind the first model to the 4.11 runner config

create_llm_model() still wrote the auto-selected model into the pre-4.11
ai['local-agent'] container. On a 4.11 Workspace that key does not exist, so the
assignment raised KeyError and POST /provider/models/llm returned 500 the first
time a user added a model -- and the default pipeline kept primary='', so every
Agent run failed with 'No authorized model for local-agent'.

Delegate to RunnerDefaultConfigService, which resolves the selected runner and
writes the schema-defined model selector into ai.runner_config[<runner id>].

Also default the NOT NULL description column on pipeline and bot creation:
omitting an optional description returned a 500 from the constraint instead of
creating the resource.

* fix(agent): keep seeding the model for pipelines that never migrated

set_pipeline_llm_model_if_empty() returns False when a pipeline has no 4.11
runner selected -- that is exactly the un-migrated shape, which still carries
ai.local-agent. Seed that container, but only when it exists, so the legacy path
keeps its old behaviour without the KeyError.
2026-10-22 23:26:30 +08:00
RockChinQandmultica-agent 0b341086fb LANG-145: enforce credential-session TTL on a timer, not on traffic (#2756)
* fix(platform): enforce credential-session TTL on a timer, not on traffic

The four adapter registration flows (Lark one-click app, DingTalk device flow,
WeCom bot, QQ Official bind) each park a short-lived secret in an in-memory
session dict until the caller persists it: app_secret, client_secret, or the bot
secret.

Each store had a TTL and a cleanup function, but the cleanup only ran at the top
of a route handler. An abandoned flow therefore kept its secret in memory until
some *other* request happened to arrive, which for a quiet instance can be far
past the validity window (15 min for Lark, 10 for DingTalk, 5 for WeCom/QQ).

Changes:
- Move the sweep to module level as _sweep_credential_sessions(stores) so it is
  directly testable, and have it scrub app_secret/client_secret/secret as it
  evicts, so an evicted session dict no longer retains a readable credential.
- Add a background sweeper task started from the router group's initialize(),
  running every 60s, so the TTL holds regardless of traffic.
- Keep the per-route cleanups: they make eviction immediate under load.

Tests: 9 new cases (expiry, fresh sessions survive, secret scrubbing, per-store
TTL, cancelling a pending handshake task, not cancelling a finished one,
malformed session without created_at, multiple evictions, empty stores).

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

* fix(platform): tolerate a task manager without create_task when starting the sweeper

The sweeper is started from the adapter router group's initialize(). Some
embeddings of the app provide a task manager that only exposes create_user_task,
so an unconditional create_task broke those harnesses. Fall back to the per-route
cleanups when create_task is unavailable.

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

---------

Co-authored-by: multica-agent <github@multica.ai>
2026-10-22 21:51:01 +08:00
RockChinQandmultica-agent 01789e498a LANG-145: bind WebAuthn to server config and make passkeys OSS-only (#2744)
* LANG-145: bind WebAuthn to server config and make passkeys OSS-only

Two problems in the passkey implementation:

1. The RP ID and expected origin came from the request: a JSON 'origin' field,
   then the Origin/Referer headers, then the request URL. WebAuthn's
   anti-phishing guarantee depends on values the server chose; trusting the
   request lets a sibling host under the same registrable domain obtain a valid
   assertion for a victim's credential. Resolution now follows the same rule the
   OAuth and invitation links already use: api.webui_url, then
   api.webhook_prefix, then the configured port on loopback.

2. Passkeys are now an OSS-only feature. Cloud deployments authenticate through
   their own account service, so every passkey route (register options/verify,
   auth options/verify, list, rename, delete) refuses with
   edition_unsupported, and /account-info advertises neither passkey_login_enabled
   nor passkey_supported. Both cloud flavours are covered: system.edition ==
   'cloud' and deployment.mode == 'cloud'.

Tests:
- New unit suite for the edition matrix and for origin resolution (including
  that client-supplied origin/Origin/Referer are ignored).
- The three 'reverse proxy scenario' tests asserted the old, unsafe behaviour
  (server trusting the request). They now assert the server-config contract.
- test_smoke cloud capabilities expectation updated to passkey_* = false.

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

* style(api): drop the typing import left unused by the WebAuthn origin change

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

---------

Co-authored-by: multica-agent <github@multica.ai>
2026-10-22 20:39:21 +08:00
RockChinQandmultica-agent d13ae56ea5 fix: bot routing setup and busy-session response checks (#2728)
Apply group response rules before busy-session steering. Initialize usable private-message and group-mention routes for new bots, including Wizard-created pipelines, and preserve member-configured rules across saves and retries.

Fix empty pipeline configuration, refresh the processor sidebar after automatic creation, and show creation feedback. Align routing regressions and use Node 24 for the browser CI job.

Correct the task's erroneous agent attribution while preserving every code tree and the original human contribution.

Co-authored-by: multica-agent <github@multica.ai>
2026-10-20 21:22:53 +08:00
Chin Rock 40d40204cf fix(install-diagnostics): Sanitize plugin installation network diagnostics (LANG-132) 2026-10-20 07:53:56 +00:00
彼方 1baba1b9f9 Merge pull request #2725 from langbot-app/fix/session-summary-persistence
fix(monitoring): persist session summaries to avoid history scans
2026-10-20 11:53:06 +08:00
BiFangKNT 3b1ea56f4f fix(monitoring): avoid historical payload reads in execution filters
- Add covering indexes through migration 0040
- Preserve PostgreSQL FORCE RLS state when marking historical summaries
- Add query-plan and migration regression tests to CI
2026-10-20 10:45:44 +08:00
BiFangKNT 7129e20cf6 fix(monitoring): paginate conversation IDs before loading message payloads
Count and paginate lightweight records, then load payloads only for the
selected page to avoid materializing large historical messages.

Add regression coverage for oversized history, ingress deduplication,
stable pagination, and PostgreSQL tenant isolation.
2026-10-20 09:34:05 +08:00
BiFangKNT 810d053df9 fix(monitoring): persist session summaries to avoid history scans
- Maintain counts and display snapshots in source transactions with replay-safe deduplication.
- Read session lists exclusively from summaries and remove execution-only filters.
- Automatically initialize historical summaries in bounded, resumable batches during OSS startup.
- Add behavioral contracts covering accounting, retention, query cost and PostgreSQL concurrency.

Verified with the required session_summary suite and real container upgrade startup.
2026-10-20 06:12:00 +08:00
RockChinQandmultica-agent d9e4e7d9df fix(pipeline): decouple Runner from extension permissions (LANG-54) (#2723)
* fix(pipeline): decouple runner from extension allowlist

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

* fix(pipeline): complete runner diagnostics and real runtime coverage

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

---------

Co-authored-by: multica-agent <github@multica.ai>
2026-10-19 23:07:11 +08:00
BiFangKNT 57077740bd chore(merge): sync master and preserve monitoring test coverage 2026-10-18 12:43:44 +08:00
BiFangKNT d610d64c67 fix(storage): expire historical inline images with bounded TTL cleanup
- Apply media retention to inline images while preserving text and URLs
- Persist per-workspace cursors atomically with payload updates
- Bound candidate scans and verify event ownership before loading payloads
- Add cleanup indexes and regression tests, and fix Windows path assertions
2026-10-18 09:58:04 +08:00
huanghuoguoguo 13b8edeace Merge pull request #2705 from langbot-app/test/required-contract-suites
test(ci): decouple required suites from test names and counts
2026-10-17 23:12:59 +08:00
BiFangKNT f12490bc73 perf(monitoring): load execution details on demand
- Load overview first and fetch secondary sections when expanded
- Add a covering index and select conversation IDs before loading page payloads
- Preserve full-detail API compatibility and add pagination and lazy-loading tests
2026-10-17 21:10:55 +08:00
huanghuoguoguo 8dfdb4fc45 test: preserve session and quota contracts when merging master 2026-10-17 20:14:10 +08:00
huanghuoguoguo f30abc7bce Merge pull request #2690 from langbot-app/test/quality-unit-api-maintenance-20261017
test: verify scoped cleanup and storage analysis contracts
2026-10-17 20:12:01 +08:00
huanghuoguoguo 916b4a4b14 Merge pull request #2689 from langbot-app/test/quality-unit-api-identity-20261017
test: verify identity persistence and credential boundaries
2026-10-17 20:11:54 +08:00