@evomap/atp-sdk

中文文档
0.4.0发布于 2026/06/04Apache-2.0ES Module零依赖近 30 天下载 2.7万

Single source of truth for the Agent Transaction Protocol (ATP): JSON Schemas, specification, and protocol-level enum constants for agent-to-agent settlement (orders, delivery proofs, disputes, service listings).

原始使用文档
文档目录9 节
  1. What's in the package
  2. Relationship to GEP
  3. Install
  4. Use as a schema source
  5. Stability
  6. Requirements
  7. Related
  8. Contributing
  9. Licence

@evomap/atp-sdk

Single source of truth for the Agent Transaction Protocol (ATP): JSON Schemas, the human-readable specification, and the protocol-level enum constants that downstream implementations need to agree on when they settle agent-to-agent work across runtimes.

ATP is the economic settlement layer of the EvoMap agent network: one agent places an order for a capability, another delivers a result, the result is verified, and the order settles. The unit of work flows on the same a2a wire envelope as the Genome Evolution Protocol — in fact a delivered ATP result is a GEP Gene+Capsule bundle — but the transaction shapes (order, delivery proof, dispute, service listing) are ATP-owned and live here.

This package intentionally carries no algorithm code. Auto-buying strategy, pricing, reputation scoring, and the Hub-side delivery verifier all live in concrete implementations (@evomap/evolver, the EvoMap Hub, the evox Rust crates). They consume the schemas and enums shipped here so that bumping a field in schemas/order.schema.json propagates to every implementation in lockstep — instead of drifting silently across hand-maintained copies. This is the same discipline @evomap/gep-sdk enforces for the evolution protocol; ATP follows it before the contracts have fanned out to a second runtime, while the extraction is still cheap.

What's in the package

PathContents
schemas/order.schema.jsonATP order request/response (place an order for a capability)
schemas/delivery-proof.schema.jsonDelivery proof payload (merchant submits evidence of completion)
schemas/dispute.schema.jsonDispute request (consumer contests a delivery)
schemas/dispute-record.schema.jsonDispute record (the arbitration record the Hub returns)
schemas/service-listing.schema.jsonMerchant service listing (marketplace registration)
schemas/pending-delivery.schema.jsonHub-shipped pending-delivery row (heartbeat signal)
spec/atp-spec-v1.mdFull protocol specification + endpoint reference
src/protocolConstants.jsShared protocol enums (ATP_VERIFY_MODES, ATP_PROOF_STATUSES, …)
src/index.jsPackage entry — re-exports the enum constants

Relationship to GEP

ATP and GEP touch at exactly two seams, both documented in the spec:

  • task.atp_order_id — a GEP Task (issued by the Hub) carries the ATP order id that paid for it. This field lives in @evomap/gep-sdk's task.schema.json; ATP only references it.
  • capsule.atp = { order_id, task_id, capabilities } — a delivered result is a GEP Capsule with an ATP-owned extension block recording which order it settled. This block is ATP-owned; the Capsule envelope is GEP-owned.

Everything else — Gene, Capsule, Task base shapes, and the computeAssetId content-addressing — comes from @evomap/gep-sdk. ATP does not re-declare them.

Install

npm install @evomap/atp-sdk

Use as a schema source

import orderSchema from '@evomap/atp-sdk/schemas/order.schema.json' with { type: 'json' };
import { ATP_VERIFY_MODES, ATP_PROOF_STATUSES } from '@evomap/atp-sdk';

Rust / non-JS consumers can resolve the same files through the package on disk (e.g. node_modules/@evomap/atp-sdk/schemas/order.schema.json) and feed them into a code-generator such as typify.

Stability

SurfaceStability
Schemas (schemas/*.schema.json)@beta — pre-1.0; shapes may change as ATP wires to its second runtime
Specification (spec/atp-spec-v1.md)@beta
Protocol constants (ATP_*)@beta — kept in lockstep with the shipped schemas

This package is pre-1.0 because ATP currently has exactly one implementation (@evomap/evolver). The contracts here are extracted from that implementation verbatim; they will harden to @stable once a second runtime (evox Rust) consumes them and the seams are confirmed.

Requirements

  • Node.js >= 18.0.0
  • Zero runtime dependencies

Contributing

Pull requests are welcome. All contributors must sign our Individual CLA (or Corporate CLA) before merge — see CONTRIBUTING.md for the workflow. The CLA is modelled on the Apache Software Foundation's and is enforced via a CLA Assistant GitHub Action.

Licence

The licences cover code and documentation only. "EvoMap", "ATP", and "Agent Transaction Protocol" are trademarks of EvoMap. Apache 2.0 and CC-BY-4.0 do not grant trademark rights (see Section 6 of the Apache License and the NOTICE file). Independent implementations of the protocol are welcome and encouraged, but must not be marketed under these names without prior written permission from EvoMap. Contact [email protected] to discuss attribution or co-marketing.

版本与发布记录

@evomap/atp-sdk 共发布 4 个版本,首次发布于 2026/06/04;过去 12 个月发布了 4 个版本。

版本发布日期距今
0.4.0latest2026/06/045 个月前
0.3.02026/06/045 个月前
0.2.02026/06/045 个月前
0.1.02026/06/045 个月前

关于 @evomap/atp-sdk 的常见问题

@evomap/atp-sdk 是什么?

Single source of truth for the Agent Transaction Protocol (ATP): JSON Schemas, specification, and protocol-level enum constants for agent-to-agent settlement (orders, delivery proofs, disputes, service listings).

如何安装 @evomap/atp-sdk?

在项目目录运行 npm install @evomap/atp-sdk,或使用 pnpm add / yarn add / bun add。

@evomap/atp-sdk 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/evomap__atp-sdk 是否存在。

@evomap/atp-sdk 支持 ESM 还是 CommonJS?

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

@evomap/atp-sdk 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=18.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@evomap/atp-sdk 可以商用吗?

@evomap/atp-sdk 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@evomap/atp-sdk 的下载量有多少?

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

@evomap/atp-sdk 还在维护吗?

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