@sanctuary-framework/mcp-server 0.5.6 → 0.5.7

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/index.d.cts CHANGED
@@ -1954,6 +1954,53 @@ declare class FilesystemStorage implements StorageBackend {
1954
1954
  */
1955
1955
  declare function loadPrincipalPolicy(storagePath: string): Promise<PrincipalPolicy>;
1956
1956
 
1957
+ /**
1958
+ * Sanctuary MCP Server — L1 Cognitive Sovereignty: Tool Definitions
1959
+ *
1960
+ * MCP tool wrappers for StateStore and IdentityRoot operations.
1961
+ * These tools are the public API that agents interact with.
1962
+ */
1963
+
1964
+ /** Manages all identities — provides storage and retrieval */
1965
+ declare class IdentityManager {
1966
+ private storage;
1967
+ private masterKey;
1968
+ private identities;
1969
+ private primaryIdentityId;
1970
+ constructor(storage: StorageBackend, masterKey: Uint8Array);
1971
+ private get encryptionKey();
1972
+ /** Load identities from storage on startup */
1973
+ load(): Promise<void>;
1974
+ /** Save an identity to storage */
1975
+ save(identity: StoredIdentity): Promise<void>;
1976
+ get(id: string): StoredIdentity | undefined;
1977
+ getDefault(): StoredIdentity | undefined;
1978
+ list(): PublicIdentity[];
1979
+ }
1980
+
1981
+ /**
1982
+ * Sanctuary MCP Server — SHR Generator
1983
+ *
1984
+ * Generates a Sovereignty Health Report from current server state,
1985
+ * signs it with a specified identity, and returns the complete signed SHR.
1986
+ */
1987
+
1988
+ interface SHRGeneratorOptions {
1989
+ config: SanctuaryConfig;
1990
+ identityManager: IdentityManager;
1991
+ masterKey: Uint8Array;
1992
+ /** Override validity window (milliseconds). Default: 1 hour. */
1993
+ validityMs?: number;
1994
+ }
1995
+ /**
1996
+ * Generate and sign a Sovereignty Health Report.
1997
+ *
1998
+ * @param identityId - Which identity to sign with (defaults to primary)
1999
+ * @param opts - Generator dependencies
2000
+ * @returns The signed SHR, or an error string
2001
+ */
2002
+ declare function generateSHR(identityId: string | undefined, opts: SHRGeneratorOptions): SignedSHR | string;
2003
+
1957
2004
  /**
1958
2005
  * Sanctuary MCP Server — Principal Dashboard
1959
2006
  *
@@ -1999,6 +2046,10 @@ declare class DashboardApprovalChannel implements ApprovalChannel {
1999
2046
  private policy;
2000
2047
  private baseline;
2001
2048
  private auditLog;
2049
+ private identityManager;
2050
+ private handshakeResults;
2051
+ private shrOpts;
2052
+ private _sanctuaryConfig;
2002
2053
  private dashboardHTML;
2003
2054
  private loginHTML;
2004
2055
  private authToken;
@@ -2019,6 +2070,10 @@ declare class DashboardApprovalChannel implements ApprovalChannel {
2019
2070
  policy: PrincipalPolicy;
2020
2071
  baseline: BaselineTracker;
2021
2072
  auditLog: AuditLog;
2073
+ identityManager?: IdentityManager;
2074
+ handshakeResults?: Map<string, HandshakeResult>;
2075
+ shrOpts?: SHRGeneratorOptions;
2076
+ sanctuaryConfig?: SanctuaryConfig;
2022
2077
  }): void;
2023
2078
  /**
2024
2079
  * Start the HTTP(S) server for the dashboard.
@@ -2097,6 +2152,10 @@ declare class DashboardApprovalChannel implements ApprovalChannel {
2097
2152
  private handlePendingList;
2098
2153
  private handleAuditLog;
2099
2154
  private handleDecision;
2155
+ private handleSovereignty;
2156
+ private handleIdentity;
2157
+ private handleHandshakes;
2158
+ private handleSHR;
2100
2159
  broadcastSSE(event: string, data: unknown): void;
2101
2160
  /**
2102
2161
  * Broadcast an audit entry to connected dashboards.
@@ -2246,53 +2305,6 @@ declare class WebhookApprovalChannel implements ApprovalChannel {
2246
2305
  get pendingCount(): number;
2247
2306
  }
2248
2307
 
2249
- /**
2250
- * Sanctuary MCP Server — L1 Cognitive Sovereignty: Tool Definitions
2251
- *
2252
- * MCP tool wrappers for StateStore and IdentityRoot operations.
2253
- * These tools are the public API that agents interact with.
2254
- */
2255
-
2256
- /** Manages all identities — provides storage and retrieval */
2257
- declare class IdentityManager {
2258
- private storage;
2259
- private masterKey;
2260
- private identities;
2261
- private primaryIdentityId;
2262
- constructor(storage: StorageBackend, masterKey: Uint8Array);
2263
- private get encryptionKey();
2264
- /** Load identities from storage on startup */
2265
- load(): Promise<void>;
2266
- /** Save an identity to storage */
2267
- save(identity: StoredIdentity): Promise<void>;
2268
- get(id: string): StoredIdentity | undefined;
2269
- getDefault(): StoredIdentity | undefined;
2270
- list(): PublicIdentity[];
2271
- }
2272
-
2273
- /**
2274
- * Sanctuary MCP Server — SHR Generator
2275
- *
2276
- * Generates a Sovereignty Health Report from current server state,
2277
- * signs it with a specified identity, and returns the complete signed SHR.
2278
- */
2279
-
2280
- interface SHRGeneratorOptions {
2281
- config: SanctuaryConfig;
2282
- identityManager: IdentityManager;
2283
- masterKey: Uint8Array;
2284
- /** Override validity window (milliseconds). Default: 1 hour. */
2285
- validityMs?: number;
2286
- }
2287
- /**
2288
- * Generate and sign a Sovereignty Health Report.
2289
- *
2290
- * @param identityId - Which identity to sign with (defaults to primary)
2291
- * @param opts - Generator dependencies
2292
- * @returns The signed SHR, or an error string
2293
- */
2294
- declare function generateSHR(identityId: string | undefined, opts: SHRGeneratorOptions): SignedSHR | string;
2295
-
2296
2308
  /**
2297
2309
  * Sanctuary MCP Server — SHR Verifier
2298
2310
  *
@@ -2654,4 +2666,4 @@ declare function createSanctuaryServer(options?: {
2654
2666
  storage?: StorageBackend;
2655
2667
  }): Promise<SanctuaryServer>;
2656
2668
 
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 };
2669
+ 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 SHRGeneratorOptions, 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
@@ -1954,6 +1954,53 @@ declare class FilesystemStorage implements StorageBackend {
1954
1954
  */
1955
1955
  declare function loadPrincipalPolicy(storagePath: string): Promise<PrincipalPolicy>;
1956
1956
 
1957
+ /**
1958
+ * Sanctuary MCP Server — L1 Cognitive Sovereignty: Tool Definitions
1959
+ *
1960
+ * MCP tool wrappers for StateStore and IdentityRoot operations.
1961
+ * These tools are the public API that agents interact with.
1962
+ */
1963
+
1964
+ /** Manages all identities — provides storage and retrieval */
1965
+ declare class IdentityManager {
1966
+ private storage;
1967
+ private masterKey;
1968
+ private identities;
1969
+ private primaryIdentityId;
1970
+ constructor(storage: StorageBackend, masterKey: Uint8Array);
1971
+ private get encryptionKey();
1972
+ /** Load identities from storage on startup */
1973
+ load(): Promise<void>;
1974
+ /** Save an identity to storage */
1975
+ save(identity: StoredIdentity): Promise<void>;
1976
+ get(id: string): StoredIdentity | undefined;
1977
+ getDefault(): StoredIdentity | undefined;
1978
+ list(): PublicIdentity[];
1979
+ }
1980
+
1981
+ /**
1982
+ * Sanctuary MCP Server — SHR Generator
1983
+ *
1984
+ * Generates a Sovereignty Health Report from current server state,
1985
+ * signs it with a specified identity, and returns the complete signed SHR.
1986
+ */
1987
+
1988
+ interface SHRGeneratorOptions {
1989
+ config: SanctuaryConfig;
1990
+ identityManager: IdentityManager;
1991
+ masterKey: Uint8Array;
1992
+ /** Override validity window (milliseconds). Default: 1 hour. */
1993
+ validityMs?: number;
1994
+ }
1995
+ /**
1996
+ * Generate and sign a Sovereignty Health Report.
1997
+ *
1998
+ * @param identityId - Which identity to sign with (defaults to primary)
1999
+ * @param opts - Generator dependencies
2000
+ * @returns The signed SHR, or an error string
2001
+ */
2002
+ declare function generateSHR(identityId: string | undefined, opts: SHRGeneratorOptions): SignedSHR | string;
2003
+
1957
2004
  /**
1958
2005
  * Sanctuary MCP Server — Principal Dashboard
1959
2006
  *
@@ -1999,6 +2046,10 @@ declare class DashboardApprovalChannel implements ApprovalChannel {
1999
2046
  private policy;
2000
2047
  private baseline;
2001
2048
  private auditLog;
2049
+ private identityManager;
2050
+ private handshakeResults;
2051
+ private shrOpts;
2052
+ private _sanctuaryConfig;
2002
2053
  private dashboardHTML;
2003
2054
  private loginHTML;
2004
2055
  private authToken;
@@ -2019,6 +2070,10 @@ declare class DashboardApprovalChannel implements ApprovalChannel {
2019
2070
  policy: PrincipalPolicy;
2020
2071
  baseline: BaselineTracker;
2021
2072
  auditLog: AuditLog;
2073
+ identityManager?: IdentityManager;
2074
+ handshakeResults?: Map<string, HandshakeResult>;
2075
+ shrOpts?: SHRGeneratorOptions;
2076
+ sanctuaryConfig?: SanctuaryConfig;
2022
2077
  }): void;
2023
2078
  /**
2024
2079
  * Start the HTTP(S) server for the dashboard.
@@ -2097,6 +2152,10 @@ declare class DashboardApprovalChannel implements ApprovalChannel {
2097
2152
  private handlePendingList;
2098
2153
  private handleAuditLog;
2099
2154
  private handleDecision;
2155
+ private handleSovereignty;
2156
+ private handleIdentity;
2157
+ private handleHandshakes;
2158
+ private handleSHR;
2100
2159
  broadcastSSE(event: string, data: unknown): void;
2101
2160
  /**
2102
2161
  * Broadcast an audit entry to connected dashboards.
@@ -2246,53 +2305,6 @@ declare class WebhookApprovalChannel implements ApprovalChannel {
2246
2305
  get pendingCount(): number;
2247
2306
  }
2248
2307
 
2249
- /**
2250
- * Sanctuary MCP Server — L1 Cognitive Sovereignty: Tool Definitions
2251
- *
2252
- * MCP tool wrappers for StateStore and IdentityRoot operations.
2253
- * These tools are the public API that agents interact with.
2254
- */
2255
-
2256
- /** Manages all identities — provides storage and retrieval */
2257
- declare class IdentityManager {
2258
- private storage;
2259
- private masterKey;
2260
- private identities;
2261
- private primaryIdentityId;
2262
- constructor(storage: StorageBackend, masterKey: Uint8Array);
2263
- private get encryptionKey();
2264
- /** Load identities from storage on startup */
2265
- load(): Promise<void>;
2266
- /** Save an identity to storage */
2267
- save(identity: StoredIdentity): Promise<void>;
2268
- get(id: string): StoredIdentity | undefined;
2269
- getDefault(): StoredIdentity | undefined;
2270
- list(): PublicIdentity[];
2271
- }
2272
-
2273
- /**
2274
- * Sanctuary MCP Server — SHR Generator
2275
- *
2276
- * Generates a Sovereignty Health Report from current server state,
2277
- * signs it with a specified identity, and returns the complete signed SHR.
2278
- */
2279
-
2280
- interface SHRGeneratorOptions {
2281
- config: SanctuaryConfig;
2282
- identityManager: IdentityManager;
2283
- masterKey: Uint8Array;
2284
- /** Override validity window (milliseconds). Default: 1 hour. */
2285
- validityMs?: number;
2286
- }
2287
- /**
2288
- * Generate and sign a Sovereignty Health Report.
2289
- *
2290
- * @param identityId - Which identity to sign with (defaults to primary)
2291
- * @param opts - Generator dependencies
2292
- * @returns The signed SHR, or an error string
2293
- */
2294
- declare function generateSHR(identityId: string | undefined, opts: SHRGeneratorOptions): SignedSHR | string;
2295
-
2296
2308
  /**
2297
2309
  * Sanctuary MCP Server — SHR Verifier
2298
2310
  *
@@ -2654,4 +2666,4 @@ declare function createSanctuaryServer(options?: {
2654
2666
  storage?: StorageBackend;
2655
2667
  }): Promise<SanctuaryServer>;
2656
2668
 
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 };
2669
+ 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 SHRGeneratorOptions, 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 };