@rness/cli 0.9.1 → 0.9.2
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/README.md
CHANGED
|
@@ -243,6 +243,15 @@ per repository, the files to commit there.
|
|
|
243
243
|
Exit codes: 0 success, 1 failure, 2 usage — or a refusal without a TTY.
|
|
244
244
|
`RNESS_DEBUG=1` adds stack traces; `RNESS_NO_DELEGATE=1` skips the delegation.
|
|
245
245
|
|
|
246
|
+
## 0.9.2 — the sync summary reads as a sentence
|
|
247
|
+
|
|
248
|
+
- `rness sync` counts agent files apart from blocks: "4 blocks: 4
|
|
249
|
+
unchanged; 6 agent files: 6 unchanged". 0.9.1 counted them as blocks
|
|
250
|
+
("10 blocks: 10 unchanged").
|
|
251
|
+
- In a terminal the line reads as a sentence, verb first: "Synced 4 blocks:
|
|
252
|
+
…" instead of "10 blocks: 10 unchanged synced".
|
|
253
|
+
- Blocks are unchanged: no `rness sync` is needed after upgrading.
|
|
254
|
+
|
|
246
255
|
## 0.9.1 — upgrade ends in its commit; the MCP server approved per developer
|
|
247
256
|
|
|
248
257
|
- `rness upgrade` commits `.rness` itself (`chore: rness <version>`), with
|
package/dist/bin/rness.js
CHANGED
|
@@ -1405,7 +1405,7 @@ function reportError(e) {
|
|
|
1405
1405
|
}
|
|
1406
1406
|
|
|
1407
1407
|
// src/version.ts
|
|
1408
|
-
var VERSION = "0.9.
|
|
1408
|
+
var VERSION = "0.9.2";
|
|
1409
1409
|
|
|
1410
1410
|
// src/core/block.ts
|
|
1411
1411
|
import { createHash } from "crypto";
|
|
@@ -2088,7 +2088,7 @@ function sessionUi(p) {
|
|
|
2088
2088
|
async step(options, work, done) {
|
|
2089
2089
|
const label = options.sentence ?? tidy(options.doing);
|
|
2090
2090
|
const finish2 = (result) => done?.(result) ?? null;
|
|
2091
|
-
const label_ = (line2) => `${line2[1]} ${line2[0]}`;
|
|
2091
|
+
const label_ = (line2) => line2[2] ?? `${line2[1]} ${line2[0]}`;
|
|
2092
2092
|
if (options.git === true && !this.gitIsSilent) {
|
|
2093
2093
|
p.log.message(paint("idle", `${label}\u2026`));
|
|
2094
2094
|
const result = await work();
|
|
@@ -3109,19 +3109,32 @@ async function runPinnedSync(root) {
|
|
|
3109
3109
|
};
|
|
3110
3110
|
}
|
|
3111
3111
|
}
|
|
3112
|
+
var SYNC_VERBS = ["updated", "unchanged", "stale"];
|
|
3113
|
+
function counted(noun, counts) {
|
|
3114
|
+
const total = [...counts.values()].reduce((a, b) => a + b, 0);
|
|
3115
|
+
const detail = SYNC_VERBS.filter((verb) => counts.has(verb)).map((verb) => `${counts.get(verb) ?? 0} ${verb}`).join(", ");
|
|
3116
|
+
return `${total} ${noun}${total === 1 ? "" : "s"}${detail === "" ? "" : `: ${detail}`}`;
|
|
3117
|
+
}
|
|
3112
3118
|
function summariseSync(stdout) {
|
|
3113
|
-
const
|
|
3119
|
+
const blocks = /* @__PURE__ */ new Map();
|
|
3120
|
+
const agentFiles = /* @__PURE__ */ new Map();
|
|
3114
3121
|
const others = [];
|
|
3115
3122
|
for (const line2 of stdout.split("\n")) {
|
|
3116
3123
|
if (line2.trim() === "") continue;
|
|
3117
|
-
const
|
|
3118
|
-
if (
|
|
3119
|
-
|
|
3124
|
+
const m = /^(updated|unchanged|stale)\s+(\S+)/.exec(line2);
|
|
3125
|
+
if (m === null) {
|
|
3126
|
+
others.push(line2);
|
|
3127
|
+
continue;
|
|
3128
|
+
}
|
|
3129
|
+
const [, verb = "", path = ""] = m;
|
|
3130
|
+
const counts = /(^|\/)(AGENTS|CLAUDE)\.md$/.test(path) ? blocks : agentFiles;
|
|
3131
|
+
counts.set(verb, (counts.get(verb) ?? 0) + 1);
|
|
3120
3132
|
}
|
|
3121
|
-
const total = [...counts.values()].reduce((a, b) => a + b, 0);
|
|
3122
|
-
const detail = [...counts].map(([verb, n]) => `${n} ${verb}`).join(", ");
|
|
3123
3133
|
return {
|
|
3124
|
-
summary:
|
|
3134
|
+
summary: [
|
|
3135
|
+
counted("block", blocks),
|
|
3136
|
+
...agentFiles.size > 0 ? [counted("agent file", agentFiles)] : []
|
|
3137
|
+
].join("; "),
|
|
3125
3138
|
others
|
|
3126
3139
|
};
|
|
3127
3140
|
}
|
|
@@ -3474,7 +3487,10 @@ async function syncBlocks(ui, root, shown, inPlace, sshWorks) {
|
|
|
3474
3487
|
sentence: "Writing the rness block into every AGENTS.md"
|
|
3475
3488
|
},
|
|
3476
3489
|
() => runPinnedSync(root),
|
|
3477
|
-
(r) => r === null || r.code !== 0 ? null :
|
|
3490
|
+
(r) => r === null || r.code !== 0 ? null : (() => {
|
|
3491
|
+
const { summary } = summariseSync(r.stdout);
|
|
3492
|
+
return ["synced", summary, `Synced ${summary}`];
|
|
3493
|
+
})()
|
|
3478
3494
|
);
|
|
3479
3495
|
if (result === null) {
|
|
3480
3496
|
if (inPlace !== void 0) return inPlace();
|
|
@@ -5503,4 +5519,4 @@ export {
|
|
|
5503
5519
|
OWN_COMMANDS,
|
|
5504
5520
|
catchUp
|
|
5505
5521
|
};
|
|
5506
|
-
//# sourceMappingURL=chunk-
|
|
5522
|
+
//# sourceMappingURL=chunk-JKDF7ROY.js.map
|