@remem/mcp-server 1.0.1 → 1.0.2
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/build/database.js +3 -3
- package/build/tools.js +2 -1
- package/package.json +1 -1
package/build/database.js
CHANGED
|
@@ -102,7 +102,7 @@ export class RememDatabase {
|
|
|
102
102
|
return await this.db
|
|
103
103
|
.selectFrom("activities")
|
|
104
104
|
.selectAll()
|
|
105
|
-
.where(sql `date(ts)`, "=", date)
|
|
105
|
+
.where(sql `date(ts, 'localtime')`, "=", date)
|
|
106
106
|
.orderBy("ts", "asc")
|
|
107
107
|
.execute();
|
|
108
108
|
}
|
|
@@ -110,7 +110,7 @@ export class RememDatabase {
|
|
|
110
110
|
async cleanupOldActivities(retentionDays) {
|
|
111
111
|
const result = await this.db
|
|
112
112
|
.deleteFrom("activities")
|
|
113
|
-
.where(sql `ts < datetime('now', '-' || ${retentionDays} || ' days')`)
|
|
113
|
+
.where(sql `datetime(ts, 'localtime') < datetime('now', '-' || ${retentionDays} || ' days', 'localtime')`)
|
|
114
114
|
.executeTakeFirst();
|
|
115
115
|
return Number(result.numDeletedRows);
|
|
116
116
|
}
|
|
@@ -128,7 +128,7 @@ export class RememDatabase {
|
|
|
128
128
|
return await this.db
|
|
129
129
|
.selectFrom("daily_summaries")
|
|
130
130
|
.selectAll()
|
|
131
|
-
.where(sql `date >= date('now', '-' || ${months} || ' months')`)
|
|
131
|
+
.where(sql `date >= date('now', '-' || ${months} || ' months', 'localtime')`)
|
|
132
132
|
.orderBy("date", "asc")
|
|
133
133
|
.execute();
|
|
134
134
|
}
|
package/build/tools.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* MCP Tool definitions for Remem
|
|
3
3
|
*/
|
|
4
4
|
import { z } from "zod";
|
|
5
|
+
import { formatLocalDate } from "./utils.js";
|
|
5
6
|
/** Activity type enum for validation */
|
|
6
7
|
const ActivityTypeSchema = z.enum(["work", "decision", "memo", "approval"]);
|
|
7
8
|
/** Date string in YYYY-MM-DD format */
|
|
@@ -11,7 +12,7 @@ const DateSchema = z
|
|
|
11
12
|
.describe("Date in YYYY-MM-DD format");
|
|
12
13
|
/** Get today's date in YYYY-MM-DD */
|
|
13
14
|
function getToday() {
|
|
14
|
-
return
|
|
15
|
+
return formatLocalDate();
|
|
15
16
|
}
|
|
16
17
|
/**
|
|
17
18
|
* Register all MCP tools
|