@codyswann/lisa 3.47.6 → 3.47.7

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 (74) hide show
  1. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  2. package/dist/core/upstream-evidence-manifest.js +6 -4
  3. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  4. package/package.json +1 -1
  5. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  6. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  7. package/plugins/lisa/scripts/automation-run-record.mjs +124 -4
  8. package/plugins/lisa/scripts/automation-status-claude-adapter.mjs +9 -1
  9. package/plugins/lisa/scripts/automation-status-codex-adapter.mjs +9 -1
  10. package/plugins/lisa/scripts/automation-status-run-history.mjs +34 -3
  11. package/plugins/lisa-agy/plugin.json +1 -1
  12. package/plugins/lisa-agy/scripts/automation-run-record.mjs +124 -4
  13. package/plugins/lisa-agy/scripts/automation-status-claude-adapter.mjs +9 -1
  14. package/plugins/lisa-agy/scripts/automation-status-codex-adapter.mjs +9 -1
  15. package/plugins/lisa-agy/scripts/automation-status-run-history.mjs +34 -3
  16. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  17. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  18. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  19. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  20. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  21. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  22. package/plugins/lisa-copilot/scripts/automation-run-record.mjs +124 -4
  23. package/plugins/lisa-copilot/scripts/automation-status-claude-adapter.mjs +9 -1
  24. package/plugins/lisa-copilot/scripts/automation-status-codex-adapter.mjs +9 -1
  25. package/plugins/lisa-copilot/scripts/automation-status-run-history.mjs +34 -3
  26. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  27. package/plugins/lisa-cursor/scripts/automation-run-record.mjs +124 -4
  28. package/plugins/lisa-cursor/scripts/automation-status-claude-adapter.mjs +9 -1
  29. package/plugins/lisa-cursor/scripts/automation-status-codex-adapter.mjs +9 -1
  30. package/plugins/lisa-cursor/scripts/automation-status-run-history.mjs +34 -3
  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-harper-fabric/.claude-plugin/plugin.json +1 -1
  37. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  38. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  39. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  40. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  41. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  42. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  43. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  44. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  45. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  46. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  47. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  48. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  49. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  50. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  51. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  52. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  53. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  54. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  55. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  56. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  57. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  58. package/plugins/lisa-rails-agy/plugin.json +1 -1
  59. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  60. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  61. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  62. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  63. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  64. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  65. package/plugins/lisa-typescript-cursor/.claude-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/src/base/scripts/automation-run-record.mjs +124 -4
  72. package/plugins/src/base/scripts/automation-status-claude-adapter.mjs +9 -1
  73. package/plugins/src/base/scripts/automation-status-codex-adapter.mjs +9 -1
  74. package/plugins/src/base/scripts/automation-status-run-history.mjs +34 -3
@@ -19,6 +19,7 @@ import fs from "node:fs/promises";
19
19
  import path from "node:path";
20
20
 
21
21
  import {
22
+ automationRunQuarantinePath,
22
23
  automationRunRecordPath,
23
24
  readAutomationRunRecords,
24
25
  } from "./automation-run-record.mjs";
@@ -59,6 +60,8 @@ const NO_RECORDED_RUNS_LINE = "no recorded runs yet";
59
60
  * readonly recoveryRequiredStreak: number
60
61
  * readonly recoverySummaries: readonly string[]
61
62
  * readonly skippedCorruptLines: number
63
+ * readonly recordsPath: string
64
+ * readonly quarantinePath: string
62
65
  * }} AutomationRunDisplay
63
66
  */
64
67
 
@@ -75,9 +78,9 @@ const NO_RECORDED_RUNS_LINE = "no recorded runs yet";
75
78
  export async function resolveAutomationRunDisplay(input) {
76
79
  const projectRoot = path.resolve(input.projectRoot ?? process.cwd());
77
80
  const runbook = await resolveRunbookLine(projectRoot, input.runbookPath);
78
- const { records, skippedCorruptLines } = await readAutomationRunRecords(
79
- automationRunRecordPath(projectRoot, input.loopId)
80
- );
81
+ const recordsPath = automationRunRecordPath(projectRoot, input.loopId);
82
+ const { records, skippedCorruptLines } =
83
+ await readAutomationRunRecords(recordsPath);
81
84
 
82
85
  const newestFirst = records.toReversed();
83
86
  const latest = records.at(-1);
@@ -101,6 +104,34 @@ export async function resolveAutomationRunDisplay(input) {
101
104
  recoveryRequiredStreak: trailingRecovery.length,
102
105
  recoverySummaries: trailingRecovery.map(record => record.summary),
103
106
  skippedCorruptLines,
107
+ recordsPath,
108
+ quarantinePath: automationRunQuarantinePath(projectRoot, input.loopId),
109
+ };
110
+ }
111
+
112
+ /**
113
+ * Report a ledger holding rows this module cannot read as drift.
114
+ *
115
+ * `skippedCorruptLines` was computed on every read, returned by both the read
116
+ * and the write path, and destructured by every caller — and printed by none
117
+ * of them. A counter nobody reads is not a control, and this one guarded the
118
+ * only evidence that a loop's own history had been damaged (#2578).
119
+ *
120
+ * `DRIFTED`, not `FAILING`: the ledger is local scheduler state, and rows it
121
+ * cannot read say nothing about whether the loop is doing its job. Escalating
122
+ * it to a loop failure would misattribute a storage problem to the automation
123
+ * and bury the real health signal underneath it.
124
+ * @param {AutomationRunDisplay | undefined} runDisplay
125
+ * @returns {{ readonly status: "DRIFTED", readonly summary: string, readonly remediation: string } | null}
126
+ */
127
+ export function resolveLedgerIntegrityFinding(runDisplay) {
128
+ if (!runDisplay || runDisplay.skippedCorruptLines < 1) {
129
+ return null;
130
+ }
131
+ return {
132
+ status: "DRIFTED",
133
+ summary: `${runDisplay.skippedCorruptLines} stored run record(s) in this loop's history cannot be read`,
134
+ remediation: `Open ${runDisplay.recordsPath} and look at the lines that are not valid run records. They are left exactly as written and are left out of the history above, so the outcomes shown are an incomplete picture. Nothing deletes them: each is copied to ${runDisplay.quarantinePath} before the history bound would evict it. Fix or remove those lines and this stops being reported.`,
104
135
  };
105
136
  }
106
137