cbrowser 8.10.0 → 9.1.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.
Files changed (35) hide show
  1. package/README.md +121 -0
  2. package/dist/analysis/accessibility-empathy.d.ts +32 -0
  3. package/dist/analysis/accessibility-empathy.d.ts.map +1 -0
  4. package/dist/analysis/accessibility-empathy.js +1005 -0
  5. package/dist/analysis/accessibility-empathy.js.map +1 -0
  6. package/dist/analysis/agent-ready-audit.d.ts +11 -0
  7. package/dist/analysis/agent-ready-audit.d.ts.map +1 -0
  8. package/dist/analysis/agent-ready-audit.js +900 -0
  9. package/dist/analysis/agent-ready-audit.js.map +1 -0
  10. package/dist/analysis/competitive-benchmark.d.ts +11 -0
  11. package/dist/analysis/competitive-benchmark.d.ts.map +1 -0
  12. package/dist/analysis/competitive-benchmark.js +1122 -0
  13. package/dist/analysis/competitive-benchmark.js.map +1 -0
  14. package/dist/analysis/index.d.ts +5 -1
  15. package/dist/analysis/index.d.ts.map +1 -1
  16. package/dist/analysis/index.js +5 -1
  17. package/dist/analysis/index.js.map +1 -1
  18. package/dist/cli.js +191 -2
  19. package/dist/cli.js.map +1 -1
  20. package/dist/cognitive/focus-hierarchies.d.ts +113 -0
  21. package/dist/cognitive/focus-hierarchies.d.ts.map +1 -0
  22. package/dist/cognitive/focus-hierarchies.js +500 -0
  23. package/dist/cognitive/focus-hierarchies.js.map +1 -0
  24. package/dist/mcp-server.d.ts.map +1 -1
  25. package/dist/mcp-server.js +100 -1
  26. package/dist/mcp-server.js.map +1 -1
  27. package/dist/personas.d.ts +14 -0
  28. package/dist/personas.d.ts.map +1 -1
  29. package/dist/personas.js +393 -0
  30. package/dist/personas.js.map +1 -1
  31. package/dist/types.d.ts +429 -0
  32. package/dist/types.d.ts.map +1 -1
  33. package/dist/types.js.map +1 -1
  34. package/docs/METHODOLOGY.md +245 -0
  35. package/package.json +1 -1
