mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 09:01:22 +00:00
fix: harden agent gateway authorization scopes
This commit is contained in:
@@ -61,6 +61,8 @@ export function createOpenClawTools(options?: {
|
||||
requireExplicitMessageTarget?: boolean;
|
||||
/** If true, omit the message tool from the tool list. */
|
||||
disableMessageTool?: boolean;
|
||||
/** Whether the requesting sender is an owner. */
|
||||
senderIsOwner?: boolean;
|
||||
}): AnyAgentTool[] {
|
||||
const workspaceDir = resolveWorkspaceRoot(options?.workspaceDir);
|
||||
const imageTool = options?.agentDir?.trim()
|
||||
@@ -109,6 +111,7 @@ export function createOpenClawTools(options?: {
|
||||
}),
|
||||
createCronTool({
|
||||
agentSessionKey: options?.agentSessionKey,
|
||||
senderIsOwner: options?.senderIsOwner,
|
||||
}),
|
||||
...(messageTool ? [messageTool] : []),
|
||||
createTtsTool({
|
||||
@@ -118,6 +121,7 @@ export function createOpenClawTools(options?: {
|
||||
createGatewayTool({
|
||||
agentSessionKey: options?.agentSessionKey,
|
||||
config: options?.config,
|
||||
senderIsOwner: options?.senderIsOwner,
|
||||
}),
|
||||
createAgentsListTool({
|
||||
agentSessionKey: options?.agentSessionKey,
|
||||
|
||||
Reference in New Issue
Block a user