Skip to content

refactor(agents): trim CLI and facade exports#106917

Merged
steipete merged 2 commits into
mainfrom
codex/burn-dead-exports-agents-cli-facades-20
Jul 14, 2026
Merged

refactor(agents): trim CLI and facade exports#106917
steipete merged 2 commits into
mainfrom
codex/burn-dead-exports-agents-cli-facades-20

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Production-mode Knip still tracked 20 agent exports that were module-private implementation types, duplicate facade reexports, or test-only parser seams.

Why This Change Was Made

Make same-module types and parsers private. Remove duplicate facade exports while retaining canonical subscription, MCP, plugin-SDK, and Codex web-search contracts. Route JSON/JSONL parser coverage through public parseCliOutput, route compaction coverage through retained planning entry points, and derive the test-only conversation parameter type from the production resolver. Three newly exposed compaction-planning helpers also become module-private so regeneration adds no replacement rows.

User Impact

No runtime, CLI, plugin-SDK, or configuration behavior change. Internal TypeScript surface becomes smaller and canonical ownership is clearer.

Evidence

  • Baseline: 1,231 to 1,211, exactly 20 deletions and no additions.
  • Production source: +14/-37; tests: +56/-37; baseline metadata: +0/-20.
  • Testbox tbx_01kxeydekbbw9cnw94qsghe4nr: 8 files, 140/140 tests green.
  • Final production Knip regeneration byte-stable at 1,211; enforced deadcode check, format, scoped typed lint, core types, and core test types green.
  • Original whole-wave autoreview clean at 0.98; fresh compaction-cascade review clean at 0.93.
  • Repository-wide consumer audit found no dynamic/string/lazy consumers; canonical plugin-SDK MCP and subscription types remain exported from their owner modules.

@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof for exact signed head 6e632b3ae2624eb1da8588bfb45dcf50b6514d32:

  • Testbox tbx_01kxeydekbbw9cnw94qsghe4nr
  • final pnpm deadcode:exports:update byte-stable at 1,211 entries
  • enforced pnpm deadcode:exports
  • 8 focused files, 140/140 tests passed
  • targeted format and scoped lint passed
  • core production and core test types passed
  • whole-wave review clean at 0.98; compaction-cascade review clean at 0.93
  • baseline +0/-20; no dynamic/string/lazy consumers; canonical SDK/MCP/subscription contracts retained

Known gap: hosted CI was not awaited, per maintainer instruction. Latest main movement is OnePassword-only with no agents or baseline overlap.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts agents Agent runtime and tooling size: S maintainer Maintainer-authored PR labels Jul 14, 2026
@steipete
steipete merged commit d7f38ab into main Jul 14, 2026
68 of 72 checks passed
@steipete
steipete deleted the codex/burn-dead-exports-agents-cli-facades-20 branch July 14, 2026 00:02

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6e632b3ae2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@@ -14,8 +14,6 @@ import {
import { collectExplicitDenylist, mergeAlsoAllowPolicy } from "../tool-policy.js";
import type { AnyAgentTool } from "../tools/common.js";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep the policy facade export for Docker QA

When pnpm test:docker:agent-bundle-mcp-tools runs, scripts/e2e/agent-bundle-mcp-tools-docker.sh:31 starts test/e2e/qa-lab/runtime/agent-bundle-mcp-tools-docker-client.ts, which still imports resolveConversationCapabilityProfile from dist/agents/embedded-agent-runner/effective-tool-policy.js at lines 13-16. Removing this re-export makes the static ESM import fail before the bundle-MCP smoke can run; either keep the facade export or update that Docker harness to import the canonical conversation-capability-profile module.

Useful? React with 👍 / 👎.

wm0018 pushed a commit to wm0018/openclaw that referenced this pull request Jul 14, 2026
* refactor(agents): trim CLI and facade exports

* refactor(agents): privatize compaction planning helpers
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 14, 2026
* refactor(agents): trim CLI and facade exports

* refactor(agents): privatize compaction planning helpers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling maintainer Maintainer-authored PR scripts Repository scripts size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant