mateclaw/mateclaw-ui/src/composables
matevip 5e6764ecf1 fix(skill): tool-gate whitelist + markdown link host normalization
When an agent had any skill bound, the runtime tool gate was silently
hiding @Tool beans that aren't declared in any skill manifest, even
though the global system prompts (SOUL.md / "Web Search Capability" /
"File Reading Guidelines") explicitly tell the LLM these tools are
available. Result: the model would call search / renderDocx / read_file
/ etc., hit "Tool not found", then either give up or fall back to
unhelpful behaviour (e.g. dumping markdown text instead of producing a
.docx download).

This commit:

- Adds universally-promised, agent-wide tools to SYSTEM_LEVEL_TOOLS so
  they bypass the manifest restriction: document/media generation
  (renderDocx*, image_generate, music_generate, video_generate),
  global capability tools the system prompt mentions (search,
  browser_use, read_file / write_file / edit_file /
  execute_shell_command, detect_file_type, extract_*_text,
  readMateClawDoc), skill discovery siblings (listSkillFiles,
  listAvailableSkills), and the delegate triplet (delegateToAgent,
  delegateParallel, listAvailableAgents).

- Fixes 5 entries in the prior whitelist whose names did not match
  any real @Tool bean and were therefore silently dead:
    read_workspace_file   -> read_workspace_memory_file
    write_workspace_file  -> write_workspace_memory_file
    list_workspace_files  -> list_workspace_memory_files
    delegate_agent        -> delegateToAgent
    datetime              -> getCurrentDate / getCurrentDateTime / getCurrentTime
  Also adds the missing edit_workspace_memory_file.

- In the chat markdown renderer, strips any hallucinated
  https?://<host> prefix from /api/v1/files/generated/<id> download
  links before building the <a href>. Multiple LLMs have been
  observed prepending bogus hosts when echoing tool-returned download
  URLs back to the user, breaking the click. One-line defensive
  normalization independent of which model is in use.

Verified end-to-end on a previously-broken agent: search / browser_use
/ execute_shell_command / renderDocx all dispatch correctly now and
the final markdown link is a clean same-origin path. 36 whitelist
entries cross-checked against real @Tool method names.
AgentBindingServiceTest green.
2026-05-01 12:24:25 +08:00
..
channels fix(channels): close QR loading dead-window for feishu and dingtalk register flows 2026-04-28 11:14:14 +08:00
chat fix(chat): surface SSE error in retry card and stop poll from wiping local-only failed turn 2026-04-28 00:16:14 +08:00
useAuthenticatedAttachment.ts feat(video): support video upload, preview, and multimodal analysis 2026-04-06 09:42:54 +08:00
useEChartsRenderer.ts feat(datasource): add auto ECharts visualization for SQL query results 2026-04-06 14:53:22 +08:00
useKatexRenderer.ts fix(wiki): smaller batch-create + resume button for partial generation 2026-04-26 18:42:27 +08:00
useMarkdownRenderer.ts fix(skill): tool-gate whitelist + markdown link host normalization 2026-05-01 12:24:25 +08:00
useMermaidRenderer.ts fix(wiki): smaller batch-create + resume button for partial generation 2026-04-26 18:42:27 +08:00
usePixelarticons.ts feat(ui): agent integration of SkillIcon + SkillIconPicker 2026-05-01 10:58:15 +08:00
useSkillName.ts feat(skill): BuiltinSkillSeedService — close SQL/SKILL.md double-write 2026-04-24 06:55:18 +08:00
useToolLabel.ts feat(ui): localize tool call display via useToolLabel 2026-04-23 08:09:37 +08:00
useWikiJobPoller.ts chore: sync multiple commits from private dev 2026-04-19 18:37:44 +08:00