Skip to content

[channel] Bot cannot show an image from a connected service: file_artifact needs a workflow run, and Lark/Telegram composers reject attachments #3671

Description

@chronoai-kaihuei

Summary

A channel bot (Lark or Telegram) cannot show an image from a connected service. Two independent gaps block it. Real case: the ChronoAI office bot is asked "check the pantry camera". The NyxID frigate service exposes GET /api/{camera_name}/latest.jpg (image/jpeg, ~100 KB, binary_artifact: true in NyxID discovery), but the bot can neither fetch the image nor post it.

Gap 1: response_mode=file_artifact is refused in chat turns

NyxIdProxyTool.ExecuteAdmittedFileArtifactAsync (dev) requires a managed workflow parent:

if (!workflowRuntime.HasManagedParent || callerScopeId == null || ownerRunId == null)
    return ... FileArtifactError("managed_workflow_context_required", ...)

A channel reply turn has no managed workflow parent, so every binary read fails with managed_workflow_context_required. As a result the binary operations are not even admitted as tools in the turn (only the 4 text operations of the frigate service were admitted; see log trace 829555c33744b087f5c92a63e06c1706, 2026-09-22 08:43 UTC, registration b7ae9302f49c489c82e327d089e1bab6).

Gap 2: channel composers reject attachments

  • LarkMessageComposer.Evaluate: if (intent.Attachments.Count > 0) return ComposeCapability.Unsupported;
  • TelegramMessageComposer.Evaluate: same.
  • TelegramChannelNativeMessageSender only calls sendMessage. LarkMessagesSendTool supports only text and interactive. No code path uploads an image (im/v1/images for Lark, sendPhoto for Telegram).

So even with an artifact in hand, the reply cannot carry it.

Requested behaviour

  1. Allow file_artifact reads in channel bot turns, scoped to the conversation or the agent run instead of a workflow run, with the existing ProxyFileArtifactMaxBytes limit.
  2. Let the Lark composer (and Telegram) render an image attachment: upload the artifact bytes to the platform, then send an image message (Lark) or sendPhoto (Telegram), with the text as caption or a following message.
  3. Optionally, hand the artifact to the model as an image part so it can describe what it sees before replying.

Why it matters

Camera snapshots, charts, and generated files are common read results. Today the only workaround is to reply with an office-LAN URL that opens outside the chat, or to route through a workflow.

Environment

  • Aevatar feature/integrate deploy in aismart-app-mainnet, 2026-09-22; code references checked against dev (1df08db).
  • Lark bot registration b7ae9302f49c489c82e327d089e1bab6, default skill chrono-office (Ornn 63f35083).
  • NyxID service frigate id 3ce0fb17-435c-4a04-8d4d-9f882c9042a5, spec: ChronoAIProject/nyx-homeassistant-node specs/frigate-openapi.json.

Related: #3086 (inbound Lark attachments; this issue is the outbound direction).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions