智能体
vercel.com ·
@Vercel News
Vercel Agent 现可从 npm 及自定义 registry 安装私有包
Vercel 官方 changelog 宣布,Vercel Agent 支持从 npm 私有包和自定义 registry 安装依赖,认证方式与 Vercel 构建一致,覆盖 npm、pnpm 和经典 Yarn。用户需在 Development 或 Preview 环境添加团队级共享环境变量:私有包使用 NPM_TOKEN,自定义或多 registry 使用 NPM_RC。Agent 只读取团队共享变量而非项目级变量,凭据值保留在沙箱之外,Agent 无法读取。
AI推荐理由 Vercel 官方 changelog 首发,信息密度较高且事实明确:Vercel Agent 现可通过团队级共享环境变量(NPM_TOKEN 或 NPM_RC)从 npm 私有包和自定义 registry 安装依赖,npm/pnpm/经典 Yarn 在 Agent 会话中的认证方式与 Vercel 构建一致;仅读取团队共享变量而非项目级变量,凭据值保留在沙箱之外、Agent 无法读取。局限是正文未给出可用性范围、配额或安全审计细节,也未说明是否已普遍可用。
72
正文
Vercel Agent can install private dependencies from npm and custom registries using credentials stored as shared environment variables on Vercel. `npm`, `pnpm`, and classic Yarn running in Agent sessions authenticate as they do in Vercel builds.
To get started, add a [shared environment variable](https://vercel.com/docs/environment-variables/shared-environment-variables) for Development or Preview:
* Use `NPM_TOKEN` for private packages hosted on [registry.npmjs.org](https://registry.npmjs.org).
* Use `NPM_RC` to configure custom or multiple registries.
Vercel Agent reads only team-shared variables, not project-scoped ones. Credential values stay outside the sandbox, so the agent cannot read them.
Learn more in the [private dependencies docs](https://vercel.com/docs/agent/private-dependencies).
[Read more](https://vercel.com/changelog/vercel-agent-now-installs-private-packages-from-npm-and-custom-registries)