Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
feat(images): add the one image manifest
Jose Ramireza0cf4f0abad7
diff --git a/deploy/images.json b/deploy/images.jsonnew file mode 100644index 000000000..70d61f40f--- /dev/null+++ b/deploy/images.json@@ -0,0 +1,279 @@+{+ "images": [+ {+ "name": "channel-reader",+ "path": "channel-reader",+ "source_paths": ["channel-reader/**"],+ "published": true,+ "deployed_to_minikube": true+ },+ {+ "name": "workflow-approval-request-reader",+ "path": "workflow-approval-request-reader",+ "source_paths": ["workflow-approval-request-reader/**"],+ "published": true,+ "deployed_to_minikube": true+ },+ {+ "name": "control-api",+ "path": "control-api",+ "rooted": true,+ "source_paths": [+ "control-api/**",+ "packages/workflow-runtime-core/**",+ "packages/workflow-recipe-capability-policy/**",+ "packages/image-policy/**"+ ],+ "published": true,+ "deployed_to_minikube": true+ },+ {+ "name": "control-ui",+ "path": "control-ui",+ "rooted": true,+ "source_paths": ["control-ui/**", "packages/workflow-recipe-capability-policy/**"],+ "published": true,+ "deployed_to_minikube": true+ },+ {+ "name": "external-rest-api",+ "path": "external-rest-api",+ "source_paths": ["external-rest-api/**"],+ "published": true,+ "deployed_to_minikube": true+ },+ {+ "name": "host-context-controller",+ "path": "host-context-controller",+ "rooted": true,+ "source_paths": [+ "host-context-controller/**",+ "packages/workflow-recipe-capability-policy/**",+ "packages/image-policy/**"+ ],+ "published": true,+ "deployed_to_minikube": true+ },+ {+ "name": "mcp-host",+ "path": "mcp-host",+ "rooted": true,+ "source_paths": ["mcp-host/**"],+ "published": true,+ "deployed_to_minikube": true+ },+ {+ "name": "mcp-host-slim",+ "path": "mcp-host",+ "dockerfile": "Dockerfile.slim",+ "rooted": true,+ "source_paths": ["mcp-host/**"],+ "published": true,+ "deployed_to_minikube": true+ },+ {+ "name": "mcp-host-full",+ "path": "mcp-host",+ "dockerfile": "Dockerfile.full",+ "rooted": true,+ "source_paths": ["mcp-host/**"],+ "published": true,+ "deployed_to_minikube": true+ },+ {+ "name": "mcp-host-desktop",+ "path": "mcp-host",+ "dockerfile": "Dockerfile.desktop",+ "rooted": true,+ "source_paths": ["mcp-host/**"],+ "published": true,+ "deployed_to_minikube": false+ },+ {+ "name": "mcp-proxy",+ "path": "mcp-proxy",+ "source_paths": ["mcp-proxy/**"],+ "published": true,+ "deployed_to_minikube": true+ },+ {+ "name": "gfs-controller",+ "path": "gfs-controller",+ "source_paths": ["gfs-controller/**"],+ "published": true,+ "deployed_to_minikube": true+ },+ {+ "name": "nginx-egress-proxy",+ "path": "nginx-egress-proxy",+ "source_paths": ["nginx-egress-proxy/**"],+ "published": true,+ "deployed_to_minikube": true+ },+ {+ "name": "profile-ui",+ "path": "profile-ui",+ "rooted": true,+ "source_paths": ["profile-ui/**", "packages/desktop-app-links/**"],+ "published": true,+ "deployed_to_minikube": true+ },+ {+ "name": "rpc-proxy",+ "path": "rpc-proxy",+ "source_paths": ["rpc-proxy/**"],+ "published": true,+ "deployed_to_minikube": true+ },+ {+ "name": "workflow-recipes",+ "path": "workflow-recipes",+ "rooted": true,+ "source_paths": [+ "workflow-recipes/**",+ "packages/workflow-runtime-core/**",+ "packages/workflow-sdk/**",+ "packages/workflow-recipe-capability-policy/**",+ "packages/image-policy/**",+ "scripts/e2e/**",+ "tests/e2e/fixtures/**"+ ],+ "published": true,+ "deployed_to_minikube": true+ },+ {+ "name": "workflow-coordinator",+ "path": "workflow-recipes",+ "dockerfile": "Dockerfile.coordinator",+ "rooted": true,+ "source_paths": [+ "workflow-recipes/**",+ "packages/workflow-runtime-core/**",+ "packages/workflow-sdk/**",+ "packages/workflow-recipe-capability-policy/**",+ "packages/image-policy/**",+ "scripts/e2e/**",+ "tests/e2e/fixtures/**"+ ],+ "published": true,+ "deployed_to_minikube": true+ },+ {+ "name": "workflow-snippet-runner",+ "path": "workflow-recipes",+ "rooted": true,+ "source_paths": [+ "workflow-recipes/**",+ "packages/workflow-runtime-core/**",+ "packages/workflow-sdk/**",+ "packages/workflow-recipe-capability-policy/**",+ "packages/image-policy/**",+ "scripts/e2e/**",+ "tests/e2e/fixtures/**"+ ],+ "published": true,+ "deployed_to_minikube": true+ },+ {+ "name": "clerum-workflow-base",+ "path": "packages/workflow-sdk",+ "dockerfile": "Dockerfile.base",+ "rooted": true,+ "source_paths": [+ "workflow-recipes/**",+ "packages/workflow-runtime-core/**",+ "packages/workflow-sdk/**",+ "packages/workflow-recipe-capability-policy/**",+ "packages/image-policy/**",+ "scripts/e2e/**",+ "tests/e2e/fixtures/**"+ ],+ "published": true,+ "deployed_to_minikube": false+ },+ {+ "name": "stdio-bridge",+ "path": "stdio-bridge",+ "source_paths": ["stdio-bridge/**"],+ "published": true,+ "deployed_to_minikube": true+ },+ {+ "name": "workspace-files-controller",+ "path": "workspace-files-controller",+ "source_paths": ["workspace-files-controller/**"],+ "published": true,+ "deployed_to_minikube": true+ },+ {+ "name": "airtable-mcp-server",+ "path": "mcp-servers/airtable",+ "source_paths": ["mcp-servers/airtable/**"],+ "published": true,+ "deployed_to_minikube": true+ },+ {+ "name": "playwright-server",+ "path": "mcp-servers/playwright",+ "local_name": "playwright-mcp-server",+ "source_paths": ["mcp-servers/playwright/**"],+ "published": true,+ "deployed_to_minikube": false+ },+ {+ "name": "web-search-mcp",+ "path": "mcp-servers/web-search",+ "local_tag": "v1",+ "source_paths": ["mcp-servers/web-search/**"],+ "published": true,+ "deployed_to_minikube": true+ },+ {+ "name": "mock-mcp-server",+ "path": "tests/e2e/fixtures/mock-mcp-server",+ "source_paths": ["tests/e2e/fixtures/mock-mcp-server/**"],+ "published": true,+ "deployed_to_minikube": true+ },+ {+ "name": "mock-stdio-mcp-server",+ "path": "tests/e2e/fixtures/mock-stdio-mcp-server",+ "source_paths": ["tests/e2e/fixtures/mock-stdio-mcp-server/**"],+ "published": true,+ "deployed_to_minikube": true+ },+ {+ "name": "webhook-gateway",+ "path": "webhook-gateway",+ "source_paths": ["webhook-gateway/**"],+ "published": true,+ "deployed_to_minikube": true+ },+ {+ "name": "webhook-proxy",+ "path": "webhook-proxy",+ "source_paths": ["webhook-proxy/**"],+ "published": true,+ "deployed_to_minikube": true+ },+ {+ "name": "workflow-custom-sdk-e2e",+ "path": "tests/e2e/fixtures/custom-workflow-coordinator",+ "published": false,+ "deployed_to_minikube": true+ },+ {+ "name": "workflow-plugin-sdk-e2e",+ "path": "tests/e2e/fixtures/workflow-plugin-sdk-e2e",+ "published": false,+ "deployed_to_minikube": true+ },+ {+ "name": "doc-generator-mcp",+ "path": "mcp-servers/doc-generator",+ "local_tag": "v1",+ "published": false,+ "deployed_to_minikube": true+ }+ ]+}diff --git a/scripts/release/images-manifest.mjs b/scripts/release/images-manifest.mjsnew file mode 100644index 000000000..5b1ccbb1d--- /dev/null+++ b/scripts/release/images-manifest.mjs@@ -0,0 +1,58 @@+// The one image list. Three lists previously disagreed about what exists:+// build-publish.yml's matrix, ALL_IMAGES in build-images.sh, and the minikube+// overlay's images: block. They are overlapping SUBSETS, so this file carries+// per-image flags rather than pretending one list serves all three consumers.+//+// JSON rather than YAML deliberately: scripts here use node: builtins only (the+// shell-syntax CI job has no npm ci), and GitHub Actions can consume JSON+// directly via fromJSON() for the build matrix. A YAML parser would be a+// dependency on both sides.+import fs from 'node:fs'+import path from 'node:path'+import { fileURLToPath } from 'node:url'++const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../..')+const MANIFEST_PATH = 'deploy/images.json'++function load() {+ const raw = fs.readFileSync(path.join(ROOT, MANIFEST_PATH), 'utf8')+ const parsed = JSON.parse(raw)+ if (!Array.isArray(parsed.images)) {+ throw new Error(`${MANIFEST_PATH} must contain an "images" array`)+ }+ for (const image of parsed.images) {+ if (!image.name) throw new Error(`${MANIFEST_PATH}: an entry has no name`)+ if (typeof image.published !== 'boolean') {+ throw new Error(`${MANIFEST_PATH}: ${image.name} must set published explicitly`)+ }+ if (typeof image.deployed_to_minikube !== 'boolean') {+ throw new Error(`${MANIFEST_PATH}: ${image.name} must set deployed_to_minikube explicitly`)+ }+ if ('pull_in_ghcr_mode' in image) {+ throw new Error(+ `${MANIFEST_PATH}: ${image.name} stores pull_in_ghcr_mode; it is derived ` ++ `from published && deployed_to_minikube and must not be written down`+ )+ }+ }+ return parsed.images+}++export const IMAGES = load()++export function publishedImages() {+ return IMAGES.filter(i => i.published)+}++// The images a ghcr-mode minikube pulls. Deriving this rather than storing it+// is what stops the puller reaching for an unpublished fixture.+export function pullInGhcrMode() {+ return IMAGES.filter(i => i.published && i.deployed_to_minikube)+}++// The tag build-images.sh uses locally. Some images differ from their published+// name (playwright-server is built locally as clerum/playwright-mcp-server) and+// some use :v1 rather than :test.+export function localRef(image) {+ return `clerum/${image.local_name ?? image.name}:${image.local_tag ?? 'test'}`+}diff --git a/scripts/tests/test-images-manifest.sh b/scripts/tests/test-images-manifest.shnew file mode 100755index 000000000..df953bc3a--- /dev/null+++ b/scripts/tests/test-images-manifest.sh@@ -0,0 +1,118 @@+#!/usr/bin/env bash+set -u+FAIL=0++# deploy/images.json is the single source of truth for the image list. Three+# lists previously disagreed: build-publish.yml's matrix (28), ALL_IMAGES in+# build-images.sh (28), and the minikube overlay's images: block (18). They are+# overlapping SUBSETS, not one list, so every check below is per-flag rather+# than set equality.++REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"++pass() { echo "PASS: $1"; }+fail() { echo "FAIL: $1"; FAIL=1; }++assert_manifest_parses_and_is_nonempty() {+ local n+ n="$(node -e 'import("'"$REPO_ROOT"'/scripts/release/images-manifest.mjs").then(m=>console.log(m.IMAGES.length))' 2>/dev/null)"+ if [ "${n:-0}" -ge 28 ]; then+ pass "images.json parses and has $n entries"+ else+ fail "expected at least 28 entries, got '${n:-<none>}'"+ fi+}++assert_every_published_image_has_a_build_matrix_entry() {+ local missing+ missing="$(node -e '+ import("'"$REPO_ROOT"'/scripts/release/images-manifest.mjs").then(async m => {+ const fs = await import("node:fs")+ const wf = fs.readFileSync("'"$REPO_ROOT"'/.github/workflows/build-publish.yml", "utf8")+ const gaps = m.publishedImages()+ .filter(i => !wf.includes(`- image: ${i.name}\n`))+ .map(i => i.name)+ console.log(gaps.join(","))+ })' 2>/dev/null)"+ if [ -z "$missing" ]; then+ pass "every published image has a build-matrix entry"+ else+ fail "published but absent from the build matrix: $missing"+ fi+}++assert_every_local_image_maps_to_exactly_one_row() {+ local unmapped+ unmapped="$(node -e '+ import("'"$REPO_ROOT"'/scripts/release/images-manifest.mjs").then(async m => {+ const fs = await import("node:fs")+ const sh = fs.readFileSync("'"$REPO_ROOT"'/scripts/minikube/build-images.sh", "utf8")+ const block = sh.match(/ALL_IMAGES=\(([\s\S]*?)\n\)/)+ const refs = [...block[1].matchAll(/"([^"]+)"/g)].map(x => x[1])+ const known = new Set(m.IMAGES.map(i => m.localRef(i)))+ console.log(refs.filter(r => !known.has(r)).join(","))+ })' 2>/dev/null)"+ if [ -z "$unmapped" ]; then+ pass "every ALL_IMAGES entry maps to exactly one manifest row"+ else+ fail "ALL_IMAGES entries with no manifest row: $unmapped"+ fi+}++assert_pull_in_ghcr_mode_is_derived_not_stored() {+ local bad+ bad="$(node -e '+ import("'"$REPO_ROOT"'/scripts/release/images-manifest.mjs").then(m => {+ // pull_in_ghcr_mode must be published && deployed_to_minikube, derived.+ // Storing it invites the three-way conflation that broke an earlier draft:+ // the puller tried to fetch unpublished fixtures.+ const stored = m.IMAGES.filter(i => "pull_in_ghcr_mode" in i).map(i => i.name)+ const wrong = m.pullInGhcrMode().filter(i => !(i.published && i.deployed_to_minikube))+ console.log([...stored, ...wrong.map(i => i.name)].join(","))+ })' 2>/dev/null)"+ if [ -z "$bad" ]; then+ pass "pull_in_ghcr_mode is derived, never stored"+ else+ fail "stored or mis-derived: $bad"+ fi+}++assert_unpublished_images_are_exactly_the_known_three() {+ local got+ got="$(node -e '+ import("'"$REPO_ROOT"'/scripts/release/images-manifest.mjs").then(m =>+ console.log(m.IMAGES.filter(i=>!i.published).map(i=>i.name).sort().join(",")))' 2>/dev/null)"+ # Verified by anonymous ghcr probe: these three return `denied`. playwright-server+ # IS published (an earlier draft wrongly listed it as a gap; the probe that said+ # otherwise was missing its Accept header).+ local want="doc-generator-mcp,workflow-custom-sdk-e2e,workflow-plugin-sdk-e2e"+ if [ "$got" = "$want" ]; then+ pass "the unpublished set is exactly the known three"+ else+ fail "unpublished set is '$got', expected '$want'"+ fi+}++assert_every_defined_case_is_invoked() {+ local defined called missing+ defined="$(grep -cE '^assert_[a-z_]+\(\) \{' "$REPO_ROOT/scripts/tests/test-images-manifest.sh")"+ called="$(grep -cE '^assert_[a-z_]+$' "$REPO_ROOT/scripts/tests/test-images-manifest.sh")"+ missing=""+ while read -r fn; do+ grep -qE "^${fn}$" "$REPO_ROOT/scripts/tests/test-images-manifest.sh" || missing="$missing $fn"+ done < <(grep -oE '^assert_[a-z_]+(?=\(\) \{)' -P "$REPO_ROOT/scripts/tests/test-images-manifest.sh")+ if [ -z "$missing" ]; then+ pass "every defined assert_ case is invoked ($defined defined, $called invoked)"+ else+ fail "defined but never invoked:$missing"+ fi+}++assert_manifest_parses_and_is_nonempty+assert_every_published_image_has_a_build_matrix_entry+assert_every_local_image_maps_to_exactly_one_row+assert_pull_in_ghcr_mode_is_derived_not_stored+assert_unpublished_images_are_exactly_the_known_three+assert_every_defined_case_is_invoked++exit $FAIL