@codyswann/lisa 8.10.1 → 8.10.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.
Files changed (73) hide show
  1. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  2. package/dist/core/upstream-evidence-manifest.json +4 -1
  3. package/package.json +4 -4
  4. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  5. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  6. package/plugins/lisa/.codex-plugin/skills/lisa-secrets-access/scripts/task-unbound.mjs +33 -3
  7. package/plugins/lisa/skills/lisa-secrets-access/scripts/task-unbound.mjs +33 -3
  8. package/plugins/lisa-agy/plugin.json +1 -1
  9. package/plugins/lisa-agy/skills/lisa-secrets-access/scripts/task-unbound.mjs +33 -3
  10. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  11. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  12. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  13. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  14. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  15. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  16. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  17. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  18. package/plugins/lisa-copilot/skills/lisa-secrets-access/scripts/task-unbound.mjs +33 -3
  19. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  20. package/plugins/lisa-cursor/skills/lisa-secrets-access/scripts/task-unbound.mjs +33 -3
  21. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  22. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  23. package/plugins/lisa-devin/skills/lisa-secrets-access/scripts/task-unbound.mjs +33 -3
  24. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  25. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  26. package/plugins/lisa-expo-agy/plugin.json +1 -1
  27. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  28. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  29. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  30. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  31. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  32. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  33. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  34. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  35. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  36. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  37. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  38. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  39. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  40. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  41. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  42. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  43. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  44. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  45. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  46. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  47. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  48. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  49. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  50. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  51. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  52. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  53. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  54. package/plugins/lisa-rails-agy/plugin.json +1 -1
  55. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  56. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  57. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  58. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  59. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  60. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  61. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  62. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  63. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  64. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  65. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  66. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  67. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  68. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  69. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  70. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  71. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  72. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  73. package/plugins/src/base/skills/lisa-secrets-access/scripts/task-unbound.mjs +33 -3
@@ -27,9 +27,9 @@ export const NIGHTLY_E2E_GUARD_BEHAVIOR_CERTIFICATES = Object.freeze({
27
27
  }),
28
28
  "4679c1e7cc92f960bad81854b9ce68a14aa0e404f2264cca0c2d6186008a17eb": Object.freeze({
29
29
  contractVersion: "1.9.0",
30
- packageVersions: Object.freeze(["8.10.1"]),
30
+ packageVersions: Object.freeze(["8.10.2"]),
31
31
  provenances: Object.freeze([
32
- "workspace package @codyswann/lisa@8.10.1 (typescript/copy-overwrite/scripts/check-nightly-e2e-health.mjs)",
32
+ "workspace package @codyswann/lisa@8.10.2 (typescript/copy-overwrite/scripts/check-nightly-e2e-health.mjs)",
33
33
  ]),
34
34
  }),
35
35
  "898ee0247806c7aa6e98328662d80bcff22ff067999298865462a58daef8bb22": Object.freeze({
@@ -918,7 +918,7 @@
918
918
  "plugins/src/base/skills/lisa-secrets-access/scripts/task-readiness.mjs": "dc29611bc57a0cabefe1e7631659bc6d85b487eed19b7483bfb7fc443b175273",
919
919
  "plugins/src/base/skills/lisa-secrets-access/scripts/task-requirements.mjs": "e184ed7fb4eacb448553cca5a1c440707449066ef9edddb81f6eeba8b79e879d",
920
920
  "plugins/src/base/skills/lisa-secrets-access/scripts/task-tracker-intake.mjs": "775b202a5611f3f6aeaec15eb7abb1659604fa687d62f41e40e7701dfa137895",
921
- "plugins/src/base/skills/lisa-secrets-access/scripts/task-unbound.mjs": "2b4199a63e09e242af6a5ee5f4efe24bd50bac6f4a62ab978906e866a31bea55",
921
+ "plugins/src/base/skills/lisa-secrets-access/scripts/task-unbound.mjs": "3068bb94f31bcdceaef4d2c1c4959aed63567b76df9c129e9be5fb7d45d78b29",
922
922
  "plugins/src/base/skills/lisa-secrets-access/scripts/tools-from-notes.mjs": "6ab78776157345992224c5f74f1e6b82867d003961499faf2e51f1473c78dbb8",
923
923
  "plugins/src/base/skills/lisa-secrets-access/scripts/validate-config.mjs": "dac2bad3b92355c71fa9ecb5c484b17ad042e7e33dcdbcadf381d4fc13ab15f9",
924
924
  "plugins/src/base/skills/lisa-security-audit-handling/SKILL.md": "cc0fd59927cc13fc3cfa59eb07852b8c8373c9021b42e016229e632b8fbcc916",
@@ -22313,6 +22313,7 @@
22313
22313
  "7b1d6b949523e039cb787d51d92ccdfa1c039663": true,
22314
22314
  "7b24dfe8b9a4c40185bc4e4acdd2b3808ad53359": true,
22315
22315
  "7b277b65306ddfb9cc50dc0f8eb068bf1bcbfba4": true,
22316
+ "7b2876626225cb520017b3d14cfd5397fba4b488": true,
22316
22317
  "7b2a373becaa3ac698abf998e762076a43a71689": true,
22317
22318
  "7b2e6ab5ac33dee1c4e21b0d55012f3b16f6587d": true,
22318
22319
  "7b2fcb857cfdfaffe9781c261c9f1d3cfcfde7e3": true,
@@ -29397,6 +29398,7 @@
29397
29398
  "e407fcde40b7a3d28b183f328b047d0ef0c422bd": true,
29398
29399
  "e40866c3972513e6ddbf9e8724a4e8c7f05f3bb5": true,
29399
29400
  "e4095fa90ef60fb8e04635acd18b5111da6c7e69": true,
29401
+ "e40d3f862c559f5c12c8f2c06f494bfb45627df3": true,
29400
29402
  "e4124fb69cc4ba51aba0b2940a88396ae5e7332f": true,
29401
29403
  "e41305e059f577c280822113d461e8af8629fd6a": true,
29402
29404
  "e41390a945bab6fc33e6244c29d4b01f58f0c201": true,
@@ -30076,6 +30078,7 @@
30076
30078
  "eedbd27700718271fe40b1c10f187b1de85771cf": true,
30077
30079
  "eedef5f4a3f9041d824c266539c68db484a2dac3": true,
30078
30080
  "eee0be1cd50e8674ec53cd7668355fd01b24305a": true,
30081
+ "eee12015a2e78c8efdcc2157e20cad8a8686af21": true,
30079
30082
  "eee20730c3f7a424d0a4dfcdc5f3d1acdbb4c5fd": true,
30080
30083
  "eee2cc1ed7bb4b567004afb34ed7726e76e192b2": true,
30081
30084
  "eee5a654486511bed770ae8b2bbb37c8ebde6e82": true,
package/package.json CHANGED
@@ -200,7 +200,7 @@
200
200
  "zod": "^4.6.7"
201
201
  },
202
202
  "name": "@codyswann/lisa",
203
- "version": "8.10.1",
203
+ "version": "8.10.2",
204
204
  "description": "Governance-as-code for AI coding agents: turns a repository into agent-operated software factories with guardrails, guidance and automated enforcement for Claude Code, Codex, Cursor, OpenCode, Antigravity, Copilot and Devin",
205
205
  "main": "dist/index.js",
206
206
  "exports": {
@@ -371,7 +371,7 @@
371
371
  "optional": true
372
372
  }
373
373
  },
