🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@peac/adapter-managed-agents

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@peac/adapter-managed-agents

Vendor-neutral managed agent runtime event adapter for PEAC interaction evidence

next
latest
Source
npmnpm
Version
0.16.4
Version published
Maintainers
1
Created
Source

@peac/adapter-managed-agents

Vendor-neutral adapter for managed agent runtime event records. Maps 6 event families to signed PEAC Interaction Records.

Installation

pnpm add @peac/adapter-managed-agents

What It Does

@peac/adapter-managed-agents is a Layer 4 adapter that records managed agent runtime events as signed, portable Interaction Records. It supports 6 event families covering the full agent session lifecycle: session management, task submission, tool use, MCP invocation, permission confirmation, and outcome evaluation.

How Do I Use It?

Issue a session lifecycle event

import { issueSessionEvent } from '@peac/adapter-managed-agents';

const result = await issueSessionEvent({
  privateKey, // Ed25519 32 bytes
  kid: 'key-1',
  issuer: 'https://your-issuer.example.com',
  sessionId: 'sess_001',
  agentId: 'agent-001',
  provider: 'your-runtime', // caller-supplied, never hardcoded
  event: 'session.created',
});

// result.jws is a signed Interaction Record (compact JWS)

Build a session summary

import { buildSessionSummary } from '@peac/adapter-managed-agents';

const summary = buildSessionSummary([result1.jws, result2.jws, result3.jws]);
// { sessionId, receipts: 3, families: ['session', 'task', ...], issuer }

buildSessionSummary() decodes JWS payloads to extract metadata but does not verify signatures. Callers must verify receipts first (e.g., via verifyLocal() from @peac/protocol). Throws on malformed JWS input.

Event Families

FamilyType URIKind
Session lifecycleorg.peacprotocol/managed-agent-sessionevidence
Task submissionorg.peacprotocol/managed-agent-taskevidence
Tool useorg.peacprotocol/managed-agent-tool-useevidence
MCP invocationorg.peacprotocol/managed-agent-mcp-callevidence
Permission confirmationorg.peacprotocol/managed-agent-permissionevidence
Outcome evaluationorg.peacprotocol/managed-agent-outcomeevidence

Integrates With

  • @peac/protocol (Layer 3): Receipt issuance and local verification
  • @peac/crypto (Layer 2): JWS decode for session summary extraction
  • @peac/adapter-runtime-governance: Runtime governance records (complementary adapter)

Design

  • Vendor-neutral: No vendor SDK dependencies. The provider field is always caller-supplied.
  • Layer 4: Depends on @peac/protocol and @peac/crypto only.
  • Evidence kind: All event families produce evidence kind Interaction Records.
  • Extension namespace: org.peacprotocol/managed-agent with session_id, event, agent_id, provider fields.

For Agent Developers

If you are building an AI agent or MCP server that needs evidence receipts:

  • Start with @peac/mcp-server for a ready-to-use MCP tool server
  • Use @peac/protocol for programmatic receipt issuance and verification
  • See the llms.txt for a concise overview

License

Apache-2.0

PEAC Protocol is an open source project stewarded by Originary and community contributors.

Docs | GitHub | Originary

Keywords

peac

FAQs

Package last updated on 09 Aug 2026

Did you know?

Socket

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.

Install

Related posts