Refactor: move session conversation grammar into channel plugins

This commit is contained in:
Gustavo Madeira Santana
2026-03-31 10:01:19 -04:00
parent bf0f33db32
commit 42a74bb635
26 changed files with 683 additions and 243 deletions

View File

@@ -159,6 +159,8 @@ The current boundary is:
bookkeeping, and execution dispatch
- channel plugins own scoped action discovery, capability discovery, and any
channel-specific schema fragments
- channel plugins own provider-specific session conversation grammar, such as
how conversation ids encode thread ids or inherit from parent conversations
- channel plugins execute the final action through their action adapter
For channel plugins, the SDK surface is

View File

@@ -28,11 +28,18 @@ shared `message` tool in core. Your plugin owns:
- **Config** — account resolution and setup wizard
- **Security** — DM policy and allowlists
- **Pairing** — DM approval flow
- **Session grammar** — how provider-specific conversation ids map to base chats, thread ids, and parent fallbacks
- **Outbound** — sending text, media, and polls to the platform
- **Threading** — how replies are threaded
Core owns the shared message tool, prompt wiring, session bookkeeping, and
dispatch.
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.
## Approvals and channel capabilities