Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,17 @@ jobs:
pip install dist/*.tar.gz
pip uninstall -y memoryos

# Ruff checks
- name: Install test group dependencies
# Ruff and Pre-commit checks
- name: Install test and dev group dependencies
run: |
poetry install --no-interaction --with test
poetry install --no-interaction --with test --with dev
- name: Ruff checks
run: |
poetry run ruff check
poetry run ruff format --check
- name: Pre-commit checks
run: |
poetry run pre-commit run -a

# PyTest checks
- name: Install all extra dependencies
Expand Down
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ repos:
- id: check-toml
exclude: tests/fixtures/invalid_lock/poetry\.lock
- id: check-yaml
exclude: ^deploy/helm/templates/
- id: pretty-format-json
args: [--autofix, --no-ensure-ascii, --no-sort-keys]
- id: check-ast
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ format:
pre_commit:
poetry run pre-commit run -a

# Alias for pre_commit
precommit: pre_commit

serve:
poetry run uvicorn memos.api.server_api:app

Expand Down
10 changes: 5 additions & 5 deletions apps/MemOS-Cloud-OpenClaw-Plugin/lib/check-update.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,30 +74,30 @@ function compareVersions(v1, v2) {
const split2 = v2.split("-");
const parts1 = split1[0].split(".").map(Number);
const parts2 = split2[0].split(".").map(Number);

// Compare major.minor.patch
for (let i = 0; i < Math.max(parts1.length, parts2.length); i++) {
const p1 = parts1[i] || 0;
const p2 = parts2[i] || 0;
if (p1 > p2) return 1;
if (p1 < p2) return -1;
}

// If base versions are equal, compare pre-release tags.
// A version WITH a pre-release tag is LOWER than a version WITHOUT one.
// e.g. 0.1.8-beta is less than 0.1.8. 0.1.8 is the final release.
const hasPre1 = split1.length > 1;
const hasPre2 = split2.length > 1;

if (hasPre1 && !hasPre2) return -1; // v1 is a beta, v2 is a full release
if (!hasPre1 && hasPre2) return 1; // v1 is a full release, v2 is a beta
if (!hasPre1 && !hasPre2) return 0; // both are full releases and equal

// If both are pre-releases, do a basic string compare on the tag
// "alpha" < "beta" < "rc"
if (split1[1] > split2[1]) return 1;
if (split1[1] < split2[1]) return -1;

return 0;
}

Expand Down
16 changes: 8 additions & 8 deletions apps/MemOS-Cloud-OpenClaw-Plugin/lib/config-ui/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const elements = {
pathBox: document.getElementById("pathBox"),
copyPathButton: document.getElementById("copyPathButton"),
saveButton: document.getElementById("saveButton"),

reloadButton: document.getElementById("reloadButton"),
layout: document.getElementById("layout"),
overlay: document.getElementById("overlay"),
Expand Down Expand Up @@ -340,7 +340,7 @@ function applyLanguageUi() {
elements.copyPathButton.setAttribute("aria-label", uiText("copyPath"));
elements.copyPathButton.setAttribute("title", uiText("copyPath"));
elements.saveButton.textContent = uiText("save");

elements.reloadButton.textContent = uiText("reload");
elements.overlayTitle.textContent = uiText("overlayTitle");
elements.overlayText.textContent = uiText("overlayText");
Expand Down Expand Up @@ -1037,15 +1037,15 @@ function renderForm() {
installSectionObserver(groups);

elements.saveButton.disabled = hasErrors || !isDirty();

elements.reloadButton.disabled = !remoteState;
refreshChrome();
}

function refreshChrome() {
const { errors } = collectDraft();
elements.saveButton.disabled = Object.keys(errors).length > 0 || !isDirty();

elements.reloadButton.disabled = !remoteState;
if (externalRefreshQueued) {
setBanner("warn", uiText("bannerExternal"));
Expand Down Expand Up @@ -1184,7 +1184,7 @@ async function loadRemote(initial = false) {
}
externalRefreshQueued = true;
refreshChrome();

}

refreshChrome();
Expand Down Expand Up @@ -1218,9 +1218,9 @@ async function saveConfig() {
remoteState = result.state;
draft = createDraftFromRemote(result.state);
baselineSnapshot = getDraftSnapshot();



externalRefreshQueued = false;
renderForm();
setOverlay(false, "", "");
Expand Down
2 changes: 1 addition & 1 deletion apps/MemOS-Cloud-OpenClaw-Plugin/lib/config-ui/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions apps/MemOS-Cloud-OpenClaw-Plugin/scripts/sync-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ const filesToUpdate = [

filesToUpdate.forEach(fileName => {
const filePath = path.resolve(__dirname, '..', fileName);

if (fs.existsSync(filePath)) {
try {
const content = JSON.parse(fs.readFileSync(filePath, 'utf8'));

if (content.version !== newVersion) {
content.version = newVersion;
// Write back with 2 spaces indentation and a newline at the end
Expand Down
22 changes: 11 additions & 11 deletions apps/MemOS-Cloud-OpenClaw-Plugin/test/query-strip.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -162,16 +162,16 @@ test("supports leading blank lines before inbound metadata", () => {
});

test("strips Feishu injected prompt", () => {
const input = `System: [2026-03-17 14:17:33 GMT+8] Feishu[default] DM from ou_37e8a1514c24e8afd9cfeca86f679980: 我叫什么名字
Conversation info (untrusted metadata):
\`\`\`json
{
"timestamp": "Tue 2026-03-17 14:17 GMT+8"
}
\`\`\`
[message_id: om_x100b54bb510590dcc2998da17ca2c2b]
const input = `System: [2026-03-17 14:17:33 GMT+8] Feishu[default] DM from ou_37e8a1514c24e8afd9cfeca86f679980: 我叫什么名字

Conversation info (untrusted metadata):
\`\`\`json
{
"timestamp": "Tue 2026-03-17 14:17 GMT+8"
}
\`\`\`

[message_id: om_x100b54bb510590dcc2998da17ca2c2b]
ou_37e8a1514c24e8afd9cfeca86f679980: 我叫什么名字 `;

assert.equal(stripOpenClawInjectedPrefix(input), "我叫什么名字");
Expand All @@ -191,7 +191,7 @@ ou_real: actual message`;

test("strips Feishu prompt without system header", () => {
const input = `
[message_id: om_x100b54bb510590dcc2998da17ca2c2b]
[message_id: om_x100b54bb510590dcc2998da17ca2c2b]
ou_37e8a1514c24e8afd9cfeca86f679980: 我叫什么名字 `;
assert.equal(stripOpenClawInjectedPrefix(input), "我叫什么名字");
});
Expand Down
4 changes: 3 additions & 1 deletion apps/memos-local-openclaw/openclaw.plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,7 @@
"If better-sqlite3 fails to build, ensure you have C++ build tools: xcode-select --install (macOS) or build-essential (Linux)"
]
},
"extensions": ["./index.ts"]
"extensions": [
"./index.ts"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -507,4 +507,3 @@ All operations return:
"detail": "Detailed error message"
}
```

1 change: 0 additions & 1 deletion apps/memos-local-openclaw/src/sharing/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,3 @@ export interface SkillBundle {
metadata: SkillBundleMetadata;
bundle: SkillGenerateOutput;
}

8 changes: 4 additions & 4 deletions apps/memos-local-openclaw/src/viewer/html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1411,7 +1411,7 @@ input,textarea,select{font-family:inherit;font-size:inherit}
<h3><span class="icon">\u{1F4CA}</span> <span data-i18n="chart.writes">Memory Writes per Day</span></h3>
<div class="chart-bars" id="chartWrites"></div>
</div>

<div class="analytics-section" id="toolPerfSection" style="position:relative">
<div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:20px">
<h3 style="margin-bottom:0"><span class="icon">\u26A1</span> <span data-i18n="chart.toolperf">Tool Response Time</span> <span style="font-size:10px;color:var(--text-muted);font-weight:500;text-transform:none;letter-spacing:0;margin-left:4px">(per minute avg)</span></h3>
Expand Down Expand Up @@ -1443,7 +1443,7 @@ input,textarea,select{font-family:inherit;font-size:inherit}
<select id="logToolFilter" onchange="onLogFilterChange()" style="font-size:12px;padding:4px 8px;border-radius:6px;border:1px solid var(--border);background:var(--card);color:var(--text);min-width:120px">
<option value="" data-i18n="logs.allTools">All Tools</option>
</select>

</div>
<div class="logs-toolbar-right">
<input type="checkbox" id="logAutoRefresh" style="display:none">
Expand Down Expand Up @@ -6722,7 +6722,7 @@ async function loadConfig(){
const embProv=(cfg.embedding||{}).provider;
const sumProv=(cfg.summarizer||{}).provider;
const skProv=((cfg.skillEvolution||{}).summarizer||{}).provider;


document.getElementById('cfgSharingEnabled').checked=!!sharing.enabled;
_sharingRole=sharing.role||'client';
Expand Down Expand Up @@ -7347,7 +7347,7 @@ function renderToolChart(data){
return '<linearGradient id="tg'+i+'" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="'+c+'" stop-opacity=".08"/><stop offset="1" stop-color="'+c+'" stop-opacity="0"/></linearGradient>'+
'';
}).join('')+'</defs>'+

gridHtml+labelsHtml+pathsHtml+dotsHtml+
'<line class="crosshair" x1="0" y1="'+pad.t+'" x2="0" y2="'+(pad.t+ch)+'" stroke="var(--text-muted)" stroke-width="0.5" stroke-dasharray="3 3" opacity="0" />'+
'<rect class="hover-rect" x="'+pad.l+'" y="'+pad.t+'" width="'+cw+'" height="'+ch+'" fill="transparent" />'+
Expand Down
14 changes: 11 additions & 3 deletions apps/memos-local-openclaw/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"compilerOptions": {
"target": "ES2022",
"module": "CommonJS",
"lib": ["ES2022"],
"lib": [
"ES2022"
],
"outDir": "dist",
"rootDir": "src",
"strict": true,
Expand All @@ -15,6 +17,12 @@
"sourceMap": true,
"moduleResolution": "node"
},
"include": ["src"],
"exclude": ["node_modules", "dist", "**/*.test.ts"]
"include": [
"src"
],
"exclude": [
"node_modules",
"dist",
"**/*.test.ts"
]
}
2 changes: 1 addition & 1 deletion deploy/helm/values-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ memos:
repository: your-registry/memos
tag: "2.0.9"
pullPolicy: IfNotPresent

