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

@@ -154,7 +154,7 @@
"exportName": "ChannelMessageActionAdapter",
"kind": "type",
"source": {
"line": 529,
"line": 551,
"path": "src/channels/plugins/types.core.ts"
}
},
@@ -163,7 +163,7 @@
"exportName": "ChannelMessageActionContext",
"kind": "type",
"source": {
"line": 493,
"line": 515,
"path": "src/channels/plugins/types.core.ts"
}
},
@@ -1170,7 +1170,7 @@
"exportName": "BaseProbeResult",
"kind": "type",
"source": {
"line": 572,
"line": 594,
"path": "src/channels/plugins/types.core.ts"
}
},
@@ -1179,7 +1179,7 @@
"exportName": "BaseTokenResolution",
"kind": "type",
"source": {
"line": 578,
"line": 600,
"path": "src/channels/plugins/types.core.ts"
}
},
@@ -1224,7 +1224,7 @@
"exportName": "ChannelMessageActionAdapter",
"kind": "type",
"source": {
"line": 529,
"line": 551,
"path": "src/channels/plugins/types.core.ts"
}
},
@@ -1233,7 +1233,7 @@
"exportName": "ChannelMessageActionContext",
"kind": "type",
"source": {
"line": 493,
"line": 515,
"path": "src/channels/plugins/types.core.ts"
}
},
@@ -1752,7 +1752,7 @@
"exportName": "BaseProbeResult",
"kind": "type",
"source": {
"line": 572,
"line": 594,
"path": "src/channels/plugins/types.core.ts"
}
},
@@ -1761,7 +1761,7 @@
"exportName": "BaseTokenResolution",
"kind": "type",
"source": {
"line": 578,
"line": 600,
"path": "src/channels/plugins/types.core.ts"
}
},
@@ -1797,7 +1797,7 @@
"exportName": "ChannelAgentPromptAdapter",
"kind": "type",
"source": {
"line": 466,
"line": 488,
"path": "src/channels/plugins/types.core.ts"
}
},
@@ -1977,7 +1977,7 @@
"exportName": "ChannelDirectoryEntry",
"kind": "type",
"source": {
"line": 480,
"line": 502,
"path": "src/channels/plugins/types.core.ts"
}
},
@@ -1986,7 +1986,7 @@
"exportName": "ChannelDirectoryEntryKind",
"kind": "type",
"source": {
"line": 478,
"line": 500,
"path": "src/channels/plugins/types.core.ts"
}
},
@@ -2130,7 +2130,7 @@
"exportName": "ChannelMessageActionAdapter",
"kind": "type",
"source": {
"line": 529,
"line": 551,
"path": "src/channels/plugins/types.core.ts"
}
},
@@ -2139,7 +2139,7 @@
"exportName": "ChannelMessageActionContext",
"kind": "type",
"source": {
"line": 493,
"line": 515,
"path": "src/channels/plugins/types.core.ts"
}
},
@@ -2274,7 +2274,7 @@
"exportName": "ChannelPollContext",
"kind": "type",
"source": {
"line": 560,
"line": 582,
"path": "src/channels/plugins/types.core.ts"
}
},
@@ -2283,7 +2283,7 @@
"exportName": "ChannelPollResult",
"kind": "type",
"source": {
"line": 551,
"line": 573,
"path": "src/channels/plugins/types.core.ts"
}
},
@@ -2427,7 +2427,7 @@
"exportName": "ChannelToolSend",
"kind": "type",
"source": {
"line": 522,
"line": 544,
"path": "src/channels/plugins/types.core.ts"
}
},
@@ -2683,7 +2683,7 @@
"exportName": "buildCommandsMessage",
"kind": "function",
"source": {
"line": 1075,
"line": 1076,
"path": "src/auto-reply/status.ts"
}
},
@@ -2692,7 +2692,7 @@
"exportName": "buildCommandsMessagePaginated",
"kind": "function",
"source": {
"line": 1084,
"line": 1085,
"path": "src/auto-reply/status.ts"
}
},
@@ -2728,7 +2728,7 @@
"exportName": "buildHelpMessage",
"kind": "function",
"source": {
"line": 870,
"line": 871,
"path": "src/auto-reply/status.ts"
}
},
@@ -3738,7 +3738,7 @@
"exportName": "ChannelMessageActionContext",
"kind": "type",
"source": {
"line": 493,
"line": 515,
"path": "src/channels/plugins/types.core.ts"
}
},

File diff suppressed because one or more lines are too long

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