Skip to content

[Plugins S4] 事件流入:Inbox 准入、唤醒策略与 turn/step steer #4208

Open

Description

@DoodleBears

Parent: #4202
Blocked by: #4206

What to build

在 SDK 中加入 ingress,让插件能定制外部事件如何进入 Bot。外部事件可以来自游戏、webhook、传感器等,这里只举例,本票不做任何具体的外部集成。插件可以定制三件事:

  1. 准入:插件产生 Source Event,进入现有的 Bot Inbox 准入、triage 和合并流程,不新建第二条注意力管线。插件声明事件的 kind、来源,以及合并键。
  2. 唤醒策略(wake policy):插件决定一个事件进入 Inbox 之后是否唤醒 Bot。三种选择:只记录不唤醒、立即唤醒、按合并窗口批量唤醒。Host 统一保证限流和上限,防止高频事件刷爆 Bot。
  3. Steer:Bot 正在运行时,事件可以作为 steer 插入当前的 turn 或 step(复用现有 Assignment 的 steer、followup 语义),也可以排队等下一个 turn。

同时加入 dataScope: 'bot',以及删除 Bot、数据清除时的回调。

tracer 是仓库里一个最小的示例插件(例如 examples/ingress-demo)。它的事件由 CLI 注入,不依赖外部系统,分别演示上面三种行为。Minecraft 这类集成留作日后的社区或示例工作,不在本票范围内。

Acceptance criteria

  • AC-1:只有开启了示例 Feature 的 Bot 会收到它的事件,其他 Bot 的 Inbox 不受影响。
  • AC-2:只记录不唤醒的事件进入 Inbox,在 inbox_history 里能看到,但不会触发 turn。
  • AC-3:立即唤醒的事件在 Bot 空闲时触发一个 turn;高频注入时,Host 的限流和合并生效,唤醒次数有上限,在测试中可以看到。
  • AC-4:Bot 正在运行时,标记为 steer 的事件被插入当前的 turn 或 step,在 tool trace 或时间线里能看到;标记为排队的事件在当前 turn 结束后才处理。
  • AC-5:Bot 级配置和数据随 Profile 备份;删除 Bot 后它的数据被清理;导出或分享 Bot 时默认不带这些数据。
  • AC-6:tobs feature event emit <feature> --bot <slug> … 可以注入事件,并指定唤醒和 steer 行为。CLI parity 通过。
  • AC-7:在真实隔离 Host 上,用真实模型分别录下 AC-2、AC-3、AC-4 三种行为的证据。准入、唤醒和 steer 的语义写进 S0 的 ADR 或作者文档。

Activity

  1. added this to the v2.0 milestone on Nov 14, 2026
  2. added
    area:fullstackEnd-to-end Host and Client implementation
    feature:inboxBot Inbox and Human Inbox attention
    scope:tracerHuman-testable implementation slice
    feature:runtimeInstalled runtime and profile validation
    on Nov 14, 2026
  3. changed the title [-][Plugins S4] 事件流入与 Bot 级数据:Minecraft 示例插件[/-] [+][Plugins S4] 事件流入:Inbox 准入、唤醒策略与 turn/step steer[/+] on Nov 14, 2026
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

    area:fullstackEnd-to-end Host and Client implementationfeature:inboxBot Inbox and Human Inbox attentionfeature:runtimeInstalled runtime and profile validationscope:tracerHuman-testable implementation slice

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions