Skip to content

Commit d259f98

Browse files
authored
fix(memory): avoid unavailable scheduler tool guidance (#130128)
1 parent ba7b912 commit d259f98

4 files changed

Lines changed: 7 additions & 2 deletions

File tree

‎extensions/memory-core/index.test.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,11 +346,14 @@ describe("memory-core plugin runtime registration", () => {
346346

347347
const ownerTool = intentFactory({ config: {}, senderIsOwner: true }) as {
348348
name?: string;
349+
description?: string;
349350
parameters?: {
350351
properties?: Record<string, { default?: string }>;
351352
};
352353
};
353354
expect(ownerTool).toMatchObject({ name: "intent" });
355+
expect(ownerTool.description).toContain("Use scheduled tasks for time-based reminders");
356+
expect(ownerTool.description).not.toMatch(/\b(?:cron|automations)\b/u);
354357
expect(ownerTool.parameters?.properties?.scope?.default).toBe("channel");
355358
expect(ownerTool.parameters?.properties?.senderScope?.default).toBe("sender");
356359
expect(warn).toHaveBeenCalledTimes(1);

‎extensions/memory-core/index.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ function createLazyStandingIntentTool(
131131
label: "Standing Intent",
132132
name: "intent",
133133
description:
134-
"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.",
134+
"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.",
135135
parameters: {
136136
type: "object",
137137
properties: {

‎extensions/memory-core/src/standing-intents-tool.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export function createStandingIntentTool(options: {
148148
return {
149149
label: "Standing Intent",
150150
name: "intent",
151-
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.`,
151+
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.`,
152152
parameters: {
153153
type: "object",
154154
properties: {

‎extensions/memory-core/src/standing-intents.test.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ describe("standing intents", () => {
109109
"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.",
110110
);
111111
expect(tool.description).toContain("system injects the reminder automatically");
112+
expect(tool.description).toContain("Use scheduled tasks for time-based reminders");
113+
expect(tool.description).not.toMatch(/\b(?:cron|automations)\b/u);
112114
expect(tool.description).toContain(
113115
'Use "channel" (the default) for any "whenever I mention X" request.',
114116
);

0 commit comments

Comments
 (0)