@adlc/init

中文文档
1.12.0发布于 2026/10/10MITES Module构建来源已验证近 30 天下载 8118

Idempotent ADLC repository bootstrap, including Codex project agents.

原始使用文档

@adlc/init

Idempotently bootstrap the committable .adlc/ runtime and the project-scoped .codex/agents/ roles used by the native Codex integration.

From the current checkout (before the matching suite release):

node packages/init/bin/adlc-init.mjs --root /path/to/repo

After the matching @adlc/cli release:

adlc init
adlc init --root /path/to/repo --json

The initializer preserves existing files, refuses symlink escapes from the project root, and never edits user-global ~/.codex implicitly.

When .adlc/config.json is present but is not readable JSON, adlc init records a warning and exits 1 without overwriting the broken file. The same holds when --harness is passed and the config's harnesses field is present but not an object: the harness cannot be registered, so the run fails instead of reporting success.

When .gitignore contains mis-ordered rules that cause required committable paths to be ignored, adlc init records a warning and exits 1 without reporting the file unchanged. If the file has no .adlc/* anchor yet, adlc init appends the whole ADLC stanza and moves any stanza line found above it into place, so its own append never leaves a negation dead. The rules are checked with git check-ignore: in the repository when git can open it, otherwise in a throwaway repository holding only the .gitignore (for example before git init). Only without a git binary does a built-in matcher decide, and it follows git's rule that nothing under an ignored directory can be re-included.

Security modes

Every scaffolded .adlc/config.json sets securityMode: "unsigned-fallback". This is deliberate, not an oversight: the alternative, "signed", requires a dedicated signed-runner pool (ADLC_SIGNED_RUNNER_POOL=1, a pinned runner binary sha256) that cannot be bootstrapped by adlc init itself — a repo's very first .adlc/ commit is refused in signed mode (packages/rails-guard/lib/ci/bootstrap.mjs) and must upgrade into it later through a protected-base runner ceremony.

What unsigned-fallback actually weakens: gate-manifest evidence (.adlc/manifest.jsonl / manifest.d/) is accepted without a cryptographic signature from that runner pool — a P5 review record, a mutation-gate pass, or a cross-model attestation is trusted at face value rather than verified against a signed chain. signed mode closes that gap once the runner-pool ceremony has run. Repos with a real trust boundary between the agent and the CI runner (untrusted contributors, a compliance requirement) should plan the upgrade; unsigned-fallback is the correct starting point for everyone else.

版本与发布记录

@adlc/init 共发布 12 个版本,首次发布于 2026/07/15;过去 12 个月发布了 12 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.12.0latest2026/10/1027 天前
1.11.12026/09/091 个月前
1.11.02026/08/252 个月前
1.10.02026/08/112 个月前
1.9.02026/08/092 个月前
1.8.02026/08/082 个月前

关于 @adlc/init 的常见问题

@adlc/init 是什么?

Idempotent ADLC repository bootstrap, including Codex project agents.

如何安装 @adlc/init?

在项目目录运行 npm install @adlc/init,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 adlc-init,可以用 npx adlc-init 直接运行。

@adlc/init 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/adlc__init 是否存在。

@adlc/init 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@adlc/init 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=18。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@adlc/init 可以商用吗?

@adlc/init 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@adlc/init 的下载量有多少?

根据 npm 官方下载统计,@adlc/init 在 2026/10/05 – 2026/11/03 这 30 天内被下载 8,118 次,日均约 271 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@adlc/init 还在维护吗?

最新版本 1.12.0 发布于 2026/10/10(27 天前);至今共发布 12 个版本,其中过去 12 个月发布了 12 个;首次发布于 2026/07/15。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。