@peac/adapter-managed-agents 0.12.9 → 0.12.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +47 -13
  2. package/package.json +7 -5
package/README.md CHANGED
@@ -1,22 +1,23 @@
1
1
  # @peac/adapter-managed-agents
2
2
 
3
- Vendor-neutral adapter for managed agent runtime event evidence. Maps 6 event families to signed PEAC Interaction Records.
3
+ Vendor-neutral adapter for managed agent runtime event records. Maps 6 event families to signed PEAC Interaction Records.
4
4
 
5
- ## Event Families
5
+ ## Installation
6
+
7
+ ```bash
8
+ pnpm add @peac/adapter-managed-agents
9
+ ```
10
+
11
+ ## What It Does
12
+
13
+ `@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.
6
14
 
7
- | Family | Type URI | Kind |
8
- | ----------------------- | ------------------------------------------- | -------- |
9
- | Session lifecycle | `org.peacprotocol/managed-agent-session` | evidence |
10
- | Task submission | `org.peacprotocol/managed-agent-task` | evidence |
11
- | Tool use | `org.peacprotocol/managed-agent-tool-use` | evidence |
12
- | MCP invocation | `org.peacprotocol/managed-agent-mcp-call` | evidence |
13
- | Permission confirmation | `org.peacprotocol/managed-agent-permission` | evidence |
14
- | Outcome evaluation | `org.peacprotocol/managed-agent-outcome` | evidence |
15
+ ## How Do I Use It?
15
16
 
16
- ## Usage
17
+ ### Issue a session lifecycle event
17
18
 
18
19
  ```typescript
19
- import { issueSessionEvent, buildSessionSummary } from '@peac/adapter-managed-agents';
20
+ import { issueSessionEvent } from '@peac/adapter-managed-agents';
20
21
 
21
22
  const result = await issueSessionEvent({
22
23
  privateKey, // Ed25519 32 bytes
@@ -31,15 +32,34 @@ const result = await issueSessionEvent({
31
32
  // result.jws is a signed Interaction Record (compact JWS)
32
33
  ```
33
34
 
34
- ## Session Summary
35
+ ### Build a session summary
35
36
 
36
37
  ```typescript
38
+ import { buildSessionSummary } from '@peac/adapter-managed-agents';
39
+
37
40
  const summary = buildSessionSummary([result1.jws, result2.jws, result3.jws]);
38
41
  // { sessionId, receipts: 3, families: ['session', 'task', ...], issuer }
39
42
  ```
40
43
 
41
44
  `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.
42
45
 
46
+ ## Event Families
47
+
48
+ | Family | Type URI | Kind |
49
+ | ----------------------- | ------------------------------------------- | ---------- |
50
+ | Session lifecycle | `org.peacprotocol/managed-agent-session` | `evidence` |
51
+ | Task submission | `org.peacprotocol/managed-agent-task` | `evidence` |
52
+ | Tool use | `org.peacprotocol/managed-agent-tool-use` | `evidence` |
53
+ | MCP invocation | `org.peacprotocol/managed-agent-mcp-call` | `evidence` |
54
+ | Permission confirmation | `org.peacprotocol/managed-agent-permission` | `evidence` |
55
+ | Outcome evaluation | `org.peacprotocol/managed-agent-outcome` | `evidence` |
56
+
57
+ ## Integrates With
58
+
59
+ - `@peac/protocol` (Layer 3): Receipt issuance and local verification
60
+ - `@peac/crypto` (Layer 2): JWS decode for session summary extraction
61
+ - `@peac/adapter-runtime-governance`: Runtime governance records (complementary adapter)
62
+
43
63
  ## Design
44
64
 
45
65
  - **Vendor-neutral:** No vendor SDK dependencies. The `provider` field is always caller-supplied.
@@ -47,6 +67,20 @@ const summary = buildSessionSummary([result1.jws, result2.jws, result3.jws]);
47
67
  - **Evidence kind:** All event families produce `evidence` kind Interaction Records.
48
68
  - **Extension namespace:** `org.peacprotocol/managed-agent` with `session_id`, `event`, `agent_id`, `provider` fields.
49
69
 
70
+ ## For Agent Developers
71
+
72
+ If you are building an AI agent or MCP server that needs evidence receipts:
73
+
74
+ - Start with [`@peac/mcp-server`](https://www.npmjs.com/package/@peac/mcp-server) for a ready-to-use MCP tool server
75
+ - Use `@peac/protocol` for programmatic receipt issuance and verification
76
+ - See the [llms.txt](https://github.com/peacprotocol/peac/blob/main/llms.txt) for a concise overview
77
+
50
78
  ## License
51
79
 
52
80
  Apache-2.0
81
+
82
+ ---
83
+
84
+ PEAC Protocol is an open source project stewarded by Originary and community contributors.
85
+
86
+ [Docs](https://www.peacprotocol.org) | [GitHub](https://github.com/peacprotocol/peac) | [Originary](https://www.originary.xyz)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peac/adapter-managed-agents",
3
- "version": "0.12.9",
3
+ "version": "0.12.11",
4
4
  "description": "Vendor-neutral managed agent runtime event adapter for PEAC interaction evidence",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
@@ -39,8 +39,8 @@
39
39
  "node": ">=22.0.0"
40
40
  },
41
41
  "dependencies": {
42
- "@peac/protocol": "0.12.9",
43
- "@peac/crypto": "0.12.9"
42
+ "@peac/crypto": "0.12.11",
43
+ "@peac/protocol": "0.12.11"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/node": "^22.0.0",
@@ -51,12 +51,14 @@
51
51
  "keywords": [
52
52
  "peac",
53
53
  "peacprotocol",
54
+ "originary",
54
55
  "interaction-records",
55
56
  "signed-records",
56
57
  "managed-agents",
57
- "agent-evidence",
58
+ "agent-records",
58
59
  "mcp",
59
- "a2a"
60
+ "a2a",
61
+ "adapter"
60
62
  ],
61
63
  "scripts": {
62
64
  "prebuild": "rm -rf dist",