@codyswann/lisa 4.107.3 → 4.107.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.
Files changed (91) hide show
  1. package/all/copy-overwrite/scripts/lisa-hooks/block-managed-file-edits.sh +84 -0
  2. package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
  3. package/dist/core/lisa-owned-hash-ledger.js +4 -0
  4. package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
  5. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  6. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  7. package/dist/core/upstream-evidence-manifest.js +11 -7
  8. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  9. package/dist/opencode/plugin-templates/block-managed-file-edits.sh +84 -0
  10. package/npm-package/create-only/.github/workflows/publish-to-npm.yml +2 -2
  11. package/package.json +4 -4
  12. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  13. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  14. package/plugins/lisa/hooks/block-managed-file-edits.sh +84 -0
  15. package/plugins/lisa-agy/hooks/block-managed-file-edits.sh +84 -0
  16. package/plugins/lisa-agy/plugin.json +1 -1
  17. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  18. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  19. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  20. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  21. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  22. package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
  23. package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
  24. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  25. package/plugins/lisa-copilot/hooks/block-managed-file-edits.sh +84 -0
  26. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  27. package/plugins/lisa-cursor/hooks/block-managed-file-edits.sh +84 -0
  28. package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
  29. package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
  30. package/plugins/lisa-devin/hooks/block-managed-file-edits.sh +84 -0
  31. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  32. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  33. package/plugins/lisa-expo-agy/plugin.json +1 -1
  34. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  35. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  36. package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
  37. package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
  38. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  39. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  40. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  41. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  42. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  43. package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
  44. package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
  45. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  46. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  47. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  48. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  49. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  50. package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
  51. package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
  52. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  53. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  54. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  55. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  56. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  57. package/plugins/lisa-openclaw-devin/.claude-plugin/plugin.json +1 -1
  58. package/plugins/lisa-openclaw-devin/.devin-plugin/plugin.json +1 -1
  59. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  60. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  61. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  62. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  63. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  64. package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
  65. package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
  66. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  67. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  68. package/plugins/lisa-rails-agy/plugin.json +1 -1
  69. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  70. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  71. package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
  72. package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
  73. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  74. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  75. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  76. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  77. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  78. package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
  79. package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
  80. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  81. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  82. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  83. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  84. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  85. package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
  86. package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
  87. package/plugins/src/base/hooks/block-managed-file-edits.sh +84 -0
  88. package/scripts/lib/packaged-apply-driver.mjs +2 -0
  89. package/scripts/update-node-version.ts +16 -2
  90. package/scripts/verify-packaged-apply.mjs +21 -1
  91. package/typescript/copy-overwrite/.github/GITHUB_ACTIONS.md +2 -2
@@ -277,6 +277,86 @@ relative_path() {
277
277
  printf '%s' "${rel#./}"
278
278
  }
279
279
 
