mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-08 07:41:08 +00:00
* memory-core: add dreaming promotion flow with weighted thresholds * docs(memory): mark dreaming as experimental * memory-core: address dreaming promotion review feedback * memory-core: harden short-term promotion concurrency * acpx: make abort-process test timer-independent * memory-core: simplify dreaming config with mode presets * memory-core: add /dreaming command and tighten recall tracking * ui: add Dreams tab with sleeping lobster animation Adds a new Dreams tab to the gateway UI under the Agent group. The tab is gated behind the memory-core dreaming config — it only appears in the sidebar when dreaming.mode is not 'off'. Features: - Sleeping vector lobster with breathing animation - Floating Z's, twinkling starfield, moon glow - Rotating dream phrase bubble (17 whimsical phrases) - Memory stats bar (short-term, long-term, promoted) - Active/idle visual states - 14 unit tests * plugins: fix --json stdout pollution from hook runner log The hook runner initialization message was using log.info() which writes to stdout via console.log, breaking JSON.parse() in the Docker smoke test for 'openclaw plugins list --json'. Downgrade to log.debug() so it only appears when debugging is enabled. * ui: keep Dreams tab visible when dreaming is off * tests: fix contracts and stabilize extension shards * memory-core: harden dreaming recall persistence and locking * fix: stabilize dreaming PR gates (#60569) (thanks @vignesh07) * test: fix rebase drift in telegram and plugin guards
97 lines
2.9 KiB
JavaScript
97 lines
2.9 KiB
JavaScript
import path from "node:path";
|
|
import { BUNDLED_PLUGIN_ROOT_DIR } from "./scripts/lib/bundled-plugin-paths.mjs";
|
|
|
|
export const unitTestIncludePatterns = [
|
|
"src/**/*.test.ts",
|
|
"packages/**/*.test.ts",
|
|
"test/**/*.test.ts",
|
|
"ui/src/ui/app-chat.test.ts",
|
|
"ui/src/ui/chat/**/*.test.ts",
|
|
"ui/src/ui/views/agents-utils.test.ts",
|
|
"ui/src/ui/views/channels.test.ts",
|
|
"ui/src/ui/views/chat.test.ts",
|
|
"ui/src/ui/views/dreams.test.ts",
|
|
"ui/src/ui/views/usage-render-details.test.ts",
|
|
"ui/src/ui/controllers/agents.test.ts",
|
|
"ui/src/ui/controllers/chat.test.ts",
|
|
];
|
|
|
|
export const boundaryTestFiles = [
|
|
"src/infra/boundary-path.test.ts",
|
|
"src/infra/git-root.test.ts",
|
|
"src/infra/home-dir.test.ts",
|
|
"src/infra/openclaw-exec-env.test.ts",
|
|
"src/infra/openclaw-root.test.ts",
|
|
"src/infra/package-json.test.ts",
|
|
"src/infra/path-env.test.ts",
|
|
"src/infra/stable-node-path.test.ts",
|
|
"test/extension-plugin-sdk-boundary.test.ts",
|
|
"test/extension-test-boundary.test.ts",
|
|
"test/plugin-extension-import-boundary.test.ts",
|
|
"test/web-fetch-provider-boundary.test.ts",
|
|
"test/web-search-provider-boundary.test.ts",
|
|
];
|
|
|
|
export const bundledPluginDependentUnitTestFiles = [
|
|
"src/infra/matrix-plugin-helper.test.ts",
|
|
"src/plugin-sdk/facade-runtime.test.ts",
|
|
"src/plugins/loader.test.ts",
|
|
];
|
|
|
|
export const unitTestAdditionalExcludePatterns = [
|
|
"src/gateway/**",
|
|
`${BUNDLED_PLUGIN_ROOT_DIR}/**`,
|
|
"src/browser/**",
|
|
"src/line/**",
|
|
"src/agents/**",
|
|
"src/auto-reply/**",
|
|
"src/commands/**",
|
|
"src/channels/plugins/contracts/**",
|
|
"src/plugins/contracts/**",
|
|
"src/infra/boundary-path.test.ts",
|
|
"src/infra/git-root.test.ts",
|
|
"src/infra/home-dir.test.ts",
|
|
"src/infra/openclaw-exec-env.test.ts",
|
|
"src/infra/openclaw-root.test.ts",
|
|
"src/infra/package-json.test.ts",
|
|
"src/infra/path-env.test.ts",
|
|
"src/infra/stable-node-path.test.ts",
|
|
...bundledPluginDependentUnitTestFiles,
|
|
"src/config/doc-baseline.integration.test.ts",
|
|
"src/config/schema.base.generated.test.ts",
|
|
"src/config/schema.help.quality.test.ts",
|
|
"test/**",
|
|
];
|
|
|
|
const sharedBaseExcludePatterns = [
|
|
"dist/**",
|
|
"apps/macos/**",
|
|
"apps/macos/.build/**",
|
|
"**/node_modules/**",
|
|
"**/vendor/**",
|
|
"dist/OpenClaw.app/**",
|
|
"**/*.live.test.ts",
|
|
"**/*.e2e.test.ts",
|
|
];
|
|
|
|
const normalizeRepoPath = (value) => value.split(path.sep).join("/");
|
|
|
|
const matchesAny = (file, patterns) => patterns.some((pattern) => path.matchesGlob(file, pattern));
|
|
|
|
export function isUnitConfigTestFile(file) {
|
|
const normalizedFile = normalizeRepoPath(file);
|
|
return (
|
|
matchesAny(normalizedFile, unitTestIncludePatterns) &&
|
|
!matchesAny(normalizedFile, sharedBaseExcludePatterns) &&
|
|
!matchesAny(normalizedFile, unitTestAdditionalExcludePatterns)
|
|
);
|
|
}
|
|
|
|
export function isBundledPluginDependentUnitTestFile(file) {
|
|
return bundledPluginDependentUnitTestFiles.includes(normalizeRepoPath(file));
|
|
}
|
|
|
|
export function isBoundaryTestFile(file) {
|
|
return boundaryTestFiles.includes(normalizeRepoPath(file));
|
|
}
|