Add Springboard docs CLI and jamapp support infrastructure#71
Add Springboard docs CLI and jamapp support infrastructure#71mickmister wants to merge 23 commits into
Conversation
Export the midi_files_module so it can be imported directly for its module augmentation, fixing TypeScript type resolution issues when importing as a side-effect. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Instead of using @platform directives with dynamic imports inside the main io_module.tsx file, extract the platform-specific dependency creation into separate files: - io_dependencies.ts - default/test implementation - io_dependencies.browser.ts - browser-specific imports - io_dependencies.node.ts - node-specific imports This allows Vite to properly tree-shake the platform-specific code during bundling, preventing Node.js modules (child_process, easymidi) from being included in browser builds. The @platform directive now works at the import level, which is processed before Vite's bundling phase, fixing the issue where browser builds tried to bundle Node-only dependencies. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Refactored to use Vite's export conditions instead of @platform directives: - Created io_dependencies_types.ts - types-only file with no implementation imports - Updated io_dependencies.ts/.browser.ts/.node.ts to import types from types file - Removed all @platform directives from io_module.tsx - Added conditional export in package.json with node/browser/default conditions Now the bundler (Vite/webpack) will automatically resolve: - ./io_dependencies.browser.js when building for browser (avoids Node modules) - ./io_dependencies.node.js when building for Node - ./io_dependencies.js as fallback for tests This ensures Node.js dependencies (child_process, easymidi) are never analyzed or bundled in browser builds, fixing the build error. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Changed setIoDependencyCreator to use object wrapper pattern instead of directly reassigning imported function. This fixes esbuild error during Vite's dependency optimization phase: "Cannot assign to import 'createIoDependencies'" The function is only used in tests to override platform-specific implementations, but esbuild statically analyzes the code and rejects the illegal assignment even though it's never called in dev mode. Solution: Wrap createIoDependencies in ioDepsConfig object, allowing property mutation (legal in ES modules) instead of binding reassignment (illegal in ES modules). Also includes verdaccio setup improvements and .npmrc for local registry. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Change from direct named import to default import with type import to avoid ES module compatibility issues. Extract MidiClass from the default export and use it for instantiation. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…t and configurable port` in `76d916a`. I left [`apps/vite-test/src/tic_tac_toe.tsx`](/var/tmp/vibe-kanban/worktrees/8100-fix-vite-dev-nod/springboard/apps/vite-test/src/tic_tac_toe.tsx) unstaged, since it was modified but not included in your list.
…es` in `6a8c1c4`. I left the untracked `.springboard/` directory out of the commit, as requested by your file list.
|
Claude finished @mickmister's task —— View job PR Review Progress
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 48723f5210
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| import {MidiService, QwertyService} from '@jamtools/core/types/io_types'; | ||
| import type {IoDeps, CreateIoDependencies} from './io_dependencies_types'; | ||
| import {createIoDependencies as defaultCreateIoDependencies} from './io_dependencies'; |
There was a problem hiding this comment.
Restore platform-specific IO dependency loading
IoModule now imports createIoDependencies from ./io_dependencies, but that file is the test fallback that always returns MockQwertyService/MockMidiService. Because this is a relative import, Node/browser conditional exports are not applied, so production builds will never instantiate the real browser/node IO services unless tests manually override the creator.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Because this is a relative import, Node/browser conditional exports are not applied
@codex Are you sure this is true?
| @@ -0,0 +1,2 @@ | |||
| registry=http://localhost:4873/ | |||
There was a problem hiding this comment.
Remove localhost registry override from repo config
Committing a root .npmrc with registry=http://localhost:4873/ forces all package installs/publishes in this repo to use a local Verdaccio instance. In normal developer/CI environments where Verdaccio is not running, dependency resolution will fail outright, making the repository unusable without extra local setup.
Useful? React with 👍 / 👎.
| "import": "./dist/modules/midi_files/midi_files_module.js" | ||
| }, | ||
| "./modules/io/io_dependencies": { | ||
| "types": "./dist/modules/io/io_dependencies_types.d.ts", |
There was a problem hiding this comment.
Export io_dependencies types from declaration with value
The ./modules/io/io_dependencies export maps types to io_dependencies_types.d.ts, which defines only type aliases and does not declare the createIoDependencies value export that the runtime files provide. TypeScript consumers importing createIoDependencies from this subpath will get missing-export type errors even though the JS export exists.
Useful? React with 👍 / 👎.
| console.log('Starting production server...'); | ||
|
|
There was a problem hiding this comment.
Implement
sb start server launch instead of no-op
The start command now only logs a message and exits without launching any server process. Since the command description still says it starts the production server, users invoking sb start will get a successful-looking no-op and no running application.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 48723f5210
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| import {MidiService, QwertyService} from '@jamtools/core/types/io_types'; | ||
| import type {IoDeps, CreateIoDependencies} from './io_dependencies_types'; | ||
| import {createIoDependencies as defaultCreateIoDependencies} from './io_dependencies'; |
There was a problem hiding this comment.
Route IO dependency import through package exports
Because io_module.tsx imports ./io_dependencies via a relative specifier, the resolver never consults the package.json conditional exports you added for ./modules/io/io_dependencies. As a result, browser and node runtimes both load io_dependencies.ts (the mock implementation) instead of the .browser/.node variants, so real MIDI/QWERTY services are never initialized unless tests manually override the creator.
Useful? React with 👍 / 👎.
| registry=http://localhost:4873/ | ||
| //localhost:4873/:_authToken=fake No newline at end of file |
There was a problem hiding this comment.
Remove hardcoded localhost registry from root npmrc
This root .npmrc forces registry=http://localhost:4873/ for the entire repo, which makes installs and publishes depend on a locally running Verdaccio instance. In CI or any developer environment without that service, package resolution will fail against localhost and standard dependency workflows break by default.
Useful? React with 👍 / 👎.
Deploying jamtools-docs-new with
|
| Latest commit: |
32c43a1
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://82de325b.jamtools-docs-new.pages.dev |
| Branch Preview URL: | https://vk-e1e4-copy-jamtools-fe.jamtools-docs-new.pages.dev |
…py-jamtools-fe # Conflicts: # packages/springboard/vite-plugin/src/plugins/dev.ts

Summary
This PR prepares Springboard and JamTools Core to support the new standalone
jamappworkflow by adding bundled Springboard documentation tooling, improving generated app guidance, exposing browser/session APIs, and making JamTools IO dependencies platform-aware.What changed
sb docscommand to the Springboard CLI with:sb docs contextfor AI-agent-oriented framework contextsb docs list/sb docs getfor section discovery and retrievalsb docs typesfor core TypeScript reference outputsb docs examples list/showfor bundled example modulescreate-springboard-appto generateAGENTS.mdandCLAUDE.mdwith instructions to runsb docs contextbefore development.springboardpackage by adding thesbbin entry, includingcli/distin published files, and updating the package build flow to build the CLI alongside the core package and Vite plugin.BrowserSessionKVStoreServicestorage.sessioncore dependencyStatesAPI.createLocalSessionState(...)useModule(...)React hook for component-level module access.@jamtools/core.PORTin generated node entrypointsWhy
The task context is to move the app currently represented by
packages/jamtools/featuresinto a newjamapprepository created withcreate-springboard-app. To make that practical, Springboard needs to ship enough framework docs and examples for agents/developers working in the generated app, publish the CLI/docs with the package, and expose the runtime APIs that the copied JamTools feature modules need when consumed from a separate application.Important implementation details
sbbinary for framework context without relying on external documentation services.AGENTS.mdandCLAUDE.md, pointing contributors to thesb docsworkflow.sessionStorage-backed implementation, whilecreateLocalSessionStatefalls back to user-agent storage when session storage is unavailable.sbbinary and docs assets.