gitmem-mcp 1.3.1 → 1.3.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.
@@ -2188,6 +2188,91 @@ export const TOOLS = [
2188
2188
  required: ["lens"],
2189
2189
  },
2190
2190
  },
2191
+ // --- Contribute Feedback Tool ---
2192
+ {
2193
+ name: "contribute_feedback",
2194
+ description: "Submit feedback about gitmem — feature requests, bug reports, friction points, or suggestions. Always saved locally to .gitmem/feedback/. If opted in, sent anonymously to improve gitmem. 10/session limit.",
2195
+ inputSchema: {
2196
+ type: "object",
2197
+ properties: {
2198
+ type: {
2199
+ type: "string",
2200
+ enum: ["feature_request", "bug_report", "friction", "suggestion"],
2201
+ description: "Feedback type",
2202
+ },
2203
+ tool: {
2204
+ type: "string",
2205
+ description: "Which gitmem tool this relates to (e.g., 'recall', 'session_close')",
2206
+ },
2207
+ description: {
2208
+ type: "string",
2209
+ description: "Detailed, actionable feedback. Min 20 chars.",
2210
+ },
2211
+ severity: {
2212
+ type: "string",
2213
+ enum: ["low", "medium", "high"],
2214
+ description: "Impact: low=nice-to-have, medium=notable friction, high=blocking/broken",
2215
+ },
2216
+ suggested_fix: {
2217
+ type: "string",
2218
+ description: "How this could be improved",
2219
+ },
2220
+ context: {
2221
+ type: "string",
2222
+ description: "When/how this came up",
2223
+ },
2224
+ },
2225
+ required: ["type", "tool", "description", "severity"],
2226
+ },
2227
+ },
2228
+ {
2229
+ name: "gitmem-fb",
2230
+ description: "gitmem-fb (contribute_feedback) - Submit feedback about gitmem",
2231
+ inputSchema: {
2232
+ type: "object",
2233
+ properties: {
2234
+ type: {
2235
+ type: "string",
2236
+ enum: ["feature_request", "bug_report", "friction", "suggestion"],
2237
+ description: "Feedback type",
2238
+ },
2239
+ tool: { type: "string", description: "Which gitmem tool" },
2240
+ description: { type: "string", description: "Feedback text (min 20 chars)" },
2241
+ severity: {
2242
+ type: "string",
2243
+ enum: ["low", "medium", "high"],
2244
+ description: "Impact level",
2245
+ },
2246
+ suggested_fix: { type: "string", description: "How to improve" },
2247
+ context: { type: "string", description: "When/how this came up" },
2248
+ },
2249
+ required: ["type", "tool", "description", "severity"],
2250
+ },
2251
+ },
2252
+ {
2253
+ name: "gm-feedback",
2254
+ description: "gm-feedback (contribute_feedback) - Submit feedback about gitmem",
2255
+ inputSchema: {
2256
+ type: "object",
2257
+ properties: {
2258
+ type: {
2259
+ type: "string",
2260
+ enum: ["feature_request", "bug_report", "friction", "suggestion"],
2261
+ description: "Feedback type",
2262
+ },
2263
+ tool: { type: "string", description: "Which gitmem tool" },
2264
+ description: { type: "string", description: "Feedback text (min 20 chars)" },
2265
+ severity: {
2266
+ type: "string",
2267
+ enum: ["low", "medium", "high"],
2268
+ description: "Impact level",
2269
+ },
2270
+ suggested_fix: { type: "string", description: "How to improve" },
2271
+ context: { type: "string", description: "When/how this came up" },
2272
+ },
2273
+ required: ["type", "tool", "description", "severity"],
2274
+ },
2275
+ },
2191
2276
  ];
