Skip to content

Commit 7b168f4

Browse files
committed
chore(calm-suite): suite build wiring (Makefile, CI build order, lockfile)
Add a Makefile to launch the suite apps, build @finos/calm-models before CALMGuard in CI, and update the root lockfile for the new Studio/Guard dependencies. Signed-off-by: Eddie Knight <knight@linux.com>
1 parent f4c237a commit 7b168f4

3 files changed

Lines changed: 70 additions & 1 deletion

File tree

.github/workflows/build-calm-guard.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ jobs:
4141
- name: Install dependencies
4242
run: npm ci
4343

44+
# @finos/calm-models is a typed dependency of CALMGuard's conformance
45+
# check (src/lib/calm/conformance.ts). It ships from dist/ and has no
46+
# prepare script, so it must be built before typecheck/lint resolve it.
47+
- name: Build @finos/calm-models
48+
run: npm run build --workspace=@finos/calm-models
49+
4450
- name: Lint
4551
run: npm run lint --workspace=calmguard
4652

@@ -88,5 +94,10 @@ jobs:
8894
- name: Install dependencies
8995
run: npm ci
9096

97+
# next build type-checks, and conformance.ts imports @finos/calm-models
98+
# types — build it first (ships from dist/, no prepare script).
99+
- name: Build @finos/calm-models
100+
run: npm run build --workspace=@finos/calm-models
101+
91102
- name: Build
92103
run: npm run build --workspace=calmguard

calm-suite/Makefile

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# calm-suite dev launcher
2+
#
3+
# The calm-suite products are root npm workspaces, so every target runs from the
4+
# repo root (one level up). Requires Node 22 (`nvm use` at the repo root).
5+
#
6+
# Usage: `make -C calm-suite <target>` (or `cd calm-suite && make <target>`)
7+
8+
ROOT := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))/..)
9+
NPM := cd $(ROOT) && npm
10+
11+
# Built entrypoint for the CalmStudio MCP server (bin: calmstudio-mcp)
12+
MCP_BIN := $(ROOT)/calm-suite/calm-studio/packages/mcp-server/dist/index.js
13+
14+
.DEFAULT_GOAL := help
15+
.PHONY: help install guard guard-docs studio studio-desktop studio-deps build-guard build-studio test mcp-build mcp claude-mcp
16+
17+
help: ## List available targets
18+
@grep -hE '^[a-z0-9-]+:.*?## ' $(MAKEFILE_LIST) \
19+
| awk 'BEGIN{FS=":.*?## "}{printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}'
20+
21+
install: ## Install all workspaces from the lockfile (npm ci, repo root)
22+
$(NPM) ci
23+
24+
guard: ## Run CALMGuard (Next.js) dev server
25+
$(NPM) run dev --workspace=calmguard
26+
27+
guard-docs: ## Run CALMGuard docs (Docusaurus) dev server
28+
$(NPM) run docs:dev --workspace=calmguard
29+
30+
studio-deps: ## Build CALM Studio workspace deps that ship from dist (calm-core)
31+
$(NPM) run build --workspace=@calmstudio/calm-core
32+
33+
studio: studio-deps ## Run CALM Studio (SvelteKit) web dev server
34+
$(NPM) run dev --workspace=@calmstudio/studio
35+
36+
studio-desktop: studio-deps ## Run CALM Studio desktop shell (Tauri)
37+
$(NPM) run tauri --workspace=@calmstudio/studio dev
38+
39+
build-guard: ## Production build of CALMGuard
40+
$(NPM) run build --workspace=calmguard
41+
42+
build-studio: ## Production build of CALM Studio
43+
$(NPM) run build --workspace=@calmstudio/studio
44+
45+
mcp-build: studio-deps ## Build the CalmStudio MCP server (and its calm-core dep)
46+
$(NPM) run build --workspace=@calmstudio/mcp
47+
48+
mcp: mcp-build ## Build and run the CalmStudio MCP server (stdio transport)
49+
node $(MCP_BIN)
50+
51+
claude-mcp: mcp-build ## Register the CalmStudio MCP server with Claude Code
52+
claude mcp add --transport stdio calmstudio -- node $(MCP_BIN)
53+
54+
test: ## Run tests for both calm-suite products
55+
$(NPM) run test:run --workspace=calmguard
56+
$(NPM) run test --workspace=@calmstudio/studio

package-lock.json

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)