env:
TZ: "Asia/Taipei"
MOS_CHAT_MODEL: "gpt-4o-mini"
Expand Down
20 changes: 10 additions & 10 deletions deploy/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ memos:
repository: memos/memos
tag: "2.0.9"
pullPolicy: IfNotPresent

service:
type: ClusterIP
port: 8000

resources:
limits:
cpu: 2000m
memory: 4Gi
requests:
cpu: 500m
memory: 1Gi

env:
TZ: "Asia/Taipei"
MOS_CUBE_PATH: "/tmp/data_test"
Expand Down Expand Up @@ -67,23 +67,23 @@ neo4j:
repository: neo4j
tag: "5.26.4"
pullPolicy: IfNotPresent

service:
type: ClusterIP
httpPort: 7474
boltPort: 7687

auth:
enabled: true
user: neo4j
password: "memos123456"
acceptLicense: "yes"

persistence:
enabled: true
size: 10Gi
storageClass: ""

resources:
limits:
cpu: 2000m
Expand All @@ -99,17 +99,17 @@ qdrant:
repository: qdrant/qdrant
tag: "v1.15.3"
pullPolicy: IfNotPresent

service:
type: ClusterIP
httpPort: 6333
grpcPort: 6334

persistence:
enabled: true
size: 10Gi
storageClass: ""

resources:
limits:
cpu: 1000m
Expand Down