gitmem-mcp 1.5.1 → 1.6.1
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/CHANGELOG.md +21 -0
- package/README.md +21 -4
- package/bin/gitmem.js +10 -0
- package/dist/commands/activate.d.ts +20 -0
- package/dist/commands/activate.js +606 -0
- package/dist/commands/deactivate.d.ts +10 -0
- package/dist/commands/deactivate.js +95 -0
- package/dist/commands/migrate-local.d.ts +71 -0
- package/dist/commands/migrate-local.js +317 -0
- package/dist/schemas/log.d.ts +2 -2
- package/dist/schemas/search.d.ts +2 -2
- package/dist/schemas/session-close.d.ts +12 -12
- package/dist/server.js +20 -2
- package/dist/services/analytics.d.ts +22 -0
- package/dist/services/analytics.js +68 -0
- package/dist/services/embedding.d.ts +7 -1
- package/dist/services/embedding.js +23 -5
- package/dist/services/license.d.ts +57 -0
- package/dist/services/license.js +200 -0
- package/dist/services/supabase-client.d.ts +6 -0
- package/dist/services/supabase-client.js +75 -22
- package/dist/services/tier.d.ts +13 -3
- package/dist/services/tier.js +38 -7
- package/dist/services/transcript-chunker.js +3 -2
- package/dist/services/variant-generation.js +3 -2
- package/dist/tools/recall.js +16 -4
- package/dist/tools/session-close.js +31 -5
- package/dist/tools/session-start.js +43 -5
- package/package.json +1 -1
- package/schema/setup.sql +489 -25
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.6.1] - 2026-05-25
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- **Embeddings not generated on Pro tier**: `embedding.ts`, `variant-generation.ts`, and `transcript-chunker.ts` only checked `process.env.OPENROUTER_API_KEY` — never read the key from `.gitmem/config.json` written by `activate`. Now falls back to `getProConfig()` matching how `supabase-client.ts` already resolves credentials.
|
|
14
|
+
- **Lossy free→pro migration**: Migration sent all local JSON fields to PostgREST — unknown columns caused 400 rejections, silently dropping records (only first 3 errors shown). Added `KNOWN_COLUMNS` whitelist per table, type coercion for `action_protocol`/`self_check_criteria` (array→TEXT), and full error visibility (no cap).
|
|
15
|
+
- **Migration log file**: `.gitmem/migration.log` now written with per-record outcomes (OK/FAIL/SKIP) for debugging.
|
|
16
|
+
- **Mid-migration recovery**: `activate` now detects `.pre-migration` backup files from a previous failed upgrade and re-imports them automatically. No new command — just re-run `activate`.
|
|
17
|
+
- **Credential exposure**: `activate` now auto-adds `.gitmem/` to the project's `.gitignore` when inside a git repo.
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
- **E2E stress test v1.4**: Restructured from 6 to 8 simulated days. Day 0 wipes Supabase to blank slate. Day 1 seeds realistic 3+ month free-tier user data (starter scars, unknown fields, type mismatches, mixed projects) and tests full upgrade journey including mid-failure recovery and real embeddings from config.json (not env var). 178 tests total.
|
|
21
|
+
|
|
22
|
+
## [1.6.0] - 2026-05-25
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
- **Free→Pro migration**: Running `activate` with existing local `.gitmem/` data automatically migrates learnings, sessions, decisions, and scar usage to Supabase. Local files are archived with `.pre-migration` suffix.
|
|
26
|
+
- **Schema auto-apply via DATABASE_URL**: `activate` now falls back to direct Postgres connection when `SUPABASE_ACCESS_TOKEN` is unavailable, using `DATABASE_URL` from env, config, or interactive prompt.
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
- **Idempotent schema SQL**: `setup.sql` now uses `CREATE TABLE IF NOT EXISTS`, `CREATE OR REPLACE`, and `DO $$ ... END $$` guards throughout — safe to re-run for upgrades without errors.
|
|
30
|
+
|
|
10
31
|
## [1.5.1] - 2026-05-13
|
|
11
32
|
|
|
12
33
|
### Fixed
|
package/README.md
CHANGED
|
@@ -124,11 +124,16 @@ Add this to your MCP client's config file:
|
|
|
124
124
|
| `npx gitmem-mcp init --client <name>` | Setup for specific client (`claude`, `cursor`, `vscode`, `windsurf`, `generic`) |
|
|
125
125
|
| `npx gitmem-mcp init --yes` | Non-interactive setup |
|
|
126
126
|
| `npx gitmem-mcp init --dry-run` | Preview changes |
|
|
127
|
+
| `npx gitmem-mcp activate <key>` | Activate Pro tier (auto-applies schema) |
|
|
128
|
+
| `npx gitmem-mcp deactivate` | Remove Pro credentials, free device slot |
|
|
129
|
+
| `npx gitmem-mcp setup` | Output schema SQL (for manual Supabase setup) |
|
|
127
130
|
| `npx gitmem-mcp uninstall` | Clean removal (preserves `.gitmem/` data) |
|
|
128
131
|
| `npx gitmem-mcp uninstall --all` | Full removal including data |
|
|
129
132
|
| `npx gitmem-mcp check` | Diagnostic health check |
|
|
130
133
|
|
|
131
|
-
## Pro Tier
|
|
134
|
+
## Pro Tier
|
|
135
|
+
|
|
136
|
+
Self-hosted on your own Supabase. You bring the infrastructure, gitmem sets it up.
|
|
132
137
|
|
|
133
138
|
| What you get | Why your agent cares |
|
|
134
139
|
|-------------|---------------------|
|
|
@@ -136,11 +141,23 @@ Add this to your MCP client's config file:
|
|
|
136
141
|
| **Session analytics** | Spot patterns in what keeps going wrong |
|
|
137
142
|
| **Sub-agent briefing** | Hand institutional context to sub-agents automatically |
|
|
138
143
|
| **Cloud persistence** | Memory survives machine changes, shareable across team |
|
|
139
|
-
| **A/B testing analytics** | Measure which scar phrasings actually change agent behavior
|
|
144
|
+
| **A/B testing analytics** | Measure which scar phrasings actually change agent behavior |
|
|
140
145
|
|
|
141
|
-
|
|
146
|
+
### Quick start
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
npx supabase login # one time
|
|
150
|
+
export SUPABASE_URL="https://yourproject.supabase.co"
|
|
151
|
+
export SUPABASE_SERVICE_ROLE_KEY="eyJ..."
|
|
152
|
+
export OPENROUTER_API_KEY="sk-or-v1-..."
|
|
153
|
+
npx gitmem-mcp activate <your-license-key>
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
The activate command creates all tables, views, RPC functions, and indexes automatically. No manual SQL needed.
|
|
142
157
|
|
|
143
|
-
[
|
|
158
|
+
See **[docs/pro-setup-guide.md](docs/pro-setup-guide.md)** for the full guide.
|
|
159
|
+
|
|
160
|
+
The free tier gives you everything for solo projects. Pro makes recall smarter and memory portable.
|
|
144
161
|
|
|
145
162
|
## GitMem + MEMORY.md
|
|
146
163
|
|
package/bin/gitmem.js
CHANGED
|
@@ -44,6 +44,10 @@ Usage:
|
|
|
44
44
|
npx gitmem-mcp uninstall Clean removal of gitmem from project
|
|
45
45
|
npx gitmem-mcp uninstall --all Also delete .gitmem/ data directory
|
|
46
46
|
|
|
47
|
+
Pro Tier Activation:
|
|
48
|
+
npx gitmem-mcp activate Activate Pro tier (license key + credentials wizard)
|
|
49
|
+
npx gitmem-mcp deactivate Remove Pro credentials from config
|
|
50
|
+
|
|
47
51
|
Other commands:
|
|
48
52
|
npx gitmem-mcp setup Output SQL for Supabase schema setup (pro/dev tier)
|
|
49
53
|
npx gitmem-mcp configure Generate .mcp.json config for Claude Code / Cursor
|
|
@@ -876,6 +880,12 @@ switch (command) {
|
|
|
876
880
|
// New interactive wizard (replaces old cmdInit for CLI usage)
|
|
877
881
|
import("./init-wizard.js");
|
|
878
882
|
break;
|
|
883
|
+
case "activate":
|
|
884
|
+
import("../dist/commands/activate.js").then((m) => m.main(process.argv.slice(3)));
|
|
885
|
+
break;
|
|
886
|
+
case "deactivate":
|
|
887
|
+
import("../dist/commands/deactivate.js").then((m) => m.main(process.argv.slice(3)));
|
|
888
|
+
break;
|
|
879
889
|
case "uninstall":
|
|
880
890
|
import("./uninstall.js");
|
|
881
891
|
break;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitMem Pro Activation Wizard
|
|
3
|
+
*
|
|
4
|
+
* Usage: npx gitmem-mcp activate [license-key]
|
|
5
|
+
*
|
|
6
|
+
* Credential resolution (priority order):
|
|
7
|
+
* 1. Environment variables (SUPABASE_URL, SUPABASE_SERVICE_ROLE_KEY, OPENROUTER_API_KEY)
|
|
8
|
+
* 2. Existing values in .gitmem/config.json (re-activation)
|
|
9
|
+
* 3. Interactive prompt (TTY only)
|
|
10
|
+
*
|
|
11
|
+
* Steps:
|
|
12
|
+
* 1. Accept key as argument or prompt for it
|
|
13
|
+
* 2. Validate key against our endpoint (register device)
|
|
14
|
+
* 3. Resolve Supabase URL + service role key (env → config → prompt)
|
|
15
|
+
* 4. Test Supabase connection (verify tables exist)
|
|
16
|
+
* 5. Resolve OpenRouter API key (env → config → prompt)
|
|
17
|
+
* 6. Write everything to ~/.gitmem/config.json
|
|
18
|
+
*/
|
|
19
|
+
export declare function main(args: string[]): Promise<void>;
|
|
20
|
+
//# sourceMappingURL=activate.d.ts.map
|