



























@@ -52,15 +52,15 @@ describe("dual-kind memory registration gate", () => {
5252});
53535454expect(getMemoryRuntime()).toBeUndefined();
55-expect(registry.registry.diagnostics).toEqual(
56-expect.arrayContaining([
57-expect.objectContaining({
58- pluginId: "dual-plugin",
59- level: "warn",
60- message: expect.stringContaining("dual-kind plugin not selected for memory slot"),
61-}),
62-]),
63-);
55+expect(registry.registry.diagnostics).toEqual([
56+{
57+pluginId: "dual-plugin",
58+level: "warn",
59+source: "/virtual/dual-plugin/index.ts",
60+message:
61+ "dual-kind plugin not selected for memory slot; skipping memory runtime registration",
62+},
63+]);
6464});
65656666it("allows memory runtime registration for dual-kind plugins selected for memory slot", () => {
@@ -111,6 +111,8 @@ describe("dual-kind memory registration gate", () => {
111111112112it("allows selected dual-kind plugins to register the unified memory capability", () => {
113113const { config, registry } = createPluginRegistryFixture();
114+const runtime = createStubMemoryRuntime();
115+const promptBuilder = () => ["memory capability"];
114116115117registerTestPlugin({
116118 registry,
@@ -123,14 +125,18 @@ describe("dual-kind memory registration gate", () => {
123125}),
124126register(api) {
125127api.registerMemoryCapability({
126-runtime: createStubMemoryRuntime(),
127-promptBuilder: () => ["memory capability"],
128+ runtime,
129+ promptBuilder,
128130});
129131},
130132});
131133132-expect(getMemoryCapabilityRegistration()).toMatchObject({
134+expect(getMemoryCapabilityRegistration()).toEqual({
133135pluginId: "dual-plugin",
136+capability: {
137+ runtime,
138+ promptBuilder,
139+},
134140});
135141expect(
136142requireMemoryRuntime().resolveMemoryBackendConfig({ cfg: {} as never, agentId: "main" }),
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。