交互原语:poke/reaction/profile_like(Slice 3/5 of #19) #22

Closed
opened 2026-07-09 03:16:56 +00:00 by KumaAgent · 0 comments
KumaAgent commented 2026-07-09 03:16:56 +00:00 (Migrated from codeberg.org)

Parent

#19(Phase 3 PRD:能力与多模态)

What to build

ConversationInput 新增 interaction: InteractionEvent | None 字段,InteractionEvent {kind: "poke"|"reaction", target_message_id?, emoji?}render() 渲染为固定 tag <poke>/
<reaction emoji="..." target="...">,走既有 reactive 累积/触发路径(不新增独立调度通道)。

新增两个可调用工具 poke_send(user_id)/reaction_send(message_id, emoji)
capabilities.poke_send/capabilities.reaction_send 为假时这两个工具不注册进 TOOL_SCHEMAS
(模型看不到,而非看到了调用报错)。

新增独立工具 like_profile(user_id)EgressPort 新增 like_profile(user_id) -> None
capabilities.profile_like 为假时该工具同样不注册进 TOOL_SCHEMAS

ingress 侧 poke/reaction_receive 能力位是声明性的——host 自己决定是否接入对应平台事件,core 不
需要对这两位做主动门控(interaction 字段出现就处理,不出现就没有)。

Acceptance criteria

  • ConversationInput.interaction 字段新增,InteractionEvent 数据结构定义完成
  • render() 对带 interaction 的消息正确渲染 <poke>/<reaction> 固定 tag;与普通 text
    消息同批次出现时两者都被正确渲染进 assemble_context() 产出的 context,互不覆盖
  • poke_send/reaction_send/like_profile 工具 schema 新增,EgressPort 对应新增方法
  • capabilities.poke_send=Falsepoke_send 不出现在当轮 TOOL_SCHEMAS 里;
    capabilities.reaction_send=False/capabilities.profile_like=False 同理
  • 对应能力为 True 时模型调用该工具会正确触发 EgressPort 对应方法
  • FakeEgress 新增记录 pokes_sent/reactions_sent/likes,覆盖以上分支的测试

Blocked by

#20(能力声明地基——需要 CapabilitySet 契约存在)

## Parent [#19](https://codeberg.org/ProjectKuma/arise/issues/19)(Phase 3 PRD:能力与多模态) ## What to build `ConversationInput` 新增 `interaction: InteractionEvent | None` 字段,`InteractionEvent {kind: "poke"|"reaction", target_message_id?, emoji?}`;`render()` 渲染为固定 tag `<poke>`/ `<reaction emoji="..." target="...">`,走既有 reactive 累积/触发路径(不新增独立调度通道)。 新增两个可调用工具 `poke_send(user_id)`/`reaction_send(message_id, emoji)`, `capabilities.poke_send`/`capabilities.reaction_send` 为假时这两个工具**不注册进 `TOOL_SCHEMAS`** (模型看不到,而非看到了调用报错)。 新增独立工具 `like_profile(user_id)`;`EgressPort` 新增 `like_profile(user_id) -> None`; `capabilities.profile_like` 为假时该工具同样不注册进 `TOOL_SCHEMAS`。 ingress 侧 `poke`/`reaction_receive` 能力位是声明性的——host 自己决定是否接入对应平台事件,core 不 需要对这两位做主动门控(`interaction` 字段出现就处理,不出现就没有)。 ## Acceptance criteria - [ ] `ConversationInput.interaction` 字段新增,`InteractionEvent` 数据结构定义完成 - [ ] `render()` 对带 `interaction` 的消息正确渲染 `<poke>`/`<reaction>` 固定 tag;与普通 `text` 消息同批次出现时两者都被正确渲染进 `assemble_context()` 产出的 context,互不覆盖 - [ ] `poke_send`/`reaction_send`/`like_profile` 工具 schema 新增,`EgressPort` 对应新增方法 - [ ] `capabilities.poke_send=False` 时 `poke_send` 不出现在当轮 `TOOL_SCHEMAS` 里; `capabilities.reaction_send=False`/`capabilities.profile_like=False` 同理 - [ ] 对应能力为 `True` 时模型调用该工具会正确触发 `EgressPort` 对应方法 - [ ] `FakeEgress` 新增记录 `pokes_sent`/`reactions_sent`/`likes`,覆盖以上分支的测试 ## Blocked by [#20](https://codeberg.org/ProjectKuma/arise/issues/20)(能力声明地基——需要 `CapabilitySet` 契约存在)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ProjectKuma/arise#22
No description provided.