@empirical-gauzza/cli 1.0.28 → 1.0.30
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/bin/empirical.js +1 -1
- package/lib/alertBanner.js +17 -0
- package/lib/constants.js +657 -640
- package/lib/http.js +2 -2
- package/lib/installers/hooks.js +321 -61
- package/lib/installers/skill-variants/SKILL.both.md +21 -0
- package/lib/installers/skill-variants/SKILL.cli.md +21 -0
- package/lib/installers/skill-variants/SKILL.mcp.md +21 -0
- package/lib/memoryCommands.js +88 -4
- package/package.json +1 -1
package/bin/empirical.js
CHANGED
package/lib/alertBanner.js
CHANGED
|
@@ -23,10 +23,27 @@ function colorize(code, text) {
|
|
|
23
23
|
return `${code}${text}${ANSI.reset}`;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
function reminderMemoryId(alert) {
|
|
27
|
+
const key = String(alert && alert.alertKey || '');
|
|
28
|
+
return key.startsWith('reminder_') ? key.slice('reminder_'.length) : null;
|
|
29
|
+
}
|
|
30
|
+
|
|
26
31
|
function renderOneAlert(alert) {
|
|
27
32
|
const prefix = TONE_PREFIX[alert.tone] || TONE_PREFIX.info;
|
|
28
33
|
const color = TONE_COLOR[alert.tone] || TONE_COLOR.info;
|
|
29
34
|
const lines = [];
|
|
35
|
+
const memoryId = reminderMemoryId(alert);
|
|
36
|
+
if (memoryId) {
|
|
37
|
+
// A reminder the user set. Whoever reads this, person or agent, should surface it first;
|
|
38
|
+
// the agent case was observed being skipped when the banner read like a footnote.
|
|
39
|
+
lines.push(colorize(`${ANSI.bold}${color}`, `REMINDER DUE - tell the user now: ${alert.title.replace(/^Reminder:\s*/, '')}`));
|
|
40
|
+
lines.push(` ${alert.body}`);
|
|
41
|
+
for (const action of alert.actions || []) {
|
|
42
|
+
lines.push(` → ${action.label}: ${action.href}`);
|
|
43
|
+
}
|
|
44
|
+
lines.push(` mark done: empirical memory acknowledge --memory-id ${memoryId} (drop it: add --cancel)`);
|
|
45
|
+
return lines.join('\n');
|
|
46
|
+
}
|
|
30
47
|
lines.push(colorize(`${ANSI.bold}${color}`, `${prefix} ${alert.title}`));
|
|
31
48
|
lines.push(` ${alert.body}`);
|
|
32
49
|
for (const action of alert.actions || []) {
|