@pi-unipi/notify 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/events.ts +5 -0
- package/package.json +1 -1
- package/settings.ts +1 -0
package/events.ts
CHANGED
|
@@ -23,6 +23,7 @@ export const BUILTIN_EVENTS: Record<
|
|
|
23
23
|
mcp_server_error: { hook: UNIPI_EVENTS.MCP_SERVER_ERROR, label: "MCP Error" },
|
|
24
24
|
memory_consolidated: { hook: UNIPI_EVENTS.MEMORY_CONSOLIDATED, label: "Memory Saved" },
|
|
25
25
|
session_shutdown: { hook: "session_shutdown", label: "Session End" },
|
|
26
|
+
ask_user_prompt: { hook: UNIPI_EVENTS.ASK_USER_PROMPT, label: "Question Asked" },
|
|
26
27
|
};
|
|
27
28
|
|
|
28
29
|
/**
|
|
@@ -171,6 +172,10 @@ function buildEventMessage(eventKey: string, payload: unknown): string {
|
|
|
171
172
|
return `Memory consolidated (${p.count || 0} items)`;
|
|
172
173
|
case "session_shutdown":
|
|
173
174
|
return "Session ending";
|
|
175
|
+
case "ask_user_prompt":
|
|
176
|
+
return p.context
|
|
177
|
+
? `Agent asks: ${String(p.question || "")} — ${String(p.context)}`
|
|
178
|
+
: `Agent asks: ${String(p.question || "A question")}`;
|
|
174
179
|
default:
|
|
175
180
|
return p.message ? String(p.message) : "Event occurred";
|
|
176
181
|
}
|
package/package.json
CHANGED
package/settings.ts
CHANGED
|
@@ -26,6 +26,7 @@ export const DEFAULT_CONFIG: NotifyConfig = {
|
|
|
26
26
|
agent_end: { enabled: false, platforms: [] },
|
|
27
27
|
memory_consolidated: { enabled: false, platforms: [] },
|
|
28
28
|
session_shutdown: { enabled: false, platforms: [] },
|
|
29
|
+
ask_user_prompt: { enabled: false, platforms: [] },
|
|
29
30
|
},
|
|
30
31
|
native: {
|
|
31
32
|
enabled: true,
|