Skip to content

IM tracer: work-group @Bot → PersonaBot Inbox → same-topic reply #12

Closed

Description

@DoodleBears

Confirmed identity boundary — 2026-09-30

Cross-platform bindings are allowed; initially one account per platform per PersonaBot, and one platform Bot account bound to one local PersonaBot. This real work-group acceptance includes a Human-visible explicit binding and uses the existing canonical Inbox/Orchestrator authorities.

Feature Project and provider coordination

Goal

交付 DeepSeekBot 的第一条真实 Feishu/Lark inbound tracer:Human 在一个已授权的工作群/话题中 @ 一个已绑定的 Bot;消息经 provider adapter、Messaging、Bot Inbox 与现有 Orchestrator 进入对应 PersonaBot,随后沿 trusted Reply Route 回到原 provider account / group / thread。

本票拥有 Human-facing end-to-end acceptance;#117 只拥有 outbound-first dsh-im adapter,#48 是 provider 系列的 coordination parent。Slack/Discord second-provider proof 要在本票获得 Human 反馈后另建 sibling tracer,不塞进本票。

Production-shaped path

verified Feishu/Lark work-group @mention
→ exclusive dsh-im external-consumer seam
→ #46 Messaging Ingress transaction
→ Source Event + Inbox Admission (Channel placement only for an explicitly configured Channel target)
→ #47 Wake/Delivery Policy
→ current Orchestrator Session
→ explicit reply command
→ Outbox Intent
→ trusted Reply Route / Provider Operation
→ Human receives the reply

必须使用真实 provider sandbox/account、DSH Credential reference、botharness.db authority、现有 V1 Session ownership/Orchestrator runtime,以及可重复的 integration evidence。dsh-im 被接管的 account 不得同时运行自己的 Session mapping / ask path;consumer 消失时 fail closed,不自动回退 standalone。

Acceptance criteria

  • authenticated inbound 只产生一个 Source Event;duplicate/replay 不产生第二个 Attention 或重复回复。
  • provider account、Actor、conversation/thread/reply identity 全部来自 authenticated adapter evidence。
  • 群/话题、root/parent/reply 身份及被提及的 Bot 来自 authenticated adapter evidence;@其他 Bot 不能唤醒当前 PersonaBot。
  • 收到普通群消息不等于必须回复;adapter 保留 mention/context 事实,Messaging / attention / Wake Policy 决定 admission 与执行。首片覆盖已授权工作群的 Human text @mention,普通消息上下文的扩展在该片反馈后推进。
  • ordinary inbound 不 cancel 当前 model/tool step;Wake/Delivery 只在经验证的安全边界发生。
  • reply destination 只来自 Source Event 的 trusted Reply Route;模型不能提供任意 provider target。
  • Outbox Intent 先于外部调用;receipt/failure/unknown-outcome 可区分且不盲目重试。
  • unauthorized sender、consumer disappearance、credential removal、archived PersonaBot 与 stale route 全部 fail closed。
  • Host restart + provider redelivery 不产生重复 admission、attention 或 reply。
  • Human 能在真实 Feishu/Lark 工作群及已有话题中 @bot,并收到对应 PersonaBot 在同一群/话题上的回复;不会串群、串话题或同时由 dsh-im standalone 再回复。
  • secret 不进入 repo、Source Event、日志、RPC 或 Client state。

Blocked by

#46 supplies the provider contracts exercised by #117. Existing explicit Session ownership/runtime are reused; exact gaps belong to this tracer, not a broad foundation completion gate.

Work-group policy clarification — 2026-10-01

Confirmed Group / optional Thread policy is specified in #48 ("Confirmed external Group / Thread policy"). New external groups default to direct-mention-only Inbox admission and @addressed replies. Human can enable full ordinary-message admission and configure the existing count/time digest harvest, immediate wake, mentions or silent policy; admission, wake and response remain independent. Unlike the internal Wake Policy's mentions preset, the external admission scope may exclude ordinary messages from the Bot Inbox entirely.

The Bot can explicitly follow/unfollow a verified Thread within its authorized group; posting a reply does not auto-follow. Group defaults and exact Thread overrides are durable Bot-owned policy with Human override. Thread capability is optional: Slack/Discord/Feishu/Lark adapt their actual provider hierarchy; QQ/WeChat providers without this capability retain group-only behavior. Do not manufacture Threads or platform-specific Orchestrator wake runners.

This issue still owns only the first bound-PersonaBot group/existing-Thread @mention tracer. Preserve authenticated Thread facts and policy seams, but do not add autonomous Thread following, all-group collection or a complete search/history layer to its completion claim. After #12 Human acceptance, choose the next runnable context-read / Thread-following slice under #48, with real Bot-identity capability evidence and screenshots/recording. #607 qualifies the current provider @mention path only; its QA goal remains paused.

Bridge target clarification — 2026-10-01

The generic target model is confirmed in #48 ("Confirmed Channel-targeted and Inbox-targeted Bridges"). This narrow bound-PersonaBot tracer may receive into the Bot Inbox without manufacturing a local Human DM or Group transcript. External platform, original conversation/Thread, sender and authenticated receiving identity must remain discoverable with the Source Event and trusted reply context. Source persistence and Bot access do not require local Channel placement; an external reply still returns through the Host-selected original route.

Keep #12's existing work-group/Thread @mention acceptance. Channel-targeted multi-Bot visibility, livestream transport, morning-report scheduling and a mandatory takeover/work-item model are not added to this issue. Outbound/provider echoes do not become self-attention merely to retain readable sent history. #624 remains paused for Human QA.

