@ agenticprimitives/ registry - 解析
部分 代理先导 ——代理应用程序的开源信任底板:可以签名的身份,行为时间检查权限,所有者携带的证据. 开发者工具包 • 妇女 所有软件包
编 成 已键入名称解析器 346区: 给定打入的手柄(rpedersen.me, (中文(简体) ), [email protected], (中文(简体) ),
[email protected], (中文(简体) ), discovery.registry)和呼叫者姿态, 它返回对象,它的
衍生类型、发行上下文和活关系(用于 x@ctx 名称),允许的部署
b. 约束性,其代表团 锯,以及登记册/目录证据——作为 六个单独的信号。 。 。 .
它从不返回一个信任的分数 也不授权任何东西.
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
使用量
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)全部被注入: 键入命名为(AgentNamingClient.checkTypedName, (中文(简体) ),
上下文的发行面、代表团实况、成员/作用、
解析器、登记证据和可选目录证据、工作空间读取和代理政策.
流量(第346节)
| 函数 | 它的计划 |
|---|---|
acceptConnectInvitation(invitation, acceptor, now) | 形状 + 到期 + 接受者检查; 返回赠款 + 邀请商店的初始出版物。 登记处没有记录. |
planContextualNameIssuance(input, registryId) | 在接受加入后:未签署 ContextualNameIssuanceV1 体 (单位:千人)kind: 'reference'成员+代表团基础)+ CONTEXTUAL_NAME_ISSUED 日志事件. |
planScopedNameIssuance(input, registryId) | 发布上下文 vault.svc@… 编号 : architecture.team@… 在它自己的命名空间中( e)operated-by 编号 : chartered (b) 基准. |
revokeContextualName(issuance, registryId, now) | 取消上下文名称;条柄未受影响. |
转诊治疗(第9.3节) registry-kit (单位:千美元)admitRegistryEntry (a) 与一名赞助人.
态势默认值(第346页 第8.1节)
defaultDiscoveryPolicyForType(t) - 个人:公共名称、未列入名单、赠款解决;org/服务/登记:
公开; 团队/工作空间: 同意列名, 认证分辨率; 金库: 未列名,
赠款解决. callerAdmittedBy(policy, posture) 是单项录取规则.
这个包裹拒绝做什么
持有状态,打开交通工具,决定批准,级别,或者退后. 见 CLAUDE.md。 。 。 .