@nodii/dev 0.6.98 → 0.6.99
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/dist/core.js +1 -1
- package/dist/runtime-launcher.js +20 -0
- package/package.json +1 -1
package/dist/core.js
CHANGED
|
@@ -4,7 +4,7 @@ import { chmod, mkdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
|
4
4
|
import { homedir, platform } from "node:os";
|
|
5
5
|
import { dirname, join } from "node:path";
|
|
6
6
|
|
|
7
|
-
export const VERSION = "0.6.
|
|
7
|
+
export const VERSION = "0.6.99";
|
|
8
8
|
export const configPath = () =>
|
|
9
9
|
process.env.NODII_DEV_CONFIG_PATH ??
|
|
10
10
|
join(homedir(), ".config/nodii-dev/config.json");
|
package/dist/runtime-launcher.js
CHANGED
|
@@ -90,6 +90,25 @@ function profileVariable(runtime, profileHome, home) {
|
|
|
90
90
|
: { CLAUDE_CONFIG_DIR: profileHome };
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
+
// The Freeze is a snapshot from the lane's last gather, so an amendment since is
|
|
94
|
+
// not in it (hub-289: lanes relaunched on stale rules until told directly).
|
|
95
|
+
function amendmentsSinceFreeze(lane, freeze) {
|
|
96
|
+
const notes = freeze?.objective?.laneNotes ?? [];
|
|
97
|
+
const inFreeze = notes.reduce((highest, note) => {
|
|
98
|
+
const version = Number(/^(?:Scope|Rules) \(amendment (\d+)\): /.exec(note)?.[1] ?? 0);
|
|
99
|
+
return Math.max(highest, version);
|
|
100
|
+
}, 0);
|
|
101
|
+
const later = (lane?.amendments ?? [])
|
|
102
|
+
.filter((amendment) => amendment.version > inFreeze)
|
|
103
|
+
.sort((a, b) => a.version - b.version);
|
|
104
|
+
if (!later.length) return [];
|
|
105
|
+
return [
|
|
106
|
+
"Amendments since that Freeze. They change the lane, and where they disagree with it or each other the newest wins:",
|
|
107
|
+
...later.map(({ version, reason, change }) => `v${version}${reason ? ` (${reason})` : ""}: ${printable(change)}`),
|
|
108
|
+
"",
|
|
109
|
+
];
|
|
110
|
+
}
|
|
111
|
+
|
|
93
112
|
/** Build the complete recovery message passed to the fresh runtime over stdin. */
|
|
94
113
|
export function buildRecoveryPrompt(data) {
|
|
95
114
|
const { runId, laneKey } = validateData(data);
|
|
@@ -103,6 +122,7 @@ export function buildRecoveryPrompt(data) {
|
|
|
103
122
|
"",
|
|
104
123
|
`Freeze:\n${printable(data.recovery?.freeze)}`,
|
|
105
124
|
"",
|
|
125
|
+
...amendmentsSinceFreeze(data.lane, data.recovery?.freeze),
|
|
106
126
|
`Dead run log tail:\n${printable(data.recovery?.logTail)}`,
|
|
107
127
|
"",
|
|
108
128
|
].join("\n");
|