agent-passport-system-mcp 2.26.0 → 2.27.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 +3 -3
- package/build/index.js +73 -1
- package/package.json +3 -3
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 154 tools 90% of integrations need. Set `APS_PROFILE=full` for all 154 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`: 154 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,7 +216,7 @@ 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.
|
|
219
|
+
- npm SDK: [agent-passport-system](https://www.npmjs.com/package/agent-passport-system) (v1.46.0, 2972 tests)
|
|
220
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)
|
package/build/index.js
CHANGED
|
@@ -68,7 +68,9 @@ createAttributionReceipt, signAttributionConsent, verifyAttributionConsent, chec
|
|
|
68
68
|
// Attribution Primitive (unified four-axis signed Merkle receipt)
|
|
69
69
|
computeAttributionActionRef, constructAttributionPrimitive, projectAttribution, verifyAttributionProjection, verifyAttributionPrimitive, checkProjectionConsistency,
|
|
70
70
|
// Attribution Weights (Build B — fractional D/C axis weight formulas)
|
|
71
|
-
computeDataAxisWeights, computeComputeAxisWeights, DEFAULT_WEIGHT_PROFILE,
|
|
71
|
+
computeDataAxisWeights, computeComputeAxisWeights, DEFAULT_WEIGHT_PROFILE,
|
|
72
|
+
// Attribution Settlement (Build C — per-period signed settlement record)
|
|
73
|
+
aggregateAttributionPrimitives, buildContributorQueryResponse, signSettlementRecord, verifySettlementRecord, } from "agent-passport-system";
|
|
72
74
|
// ═══════════════════════════════════════
|
|
73
75
|
// State Management
|
|
74
76
|
// ═══════════════════════════════════════
|
|
@@ -668,6 +670,11 @@ const TOOL_SCOPE_MAP = {
|
|
|
668
670
|
// not in the essential profile.
|
|
669
671
|
'aps_compute_data_axis_weights': 'attribution',
|
|
670
672
|
'aps_compute_compute_axis_weights': 'attribution',
|
|
673
|
+
// Attribution Settlement (Build C) — new 'settlement' scope, not in
|
|
674
|
+
// essentials profile. Integration-layer tools only.
|
|
675
|
+
'aps_aggregate_settlement': 'settlement',
|
|
676
|
+
'aps_verify_settlement': 'settlement',
|
|
677
|
+
'aps_build_contributor_query': 'settlement',
|
|
671
678
|
};
|
|
672
679
|
// ═══════════════════════════════════════
|
|
673
680
|
// TOOL: list_profiles
|
|
@@ -4911,6 +4918,71 @@ server.tool("aps_compute_compute_axis_weights", "Compute the C-axis fractional w
|
|
|
4911
4918
|
// from the compiled bundle — consumers of the two tools above will want
|
|
4912
4919
|
// to introspect the defaults.
|
|
4913
4920
|
void DEFAULT_WEIGHT_PROFILE;
|
|
4921
|
+
// ═══════════════════════════════════════
|
|
4922
|
+
// Attribution Settlement — Build C per-period settlement record.
|
|
4923
|
+
// Spec: BUILD-C-SETTLEMENT-PIPELINE.md. Aggregates a stream of
|
|
4924
|
+
// AttributionPrimitives over [t0, t1) into one signed record per axis
|
|
4925
|
+
// with a balanced-Merkle commitment. Settlement is evidence, not
|
|
4926
|
+
// payment — economic conversion is gateway-private.
|
|
4927
|
+
// ═══════════════════════════════════════
|
|
4928
|
+
const SettlementPeriodSchema = z.object({
|
|
4929
|
+
t0: z.string().describe("Period start (canonical ISO-8601 UTC ms + Z). Inclusive."),
|
|
4930
|
+
t1: z.string().describe("Period end (canonical ISO-8601 UTC ms + Z). Exclusive."),
|
|
4931
|
+
period_id: z.string().describe("Gateway-scoped period identifier"),
|
|
4932
|
+
});
|
|
4933
|
+
server.tool("aps_aggregate_settlement", "Aggregate a batch of Attribution Primitives over a half-open settlement period [t0, t1) into a signed SettlementRecord. Each axis (D, P, G, C) produces a per-contributor total with a balanced-Merkle commitment. Residual buckets pool sub-threshold contributors per Build A §4.1. Output is a fully signed record ready for third-party verification. Spec: BUILD-C-SETTLEMENT-PIPELINE.md.", {
|
|
4934
|
+
receipts: z.array(z.any()).describe("Array of AttributionPrimitives to aggregate"),
|
|
4935
|
+
period: SettlementPeriodSchema,
|
|
4936
|
+
gateway_did: z.string().describe("Gateway DID that signs the record"),
|
|
4937
|
+
gateway_private_key: z.string().describe("Ed25519 gateway private key (hex)"),
|
|
4938
|
+
issued_at: z.string().optional().describe("Override issued_at (canonical ISO-8601 UTC ms + Z); defaults to now"),
|
|
4939
|
+
}, async (args) => {
|
|
4940
|
+
try {
|
|
4941
|
+
const unsigned = aggregateAttributionPrimitives(args.receipts, args.period, {
|
|
4942
|
+
gateway_did: args.gateway_did,
|
|
4943
|
+
issued_at: args.issued_at,
|
|
4944
|
+
});
|
|
4945
|
+
const signature = signSettlementRecord(unsigned, args.gateway_private_key);
|
|
4946
|
+
const record = { ...unsigned, signature };
|
|
4947
|
+
return { content: [{ type: "text", text: JSON.stringify(record, null, 2) }] };
|
|
4948
|
+
}
|
|
4949
|
+
catch (e) {
|
|
4950
|
+
return { content: [{ type: "text", text: safeError("aggregateSettlement failed", e) }], isError: true };
|
|
4951
|
+
}
|
|
4952
|
+
});
|
|
4953
|
+
server.tool("aps_verify_settlement", "Verify a signed SettlementRecord under S1-S5 (signature, Merkle roots, conservation, residual shape, optional input-receipts cross-check). S3 conservation is the strongest invariant: a gateway cannot inflate or suppress any contributor's share without breaking it. Returns {valid: true} or {valid: false, reason, detail}. Pass inputReceipts to also recompute input_receipts_hash.", {
|
|
4954
|
+
record: z.any().describe("A signed SettlementRecord"),
|
|
4955
|
+
gateway_public_key: z.string().describe("Gateway Ed25519 public key hex"),
|
|
4956
|
+
input_receipts: z.array(z.any()).optional().describe("Optional — the input Attribution Primitives that fed the settlement. When supplied, S5 cross-checks input_receipts_hash and verifies each receipt individually."),
|
|
4957
|
+
}, async (args) => {
|
|
4958
|
+
try {
|
|
4959
|
+
const result = verifySettlementRecord(args.record, {
|
|
4960
|
+
gatewayPublicKeyHex: args.gateway_public_key,
|
|
4961
|
+
inputReceipts: args.input_receipts,
|
|
4962
|
+
});
|
|
4963
|
+
return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
|
|
4964
|
+
}
|
|
4965
|
+
catch (e) {
|
|
4966
|
+
return { content: [{ type: "text", text: safeError("verifySettlement failed", e) }], isError: true };
|
|
4967
|
+
}
|
|
4968
|
+
});
|
|
4969
|
+
server.tool("aps_build_contributor_query", "Build a contributor-query response: given a signed SettlementRecord and a contributor DID, return per-axis (total_weight, contribution_count, merkle_path, axis_root) plus the full signed record so a third party can verify the contributor's share end-to-end without trusting the gateway beyond its public key. Returns null if the contributor has no share in the period.", {
|
|
4970
|
+
record: z.any().describe("A signed SettlementRecord"),
|
|
4971
|
+
contributor_did: z.string().describe("Contributor DID (data source, compute provider, governance signer, or protocol module identifier)"),
|
|
4972
|
+
gateway_jwks: z.string().optional().describe("Advisory JWKS URL; not part of the signed material"),
|
|
4973
|
+
}, async (args) => {
|
|
4974
|
+
try {
|
|
4975
|
+
const response = buildContributorQueryResponse(args.record, args.contributor_did, {
|
|
4976
|
+
gateway_jwks: args.gateway_jwks,
|
|
4977
|
+
});
|
|
4978
|
+
return {
|
|
4979
|
+
content: [{ type: "text", text: JSON.stringify(response, null, 2) }],
|
|
4980
|
+
};
|
|
4981
|
+
}
|
|
4982
|
+
catch (e) {
|
|
4983
|
+
return { content: [{ type: "text", text: safeError("buildContributorQuery failed", e) }], isError: true };
|
|
4984
|
+
}
|
|
4985
|
+
});
|
|
4914
4986
|
server.prompt("coordination_role", "Get instructions for your assigned coordination role", {}, async () => {
|
|
4915
4987
|
const role = state.agentRole || 'default';
|
|
4916
4988
|
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.27.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. 154 tools across 123 modules. Policy eval <2ms. Identity, delegation, reputation, enforcement, attestation, feeless Nano wallet, commerce, attribution primitive, attribution settlement. Tracks SDK v1.46.0 (2,972 tests).",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
8
8
|
"agent-passport-system-mcp": "./build/bin.js",
|
|
@@ -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.46.0",
|
|
54
54
|
"zod": "^3.25.76"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|