@vib795/agent-memory 0.1.3 → 0.1.5

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/README.md CHANGED
@@ -1,6 +1,9 @@
1
1
  # agent-memory
2
2
 
3
+ [![npm](https://img.shields.io/npm/v/@vib795/agent-memory)](https://www.npmjs.com/package/@vib795/agent-memory)
3
4
  [![test](https://github.com/vib795/agent-memory/actions/workflows/test.yml/badge.svg)](https://github.com/vib795/agent-memory/actions/workflows/test.yml)
5
+ [![release](https://github.com/vib795/agent-memory/actions/workflows/release.yml/badge.svg)](https://github.com/vib795/agent-memory/actions/workflows/release.yml)
6
+ [![provenance](https://img.shields.io/badge/provenance-attested-brightgreen)](https://www.npmjs.com/package/@vib795/agent-memory)
4
7
  [![node](https://img.shields.io/badge/node-%3E%3D22.5-brightgreen)](https://nodejs.org)
5
8
  [![dependencies](https://img.shields.io/badge/runtime%20dependencies-0-brightgreen)](package.json)
6
9
  [![license](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
@@ -141,7 +144,11 @@ routing digest.
141
144
  | Claude Code, CLI and VS Code extension | linked skill directory | `~/.claude/skills/<name>/` |
142
145
  | Codex CLI | linked skill directory | `$CODEX_HOME/skills/<name>/` |
143
146
  | VS Code, Insiders, VSCodium, Cursor, Windsurf | prompt file | `<user data>/prompts/<name>.prompt.md` |
144
- | Copilot CLI | *detected, skipped* | it documents no user-global prompt directory; use `.github/copilot-instructions.md` per repo |
147
+ | GitHub Copilot CLI | linked skill directory | `~/.copilot/skills/<name>/` |
148
+
149
+ GitHub documents two personal skill directories, `~/.copilot/skills` and
150
+ `~/.agents/skills`, and Copilot reads both. The shared one is always written, so
151
+ Copilot is served even on a machine that has never run the CLI.
145
152
 
146
153
  Prompt files are what GitHub Copilot chat reads, and they appear as `/recall`,
147
154
  `/remember` and `/handoff` in the chat box. They are **generated from the same
@@ -161,8 +168,38 @@ command is documented as part of the install. If you would rather have it automa
161
168
  npm install -g --allow-scripts=@vib795/agent-memory @vib795/agent-memory
162
169
  ```
163
170
 
164
- Either way `agent-memory doctor` tells you where you stand; it reports
165
- `skills linked: none registered` when setup has not run.
171
+ Either way `agent-memory doctor` tells you where you stand. It checks the files
172
+ rather than the tools, and names any agent it found that has no skills in it:
173
+
174
+ ```
175
+ FAIL skills installed: GitHub Copilot CLI: handoff, recall, remember — run `agent-memory setup`
176
+ ```
177
+
178
+ Detecting an agent is not the same as having installed into it, and a check that
179
+ conflated the two would report healthy on exactly the machine where nothing ran.
180
+
181
+ ### The skills on their own
182
+
183
+ The three skills are also published as [agent skills](https://docs.github.com/en/copilot/concepts/agents/about-agent-skills),
184
+ so they can be installed without the package:
185
+
186
+ ```bash
187
+ gh skill install vib795/agent-memory --scope user
188
+ ```
189
+
190
+ That gives you `/handoff`, `/remember` and `/recall` in every agent that reads the
191
+ shared skill directories, and nothing else — no CLI, so no store. The skills say so
192
+ when you run them and name the one command that fixes it. Use this to try the
193
+ prompts; use npm when you want the memory.
194
+
195
+ Claude Code can take the same three as a plugin:
196
+
197
+ ```
198
+ /plugin marketplace add vib795/agent-memory
199
+ /plugin install agent-memory@agent-memory
200
+ ```
201
+
202
+ The same caveat applies: the plugin carries the skills, `npm` carries the store.
166
203
 
167
204
  Windows uses directory junctions, which need neither admin rights nor Developer
168
205
  Mode. On a network-backed profile (FSLogix, roaming) junctions fail and the skills
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vib795/agent-memory",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
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",
@@ -2,11 +2,8 @@
2
2
  name: handoff
3
3
  version: 0.1.0
4
4
  description: Capture the working state of the current conversation into a portable handoff file, so an agent in a different VS Code window or a different repository can continue the work without the user re-explaining it. Use when the user says handoff, hand this off, save context, wrap this up, or continue this elsewhere.
5
- allowed-tools:
6
- - Bash
7
- - Read
8
- - Write
9
- - Glob
5
+ license: MIT
6
+ allowed-tools: Bash Read Write Glob
10
7
  triggers:
11
8
  - handoff
12
9
  - hand this off
@@ -2,9 +2,8 @@
2
2
  name: recall
3
3
  version: 0.1.0
4
4
  description: "Durable project knowledge: 5 notes, 1 constraint across agent-memory. Topics: memory store is markdown with a disposable sqlite cache, chose node:sqlite over better-sqlite3, sqlite recursive cte is the graph engine. Use when you need to know how a system works, why a decision was made, what convention applies, or what the environment forbids."
5
- allowed-tools:
6
- - Bash
7
- - Read
5
+ license: MIT
6
+ allowed-tools: Bash Read
8
7
  triggers:
9
8
  - how does this work
10
9
  - why did we
@@ -118,7 +117,11 @@ Rules that separate a useful recall from a confident wrong one:
118
117
  ## Failure handling
119
118
 
120
119
  - **`agent-memory: command not found`.** The package is not installed or not on
121
- PATH. Say so and answer from the code; do not attempt to install it.
120
+ PATH. This is the expected state when the skill was installed on its own, with
121
+ `gh skill install`, rather than with the package. Answer from the code, then say
122
+ once that the store needs `npm install -g @vib795/agent-memory` (Node >= 22.5).
123
+ Do not run it yourself: installing a global package is the user's decision, and on
124
+ a managed desktop it is one they may not be free to make.
122
125
  - **Empty store.** Answer from the code, then mention `/remember` once.
123
126
  - **`doctor` reports a problem.** Report it in one line and continue. `index.db` is
124
127
  a cache; `agent-memory index` rebuilds it from the markdown, which is the source
@@ -2,10 +2,8 @@
2
2
  name: remember
3
3
  version: 0.1.0
4
4
  description: Capture durable project knowledge from the current conversation into the shared memory graph, so a later conversation in any window or repository already knows it. Use when the user says remember this, save this, note this for later, or /remember.
5
- allowed-tools:
6
- - Bash
7
- - Read
8
- - Write
5
+ license: MIT
6
+ allowed-tools: Bash Read Write
9
7
  triggers:
10
8
  - remember this
11
9
  - save this for later
@@ -149,7 +147,9 @@ Warnings from `write` are worth surfacing verbatim:
149
147
 
150
148
  - **Validation failed.** `write` reports every error at once. Fix them all and retry
151
149
  once. If it fails again, print the errors and stop; do not guess at the schema.
152
- - **`agent-memory: command not found`.** Say the package is not installed and print
153
- the JSON in the chat so the work is not lost.
150
+ - **`agent-memory: command not found`.** Print the JSON in the chat first, so the
151
+ work is not lost, then say the store needs `npm install -g @vib795/agent-memory`
152
+ (Node >= 22.5). Do not run it yourself. This is the expected state when the skill
153
+ was installed on its own with `gh skill install` rather than with the package.
154
154
  - **Nothing durable in the conversation.** Say so in one line. That is a correct
155
155
  outcome, not a failure.
package/src/cli.js CHANGED
@@ -10,8 +10,9 @@ import { neighborhood, applyBudget } from './graph.js';
10
10
  import { buildTree, renderTree, buildDigest } from './digest.js';
11
11
  import { compact, maybeCompact } from './compact.js';
12
12
  import { staleness, currentRepo, reviewCandidates } from './staleness.js';
13
- import { setup as runSetup, unlinkSkills, danglingSkillLinks } from './setup.js';
14
- import { detectTargets } from './targets.js';
13
+ import { setup as runSetup, unlinkSkills, danglingSkillLinks, SKILLS } from './setup.js';
14
+ import { detectTargets, installableTargets } from './targets.js';
15
+ import { join } from 'node:path';
15
16
 
16
17
  /**
17
18
  * One process, one answer.
@@ -473,6 +474,28 @@ function cmdDoctor() {
473
474
  agents.map((t) => `${t.label}${t.kind === 'unsupported' ? ' (skipped)' : ''}`).join('; '),
474
475
  );
475
476
 
477
+ // Detection is not installation, and conflating them is how this tool reports
478
+ // healthy while doing nothing. npm gates postinstall scripts behind allow-scripts,
479
+ // and managed profiles set ignore-scripts=true; in both cases the CLI lands on PATH
480
+ // and every agent directory stays empty, while every other check here still passes.
481
+ // So verify the files, per agent, rather than trusting that setup ever ran.
482
+ const gaps = [];
483
+ for (const t of installableTargets()) {
484
+ const absent = SKILLS.filter((name) =>
485
+ t.kind === 'skill-dir'
486
+ ? !existsSync(join(t.dir, name, 'SKILL.md'))
487
+ : !existsSync(join(t.dir, `${name}.prompt.md`)),
488
+ );
489
+ if (absent.length) gaps.push(`${t.label}: ${absent.join(', ')}`);
490
+ }
491
+ add(
492
+ 'skills installed',
493
+ gaps.length === 0,
494
+ gaps.length
495
+ ? `${gaps.join('; ')} — run \`agent-memory setup\``
496
+ : `${SKILLS.length} in each of ${installableTargets().length} agents`,
497
+ );
498
+
476
499
  const dangling = danglingSkillLinks();
477
500
  add(
478
501
  'no broken skill links',
package/src/targets.js CHANGED
@@ -115,18 +115,19 @@ export function detectTargets(home = agentHome()) {
115
115
  });
116
116
  }
117
117
 
118
- // Detected and deliberately not written to. Copilot CLI documents no user-global
119
- // prompt or skill directory, and writing into its config folder on a guess is how
120
- // you ship a file that does nothing while claiming support for it.
121
- const copilotCli = join(home, '.copilot');
122
- if (existsSync(copilotCli)) {
118
+ // GitHub documents two personal skill directories, `~/.copilot/skills` and
119
+ // `~/.agents/skills`, and Copilot reads both. The `agents` entry above therefore
120
+ // already covers Copilot on a machine that has never run the CLI; this entry exists
121
+ // so that a machine which has one keeps its skills where its own docs say to look.
122
+ const copilotHome = join(home, '.copilot');
123
+ if (existsSync(copilotHome)) {
123
124
  targets.push({
124
125
  id: 'copilot-cli',
125
- label: 'Copilot CLI',
126
- kind: 'unsupported',
127
- dir: copilotCli,
126
+ label: 'GitHub Copilot CLI',
127
+ kind: 'skill-dir',
128
+ dir: join(copilotHome, 'skills'),
128
129
  detected: true,
129
- note: 'no user-global prompt directory; use .github/copilot-instructions.md per repo',
130
+ note: 'personal agent skills, same SKILL.md layout',
130
131
  });
131
132
  }
132
133