memgineering 0.6.0 → 0.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 CHANGED
@@ -11,6 +11,24 @@ language the reader wants. The bilingual rule the monorepo applies to
11
11
 
12
12
  ## [Unreleased]
13
13
 
14
+ ## [0.6.1] — 2026-08-16
15
+
16
+ ### Fixed
17
+
18
+ - **`memgineering setup` can change a hook it already installed.** It could
19
+ not, and 0.6.0 depended on it being able to. That release widened the
20
+ before-edit hook so a rule about a command — committing, deleting, deploying
21
+ — could be shown at all, and told people to re-run setup to pick it up.
22
+ Re-running setup did nothing: seeing its own hook already in your settings, it
23
+ reported success and left the old shape in place. So the fix reached only
24
+ machines that had never installed memgineering, and the changelog line telling
25
+ everyone else how to get it was wrong.
26
+
27
+ setup now brings a hook it owns up to the current version's shape, in place —
28
+ no duplicate group, and no rewrite when nothing differs. **If you installed
29
+ 0.6.0, run `memgineering setup` once more and restart the conversation**;
30
+ this time it will take.
31
+
14
32
  ## [0.6.0] — 2026-08-16
15
33
 
16
34
  ### Added
package/dist/index.js CHANGED
@@ -7087,10 +7087,8 @@ async function installHook(spec, tool, dryRun) {
7087
7087
  }
7088
7088
  const hooks = settings["hooks"] ?? {};
7089
7089
  const existingGroups = Array.isArray(hooks[spec.event]) ? [...hooks[spec.event]] : [];
7090
- const already = existingGroups.some((group) => JSON.stringify(group).includes(spec.signature));
7091
- if (already) return "unchanged";
7092
7090
  const matcher = spec.matcher?.[tool.id];
7093
- existingGroups.push({
7091
+ const desired = {
7094
7092
  ...matcher === void 0 ? {} : { matcher },
7095
7093
  /*
7096
7094
  * Two ceilings, and both earn their place. The CLI gives up on its own
@@ -7100,7 +7098,21 @@ async function installHook(spec, tool, dryRun) {
7100
7098
  * start its own timer is still the host's to kill.
7101
7099
  */
7102
7100
  hooks: [{ type: "command", command: spec.command, timeout: HOOK_TIMEOUT_S }]
7103
- });
7101
+ };
7102
+ const sameCommand = (group) => {
7103
+ const entries = group?.hooks;
7104
+ return Array.isArray(entries) && entries.some((h) => h?.command === spec.command);
7105
+ };
7106
+ let at = existingGroups.findIndex(sameCommand);
7107
+ if (at === -1) {
7108
+ at = existingGroups.findIndex((g) => JSON.stringify(g).includes(spec.signature));
7109
+ }
7110
+ if (at === -1) {
7111
+ existingGroups.push(desired);
7112
+ } else {
7113
+ if (JSON.stringify(existingGroups[at]) === JSON.stringify(desired)) return "unchanged";
7114
+ existingGroups[at] = desired;
7115
+ }
7104
7116
  const next = { ...settings, hooks: { ...hooks, [spec.event]: existingGroups } };
7105
7117
  if (!dryRun) {
7106
7118
  await mkdir13(dirname5(settingsPath), { recursive: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "memgineering",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "private": false,
5
5
  "description": "One memory for the AI you connect. Recall, remember, and revise a brain your agents share \u2014 stored in your own folder.",
6
6
  "license": "Apache-2.0",