@hasna/mementos 0.4.26 → 0.4.28

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/dist/cli/index.js CHANGED
@@ -5114,6 +5114,8 @@ program2.command("report").description("Rich summary of memory activity and top
5114
5114
  try {
5115
5115
  const globalOpts = program2.opts();
5116
5116
  const days = parseInt(opts.days, 10) || 7;
5117
+ const isJson = opts.json || globalOpts.json;
5118
+ const isMarkdown = opts.markdown;
5117
5119
  const projectPath = opts.project || globalOpts.project;
5118
5120
  let projectId;
5119
5121
  if (projectPath) {
@@ -5139,11 +5141,11 @@ program2.command("report").description("Rich summary of memory activity and top
5139
5141
  const byCat = Object.fromEntries(byCatRows.map((r) => [r.category, r.c]));
5140
5142
  const topMems = db.query(`SELECT key, value, importance, scope, category FROM memories WHERE status = 'active' ${conditions} ORDER BY importance DESC, access_count DESC LIMIT 5`).all(...params);
5141
5143
  const topAgents = db.query(`SELECT agent_id, COUNT(*) as c FROM memories WHERE status = 'active' AND agent_id IS NOT NULL ${conditions} GROUP BY agent_id ORDER BY c DESC LIMIT 5`).all(...params);
5142
- if (opts.json) {
5144
+ if (isJson) {
5143
5145
  console.log(JSON.stringify({ total, pinned, recent: { days, total: recentTotal, avg_per_day: parseFloat(avgPerDay) }, by_scope: byScope, by_category: byCat, top_memories: topMems, top_agents: topAgents }, null, 2));
5144
5146
  return;
5145
5147
  }
5146
- if (opts.markdown) {
5148
+ if (isMarkdown) {
5147
5149
  const lines = [
5148
5150
  `## Mementos Report (last ${days} days)`,
5149
5151
  "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/mementos",
3
- "version": "0.4.26",
3
+ "version": "0.4.28",
4
4
  "description": "Universal memory system for AI agents - CLI + MCP server + library API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",