fix: preserve explicit Feishu bitable gates · openclaw/openclaw@73bb84e
2026-06-01
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -584,6 +584,10 @@ Full configuration: [Gateway configuration](/gateway/configuration)
|
584 | 584 | | `channels.feishu.blockStreaming` | Completed-block reply streaming | `false` | |
585 | 585 | | `channels.feishu.typingIndicator` | Send typing reactions | `true` | |
586 | 586 | | `channels.feishu.resolveSenderNames` | Resolve sender display names | `true` | |
| 587 | +| `channels.feishu.tools.bitable` | Enable Bitable/Base tools | `true` | |
| 588 | +| `channels.feishu.tools.base` | Alias for `channels.feishu.tools.bitable`; explicit `bitable` wins when both set | `true` | |
| 589 | +| `channels.feishu.accounts.<id>.tools.bitable` | Per-account Bitable/Base tool gate | inherited | |
| 590 | +| `channels.feishu.accounts.<id>.tools.base` | Per-account alias for `tools.bitable` | inherited | |
587 | 591 | |
588 | 592 | --- |
589 | 593 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -198,7 +198,10 @@ function mergeFeishuAccountConfig(cfg: ClawdbotConfig, accountId: string): Feish
|
198 | 198 | if (merged.tools === undefined && topTools !== undefined) { |
199 | 199 | return { ...merged, tools: topTools }; |
200 | 200 | } |
201 | | -if (topTools?.bitable === false || topTools?.base === false) { |
| 201 | +if ( |
| 202 | +topTools?.bitable === false || |
| 203 | +(topTools?.bitable === undefined && topTools?.base === false) |
| 204 | +) { |
202 | 205 | return { |
203 | 206 | ...merged, |
204 | 207 | tools: { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -274,6 +274,21 @@ describe("feishu tool account routing", () => {
|
274 | 274 | ).toBe(0); |
275 | 275 | }); |
276 | 276 | |
| 277 | +test("explicit top-level bitable enable wins over disabled base alias in account merge", async () => { |
| 278 | +const { api, resolveTool } = createToolFactoryHarness( |
| 279 | +createConfig({ |
| 280 | +topTools: { bitable: true, base: false }, |
| 281 | +toolsA: { bitable: true }, |
| 282 | +}), |
| 283 | +); |
| 284 | +registerFeishuBitableTools(api); |
| 285 | + |
| 286 | +const tool = resolveTool("feishu_bitable_get_meta", { agentAccountId: "a" }); |
| 287 | +await tool.execute("call", { url: "invalid-url" }); |
| 288 | + |
| 289 | +expect(createFeishuClientMock.mock.calls.at(-1)?.[0]?.appId).toBe("app-a"); |
| 290 | +}); |
| 291 | + |
277 | 292 | test("bitable tools are not registered when account bitable configs disable them", async () => { |
278 | 293 | const { api, registered, resolveTool } = createToolFactoryHarness( |
279 | 294 | createConfig({ |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。