Skip to content

fix(memory-core): isolate QMD mcporter config per agent#5

Closed
SYU8384 wants to merge 8784 commits into
mainfrom
fix/qmd-mcporter-agent-isolation
Closed

fix(memory-core): isolate QMD mcporter config per agent#5
SYU8384 wants to merge 8784 commits into
mainfrom
fix/qmd-mcporter-agent-isolation

Conversation

@SYU8384

@SYU8384 SYU8384 commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Summary

Isolates the QMD mcporter configuration per agent so that workspace/user-owned remote auth, lifecycle, logging, and cwd/path settings are preserved without being copied into OpenClaw-managed state. For agents without an explicit mcporter server definition, OpenClaw now generates a per-agent stdio config under $STATE/agents/<agentId>/qmd/mcporter/mcporter.json with manager-scoped QMD env vars.

Supersedes openclaw#79745.

Behavior addressed

  • Remote QMD servers with auth material (headers, env, URL credentials) stay external and use the original mcporter config.
  • Servers with lifecycle, daemon logging, or relative cwd/path are treated as user-owned and kept external.
  • Bare stdio QMD servers are rewritten into a generated per-agent config under OpenClaw state.
  • startDaemon=false now omits the keep-alive lifecycle in the generated config so mcporter does not auto-launch the daemon.
  • Snake-case remote endpoint keys (base_url, server_url) are recognized alongside camelCase.
  • Project-scoped mcporter configs are probed before the legacy home fallback.

Real environment tested

  • Linux, Node v24.15.0, mcporter 0.10.2, qmd 2.1.0 (bab86d5).
  • Two fresh OpenClaw agents with memory.backend: qmd and memory.qmd.mcporter.enabled: true.
  • No user MCPORTER_CONFIG; OpenClaw generated per-agent configs.

Exact steps or command run after this patch

  1. openclaw agent create <agent-a> / <agent-b> with QMD memory + mcporter enabled.
  2. Ran a memory search in each agent.
  3. Verified $STATE/agents/<agentId>/qmd/mcporter/mcporter.json exists and differs per agent.
  4. Verified generated config uses per-agent XDG_CONFIG_HOME / QMD_CONFIG_DIR / XDG_CACHE_HOME.
  5. Verified node scripts/run-vitest.mjs run --config test/vitest/vitest.extension-memory.config.ts extensions/memory-core/src/memory/qmd-manager.test.ts.

Evidence after fix

Test Files  1 passed (1)
     Tests  155 passed (155)

$autoreview passed: no accepted/actionable findings reported.

What was not tested

  • Windows paths.
  • Broken explicit MCPORTER_CONFIG still silently falls back to generated mode for the default qmd server; this is pre-existing behavior.

vincentkoc and others added 30 commits June 9, 2026 01:02
Fixes openclaw#90891.

Doctor now reports official managed plugin version drift from the daemon-local status path, using the probed running gateway version and suppressing the advisory when probe auth is skipped or unsafe. The status probe also avoids re-entering config-backed exec SecretRef credential resolution when exec refs are disabled.

Verification:
- `node scripts/run-vitest.mjs src/commands/agent-via-gateway.test.ts src/cli/daemon-cli/probe.test.ts src/cli/daemon-cli/status.gather.test.ts src/flows/doctor-health-contributions.test.ts src/commands/doctor-workspace-status.test.ts src/gateway/probe-auth.test.ts`
- `.agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main`
- Crabbox delegated Blacksmith Testbox `tbx_01ktmwa5q0c2eb688dkbkw8v2b`: `OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 OPENCLAW_CHANGED_LANES_RAW_SYNC=1 corepack pnpm check:changed`
Start the optional model catalog load early for chat.startup and cap startup-only catalog waiting at 25ms, while preserving the 750ms optional catalog wait for other gateway surfaces. Adds regressions for slow catalog omission, async cached metadata, and agent-scoped startup metadata.
Generic message ingress lacked commandSource, so /compact and other
authorized control commands were dropped when they missed bot.command.
Derive text-slash command metadata like Mattermost/iMessage.

Fixes openclaw#89525
…ch pipeline

The dispatch pipeline (foreground fence, operation-busy checks, hooks)
silently dropped status-notice replies for /compact. Resolve the command
reply directly via getReplyFromConfig and deliver status notices through
deliverReplies without entering the full dispatch pipeline. Non-status
commands still use the buffered dispatch for streaming/tools.

Adds deliverDespiteSourceReplySuppression metadata for command replies,
a dedicated native-command-ack-fallback module, and regression tests.

Fixes openclaw#89525

Co-authored-by: Cursor <[email protected]>
- Remove unused import normalizeOptionalLowercaseString from commands-compact.ts
- Remove unused type import ReplyPayload from bot-native-commands.ts
- Replace spread-in-map with Object.assign to satisfy oxlint
- Delete orphaned native-command-ack-fallback.ts and its test (superseded by direct delivery)
- Add isStatusNotice to ReplyPayloadLike test type
- Update test to verify status notices bypass dispatch pipeline
fuller-stack-dev and others added 27 commits June 10, 2026 14:54
…xt (openclaw#91478)

Move Telegram inbound authorization into a single pre-cache gate so unauthorized DM text is never recorded into the reply-chain cache or dispatch-dedupe state before allowlist/pairing checks run. The gate covers fresh messages, edited messages, group edits, and edited channel posts; edits are authorized silently and never trigger pairing challenges, and requireTopic root DMs are dropped before pairing challenges.

Fixes openclaw#91209.

Thanks @sallyom!
…plicit config (openclaw#91361)

Merged via squash.

Prepared head SHA: ac54596
Co-authored-by: wangmiao0668000666 <[email protected]>
Co-authored-by: velvet-shark <[email protected]>
Reviewed-by: @velvet-shark
…ote endpoint keys (base_url, server_url).\n- Probe project mcporter config before legacy home fallback.\n- Omit keep-alive lifecycle in generated config when startDaemon=false.
@SYU8384 SYU8384 closed this Jun 12, 2026
@SYU8384 SYU8384 reopened this Jun 12, 2026
@SYU8384 SYU8384 closed this Jun 12, 2026
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.