@nodii/dev 0.6.97 → 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/cli.js +1 -0
- package/dist/core.js +1 -1
- package/dist/flags.js +1 -0
- package/dist/lanes.js +8 -0
- package/dist/runtime-launcher.js +20 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -337,6 +337,7 @@ Usage: nodii-dev <command> [options] [--json]
|
|
|
337
337
|
sync pending [--discard FILE --reason TEXT]
|
|
338
338
|
# send the lane records queued while Dev was down (MW1-64); --discard drops
|
|
339
339
|
# one Dev refuses for good, with a note on its lane
|
|
340
|
+
lane ready <key> --withdraw --reason TEXT # take READY back without closing the PR; a newer done check posts it again
|
|
340
341
|
lane done-check <key> --evidence TEXT|URL # the done check is met; a launched run that exits after it ends finished
|
|
341
342
|
lane subagent-quota <key> <n> # coordinator assigns 0-100 subagent slots
|
|
342
343
|
lane cap <machine> <n> [--confirm-raise --reason TEXT]
|
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/flags.js
CHANGED
|
@@ -36,6 +36,7 @@ export const COMMAND_FLAGS = {
|
|
|
36
36
|
"receipt verify": ["commit"],
|
|
37
37
|
"sync pending": ["discard", "reason"],
|
|
38
38
|
"lane done-check": ["evidence"],
|
|
39
|
+
"lane ready": ["withdraw", "reason"],
|
|
39
40
|
"lane cap": ["confirm-raise", "reason"],
|
|
40
41
|
"lane heartbeat": ["note", "waiting-on"],
|
|
41
42
|
"lane waits": ["machine"],
|
package/dist/lanes.js
CHANGED
|
@@ -905,6 +905,14 @@ export async function laneCommand(action, args, flags, deps = {}) {
|
|
|
905
905
|
return { payload: { data: { queued: true, file } }, human: `${ref}: Dev is unreachable; ${body.kind} evidence is waiting at ${file}. Run nodii-dev sync pending before the lane closes (MW1-64).` };
|
|
906
906
|
}
|
|
907
907
|
}
|
|
908
|
+
// hub-277: READY is a done check and an open PR, so a lane can take it back
|
|
909
|
+
// without closing its PR. A newer done check posts READY again.
|
|
910
|
+
if (action === "ready") {
|
|
911
|
+
if (!flags.withdraw) throw new CliError("USAGE", "lane ready needs --withdraw: a lane posts READY by recording its done check and PR", 2);
|
|
912
|
+
const body = { kind: "ready_withdrawn", ref: requireFlag(flags, "reason") };
|
|
913
|
+
const payload = await request("POST", `/api/v1/lanes/${encode(id)}/evidence`, body);
|
|
914
|
+
return { payload, human: `${ref}: READY withdrawn. Record a done check to post it again.` };
|
|
915
|
+
}
|
|
908
916
|
if (action === "done-check") {
|
|
909
917
|
await assertNothingPending(ref);
|
|
910
918
|
// NODII-DEV-CLI-4: the agent met the lane's done check. A launched run that
|
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");
|