build: declare workspace dependencies and check them in CI (P0.2)

Packages relied on npm hoisting for imports they never declared, so a
package installed on its own fails (UF-024).

- server: + @waggle/marketplace, @waggle/sdk, @waggle/weaver, zod (MIT),
  @anthropic-ai/sdk (MIT), @ax-llm/ax (Apache-2.0);
  - @waggle/hive-mind-shim-core and stripe (unused)
- agent: + pdf-parse (Apache-2.0); playwright-core (Apache-2.0) as an
  optional peer, since it is loaded only when available
- worker: + @waggle/waggle-dance; web: + @waggle/shared
- launcher: + @waggle/server as a dev dependency (bundled by tsup);
  - stripe; cli: - @waggle/weaver (unused); root: - stripe

scripts/check-workspace-deps.mjs (npm run check:deps) compares the
imports in each community-edition package's src/ with its manifest and
runs in CI. Two imports wait for P1.4 (optimizer, evolution wiring).
This commit is contained in:
shumeiko.it
2026-10-15 19:31:50 +02:00
parent fe2eb0f648
commit d2b6506f8b
12 changed files with 179 additions and 11 deletions

View File

@@ -26,6 +26,7 @@
"dev:www": "npm run dev -w apps/www",
"build:www": "npm run build -w apps/www",
"lint": "eslint .",
"check:deps": "node scripts/check-workspace-deps.mjs",
"lint:no-invalid-snapshots": "node scripts/check-no-invalid-snapshots.mjs",
"ux:contrast": "node scripts/ux-gates/contrast-tokens.mjs",
"ux:color-guard": "node scripts/ux-gates/text-color-guard.mjs",
@@ -103,7 +104,6 @@
"@tauri-apps/plugin-shell": "^2.3.5",
"@vitejs/plugin-react": "5.1.1",
"sharp": "0.35.3",
"stripe": "^21.0.1",
"tailwind-merge": "^3.5.0"
},
"//optionalDependencies": "Platform-specific native binaries — optional so npm SKIPS them on os/cpu mismatch (Linux/macOS CI) instead of failing install with EBADPLATFORM. See docs/audits/2026-06-01-full-repo-verification-sweep.md.",