feat(client): native (Node/CJS) targets + public write_audio sender#269
Open
ryanontheinside wants to merge 1 commit into
Open
feat(client): native (Node/CJS) targets + public write_audio sender#269ryanontheinside wants to merge 1 commit into
ryanontheinside wants to merge 1 commit into
Conversation
Enabling work for the M4L bridge and VST adopting @demon/client as the single wire-contract source of truth (follow-up to PR #267, reviewed separately so #267 stays scoped). - sendWriteAudio: public sender for the write_audio command (the input primitive behind every M4L feed mode + the VST live splice). Field set (at_s/mix/repeat/source_epoch/refresh_timbre) derived from the registry in protocol.py; dropIfBusy is the client-side backpressure gate. - audio_written / audio_write_failed: dispatch these registered events (they were falling through to the generic json event), completing the write_audio ack surface. - sliceEpoch getter: expose the source-generation counter consumers need to tag local buffers and pin write_audio sends. - WebSocketConstructor option: inject a WebSocket impl (the bridge passes `ws`); resolve the OPEN ready-state constant from it so the senders never read a global WebSocket (Node-for-Max has none reliably). - node.ts + CJS build target: a single self-contained dist/ demon-client.node.cjs (fzstd inlined, no browser-audio code) for require()-based hosts. Browser bundle (dist/demon-client.js) regenerated. Additive surface; web app tsc and the SDK boundary/wire-contract guards pass.
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.
What
Enabling work in
@demon/clientso the native hosts (the Max for Live bridge now; the VST next) can adopt the SDK as the single wire-contract source of truth, killing the hand-reimplemented protocol copies.sendWriteAudio— public sender for thewrite_audiocommand (the input primitive behind every M4L feed mode and the VST live splice). Field set (at_s/mix/repeat/source_epoch/refresh_timbre) derived from the registry inprotocol.py;dropIfBusyis the client-side backpressure gate.audio_written/audio_write_failed— dispatch these registered events instead of letting them fall through to the genericjsonevent; completes thewrite_audioack surface.get sliceEpoch()— expose the source-generation counter consumers need to tag local buffers and pinwrite_audiosends.WebSocketConstructoroption — inject a WebSocket impl (the bridge passesws); theOPENready-state constant is resolved from it so the senders never read a globalWebSocket(Node-for-Max has none reliably).node.ts+ CJS build target — a single self-containeddist/demon-client.node.cjs(fzstd inlined, no browser-audio code) forrequire()-based hosts. Browserdist/demon-client.jsregenerated.Scope / dependency
refactor/client-sdk-config). Reviewed separately so refactor(client/config): portable config.json via @demon/client #267 stays scoped; merge after refactor(client/config): portable config.json via @demon/client #267.daydreamlive/rtmg-vst(which vendors this branch'sdist/demon-client.node.cjs).Verification
Additive surface. Web app
tsc --noEmitpasses; SDK boundary guard + wire-contract drift guard pass (18/18). The new senders/events/WS-injection are exercised end-to-end by the bridge's mock-server suite in the dependent PR (25/25).