@agenticprimitives/registry-resolution

中文文档
1.0.0-alpha.40发布于 2026/10/26MITTypeScriptES Module零依赖近 30 天下载 1715

The composed typed resolver (spec 346 §6.3/§8/§9): typed name → subject → derived type → (context → relationship) → permitted publication → bindings, returned as SEPARATE signals (subject / context / relationship / bindings / authority / evidence — never

原始使用文档
文档目录4 节
  1. Usage
  2. Flows (spec 346 §9)
  3. Posture defaults (spec 346 §8.1)
  4. What this package refuses to do

@agenticprimitives/registry-resolution

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

The composed typed-name resolver of spec 346: given a typed handle (rpedersen.me, [email protected], [email protected], discovery.registry) and a caller posture, it returns the subject, its derived type, the issuing context and the live relationship (for x@ctx names), the permitted deployment bindings, the delegations it saw, and the registry/directory evidence — as six separate signals. It never returns a trust score and never authorizes anything.

parseAgentName ─▶ checkTypedName (suffix ↔ on-chain atl:agentType ↔ root; fail closed)
   │ x@ctx: issuance (posture-gated) ─▶ basis live? (membership · role gate · delegation) ─▶ ContextualAgentReferenceV1
   ▼
discovery policy (per-agent or the per-type default) ─▶ is THIS caller admitted? (one mechanism)
   ▼
publication via the caller's reference kind (ans-name | private-grant | direct-invitation) ─▶ bindings
   ▼
registry entries + directory evidence ─▶ TypedResolutionResultV1

Usage

import { resolveTypedName } from '@agenticprimitives/registry-resolution';

const out = await resolveTypedName('[email protected]', { posture: 'grant', requester, grantId, presentation }, ports);
if (out.ok) {
  out.result.subject;       // { agentId, derivedType: 'person', root: 'person', name, legacy: false, typeConsistent: true }
  out.result.context;       // { agentId: richcanvas.org's SA, derivedType: 'org', name: 'richcanvas.org' }
  out.result.relationship;  // { membershipId, roleAssignmentId?, delegationHash, current: true, basis: 'membership' }
  out.result.bindings;      // { host, agentCardUrl, a2aEndpoint, surfaces, publication } — from the signed publication
  out.result.authority;     // { note: 'resolution-is-not-authority', delegationsSeen: [...] }
  out.result.evidence;      // { registryEntries, assurance, directory }
} else {
  out.reason;               // 'unregistered' | 'type_mismatch' | 'issuance_not_found' | 'basis_not_current' | 'not_permitted' | …
}

ports (TypedResolverPorts) are all injected: the typed-naming read (AgentNamingClient.checkTypedName), the context's issuance surface, delegation liveness, membership/role reads, the agent-resolution composed resolver, registry evidence, and optionally directory evidence, workspace reads and per-agent policies.

Flows (spec 346 §9)

FunctionWhat it plans
acceptConnectInvitation(invitation, acceptor, now)shape + expiry + recipient checks; returns the grant + initial publication the invitee stores. The registry records nothing.
planContextualNameIssuance(input, registryId)after a join is accepted: the unsigned ContextualNameIssuanceV1 body (kind: 'reference', membership + delegation basis) + the CONTEXTUAL_NAME_ISSUED log event.
planScopedNameIssuance(input, registryId)a context issuing vault.svc@… / architecture.team@… in its own namespace (operated-by / chartered basis).
revokeContextualName(issuance, registryId, now)deactivates the contextual name; the canonical handle is untouched.

Referral admission (§9.3) lives in registry-kit (admitRegistryEntry with a sponsor).

Posture defaults (spec 346 §8.1)

defaultDiscoveryPolicyForType(t) — person: public name, unlisted, grant-resolved; org / service / registry: public; team / workspace: consented listing, authenticated resolution; treasury: unlisted, grant-resolved. callerAdmittedBy(policy, posture) is the single admission rule.

What this package refuses to do

Hold state, open a transport, decide authorization, rank, or fall back. See CLAUDE.md.

版本与发布记录

@agenticprimitives/registry-resolution 共发布 19 个版本,首次发布于 2026/09/12;过去 12 个月发布了 19 个版本。

版本发布日期距今
1.0.0-alpha.40latest2026/10/2614 天前
1.0.0-alpha.392026/10/1724 天前
1.0.0-alpha.382026/10/1624 天前
1.0.0-alpha.372026/10/1624 天前
1.0.0-alpha.362026/10/1624 天前
1.0.0-alpha.352026/10/1624 天前

关于 @agenticprimitives/registry-resolution 的常见问题

@agenticprimitives/registry-resolution 是什么?

The composed typed resolver (spec 346 §6.3/§8/§9): typed name → subject → derived type → (context → relationship) → permitted publication → bindings, returned as SEPARATE signals (subject / context / relationship / bindings / authority / evidence — never

如何安装 @agenticprimitives/registry-resolution?

在项目目录运行 npm install @agenticprimitives/registry-resolution,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@agenticprimitives/types(^1.0.0-alpha.45)、@agenticprimitives/situations(^0.0.0-alpha.29)、@agenticprimitives/agent-naming(^1.0.0-alpha.45)、@agenticprimitives/organization(^0.0.0-alpha.29)、@agenticprimitives/registry-kit(^0.0.0-alpha.28)、@agenticprimitives/agent-resolution(^0.0.0-alpha.21)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@agenticprimitives/registry-resolution 支持 TypeScript 吗?

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

@agenticprimitives/registry-resolution 支持 ESM 还是 CommonJS?

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

@agenticprimitives/registry-resolution 可以商用吗?

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

@agenticprimitives/registry-resolution 的下载量有多少?

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

@agenticprimitives/registry-resolution 还在维护吗?

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