@vaur94/agz-memory 0.5.1 → 0.5.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/ARCHITECTURE.md +7 -4
- package/CHANGELOG.md +17 -2
- package/README.md +23 -18
- package/README.tr.md +23 -18
- package/dist/admin.js +1 -1
- package/dist/core.js +1 -1
- package/dist/server.js +3 -3
- package/dist/types/context.d.ts +1 -1
- package/dist/types/server.d.ts +1 -1
- package/dist/types/version.d.ts +1 -1
- package/docs/backup-restore-runbook.md +16 -16
- package/docs/backup-restore-runbook.tr.md +16 -16
- package/docs/schema-v11.md +1 -1
- package/package.json +1 -1
- package/skills/agz-memory/agz-memory.md +3 -1
- package/skills/index.json +1 -1
package/ARCHITECTURE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# AGZ Memory Architecture
|
|
2
2
|
|
|
3
|
-
This document describes the `0.5.
|
|
3
|
+
This document describes the `0.5.2` runtime and SQLite schema v11.
|
|
4
4
|
|
|
5
5
|
## System Boundaries
|
|
6
6
|
|
|
@@ -20,7 +20,7 @@ OpenCode V2 beta-18743
|
|
|
20
20
|
|
|
21
21
|
SQLite outbox
|
|
22
22
|
-> optional derived retrieval backend
|
|
23
|
-
-> disabled in 0.5.
|
|
23
|
+
-> disabled in 0.5.2; backend = none
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
The MCP adapter owns tool schemas, annotations, and result envelopes. The core
|
|
@@ -98,7 +98,10 @@ Capture requires all of these gates:
|
|
|
98
98
|
|
|
99
99
|
1. The plugin version and running OpenCode beta match exactly.
|
|
100
100
|
2. Mode is not `off`, capture is enabled, and exactly one explicit binding
|
|
101
|
-
matches project ID, workspace ID, and canonical directory.
|
|
101
|
+
matches project ID, workspace ID, and canonical directory. A linked Git
|
|
102
|
+
worktree may match its main checkout only after reciprocal worktree metadata
|
|
103
|
+
proves that both use the same common Git directory; persisted binding paths
|
|
104
|
+
are not rewritten.
|
|
102
105
|
3. Only terminal user/assistant text or terminal tool status is projected.
|
|
103
106
|
4. Credential and private-key patterns are removed or quarantined.
|
|
104
107
|
5. The strict `CaptureEventV2` parser enforces UTF-8 size, kind-specific source identity, event
|
|
@@ -133,7 +136,7 @@ original OpenCode context unchanged.
|
|
|
133
136
|
|
|
134
137
|
Semantic providers implement an optional backend contract: project-filtered
|
|
135
138
|
query, idempotent upsert, deterministic delete, full project purge, and health.
|
|
136
|
-
No provider is enabled in `0.5.
|
|
139
|
+
No provider is enabled in `0.5.2`. The SQLite lexical/graph path remains fully
|
|
137
140
|
functional without one.
|
|
138
141
|
|
|
139
142
|
## Derived Index Outbox
|
package/CHANGELOG.md
CHANGED
|
@@ -3,9 +3,24 @@
|
|
|
3
3
|
All notable changes to AGZ Memory are recorded here. The project follows
|
|
4
4
|
[Semantic Versioning](https://semver.org/).
|
|
5
5
|
|
|
6
|
-
## [0.5.
|
|
6
|
+
## [0.5.2] - 2026-09-04
|
|
7
|
+
|
|
8
|
+
### Changed
|
|
9
|
+
|
|
10
|
+
- Updated linked Git worktree guidance so a main checkout and its linked
|
|
11
|
+
worktrees safely reuse the same `memoryProjectID` after Git metadata confirms
|
|
12
|
+
the shared common directory.
|
|
13
|
+
- Preserved persisted binding path and key compatibility while allowing distinct
|
|
14
|
+
OpenCode project/workspace identities to map to that shared memory project.
|
|
15
|
+
- Aligned release metadata, package examples, and bilingual operational guidance
|
|
16
|
+
with the 0.5.2 release surface.
|
|
7
17
|
|
|
8
|
-
|
|
18
|
+
### Compatibility
|
|
19
|
+
|
|
20
|
+
- Retained SQLite schema 11, the exact nine-tool MCP contract, and inert plugin
|
|
21
|
+
defaults across the worktree identity guidance change.
|
|
22
|
+
|
|
23
|
+
## [0.5.1] - 2026-09-04
|
|
9
24
|
|
|
10
25
|
### Changed
|
|
11
26
|
|
package/README.md
CHANGED
|
@@ -10,8 +10,8 @@ as two independently usable packages that advance at the same version:
|
|
|
10
10
|
- `@vaur94/agz-memory-plugin`: an optional OpenCode V2 adapter for bounded
|
|
11
11
|
retrieval and deliberately staged automatic capture.
|
|
12
12
|
|
|
13
|
-
**0.5.
|
|
14
|
-
npm publication
|
|
13
|
+
**0.5.2 status:** This repository documents the 0.5.2 release surface and
|
|
14
|
+
compatibility contract; npm publication and Git hosting state are tracked separately.
|
|
15
15
|
|
|
16
16
|
The MCP server is ready for normal use. The plugin starts inert: no project is
|
|
17
17
|
created, no session is captured, and no context is injected until an explicit
|
|
@@ -35,8 +35,8 @@ binding and rollout mode are configured.
|
|
|
35
35
|
|
|
36
36
|
| Component | Supported version |
|
|
37
37
|
|---|---|
|
|
38
|
-
| Core and MCP | `0.5.
|
|
39
|
-
| OpenCode plugin | `0.5.
|
|
38
|
+
| Core and MCP | `0.5.2` |
|
|
39
|
+
| OpenCode plugin | `0.5.2` |
|
|
40
40
|
| OpenCode V2 | `0.0.0-beta-18743` |
|
|
41
41
|
| `@opencode-ai/plugin` | `0.0.0-beta-18743` |
|
|
42
42
|
| Bun | `>=1.3.14` |
|
|
@@ -50,7 +50,7 @@ itself unless the running OpenCode version exactly matches the supported beta.
|
|
|
50
50
|
Run the server directly:
|
|
51
51
|
|
|
52
52
|
```sh
|
|
53
|
-
bunx @vaur94/agz-memory@0.5.
|
|
53
|
+
bunx @vaur94/agz-memory@0.5.2
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
Or register it in OpenCode V2 under `mcp.servers`:
|
|
@@ -58,13 +58,13 @@ Or register it in OpenCode V2 under `mcp.servers`:
|
|
|
58
58
|
```jsonc
|
|
59
59
|
{
|
|
60
60
|
"skills": [
|
|
61
|
-
"https://raw.githubusercontent.com/ugur-murat-alt/agz-memory/v0.5.
|
|
61
|
+
"https://raw.githubusercontent.com/ugur-murat-alt/agz-memory/v0.5.2/skills/"
|
|
62
62
|
],
|
|
63
63
|
"mcp": {
|
|
64
64
|
"servers": {
|
|
65
65
|
"agz-memory": {
|
|
66
66
|
"type": "local",
|
|
67
|
-
"command": ["bunx", "@vaur94/agz-memory@0.5.
|
|
67
|
+
"command": ["bunx", "@vaur94/agz-memory@0.5.2"],
|
|
68
68
|
"environment": {
|
|
69
69
|
"OPENCODE_MEMORY_DATABASE_PATH": "{env:OPENCODE_MEMORY_DATABASE_PATH}"
|
|
70
70
|
},
|
|
@@ -114,7 +114,8 @@ OpenCode exposes the tools with the configured server prefix, for example
|
|
|
114
114
|
Recommended sequence:
|
|
115
115
|
|
|
116
116
|
1. Call `project_list` and reuse an existing project when it represents the
|
|
117
|
-
same durable workspace.
|
|
117
|
+
same durable workspace. Git linked worktrees are separate checkouts of that
|
|
118
|
+
workspace and must reuse its `projectID`.
|
|
118
119
|
2. Call `project_create` only when no matching project exists.
|
|
119
120
|
3. Keep the returned `projectID`; names can change, UUIDs cannot.
|
|
120
121
|
4. Call `memory_recall` before relying on historical decisions.
|
|
@@ -133,7 +134,7 @@ options:
|
|
|
133
134
|
{
|
|
134
135
|
"plugins": [
|
|
135
136
|
{
|
|
136
|
-
"package": "@vaur94/agz-memory-plugin@0.5.
|
|
137
|
+
"package": "@vaur94/agz-memory-plugin@0.5.2",
|
|
137
138
|
"options": {
|
|
138
139
|
"mode": "off",
|
|
139
140
|
"autoCreateProjects": false,
|
|
@@ -174,9 +175,13 @@ an OpenCode project/workspace/location to an existing AGZ Memory project:
|
|
|
174
175
|
```
|
|
175
176
|
|
|
176
177
|
`memoryProjectID` must come from `project_list`. The directory is resolved with
|
|
177
|
-
the filesystem and compared with the active OpenCode location.
|
|
178
|
-
|
|
179
|
-
|
|
178
|
+
the filesystem and compared with the active OpenCode location. A main checkout
|
|
179
|
+
and a linked Git worktree are accepted as the same repository only when their
|
|
180
|
+
Git metadata confirms the shared common directory. Configure each distinct
|
|
181
|
+
OpenCode project/workspace identity explicitly, but reuse the same
|
|
182
|
+
`memoryProjectID`; the configured canonical path and its persisted hash remain
|
|
183
|
+
unchanged. An unrelated or unverifiable location and a duplicate mapping disable
|
|
184
|
+
the plugin rather than selecting a project heuristically.
|
|
180
185
|
|
|
181
186
|
## Roll Out Safely
|
|
182
187
|
|
|
@@ -206,11 +211,11 @@ quality, and latency gates.
|
|
|
206
211
|
The admin CLI reads the same `OPENCODE_MEMORY_DATABASE_PATH`:
|
|
207
212
|
|
|
208
213
|
```sh
|
|
209
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
210
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
211
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
212
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
213
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
214
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin doctor
|
|
215
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin backup
|
|
216
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin upgrade --to 11
|
|
217
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin capture status
|
|
218
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin outbox status
|
|
214
219
|
```
|
|
215
220
|
|
|
216
221
|
Upgrades take an exclusive migration lock and create a verified backup before
|
|
@@ -219,7 +224,7 @@ restore. Restore and backup deletion use dry-run output plus explicit
|
|
|
219
224
|
confirmation values; never guess them.
|
|
220
225
|
|
|
221
226
|
Use [the backup and restore runbook](docs/backup-restore-runbook.md) for a full
|
|
222
|
-
rehearsal.
|
|
227
|
+
rehearsal. The `0.5.2` backup manifests use `agz-memory-backup/1`; prerelease
|
|
223
228
|
manifests must be handled by the prerelease that created them.
|
|
224
229
|
|
|
225
230
|
## Security Model
|
package/README.tr.md
CHANGED
|
@@ -10,8 +10,8 @@ Aynı sürümde ilerleyen, birbirinden bağımsız kullanılabilen iki paket sun
|
|
|
10
10
|
- `@vaur94/agz-memory-plugin`: sınırlı geri çağırma ve bilinçli olarak aşamalı
|
|
11
11
|
otomatik yakalama için isteğe bağlı OpenCode V2 bağdaştırıcısı.
|
|
12
12
|
|
|
13
|
-
**0.5.
|
|
14
|
-
yayımlama
|
|
13
|
+
**0.5.2 durumu:** Bu depo 0.5.2 sürüm yüzeyini ve uyumluluk sözleşmesini
|
|
14
|
+
belgeler; npm yayımlama ve Git barındırma durumu ayrı olarak izlenir.
|
|
15
15
|
|
|
16
16
|
MCP sunucusu normal kullanım için hazırdır. Eklenti hareketsiz başlar: açık bir
|
|
17
17
|
eşleme ve devreye alma modu verilene kadar proje oluşturmaz, oturum yakalamaz ve
|
|
@@ -35,8 +35,8 @@ bağlam eklemez.
|
|
|
35
35
|
|
|
36
36
|
| Bileşen | Desteklenen sürüm |
|
|
37
37
|
|---|---|
|
|
38
|
-
| Çekirdek ve MCP | `0.5.
|
|
39
|
-
| OpenCode eklentisi | `0.5.
|
|
38
|
+
| Çekirdek ve MCP | `0.5.2` |
|
|
39
|
+
| OpenCode eklentisi | `0.5.2` |
|
|
40
40
|
| OpenCode V2 | `0.0.0-beta-18743` |
|
|
41
41
|
| `@opencode-ai/plugin` | `0.0.0-beta-18743` |
|
|
42
42
|
| Bun | `>=1.3.14` |
|
|
@@ -50,7 +50,7 @@ MCP sunucusu bir OpenCode beta sürümüne bağlı değildir. İsteğe bağlı e
|
|
|
50
50
|
Sunucuyu doğrudan çalıştırın:
|
|
51
51
|
|
|
52
52
|
```sh
|
|
53
|
-
bunx @vaur94/agz-memory@0.5.
|
|
53
|
+
bunx @vaur94/agz-memory@0.5.2
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
Ya da OpenCode V2 içinde `mcp.servers` altına kaydedin:
|
|
@@ -58,13 +58,13 @@ Ya da OpenCode V2 içinde `mcp.servers` altına kaydedin:
|
|
|
58
58
|
```jsonc
|
|
59
59
|
{
|
|
60
60
|
"skills": [
|
|
61
|
-
"https://raw.githubusercontent.com/ugur-murat-alt/agz-memory/v0.5.
|
|
61
|
+
"https://raw.githubusercontent.com/ugur-murat-alt/agz-memory/v0.5.2/skills/"
|
|
62
62
|
],
|
|
63
63
|
"mcp": {
|
|
64
64
|
"servers": {
|
|
65
65
|
"agz-memory": {
|
|
66
66
|
"type": "local",
|
|
67
|
-
"command": ["bunx", "@vaur94/agz-memory@0.5.
|
|
67
|
+
"command": ["bunx", "@vaur94/agz-memory@0.5.2"],
|
|
68
68
|
"environment": {
|
|
69
69
|
"OPENCODE_MEMORY_DATABASE_PATH": "{env:OPENCODE_MEMORY_DATABASE_PATH}"
|
|
70
70
|
},
|
|
@@ -115,7 +115,8 @@ OpenCode araçları yapılandırılan sunucu önekiyle gösterir; örneğin
|
|
|
115
115
|
Önerilen sıra:
|
|
116
116
|
|
|
117
117
|
1. `project_list` çağırın ve aynı kalıcı çalışma alanını temsil eden mevcut
|
|
118
|
-
projeyi yeniden kullanın.
|
|
118
|
+
projeyi yeniden kullanın. Git bağlantılı çalışma ağaçları bu çalışma alanının
|
|
119
|
+
ayrı kod kopyalarıdır ve aynı `projectID` değerini kullanmalıdır.
|
|
119
120
|
2. Yalnız eşleşen proje yoksa `project_create` çağırın.
|
|
120
121
|
3. Dönen `projectID` değerini saklayın; ad değişebilir, UUID değişmez.
|
|
121
122
|
4. Geçmiş kararlara dayanmadan önce `memory_recall` çağırın.
|
|
@@ -135,7 +136,7 @@ ayarlarla ekleyin:
|
|
|
135
136
|
{
|
|
136
137
|
"plugins": [
|
|
137
138
|
{
|
|
138
|
-
"package": "@vaur94/agz-memory-plugin@0.5.
|
|
139
|
+
"package": "@vaur94/agz-memory-plugin@0.5.2",
|
|
139
140
|
"options": {
|
|
140
141
|
"mode": "off",
|
|
141
142
|
"autoCreateProjects": false,
|
|
@@ -176,9 +177,13 @@ OpenCode proje/çalışma alanı/konumunu mevcut AGZ Memory projesine bağlar:
|
|
|
176
177
|
```
|
|
177
178
|
|
|
178
179
|
`memoryProjectID`, `project_list` sonucundan gelmelidir. Dizin gerçek dosya
|
|
179
|
-
sistemi yoluna çözülür ve etkin OpenCode konumuyla karşılaştırılır.
|
|
180
|
-
|
|
181
|
-
|
|
180
|
+
sistemi yoluna çözülür ve etkin OpenCode konumuyla karşılaştırılır. Ana kod
|
|
181
|
+
kopyası ile bağlantılı Git çalışma ağacı, yalnız Git metadata'sı ortak dizini
|
|
182
|
+
doğruladığında aynı depo kabul edilir. Her farklı OpenCode proje/çalışma alanı
|
|
183
|
+
kimliğini açıkça eşleyin, fakat aynı `memoryProjectID` değerini yeniden kullanın;
|
|
184
|
+
yapılandırılmış kanonik yol ve veritabanındaki özeti değişmez. İlişkisiz veya
|
|
185
|
+
doğrulanamayan konum ya da çift eşleme, sezgisel proje seçmek yerine eklentiyi
|
|
186
|
+
kapatır.
|
|
182
187
|
|
|
183
188
|
## Güvenli Devreye Alma
|
|
184
189
|
|
|
@@ -208,11 +213,11 @@ kapılarından geçene kadar `semanticBackend` değeri `none` olmalıdır.
|
|
|
208
213
|
Yönetim aracı aynı `OPENCODE_MEMORY_DATABASE_PATH` değerini okur:
|
|
209
214
|
|
|
210
215
|
```sh
|
|
211
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
212
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
213
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
214
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
215
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
216
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin doctor
|
|
217
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin backup
|
|
218
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin upgrade --to 11
|
|
219
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin capture status
|
|
220
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin outbox status
|
|
216
221
|
```
|
|
217
222
|
|
|
218
223
|
Yükseltmeler özel bir geçiş kilidi alır ve veritabanını değiştirmeden önce
|
|
@@ -221,7 +226,7 @@ dener. Geri yükleme ve yedek silme işlemleri önce deneme çıktısı, sonra a
|
|
|
221
226
|
onay değerleri ister; bu değerleri tahmin etmeyin.
|
|
222
227
|
|
|
223
228
|
Tam prova için [yedekleme ve geri yükleme runbook'unu](docs/backup-restore-runbook.tr.md)
|
|
224
|
-
kullanın.
|
|
229
|
+
kullanın. `0.5.2` yedek manifestleri `agz-memory-backup/1` kullanır;
|
|
225
230
|
ön sürüm manifestleri onları oluşturan ön sürümle işlenmelidir.
|
|
226
231
|
|
|
227
232
|
## Güvenlik Modeli
|
package/dist/admin.js
CHANGED
package/dist/core.js
CHANGED
package/dist/server.js
CHANGED
|
@@ -3394,7 +3394,7 @@ function migrateV9ToV10(db) {
|
|
|
3394
3394
|
}
|
|
3395
3395
|
|
|
3396
3396
|
// src/version.ts
|
|
3397
|
-
var PRODUCT_VERSION = "0.5.
|
|
3397
|
+
var PRODUCT_VERSION = "0.5.2";
|
|
3398
3398
|
|
|
3399
3399
|
// src/db.ts
|
|
3400
3400
|
var DDL = `
|
|
@@ -4069,7 +4069,7 @@ import { McpServer } from "@modelcontextprotocol/server";
|
|
|
4069
4069
|
|
|
4070
4070
|
// src/context.ts
|
|
4071
4071
|
var MEMORY_GUIDANCE = `Use project-scoped memory for durable facts across sessions.
|
|
4072
|
-
- Start with project_list. Reuse a project only when it intentionally represents the same durable workspace or product;
|
|
4072
|
+
- Start with project_list. Reuse a project only when it intentionally represents the same durable workspace or product; Git linked worktrees are separate checkouts of that same workspace, not new memory projects. Create one only when no matching project exists. If the listed projects are ambiguous, ask rather than guessing from a directory, worktree, branch, or session name.
|
|
4073
4073
|
- Prefer the immutable projectID for stable references. projectName is a convenient unique lookup, but names can change.
|
|
4074
4074
|
- Every memory_recall, memory_read, memory_update, memory_link, and memory_pin call must select exactly one project by projectID or projectName.
|
|
4075
4075
|
- The MCP server does not inject notes automatically. Recall relevant history before relying on prior decisions, and use memory_read for full indexed content and graph neighbors.
|
|
@@ -4324,7 +4324,7 @@ function registerTools(server, store) {
|
|
|
4324
4324
|
}));
|
|
4325
4325
|
server.registerTool("project_create", {
|
|
4326
4326
|
title: "Create a memory project",
|
|
4327
|
-
description: "Create an empty memory project only after project_list confirms that no existing project represents the same durable workspace. The returned projectID is immutable; the unique project name may be changed later.",
|
|
4327
|
+
description: "Create an empty memory project only after project_list confirms that no existing project represents the same durable workspace. Git linked worktrees share the existing workspace memory project. The returned projectID is immutable; the unique project name may be changed later.",
|
|
4328
4328
|
inputSchema: z3.object({ projectName: newProjectName }).strict(),
|
|
4329
4329
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, ...CLOSED_WORLD }
|
|
4330
4330
|
}, async ({ projectName: projectName2 }) => guardTool("project_create", () => singleResult(store.createProject(projectName2), "project_create")));
|
package/dist/types/context.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const MEMORY_GUIDANCE = "Use project-scoped memory for durable facts across sessions.\n- Start with project_list. Reuse a project only when it intentionally represents the same durable workspace or product;
|
|
1
|
+
export declare const MEMORY_GUIDANCE = "Use project-scoped memory for durable facts across sessions.\n- Start with project_list. Reuse a project only when it intentionally represents the same durable workspace or product; Git linked worktrees are separate checkouts of that same workspace, not new memory projects. Create one only when no matching project exists. If the listed projects are ambiguous, ask rather than guessing from a directory, worktree, branch, or session name.\n- Prefer the immutable projectID for stable references. projectName is a convenient unique lookup, but names can change.\n- Every memory_recall, memory_read, memory_update, memory_link, and memory_pin call must select exactly one project by projectID or projectName.\n- The MCP server does not inject notes automatically. Recall relevant history before relying on prior decisions, and use memory_read for full indexed content and graph neighbors.\n- After substantial completed work, update an existing note or create a new one only for durable verified facts, decisions, procedures, research, preferences, tasks, or context.\n- Never save transcripts, guesses, secrets, credentials, hidden reasoning, or routine progress.\n- Use memory_pin only to prioritize important matching notes. Read directed links as sourceID PREDICATE targetID; links never cross projects.\n- Inspect every result from a batch because mutations are ordered and non-atomic: earlier items remain applied when a later item fails.\n- memory_update with delete:true permanently deletes one note. project_delete permanently deletes a project and all owned memory. Verify current IDs first and use destructive operations only when explicitly intended.";
|
package/dist/types/server.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { McpServer } from "@modelcontextprotocol/server";
|
|
2
2
|
import type { MemoryStore } from "./store";
|
|
3
3
|
export declare const SERVER_NAME = "agz-memory";
|
|
4
|
-
export declare const SERVER_VERSION: "0.5.
|
|
4
|
+
export declare const SERVER_VERSION: "0.5.2";
|
|
5
5
|
export declare function createMemoryServer(store: MemoryStore): McpServer;
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PRODUCT_VERSION: "0.5.
|
|
1
|
+
export declare const PRODUCT_VERSION: "0.5.2";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
English | [Türkçe](backup-restore-runbook.tr.md)
|
|
4
4
|
|
|
5
|
-
This runbook applies to `@vaur94/agz-memory@0.5.
|
|
5
|
+
This runbook applies to `@vaur94/agz-memory@0.5.2` and SQLite schema v11.
|
|
6
6
|
|
|
7
7
|
## Preconditions
|
|
8
8
|
|
|
@@ -25,16 +25,16 @@ Do not proceed with a guessed or empty path.
|
|
|
25
25
|
Run a read-only health report first:
|
|
26
26
|
|
|
27
27
|
```sh
|
|
28
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
28
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin doctor
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
`ok` must be `true`. Record `schemaVersion`, row counts, and invariant counts.
|
|
32
32
|
Then create a standalone verified backup and upgrade:
|
|
33
33
|
|
|
34
34
|
```sh
|
|
35
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
36
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
37
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
35
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin backup
|
|
36
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin upgrade --to 11
|
|
37
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin doctor
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
The upgrade itself creates another verified pre-migration backup when the
|
|
@@ -54,16 +54,16 @@ The manifest format is `agz-memory-backup/1`. `agz-memory-admin restore` verifie
|
|
|
54
54
|
that the manifest and database are regular files in the same backup directory,
|
|
55
55
|
then checks size, SHA-256, SQLite integrity, foreign keys, and row counts.
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
`0.5.2` does not accept prerelease manifest formats. Use the originating
|
|
58
58
|
prerelease to restore such a backup, run its doctor check, and only then upgrade
|
|
59
|
-
that restored database with `0.5.
|
|
59
|
+
that restored database with `0.5.2`.
|
|
60
60
|
|
|
61
61
|
## Restore Rehearsal
|
|
62
62
|
|
|
63
63
|
Keep all writers stopped. First request a dry run by omitting confirmation:
|
|
64
64
|
|
|
65
65
|
```sh
|
|
66
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
66
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin restore \
|
|
67
67
|
"$OPENCODE_MEMORY_DATABASE_PATH.backup/<backup>.manifest.json"
|
|
68
68
|
```
|
|
69
69
|
|
|
@@ -71,7 +71,7 @@ Compare `targetPath`, `sourceSchema`, `targetSchema`, row counts, size, and
|
|
|
71
71
|
SHA-256 with the recorded backup. Then use the exact manifest hash:
|
|
72
72
|
|
|
73
73
|
```sh
|
|
74
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
74
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin restore \
|
|
75
75
|
"$OPENCODE_MEMORY_DATABASE_PATH.backup/<backup>.manifest.json" \
|
|
76
76
|
--sha256 <manifest-database-sha256> \
|
|
77
77
|
--confirm RESTORE_DATABASE_FROM_VERIFIED_BACKUP
|
|
@@ -84,9 +84,9 @@ database passes all checks.
|
|
|
84
84
|
## Post-Restore Validation
|
|
85
85
|
|
|
86
86
|
```sh
|
|
87
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
88
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
89
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
87
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin doctor
|
|
88
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin capture status
|
|
89
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin outbox status
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
Start only the MCP server and perform read-only `project_list`, `memory_recall`,
|
|
@@ -103,7 +103,7 @@ gate, and restore artifacts, then select a verified backup. Supply the exact
|
|
|
103
103
|
recorded owner ID only on the restoring command:
|
|
104
104
|
|
|
105
105
|
```sh
|
|
106
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
106
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin restore <manifest> \
|
|
107
107
|
--sha256 <manifest-sha256> \
|
|
108
108
|
--confirm RESTORE_DATABASE_FROM_VERIFIED_BACKUP \
|
|
109
109
|
--maintenance-owner <owner-id> \
|
|
@@ -124,7 +124,7 @@ style error first if uncertain. Break only a proven stale lock with the exact
|
|
|
124
124
|
owner ID and confirmation:
|
|
125
125
|
|
|
126
126
|
```sh
|
|
127
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
127
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin unlock \
|
|
128
128
|
--owner <owner-id> \
|
|
129
129
|
--confirm BREAK_STALE_MIGRATION_LOCK
|
|
130
130
|
```
|
|
@@ -138,13 +138,13 @@ The first command is non-destructive and returns a digest over the exact backup
|
|
|
138
138
|
set:
|
|
139
139
|
|
|
140
140
|
```sh
|
|
141
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
141
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin backup prune
|
|
142
142
|
```
|
|
143
143
|
|
|
144
144
|
Review every listed manifest/database pair. Delete only that unchanged set:
|
|
145
145
|
|
|
146
146
|
```sh
|
|
147
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
147
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin backup prune \
|
|
148
148
|
--digest <dry-run-digest> \
|
|
149
149
|
--confirm DELETE_VERIFIED_BACKUPS
|
|
150
150
|
```
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](backup-restore-runbook.md) | Türkçe
|
|
4
4
|
|
|
5
|
-
Bu runbook `@vaur94/agz-memory@0.5.
|
|
5
|
+
Bu runbook `@vaur94/agz-memory@0.5.2` ve SQLite schema v11 için geçerlidir.
|
|
6
6
|
|
|
7
7
|
## Ön Koşullar
|
|
8
8
|
|
|
@@ -25,16 +25,16 @@ Tahmin edilmiş veya boş bir yolla devam etmeyin.
|
|
|
25
25
|
Önce salt-okunur sağlık raporu alın:
|
|
26
26
|
|
|
27
27
|
```sh
|
|
28
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
28
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin doctor
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
`ok` değeri `true` olmalıdır. `schemaVersion`, satır sayıları ve değişmez kural
|
|
32
32
|
sayılarını kaydedin. Sonra bağımsız doğrulanmış yedek oluşturup yükseltin:
|
|
33
33
|
|
|
34
34
|
```sh
|
|
35
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
36
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
37
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
35
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin backup
|
|
36
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin upgrade --to 11
|
|
37
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin doctor
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
Veritabanı v11'den eskiyse yükseltme ayrıca değişiklikten önce doğrulanmış yedek
|
|
@@ -54,16 +54,16 @@ Manifest formatı `agz-memory-backup/1` olur. `agz-memory-admin restore`, manife
|
|
|
54
54
|
ile veritabanının aynı yedek dizinindeki normal dosyalar olduğunu doğrular;
|
|
55
55
|
ardından boyut, SHA-256, SQLite bütünlüğü, foreign key ve satır sayılarını denetler.
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
`0.5.2` ön sürüm manifest formatlarını kabul etmez. Böyle bir yedeği onu
|
|
58
58
|
oluşturan ön sürümle geri yükleyin, o sürümün doctor kontrolünü çalıştırın ve
|
|
59
|
-
yalnız bundan sonra geri yüklenen veritabanını `0.5.
|
|
59
|
+
yalnız bundan sonra geri yüklenen veritabanını `0.5.2` ile yükseltin.
|
|
60
60
|
|
|
61
61
|
## Geri Yükleme Provası
|
|
62
62
|
|
|
63
63
|
Tüm yazıcıları kapalı tutun. Önce onay vermeden deneme yapın:
|
|
64
64
|
|
|
65
65
|
```sh
|
|
66
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
66
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin restore \
|
|
67
67
|
"$OPENCODE_MEMORY_DATABASE_PATH.backup/<backup>.manifest.json"
|
|
68
68
|
```
|
|
69
69
|
|
|
@@ -71,7 +71,7 @@ bunx --package @vaur94/agz-memory@0.5.1 agz-memory-admin restore \
|
|
|
71
71
|
değerlerini kaydedilen yedekle karşılaştırın. Sonra tam manifest özetini kullanın:
|
|
72
72
|
|
|
73
73
|
```sh
|
|
74
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
74
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin restore \
|
|
75
75
|
"$OPENCODE_MEMORY_DATABASE_PATH.backup/<backup>.manifest.json" \
|
|
76
76
|
--sha256 <manifest-database-sha256> \
|
|
77
77
|
--confirm RESTORE_DATABASE_FROM_VERIFIED_BACKUP
|
|
@@ -84,9 +84,9 @@ veritabanı tüm kontrollerden geçmeden bunu silmeyin.
|
|
|
84
84
|
## Geri Yükleme Sonrası Doğrulama
|
|
85
85
|
|
|
86
86
|
```sh
|
|
87
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
88
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
89
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
87
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin doctor
|
|
88
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin capture status
|
|
89
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin outbox status
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
Yalnız MCP sunucusunu başlatın ve salt-okunur `project_list`, `memory_recall` ve
|
|
@@ -103,7 +103,7 @@ dosyaları, kapıyı ve geri yükleme kalıntılarını koruyun; ardından doğr
|
|
|
103
103
|
yedek seçin. Kayıtlı tam sahip kimliğini yalnız geri yükleme komutunda verin:
|
|
104
104
|
|
|
105
105
|
```sh
|
|
106
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
106
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin restore <manifest> \
|
|
107
107
|
--sha256 <manifest-sha256> \
|
|
108
108
|
--confirm RESTORE_DATABASE_FROM_VERIFIED_BACKUP \
|
|
109
109
|
--maintenance-owner <owner-id> \
|
|
@@ -123,7 +123,7 @@ Sahip dosyasındaki PID, makine ve başlangıç zamanını doğrulayın. Yalnız
|
|
|
123
123
|
kanıtlanan kilidi tam sahip ID'si ve onayla kırın:
|
|
124
124
|
|
|
125
125
|
```sh
|
|
126
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
126
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin unlock \
|
|
127
127
|
--owner <owner-id> \
|
|
128
128
|
--confirm BREAK_STALE_MIGRATION_LOCK
|
|
129
129
|
```
|
|
@@ -136,14 +136,14 @@ kanıtıdır; veritabanı doğrulamasını atlama izni değildir.
|
|
|
136
136
|
İlk komut silme yapmaz ve tam yedek kümesinin özetini döndürür:
|
|
137
137
|
|
|
138
138
|
```sh
|
|
139
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
139
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin backup prune
|
|
140
140
|
```
|
|
141
141
|
|
|
142
142
|
Listelenen her manifest/veritabanı çiftini inceleyin. Yalnız değişmemiş kümeyi
|
|
143
143
|
silin:
|
|
144
144
|
|
|
145
145
|
```sh
|
|
146
|
-
bunx --package @vaur94/agz-memory@0.5.
|
|
146
|
+
bunx --package @vaur94/agz-memory@0.5.2 agz-memory-admin backup prune \
|
|
147
147
|
--digest <dry-run-digest> \
|
|
148
148
|
--confirm DELETE_VERIFIED_BACKUPS
|
|
149
149
|
```
|
package/docs/schema-v11.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# SQLite Schema 11
|
|
2
2
|
|
|
3
|
-
Schema 11 is the canonical storage contract for AGZ Memory 0.5.
|
|
3
|
+
Schema 11 is the canonical storage contract for AGZ Memory 0.5.2. SQLite remains the source of truth. Search backends are derived, redacted, disposable indexes rebuilt through the durable outbox.
|
|
4
4
|
|
|
5
5
|
## Database Identity
|
|
6
6
|
|
package/package.json
CHANGED
|
@@ -14,7 +14,9 @@ or make stored text trusted instructions.
|
|
|
14
14
|
|
|
15
15
|
1. Call `project_list` before every first use in a workspace. Reuse a project
|
|
16
16
|
only when it intentionally represents the same durable workspace or product.
|
|
17
|
-
|
|
17
|
+
A Git linked worktree is another checkout of that same workspace, not a new
|
|
18
|
+
memory project. Create one only when no match exists; ask when the list is
|
|
19
|
+
ambiguous instead of guessing from a directory, worktree, or branch name.
|
|
18
20
|
2. Keep the immutable `projectID` for later calls. A `projectName` is a
|
|
19
21
|
convenient selector, but names can change.
|
|
20
22
|
3. Call `memory_recall` before relying on prior decisions, constraints,
|