Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
298 changes: 298 additions & 0 deletions docs/proposals/REPUTATION-GATED-AUTHORITY.md

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions packages/agentmesh-integrations/aps-agentmesh/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) Microsoft Corporation.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
103 changes: 103 additions & 0 deletions packages/agentmesh-integrations/aps-agentmesh/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# APS-AgentMesh Integration

AgentMesh adapter for the [Agent Passport System](https://github.com/aeoess/agent-passport-system) (APS). Bridges APS structural authorization into AGT's PolicyEngine as external trust signals.

## Architecture

APS governs **between** processes: cryptographic proof of authorization scope via Ed25519 delegation chains with monotonic narrowing.

AGT governs **inside** the process: policy evaluation, trust scoring, execution rings.

Together: APS structural authorization is a **hard constraint** (gate). AGT behavioral trust scoring is a **soft signal**.

## Components

| Component | Purpose |
|-----------|---------|
| `APSPolicyGate` | Injects APS PolicyDecision into AGT evaluation context |
| `APSTrustBridge` | Maps APS passport grades (0-3) to AGT trust scores (0-1000) |
| `APSScopeVerifier` | Validates APS delegation scope chains for task assignment |
| `aps_context()` | Builds AGT-compatible context dict from APS artifacts |
| `verify_aps_signature()` | Ed25519 signature verification for APS artifacts |

## Passport Grades → Trust Scores

| Grade | Label | Trust Score | Meaning |
|-------|-------|-------------|---------|
| 0 | self_signed | 100 | Bare Ed25519 keypair |
| 1 | issuer_countersigned | 400 | AEOESS processed the request |
| 2 | runtime_bound | 700 | Challenge-response + infrastructure attestation |
| 3 | principal_bound | 900 | Runtime + verified human/org principal |

## Usage

### As AGT PolicyEngine context

```python
from aps_agentmesh import APSPolicyGate

gate = APSPolicyGate()

# APS PolicyDecision (from APS gateway or MCP server)
aps_decision = {
"verdict": "permit",
"scopeUsed": "deploy.staging",
"agentId": "claude-operator",
"delegationId": "del-abc123",
}

# Build AGT-compatible context
context = gate.build_context(aps_decision, passport_grade=2)

# Pass to AGT PolicyEngine
decision = policy_engine.evaluate("deploy.staging", context)
```

### AGT policy rule consuming APS

```yaml
- name: require-aps-authorization
type: capability
conditions:
aps_decision.verdict: "permit"
allowed_actions:
- "deploy.*"
```

### Trust bridging

```python
from aps_agentmesh import APSTrustBridge

bridge = APSTrustBridge()

# Grade 2 (runtime-bound) → 700 trust score
score = bridge.grade_to_score(passport_grade=2)

# Check minimum threshold
if bridge.meets_threshold(passport_grade=1, min_score=500):
print("Insufficient attestation for this action")
```

### Scope verification

```python
from aps_agentmesh import APSScopeVerifier

verifier = APSScopeVerifier()
ok, reason = verifier.verify(
scope_chain=delegation_json,
required_scope="commerce:checkout",
required_spend=49.99,
)
if not ok:
print(f"Denied: {reason}")
```

## APS Resources

- SDK: [npm](https://www.npmjs.com/package/agent-passport-system) (v1.29.1, 1,919 tests)
- Python SDK: [PyPI](https://pypi.org/project/agent-passport-system/) (v0.7.0)
- MCP Server: [npm](https://www.npmjs.com/package/agent-passport-system-mcp) (v2.19.0, 125 tools)
- Docs: [aeoess.com](https://aeoess.com)
- Paper: [Zenodo DOI 10.5281/zenodo.19260073](https://doi.org/10.5281/zenodo.19260073)
3 changes: 3 additions & 0 deletions packages/agentmesh-integrations/aps-agentmesh/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Security

For security issues, please refer to the [main SECURITY.md](../../SECURITY.md).
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
"""
APS-AgentMesh Integration — Structural authorization for AgentMesh agents.

The Agent Passport System (APS) provides cryptographic identity, scoped delegation
chains with monotonic narrowing, and signed policy decisions. This adapter makes
APS artifacts consumable by AGT's PolicyEngine as external trust signals.

Architecture:
APS governs BETWEEN processes (cryptographic proof of authorization scope).
AGT governs INSIDE the process (policy evaluation, trust scoring, execution rings).
Together: APS structural authorization is a hard gate, AGT behavioral trust is a soft signal.

Provides:
- APSPolicyGate: Injects APS PolicyDecision into AGT evaluation context
- APSTrustBridge: Maps APS passport grades (0-3) to AGT trust scores (0-1000)
- APSScopeVerifier: Validates APS delegation scope chains
- verify_aps_signature: Ed25519 signature verification for APS artifacts
"""

from .adapter import (
APSPolicyGate,
APSTrustBridge,
APSScopeVerifier,
aps_context,
verify_aps_signature,
GRADE_TO_TRUST_SCORE,
)

__all__ = [
"APSPolicyGate",
"APSTrustBridge",
"APSScopeVerifier",
"aps_context",
"verify_aps_signature",
"GRADE_TO_TRUST_SCORE",
]
Loading
Loading