Commit Graph
5 Commits
Author SHA1 Message Date
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
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
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
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