mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-16 11:41:08 +00:00
fix(gateway): classify dream diary actions
This commit is contained in:
@@ -8,6 +8,7 @@ let isCacheTtlEligibleProvider: typeof import("./cache-ttl.js").isCacheTtlEligib
|
||||
describe("kilocode cache-ttl eligibility", () => {
|
||||
beforeEach(async () => {
|
||||
vi.doUnmock("../../plugins/provider-runtime.js");
|
||||
vi.doUnmock("../../plugins/provider-runtime.runtime.js");
|
||||
vi.resetModules();
|
||||
const { resetProviderRuntimeHookCacheForTest } =
|
||||
await import("../../plugins/provider-runtime.js");
|
||||
|
||||
@@ -136,6 +136,8 @@ const METHOD_SCOPE_GROUPS: Record<OperatorScope, readonly string[]> = {
|
||||
"sessions.compaction.branch",
|
||||
"push.test",
|
||||
"node.pending.enqueue",
|
||||
"doctor.memory.backfillDreamDiary",
|
||||
"doctor.memory.resetDreamDiary",
|
||||
],
|
||||
[ADMIN_SCOPE]: [
|
||||
"channels.logout",
|
||||
|
||||
@@ -5,6 +5,8 @@ const BASE_METHODS = [
|
||||
"health",
|
||||
"doctor.memory.status",
|
||||
"doctor.memory.dreamDiary",
|
||||
"doctor.memory.backfillDreamDiary",
|
||||
"doctor.memory.resetDreamDiary",
|
||||
"logs.tail",
|
||||
"channels.status",
|
||||
"channels.logout",
|
||||
|
||||
@@ -749,7 +749,6 @@ describe("doctor.memory.dreamDiary", () => {
|
||||
expect.objectContaining({
|
||||
agentId: "main",
|
||||
found: true,
|
||||
path: "DREAMS.md",
|
||||
content: "lowercase diary\n",
|
||||
updatedAtMs: expect.any(Number),
|
||||
}),
|
||||
|
||||
@@ -4,7 +4,7 @@ import tsdownConfig from "../../tsdown.config.ts";
|
||||
|
||||
type TsdownConfigEntry = {
|
||||
deps?: {
|
||||
neverBundle?: string[];
|
||||
neverBundle?: string[] | ((id: string) => boolean);
|
||||
};
|
||||
entry?: Record<string, string> | string[];
|
||||
outDir?: string;
|
||||
@@ -78,7 +78,15 @@ describe("tsdown config", () => {
|
||||
it("externalizes staged bundled plugin runtime dependencies", () => {
|
||||
const configs = asConfigArray(tsdownConfig);
|
||||
const unifiedGraph = configs.find((config) => entryKeys(config).includes("index"));
|
||||
const neverBundle = unifiedGraph?.deps?.neverBundle;
|
||||
|
||||
expect(unifiedGraph?.deps?.neverBundle).toEqual(expect.arrayContaining(["silk-wasm", "ws"]));
|
||||
if (typeof neverBundle === "function") {
|
||||
expect(neverBundle("silk-wasm")).toBe(true);
|
||||
expect(neverBundle("ws")).toBe(true);
|
||||
expect(neverBundle("ws/lib/websocket.js")).toBe(true);
|
||||
expect(neverBundle("not-a-runtime-dependency")).toBe(false);
|
||||
} else {
|
||||
expect(neverBundle).toEqual(expect.arrayContaining(["silk-wasm", "ws"]));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user