-
Notifications
You must be signed in to change notification settings - Fork 0
feat(prepack): gate installed dependencies (AB7014/AB7015); host-native INSTALL.md #547
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+2,570
−161
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
b325261
feat(prepack): gate installed dependencies (AB7014/AB7015) and make e…
ScriptedAlchemy f89a4ff
chore: changeset PR number
ScriptedAlchemy 0027685
Merge remote-tracking branch 'origin/main' into feat/prepack-dependen…
ScriptedAlchemy 48165af
refactor(prepack): pure dependency evidence, shared digest cache, cla…
ScriptedAlchemy 9db0511
fix(prepack): dependency gate honours tilde ranges, declaration impor…
ScriptedAlchemy 76cb637
refactor(prepack): packer policy at the process edge, pure specifier …
ScriptedAlchemy 99e53f8
fix(prepack): resolution calls, bundleDependencies, optional override…
ScriptedAlchemy 7a2be52
fix(prepack): peers are never bundled; npm: alias targets are classified
ScriptedAlchemy 5e3554d
fix(prepack): type directives map to @types, computed import() withho…
ScriptedAlchemy 6ca7920
fix(prepack): imports-map targets, computed require(), and install-sc…
ScriptedAlchemy 346da1b
fix(prepack): computed resolve/createRequire withhold AB7014; unresol…
ScriptedAlchemy a1ab106
fix(prepack): warning-only diagnostics pass prepack; literal-prefixed…
ScriptedAlchemy fd7f4cf
fix(prepack): unknown schemes are non-registry, optional peers keep p…
ScriptedAlchemy 9391777
fix(prepack): bundled exemption needs a packed node_modules entry; al…
ScriptedAlchemy 1513cc9
fix(prepack): namespace-qualified createRequire factories; reference …
ScriptedAlchemy 331dcd9
fix(prepack): validate scheme-less selectors; unparseable optional sp…
ScriptedAlchemy 3b9b78b
fix(prepack): empty known-scheme specifiers unparseable; follow npm r…
ScriptedAlchemy 44a8c01
fix(prepack): URL-form specifiers must parse; chained require('node:m…
ScriptedAlchemy f945afd
fix(prepack): bare tarball filenames are file sources; invalid depend…
ScriptedAlchemy 3649715
fix(prepack): reserved package names, strict semver identifiers, bare…
ScriptedAlchemy f0b2b29
fix(prepack): alias names validated, inline createRequire literal, np…
ScriptedAlchemy 65a2ad5
docs(diagnostics): alias name validity, git transports, empty fetch s…
ScriptedAlchemy 28da0f4
fix(prepack): alias targets must be registry specifiers, NPM: prefix …
ScriptedAlchemy 1876a86
refactor(prepack): classify dependency entries with npm-package-arg
ScriptedAlchemy 16524b5
Merge origin/main into feat/prepack-dependency-gate
ScriptedAlchemy 9c5fa96
fix(prepack): executables run by packed code, valued npm run options,…
ScriptedAlchemy 61daea9
fix(prepack): read dependency values exactly as npm does; follow npm …
ScriptedAlchemy 76b2de6
fix(prepack): nested createRequire arguments, quoted delegated script…
ScriptedAlchemy a0351b9
fix(prepack): file: sources shipped in the tarball install; install-s…
ScriptedAlchemy eb2f5fc
fix(prepack): resolve extensionless/quoted install-script files, npm …
ScriptedAlchemy f1711da
fix(prepack): parse packaged tarball manifests, split shell operators…
ScriptedAlchemy 6b5441c
fix(prepack): install-script command positions, directory mains, impo…
ScriptedAlchemy d6a5d21
fix(prepack): node . root main, --require/--import preloads, newline …
ScriptedAlchemy a093992
fix(prepack): npm run first-positional delegation, Node option gramma…
ScriptedAlchemy 9ce8c93
fix(prepack): npm restart fallback, NODE_OPTIONS preloads, bare requi…
ScriptedAlchemy 1e6e5cf
fix(prepack): qualified createRequire factories, import() in inline p…
ScriptedAlchemy 76056b7
fix(prepack): treat lexer failure as incomplete evidence; read instal…
ScriptedAlchemy dd51de5
Merge branch 'main' into feat/prepack-dependency-gate
ScriptedAlchemy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| 'agent-bundle': patch | ||
| 'create-agent-bundle': patch | ||
| --- | ||
|
|
||
| Gate `agent-bundle prepack` on the installed-dependency fields of `package.json` so a published plugin installs only what its packed files need: `AB7014` reports a `dependencies`, `optionalDependencies`, or `peerDependencies` entry that no packed JavaScript imports, requires, resolves, or runs as an executable (a computed `import`/`require`, a packed file the ESM lexer rejects, or a `require` passed on as a value such as `const load = require`, withholds `AB7014` for the whole package; an installed manifest's `bin` is read as npm reads it, the last of duplicate keys winning), no packed declaration file references, and no `imports` mapping or consumer install script (including scripts it delegates to with `npm run` or `npm test`/`start`/`stop`/`restart`, `npm restart` without a `restart` script running `stop` and `start`) reaches — a warning rather than an error for a `peerDependencies` entry, which may be a deliberate host-compatibility contract — (the build inlines every dependency into `dist/bin` and the host packs, so a runtime external must be reached one of those ways; optional peers are skipped), and `AB7015` reports an entry a consumer's npm cannot resolve through a registry, judged by npm's own parser (`npm-package-arg`, now a dependency of `agent-bundle`): a git, GitHub-shorthand, remote-tarball, or path source, which npm 12 refuses to fetch by default (`allow-git`, `allow-remote`); a name or specifier npm cannot parse (`EINVALIDPACKAGENAME`, `EUNSUPPORTEDPROTOCOL` for `link:`, `portal:`, or a typo, `EINVALIDTAGNAME`, an alias of a non-registry target — reported even on an optional peer, since the manifest read itself fails); and `workspace:`/`catalog:` unless pnpm, Yarn, or Bun is running the pack and will rewrite them; a fetchable-but-unfetched `optionalDependencies` entry warns rather than fails, since npm continues without it (an unparseable one, or one a consumer install script runs, loads from an inline `node -e` program by `require`, `createRequire`, or `import()`, preloads with `node -r`/`--require`/`--import`/`--loader`, or loads from a packed file it executes — `node install.js`, `node .` through the root `main` — stays an error; each command after `&&`, `;`, or a newline counts on its own, shell quotes and backslash escapes are resolved, `node`'s options end at the program so `node install.js --require x` preloads nothing while a `NODE_OPTIONS=--require=x` assignment on the same command does, and `npm run <script>` delegates to the first positional alone — `npm run setup -- dormant` runs `setup`); an entry the tarball itself carries — a bundled dependency npm packed, or a `file:` path whose packed source is an installable package directory or tarball — is not reported — `agent-bundle prepack` prints such warnings and exits 0, and `prepack()` returns them on `PrepackResult.diagnostics`. Emitted `INSTALL.md` files now state that the bundle is self-contained, use the host's own `claude plugin` / `codex plugin` commands for uninstall, and mark every `agent-bundle install`/`uninstall`/`doctor` mention as optional automation. The `create-agent-bundle` `mcp-server` and `cli-tool` templates declare `@agent-bundle/runtime`, `react`, and `zod` under `devDependencies`. (#547) |
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.