Skip to content

feat(0.17.0): yank dead exports — keep only what consumers use#38

Merged
tangletools merged 1 commit into
mainfrom
chore/yank-dead-exports
May 23, 2026
Merged

feat(0.17.0): yank dead exports — keep only what consumers use#38
tangletools merged 1 commit into
mainfrom
chore/yank-dead-exports

Conversation

@tangletools
Copy link
Copy Markdown
Contributor

Summary

Cross-referenced every public export against the 6 consumer repos (gtm/legal/creative/tax/agent-builder/blueprint-agent) + agent-eval. Deleted everything with zero callers.

Yanked

Whole modules (zero callers):

  • `src/chat-turn.ts` — `runChatTurn` (sandbox single-shot stream) + `composeTurnProfile` + `sandboxAsChatTurnTarget` + `ChatTurnError`. Name-collided with the new `handleChatTurn`; nobody used it.
  • `src/trace-bridge.ts` — `createTraceBridge` + `toAgentEvalTrace`. Nobody mapped RuntimeStreamEvent → agent-eval TraceEvent.
  • `src/intent-router.ts` — `classifyIntent`. Nobody dispatched by intent.
  • `src/profile-conformance.ts` — `assertProfileConformance`. Nobody validated profiles.

Individual helpers:

  • `summarizeAgentTaskRun` (from run.ts) — summary helper, zero callers.
  • `withConfiguredModels` (from model-resolution.ts) — zero callers.
  • `encodeServerSentEvent` from the public surface (kept internal — two SSE helpers use it).

Dead error types: `BackendTransportError`, `CaptureIntegrityError`, `ReplayError`, `SessionMismatchError`, `VerificationError`.

Example: `examples/model-resolution/` (used `withConfiguredModels`).

Numbers

  • Public exports: 113 → ~30 (74% reduction)
  • Source files: 17 → 13 (4 modules deleted)
  • Net diff: -2000 LOC
  • Tests: 179 → 137 (42 dropped tests were exercising the yanked modules)

Test plan

  • `pnpm typecheck` clean
  • `pnpm test` — 137/137 pass
  • `pnpm build` — clean dist
  • grep'd all 6 consumer repos for any import of the yanked symbols — zero hits

Cross-referenced every public export against the 6 consumer repos
(gtm/legal/creative/tax/agent-builder/blueprint-agent) + agent-eval.
Deleted everything with zero callers.

Yanked modules (zero external callers):
- src/chat-turn.ts (runChatTurn + composeTurnProfile + sandboxAsChatTurnTarget + ChatTurnError + types) — the old sandbox single-shot stream primitive that name-collided with handleChatTurn
- src/trace-bridge.ts (createTraceBridge + toAgentEvalTrace + TraceBridge*) — nobody mapped RuntimeStreamEvent to agent-eval TraceEvent
- src/intent-router.ts (classifyIntent + supporting types) — nobody dispatched by intent
- src/profile-conformance.ts (assertProfileConformance + types) — nobody validated profiles

Yanked individual helpers (zero external callers):
- summarizeAgentTaskRun (from run.ts)
- withConfiguredModels (from model-resolution.ts)
- encodeServerSentEvent (from sse.ts public surface — kept internal for the two ServerSentEvent helpers)
- examples/model-resolution/ (used withConfiguredModels)

Yanked dead error types (zero external use):
- BackendTransportError, CaptureIntegrityError, ReplayError, SessionMismatchError, VerificationError

Tests + examples + docs scrubbed of refs. 137 tests pass (was 179 —
the 42 deletions were tests covering the yanked modules).

Public surface: 113 exports → ~30. Net diff: -2000 LOC.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants