@codyswann/lisa 4.3.3 → 4.3.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 (73) hide show
  1. package/all/copy-overwrite/scripts/check-conflict-markers.mjs +30 -5
  2. package/all/copy-overwrite/scripts/lib/bounded-spawn.mjs +26 -14
  3. package/all/copy-overwrite/scripts/lisa-environment-prepare.mjs +29 -2
  4. package/all/copy-overwrite/scripts/lisa-postinstall.mjs +18 -2
  5. package/all/copy-overwrite/scripts/lisa-reconcile-policy.mjs +35 -7
  6. package/all/copy-overwrite/scripts/lisa-run-gates.mjs +38 -4
  7. package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
  8. package/dist/core/lisa-owned-hash-ledger.js +8 -0
  9. package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
  10. package/dist/core/lisa-owned-templates.d.ts +25 -0
  11. package/dist/core/lisa-owned-templates.d.ts.map +1 -1
  12. package/dist/core/lisa-owned-templates.js +39 -0
  13. package/dist/core/lisa-owned-templates.js.map +1 -1
  14. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  15. package/dist/core/upstream-evidence-manifest.js +12 -9
  16. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  17. package/dist/strategies/copy-overwrite.d.ts.map +1 -1
  18. package/dist/strategies/copy-overwrite.js +29 -1
  19. package/dist/strategies/copy-overwrite.js.map +1 -1
  20. package/expo/copy-overwrite/scripts/lib/bounded-spawn.mjs +26 -14
  21. package/package.json +1 -1
  22. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  23. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  24. package/plugins/lisa-agy/plugin.json +1 -1
  25. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  26. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  27. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  28. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  29. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  30. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  31. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  32. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  33. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  34. package/plugins/lisa-expo-agy/plugin.json +1 -1
  35. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  36. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  37. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  38. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  39. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  40. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  41. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  42. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  43. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  44. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  45. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  46. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  47. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  48. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  49. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  50. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  51. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  52. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  53. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  54. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  55. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  56. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  57. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  58. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  59. package/plugins/lisa-rails-agy/plugin.json +1 -1
  60. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  61. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  62. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  63. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  64. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  65. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  66. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  67. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  68. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  69. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  70. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  71. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  72. package/scripts/lib/bounded-spawn.mjs +26 -14
  73. package/typescript/copy-overwrite/scripts/lib/bounded-spawn.mjs +26 -14
@@ -132,20 +132,21 @@ export function rethrowIfChildTimeout(error) {
132
132
  }
133
133
 
134
134
  /**
135
- * Options a bounded start always applies, whatever the caller asked for.
136
- *
137
- * `killSignal` is `SIGKILL` rather than the default `SIGTERM` deliberately: the
138
- * hang this module exists for is a process that is not servicing signals, and a
139
- * `SIGTERM` a child ignores turns the deadline into a suggestion.
135
+ * The deadline to hold a child to, given what the caller asked for.
136
+ *
137
+ * Split out as a value rather than folded into an options builder so that
138
+ * `timeout:` appears LITERALLY at both call sites below. That is not a style
139
+ * preference the conformance scan this module exists to satisfy reads the
140
+ * options object at each call, and a deadline supplied by a helper it cannot
141
+ * see through makes the helper itself the one unfixable offender in the tree.
142
+ * An offender that cannot be fixed is the pressure that produces an exemption
143
+ * list, and an exemption list is what CodySwannGT/lisa#2940 ruled out. The
144
+ * module that enforces the rule has to be able to pass it.
140
145
  * @param {object} options The caller's options.
141
- * @returns {object} The caller's options with the deadline enforced.
146
+ * @returns {number} Milliseconds before the child is killed.
142
147
  */
