
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@peac/mappings-a2a
Advanced tools
Agent-to-Agent Protocol (A2A) integration for PEAC: maps A2A agent cards, task states, and metadata to PEAC evidence carriers.
pnpm add @peac/mappings-a2a
@peac/mappings-a2a bridges PEAC signed interaction receipts and the Agent-to-Agent Protocol (A2A). It validates A2A v1.0.0 Agent Card structures, attaches and extracts PEAC evidence carriers from A2A metadata, and discovers PEAC capabilities advertised by remote agents. All carrier operations enforce transport constraints (64 KB embed limit for A2A).
A2A v0.3.0 compatibility (dual-version Agent Cards, top-level url, kebab-case TaskState normalization, /.well-known/agent.json legacy discovery path) was deprecated in v0.12.3 and removed in v0.13.0 (DD-186). This package accepts A2A v1.0.0 shapes only; see docs/MIGRATION_CURRENT.md for the migration guide.
import { normalizeAgentCard } from '@peac/mappings-a2a';
const card = {
name: 'billing-agent',
supportedInterfaces: [
{ url: 'https://billing.example.com', protocolBinding: 'http+json', protocolVersion: '1.0.0' },
],
};
const normalized = normalizeAgentCard(card);
if (normalized) {
console.log(normalized.url); // 'https://billing.example.com'
}
// Cards without a valid supportedInterfaces[0].url (including legacy
// v0.3.0 cards that used top-level `url`) return null.
import { attachReceiptToTaskStatus } from '@peac/mappings-a2a';
import type { PeacEvidenceCarrier } from '@peac/kernel';
const carrier: PeacEvidenceCarrier = {
receipt_ref: 'sha256-abc123...',
receipt_jws: 'eyJ...',
};
const status = { state: 'TASK_STATE_COMPLETED', metadata: {} };
attachReceiptToTaskStatus(status, [carrier]);
// status.metadata now contains the PEAC extension payload
import { extractReceiptFromMetadata } from '@peac/mappings-a2a';
const result = extractReceiptFromMetadata(taskStatus.metadata);
if (result) {
console.log(result.receipts.length); // number of valid carriers
console.log(result.meta.transport); // 'a2a'
}
import { A2ACarrierAdapter, createA2ACarrierMeta } from '@peac/mappings-a2a';
const adapter = new A2ACarrierAdapter();
const meta = createA2ACarrierMeta();
// Extract from incoming TaskStatus
const extracted = adapter.extract(incomingStatus);
// Attach to outgoing TaskStatus
const outgoing = adapter.attach(responseStatus, carriers, meta);
import { discoverPeacCapabilities } from '@peac/mappings-a2a';
const result = await discoverPeacCapabilities('https://agent.example.com');
if (result) {
console.log(result.source); // 'agent_card' | 'well_known' | 'header_probe'
console.log(result.kinds); // supported receipt kinds
console.log(result.carrier_formats); // supported carrier formats
}
@peac/kernel (Layer 0): Evidence carrier types and constants@peac/schema (Layer 1): Carrier schema validation and receipt ref consistency@peac/protocol (Layer 3): Receipt issuance and verification@peac/mcp-server (Layer 5): MCP tool server with A2A interoperabilityIf you are building an AI agent that communicates via A2A and needs signed interaction receipts:
normalizeAgentCard() to validate incoming A2A v1.0.0 Agent Cards (cards without a valid supportedInterfaces[0].url return null)attachReceiptToTaskStatus() to embed evidence in outgoing A2A messagesextractReceiptFromMetadata() to retrieve evidence from incoming A2A messagesA2ACarrierAdapter for a transport-agnostic carrier interfacediscoverPeacCapabilities() to check whether a remote agent supports PEAC before sending receiptsApache-2.0
PEAC Protocol is an open source project stewarded by Originary and community contributors.
FAQs
Agent-to-Agent Protocol (A2A) integration for PEAC
We found that @peac/mappings-a2a demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.