@velvetmonkey/vault-core 2.0.151 → 2.0.152

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/types.d.ts CHANGED
@@ -155,7 +155,7 @@ export interface ImplicitEntityConfig {
155
155
  * Which patterns to use for detection
156
156
  * @default ['proper-nouns']
157
157
  */
158
- implicitPatterns?: Array<'proper-nouns' | 'quoted-terms' | 'single-caps' | 'camel-case' | 'acronyms'>;
158
+ implicitPatterns?: Array<'proper-nouns' | 'quoted-terms' | 'single-caps' | 'camel-case' | 'acronyms' | 'ticket-refs'>;
159
159
  /**
160
160
  * Regex patterns to exclude from implicit detection
161
161
  * @default ['^The ', '^A ', '^An ', '^This ', '^That ', '^These ', '^Those ']
@@ -187,7 +187,7 @@ export interface ImplicitEntityMatch {
187
187
  /** End position in content */
188
188
  end: number;
189
189
  /** Detection method used */
190
- pattern: 'proper-nouns' | 'quoted-terms' | 'single-caps' | 'camel-case' | 'acronyms';
190
+ pattern: 'proper-nouns' | 'quoted-terms' | 'single-caps' | 'camel-case' | 'acronyms' | 'ticket-refs';
191
191
  }
192
192
  /**
193
193
  * Options for resolving alias-based wikilinks
package/dist/wikilinks.js CHANGED
@@ -1197,7 +1197,7 @@ export function detectImplicitEntities(content, config = {}) {
1197
1197
  if (!/[a-zA-Z]/.test(text))
1198
1198
  return true;
1199
1199
  // Common words
1200
- if (IMPLICIT_EXCLUDE_WORDS.has(text.toLowerCase()))
1200
+ if (getMergedExcludeWords().has(text.toLowerCase()))
1201
1201
  return true;
1202
1202
  // Exclude patterns
1203
1203
  for (const regex of excludeRegexes) {
@@ -1339,6 +1339,20 @@ export function detectImplicitEntities(content, config = {}) {
1339
1339
  }
1340
1340
  }
1341
1341
  }
1342
+ // Pattern 6: Ticket/issue references (FW-123, PROJ-456, JIRA-1234)
1343
+ if (implicitPatterns.includes('ticket-refs')) {
1344
+ const ticketRegex = /\b([A-Z]{2,6}-\d{1,6})\b/g;
1345
+ let match;
1346
+ while ((match = ticketRegex.exec(content)) !== null) {
1347
+ const text = match[1];
1348
+ const start = match.index;
1349
+ const end = start + text.length;
1350
+ if (!shouldExclude(text) && !isProtected(start, end)) {
1351
+ detected.push({ text, start, end, pattern: 'ticket-refs' });
1352
+ seenTexts.add(text.toLowerCase());
1353
+ }
1354
+ }
1355
+ }
1342
1356
  // Sort by position (earliest first; longest first at same position)
1343
1357
  detected.sort((a, b) => {
1344
1358
  if (a.start !== b.start)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@velvetmonkey/vault-core",
3
- "version": "2.0.151",
3
+ "version": "2.0.152",
4
4
  "description": "Shared vault utilities for Flywheel ecosystem (entity scanning, wikilinks, protected zones)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",