docs: accept npx distribution spec - #10
Open
CharlesYWL wants to merge 4 commits into
Open
Conversation
Status moves to Accepted (2026-08-27, Charles). npm scope locked as
@copilot-fleet. Stale git-pull assumptions replaced with the current
updater.ts behavior: git fetch --prune, then git reset --hard onto @{u},
untracked files (.env included) surviving. Hello version noted as
already landed: packageVersion() reads package.json and packages ship
0.3.0. No runtime changes.
Co-authored-by: CharlesYWL <CharlesYWL@users.noreply.github.com>
CharlesYWL
marked this pull request as ready for review
August 28, 2026 06:36
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Owner
Author
|
@copilot Please review this design |
Contributor
Review found three blockers before implementation:
The fetch/reset and |
Publish manifests: publishConfig.name does not rename under npm, so the pack step rewrites packed manifests (@fleet/* -> @copilot-fleet/*, drop private, access public); npm publish --dry-run on unrewritten @fleet/host is the failing test. Node tarball must ship agents/ and public/, which the runtime reads via packageRoot(), with a packed-tarball smoke test. Install-kind detection is bounded to the running package's root so an npm prefix can never adopt an ancestor checkout, misreport its SHA, or reset --hard it. Spec-only; no runtime changes. Co-authored-by: CharlesYWL <CharlesYWL@users.noreply.github.com>
Local npm pack after tsc: protocol ships 0 dist files (gitignore), node ships dist only because bin points at dist/main.js, and there is no bin/ directory. Packed files must include dist and the package-root shebang wrappers. npm: aliases are registry-only, so the smoke test file:-installs protocol under the @fleet/protocol key. Publish protocol first. Spec-only; no runtime changes. Co-authored-by: CharlesYWL <CharlesYWL@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Marks the npx distribution design as Accepted, approved by Charles on 2026-08-27, with the npm scope locked as
@copilot-fleet(packages@copilot-fleet/protocol,@copilot-fleet/host,@copilot-fleet/node). The spec's git update path is aligned with the currentapps/node/src/updater.ts:git fetch --prunefollowed bygit reset --hardonto@{u}, replacing every stalegit pull --ff-onlymention; the npm path staysnpm install @copilot-fleet/node@latestin the persistent prefix.Follow-up commits fold in Copilot's three blockers as locked decisions, then the ESM-alias correction (
@fleet/protocolkeys stay; specs becomenpm:@copilot-fleet/protocol@<version>), then a third pass from localnpm pack/ install:bin/directory. Packed bins are./supervisor.mjs(Node) and./host.mjs(Host) at the package root.filesis mandatory. Root.gitignorehasdist/, so an unrewritten protocol pack aftertscships 0 dist files; pointing Node's bin at the supervisor withoutfilesdrops Node dist from 69 files to 0.npm:aliases only work for registry deps. Local smokefile:-installs protocol under the@fleet/protocolkey (oroverrides) and launches the bin. Publish protocol first.Spec-only change; no runtime code is touched.
Verified locally (Node 22.14.0 / npm 10.9.7): protocol pack dist=0 src=8; node pack dist=69 src=45 bin/=0 supervisor.mjs present; rewriting the dep key to
@copilot-fleet/protocolthrowsERR_MODULE_NOT_FOUND; keeping the@fleet/protocolkey imports;overrides+ packed node bin launches.