From d259f982e4e16df9fd7ec45159a818c6b1bcdbb1 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Wed, 26 Aug 2026 06:45:43 -0700 Subject: [PATCH] fix(memory): avoid unavailable scheduler tool guidance (#130128) --- extensions/memory-core/index.test.ts | 3 +++ extensions/memory-core/index.ts | 2 +- extensions/memory-core/src/standing-intents-tool.ts | 2 +- extensions/memory-core/src/standing-intents.test.ts | 2 ++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/extensions/memory-core/index.test.ts b/extensions/memory-core/index.test.ts index bf71f720b9ab..cc8508d90844 100644 --- a/extensions/memory-core/index.test.ts +++ b/extensions/memory-core/index.test.ts @@ -346,11 +346,14 @@ describe("memory-core plugin runtime registration", () => { const ownerTool = intentFactory({ config: {}, senderIsOwner: true }) as { name?: string; + description?: string; parameters?: { properties?: Record; }; }; expect(ownerTool).toMatchObject({ name: "intent" }); + expect(ownerTool.description).toContain("Use scheduled tasks for time-based reminders"); + expect(ownerTool.description).not.toMatch(/\b(?:cron|automations)\b/u); expect(ownerTool.parameters?.properties?.scope?.default).toBe("channel"); expect(ownerTool.parameters?.properties?.senderScope?.default).toBe("sender"); expect(warn).toHaveBeenCalledTimes(1); diff --git a/extensions/memory-core/index.ts b/extensions/memory-core/index.ts index 85ef6a9cb5d6..f46720f21e27 100644 --- a/extensions/memory-core/index.ts +++ b/extensions/memory-core/index.ts @@ -131,7 +131,7 @@ function createLazyStandingIntentTool( label: "Standing Intent", name: "intent", description: - "Create, list, or explicitly cancel event-conditioned standing intents. A created intent is armed; the system injects the reminder automatically when it triggers. Do not deliver it early or cancel it unless the user asks. Use cron or scheduled tasks for time-based reminders.", + "Create, list, or explicitly cancel event-conditioned standing intents. A created intent is armed; the system injects the reminder automatically when it triggers. Do not deliver it early or cancel it unless the user asks. Use scheduled tasks for time-based reminders.", parameters: { type: "object", properties: { diff --git a/extensions/memory-core/src/standing-intents-tool.ts b/extensions/memory-core/src/standing-intents-tool.ts index f804e2349c4f..ec0c42a266ef 100644 --- a/extensions/memory-core/src/standing-intents-tool.ts +++ b/extensions/memory-core/src/standing-intents-tool.ts @@ -148,7 +148,7 @@ export function createStandingIntentTool(options: { return { label: "Standing Intent", name: "intent", - description: `Create, list, or explicitly cancel event-conditioned standing intents. Creating an intent arms it immediately. ${STANDING_INTENT_AUTOMATION_GUIDANCE} ${STANDING_INTENT_SCOPE_GUIDANCE} Use cron or scheduled tasks for time-based reminders; use this tool only for events expressed by trigger keywords.`, + description: `Create, list, or explicitly cancel event-conditioned standing intents. Creating an intent arms it immediately. ${STANDING_INTENT_AUTOMATION_GUIDANCE} ${STANDING_INTENT_SCOPE_GUIDANCE} Use scheduled tasks for time-based reminders; use this tool only for events expressed by trigger keywords.`, parameters: { type: "object", properties: { diff --git a/extensions/memory-core/src/standing-intents.test.ts b/extensions/memory-core/src/standing-intents.test.ts index 73d9082c85b1..6d61f350d505 100644 --- a/extensions/memory-core/src/standing-intents.test.ts +++ b/extensions/memory-core/src/standing-intents.test.ts @@ -109,6 +109,8 @@ describe("standing intents", () => { "Intent is armed for this channel. The system injects the reminder automatically when it triggers. Do not deliver it early or cancel it unless the user asks.", ); expect(tool.description).toContain("system injects the reminder automatically"); + expect(tool.description).toContain("Use scheduled tasks for time-based reminders"); + expect(tool.description).not.toMatch(/\b(?:cron|automations)\b/u); expect(tool.description).toContain( 'Use "channel" (the default) for any "whenever I mention X" request.', );