nearly-cli 0.1.10 → 0.1.11
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/package.json +1 -1
- package/scripts/doctor.mjs +14 -2
- package/scripts/post-recap.mjs +7 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nearly-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "A pull request tells you what changed. Nearly tells you what nearly happened: the commands a human refused, the pushes policy blocked, the turns rolled back.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/scripts/doctor.mjs
CHANGED
|
@@ -73,8 +73,20 @@ if (!health) {
|
|
|
73
73
|
let mine = root;
|
|
74
74
|
try { mine = realpathSync(root); } catch { /* compare literally */ }
|
|
75
75
|
const same = health.root === mine;
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
let ours = null;
|
|
77
|
+
try { ours = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8')).version; } catch { /* unknown */ }
|
|
78
|
+
if (same) {
|
|
79
|
+
say(true, 'server', `v${health.version}`);
|
|
80
|
+
} else if (health.version && health.version === ours) {
|
|
81
|
+
// Running this through npx gives a throwaway directory every time, so the
|
|
82
|
+
// paths differ even when the build is identical. Saying "a different
|
|
83
|
+
// install" there is true and useless; the version is what anyone cares
|
|
84
|
+
// about, and a matching one is holding nothing back.
|
|
85
|
+
say(null, 'server', `v${health.version} from another copy of the same version — nothing stale about it`);
|
|
86
|
+
} else {
|
|
87
|
+
say(false, 'server', `an older build is answering${health.version ? ` (v${health.version})` : ''}: ${health.root || 'it does not say where it lives'}`,
|
|
88
|
+
'run `nearly` here — it closes the older server holding the port');
|
|
89
|
+
}
|
|
78
90
|
}
|
|
79
91
|
|
|
80
92
|
// 4 — recordings for this branch, matched the way the record builder matches
|
package/scripts/post-recap.mjs
CHANGED
|
@@ -49,7 +49,12 @@ lines.push(sb.runs > 1
|
|
|
49
49
|
lines.push('');
|
|
50
50
|
lines.push(urlBase
|
|
51
51
|
? `**[Watch the record (${mmss(sb.totalS)})](${urlBase}/${slug}.html)** · ${sb.runs > 1 ? `${sb.runs} agent sessions` : `agent \`${sb.name}\``} · ${sb.model} · ${sb.date}`
|
|
52
|
-
|
|
52
|
+
// No host configured. Everything a reviewer needs to act on is in this
|
|
53
|
+
// comment already — what was refused, and what the diff therefore cannot show
|
|
54
|
+
// them. Only the player is missing, so say where it is honestly rather than
|
|
55
|
+
// naming a path from the developer's own checkout that means nothing to
|
|
56
|
+
// anybody who installed this.
|
|
57
|
+
: `${sb.runs > 1 ? `${sb.runs} agent sessions` : `Agent \`${sb.name}\``} · ${sb.model} · ${sb.date} · ${mmss(sb.totalS)} recording, kept on the author's machine`);
|
|
53
58
|
lines.push('');
|
|
54
59
|
if (outcome?.notDone?.length) {
|
|
55
60
|
lines.push(`> **${outcome.notDone.length} thing${outcome.notDone.length > 1 ? 's' : ''} the agent wanted to do did not happen.** The diff cannot show you this.`);
|
|
@@ -67,7 +72,7 @@ sb.scenes.forEach((s, i) => { lines.push(`${i + 1}. **${s.kind}** — ${s.narrat
|
|
|
67
72
|
lines.push('');
|
|
68
73
|
lines.push('</details>');
|
|
69
74
|
lines.push('');
|
|
70
|
-
lines.push(`<sub>Every number above was computed from the session recording. ${sb.polished ? 'Sentences were rewritten by a model; facts were not.' : 'No model wrote any of it.'}</sub>`);
|
|
75
|
+
lines.push(`<sub>Every number above was computed from the session recording. ${sb.polished ? 'Sentences were rewritten by a model; facts were not.' : 'No model wrote any of it.'}${urlBase ? '' : ' The narrated version is not published anywhere; `nearly publish` puts it on GitHub Pages.'}</sub>`);
|
|
71
76
|
// A hidden marker so we can find our own comment again on the next push and
|
|
72
77
|
// edit it, instead of stacking a new one on every push until nobody reads any.
|
|
73
78
|
// Deliberately carries no product name. This string is how a comment is
|