feat: loadable openclaw channel plugin v1 (agent=account)

Rewritten against the real openclaw v2026.5.7 plugin SDK (generic
third-party channel path): createChannelPluginBase + createChatChannelPlugin
with required capabilities, minimal ChannelSetupAdapter, agent=account
config resolution, attached outbound -> Fabric POST, inbound socket per
account -> runtime.channel.turn (wakeup->admission). Compat notes mark
SDK-coupled seams for future openclaw upgrades. Verified: builds clean,
installs, 'openclaw channels list' -> Fabric installed/configured/enabled.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
h z
2026-05-15 17:54:32 +01:00
parent 7fed6d07f6
commit ece77ff2c7
8 changed files with 412 additions and 159 deletions

View File

@@ -39,10 +39,15 @@ export class FabricInbound {
private readonly client: FabricClient,
private readonly identity: IdentityRegistry,
private readonly log: Logger,
private readonly accounts: Array<{ agentId: string; fabricApiKey: string }> = [],
) {}
async start(): Promise<void> {
for (const entry of this.identity.list()) {
const entries =
this.accounts.length > 0
? this.accounts.map((a) => ({ agentId: a.agentId, fabricApiKey: a.fabricApiKey }))
: this.identity.list();
for (const entry of entries) {
try {
const session = await this.client.agentLogin(entry.fabricApiKey);
this.identity.upsert({