Skip to content

fix(agentic): machine-protocol/runner/agent-cli publish with a real dependency version, not workspace: - #1862

Merged
pyramation merged 2 commits into
mainfrom
feat/machine-packages-prepack
Sep 25, 2026
Merged

pyramation merged 2 commits into
mainfrom
feat/machine-packages-prepack

Conversation

@pyramation

@pyramation pyramation commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The tarballs on npm today are uninstallable:

$ tar xzf constructive-db-agent-cli-0.1.0.tgz package/package.json
  "dependencies": { "@constructive-db/machine-protocol": "workspace:*" }

(same for machine-runner@0.2.0). Any consumer install fails with ERR_PNPM_WORKSPACE_PKG_NOT_FOUND … while installing the dependencies of @constructive-db/agent-cli.

Cause: lerna rewrites workspace: ranges in the package-root package.json before packing, but we publish dist/, and dist/package.json is whatever makage copied at the last build — pre-rewrite. Every other publishable package in agentic/ declares "prepack": "npm run build", so the copy is regenerated after the rewrite; these three were the only ones missing it. Verified locally: with prepack, editing the range and running the build lands the edited range in dist/package.json.

Change: machine-protocol, machine-runner, agent-cli each gain "prepack": "npm run build" (3 lines).

After merge: npx lerna publish (patch of all three) and the new tarballs carry "@constructive-db/machine-protocol": "^0.2.x".

Link to Devin session: https://app.devin.ai/sessions/3c993d055ffb47f6be27862718a9cd42
Open in Devin Desktop: https://app.devin.ai/desktop/session/3c993d055ffb47f6be27862718a9cd42?variant=devin
Requested by: @pyramation

…na's workspace: rewrite reaches dist/package.json
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@tenki-reviewer

tenki-reviewer Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Review complete. No issues found.


This PR fixes packaging of the three agentic packages (machine-protocol, machine-runner, agent-cli) so that lerna's workspace: version replacement applies to the built dist/package.json rather than only the source manifest. The change is consistent with the identical prepack scripts already present in every other agentic/* package, and workspace:^ still resolves to the local workspace package under pnpm.

Files Change
agentic/machine-protocol/package.json, agentic/machine-runner/package.json, agentic/agent-cli/package.json Add prepack: npm run build so makage build emits a fresh dist/ before npm pack, matching sibling packages.
agentic/agent-cli/package.json, agentic/machine-runner/package.json Change @constructive-db/machine-protocol from workspace:* to workspace:^ so lerna independent-versioning rewrites the dependency to the published version in dist/package.json.

No defects found; the dependency-specifier change is semantically safe within the workspace and required for the publish flow.

Reviewed commit: b5e3651

@pyramation
pyramation merged commit b6416ff into main Sep 25, 2026
20 checks passed
@pyramation
pyramation deleted the feat/machine-packages-prepack branch September 25, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant