refactor: remove sender owner tool gating · openclaw/openclaw@02182d5
steipete
·
2026-05-21
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -8,6 +8,7 @@ Docs: https://docs.openclaw.ai
|
8 | 8 | |
9 | 9 | - Gateway/plugins: reuse a compatible Gateway startup plugin registry during dispatch so safe plugin dispatches avoid redundant registry loading. (#84324) Thanks @ai-hpc. |
10 | 10 | - Dependencies: refresh provider, plugin, UI, and tooling packages, update `protobufjs` to 8.4.0 to clear the current npm advisory, and carry the Claude ACP completion patch forward to `@agentclientprotocol/claude-agent-acp` 0.36.1. |
| 11 | +- Agents/tools: remove the old sender-owner tool gating path so configured tools stay visible for trusted sessions while command and channel-action auth still carry real sender identity. |
11 | 12 | - Tests/perf: isolate doctor core health check unit coverage from real skills/workspace discovery so `doctor-core-checks` no longer dominates unit perf while keeping one real skills-readiness smoke. (#84493) Thanks @frankekn. |
12 | 13 | |
13 | 14 | ### Fixes |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -105,7 +105,6 @@ describe("ClickClack account resolution", () => {
|
105 | 105 | enabled: true, |
106 | 106 | reconnectMs: 1_500, |
107 | 107 | replyMode: "agent", |
108 | | -senderIsOwner: false, |
109 | 108 | token: "ccb_live", |
110 | 109 | workspace: "wsp_1", |
111 | 110 | }); |
@@ -125,7 +124,6 @@ describe("ClickClack account resolution", () => {
|
125 | 124 | replyMode: "model", |
126 | 125 | model: "openai/gpt-5.4-mini", |
127 | 126 | toolsAllow: ["web_search"], |
128 | | -senderIsOwner: true, |
129 | 127 | }, |
130 | 128 | }, |
131 | 129 | }, |
@@ -144,7 +142,6 @@ describe("ClickClack account resolution", () => {
|
144 | 142 | enabled: true, |
145 | 143 | model: "openai/gpt-5.4-mini", |
146 | 144 | replyMode: "model", |
147 | | -senderIsOwner: true, |
148 | 145 | token: "ccb_peter", |
149 | 146 | toolsAllow: ["web_search"], |
150 | 147 | workspace: "wsp_1", |
@@ -155,7 +152,6 @@ describe("ClickClack account resolution", () => {
|
155 | 152 | model: "openai/gpt-5.4-mini", |
156 | 153 | reconnectMs: 1_500, |
157 | 154 | replyMode: "model", |
158 | | -senderIsOwner: true, |
159 | 155 | token: "ccb_peter", |
160 | 156 | toolsAllow: ["web_search"], |
161 | 157 | workspace: "wsp_1", |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -126,7 +126,6 @@ export function resolveClickClackAccount(params: {
|
126 | 126 | systemPrompt: normalizeOptionalString(merged.systemPrompt), |
127 | 127 | timeoutSeconds: merged.timeoutSeconds, |
128 | 128 | toolsAllow: merged.toolsAllow, |
129 | | -senderIsOwner: merged.senderIsOwner === true, |
130 | 129 | defaultTo: merged.defaultTo?.trim() || "channel:general", |
131 | 130 | allowFrom: merged.allowFrom ?? ["*"], |
132 | 131 | reconnectMs: merged.reconnectMs ?? DEFAULT_RECONNECT_MS, |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -16,7 +16,6 @@ const ClickClackAccountConfigSchema = z
|
16 | 16 | systemPrompt: z.string().optional(), |
17 | 17 | timeoutSeconds: z.number().int().min(1).max(3_600).optional(), |
18 | 18 | toolsAllow: z.array(z.string()).optional(), |
19 | | -senderIsOwner: z.boolean().optional(), |
20 | 19 | defaultTo: z.string().optional(), |
21 | 20 | allowFrom: z.array(z.string()).optional(), |
22 | 21 | reconnectMs: z.number().int().min(100).max(60_000).optional(), |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -94,7 +94,6 @@ describe("handleClickClackInbound", () => {
|
94 | 94 | agentId: "service-bot", |
95 | 95 | replyMode: "model", |
96 | 96 | model: "openai/gpt-5.4-mini", |
97 | | -senderIsOwner: false, |
98 | 97 | toolsAllow: [], |
99 | 98 | defaultTo: "channel:general", |
100 | 99 | allowFrom: ["*"], |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -13,7 +13,6 @@ export type ClickClackAccountConfig = {
|
13 | 13 | systemPrompt?: string; |
14 | 14 | timeoutSeconds?: number; |
15 | 15 | toolsAllow?: string[]; |
16 | | -senderIsOwner?: boolean; |
17 | 16 | defaultTo?: string; |
18 | 17 | allowFrom?: string[]; |
19 | 18 | reconnectMs?: number; |
@@ -45,7 +44,6 @@ export type ResolvedClickClackAccount = {
|
45 | 44 | systemPrompt?: string; |
46 | 45 | timeoutSeconds?: number; |
47 | 46 | toolsAllow?: string[]; |
48 | | -senderIsOwner: boolean; |
49 | 47 | defaultTo: string; |
50 | 48 | allowFrom: string[]; |
51 | 49 | reconnectMs: number; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -3343,7 +3343,6 @@ async function buildDynamicTools(input: DynamicToolBuildParams) {
|
3343 | 3343 | senderName: params.senderName, |
3344 | 3344 | senderUsername: params.senderUsername, |
3345 | 3345 | senderE164: params.senderE164, |
3346 | | -senderIsOwner: params.senderIsOwner, |
3347 | 3346 | allowGatewaySubagentBinding: |
3348 | 3347 | params.allowGatewaySubagentBinding || isForcedPrivateQaCodexRuntime(), |
3349 | 3348 | ...sessionKeys, |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -104,8 +104,6 @@ export class AgentComponentButton extends Button {
|
104 | 104 | enqueueSystemEvent(eventText, { |
105 | 105 | sessionKey: route.sessionKey, |
106 | 106 | contextKey: `discord:agent-button:${channelId}:${componentId}:${userId}`, |
107 | | -forceSenderIsOwnerFalse: true, |
108 | | -trusted: false, |
109 | 107 | }); |
110 | 108 | |
111 | 109 | await ackComponentInteraction({ interaction, replyOpts, label: "agent button" }); |
@@ -198,8 +196,6 @@ export class AgentSelectMenu extends StringSelectMenu {
|
198 | 196 | enqueueSystemEvent(eventText, { |
199 | 197 | sessionKey: route.sessionKey, |
200 | 198 | contextKey: `discord:agent-select:${channelId}:${componentId}:${userId}`, |
201 | | -forceSenderIsOwnerFalse: true, |
202 | | -trusted: false, |
203 | 199 | }); |
204 | 200 | |
205 | 201 | await ackComponentInteraction({ interaction, replyOpts, label: "agent select" }); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -501,8 +501,6 @@ async function handleDiscordReactionEvent(
|
501 | 501 | enqueueSystemEvent(text, { |
502 | 502 | sessionKey: route.sessionKey, |
503 | 503 | contextKey, |
504 | | -forceSenderIsOwnerFalse: true, |
505 | | -trusted: false, |
506 | 504 | }); |
507 | 505 | }; |
508 | 506 | const shouldNotifyReaction = (options: { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -724,8 +724,6 @@ export async function preflightDiscordMessage(
|
724 | 724 | enqueueSystemEvent(systemText, { |
725 | 725 | sessionKey: effectiveRoute.sessionKey, |
726 | 726 | contextKey: `discord:system:${messageChannelId}:${message.id}`, |
727 | | -forceSenderIsOwnerFalse: true, |
728 | | -trusted: false, |
729 | 727 | }); |
730 | 728 | return null; |
731 | 729 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。