refactor(tools): reflow long log/message string runs (AST-verified)
This commit is contained in:
@@ -719,11 +719,10 @@ class ToolRegistry:
|
||||
if override:
|
||||
if plugin_override_denied:
|
||||
logger.error(
|
||||
"Tool registration REJECTED: plugin %r attempted to "
|
||||
"override built-in tool %r (existing toolset %r) without "
|
||||
"operator opt-in. Set "
|
||||
"plugins.entries.<plugin_id>.allow_tool_override: true "
|
||||
"in config.yaml to allow it.",
|
||||
"Tool registration REJECTED: plugin %r attempted to override built-in "
|
||||
"tool %r (existing toolset %r) without operator opt-in. Set "
|
||||
"plugins.entries.<plugin_id>.allow_tool_override: true in config.yaml "
|
||||
"to allow it.",
|
||||
owner, name, existing.toolset)
|
||||
raise PermissionError(_OVERRIDE_DENIED_MSG.format(owner=owner, name=name))
|
||||
# Explicit opt-in (or non-plugin caller): replace the tool; INFO so
|
||||
@@ -736,10 +735,9 @@ class ToolRegistry:
|
||||
# Reject every cross-toolset shadow, including MCP-to-MCP collisions.
|
||||
# MCP reconnect/refresh re-registers within the same toolset: allowed.
|
||||
logger.error(
|
||||
"Tool registration REJECTED: '%s' (toolset '%s') would "
|
||||
"shadow existing tool from toolset '%s'. Pass "
|
||||
"override=True to register() if the replacement is "
|
||||
"intentional, or deregister the existing tool first.",
|
||||
"Tool registration REJECTED: '%s' (toolset '%s') would shadow existing "
|
||||
"tool from toolset '%s'. Pass override=True to register() if the "
|
||||
"replacement is intentional, or deregister the existing tool first.",
|
||||
name, toolset, existing.toolset)
|
||||
return
|
||||
target[name] = ToolEntry(
|
||||
|
||||
@@ -588,8 +588,7 @@ def _block_message(operation: str, root: Path) -> str:
|
||||
f"({root}) and can mix module versions in this running process. "
|
||||
f"Use a separate worktree or a shared clone on real disk, e.g. "
|
||||
f"`git clone --shared {root} {scratch}/<task>` — avoid /tmp for "
|
||||
"clones that install node/python deps: /tmp is usually RAM-backed "
|
||||
"tmpfs and a few dependency installs can fill it and ENOSPC other "
|
||||
"work. Delete the clone when the branch is pushed. To change this "
|
||||
"checkout, stop Hermes, run the command externally, then restart "
|
||||
"clones that install node/python deps: /tmp is usually RAM-backed tmpfs and a few "
|
||||
"dependency installs can fill it and ENOSPC other work. Delete the clone when the branch "
|
||||
"is pushed. To change this checkout, stop Hermes, run the command externally, then restart "
|
||||
"Hermes.")
|
||||
|
||||
Reference in New Issue
Block a user