Out of scope

  • Slack/Discord second-provider proof。
  • 首片之外的完整群历史同步、多个 Bot 协作、rich card、attachment、edit/reaction 与 streaming reply breadth。
  • 私聊作为后续兼容场景,不是首条验收或工作群能力的前置条件。
  • TTS、Live2D 或其他 PersonaBot Output Event consumer。
  • 把外部内容自动写入 Memory,或让 provider route 获得 Workspace authority。

References

Activity

  1. added this to the v1.0 milestone on Sep 18, 2026
  2. changed the title [-]M5: IM 适配器(dsh-im 绑定 + Lark 验证 + 客户跟进)[/-] [+]M5: Feishu/Lark IM 集成闭环(Messaging + Bridge + Reply)[/+] on Sep 19, 2026
  3. modified the milestones: v1.0, v1.1 on Sep 20, 2026
  4. changed the title [-]M5: Feishu/Lark IM 集成闭环(Messaging + Bridge + Reply)[/-] [+]Tracer B / M5: Feishu/Lark DM → Orchestrator → trusted reply[/+] on Sep 20, 2026
  5. 24 remaining items

  6. removed
    agent:activeOne or more coding-agent tasks currently claim this issue; see claim comments for task IDs
    on Oct 1, 2026
  7. DoodleBears commented on Oct 1, 2026

    @DoodleBears
    ContributorAuthor

    Agent work claim — real Lark input verification resumed

    • Agent: Codex
    • Task: codex/local/01a0f14c-5338-7020-853b-0fe54b87aa95 (not a DSH Session)
    • State: active; supersedes this task's waiting-for-input handoff.
    • Branch: codex/12-im-group-tracer

    The Human has sent the real QA-group/topic inputs and explicitly authorized Computer Use to send further test messages in BotHarness IM QA #78. Resume the same bounded #12 tracer and the #46 contracts it exercises, diagnose the current lack of canonical ingress, then finish real source/admission/model/topic-reply evidence. No broader #46 takeover. No issue PR or completion claim yet; pause for Human QA after publishing the evidence-bearing #12 PR.

  8. added
    agent:activeOne or more coding-agent tasks currently claim this issue; see claim comments for task IDs
    on Oct 1, 2026
  9. DoodleBears commented on Oct 1, 2026

    @DoodleBears
    ContributorAuthor

    Agent work outcome — paused for Human QA

    Real Human-origin Computer Use in the authorized Lark QA group verified BH12-FINAL44-TOPIC-03 → PersonaBot bridge_reply → visible BH12-FINAL44-OK within the same existing topic and own bound identity. An unmentioned message is excluded. Cold restart retains exactly one Source Event, one handled Inbox Admission and one provider-accepted reply, with no local Channel placement or Assignment, no error, and the same live grant revision. Chrome verified the real retained source-detail modal and reception state after restart; the PR embeds six screenshots with capture provenance.

    Final code on main 7fe56622, schema 44: 1683 tests passed / 1 skipped; typecheck, build, lint, formatting, bilingual ledgers and 268-page docs build passed. Evidence-only commits do not change the verified runtime. Current provider consumer is text-only; formatted rich posts are excluded rather than claimed as supported.

    The agreed goal is now paused immediately after the issue PR. Human QA and merge authorization remain pending. Qualified temporary provider proof does not establish an upstream release or production rollout. No subsequent ticket implementation starts before Human instruction.

  10. added and removed
    ready-for-agentFully specified, ready for an AFK agent
    agent:activeOne or more coding-agent tasks currently claim this issue; see claim comments for task IDs
    on Oct 1, 2026
  11. DoodleBears commented on Oct 1, 2026

    @DoodleBears
    ContributorAuthor

    Agent work claim — PR #655 merge verification

    • Agent: Codex
    • Task: codex/local/01a0f14c-5338-7020-853b-0fe54b87aa95 (not a DSH Session)
    • Scope: Verify and address the three current PR review findings before the Human-authorized merge; investigate Lark topic read indicators separately from canonical Inbox handling.
    • Branch: codex/12-im-group-tracer
    • State: active
  12. DoodleBears commented on Oct 1, 2026

    @DoodleBears
    ContributorAuthor

    Agent work outcome

    • Agent: Codex
    • Task: codex/local/01a0f14c-5338-7020-853b-0fe54b87aa95 (not a DSH Session)
    • State: completed for the authorized work-group mention/original-topic tracer
    • PR: feat(im): route work-group mentions to PersonaBot Inbox and reply in the original topic #655
    • Merge: 7237c53ffe0fa3abf0219aea0b67878031388a3e
    • Human QA approved merge. Exact-head CI passed after preserving current-main original-attachment and Group-departure behavior. Source-response validation, stale source-modal requests, and mixed external/Assignment Inbox context review findings were fixed and covered by regression tests. Real original-topic reply evidence remains in the PR.
    • Follow-up: Lark topic read indicators can remain unread despite a confirmed handled Inbox admission and successful original-topic reply; the provider does not explicitly set native read receipts. The precise topic/mainline display difference remains unverified and is being investigated separately.
    • Messaging: external ingress, Provider contracts and Outbox #46 remains open for its broader upstream Provider/release scope. The next frontier issue awaits Human direction under the paused goal.
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

    V1.1Milestone v1.1; mirrors the GitHub milestonearea:backendHost-side implementationfeature:messagingMessaging module and external providersscope:tracerHuman-testable implementation slice

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions