[#1357] codev-sdk: controller subpath re-exports overview wire types; codev-types becomes a regular (type-only) dependency - #1358
Merged
Conversation
…v-types becomes a regular (type-only) dependency - @cluesmith/codev-sdk/controller re-exports OverviewData, OverviewBuilder, OverviewPR, OverviewBacklogItem type-only from @cluesmith/codev-types, so integrations (first consumer: the streamdeck plugin migrating under #1347) get the client and the contract from a single import. - @cluesmith/codev-sdk/tower-client also carries OverviewData, since getOverview returns it. - @cluesmith/codev-types moves devDependencies -> dependencies: published .d.ts files reference it, so a fresh npm consumer's tsc needs it installed. Type-only, erased at build - zero runtime deps stays true. - import-boundary test extended: value re-exports of codev-types are now a violation (whole-statement export type form required - the mixed 'export { type X } from' form still emits a runtime re-export); the dependencies assertion restated as exactly ['@cluesmith/codev-types'] with the intent documented; new pin test asserts the controller subpath re-exports the four overview types via export type.
Collaborator
Author
Architect ReviewAPPROVE (pr gate; merge awaits Amr's authorization per current workspace policy). Verified in the diff:
On consultation: none was run, and per the AIR protocol as written ('Optional — builder decides') that is the builder's documented discretion, correctly exercised for a change this size. The contradiction between that clause and CLAUDE.md's characterization (which I wrongly enforced against air-1352) is now tracked as #1359 — this PR proceeds under the protocol's actual text. Architect review |
amrmelsayed
added a commit
that referenced
this pull request
Aug 5, 2026
amrmelsayed
added a commit
that referenced
this pull request
Aug 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1357. Unblocks #1347's import-boundary acceptance criterion (plugin imports only sdk subpaths +
@elgato/streamdeck).Summary
Two small changes to
@cluesmith/codev-sdk, per the issue and the architect's scope guidance:Overview wire types ship with the client.
./controllernow re-exportsOverviewData,OverviewBuilder,OverviewPR, andOverviewBacklogItemtype-only from@cluesmith/codev-types— a controller READS overview state, andTowerClient.getOverviewreturnsOverviewData, so the contract belongs on the subpath (matching the old@cluesmith/codev-clientsingle-import stance)../tower-clientadditionally carriesOverviewDatafor consumers importing the client directly.Packaging fix for npm consumers.
@cluesmith/codev-typesmoves fromdevDependenciestodependencies. The sdk's published.d.tsfiles reference it (import type ... from '@cluesmith/codev-types'intower-client.d.ts), so a fresh npm consumer runningtsccould not resolve it while it stayed a devDependency. codev-types is published (3.2.4 on npm) and types-only, so this would have bitten at the sdk's first npm publish and in Migrate the Stream Deck plugin into the monorepo as apps/streamdeck, consuming @cluesmith/codev-sdk #1347's published-SDK canary.Key decisions
export type { ... } from(whole-statement form), pinned by test. The mixedexport { type X } from '...'form is NOT equivalent — it still emits a runtime re-export statement (export {} from '...'), which would load codev-types at runtime. The import-boundary test now has a UNIVERSAL rule forbidding non-export typere-exports of codev-types, mirroring the existingimport typerule, plus a pin test asserting the controller subpath re-exports all four overview types in the erased form.dependenciesassertion previously required an empty field; its intent was always zero RUNTIME dependencies. It now assertsdependenciesis exactly['@cluesmith/codev-types'], with a doc comment explaining the one allowed entry exists only so published.d.tsfiles typecheck — the source rules guarantee it is erased at build and never loaded at runtime. Verified against the emitted output:dist/controller.jsanddist/tower-client.jscontain no codev-types reference; only the.d.tsfiles do.pnpm install, workspace resolution unchanged).Test plan
packages/sdk/src/__tests__/import-boundary.test.ts(new re-export rule, restated dependencies assertion, new controller pin test).pnpm --filter @cluesmith/codev-sdk build— clean; emit inspection confirms type re-exports are erased from JS and present in.d.ts.pnpm --filter @cluesmith/codev-sdk test— 6 files, 73 tests passed.porch check— build + tests green.