Publish to the forge's npm registry, with the whole dependency tree in the tarball (macula-io/macula-mcp#4) #5
Loading…
Reference in a new issue
No description provided.
Delete branch "pluto/4-forge-registry"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@macula-io/mcppublishes to the forge's own npm registry, and the packed tarball carries its whole production tree, so a stranger's install fetches nothing from npmjs.org (macula-io/macula-mcp#4; DECIDED 2026-11-24 "yes. we move off of Big Tech (and that includes npmjs)").What changes
ci-images-release-guard.ymlis macula-ci-images2660ee4candci-images-dependency-advisories.ymlis83a76a35, the two commits this repository's workflows already named (macula-ts's port pins the guard atb4c41abb; the advisories commit is the same in both). Diffing them against the ts copies will show that difference and nothing else.release.ymlported to the forge. The Node jobs run inmacula-ci-nodeby digest; each job's checkout is the plain-shell step every forge repository carries byte-identical (macula-io/martha#601), because a container carries no marketplace action.release-guardanddependency-advisoriesbecome pinned local copies (a cross-repository reusable fails to expand on the forge and takes the file's other jobs with it). The tag guard still checkspackage.json,server.jsonand.claude-plugin/plugin.json; aworkflow_dispatchis the rehearsal and stops atnpm publish --dry-run; only a tag push uploads.sdk-publisher,write:packageonly,image-build/sdk-publisher-account.sh), arriving asFORGE_PACKAGES_TOKEN/FORGE_PACKAGES_USER. The token reaches npm's userconfig as a${NODE_AUTH_TOKEN}reference, never onnpm config set's argv (npm records argv in~/.npm/_logs).package.json'spublishConfigsayshttps://git.macula.io/api/packages/macula-pub/npm/; the workflow names no registry, andsrc/the_forge_registry.test.tsholds the code's copy of that URL equal to the manifest's.bundleDependenciescarries the production tree. 124 packages, derived frompackage-lock.jsonbyscripts/bundled_packages.mjs, andsrc/bundle_carries_every_dependency.test.tsfails by name when the lock and the list drift. The publish job packs the tarball and installs it into an empty directory with the network forbidden (--offline, a dead registry named): a dependency left unbundled fails there by name instead of on a user's machine. Without this,bundleDependenciesnaming the five direct dependencies would still let npm fetch their 119 transitive packages at install time.src/install/the_forge_registry.ts), so a config installed today keeps resolving from the forge even on a machine whose npm config was never touched, and can never pick up the same-named npmjs package.install.shandinstall.ps1pass the same flag, README and HOWTO name the one-line config for commands a reader types, and the Claude Code plugin's manifest carries it too.os: ["linux"]andcpu: ["x64"]inpackage.json, so a Mac, Windows or arm64 install is refused by npm with a clear message rather than failing at load once the bundled addon is built for one platform.io.macula/macula-mcplisting, and the reasoning is on the issue.Version
0.51.4. The
v0.51.3tag predates Actions in this repository, and a tag push is never re-issued, so the first publish from the forge is a new version. The version is bumped inpackage.json,server.json(both places) and.claude-plugin/plugin.json, which is what the tag guard checks; the tag itself is Raf's yes and is not in this change.Not in this change
@macula-io/tsfrom the forge in this repository's own lock: the lock currently resolves@macula-io/tsfrom npmjs, so the bundle carries the npmjs-built 0.32.x.@macula-io/tspublishes to the forge in step 1 of this package (macula-io/macula-ts PR 4); once that version exists, this repository's dependency and lock move to it and the bundle carries the forge-built addon. The consumer-facing promise of this change does not depend on it: nothing is fetched at install either way.ci.yml's GitHub-shaped jobs (lint, typecheck, build, test, Windows, shellcheck, powershell, advisories by reusable): the build and suite they cover run on the release path in this port, and portingci.ymlis a separate change.Proof, run here
publishConfig.registry= the macula-pub URL, and 124 bundled names.npm run typecheck: clean.src/bin/node_id.test.ts, is this shell's environment, not the diff: it throwsMACULA_MCP_AGENT ("pluto") and MACULA_MCP_IDENTITY (...) are both set, two variables the crew session exports; with them unset the same file passes. A job container carries neither.npm packwrites a 25 MB tarball carrying 124 top-level bundled packages (and the nested copies npm hoists underbody-parser,negotiator,type-is); a fresh directory with--offlineand--registry=http://127.0.0.1:9/installs it withadded 1 package; the installed binary answers one MCPinitializewith"name":"macula-mcp","version":"0.51.4", which is this workflow's own proof step.15.0.12+gitea-1.22.0; its[packages]section in/srv/forgejo/config/app.inisets onlyENABLED = true, so every limit is at the compiled default. Forgejo 15's defaults areLIMIT_SIZE_NPM = -1andLIMIT_TOTAL_OWNER_SIZE = -1("no limit"; checked inservices/packages/packages.goof tag v15.0.12, where the checks run only when the value is above -1). Caddy in front setsrequest_body { max_size 2GB }(/srv/forgejo/Caddyfile:18-20). The 25.7 MB tarball fits both with room to spare: nothing to change.plugin.json,install.shandinstall.ps1and fails unless each names exactlyFORGE_NPM_REGISTRY,bundled_packages.mjsfails by name on a production optional dependency, and the lock bump (fast-uri4.2.3 to 4.2.4, fromoverrides, in the 0.51.4 refresh) is recorded here.all_tool_descriptionscases red; that file passes alone and the rerun passed everything, so it is an ordering flake in that file's process.env setup, not this change. Noted on the issue.)ci=line follows in the HANDOFF. One measured fact about size: the tarball is 25 MB because it carries the whole tree, so if the forge's npm registry refuses an upload of that size, that is where we would learn it.Known consequence, not decided here
The bundled
@macula-io/tsis the npmjs-published 0.32.1 today, and it carries prebuilds for all five platforms. Once this repository's dependency moves to the forge-published@macula-io/ts(step 1 of this package), the bundle carries the linux-x64 prebuild only, per the Linux-only ruling. Whether@macula-io/mcpshould then declareos: ["linux"]so a macOS install is refused by name rather than failing at runtime is a product question for the Supervisor, not a change in this PR.Refs #4.
🤖 Generated with Claude Code
Follow-ups recorded on the issue, outside this PR
npm cion the release path still fetches fromregistry.npmjs.org(the lock'sresolvedURLs): the CONSUMER fetches nothing, but the build does. Moving this repository's@macula-io/tsto the forge-published version takes the@macula-iohalf off npmjs; the third-party half is a later decision.ci.ymlis not ported (its jobs are GitHub-shaped and the Linux-only ruling also retires its Windows job), so a push to main still fires a red run until that port lands.all_tool_descriptionscases are env-order flaky in a full parallel run, pass alone.