280
+ # The host's dependency and devDependency names, one per line, read at most
281
+ # once per classification. `managed_source` runs inside `$(...)`, so the cache
282
+ # lives only as long as that subshell — one classification, not one hook run.
283
+ # Unreadable or malformed `package.json` yields nothing, which makes every
284
+ # dependency-keyed stack below read as absent — an allow, the safe direction.
285
+ #
286
+ # Loaded into a global rather than echoed, so callers match with a here-string
287
+ # and no pipeline: under `pipefail` a `grep -q` that stops reading early can
288
+ # fail the writer with SIGPIPE and turn a match into a miss.
289
+ host_dependency_names=""
290
+ host_dependency_names_pending=1
291
+ load_host_dependency_names() {
292
+ [ "$host_dependency_names_pending" -eq 1 ] || return 0
293
+ host_dependency_names="$(jq -r \
294
+ '[(.dependencies // {}), (.devDependencies // {})] | add | keys[]' \
295
+ "$project_root/package.json" 2>/dev/null || true)"
296
+ host_dependency_names_pending=0
297
+ }
298
+
299
+ # Exact dependency name, or with `prefix` as the second argument, any name
300
+ # starting with it (the NestJS detector's `@nestjs` test).
301
+ host_has_dependency() {
302
+ load_host_dependency_names
303
+ local name
304
+ while IFS= read -r name; do
305
+ case "$name" in
306
+ "$1") return 0 ;;
307
+ "$1"*) [ "${2:-}" = prefix ] && return 0 ;;
308
+ esac
309
+ done <<<"$host_dependency_names"
310
+ return 1
311
+ }
312
+
313
+ # Whether the host is the given stack, so that stack's templates reach it.
314
+ #
315
+ # THE SAME PATH CAN BELONG TO DIFFERENT OWNERS IN DIFFERENT STACKS.
316
+ # `.github/workflows/ci.yml` is create-only in typescript, nestjs, cdk, expo and
317
+ # rails — the host owns it after the first apply — but copy-overwrite in
318
+ # harper-fabric and phaser. Probing every stack's tree without asking which
319
+ # stacks this host is made a NestJS host's own ci.yml read as managed via the
320
+ # harper-fabric copy, and a project-owned one-line Node bump needed a human to
321
+ # run the override (CodySwannGT/lisa#4511).
322
+ #
323
+ # `lisa apply` copies a stack's templates only into a host that stack's
324
+ # detector recognises, so each arm mirrors `src/detection/detectors/<stack>.ts`.
325
+ # `all`, `typescript`, and any stack without an arm here keep the pre-existing
326
+ # answer — always managed — so this narrows only where a detector proves the
327
+ # stack absent. Where a shell mirror cannot be exact it errs toward allowing,
328
+ # the same direction `.lisaignore` handling above takes.
329
+ stack_reaches_host() {
330
+ local stack="$1"
331
+ case "$stack" in
332
+ harper-fabric)
333
+ local config="$project_root/harper-app/config.yaml"
334
+ [ -f "$config" ] && [ -e "$project_root/harper-app/schema.graphql" ] ||
335
+ return 1
336
+ {
337
+ grep -qF 'graphqlSchema:' "$config" &&
338
+ grep -qF 'jsResource:' "$config" &&
339
+ grep -qF 'static:' "$config"
340
+ } || host_has_dependency harperdb
341
+ ;;
342
+ phaser) host_has_dependency phaser ;;
343
+ nestjs)
344
+ [ -e "$project_root/nest-cli.json" ] ||
345
+ host_has_dependency @nestjs prefix
346
+ ;;
347
+ expo)
348
+ [ -e "$project_root/app.json" ] || [ -e "$project_root/eas.json" ] ||
349
+ host_has_dependency expo
350
+ ;;
351
+ cdk) [ -e "$project_root/cdk.json" ] ;;
352
+ rails)
353
+ [ -e "$project_root/bin/rails" ] ||
354
+ [ -e "$project_root/config/application.rb" ]
355
+ ;;
356
+ *) return 0 ;;
357
+ esac
358
+ }
359
+
280
360
  # Whether a host-relative path is shipped as a copy-overwrite template.
281
361
  #
282
362
  # A few stat calls rather than an enumeration: the same relative path is probed
@@ -296,6 +376,10 @@ managed_source() {
296
376
  for stack in "$package_root"/*/copy-overwrite; do
297
377
  [ -d "$stack" ] || continue
298
378
  if [ -e "$stack/$rel" ]; then
379
+ # Another stack's copy-overwrite twin is not this host's file. Keep
380
+ # looking: a stack this host IS may still manage the same path.
381
+ local stack_name="${stack%/copy-overwrite}"
382
+ stack_reaches_host "${stack_name##*/}" || continue
299
383
  printf '%s' "${stack#"$package_root"/}/$rel"
300
384
  return 0
301
385
  fi
