Skip to content

Commit 6bfe97c

Browse files
authored
Mem agent 0514 (#1774)
## Description Please include a summary of the change, the problem it solves, the implementation approach, and relevant context. List any dependencies required for this change. Related Issue (Required): Fixes #issue_number ## Type of change Please delete options that are not relevant. - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Refactor (does not change functionality, e.g. code style improvements, linting) - [ ] Documentation update ## How Has This Been Tested? Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration - [ ] Unit Test - [ ] Test Script Or Test Steps (please provide) - [ ] Pipeline Automated API Test (please provide) ## Checklist - [ ] I have performed a self-review of my own code | 我已自行检查了自己的代码 - [ ] I have commented my code in hard-to-understand areas | 我已在难以理解的地方对代码进行了注释 - [ ] I have added tests that prove my fix is effective or that my feature works | 我已添加测试以证明我的修复有效或功能正常 - [ ] I have created related documentation issue/PR in [MemOS-Docs](https://github.com/MemTensor/MemOS-Docs) (if applicable) | 我已在 [MemOS-Docs](https://github.com/MemTensor/MemOS-Docs) 中创建了相关的文档 issue/PR(如果适用) - [ ] I have linked the issue to this PR (if applicable) | 我已将 issue 链接到此 PR(如果适用) - [ ] I have mentioned the person who will review this PR | 我已提及将审查此 PR 的人 ## Reviewer Checklist - [ ] closes #xxxx (Replace xxxx with the GitHub issue number) - [ ] Made sure Checks passed - [ ] Tests have been provided
2 parents bed833f + cadd397 commit 6bfe97c

157 files changed

Lines changed: 10584 additions & 1853 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/openclaw-plugin-publish.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ on:
1010
description: "npm dist-tag (latest for production, beta/next/alpha for testing)"
1111
required: true
1212
default: "latest"
13+
git_ref:
14+
description: "Optional Git ref to build/publish (branch, tag, or SHA), e.g. mem-agent-0512. Leave blank to use the branch selected in Run workflow."
15+
required: false
16+
default: ""
17+
18+
concurrency:
19+
group: openclaw-plugin-publish-${{ github.workflow }}-${{ github.repository }}
20+
cancel-in-progress: false
1321

1422
defaults:
1523
run:
@@ -34,6 +42,8 @@ jobs:
3442
runs-on: ${{ matrix.os }}
3543
steps:
3644
- uses: actions/checkout@v4
45+
with:
46+
ref: ${{ inputs.git_ref != '' && inputs.git_ref || github.ref }}
3747

3848
- uses: actions/setup-node@v4
3949
with:
@@ -64,6 +74,8 @@ jobs:
6474
runs-on: ubuntu-latest
6575
steps:
6676
- uses: actions/checkout@v4
77+
with:
78+
ref: ${{ inputs.git_ref != '' && inputs.git_ref || github.ref }}
6779

6880
- uses: actions/setup-node@v4
6981
with:

apps/memos-local-openclaw/tests/policy.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import { captureMessages } from "../src/capture";
2222

2323
let plugin: MemosLocalPlugin;
2424
let tmpDir: string;
25+
const embeddingApiKey = process.env.INFINI_AI_EMBEDDING_API_KEY ?? "";
2526

2627
const noopLog = {
2728
debug: () => {},
@@ -38,7 +39,7 @@ beforeAll(async () => {
3839
embedding: {
3940
provider: "openai_compatible" as any,
4041
endpoint: "https://cloud.infini-ai.com/AIStudio/inference/api/if-dchmmprfd5jlyvsa/v1",
41-
apiKey: "sk-g3k5fclhdufjlzr3",
42+
apiKey: embeddingApiKey,
4243
model: "bge-embedding-m3",
4344
},
4445
},

apps/memos-local-plugin/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ coverage/
1717
TODO.local.md
1818
AGENTS_*.md
1919
.test_*
20+
.claude
2021

2122
# ARMS telemetry credentials — generated by CI from secrets before
2223
# `npm publish` (see scripts/generate-telemetry-credentials.cjs and

apps/memos-local-plugin/ARCHITECTURE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ heavyweight client today.
167167
Standard OpenClaw plugin. Imports `core/` directly. Provides:
168168

169169
- `plugin.ts``definePluginEntry` wiring; passes config + paths into `createMemoryCore`.
170-
- `tools.ts``memory_search`, `memory_get`, `memory_timeline` tool definitions.
170+
- `tools.ts``memos_search`, `memos_get`, `memos_timeline` tool definitions.
171171
- `hooks.ts``onConversationTurn`, `onShutdown`, etc.
172172
- `host-llm-bridge.ts` — when `llm.fallback_to_host: true`, route LLM calls
173173
through the OpenClaw host's LLM rather than failing.
@@ -237,7 +237,7 @@ to this codebase:
237237
| Trigger | What runs | Where it lands |
238238
|---------------------------------------------------|--------------------------------------------|--------------------------------------------|
239239
| New user turn arrives (`onConversationTurn`) | `turnStartRetrieve` — full Tier-1+2+3 | Prepended as `memos_context` to this turn |
240-
| LLM asks for `memory_search` / `memory_timeline` | `toolDrivenRetrieve` — Tier-1+2, no Tier-3 | Returned as the tool's result |
240+
| LLM asks for `memos_search` / `memos_timeline` | `toolDrivenRetrieve` — Tier-1+2, no Tier-3 | Returned as the tool's result |
241241
| LLM asks for `skill.<name>` directly | `skillInvokeRetrieve` — the named skill | Returned as the tool's result (cached) |
242242
| SubAgent starts (`onSubAgentStart`) | `subAgentRetrieve` — Tier-1+2 scoped to sub-agent role | Prepended to the sub-agent's first turn |
243243
| Decision-repair signal fires (see §4.3) | `repairRetrieve` — targeted preference/anti-pattern lookup | Prepended to the **next** LLM step |
@@ -275,7 +275,7 @@ agent.turn(input)
275275
│ └── tier3 (world-model, top-K=2)
276276
└── returns InjectionPacket to adapter
277277
─── agent.execute
278-
├── (optional) tool call: memory_search
278+
├── (optional) tool call: memos_search
279279
│ └── orchestrator.toolDrivenRetrieve (lightweight; no tier3)
280280
├── (optional) tool call: skill.<name>
281281
│ └── orchestrator.skillInvokeRetrieve (single skill, cached)

apps/memos-local-plugin/adapters/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ adapters/
2626
│ ├── README.md
2727
│ ├── openclaw-api.ts # locally re-declared OpenClaw SDK types
2828
│ ├── bridge.ts # OpenClaw events ↔ MemoryCore DTOs
29-
│ ├── tools.ts # memory_search, memory_get, … tool registrations
29+
│ ├── tools.ts # memos_search, memos_get, … tool registrations
3030
│ └── index.ts # register(api) — plugin entry point
3131
└── hermes/ # hermes-agent plugin (Python, out-of-process)
3232
├── README.md

apps/memos-local-plugin/adapters/hermes/install.hermes.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ if command -v npm >/dev/null 2>&1; then
3636
npm install --no-audit --no-fund --prefer-offline
3737
fi
3838
else
39-
warn "npm not found on PATH; bridge.cts requires Node.js ≥ 20."
39+
warn "npm not found on PATH; the bridge runtime requires Node.js ≥ 20."
4040
fi
4141

4242
# ── 2. viewer bundle ──────────────────────────────────────────────────────────

0 commit comments

Comments
 (0)