374
- "lisaReleaseCommit": "e40d3f862c559f5c12c8f2c06f494bfb45627df3",
375
- "gitHead": "e40d3f862c559f5c12c8f2c06f494bfb45627df3",
376
- "lisaReleaseTag": "v8.10.1"
374
+ "lisaReleaseCommit": "e29598654e47a9e641a7eeed547e0702c4af8bbe",
375
+ "gitHead": "e29598654e47a9e641a7eeed547e0702c4af8bbe",
376
+ "lisaReleaseTag": "v8.10.2"
377
377
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Universal governance: agents, skills, commands, hooks, and rules for all projects.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -8,7 +8,7 @@
8
8
  * an agent's scratch or memory file. The refusal names the read command for
9
9
  * this installation, because an agent cannot guess an absolute plugin path.
10
10
  */
11
- import { existsSync, realpathSync, statSync } from "node:fs";
11
+ import { existsSync, lstatSync, realpathSync, statSync } from "node:fs";
12
12
  import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
13
13
  import { fileURLToPath } from "node:url";
14
14
  import {
@@ -33,6 +33,14 @@ const PATCH_TARGET =
33
33
  function realLocation(target) {
34
34
  let existing = target;
35
35
  while (!existsSync(existing)) {
36
+ // A link whose target is missing exists as an entry: writing through it
37
+ // creates the target, wherever that is. It is never a new file.
38
+ try {
39
+ lstatSync(existing);
40
+ return null;
41
+ } catch (error) {
42
+ if (error.code !== "ENOENT") return null;
43
+ }
36
44
  const parent = dirname(existing);
37
45
  if (parent === existing) return null;
38
46
  existing = parent;
@@ -45,7 +53,26 @@ function realLocation(target) {
45
53
  }
46
54
 
47
55
  /**
48
- * Whether any directory from `location` up to the root holds `.git`.
56
+ * Whether `dir` is itself a git directory: a bare repository, or the inside
57
+ * of a `.git` folder. Git recognises one by `HEAD`, `objects` and `refs`.
58
+ * @param {string} dir Directory to inspect.
59
+ * @returns {boolean} True when it has that layout.
60
+ */
61
+ function gitDirectory(dir) {
62
+ try {
63
+ return (
64
+ statSync(join(dir, "HEAD")).isFile() &&
65
+ statSync(join(dir, "objects")).isDirectory() &&
66
+ statSync(join(dir, "refs")).isDirectory()
67
+ );
68
+ } catch {
69
+ return false;
70
+ }
71
+ }
72
+
73
+ /**
74
+ * Whether any directory from `location` up to the root holds `.git` or is
75
+ * itself a git directory.
49
76
  * @param {string} location Resolved absolute path.
50
77
  * @returns {boolean} True when the path is inside a git repository.
51
78
  */
@@ -57,6 +84,7 @@ function insideRepository(location) {
57
84
  } catch (error) {
58
85
  if (!["ENOENT", "ENOTDIR"].includes(error.code)) return true;
59
86
  }
87
+ if (gitDirectory(dir)) return true;
60
88
  if (dirname(dir) === dir) return false;
61
89
  }
62
90
  }
@@ -99,7 +127,9 @@ function writeTargets(input) {
99
127
  if (input.tool_name === "apply_patch" && typeof args.command === "string") {
100
128
  const targets = args.command
101
129
  .split("\n")
102
- .map(line => PATCH_TARGET.exec(line)?.[1])
130
+ // The patch tool trims each header before acting on it, so the check
131
+ // must too, or an indented header is applied without being seen.
132
+ .map(line => PATCH_TARGET.exec(line.trim())?.[1])
103
133
  .filter(Boolean);
104
134
  return targets.length ? targets : null;
105
135
  }
@@ -8,7 +8,7 @@
8
8
  * an agent's scratch or memory file. The refusal names the read command for
9
9
  * this installation, because an agent cannot guess an absolute plugin path.
10
10
  */
11
- import { existsSync, realpathSync, statSync } from "node:fs";
11
+ import { existsSync, lstatSync, realpathSync, statSync } from "node:fs";
12
12
  import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
13
13
  import { fileURLToPath } from "node:url";
14
14
  import {
@@ -33,6 +33,14 @@ const PATCH_TARGET =
33
33
  function realLocation(target) {
34
34
  let existing = target;
35
35
  while (!existsSync(existing)) {
36
+ // A link whose target is missing exists as an entry: writing through it
37
+ // creates the target, wherever that is. It is never a new file.
38
+ try {
39
+ lstatSync(existing);
40
+ return null;
41
+ } catch (error) {
42
+ if (error.code !== "ENOENT") return null;
43
+ }
36
44
  const parent = dirname(existing);
37
45
  if (parent === existing) return null;
38
46
  existing = parent;
@@ -45,7 +53,26 @@ function realLocation(target) {
45
53
  }
46
54
 
47
55
  /**
48
- * Whether any directory from `location` up to the root holds `.git`.
56
+ * Whether `dir` is itself a git directory: a bare repository, or the inside
57
+ * of a `.git` folder. Git recognises one by `HEAD`, `objects` and `refs`.
58
+ * @param {string} dir Directory to inspect.
59
+ * @returns {boolean} True when it has that layout.
60
+ */
61
+ function gitDirectory(dir) {
62
+ try {
63
+ return (
64
+ statSync(join(dir, "HEAD")).isFile() &&
65
+ statSync(join(dir, "objects")).isDirectory() &&
66
+ statSync(join(dir, "refs")).isDirectory()
67
+ );
68
+ } catch {
69
+ return false;
70
+ }
71
+ }
72
+
73
+ /**
74
+ * Whether any directory from `location` up to the root holds `.git` or is
75
+ * itself a git directory.
49
76
  * @param {string} location Resolved absolute path.
50
77
  * @returns {boolean} True when the path is inside a git repository.
51
78
  */
@@ -57,6 +84,7 @@ function insideRepository(location) {
57
84
  } catch (error) {
58
85
  if (!["ENOENT", "ENOTDIR"].includes(error.code)) return true;
59
86
  }
87
+ if (gitDirectory(dir)) return true;
60
88
  if (dirname(dir) === dir) return false;
61
89
  }
62
90
  }
@@ -99,7 +127,9 @@ function writeTargets(input) {
99
127
  if (input.tool_name === "apply_patch" && typeof args.command === "string") {
100
128
  const targets = args.command
101
129
  .split("\n")
102
- .map(line => PATCH_TARGET.exec(line)?.[1])
130
+ // The patch tool trims each header before acting on it, so the check
131
+ // must too, or an indented header is applied without being seen.
132
+ .map(line => PATCH_TARGET.exec(line.trim())?.[1])
103
133
  .filter(Boolean);
104
134
  return targets.length ? targets : null;
105
135
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -8,7 +8,7 @@
8
8
  * an agent's scratch or memory file. The refusal names the read command for
9
9
  * this installation, because an agent cannot guess an absolute plugin path.
10
10
  */
11
- import { existsSync, realpathSync, statSync } from "node:fs";
11
+ import { existsSync, lstatSync, realpathSync, statSync } from "node:fs";
12
12
  import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
13
13
  import { fileURLToPath } from "node:url";
14
14
  import {
@@ -33,6 +33,14 @@ const PATCH_TARGET =
33
33
  function realLocation(target) {
34
34
  let existing = target;
35
35
  while (!existsSync(existing)) {
36
+ // A link whose target is missing exists as an entry: writing through it
37
+ // creates the target, wherever that is. It is never a new file.
38
+ try {
39
+ lstatSync(existing);
40
+ return null;
41
+ } catch (error) {
42
+ if (error.code !== "ENOENT") return null;
43
+ }
36
44
  const parent = dirname(existing);
37
45
  if (parent === existing) return null;
38
46
  existing = parent;
@@ -45,7 +53,26 @@ function realLocation(target) {
45
53
  }
46
54
 
47
55
  /**
48
- * Whether any directory from `location` up to the root holds `.git`.
56
+ * Whether `dir` is itself a git directory: a bare repository, or the inside
57
+ * of a `.git` folder. Git recognises one by `HEAD`, `objects` and `refs`.
58
+ * @param {string} dir Directory to inspect.
59
+ * @returns {boolean} True when it has that layout.
60
+ */
61
+ function gitDirectory(dir) {
62
+ try {
63
+ return (
64
+ statSync(join(dir, "HEAD")).isFile() &&
65
+ statSync(join(dir, "objects")).isDirectory() &&
66
+ statSync(join(dir, "refs")).isDirectory()
67
+ );
68
+ } catch {
69
+ return false;
70
+ }
71
+ }
72
+
73
+ /**
74
+ * Whether any directory from `location` up to the root holds `.git` or is
75
+ * itself a git directory.
49
76
  * @param {string} location Resolved absolute path.
50
77
  * @returns {boolean} True when the path is inside a git repository.
51
78
  */
@@ -57,6 +84,7 @@ function insideRepository(location) {
57
84
  } catch (error) {
58
85
  if (!["ENOENT", "ENOTDIR"].includes(error.code)) return true;
59
86
  }
87
+ if (gitDirectory(dir)) return true;
60
88
  if (dirname(dir) === dir) return false;
61
89
  }
62
90
  }
@@ -99,7 +127,9 @@ function writeTargets(input) {
99
127
  if (input.tool_name === "apply_patch" && typeof args.command === "string") {
100
128
  const targets = args.command
101
129
  .split("\n")
102
- .map(line => PATCH_TARGET.exec(line)?.[1])
130
+ // The patch tool trims each header before acting on it, so the check
131
+ // must too, or an indented header is applied without being seen.
132
+ .map(line => PATCH_TARGET.exec(line.trim())?.[1])
103
133
  .filter(Boolean);
104
134
  return targets.length ? targets : null;
105
135
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "AWS CDK-specific Lisa plugin.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -8,7 +8,7 @@
8
8
  * an agent's scratch or memory file. The refusal names the read command for
9
9
  * this installation, because an agent cannot guess an absolute plugin path.
10
10
  */
11
- import { existsSync, realpathSync, statSync } from "node:fs";
11
+ import { existsSync, lstatSync, realpathSync, statSync } from "node:fs";
12
12
  import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
13
13
  import { fileURLToPath } from "node:url";
14
14
  import {
@@ -33,6 +33,14 @@ const PATCH_TARGET =
33
33
  function realLocation(target) {
34
34
  let existing = target;
35
35
  while (!existsSync(existing)) {
36
+ // A link whose target is missing exists as an entry: writing through it
37
+ // creates the target, wherever that is. It is never a new file.
38
+ try {
39
+ lstatSync(existing);
40
+ return null;
41
+ } catch (error) {
42
+ if (error.code !== "ENOENT") return null;
43
+ }
36
44
  const parent = dirname(existing);
37
45
  if (parent === existing) return null;
38
46
  existing = parent;
@@ -45,7 +53,26 @@ function realLocation(target) {
45
53
  }
46
54
 
47
55
  /**
48
- * Whether any directory from `location` up to the root holds `.git`.
56
+ * Whether `dir` is itself a git directory: a bare repository, or the inside
57
+ * of a `.git` folder. Git recognises one by `HEAD`, `objects` and `refs`.
58
+ * @param {string} dir Directory to inspect.
59
+ * @returns {boolean} True when it has that layout.
60
+ */
61
+ function gitDirectory(dir) {
62
+ try {
63
+ return (
64
+ statSync(join(dir, "HEAD")).isFile() &&
65
+ statSync(join(dir, "objects")).isDirectory() &&
66
+ statSync(join(dir, "refs")).isDirectory()
67
+ );
68
+ } catch {
69
+ return false;
70
+ }
71
+ }
72
+
73
+ /**
74
+ * Whether any directory from `location` up to the root holds `.git` or is
75
+ * itself a git directory.
49
76
  * @param {string} location Resolved absolute path.
50
77
  * @returns {boolean} True when the path is inside a git repository.
51
78
  */
@@ -57,6 +84,7 @@ function insideRepository(location) {
57
84
  } catch (error) {
58
85
  if (!["ENOENT", "ENOTDIR"].includes(error.code)) return true;
59
86
  }
87
+ if (gitDirectory(dir)) return true;
60
88
  if (dirname(dir) === dir) return false;
61
89
  }
62
90
  }
@@ -99,7 +127,9 @@ function writeTargets(input) {
99
127
  if (input.tool_name === "apply_patch" && typeof args.command === "string") {
100
128
  const targets = args.command
101
129
  .split("\n")
102
- .map(line => PATCH_TARGET.exec(line)?.[1])
130
+ // The patch tool trims each header before acting on it, so the check
131
+ // must too, or an indented header is applied without being seen.
132
+ .map(line => PATCH_TARGET.exec(line.trim())?.[1])
103
133
  .filter(Boolean);
104
134
  return targets.length ? targets : null;
105
135
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -8,7 +8,7 @@
8
8
  * an agent's scratch or memory file. The refusal names the read command for
9
9
  * this installation, because an agent cannot guess an absolute plugin path.
10
10
  */
11
- import { existsSync, realpathSync, statSync } from "node:fs";
11
+ import { existsSync, lstatSync, realpathSync, statSync } from "node:fs";
12
12
  import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
13
13
  import { fileURLToPath } from "node:url";
14
14
  import {
@@ -33,6 +33,14 @@ const PATCH_TARGET =
33
33
  function realLocation(target) {
34
34
  let existing = target;
35
35
  while (!existsSync(existing)) {
36
+ // A link whose target is missing exists as an entry: writing through it
37
+ // creates the target, wherever that is. It is never a new file.
38
+ try {
39
+ lstatSync(existing);
40
+ return null;
41
+ } catch (error) {
42
+ if (error.code !== "ENOENT") return null;
43
+ }
36
44
  const parent = dirname(existing);
37
45
  if (parent === existing) return null;
38
46
  existing = parent;
@@ -45,7 +53,26 @@ function realLocation(target) {
45
53
  }
46
54
 
47
55
  /**
48
- * Whether any directory from `location` up to the root holds `.git`.
56
+ * Whether `dir` is itself a git directory: a bare repository, or the inside
57
+ * of a `.git` folder. Git recognises one by `HEAD`, `objects` and `refs`.
58
+ * @param {string} dir Directory to inspect.
59
+ * @returns {boolean} True when it has that layout.
60
+ */
61
+ function gitDirectory(dir) {
62
+ try {
63
+ return (
64
+ statSync(join(dir, "HEAD")).isFile() &&
65
+ statSync(join(dir, "objects")).isDirectory() &&
66
+ statSync(join(dir, "refs")).isDirectory()
67
+ );
68
+ } catch {
69
+ return false;
70
+ }
71
+ }
72
+
73
+ /**
74
+ * Whether any directory from `location` up to the root holds `.git` or is
75
+ * itself a git directory.
49
76
  * @param {string} location Resolved absolute path.
50
77
  * @returns {boolean} True when the path is inside a git repository.
51
78
  */
@@ -57,6 +84,7 @@ function insideRepository(location) {
57
84
  } catch (error) {
58
85
  if (!["ENOENT", "ENOTDIR"].includes(error.code)) return true;
59
86
  }
87
+ if (gitDirectory(dir)) return true;
60
88
  if (dirname(dir) === dir) return false;
61
89
  }
62
90
  }
@@ -99,7 +127,9 @@ function writeTargets(input) {
99
127
  if (input.tool_name === "apply_patch" && typeof args.command === "string") {
100
128
  const targets = args.command
101
129
  .split("\n")
102
- .map(line => PATCH_TARGET.exec(line)?.[1])
130
+ // The patch tool trims each header before acting on it, so the check
131
+ // must too, or an indented header is applied without being seen.
132
+ .map(line => PATCH_TARGET.exec(line.trim())?.[1])
103
133
  .filter(Boolean);
104
134
  return targets.length ? targets : null;
105
135
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -8,7 +8,7 @@
8
8
  * an agent's scratch or memory file. The refusal names the read command for
9
9
  * this installation, because an agent cannot guess an absolute plugin path.
10
10
  */
11
- import { existsSync, realpathSync, statSync } from "node:fs";
11
+ import { existsSync, lstatSync, realpathSync, statSync } from "node:fs";
12
12
  import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
13
13
  import { fileURLToPath } from "node:url";
14
14
  import {
@@ -33,6 +33,14 @@ const PATCH_TARGET =
33
33
  function realLocation(target) {
34
34
  let existing = target;
35
35
  while (!existsSync(existing)) {
36
+ // A link whose target is missing exists as an entry: writing through it
37
+ // creates the target, wherever that is. It is never a new file.
38
+ try {
39
+ lstatSync(existing);
40
+ return null;
41
+ } catch (error) {
42
+ if (error.code !== "ENOENT") return null;
43
+ }
36
44
  const parent = dirname(existing);
37
45
  if (parent === existing) return null;
38
46
  existing = parent;
@@ -45,7 +53,26 @@ function realLocation(target) {
45
53
  }
46
54
 
47
55
  /**
48
- * Whether any directory from `location` up to the root holds `.git`.
56
+ * Whether `dir` is itself a git directory: a bare repository, or the inside
57
+ * of a `.git` folder. Git recognises one by `HEAD`, `objects` and `refs`.
58
+ * @param {string} dir Directory to inspect.
59
+ * @returns {boolean} True when it has that layout.
60
+ */
61
+ function gitDirectory(dir) {
62
+ try {
63
+ return (
64
+ statSync(join(dir, "HEAD")).isFile() &&
65
+ statSync(join(dir, "objects")).isDirectory() &&
66
+ statSync(join(dir, "refs")).isDirectory()
67
+ );
68
+ } catch {
69
+ return false;
70
+ }
71
+ }
72
+
73
+ /**
74
+ * Whether any directory from `location` up to the root holds `.git` or is
75
+ * itself a git directory.
49
76
  * @param {string} location Resolved absolute path.
50
77
  * @returns {boolean} True when the path is inside a git repository.
51
78
  */
@@ -57,6 +84,7 @@ function insideRepository(location) {
57
84
  } catch (error) {
58
85
  if (!["ENOENT", "ENOTDIR"].includes(error.code)) return true;
59
86
  }
87
+ if (gitDirectory(dir)) return true;
60
88
  if (dirname(dir) === dir) return false;
61
89
  }
62
90
  }
@@ -99,7 +127,9 @@ function writeTargets(input) {
99
127
  if (input.tool_name === "apply_patch" && typeof args.command === "string") {
100
128
  const targets = args.command
101
129
  .split("\n")
102
- .map(line => PATCH_TARGET.exec(line)?.[1])
130
+ // The patch tool trims each header before acting on it, so the check
131
+ // must too, or an indented header is applied without being seen.
132
+ .map(line => PATCH_TARGET.exec(line.trim())?.[1])
103
133
  .filter(Boolean);
104
134
  return targets.length ? targets : null;
105
135
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Expo/React Native-specific skills, agents, rules, and MCP servers",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Expo and React Native-specific skills, agents, rules, and MCP servers.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Expo/React Native-specific skills, agents, rules, and MCP servers",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Expo/React Native-specific skills, agents, rules, and MCP servers",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Expo/React Native-specific skills, agents, rules, and MCP servers",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Expo/React Native-specific skills, agents, rules, and MCP servers",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Expo/React Native-specific skills, agents, rules, and MCP servers",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Harper/Fabric-specific Lisa rules for TypeScript component apps.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (hand-written migration warning)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "NestJS-specific skills and a hand-written migration warning hook.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (hand-written migration warning)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (hand-written migration warning)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (hand-written migration warning)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (hand-written migration warning)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (hand-written migration warning)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Ruby on Rails-specific skills and hooks for RuboCop and ast-grep scanning on edit.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "TypeScript-specific hooks for formatting, linting, and ast-grep scanning on edit.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "Distributable LLM Wiki kernel — ingest, query, lint, and maintain a git-native markdown knowledge base across Claude and Codex.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "8.10.1",
3
+ "version": "8.10.2",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -8,7 +8,7 @@
8
8
  * an agent's scratch or memory file. The refusal names the read command for
9
9
  * this installation, because an agent cannot guess an absolute plugin path.
10
10
  */
11
- import { existsSync, realpathSync, statSync } from "node:fs";
11
+ import { existsSync, lstatSync, realpathSync, statSync } from "node:fs";
12
12
  import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
13
13
  import { fileURLToPath } from "node:url";
14
14
  import {
@@ -33,6 +33,14 @@ const PATCH_TARGET =
33
33
  function realLocation(target) {
34
34
  let existing = target;
35
35
  while (!existsSync(existing)) {
36
+ // A link whose target is missing exists as an entry: writing through it
37
+ // creates the target, wherever that is. It is never a new file.
38
+ try {
39
+ lstatSync(existing);
40
+ return null;
41
+ } catch (error) {
42
+ if (error.code !== "ENOENT") return null;
43
+ }
36
44
  const parent = dirname(existing);
37
45
  if (parent === existing) return null;
38
46
  existing = parent;
@@ -45,7 +53,26 @@ function realLocation(target) {
45
53
  }
46
54
 
47
55
  /**
48
- * Whether any directory from `location` up to the root holds `.git`.
56
+ * Whether `dir` is itself a git directory: a bare repository, or the inside
57
+ * of a `.git` folder. Git recognises one by `HEAD`, `objects` and `refs`.
58
+ * @param {string} dir Directory to inspect.
59
+ * @returns {boolean} True when it has that layout.
60
+ */
61
+ function gitDirectory(dir) {
62
+ try {
63
+ return (
64
+ statSync(join(dir, "HEAD")).isFile() &&
65
+ statSync(join(dir, "objects")).isDirectory() &&
66
+ statSync(join(dir, "refs")).isDirectory()
67
+ );
68
+ } catch {
69
+ return false;
70
+ }
71
+ }
72
+
73
+ /**
74
+ * Whether any directory from `location` up to the root holds `.git` or is
75
+ * itself a git directory.
49
76
  * @param {string} location Resolved absolute path.
50
77
  * @returns {boolean} True when the path is inside a git repository.
51
78
  */
@@ -57,6 +84,7 @@ function insideRepository(location) {
57
84
  } catch (error) {
58
85
  if (!["ENOENT", "ENOTDIR"].includes(error.code)) return true;
59
86
  }
87
+ if (gitDirectory(dir)) return true;
60
88
  if (dirname(dir) === dir) return false;
61
89
  }
62
90
  }
@@ -99,7 +127,9 @@ function writeTargets(input) {
99
127
  if (input.tool_name === "apply_patch" && typeof args.command === "string") {
100
128
  const targets = args.command
101
129
  .split("\n")
102
- .map(line => PATCH_TARGET.exec(line)?.[1])
130
+ // The patch tool trims each header before acting on it, so the check
131
+ // must too, or an indented header is applied without being seen.
132
+ .map(line => PATCH_TARGET.exec(line.trim())?.[1])
103
133
  .filter(Boolean);
104
134
  return targets.length ? targets : null;
105
135
  }