Repository navigation
v2.1.1 - Fail-Closed Governance Hardening & Catalog Distribution
ContextOS v2.1.1 - Fail-Closed Governance Hardening & Catalog Distribution
ContextOS 2.1.1 delivers critical governance hardening, supply chain integrity, full catalog distribution in the npm package, and clean checkout execution.
What's Changed in v2.1.1
Supply Chain & NPM Distribution
- Full Catalog Distribution: Included
catalogdirectory in npm package distribution (package.jsonfilesfield), allowing consumer projects to install all 36 catalog skills directly from the unpacked package without requiring a repository clone. - Catalog Source Precedence: Built-in package catalog skills take strict precedence over consumer project files, preventing local workspace files from hijacking catalog installations. Local skills require an explicit
local:or path reference. - Package Size Verification: Total unpacked package size is strictly bounded at 1.30 MB (well below the 2.00 MB budget target), with a compressed tarball size of 396 KB across 303 files.
Security & Fail-Closed Governance
- Strict Exit Code Contract: Standardized exit codes across
scanandgate: all reading, git, or configuration failures return code2with explicit diagnostics in both enforce and advisory modes; code0is returned strictly when verification completes cleanly with no blocking violations; code1is returned on blocking violations. - Literal Git Pathspecs & Diff Isolation: Added
--literal-pathspecs,-c core.quotepath=false,--no-ext-diff, and--no-textconvto staged git diff and blob inspections, eliminating filename regex fragility and supporting paths with spaces, Unicode, and glob characters. - Pre-Commit Hook Safety & Trusted Local Runner:
- Automatically migrates existing trailing hook blocks from v2.1.0 to execute immediately after the shebang before any user
exit 0. - Added strict shell shebang validation, rejecting non-shell interpreters (
python,node) with exit code 1. - Resolves local executable via
./node_modules/.bin/contextosor source repository runner, eliminating unpinned PATH binary fallbacks. - Preserves exact scanner exit codes (including code
2for infrastructure/unverified errors) rather than coercing to code 1.
- Automatically migrates existing trailing hook blocks from v2.1.0 to execute immediately after the shebang before any user
- Cross-Repository Scan Targeting (
--project): Added--project <path>support tocontextos scan, enabling inspection of external target Git repositories from a central runner.
Core Adapters & Clean Checkout Parity
- Self-Contained MCP Selector Resolution: Resolver parity tests now dynamically compile the TypeScript selector in-memory when gitignored
distis absent, guaranteeing clean checkout compatibility without pre-build requirements. - CLAUDE.md Demarcation & Idempotency: Claude Code adapter now generates
CLAUDE.mdwith explicit<!-- CONTEXTOS:START -->and<!-- CONTEXTOS:END -->demarcation, preserving user preamble, custom guidelines, and ensuring idempotent re-exports. - Dual-Root Profile Discovery: Extended dual-root contract to
profiles.js(listProfilesandgetProfile), enabling consumer projects to define custom profiles that are seamlessly discovered across all CLI and compiler entrypoints. - Skill Examples Verification Engine: Replaced
vm.Scriptwithesbuild.transformSync(for TypeScript/TSX/ESM JavaScript) and Python AST parsing inscripts/verify-skill-examples.js, with syntax validation explicitly separated from behavioral runtime checks. - CLI Robustness & Documentation Alignment: Restored
auditproxy command (as an alias forvalidate), added rejection with exit code 1 for unknown commands, supported comma-separated--target cursor,claude, updated action examples tov2.1.1, and protected.aider.conf.ymlagainst malformed YAML overwrites.