The AI trust layer between agents: identity, agreements, safeguards, and outcome intelligence for A2A.

Commit 5b7999fc

5b7999fcbb0cMerged

aryaamin <[email protected]> · 2 months ago · 16 files · +1 added · ~15 modified

Description

feat: expose attested interaction completion

Details

Commit
5b7999fcbb0c
Parent
f87848a4fcb8

api/index.tsmodifiedView file

@@ -25,10 +25,12 @@
2525 return;
2626 }
2727 try {
28- const runtimeSelfService = /^\/v0\.1\/runtime(?:\/bootstrap|\/heartbeat)?(?:\?|$)/.test(
29- request.url ?? '',
30- );
31- if (token.startsWith('oc_at_') && runtimeSelfService) {
28+ const agentSelfService =
29+ /^\/v0\.1\/runtime(?:\/bootstrap|\/heartbeat)?(?:\?|$)/.test(request.url ?? '') ||
30+ /^\/v0\.1\/federated-interactions\/[^/]+\/(?:brief|session|completion-reports)(?:\?|$)/.test(
31+ request.url ?? '',
32+ );
33+ if (token.startsWith('oc_at_') && agentSelfService) {
3234 if (!repository) throw new Error('Agent access tokens are not configured');
3335 const authentication = await repository.verifyAgentAccessToken(token);
3436 // Existing beta tokens had only mcp:access. They remain accepted because
@@ -40,6 +42,7 @@
4042 throw new Error('Agent token cannot connect a runtime');
4143 request.headers['x-openclasp-operator'] = authentication.operatorId;
4244 request.headers['x-openclasp-bound-agent'] = authentication.agentId;
45+ request.headers['x-openclasp-credential-type'] = 'agent_access_token';
4346 } else {
4447 const authentication = await verifyAuth0Token(token, { dashboard: true });
4548 request.headers['x-openclasp-operator'] = authentication.payload.sub!;