baldart 4.88.0 → 4.88.1

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/CHANGELOG.md CHANGED
@@ -5,6 +5,14 @@ All notable changes to BALDART will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [4.88.1] - 2026-07-01
9
+
10
+ **`baldart update` backfills hooks on the aligned/self-heal path too.** The "already up to date" branch of `update` reconciled newly-shipped payload (agents / skills / workflows / output-styles + root primitives) but did **not** backfill hooks. Same gap class the payload reconcile already fixed: a consumer who framework-updated with an **older CLI** (before a given hook shipped — e.g. the v4.88.0 Codex hooks) and then aligned the CLI would hit the "already current" early-exit and **never get the hooks registered** (recoverable only via `doctor`). Now the aligned path registers both Claude (`.claude/settings.json`) and — when `tools.enabled ∋ codex` — Codex (`.codex/hooks.json`) hooks, **idempotently and additively**: SILENT when nothing is missing, drift left to `doctor` (never prompts on the self-heal path), non-fatal on any hiccup. The `--json` payload gains `backfilled_hooks`. **PATCH** — robustness fix, no behavior change on a healthy install. Codex parity: adapter-generated (the same registrar). No new config key.
11
+
12
+ ### Changed
13
+
14
+ - **`src/commands/update.js`** — the aligned "already up to date" branch now backfills missing Claude + Codex hooks (silent when none missing) and reports `backfilled_hooks` in `--json`.
15
+
8
16
  ## [4.88.0] - 2026-07-01
9
17
 
10
18
  **Native Codex hooks — BALDART now manages `.codex/hooks.json` in parallel with `.claude/settings.json` (Codex-parity foundation, S1–S3).** Kicks off a phased program to make BALDART **universally tool-agnostic**: everything it ships must work natively on both Claude Code and Codex. Two governance rules are now binding on all future development (CLAUDE.md § "Cross-tool parity discipline"): (1) every NEW tool/surface is first checked for native Codex compatibility (portable / adapter-generated / inline-fallback / N/A, outcome recorded in the CHANGELOG); (2) every change travels in parallel across Codex and Claude in the same change. This release delivers the **hook foundation**:
package/VERSION CHANGED
@@ -1 +1 @@
1
- 4.88.0
1
+ 4.88.1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "baldart",
3
- "version": "4.88.0",
3
+ "version": "4.88.1",
4
4
  "description": "Claude Agent Framework - Reusable framework for coordinating AI agents and humans in software projects",
5
5
  "bin": {
6
6
  "baldart": "./bin/baldart.js"
@@ -939,12 +939,44 @@ async function update(options = {}, unknownArgs = []) {
939
939
  // version bump or a slot/overlay change must land even on an aligned install.
940
940
  // --json is programmatic → force autonomous so a handwritten file is never mutated.
941
941
  reconcileRootPrimitives(process.cwd(), alignedTools, options && options.json === true ? true : undefined);
942
+
943
+ // Backfill hooks on the aligned/self-heal path too. Same gap class as the
944
+ // payload reconcile above: a consumer who framework-updated with an OLDER
945
+ // CLI (before a given hook shipped — e.g. the S2 Codex hooks) then aligns
946
+ // the CLI would hit this "already current" early-exit and never get the
947
+ // hooks registered. Idempotent + additive → SILENT when nothing is
948
+ // missing; drift is left to `doctor` (never prompt on the self-heal path).
949
+ let hooksBackfilled = 0;
950
+ try {
951
+ const res = await Hooks.registerAll(process.cwd(), {
952
+ onDrift: Hooks.createDriftPrompt(UI, { autoYes: true }),
953
+ });
954
+ if (!res.malformed) {
955
+ hooksBackfilled += res.results.filter((r) => r.status === 'created' || r.status === 'legacy-migrated').length;
956
+ }
957
+ } catch (_) { /* non-fatal — never fail an aligned install on a hook hiccup */ }
958
+ if (Array.isArray(alignedTools) && alignedTools.includes('codex')) {
959
+ try {
960
+ const CodexHooks = require('../utils/hooks/codex');
961
+ const res = await CodexHooks.registerAll(process.cwd(), {
962
+ onDrift: CodexHooks.createDriftPrompt(UI, { autoYes: true }),
963
+ });
964
+ if (!res.malformed) {
965
+ hooksBackfilled += res.results.filter((r) => r.status === 'created').length;
966
+ }
967
+ } catch (_) { /* non-fatal */ }
968
+ }
969
+ if (hooksBackfilled > 0) {
970
+ UI.info(`Backfilled ${hooksBackfilled} missing hook(s) — hook drift from a prior CLI-skew update, now healed.`);
971
+ }
972
+
942
973
  UI.success(`Already up to date! (v${status.installedVersion})`);
943
974
  emitUpdateJson({ ok: true, action: 'already-current',
944
975
  installed_before: status.installedVersion,
945
976
  installed_after: status.installedVersion,
946
977
  remote_version: status.remoteVersion,
947
- reconciled_items: reconciled }, 0);
978
+ reconciled_items: reconciled,
979
+ backfilled_hooks: hooksBackfilled }, 0);
948
980
  }
949
981
 
950
982
  UI.warning(`Update available: v${status.installedVersion} → v${status.remoteVersion}`);