agent-passport-system-mcp 2.18.0 → 2.19.1
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.
- package/README.md +3 -3
- package/build/index.js +232 -12
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ MCP server for the [Agent Passport System](https://github.com/aeoess/agent-passp
|
|
|
10
10
|
|
|
11
11
|
> **🤖 For AI agents:** If you are an agent reading this, visit [aeoess.com/llms.txt](https://aeoess.com/llms.txt) for machine-readable documentation or [llms-full.txt](https://aeoess.com/llms-full.txt) for the complete technical reference. MCP discovery: [.well-known/mcp.json](https://aeoess.com/.well-known/mcp.json). This README is designed for humans.
|
|
12
12
|
|
|
13
|
-
**
|
|
13
|
+
**125 tools** across 63 core modules + 32 v2 constitutional governance modules (separation of powers, circuit breakers, approval fatigue detection, and more). Independently cited by [PDR in Production (Nanook & Gerundium, UBC)](https://doi.org/10.5281/zenodo.19323172). Works with any MCP client: Claude Desktop, Cursor, Windsurf, and more.
|
|
14
14
|
|
|
15
15
|
## Quick Start
|
|
16
16
|
|
|
@@ -29,7 +29,7 @@ npm install -g agent-passport-system-mcp
|
|
|
29
29
|
npx agent-passport-system-mcp setup
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
Auto-configures Claude Desktop and Cursor. Restart your AI client.
|
|
32
|
+
Auto-configures Claude Desktop and Cursor. Restart your AI client. 125 tools ready.
|
|
33
33
|
|
|
34
34
|
<details>
|
|
35
35
|
<summary>Manual config (if setup doesn't detect your client)</summary>
|
|
@@ -208,7 +208,7 @@ Layer 1 — Agent Passport Protocol (Ed25519 identity)
|
|
|
208
208
|
|
|
209
209
|
## Links
|
|
210
210
|
|
|
211
|
-
- npm SDK: [agent-passport-system](https://www.npmjs.com/package/agent-passport-system) (v1.29.
|
|
211
|
+
- npm SDK: [agent-passport-system](https://www.npmjs.com/package/agent-passport-system) (v1.29.2, 1929 tests)
|
|
212
212
|
- Python SDK: [agent-passport-system](https://pypi.org/project/agent-passport-system/) (v0.5.1)
|
|
213
213
|
- Paper (Protocol): [doi.org/10.5281/zenodo.18749779](https://doi.org/10.5281/zenodo.18749779)
|
|
214
214
|
- Paper (Faceted Narrowing): [doi.org/10.5281/zenodo.19260073](https://doi.org/10.5281/zenodo.19260073)
|
package/build/index.js
CHANGED
|
@@ -51,6 +51,8 @@ defineV2EmergencyPathway, activateV2Emergency,
|
|
|
51
51
|
requestV2Migration,
|
|
52
52
|
// v2: Attestation
|
|
53
53
|
createV2Attestation, assessV2AttestationQuality, } from "agent-passport-system";
|
|
54
|
+
// Agent Attestation Architecture (Phase 1 — Consilium Build)
|
|
55
|
+
import { createIssuanceContext, bindAttestation, createEmptyEvidenceRecord, PASSPORT_GRADE_LABELS, } from "agent-passport-system";
|
|
54
56
|
// Data Governance (Modules 36A, 38, 39 + Enforcement Gate + Training Attribution)
|
|
55
57
|
import { registerSelfAttestedSource, createContributionLedger, queryContributions, getSourceMetrics, getAgentDataFootprint, generateSettlement, verifySettlement, generateDataComplianceReport, DataEnforcementGate, createTrainingAttribution, verifyTrainingAttribution, createTrainingLedger, recordTrainingAttribution, getModelDataSources, } from "agent-passport-system";
|
|
56
58
|
// Data Lifecycle Governance (Modules 43+)
|
|
@@ -149,8 +151,30 @@ const state = {
|
|
|
149
151
|
sessionAgent: null,
|
|
150
152
|
charters: new Map(),
|
|
151
153
|
approvalRequests: new Map(),
|
|
154
|
+
// Agent Attestation Architecture (Phase 1)
|
|
155
|
+
issuanceContexts: new Map(),
|
|
156
|
+
issuanceChallenges: new Map(),
|
|
157
|
+
issuanceCount: 0,
|
|
158
|
+
postIssuanceBehavior: new Map(),
|
|
159
|
+
recentlyIssuedPassports: new Set(),
|
|
160
|
+
issuanceTimestamps: new Map(),
|
|
161
|
+
endorsementLatencies: new Map(),
|
|
152
162
|
};
|
|
153
163
|
// Load persisted task state
|
|
164
|
+
// ── Post-issuance behavioral sequence recording ──
|
|
165
|
+
// Consilium signal #2: first 10 tool calls after passport issuance.
|
|
166
|
+
// Real agents do work. Farming agents extract. Server-recorded, can't retroactively change.
|
|
167
|
+
const MAX_BEHAVIORAL_SEQUENCE = 10;
|
|
168
|
+
function recordBehavior(toolName) {
|
|
169
|
+
// Record for all recently-issued passport holders in this session
|
|
170
|
+
for (const agentId of state.recentlyIssuedPassports) {
|
|
171
|
+
const seq = state.postIssuanceBehavior.get(agentId) || [];
|
|
172
|
+
if (seq.length < MAX_BEHAVIORAL_SEQUENCE) {
|
|
173
|
+
seq.push({ tool: toolName, ts: new Date().toISOString() });
|
|
174
|
+
state.postIssuanceBehavior.set(agentId, seq);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
154
178
|
function loadTasks() {
|
|
155
179
|
if (existsSync(STORE_PATH)) {
|
|
156
180
|
try {
|
|
@@ -335,6 +359,8 @@ const server = new McpServer({
|
|
|
335
359
|
name: "agent-passport-mcp",
|
|
336
360
|
version: "2.0.0",
|
|
337
361
|
});
|
|
362
|
+
// Track server start time for Tier 0 connection timing
|
|
363
|
+
globalThis.__mcpStartTime = Date.now();
|
|
338
364
|
// ═══════════════════════════════════════
|
|
339
365
|
// Tool Profiles — expose only relevant tools
|
|
340
366
|
// ═══════════════════════════════════════
|
|
@@ -343,7 +369,8 @@ const server = new McpServer({
|
|
|
343
369
|
// coordination, commerce, data, gateway, comms, minimal.
|
|
344
370
|
const TOOL_PROFILES = {
|
|
345
371
|
identity: new Set([
|
|
346
|
-
'identify', 'generate_keys', 'issue_passport', 'verify_issuer', '
|
|
372
|
+
'identify', 'generate_keys', 'issue_passport', 'verify_issuer', 'get_passport_grade', 'list_issuance_records',
|
|
373
|
+
'create_principal', 'endorse_agent',
|
|
347
374
|
'verify_endorsement', 'create_disclosure', 'create_delegation',
|
|
348
375
|
'verify_delegation', 'revoke_delegation', 'sub_delegate',
|
|
349
376
|
'revoke_endorsement', 'get_fleet_status', 'create_v2_delegation',
|
|
@@ -410,7 +437,8 @@ const TOOL_PROFILES = {
|
|
|
410
437
|
'register_agora_public',
|
|
411
438
|
]),
|
|
412
439
|
minimal: new Set([
|
|
413
|
-
'identify', 'generate_keys', 'issue_passport', 'verify_issuer', '
|
|
440
|
+
'identify', 'generate_keys', 'issue_passport', 'verify_issuer', 'get_passport_grade', 'list_issuance_records',
|
|
441
|
+
'create_delegation', 'verify_delegation',
|
|
414
442
|
'create_intent', 'evaluate_intent', 'list_profiles',
|
|
415
443
|
]),
|
|
416
444
|
};
|
|
@@ -440,6 +468,7 @@ server.tool("identify", "Identify yourself to the coordination server. Sets your
|
|
|
440
468
|
private_key: z.string().describe("Your Ed25519 private key (for signing)"),
|
|
441
469
|
agent_id: z.string().optional().describe("Your agent ID"),
|
|
442
470
|
}, async (args) => {
|
|
471
|
+
recordBehavior('identify');
|
|
443
472
|
state.agentKey = args.public_key;
|
|
444
473
|
state.privateKey = args.private_key;
|
|
445
474
|
state.agentId = args.agent_id || null;
|
|
@@ -496,13 +525,29 @@ server.tool("generate_keys", "Generate an Ed25519 keypair for agent identity.",
|
|
|
496
525
|
// ═══════════════════════════════════════
|
|
497
526
|
// TOOL: issue_passport
|
|
498
527
|
// ═══════════════════════════════════════
|
|
499
|
-
server.tool("issue_passport", "Issue a complete agent passport with keys, signed passport, and optional values floor
|
|
528
|
+
server.tool("issue_passport", "Issue a complete agent passport with keys, signed passport, attestation summary, and optional values floor in a single call. The server silently captures Tier 0 observed signals and computes a passport grade (0-3). Use this to onboard any agent — no npm install required.", {
|
|
500
529
|
name: z.string().describe("Agent name (human-readable)"),
|
|
501
530
|
owner: z.string().describe("Owner/principal identifier"),
|
|
502
531
|
mission: z.string().optional().describe("Agent mission description"),
|
|
503
532
|
capabilities: z.array(z.string()).optional().describe("Agent capabilities (e.g., ['research', 'writing'])"),
|
|
504
533
|
attest_to_floor: z.boolean().optional().describe("If true, attests to the default values floor (F-001 through F-008)"),
|
|
505
534
|
}, async (args) => {
|
|
535
|
+
const issuanceStart = Date.now();
|
|
536
|
+
// Phase 0: Silent Observation — capture Tier 0 signals before processing
|
|
537
|
+
state.issuanceCount++;
|
|
538
|
+
const { createHash } = await import('crypto');
|
|
539
|
+
const sha256 = (s) => createHash('sha256').update(s).digest('hex');
|
|
540
|
+
const observed = {
|
|
541
|
+
transportType: process.env.MCP_TRANSPORT || 'stdio',
|
|
542
|
+
issuanceVelocity: state.issuanceCount,
|
|
543
|
+
requestPayloadFingerprint: sha256(JSON.stringify({
|
|
544
|
+
name: args.name, owner: args.owner,
|
|
545
|
+
mission: args.mission, capabilities: args.capabilities,
|
|
546
|
+
})),
|
|
547
|
+
mcpClientId: state.agentId || undefined,
|
|
548
|
+
connectionTimingMs: issuanceStart - globalThis.__mcpStartTime || 0,
|
|
549
|
+
};
|
|
550
|
+
// Create the passport (same as before)
|
|
506
551
|
const agent = joinSocialContract({
|
|
507
552
|
name: args.name,
|
|
508
553
|
mission: args.mission || 'General purpose agent',
|
|
@@ -513,24 +558,71 @@ server.tool("issue_passport", "Issue a complete agent passport with keys, signed
|
|
|
513
558
|
floor: args.attest_to_floor ? (state.floorYaml || DEFAULT_FLOOR_YAML) : undefined,
|
|
514
559
|
});
|
|
515
560
|
// Countersign with AEOESS issuer key if available (CA model)
|
|
516
|
-
const
|
|
561
|
+
const hasIssuer = !!AEOESS_ISSUER_PRIVATE_KEY;
|
|
562
|
+
const passport = hasIssuer
|
|
517
563
|
? countersignPassport(agent.passport, AEOESS_ISSUER_PRIVATE_KEY, 'aeoess')
|
|
518
564
|
: agent.passport;
|
|
565
|
+
// Phase 4: Derive issuance context with computed signals
|
|
566
|
+
const evidence = createEmptyEvidenceRecord(observed);
|
|
567
|
+
const issuanceAgeMs = Date.now() - (globalThis.__mcpStartTime || Date.now());
|
|
568
|
+
const derivedSignals = [
|
|
569
|
+
{ key: 'issuance_age_ms', value: String(issuanceAgeMs), derivedFrom: ['serverStartTime', 'requestedAt'], computedAt: new Date().toISOString() },
|
|
570
|
+
{ key: 'session_passport_count', value: String(state.issuanceCount), derivedFrom: ['issuanceCount'], computedAt: new Date().toISOString() },
|
|
571
|
+
];
|
|
572
|
+
const context = createIssuanceContext(evidence, {
|
|
573
|
+
hasIssuerSignature: hasIssuer,
|
|
574
|
+
derivedSignals,
|
|
575
|
+
});
|
|
576
|
+
// Phase 5: Bind attestation to passport
|
|
577
|
+
const attestedPassport = bindAttestation(passport, context);
|
|
578
|
+
// Store the issuance context (server-side memory)
|
|
579
|
+
const passportId = passport.passport.agentId;
|
|
580
|
+
state.issuanceContexts.set(passportId, context);
|
|
581
|
+
state.recentlyIssuedPassports.add(passportId);
|
|
582
|
+
state.issuanceTimestamps.set(passportId, Date.now());
|
|
583
|
+
// Initialize behavioral sequence tracking for this agent
|
|
584
|
+
state.postIssuanceBehavior.set(passportId, [{ tool: 'issue_passport', ts: new Date().toISOString() }]);
|
|
585
|
+
// Bridge: fire-and-forget POST to gateway (if configured)
|
|
586
|
+
// When Mini adds POST /issuance-dossier, this data starts flowing automatically.
|
|
587
|
+
const gwUrl = process.env.AEOESS_GATEWAY_URL; // e.g. https://gateway.aeoess.com
|
|
588
|
+
const gwKey = process.env.AEOESS_GATEWAY_KEY; // e.g. aps_live_...
|
|
589
|
+
if (gwUrl && gwKey) {
|
|
590
|
+
fetch(`${gwUrl}/api/v1/issuance-dossier`, {
|
|
591
|
+
method: 'POST',
|
|
592
|
+
headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${gwKey}` },
|
|
593
|
+
body: JSON.stringify({
|
|
594
|
+
passport_id: passportId,
|
|
595
|
+
public_key_hash: sha256(attestedPassport.passport.publicKey),
|
|
596
|
+
passport_grade: context.assessment.passportGrade,
|
|
597
|
+
flags: context.assessment.flags,
|
|
598
|
+
attestation_bundle_hash: context.assessment.attestationBundleHash,
|
|
599
|
+
observed_context: context.evidence.observed,
|
|
600
|
+
runtime_attestations: context.evidence.runtimeAttestations,
|
|
601
|
+
provider_attestations: context.evidence.providerAttestations,
|
|
602
|
+
self_declared_signals: context.evidence.selfDeclaredSignals,
|
|
603
|
+
derived_signals: context.assessment.derivedSignals || [],
|
|
604
|
+
prior_passport_ref: context.evidence.priorPassportRef || null,
|
|
605
|
+
}),
|
|
606
|
+
}).catch(() => { }); // fire-and-forget: never block passport issuance
|
|
607
|
+
}
|
|
519
608
|
return {
|
|
520
609
|
content: [{
|
|
521
610
|
type: "text",
|
|
522
611
|
text: JSON.stringify({
|
|
523
|
-
passport:
|
|
524
|
-
publicKey:
|
|
612
|
+
passport: attestedPassport,
|
|
613
|
+
publicKey: attestedPassport.passport.publicKey,
|
|
525
614
|
privateKey: agent.keyPair.privateKey,
|
|
526
|
-
agentId:
|
|
615
|
+
agentId: attestedPassport.passport.agentId,
|
|
527
616
|
attestation: agent.attestation || null,
|
|
528
|
-
|
|
529
|
-
|
|
617
|
+
passportAttestation: attestedPassport.attestation,
|
|
618
|
+
passportGrade: context.assessment.passportGrade,
|
|
619
|
+
passportGradeLabel: PASSPORT_GRADE_LABELS[context.assessment.passportGrade],
|
|
620
|
+
did: `did:aps:${attestedPassport.passport.publicKey}`,
|
|
621
|
+
issuerVerified: !!attestedPassport.issuerSignature,
|
|
530
622
|
issuerPublicKey: AEOESS_ISSUER_PUBLIC_KEY,
|
|
531
|
-
note:
|
|
532
|
-
?
|
|
533
|
-
:
|
|
623
|
+
note: attestedPassport.issuerSignature
|
|
624
|
+
? `Grade ${context.assessment.passportGrade} passport (${PASSPORT_GRADE_LABELS[context.assessment.passportGrade]}). Countersigned by AEOESS.`
|
|
625
|
+
: `Grade ${context.assessment.passportGrade} passport (${PASSPORT_GRADE_LABELS[context.assessment.passportGrade]}). Self-signed (issuer key not configured).`,
|
|
534
626
|
}, null, 2),
|
|
535
627
|
}],
|
|
536
628
|
};
|
|
@@ -573,6 +665,123 @@ server.tool("verify_issuer", "Verify that a passport was officially issued by AE
|
|
|
573
665
|
};
|
|
574
666
|
});
|
|
575
667
|
// ═══════════════════════════════════════
|
|
668
|
+
// TOOL: get_passport_grade
|
|
669
|
+
// ═══════════════════════════════════════
|
|
670
|
+
server.tool("get_passport_grade", "Query the attestation grade and issuance context for a passport. Returns the passport grade (0-3), flags, and evidence summary. Grade 0 = self-signed, 1 = issuer countersigned, 2 = runtime-bound, 3 = principal-bound. This is the partner-facing trust query.", {
|
|
671
|
+
agent_id: z.string().describe("The agent ID of the passport to query"),
|
|
672
|
+
}, async (args) => {
|
|
673
|
+
const context = state.issuanceContexts.get(args.agent_id);
|
|
674
|
+
if (!context) {
|
|
675
|
+
return {
|
|
676
|
+
content: [{
|
|
677
|
+
type: "text",
|
|
678
|
+
text: JSON.stringify({
|
|
679
|
+
found: false,
|
|
680
|
+
agent_id: args.agent_id,
|
|
681
|
+
note: "No issuance record found for this agent. The passport may have been issued before attestation tracking was enabled, or on a different server instance.",
|
|
682
|
+
}, null, 2),
|
|
683
|
+
}],
|
|
684
|
+
};
|
|
685
|
+
}
|
|
686
|
+
return {
|
|
687
|
+
content: [{
|
|
688
|
+
type: "text",
|
|
689
|
+
text: JSON.stringify({
|
|
690
|
+
found: true,
|
|
691
|
+
agent_id: args.agent_id,
|
|
692
|
+
passportGrade: context.assessment.passportGrade,
|
|
693
|
+
passportGradeLabel: PASSPORT_GRADE_LABELS[context.assessment.passportGrade],
|
|
694
|
+
flags: context.assessment.flags,
|
|
695
|
+
attestationBundleHash: context.assessment.attestationBundleHash,
|
|
696
|
+
assessedAt: context.assessment.assessedAt,
|
|
697
|
+
evidenceSummary: {
|
|
698
|
+
hasRuntimeAttestation: context.evidence.runtimeAttestations.length > 0,
|
|
699
|
+
hasProviderAttestation: context.evidence.providerAttestations.length > 0,
|
|
700
|
+
selfDeclaredSignalCount: context.evidence.selfDeclaredSignals.length,
|
|
701
|
+
hasPriorPassport: !!context.evidence.priorPassportRef,
|
|
702
|
+
hasContinuityProof: !!context.evidence.priorContinuityProof,
|
|
703
|
+
observedTransport: context.evidence.observed.transportType || null,
|
|
704
|
+
issuanceVelocity: context.evidence.observed.issuanceVelocity || null,
|
|
705
|
+
},
|
|
706
|
+
derivedSignals: context.assessment.derivedSignals || [],
|
|
707
|
+
gradeHistory: context.assessment.gradeHistory || [],
|
|
708
|
+
}, null, 2),
|
|
709
|
+
}],
|
|
710
|
+
};
|
|
711
|
+
});
|
|
712
|
+
// ═══════════════════════════════════════
|
|
713
|
+
// TOOL: list_issuance_records
|
|
714
|
+
// ═══════════════════════════════════════
|
|
715
|
+
server.tool("list_issuance_records", "List all stored issuance records with their passport grades. Shows how many passports have been issued in this session and their trust posture. Useful for monitoring issuance patterns.", {}, async () => {
|
|
716
|
+
const records = Array.from(state.issuanceContexts.entries()).map(([agentId, ctx]) => ({
|
|
717
|
+
agentId,
|
|
718
|
+
grade: ctx.assessment.passportGrade,
|
|
719
|
+
gradeLabel: PASSPORT_GRADE_LABELS[ctx.assessment.passportGrade],
|
|
720
|
+
flags: ctx.assessment.flags,
|
|
721
|
+
issuedAt: ctx.evidence.requestedAt,
|
|
722
|
+
}));
|
|
723
|
+
return {
|
|
724
|
+
content: [{
|
|
725
|
+
type: "text",
|
|
726
|
+
text: JSON.stringify({
|
|
727
|
+
totalIssued: records.length,
|
|
728
|
+
sessionVelocity: state.issuanceCount,
|
|
729
|
+
records,
|
|
730
|
+
gradeDistribution: {
|
|
731
|
+
grade0: records.filter(r => r.grade === 0).length,
|
|
732
|
+
grade1: records.filter(r => r.grade === 1).length,
|
|
733
|
+
grade2: records.filter(r => r.grade === 2).length,
|
|
734
|
+
grade3: records.filter(r => r.grade === 3).length,
|
|
735
|
+
},
|
|
736
|
+
}, null, 2),
|
|
737
|
+
}],
|
|
738
|
+
};
|
|
739
|
+
});
|
|
740
|
+
// ═══════════════════════════════════════
|
|
741
|
+
// TOOL: get_behavioral_sequence
|
|
742
|
+
// ═══════════════════════════════════════
|
|
743
|
+
server.tool("get_behavioral_sequence", "Get the post-issuance behavioral sequence for an agent. Shows the first 10 tool calls after passport issuance. Real agents do work. Farming agents extract. This is consilium signal #2.", {
|
|
744
|
+
agent_id: z.string().describe("The agent ID to query"),
|
|
745
|
+
}, async (args) => {
|
|
746
|
+
const sequence = state.postIssuanceBehavior.get(args.agent_id);
|
|
747
|
+
if (!sequence || sequence.length === 0) {
|
|
748
|
+
return {
|
|
749
|
+
content: [{
|
|
750
|
+
type: "text",
|
|
751
|
+
text: JSON.stringify({
|
|
752
|
+
agent_id: args.agent_id,
|
|
753
|
+
found: false,
|
|
754
|
+
note: "No behavioral sequence recorded. Agent may have been issued before tracking was enabled.",
|
|
755
|
+
}, null, 2),
|
|
756
|
+
}],
|
|
757
|
+
};
|
|
758
|
+
}
|
|
759
|
+
// Classify the behavioral pattern
|
|
760
|
+
const toolNames = sequence.map(s => s.tool);
|
|
761
|
+
const hasWork = toolNames.some(t => ['submit_evidence', 'publish_intent_card', 'create_agora_message', 'submit_deliverable'].includes(t));
|
|
762
|
+
const hasExtraction = toolNames.some(t => ['commerce_preflight', 'create_checkout'].includes(t));
|
|
763
|
+
const pattern = hasWork ? 'productive' : hasExtraction ? 'extractive' : 'neutral';
|
|
764
|
+
return {
|
|
765
|
+
content: [{
|
|
766
|
+
type: "text",
|
|
767
|
+
text: JSON.stringify({
|
|
768
|
+
agent_id: args.agent_id,
|
|
769
|
+
found: true,
|
|
770
|
+
sequence_length: sequence.length,
|
|
771
|
+
max_tracked: MAX_BEHAVIORAL_SEQUENCE,
|
|
772
|
+
pattern,
|
|
773
|
+
tools_called: toolNames,
|
|
774
|
+
sequence,
|
|
775
|
+
note: pattern === 'extractive'
|
|
776
|
+
? "Agent's first actions after passport were value extraction (commerce). Farming signal."
|
|
777
|
+
: pattern === 'productive'
|
|
778
|
+
? "Agent's first actions after passport were productive work. Healthy pattern."
|
|
779
|
+
: "Neutral pattern — identity/delegation setup.",
|
|
780
|
+
}, null, 2),
|
|
781
|
+
}],
|
|
782
|
+
};
|
|
783
|
+
});
|
|
784
|
+
// ═══════════════════════════════════════
|
|
576
785
|
// TOOL: get_my_role
|
|
577
786
|
// ═══════════════════════════════════════
|
|
578
787
|
server.tool("get_my_role", "Get your current role, assigned tasks, and role-specific instructions.", {}, async () => {
|
|
@@ -991,6 +1200,7 @@ server.tool("submit_evidence", "[RESEARCHER] Submit research evidence as a signe
|
|
|
991
1200
|
})).describe("Evidence claims with citations"),
|
|
992
1201
|
methodology: z.string().describe("How you gathered this evidence"),
|
|
993
1202
|
}, async (args) => {
|
|
1203
|
+
recordBehavior('submit_evidence');
|
|
994
1204
|
const keyErr = requireKey();
|
|
995
1205
|
if (keyErr)
|
|
996
1206
|
return { content: [{ type: "text", text: keyErr }], isError: true };
|
|
@@ -1207,6 +1417,7 @@ server.tool("create_delegation", "[OPERATOR] Create a scoped delegation from one
|
|
|
1207
1417
|
max_depth: z.number().default(1).describe("How many levels of sub-delegation"),
|
|
1208
1418
|
expires_in_hours: z.number().default(24).describe("Delegation validity in hours"),
|
|
1209
1419
|
}, async (args) => {
|
|
1420
|
+
recordBehavior('create_delegation');
|
|
1210
1421
|
const keyErr = requireKey();
|
|
1211
1422
|
if (keyErr)
|
|
1212
1423
|
return { content: [{ type: "text", text: keyErr }], isError: true };
|
|
@@ -1275,6 +1486,7 @@ server.tool("revoke_delegation", "[OPERATOR] Revoke a delegation. Optionally cas
|
|
|
1275
1486
|
reason: z.string().describe("Why the delegation is being revoked"),
|
|
1276
1487
|
cascade: z.boolean().default(true).describe("Also revoke all sub-delegations"),
|
|
1277
1488
|
}, async (args) => {
|
|
1489
|
+
recordBehavior('revoke_delegation');
|
|
1278
1490
|
const keyErr = requireKey();
|
|
1279
1491
|
if (keyErr)
|
|
1280
1492
|
return { content: [{ type: "text", text: keyErr }], isError: true };
|
|
@@ -1833,6 +2045,7 @@ server.tool("commerce_preflight", "Run preflight checks before a purchase. Valid
|
|
|
1833
2045
|
delegation_id: z.string().describe("Commerce delegation ID"),
|
|
1834
2046
|
agent_id: z.string().describe("Agent making the purchase"),
|
|
1835
2047
|
}, async (args) => {
|
|
2048
|
+
recordBehavior('commerce_preflight');
|
|
1836
2049
|
const keyErr = requireKey();
|
|
1837
2050
|
if (keyErr)
|
|
1838
2051
|
return { content: [{ type: "text", text: keyErr }], isError: true };
|
|
@@ -2123,6 +2336,12 @@ server.tool("endorse_agent", "Endorse an agent as a principal. Creates a cryptog
|
|
|
2123
2336
|
relationship: z.enum(["creator", "operator", "employer", "sponsor"]).describe("How principal relates to agent"),
|
|
2124
2337
|
expires_in_days: z.number().default(365).describe("Days until endorsement expires"),
|
|
2125
2338
|
}, async (args) => {
|
|
2339
|
+
recordBehavior('endorse_agent');
|
|
2340
|
+
// Consilium signal #5: endorsement latency. T+200ms = automation. T+3h = human.
|
|
2341
|
+
const issuedAt = state.issuanceTimestamps.get(args.agent_id);
|
|
2342
|
+
if (issuedAt && !state.endorsementLatencies.has(args.agent_id)) {
|
|
2343
|
+
state.endorsementLatencies.set(args.agent_id, Date.now() - issuedAt);
|
|
2344
|
+
}
|
|
2126
2345
|
if (!state.principal || !state.principalPrivateKey) {
|
|
2127
2346
|
return { content: [{ type: "text", text: 'No principal identity. Call create_principal first.' }], isError: true };
|
|
2128
2347
|
}
|
|
@@ -2679,6 +2898,7 @@ server.tool("publish_intent_card", "Publish an IntentCard to the Intent Network
|
|
|
2679
2898
|
visibility: z.enum(["public", "verified", "minimal"]).default("public"),
|
|
2680
2899
|
ttl_hours: z.number().default(24).describe("Hours until card expires"),
|
|
2681
2900
|
}, async (args) => {
|
|
2901
|
+
recordBehavior('publish_intent_card');
|
|
2682
2902
|
const keyErr = requireKey();
|
|
2683
2903
|
if (keyErr)
|
|
2684
2904
|
return { content: [{ type: "text", text: keyErr }], isError: true };
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-passport-system-mcp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.19.1",
|
|
4
4
|
"mcpName": "io.github.aeoess/agent-passport-mcp",
|
|
5
|
-
"description": "MCP server for the Agent Passport System — enforcement infrastructure for the agent economy.
|
|
5
|
+
"description": "MCP server for the Agent Passport System — enforcement infrastructure for the agent economy. 125 tools across 95 modules. Policy eval <2ms. Identity, delegation, reputation, enforcement, attestation, feeless Nano wallet, commerce.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
8
8
|
"agent-passport-system-mcp": "./build/bin.js",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"homepage": "https://github.com/aeoess/agent-passport-mcp",
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
52
|
-
"agent-passport-system": "^1.29.
|
|
52
|
+
"agent-passport-system": "^1.29.1",
|
|
53
53
|
"zod": "^3.25.76"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|