Repository navigation
Conversation
…_STREAM_URI `initClient()` reads LD_BASE_URI / LD_STREAM_URI for the base SDK, but FDv2SkillStore defaulted to the production hosts. A process pointed at catfood, staging or a private instance by its environment resolved flags there and sent skill delivery to production with a non-production key, which surfaces as a fatal 401 in `store.failed` rather than as a configuration error. With neither URI option given, the constructor now reads both variables in their place, once. They follow the store's own rule (a lone base URI moves both endpoints), blank counts as unset, an option given turns the environment off for both, and a refused value names the variable. SKILLS_DEFAULT_BASE_URI / SKILLS_DEFAULT_STREAM_URI keep the production values as the fallback. Spec: TESTING.md §3.25 and A.12 in launchdarkly/ai-sdks-monorepo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…int docs The new doc lines on FDv2SkillStoreOptions shift the Requester forgotten-export reference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Merged main in and regenerated |
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.
initClient()readsLD_BASE_URI/LD_STREAM_URIfor the base SDK, butFDv2SkillStorealways defaulted to the production hosts. A process pointed at catfood, staging or a private instance by its environment resolved flags there, then sent skill delivery to production with a non-production key. That shows up as a fatal 401 instore.failed, not as a configuration error.With neither URI option given, the constructor now reads both variables in their place, once:
LD_BASE_URImoves both endpoints, under the store's existing rule for a lonebaseUri. This differs on purpose frominitClient(), where flag streaming stays on its default host.httpsvalue is reported under the variable's name.SKILLS_DEFAULT_BASE_URI/SKILLS_DEFAULT_STREAM_URIkeep the production values as the fallback.The client README and agents.md are updated.
Spec: TESTING.md §3.25 and A.12, in launchdarkly/ai-sdks-monorepo#59.
Tests: new cases in the
endpointsblock ofskills-fdv2.test.ts. That block now clears both variables around each test, so a developer shell can't move the default-host assertions. The 371 FDv2 tests pass.CI on
mainis already red:makeGraphTrackData, added in #101, is missing from the root-export snapshot inpackages/client/src/__tests__/skills.test.ts. That failure shows up here too, and is being fixed separately.Found while dogfooding AgentControl (Queenbee) on staging.
🤖 Generated with Claude Code
Note
Overview
FDv2SkillStorenow honors the same host overrides asinitClient()when you do not passbaseUriorstreamUri. Staging or private deployments that only setLD_BASE_URI/LD_STREAM_URIpreviously evaluated flags against the right instance but pulled skills from production (often surfacing as a fatal 401 instead of a config error).With no URI options, the constructor reads
LD_BASE_URIandLD_STREAM_URIonce at construction (blank values count as unset). A loneLD_BASE_URIdrives both poll and stream, matching the store’s lone-baseUrirule—unlikeinitClient(), where streaming stays on the default host unlessLD_STREAM_URIis set. Passing either URI option disables env for both endpoints so explicit and env hosts are never mixed. Invalid non-HTTPS values fail with errors that name the env variable.Docs (README, agents.md) and endpoint tests (including isolating env in the test block) cover the new behavior.
Reviewed by Cursor Bugbot for commit c586bbe. Bugbot is set up for automated code reviews on this repo. Configure here.