@agentplaneorg/core

中文文档
0.7.13发布于 2026/11/04MITTypeScriptES Module构建来源已验证近 30 天下载 1903

Core libraries for Agentplane repository-native task, policy, and verification workflows.

原始使用文档
文档目录7 节
  1. Install
  2. Requirements
  3. Usage
  4. Exported modules
  5. Stability
  6. Docs
  7. License

Agentplane header

@agentplaneorg/core

npm License: MIT Node.js 20+

Core utilities and models used by the agentplane CLI.

This package powers the CLI's repo-visible contracts: project discovery, configuration loading, commit-subject validation, task README parsing/rendering, task exports, Agent Change Record (ACR) schema helpers, and workflow metadata utilities. If you are an end user, install the CLI instead:

npm install -g agentplane

Install

npm install @agentplaneorg/core

Requirements

  • Node.js 20+
  • ESM-only (type: module)

Usage

import {
  resolveProject,
  loadConfig,
  listTasks,
  readTask,
  buildTasksExportSnapshot,
} from "@agentplaneorg/core";

const project = await resolveProject(process.cwd());
const config = await loadConfig(project.root);
const tasks = await listTasks(project.root);
const task = await readTask(project.root, tasks[0]?.id ?? "");
const snapshot = await buildTasksExportSnapshot(project.root);

console.log(config.data.workflow_mode, task?.id, snapshot.meta.version);

The root import is a backward-compatible aggregate export. Prefer narrow subpaths for new code:

import { validateCommitSubject } from "@agentplaneorg/core/commit";
import { GitContext } from "@agentplaneorg/core/git";
import { runProcess } from "@agentplaneorg/core/process";
import { renderTaskReadme } from "@agentplaneorg/core/tasks";

Exported modules

Import pathAreaHighlights
@agentplaneorg/coreFull APIBackward-compatible aggregate export
@agentplaneorg/core/commitCommitCommit-subject parsing and validation
@agentplaneorg/core/configConfigConfig schema, loading, validation, and default handling
@agentplaneorg/core/fsFilesystemAtomic write helpers
@agentplaneorg/core/gitGitGit context, base branch helpers, and changed-file helpers
@agentplaneorg/core/processProcessProcess execution helpers
@agentplaneorg/core/schemasSchemasSchema renderers, ACR schema access, and task metadata validators
@agentplaneorg/core/tasksTasksTask docs, task stores, task exports, and README rendering utilities

Stability

SurfaceStability
Published subpath exportsStable across patch releases
Root aggregate exportBackward compatible until a breaking release
Internal file layoutNot public API
Task/schema contractsVersioned through repo-visible specs

Docs

License

MIT

版本与发布记录

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

版本发布日期距今
0.7.13latest2026/11/044 天前
0.7.122026/09/291 个月前
0.7.112026/09/221 个月前
0.7.102026/09/201 个月前
0.6.302026/09/171 个月前
0.7.92026/09/171 个月前

关于 @agentplaneorg/core 的常见问题

@agentplaneorg/core 是什么?

Core libraries for Agentplane repository-native task, policy, and verification workflows.

如何安装 @agentplaneorg/core?

在项目目录运行 npm install @agentplaneorg/core,或使用 pnpm add / yarn add / bun add。

@agentplaneorg/core 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@agentplaneorg/core 支持 ESM 还是 CommonJS?

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

@agentplaneorg/core 需要什么版本的 Node.js?

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

@agentplaneorg/core 可以商用吗?

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

@agentplaneorg/core 的下载量有多少?

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

@agentplaneorg/core 还在维护吗?

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