Skip to content

chore: land epic #2542 batch — drop unconsumed ui-sdk internal re-exports (#2534) - #3570

Merged
schlessera merged 4 commits into
mainfrom
epic/2542-dead-code
Nov 4, 2026
Merged

schlessera merged 4 commits into
mainfrom
epic/2542-dead-code

Conversation

@schlessera

@schlessera schlessera commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

What lands

The next batch of epic #2542 (dead code, scripts and dependencies are removed), from epic/2542-dead-code into main, as a merge commit.

Sub-PR Squash on the epic Issue
#3413 (drop internal ui-sdk re-exports that no other package consumes) bbf4892f2 Closes #2534

#3413 keeps OutwardPlan and hostComputeCredential (plus CompiledWorkerCommandPolicy/WorkerCommandPolicy), which other packages' emitted declarations or imports need. It regenerates api-report/ui-sdk.txt.

Refresh, 2026-11-04 (third). Merge commit 0352727d4 brings main b3c959370 (#3578, and epic #1777's batch #3586) into the epic. It merged with no conflicts. The full bun run build at 0352727d4 exits 0, and bun scripts/api-report.ts regenerates with no diff.

Refresh (second). Merge commit a08478de0 brought main 70ce32e84 (#3585, the fix for main-red incident #3583) into the epic, with no conflicts.

Refresh (first). Merge commit 6c7a45344 brought main 401c66b0b (#3568, #3564, #3571, #3569, #3565) into the epic. The one conflict is in packages/ui-sdk/src/internal.ts: #3413 dropped EgressProxyOptions, RestrictedEnvelope and WorkerHostProbeOptions, and #3563 on main added EgressRefusal to the same line. The resolution keeps both sides: export type { EgressRecord, EgressRefusal }.

The full bun run build at 6c7a45344 exited 0, with no missing-export or TS2883 errors from the code main added since #3413 was proved, so no dropped re-export needed restoring. bun scripts/api-report.ts regenerates with no diff.

Collisions (bun scripts/collisions.ts --json --pr 3570, head 0352727d4): no textual overlap. Closure-only overlap with #3054, #3056, #3059, #3069, #3116, #3336, #3393, #3437, #3458, #3464, #3572, #3576, #3581, #3582 and #3587.

Proof

The full ready-candidate proof runs under the integration lease before merge, with the full workspace bun run build, because TS2883 shows up only in declaration builds.

Local preflight (bun run check:pr --base origin/main) at head 0352727d4, base main b3c959370:

{"version":1,"kind":"brain-check-pr-receipt","head":"0352727d47339f3ff6fc8e7d8d7aeda3bd9be33d","base":"origin/main","mode":"focused","startedAt":"2026-11-04T20:33:29.826Z","finishedAt":"2026-11-04T20:34:36.702Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":10854.876866999999},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":111.95133100000021},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":87.95408899999893},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":19.660563000001275},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":55783.15369399999}]}

🤖 Generated with Claude Code

* chore(ui-sdk): drop 66 internal re-exports no other package uses

`./internal` re-exported 64 names, and `./internal/client` two, that no file
outside ui-sdk imports at this base and no consumer's emitted declarations
reach. ui-sdk's own tests import them from their source modules, so the
re-exports served nobody but still added rows to the API report and the
dist-types check. The declarations stay where they are.

Kept from the issue's list of 71:
- `NativeBrainDeltaCandidate`: ui-server now imports it.
- `MaintenanceResult`: an open PR adds an import of it.
- `WorkerOutputStorage`, `SessionPromptFacts`, `LinkEdit`: no file names
  them, but ui-server, the Claude backend and ui-react return them through
  inferred types, so their declaration emit needs the name (TS2742).

Refs #2534

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(ui-sdk): regenerate the api report after merging origin/main

The merge resolution kept main's report rows beside this PR's removals, which
restored five internal names this PR drops. bun run api-report is the source
of truth.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: apply the epic's unused-export gate to code merged from main

origin/main added Apify, untrusted-mark, turn-notice, module-discovery,
media-effect, chat-deletion and staging code after epic/2542-dead-code's
check-unused-exports gate (#3448) was written, so bun run lint failed on 38
names no other file imports: 36 exports and 2 re-exports. Drop the exports
and re-exports, and the PROXY_BULLET constant nothing reads. Main's new
turn-failure-notice-digest test imports prefixDigest, which the epic had made
file-local, so export it again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(ui-sdk): keep OutwardPlan re-exported for the Claude backend's declarations

Main's permission-hooks now infers OutwardPlan into createPermissionContext's
emitted declaration, so the declaration build needs the type reachable through
@schlessera/brain-ui-sdk/internal (TS2883). Without the re-export the
ui-backend-claude build fails; with it, the workspace build passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Brings main 401c66b (#3568, #3564, #3571, #3569, #3565) into the epic.

Conflict: packages/ui-sdk/src/internal.ts. #3413 dropped the unconsumed
type re-exports EgressProxyOptions, RestrictedEnvelope and
WorkerHostProbeOptions; main (#3563) added EgressRefusal to the same
line. Resolution keeps both: export type { EgressRecord, EgressRefusal }.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@schlessera
schlessera marked this pull request as ready for review November 4, 2026 20:36
@schlessera
schlessera merged commit 3ef7c51 into main Nov 4, 2026
54 of 55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: chore Tooling, CI, release plumbing, dependencies.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ui-sdk: 71 internal entry names have no consumer outside the package

1 participant