feat(host): add --slim tool surface alias for #847#1196
Conversation
Expose a narrow CLI shortcut for the existing core-only capability filter so users can request a reduced tool surface without remembering capability CSV syntax. Constraint: issue #847 requests a tool category toggle / slim mode on top of the existing capability filter surface. Rejected: reviving stale PR #944 wholesale | it is conflicting, failing checks, and broader than the alias needed here. Confidence: high Scope-risk: narrow Directive: keep --slim as an alias for the canonical capability filter unless product requirements define a separate curated surface. Tested: npm test -- tests/capability-filter.test.ts --runInBand; npm run build; npm run lint -- --quiet; npm run lint:tier; git diff --check; node dist/index.js serve --help | grep -E -- '--slim|--tools-only|--disable-tools' Not-tested: full MCP runtime launch with a live Chrome instance. Co-authored-by: OmX <omx@oh-my-codex.dev>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Drive ChromeDetector polling assertions with Jest fake timers so saturated macOS CI runners cannot starve short wall-clock intervals while validating the slim tool-surface alias PR. Constraint: macOS Node 20 CI observed only one 50ms polling interval under full-suite load for #1196. Rejected: Increasing wall-clock sleeps | scheduler starvation can recur and slows the suite without deterministic proof. Confidence: high Scope-risk: narrow Directive: Keep ChromeDetector runtime polling unchanged; this is a test-harness determinism fix only. Tested: npm test -- --runTestsByPath tests/capability-filter.test.ts tests/desktop/chrome-detector.test.ts --runInBand; npm run build; npm run lint -- --quiet; npm run lint:tier; git diff --check Not-tested: Native macOS Node 20 local run; GitHub Actions rerun remains the platform proof. Co-authored-by: OmX <omx@oh-my-codex.dev>
Merge the latest develop baseline into the slim tool-surface branch so GitHub Actions validates the alias against the current task-ledger, HTTP, and admin-key parser contracts. Constraint: #1196 CI tests the pull request merge commit, and the branch was behind develop after multiple tool-surface merges. Rejected: Rerunning stale CI only | the synthetic merge commit still carried the stale admin-key parser overlap. Confidence: high Scope-risk: moderate Directive: Resolve follow-up test-harness overlap in a separate narrow commit before pushing. Tested: Not tested at merge-commit boundary; validated after the follow-up duplicate-parser cleanup. Not-tested: Standalone merge commit before cleanup. Co-authored-by: OmX <omx@oh-my-codex.dev>
Remove the stale suffix-scanning helper left by the branch/base merge so #1196 keeps the balanced parser as the only admin-key JSON test harness. Constraint: Current develop already carries the balanced parser, while this branch carried the older helper; the CI merge commit compiled both. Rejected: Keeping both helpers | TypeScript rejects duplicate implementations and blocks all platform jobs. Confidence: high Scope-risk: narrow Directive: Keep noisy stdout tolerance confined to the single balanced parser in tests/cli/admin-keys.test.ts. Tested: npm test -- --runTestsByPath tests/capability-filter.test.ts tests/desktop/chrome-detector.test.ts tests/cli/admin-keys.test.ts --runInBand; npm run build; npm run lint -- --quiet; npm run lint:tier; npm run lint:tool-schemas; git diff --check Not-tested: Full GitHub Actions matrix after push; CI rerun remains the platform proof. Co-authored-by: OmX <omx@oh-my-codex.dev>
Constraint: develop advanced while PR #1196 was open, and the branch needed to keep slim capability filtering plus stabilized Chrome detector polling while absorbing current admin parser changes. Rejected: relying on stale 9/9 checks | they no longer covered the current develop integration surface or conflict resolution. Confidence: high Scope-risk: moderate Directive: keep --slim as a core-only alias and keep Chrome detector polling tests on fake-timer-stable behavior. Tested: npm test -- --runTestsByPath tests/capability-filter.test.ts tests/desktop/chrome-detector.test.ts tests/cli/admin-keys.test.ts --runInBand; npm run build; npm run lint -- --quiet; npm run lint:tier; npm run lint:tool-schemas; git diff --check. Not-tested: full GitHub Actions matrix before push. Co-authored-by: OmX <omx@oh-my-codex.dev>
Constraint: develop advanced after PR #1192 merged, and PR #1196 needed to preserve the slim capability surface while absorbing the current admin parser fix. Rejected: leaving stale conflict markers to GitHub | it would keep the otherwise-valid PR unmergeable. Confidence: high Scope-risk: narrow Directive: keep --slim mapped to the core-only capability filter and keep admin JSON parsing as a single balanced scanner. Tested: npm test -- --runTestsByPath tests/capability-filter.test.ts tests/desktop/chrome-detector.test.ts tests/cli/admin-keys.test.ts --runInBand; npm run build; npm run lint -- --quiet; npm run lint:tier; npm run lint:tool-schemas; git diff --check. Not-tested: full GitHub Actions matrix before push. Co-authored-by: OmX <omx@oh-my-codex.dev>
|
Reviewed and validated for merge. This PR implements the intended #847 Validation evidence: GitHub reports all 9 required checks passing with a CLEAN merge state. The branch was refreshed onto current develop and locally verified with capability-filter tests, Chrome detector tests, admin-key tests, build, lint, dependency-tier lint, tool-schema lint, and |
Summary
openchrome serve --slimas a narrow alias for the existing core-only capability filter.--slimparsing and mutual-exclusion behavior with existing filter flags.Fixes #847.
Supersedes #944 with a fresh narrow branch.
Verification
npm test -- tests/capability-filter.test.ts --runInBandnpm run buildnpm run lint -- --quietnpm run lint:tiergit diff --checknode dist/index.js serve --help | grep -E -- '--slim|--tools-only|--disable-tools'