@privacyscrubber/mcp-server 2.3.7 → 2.3.8

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 CHANGED
@@ -493,17 +493,23 @@ Generates an institutional business case, regulatory risk breakdown, and procure
493
493
  PrivacyScrubber bundles `ps-guard` for Unix pipe, pre-commit, and agentic workflows:
494
494
 
495
495
  ```bash
496
+ # Run on-demand via scoped npx (zero external lookup):
497
+ cat .env | npx -y -p @privacyscrubber/mcp-server ps-guard --profile dev
498
+
499
+ # Or install globally for direct command access:
500
+ npm install -g @privacyscrubber/mcp-server
501
+
496
502
  # Pipe any output through RAM redaction
497
- cat .env | npx ps-guard --profile dev
503
+ cat .env | ps-guard --profile dev
498
504
 
499
505
  # Execute commands through the ZTDS safety wrapper
500
- npx ps-guard -- npm test
506
+ ps-guard -- npm test
501
507
 
502
508
  # Review git diff with secrets redacted
503
- npx ps-guard --diff --staged
509
+ ps-guard --diff --staged
504
510
 
505
511
  # Generate rules for all AI IDEs (.cursorrules, .windsurfrules, CLAUDE.md, copilot, cline)
506
- npx ps-guard --rules
512
+ ps-guard --rules
507
513
  ```
508
514
 
509
515
  ---
package/index.js CHANGED
@@ -66,6 +66,7 @@ PrivacyScrubberCore.init();
66
66
  // Volatile in-memory token map per session (multi-task agent isolation)
67
67
  const agentSessions = new Map();
68
68
  const MAX_CONCURRENT_SESSIONS = 200;
69
+ const MAX_SESSION_TOKENS = parseInt(process.env.PRIVACYSCRUBBER_MAX_SESSION_TOKENS || '5000', 10);
69
70
 
70
71
  function getSession(sessionId = 'default') {
71
72
  const sid = (sessionId || 'default').toString().trim() || 'default';
@@ -3211,6 +3212,15 @@ function performSanitization(text, profile, ignoreList = null, customSessionMap
3211
3212
  targetMap[token] = original;
3212
3213
  newTokens[token] = original;
3213
3214
  });
3215
+
3216
+ // Bounded in-memory FIFO pruning to prevent OOM during massive continuous RAG ingestion
3217
+ const keys = Object.keys(targetMap);
3218
+ if (keys.length > MAX_SESSION_TOKENS) {
3219
+ const pruneCount = keys.length - MAX_SESSION_TOKENS;
3220
+ for (let i = 0; i < pruneCount; i++) {
3221
+ delete targetMap[keys[i]];
3222
+ }
3223
+ }
3214
3224
  }
3215
3225
 
3216
3226
  return { scrubbedText: result.scrubbedText, newTokens };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@privacyscrubber/mcp-server",
3
- "version": "2.3.7",
3
+ "version": "2.3.8",
4
4
  "mcpName": "io.github.moxno/privacyscrubber-mcp",
5
5
  "description": "CISO-Approved Zero-Trust PII & Secrets Redaction MCP Server for Cursor, Windsurf, and Claude Desktop. Prevent API leaks and comply with HIPAA/SOC 2 locally.",
6
6
  "main": "index.js",
