fix(chat): compress-history on PostgreSQL dict rows

- Normalize select id,content rows from dict_row vs sqlite Row in history_tool_result_compact.

- Expand memory_wiki_search ToolSpec to match wiki_search parameters; add schema regression test.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-05-15 19:22:45 +08:00
parent 0dc0c4663f
commit acfb2cf73b
4 changed files with 56 additions and 4 deletions

View file

@ -99,10 +99,27 @@ def _search_tool(public_name: str, desc: str) -> ToolSpec:
parameters={
"type": "object",
"properties": {
"query": {"type": "string"},
"limit": {"type": "integer"},
"query": {"type": "string", "description": "Search query string."},
"limit": {"type": "integer", "description": "Max hits per page (server caps to wiki max)."},
"offset": {"type": "integer", "description": "Hit offset for pagination (0-based)."},
"context_lines": {
"type": "integer",
"description": "Lines of context around each match (server caps at 5).",
},
"is_regex": {"type": "boolean"},
"case_sensitive": {"type": "boolean"},
"path_prefix": {
"type": "string",
"description": "Only search under this relative path prefix (e.g. users/).",
},
"expand_query": {
"type": "boolean",
"description": "If true, try synonym-expanded variants (ignored when is_regex is true).",
},
"max_rounds": {
"type": "integer",
"description": "Max expansion rounds when expand_query is true (1–5).",
},
},
"required": ["query"],
"additionalProperties": False,