agent-passport-system-mcp 2.25.0 → 2.26.0
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 +4 -4
- package/build/index.js +63 -2
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -12,13 +12,13 @@ Enforcement and accountability layer for AI agents. Bring your own identity. 20
|
|
|
12
12
|
APS_PROFILE=essential npx agent-passport-system-mcp
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
`essential` is the default profile — the
|
|
15
|
+
`essential` is the default profile — the 151 tools 90% of integrations need. Set `APS_PROFILE=full` for all 151 tools.
|
|
16
16
|
|
|
17
17
|
Available profiles: essential (default), identity, governance, coordination, commerce, data, gateway, comms, minimal, full.
|
|
18
18
|
|
|
19
19
|
> **For AI agents:** 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).
|
|
20
20
|
|
|
21
|
-
Works with any MCP client: Claude Desktop, Claude Code, Cursor, Windsurf, and more. Full surface area under `APS_PROFILE=full`:
|
|
21
|
+
Works with any MCP client: Claude Desktop, Claude Code, Cursor, Windsurf, and more. Full surface area under `APS_PROFILE=full`: 151 tools across 122 modules (84 core + 38 v2 constitutional governance). Independently cited by [PDR in Production (Nanook & Gerundium, UBC)](https://doi.org/10.5281/zenodo.19323172).
|
|
22
22
|
|
|
23
23
|
## Quick Start
|
|
24
24
|
|
|
@@ -216,8 +216,8 @@ Layer 1 — Agent Passport Protocol (Ed25519 identity)
|
|
|
216
216
|
|
|
217
217
|
## Links
|
|
218
218
|
|
|
219
|
-
- npm SDK: [agent-passport-system](https://www.npmjs.com/package/agent-passport-system) (v1.
|
|
220
|
-
- Python SDK: [agent-passport-system](https://pypi.org/project/agent-passport-system/) (v0.
|
|
219
|
+
- npm SDK: [agent-passport-system](https://www.npmjs.com/package/agent-passport-system) (v1.45.0, 2937 tests)
|
|
220
|
+
- Python SDK: [agent-passport-system](https://pypi.org/project/agent-passport-system/) (v0.13.0)
|
|
221
221
|
- Paper (Protocol): [doi.org/10.5281/zenodo.18749779](https://doi.org/10.5281/zenodo.18749779)
|
|
222
222
|
- Paper (Faceted Narrowing): [doi.org/10.5281/zenodo.19260073](https://doi.org/10.5281/zenodo.19260073)
|
|
223
223
|
- Paper (Behavioral Derivation Rights): [doi.org/10.5281/zenodo.19476002](https://doi.org/10.5281/zenodo.19476002)
|
package/build/index.js
CHANGED
|
@@ -66,7 +66,9 @@ import { createCharter, signCharter, verifyCharter, evaluateThreshold, createApp
|
|
|
66
66
|
// v2 boundary primitives (AttributionConsent, ProvisionalStatement, HumanEscalationFlag)
|
|
67
67
|
createAttributionReceipt, signAttributionConsent, verifyAttributionConsent, checkArtifactCitations, receiptCore, createProvisional, promoteStatement, verifyPromotion, withdrawProvisional, withdrawalPayload, isBinding, checkEscalationRequired, requestOwnerConfirmation, recordOwnerConfirmation,
|
|
68
68
|
// Attribution Primitive (unified four-axis signed Merkle receipt)
|
|
69
|
-
computeAttributionActionRef, constructAttributionPrimitive, projectAttribution, verifyAttributionProjection, verifyAttributionPrimitive, checkProjectionConsistency,
|
|
69
|
+
computeAttributionActionRef, constructAttributionPrimitive, projectAttribution, verifyAttributionProjection, verifyAttributionPrimitive, checkProjectionConsistency,
|
|
70
|
+
// Attribution Weights (Build B — fractional D/C axis weight formulas)
|
|
71
|
+
computeDataAxisWeights, computeComputeAxisWeights, DEFAULT_WEIGHT_PROFILE, } from "agent-passport-system";
|
|
70
72
|
// ═══════════════════════════════════════
|
|
71
73
|
// State Management
|
|
72
74
|
// ═══════════════════════════════════════
|
|
@@ -462,6 +464,9 @@ const TOOL_PROFILES = {
|
|
|
462
464
|
'aps_create_attribution_receipt',
|
|
463
465
|
'aps_create_provisional',
|
|
464
466
|
'aps_check_escalation_required',
|
|
467
|
+
// Build A attribution primitive — most-used entry points
|
|
468
|
+
'aps_construct_attribution_primitive',
|
|
469
|
+
'aps_verify_attribution_primitive',
|
|
465
470
|
]),
|
|
466
471
|
};
|
|
467
472
|
const activeProfile = (process.env.APS_PROFILE || 'full').toLowerCase();
|
|
@@ -658,6 +663,11 @@ const TOOL_SCOPE_MAP = {
|
|
|
658
663
|
'aps_verify_attribution_primitive': 'governance',
|
|
659
664
|
'aps_check_projection_consistency': 'governance',
|
|
660
665
|
'aps_compute_attribution_action_ref': 'identity',
|
|
666
|
+
// Attribution Weights — Build B (fractional D/C axis formulas). Spec
|
|
667
|
+
// calls for a dedicated 'attribution' scope; integration-layer tools,
|
|
668
|
+
// not in the essential profile.
|
|
669
|
+
'aps_compute_data_axis_weights': 'attribution',
|
|
670
|
+
'aps_compute_compute_axis_weights': 'attribution',
|
|
661
671
|
};
|
|
662
672
|
// ═══════════════════════════════════════
|
|
663
673
|
// TOOL: list_profiles
|
|
@@ -669,7 +679,7 @@ server.tool("list_profiles", "Show available tool profiles. Set APS_PROFILE env
|
|
|
669
679
|
// ═══════════════════════════════════════
|
|
670
680
|
// TOOL: list_tools_for_scope (Primitive #9: Tool Pool Assembly)
|
|
671
681
|
// ═══════════════════════════════════════
|
|
672
|
-
server.tool("list_tools_for_scope", "List available MCP tools filtered by delegation scope. Pass your delegation scopes to see which tools you can use. Scopes: identity, delegation, principal, reputation, coordination, communication, governance, commerce, data, gateway, network, temporal. Use ['*'] for all tools.", {
|
|
682
|
+
server.tool("list_tools_for_scope", "List available MCP tools filtered by delegation scope. Pass your delegation scopes to see which tools you can use. Scopes: identity, delegation, principal, reputation, coordination, communication, governance, commerce, data, gateway, network, temporal, attribution. Use ['*'] for all tools.", {
|
|
673
683
|
scopes: z.array(z.string()).describe("Your delegation scopes, e.g. ['identity', 'delegation', 'commerce']"),
|
|
674
684
|
}, async ({ scopes }) => {
|
|
675
685
|
const allTools = Object.entries(TOOL_SCOPE_MAP);
|
|
@@ -4850,6 +4860,57 @@ server.tool("aps_compute_attribution_action_ref", "Derive the action_ref (hex sh
|
|
|
4850
4860
|
return { content: [{ type: "text", text: safeError("computeAttributionActionRef failed", e) }], isError: true };
|
|
4851
4861
|
}
|
|
4852
4862
|
});
|
|
4863
|
+
// ═══════════════════════════════════════
|
|
4864
|
+
// Attribution Weights — Build B fractional weight formulas
|
|
4865
|
+
// Spec: BUILD-B-FRACTIONAL-WEIGHTS.md. Upstream of constructAttributionPrimitive:
|
|
4866
|
+
// compute canonical D/C axis weights from raw per-source / per-provider records,
|
|
4867
|
+
// then hand the resulting axis entries to aps_construct_attribution_primitive.
|
|
4868
|
+
// ═══════════════════════════════════════
|
|
4869
|
+
server.tool("aps_compute_data_axis_weights", "Compute the D-axis fractional weight vector from a list of AccessReceipt records with role, timestamp, and content length. Returns canonical DataAxisEntry[] with 6-digit decimal contribution_weight strings that sum to ~1.0 and feed directly into aps_construct_attribution_primitive. Empty input → empty array; all-zero raw weights → error. Weights = role × recency_decay × length_weight, normalized per spec BUILD-B §'The D-axis formula'. Parameter names match the SDK: `sources`, `action_timestamp`, optional `profile`.", {
|
|
4870
|
+
sources: z.array(z.object({
|
|
4871
|
+
source_did: z.string(),
|
|
4872
|
+
access_receipt_hash: z.string(),
|
|
4873
|
+
role: z.enum([
|
|
4874
|
+
'primary_source', 'supporting_evidence', 'context_only', 'background_retrieval',
|
|
4875
|
+
]),
|
|
4876
|
+
timestamp: z.string().describe("ISO-8601 UTC with millisecond precision + Z (t_source)"),
|
|
4877
|
+
content_length: z.number().nonnegative().describe("Tokens"),
|
|
4878
|
+
})).describe("Per-source records with retrieval metadata"),
|
|
4879
|
+
action_timestamp: z.string().describe("ISO-8601 UTC ms when the action ran (t_action)"),
|
|
4880
|
+
profile: z.any().optional().describe("Optional WeightProfile override; defaults to DEFAULT_WEIGHT_PROFILE"),
|
|
4881
|
+
}, async (args) => {
|
|
4882
|
+
try {
|
|
4883
|
+
const entries = computeDataAxisWeights(args.sources, {
|
|
4884
|
+
action_timestamp: args.action_timestamp,
|
|
4885
|
+
profile: args.profile,
|
|
4886
|
+
});
|
|
4887
|
+
return { content: [{ type: "text", text: JSON.stringify(entries, null, 2) }] };
|
|
4888
|
+
}
|
|
4889
|
+
catch (e) {
|
|
4890
|
+
return { content: [{ type: "text", text: safeError("computeDataAxisWeights failed", e) }], isError: true };
|
|
4891
|
+
}
|
|
4892
|
+
});
|
|
4893
|
+
server.tool("aps_compute_compute_axis_weights", "Compute the C-axis fractional weight vector from a list of inference billing records (prompt_tokens, completion_tokens). Returns canonical ComputeAxisEntry[] with 6-digit decimal compute_share strings that sum to ~1.0 and feed directly into aps_construct_attribution_primitive. Weights = prompt_tokens + completion_tokens × COMPLETION_MULTIPLIER (default 3.0), normalized per spec BUILD-B §'The C-axis formula'. Parameter names match the SDK: `providers`, optional `profile`.", {
|
|
4894
|
+
providers: z.array(z.object({
|
|
4895
|
+
provider_did: z.string(),
|
|
4896
|
+
hardware_attestation_hash: z.string(),
|
|
4897
|
+
prompt_tokens: z.number().nonnegative(),
|
|
4898
|
+
completion_tokens: z.number().nonnegative(),
|
|
4899
|
+
})).describe("Per-provider billing records"),
|
|
4900
|
+
profile: z.any().optional().describe("Optional WeightProfile override; defaults to DEFAULT_WEIGHT_PROFILE"),
|
|
4901
|
+
}, async (args) => {
|
|
4902
|
+
try {
|
|
4903
|
+
const entries = computeComputeAxisWeights(args.providers, { profile: args.profile });
|
|
4904
|
+
return { content: [{ type: "text", text: JSON.stringify(entries, null, 2) }] };
|
|
4905
|
+
}
|
|
4906
|
+
catch (e) {
|
|
4907
|
+
return { content: [{ type: "text", text: safeError("computeComputeAxisWeights failed", e) }], isError: true };
|
|
4908
|
+
}
|
|
4909
|
+
});
|
|
4910
|
+
// Keep DEFAULT_WEIGHT_PROFILE referenced so tree-shakers don't drop it
|
|
4911
|
+
// from the compiled bundle — consumers of the two tools above will want
|
|
4912
|
+
// to introspect the defaults.
|
|
4913
|
+
void DEFAULT_WEIGHT_PROFILE;
|
|
4853
4914
|
server.prompt("coordination_role", "Get instructions for your assigned coordination role", {}, async () => {
|
|
4854
4915
|
const role = state.agentRole || 'default';
|
|
4855
4916
|
const instructions = ROLE_PROMPTS[role] || ROLE_PROMPTS['default'];
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-passport-system-mcp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.26.0",
|
|
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. 151 tools across 122 modules. Policy eval <2ms. Identity, delegation, reputation, enforcement, attestation, feeless Nano wallet, commerce, attribution primitive. Tracks SDK v1.45.0 (2,910 tests).",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
8
8
|
"agent-passport-system-mcp": "./build/bin.js",
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
],
|
|
16
16
|
"scripts": {
|
|
17
17
|
"build": "npx tsc && chmod 755 build/bin.js build/index.js build/setup.js",
|
|
18
|
-
"test": "node --test tests
|
|
18
|
+
"test": "node --test tests/*.test.mjs",
|
|
19
19
|
"watch": "tsc --watch",
|
|
20
20
|
"inspector": "npx @modelcontextprotocol/inspector build/index.js",
|
|
21
|
-
"prepublishOnly": "npm run build",
|
|
21
|
+
"prepublishOnly": "npm run build && npm test",
|
|
22
22
|
"postinstall": "echo '\\n🔑 Agent Passport MCP installed! Run: npx agent-passport-system-mcp setup\\n Or for zero-install remote: npx agent-passport-system-mcp setup --remote\\n'",
|
|
23
23
|
"postpublish": "cd ~/aeoess_web && node scripts/propagate.mjs --apply --commit 2>/dev/null || echo 'Propagation skipped (aeoess_web not found)'"
|
|
24
24
|
},
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"homepage": "https://github.com/aeoess/agent-passport-mcp",
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
53
|
-
"agent-passport-system": "^1.
|
|
53
|
+
"agent-passport-system": "^1.45.0",
|
|
54
54
|
"zod": "^3.25.76"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|