Files
open-multi-agent/package.json
T
Jack Chen 98516cedfc chore: pin the internal dependency tree and audit the production one (#570)
A library that gets installed into someone else's backend is judged partly on
what its own install pulls down. Three changes tighten that, and two questions
turned out to need no change at all.

The line this draws is what ships. Every dependency that stays inside the
repository is now pinned to the exact version the lockfile already resolved:
all 27 devDependencies across the four workspaces, plus the private release
bot's own zod. The lockfile change is 28 spec lines with no
resolution moved, no entry added or removed, and all 61 platform-specific
entries intact. A new root .npmrc sets save-exact=true so the next one arrives
pinned rather than as a range nobody notices.

What a consumer installs keeps its range: `dependencies` in packages/core, the
only published runtime block here, every `peerDependencies`, and otel's core
compatibility range. An exact version in those blocks overrides the consumer's
own resolution and stops their `npm audit fix` from reaching a patched build
until we cut a release, which is a worse trade than the install-time drift it
prevents. save-exact will still pin a new dependency added to one of them, so
the package job now asserts all three published manifests and fails when one
is left exact, next to the assertion that already covers otel's range.

min-release-age is deliberately not set. It first shipped in npm 11.10.0, and
the CI matrix runs Node 20 and 22, which bundle npm 10.8.2 and 10.9.8. Those
two accept the key, echo it back from `npm config get`, and never act on it,
so a quarantine window would hold on one leg of the matrix while silently
doing nothing on the other two. It also has no effect on `npm ci`, which
installs the lockfile verbatim.

Every `npm ci` that installs this repository's own tree now passes
--ignore-scripts, so a compromised dependency cannot run an install hook on a
runner that holds release credentials. Only three dependencies declare a
postinstall at all, and the full lint, test, build, scaffold, and example
suites pass on a tree installed that way. The `npm install` calls that stand
in for a real consumer are deliberately left alone: their job is to reproduce
what a user's install actually does, and hardening them would make the smoke
tests prove less than they claim.

A new scheduled Supply chain audit workflow asks two questions about the
dependencies that reach a consumer, an hour before the weekly release bot so a
finding lands before the release PR is drafted. --omit=dev is the point of
running it separately: auditing the full tree reports eighteen advisories,
every one of them in test and fixture tooling that never ships, and a
permanently red job is one nobody reads. The two steps fail differently.
`npm audit` reports into the run summary, because a new upstream advisory is
not this repository misbehaving and may have no fixed version yet.
`npm audit signatures` fails, because it compares served bytes against the
registry's own signature, so a mismatch is tampering rather than churn; all
27 production packages verify today.

Two things needed no change. npm provenance is already live: publish.yml
publishes through npm trusted publishing with id-token: write, which attaches
SLSA attestations on its own, and every version since core 1.16.0, otel 0.1.2,
and create-oma-app 0.8.1 carries one. And .npmrc left .gitignore in #198
because it only restated the default registry; it comes back tracked, with the
ignore rule narrowed so a contributor's own nested .npmrc stays out.
2026-09-04 01:01:09 +08:00

43 lines
1.8 KiB
JSON

{
"name": "open-multi-agent",
"version": "0.0.0",
"private": true,
"description": "Private workspace root for the open-multi-agent monorepo. The published package is @open-multi-agent/core in packages/core.",
"workspaces": [
"packages/*"
],
"scripts": {
"build": "npm run build --workspaces --if-present",
"dev": "npm run dev -w @open-multi-agent/core",
"pretest": "npm run test:example-catalog",
"test": "npm run test --workspaces --if-present && npm run bench:ab:test",
"test:example-catalog": "node --test scripts/example-catalog.test.mjs && node scripts/validate-example-catalog.mjs",
"test:watch": "npm run test:watch -w @open-multi-agent/core",
"test:coverage": "npm run test:coverage -w @open-multi-agent/core",
"test:e2e": "npm run test:e2e -w @open-multi-agent/core",
"bench:observability:ci": "node scripts/observability-benchmark-ci.mjs",
"bench:ab": "tsx bench/src/run-bench.mts",
"bench:ab:mock": "tsx bench/src/run-bench.mts --mock --label mock",
"bench:ab:report": "tsx bench/src/report.mts",
"bench:ab:test": "tsx --test bench/src/bench.test.mts",
"test:eval-examples": "node scripts/eval-example-smoke.mjs",
"test:observability-examples": "node scripts/observability-example-smoke.mjs",
"test:observability-pack": "node scripts/observability-tarball-smoke.mjs",
"test:scaffold": "npm run test:scaffold --workspaces --if-present",
"lint": "npm run lint --workspaces --if-present && npm run lint:bench",
"lint:bench": "tsc --noEmit -p bench/tsconfig.json"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/open-multi-agent/open-multi-agent.git"
},
"engines": {
"node": ">=20.0.0"
},
"devDependencies": {
"tsx": "4.21.0",
"typescript": "5.9.3"
}
}