protect-mcp 0.7.2 → 0.7.4

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.ts CHANGED
@@ -190,6 +190,18 @@ interface DecisionLog {
190
190
  plan_receipt_id?: string;
191
191
  /** Hook event that triggered this log entry */
192
192
  hook_event?: HookEventName;
193
+ /** Redacted exact-action readback shown to humans before approving */
194
+ action_readback?: {
195
+ tool: string;
196
+ action: string;
197
+ destination?: string;
198
+ payload_preview: unknown;
199
+ payload_hash: string;
200
+ payload_bytes: number;
201
+ disclosed_fields: string[];
202
+ redacted_fields: string[];
203
+ summary: string;
204
+ };
193
205
  /** IETF specification version — ties every receipt to the standard */
194
206
  spec?: string;
195
207
  /** Issuer certification level:
@@ -977,6 +989,31 @@ interface MinimalDisclosure {
977
989
  /** Merkle inclusion proof. */
978
990
  proof: MerkleProof;
979
991
  }
992
+ interface SelectiveDisclosurePackageV0 {
993
+ type: 'scopeblind.selective_disclosure.v0';
994
+ version: 0;
995
+ parent_receipt_hash: string;
996
+ committed_fields_root: string;
997
+ disclosed_fields: string[];
998
+ hidden_fields: string[];
999
+ disclosures: MinimalDisclosure[];
1000
+ verifier_explanation: {
1001
+ summary: string;
1002
+ disclosed: string;
1003
+ hidden: string;
1004
+ limitation: string;
1005
+ };
1006
+ }
1007
+ interface SelectiveDisclosureVerification {
1008
+ valid: boolean;
1009
+ receipt_hash_valid: boolean;
1010
+ signature_valid: boolean | null;
1011
+ commitment_root_valid: boolean;
1012
+ disclosed_fields: string[];
1013
+ hidden_fields: string[];
1014
+ errors: string[];
1015
+ explanation: string[];
1016
+ }
980
1017
  /**
981
1018
  * Sign a DecisionLog in commitment mode.
982
1019
  *
@@ -1007,6 +1044,8 @@ declare function signCommittedDecision(entry: DecisionLog, committedFieldNames:
1007
1044
  * @standard draft-farley-acta-signed-receipts-01 §commitment-disclosure
1008
1045
  */
1009
1046
  declare function discloseField(receiptHash: string, fieldName: string, openings: Record<string, CommittedFieldOpening>): MinimalDisclosure;
1047
+ declare function createSelectiveDisclosurePackage(receipt: Record<string, unknown>, fieldNames: string[], openings: Record<string, CommittedFieldOpening>): SelectiveDisclosurePackageV0;
1048
+ declare function verifySelectiveDisclosurePackage(receipt: Record<string, unknown>, disclosure: SelectiveDisclosurePackageV0): SelectiveDisclosureVerification;
1010
1049
 
1011
1050
  /**
1012
1051
  * @scopeblind/protect-mcp — External PDP Adapter
@@ -1076,6 +1115,8 @@ interface AuditBundleOptions {
1076
1115
  receipts: Record<string, unknown>[];
1077
1116
  /** Optional audit anchors */
1078
1117
  anchors?: Record<string, unknown>[];
1118
+ /** Optional selective-disclosure packages opening selected committed fields */
1119
+ selectiveDisclosures?: SelectiveDisclosurePackageV0[];
1079
1120
  /** JWK signing keys used by the receipts */
1080
1121
  signingKeys: Array<{
1081
1122
  kty: string;
@@ -1096,6 +1137,14 @@ interface AuditBundle {
1096
1137
  } | null;
1097
1138
  receipts: Record<string, unknown>[];
1098
1139
  anchors: Record<string, unknown>[];
1140
+ selective_disclosures: SelectiveDisclosurePackageV0[];
1141
+ privacy: {
1142
+ selective_disclosure: {
1143
+ supported: true;
1144
+ model: 'salted_commitments_merkle_v0';
1145
+ statement: string;
1146
+ };
1147
+ };
1099
1148
  verification: {
1100
1149
  algorithm: 'ed25519';
1101
1150
  signing_keys: Array<{
@@ -1620,6 +1669,71 @@ declare function generateCedarSchema(tools: McpToolDescription[], config?: Schem
1620
1669
  */
1621
1670
  declare function generateSchemaStub(namespace?: string): string;
1622
1671
 
1672
+ interface PolicyPack {
1673
+ id: string;
1674
+ name: string;
1675
+ description: string;
1676
+ recommendedMode: 'shadow-first' | 'enforce-ready';
1677
+ files: Array<{
1678
+ path: string;
1679
+ contents: string;
1680
+ }>;
1681
+ }
1682
+ declare const POLICY_PACKS: PolicyPack[];
1683
+ declare function getPolicyPack(id: string): PolicyPack | undefined;
1684
+ declare function policyPackIds(): string[];
1685
+
1686
+ type ConnectorPilotId = 'github' | 'email-gmail' | 'filesystem-git' | 'slack-teams' | 'finance-pms';
1687
+ interface ConnectorEnvVar {
1688
+ name: string;
1689
+ required: boolean;
1690
+ description: string;
1691
+ }
1692
+ interface ConnectorAction {
1693
+ name: string;
1694
+ tool: string;
1695
+ risk: 'low' | 'medium' | 'high';
1696
+ mode: 'observe' | 'require_approval' | 'deny';
1697
+ description: string;
1698
+ }
1699
+ interface ConnectorPilot {
1700
+ id: ConnectorPilotId;
1701
+ category: string;
1702
+ name: string;
1703
+ status: 'usable-pilot';
1704
+ description: string;
1705
+ value: string;
1706
+ env: ConnectorEnvVar[];
1707
+ tools: string[];
1708
+ actions: ConnectorAction[];
1709
+ setup: string[];
1710
+ config: Record<string, unknown>;
1711
+ cedar: string;
1712
+ }
1713
+ interface InstalledConnectorPilot {
1714
+ id: string;
1715
+ name: string;
1716
+ category: string;
1717
+ status: string;
1718
+ config_path: string;
1719
+ policy_path: string;
1720
+ }
1721
+ declare const CONNECTOR_PILOTS: ConnectorPilot[];
1722
+ declare function connectorPilotIds(): ConnectorPilotId[];
1723
+ declare function getConnectorPilot(id: string): ConnectorPilot | undefined;
1724
+ declare function connectorDirectory(dir: string): string;
1725
+ declare function writeConnectorPilots(opts: {
1726
+ dir: string;
1727
+ ids?: string[];
1728
+ force?: boolean;
1729
+ }): {
1730
+ written: string[];
1731
+ pilots: ConnectorPilot[];
1732
+ directory: string;
1733
+ };
1734
+ declare function readInstalledConnectorPilots(dir: string): InstalledConnectorPilot[];
1735
+ declare function connectorDoctor(dir: string, env?: NodeJS.ProcessEnv): Array<Record<string, unknown>>;
1736
+
1623
1737
  /**
1624
1738
  * Sigstore Rekor Transparency Log Anchoring
1625
1739
  *
@@ -3015,4 +3129,4 @@ declare function getScopeBlindBridge(): ScopeBlindBridge;
3015
3129
  /** Convenience: forward a signed receipt without instantiating yourself. */
3016
3130
  declare function forwardReceipt(signedReceipt: any): void;
3017
3131
 
3018
- export { type ActionReceipt, type AdmissionResult, type AgentId, type AgentManifest, type ApprovalAssertion, type ApprovalChallenge, type ApprovalNotification, type ApprovalResult, type ArenaPayload, type ArenaReceipt, type AttestationDocument, type AttestationPayload, type AttestationProvider, type AttestationReceipt, type AttestationResult, type AuditBundle, type AuditBundleOptions, type BenchmarkPayload, type BenchmarkReceipt, type BuilderId, type C2PAAssertion, type C2PAIngredient, type C2PAManifest, type C2PAOptions, type CCRConnectorConfig, type CCRSessionContext, type CalibrationScore, type CedarEvalOptions, type CedarEvalRequest, type CedarPolicySet, type CedarSchema, type CedarSchemaResult, type CommittedFieldOpening, type CommittedSignResult, type ComplianceReport, ConfidentialGate, type ConfidentialGateConfig, type ConfidentialInferenceConfig, type CredentialConfig, type DecisionContext, type DecisionLog, type DelegationReceipt, type DisclosureMode, type Ed25519PublicKey, type EvidenceAttestation, type EvidenceAttestationInput, type EvidenceIssuer, type EvidenceReceipt, type EvidenceReceiptBase, type EvidenceSummary, type EvidenceSummaryEntry, type EvidenceType, type ExternalDecision, type ExternalPDPConfig, type HFDatasetMetadata, type HFReceiptRow, type HookEventName, type HookInput, type HookResponse, type IssuerType, type JsonRpcRequest, type JsonRpcResponse, type LeaseCompatibility, type ManifestBuilder, type ManifestCapabilities, type ManifestConfig, type ManifestIdentity, type ManifestPresentation, type ManifestSignature, type ManifestStatus, type McpToolDescription, type MinimalDisclosure, type NotificationConfig, type PassportTokenClaims, type PayloadDigest, type PlanReceipt, type PolicyEngineMode, type PredictionReceipt, type PredictionResolution, type PropagatorConfig, type ProtectConfig, ProtectGateway, type ProtectPolicy, type RateLimit, ReceiptPropagator, type RedactedResult, type RedactionSalt, type RekorAnchor, type RekorVerification, type RestraintPayload, type RestraintReceipt, type SHA256Hash, type SafetyTranscript, type Sandbox, type SandboxConfig, type SandboxReceipt, type SandboxResult, type SandboxToolCall, type SchemaGeneratorConfig, ScopeBlindBridge, type SelfTestCase, type SelfTestReport, type SigningConfig, type SimulationResult, type SimulationSummary, type SwarmContext, type TierOverrides, type TimingMetrics, type ToolPolicy, type TrustTier, type WorkPayload, type WorkReceipt, anchorToRekor, buildDecisionContext, checkRateLimit, collectSignedReceipts, computeCalibration, confidentialInference, createApprovalChallenge, createApprovalReceiptPayload, createAttestationField, createAuditBundle, createC2PAManifest, createDisclosurePackage, createEvidenceAttestation, createLogAnchorField, createReceiptChannel, createSandbox, destroySandbox, discloseField, ed25519ToDIDKey, evaluateCedar, evaluateTier, exportC2PAManifestJSON, exportJSONL, formatReportMarkdown, formatSimulation, forwardReceipt, generateC2PACommand, generateCedarSchema, generateDatasetCard, generateHFMetadata, generateReport, generateSafetyTranscript, generateSchemaStub, getScopeBlindBridge, getSignerInfo, getToolPolicy, hashReceipt, hashResponseBody, initSigning, isAgentId, isCedarAvailable, isDisclosureMode, isEvidenceType, isManifestStatus, isSigningEnabled, listCredentialLabels, loadCedarPolicies, loadPolicy, manifestToVC, meetsMinTier, parseLogFile, parseNotificationConfigFromEnv, parseRateLimit, policySetFromSource, queryExternalPDP, receiptToVP, receiptsToHFRows, redactFields, resolveCredential, revealField, runEvaluatorSelfTest, runInSandbox, sendApprovalNotification, signCommittedDecision, signDecision, simulate, toCredentialRequestOptions, toManifoldFormat, toMetaculusFormat, validateCredentials, validateEvidenceReceipt, validateManifest, verifyActaC2PAAssertions, verifyAllCommitments, verifyApprovalAssertion, verifyCommitment, verifyEvidenceAttestation, verifyRekorAnchor };
3132
+ export { type ActionReceipt, type AdmissionResult, type AgentId, type AgentManifest, type ApprovalAssertion, type ApprovalChallenge, type ApprovalNotification, type ApprovalResult, type ArenaPayload, type ArenaReceipt, type AttestationDocument, type AttestationPayload, type AttestationProvider, type AttestationReceipt, type AttestationResult, type AuditBundle, type AuditBundleOptions, type BenchmarkPayload, type BenchmarkReceipt, type BuilderId, type C2PAAssertion, type C2PAIngredient, type C2PAManifest, type C2PAOptions, type CCRConnectorConfig, type CCRSessionContext, CONNECTOR_PILOTS, type CalibrationScore, type CedarEvalOptions, type CedarEvalRequest, type CedarPolicySet, type CedarSchema, type CedarSchemaResult, type CommittedFieldOpening, type CommittedSignResult, type ComplianceReport, ConfidentialGate, type ConfidentialGateConfig, type ConfidentialInferenceConfig, type ConnectorAction, type ConnectorEnvVar, type ConnectorPilot, type ConnectorPilotId, type CredentialConfig, type DecisionContext, type DecisionLog, type DelegationReceipt, type DisclosureMode, type Ed25519PublicKey, type EvidenceAttestation, type EvidenceAttestationInput, type EvidenceIssuer, type EvidenceReceipt, type EvidenceReceiptBase, type EvidenceSummary, type EvidenceSummaryEntry, type EvidenceType, type ExternalDecision, type ExternalPDPConfig, type HFDatasetMetadata, type HFReceiptRow, type HookEventName, type HookInput, type HookResponse, type InstalledConnectorPilot, type IssuerType, type JsonRpcRequest, type JsonRpcResponse, type LeaseCompatibility, type ManifestBuilder, type ManifestCapabilities, type ManifestConfig, type ManifestIdentity, type ManifestPresentation, type ManifestSignature, type ManifestStatus, type McpToolDescription, type MinimalDisclosure, type NotificationConfig, POLICY_PACKS, type PassportTokenClaims, type PayloadDigest, type PlanReceipt, type PolicyEngineMode, type PolicyPack, type PredictionReceipt, type PredictionResolution, type PropagatorConfig, type ProtectConfig, ProtectGateway, type ProtectPolicy, type RateLimit, ReceiptPropagator, type RedactedResult, type RedactionSalt, type RekorAnchor, type RekorVerification, type RestraintPayload, type RestraintReceipt, type SHA256Hash, type SafetyTranscript, type Sandbox, type SandboxConfig, type SandboxReceipt, type SandboxResult, type SandboxToolCall, type SchemaGeneratorConfig, ScopeBlindBridge, type SelectiveDisclosurePackageV0, type SelectiveDisclosureVerification, type SelfTestCase, type SelfTestReport, type SigningConfig, type SimulationResult, type SimulationSummary, type SwarmContext, type TierOverrides, type TimingMetrics, type ToolPolicy, type TrustTier, type WorkPayload, type WorkReceipt, anchorToRekor, buildDecisionContext, checkRateLimit, collectSignedReceipts, computeCalibration, confidentialInference, connectorDirectory, connectorDoctor, connectorPilotIds, createApprovalChallenge, createApprovalReceiptPayload, createAttestationField, createAuditBundle, createC2PAManifest, createDisclosurePackage, createEvidenceAttestation, createLogAnchorField, createReceiptChannel, createSandbox, createSelectiveDisclosurePackage, destroySandbox, discloseField, ed25519ToDIDKey, evaluateCedar, evaluateTier, exportC2PAManifestJSON, exportJSONL, formatReportMarkdown, formatSimulation, forwardReceipt, generateC2PACommand, generateCedarSchema, generateDatasetCard, generateHFMetadata, generateReport, generateSafetyTranscript, generateSchemaStub, getConnectorPilot, getPolicyPack, getScopeBlindBridge, getSignerInfo, getToolPolicy, hashReceipt, hashResponseBody, initSigning, isAgentId, isCedarAvailable, isDisclosureMode, isEvidenceType, isManifestStatus, isSigningEnabled, listCredentialLabels, loadCedarPolicies, loadPolicy, manifestToVC, meetsMinTier, parseLogFile, parseNotificationConfigFromEnv, parseRateLimit, policyPackIds, policySetFromSource, queryExternalPDP, readInstalledConnectorPilots, receiptToVP, receiptsToHFRows, redactFields, resolveCredential, revealField, runEvaluatorSelfTest, runInSandbox, sendApprovalNotification, signCommittedDecision, signDecision, simulate, toCredentialRequestOptions, toManifoldFormat, toMetaculusFormat, validateCredentials, validateEvidenceReceipt, validateManifest, verifyActaC2PAAssertions, verifyAllCommitments, verifyApprovalAssertion, verifyCommitment, verifyEvidenceAttestation, verifyRekorAnchor, verifySelectiveDisclosurePackage, writeConnectorPilots };