ECC/scripts
Chris Yau 09efd68228
fix: safe Codex config sync — merge AGENTS.md + add-only MCP servers (#723)
* fix: replace bash TOML surgery with Node add-only MCP merge

The old sync script used awk/sed to remove and re-append MCP server
sections in config.toml, causing credential extraction races, duplicate
TOML tables, and 3 fragile code paths with 9 remove_section_inplace
calls each.

Replace with a Node script (scripts/codex/merge-mcp-config.js) that
uses @iarna/toml to parse the config, then appends only missing ECC
servers — preserving all existing content byte-for-byte. Warns on
config drift, supports legacy aliases (context7 → context7-mcp), and
adds --update-mcp flag for explicit refresh.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>

* fix: address PR #723 review findings for Codex MCP merge

- Use package-manager abstraction (scripts/lib/package-manager.js)
  instead of hardcoding pnpm — respects CLAUDE_PACKAGE_MANAGER,
  lock files, and project config
- Add Yarn 1.x fallback to npx (yarn dlx unsupported in classic)
- Add missing exa server to match .codex/config.toml baseline
- Wire up findSubSections for --update-mcp nested subtable removal
  (fixes Greptile P1: Object.keys only returned top-level keys)
- Fix resolvedLabel to prefer canonical entry over legacy alias
  when both exist (fixes context7/context7-mcp spurious warning)
- Fix removeSectionFromText to handle inline TOML comments
- Fix dry-run + --update-mcp to show removals before early return
- Update README parity table: 4 → 7 servers, TOML-parser-based
- Add non-npm install variants to README Codex quick start
- Update package-lock.json for @iarna/toml

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>

* fix: address PR #723 review comments (preflight, marker validation)

- Add Node.js and merge-mcp-config.js to preflight checks so the
  script fails fast before partial writes (CodeRabbit)
- Validate marker counts: require exactly 1 BEGIN + 1 END in correct
  order for clean replacement (CodeRabbit)
- Corrupted markers: strip all marker lines and re-append fresh block,
  preserving user content outside markers instead of overwriting
- Move MCP_MERGE_SCRIPT to preflight section, remove duplicate

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Happy <yesreply@happy.engineering>
2026-03-22 15:39:46 -07:00
..
ci fix(ci): enforce catalog count integrity (#525) 2026-03-16 13:37:51 -07:00
codemaps feat: add scripts/codemaps/generate.ts codemap generator Fixes #247 - The generate.ts script referenced in agents/doc-updater.md was missing from the repository. This adds the actual implementation. The script: - Recursively walks the src directory (skipping node_modules, dist, etc.) - Classifies files into 5 areas: frontend, backend, database, integrations, workers - Generates docs/CODEMAPS/INDEX.md + one .md per area - Uses the codemap format defined in doc-updater.md - Supports optional srcDir argument: npx tsx scripts/codemaps/generate.ts [srcDir] 2026-02-22 16:19:16 +05:30
codex fix: safe Codex config sync — merge AGENTS.md + add-only MCP servers (#723) 2026-03-22 15:39:46 -07:00
codex-git-hooks feat: add Codex CLI customization scripts (#336) 2026-03-16 14:02:40 -07:00
hooks feat: add MCP health-check hook (#711) 2026-03-20 05:56:21 -07:00
lib fix(install): add rust, cpp, csharp to legacy language alias map (#747) 2026-03-22 15:39:27 -07:00
claw.js fix: stabilize windows hook and claw tests 2026-03-05 12:37:24 -08:00
doctor.js feat: orchestration harness, selective install, observer improvements 2026-03-14 12:55:25 -07:00
ecc.js fix: resolve all CI test failures (19 fixes across 6 files) (#519) 2026-03-16 01:59:53 -07:00
harness-audit.js fix(harness-audit): make scoring deterministic with scripted rubric (#524) 2026-03-16 13:34:30 -07:00
install-apply.js feat: wire manifest resolution into install execution (#509) 2026-03-15 21:47:22 -07:00
install-plan.js feat: orchestration harness, selective install, observer improvements 2026-03-14 12:55:25 -07:00
list-installed.js feat: orchestration harness, selective install, observer improvements 2026-03-14 12:55:25 -07:00
orchestrate-codex-worker.sh fix: resolve all CI test failures (19 fixes across 6 files) (#519) 2026-03-16 01:59:53 -07:00
orchestrate-worktrees.js fix: preserve orchestration launcher compatibility 2026-03-12 15:40:25 -07:00
orchestration-status.js feat: orchestration harness, selective install, observer improvements 2026-03-14 12:55:25 -07:00
release.sh chore: release v1.7.0 2026-02-27 06:06:41 -08:00
repair.js feat: orchestration harness, selective install, observer improvements 2026-03-14 12:55:25 -07:00
session-inspect.js feat: self-improving skills loop — observe, inspect, amend, evaluate 2026-03-14 23:21:18 -07:00
sessions-cli.js feat: add SQLite state store and query CLI (#510) 2026-03-16 01:32:21 -07:00
setup-package-manager.js fix: reject flags passed as package manager names in setup-package-manager CLI 2026-02-13 03:37:46 -08:00
skill-create-output.js fix: use nullish coalescing for confidence default + add 3 tests (round 85) 2026-02-13 12:11:26 -08:00
skills-health.js feat(design): skill health dashboard mockup (#518) 2026-03-16 14:01:41 -07:00
status.js feat: add SQLite state store and query CLI (#510) 2026-03-16 01:32:21 -07:00
sync-ecc-to-codex.sh fix: safe Codex config sync — merge AGENTS.md + add-only MCP servers (#723) 2026-03-22 15:39:46 -07:00
uninstall.js feat: orchestration harness, selective install, observer improvements 2026-03-14 12:55:25 -07:00