Skip to content

refactor(agents): trim internal type exports#106925

Merged
steipete merged 1 commit into
mainfrom
codex/burn-dead-exports-agents-internals-20
Jul 14, 2026
Merged

refactor(agents): trim internal type exports#106925
steipete merged 1 commit into
mainfrom
codex/burn-dead-exports-agents-internals-20

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

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

Why This Change Was Made

  • keep nine implementation types module-private
  • remove duplicate facade exports while retaining canonical command, model-selection, prompt-state, runtime-context, and harness artifact owners
  • derive test-only helper types through Extract and Parameters
  • retarget runtime-context marker tests to the canonical module
  • leave the transitive ToolSearchCatalogSession surface unchanged

User Impact

None. Runtime behavior, CLI behavior, plugin SDK contracts, and configuration remain unchanged. The internal TypeScript surface and shrink-only dead-export baseline become smaller.

Evidence

  • baseline: 1,211 to 1,191, exactly 20 deletions and no additions
  • anchored src/agents count: 279 to 259
  • production source: +16/-25; tests: +25/-11; baseline metadata: +0/-20
  • Testbox tbx_01kxeyye2sknfxc1tkp9ghxjb9: 17 focused files, 539/539 tests passed
  • exact production Knip regeneration and enforced deadcode check passed at 1,191
  • targeted format, scoped lint, plugin SDK surface check, core types, and core test types passed
  • fresh whole-diff autoreview clean, 0.98
  • repository-wide audit found no dynamic/string consumers; canonical plugin SDK and runtime artifact types remain exported from their owner modules

Hosted CI was not awaited per maintainer instruction. Newer main commits are disjoint from the touched paths and baseline.

@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof for exact signed head 6973a330efd2377f191135ed8f53a18937f9c4fe:

  • Testbox tbx_01kxeyye2sknfxc1tkp9ghxjb9
  • final production dead-export regeneration: 1,191 total / 259 src/agents rows, +0/-20
  • enforced deadcode check passed
  • 17 focused files, 539/539 tests passed
  • targeted format and scoped lint passed
  • plugin SDK surface check passed
  • core production and core test types passed
  • fresh whole-diff autoreview clean, 0.98

Known gap: hosted CI was not awaited, per maintainer instruction. Main movement after the proof is disjoint from this patch and the baseline.

@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 1bdb7b8 into main Jul 14, 2026
62 of 66 checks passed
@steipete
steipete deleted the codex/burn-dead-exports-agents-internals-20 branch July 14, 2026 00:14
wm0018 pushed a commit to wm0018/openclaw that referenced this pull request Jul 14, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 14, 2026
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