@sanctuary-framework/mcp-server 0.5.4 → 0.5.6
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/dist/cli.cjs +1936 -1399
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +1936 -1399
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +1937 -1398
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +97 -2
- package/dist/index.d.ts +97 -2
- package/dist/index.js +1935 -1399
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -21,7 +21,7 @@ interface SanctuaryConfig {
|
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
disclosure: {
|
|
24
|
-
proof_system: "groth16" | "plonk" | "commitment-only";
|
|
24
|
+
proof_system: "groth16" | "plonk" | "schnorr-pedersen" | "commitment-only";
|
|
25
25
|
default_policy: "minimum-necessary" | "withhold-all";
|
|
26
26
|
};
|
|
27
27
|
reputation: {
|
|
@@ -2354,6 +2354,101 @@ declare function completeHandshake(response: HandshakeResponse, session: Handsha
|
|
|
2354
2354
|
*/
|
|
2355
2355
|
declare function verifyCompletion(completion: HandshakeCompletion, session: HandshakeSession): HandshakeResult;
|
|
2356
2356
|
|
|
2357
|
+
/**
|
|
2358
|
+
* Sanctuary MCP Server — Sovereignty Attestation Artifacts
|
|
2359
|
+
*
|
|
2360
|
+
* Signed, shareable artifacts proving sovereignty verification between agents.
|
|
2361
|
+
* Used for one-shot SHR exchanges and as portable proof of handshake completion.
|
|
2362
|
+
*
|
|
2363
|
+
* An attestation artifact contains:
|
|
2364
|
+
* - Both parties' SHRs
|
|
2365
|
+
* - Verification results (sovereignty level, trust tier)
|
|
2366
|
+
* - Ed25519 signature over the canonical artifact body
|
|
2367
|
+
* - Human-readable summary for social/public posting
|
|
2368
|
+
*/
|
|
2369
|
+
|
|
2370
|
+
/** Attestation artifact version */
|
|
2371
|
+
declare const ATTESTATION_VERSION: "1.0";
|
|
2372
|
+
/** The signed body of an attestation artifact */
|
|
2373
|
+
interface AttestationBody {
|
|
2374
|
+
attestation_version: typeof ATTESTATION_VERSION;
|
|
2375
|
+
/** Who generated this attestation */
|
|
2376
|
+
attester_id: string;
|
|
2377
|
+
/** Who was verified */
|
|
2378
|
+
subject_id: string;
|
|
2379
|
+
/** Attester's SHR at time of attestation */
|
|
2380
|
+
attester_shr: SignedSHR;
|
|
2381
|
+
/** Subject's SHR that was verified */
|
|
2382
|
+
subject_shr: SignedSHR;
|
|
2383
|
+
/** Verification results */
|
|
2384
|
+
verification: {
|
|
2385
|
+
subject_shr_valid: boolean;
|
|
2386
|
+
subject_sovereignty_level: SovereigntyLevel;
|
|
2387
|
+
subject_trust_tier: TrustTier;
|
|
2388
|
+
/** Whether subject also verified attester (mutual exchange) */
|
|
2389
|
+
mutual: boolean;
|
|
2390
|
+
errors: string[];
|
|
2391
|
+
warnings: string[];
|
|
2392
|
+
};
|
|
2393
|
+
/** When this attestation was generated */
|
|
2394
|
+
attested_at: string;
|
|
2395
|
+
/** When this attestation expires (min of both SHR expiries) */
|
|
2396
|
+
expires_at: string;
|
|
2397
|
+
}
|
|
2398
|
+
/** Complete signed attestation artifact */
|
|
2399
|
+
interface SignedAttestation {
|
|
2400
|
+
body: AttestationBody;
|
|
2401
|
+
/** Attester's public key (base64url) */
|
|
2402
|
+
signed_by: string;
|
|
2403
|
+
/** Ed25519 signature over canonical body (base64url) */
|
|
2404
|
+
signature: string;
|
|
2405
|
+
/** Human-readable summary for social posting */
|
|
2406
|
+
summary: string;
|
|
2407
|
+
}
|
|
2408
|
+
interface AttestationOptions {
|
|
2409
|
+
/** Our signed SHR */
|
|
2410
|
+
attesterSHR: SignedSHR;
|
|
2411
|
+
/** Counterparty's signed SHR */
|
|
2412
|
+
subjectSHR: SignedSHR;
|
|
2413
|
+
/** Result from verifySHR(subjectSHR) */
|
|
2414
|
+
verificationResult: SHRVerificationResult;
|
|
2415
|
+
/** Whether this is a mutual exchange (both sides verify) */
|
|
2416
|
+
mutual?: boolean;
|
|
2417
|
+
/** Identity manager for signing */
|
|
2418
|
+
identityManager: IdentityManager;
|
|
2419
|
+
/** Master key for key derivation */
|
|
2420
|
+
masterKey: Uint8Array;
|
|
2421
|
+
/** Identity to sign with (defaults to primary) */
|
|
2422
|
+
identityId?: string;
|
|
2423
|
+
}
|
|
2424
|
+
/**
|
|
2425
|
+
* Generate a signed attestation artifact.
|
|
2426
|
+
*
|
|
2427
|
+
* The artifact is a portable, verifiable proof that one agent
|
|
2428
|
+
* verified another's sovereignty posture. It includes both SHRs,
|
|
2429
|
+
* the verification outcome, and a human-readable summary.
|
|
2430
|
+
*/
|
|
2431
|
+
declare function generateAttestation(opts: AttestationOptions): SignedAttestation | {
|
|
2432
|
+
error: string;
|
|
2433
|
+
};
|
|
2434
|
+
interface AttestationVerificationResult {
|
|
2435
|
+
valid: boolean;
|
|
2436
|
+
errors: string[];
|
|
2437
|
+
attester_id: string;
|
|
2438
|
+
subject_id: string;
|
|
2439
|
+
trust_tier: TrustTier;
|
|
2440
|
+
expired: boolean;
|
|
2441
|
+
}
|
|
2442
|
+
/**
|
|
2443
|
+
* Verify a signed attestation artifact.
|
|
2444
|
+
*
|
|
2445
|
+
* Checks:
|
|
2446
|
+
* 1. Signature validity (Ed25519 over canonical body)
|
|
2447
|
+
* 2. Temporal validity (not expired)
|
|
2448
|
+
* 3. Structural integrity (version, required fields)
|
|
2449
|
+
*/
|
|
2450
|
+
declare function verifyAttestation(attestation: SignedAttestation, now?: Date): AttestationVerificationResult;
|
|
2451
|
+
|
|
2357
2452
|
/**
|
|
2358
2453
|
* Sanctuary MCP Server — Concordia Bridge: Type Definitions
|
|
2359
2454
|
*
|
|
@@ -2559,4 +2654,4 @@ declare function createSanctuaryServer(options?: {
|
|
|
2559
2654
|
storage?: StorageBackend;
|
|
2560
2655
|
}): Promise<SanctuaryServer>;
|
|
2561
2656
|
|
|
2562
|
-
export { ApprovalGate, AuditLog, AutoApproveChannel, BaselineTracker, type BridgeAttestationRequest, type BridgeAttestationResult, type BridgeCommitment, type BridgeVerificationResult, TEMPLATES as CONTEXT_GATE_TEMPLATES, CallbackApprovalChannel, CommitmentStore, type ConcordiaOutcome, type ContextAction, type ContextFilterResult, ContextGateEnforcer, type ContextGatePolicy, ContextGatePolicyStore, type ContextGateRule, type ContextGateTemplate, DashboardApprovalChannel, type DashboardConfig, type DetectionResult, type EnforcerConfig, type FederationCapabilities, type FederationPeer, FederationRegistry, type FieldClassification, type FieldFilterResult, FilesystemStorage, type GateResult, type HandshakeChallenge, type HandshakeCompletion, type HandshakeResponse, type HandshakeResult, InjectionDetector, type InjectionDetectorConfig, type InjectionSignal, MemoryStorage, type PedersenCommitment, type PeerTrustEvaluation, type PolicyRecommendation, PolicyStore, type PrincipalPolicy, type ProviderCategory, ReputationStore, type SHRBody, type SHRVerificationResult, type SanctuaryConfig, type SanctuaryServer, type SignedSHR, type SovereigntyTier, StateStore, StderrApprovalChannel, TIER_WEIGHTS, type TierMetadata, type TieredAttestation, WebhookApprovalChannel, type WebhookCallbackPayload, type WebhookConfig, type WebhookPayload, type ZKProofOfKnowledge, type ZKRangeProof, canonicalize, classifyField, completeHandshake, computeWeightedScore, createBridgeCommitment, createPedersenCommitment, createProofOfKnowledge, createRangeProof, createSanctuaryServer, evaluateField, filterContext, generateSHR, getTemplate, initiateHandshake, listTemplateIds, loadConfig, loadPrincipalPolicy, recommendPolicy, resolveTier, respondToHandshake, signPayload, tierDistribution, verifyBridgeCommitment, verifyCompletion, verifyPedersenCommitment, verifyProofOfKnowledge, verifyRangeProof, verifySHR, verifySignature };
|
|
2657
|
+
export { ATTESTATION_VERSION, ApprovalGate, type AttestationBody, type AttestationVerificationResult, AuditLog, AutoApproveChannel, BaselineTracker, type BridgeAttestationRequest, type BridgeAttestationResult, type BridgeCommitment, type BridgeVerificationResult, TEMPLATES as CONTEXT_GATE_TEMPLATES, CallbackApprovalChannel, CommitmentStore, type ConcordiaOutcome, type ContextAction, type ContextFilterResult, ContextGateEnforcer, type ContextGatePolicy, ContextGatePolicyStore, type ContextGateRule, type ContextGateTemplate, DashboardApprovalChannel, type DashboardConfig, type DetectionResult, type EnforcerConfig, type FederationCapabilities, type FederationPeer, FederationRegistry, type FieldClassification, type FieldFilterResult, FilesystemStorage, type GateResult, type HandshakeChallenge, type HandshakeCompletion, type HandshakeResponse, type HandshakeResult, InjectionDetector, type InjectionDetectorConfig, type InjectionSignal, MemoryStorage, type PedersenCommitment, type PeerTrustEvaluation, type PolicyRecommendation, PolicyStore, type PrincipalPolicy, type ProviderCategory, ReputationStore, type SHRBody, type SHRVerificationResult, type SanctuaryConfig, type SanctuaryServer, type SignedAttestation, type SignedSHR, type SovereigntyTier, StateStore, StderrApprovalChannel, TIER_WEIGHTS, type TierMetadata, type TieredAttestation, WebhookApprovalChannel, type WebhookCallbackPayload, type WebhookConfig, type WebhookPayload, type ZKProofOfKnowledge, type ZKRangeProof, canonicalize, classifyField, completeHandshake, computeWeightedScore, createBridgeCommitment, createPedersenCommitment, createProofOfKnowledge, createRangeProof, createSanctuaryServer, evaluateField, filterContext, generateAttestation, generateSHR, getTemplate, initiateHandshake, listTemplateIds, loadConfig, loadPrincipalPolicy, recommendPolicy, resolveTier, respondToHandshake, signPayload, tierDistribution, verifyAttestation, verifyBridgeCommitment, verifyCompletion, verifyPedersenCommitment, verifyProofOfKnowledge, verifyRangeProof, verifySHR, verifySignature };
|
package/dist/index.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ interface SanctuaryConfig {
|
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
disclosure: {
|
|
24
|
-
proof_system: "groth16" | "plonk" | "commitment-only";
|
|
24
|
+
proof_system: "groth16" | "plonk" | "schnorr-pedersen" | "commitment-only";
|
|
25
25
|
default_policy: "minimum-necessary" | "withhold-all";
|
|
26
26
|
};
|
|
27
27
|
reputation: {
|
|
@@ -2354,6 +2354,101 @@ declare function completeHandshake(response: HandshakeResponse, session: Handsha
|
|
|
2354
2354
|
*/
|
|
2355
2355
|
declare function verifyCompletion(completion: HandshakeCompletion, session: HandshakeSession): HandshakeResult;
|
|
2356
2356
|
|
|
2357
|
+
/**
|
|
2358
|
+
* Sanctuary MCP Server — Sovereignty Attestation Artifacts
|
|
2359
|
+
*
|
|
2360
|
+
* Signed, shareable artifacts proving sovereignty verification between agents.
|
|
2361
|
+
* Used for one-shot SHR exchanges and as portable proof of handshake completion.
|
|
2362
|
+
*
|
|
2363
|
+
* An attestation artifact contains:
|
|
2364
|
+
* - Both parties' SHRs
|
|
2365
|
+
* - Verification results (sovereignty level, trust tier)
|
|
2366
|
+
* - Ed25519 signature over the canonical artifact body
|
|
2367
|
+
* - Human-readable summary for social/public posting
|
|
2368
|
+
*/
|
|
2369
|
+
|
|
2370
|
+
/** Attestation artifact version */
|
|
2371
|
+
declare const ATTESTATION_VERSION: "1.0";
|
|
2372
|
+
/** The signed body of an attestation artifact */
|
|
2373
|
+
interface AttestationBody {
|
|
2374
|
+
attestation_version: typeof ATTESTATION_VERSION;
|
|
2375
|
+
/** Who generated this attestation */
|
|
2376
|
+
attester_id: string;
|
|
2377
|
+
/** Who was verified */
|
|
2378
|
+
subject_id: string;
|
|
2379
|
+
/** Attester's SHR at time of attestation */
|
|
2380
|
+
attester_shr: SignedSHR;
|
|
2381
|
+
/** Subject's SHR that was verified */
|
|
2382
|
+
subject_shr: SignedSHR;
|
|
2383
|
+
/** Verification results */
|
|
2384
|
+
verification: {
|
|
2385
|
+
subject_shr_valid: boolean;
|
|
2386
|
+
subject_sovereignty_level: SovereigntyLevel;
|
|
2387
|
+
subject_trust_tier: TrustTier;
|
|
2388
|
+
/** Whether subject also verified attester (mutual exchange) */
|
|
2389
|
+
mutual: boolean;
|
|
2390
|
+
errors: string[];
|
|
2391
|
+
warnings: string[];
|
|
2392
|
+
};
|
|
2393
|
+
/** When this attestation was generated */
|
|
2394
|
+
attested_at: string;
|
|
2395
|
+
/** When this attestation expires (min of both SHR expiries) */
|
|
2396
|
+
expires_at: string;
|
|
2397
|
+
}
|
|
2398
|
+
/** Complete signed attestation artifact */
|
|
2399
|
+
interface SignedAttestation {
|
|
2400
|
+
body: AttestationBody;
|
|
2401
|
+
/** Attester's public key (base64url) */
|
|
2402
|
+
signed_by: string;
|
|
2403
|
+
/** Ed25519 signature over canonical body (base64url) */
|
|
2404
|
+
signature: string;
|
|
2405
|
+
/** Human-readable summary for social posting */
|
|
2406
|
+
summary: string;
|
|
2407
|
+
}
|
|
2408
|
+
interface AttestationOptions {
|
|
2409
|
+
/** Our signed SHR */
|
|
2410
|
+
attesterSHR: SignedSHR;
|
|
2411
|
+
/** Counterparty's signed SHR */
|
|
2412
|
+
subjectSHR: SignedSHR;
|
|
2413
|
+
/** Result from verifySHR(subjectSHR) */
|
|
2414
|
+
verificationResult: SHRVerificationResult;
|
|
2415
|
+
/** Whether this is a mutual exchange (both sides verify) */
|
|
2416
|
+
mutual?: boolean;
|
|
2417
|
+
/** Identity manager for signing */
|
|
2418
|
+
identityManager: IdentityManager;
|
|
2419
|
+
/** Master key for key derivation */
|
|
2420
|
+
masterKey: Uint8Array;
|
|
2421
|
+
/** Identity to sign with (defaults to primary) */
|
|
2422
|
+
identityId?: string;
|
|
2423
|
+
}
|
|
2424
|
+
/**
|
|
2425
|
+
* Generate a signed attestation artifact.
|
|
2426
|
+
*
|
|
2427
|
+
* The artifact is a portable, verifiable proof that one agent
|
|
2428
|
+
* verified another's sovereignty posture. It includes both SHRs,
|
|
2429
|
+
* the verification outcome, and a human-readable summary.
|
|
2430
|
+
*/
|
|
2431
|
+
declare function generateAttestation(opts: AttestationOptions): SignedAttestation | {
|
|
2432
|
+
error: string;
|
|
2433
|
+
};
|
|
2434
|
+
interface AttestationVerificationResult {
|
|
2435
|
+
valid: boolean;
|
|
2436
|
+
errors: string[];
|
|
2437
|
+
attester_id: string;
|
|
2438
|
+
subject_id: string;
|
|
2439
|
+
trust_tier: TrustTier;
|
|
2440
|
+
expired: boolean;
|
|
2441
|
+
}
|
|
2442
|
+
/**
|
|
2443
|
+
* Verify a signed attestation artifact.
|
|
2444
|
+
*
|
|
2445
|
+
* Checks:
|
|
2446
|
+
* 1. Signature validity (Ed25519 over canonical body)
|
|
2447
|
+
* 2. Temporal validity (not expired)
|
|
2448
|
+
* 3. Structural integrity (version, required fields)
|
|
2449
|
+
*/
|
|
2450
|
+
declare function verifyAttestation(attestation: SignedAttestation, now?: Date): AttestationVerificationResult;
|
|
2451
|
+
|
|
2357
2452
|
/**
|
|
2358
2453
|
* Sanctuary MCP Server — Concordia Bridge: Type Definitions
|
|
2359
2454
|
*
|
|
@@ -2559,4 +2654,4 @@ declare function createSanctuaryServer(options?: {
|
|
|
2559
2654
|
storage?: StorageBackend;
|
|
2560
2655
|
}): Promise<SanctuaryServer>;
|
|
2561
2656
|
|
|
2562
|
-
export { ApprovalGate, AuditLog, AutoApproveChannel, BaselineTracker, type BridgeAttestationRequest, type BridgeAttestationResult, type BridgeCommitment, type BridgeVerificationResult, TEMPLATES as CONTEXT_GATE_TEMPLATES, CallbackApprovalChannel, CommitmentStore, type ConcordiaOutcome, type ContextAction, type ContextFilterResult, ContextGateEnforcer, type ContextGatePolicy, ContextGatePolicyStore, type ContextGateRule, type ContextGateTemplate, DashboardApprovalChannel, type DashboardConfig, type DetectionResult, type EnforcerConfig, type FederationCapabilities, type FederationPeer, FederationRegistry, type FieldClassification, type FieldFilterResult, FilesystemStorage, type GateResult, type HandshakeChallenge, type HandshakeCompletion, type HandshakeResponse, type HandshakeResult, InjectionDetector, type InjectionDetectorConfig, type InjectionSignal, MemoryStorage, type PedersenCommitment, type PeerTrustEvaluation, type PolicyRecommendation, PolicyStore, type PrincipalPolicy, type ProviderCategory, ReputationStore, type SHRBody, type SHRVerificationResult, type SanctuaryConfig, type SanctuaryServer, type SignedSHR, type SovereigntyTier, StateStore, StderrApprovalChannel, TIER_WEIGHTS, type TierMetadata, type TieredAttestation, WebhookApprovalChannel, type WebhookCallbackPayload, type WebhookConfig, type WebhookPayload, type ZKProofOfKnowledge, type ZKRangeProof, canonicalize, classifyField, completeHandshake, computeWeightedScore, createBridgeCommitment, createPedersenCommitment, createProofOfKnowledge, createRangeProof, createSanctuaryServer, evaluateField, filterContext, generateSHR, getTemplate, initiateHandshake, listTemplateIds, loadConfig, loadPrincipalPolicy, recommendPolicy, resolveTier, respondToHandshake, signPayload, tierDistribution, verifyBridgeCommitment, verifyCompletion, verifyPedersenCommitment, verifyProofOfKnowledge, verifyRangeProof, verifySHR, verifySignature };
|
|
2657
|
+
export { ATTESTATION_VERSION, ApprovalGate, type AttestationBody, type AttestationVerificationResult, AuditLog, AutoApproveChannel, BaselineTracker, type BridgeAttestationRequest, type BridgeAttestationResult, type BridgeCommitment, type BridgeVerificationResult, TEMPLATES as CONTEXT_GATE_TEMPLATES, CallbackApprovalChannel, CommitmentStore, type ConcordiaOutcome, type ContextAction, type ContextFilterResult, ContextGateEnforcer, type ContextGatePolicy, ContextGatePolicyStore, type ContextGateRule, type ContextGateTemplate, DashboardApprovalChannel, type DashboardConfig, type DetectionResult, type EnforcerConfig, type FederationCapabilities, type FederationPeer, FederationRegistry, type FieldClassification, type FieldFilterResult, FilesystemStorage, type GateResult, type HandshakeChallenge, type HandshakeCompletion, type HandshakeResponse, type HandshakeResult, InjectionDetector, type InjectionDetectorConfig, type InjectionSignal, MemoryStorage, type PedersenCommitment, type PeerTrustEvaluation, type PolicyRecommendation, PolicyStore, type PrincipalPolicy, type ProviderCategory, ReputationStore, type SHRBody, type SHRVerificationResult, type SanctuaryConfig, type SanctuaryServer, type SignedAttestation, type SignedSHR, type SovereigntyTier, StateStore, StderrApprovalChannel, TIER_WEIGHTS, type TierMetadata, type TieredAttestation, WebhookApprovalChannel, type WebhookCallbackPayload, type WebhookConfig, type WebhookPayload, type ZKProofOfKnowledge, type ZKRangeProof, canonicalize, classifyField, completeHandshake, computeWeightedScore, createBridgeCommitment, createPedersenCommitment, createProofOfKnowledge, createRangeProof, createSanctuaryServer, evaluateField, filterContext, generateAttestation, generateSHR, getTemplate, initiateHandshake, listTemplateIds, loadConfig, loadPrincipalPolicy, recommendPolicy, resolveTier, respondToHandshake, signPayload, tierDistribution, verifyAttestation, verifyBridgeCommitment, verifyCompletion, verifyPedersenCommitment, verifyProofOfKnowledge, verifyRangeProof, verifySHR, verifySignature };
|