From 4b9ba0db6b34ac2d1fa44fae90e737b686bd4334 Mon Sep 17 00:00:00 2001 From: RockChinQ Date: Sat, 12 Sep 2026 12:51:16 +0800 Subject: [PATCH] docs(runner): require explicit usage declarations --- en/plugin/dev/components/runner.mdx | 2 +- ja/plugin/dev/components/runner.mdx | 2 +- zh/plugin/dev/components/runner.mdx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/en/plugin/dev/components/runner.mdx b/en/plugin/dev/components/runner.mdx index 7eed968c3..45bc4507f 100644 --- a/en/plugin/dev/components/runner.mdx +++ b/en/plugin/dev/components/runner.mdx @@ -86,7 +86,7 @@ execution: `spec.events` lists supported events, and `spec.config` defines settings users can edit on the processor detail page. This example handles new members and incoming messages, with a greeting and a reply switch. Sending replies requires the `tool_calling` and `permissions.tools` settings shown above. -`spec.usages` controls where the component can be selected: `agent` for Agents and Pipelines, `event` for Plugin processors. Both can be declared as `[agent, event]`. Event usage requires `spec.events`. The example uses typed handlers; a custom `run(ctx)` can also call `await super().run(ctx)` to dispatch them. +`spec.usages` is required and has no default. `spec.usages` controls where the component can be selected: `agent` for Agents and Pipelines, `event` for Plugin processors. Both can be declared as `[agent, event]`. Event usage requires `spec.events`. The example uses typed handlers; a custom `run(ctx)` can also call `await super().run(ctx)` to dispatch them. ## Plugin Implementation diff --git a/ja/plugin/dev/components/runner.mdx b/ja/plugin/dev/components/runner.mdx index 51723b417..7363bc9f6 100644 --- a/ja/plugin/dev/components/runner.mdx +++ b/ja/plugin/dev/components/runner.mdx @@ -86,7 +86,7 @@ execution: `spec.events` は対応するイベント、`spec.config` は詳細画面でユーザーが変更できる設定です。この例ではメンバー参加とメッセージ受信に対応し、歓迎メッセージと返信の有効・無効を設定できます。返信には、上記の `tool_calling` と `permissions.tools` の指定が必要です。 -`spec.usages` は選択先を指定します。`agent` は Agent とパイプライン、`event` はプラグインプロセッサーです。`[agent, event]` の併記も可能です。`event` には `spec.events` が必要です。以下はイベント処理関数の例です。独自の `run(ctx)` から `await super().run(ctx)` で呼び出すこともできます。 +`spec.usages` は必須で、デフォルト値はありません。`spec.usages` は選択先を指定します。`agent` は Agent とパイプライン、`event` はプラグインプロセッサーです。`[agent, event]` の併記も可能です。`event` には `spec.events` が必要です。以下はイベント処理関数の例です。独自の `run(ctx)` から `await super().run(ctx)` で呼び出すこともできます。 ## プラグインの実装 diff --git a/zh/plugin/dev/components/runner.mdx b/zh/plugin/dev/components/runner.mdx index 681199f66..00f1b3987 100644 --- a/zh/plugin/dev/components/runner.mdx +++ b/zh/plugin/dev/components/runner.mdx @@ -86,7 +86,7 @@ execution: `spec.events` 指定支持的事件,`spec.config` 定义用户可在处理器详情页修改的配置。本例支持成员入群和收到消息,并提供欢迎语、回复开关两个配置项。回复消息需要上面的 `tool_calling` 和 `permissions.tools` 配置。 -`spec.usages` 决定组件可在哪类处理器中选择:`agent` 用于 Agent 和流水线,`event` 用于插件处理器。可同时声明 `[agent, event]`;包含 `event` 时必须填写 `spec.events`。本例使用事件处理函数,也可以在 `run(ctx)` 中按需调用 `await super().run(ctx)`。 +`spec.usages` 必填、无默认值,决定组件可在哪类处理器中选择:`agent` 用于 Agent 和流水线,`event` 用于插件处理器。可同时声明 `[agent, event]`;包含 `event` 时必须填写 `spec.events`。本例使用事件处理函数,也可以在 `run(ctx)` 中按需调用 `await super().run(ctx)`。 ## 插件处理