Commit Graph
13 Commits
Author SHA1 Message Date
jschoubben 2990b2d5a4 The tool runtime's recipe starts FROM the base its manifest declares (novox/hq ADR 0097) 2026-09-21 22:16:10 +02:00
jschoubben b00468d4c0 Resolve the SDK in a throwaway deps stage, not with a buildkit secret
A machine's docker may carry no buildx, so --mount=type=secret cannot be relied
on. Instead a deps stage copies in the builder-written .npmrc, resolves
node_modules from the mesh's registry, and the toolchain stage copies those
node_modules out without the credential — so it is in no published layer.

Claude-Session: https://claude.ai/code/session_01D6qtiYU3P9jk3pnAXyAFyx
2026-09-16 11:48:16 +02:00
jschoubben b618057fb1 Resolve the SDK by version from the registry, not from a git URL
package.json names @novox/mesh-sdk by version and the install is a
buildkit-secret-mounted resolve from the mesh's package registry, closing the
git-URL half of issue 053. The lock is regenerated against the registry (a
follow-up switches install to ci with a committed lock).

Claude-Session: https://claude.ai/code/session_01D6qtiYU3P9jk3pnAXyAFyx
2026-09-16 10:27:26 +02:00
jschoubben 42b2f9cca0 Stop compiling the toolkit by hand; it arrives compiled now 2026-09-14 11:05:57 +02:00
jschoubben 62e2aa7708 Build and run are two images, from one recipe
A module's recipe starts from this image and invokes the compiler out of it, so
the compiler had to be here. The same image was also what every module ran in,
so every running container on every machine carried a compiler it would never
invoke: 23 of the 28 MB of libraries. An earlier attempt to prune the build
tools produced a smaller image that nothing could be built on, and the comment
defending their return made a workaround look like a decision.

One recipe, because the two must agree about the operating system, the language
version and the library, and two files drift.
2026-09-14 01:57:05 +02:00
jschoubben 77493642d8 Remove what was only there to move a commit
Two lines added to prove that changing this image makes everything standing on
it go stale. The proof worked and the lines were never meant to stay: nothing
reads MESH_RUNTIME.
2026-09-13 11:15:24 +02:00
jschoubben 8ad37c33cd Change the base for real, so the image moves with the commit 2026-09-13 02:50:15 +02:00
jschoubben 8318c78125 Move the base, to see whether the mesh notices what it reaches 2026-09-13 02:47:14 +02:00
jschoubben 90a15cde20 The runtime keeps the compiler, because it is also the build environment
Every module's recipe starts from this image and invokes the compiler out of
it. Pruning build dependencies made a smaller image that nothing could be
built on.
2026-09-13 02:45:16 +02:00
jschoubben 78257cf151 Compile the toolkit after installing it, because npm does not
It declares the hook npm is supposed to run after a git install, and this npm
does not run it — so the package arrives as sources with every entry point
pointing at a compiled directory that is not there.
2026-09-13 02:44:12 +02:00
jschoubben a5d65ada53 The build stage can fetch a git dependency, and only it can 2026-09-13 02:39:54 +02:00
jschoubben a174dfd404 The runtime every module stands on is built from its own repository
It copied in a compiled directory that is not in source control and resolved
the toolkit to a sibling checkout, so only a workstation with two repositories
side by side could produce it — and its fingerprint was then typed into every
module by hand. Nothing could rebuild it, so nothing could check it, and the
rule that catches a base moving had no version on the far end of its edge.

The recipe now also says what the image in service actually is. It claimed
Alpine and has been serving Debian for as long as nobody could rebuild it.
2026-09-13 02:39:11 +02:00
jschoubben 9eddcdb0a0 mesh-tools — the tool runtime and AMQP broker binding
The per-node process that makes a module's tools serve on the mesh:
- broker-amqp.ts: a concrete AMQP implementation of the sdk's Broker
  contract (request/reply over a reply queue + correlation id, publish/
  subscribe over a topic exchange). Kept here, not in the sdk, so a
  broker-client change never rebuilds a module (ADR 0044).
- runtime.ts: bind the broker, import the assigned modules' tool
  entrypoints (each registers as it loads), serveTools. The thin wrapper.
- main.ts: the entrypoint, configured by MESH_BROKER_URL + MESH_TOOL_MODULES.
- Dockerfile: the container a node runs it as.

Verified over a REAL broker: the test spins LavinMQ (the mesh's broker),
the runtime serves a registered tool, a separate connection invokes it by
name over AMQP and gets the result, and an unknown tool is refused over
the wire. So 'modules can serve' is now running-on-the-mesh, not just
proven in a mock.

Claude-Session: https://claude.ai/code/session_01LrgweAeERJYBg88c5cKDzF
2026-09-03 23:21:01 +02:00