Compare commits
3 Commits
fix/socket
...
b659dadb9e
| Author | SHA1 | Date | |
|---|---|---|---|
| b659dadb9e | |||
| 20e55849eb | |||
| d47d3467df |
13
dist/fabric/src/channel.js
vendored
13
dist/fabric/src/channel.js
vendored
@@ -117,6 +117,19 @@ export const fabricChannelPlugin = createChatChannelPlugin({
|
||||
resolveAccount: (cfg, accountId) => resolveFabricAccount(cfg, accountId),
|
||||
defaultAccountId: (cfg) => resolveDefaultFabricAccountId(cfg),
|
||||
isConfigured: (account) => Boolean(account.fabricApiKey),
|
||||
// openclaw's channelManager.getRuntimeSnapshot() — called every minute
|
||||
// by the channel-health-monitor — defaults `configured: true` when the
|
||||
// plugin doesn't expose describeAccount (see applyDescribedAccountFields
|
||||
// in server-channels). Without this, fabric's synthetic 'default'
|
||||
// account (returned by listFabricAccountIds when channels.fabric.accounts
|
||||
// is empty — the prod shape) gets snapshot {enabled:true, configured:true,
|
||||
// running:false} → isManagedAccount=true → not-running → restart loop
|
||||
// every ~10 min, logging `[fabric:default] health-monitor: restarting`.
|
||||
// Mirror isConfigured here so the snapshot truthfully reports false for
|
||||
// any account without a fabricApiKey.
|
||||
describeAccount: (account) => ({
|
||||
configured: Boolean(account.fabricApiKey),
|
||||
}),
|
||||
},
|
||||
// Minimal setup adapter: Fabric is configured directly under
|
||||
// channels.fabric.* (no interactive wizard). applyAccountConfig is the
|
||||
|
||||
@@ -153,6 +153,19 @@ export const fabricChannelPlugin = createChatChannelPlugin<ResolvedFabricAccount
|
||||
resolveAccount: (cfg, accountId) => resolveFabricAccount(cfg as never, accountId),
|
||||
defaultAccountId: (cfg) => resolveDefaultFabricAccountId(cfg as never),
|
||||
isConfigured: (account: ResolvedFabricAccount) => Boolean(account.fabricApiKey),
|
||||
// openclaw's channelManager.getRuntimeSnapshot() — called every minute
|
||||
// by the channel-health-monitor — defaults `configured: true` when the
|
||||
// plugin doesn't expose describeAccount (see applyDescribedAccountFields
|
||||
// in server-channels). Without this, fabric's synthetic 'default'
|
||||
// account (returned by listFabricAccountIds when channels.fabric.accounts
|
||||
// is empty — the prod shape) gets snapshot {enabled:true, configured:true,
|
||||
// running:false} → isManagedAccount=true → not-running → restart loop
|
||||
// every ~10 min, logging `[fabric:default] health-monitor: restarting`.
|
||||
// Mirror isConfigured here so the snapshot truthfully reports false for
|
||||
// any account without a fabricApiKey.
|
||||
describeAccount: (account: ResolvedFabricAccount) => ({
|
||||
configured: Boolean(account.fabricApiKey),
|
||||
}),
|
||||
},
|
||||
// Minimal setup adapter: Fabric is configured directly under
|
||||
// channels.fabric.* (no interactive wizard). applyAccountConfig is the
|
||||
|
||||
Reference in New Issue
Block a user