Repository navigation
Description
Part of #1345.
Context
Split from #1374 on 2026-10-24; the ruling below was made there.
@schlessera/brain-ui-sdk/server still re-exports pure geo functions and types from @schlessera/brain-geo as compatibility aliases. The re-exports live in packages/ui-sdk/src/server/coastline.ts:1-11 ("Compatibility exports: the shared geo package owns geometry and request I/O") and are published through packages/ui-sdk/src/server/index.ts:64-87: OSM_ATTRIBUTION, clipLine, closeAgainstViewport, closedRings, detailFor, fetchCoastline, prepare, prepareLand, signedArea, simplify, stitch, toleranceMetres and the types BBox, Coord, CoastlineConfig, CoastlineRequest, CoastlineResult, FetchLike, LandOptions, MapDetail. geoConfigSchema, GeoConfig and GeoConfigInput are re-exported the same way (index.ts:166-167).
Known first-party consumers of the aliases on a6b945b: packages/ui-kit/tests/geo-fixtures.test.ts:14 (signedArea) and the SDK's own packages/ui-sdk/tests/coastline.test.ts. Re-run the inventory before changing anything.
The SDK keeps genuine geo uses that are not aliases: protocol track types (packages/ui-sdk/src/protocol.ts:29) and reverse geocoding (packages/ui-sdk/src/server/reverse-geocode.ts:1-2). Those keep the @schlessera/brain-geo dependency.
Maintainer decision — geo A (2026-10-09, on #1374)
Remove the SDK geo compatibility re-exports; consumers import directly from the canonical public @schlessera/brain-geo entries (or its /server entry). This explicitly approves a breaking import migration, with exact old-to-new import documentation and API-report/contract updates, without deprecated SDK aliases. Geometry, request and result behaviour stays unchanged. Do not remove the SDK's geo dependency merely because the aliases disappear; helpers that are not pure aliases need separate ownership assessment.
Scope
- Inventory every name the SDK's public entries re-export from
@schlessera/brain-geoand classify each as a pure alias or not. - Delete
packages/ui-sdk/src/server/coastline.tsand the pure-alias re-exports frompackages/ui-sdk/src/server/index.ts(and any equivalent in other SDK public entries). - Migrate every first-party consumer (source, tests, docs, website examples) to the canonical geo entry. Move or delete
packages/ui-sdk/tests/coastline.test.tsso the behaviour stays covered inpackages/geo/tests. - Write the migration table (old SDK import → new geo import) in the integration contract's migration notes and the changeset.
Out of scope
- Any change to geo behaviour, geometry, requests or results.
- The SDK's remaining genuine geo uses (protocol track types, reverse geocoding) and its dependency on
@schlessera/brain-geo. - Web-search (backends: pi owns its web-search configuration helpers behind a public Settings adapter #1374), link policy (ui-sdk: import link policy from render-template directly and drop the ui-kit dependency #2771).
Acceptance criteria
-
packages/ui-sdk/src/server/coastline.tsdoes not exist, andgit grep -n 'from "@schlessera/brain-geo' -- packages/ui-sdk/srcshows only non-alias uses. -
api-report/ui-sdk.txtno longer lists the removed names;api-report/geo.txtis unchanged. - No first-party file imports a removed name from
@schlessera/brain-ui-sdk/server;bun run typecheckpasses. - Coastline/land behaviour remains covered by geo's own tests, which pass unchanged.
- The changeset and the integration contract list every removed import with its replacement.
Verification
git grep -n 'from "@schlessera/brain-geo' -- packages/ui-sdk/src
bun run test packages/geo packages/ui-sdk packages/ui-kit/tests/geo-fixtures.test.ts
bun run api-report
bun run typecheckContract impact
Breaking, approved by the 2026-10-09 ruling: contract and breaking labels, CONTRACT: commit, same-commit integration-contract and API-report update, and a changeset naming every removed SDK import. Before 1.0.0 that changeset is a minor, not a major (maintainer, 2026-10-24).
2026-10-24: filed from #1374's split.
Activity