@@ -256,6 +256,8 @@ try {
256
256
  proof.passed = false;
257
257
  proof.failure = {
258
258
  message: error.message,
259
+ // A bare `true !== false` is undiagnosable without the failing line.
260
+ stack: error.stack ?? null,
259
261
  stdout: error.stdout ?? null,
260
262
  stderr: error.stderr ?? null,
261
263
  };
@@ -4,6 +4,7 @@
4
4
  *
5
5
  * Reads the version from .nvmrc and updates:
6
6
  * - GitHub workflow files (node_version, node-version inputs)
7
+ * - GITHUB_ACTIONS.md docs (template and root), which carry YAML examples
7
8
  * - package.json engine constraints
8
9
  *
9
10
  * @example
@@ -60,8 +61,16 @@ const WORKFLOW_PATTERNS: readonly ReplacementPattern[] = [
60
61
  pattern: /(node-version:.*?\|\|\s*['"])\d+\.\d+\.\d+(['"])/g,
61
62
  replacement: VERSION_REPLACEMENT,
62
63
  },
64
+ // Major-only forms: callers, commented usage examples, and reusable-input
65
+ // defaults. A shipped publish workflow drifted to `22.x`/`20.x` because only
66
+ // the hyphenated caller key was covered (CodySwannGT/lisa#4511).
63
67
  {
64
- pattern: /(node-version:\s*['"])\d+\.x(['"])/g,
68
+ pattern: /((?:node_version|node-version):\s*['"])\d+\.x(['"])/g,
69
+ replacement: "$1{{major}}.x$2",
70
+ },
71
+ {
72
+ pattern:
73
+ /(node_version:\n(?: +(?:description|type|required):[^\n]*\n)* +default: *['"])\d+\.x(['"])/g,
65
74
  replacement: "$1{{major}}.x$2",
66
75
  },
67
76
  ];
@@ -91,6 +100,11 @@ function filesToUpdate(): readonly string[] {
91
100
  "package.lisa.json",
92
101
  "typescript/copy-overwrite/.nvmrc",
93
102
  "expo/create-only/eas.json",
103
+ // Docs whose YAML examples consumers copy verbatim. The template
104
+ // copy is copy-overwrite, so a consumer cannot correct drift there
105
+ // locally (CodySwannGT/lisa#4511); the root copy mirrors it.
106
+ "typescript/copy-overwrite/.github/GITHUB_ACTIONS.md",
107
+ ".github/GITHUB_ACTIONS.md",
94
108
  ].includes(file) ||
95
109
  /^(?:typescript|cdk|nestjs|npm-package|phaser|harper-fabric)\/package-lisa\/package\.lisa\.json$/.test(
96
110
  file
@@ -198,7 +212,7 @@ function updateFile(
198
212
  content,
199
213
  pattern,
200
214
  resolvedReplacement,
201
- /\.ya?ml$/.test(filePath)
215
+ /\.(?:ya?ml|md)$/.test(filePath)
202
216
  );
203
217
  totalChanges += result.changes;
204
218
  content = result.content;
@@ -44,6 +44,26 @@ async function docker(args) {
44
44
  return result.stdout;
45
45
  }
46
46
 
47
+ /**
48
+ * `docker start --attach` failing says nothing about why; carry the driver's
49
+ * own recorded assertion so every caller sees it (CodySwannGT/lisa#4822).
50
+ * @param {Error} error - Container start failure.
51
+ * @param {string} directory - Run output holding native-proof.json.
52
+ * @returns {Promise<Error>} The same error, its message extended when known.
53
+ */
54
+ async function withNativeFailure(error, directory) {
55
+ try {
56
+ const { failure } = JSON.parse(
57
+ await readFile(path.join(directory, "native-proof.json"), "utf8")
58
+ );
59
+ if (failure)
60
+ error.message += `\nNative driver failure: ${failure.stack ?? failure.message}`;
61
+ } catch {
62
+ // An unreadable proof must not replace the original failure.
63
+ }
64
+ return error;
65
+ }
66
+
47
67
  /**
48
68
  * @param {string} directory - Newly owned output directory.
49
69
  * @param {string} name - Private evidence filename.
@@ -243,7 +263,7 @@ async function main() {
243
263
  `${id}:/lisa-proof.json`,
244
264
  path.join(output, "native-proof.json"),
245
265
  ]);
246
- if (childFailure) throw childFailure;
266
+ if (childFailure) throw await withNativeFailure(childFailure, output);
247
267
  if (terminal.State.Status !== "exited" || terminal.State.ExitCode !== 0) {
248
268
  throw new Error(
249
269
  `Native verification child exited ${terminal.State.ExitCode}`
@@ -68,7 +68,7 @@ Runs on every pull request to validate code quality:
68
68
  **Configuration**:
69
69
  ```yaml
70
70
  # In ci.yml, modify these inputs:
71
- node_version: '22.23.3'
71
+ node_version: '24.21.0'
72
72
  package_manager: 'bun'
73
73
  skip_jobs: 'test,test:integration,test:e2e' # Comma-separated list
74
74
  ```
@@ -670,7 +670,7 @@ release.yml and create the environment in **Settings** > **Environments** first
670
670
  ```yaml
671
671
  uses: ./.github/workflows/quality.yml
672
672
  with:
673
- node_version: '22.23.3'
673
+ node_version: '24.21.0'
674
674
  package_manager: 'bun' # or npm, yarn
675
675
  ```
676
676