@@ -0,0 +1,113 @@
1
+ /**
2
+ * Focus Hierarchy Presets for Realistic Attention Simulation
3
+ *
4
+ * Based on eye-tracking research and human attention patterns:
5
+ * - Nielsen Norman Group: F-Pattern in reading web content
6
+ * - Baymard Institute: User attention in e-commerce
7
+ * - Google Material Design: Visual hierarchy principles
8
+ * - WebAIM: How users with disabilities navigate
9
+ *
10
+ * These presets define how different users focus attention based on their task.
11
+ */
12
+ import type { TaskType, FocusHierarchy, FocusHierarchyPreset, DistractionFilter, FocusAreaType } from "../types.js";
13
+ /**
14
+ * UI patterns that experienced users learn to ignore.
15
+ * Based on "banner blindness" research and common web patterns.
16
+ */
17
+ export declare const COMMON_DISTRACTIONS: DistractionFilter[];
18
+ /**
19
+ * Task-specific distractions that matter less for certain goals.
20
+ */
21
+ export declare const TASK_SPECIFIC_DISTRACTIONS: Record<TaskType, DistractionFilter[]>;
22
+ /**
23
+ * Focus hierarchy for information-seeking tasks.
24
+ * Example: "Find the international student application deadline"
25
+ *
26
+ * Based on research:
27
+ * - Users scan headings first (Nielsen Norman Group)
28
+ * - Navigation is used when headings don't help (Baymard)
29
+ * - Search is preferred by 30% of users as first action
30
+ */
31
+ export declare const FIND_INFORMATION_HIERARCHY: FocusHierarchy;
32
+ /**
33
+ * Focus hierarchy for action-completion tasks.
34
+ * Example: "Apply for admission", "Submit an inquiry form"
35
+ *
36
+ * Based on research:
37
+ * - Users seek clear CTA buttons (Baymard)
38
+ * - Forms are primary targets (UX research)
39
+ * - Navigation used to find the right section first
40
+ */
41
+ export declare const COMPLETE_ACTION_HIERARCHY: FocusHierarchy;
42
+ /**
43
+ * Focus hierarchy for exploratory browsing.
44
+ * Example: "What is this university about?", "Learn about the program"
45
+ *
46
+ * Based on research:
47
+ * - Explorers scan broadly (eye-tracking studies)
48
+ * - Curiosity drives engagement with varied content
49
+ * - Less goal-oriented, more serendipitous
50
+ */
51
+ export declare const EXPLORE_HIERARCHY: FocusHierarchy;
52
+ /**
53
+ * Focus hierarchy for comparison tasks.
54
+ * Example: "Which program is better?", "Compare pricing plans"
55
+ *
56
+ * Based on research:
57
+ * - Comparers seek structured data (tables, lists)
58
+ * - Feature lists and pricing are primary targets
59
+ * - Side-by-side layouts preferred
60
+ */
61
+ export declare const COMPARE_HIERARCHY: FocusHierarchy;
62
+ /**
63
+ * Focus hierarchy for troubleshooting tasks.
64
+ * Example: "Why can't I log in?", "How do I reset my password?"
65
+ *
66
+ * Based on research:
67
+ * - Stressed users seek help content urgently
68
+ * - FAQ and support sections are primary targets
69
+ * - Error messages and help text are critical
70
+ */
71
+ export declare const TROUBLESHOOT_HIERARCHY: FocusHierarchy;
72
+ export declare const FOCUS_HIERARCHY_PRESETS: FocusHierarchyPreset[];
73
+ /**
74
+ * Get focus hierarchy for a specific task type.
75
+ */
76
+ export declare function getFocusHierarchy(taskType: TaskType): FocusHierarchy;
77
+ /**
78
+ * Infer task type from a goal description.
79
+ * Uses keyword matching to categorize the goal.
80
+ */
81
+ export declare function inferTaskTypeFromGoal(goal: string): TaskType;
82
+ /**
83
+ * Check if an element matches any distraction filter.
84
+ * Returns the ignore probability if matched, 0 otherwise.
85
+ */
86
+ export declare function getDistractionIgnoreRate(element: {
87
+ text?: string;
88
+ selector?: string;
89
+ ariaLabel?: string;
90
+ }, filters: DistractionFilter[]): number;
91
+ /**
92
+ * Calculate priority score for an element based on focus hierarchy.
93
+ * Higher score = more likely to be selected for action.
94
+ */
95
+ export declare function calculateFocusPriority(element: {
96
+ area?: FocusAreaType;
97
+ text?: string;
98
+ selector?: string;
99
+ ariaLabel?: string;
100
+ isRelevantToGoal?: boolean;
101
+ }, hierarchy: FocusHierarchy): number;
102
+ /**
103
+ * Apply probabilistic filtering to a list of elements.
104
+ * Returns elements that "pass" the attention filter based on focus hierarchy.
105
+ */
106
+ export declare function filterByAttention<T extends {
107
+ area?: FocusAreaType;
108
+ }>(elements: T[], hierarchy: FocusHierarchy, random?: () => number): T[];
109
+ /**
110
+ * Determine the order to scan page areas based on hierarchy and scan pattern.
111
+ */
112
+ export declare function getScanOrder(hierarchy: FocusHierarchy): FocusAreaType[];
113
+ //# sourceMappingURL=focus-hierarchies.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focus-hierarchies.d.ts","sourceRoot":"","sources":["../../src/cognitive/focus-hierarchies.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EACV,QAAQ,EACR,cAAc,EACd,oBAAoB,EACpB,iBAAiB,EAEjB,aAAa,EACd,MAAM,aAAa,CAAC;AAMrB;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,iBAAiB,EA8BlD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAAC,QAAQ,EAAE,iBAAiB,EAAE,CA6B5E,CAAC;AAMF;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B,EAAE,cAoCxC,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,EAAE,cAoCvC,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,EAAE,cAoC/B,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,EAAE,cAoC/B,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,EAAE,cAwCpC,CAAC;AAMF,eAAO,MAAM,uBAAuB,EAAE,oBAAoB,EA+BzD,CAAC;AAMF;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,GAAG,cAAc,CAGpE;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,CAiD5D;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,EACjE,OAAO,EAAE,iBAAiB,EAAE,GAC3B,MAAM,CAcR;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE;IACP,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,EACD,SAAS,EAAE,cAAc,GACxB,MAAM,CAiCR;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS;IAAE,IAAI,CAAC,EAAE,aAAa,CAAA;CAAE,EAClE,QAAQ,EAAE,CAAC,EAAE,EACb,SAAS,EAAE,cAAc,EACzB,MAAM,GAAE,MAAM,MAAoB,GACjC,CAAC,EAAE,CAuBL;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,cAAc,GAAG,aAAa,EAAE,CAwCvE"}
@@ -0,0 +1,500 @@
1
+ /**
2
+ * Focus Hierarchy Presets for Realistic Attention Simulation
3
+ *
4
+ * Based on eye-tracking research and human attention patterns:
5
+ * - Nielsen Norman Group: F-Pattern in reading web content
6
+ * - Baymard Institute: User attention in e-commerce
7
+ * - Google Material Design: Visual hierarchy principles
8
+ * - WebAIM: How users with disabilities navigate
9
+ *
10
+ * These presets define how different users focus attention based on their task.
11
+ */
12
+ // ============================================================================
13
+ // Common Distraction Filters
14
+ // ============================================================================
15
+ /**
16
+ * UI patterns that experienced users learn to ignore.
17
+ * Based on "banner blindness" research and common web patterns.
18
+ */
19
+ export const COMMON_DISTRACTIONS = [
20
+ // Cookie/GDPR banners - users dismiss reflexively
21
+ { pattern: "cookie", ignoreRate: 0.85, reason: "Cookie consent fatigue" },
22
+ { pattern: "gdpr", ignoreRate: 0.85, reason: "GDPR banner blindness" },
23
+ { pattern: "consent", ignoreRate: 0.8, reason: "Consent popup fatigue" },
24
+ // Newsletter/subscription popups
25
+ { pattern: "newsletter", ignoreRate: 0.9, reason: "Newsletter popup fatigue" },
26
+ { pattern: "subscribe", ignoreRate: 0.75, reason: "Subscription prompts" },
27
+ { pattern: "sign up for", ignoreRate: 0.7, reason: "Signup prompt fatigue" },
28
+ // Chat widgets - ignored unless actively seeking help
29
+ { pattern: "chat", ignoreRate: 0.8, reason: "Chat widget blindness" },
30
+ { pattern: "help", ignoreRate: 0.6, reason: "Help widget (unless stuck)" },
31
+ { pattern: "support", ignoreRate: 0.6, reason: "Support widget" },
32
+ // Promotional elements
33
+ { pattern: "promo", ignoreRate: 0.85, reason: "Promotional banner blindness" },
34
+ { pattern: "sale", ignoreRate: 0.7, reason: "Sale banner (unless shopping)" },
35
+ { pattern: "discount", ignoreRate: 0.7, reason: "Discount popup" },
36
+ // Social media widgets
37
+ { pattern: "social", ignoreRate: 0.9, reason: "Social widget blindness" },
38
+ { pattern: "follow", ignoreRate: 0.85, reason: "Follow button blindness" },
39
+ { pattern: "share", ignoreRate: 0.8, reason: "Share button blindness" },
40
+ // Sidebar ads and recommendations
41
+ { pattern: "recommended", ignoreRate: 0.75, reason: "Recommendation fatigue" },
42
+ { pattern: "related", ignoreRate: 0.6, reason: "Related content (low priority)" },
43
+ { pattern: "trending", ignoreRate: 0.7, reason: "Trending content distraction" },
44
+ ];
45
+ /**
46
+ * Task-specific distractions that matter less for certain goals.
47
+ */
48
+ export const TASK_SPECIFIC_DISTRACTIONS = {
49
+ find_information: [
50
+ // When finding info, forms are low priority unless they're search
51
+ { pattern: "form:not([action*='search'])", ignoreRate: 0.7, reason: "Forms distract from info-seeking" },
52
+ // Account/login sections are irrelevant for info tasks
53
+ { pattern: "login", ignoreRate: 0.8, reason: "Login irrelevant for info" },
54
+ { pattern: "account", ignoreRate: 0.8, reason: "Account irrelevant for info" },
55
+ ],
56
+ complete_action: [
57
+ // When completing an action, informational content is lower priority
58
+ { pattern: "blog", ignoreRate: 0.85, reason: "Blog content distracts from action" },
59
+ { pattern: "news", ignoreRate: 0.85, reason: "News content distracts from action" },
60
+ { pattern: "about", ignoreRate: 0.7, reason: "About page less relevant" },
61
+ ],
62
+ explore: [
63
+ // Explorers are less distracted by anything - they're curious
64
+ // (Lower ignore rates than other tasks)
65
+ ],
66
+ compare: [
67
+ // Comparison tasks focus on feature lists, pricing
68
+ { pattern: "testimonial", ignoreRate: 0.6, reason: "Social proof secondary to facts" },
69
+ { pattern: "faq", ignoreRate: 0.5, reason: "FAQ might have comparison info" },
70
+ ],
71
+ troubleshoot: [
72
+ // Troubleshooting focuses on help/error content
73
+ { pattern: "testimonial", ignoreRate: 0.9, reason: "Irrelevant when troubleshooting" },
74
+ { pattern: "pricing", ignoreRate: 0.9, reason: "Pricing irrelevant for troubleshooting" },
75
+ { pattern: "features", ignoreRate: 0.8, reason: "Features less relevant when troubleshooting" },
76
+ ],
77
+ };
78
+ // ============================================================================
79
+ // Focus Hierarchy Presets
80
+ // ============================================================================
81
+ /**
82
+ * Focus hierarchy for information-seeking tasks.
83
+ * Example: "Find the international student application deadline"
84
+ *
85
+ * Based on research:
86
+ * - Users scan headings first (Nielsen Norman Group)
87
+ * - Navigation is used when headings don't help (Baymard)
88
+ * - Search is preferred by 30% of users as first action
89
+ */
90
+ export const FIND_INFORMATION_HIERARCHY = {
91
+ taskType: "find_information",
92
+ focusAreas: [
93
+ // Primary: Headings tell users where content is
94
+ { area: "headings", probability: 0.95, relevanceBoost: 2.5, isPrimary: true },
95
+ // High: Navigation if headings don't help
96
+ { area: "navigation", probability: 0.85, relevanceBoost: 2.0, isPrimary: true },
97
+ // High: Search box as quick alternative
98
+ { area: "search", probability: 0.75, relevanceBoost: 2.0, isPrimary: false },
99
+ // Medium: Main content for answers
100
+ { area: "content", probability: 0.70, relevanceBoost: 1.5 },
101
+ // Medium: CTAs might lead to relevant pages
102
+ { area: "cta", probability: 0.50, relevanceBoost: 1.2 },
103
+ // Low: Sidebar for secondary info
104
+ { area: "sidebar", probability: 0.30, relevanceBoost: 0.8 },
105
+ // Very low: Forms usually not relevant
106
+ { area: "forms", probability: 0.15, relevanceBoost: 0.5 },
107
+ // Very low: Footer as last resort
108
+ { area: "footer", probability: 0.20, relevanceBoost: 0.6 },
109
+ // Low: Hero sections often marketing fluff
110
+ { area: "hero", probability: 0.25, relevanceBoost: 0.7 },
111
+ // Low: Images unless informational
112
+ { area: "images", probability: 0.20, relevanceBoost: 0.5 },
113
+ ],
114
+ distractionFilters: [
115
+ ...COMMON_DISTRACTIONS,
116
+ ...TASK_SPECIFIC_DISTRACTIONS.find_information,
117
+ ],
118
+ scanPattern: "f-pattern",
119
+ navFirstProbability: 0.6, // Often check nav first for section structure
120
+ searchUseProbability: 0.3, // ~30% prefer search (Nielsen research)
121
+ attentionCapacity: 7, // Miller's 7±2 rule
122
+ focusDecayMs: 8000, // Lose focus after 8s without progress
123
+ };
124
+ /**
125
+ * Focus hierarchy for action-completion tasks.
126
+ * Example: "Apply for admission", "Submit an inquiry form"
127
+ *
128
+ * Based on research:
129
+ * - Users seek clear CTA buttons (Baymard)
130
+ * - Forms are primary targets (UX research)
131
+ * - Navigation used to find the right section first
132
+ */
133
+ export const COMPLETE_ACTION_HIERARCHY = {
134
+ taskType: "complete_action",
135
+ focusAreas: [
136
+ // Primary: CTAs are the goal
137
+ { area: "cta", probability: 0.95, relevanceBoost: 3.0, isPrimary: true },
138
+ // Primary: Forms need to be completed
139
+ { area: "forms", probability: 0.90, relevanceBoost: 2.8, isPrimary: true },
140
+ // High: Navigation to find the right section
141
+ { area: "navigation", probability: 0.80, relevanceBoost: 2.0, isPrimary: true },
142
+ // Medium: Headings to orient
143
+ { area: "headings", probability: 0.60, relevanceBoost: 1.5 },
144
+ // Medium: Content might have instructions
145
+ { area: "content", probability: 0.50, relevanceBoost: 1.2 },
146
+ // Low: Hero might have action buttons
147
+ { area: "hero", probability: 0.40, relevanceBoost: 1.0 },
148
+ // Low: Search less useful for actions
149
+ { area: "search", probability: 0.20, relevanceBoost: 0.8 },
150
+ // Very low: Sidebar usually irrelevant
151
+ { area: "sidebar", probability: 0.15, relevanceBoost: 0.5 },
152
+ // Very low: Footer rarely has actions
153
+ { area: "footer", probability: 0.10, relevanceBoost: 0.4 },
154
+ // Very low: Images rarely actionable
155
+ { area: "images", probability: 0.10, relevanceBoost: 0.3 },
156
+ ],
157
+ distractionFilters: [
158
+ ...COMMON_DISTRACTIONS,
159
+ ...TASK_SPECIFIC_DISTRACTIONS.complete_action,
160
+ ],
161
+ scanPattern: "spotted", // Jump to action elements
162
+ navFirstProbability: 0.75, // Usually need to navigate to action page first
163
+ searchUseProbability: 0.15, // Search less common for actions
164
+ attentionCapacity: 5, // Focused on fewer elements
165
+ focusDecayMs: 12000, // More patient when trying to complete action
166
+ };
167
+ /**
168
+ * Focus hierarchy for exploratory browsing.
169
+ * Example: "What is this university about?", "Learn about the program"
170
+ *
171
+ * Based on research:
172
+ * - Explorers scan broadly (eye-tracking studies)
173
+ * - Curiosity drives engagement with varied content
174
+ * - Less goal-oriented, more serendipitous
175
+ */
176
+ export const EXPLORE_HIERARCHY = {
177
+ taskType: "explore",
178
+ focusAreas: [
179
+ // High: Hero introduces the site
180
+ { area: "hero", probability: 0.85, relevanceBoost: 1.8, isPrimary: true },
181
+ // High: Headings reveal structure
182
+ { area: "headings", probability: 0.80, relevanceBoost: 1.5, isPrimary: true },
183
+ // High: Navigation shows what's available
184
+ { area: "navigation", probability: 0.75, relevanceBoost: 1.5, isPrimary: true },
185
+ // Medium-High: Content is interesting to explorers
186
+ { area: "content", probability: 0.70, relevanceBoost: 1.3 },
187
+ // Medium: Images engage explorers
188
+ { area: "images", probability: 0.60, relevanceBoost: 1.2 },
189
+ // Medium: CTAs might lead to interesting pages
190
+ { area: "cta", probability: 0.55, relevanceBoost: 1.0 },
191
+ // Medium: Sidebar has additional content
192
+ { area: "sidebar", probability: 0.50, relevanceBoost: 1.0 },
193
+ // Lower: Search when looking for specific topics
194
+ { area: "search", probability: 0.40, relevanceBoost: 0.8 },
195
+ // Lower: Forms less interesting unless signup
196
+ { area: "forms", probability: 0.30, relevanceBoost: 0.6 },
197
+ // Low: Footer for additional links
198
+ { area: "footer", probability: 0.35, relevanceBoost: 0.7 },
199
+ ],
200
+ distractionFilters: [
201
+ // Explorers are less distracted - lower ignore rates
202
+ ...COMMON_DISTRACTIONS.map(d => ({ ...d, ignoreRate: d.ignoreRate * 0.6 })),
203
+ ],
204
+ scanPattern: "z-pattern", // Broad scanning
205
+ navFirstProbability: 0.5, // Sometimes check nav, sometimes not
206
+ searchUseProbability: 0.2, // Less search, more browsing
207
+ attentionCapacity: 10, // Broader attention for exploration
208
+ focusDecayMs: 15000, // More patient, enjoying the journey
209
+ };
210
+ /**
211
+ * Focus hierarchy for comparison tasks.
212
+ * Example: "Which program is better?", "Compare pricing plans"
213
+ *
214
+ * Based on research:
215
+ * - Comparers seek structured data (tables, lists)
216
+ * - Feature lists and pricing are primary targets
217
+ * - Side-by-side layouts preferred
218
+ */
219
+ export const COMPARE_HIERARCHY = {
220
+ taskType: "compare",
221
+ focusAreas: [
222
+ // Primary: Content has comparison details
223
+ { area: "content", probability: 0.90, relevanceBoost: 2.5, isPrimary: true },
224
+ // Primary: Headings label comparison sections
225
+ { area: "headings", probability: 0.85, relevanceBoost: 2.0, isPrimary: true },
226
+ // High: Navigation to find comparison pages
227
+ { area: "navigation", probability: 0.70, relevanceBoost: 1.8 },
228
+ // Medium: CTAs for "Compare" or "See details"
229
+ { area: "cta", probability: 0.60, relevanceBoost: 1.5 },
230
+ // Medium: Images might show product comparisons
231
+ { area: "images", probability: 0.50, relevanceBoost: 1.2 },
232
+ // Medium: Sidebar might have comparison tools
233
+ { area: "sidebar", probability: 0.45, relevanceBoost: 1.0 },
234
+ // Lower: Search for specific features
235
+ { area: "search", probability: 0.35, relevanceBoost: 0.9 },
236
+ // Lower: Forms for contact/quote
237
+ { area: "forms", probability: 0.25, relevanceBoost: 0.6 },
238
+ // Low: Hero often marketing
239
+ { area: "hero", probability: 0.30, relevanceBoost: 0.7 },
240
+ // Low: Footer last resort
241
+ { area: "footer", probability: 0.15, relevanceBoost: 0.5 },
242
+ ],
243
+ distractionFilters: [
244
+ ...COMMON_DISTRACTIONS,
245
+ ...TASK_SPECIFIC_DISTRACTIONS.compare,
246
+ ],
247
+ scanPattern: "exhaustive", // Careful comparison requires thoroughness
248
+ navFirstProbability: 0.65, // Often need to find comparison page
249
+ searchUseProbability: 0.25, // Might search for specific features
250
+ attentionCapacity: 8, // Need to track multiple factors
251
+ focusDecayMs: 10000, // Moderate patience
252
+ };
253
+ /**
254
+ * Focus hierarchy for troubleshooting tasks.
255
+ * Example: "Why can't I log in?", "How do I reset my password?"
256
+ *
257
+ * Based on research:
258
+ * - Stressed users seek help content urgently
259
+ * - FAQ and support sections are primary targets
260
+ * - Error messages and help text are critical
261
+ */
262
+ export const TROUBLESHOOT_HIERARCHY = {
263
+ taskType: "troubleshoot",
264
+ focusAreas: [
265
+ // Primary: Search to find help articles
266
+ { area: "search", probability: 0.90, relevanceBoost: 3.0, isPrimary: true },
267
+ // Primary: Navigation to find help/support section
268
+ { area: "navigation", probability: 0.85, relevanceBoost: 2.5, isPrimary: true },
269
+ // Primary: Content might have error solutions
270
+ { area: "content", probability: 0.80, relevanceBoost: 2.0, isPrimary: true },
271
+ // High: Headings to find relevant sections
272
+ { area: "headings", probability: 0.75, relevanceBoost: 1.8 },
273
+ // Medium: Forms for contact/support tickets
274
+ { area: "forms", probability: 0.60, relevanceBoost: 1.5 },
275
+ // Medium: Footer often has help links
276
+ { area: "footer", probability: 0.55, relevanceBoost: 1.3 },
277
+ // Medium: CTAs might link to support
278
+ { area: "cta", probability: 0.50, relevanceBoost: 1.2 },
279
+ // Lower: Sidebar might have help widget
280
+ { area: "sidebar", probability: 0.40, relevanceBoost: 1.0 },
281
+ // Low: Hero rarely helpful for troubleshooting
282
+ { area: "hero", probability: 0.15, relevanceBoost: 0.4 },
283
+ // Very low: Images rarely help troubleshoot
284
+ { area: "images", probability: 0.10, relevanceBoost: 0.3 },
285
+ ],
286
+ distractionFilters: [
287
+ ...COMMON_DISTRACTIONS,
288
+ ...TASK_SPECIFIC_DISTRACTIONS.troubleshoot,
289
+ // Lower ignore rate for help-related elements
290
+ { pattern: "help", ignoreRate: 0.1, reason: "Help actively sought" },
291
+ { pattern: "support", ignoreRate: 0.1, reason: "Support actively sought" },
292
+ { pattern: "contact", ignoreRate: 0.2, reason: "Contact might help" },
293
+ ],
294
+ scanPattern: "spotted", // Jump to help-related elements
295
+ navFirstProbability: 0.8, // Usually need to find help section
296
+ searchUseProbability: 0.7, // High search usage when troubleshooting
297
+ attentionCapacity: 5, // Focused, stressed
298
+ focusDecayMs: 5000, // Impatient when stuck
299
+ };
300
+ // ============================================================================
301
+ // Preset Collection
302
+ // ============================================================================
303
+ export const FOCUS_HIERARCHY_PRESETS = [
304
+ {
305
+ name: "find_information",
306
+ description: "Looking for specific information (e.g., deadlines, requirements, contact info)",
307
+ taskType: "find_information",
308
+ hierarchy: FIND_INFORMATION_HIERARCHY,
309
+ },
310
+ {
311
+ name: "complete_action",
312
+ description: "Trying to complete a specific action (e.g., apply, register, submit)",
313
+ taskType: "complete_action",
314
+ hierarchy: COMPLETE_ACTION_HIERARCHY,
315
+ },
316
+ {
317
+ name: "explore",
318
+ description: "Browsing to learn about a site or organization",
319
+ taskType: "explore",
320
+ hierarchy: EXPLORE_HIERARCHY,
321
+ },
322
+ {
323
+ name: "compare",
324
+ description: "Comparing options, features, or plans",
325
+ taskType: "compare",
326
+ hierarchy: COMPARE_HIERARCHY,
327
+ },
328
+ {
329
+ name: "troubleshoot",
330
+ description: "Trying to fix a problem or get help",
331
+ taskType: "troubleshoot",
332
+ hierarchy: TROUBLESHOOT_HIERARCHY,
333
+ },
334
+ ];
335
+ // ============================================================================
336
+ // Utility Functions
337
+ // ============================================================================
338
+ /**
339
+ * Get focus hierarchy for a specific task type.
340
+ */
341
+ export function getFocusHierarchy(taskType) {
342
+ const preset = FOCUS_HIERARCHY_PRESETS.find(p => p.taskType === taskType);
343
+ return preset?.hierarchy ?? FIND_INFORMATION_HIERARCHY;
344
+ }
345
+ /**
346
+ * Infer task type from a goal description.
347
+ * Uses keyword matching to categorize the goal.
348
+ */
349
+ export function inferTaskTypeFromGoal(goal) {
350
+ const lowerGoal = goal.toLowerCase();
351
+ // Action keywords - trying to DO something
352
+ const actionKeywords = [
353
+ "apply", "submit", "register", "sign up", "signup", "create account",
354
+ "enroll", "download", "buy", "purchase", "order", "book", "schedule",
355
+ "complete", "fill out", "request", "subscribe", "join",
356
+ ];
357
+ // Information keywords - looking for INFORMATION
358
+ const infoKeywords = [
359
+ "find", "where", "what", "when", "how", "deadline", "requirements",
360
+ "contact", "address", "phone", "email", "hours", "cost", "price",
361
+ "information", "details", "learn about", "discover",
362
+ ];
363
+ // Comparison keywords - COMPARING options
364
+ const compareKeywords = [
365
+ "compare", "vs", "versus", "difference", "better", "best",
366
+ "which", "choose between", "options", "alternatives",
367
+ ];
368
+ // Troubleshooting keywords - FIXING problems
369
+ const troubleshootKeywords = [
370
+ "help", "support", "problem", "issue", "error", "can't", "cannot",
371
+ "won't", "doesn't work", "not working", "fix", "reset", "forgot",
372
+ "trouble", "stuck",
373
+ ];
374
+ // Check in priority order (action > troubleshoot > compare > info > explore)
375
+ if (actionKeywords.some(k => lowerGoal.includes(k))) {
376
+ return "complete_action";
377
+ }
378
+ if (troubleshootKeywords.some(k => lowerGoal.includes(k))) {
379
+ return "troubleshoot";
380
+ }
381
+ if (compareKeywords.some(k => lowerGoal.includes(k))) {
382
+ return "compare";
383
+ }
384
+ if (infoKeywords.some(k => lowerGoal.includes(k))) {
385
+ return "find_information";
386
+ }
387
+ // Default to explore for vague goals
388
+ return "explore";
389
+ }
390
+ /**
391
+ * Check if an element matches any distraction filter.
392
+ * Returns the ignore probability if matched, 0 otherwise.
393
+ */
394
+ export function getDistractionIgnoreRate(element, filters) {
395
+ const textToCheck = [
396
+ element.text?.toLowerCase() ?? "",
397
+ element.selector?.toLowerCase() ?? "",
398
+ element.ariaLabel?.toLowerCase() ?? "",
399
+ ].join(" ");
400
+ for (const filter of filters) {
401
+ if (textToCheck.includes(filter.pattern.toLowerCase())) {
402
+ return filter.ignoreRate;
403
+ }
404
+ }
405
+ return 0;
406
+ }
407
+ /**
408
+ * Calculate priority score for an element based on focus hierarchy.
409
+ * Higher score = more likely to be selected for action.
410
+ */
411
+ export function calculateFocusPriority(element, hierarchy) {
412
+ let priority = 1.0;
413
+ // 1. Apply area-based relevance boost
414
+ if (element.area) {
415
+ const focusArea = hierarchy.focusAreas.find(f => f.area === element.area);
416
+ if (focusArea) {
417
+ priority *= focusArea.relevanceBoost;
418
+ // Extra boost for primary areas
419
+ if (focusArea.isPrimary) {
420
+ priority *= 1.5;
421
+ }
422
+ }
423
+ else {
424
+ // Unknown area gets low priority
425
+ priority *= 0.3;
426
+ }
427
+ }
428
+ // 2. Apply distraction filtering (reduce priority for distractions)
429
+ const ignoreRate = getDistractionIgnoreRate(element, hierarchy.distractionFilters);
430
+ if (ignoreRate > 0) {
431
+ // Reduce priority based on ignore rate
432
+ // e.g., 0.8 ignore rate -> 0.2 priority multiplier
433
+ priority *= (1 - ignoreRate);
434
+ }
435
+ // 3. Goal relevance boost
436
+ if (element.isRelevantToGoal) {
437
+ priority *= 2.5;
438
+ }
439
+ return priority;
440
+ }
441
+ /**
442
+ * Apply probabilistic filtering to a list of elements.
443
+ * Returns elements that "pass" the attention filter based on focus hierarchy.
444
+ */
445
+ export function filterByAttention(elements, hierarchy, random = Math.random) {
446
+ const filtered = [];
447
+ for (const element of elements) {
448
+ // Get probability of focusing on this element's area
449
+ const focusArea = element.area
450
+ ? hierarchy.focusAreas.find(f => f.area === element.area)
451
+ : undefined;
452
+ const focusProbability = focusArea?.probability ?? 0.2;
453
+ // Probabilistic filtering
454
+ if (random() < focusProbability) {
455
+ filtered.push(element);
456
+ }
457
+ // Respect attention capacity
458
+ if (filtered.length >= hierarchy.attentionCapacity) {
459
+ break;
460
+ }
461
+ }
462
+ return filtered;
463
+ }
464
+ /**
465
+ * Determine the order to scan page areas based on hierarchy and scan pattern.
466
+ */
467
+ export function getScanOrder(hierarchy) {
468
+ const { scanPattern, focusAreas, navFirstProbability } = hierarchy;
469
+ // Start with primary areas sorted by probability
470
+ const primaryAreas = focusAreas
471
+ .filter(f => f.isPrimary)
472
+ .sort((a, b) => b.probability - a.probability)
473
+ .map(f => f.area);
474
+ // Then secondary areas
475
+ const secondaryAreas = focusAreas
476
+ .filter(f => !f.isPrimary)
477
+ .sort((a, b) => b.probability - a.probability)
478
+ .map(f => f.area);
479
+ // Apply scan pattern modifications
480
+ switch (scanPattern) {
481
+ case "nav-first":
482
+ // Navigation always first
483
+ return ["navigation", ...primaryAreas.filter(a => a !== "navigation"), ...secondaryAreas];
484
+ case "f-pattern":
485
+ // Top headings, then content, then navigation
486
+ return ["headings", "content", "navigation", ...secondaryAreas];
487
+ case "z-pattern":
488
+ // Hero, then nav, then content, then CTA
489
+ return ["hero", "navigation", "content", "cta", ...secondaryAreas];
490
+ case "spotted":
491
+ // Jump to high-probability areas (sorted by probability)
492
+ return [...primaryAreas, ...secondaryAreas];
493
+ case "exhaustive":
494
+ // Methodical top-to-bottom
495
+ return ["hero", "navigation", "headings", "content", "sidebar", "forms", "cta", "footer", "images", "search"];
496
+ default:
497
+ return [...primaryAreas, ...secondaryAreas];
498
+ }
499
+ }
500
+ //# sourceMappingURL=focus-hierarchies.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focus-hierarchies.js","sourceRoot":"","sources":["../../src/cognitive/focus-hierarchies.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAWH,+EAA+E;AAC/E,6BAA6B;AAC7B,+EAA+E;AAE/E;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAwB;IACtD,kDAAkD;IAClD,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,wBAAwB,EAAE;IACzE,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,uBAAuB,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EAAE,CAAC,CAAC,CAAC,WAAW,GAAG,CAAC,CAAC,WAAW,CAAC;SAC7C,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAEpB,mCAAmC;IACnC,QAAQ,WAAW,EAAE,CAAC;QACpB,KAAK,WAAW;YACd,0BAA0B;YAC1B,OAAO,CAAC,YAAY,EAAE,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,YAAY,CAAC,EAAE,GAAG,cAAc,CAAC,CAAC;QAE5F,KAAK,WAAW;YACd,8CAA8C;YAC9C,OAAO,CAAC,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,GAAG,cAAc,CAAC,CAAC;QAElE,KAAK,WAAW;YACd,yCAAyC;YACzC,OAAO,CAAC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,cAAc,CAAC,CAAC;QAErE,KAAK,SAAS;YACZ,yDAAyD;YACzD,OAAO,CAAC,GAAG,YAAY,EAAE,GAAG,cAAc,CAAC,CAAC;QAE9C,KAAK,YAAY;YACf,2BAA2B;YAC3B,OAAO,CAAC,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAEhH;YACE,OAAO,CAAC,GAAG,YAAY,EAAE,GAAG,cAAc,CAAC,CAAC;IAChD,CAAC;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":";AACA;;;;;;GAMG;AA6EH,wBAAsB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAwxCpD"}
1
+ {"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":";AACA;;;;;;GAMG;AAiFH,wBAAsB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CA64CpD"}