fix: tighten plugin session conversation routing

This commit is contained in:
Gustavo Madeira Santana
2026-03-31 11:33:11 -04:00
parent 42a74bb635
commit c6b3d134f9
17 changed files with 275 additions and 110 deletions

View File

@@ -36,10 +36,16 @@ Core owns the shared message tool, prompt wiring, the outer session-key shape,
generic `:thread:` bookkeeping, and dispatch.
If your platform stores extra scope inside conversation ids, keep that parsing
in the plugin by implementing `messaging.resolveSessionConversation(...)` and
`messaging.resolveParentConversationCandidates(...)`. Use those hooks for
platform-specific suffixes or inheritance rules instead of adding provider
checks to core.
in the plugin with `messaging.resolveSessionConversation(...)`. That is the
canonical hook for mapping `rawId` to the base conversation id, optional thread
id, and any `parentConversationCandidates`.
`messaging.resolveParentConversationCandidates(...)` remains available as a
legacy compatibility fallback when a plugin only needs parent fallbacks on top
of the generic/raw id. If both hooks exist, core uses
`resolveSessionConversation(...).parentConversationCandidates` first and only
falls back to `resolveParentConversationCandidates(...)` when the canonical hook
omits them.
## Approvals and channel capabilities