Skip to content

feat(agent): harden memory fallback and MCP tool controls#23

Open
anfibiacreativa wants to merge 2 commits intomainfrom
feat/memory-mcp-hardening
Open

feat(agent): harden memory fallback and MCP tool controls#23
anfibiacreativa wants to merge 2 commits intomainfrom
feat/memory-mcp-hardening

Conversation

@anfibiacreativa
Copy link
Copy Markdown
Collaborator

Summary

  • Add deterministic fallback logic for project memory persistence when model tool-calls do not execute.
  • Add MCP tool override enforcement and support for per-server request headers in agent-side flows.

Why

  • Memory updates were not reliably persisted when the LLM skipped or missed write_project_memory.
  • Teams need safer control over available tools and support for authenticated/private MCP servers.

What Changed

  • Add server-side fallback path to synthesize and persist compact memory notes with stronger relevance gating.
  • Add tool override loading and filtering so disabled tools are removed before model execution.
  • Thread mcpServerHeaders through MCP tool listing and chat registration paths.
  • Keep skill loading behavior aligned with config status to prevent draft content leakage.

Test Plan

  • Run npm test in da-agent and verify memory/tool-override unit coverage.
  • Manually send chat requests with and without mcpServerHeaders and verify tool availability.
  • Confirm disabled tools from config are excluded in runtime tool registry.

Risks / Follow-ups

  • Fallback memory writes may still need tuning to avoid noisy persistence on marginal relevance conversations.

Add deterministic memory persistence fallback and MCP tool override enforcement, while removing compact-context stream artifacts from this branch.
Check config status before serving .da/skills markdown so draft skills cannot leak through file fallback, and add regression coverage for draft rows with an existing file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant