@vib795/agent-memory 0.1.10 → 0.1.11

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/HOWTO.md CHANGED
@@ -236,16 +236,17 @@ Prompt files are copies, not links, so they do not update themselves.
236
236
 
237
237
  ### GitHub Copilot CLI
238
238
 
239
- **Not supported, deliberately.** It is detected, and `setup` tells you it is skipping it.
239
+ **Supported.** `setup` installs the three skills into `~/.copilot/skills/<name>/`, and
240
+ they appear as `/handoff`, `/remember` and `/recall`.
240
241
 
241
- Copilot CLI has no user-wide place to put instructions, so there is nothing to install
242
- into. Writing a file into its config folder on a hunch is how you ship something that
243
- does nothing while claiming to work.
242
+ GitHub documents two personal skill directories, `~/.copilot/skills` and
243
+ `~/.agents/skills`, and Copilot reads both. The shared one is always written, so
244
+ Copilot is served even on a machine that has never run the CLI; the `.copilot` one is
245
+ written as well when that directory exists, so a machine that has run it keeps its
246
+ skills where its own documentation says to look.
244
247
 
245
- If you want memory in a specific repository with Copilot CLI, add the instructions to
246
- that repo's `.github/copilot-instructions.md` by hand. That works, but you have to do it
247
- per repository — which is the exact problem this package exists to solve everywhere
248
- else.
248
+ Earlier versions of this guide said Copilot CLI was unsupported. That was true when it
249
+ was written and stopped being true in 0.1.5.
249
250
 
250
251
  ---
251
252
 
@@ -326,9 +327,40 @@ agent-memory doctor
326
327
 
327
328
  ---
328
329
 
329
- ## 12. Removing it
330
+ ## 12. Updating it
330
331
 
331
- **The order matters, and npm will not do it for you:**
332
+ **Installed from npm:**
333
+
334
+ ```bash
335
+ npm install -g @vib795/agent-memory@latest
336
+ agent-memory setup
337
+ ```
338
+
339
+ The second line is not optional. Prompt files are copies rather than links, so VS Code
340
+ keeps reading the old text until something rewrites them, and nothing warns you.
341
+
342
+ **Installed from a clone** — one command, which pulls and re-runs the installer:
343
+
344
+ ```bash
345
+ ./update.sh # macOS / Linux
346
+ powershell -ExecutionPolicy Bypass -File .\update.ps1 # Windows
347
+ ```
348
+
349
+ Both finish with `agent-memory doctor`, so you find out straight away if a tool was
350
+ left holding stale files. Your notes are never touched by an upgrade.
351
+
352
+ ---
353
+
354
+ ## 13. Removing it
355
+
356
+ **One command, which does the two steps in the order that works:**
357
+
358
+ ```bash
359
+ ./uninstall.sh # macOS / Linux
360
+ powershell -ExecutionPolicy Bypass -File .\uninstall.ps1 # Windows
361
+ ```
362
+
363
+ **Or by hand. The order matters, and npm will not do it for you:**
332
364
 
333
365
  ```bash
334
366
  agent-memory uninstall # first — this removes the commands from your tools
package/README.md CHANGED
@@ -398,10 +398,40 @@ What is deliberately unproven, and where you will find out: the cold-read test
398
398
  fresh chat in a repo untouched for a month, answering correctly from the digest
399
399
  alone. That needs real elapsed time and cannot be faked in a test suite.
400
400
 
401
+ ## Update
402
+
403
+ An upgrade is not finished until `setup` has run again. Prompt files are copies
404
+ rather than links, so an editor keeps reading the old text until something rewrites
405
+ them, and nothing warns you.
406
+
407
+ **Installed from npm:**
408
+
409
+ ```bash
410
+ npm install -g @vib795/agent-memory@latest
411
+ agent-memory setup
412
+ ```
413
+
414
+ **Installed from a clone** — one command, which pulls and re-runs the installer:
415
+
416
+ ```bash
417
+ ./update.sh # macOS / Linux
418
+ powershell -ExecutionPolicy Bypass -File .\update.ps1 # Windows
419
+ ```
420
+
421
+ Both end in `agent-memory doctor`, so you find out immediately if an agent was left
422
+ holding stale files. Your notes are never touched by an upgrade.
423
+
401
424
  ## Uninstall
402
425
 
403
426
  Order matters, and npm will not do it for you:
404
427
 
428
+ ```bash
429
+ ./uninstall.sh # macOS / Linux
430
+ powershell -ExecutionPolicy Bypass -File .\uninstall.ps1 # Windows
431
+ ```
432
+
433
+ Or by hand, which is the same two steps in the same order:
434
+
405
435
  ```bash
