@pan-sec/notebooklm-mcp 1.4.0 → 1.6.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 +61 -7
- package/SECURITY.md +40 -6
- package/dist/auth/mcp-auth.d.ts.map +1 -1
- package/dist/auth/mcp-auth.js +3 -6
- package/dist/auth/mcp-auth.js.map +1 -1
- package/dist/compliance/alert-manager.d.ts +120 -0
- package/dist/compliance/alert-manager.d.ts.map +1 -0
- package/dist/compliance/alert-manager.js +420 -0
- package/dist/compliance/alert-manager.js.map +1 -0
- package/dist/compliance/breach-detection.d.ts +134 -0
- package/dist/compliance/breach-detection.d.ts.map +1 -0
- package/dist/compliance/breach-detection.js +456 -0
- package/dist/compliance/breach-detection.js.map +1 -0
- package/dist/compliance/change-log.d.ts +113 -0
- package/dist/compliance/change-log.d.ts.map +1 -0
- package/dist/compliance/change-log.js +275 -0
- package/dist/compliance/change-log.js.map +1 -0
- package/dist/compliance/compliance-logger.d.ts +136 -0
- package/dist/compliance/compliance-logger.d.ts.map +1 -0
- package/dist/compliance/compliance-logger.js +425 -0
- package/dist/compliance/compliance-logger.js.map +1 -0
- package/dist/compliance/compliance-tools.d.ts +18 -0
- package/dist/compliance/compliance-tools.d.ts.map +1 -0
- package/dist/compliance/compliance-tools.js +673 -0
- package/dist/compliance/compliance-tools.js.map +1 -0
- package/dist/compliance/consent-manager.d.ts +130 -0
- package/dist/compliance/consent-manager.d.ts.map +1 -0
- package/dist/compliance/consent-manager.js +386 -0
- package/dist/compliance/consent-manager.js.map +1 -0
- package/dist/compliance/dashboard.d.ts +243 -0
- package/dist/compliance/dashboard.d.ts.map +1 -0
- package/dist/compliance/dashboard.js +519 -0
- package/dist/compliance/dashboard.js.map +1 -0
- package/dist/compliance/data-classification.d.ts +117 -0
- package/dist/compliance/data-classification.d.ts.map +1 -0
- package/dist/compliance/data-classification.js +469 -0
- package/dist/compliance/data-classification.js.map +1 -0
- package/dist/compliance/data-erasure.d.ts +110 -0
- package/dist/compliance/data-erasure.d.ts.map +1 -0
- package/dist/compliance/data-erasure.js +501 -0
- package/dist/compliance/data-erasure.js.map +1 -0
- package/dist/compliance/data-export.d.ts +85 -0
- package/dist/compliance/data-export.d.ts.map +1 -0
- package/dist/compliance/data-export.js +394 -0
- package/dist/compliance/data-export.js.map +1 -0
- package/dist/compliance/data-inventory.d.ts +136 -0
- package/dist/compliance/data-inventory.d.ts.map +1 -0
- package/dist/compliance/data-inventory.js +335 -0
- package/dist/compliance/data-inventory.js.map +1 -0
- package/dist/compliance/dsar-handler.d.ts +123 -0
- package/dist/compliance/dsar-handler.d.ts.map +1 -0
- package/dist/compliance/dsar-handler.js +371 -0
- package/dist/compliance/dsar-handler.js.map +1 -0
- package/dist/compliance/evidence-collector.d.ts +187 -0
- package/dist/compliance/evidence-collector.d.ts.map +1 -0
- package/dist/compliance/evidence-collector.js +656 -0
- package/dist/compliance/evidence-collector.js.map +1 -0
- package/dist/compliance/health-monitor.d.ts +111 -0
- package/dist/compliance/health-monitor.d.ts.map +1 -0
- package/dist/compliance/health-monitor.js +509 -0
- package/dist/compliance/health-monitor.js.map +1 -0
- package/dist/compliance/incident-manager.d.ts +131 -0
- package/dist/compliance/incident-manager.d.ts.map +1 -0
- package/dist/compliance/incident-manager.js +418 -0
- package/dist/compliance/incident-manager.js.map +1 -0
- package/dist/compliance/index.d.ts +32 -0
- package/dist/compliance/index.d.ts.map +1 -0
- package/dist/compliance/index.js +35 -0
- package/dist/compliance/index.js.map +1 -0
- package/dist/compliance/policy-docs.d.ts +108 -0
- package/dist/compliance/policy-docs.d.ts.map +1 -0
- package/dist/compliance/policy-docs.js +464 -0
- package/dist/compliance/policy-docs.js.map +1 -0
- package/dist/compliance/privacy-notice-text.d.ts +58 -0
- package/dist/compliance/privacy-notice-text.d.ts.map +1 -0
- package/dist/compliance/privacy-notice-text.js +161 -0
- package/dist/compliance/privacy-notice-text.js.map +1 -0
- package/dist/compliance/privacy-notice.d.ts +128 -0
- package/dist/compliance/privacy-notice.d.ts.map +1 -0
- package/dist/compliance/privacy-notice.js +250 -0
- package/dist/compliance/privacy-notice.js.map +1 -0
- package/dist/compliance/report-generator.d.ts +168 -0
- package/dist/compliance/report-generator.d.ts.map +1 -0
- package/dist/compliance/report-generator.js +830 -0
- package/dist/compliance/report-generator.js.map +1 -0
- package/dist/compliance/retention-engine.d.ts +130 -0
- package/dist/compliance/retention-engine.d.ts.map +1 -0
- package/dist/compliance/retention-engine.js +510 -0
- package/dist/compliance/retention-engine.js.map +1 -0
- package/dist/compliance/siem-exporter.d.ts +150 -0
- package/dist/compliance/siem-exporter.d.ts.map +1 -0
- package/dist/compliance/siem-exporter.js +509 -0
- package/dist/compliance/siem-exporter.js.map +1 -0
- package/dist/compliance/types.d.ts +601 -0
- package/dist/compliance/types.d.ts.map +1 -0
- package/dist/compliance/types.js +22 -0
- package/dist/compliance/types.js.map +1 -0
- package/dist/config.d.ts +4 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +8 -1
- package/dist/config.js.map +1 -1
- package/dist/library/notebook-library.d.ts.map +1 -1
- package/dist/library/notebook-library.js +2 -1
- package/dist/library/notebook-library.js.map +1 -1
- package/dist/session/shared-context-manager.d.ts.map +1 -1
- package/dist/session/shared-context-manager.js +2 -1
- package/dist/session/shared-context-manager.js.map +1 -1
- package/dist/utils/audit-logger.d.ts +21 -1
- package/dist/utils/audit-logger.d.ts.map +1 -1
- package/dist/utils/audit-logger.js +53 -4
- package/dist/utils/audit-logger.js.map +1 -1
- package/dist/utils/crypto.d.ts.map +1 -1
- package/dist/utils/crypto.js +8 -15
- package/dist/utils/crypto.js.map +1 -1
- package/dist/utils/file-permissions.d.ts +85 -0
- package/dist/utils/file-permissions.d.ts.map +1 -0
- package/dist/utils/file-permissions.js +180 -0
- package/dist/utils/file-permissions.js.map +1 -0
- package/dist/utils/settings-manager.d.ts.map +1 -1
- package/dist/utils/settings-manager.js +6 -11
- package/dist/utils/settings-manager.js.map +1 -1
- package/docs/COMPLIANCE-SPEC.md +1452 -0
- package/package.json +30 -4
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Privacy Notice Text Content
|
|
3
|
+
*
|
|
4
|
+
* Contains the privacy notice content for display to users.
|
|
5
|
+
* Structured for GDPR compliance (Articles 13/14).
|
|
6
|
+
*
|
|
7
|
+
* Added by Pantheon Security for enterprise compliance support.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Current privacy notice version
|
|
11
|
+
*/
|
|
12
|
+
export const PRIVACY_NOTICE_VERSION = "1.0.0";
|
|
13
|
+
/**
|
|
14
|
+
* Full privacy notice content
|
|
15
|
+
*/
|
|
16
|
+
export const PRIVACY_NOTICE = {
|
|
17
|
+
version: PRIVACY_NOTICE_VERSION,
|
|
18
|
+
effective_date: "2025-01-01",
|
|
19
|
+
sections: {
|
|
20
|
+
data_controller: `Pantheon Security
|
|
21
|
+
Email: support@pantheonsecurity.io
|
|
22
|
+
Website: https://pantheonsecurity.io
|
|
23
|
+
|
|
24
|
+
This tool is designed for local use only. All data is processed and stored on your local device.`,
|
|
25
|
+
data_collected: [
|
|
26
|
+
"Browser session data (cookies, local storage) - Required for NotebookLM authentication",
|
|
27
|
+
"NotebookLM URLs and notebook metadata - Your saved notebook library",
|
|
28
|
+
"Query history within sessions - For contextual follow-up questions",
|
|
29
|
+
"Security audit logs - For security monitoring and compliance",
|
|
30
|
+
"User settings and preferences - Your configuration choices",
|
|
31
|
+
],
|
|
32
|
+
purposes: [
|
|
33
|
+
"Service Provision - Enable access to NotebookLM through the MCP protocol",
|
|
34
|
+
"Session Management - Maintain your authenticated browser session",
|
|
35
|
+
"Security Logging - Detect and prevent unauthorized access",
|
|
36
|
+
"Error Diagnostics - Debug issues and improve the service",
|
|
37
|
+
],
|
|
38
|
+
legal_basis: [
|
|
39
|
+
"Contract - Processing necessary to provide the service you requested",
|
|
40
|
+
"Legitimate Interest - Security logging and error diagnostics",
|
|
41
|
+
"Legal Obligation - Audit log retention for compliance (where applicable)",
|
|
42
|
+
],
|
|
43
|
+
retention: `Data retention periods:
|
|
44
|
+
- Session data: Cleared after 24 hours or on logout
|
|
45
|
+
- Browser cookies: Encrypted and retained for service functionality
|
|
46
|
+
- Audit logs: 7 years (configurable, for regulatory compliance)
|
|
47
|
+
- Notebook library: Retained until you delete it
|
|
48
|
+
- Settings: Retained until you delete them`,
|
|
49
|
+
rights: [
|
|
50
|
+
"Access - Request a copy of all your personal data",
|
|
51
|
+
"Portability - Export your data in machine-readable format",
|
|
52
|
+
"Erasure - Request deletion of your personal data",
|
|
53
|
+
"Rectification - Correct inaccurate personal data",
|
|
54
|
+
"Objection - Object to processing based on legitimate interest",
|
|
55
|
+
"Restriction - Request limited processing of your data",
|
|
56
|
+
],
|
|
57
|
+
contact: `For data protection inquiries:
|
|
58
|
+
Email: support@pantheonsecurity.io
|
|
59
|
+
GitHub: https://github.com/Pantheon-Security/notebooklm-mcp-secure`,
|
|
60
|
+
},
|
|
61
|
+
summary: `This tool processes data locally on your device to enable NotebookLM access via MCP.
|
|
62
|
+
|
|
63
|
+
What we collect:
|
|
64
|
+
- Browser session data (cookies, local storage)
|
|
65
|
+
- NotebookLM URLs and metadata
|
|
66
|
+
- Security audit logs
|
|
67
|
+
|
|
68
|
+
All data is:
|
|
69
|
+
- Stored locally only (no cloud sync)
|
|
70
|
+
- Encrypted with post-quantum cryptography
|
|
71
|
+
- Subject to automatic retention policies
|
|
72
|
+
|
|
73
|
+
Your rights: Access, Export, Erasure, Portability`,
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* CLI-formatted privacy notice for terminal display
|
|
77
|
+
*/
|
|
78
|
+
export function getPrivacyNoticeCLI() {
|
|
79
|
+
const notice = PRIVACY_NOTICE;
|
|
80
|
+
const width = 68;
|
|
81
|
+
const border = "═".repeat(width);
|
|
82
|
+
return `
|
|
83
|
+
╔${border}╗
|
|
84
|
+
║${"PRIVACY NOTICE v" + notice.version}${" ".repeat(width - 18 - notice.version.length)}║
|
|
85
|
+
╠${border}╣
|
|
86
|
+
║${" ".repeat(width)}║
|
|
87
|
+
║ This tool processes the following data locally on your device:${" ".repeat(width - 65)}║
|
|
88
|
+
║${" ".repeat(width)}║
|
|
89
|
+
║ • Browser session data (cookies, local storage)${" ".repeat(width - 51)}║
|
|
90
|
+
║ • NotebookLM URLs and metadata${" ".repeat(width - 34)}║
|
|
91
|
+
║ • Query history (for session context)${" ".repeat(width - 41)}║
|
|
92
|
+
║ • Security audit logs${" ".repeat(width - 25)}║
|
|
93
|
+
║${" ".repeat(width)}║
|
|
94
|
+
║ All data is:${" ".repeat(width - 15)}║
|
|
95
|
+
║ ✓ Stored locally only (no cloud sync)${" ".repeat(width - 41)}║
|
|
96
|
+
║ ✓ Encrypted with post-quantum cryptography${" ".repeat(width - 46)}║
|
|
97
|
+
║ ✓ Subject to automatic retention policies${" ".repeat(width - 44)}║
|
|
98
|
+
║${" ".repeat(width)}║
|
|
99
|
+
║ Your rights: Access, Export, Erasure, Portability${" ".repeat(width - 53)}║
|
|
100
|
+
║${" ".repeat(width)}║
|
|
101
|
+
║ Full policy: https://github.com/Pantheon-Security/...${" ".repeat(width - 57)}║
|
|
102
|
+
║${" ".repeat(width)}║
|
|
103
|
+
╠${border}╣
|
|
104
|
+
║ By continuing, you acknowledge this privacy notice.${" ".repeat(width - 55)}║
|
|
105
|
+
║${" ".repeat(width)}║
|
|
106
|
+
║ [Press Enter to continue, or Ctrl+C to exit]${" ".repeat(width - 48)}║
|
|
107
|
+
╚${border}╝
|
|
108
|
+
`;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Compact privacy notice for JSON responses
|
|
112
|
+
*/
|
|
113
|
+
export function getPrivacyNoticeCompact() {
|
|
114
|
+
return {
|
|
115
|
+
version: PRIVACY_NOTICE.version,
|
|
116
|
+
summary: PRIVACY_NOTICE.summary,
|
|
117
|
+
data_collected: PRIVACY_NOTICE.sections.data_collected,
|
|
118
|
+
purposes: PRIVACY_NOTICE.sections.purposes,
|
|
119
|
+
rights: PRIVACY_NOTICE.sections.rights,
|
|
120
|
+
full_notice_url: process.env.NLMCP_PRIVACY_NOTICE_URL ||
|
|
121
|
+
"https://github.com/Pantheon-Security/notebooklm-mcp-secure/blob/main/SECURITY.md",
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Get structured privacy notice for MCP tool response
|
|
126
|
+
*/
|
|
127
|
+
export function getPrivacyNoticeStructured() {
|
|
128
|
+
return {
|
|
129
|
+
version: PRIVACY_NOTICE.version,
|
|
130
|
+
effective_date: PRIVACY_NOTICE.effective_date,
|
|
131
|
+
data_controller: PRIVACY_NOTICE.sections.data_controller,
|
|
132
|
+
data_collected: PRIVACY_NOTICE.sections.data_collected,
|
|
133
|
+
purposes: PRIVACY_NOTICE.sections.purposes,
|
|
134
|
+
legal_basis: PRIVACY_NOTICE.sections.legal_basis,
|
|
135
|
+
retention: PRIVACY_NOTICE.sections.retention,
|
|
136
|
+
rights: PRIVACY_NOTICE.sections.rights,
|
|
137
|
+
contact: PRIVACY_NOTICE.sections.contact,
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Get data processing agreement summary
|
|
142
|
+
*/
|
|
143
|
+
export function getProcessingAgreement() {
|
|
144
|
+
return {
|
|
145
|
+
version: PRIVACY_NOTICE.version,
|
|
146
|
+
processor: "Pantheon Security (local processing only)",
|
|
147
|
+
sub_processors: [
|
|
148
|
+
"None - All data is processed locally on your device",
|
|
149
|
+
],
|
|
150
|
+
data_location: "Local device only (no cloud transfer)",
|
|
151
|
+
security_measures: [
|
|
152
|
+
"Post-quantum encryption (ML-KEM-768 + ChaCha20-Poly1305)",
|
|
153
|
+
"Certificate pinning for Google connections",
|
|
154
|
+
"Memory scrubbing for sensitive data",
|
|
155
|
+
"Tamper-evident audit logging",
|
|
156
|
+
"Secure file permissions",
|
|
157
|
+
],
|
|
158
|
+
breach_notification: "In the unlikely event of a data breach, we will notify affected users within 72 hours as required by GDPR.",
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
//# sourceMappingURL=privacy-notice-text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"privacy-notice-text.js","sourceRoot":"","sources":["../../src/compliance/privacy-notice-text.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,OAAO,CAAC;AAE9C;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAkB;IAC3C,OAAO,EAAE,sBAAsB;IAC/B,cAAc,EAAE,YAAY;IAE5B,QAAQ,EAAE;QACR,eAAe,EAAE;;;;iGAI4E;QAE7F,cAAc,EAAE;YACd,wFAAwF;YACxF,qEAAqE;YACrE,oEAAoE;YACpE,8DAA8D;YAC9D,4DAA4D;SAC7D;QAED,QAAQ,EAAE;YACR,0EAA0E;YAC1E,kEAAkE;YAClE,2DAA2D;YAC3D,0DAA0D;SAC3D;QAED,WAAW,EAAE;YACX,sEAAsE;YACtE,8DAA8D;YAC9D,0EAA0E;SAC3E;QAED,SAAS,EAAE;;;;;2CAK4B;QAEvC,MAAM,EAAE;YACN,mDAAmD;YACnD,2DAA2D;YAC3D,kDAAkD;YAClD,kDAAkD;YAClD,+DAA+D;YAC/D,uDAAuD;SACxD;QAED,OAAO,EAAE;;mEAEsD;KAChE;IAED,OAAO,EAAE;;;;;;;;;;;;kDAYuC;CACjD,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,mBAAmB;IACjC,MAAM,MAAM,GAAG,cAAc,CAAC;IAC9B,MAAM,KAAK,GAAG,EAAE,CAAC;IACjB,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAEjC,OAAO;GACN,MAAM;GACN,kBAAkB,GAAG,MAAM,CAAC,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,GAAG,EAAE,GA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AAO;QAC/B,cAAc,EAAE,cAAc,CAAC,QAAQ,CAAC,cAAc;QACtD,QAAQ,EAAE,cAAc,CAAC,QAAQ,CAAC,QAAQ;QAC1C,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,MAAM;QACtC,eAAe,EAAE,OAAO,CAAC,GAAG,CAAC,wBAAwB;YACnD,kFAAkF;KACrF,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,0BAA0B;IAWxC,OAAO;QACL,OAAO,EAAE,cAAc,CAAC,OAAO;QAC/B,cAAc,EAAE,cAAc,CAAC,cAAc;QAC7C,eAAe,EAAE,cAAc,CAAC,QAAQ,CAAC,eAAe;QACxD,cAAc,EAAE,cAAc,CAAC,QAAQ,CAAC,cAAc;QACtD,QAAQ,EAAE,cAAc,CAAC,QAAQ,CAAC,QAAQ;QAC1C,WAAW,EAAE,cAAc,CAAC,QAAQ,CAAC,WAAW;QAChD,SAAS,EAAE,cAAc,CAAC,QAAQ,CAAC,SAAS;QAC5C,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,MAAM;QACtC,OAAO,EAAE,cAAc,CAAC,QAAQ,CAAC,OAAO;KACzC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB;IAQpC,OAAO;QACL,OAAO,EAAE,cAAc,CAAC,OAAO;QAC/B,SAAS,EAAE,2CAA2C;QACtD,cAAc,EAAE;YACd,qDAAqD;SACtD;QACD,aAAa,EAAE,uCAAuC;QACtD,iBAAiB,EAAE;YACjB,0DAA0D;YAC1D,4CAA4C;YAC5C,qCAAqC;YACrC,8BAA8B;YAC9B,yBAAyB;SAC1B;QACD,mBAAmB,EAAE,4GAA4G;KAClI,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Privacy Notice Display Handler
|
|
3
|
+
*
|
|
4
|
+
* Manages display of privacy notice on first run and version updates.
|
|
5
|
+
* Tracks acknowledgment and integrates with consent management.
|
|
6
|
+
*
|
|
7
|
+
* Added by Pantheon Security for enterprise compliance support.
|
|
8
|
+
*/
|
|
9
|
+
import { PRIVACY_NOTICE, getPrivacyNoticeCompact, getPrivacyNoticeStructured } from "./privacy-notice-text.js";
|
|
10
|
+
/**
|
|
11
|
+
* Privacy notice acknowledgment record
|
|
12
|
+
*/
|
|
13
|
+
interface PrivacyNoticeAcknowledgment {
|
|
14
|
+
version: string;
|
|
15
|
+
acknowledged_at: string;
|
|
16
|
+
method: "cli" | "api" | "auto";
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Privacy Notice Manager class
|
|
20
|
+
*/
|
|
21
|
+
export declare class PrivacyNoticeManager {
|
|
22
|
+
private static instance;
|
|
23
|
+
private acknowledgmentFile;
|
|
24
|
+
private acknowledgments;
|
|
25
|
+
private loaded;
|
|
26
|
+
private constructor();
|
|
27
|
+
/**
|
|
28
|
+
* Get singleton instance
|
|
29
|
+
*/
|
|
30
|
+
static getInstance(): PrivacyNoticeManager;
|
|
31
|
+
/**
|
|
32
|
+
* Load acknowledgments from storage
|
|
33
|
+
*/
|
|
34
|
+
private load;
|
|
35
|
+
/**
|
|
36
|
+
* Save acknowledgments to storage
|
|
37
|
+
*/
|
|
38
|
+
private save;
|
|
39
|
+
/**
|
|
40
|
+
* Check if privacy notice needs to be shown
|
|
41
|
+
*/
|
|
42
|
+
needsDisplay(): Promise<boolean>;
|
|
43
|
+
/**
|
|
44
|
+
* Check if this is the first run ever
|
|
45
|
+
*/
|
|
46
|
+
isFirstRun(): Promise<boolean>;
|
|
47
|
+
/**
|
|
48
|
+
* Get the CLI-formatted privacy notice
|
|
49
|
+
*/
|
|
50
|
+
getCLINotice(): string;
|
|
51
|
+
/**
|
|
52
|
+
* Get compact privacy notice (for API responses)
|
|
53
|
+
*/
|
|
54
|
+
getCompactNotice(): ReturnType<typeof getPrivacyNoticeCompact>;
|
|
55
|
+
/**
|
|
56
|
+
* Get structured privacy notice (full details)
|
|
57
|
+
*/
|
|
58
|
+
getStructuredNotice(): ReturnType<typeof getPrivacyNoticeStructured>;
|
|
59
|
+
/**
|
|
60
|
+
* Get full privacy notice object
|
|
61
|
+
*/
|
|
62
|
+
getFullNotice(): typeof PRIVACY_NOTICE;
|
|
63
|
+
/**
|
|
64
|
+
* Record acknowledgment of privacy notice
|
|
65
|
+
*/
|
|
66
|
+
acknowledge(method?: "cli" | "api" | "auto"): Promise<void>;
|
|
67
|
+
/**
|
|
68
|
+
* Get acknowledgment history
|
|
69
|
+
*/
|
|
70
|
+
getAcknowledgmentHistory(): Promise<PrivacyNoticeAcknowledgment[]>;
|
|
71
|
+
/**
|
|
72
|
+
* Get the current privacy notice version
|
|
73
|
+
*/
|
|
74
|
+
getCurrentVersion(): string;
|
|
75
|
+
/**
|
|
76
|
+
* Check if a specific version has been acknowledged
|
|
77
|
+
*/
|
|
78
|
+
hasAcknowledgedVersion(version: string): Promise<boolean>;
|
|
79
|
+
/**
|
|
80
|
+
* Get status summary
|
|
81
|
+
*/
|
|
82
|
+
getStatus(): Promise<{
|
|
83
|
+
currentVersion: string;
|
|
84
|
+
needsDisplay: boolean;
|
|
85
|
+
isFirstRun: boolean;
|
|
86
|
+
acknowledgedVersions: string[];
|
|
87
|
+
lastAcknowledgment?: {
|
|
88
|
+
version: string;
|
|
89
|
+
acknowledged_at: string;
|
|
90
|
+
method: string;
|
|
91
|
+
};
|
|
92
|
+
}>;
|
|
93
|
+
/**
|
|
94
|
+
* Display privacy notice in console (for CLI use)
|
|
95
|
+
*/
|
|
96
|
+
displayInConsole(): void;
|
|
97
|
+
/**
|
|
98
|
+
* Check and prompt for privacy notice if needed
|
|
99
|
+
* Returns true if acknowledged, false if user declined
|
|
100
|
+
*/
|
|
101
|
+
checkAndPrompt(): Promise<boolean>;
|
|
102
|
+
/**
|
|
103
|
+
* Delete all acknowledgment records (for data erasure)
|
|
104
|
+
*/
|
|
105
|
+
deleteAllRecords(): Promise<number>;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Get the privacy notice manager instance
|
|
109
|
+
*/
|
|
110
|
+
export declare function getPrivacyNoticeManager(): PrivacyNoticeManager;
|
|
111
|
+
/**
|
|
112
|
+
* Check if privacy notice needs to be displayed
|
|
113
|
+
*/
|
|
114
|
+
export declare function needsPrivacyNotice(): Promise<boolean>;
|
|
115
|
+
/**
|
|
116
|
+
* Acknowledge the privacy notice
|
|
117
|
+
*/
|
|
118
|
+
export declare function acknowledgePrivacyNotice(method?: "cli" | "api" | "auto"): Promise<void>;
|
|
119
|
+
/**
|
|
120
|
+
* Get the privacy notice for display
|
|
121
|
+
*/
|
|
122
|
+
export declare function getPrivacyNotice(): ReturnType<typeof getPrivacyNoticeStructured>;
|
|
123
|
+
/**
|
|
124
|
+
* Get CLI-formatted privacy notice
|
|
125
|
+
*/
|
|
126
|
+
export declare function getPrivacyNoticeCLIText(): string;
|
|
127
|
+
export {};
|
|
128
|
+
//# sourceMappingURL=privacy-notice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"privacy-notice.d.ts","sourceRoot":"","sources":["../../src/compliance/privacy-notice.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAQH,OAAO,EACL,cAAc,EAGd,uBAAuB,EACvB,0BAA0B,EAC3B,MAAM,0BAA0B,CAAC;AAElC;;GAEG;AACH,UAAU,2BAA2B;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;CAChC;AAED;;GAEG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAuB;IAC9C,OAAO,CAAC,kBAAkB,CAAS;IACnC,OAAO,CAAC,eAAe,CAAqC;IAC5D,OAAO,CAAC,MAAM,CAAkB;IAEhC,OAAO;IAKP;;OAEG;WACW,WAAW,IAAI,oBAAoB;IAOjD;;OAEG;YACW,IAAI;IAgBl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,CAE3D;AAED;;GAEG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,GAAE,KAAK,GAAG,KAAK,GAAG,MAAc,GACrC,OAAO,CAAC,IAAI,CAAC,CAEf;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAEhF;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD"}
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Privacy Notice Display Handler
|
|
3
|
+
*
|
|
4
|
+
* Manages display of privacy notice on first run and version updates.
|
|
5
|
+
* Tracks acknowledgment and integrates with consent management.
|
|
6
|
+
*
|
|
7
|
+
* Added by Pantheon Security for enterprise compliance support.
|
|
8
|
+
*/
|
|
9
|
+
import path from "path";
|
|
10
|
+
import fs from "fs";
|
|
11
|
+
import { getConfig } from "../config.js";
|
|
12
|
+
import { writeFileSecure, mkdirSecure } from "../utils/file-permissions.js";
|
|
13
|
+
import { getConsentManager } from "./consent-manager.js";
|
|
14
|
+
import { getComplianceLogger } from "./compliance-logger.js";
|
|
15
|
+
import { PRIVACY_NOTICE, PRIVACY_NOTICE_VERSION, getPrivacyNoticeCLI, getPrivacyNoticeCompact, getPrivacyNoticeStructured, } from "./privacy-notice-text.js";
|
|
16
|
+
/**
|
|
17
|
+
* Privacy Notice Manager class
|
|
18
|
+
*/
|
|
19
|
+
export class PrivacyNoticeManager {
|
|
20
|
+
static instance;
|
|
21
|
+
acknowledgmentFile;
|
|
22
|
+
acknowledgments = [];
|
|
23
|
+
loaded = false;
|
|
24
|
+
constructor() {
|
|
25
|
+
const config = getConfig();
|
|
26
|
+
this.acknowledgmentFile = path.join(config.configDir, "privacy-acknowledgment.json");
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Get singleton instance
|
|
30
|
+
*/
|
|
31
|
+
static getInstance() {
|
|
32
|
+
if (!PrivacyNoticeManager.instance) {
|
|
33
|
+
PrivacyNoticeManager.instance = new PrivacyNoticeManager();
|
|
34
|
+
}
|
|
35
|
+
return PrivacyNoticeManager.instance;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Load acknowledgments from storage
|
|
39
|
+
*/
|
|
40
|
+
async load() {
|
|
41
|
+
if (this.loaded)
|
|
42
|
+
return;
|
|
43
|
+
try {
|
|
44
|
+
if (fs.existsSync(this.acknowledgmentFile)) {
|
|
45
|
+
const content = fs.readFileSync(this.acknowledgmentFile, "utf-8");
|
|
46
|
+
const data = JSON.parse(content);
|
|
47
|
+
this.acknowledgments = data.acknowledgments || [];
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
catch {
|
|
51
|
+
this.acknowledgments = [];
|
|
52
|
+
}
|
|
53
|
+
this.loaded = true;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Save acknowledgments to storage
|
|
57
|
+
*/
|
|
58
|
+
async save() {
|
|
59
|
+
const dir = path.dirname(this.acknowledgmentFile);
|
|
60
|
+
mkdirSecure(dir);
|
|
61
|
+
const data = {
|
|
62
|
+
current_version: PRIVACY_NOTICE_VERSION,
|
|
63
|
+
acknowledgments: this.acknowledgments,
|
|
64
|
+
last_updated: new Date().toISOString(),
|
|
65
|
+
};
|
|
66
|
+
writeFileSecure(this.acknowledgmentFile, JSON.stringify(data, null, 2));
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Check if privacy notice needs to be shown
|
|
70
|
+
*/
|
|
71
|
+
async needsDisplay() {
|
|
72
|
+
await this.load();
|
|
73
|
+
// Check if current version has been acknowledged
|
|
74
|
+
const currentAck = this.acknowledgments.find(a => a.version === PRIVACY_NOTICE_VERSION);
|
|
75
|
+
return !currentAck;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Check if this is the first run ever
|
|
79
|
+
*/
|
|
80
|
+
async isFirstRun() {
|
|
81
|
+
await this.load();
|
|
82
|
+
return this.acknowledgments.length === 0;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Get the CLI-formatted privacy notice
|
|
86
|
+
*/
|
|
87
|
+
getCLINotice() {
|
|
88
|
+
return getPrivacyNoticeCLI();
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Get compact privacy notice (for API responses)
|
|
92
|
+
*/
|
|
93
|
+
getCompactNotice() {
|
|
94
|
+
return getPrivacyNoticeCompact();
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Get structured privacy notice (full details)
|
|
98
|
+
*/
|
|
99
|
+
getStructuredNotice() {
|
|
100
|
+
return getPrivacyNoticeStructured();
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Get full privacy notice object
|
|
104
|
+
*/
|
|
105
|
+
getFullNotice() {
|
|
106
|
+
return PRIVACY_NOTICE;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Record acknowledgment of privacy notice
|
|
110
|
+
*/
|
|
111
|
+
async acknowledge(method = "cli") {
|
|
112
|
+
await this.load();
|
|
113
|
+
const acknowledgment = {
|
|
114
|
+
version: PRIVACY_NOTICE_VERSION,
|
|
115
|
+
acknowledged_at: new Date().toISOString(),
|
|
116
|
+
method,
|
|
117
|
+
};
|
|
118
|
+
this.acknowledgments.push(acknowledgment);
|
|
119
|
+
await this.save();
|
|
120
|
+
// Also record consent
|
|
121
|
+
const consentManager = getConsentManager();
|
|
122
|
+
await consentManager.acknowledgePrivacyNotice();
|
|
123
|
+
// Log the acknowledgment
|
|
124
|
+
const logger = getComplianceLogger();
|
|
125
|
+
await logger.log("consent", "privacy_notice_acknowledged", { type: "user" }, "success", {
|
|
126
|
+
details: {
|
|
127
|
+
version: PRIVACY_NOTICE_VERSION,
|
|
128
|
+
method,
|
|
129
|
+
},
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Get acknowledgment history
|
|
134
|
+
*/
|
|
135
|
+
async getAcknowledgmentHistory() {
|
|
136
|
+
await this.load();
|
|
137
|
+
return [...this.acknowledgments].sort((a, b) => new Date(b.acknowledged_at).getTime() - new Date(a.acknowledged_at).getTime());
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Get the current privacy notice version
|
|
141
|
+
*/
|
|
142
|
+
getCurrentVersion() {
|
|
143
|
+
return PRIVACY_NOTICE_VERSION;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Check if a specific version has been acknowledged
|
|
147
|
+
*/
|
|
148
|
+
async hasAcknowledgedVersion(version) {
|
|
149
|
+
await this.load();
|
|
150
|
+
return this.acknowledgments.some(a => a.version === version);
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Get status summary
|
|
154
|
+
*/
|
|
155
|
+
async getStatus() {
|
|
156
|
+
await this.load();
|
|
157
|
+
const history = await this.getAcknowledgmentHistory();
|
|
158
|
+
const lastAck = history[0];
|
|
159
|
+
return {
|
|
160
|
+
currentVersion: PRIVACY_NOTICE_VERSION,
|
|
161
|
+
needsDisplay: await this.needsDisplay(),
|
|
162
|
+
isFirstRun: await this.isFirstRun(),
|
|
163
|
+
acknowledgedVersions: [...new Set(this.acknowledgments.map(a => a.version))],
|
|
164
|
+
lastAcknowledgment: lastAck ? {
|
|
165
|
+
version: lastAck.version,
|
|
166
|
+
acknowledged_at: lastAck.acknowledged_at,
|
|
167
|
+
method: lastAck.method,
|
|
168
|
+
} : undefined,
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Display privacy notice in console (for CLI use)
|
|
173
|
+
*/
|
|
174
|
+
displayInConsole() {
|
|
175
|
+
console.log(this.getCLINotice());
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Check and prompt for privacy notice if needed
|
|
179
|
+
* Returns true if acknowledged, false if user declined
|
|
180
|
+
*/
|
|
181
|
+
async checkAndPrompt() {
|
|
182
|
+
const needs = await this.needsDisplay();
|
|
183
|
+
if (!needs) {
|
|
184
|
+
return true; // Already acknowledged
|
|
185
|
+
}
|
|
186
|
+
// In non-interactive mode, auto-acknowledge with warning
|
|
187
|
+
if (!process.stdin.isTTY) {
|
|
188
|
+
console.warn("[Privacy Notice] Running in non-interactive mode. " +
|
|
189
|
+
"Privacy notice auto-acknowledged. Version: " + PRIVACY_NOTICE_VERSION);
|
|
190
|
+
await this.acknowledge("auto");
|
|
191
|
+
return true;
|
|
192
|
+
}
|
|
193
|
+
// Display notice
|
|
194
|
+
this.displayInConsole();
|
|
195
|
+
// In a real CLI, we'd wait for input here
|
|
196
|
+
// For MCP server use, the notice is informational
|
|
197
|
+
await this.acknowledge("cli");
|
|
198
|
+
return true;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Delete all acknowledgment records (for data erasure)
|
|
202
|
+
*/
|
|
203
|
+
async deleteAllRecords() {
|
|
204
|
+
await this.load();
|
|
205
|
+
const count = this.acknowledgments.length;
|
|
206
|
+
// Log before deletion
|
|
207
|
+
const logger = getComplianceLogger();
|
|
208
|
+
await logger.logDataDeletion({ type: "user" }, "privacy_acknowledgments", count, true, { action: "erasure_request" });
|
|
209
|
+
this.acknowledgments = [];
|
|
210
|
+
await this.save();
|
|
211
|
+
return count;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
// ============================================
|
|
215
|
+
// SINGLETON ACCESS
|
|
216
|
+
// ============================================
|
|
217
|
+
/**
|
|
218
|
+
* Get the privacy notice manager instance
|
|
219
|
+
*/
|
|
220
|
+
export function getPrivacyNoticeManager() {
|
|
221
|
+
return PrivacyNoticeManager.getInstance();
|
|
222
|
+
}
|
|
223
|
+
// ============================================
|
|
224
|
+
// CONVENIENCE EXPORTS
|
|
225
|
+
// ============================================
|
|
226
|
+
/**
|
|
227
|
+
* Check if privacy notice needs to be displayed
|
|
228
|
+
*/
|
|
229
|
+
export async function needsPrivacyNotice() {
|
|
230
|
+
return getPrivacyNoticeManager().needsDisplay();
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Acknowledge the privacy notice
|
|
234
|
+
*/
|
|
235
|
+
export async function acknowledgePrivacyNotice(method = "cli") {
|
|
236
|
+
return getPrivacyNoticeManager().acknowledge(method);
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Get the privacy notice for display
|
|
240
|
+
*/
|
|
241
|
+
export function getPrivacyNotice() {
|
|
242
|
+
return getPrivacyNoticeManager().getStructuredNotice();
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Get CLI-formatted privacy notice
|
|
246
|
+
*/
|
|
247
|
+
export function getPrivacyNoticeCLIText() {
|
|
248
|
+
return getPrivacyNoticeManager().getCLINotice();
|
|
249
|
+
}
|
|
250
|
+
//# sourceMappingURL=privacy-notice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"privacy-notice.js","sourceRoot":"","sources":["../../src/compliance/privacy-notice.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,mBAAmB,EACnB,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,0BAA0B,CAAC;AAWlC;;GAEG;AACH,MAAM,OAAO,oBAAoB;IACvB,MAAM,CAAC,QAAQ,CAAuB;IACtC,kBAAkB,CAAS;IAC3B,eAAe,GAAkC,EAAE,CAAC;IACpD,MAAM,GAAY,KAAK,CAAC;IAEhC;QACE,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,I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