143
- function bounded(options) {
144
- return {
145
- ...options,
146
- killSignal: "SIGKILL",
147
- timeout: options.timeout ?? DEFAULT_CHILD_BUDGET_MS,
148
- };
148
+ function deadlineFor(options) {
149
+ return options.timeout ?? DEFAULT_CHILD_BUDGET_MS;
149
150
  }
150
151
 
151
152
  /**
@@ -162,7 +163,14 @@ function bounded(options) {
162
163
  * @throws {Error} When the child was killed at its deadline.
163
164
  */
164
165
  export function boundedSpawnSync(command, args = [], options = {}) {
165
- const result = spawnSync(command, [...args], bounded(options));
166
+ const result = spawnSync(command, [...args], {
167
+ ...options,
168
+ // `SIGKILL` rather than the default `SIGTERM`: the hang this module exists
169
+ // for is a process not servicing signals, and a `SIGTERM` a child ignores
170
+ // turns the deadline into a suggestion.
171
+ killSignal: "SIGKILL",
172
+ timeout: deadlineFor(options),
173
+ });
166
174
  if (isChildTimeout(result.error)) throw result.error;
167
175
  return result;
168
176
  }
@@ -181,5 +189,9 @@ export function boundedSpawnSync(command, args = [], options = {}) {
181
189
  * @throws {Error} When the child was killed, or exited non-zero.
182
190
  */
183
191
  export function boundedExecFileSync(command, args = [], options = {}) {
184
- return execFileSync(command, [...args], bounded(options));
192
+ return execFileSync(command, [...args], {
193
+ ...options,
194
+ killSignal: "SIGKILL",
195
+ timeout: deadlineFor(options),
196
+ });
185
197
  }
@@ -135,20 +135,21 @@ export function rethrowIfChildTimeout(error) {
135
135
  }
136
136
 
137
137
  /**
138
- * Options a bounded start always applies, whatever the caller asked for.
139
- *
140
- * `killSignal` is `SIGKILL` rather than the default `SIGTERM` deliberately: the
141
- * hang this module exists for is a process that is not servicing signals, and a
142
- * `SIGTERM` a child ignores turns the deadline into a suggestion.
138
+ * The deadline to hold a child to, given what the caller asked for.
139
+ *
140
+ * Split out as a value rather than folded into an options builder so that
141
+ * `timeout:` appears LITERALLY at both call sites below. That is not a style
142
+ * preference the conformance scan this module exists to satisfy reads the
143
+ * options object at each call, and a deadline supplied by a helper it cannot
144
+ * see through makes the helper itself the one unfixable offender in the tree.
145
+ * An offender that cannot be fixed is the pressure that produces an exemption
146
+ * list, and an exemption list is what CodySwannGT/lisa#2940 ruled out. The
147
+ * module that enforces the rule has to be able to pass it.
143
148
  * @param {object} options The caller's options.
144
- * @returns {object} The caller's options with the deadline enforced.
149
+ * @returns {number} Milliseconds before the child is killed.
145
150
  */
146
- function bounded(options) {
147
- return {
148
- ...options,
149
- killSignal: "SIGKILL",
150
- timeout: options.timeout ?? DEFAULT_CHILD_BUDGET_MS,
151
- };
151
+ function deadlineFor(options) {
152
+ return options.timeout ?? DEFAULT_CHILD_BUDGET_MS;
152
153
  }
153
154
 
154
155
  /**
@@ -165,7 +166,14 @@ function bounded(options) {
165
166
  * @throws {Error} When the child was killed at its deadline.
166
167
  */
167
168
  export function boundedSpawnSync(command, args = [], options = {}) {
168
- const result = spawnSync(command, [...args], bounded(options));
169
+ const result = spawnSync(command, [...args], {
170
+ ...options,
171
+ // `SIGKILL` rather than the default `SIGTERM`: the hang this module exists
172
+ // for is a process not servicing signals, and a `SIGTERM` a child ignores
173
+ // turns the deadline into a suggestion.
174
+ killSignal: "SIGKILL",
175
+ timeout: deadlineFor(options),
176
+ });
169
177
  if (isChildTimeout(result.error)) throw result.error;
170
178
  return result;
171
179
  }
@@ -184,5 +192,9 @@ export function boundedSpawnSync(command, args = [], options = {}) {
184
192
  * @throws {Error} When the child was killed, or exited non-zero.
185
193
  */
186
194
  export function boundedExecFileSync(command, args = [], options = {}) {
187
- return execFileSync(command, [...args], bounded(options));
195
+ return execFileSync(command, [...args], {
196
+ ...options,
197
+ killSignal: "SIGKILL",
198
+ timeout: deadlineFor(options),
199
+ });
188
200
  }