406
436
  agent-memory uninstall # first — removes every skill link and prompt file
407
437
  npm uninstall -g @vib795/agent-memory
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vib795/agent-memory",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "description": "Durable cross-repo knowledge graph for GitHub Copilot and Claude Code. Markdown source of truth, disposable SQLite index, zero runtime dependencies.",
5
5
  "keywords": [
6
6
  "github-copilot",
@@ -36,6 +36,10 @@
36
36
  "skills/",
37
37
  "install.sh",
38
38
  "install.ps1",
39
+ "update.sh",
40
+ "update.ps1",
41
+ "uninstall.sh",
42
+ "uninstall.ps1",
39
43
  "README.md",
40
44
  "HOWTO.md",
41
45
  "LICENSE"
package/uninstall.ps1 ADDED
@@ -0,0 +1,54 @@
1
+ <#
2
+ .SYNOPSIS
3
+ Removes the skills and the CLI, in the order that is recoverable.
4
+
5
+ .DESCRIPTION
6
+ npm will not enforce that order and gets it wrong on its own: `npm uninstall -g`
7
+ deletes the package and leaves one link per skill per agent pointing at nothing,
8
+ which every one of those agents still tries to load. By then the binary that would
9
+ have cleaned them up is gone too, so tooling cannot fix it. This unlinks first and
10
+ removes the package second.
11
+
12
+ Your notes are never touched. They are plain markdown under
13
+ %USERPROFILE%\.agents\memory, they outlive the tool that indexed them, and removing
14
+ them is your call, not this script's.
15
+
16
+ .EXAMPLE
17
+ powershell -ExecutionPolicy Bypass -File .\uninstall.ps1
18
+ #>
19
+
20
+ # Not 'Stop': a half-finished uninstall is worse than a reported failure, so each step
21
+ # is allowed to fail and say so.
22
+ $ErrorActionPreference = 'Continue'
23
+
24
+ $source = $PSScriptRoot
25
+
26
+ $node = Get-Command node -ErrorAction SilentlyContinue
27
+ if (-not $node) {
28
+ Write-Error "node not found on PATH. agent-memory needs Node >= 22.5."
29
+ exit 1
30
+ }
31
+
32
+ Write-Host "Removing skills" -ForegroundColor Cyan
33
+ # Run from the checkout rather than the installed binary, so this still works when the
34
+ # global package is already gone.
35
+ & node (Join-Path $source 'src\cli.js') uninstall
36
+
37
+ Write-Host ""
38
+ Write-Host "Removing the CLI" -ForegroundColor Cyan
39
+ try {
40
+ & npm uninstall -g '@vib795/agent-memory' 2>&1 | Out-Null
41
+ $npmExit = $LASTEXITCODE
42
+ } catch {
43
+ $npmExit = 1
44
+ }
45
+
46
+ if ($npmExit -eq 0) {
47
+ Write-Host " [npm] package removed" -ForegroundColor Green
48
+ } else {
49
+ Write-Host " [npm] not removed. It may not be installed globally:" -ForegroundColor Yellow
50
+ Write-Host " npm uninstall -g `"@vib795/agent-memory`"" -ForegroundColor Yellow
51
+ }
52
+
53
+ Write-Host ""
54
+ Write-Host "Done. Your notes are untouched." -ForegroundColor Cyan
package/uninstall.sh ADDED
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env bash
2
+ # Removes the skills and the CLI, in the order that is recoverable.
3
+ #
4
+ # npm will not enforce that order and gets it wrong on its own: `npm uninstall -g`
5
+ # deletes the package and leaves one link per skill per agent pointing at nothing,
6
+ # which every one of those agents still tries to load. By then the binary that would
7
+ # have cleaned them up is gone too, so tooling cannot fix it. Unlink first, remove
8
+ # the package second.
9
+ #
10
+ # Your notes are never touched. They are plain markdown under ~/.agents/memory, they
11
+ # outlive the tool that indexed them, and removing them is your call, not this script's.
12
+ #
13
+ # No `set -e`: a half-finished uninstall is worse than a reported failure, so each
14
+ # step is allowed to fail and say so.
15
+ set -uo pipefail
16
+
17
+ source_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
18
+
19
+ if ! command -v node >/dev/null 2>&1; then
20
+ echo "node not found on PATH. agent-memory needs Node >= 22.5." >&2
21
+ exit 1
22
+ fi
23
+
24
+ echo "Removing skills"
25
+ # Run from the checkout rather than the installed binary, so this still works when
26
+ # the global package is already gone.
27
+ node "$source_dir/src/cli.js" uninstall
28
+
29
+ echo
30
+ echo "Removing the CLI"
31
+ if npm uninstall -g @vib795/agent-memory >/dev/null 2>&1; then
32
+ echo " [npm] package removed"
33
+ else
34
+ echo " [npm] not removed. It may not be installed globally, or may need sudo:"
35
+ echo " npm uninstall -g @vib795/agent-memory"
36
+ fi
37
+
38
+ echo
39
+ echo "Done. Your notes are untouched at ${AGENT_MEMORY_HOME:-$HOME/.agents/memory}."
package/update.ps1 ADDED
@@ -0,0 +1,45 @@
1
+ <#
2
+ .SYNOPSIS
3
+ Updates a clone install: pull, then re-run the installer.
4
+
5
+ .DESCRIPTION
6
+ The install logic is deliberately not repeated here. install.ps1 already relinks the
7
+ skills, relinks the CLI and runs doctor; an update is exactly that plus a pull, and
8
+ writing it a second time is how the two drift.
9
+
10
+ Re-running setup is not optional on an upgrade. Prompt files are copies rather than
11
+ links, so VS Code keeps reading the old text until something rewrites it.
12
+
13
+ .EXAMPLE
14
+ powershell -ExecutionPolicy Bypass -File .\update.ps1
15
+ #>
16
+
17
+ $ErrorActionPreference = 'Stop'
18
+
19
+ $source = $PSScriptRoot
20
+
21
+ if (-not (Test-Path (Join-Path $source '.git'))) {
22
+ Write-Host "This is not a git checkout, so there is nothing to pull." -ForegroundColor Yellow
23
+ Write-Host "If you installed from npm, update with:" -ForegroundColor Yellow
24
+ Write-Host " npm install -g @vib795/agent-memory@latest" -ForegroundColor Yellow
25
+ Write-Host " agent-memory setup" -ForegroundColor Yellow
26
+ exit 1
27
+ }
28
+
29
+ Write-Host "Pulling" -ForegroundColor Cyan
30
+ # git writes ordinary progress to stderr, and `Stop` would treat that as terminating.
31
+ $previousPreference = $ErrorActionPreference
32
+ $ErrorActionPreference = 'Continue'
33
+ try {
34
+ & git -C $source pull --ff-only 2>&1 | Write-Host
35
+ $gitExit = $LASTEXITCODE
36
+ } finally {
37
+ $ErrorActionPreference = $previousPreference
38
+ }
39
+ if ($gitExit -ne 0) {
40
+ Write-Error "git pull failed. Resolve that first, then run this again."
41
+ exit 1
42
+ }
43
+
44
+ Write-Host ""
45
+ & powershell -ExecutionPolicy Bypass -File (Join-Path $source 'install.ps1')
package/update.sh ADDED
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env bash
2
+ # Updates a clone install: pull, then re-run the installer.
3
+ #
4
+ # The install logic is deliberately not repeated here. install.sh already relinks the
5
+ # skills, relinks the CLI and runs doctor; an update is exactly that plus a pull, and
6
+ # writing it a second time is how the two drift.
7
+ #
8
+ # Re-running setup is not optional on an upgrade. Prompt files are copies rather than
9
+ # links, so an editor keeps reading the old text until something rewrites it.
10
+ set -euo pipefail
11
+
12
+ source_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
13
+
14
+ if [ ! -d "$source_dir/.git" ]; then
15
+ echo "This is not a git checkout, so there is nothing to pull." >&2
16
+ echo "If you installed from npm, update with:" >&2
17
+ echo " npm install -g @vib795/agent-memory@latest" >&2
18
+ echo " agent-memory setup" >&2
19
+ exit 1
20
+ fi
21
+
22
+ echo "Pulling"
23
+ git -C "$source_dir" pull --ff-only
24
+
25
+ echo
26
+ exec "$source_dir/install.sh"