Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.
C aiderastclaude-codecode-analysiscode-intelligencecodexcursorcypherdeveloper-toolsgemini-cligraph-visualizationkilocodeknowledge-graphmcpmcp-servermodel-context-protocolopencodesqlitetree-sitterwindsurf
Extend the notices bundle to the UI dependencies and the Glama image
Martin Vogelf714bf3de144
diff --git a/THIRD_PARTY.md b/THIRD_PARTY.mdindex 63ca40cf6..d36310fa4 100644--- a/THIRD_PARTY.md+++ b/THIRD_PARTY.md@@ -118,4 +118,7 @@ Release binaries built with `--with-ui` embed the compiled `graph-ui/`frontend bundle. Its npm dependencies (React, three.js, @react-three/*,radix-ui, lucide-react, tailwindcss, and friends) are all under permissivelicenses (MIT / ISC / Apache-2.0 / Zlib); the exact set is recorded in-`graph-ui/package.json` and `graph-ui/package-lock.json`.+`graph-ui/package.json` and `graph-ui/package-lock.json`, and the per-package+license texts of the production bundle are appended to the+`THIRD_PARTY_NOTICES.md` shipped inside the `-ui` release archives+(generated by `scripts/gen-ui-licenses.py`).diff --git a/pkg/glama/Dockerfile b/pkg/glama/Dockerfileindex 653537dce..2b06f7f58 100644--- a/pkg/glama/Dockerfile+++ b/pkg/glama/Dockerfile@@ -15,11 +15,12 @@ ARG TARGETARCHRUN apt-get update \&& apt-get install -y --no-install-recommends curl ca-certificates \&& curl -fsSL "https://github.com/DeusData/codebase-memory-mcp/releases/latest/download/codebase-memory-mcp-linux-${TARGETARCH}-portable.tar.gz" \- | tar -xz -C /tmp codebase-memory-mcp \+ | tar -xz -C /tmp codebase-memory-mcp LICENSE THIRD_PARTY_NOTICES.md \&& chmod +x /tmp/codebase-memory-mcp \&& rm -rf /var/lib/apt/lists/*FROM debian:bookworm-slimCOPY --from=fetch /tmp/codebase-memory-mcp /usr/local/bin/codebase-memory-mcp+COPY --from=fetch /tmp/LICENSE /tmp/THIRD_PARTY_NOTICES.md /usr/share/doc/codebase-memory-mcp/ENV CBM_CACHE_DIR=/tmp/cbmENTRYPOINT ["codebase-memory-mcp"]diff --git a/scripts/gen-third-party-notices.sh b/scripts/gen-third-party-notices.shindex ffdae69c0..08741c686 100755--- a/scripts/gen-third-party-notices.sh+++ b/scripts/gen-third-party-notices.sh@@ -41,6 +41,16 @@ mkdir -p "$(dirname "$OUT")"echocat "$f"done++ # With-ui packaging path: node_modules exists (make frontend ran npm ci),+ # so append the license texts of the npm packages compiled into the UI+ # bundle. Standard binaries carry no bundle — the section is skipped.+ if [ -d "$ROOT/graph-ui/node_modules" ]; then+ echo+ echo "---"+ echo+ python3 "$ROOT/scripts/gen-ui-licenses.py" "$ROOT/graph-ui"+ fi} > "$OUT"BYTES=$(wc -c < "$OUT" | tr -d ' ')diff --git a/scripts/gen-ui-licenses.py b/scripts/gen-ui-licenses.pynew file mode 100755index 000000000..cf62a1a0b--- /dev/null+++ b/scripts/gen-ui-licenses.py@@ -0,0 +1,111 @@+#!/usr/bin/env python3+"""Emit a markdown license appendix for the embedded graph-UI bundle.++Usage: gen-ui-licenses.py <graph-ui-dir>++Walks the PRODUCTION dependency tree (npm ls --omit=dev) — the packages+whose code is compiled into the UI bundle — and prints, for each unique+package, its declared license and the verbatim license file text found in+node_modules. Build-time tooling (vite, tailwind, lightningcss, ...) is+excluded: its code does not ship in the bundle.++Called by gen-third-party-notices.sh when node_modules is present (the+with-ui packaging path). Output is deterministic (sorted by name@version).+"""+import json+import os+import subprocess+import sys+++def collect(ui_dir, dep_tree, out, excluded):+ for name, info in (dep_tree or {}).items():+ version = info.get("version")+ if not version:+ continue # unmet optional peer — not installed, nothing shipped+ pkg_dir = os.path.join(ui_dir, "node_modules", *name.split("/"))+ try:+ with open(os.path.join(pkg_dir, "package.json"), encoding="utf-8") as fh:+ meta = json.load(fh)+ except (OSError, ValueError):+ continue # not physically installed — nothing shipped+ # Platform-restricted packages (os/cpu fields) are native build+ # tooling (esbuild/rollup/lightningcss/oxide binaries). They cannot+ # be part of a browser bundle — exclude them and do not recurse into+ # their dependency subtrees (wasm runtime shims etc.).+ if meta.get("os") or meta.get("cpu"):+ excluded.add((name, version))+ continue+ out.add((name, version))+ collect(ui_dir, info.get("dependencies"), out, excluded)+++def license_text(pkg_dir):+ if not os.path.isdir(pkg_dir):+ return None+ for fname in sorted(os.listdir(pkg_dir)):+ if fname.upper().startswith(("LICENSE", "LICENCE", "COPYING", "NOTICE")):+ try:+ with open(os.path.join(pkg_dir, fname), encoding="utf-8", errors="replace") as fh:+ return fh.read().strip()+ except OSError:+ continue+ return None+++def declared_license(pkg_dir):+ try:+ with open(os.path.join(pkg_dir, "package.json"), encoding="utf-8") as fh:+ d = json.load(fh)+ except (OSError, ValueError):+ return "UNKNOWN"+ lic = d.get("license", "UNKNOWN")+ if isinstance(lic, dict):+ lic = lic.get("type", "UNKNOWN")+ return str(lic)+++def main():+ ui_dir = sys.argv[1]+ ls = subprocess.run(+ ["npm", "ls", "--omit=dev", "--all", "--json"],+ cwd=ui_dir, capture_output=True, text=True, check=False,+ )+ tree = json.loads(ls.stdout or "{}")+ pkgs = set()+ excluded = set()+ collect(ui_dir, tree.get("dependencies"), pkgs, excluded)++ print("## Embedded Graph UI — bundled npm packages")+ print()+ print("The `-ui` binaries embed a compiled frontend bundle. The packages")+ print("below are its production dependency tree; their license texts are")+ print("reproduced verbatim from the packages as installed at build time.")+ print()++ for name, version in sorted(pkgs):+ pkg_dir = os.path.join(ui_dir, "node_modules", *name.split("/"))+ lic = declared_license(pkg_dir)+ text = license_text(pkg_dir)+ print(f"### {name}@{version} — {lic}")+ print()+ if text:+ print(text)+ else:+ print(f"(no license file shipped in the package; declared license: {lic})")+ print()++ if excluded:+ print("### Platform-specific build tooling (not part of the bundle)")+ print()+ print("Resolved in the dependency tree but excluded above: these are")+ print("native per-platform build binaries whose code does not ship in")+ print("the browser bundle.")+ print()+ for name, version in sorted(excluded):+ print(f"- {name}@{version}")+ print()+++if __name__ == "__main__":+ main()diff --git a/tests/test_ts_lsp.c b/tests/test_ts_lsp.cindex c7fefd831..cc150cc3e 100644--- a/tests/test_ts_lsp.c+++ b/tests/test_ts_lsp.c@@ -3028,7 +3028,7 @@ TEST(tslsp_real_router_chain) {PASS();}-TEST(tslsp_real_mongoose_model) {+TEST(tslsp_real_odm_model) {CBMFileResult *r = extract_ts("interface Model<T> {\n"" create(doc: Partial<T>): Promise<T>;\n"" find(filter: Partial<T>): Promise<T[]>;\n"@@ -4208,7 +4208,7 @@ SUITE(ts_lsp) {RUN_TEST(tslsp_real_zustand_store);RUN_TEST(tslsp_real_typeorm_repo);RUN_TEST(tslsp_real_router_chain);- RUN_TEST(tslsp_real_mongoose_model);+ RUN_TEST(tslsp_real_odm_model);/* More patterns */RUN_TEST(tslsp_iterator_for_of_with_generic);