agent-passport-system-mcp 4.0.0 → 5.0.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 +7 -7
- package/build/index.d.ts +1 -0
- package/build/index.js +109 -16
- package/build/setup.js +2 -1
- package/build/toolManifest.d.ts +14 -0
- package/build/toolManifest.js +38 -0
- package/package.json +6 -5
- package/tools-manifest.json +158 -0
package/README.md
CHANGED
|
@@ -6,19 +6,19 @@
|
|
|
6
6
|
<img width="380" height="200" src="https://glama.ai/mcp/servers/@aeoess/agent-passport-system-mcp/badge" />
|
|
7
7
|
</a>
|
|
8
8
|
|
|
9
|
-
Enforcement and accountability layer for AI agents. Bring your own identity.
|
|
9
|
+
Enforcement and accountability layer for AI agents. Bring your own identity. 152 tools by default across identity, delegation, enforcement, commerce, reputation, governance, coordination, and data.
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
12
|
npx agent-passport-system-mcp
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
The default profile is `full` — all
|
|
15
|
+
The default profile is `full` — all 152 tools. Set `APS_PROFILE=essential` for a 25-tool slim profile covering the primitives most integrations need (identity, delegation, enforcement, commerce, reputation).
|
|
16
16
|
|
|
17
17
|
Available profiles: full (default), essential, identity, governance, coordination, commerce, data, gateway, comms, minimal.
|
|
18
18
|
|
|
19
19
|
> **For AI agents:** visit [agent-passport.org/llms.txt](https://agent-passport.org/llms.txt) for machine-readable documentation or [llms-full.txt](https://agent-passport.org/llms-full.txt) for the complete technical reference. MCP discovery: [.well-known/mcp.json](https://agent-passport.org/.well-known/mcp.json).
|
|
20
20
|
|
|
21
|
-
Works with any MCP client: Claude Desktop, Claude Code, Cursor, Windsurf, and more. Full surface area (the default):
|
|
21
|
+
Works with any MCP client: Claude Desktop, Claude Code, Cursor, Windsurf, and more. Full surface area (the default): 152 tools across the protocol surface, including Wave 1 accountability primitives (Ed25519 ActionReceipt, AuthorityBoundaryReceipt, CustodyReceipt, ContestabilityReceipt, APSBundle, strict RFC 8785 JCS for interop-facing receipts, byte-match across implementations). Independently cited by [PDR in Production preprint (Nanook & Gerundium)](https://doi.org/10.5281/zenodo.19323172).
|
|
22
22
|
|
|
23
23
|
## Quick Start
|
|
24
24
|
|
|
@@ -69,7 +69,7 @@ Or for remote SSE:
|
|
|
69
69
|
```
|
|
70
70
|
</details>
|
|
71
71
|
|
|
72
|
-
## Tools (
|
|
72
|
+
## Tools (152)
|
|
73
73
|
|
|
74
74
|
### Identity (Layer 1) — 5 tools
|
|
75
75
|
|
|
@@ -215,9 +215,9 @@ Layer 1 — Agent Passport Protocol (Ed25519 identity)
|
|
|
215
215
|
|
|
216
216
|
## Links
|
|
217
217
|
|
|
218
|
-
- npm SDK: [agent-passport-system](https://www.npmjs.com/package/agent-passport-system) (
|
|
219
|
-
- Python SDK: [agent-passport-system](https://pypi.org/project/agent-passport-system/) (v2.
|
|
220
|
-
- Go SDK: [agent-passport-go](https://pkg.go.dev/github.com/aeoess/agent-passport-go) (v0.
|
|
218
|
+
- npm SDK: [agent-passport-system](https://www.npmjs.com/package/agent-passport-system) (v4.4.0, 4,500 tests)
|
|
219
|
+
- Python SDK: [agent-passport-system](https://pypi.org/project/agent-passport-system/) (v2.11.0)
|
|
220
|
+
- Go SDK: [agent-passport-go](https://pkg.go.dev/github.com/aeoess/agent-passport-go) (v0.5.0; `go get github.com/aeoess/agent-passport-go@v0.5.0`)
|
|
221
221
|
- Paper (Social Contract): [doi.org/10.5281/zenodo.18749779](https://doi.org/10.5281/zenodo.18749779)
|
|
222
222
|
- Paper (Monotonic Narrowing): [doi.org/10.5281/zenodo.18932404](https://doi.org/10.5281/zenodo.18932404)
|
|
223
223
|
- Paper (Faceted Authority Attenuation): [doi.org/10.5281/zenodo.19260073](https://doi.org/10.5281/zenodo.19260073)
|
package/build/index.d.ts
CHANGED
package/build/index.js
CHANGED
|
@@ -55,7 +55,7 @@ import { registerSelfAttestedSource, } from "agent-passport-system";
|
|
|
55
55
|
// Data Lifecycle Governance (Modules 43+)
|
|
56
56
|
import { createDerivationReceipt, resolveExtendedLineage, evaluateRevocationImpact, createDecisionLineageReceipt, isPurposePermitted, purposeCategory, isRetentionExpired, checkAggregateConstraints, isTransferPermitted, computeGovernanceTaint, fileDispute, checkCombinationPermitted, createAccessSnapshot, resolveRightsPropagation, DEFAULT_RIGHTS_PROPAGATION, detectPurposeDrift, declareReidentificationRisk, verifyGovernanceBlock, parseGovernanceBlockFromHTML, isUsagePermitted, embedGovernance, generateApsTxt, verifyApsTxt, resolveTermsForPath, createChainedGovernanceBlock, createAccessReceipt, governanceLoop360, } from "agent-passport-system";
|
|
57
57
|
// Rome-Complete: Charter, Approval, Time, Reserve, Federation
|
|
58
|
-
import { createCharter, signCharter, verifyCharter,
|
|
58
|
+
import { createCharter, signCharter, verifyCharter, createAmendment, signAmendment, verifyAmendment, createApprovalRequest, addApprovalSignature, createHybridTimestamp, compareTimestamps, validateTemporalRights, createReserveAttestation, vouchReputation, applyReputationDowngrade,
|
|
59
59
|
// v2 boundary primitives (AttributionConsent, ProvisionalStatement, HumanEscalationFlag)
|
|
60
60
|
createAttributionReceipt, signAttributionConsent, verifyAttributionConsent, checkArtifactCitations, receiptCore, createProvisional, promoteStatement, verifyPromotion, withdrawProvisional, withdrawalPayload, isBinding, checkEscalationRequired, requestOwnerConfirmation, recordOwnerConfirmation,
|
|
61
61
|
// Attribution Primitive (unified four-axis signed Merkle receipt)
|
|
@@ -68,6 +68,7 @@ aggregateAttributionPrimitives, buildContributorQueryResponse, signSettlementRec
|
|
|
68
68
|
// Mutual Authentication v1 (SDK v2.2.0)
|
|
69
69
|
// ═══════════════════════════════════════
|
|
70
70
|
import { buildCertificate, signCertificate, certificateId, verifyBundle, verifyAttest, deriveSession, } from "agent-passport-system";
|
|
71
|
+
import { toolCount } from "./toolManifest.js";
|
|
71
72
|
// ═══════════════════════════════════════
|
|
72
73
|
// Capability Token v0.1 (reference implementation)
|
|
73
74
|
// Spec: agent-passport-system/docs/CAPABILITY-TOKEN-SPEC-DRAFT.md
|
|
@@ -160,6 +161,7 @@ const state = {
|
|
|
160
161
|
derivationStore: new Map(),
|
|
161
162
|
sessionAgent: null,
|
|
162
163
|
charters: new Map(),
|
|
164
|
+
amendments: new Map(),
|
|
163
165
|
approvalRequests: new Map(),
|
|
164
166
|
// Agent Attestation Architecture (Phase 1)
|
|
165
167
|
issuanceContexts: new Map(),
|
|
@@ -397,7 +399,8 @@ const TOOL_PROFILES = {
|
|
|
397
399
|
'create_agent_context', 'execute_with_context', 'complete_action',
|
|
398
400
|
'create_delegation', 'verify_delegation', 'revoke_delegation',
|
|
399
401
|
'create_charter', 'sign_charter', 'verify_charter',
|
|
400
|
-
'
|
|
402
|
+
'propose_amendment', 'sign_amendment', 'verify_amendment',
|
|
403
|
+
'create_approval_request', 'add_approval_signature',
|
|
401
404
|
'create_outcome_record', 'add_principal_report',
|
|
402
405
|
'activate_emergency', 'define_emergency_pathway',
|
|
403
406
|
'create_artifact_provenance', 'create_policy_context',
|
|
@@ -437,7 +440,6 @@ const TOOL_PROFILES = {
|
|
|
437
440
|
'gateway_stats', 'create_delegation', 'load_values_floor', 'attest_to_floor',
|
|
438
441
|
'create_hybrid_timestamp', 'compare_timestamps', 'validate_temporal_rights',
|
|
439
442
|
'create_reserve_attestation', 'vouch_reputation', 'apply_reputation_downgrade',
|
|
440
|
-
'evaluate_threshold',
|
|
441
443
|
]),
|
|
442
444
|
comms: new Set([
|
|
443
445
|
'identify', 'generate_keys',
|
|
@@ -479,8 +481,26 @@ const profileFilter = TOOL_PROFILES[activeProfile];
|
|
|
479
481
|
// which would have silently disabled both profile filtering and the handler
|
|
480
482
|
// try/catch. The wrapper body is unchanged: registerTool(name, config, cb)
|
|
481
483
|
// still carries the handler as its last argument.
|
|
484
|
+
// Every tool name that reaches the wrapper, in registration order.
|
|
485
|
+
//
|
|
486
|
+
// This is the single structural source of truth for the tool inventory. The build
|
|
487
|
+
// step writes tools-manifest.json from this array, the boundary test asserts the
|
|
488
|
+
// live registry equals that manifest, and list_profiles and setup read its count.
|
|
489
|
+
// Nothing counts `server.registerTool(` call sites in source text: that is source
|
|
490
|
+
// scraping, and it is the coupling that let a downstream consumer silently report
|
|
491
|
+
// zero once the registration API was renamed.
|
|
492
|
+
//
|
|
493
|
+
// RECORDED BEFORE THE PROFILE FILTER ON PURPOSE. The wrapper below RETURNS EARLY
|
|
494
|
+
// when APS_PROFILE filters a tool out. Pushing after that early return would make
|
|
495
|
+
// the manifest a function of whichever profile happened to be set when the build
|
|
496
|
+
// ran, which is the same defect one layer up. The inventory is a property of the
|
|
497
|
+
// source, not of the environment, so the push happens first and unconditionally.
|
|
498
|
+
// tests/v2-boundary-tools.test.mjs asserts the manifest is identical under
|
|
499
|
+
// APS_PROFILE=full and APS_PROFILE=governance.
|
|
500
|
+
export const REGISTERED_TOOL_NAMES = [];
|
|
482
501
|
const _origTool = server.registerTool.bind(server);
|
|
483
502
|
server.registerTool = function (name, ...rest) {
|
|
503
|
+
REGISTERED_TOOL_NAMES.push(name);
|
|
484
504
|
if (name !== 'list_profiles' && activeProfile !== 'full' && profileFilter && !profileFilter.has(name)) {
|
|
485
505
|
return; // filtered out by profile
|
|
486
506
|
}
|
|
@@ -586,7 +606,9 @@ const TOOL_SCOPE_MAP = {
|
|
|
586
606
|
'create_charter': 'governance',
|
|
587
607
|
'verify_charter': 'governance',
|
|
588
608
|
'sign_charter': 'governance',
|
|
589
|
-
'
|
|
609
|
+
'propose_amendment': 'governance',
|
|
610
|
+
'sign_amendment': 'governance',
|
|
611
|
+
'verify_amendment': 'governance',
|
|
590
612
|
'create_approval_request': 'governance',
|
|
591
613
|
'add_approval_signature': 'governance',
|
|
592
614
|
'generate_governance_block': 'governance',
|
|
@@ -685,7 +707,9 @@ const TOOL_SCOPE_MAP = {
|
|
|
685
707
|
server.registerTool("list_profiles", { description: "Show available tool profiles. Set APS_PROFILE env var to limit exposed tools (e.g. APS_PROFILE=data).", inputSchema: z.object({}) }, async () => {
|
|
686
708
|
const lines = Object.entries(TOOL_PROFILES).map(([name, tools]) => `• ${name} (${tools.size} tools): ${Array.from(tools).slice(0, 6).join(', ')}${tools.size > 6 ? '...' : ''}`);
|
|
687
709
|
const essentialSize = TOOL_PROFILES.essential.size;
|
|
688
|
-
|
|
710
|
+
// Generated count, never a literal. See src/toolManifest.ts.
|
|
711
|
+
const total = toolCount(REGISTERED_TOOL_NAMES.length);
|
|
712
|
+
return { content: [{ type: "text", text: `📋 Tool Profiles (set APS_PROFILE env var):\n\nActive: ${activeProfile} (${activeProfile === 'full' ? total : profileFilter?.size || total} tools)\n\nRecommended: essential (${essentialSize} tools) - identity, delegation, enforcement, commerce, reputation.\n\n${lines.join('\n')}\n\n• full (${total} tools): All tools exposed (default)` }] };
|
|
689
713
|
});
|
|
690
714
|
// ═══════════════════════════════════════
|
|
691
715
|
// TOOL: list_tools_for_scope (Primitive #9: Tool Pool Assembly)
|
|
@@ -3734,21 +3758,90 @@ server.registerTool("sign_charter", { description: "Add a founding signature to
|
|
|
3734
3758
|
state.charters.set(signed.charterId, signed);
|
|
3735
3759
|
return { content: [{ type: "text", text: `✅ Signature added to ${signed.charterId}\n\nTotal signatures: ${signed.foundingSignatures.length}\nNew signer role: ${args.signer_role}` }] };
|
|
3736
3760
|
});
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3761
|
+
// ═══════════════════════════════════════
|
|
3762
|
+
// TOOLS: charter amendment lifecycle
|
|
3763
|
+
// ═══════════════════════════════════════
|
|
3764
|
+
//
|
|
3765
|
+
// These three replace the removed `evaluate_threshold`, which counted declared
|
|
3766
|
+
// signers without verifying anything and still printed a threshold verdict.
|
|
3767
|
+
//
|
|
3768
|
+
// Boundary rule for this path: MCP never constructs a signing preimage, never
|
|
3769
|
+
// canonicalizes governance content, and never accepts signed bytes from a caller.
|
|
3770
|
+
// Every cryptographic meaning comes from an SDK call. `amendmentSignContent` stays
|
|
3771
|
+
// private to the SDK; a copy here would be a second preimage on a second release
|
|
3772
|
+
// cadence.
|
|
3773
|
+
//
|
|
3774
|
+
// WHY THESE SCHEMAS TAKE PRIVATE KEYS. The private-key parameters below are
|
|
3775
|
+
// preserved deliberately, not overlooked. The existing MCP signing tools already
|
|
3776
|
+
// use this model, `sign_charter` immediately above among them, and MCP accepts
|
|
3777
|
+
// private keys at roughly 50 call sites. Externalizing signing for these three
|
|
3778
|
+
// while their neighbours keep in-process keys would convert an inconsistency into
|
|
3779
|
+
// a fix. This preserves consistency for this release and does NOT decide the
|
|
3780
|
+
// broader MCP key custody question, which is open as its own decision across the
|
|
3781
|
+
// whole server. Do not read `propose_amendment(private_key)` as settled
|
|
3782
|
+
// architecture.
|
|
3783
|
+
server.registerTool("propose_amendment", { description: "Propose an amendment to a charter. Supplies a full replacement CharterCore, not a patch. The SDK derives the signing preimage and produces the proposer signature. Session state is not an authoritative registry: amendments live only in this process, are lost on restart, and carry no external trust.", inputSchema: z.object({
|
|
3784
|
+
charter_id: z.string().describe("Charter being amended"),
|
|
3785
|
+
proposed_charter: z.record(z.string(), z.any()).describe("Full CharterCore replacement, not a patch"),
|
|
3786
|
+
description: z.string().describe("Human-readable description of the change"),
|
|
3787
|
+
proposer_private_key: z.string(),
|
|
3788
|
+
proposer_public_key: z.string(),
|
|
3789
|
+
effective_at: z.string().optional().describe("ISO 8601, when the amendment takes effect if approved"),
|
|
3790
|
+
}) }, async (args) => {
|
|
3791
|
+
const charter = state.charters.get(args.charter_id);
|
|
3792
|
+
if (!charter)
|
|
3793
|
+
return { content: [{ type: "text", text: `❌ Charter ${args.charter_id} not found` }] };
|
|
3794
|
+
const amendment = createAmendment({
|
|
3795
|
+
charter,
|
|
3796
|
+
proposedCharter: args.proposed_charter,
|
|
3797
|
+
description: args.description,
|
|
3798
|
+
proposerPrivateKey: args.proposer_private_key,
|
|
3799
|
+
proposerPublicKey: args.proposer_public_key,
|
|
3800
|
+
...(args.effective_at ? { effectiveAt: args.effective_at } : {}),
|
|
3801
|
+
});
|
|
3802
|
+
state.amendments.set(amendment.amendmentId, amendment);
|
|
3803
|
+
return { content: [{ type: "text", text: `✅ Amendment proposed\n\namendment_id: ${amendment.amendmentId}\ncharter_id: ${amendment.charterId}\nfrom_version: ${amendment.fromVersion}\nto_version: ${amendment.toVersion}\nsignatures: ${amendment.signatures.length}\nstatus: ${amendment.status}\n\nNext: sign_amendment to collect signatures, then verify_amendment.` }] };
|
|
3804
|
+
});
|
|
3805
|
+
server.registerTool("sign_amendment", { description: "Add a signature to a proposed amendment. The SDK derives the preimage and signs it; MCP never sees or builds the signed bytes. Session state is not an authoritative registry: amendments live only in this process, are lost on restart, and carry no external trust.", inputSchema: z.object({
|
|
3806
|
+
amendment_id: z.string(),
|
|
3807
|
+
signer_private_key: z.string(),
|
|
3808
|
+
signer_public_key: z.string(),
|
|
3809
|
+
signer_role: z.string().describe("The key class the charter's amendment policy counts this signature against"),
|
|
3810
|
+
}) }, async (args) => {
|
|
3811
|
+
const amendment = state.amendments.get(args.amendment_id);
|
|
3812
|
+
if (!amendment)
|
|
3813
|
+
return { content: [{ type: "text", text: `❌ Amendment ${args.amendment_id} not found` }] };
|
|
3814
|
+
const signed = signAmendment(amendment, args.signer_private_key, args.signer_public_key, args.signer_role);
|
|
3815
|
+
state.amendments.set(signed.amendmentId, signed);
|
|
3816
|
+
const roles = signed.signatures.map(sig => sig.role).join(', ');
|
|
3817
|
+
return { content: [{ type: "text", text: `✅ Signature added to ${signed.amendmentId}\n\nsignatures: ${signed.signatures.length}\nroles collected: ${roles || '(none)'}\nstatus: ${signed.status}\n\nSignature counting and threshold evaluation happen in verify_amendment.` }] };
|
|
3818
|
+
});
|
|
3819
|
+
server.registerTool("verify_amendment", { description: "Verify an amendment against its charter's amendment policy. Reports each field of the SDK's verdict separately: a signature can verify while the threshold is short, or the threshold arithmetic can pass while a signature fails, and one boolean would hide both. Session state is not an authoritative registry: amendments live only in this process, are lost on restart, and carry no external trust.", inputSchema: z.object({
|
|
3820
|
+
charter_id: z.string(),
|
|
3821
|
+
amendment_id: z.string(),
|
|
3745
3822
|
}) }, async (args) => {
|
|
3746
3823
|
const charter = state.charters.get(args.charter_id);
|
|
3747
3824
|
if (!charter)
|
|
3748
3825
|
return { content: [{ type: "text", text: `❌ Charter ${args.charter_id} not found` }] };
|
|
3749
|
-
const
|
|
3750
|
-
|
|
3751
|
-
|
|
3826
|
+
const amendment = state.amendments.get(args.amendment_id);
|
|
3827
|
+
if (!amendment)
|
|
3828
|
+
return { content: [{ type: "text", text: `❌ Amendment ${args.amendment_id} not found` }] };
|
|
3829
|
+
const v = verifyAmendment(amendment, charter);
|
|
3830
|
+
const mark = (b) => b ? '✅' : '❌';
|
|
3831
|
+
// Field order is deliberate: `valid` is rendered LAST and labelled as the
|
|
3832
|
+
// conjunction of the fields above it, never as a headline verdict. A bare
|
|
3833
|
+
// `valid: false` answers nothing on its own; the field that flipped, plus
|
|
3834
|
+
// `errors`, is the answer.
|
|
3835
|
+
const lines = [
|
|
3836
|
+
`charter_exists: ${mark(v.charterExists)} ${v.charterExists}`,
|
|
3837
|
+
`version_match: ${mark(v.versionMatch)} ${v.versionMatch}`,
|
|
3838
|
+
`signatures_valid: ${mark(v.signaturesValid)} ${v.signaturesValid}`,
|
|
3839
|
+
`proposed_charter_valid: ${mark(v.proposedCharterValid)} ${v.proposedCharterValid}`,
|
|
3840
|
+
`threshold_met: ${mark(v.thresholdMet)} ${v.thresholdMet}`,
|
|
3841
|
+
];
|
|
3842
|
+
const errs = v.errors.length ? `\n\nerrors:\n${v.errors.map(e => ` - ${e}`).join('\n')}` : '\n\nerrors: (none)';
|
|
3843
|
+
const conj = `\n\nvalid: ${v.valid} (the conjunction of the five fields above, not a standalone verdict)`;
|
|
3844
|
+
return { content: [{ type: "text", text: `Amendment ${amendment.amendmentId} against charter ${charter.charterId}\n\n${lines.join('\n')}${errs}${conj}` }] };
|
|
3752
3845
|
});
|
|
3753
3846
|
server.registerTool("create_approval_request", { description: "Create a multi-party approval request for charter amendments, office transfers, etc.", inputSchema: z.object({
|
|
3754
3847
|
policy_id: z.string(),
|
package/build/setup.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { readFileSync, writeFileSync, mkdirSync, existsSync } from "node:fs";
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
import { homedir, platform } from "node:os";
|
|
6
|
+
import { toolCount } from "./toolManifest.js";
|
|
6
7
|
const LOCAL_CONFIG = {
|
|
7
8
|
command: "npx",
|
|
8
9
|
args: ["agent-passport-system-mcp"],
|
|
@@ -87,7 +88,7 @@ function setup() {
|
|
|
87
88
|
console.log(JSON.stringify({ mcpServers: { "agent-passport": serverConfig } }, null, 2));
|
|
88
89
|
}
|
|
89
90
|
else {
|
|
90
|
-
console.log(`\n Restart your AI client to activate Agent Passport (
|
|
91
|
+
console.log(`\n Restart your AI client to activate Agent Passport (${toolCount()} tools).`);
|
|
91
92
|
console.log(` Then say: "Create an agent identity" or "Delegate authority"\n`);
|
|
92
93
|
if (!useRemote) {
|
|
93
94
|
console.log(` Tip: Use --remote for zero-install SSE mode: npx agent-passport-system-mcp setup --remote\n`);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ToolManifest {
|
|
2
|
+
generated_by: string;
|
|
3
|
+
count: number;
|
|
4
|
+
tools: string[];
|
|
5
|
+
}
|
|
6
|
+
export declare function readToolManifest(): ToolManifest | null;
|
|
7
|
+
/**
|
|
8
|
+
* The generated tool count.
|
|
9
|
+
*
|
|
10
|
+
* `fallback` should be the caller's live registry length where one is available, so
|
|
11
|
+
* the pre-first-build case degrades to the true runtime number rather than a stale
|
|
12
|
+
* literal. tests/v2-boundary-tools.test.mjs asserts the two are equal.
|
|
13
|
+
*/
|
|
14
|
+
export declare function toolCount(fallback?: number): number;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// Reader for the generated tool manifest.
|
|
2
|
+
//
|
|
3
|
+
// tools-manifest.json sits at the package root and is GENERATED by
|
|
4
|
+
// scripts/generate-manifest.mjs as part of `npm run build`. It is never hand-edited.
|
|
5
|
+
// Its contents come from src/index.ts's REGISTERED_TOOL_NAMES, which every tool
|
|
6
|
+
// registration passes through, so the manifest and the runtime registry are the same
|
|
7
|
+
// data by construction rather than by anyone remembering to update a literal.
|
|
8
|
+
//
|
|
9
|
+
// Do not replace this with a count of `server.registerTool(` occurrences in source
|
|
10
|
+
// text. That is source scraping: it breaks silently the moment the registration API
|
|
11
|
+
// is renamed, and it reports whatever the grep happens to match rather than what the
|
|
12
|
+
// server actually registered.
|
|
13
|
+
import { readFileSync } from "node:fs";
|
|
14
|
+
/** Resolves from build/*.js to the package root, in the repo and when installed. */
|
|
15
|
+
const MANIFEST_URL = new URL("../tools-manifest.json", import.meta.url);
|
|
16
|
+
export function readToolManifest() {
|
|
17
|
+
try {
|
|
18
|
+
return JSON.parse(readFileSync(MANIFEST_URL, "utf8"));
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
// Absent only before the first build has generated it. Callers pass a live
|
|
22
|
+
// fallback so a fresh checkout never prints a wrong number.
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The generated tool count.
|
|
28
|
+
*
|
|
29
|
+
* `fallback` should be the caller's live registry length where one is available, so
|
|
30
|
+
* the pre-first-build case degrades to the true runtime number rather than a stale
|
|
31
|
+
* literal. tests/v2-boundary-tools.test.mjs asserts the two are equal.
|
|
32
|
+
*/
|
|
33
|
+
export function toolCount(fallback) {
|
|
34
|
+
const m = readToolManifest();
|
|
35
|
+
if (m && typeof m.count === "number")
|
|
36
|
+
return m.count;
|
|
37
|
+
return fallback ?? 0;
|
|
38
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-passport-system-mcp",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"mcpName": "io.github.aeoess/agent-passport-mcp",
|
|
5
5
|
"description": "MCP server for the Agent Passport System - protocol-layer tools only. 150 tools (132 protocol + 10 gateway deprecation stubs). Identity, delegation, reputation, attestation, coordination, commerce, attribution primitive, attribution settlement. Tracks SDK v3.3.0 (Wave 1 accountability primitives + Phase 4.1 payment rails shipped in SDK; MCP rail-tool exposure deferred). For gateway-runtime tools (ProxyGateway, AgentContext, DataEnforcementGate), use gateway.aeoess.com REST API or pin to v3.1.x.",
|
|
6
6
|
"type": "module",
|
|
@@ -11,15 +11,16 @@
|
|
|
11
11
|
"files": [
|
|
12
12
|
"build",
|
|
13
13
|
"CONTRIBUTING.md",
|
|
14
|
-
"CODE_OF_CONDUCT.md"
|
|
14
|
+
"CODE_OF_CONDUCT.md",
|
|
15
|
+
"tools-manifest.json"
|
|
15
16
|
],
|
|
16
17
|
"scripts": {
|
|
17
|
-
"build": "npx tsc && chmod 755 build/bin.js build/index.js build/setup.js",
|
|
18
|
+
"build": "npx tsc && chmod 755 build/bin.js build/index.js build/setup.js && node scripts/generate-manifest.mjs",
|
|
18
19
|
"test": "npm run build && node --test tests/*.test.mjs build/__tests__/*.test.js",
|
|
19
20
|
"watch": "tsc --watch",
|
|
20
21
|
"inspector": "npx @modelcontextprotocol/inspector build/index.js",
|
|
21
22
|
"prepublishOnly": "npm run build && npm test",
|
|
22
|
-
"postinstall": "echo '\\n
|
|
23
|
+
"postinstall": "echo '\\n\ud83d\udd11 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
24
|
"postversion": "if [ -f ~/aps-web/scripts/sync-project-state.mjs ]; then node ~/aps-web/scripts/sync-project-state.mjs mcp $npm_package_version; else echo 'postversion: ~/aps-web/scripts/sync-project-state.mjs not found, skipping project-state sync'; fi"
|
|
24
25
|
},
|
|
25
26
|
"keywords": [
|
|
@@ -50,7 +51,7 @@
|
|
|
50
51
|
"homepage": "https://github.com/aeoess/agent-passport-mcp",
|
|
51
52
|
"dependencies": {
|
|
52
53
|
"@modelcontextprotocol/server": "2.0.0",
|
|
53
|
-
"agent-passport-system": "^
|
|
54
|
+
"agent-passport-system": "^4.4.0",
|
|
54
55
|
"zod": "^4.2.0"
|
|
55
56
|
},
|
|
56
57
|
"overrides": {
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
{
|
|
2
|
+
"generated_by": "scripts/generate-manifest.mjs from src/index.ts REGISTERED_TOOL_NAMES. Generated file, do not hand-edit.",
|
|
3
|
+
"count": 152,
|
|
4
|
+
"tools": [
|
|
5
|
+
"accept_assignment",
|
|
6
|
+
"activate_emergency",
|
|
7
|
+
"add_approval_signature",
|
|
8
|
+
"add_principal_report",
|
|
9
|
+
"apply_reputation_downgrade",
|
|
10
|
+
"aps_aggregate_settlement",
|
|
11
|
+
"aps_attribution_receipt_id",
|
|
12
|
+
"aps_build_contributor_query",
|
|
13
|
+
"aps_capability_evaluate_authority",
|
|
14
|
+
"aps_capability_issue_challenge",
|
|
15
|
+
"aps_capability_mint_receipt",
|
|
16
|
+
"aps_capability_sign_effect",
|
|
17
|
+
"aps_check_artifact_citations",
|
|
18
|
+
"aps_check_escalation_required",
|
|
19
|
+
"aps_check_projection_consistency",
|
|
20
|
+
"aps_compute_attribution_action_ref",
|
|
21
|
+
"aps_compute_compute_axis_weights",
|
|
22
|
+
"aps_compute_data_axis_weights",
|
|
23
|
+
"aps_construct_attribution_primitive",
|
|
24
|
+
"aps_create_attribution_receipt",
|
|
25
|
+
"aps_create_provisional",
|
|
26
|
+
"aps_project_attribution",
|
|
27
|
+
"aps_promote_statement",
|
|
28
|
+
"aps_record_owner_confirmation",
|
|
29
|
+
"aps_sign_attribution_consent",
|
|
30
|
+
"aps_verify_attribution_consent",
|
|
31
|
+
"aps_verify_attribution_primitive",
|
|
32
|
+
"aps_verify_attribution_projection",
|
|
33
|
+
"aps_verify_promotion",
|
|
34
|
+
"aps_verify_settlement",
|
|
35
|
+
"aps_withdraw_provisional",
|
|
36
|
+
"assign_agent",
|
|
37
|
+
"attest_to_floor",
|
|
38
|
+
"broadcast",
|
|
39
|
+
"check_aggregate_constraints",
|
|
40
|
+
"check_combination_permitted",
|
|
41
|
+
"check_jurisdiction_transfer",
|
|
42
|
+
"check_messages",
|
|
43
|
+
"check_purpose_permitted",
|
|
44
|
+
"check_retention_expired",
|
|
45
|
+
"check_tier",
|
|
46
|
+
"check_usage_permitted",
|
|
47
|
+
"classify_evidence_quality",
|
|
48
|
+
"commerce_preflight",
|
|
49
|
+
"compare_timestamps",
|
|
50
|
+
"complete_action",
|
|
51
|
+
"complete_task",
|
|
52
|
+
"compute_action_ref",
|
|
53
|
+
"compute_governance_taint",
|
|
54
|
+
"create_access_receipt",
|
|
55
|
+
"create_access_snapshot",
|
|
56
|
+
"create_agent_context",
|
|
57
|
+
"create_approval_request",
|
|
58
|
+
"create_artifact_provenance",
|
|
59
|
+
"create_chained_governance_block",
|
|
60
|
+
"create_charter",
|
|
61
|
+
"create_data_enforcement_gate",
|
|
62
|
+
"create_decision_lineage_receipt",
|
|
63
|
+
"create_delegation",
|
|
64
|
+
"create_derivation_receipt",
|
|
65
|
+
"create_disclosure",
|
|
66
|
+
"create_gateway",
|
|
67
|
+
"create_hybrid_timestamp",
|
|
68
|
+
"create_intent",
|
|
69
|
+
"create_outcome_record",
|
|
70
|
+
"create_policy_context",
|
|
71
|
+
"create_principal",
|
|
72
|
+
"create_reserve_attestation",
|
|
73
|
+
"create_task_brief",
|
|
74
|
+
"create_v2_delegation",
|
|
75
|
+
"declare_reidentification_risk",
|
|
76
|
+
"define_emergency_pathway",
|
|
77
|
+
"detect_purpose_drift",
|
|
78
|
+
"endorse_agent",
|
|
79
|
+
"evaluate_intent",
|
|
80
|
+
"evaluate_revocation_impact",
|
|
81
|
+
"execute_with_context",
|
|
82
|
+
"file_data_dispute",
|
|
83
|
+
"gateway_approve",
|
|
84
|
+
"gateway_process_tool_call",
|
|
85
|
+
"gateway_stats",
|
|
86
|
+
"generate_aps_txt",
|
|
87
|
+
"generate_governance_block",
|
|
88
|
+
"generate_keys",
|
|
89
|
+
"generate_settlement",
|
|
90
|
+
"get_agora_by_topic",
|
|
91
|
+
"get_agora_thread",
|
|
92
|
+
"get_agora_topics",
|
|
93
|
+
"get_behavioral_sequence",
|
|
94
|
+
"get_commerce_spend",
|
|
95
|
+
"get_digest",
|
|
96
|
+
"get_evidence",
|
|
97
|
+
"get_fleet_status",
|
|
98
|
+
"get_my_role",
|
|
99
|
+
"get_passport_grade",
|
|
100
|
+
"get_promotion_history",
|
|
101
|
+
"get_task_detail",
|
|
102
|
+
"governance_360",
|
|
103
|
+
"handoff_evidence",
|
|
104
|
+
"identify",
|
|
105
|
+
"is_evidence_fresh",
|
|
106
|
+
"is_key_active",
|
|
107
|
+
"issue_passport",
|
|
108
|
+
"list_agents",
|
|
109
|
+
"list_issuance_records",
|
|
110
|
+
"list_profiles",
|
|
111
|
+
"list_tasks",
|
|
112
|
+
"list_tools_for_scope",
|
|
113
|
+
"load_values_floor",
|
|
114
|
+
"mutualAuthBuildCertificate",
|
|
115
|
+
"mutualAuthDeriveSession",
|
|
116
|
+
"mutualAuthVerifyAttest",
|
|
117
|
+
"mutualAuthVerifyTrustBundle",
|
|
118
|
+
"parse_governance_block_html",
|
|
119
|
+
"post_agora_message",
|
|
120
|
+
"propose_amendment",
|
|
121
|
+
"query_contributions",
|
|
122
|
+
"register_agora_agent",
|
|
123
|
+
"register_agora_public",
|
|
124
|
+
"register_data_source",
|
|
125
|
+
"remove_intent_card",
|
|
126
|
+
"request_human_approval",
|
|
127
|
+
"request_intro",
|
|
128
|
+
"resolve_authority",
|
|
129
|
+
"resolve_lineage",
|
|
130
|
+
"resolve_path_terms",
|
|
131
|
+
"resolve_rights_propagation",
|
|
132
|
+
"respond_to_intro",
|
|
133
|
+
"review_evidence",
|
|
134
|
+
"review_promotion",
|
|
135
|
+
"revoke_delegation",
|
|
136
|
+
"revoke_endorsement",
|
|
137
|
+
"rotate_key",
|
|
138
|
+
"search_matches",
|
|
139
|
+
"send_message",
|
|
140
|
+
"sign_amendment",
|
|
141
|
+
"sign_charter",
|
|
142
|
+
"sub_delegate",
|
|
143
|
+
"submit_deliverable",
|
|
144
|
+
"submit_evidence",
|
|
145
|
+
"supersede_v2_delegation",
|
|
146
|
+
"update_reputation",
|
|
147
|
+
"validate_temporal_rights",
|
|
148
|
+
"verify_amendment",
|
|
149
|
+
"verify_aps_txt",
|
|
150
|
+
"verify_charter",
|
|
151
|
+
"verify_delegation",
|
|
152
|
+
"verify_endorsement",
|
|
153
|
+
"verify_governance_block",
|
|
154
|
+
"verify_issuer",
|
|
155
|
+
"verify_rotation_chain",
|
|
156
|
+
"vouch_reputation"
|
|
157
|
+
]
|
|
158
|
+
}
|