feat: APS-AgentMesh adapter — structural authorization gates#598
feat: APS-AgentMesh adapter — structural authorization gates#598aeoess wants to merge 5 commits intomicrosoft:mainfrom
Conversation
…t-driven cache, feedback isolation
…agents Bridges APS (Agent Passport System) structural authorization into AGT's PolicyEngine as external trust signals. Components: - APSPolicyGate: inject APS PolicyDecision into AGT evaluation context - APSTrustBridge: map APS passport grades (0-3) to AGT trust scores (0-1000) - APSScopeVerifier: validate APS delegation scope chains for task assignment - aps_context(): build AGT-compatible context dict from APS artifacts - verify_aps_signature(): Ed25519 signature verification Architecture: APS governs BETWEEN processes (cryptographic proof of authorization scope) AGT governs INSIDE the process (policy evaluation, trust scoring) APS structural authorization = hard constraint (gate) AGT behavioral trust = soft signal (modifies score, doesn't override gate) 17 tests. Zero dependencies (APS SDK optional for full signature verification). Responds to: microsoft#478 (imran-siddique invitation) APS: https://aeoess.com | npm: agent-passport-system v1.29.1 (1,919 tests)
imran-siddique
left a comment
There was a problem hiding this comment.
Architecturally sound adapter — clean separation of APS hard gates vs AGT soft signals. One blocking issue:
Critical: Signature verification silently degrades to format-only check
\�erify_aps_signature()\ falls back to accepting any 128-char hex string when PyNaCl is absent. Since
acl\ is not in required dependencies, the default install always uses this insecure path. Must fail closed:
\\python
except ImportError:
return False # Cannot verify without nacl
\\
Also:
- Pin \�gent-passport-system>=0.7.0,<0.8.0\ (unbounded external dep)
- Remove unused \hashlib\ and \ ime\ imports
- Add input validation on \passport_grade\ (invalid values silently accepted)
- Trim promotional content in README to match style of other integration packages
- Add tests for \�erify_aps_signature\ (the critical path has zero coverage)
Good work overall — the fail-closed defaults on APSDecision and the zero-dep core are well done.
1. CRITICAL: verify_aps_signature now fails closed when PyNaCl absent (returns False instead of accepting any 128-char hex string) 2. Pin agent-passport-system>=0.7.0,<0.8.0 3. Remove unused hashlib and time imports 4. Add input validation on passport_grade (ValueError on invalid) 5. Trim promotional content in README (minimal links section) 6. Add 5 tests for verify_aps_signature and passport_grade validation 22 tests passing.
|
@imran-siddique — all six items addressed in e7f8423. Thank you for the thorough review. 1. CRITICAL (fail closed): 2. Pinned dep: 3. Unused imports: Removed 4. passport_grade validation: 5. README trimmed: Replaced promotional section with minimal links. 6. Tests added: 5 new tests covering |
…coverage Address remaining review feedback from @imran-siddique: - README: remove architectural positioning, add install section, match Microsoft integration package style - Tests: add valid signature, wrong key, and tampered data coverage for verify_aps_signature (25 tests total) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@imran-siddique — all six points addressed across two commits (e7f8423 + f8d4ea5):
The fail-closed fix was the right call. Format-only verification creates false confidence — worse than no verification. |
|
@imran-siddique — just checking if the two fix commits (e7f8423 + f8d4ea5) address everything from your review. Happy to adjust if any points need further work. |
imran-siddique
left a comment
There was a problem hiding this comment.
All 6 review items verified as addressed:
- verify_aps_signature() now returns False on ImportError (fail-closed)
- agent-passport-system pinned to >=0.7.0,<0.8.0
- Unused hashlib/time imports removed
- passport_grade validated with ValueError
- README promotional content trimmed
- Signature verification tests added (6 tests)
Clean architecture, good test coverage (25 tests), zero required dependencies. LGTM.
Note: PR is still in Draft — please mark as Ready for Review to proceed with merge.
|
@imran-siddique — thank you for the thorough review. Marked as ready. One follow-up after merge: the dep pin is currently |
APS-AgentMesh Integration
Responds to @imran-siddique's invitation in #478.
Bridges Agent Passport System (APS) structural authorization into AGT's PolicyEngine as external trust signals.
What this PR adds
packages/agentmesh-integrations/aps-agentmesh/— a new integration package with:APSPolicyGatePolicyDecisioninto AGTevaluate(action, context)APSTrustBridgeAPSScopeVerifieraps_context()Architecture
APS governs between processes (cryptographic proof of authorization scope). AGT governs inside the process (policy evaluation, trust scoring). APS structural authorization = hard constraint (gate). AGT behavioral trust = soft signal.
AGT policy rule example
Tests
17 tests covering: decision parsing, scope chain validation, trust bridging, policy gate context building, scope verification (prefix match, wildcard, depth, budget), and AGT context shape compatibility.
Next steps from #478
PolicyDecisionartifactsdid:agentmesh:DID schemeAPS: aeoess.com | SDK v1.29.1 (1,919 tests) | MCP v2.19.0 (125 tools) | Paper