@celilo/cli 0.3.23 → 0.3.24

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celilo/cli",
3
- "version": "0.3.23",
3
+ "version": "0.3.24",
4
4
  "description": "Celilo — home lab orchestration CLI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -248,15 +248,45 @@ function formatResult(result: SystemUpdateResult): string {
248
248
  ` self-update: ${result.selfUpdate.performed ? `${result.selfUpdate.from} → ${result.selfUpdate.to}` : `(${result.selfUpdate.reason})`}`,
249
249
  );
250
250
  lines.push(` backups: ${result.backupsCreated ? 'created' : 'skipped'}`);
251
- lines.push('');
252
- for (const m of result.modules) {
253
- const tag =
254
- m.step === 'done' ? '✓' : m.step === 'failed' ? '✗' : m.step === 'skipped' ? '↳' : '?';
255
- const change =
256
- m.fromVersion === m.toVersion ? m.fromVersion : `${m.fromVersion} ${m.toVersion}`;
257
- lines.push(` ${tag} ${m.moduleId} (${change}) ${m.step}`);
258
- if (m.error) lines.push(` ${m.error}`);
259
- if (m.skipReason) lines.push(` ${m.skipReason}`);
251
+
252
+ // Surface audit findings inline. DRIFT means "something is drifting
253
+ // but it didn't block the update" — without listing the findings the
254
+ // operator has no idea what; they'd have to run `celilo system audit`
255
+ // as a follow-up. Show them here so it's a single round-trip.
256
+ // BLOCKED also gets the listing (the orchestrator already short-
257
+ // circuited to skip the run, but the operator still needs to know
258
+ // why — formatResult is the friendly path for that too).
259
+ if (result.audit.findings.length > 0) {
260
+ lines.push('');
261
+ const drift = result.audit.findings.filter((f) => f.severity === 'drift');
262
+ const blocked = result.audit.findings.filter((f) => f.severity === 'blocked');
263
+ if (blocked.length > 0) {
264
+ lines.push(` BLOCKED (${blocked.length}):`);
265
+ for (const f of blocked) {
266
+ lines.push(` ✗ [${f.category}] ${f.subject}: ${f.message}`);
267
+ if (f.remediation) lines.push(` → ${f.remediation}`);
268
+ }
269
+ }
270
+ if (drift.length > 0) {
271
+ lines.push(` Drift findings (${drift.length}, informational):`);
272
+ for (const f of drift) {
273
+ lines.push(` ▸ [${f.category}] ${f.subject}: ${f.message}`);
274
+ if (f.remediation) lines.push(` → ${f.remediation}`);
275
+ }
276
+ }
277
+ }
278
+
279
+ if (result.modules.length > 0) {
280
+ lines.push('');
281
+ for (const m of result.modules) {
282
+ const tag =
283
+ m.step === 'done' ? '✓' : m.step === 'failed' ? '✗' : m.step === 'skipped' ? '↳' : '?';
284
+ const change =
285
+ m.fromVersion === m.toVersion ? m.fromVersion : `${m.fromVersion} → ${m.toVersion}`;
286
+ lines.push(` ${tag} ${m.moduleId} (${change}) — ${m.step}`);
287
+ if (m.error) lines.push(` ${m.error}`);
288
+ if (m.skipReason) lines.push(` ${m.skipReason}`);
289
+ }
260
290
  }
261
291
  return lines.join('\n');
262
292
  }