Repository navigation
@thoremin/sdk: the pure extension SDK as a workspace package (ADR follow-up c, part 1) - #298
Merged
Merged
Conversation
…low-up c, part 1) packages/sdk holds what an extension's pure side imports, closed over what those modules import: 38 files moved by git mv, 363 specifiers rewritten mechanically (@thoremin/sdk/<path> from outside, relative inside). The manifest and branch types, the trunk's names (split into instruments/trunk.ts so wiring to the trunk no longer pulls node implementations into the SDK), the port kinds, and the music / trainer / feature / drum libraries the air extension shares with core. - the boundary guard drops the pure half of SDK_SURFACE: packages_purity enforces the package, and an extension's pure side imports only packages - tsconfig includes, CLAUDE.md paths and comment paths follow the move - the deploy is unchanged (npm ci && npm run build at the root links the workspace)
…ore machinery back in the app - drum patterns, GM drums, pattern fit/play, note names and fingering charts move from the SDK into src/extensions/air/lib (no core consumer once the store stops naming air state) - TransientPort carries its value type (transientPort<T>()); the hot store's transient fields and setTransient are typed from the manifests like the dials, and the per-field air setters are gone - the flute and guitar starter sequences move to the extension (starterSequences.ts); core's sequence store keeps the collection and starterSequence() - the branch derivation and the Feature Lab config stay in the app; Extension.derive takes the settings opaquely - stale comment paths follow the moves
thorwhalen
force-pushed
the
adr/sdk-package
branch
from
October 5, 2026 17:01
567279b to
54e9375
Compare
This was referenced Oct 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.
Follow-up (c), part 1 of the instruments-as-graphs ADR (#268): the pure half of the extension SDK becomes a workspace package,
@thoremin/sdk. It is the base the next two PRs build on:@thoremin/sdk-ui(the app half, host-injected), then@thoremin/ext-air.What moved
38 files moved with
git mvintopackages/sdk/src/<same path>. That set is what the air extension's pure side imports, closed over its own imports. 363 specifiers were rewritten mechanically:@thoremin/sdk/<path>from outside the package, relative inside it.instruments/{extension,branch,trunk,derive}.TRUNK/TRUNK_IDare split out of the branch table intoinstruments/trunk.ts, so wiring to the trunk no longer pulls the trunk's node implementations (score, pose chord, indirect map) into the SDK.nodes/domain,nodes/music/drum_{pads,anchor}music/{theory,sounds,notes,fingerings,drum_patterns,gm_drums},enroll/*(the trainer's pure core),features/{catalog,demand,labConfig,types,...},drums/*,score/schemaThe air extension is these libraries' second consumer, which is the rule that made
ictusa package (ADR §4.4).Guards
test/packages_purity.test.tsnow covers@thoremin/sdk(no@/import, only declared dependencies).SDK_SURFACE: an extension's pure side may import only packages. The SDK→settings cycle walker is replaced by the package boundary.Verified
npm run typecheck,npm test(217 files / 2438 tests),npm run build,npm run test:core(2350 passed / 68 skipped, bundle check clean) are all green.npm ci && npm run buildat the root links the new workspace (the lockfile gains the link entry only).Refs #268.