@agenticprimitives/create-app

中文文档
0.0.0-alpha.34发布于 2026/10/26MITTypeScriptES Module近 30 天下载 3557

The Developer Kit generator (spec 398 §10.3, spec 399 §3.6): create-app <dir> --template product-repo writes a product repository — pnpm workspace, exact @agenticprimitives/* pins, agentic.lock.json, ap doctor + ap test CI, a nightly live-gates work

原始使用文档

@agenticprimitives/create-app

Part of Agentic Primitives — the open-source trust substrate for agentic applications: identity that can sign, authority checked at act time, evidence the owner carries. Developer kit · All packages

npx @agenticprimitives/create-app my-agent-app --template home-client        # the first app: a client of the person's agent
cd my-agent-app && pnpm install && npx ap doctor && pnpm dev                 # Connect with your Home → ask → an act parks for HER signature

npx @agenticprimitives/create-app my-product --template product-repo --pin 1.0.0-alpha.24
cd my-product && pnpm install && npx ap doctor

--template home-client — the Developer Kit's first app (spec 398 §10.1)

A Next.js client of the person's own agent through her Home (spec 397): the app registers itself at her Home MCP (RFC 7591 — no operator step; localhost redirects are accepted), sends her to her Home to connect (OAuth 2.1 + PKCE), holds an opaque bearer bound to /mcp sealed in an httpOnly cookie, and asks her agent as her. A read answers under her standing; an act comes back authority_required with the page on her Home where she signs — the app never collects a signature. pnpm verify runs the two acts live against a development estate's demo person; scripts/verify-devkit-starter.mts in Ring 0 is the G2 exit: generate → install from the registry → doctor → typecheck → tests → build → the two acts, from a clean directory. Files: src/lib/home-agent.ts (the whole protocol, no dependency), src/lib/server.ts, app/api/{connect,callback,ask,me,disconnect}, app/page.tsx, scripts/verify-two-acts.ts, README.md, the projected AGENTS.md/CLAUDE.md/.cursor/rules, .mcp.json (the Developer MCP), agentic.lock.json pinning @agenticprimitives/devkit alone. If the generator is newer than the pinned devkit, npx ap doctor --rules --write re-projects the rules with the pinned corpus (the doctor names the drift).

Writes a product repository the way spec 399 §3.6 describes it — the shape ap-discovery, ap-home and ap-naming are created from, never a copy of the monorepo root:

WrittenPurpose
package.json, pnpm-workspace.yaml, .npmrc, tsconfig.base.jsonpnpm workspace over apps/* + examples/*; strict peers; exact @agenticprimitives/* pins
agentic.lock.jsonthe coherent pin set, the rules-source digests, the doctor config, the template revision
AGENTS.md, CLAUDE.md, .cursor/rules/*.mdcprojected from the pinned rules source (edit the source, run ap doctor --rules --write)
.github/workflows/ci.ymltypecheck · test · ap doctor · ap doctor --rules
.github/workflows/live-gates-nightly.ymlap test --live-gates live-gates.json + ap conform a2a|mcp against the shadow deployment
live-gates.jsonthe gates ledger (spec 392 shape), empty until the first verify script moves in
wrangler.example.tomlthe env layout: env-a / env-b live (Ring 0 deploys until the cut), env-a-split shadow (this repo)
scripts/set-cloudflare-secrets.shper-env secrets from a gitignored .secrets.<env> file, never echoed
DEPLOYER.md, docs/MOVED.mddeployer of record per app + env; the text the cut PR leaves in Ring 0

Options: --name <kebab> (defaults to the directory name), --pin <exact version> (defaults to the generating devkit's version; resolve a dist-tag afterwards with ap upgrade --pin <tag>), --json.

Exit codes: 0 written · 2 usage (non-empty dir, bad name, bad pin, unknown template) · 3 error.

The template carries no hostname, no vertical vocabulary and no key (ADR-0021): every deployment-specific value is a <placeholder> the product fills in.

版本与发布记录

@agenticprimitives/create-app 共发布 34 个版本,首次发布于 2026/09/12;过去 12 个月发布了 34 个版本。

版本发布日期距今
0.0.0-alpha.34latest2026/10/2612 天前
0.0.0-alpha.332026/10/2612 天前
0.0.0-alpha.322026/10/1721 天前
0.0.0-alpha.312026/10/1722 天前
0.0.0-alpha.302026/10/1622 天前
0.0.0-alpha.292026/10/1622 天前

关于 @agenticprimitives/create-app 的常见问题

@agenticprimitives/create-app 是什么?

The Developer Kit generator (spec 398 §10.3, spec 399 §3.6): create-app <dir> --template product-repo writes a product repository — pnpm workspace, exact @agenticprimitives/* pins, agentic.lock.json, ap doctor + ap test CI, a nightly live-gates work

如何安装 @agenticprimitives/create-app?

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

@agenticprimitives/create-app 支持 TypeScript 吗?

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

@agenticprimitives/create-app 支持 ESM 还是 CommonJS?

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

@agenticprimitives/create-app 可以商用吗?

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

@agenticprimitives/create-app 的下载量有多少?

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

@agenticprimitives/create-app 还在维护吗?

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