mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-21 18:55:16 +02:00
chore: linting
This commit is contained in:
parent
219a5977b7
commit
c187b04e82
25 changed files with 102 additions and 108 deletions
|
|
@ -28,7 +28,9 @@ def mcp_signature(mcp_tools_by_agent: dict[str, list[BaseTool]]) -> str:
|
|||
"""Hash the per-agent MCP tool surface so a change rotates the cache key."""
|
||||
rows = []
|
||||
for agent_name in sorted(mcp_tools_by_agent.keys()):
|
||||
names = sorted(getattr(t, "name", "") or "" for t in mcp_tools_by_agent[agent_name])
|
||||
names = sorted(
|
||||
getattr(t, "name", "") or "" for t in mcp_tools_by_agent[agent_name]
|
||||
)
|
||||
rows.append((agent_name, names))
|
||||
return stable_hash(rows)
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,9 @@ RULESET = Ruleset(
|
|||
Rule(permission="getVisibleJiraProjects", pattern="*", action="allow"),
|
||||
Rule(permission="searchJiraIssuesUsingJql", pattern="*", action="allow"),
|
||||
Rule(permission="getJiraIssue", pattern="*", action="allow"),
|
||||
Rule(permission="getJiraProjectIssueTypesMetadata", pattern="*", action="allow"),
|
||||
Rule(
|
||||
permission="getJiraProjectIssueTypesMetadata", pattern="*", action="allow"
|
||||
),
|
||||
Rule(permission="getJiraIssueTypeMetaWithFields", pattern="*", action="allow"),
|
||||
Rule(permission="getTransitionsForJiraIssue", pattern="*", action="allow"),
|
||||
Rule(permission="lookupJiraAccountId", pattern="*", action="allow"),
|
||||
|
|
|
|||
|
|
@ -585,7 +585,7 @@ class KnowledgePriorityMiddleware(AgentMiddleware): # type: ignore[type-arg]
|
|||
available_document_types: list[str] | None = None,
|
||||
top_k: int = 10,
|
||||
mentioned_document_ids: list[int] | None = None,
|
||||
inject_system_message: bool = True, # For backwards compatibility
|
||||
inject_system_message: bool = True, # For backwards compatibility
|
||||
) -> None:
|
||||
self.llm = llm
|
||||
self.search_space_id = search_space_id
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ class KnowledgeTreeMiddleware(AgentMiddleware): # type: ignore[type-arg]
|
|||
llm: BaseChatModel | None = None,
|
||||
max_entries: int = MAX_TREE_ENTRIES,
|
||||
max_tokens: int = MAX_TREE_TOKENS,
|
||||
inject_system_message: bool = True, # For backwards compatibility
|
||||
inject_system_message: bool = True, # For backwards compatibility
|
||||
) -> None:
|
||||
self.search_space_id = search_space_id
|
||||
self.filesystem_mode = filesystem_mode
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue