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:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user