2192
2277
  /**
2193
2278
  * Alias tool names — filtered out by default to reduce context window cost.
@@ -2202,13 +2287,13 @@ export const ALIAS_TOOL_NAMES = new Set([
2202
2287
  "gitmem-search", "gitmem-log", "gitmem-analyze",
2203
2288
  "gitmem-pc", "gitmem-ao",
2204
2289
  "gitmem-lt", "gitmem-rt", "gitmem-ct", "gitmem-ps", "gitmem-ds",
2205
- "gitmem-cleanup", "gitmem-health", "gitmem-al", "gitmem-graph",
2290
+ "gitmem-cleanup", "gitmem-health", "gitmem-al", "gitmem-graph", "gitmem-fb",
2206
2291
  // gm-* aliases
2207
2292
  "gm-open", "gm-confirm", "gm-reflect", "gm-refresh", "gm-close",
2208
2293
  "gm-scar", "gm-search", "gm-log", "gm-analyze",
2209
2294
  "gm-pc", "gm-absorb",
2210
2295
  "gm-threads", "gm-resolve", "gm-thread-new", "gm-promote", "gm-dismiss",
2211
- "gm-cleanup", "gm-health", "gm-archive", "gm-graph",
2296
+ "gm-cleanup", "gm-health", "gm-archive", "gm-graph", "gm-feedback",
2212
2297
  "gm-stx",
2213
2298
  // gm-cache-* aliases (canonical names are gitmem-cache-*, tier-gated separately)
2214
2299
  "gm-cache-s", "gm-cache-h", "gm-cache-f",
package/dist/tools/log.js CHANGED
@@ -76,6 +76,8 @@ export async function log(params) {
76
76
  const queryTimer = new Timer();
77
77
  const storage = getStorage();
78
78
  const filters = { is_active: "eq.true" };
79
+ if (project)
80
+ filters.project = project;
79
81
  if (typeFilter)
80
82
  filters.learning_type = typeFilter;
81
83
  if (severityFilter)
@@ -1114,7 +1114,7 @@ export async function sessionClose(params) {
1114
1114
  let humanWaitTimeMs;
1115
1115
  if (params.task_completion && typeof params.task_completion === "object") {
1116
1116
  const tc = params.task_completion;
1117
- // Agent reflection time = when questions shown → when human asked "Corrections?"
1117
+ // Agent reflection time = when questions shown → when closing prompt shown
1118
1118
  if (tc.questions_displayed_at && tc.human_asked_at) {
1119
1119
  const started = new Date(tc.questions_displayed_at).getTime();
1120
1120
  const askedHuman = new Date(tc.human_asked_at).getTime();
@@ -1122,7 +1122,7 @@ export async function sessionClose(params) {
1122
1122
  agentReflectionMs = askedHuman - started;
1123
1123
  }
1124
1124
  }
1125
- // Human wait time = "Corrections?" → human responds
1125
+ // Human wait time = closing prompt → human responds
1126
1126
  if (tc.human_asked_at && tc.human_response_at) {
1127
1127
  const asked = new Date(tc.human_asked_at).getTime();
1128
1128
  const responded = new Date(tc.human_response_at).getTime();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gitmem-mcp",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "mcpName": "io.github.gitmem-dev/gitmem",
5
5
  "description": "Persistent learning memory for AI coding agents. Memory that compounds.",
6
6
  "type": "module",
@@ -75,7 +75,7 @@ Safe alternatives: `env | grep -c VARNAME` (count only), `[ -n "$VARNAME" ] && e
75
75
  "task_completion": {
76
76
  "questions_displayed_at": "ISO timestamp (when reflection started)",
77
77
  "reflection_completed_at": "ISO timestamp (when payload written)",
78
- "human_asked_at": "ISO timestamp (when 'Corrections?' shown)",
78
+ "human_asked_at": "ISO timestamp (when closing prompt shown)",
79
79
  "human_response_at": "ISO timestamp (when human replied)",
80
80
  "human_response": "user's correction text or 'none'"
81
81
  },
@@ -93,7 +93,7 @@ Safe alternatives: `env | grep -c VARNAME` (count only), `[ -n "$VARNAME" ] && e
93
93
  Key lesson: [one-sentence from Q7]
94
94
  ```
95
95
 
96
- 3. **Ask**: "Corrections?" — wait for response, then call `session_close`.
96
+ 3. **Ask**: "Anything to add before I close this session?" — wait for response, then call `session_close`.
97
97
 
98
98
  4. **Call `session_close`** with `session_id` and `close_type: "standard"`.
99
99