@agenticprimitives/capability-claims

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

Capability claim credentials (SkillClaimCredential) + on-chain SkillDefinitionRegistry helpers (spec 251). NOT Agent Skill SKILL.md packages.

原始使用文档
文档目录4 节
  1. Vocabulary
  2. Card curation (spec 347 §5)
  3. Import
  4. Seeded catalog (ADR-0051) — src/catalog/

@agenticprimitives/capability-claims

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

Capability claim credentials (SkillClaimCredential) and on-chain SkillDefinitionRegistry helpers (spec 251).

Not Agent Skill packages (SKILL.md). See ADR-0051 and .cursor/rules/skill-terminology.mdc.

Vocabulary

TermMeaning
Capability definitionStable AP semantic capability (CapabilityDefinition)
Capability claimPrivate VC asserting possession/proficiency
OASF skill taxonClassification projection
A2A AgentSkillAdvertisement projection
Agent Skill packageSKILL.md procedural playbook
MCP toolExecutable operation

Card curation (spec 347 §5)

Pure helpers that take vault claims to a public A2A card without ever widening disclosure:

import { selectPublicSkillClaims, buildA2ASkillCandidates, mapSkillClaimToTaxonomy } from '@agenticprimitives/capability-claims';

const { selected, omitted } = selectPublicSkillClaims(claims, { policyId: 'card-1', maxSkills: 12 });
const { candidates, diagnostics } = buildA2ASkillCandidates(selected, definitions); // id = the stable CURIE
const { mapping, status } = mapSkillClaimToTaxonomy('adv:asset-allocation', mappings, { taxonomy: 'oasf', taxonomyVersion: '1.1.0' });
  • Only public / public-coarse claims are ever selected; a policy naming a private visibility discloses nothing. Every omission is reported with a reason.
  • A candidate's id is the capability's stable id (the CURIE computeSkillId hashes); proficiency, evidence commitments and nonces never leave the claim.
  • SkillTaxonomyMappingV1.relation (exact | close | broad | narrow) is a SKOS mapping relation (skosRelationFor). A mapping asserted for another taxonomy version is review-required, never silently reused; broad/narrow without evidence yields an evidenceNeeded diagnostic.

Import

import { buildSkillClaimCredential, type CapabilityDefinition } from '@agenticprimitives/capability-claims';

Legacy alias: @agenticprimitives/agent-skills re-exports this package.

Seeded catalog (ADR-0051) — src/catalog/

The definitions an agent SELECTS from. listCapabilityDefinitions · getCapabilityDefinition · mappingsFor · isKnownCapabilityId.

Read-only this wave. SkillDefinitionRegistry can enumerate on-chain definitions and is empty; nothing here is minted to it yet, so this module is the source of truth for what may be claimed. When definitions are published on chain it becomes a projection of that registry and the ids do not change — an id is a CURIE, and its keccak is the on-chain skillId.

Why a catalog: the editor used to slug free text into an id, so two agents describing one ability produced two ids and a matcher could not tell they matched.

Mappings assert something, so they are sparse on purpose. No OASF or HCS-26 class id appears unless it can be cited against a published schema; the 45 advisory rows are unmapped, and the explorer says "no mapping at this taxonomy version" rather than showing an invented class that would read as authority. hcs26 is the skill taxon — hcs14 is UAID, an agent identifier, and a capability does not map to one.

版本与发布记录

@agenticprimitives/capability-claims 共发布 32 个版本,首次发布于 2026/07/14;过去 12 个月发布了 32 个版本。

版本发布日期距今
0.0.0-alpha.46latest2026/10/2610 天前
0.0.0-alpha.452026/10/2610 天前
0.0.0-alpha.442026/10/1720 天前
0.0.0-alpha.432026/10/1720 天前
0.0.0-alpha.422026/10/1620 天前
0.0.0-alpha.412026/10/1620 天前

关于 @agenticprimitives/capability-claims 的常见问题

@agenticprimitives/capability-claims 是什么?

Capability claim credentials (SkillClaimCredential) + on-chain SkillDefinitionRegistry helpers (spec 251). NOT Agent Skill SKILL.md packages.

如何安装 @agenticprimitives/capability-claims?

在项目目录运行 npm install @agenticprimitives/capability-claims,或使用 pnpm add / yarn add / bun add。

@agenticprimitives/capability-claims 支持 TypeScript 吗?

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

@agenticprimitives/capability-claims 支持 ESM 还是 CommonJS?

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

@agenticprimitives/capability-claims 可以商用吗?

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

@agenticprimitives/capability-claims 的下载量有多少?

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

@agenticprimitives/capability-claims 还在维护吗?

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