Skip to content

feat(memos-local-openclaw): support profile-aware OpenClaw paths#1225

Open
Larkspur-Wang wants to merge 1 commit intoMemTensor:dev-20260309-v2.0.9from
Larkspur-Wang:feat/openclaw-profile-aware-plugin
Open

feat(memos-local-openclaw): support profile-aware OpenClaw paths#1225
Larkspur-Wang wants to merge 1 commit intoMemTensor:dev-20260309-v2.0.9from
Larkspur-Wang:feat/openclaw-profile-aware-plugin

Conversation

@Larkspur-Wang
Copy link

Background | 背景

Closes #1224

memos-local-openclaw still falls back to ~/.openclaw in several runtime paths, which breaks instance isolation when OpenClaw is started with --profile.

memos-local-openclaw 在若干运行时路径上仍然会回退到 ~/.openclaw,这会破坏 OpenClaw 使用 --profile 启动时的实例隔离。

This can cause the plugin to read or write config, viewer data, migration sources, and fallback model settings from the default instance instead of the active profile instance.

这会导致插件从默认实例而不是当前 profile 实例读取或写入配置、viewer 数据、migration 数据源,以及 fallback model 配置。

Changes | 改动

  • add profile-aware OpenClaw path helpers

  • make viewer config read/write use the active instance state dir

  • make viewer migration scan use the active instance state dir

  • make OpenClaw fallback model config load from the active instance state dir

  • pass stateDir through the summarizer call chain

  • keep default behavior unchanged when no explicit profile state dir is provided

  • 增加 profile-aware 的 OpenClaw 路径辅助函数

  • 让 viewer 的配置读写使用当前实例的 stateDir

  • 让 viewer 的 migration 扫描使用当前实例的 stateDir

  • 让 OpenClaw fallback model 配置从当前实例的 stateDir 加载

  • 在 summarizer 调用链中透传 stateDir

  • 在未提供显式 profile stateDir 时保持默认行为不变

Tests | 测试

  • npm run build
  • npm test -- tests/profile-paths.test.ts tests/plugin-impl-access.test.ts tests/shutdown-lifecycle.test.ts

Scope | 范围说明

  • no schema changes

  • no recall algorithm changes

  • no embedding algorithm changes

  • no install-script or README changes in this PR

  • 不涉及 schema 变更

  • 不涉及 recall 算法变更

  • 不涉及 embedding 算法变更

  • 本 PR 不包含安装脚本或 README 修改

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.

2 participants