@ agenticprimitives/ devkit (英语)
部分 代理先导 ——代理应用程序的开源信任底板:可以签名的身份,行为时间检查权限,所有者携带的证据. 开发者工具包 • 妇女 所有软件包
开发者 Kit 核心 —— ap,CLI即是包裹自己的前门(Spec 398 §10,Spec 399 §3,ADR-0063).
npx ap doctor # every rule, this tree, the config it found
npx ap doctor --rule no-private-keys # one rule; --json for a coding agent
npx ap doctor --rules --write # project the rules source; pin digests in agentic.lock.json
npx ap upgrade --canary # newest canary of every @agenticprimitives/* pin, one exact set
npx ap upgrade --pin 1.0.0-alpha.24 # or one named version / dist-tag
npx ap conform a2a https://… # A2A 1.0 conformance (dispatches to @agenticprimitives/a2a)
npx ap test --live-gates live-gates.json
npx ap create my-product --template product-repo --pin 1.0.0-alpha.24
医生规则
每个规则都是一个文件 src/rules/,数据加上一个纯判断,参数化为配置部分。 这个
ids是第399章第2.3节给出的 根检:
| 规则 | 双( 根检查) | 强制执行 |
|---|---|---|
web-no-direct-mcp | check:no-direct-mcp-in-web | CDR-0044 — 浏览器代码只通过 /a2a/* |
no-private-keys | check:no-app-private-keys | 应用程序源中没有原始关键材料; 允许列表及理由 |
no-hmac-home-bridge | check:no-hmac-home-bridge | 341 spec 341 retchet——桥倒倒了 |
no-cross-subject-vault-reads | check:no-cross-subject-vault-reads | spec 366 R3 — 只读于本主题 |
fail-open-knobs | check:fail-open-knobs | ADR-0045——每个允许的把手按名称列出 |
internal-marker-split | check:internal-marker-split | spec 341 第7节——标出监护秘密 |
custodian-coverage | check:custodian-coverage | 第294/295段——提供者中立保管人 |
archetype-catalog | check:archetype-catalog | spec 354 第3节——在已记录摘要中验证目录 |
capability-vocabulary | check:capability-vocabulary | ADR-0051 — 能力/ 协议特性/ 游戏本 |
demo-person-org-distinct | check:demo-person-org-distinct | ADR-0046 — 个人 SA → org SA |
rules-drift | —— 说 | 399 第3.4节——通过文摘对定点源进行预测 |
lock-coherent | —— 说 | 399 第3.1节——准确、连贯 @agenticprimitives/* 针头 |
配置解析是一个机制: ap.config.json#doctor,则 agentic.lock.json#doctor,否则内置
代理初始器单列波的参考布局。 产品Repo 从它自己的部分 create-app。 。 。 .
退出代码 : 0 - 干净 1 调查结果 · 2 使用或配置 3 规则或发送错误。 错误代码为
稳定字符串( e)E_CONFIG, (中文(简体) ), E_RULE_UNKNOWN, (中文(简体) ), E_MODULE_ABSENT因此,一个代理分支 在代码.
规则预测
ap doctor --rules 一个规则来源 .cursor/rules/*.mdc (从 rules/sidecar.json, (中文(简体) ),
和输入 <!-- ap:rules -->…<!-- /ap:rules --> 块 AGENTS.md 财务报告和审定财务报表 CLAUDE.md。 。 。 .
一个没有块的文件被单独留下. 文摘载于 agentic.lock.json#rules· ; rules-drift 失败
投影或一针不再匹配源。 在这个单曲中,来源是 docs/architecture/agent-rules· ;
消费者使用包裹中的拷贝.
agentic.lock.json
{ "lockVersion": 1, "packages": { "@agenticprimitives/a2a": "1.0.0-alpha.24" }, "rules": { "skill-terminology": "sha256:…" }, "devkit": "…", "template": { "name": "product-repo", "revision": "…" }, "doctor": { … } }
packages 是整齐的组合 ap upgrade 维护; rules 源摘要; doctor 产品规则
配置(每节都取代参考部分整体).
固定的定义—— ap upgrade (398 第10.3节)
ap upgrade --pin-definitions <registry> agentic-trust/org-steward,agentic-trust/person-steward 记录,在
agentic.lock.json#definitions,每个类型定义的文摘和 权威形状 每个工具(风险,
行动、要求类型、资源和权力依据、批准政策、效果、一能。 以后的每一个月 ap upgrade
首先阅读登记处:修改措辞是版本起伏;修改其中任何一个字段,就停止升级
每个工具命名的更改( e)treasury.payment.execute: authorityArg payer → org),以及 --accept-definitions 重开一次
评论员看过了 指针是评论员的记忆,从来不是核查员的输入.
开发者 MCP (ap mcp(中文(简体) )
编码代理主产卵 ap mcp (stio JSON -RPC) 并得到一个 只读 服务器 : packages_list, (中文(简体) ),
package_exports (每个条目的名称) .d.ts 声明, ontology_term (T-box IRI,标签,评论——什么是名词)
和它不是什麽, contract_deployments (每个链的地址), recipes (代理规则和每项规则)
软件包的光谱, doctor (同一报告已编辑) 一切从安装在旁边的包裹中解答.
这是 第三届 MCP——不是运行时间背后的私人MCP(ADR-0057),也不是Home MCP(Spec 397)——
联 合 国 ap://developer-mcp/doctrine 资源首先如此:没有签名密钥,没有金库,没有权威,没有生产
效果(Spec 398 第10.4节,T23)。 克劳德代码 : claude mcp add ap-dev -- npx ap mcp --root .
ap generate client|cli|parity 一份合同的第四和第五表面(398§7.2)
ap generate client --registry https://<skills-registry> --definition agentic-trust/person-steward --only web.search,person.memory.remember --out src/lib/agent-client.ts
ap generate cli --registry … --definition agentic-trust/org-steward --only treasury.payment.execute
ap generate parity --registry … --definition agentic-trust/org-steward --json
根据汇编的定义(登记册,或 --file <definition.json>作者: @agenticprimitives/harness是因为
纯 generateCapabilityClient 编号 : cliArgumentSchema 编号 : generateParityCases - 给消费者的风筝
安装( 缺席 ) E_MODULE_ABSENT) (中文(简体) ). 客户端的每个操作都给应用程序贴上意图 /harness/run 边界
通过注入的端口,没有权限;对等的个案是正对(屏幕意图对询问)
− 相同的普通计划摘要)和负对(伪造) surface,在批准后变更政党.
于 ap upgrade 移动被绑定的定义.
ap eval - 作为家庭现场数据的案件(398 §10/P1.3)
ap eval evals/faithnet.eval.json --home https://www.faithnet.me --persona alice --report live-gates-reports/eval-faithnet-latest.json
ap eval --from-runs --home https://www.faithnet.me --persona alice --out evals/from-runs.eval.json
一个案子是 { id, incident, persona | (the --session bearer), addressee?, message, plan?, truth?, checks[] }; 检查是
以姓名命名的确定法官之一(answered, (中文(简体) ), replyKindIs, (中文(简体) ), neverClaims, (中文(简体) ), claimsRequire, (中文(简体) ), falseEmptiness, (中文(简体) ),
emptinessCarriesReason, (中文(简体) ), evidenceFromTool, (中文(简体) ), evidenceCountAgrees, (中文(简体) ), noPlaceholderLeaks, (中文(简体) ), textIncludes, (中文(简体) ),
textExcludes, (中文(简体) ), evidenceNoneFrom) (中文(简体) ). 一件案子的正确结果是 authority_required 双胞胎作为测试;
爱华从不示意 一个无法解决的案件是FAILING案件. --from-runs 将特工的现场记录变成案件
要编辑的骨架。 在任何失败的情况下退出 1 .
它不会做的
握有钥匙,读出金库,薄荷权威,援引出产效果. 医生的发现是一个审查检查站; 没有核查者读取(第361节).