Skip to content

fix lk agent dev with Agents-JS#900

Merged
davidzhao merged 2 commits into
mainfrom
dz/fix-node-dev
Jul 10, 2026
Merged

fix lk agent dev with Agents-JS#900
davidzhao merged 2 commits into
mainfrom
dz/fix-node-dev

Conversation

@davidzhao

Copy link
Copy Markdown
Member

JS agents will also support the OnServerStart protocol

JS agents will also support the OnServerStart protocol
* remove dead nil checks on devSrv, now created unconditionally

Also normalizes an em dash in a nearby comment.

* move interpreter-based SDK version resolution to pkg/agentfs

Pure relocation, no behavior change: the Python/Node binary finders and
installed-version probes (plus the embedded node_resolve_version.js)
move from cmd/lk into pkg/agentfs as exported functions, with
agentfs.ResolveInstalledSDKVersion as the shared entry point, so
callers outside the startup checks can reuse the resolver.

* pick the dev-channel flag from the installed SDK version

An SDK must not be handed a flag it predates: Node's CLI hard-fails on
unknown options, so every released @livekit/agents (<= 1.5.0) dies at
startup when passed --cli-addr. Resolve the installed agents version
via the project's own runtime and choose accordingly — --cli-addr when
positively at/above the first supporting release (1.6.6 Python, 1.5.1
Node, placeholders until those releases exist), otherwise the legacy
--reload-addr for Python and no flag at all for Node. Undetermined
versions always take the safe branch.

* remove agent_watcher_test.go

* pre-warm node in TestAgentProcessFailSignal to avoid probe timeout

On Windows CI runners the first node.exe spawn can take several seconds
(Defender scans the binary on first exec), which blows the SDK version
probe's 5s timeout inside startAgent — the test then fails with
'@livekit/agents not found' at exactly 5.04s before the crash-signal
behavior under test ever runs (same flake seen on main). Spawn a
throwaway Node process first to absorb the cold start.
@davidzhao davidzhao merged commit de2017e into main Jul 10, 2026
22 checks passed
@davidzhao davidzhao deleted the dz/fix-node-dev branch July 10, 2026 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants