feat: libs 0005 — standalone sends the project header on lib requests (project-scoped server-side resolution); bump pcbjam-shared

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Gergő Törcsvári 2026-06-13 17:16:40 +02:00
commit f04915ee1d
No known key found for this signature in database
GPG key ID: 8E75F2CDE64E5322
4 changed files with 20 additions and 14 deletions

View file

@ -69,14 +69,14 @@ export function libsOwner(): string {
return import.meta.env.VITE_LIBS_OWNER ?? "local-user";
}
export function libsSourceConfig(): LibsSource | null {
export function libsSourceConfig(projectId?: string): LibsSource | null {
const kind = import.meta.env.VITE_LIBS_SOURCE ?? "remote";
const base =
kind === "off"
? null
: kind === "static"
? staticLibsSource()
: remoteLibsSource(API_BASE_URL, libsOwner());
: remoteLibsSource(API_BASE_URL, libsOwner(), projectId);
// 0004-A spike: `?libwrite=1` adds one in-memory writable user lib so the
// editor save path works with no backend (a dev/test aid). The real remote