Skip to content

feat(room): addressee on say frames, channel meta and the composer - #35

Merged
smileygames merged 1 commit into
mainfrom
issue-31-addressee
Aug 21, 2026
Merged

feat(room): addressee on say frames, channel meta and the composer#35
smileygames merged 1 commit into
mainfrom
issue-31-addressee

Conversation

@smileygames

Copy link
Copy Markdown
Member

Closes #31

部屋の発言に宛先を持たせ、名指しされていないエージェントが黙れるようにした。

変更

  • say フレームに任意の to を追加(src-tauri/src/room.rs)。空文字は宛先なしへ畳み、無いときはキーごと省く。既存の reply.to と同じ語彙・同じ形。
  • サイドカーが say.to を channel push の meta.to として渡す(sidecar/src/index.ts)。本文は言われたものと等しく保つため content には混ぜない(fix(sidecar): stop prefixing the speaker into the channel content #28)。
  • instructions が宛先を判定材料として明示。あわせて自分の部屋での名前を各エージェントへ伝える。名前が無ければ meta.to を自分と照合できない。
  • 入力欄の左に宛先の選択を追加(index.html / src/main.ts / src/styles.css)。参加者名簿から選ぶ形にしてあり、既定は全体宛。
  • docs/0-requirements.md: フレーム表・push の形・部屋の作法・実装状況を更新。あわせて premise へ「枠の消費構造」を追加し、constraints の「抑える対象」を常駐数から反応数へ改めた。

判断

  • 宛先で配送を絞らない。部屋は全員へ配り、答えるかどうかはエージェントが決める。絞れば部屋が「誰に届いたか」を持つことになり、アプリが会話の中身へ関与し始める。
  • protocol は上げていない。サイドカーはアプリが .mcp.json へ書く同梱パスから起動するため、部屋とサイドカーの版が食い違う形が構造上無い。

検証

npm run build / npm run sidecar:check / npm run sidecar:test / cargo check --target x86_64-pc-windows-gnu / cargo testcrates/mcp-config)いずれも通過。

往復ハーネスに宛先ありの push・他人宛の push・宛先なしの push を追加。meta.to の中継を外すと落ちることを確認済み(宛先なしはキーが無いことを検査する)。

`say` gains an optional `to`, carried through to the channel push as
`meta.to`, and the room `instructions` now name it as the material an
agent judges "is this mine to answer" on. The composer picks the
addressee from the roster; leaving it on 全体 sends as before.

返信フレームには `to` があるのに発言フレームには無く、`instructions` は
宛先を知らないままエージェントに宛先を判断させていた。判定材料と判定規律を
同じ変更で揃える。宛先で配送を絞ることはしない。部屋は全員へ配り、答えるか
どうかはエージェントが決める。絞ればアプリが「誰に届いたか」を持つことになり、
会話の中身へ関与し始めるため。

The sidecar also tells each agent the name it answers to, without which
matching `meta.to` against itself is impossible. Round-trip test covers
addressed, addressed-elsewhere and unaddressed pushes; an unaddressed
one omits the key rather than sending an empty one.

#31

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@smileygames smileygames linked an issue Aug 21, 2026 that may be closed by this pull request
@smileygames smileygames self-assigned this Aug 21, 2026

@smileygames smileygames left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

セルフレビュー(auto モード / 人間チェックなし)

完了条件の照合

#31 の完了条件 結果
部屋の発言に宛先を付けられる 満たす。composer の #to-select、既定は全体宛
宛先が channel notification の meta を通じて届く 満たす。pushToChannelmeta.to へ載せる。content には混ぜない
instructions が宛先を判定材料として明示 満たす。あわせて AGENT_NAME を埋め込んでおり、照合の片側が欠けていない
宛先なしの発言が従来どおり成立する 満たす。空文字は畳まれ、キーごと省かれる

制約の照合

  • 宛先は任意 — 満たす。
  • 判定はエージェント側 — 満たす。配送の絞り込みは入れておらず、往復ハーネスの検査で固定されている。
  • instructionssay のフィールドを同時に変える — 満たす。同一 PR。
  • 既存の reply.to と語彙を揃える — 満たす。両方向とも表示名、任意、不在時はキー省略。

スコープ

変更ファイルは #31 の対象ファイル一覧と一致し、超過はない。docs/0-requirements.md の premise へ「枠の消費構造」を追加し constraints の代償節を書き換えた点は、issue 本文の前提節が同じ分析を持ち、対象ファイルにも挙げられているため範囲内と判断する。

検証

CI(CI / check)いずれも 4308d56 で pass。meta.to の中継を外すと新規テストが落ちることを実装側で確認済みであり、テストは挙動を検出している。

指摘

なし。AGENT_NAMEINSTRUCTIONS より前で定義されており、テンプレートリテラル埋め込みに初期化順の問題はない。

リリース種別

patch と判定する。観測可能な追加ではあるが増分であり、構造の大きな変更ではない(rules/operations/release-version-rule.md)。

自己レビュー通過。auto モードのため人間チェックはなく、このままマージへ進む。

@smileygames
smileygames merged commit 3605755 into main Aug 21, 2026
2 checks passed
@smileygames
smileygames deleted the issue-31-addressee branch August 21, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(room): give utterances an addressee so agents can stay silent

1 participant