package/ps-pii-engine.cjs CHANGED
@@ -316,8 +316,8 @@ let PROFILE_RULES = {
316
316
  { type: 'ID', regex: /\b(?:GRANT|ESOP|RSU|ISO|NSO|SAR|PSU|LTIP)[-_][A-Za-z0-9_-]*\d[A-Za-z0-9_-]*\b/gi },
317
317
  { type: 'ID', regex: /\b(?:CS|OP|CN|CERT)[-_]\d{3,10}\b/gi },
318
318
  { type: 'ID', regex: /\b(?:Equity\s+Grant|Option\s+Grant|RSU\s+Grant|Stock\s+Option|Grant\s+Agreement|Grant\s+Notice|Award\s+ID|Award\s+Agreement|Vesting\s+Schedule|Carta\s+Cert(?:ificate)?|Shareworks|Pulley\s+Cert(?:ificate)?)(?:\s*(?:ID|Number|No\.?|#|Ref))?\s*[:#=-]\s*([A-Za-z0-9_-]{4,25})\b/gi },
319
- { type: 'FINANCIAL', regex: /(?<=\b(?:Number\s+of\s+(?:Options?|Shares?|Units?|RSUs?)|Total\s+(?:Options?|Shares?|Units?)|Option\s+Pool\s+Allocation|Equity\s+Award|Shares?\s+Granted|Options?\s+Granted|Vested\s+(?:Shares?|Units?)|Unvested\s+(?:Shares?|Units?))\s*[:=]\s*)(?:[0-9,]{2,12})\b/gi },
320
- { type: 'FINANCIAL', regex: /(?<=\b(?:Exercise\s+Price|Strike\s+Price|Option\s+Strike|Per-Share\s+Price|Price\s+Per\s+Share|409A\s+(?:Valuation|FMV|Fair\s+Market\s+Value)|Fair\s+Market\s+Value(?:\s+\(FMV\))?|Current\s+FMV|FMV)\s*[:=]\s*)(?:(?:\b(?:USD|EUR|GBP|CHF|ILS|RUB)\s*|[$€£¥₪₽₹]\s*)[0-9,.'’]*\d|\d[0-9,.'’]*\d?\s*(?:\b(?:USD|EUR|GBP|CHF|ILS|RUB)\b|[$€£¥₪₽₹]))/gi },
319
+ { type: 'FINANCIAL', regex: /(?<=\b(?:Number\s+of\s+Options|Shares\s+Granted|Option\s+Count|Shares\s+Allocated|Options\s+Granted|Units\s+Granted)\s*[:=]\s*)[0-9,.'’\u2018\u2019]*\d[KMB]?\b/gi },
320
+ { type: 'FINANCIAL', regex: /(?<=\b(?:Exercise\s+Price|Strike\s+Price|Option\s+Strike|Per-Share\s+Price|Price\s+Per\s+Share|409A\s+(?:Valuation|FMV|Fair\s+Market\s+Value)|Fair\s+Market\s+Value(?:\s+\(FMV\))?|Current\s+FMV|FMV)\s*[:=]\s*)(?:(?:\b(?:USD|EUR|GBP|CHF|ILS|RUB)\s*|[$€£¥₪₽₹]\s*)[0-9,.'’\u2018\u2019]*\d[KMB]?\b|\b\d[0-9,.'’\u2018\u2019]*\d?[KMB]?\s*(?:\b(?:USD|EUR|GBP|CHF|ILS|RUB)\b|[$€£¥₪₽₹]))/gi },
321
321
 
322
322
  // 2. Global Mobility, Visas & Immigration Filings (ETA LCA, PERM, USCIS, CoS, LMIA)
323
323
  { type: 'ID', regex: /\bI-200-\d{5}-\d{6}\b/gi },
@@ -503,7 +503,7 @@ let PROFILE_RULES = {
503
503
  { type: 'ID', regex: /\b(?:msclkid|ttclid|li_fat_id|dclid|srsltid|wbraid|gbraid)[^\S\r\n]*[:=#-][^\S\r\n]*([A-Za-z0-9_-]{10,})\b/gi },
504
504
 
505
505
  // 6. Ad Spend Budgets, Influencer Sponsorship Deals & Rate Cards
506
- { type: 'FINANCIAL', regex: /(?<=\b(?:LTV|CAC)[\s:]*)(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[0-9,.'’]+\b/gi },
506
+ { type: 'FINANCIAL', regex: /(?<=\b(?:LTV|CAC)[\s:]*)(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[0-9,.'’\u2018\u2019]*\d[KMB]?\b/gi },
507
507
  {
508
508
  type: 'FINANCIAL',
509
509
  regex: /(?<=\b(?:Campaign\s+Budget|Ad\s+Spend|Monthly\s+Ad\s+Spend|Media\s+Budget|Marketing\s+Budget|Daily\s+Budget|Lifetime\s+Budget|Influencer\s+Sponsorship\s+Fee|Influencer\s+Fee|Creator\s+Retainer|Sponsorship\s+Rate|Sponsored\s+Post\s+Fee|Affiliate\s+Commission|Affiliate\s+Payout|Target\s+CPA\s+Cap|Max\s+CPC\s+Bid|Minimum\s+Spend\s+Commitment|Spend\s+Cap)[^\S\r\n]*[:=][^\S\r\n]*)(?:(?:USD|EUR|GBP|CHF|ILS|RUB)\s*|[$€£¥₪₽₹]\s*)?[0-9,.'’]*\d(?:\.\d{2})?(?:[^\S\r\n]*(?:USD|EUR|GBP|CHF|ILS|RUB|[$€£¥₪₽₹]|\/mo\b|\/month\b|\/post\b|\/video\b))?/gi
@@ -556,7 +556,7 @@ let PROFILE_RULES = {
556
556
  // 9. Logistics Financials, Demurrage, Detention & Freight Charges
557
557
  {
558
558
  type: 'FINANCIAL',
559
- regex: /(?<=\b(?:Ocean\s+Freight|Air\s+Freight|Drayage(?:\s+Fee)?|Demurrage|Detention|BAF|CAF|THC|Terminal\s+Handling\s+Charge|Customs\s+Duty|Tariff\s+Amount|Duty\s+Paid|HMF|Harbor\s+Maintenance\s+Fee|MPF|Merchandise\s+Processing\s+Fee|Chassis\s+Fee|Storage\s+Fee|Lumper\s+Fee|Accessorial\s+Charges?|Declared\s+Customs\s+Value|Commercial\s+Invoice\s+Total)(?:\s*\([^)]*\))?\s*[:=-]\s*)(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[\d,.'’]+(?:\s+(?:[kKmMbB]|million|thousand)\b)?/gi
559
+ regex: /(?<=\b(?:Ocean\s+Freight|Air\s+Freight|Drayage(?:\s+Fee)?|Demurrage|Detention|BAF|CAF|THC|Terminal\s+Handling\s+Charge|Customs\s+Duty|Tariff\s+Amount|Duty\s+Paid|HMF|Harbor\s+Maintenance\s+Fee|MPF|Merchandise\s+Processing\s+Fee|Chassis\s+Fee|Storage\s+Fee|Lumper\s+Fee|Accessorial\s+Charges?|Declared\s+Customs\s+Value|Commercial\s+Invoice\s+Total)(?:\s*\([^)]*\))?\s*[:=-]\s*)(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[0-9,.'’\u2018\u2019]*\d(?:\s*(?:[kKmMbB]|million|thousand)\b)?/gi
560
560
  },
561
561
  {
562
562
  type: 'FINANCIAL',
@@ -611,7 +611,7 @@ let PROFILE_RULES = {
611
611
  { type: 'ID', regex: /\b(?:ANID|ARIBA[- ]NETWORK[- ]ID|ARIBA\s+ID)[^\S\r\n]*[:\s#-]+([A-Za-z0-9_-]{8,25})\b/gi },
612
612
  { type: 'ID', regex: /\b(?:REMITTANCE|REMIT)[-_][A-Za-z0-9_-]*\d[A-Za-z0-9_-]*\b/gi },
613
613
  // 7. Deal Financials, Contract Value Caps & Per-Seat Rates
614
- { type: 'FINANCIAL', regex: /(?<=\b(?:ARR|MRR|ACV|TCV|ASP|QUOTA|Quota|Sales\s+Quota|Average\s+Selling\s+Price|CARR|Contracted\s+ARR|Contract\s+Value|Annual\s+Value|Total\s+Contract\s+Value|Annual\s+Contract\s+Value|Platform\s+Fee|Subscription\s+Fee|License\s+Fee|Implementation\s+Fee|Professional\s+Services(?: Fee)?|Discount(?:ed\s+Amount)?|Limitation\s+of\s+Liability|Liability\s+Cap|LoL\s+Cap|Super[- ]?[Cc]ap|Aggregate\s+Liability|Indemnity\s+Cap|Indemnification\s+Cap)(?:\s*\([^)]*\))?\s*[:=-]\s*)(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[\d,.'’]+(?:\s+(?:[kKmMbB]|million|thousand|billion)\b)?/gi },
614
+ { type: 'FINANCIAL', regex: /(?<=\b(?:ARR|MRR|ACV|TCV|ASP|QUOTA|Quota|Sales\s+Quota|Average\s+Selling\s+Price|CARR|Contracted\s+ARR|Contract\s+Value|Annual\s+Value|Total\s+Contract\s+Value|Annual\s+Contract\s+Value|Platform\s+Fee|Subscription\s+Fee|License\s+Fee|Implementation\s+Fee|Professional\s+Services(?: Fee)?|Discount(?:ed\s+Amount)?|Limitation\s+of\s+Liability|Liability\s+Cap|LoL\s+Cap|Super[- ]?[Cc]ap|Aggregate\s+Liability|Indemnity\s+Cap|Indemnification\s+Cap)(?:\s*\([^)]*\))?\s*[:=-]\s*)(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[0-9,.'’\u2018\u2019]*\d(?:\s*(?:[kKmMbB]|million|thousand|billion)\b)?/gi },
615
615
  { type: 'FINANCIAL', regex: /(?<=\b(?:Per[- ](?:Seat|User|License|Unit)(?:\s+(?:Rate|Price|Fee|Cost))?|Seat\s+Price|License\s+Price|Unit\s+Price)(?:\s*\([^)]*\))?\s*[:=-]\s*)(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[\d,.'’]+(?:\s*\/(?:month|year|seat|user|mo|yr)(?:\/(?:month|year|mo|yr))?)?/gi },
616
616
  // 8. Contract Exhibits, Risk Assessments & SOC 2 Bridge Letters
617
617
  { type: 'ID', regex: /\b(?:EXHIBIT|SCHEDULE|ANNEX)[-_ ]+[A-Z0-9_-]{1,8}[-_ ]*(?:SECURITY|DPA|PRIVACY|PRICING|COMPLIANCE)?[-_ ]*(?:ID|REF)?[^\S\r\n]*[:\s#-]+([A-Z0-9_-]*\d[A-Z0-9_-]*)\b/gi },
@@ -1190,7 +1190,7 @@ let PROFILE_RULES = {
1190
1190
  { type: 'FINANCIAL', regex: /\b(?:Account|Acct\.?)[:\s#]*\d{4}[-\s]?\d{4}[-\s]?\d{2,6}\b/gi },
1191
1191
  { type: 'FINANCIAL', regex: /\b(?:Policy|Contract)\s*(?:No\.?|Number|#)[:\s]+[A-Z0-9][A-Z0-9\-]{3,14}\b/gi },
1192
1192
  { type: 'ID', regex: /\bCRD\s*#?\s*\d{4,8}\b/gi },
1193
- { type: 'FINANCIAL', regex: /\b(?:Annual\s+(?:Distribution|Withdrawal)|RMD|Required\s+Minimum\s+Distribution)[:\s]+(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[\d,.'’]+\b/gi },
1193
+ { type: 'FINANCIAL', regex: /\b(?:Annual\s+(?:Distribution|Withdrawal)|RMD|Required\s+Minimum\s+Distribution)[:\s]+(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[0-9,.'’\u2018\u2019]*\d[KMB]?\b/gi },
1194
1194
  { type: 'FINANCIAL', regex: /(?<=\b(?:Portfolio(?:\s+[Vv]alue)?|Market\s+Value|Net\s+Worth|AUM|Total\s+Assets|Cash\s+Balance|Account\s+Value|Capital\s+Gains?|Unrealized\s+(?:Gain|Loss)|Realized\s+(?:Gain|Loss)|Dividend\s+Income)[:\s]+)(?:(?:\((?:[$€£¥₪₽₹]\s*)?[0-9,.'’\u2018\u2019]+[KMB]?\)|(?:[$€£¥₪₽₹]\s*)\([0-9,.'’\u2018\u2019]+[KMB]?\))|(?:[-−](?:[$€£¥₪₽₹]\s*)?[0-9,.'’\u2018\u2019]*\d[KMB]?\b|(?:[$€£¥₪₽₹]\s*)[-−][0-9,.'’\u2018\u2019]*\d[KMB]?\b)|(?:(?:\b(?:USD|EUR|GBP|CHF|ILS|RUB)\s*|[$€£¥₪₽₹]\s*)[0-9,.'’\u2018\u2019]*\d[KMB]?\b|\b\d[0-9,.'’\u2018\u2019]*\d?[KMB]?\s*(?:\b(?:USD|EUR|GBP|CHF|ILS|RUB)\b|[$€£¥₪₽₹]))|[0-9,.'’]{3,}\b)/gi },
1195
1195
  { type: 'FINANCIAL', regex: /(?:(?:\b(?:EUR|GBP|CHF|ILS|RUB)\s*|[€£¥₪₽₹]\s*)[0-9,.'’\u2018\u2019]*\d[KMB]?\b|\b\d[0-9,.'’\u2018\u2019]*\d?[KMB]?\s*(?:\b(?:EUR|GBP|CHF|ILS|RUB)\b|[€£¥₪₽₹]))/gi },
1196
1196
  { type: 'FINANCIAL', regex: /\b(?:Roth\s+)?(?:IRA|401k|401\(k\)|403b|403\(b\)|SEP|SIMPLE)\s*(?:Account|Acct|Plan)?\s*(?:(?:No\.?|Number|#)[:\s#]*|[:#]\s*)([A-Z0-9-]{4,20})\b/gi },
@@ -1248,10 +1248,11 @@ let PROFILE_RULES = {
1248
1248
  regex: /\b(?:Incurred\s+Loss(?:es)?|Paid\s+Loss(?:es)?|Case\s+Reserve|Outstanding\s+Reserve|IBNR(?:\s+Reserve)?|Loss\s+Reserve|Self-Insured\s+Retention|SIR\s+(?:Amount|Limit)|Policy\s+Limit|Per\s+Occurrence\s+Limit|Aggregate\s+Limit|Excess\s+Limit|Underlying\s+Limit|Attachment\s+Point|Treaty\s+Limit|Cession\s+Amount)\s*[:=]\s*((?:(?:\b(?:USD|EUR|GBP|CHF|ILS|RUB)\s*|[$€£¥₪₽₹]\s*)[0-9,.'’]*\d[KMB]?\b|\b\d[0-9,.'’]*\d?[KMB]?\s*(?:\b(?:USD|EUR|GBP|CHF|ILS|RUB)\b|[$€£¥₪₽₹])))/gi
1249
1249
  },
1250
1250
  // Existing core insurance patterns
1251
- { type: 'FINANCIAL', regex: /\b(?:Loss|Claim\s+Amount|Claim\s+Settlement|Settlement|(?<!\b(?:Case|Outstanding|IBNR|Loss)\s+)Reserve|Indemnity)[:\s]+(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[\d,.'’]+\b/gi },
1251
+ { type: 'FINANCIAL', regex: /\b(?:Loss|Claim\s+Amount|Claim\s+Settlement|Settlement|(?<!\b(?:Case|Outstanding|IBNR|Loss)\s+)Reserve|Indemnity)[:\s]+(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[0-9,.'’\u2018\u2019]*\d[KMB]?\b/gi },
1252
+ { type: 'FINANCIAL', regex: /(?:(?:\b(?:EUR|GBP|CHF|ILS|RUB)\s*|[€£¥₪₽₹]\s*)[0-9,.'’\u2018\u2019]*\d[KMB]?\b|\b\d[0-9,.'’\u2018\u2019]*\d?[KMB]?\s*(?:\b(?:EUR|GBP|CHF|ILS|RUB)\b|[€£¥₪₽₹]))/gi },
1252
1253
  { type: 'ID', regex: /\b(?:(?:Assigned\s+)?Adjuster\s+(?:ID|No)|Claim\s+Rep(?:\.|resentative)?)[:\s#]*[-A-Z0-9]{4,15}\b/gi },
1253
1254
  { type: 'ID', regex: /\bNAIC(?:\s+(?:Company\s+)?(?:Code|CoCode|No\.?|Number|#))?[:\s#]*(\d{5})\b/gi },
1254
- { type: 'FINANCIAL', regex: /\b(?:Deductible|Premium|Coverage\s+Amount)[:\s]+(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[\d,.'’\u2018\u2019]+\b/gi },
1255
+ { type: 'FINANCIAL', regex: /\b(?:Deductible|Premium|Coverage\s+Amount)[:\s]+(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[0-9,.'’\u2018\u2019]*\d[KMB]?\b/gi },
1255
1256
  { type: 'ID', regex: /\b[A-HJ-NPR-Z0-9]{17}\b/g },
1256
1257
  { type: 'ID', regex: /\b(?<!\bAdditional\s+)(?:Insured|Named\s+Insured)[:\s]+[A-Z][a-z]+(?:[ \t\xA0]+[A-Z][a-z]+)+/g },
1257
1258
  { type: 'ID', regex: /\b(?:Agent|Producer)\s*(?:Code|No|ID)[:\s#]*[-A-Z0-9]{4,15}\b/gi },
@@ -1269,12 +1270,12 @@ let PROFILE_RULES = {
1269
1270
  { type: 'NAME', isContextName: true, isCorporateName: true, regex: /(?:Firm(?:'s)?\s*name|Preparer\s*Firm|Accounting\s*Firm|CPA\s*Firm)[\s:#]+([A-Za-z0-9&., \t\xA0'-]{2,45}?)(?=\r?\n|$|\s{3,}|\t|EIN|FEIN|Address|PTIN|Phone)/gi },
1270
1271
  { type: 'NAME', isContextName: true, regex: /(?:(?:Paid\s+)?Preparer(?:'s)?\s*(?:name)?|Tax\s+Preparer)[\s:#]+([A-Za-z0-9., \t\xA0'-]{2,35}?)(?=\r?\n|$|\s{3,}|\t|PTIN|Phone|SSN|EIN|Firm|Date)/gi },
1271
1272
  { type: 'ID', regex: /\b(?:Account\s+number\s*(?:\(see\s+instructions\))?|(?:(?:[A-Za-z]+[ \t\xA0]+)?(?:Operating|Payroll|Checking|Savings|Business|Depository)\s+Account))\s*(?:#|No\.?|Number)?[:\s#]*([A-Za-z0-9_-]{4,25})\b/gi },
1272
- { type: 'FINANCIAL', regex: /\b(?:AGI|Adjusted\s+Gross\s+Income|Taxable\s+Income|Total\s+Income)[:\s]+(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[\d,.'’]+\b/gi },
1273
+ { type: 'FINANCIAL', regex: /(?<=\b(?:AGI|Adjusted\s+Gross\s+Income|Taxable\s+Income|Total\s+Income)\s*[:\s]\s*)(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[0-9,.'’\u2018\u2019]*\d[KMB]?\b/gi },
1273
1274
  { type: 'FINANCIAL', regex: /\b(?:Form\s+|Withheld\s+)?Box\s+\d{1,2}[a-z]?(?:\s*(?:Code\s+[A-Z]{1,2}(?:\s*\([^)]*\))?|Wages[^\n\r:]{0,35}|Federal[^\n\r:]{0,35}|Medicare[^\n\r:]{0,35}|Social\s+Security[^\n\r:]{0,35}|Nonemployee[^\n\r:]{0,35}|Rents|Royalties|[A-Za-z0-9,/\s'’–-]{0,25})?(?:\s*:\s*[A-Z])?)?\s*[:\s]+(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[\d,.'’\u2018\u2019]+\b/gi },
1274
1275
  { type: 'ID', regex: /\b(?:Form|Schedule)\s+(?:1040|1040-SR|W-2|W-4|1099-[A-Z]{1,4}|K-1|941|990|4562)\b/gi },
1275
- { type: 'FINANCIAL', regex: /\b(?:Federal|State|Assessed)?\s*(?:Tax\s+Due|Balance\s+Due|Overpayment|Refund)[:\s]+(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[\d,.'’\u2018\u2019]+\b/gi },
1276
+ { type: 'FINANCIAL', regex: /(?<=\b(?:Federal|State|Assessed)?\s*(?:Tax\s+Due|Balance\s+Due|Overpayment|Refund)\s*[:\s]\s*)(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[0-9,.'’\u2018\u2019]*\d[KMB]?\b/gi },
1276
1277
  { type: 'ID', regex: /\b(?:State\s+Tax\s+ID|SUI|UI\s+Account\s+No)[:\s#]*[A-Z]{0,3}[-]?\d{4,15}\b/gi },
1277
- { type: 'FINANCIAL', regex: /\b(?:Gross|Net|Medicare|Social\s+Security)\s+(?:Pay|Wages|Tips|Withholding)[:\s]+(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[\d,.'’\u2018\u2019]+\b/gi },
1278
+ { type: 'FINANCIAL', regex: /(?<=\b(?:Gross|Net|Medicare|Social\s+Security)\s+(?:Pay|Wages|Tips|Withholding)\s*[:\s]\s*)(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[0-9,.'’\u2018\u2019]*\d[KMB]?\b/gi },
1278
1279
  { type: 'ID', regex: /\b(?:CAF(?:\s+ID)?|(?:Practitioner|Tax\s+Preparer)\s+(?:PIN|ID)|PTIN)[:\s#]*[A-Z0-9-]{6,12}\b/gi },
1279
1280
  { type: 'ID', regex: /\bEFIN[:\s#]*\d{6}\b/gi },
1280
1281
  { type: 'ID', regex: /\bGL[-_\s]*(?:Account|Acct|Code)?[:\s#]*\d{3,10}(?:[-_]\d{2,6})+\b|\bGL[-_\s]*(?:Account|Acct|Code)?[:\s#]*\d{4,10}\b/gi },
@@ -1547,7 +1548,7 @@ let PROFILE_RULES = {
1547
1548
  { type: 'FINANCIAL', regex: /\b(?:SAFE(?:\s+Agreement|\s+Note)?|Convertible\s+Note|CN)\s*(?:ID|Ref|No\.?|Number|#)?[:\s#-]+(?!Agreement\b)([A-Za-z0-9-]{3,25})\b/gi },
1548
1549
  { type: 'ID', regex: /\b(?:Share\s+Certificate|Stock\s+Certificate|Cert(?:ificate)?)\s*(?:No\.?|Number|#)?[:\s#-]+((?:CERT|CS|PS|PF|COM|PREF)[-_][A-Za-z0-9-]{2,15}|[A-Z]{1,4}-\d{3,8})\b/gi },
1549
1550
  { type: 'ID', regex: /\b(?:Stock\s+Option|Option\s+Grant|ISO|NSO|RSU)\s*(?:Agreement|Grant)?\s*(?:(?:ID|No\.?|Number|#)[:\s#-]*|[:#-])\s*([A-Za-z0-9-]*\d[A-Za-z0-9-]*)\b/gi },
1550
- { type: 'FINANCIAL', regex: /\b(?:Strike|Exercise)\s+Price[:\s]+((?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[\d,.'’\u2018\u2019]+)\b/gi },
1551
+ { type: 'FINANCIAL', regex: /\b(?:Strike|Exercise)\s+Price[:\s]+((?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[0-9,.'’\u2018\u2019]*\d[KMB]?)\b/gi },
1551
1552
  { type: 'FINANCIAL', regex: /\b(?:Valuation\s+Cap|Post-Money\s+Cap|Pre-Money\s+Valuation)[:\s]+((?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[\d,.'’\u2018\u2019]+[KMB]?)\b/gi },
1552
1553
  { type: 'FINANCIAL', regex: /\b(?:Common\s+Shares|Preferred\s+Shares|Number\s+of\s+Shares|Share\s+Count|Shares)[:\s]+([0-9,.'’\u2018\u2019]{3,})\b/gi },
1553
1554
  { type: 'FINANCIAL', regex: /\b(?:Fully\s+Diluted\s+)?Ownership(?:\s+Percentage)?[:\s]+(\d+(?:\.\d+)?\s*%)/gi },
package/ps-pii-engine.js CHANGED
@@ -316,8 +316,8 @@ let PROFILE_RULES = {
316
316
  { type: 'ID', regex: /\b(?:GRANT|ESOP|RSU|ISO|NSO|SAR|PSU|LTIP)[-_][A-Za-z0-9_-]*\d[A-Za-z0-9_-]*\b/gi },
317
317
  { type: 'ID', regex: /\b(?:CS|OP|CN|CERT)[-_]\d{3,10}\b/gi },
318
318
  { type: 'ID', regex: /\b(?:Equity\s+Grant|Option\s+Grant|RSU\s+Grant|Stock\s+Option|Grant\s+Agreement|Grant\s+Notice|Award\s+ID|Award\s+Agreement|Vesting\s+Schedule|Carta\s+Cert(?:ificate)?|Shareworks|Pulley\s+Cert(?:ificate)?)(?:\s*(?:ID|Number|No\.?|#|Ref))?\s*[:#=-]\s*([A-Za-z0-9_-]{4,25})\b/gi },
319
- { type: 'FINANCIAL', regex: /(?<=\b(?:Number\s+of\s+(?:Options?|Shares?|Units?|RSUs?)|Total\s+(?:Options?|Shares?|Units?)|Option\s+Pool\s+Allocation|Equity\s+Award|Shares?\s+Granted|Options?\s+Granted|Vested\s+(?:Shares?|Units?)|Unvested\s+(?:Shares?|Units?))\s*[:=]\s*)(?:[0-9,]{2,12})\b/gi },
320
- { type: 'FINANCIAL', regex: /(?<=\b(?:Exercise\s+Price|Strike\s+Price|Option\s+Strike|Per-Share\s+Price|Price\s+Per\s+Share|409A\s+(?:Valuation|FMV|Fair\s+Market\s+Value)|Fair\s+Market\s+Value(?:\s+\(FMV\))?|Current\s+FMV|FMV)\s*[:=]\s*)(?:(?:\b(?:USD|EUR|GBP|CHF|ILS|RUB)\s*|[$€£¥₪₽₹]\s*)[0-9,.'’]*\d|\d[0-9,.'’]*\d?\s*(?:\b(?:USD|EUR|GBP|CHF|ILS|RUB)\b|[$€£¥₪₽₹]))/gi },
319
+ { type: 'FINANCIAL', regex: /(?<=\b(?:Number\s+of\s+Options|Shares\s+Granted|Option\s+Count|Shares\s+Allocated|Options\s+Granted|Units\s+Granted)\s*[:=]\s*)[0-9,.'’\u2018\u2019]*\d[KMB]?\b/gi },
320
+ { type: 'FINANCIAL', regex: /(?<=\b(?:Exercise\s+Price|Strike\s+Price|Option\s+Strike|Per-Share\s+Price|Price\s+Per\s+Share|409A\s+(?:Valuation|FMV|Fair\s+Market\s+Value)|Fair\s+Market\s+Value(?:\s+\(FMV\))?|Current\s+FMV|FMV)\s*[:=]\s*)(?:(?:\b(?:USD|EUR|GBP|CHF|ILS|RUB)\s*|[$€£¥₪₽₹]\s*)[0-9,.'’\u2018\u2019]*\d[KMB]?\b|\b\d[0-9,.'’\u2018\u2019]*\d?[KMB]?\s*(?:\b(?:USD|EUR|GBP|CHF|ILS|RUB)\b|[$€£¥₪₽₹]))/gi },
321
321
 
322
322
  // 2. Global Mobility, Visas & Immigration Filings (ETA LCA, PERM, USCIS, CoS, LMIA)
323
323
  { type: 'ID', regex: /\bI-200-\d{5}-\d{6}\b/gi },
@@ -503,7 +503,7 @@ let PROFILE_RULES = {
503
503
  { type: 'ID', regex: /\b(?:msclkid|ttclid|li_fat_id|dclid|srsltid|wbraid|gbraid)[^\S\r\n]*[:=#-][^\S\r\n]*([A-Za-z0-9_-]{10,})\b/gi },
504
504
 
505
505
  // 6. Ad Spend Budgets, Influencer Sponsorship Deals & Rate Cards
506
- { type: 'FINANCIAL', regex: /(?<=\b(?:LTV|CAC)[\s:]*)(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[0-9,.'’]+\b/gi },
506
+ { type: 'FINANCIAL', regex: /(?<=\b(?:LTV|CAC)[\s:]*)(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[0-9,.'’\u2018\u2019]*\d[KMB]?\b/gi },
507
507
  {
508
508
  type: 'FINANCIAL',
509
509
  regex: /(?<=\b(?:Campaign\s+Budget|Ad\s+Spend|Monthly\s+Ad\s+Spend|Media\s+Budget|Marketing\s+Budget|Daily\s+Budget|Lifetime\s+Budget|Influencer\s+Sponsorship\s+Fee|Influencer\s+Fee|Creator\s+Retainer|Sponsorship\s+Rate|Sponsored\s+Post\s+Fee|Affiliate\s+Commission|Affiliate\s+Payout|Target\s+CPA\s+Cap|Max\s+CPC\s+Bid|Minimum\s+Spend\s+Commitment|Spend\s+Cap)[^\S\r\n]*[:=][^\S\r\n]*)(?:(?:USD|EUR|GBP|CHF|ILS|RUB)\s*|[$€£¥₪₽₹]\s*)?[0-9,.'’]*\d(?:\.\d{2})?(?:[^\S\r\n]*(?:USD|EUR|GBP|CHF|ILS|RUB|[$€£¥₪₽₹]|\/mo\b|\/month\b|\/post\b|\/video\b))?/gi
@@ -556,7 +556,7 @@ let PROFILE_RULES = {
556
556
  // 9. Logistics Financials, Demurrage, Detention & Freight Charges
557
557
  {
558
558
  type: 'FINANCIAL',
559
- regex: /(?<=\b(?:Ocean\s+Freight|Air\s+Freight|Drayage(?:\s+Fee)?|Demurrage|Detention|BAF|CAF|THC|Terminal\s+Handling\s+Charge|Customs\s+Duty|Tariff\s+Amount|Duty\s+Paid|HMF|Harbor\s+Maintenance\s+Fee|MPF|Merchandise\s+Processing\s+Fee|Chassis\s+Fee|Storage\s+Fee|Lumper\s+Fee|Accessorial\s+Charges?|Declared\s+Customs\s+Value|Commercial\s+Invoice\s+Total)(?:\s*\([^)]*\))?\s*[:=-]\s*)(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[\d,.'’]+(?:\s+(?:[kKmMbB]|million|thousand)\b)?/gi
559
+ regex: /(?<=\b(?:Ocean\s+Freight|Air\s+Freight|Drayage(?:\s+Fee)?|Demurrage|Detention|BAF|CAF|THC|Terminal\s+Handling\s+Charge|Customs\s+Duty|Tariff\s+Amount|Duty\s+Paid|HMF|Harbor\s+Maintenance\s+Fee|MPF|Merchandise\s+Processing\s+Fee|Chassis\s+Fee|Storage\s+Fee|Lumper\s+Fee|Accessorial\s+Charges?|Declared\s+Customs\s+Value|Commercial\s+Invoice\s+Total)(?:\s*\([^)]*\))?\s*[:=-]\s*)(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[0-9,.'’\u2018\u2019]*\d(?:\s*(?:[kKmMbB]|million|thousand)\b)?/gi
560
560
  },
561
561
  {
562
562
  type: 'FINANCIAL',
@@ -611,7 +611,7 @@ let PROFILE_RULES = {
611
611
  { type: 'ID', regex: /\b(?:ANID|ARIBA[- ]NETWORK[- ]ID|ARIBA\s+ID)[^\S\r\n]*[:\s#-]+([A-Za-z0-9_-]{8,25})\b/gi },
612
612
  { type: 'ID', regex: /\b(?:REMITTANCE|REMIT)[-_][A-Za-z0-9_-]*\d[A-Za-z0-9_-]*\b/gi },
613
613
  // 7. Deal Financials, Contract Value Caps & Per-Seat Rates
614
- { type: 'FINANCIAL', regex: /(?<=\b(?:ARR|MRR|ACV|TCV|ASP|QUOTA|Quota|Sales\s+Quota|Average\s+Selling\s+Price|CARR|Contracted\s+ARR|Contract\s+Value|Annual\s+Value|Total\s+Contract\s+Value|Annual\s+Contract\s+Value|Platform\s+Fee|Subscription\s+Fee|License\s+Fee|Implementation\s+Fee|Professional\s+Services(?: Fee)?|Discount(?:ed\s+Amount)?|Limitation\s+of\s+Liability|Liability\s+Cap|LoL\s+Cap|Super[- ]?[Cc]ap|Aggregate\s+Liability|Indemnity\s+Cap|Indemnification\s+Cap)(?:\s*\([^)]*\))?\s*[:=-]\s*)(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[\d,.'’]+(?:\s+(?:[kKmMbB]|million|thousand|billion)\b)?/gi },
614
+ { type: 'FINANCIAL', regex: /(?<=\b(?:ARR|MRR|ACV|TCV|ASP|QUOTA|Quota|Sales\s+Quota|Average\s+Selling\s+Price|CARR|Contracted\s+ARR|Contract\s+Value|Annual\s+Value|Total\s+Contract\s+Value|Annual\s+Contract\s+Value|Platform\s+Fee|Subscription\s+Fee|License\s+Fee|Implementation\s+Fee|Professional\s+Services(?: Fee)?|Discount(?:ed\s+Amount)?|Limitation\s+of\s+Liability|Liability\s+Cap|LoL\s+Cap|Super[- ]?[Cc]ap|Aggregate\s+Liability|Indemnity\s+Cap|Indemnification\s+Cap)(?:\s*\([^)]*\))?\s*[:=-]\s*)(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[0-9,.'’\u2018\u2019]*\d(?:\s*(?:[kKmMbB]|million|thousand|billion)\b)?/gi },
615
615
  { type: 'FINANCIAL', regex: /(?<=\b(?:Per[- ](?:Seat|User|License|Unit)(?:\s+(?:Rate|Price|Fee|Cost))?|Seat\s+Price|License\s+Price|Unit\s+Price)(?:\s*\([^)]*\))?\s*[:=-]\s*)(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[\d,.'’]+(?:\s*\/(?:month|year|seat|user|mo|yr)(?:\/(?:month|year|mo|yr))?)?/gi },
616
616
  // 8. Contract Exhibits, Risk Assessments & SOC 2 Bridge Letters
617
617
  { type: 'ID', regex: /\b(?:EXHIBIT|SCHEDULE|ANNEX)[-_ ]+[A-Z0-9_-]{1,8}[-_ ]*(?:SECURITY|DPA|PRIVACY|PRICING|COMPLIANCE)?[-_ ]*(?:ID|REF)?[^\S\r\n]*[:\s#-]+([A-Z0-9_-]*\d[A-Z0-9_-]*)\b/gi },
@@ -1190,7 +1190,7 @@ let PROFILE_RULES = {
1190
1190
  { type: 'FINANCIAL', regex: /\b(?:Account|Acct\.?)[:\s#]*\d{4}[-\s]?\d{4}[-\s]?\d{2,6}\b/gi },
1191
1191
  { type: 'FINANCIAL', regex: /\b(?:Policy|Contract)\s*(?:No\.?|Number|#)[:\s]+[A-Z0-9][A-Z0-9\-]{3,14}\b/gi },
1192
1192
  { type: 'ID', regex: /\bCRD\s*#?\s*\d{4,8}\b/gi },
1193
- { type: 'FINANCIAL', regex: /\b(?:Annual\s+(?:Distribution|Withdrawal)|RMD|Required\s+Minimum\s+Distribution)[:\s]+(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[\d,.'’]+\b/gi },
1193
+ { type: 'FINANCIAL', regex: /\b(?:Annual\s+(?:Distribution|Withdrawal)|RMD|Required\s+Minimum\s+Distribution)[:\s]+(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[0-9,.'’\u2018\u2019]*\d[KMB]?\b/gi },
1194
1194
  { type: 'FINANCIAL', regex: /(?<=\b(?:Portfolio(?:\s+[Vv]alue)?|Market\s+Value|Net\s+Worth|AUM|Total\s+Assets|Cash\s+Balance|Account\s+Value|Capital\s+Gains?|Unrealized\s+(?:Gain|Loss)|Realized\s+(?:Gain|Loss)|Dividend\s+Income)[:\s]+)(?:(?:\((?:[$€£¥₪₽₹]\s*)?[0-9,.'’\u2018\u2019]+[KMB]?\)|(?:[$€£¥₪₽₹]\s*)\([0-9,.'’\u2018\u2019]+[KMB]?\))|(?:[-−](?:[$€£¥₪₽₹]\s*)?[0-9,.'’\u2018\u2019]*\d[KMB]?\b|(?:[$€£¥₪₽₹]\s*)[-−][0-9,.'’\u2018\u2019]*\d[KMB]?\b)|(?:(?:\b(?:USD|EUR|GBP|CHF|ILS|RUB)\s*|[$€£¥₪₽₹]\s*)[0-9,.'’\u2018\u2019]*\d[KMB]?\b|\b\d[0-9,.'’\u2018\u2019]*\d?[KMB]?\s*(?:\b(?:USD|EUR|GBP|CHF|ILS|RUB)\b|[$€£¥₪₽₹]))|[0-9,.'’]{3,}\b)/gi },
1195
1195
  { type: 'FINANCIAL', regex: /(?:(?:\b(?:EUR|GBP|CHF|ILS|RUB)\s*|[€£¥₪₽₹]\s*)[0-9,.'’\u2018\u2019]*\d[KMB]?\b|\b\d[0-9,.'’\u2018\u2019]*\d?[KMB]?\s*(?:\b(?:EUR|GBP|CHF|ILS|RUB)\b|[€£¥₪₽₹]))/gi },
1196
1196
  { type: 'FINANCIAL', regex: /\b(?:Roth\s+)?(?:IRA|401k|401\(k\)|403b|403\(b\)|SEP|SIMPLE)\s*(?:Account|Acct|Plan)?\s*(?:(?:No\.?|Number|#)[:\s#]*|[:#]\s*)([A-Z0-9-]{4,20})\b/gi },
@@ -1248,10 +1248,11 @@ let PROFILE_RULES = {
1248
1248
  regex: /\b(?:Incurred\s+Loss(?:es)?|Paid\s+Loss(?:es)?|Case\s+Reserve|Outstanding\s+Reserve|IBNR(?:\s+Reserve)?|Loss\s+Reserve|Self-Insured\s+Retention|SIR\s+(?:Amount|Limit)|Policy\s+Limit|Per\s+Occurrence\s+Limit|Aggregate\s+Limit|Excess\s+Limit|Underlying\s+Limit|Attachment\s+Point|Treaty\s+Limit|Cession\s+Amount)\s*[:=]\s*((?:(?:\b(?:USD|EUR|GBP|CHF|ILS|RUB)\s*|[$€£¥₪₽₹]\s*)[0-9,.'’]*\d[KMB]?\b|\b\d[0-9,.'’]*\d?[KMB]?\s*(?:\b(?:USD|EUR|GBP|CHF|ILS|RUB)\b|[$€£¥₪₽₹])))/gi
1249
1249
  },
1250
1250
  // Existing core insurance patterns
1251
- { type: 'FINANCIAL', regex: /\b(?:Loss|Claim\s+Amount|Claim\s+Settlement|Settlement|(?<!\b(?:Case|Outstanding|IBNR|Loss)\s+)Reserve|Indemnity)[:\s]+(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[\d,.'’]+\b/gi },
1251
+ { type: 'FINANCIAL', regex: /\b(?:Loss|Claim\s+Amount|Claim\s+Settlement|Settlement|(?<!\b(?:Case|Outstanding|IBNR|Loss)\s+)Reserve|Indemnity)[:\s]+(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[0-9,.'’\u2018\u2019]*\d[KMB]?\b/gi },
1252
+ { type: 'FINANCIAL', regex: /(?:(?:\b(?:EUR|GBP|CHF|ILS|RUB)\s*|[€£¥₪₽₹]\s*)[0-9,.'’\u2018\u2019]*\d[KMB]?\b|\b\d[0-9,.'’\u2018\u2019]*\d?[KMB]?\s*(?:\b(?:EUR|GBP|CHF|ILS|RUB)\b|[€£¥₪₽₹]))/gi },
1252
1253
  { type: 'ID', regex: /\b(?:(?:Assigned\s+)?Adjuster\s+(?:ID|No)|Claim\s+Rep(?:\.|resentative)?)[:\s#]*[-A-Z0-9]{4,15}\b/gi },
1253
1254
  { type: 'ID', regex: /\bNAIC(?:\s+(?:Company\s+)?(?:Code|CoCode|No\.?|Number|#))?[:\s#]*(\d{5})\b/gi },
1254
- { type: 'FINANCIAL', regex: /\b(?:Deductible|Premium|Coverage\s+Amount)[:\s]+(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[\d,.'’\u2018\u2019]+\b/gi },
1255
+ { type: 'FINANCIAL', regex: /\b(?:Deductible|Premium|Coverage\s+Amount)[:\s]+(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[0-9,.'’\u2018\u2019]*\d[KMB]?\b/gi },
1255
1256
  { type: 'ID', regex: /\b[A-HJ-NPR-Z0-9]{17}\b/g },
1256
1257
  { type: 'ID', regex: /\b(?<!\bAdditional\s+)(?:Insured|Named\s+Insured)[:\s]+[A-Z][a-z]+(?:[ \t\xA0]+[A-Z][a-z]+)+/g },
1257
1258
  { type: 'ID', regex: /\b(?:Agent|Producer)\s*(?:Code|No|ID)[:\s#]*[-A-Z0-9]{4,15}\b/gi },
@@ -1269,12 +1270,12 @@ let PROFILE_RULES = {
1269
1270
  { type: 'NAME', isContextName: true, isCorporateName: true, regex: /(?:Firm(?:'s)?\s*name|Preparer\s*Firm|Accounting\s*Firm|CPA\s*Firm)[\s:#]+([A-Za-z0-9&., \t\xA0'-]{2,45}?)(?=\r?\n|$|\s{3,}|\t|EIN|FEIN|Address|PTIN|Phone)/gi },
1270
1271
  { type: 'NAME', isContextName: true, regex: /(?:(?:Paid\s+)?Preparer(?:'s)?\s*(?:name)?|Tax\s+Preparer)[\s:#]+([A-Za-z0-9., \t\xA0'-]{2,35}?)(?=\r?\n|$|\s{3,}|\t|PTIN|Phone|SSN|EIN|Firm|Date)/gi },
1271
1272
  { type: 'ID', regex: /\b(?:Account\s+number\s*(?:\(see\s+instructions\))?|(?:(?:[A-Za-z]+[ \t\xA0]+)?(?:Operating|Payroll|Checking|Savings|Business|Depository)\s+Account))\s*(?:#|No\.?|Number)?[:\s#]*([A-Za-z0-9_-]{4,25})\b/gi },
1272
- { type: 'FINANCIAL', regex: /\b(?:AGI|Adjusted\s+Gross\s+Income|Taxable\s+Income|Total\s+Income)[:\s]+(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[\d,.'’]+\b/gi },
1273
+ { type: 'FINANCIAL', regex: /(?<=\b(?:AGI|Adjusted\s+Gross\s+Income|Taxable\s+Income|Total\s+Income)\s*[:\s]\s*)(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[0-9,.'’\u2018\u2019]*\d[KMB]?\b/gi },
1273
1274
  { type: 'FINANCIAL', regex: /\b(?:Form\s+|Withheld\s+)?Box\s+\d{1,2}[a-z]?(?:\s*(?:Code\s+[A-Z]{1,2}(?:\s*\([^)]*\))?|Wages[^\n\r:]{0,35}|Federal[^\n\r:]{0,35}|Medicare[^\n\r:]{0,35}|Social\s+Security[^\n\r:]{0,35}|Nonemployee[^\n\r:]{0,35}|Rents|Royalties|[A-Za-z0-9,/\s'’–-]{0,25})?(?:\s*:\s*[A-Z])?)?\s*[:\s]+(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[\d,.'’\u2018\u2019]+\b/gi },
1274
1275
  { type: 'ID', regex: /\b(?:Form|Schedule)\s+(?:1040|1040-SR|W-2|W-4|1099-[A-Z]{1,4}|K-1|941|990|4562)\b/gi },
1275
- { type: 'FINANCIAL', regex: /\b(?:Federal|State|Assessed)?\s*(?:Tax\s+Due|Balance\s+Due|Overpayment|Refund)[:\s]+(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[\d,.'’\u2018\u2019]+\b/gi },
1276
+ { type: 'FINANCIAL', regex: /(?<=\b(?:Federal|State|Assessed)?\s*(?:Tax\s+Due|Balance\s+Due|Overpayment|Refund)\s*[:\s]\s*)(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[0-9,.'’\u2018\u2019]*\d[KMB]?\b/gi },
1276
1277
  { type: 'ID', regex: /\b(?:State\s+Tax\s+ID|SUI|UI\s+Account\s+No)[:\s#]*[A-Z]{0,3}[-]?\d{4,15}\b/gi },
1277
- { type: 'FINANCIAL', regex: /\b(?:Gross|Net|Medicare|Social\s+Security)\s+(?:Pay|Wages|Tips|Withholding)[:\s]+(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[\d,.'’\u2018\u2019]+\b/gi },
1278
+ { type: 'FINANCIAL', regex: /(?<=\b(?:Gross|Net|Medicare|Social\s+Security)\s+(?:Pay|Wages|Tips|Withholding)\s*[:\s]\s*)(?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[0-9,.'’\u2018\u2019]*\d[KMB]?\b/gi },
1278
1279
  { type: 'ID', regex: /\b(?:CAF(?:\s+ID)?|(?:Practitioner|Tax\s+Preparer)\s+(?:PIN|ID)|PTIN)[:\s#]*[A-Z0-9-]{6,12}\b/gi },
1279
1280
  { type: 'ID', regex: /\bEFIN[:\s#]*\d{6}\b/gi },
1280
1281
  { type: 'ID', regex: /\bGL[-_\s]*(?:Account|Acct|Code)?[:\s#]*\d{3,10}(?:[-_]\d{2,6})+\b|\bGL[-_\s]*(?:Account|Acct|Code)?[:\s#]*\d{4,10}\b/gi },
@@ -1547,7 +1548,7 @@ let PROFILE_RULES = {
1547
1548
  { type: 'FINANCIAL', regex: /\b(?:SAFE(?:\s+Agreement|\s+Note)?|Convertible\s+Note|CN)\s*(?:ID|Ref|No\.?|Number|#)?[:\s#-]+(?!Agreement\b)([A-Za-z0-9-]{3,25})\b/gi },
1548
1549
  { type: 'ID', regex: /\b(?:Share\s+Certificate|Stock\s+Certificate|Cert(?:ificate)?)\s*(?:No\.?|Number|#)?[:\s#-]+((?:CERT|CS|PS|PF|COM|PREF)[-_][A-Za-z0-9-]{2,15}|[A-Z]{1,4}-\d{3,8})\b/gi },
1549
1550
  { type: 'ID', regex: /\b(?:Stock\s+Option|Option\s+Grant|ISO|NSO|RSU)\s*(?:Agreement|Grant)?\s*(?:(?:ID|No\.?|Number|#)[:\s#-]*|[:#-])\s*([A-Za-z0-9-]*\d[A-Za-z0-9-]*)\b/gi },
1550
- { type: 'FINANCIAL', regex: /\b(?:Strike|Exercise)\s+Price[:\s]+((?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[\d,.'’\u2018\u2019]+)\b/gi },
1551
+ { type: 'FINANCIAL', regex: /\b(?:Strike|Exercise)\s+Price[:\s]+((?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[0-9,.'’\u2018\u2019]*\d[KMB]?)\b/gi },
1551
1552
  { type: 'FINANCIAL', regex: /\b(?:Valuation\s+Cap|Post-Money\s+Cap|Pre-Money\s+Valuation)[:\s]+((?:[$€£¥₪₽₹]|(?:USD|EUR|GBP|CHF|ILS|RUB)\s?)[\d,.'’\u2018\u2019]+[KMB]?)\b/gi },
1552
1553
  { type: 'FINANCIAL', regex: /\b(?:Common\s+Shares|Preferred\s+Shares|Number\s+of\s+Shares|Share\s+Count|Shares)[:\s]+([0-9,.'’\u2018\u2019]{3,})\b/gi },
1553
1554
  { type: 'FINANCIAL', regex: /\b(?:Fully\s+Diluted\s+)?Ownership(?:\s+Percentage)?[:\s]+(\d+(?:\.\d+)?\s*%)/gi },