fix(memory): avoid unavailable scheduler tool guidance (#130128)

This commit is contained in:
Peter Steinberger
2026-08-26 06:45:43 -07:00
committed by GitHub
parent ba7b912713
commit d259f982e4
4 changed files with 7 additions and 2 deletions
+3
View File
@@ -346,11 +346,14 @@ describe("memory-core plugin runtime registration", () => {
const ownerTool = intentFactory({ config: {}, senderIsOwner: true }) as {
name?: string;
description?: string;
parameters?: {
properties?: Record<string, { default?: string }>;
};
};
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);
+1 -1
View File
@@ -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: {
@@ -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: {
@@ -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.',
);