cbrowser 20.2.2 → 21.0.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 +2 -2
- package/dist/analysis/accessibility-empathy.d.ts +29 -1
- package/dist/analysis/accessibility-empathy.d.ts.map +1 -1
- package/dist/analysis/accessibility-empathy.js +69 -35
- package/dist/analysis/accessibility-empathy.js.map +1 -1
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +11 -7
- package/dist/browser.js.map +1 -1
- package/dist/cif-score.d.ts +56 -5
- package/dist/cif-score.d.ts.map +1 -1
- package/dist/cif-score.js +595 -346
- package/dist/cif-score.js.map +1 -1
- package/dist/cli.js +10 -8
- package/dist/cli.js.map +1 -1
- package/dist/cognitive/default-traits.d.ts +14 -0
- package/dist/cognitive/default-traits.d.ts.map +1 -0
- package/dist/cognitive/default-traits.js +36 -0
- package/dist/cognitive/default-traits.js.map +1 -0
- package/dist/cognitive/emotions.d.ts.map +1 -1
- package/dist/cognitive/emotions.js +104 -174
- package/dist/cognitive/emotions.js.map +1 -1
- package/dist/cognitive/index.d.ts +28 -0
- package/dist/cognitive/index.d.ts.map +1 -1
- package/dist/cognitive/index.js +353 -287
- package/dist/cognitive/index.js.map +1 -1
- package/dist/cognitive/temporal.d.ts +0 -24
- package/dist/cognitive/temporal.d.ts.map +1 -1
- package/dist/cognitive/temporal.js +45 -35
- package/dist/cognitive/temporal.js.map +1 -1
- package/dist/data/ctc-reference-v2-2026-10-24.d.ts +16 -0
- package/dist/data/ctc-reference-v2-2026-10-24.d.ts.map +1 -0
- package/dist/data/ctc-reference-v2-2026-10-24.js +1004 -0
- package/dist/data/ctc-reference-v2-2026-10-24.js.map +1 -0
- package/dist/ideal-profiles-gap.d.ts +1 -0
- package/dist/ideal-profiles-gap.d.ts.map +1 -1
- package/dist/ideal-profiles-gap.js +9 -1
- package/dist/ideal-profiles-gap.js.map +1 -1
- package/dist/ideal-profiles.d.ts +8 -0
- package/dist/ideal-profiles.d.ts.map +1 -1
- package/dist/ideal-profiles.js +28 -24
- package/dist/ideal-profiles.js.map +1 -1
- package/dist/mcp-server-remote.d.ts.map +1 -1
- package/dist/mcp-server-remote.js +7 -8
- package/dist/mcp-server-remote.js.map +1 -1
- package/dist/mcp-tools/account-personas.d.ts.map +1 -1
- package/dist/mcp-tools/account-personas.js +3 -1
- package/dist/mcp-tools/account-personas.js.map +1 -1
- package/dist/mcp-tools/base/answer-provenance.d.ts +28 -0
- package/dist/mcp-tools/base/answer-provenance.d.ts.map +1 -0
- package/dist/mcp-tools/base/answer-provenance.js +32 -0
- package/dist/mcp-tools/base/answer-provenance.js.map +1 -0
- package/dist/mcp-tools/base/audit-tools.d.ts +0 -3
- package/dist/mcp-tools/base/audit-tools.d.ts.map +1 -1
- package/dist/mcp-tools/base/audit-tools.js +152 -84
- package/dist/mcp-tools/base/audit-tools.js.map +1 -1
- package/dist/mcp-tools/base/capture-tools.js +1 -1
- package/dist/mcp-tools/base/capture-tools.js.map +1 -1
- package/dist/mcp-tools/base/chain-values.d.ts +38 -0
- package/dist/mcp-tools/base/chain-values.d.ts.map +1 -0
- package/dist/mcp-tools/base/chain-values.js +85 -0
- package/dist/mcp-tools/base/chain-values.js.map +1 -0
- package/dist/mcp-tools/base/cognitive-tools.d.ts.map +1 -1
- package/dist/mcp-tools/base/cognitive-tools.js +126 -120
- package/dist/mcp-tools/base/cognitive-tools.js.map +1 -1
- package/dist/mcp-tools/base/gif-tools.d.ts.map +1 -1
- package/dist/mcp-tools/base/gif-tools.js +23 -5
- package/dist/mcp-tools/base/gif-tools.js.map +1 -1
- package/dist/mcp-tools/base/persona-comparison-tools.d.ts.map +1 -1
- package/dist/mcp-tools/base/persona-comparison-tools.js +229 -172
- package/dist/mcp-tools/base/persona-comparison-tools.js.map +1 -1
- package/dist/mcp-tools/base/site-familiarity.d.ts +31 -0
- package/dist/mcp-tools/base/site-familiarity.d.ts.map +1 -0
- package/dist/mcp-tools/base/site-familiarity.js +30 -0
- package/dist/mcp-tools/base/site-familiarity.js.map +1 -0
- package/dist/mcp-tools/base/site-knowledge-tools.js +1 -1
- package/dist/mcp-tools/base/site-knowledge-tools.js.map +1 -1
- package/dist/mcp-tools/base/story-narrative.d.ts +50 -0
- package/dist/mcp-tools/base/story-narrative.d.ts.map +1 -0
- package/dist/mcp-tools/base/story-narrative.js +88 -0
- package/dist/mcp-tools/base/story-narrative.js.map +1 -0
- package/dist/mcp-tools/base/values-tools.d.ts.map +1 -1
- package/dist/mcp-tools/base/values-tools.js +19 -5
- package/dist/mcp-tools/base/values-tools.js.map +1 -1
- package/dist/mcp-tools/base/visual-testing-tools.d.ts +5 -5
- package/dist/mcp-tools/base/visual-testing-tools.d.ts.map +1 -1
- package/dist/mcp-tools/base/visual-testing-tools.js +38 -11
- package/dist/mcp-tools/base/visual-testing-tools.js.map +1 -1
- package/dist/mcp-tools/persona-creation-tools.js +6 -6
- package/dist/mcp-tools/persona-creation-tools.js.map +1 -1
- package/dist/mcp-tools/persona-lifecycle-tools.d.ts.map +1 -1
- package/dist/mcp-tools/persona-lifecycle-tools.js +5 -1
- package/dist/mcp-tools/persona-lifecycle-tools.js.map +1 -1
- package/dist/mcp-tools/tier-gate.js +1 -1
- package/dist/mcp-tools/tool-result-saver.d.ts +7 -0
- package/dist/mcp-tools/tool-result-saver.d.ts.map +1 -1
- package/dist/mcp-tools/tool-result-saver.js +11 -0
- package/dist/mcp-tools/tool-result-saver.js.map +1 -1
- package/dist/mcp-tools/trait-provenance.d.ts +109 -0
- package/dist/mcp-tools/trait-provenance.d.ts.map +1 -0
- package/dist/mcp-tools/trait-provenance.js +187 -0
- package/dist/mcp-tools/trait-provenance.js.map +1 -0
- package/dist/mcp-tools/ui-resources.d.ts +6 -7
- package/dist/mcp-tools/ui-resources.d.ts.map +1 -1
- package/dist/mcp-tools/ui-resources.js +162 -12
- package/dist/mcp-tools/ui-resources.js.map +1 -1
- package/dist/mcp-tools/widget-kit.d.ts +129 -3
- package/dist/mcp-tools/widget-kit.d.ts.map +1 -1
- package/dist/mcp-tools/widget-kit.js +507 -28
- package/dist/mcp-tools/widget-kit.js.map +1 -1
- package/dist/performance/metrics.d.ts.map +1 -1
- package/dist/performance/metrics.js +4 -1
- package/dist/performance/metrics.js.map +1 -1
- package/dist/persona-questionnaire.js +1 -1
- package/dist/persona-questionnaire.js.map +1 -1
- package/dist/personas.d.ts.map +1 -1
- package/dist/personas.js +133 -82
- package/dist/personas.js.map +1 -1
- package/dist/recording/engine.d.ts.map +1 -1
- package/dist/recording/engine.js +5 -2
- package/dist/recording/engine.js.map +1 -1
- package/dist/recording/saliency-overlay.d.ts +8 -3
- package/dist/recording/saliency-overlay.d.ts.map +1 -1
- package/dist/recording/saliency-overlay.js +14 -5
- package/dist/recording/saliency-overlay.js.map +1 -1
- package/dist/recording/types.js +1 -1
- package/dist/testing/nl-test-suite.d.ts.map +1 -1
- package/dist/testing/nl-test-suite.js +2 -1
- package/dist/testing/nl-test-suite.js.map +1 -1
- package/dist/trait-reference.d.ts +19 -2
- package/dist/trait-reference.d.ts.map +1 -1
- package/dist/trait-reference.js +19 -2
- package/dist/trait-reference.js.map +1 -1
- package/dist/types.d.ts +32 -21
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +62 -52
- package/dist/types.js.map +1 -1
- package/dist/values/persona-completeness.js +1 -1
- package/dist/values/persona-completeness.js.map +1 -1
- package/dist/visual/ab-comparison.d.ts.map +1 -1
- package/dist/visual/ab-comparison.js +4 -1
- package/dist/visual/ab-comparison.js.map +1 -1
- package/dist/visual/attention-quality.d.ts +1 -1
- package/dist/visual/attention-quality.js +1 -1
- package/dist/visual/attention-transport.d.ts +74 -10
- package/dist/visual/attention-transport.d.ts.map +1 -1
- package/dist/visual/attention-transport.js +353 -193
- package/dist/visual/attention-transport.js.map +1 -1
- package/dist/visual/cognitive-models.d.ts +77 -55
- package/dist/visual/cognitive-models.d.ts.map +1 -1
- package/dist/visual/cognitive-models.js +231 -104
- package/dist/visual/cognitive-models.js.map +1 -1
- package/dist/visual/cognitive-transport-chain.d.ts +328 -30
- package/dist/visual/cognitive-transport-chain.d.ts.map +1 -1
- package/dist/visual/cognitive-transport-chain.js +576 -353
- package/dist/visual/cognitive-transport-chain.js.map +1 -1
- package/dist/visual/cognitive-transport.d.ts +446 -13
- package/dist/visual/cognitive-transport.d.ts.map +1 -1
- package/dist/visual/cognitive-transport.js +1085 -245
- package/dist/visual/cognitive-transport.js.map +1 -1
- package/dist/visual/cross-browser.d.ts.map +1 -1
- package/dist/visual/cross-browser.js +8 -6
- package/dist/visual/cross-browser.js.map +1 -1
- package/dist/visual/ctc-bands.d.ts +91 -0
- package/dist/visual/ctc-bands.d.ts.map +1 -0
- package/dist/visual/ctc-bands.js +117 -0
- package/dist/visual/ctc-bands.js.map +1 -0
- package/dist/visual/ctc-reference.d.ts +287 -0
- package/dist/visual/ctc-reference.d.ts.map +1 -0
- package/dist/visual/ctc-reference.js +376 -0
- package/dist/visual/ctc-reference.js.map +1 -0
- package/dist/visual/demand-laws.d.ts +145 -0
- package/dist/visual/demand-laws.d.ts.map +1 -0
- package/dist/visual/demand-laws.js +220 -0
- package/dist/visual/demand-laws.js.map +1 -0
- package/dist/visual/distance-metrics.d.ts +23 -1
- package/dist/visual/distance-metrics.d.ts.map +1 -1
- package/dist/visual/distance-metrics.js +49 -18
- package/dist/visual/distance-metrics.js.map +1 -1
- package/dist/visual/dro-bound.d.ts +220 -0
- package/dist/visual/dro-bound.d.ts.map +1 -0
- package/dist/visual/dro-bound.js +341 -0
- package/dist/visual/dro-bound.js.map +1 -0
- package/dist/visual/exact-w1.d.ts +60 -0
- package/dist/visual/exact-w1.d.ts.map +1 -0
- package/dist/visual/exact-w1.js +247 -0
- package/dist/visual/exact-w1.js.map +1 -0
- package/dist/visual/human-input.d.ts.map +1 -1
- package/dist/visual/human-input.js +45 -41
- package/dist/visual/human-input.js.map +1 -1
- package/dist/visual/index.d.ts +2 -0
- package/dist/visual/index.d.ts.map +1 -1
- package/dist/visual/index.js +2 -0
- package/dist/visual/index.js.map +1 -1
- package/dist/visual/law-times-report.d.ts +49 -0
- package/dist/visual/law-times-report.d.ts.map +1 -0
- package/dist/visual/law-times-report.js +38 -0
- package/dist/visual/law-times-report.js.map +1 -0
- package/dist/visual/model-provenance.d.ts +151 -0
- package/dist/visual/model-provenance.d.ts.map +1 -0
- package/dist/visual/model-provenance.js +334 -0
- package/dist/visual/model-provenance.js.map +1 -0
- package/dist/visual/normal-cdf.d.ts +14 -0
- package/dist/visual/normal-cdf.d.ts.map +1 -0
- package/dist/visual/normal-cdf.js +26 -0
- package/dist/visual/normal-cdf.js.map +1 -0
- package/dist/visual/perceptual-transport.d.ts +28 -4
- package/dist/visual/perceptual-transport.d.ts.map +1 -1
- package/dist/visual/perceptual-transport.js +66 -32
- package/dist/visual/perceptual-transport.js.map +1 -1
- package/dist/visual/provenance/attention.d.ts +55 -0
- package/dist/visual/provenance/attention.d.ts.map +1 -0
- package/dist/visual/provenance/attention.js +188 -0
- package/dist/visual/provenance/attention.js.map +1 -0
- package/dist/visual/provenance/chain.d.ts +41 -0
- package/dist/visual/provenance/chain.d.ts.map +1 -0
- package/dist/visual/provenance/chain.js +66 -0
- package/dist/visual/provenance/chain.js.map +1 -0
- package/dist/visual/provenance/cif.d.ts +42 -0
- package/dist/visual/provenance/cif.d.ts.map +1 -0
- package/dist/visual/provenance/cif.js +116 -0
- package/dist/visual/provenance/cif.js.map +1 -0
- package/dist/visual/provenance/ctc-reference.d.ts +36 -0
- package/dist/visual/provenance/ctc-reference.d.ts.map +1 -0
- package/dist/visual/provenance/ctc-reference.js +96 -0
- package/dist/visual/provenance/ctc-reference.js.map +1 -0
- package/dist/visual/provenance/distance.d.ts +10 -0
- package/dist/visual/provenance/distance.d.ts.map +1 -0
- package/dist/visual/provenance/distance.js +72 -0
- package/dist/visual/provenance/distance.js.map +1 -0
- package/dist/visual/provenance/dro.d.ts +10 -0
- package/dist/visual/provenance/dro.d.ts.map +1 -0
- package/dist/visual/provenance/dro.js +2 -0
- package/dist/visual/provenance/dro.js.map +1 -0
- package/dist/visual/provenance/emotion.d.ts +26 -0
- package/dist/visual/provenance/emotion.d.ts.map +1 -0
- package/dist/visual/provenance/emotion.js +99 -0
- package/dist/visual/provenance/emotion.js.map +1 -0
- package/dist/visual/provenance/human-input.d.ts +19 -0
- package/dist/visual/provenance/human-input.d.ts.map +1 -0
- package/dist/visual/provenance/human-input.js +84 -0
- package/dist/visual/provenance/human-input.js.map +1 -0
- package/dist/visual/provenance/journey-group.d.ts +15 -0
- package/dist/visual/provenance/journey-group.d.ts.map +1 -0
- package/dist/visual/provenance/journey-group.js +15 -0
- package/dist/visual/provenance/journey-group.js.map +1 -0
- package/dist/visual/provenance/journey-mcp.d.ts +24 -0
- package/dist/visual/provenance/journey-mcp.d.ts.map +1 -0
- package/dist/visual/provenance/journey-mcp.js +54 -0
- package/dist/visual/provenance/journey-mcp.js.map +1 -0
- package/dist/visual/provenance/journey.d.ts +34 -0
- package/dist/visual/provenance/journey.d.ts.map +1 -0
- package/dist/visual/provenance/journey.js +184 -0
- package/dist/visual/provenance/journey.js.map +1 -0
- package/dist/visual/provenance/laws.d.ts +38 -0
- package/dist/visual/provenance/laws.d.ts.map +1 -0
- package/dist/visual/provenance/laws.js +40 -0
- package/dist/visual/provenance/laws.js.map +1 -0
- package/dist/visual/provenance/page-metrics.d.ts +42 -0
- package/dist/visual/provenance/page-metrics.d.ts.map +1 -0
- package/dist/visual/provenance/page-metrics.js +79 -0
- package/dist/visual/provenance/page-metrics.js.map +1 -0
- package/dist/visual/provenance/perceptual.d.ts +63 -0
- package/dist/visual/provenance/perceptual.d.ts.map +1 -0
- package/dist/visual/provenance/perceptual.js +115 -0
- package/dist/visual/provenance/perceptual.js.map +1 -0
- package/dist/visual/provenance/persona-rates.d.ts +84 -0
- package/dist/visual/provenance/persona-rates.d.ts.map +1 -0
- package/dist/visual/provenance/persona-rates.js +112 -0
- package/dist/visual/provenance/persona-rates.js.map +1 -0
- package/dist/visual/provenance/personas.d.ts +122 -0
- package/dist/visual/provenance/personas.d.ts.map +1 -0
- package/dist/visual/provenance/personas.js +298 -0
- package/dist/visual/provenance/personas.js.map +1 -0
- package/dist/visual/provenance/profiles.d.ts +39 -0
- package/dist/visual/provenance/profiles.d.ts.map +1 -0
- package/dist/visual/provenance/profiles.js +37 -0
- package/dist/visual/provenance/profiles.js.map +1 -0
- package/dist/visual/provenance/temporal.d.ts +21 -0
- package/dist/visual/provenance/temporal.d.ts.map +1 -0
- package/dist/visual/provenance/temporal.js +56 -0
- package/dist/visual/provenance/temporal.js.map +1 -0
- package/dist/visual/provenance/visual-distance.d.ts +22 -0
- package/dist/visual/provenance/visual-distance.d.ts.map +1 -0
- package/dist/visual/provenance/visual-distance.js +30 -0
- package/dist/visual/provenance/visual-distance.js.map +1 -0
- package/dist/visual/regression.d.ts.map +1 -1
- package/dist/visual/regression.js +14 -9
- package/dist/visual/regression.js.map +1 -1
- package/dist/visual/responsive.d.ts.map +1 -1
- package/dist/visual/responsive.js +4 -1
- package/dist/visual/responsive.js.map +1 -1
- package/dist/visual/scope-prose.js +2 -2
- package/dist/visual/scope-prose.js.map +1 -1
- package/dist/visual/seeded-random.d.ts +16 -0
- package/dist/visual/seeded-random.d.ts.map +1 -0
- package/dist/visual/seeded-random.js +25 -0
- package/dist/visual/seeded-random.js.map +1 -0
- package/dist/visual/stored-accessibility-traits.d.ts +27 -0
- package/dist/visual/stored-accessibility-traits.d.ts.map +1 -0
- package/dist/visual/stored-accessibility-traits.js +35 -0
- package/dist/visual/stored-accessibility-traits.js.map +1 -0
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Cognitive Optimal Transport — Sequential Transport Chain
|
|
3
3
|
*
|
|
4
4
|
* Implements the CHI 2027 paper's core contribution:
|
|
5
|
-
* -
|
|
5
|
+
* - 29-dimensional demand distribution computed from page features
|
|
6
6
|
* - Sequential transport chain where each layer depletes capacity
|
|
7
7
|
* - Asymmetric deficit-surplus cost
|
|
8
8
|
* - Layer interaction terms
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
* @see Section 3.4 of "Cognitive Optimal Transport: A Unified Framework"
|
|
15
15
|
* @since v18.39.0
|
|
16
16
|
*/
|
|
17
|
-
import { type OTCognitiveProfile } from './cognitive-transport.js';
|
|
17
|
+
import { type OTCognitiveProfile, type MetricScope } from './cognitive-transport.js';
|
|
18
|
+
import { type PercentileCurve, type PercentileInterval } from './ctc-reference.js';
|
|
18
19
|
/** Page metrics extracted from a live page (matches extractPageMetrics return) */
|
|
19
20
|
export interface PageMetrics {
|
|
20
21
|
informationDensity: number;
|
|
@@ -30,16 +31,77 @@ export interface PageMetrics {
|
|
|
30
31
|
longWordRatio?: number;
|
|
31
32
|
technicalDensity?: number;
|
|
32
33
|
scriptFamily?: 'alphabetic' | 'cjk' | 'abjad';
|
|
34
|
+
/** What the metrics were measured over; extractPageMetrics always sets it. */
|
|
35
|
+
scope?: MetricScope;
|
|
36
|
+
/**
|
|
37
|
+
* Stage B: seconds of work for the reference user from published laws
|
|
38
|
+
* (deriveMetrics, demand-laws.ts). The motor, decision, procedure and
|
|
39
|
+
* reading demands are these against one time budget, d = T / (T + tau)
|
|
40
|
+
* (law.timeBudget). Required: computeDemandDistribution throws without them,
|
|
41
|
+
* so no demand falls back to a hand-set curve.
|
|
42
|
+
*/
|
|
43
|
+
pointingSeconds: number;
|
|
44
|
+
choosingSeconds: number;
|
|
45
|
+
readingSeconds: number;
|
|
46
|
+
procedureSeconds: number;
|
|
47
|
+
/**
|
|
48
|
+
* Stage C: the same choices by Hick-Hyman, the expert limit of the menu
|
|
49
|
+
* model whose novice limit is choosingSeconds (Cockburn, Gutwin & Greenberg
|
|
50
|
+
* 2007). cognitiveLoad's demand reads (1 - e) choosingSeconds +
|
|
51
|
+
* e choosingSecondsExpert, e the run's siteFamiliarity (DemandOptions).
|
|
52
|
+
* Required like the four above.
|
|
53
|
+
*/
|
|
54
|
+
choosingSecondsExpert: number;
|
|
55
|
+
}
|
|
56
|
+
/** What a run supplies to the demand besides the page: the visit, the same for every persona scored in it. */
|
|
57
|
+
export interface DemandOptions {
|
|
58
|
+
/**
|
|
59
|
+
* Cockburn et al.'s (2007) expertise e with the page's choices, from 0 (a
|
|
60
|
+
* first visit, the default and the reference curve's) to 1 (a daily user
|
|
61
|
+
* who knows where everything is): Eq. 4, T = (1 - e) T_novice + e T_expert,
|
|
62
|
+
* applied to the choosing time the cognitiveLoad abilities are asked (the
|
|
63
|
+
* decision dispositions keep the first-visit time; see
|
|
64
|
+
* computeDemandDistribution). A definition: the parameter IS their e, with
|
|
65
|
+
* the layout's learnability L folded in by whoever supplies it. Refused
|
|
66
|
+
* outside [0, 1], never clamped.
|
|
67
|
+
*/
|
|
68
|
+
siteFamiliarity?: number;
|
|
33
69
|
}
|
|
34
70
|
export interface DemandDistribution {
|
|
35
|
-
/**
|
|
71
|
+
/** 29-dimensional demand vector (0-1 per trait), one slot per DEMAND_DIMENSIONS entry */
|
|
36
72
|
demands: Record<string, number>;
|
|
37
|
-
/**
|
|
38
|
-
|
|
73
|
+
/**
|
|
74
|
+
* The scope the page metrics were measured at, carried from PageMetrics so
|
|
75
|
+
* that totalCTC is ranked against reference pages measured the same way. A
|
|
76
|
+
* full-page measurement of a long page asks far more than its first screen,
|
|
77
|
+
* and ranking it among first screens would call every long page hard.
|
|
78
|
+
* Absent on a demand built from raw numbers; such a demand is ranked against
|
|
79
|
+
* the viewport reference, extractPageMetrics' default scope.
|
|
80
|
+
*/
|
|
81
|
+
scope?: MetricScope;
|
|
39
82
|
}
|
|
40
83
|
export interface LayerResult {
|
|
41
84
|
name: string;
|
|
42
85
|
transportCost: number;
|
|
86
|
+
/**
|
|
87
|
+
* Capacity this layer actually removed from the account, summed over all
|
|
88
|
+
* DEMAND_DIMENSIONS: its own dimensions (direct drawdown) and every other one
|
|
89
|
+
* (indirect, cross-layer fatigue). Measured from the balances before and
|
|
90
|
+
* after the layer, so everything that limits the draw is inside it: 0 when
|
|
91
|
+
* the content gate kept the layer from depleting, the drawdown cap
|
|
92
|
+
* (chain.maxDrawdownFraction) on a heavy layer, and the capacity floor
|
|
93
|
+
* (chain.capacityEpsilon), which can stop a draw but is never counted as one.
|
|
94
|
+
* Units are capacity summed over dimensions, so the most one layer can
|
|
95
|
+
* remove is the number of dimensions.
|
|
96
|
+
*
|
|
97
|
+
* Why this definition. The name promises what the layer took out of the
|
|
98
|
+
* budget. The indirect share is the part every LATER layer on the page
|
|
99
|
+
* feels (a layer's own dimensions are not read again on the same page), so
|
|
100
|
+
* a figure without it would report only the part that matters least.
|
|
101
|
+
* Through 21.0 this was depletionRate x cost: the draw the layer would have
|
|
102
|
+
* made with no gate, no cap and no floor, reported even when nothing was
|
|
103
|
+
* drawn.
|
|
104
|
+
*/
|
|
43
105
|
capacityConsumed: number;
|
|
44
106
|
residualCapacity: Record<string, number>;
|
|
45
107
|
/**
|
|
@@ -50,17 +112,45 @@ export interface LayerResult {
|
|
|
50
112
|
headroom: number;
|
|
51
113
|
}
|
|
52
114
|
export interface SequentialTransportResult {
|
|
53
|
-
/**
|
|
115
|
+
/**
|
|
116
|
+
* Total Cognitive Transport Cost as a PERCENTILE in [0, 1]: where `rawCTC`
|
|
117
|
+
* falls among the raw costs of the reference pages (src/data/ctc-reference-*.ts,
|
|
118
|
+
* measured at this demand's scope) for every built-in persona, pooled, under
|
|
119
|
+
* the same asymmetric and interactions options. Linear between the order
|
|
120
|
+
* statistics (ctc-reference.ts). 0.5 is the pooled median; 1 means at least
|
|
121
|
+
* as costly as the costliest (page, persona) pair in the reference, and 0 no
|
|
122
|
+
* costlier than the cheapest. Relative to real pages, not a probability and
|
|
123
|
+
* not a validated difficulty: no human data has tested it.
|
|
124
|
+
*/
|
|
54
125
|
totalCTC: number;
|
|
126
|
+
/**
|
|
127
|
+
* 95% interval for totalCTC, [low, high]: where this rawCTC's percentile
|
|
128
|
+
* falls across bootstrap resamples of the reference PAGES
|
|
129
|
+
* (ctc-reference.ts, bootstrapPercentileInterval). It measures how firmly
|
|
130
|
+
* the reference fixes the scale, the sampling error of ranking against a
|
|
131
|
+
* few hundred real pages; it says nothing about whether rawCTC is right.
|
|
132
|
+
* [0, 0] below the reference and [1, 1] above it.
|
|
133
|
+
*/
|
|
134
|
+
totalCTCInterval: [number, number];
|
|
135
|
+
/** Which reference totalCTC was ranked against: the demand's scope, or viewport when it has none. */
|
|
136
|
+
referenceScope: MetricScope;
|
|
55
137
|
/** Per-layer results in sequential order */
|
|
56
138
|
layers: LayerResult[];
|
|
57
139
|
/** Pairwise interaction terms */
|
|
58
140
|
interactions: Record<string, number>;
|
|
59
141
|
/** Additive-only CTC for comparison */
|
|
60
142
|
additiveCTC: number;
|
|
61
|
-
/**
|
|
143
|
+
/**
|
|
144
|
+
* The un-normalised total, in layer-cost units: the sum of layer costs and
|
|
145
|
+
* interaction terms. `totalCTC` is its percentile, so any ratio against
|
|
146
|
+
* additiveCTC, and any bound on the chain itself (dro-bound.ts), uses this.
|
|
147
|
+
*/
|
|
62
148
|
rawCTC: number;
|
|
63
|
-
/**
|
|
149
|
+
/**
|
|
150
|
+
* Asymmetric deficit-surplus breakdown. deficitCost also holds the exposure
|
|
151
|
+
* cost of EXPOSURE_DIMENSIONS (a cost the page imposes), and abandonment
|
|
152
|
+
* reads it; surplusCost is billed surplus only.
|
|
153
|
+
*/
|
|
64
154
|
deficitCost: number;
|
|
65
155
|
surplusCost: number;
|
|
66
156
|
/** Per-trait transport cost */
|
|
@@ -78,12 +168,20 @@ export interface SequentialTransportResult {
|
|
|
78
168
|
remainingCapacity: Record<string, number>;
|
|
79
169
|
}
|
|
80
170
|
/**
|
|
81
|
-
* The
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
171
|
+
* The 29 demand dimensions used by the sequential transport chain, covering
|
|
172
|
+
* the core capacities plus decision biases, learning transfer, emotional
|
|
173
|
+
* regulation and the bridged reading/motor/attention capacities.
|
|
174
|
+
*
|
|
175
|
+
* NOT the same space as COGNITIVE_TRAITS (29). Four dimensions exist only here
|
|
176
|
+
* (attentionPattern, motorPrecision, processingSpeed, textProcessing: no persona
|
|
177
|
+
* in the tool path carries them, so they read the missing-trait fallback, and
|
|
178
|
+
* none is in a layer). Four traits exist only there (attributionStyle,
|
|
179
|
+
* timeHorizon, authoritySensitivity: no demand term; siteFamiliarity: a visit
|
|
180
|
+
* state the demand reads, DemandOptions, since 21.0). Both differences are
|
|
181
|
+
* pinned in tests/transport-dimension-alignment.test.ts, so a new one fails a
|
|
182
|
+
* test; nothing asserts the two sets are equal.
|
|
85
183
|
*/
|
|
86
|
-
export declare const DEMAND_DIMENSIONS: readonly ["patience", "riskTolerance", "comprehension", "persistence", "workingMemory", "readingTendency", "resilience", "selfEfficacy", "emotionalContagion", "satisficing", "anchoringBias", "fearOfMissingOut", "socialProofSensitivity", "changeBlindness", "attentionPattern", "motorPrecision", "proceduralFluency", "informationForaging", "metacognitivePlanning", "transferLearning", "interruptRecovery", "trustCalibration", "mentalModelFlexibility", "curiosity", "processingSpeed", "textProcessing", "
|
|
184
|
+
export declare const DEMAND_DIMENSIONS: readonly ["patience", "riskTolerance", "comprehension", "persistence", "workingMemory", "readingTendency", "resilience", "selfEfficacy", "emotionalContagion", "satisficing", "anchoringBias", "fearOfMissingOut", "socialProofSensitivity", "changeBlindness", "attentionPattern", "motorPrecision", "proceduralFluency", "informationForaging", "metacognitivePlanning", "transferLearning", "interruptRecovery", "trustCalibration", "mentalModelFlexibility", "curiosity", "processingSpeed", "textProcessing", "readingCapacity", "motorCapacity", "sustainedAttention"];
|
|
87
185
|
/**
|
|
88
186
|
* Layer definitions for the sequential transport chain.
|
|
89
187
|
* Order reflects temporal processing: perception -> cognition -> decision -> action -> affect -> comprehension.
|
|
@@ -100,6 +198,91 @@ export declare const LAYER_DEFINITIONS: Array<{
|
|
|
100
198
|
name: string;
|
|
101
199
|
traits: string[];
|
|
102
200
|
}>;
|
|
201
|
+
/**
|
|
202
|
+
* Pairwise interaction definitions: five cross-layer couplings, each a
|
|
203
|
+
* hand-set hypothesis registered in provenance/chain.ts (no empirical
|
|
204
|
+
* calibration exists for them; an earlier comment claimed one). The weight
|
|
205
|
+
* is read through param() so a run records that it depended on it.
|
|
206
|
+
*/
|
|
207
|
+
export declare const INTERACTION_PAIRS: Array<{
|
|
208
|
+
a: string;
|
|
209
|
+
b: string;
|
|
210
|
+
weight: string;
|
|
211
|
+
}>;
|
|
212
|
+
/**
|
|
213
|
+
* Dimensions where having MORE than the page asks for costs nothing at all.
|
|
214
|
+
*
|
|
215
|
+
* THE RULE, decided 2026-08-03, and it is derivable rather than chosen: surplus
|
|
216
|
+
* is FREE where the dimension's own `highEnd` names an ABILITY, and BILLED
|
|
217
|
+
* where it names a TENDENCY, a BIAS, or a SUSCEPTIBILITY. Read the trait
|
|
218
|
+
* reference and the classification falls out; a new dimension is classified by
|
|
219
|
+
* its own definition, not by anyone's taste.
|
|
220
|
+
*
|
|
221
|
+
* Why the split is real. Billing surplus is defensible for a disposition: a
|
|
222
|
+
* maximiser on a trivial page genuinely over-deliberates, and a careful reader
|
|
223
|
+
* genuinely reads a page that did not need reading. That is effort spent. It is
|
|
224
|
+
* NOT defensible for an ability -- having more working memory, or recognising
|
|
225
|
+
* conventions faster, than a page requires cannot make that page harder. The
|
|
226
|
+
* capacity/disposition axis is the same one that moved readingTendency to the
|
|
227
|
+
* demand side and kept comprehension out of the readability layer.
|
|
228
|
+
*
|
|
229
|
+
* What it was costing. Measured on a mid-density page before this change,
|
|
230
|
+
* SEVENTY PERCENT of `power-user`'s total cost was surplus, and 60% of
|
|
231
|
+
* `cognitive-adhd`'s. A uniform-capacity sweep produced a U:
|
|
232
|
+
*
|
|
233
|
+
* capacity 0.2 0.4 0.6 0.8 1.0
|
|
234
|
+
* cost 0.549 0.081 0.076 0.179 0.516
|
|
235
|
+
*
|
|
236
|
+
* A maximally capable persona scored almost exactly as badly as a maximally
|
|
237
|
+
* impaired one, for opposite reasons, and the output could not tell you which.
|
|
238
|
+
* That is the same defect as every other one this campaign found: a number that
|
|
239
|
+
* does not mean what its name says.
|
|
240
|
+
*
|
|
241
|
+
* Three dimensions stay billed BECAUSE THEIR SCALE IS INVERTED -- trustCalibration,
|
|
242
|
+
* curiosity and attentionPattern name a deficit at their high end ("accepts
|
|
243
|
+
* claims at face value", "easily distracted"), and none is in a layer, so the
|
|
244
|
+
* billing moves no number. changeBlindness was the fourth until 2026-10-24
|
|
245
|
+
* (below).
|
|
246
|
+
*
|
|
247
|
+
* `selfEfficacy` is the weakest call in the free set: over-confidence is a real
|
|
248
|
+
* hazard, but its cost surfaces through riskTolerance and trustCalibration
|
|
249
|
+
* rather than as effort spent, so it is treated as the ability its high end
|
|
250
|
+
* describes.
|
|
251
|
+
*
|
|
252
|
+
* A STIMULUS NEVER MAKES A PAGE CHEAPER (2026-10-24, option f of
|
|
253
|
+
* research/surplus-billing-design.md). A billed surplus costs
|
|
254
|
+
* weightSurplus (c - d)^2, which FALLS as the page's demand d rises toward the
|
|
255
|
+
* persona's value c. Measured on the 514 reference pages, one carousel on a
|
|
256
|
+
* static page lowered the typical user's viewport totalCTC by 0.085 and was
|
|
257
|
+
* cheaper on 92% of them, because emotionalContagion's only demand is motion
|
|
258
|
+
* (0 on a calm page) and its calm-page surplus was the largest bill on the
|
|
259
|
+
* page. So:
|
|
260
|
+
* - emotionalContagion is priced by EXPOSURE (EXPOSURE_DIMENSIONS):
|
|
261
|
+
* weightSurplus x c x d. Contagion is caught from an expression (Hatfield,
|
|
262
|
+
* Bensman, Thornton & Rapson 2014), so with no stimulus nothing is caught
|
|
263
|
+
* and with no susceptibility nothing is caught either. The product form,
|
|
264
|
+
* the weight and animation as the stimulus are hypotheses.
|
|
265
|
+
* - changeBlindness is surplus-free: missing more changes than a page makes
|
|
266
|
+
* costs nothing on a page that makes none (Simons & Levin 1997: change
|
|
267
|
+
* blindness is "the inability to detect changes"). Its deficit side still
|
|
268
|
+
* prices a good noticer on a complex page, a named limit.
|
|
269
|
+
* - patience is surplus-free: its value reads as tolerated reading time
|
|
270
|
+
* (Stage C), and tolerance left unused is not time spent; the page's time
|
|
271
|
+
* is priced by the reading and decision layers.
|
|
272
|
+
* The decision-layer susceptibilities (fearOfMissingOut,
|
|
273
|
+
* socialProofSensitivity, anchoringBias, riskTolerance) are DEFERRED, a named
|
|
274
|
+
* limit: they still get cheaper as choosing time grows, because the cue each
|
|
275
|
+
* responds to (urgency, reviews, a first option, uncertain controls) is not
|
|
276
|
+
* measured and a share of choosing time stands in for it.
|
|
277
|
+
*/
|
|
278
|
+
export declare const SURPLUS_FREE_DIMENSIONS: Set<string>;
|
|
279
|
+
/**
|
|
280
|
+
* Dimensions priced by exposure rather than by a gap: weightSurplus x c x d,
|
|
281
|
+
* the persona's susceptibility times the stimulus, in asymmetric mode (the
|
|
282
|
+
* symmetric ablation keeps the gap). 0 when the page presents nothing, never
|
|
283
|
+
* lower for more stimulus or more susceptibility. See the note above.
|
|
284
|
+
*/
|
|
285
|
+
export declare const EXPOSURE_DIMENSIONS: Set<string>;
|
|
103
286
|
/**
|
|
104
287
|
* Hill exponent on the abandonment curve. UNCALIBRATED.
|
|
105
288
|
*
|
|
@@ -119,7 +302,7 @@ export declare const LAYER_DEFINITIONS: Array<{
|
|
|
119
302
|
* or a dose-response fit on real session data. Until then it is a shape someone
|
|
120
303
|
* chose, not a shape anyone measured. (2026-08-03)
|
|
121
304
|
*/
|
|
122
|
-
export declare const ABANDONMENT_HILL_EXPONENT
|
|
305
|
+
export declare const ABANDONMENT_HILL_EXPONENT: number;
|
|
123
306
|
/**
|
|
124
307
|
* Relative weighting between the two motor layers. BOTH DEFAULT TO 1.0 AND ARE
|
|
125
308
|
* UNCALIBRATED.
|
|
@@ -141,27 +324,76 @@ export declare const MOTOR_LAYER_WEIGHTS: {
|
|
|
141
324
|
readonly motorProcedure: 1;
|
|
142
325
|
};
|
|
143
326
|
/**
|
|
144
|
-
* Compute the
|
|
327
|
+
* Compute the 29-dimensional demand distribution from page metrics.
|
|
145
328
|
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
329
|
+
* Since Stage B and C the demand is law times against one time budget, d =
|
|
330
|
+
* T / (T + tau) (demand-laws.ts, law.timeBudget): pointing (Fitts), choosing
|
|
331
|
+
* (Cockburn et al.'s menu model), reading (Brysbaert), procedure (KLM). What
|
|
332
|
+
* remains hand-set are the shares of those demands some traits take and the
|
|
333
|
+
* motion and clutter curves, every one a hypothesis in provenance/chain.ts.
|
|
334
|
+
* The text features (informationDensity, textDensity, word and sentence
|
|
335
|
+
* length, lexical diversity, long and technical words) and navigationDepth
|
|
336
|
+
* are reported on PageMetrics and drive no demand: reading time prices text,
|
|
337
|
+
* and depth is a property of the path, not the page (research/stage-c-design.md).
|
|
149
338
|
*
|
|
150
339
|
* Traits not affected by any page feature receive demand = 0.0 (no demand).
|
|
151
340
|
*
|
|
152
341
|
* @param pageMetrics - Extracted page analysis metrics
|
|
153
|
-
* @
|
|
342
|
+
* @param options - The visit: siteFamiliarity, Cockburn et al.'s expertise e
|
|
343
|
+
* on the choosing time, the same for every persona scored in a run
|
|
344
|
+
* @returns DemandDistribution with per-trait demand
|
|
345
|
+
*/
|
|
346
|
+
export declare function computeDemandDistribution(pageMetrics: PageMetrics, options?: DemandOptions): DemandDistribution;
|
|
347
|
+
/**
|
|
348
|
+
* Resolve a trait value from the persona's trait record.
|
|
349
|
+
* Falls back to chain.missingTraitCapacity (0.5, a hypothesis) for missing traits.
|
|
350
|
+
*/
|
|
351
|
+
/**
|
|
352
|
+
* A persona's capacity vector over DEMAND_DIMENSIONS, exactly as the chain reads
|
|
353
|
+
* it at the start of a page: each trait through traitValue (clamped to [0, 1],
|
|
354
|
+
* missing or non-numeric traits at chain.missingTraitCapacity).
|
|
355
|
+
* The Wasserstein-DRO bound (dro-bound.ts) works on these vectors.
|
|
154
356
|
*/
|
|
155
|
-
export declare function
|
|
357
|
+
export declare function capacityVector(traits: Record<string, number | string>): Record<string, number>;
|
|
358
|
+
/**
|
|
359
|
+
* Schwartz Value → Trait Demand Modulation Coefficients
|
|
360
|
+
*
|
|
361
|
+
* Each entry maps a Schwartz value to the cognitive traits it amplifies or
|
|
362
|
+
* dampens in the demand distribution. The coefficient represents how much
|
|
363
|
+
* a high value score (1.0) amplifies (+) or dampens (-) the demand on that trait.
|
|
364
|
+
* Every coefficient is a hand-set hypothesis registered in provenance/chain.ts
|
|
365
|
+
* (the citations below motivate a direction, not a number) and is read
|
|
366
|
+
* through param() by id.
|
|
367
|
+
*
|
|
368
|
+
* Theoretical basis:
|
|
369
|
+
* - Security-driven personas demand MORE trustCalibration (Fogg 2003)
|
|
370
|
+
* - Achievement-driven personas demand LESS satisficing (Simon 1956 — they optimize)
|
|
371
|
+
* - Conformity-driven personas amplify socialProof demands (Cialdini 2001)
|
|
372
|
+
* - Stimulation-driven personas amplify curiosity but deplete patience faster
|
|
373
|
+
*
|
|
374
|
+
* @see Schwartz (1992) "Universals in the content and structure of values"
|
|
375
|
+
* @see Section 4.2 of "Cognitive Optimal Transport: A Unified Framework"
|
|
376
|
+
* @since v18.54.0
|
|
377
|
+
*
|
|
378
|
+
* Exported so cognitive_effort's useValues description can be checked against
|
|
379
|
+
* it; this table is the only place values reach a transport score.
|
|
380
|
+
*/
|
|
381
|
+
export declare const VALUE_DEMAND_MODULATION: Array<{
|
|
382
|
+
value: string;
|
|
383
|
+
trait: string;
|
|
384
|
+
coefficient: string;
|
|
385
|
+
layer: string;
|
|
386
|
+
}>;
|
|
156
387
|
/**
|
|
157
388
|
* Compute the Sequential Cognitive Transport Cost (CTC).
|
|
158
389
|
*
|
|
159
390
|
* Unlike additive cognitive load models, the sequential chain depletes
|
|
160
391
|
* capacity at each processing layer. A user who spends cognitive resources
|
|
161
|
-
* on
|
|
392
|
+
* on visual clutter and motion has LESS available for subsequent decision-making.
|
|
162
393
|
*
|
|
163
|
-
* The algorithm processes layers in
|
|
164
|
-
*
|
|
394
|
+
* The algorithm processes the eight layers of LAYER_DEFINITIONS in order:
|
|
395
|
+
* visualComplexity -> cognitiveLoad -> decision -> motor -> motorProcedure
|
|
396
|
+
* -> frustration -> readability -> readingAttention
|
|
165
397
|
*
|
|
166
398
|
* Each layer:
|
|
167
399
|
* 1. Applies Schwartz value modulation to demand (v18.54.0)
|
|
@@ -170,11 +402,13 @@ export declare function computeDemandDistribution(pageMetrics: PageMetrics): Dem
|
|
|
170
402
|
* 4. Records the remaining capacity for downstream layers
|
|
171
403
|
*
|
|
172
404
|
* @param persona - OTCognitiveProfile with trait values
|
|
173
|
-
* @param demand -
|
|
405
|
+
* @param demand - 29D demand distribution from page analysis
|
|
174
406
|
* @param options - Enable/disable asymmetric costs, interaction terms, and value modulation
|
|
175
407
|
* @returns Complete sequential transport result with per-layer breakdown
|
|
176
408
|
*/
|
|
177
|
-
export declare function computeSequentialCTC(persona: OTCognitiveProfile, demand: DemandDistribution, options?:
|
|
409
|
+
export declare function computeSequentialCTC(persona: OTCognitiveProfile, demand: DemandDistribution, options?: ChainOptions): SequentialTransportResult;
|
|
410
|
+
/** Options every chain entry point takes. */
|
|
411
|
+
export interface ChainOptions {
|
|
178
412
|
asymmetric?: boolean;
|
|
179
413
|
interactions?: boolean;
|
|
180
414
|
schwartzValues?: Record<string, number>;
|
|
@@ -187,12 +421,62 @@ export declare function computeSequentialCTC(persona: OTCognitiveProfile, demand
|
|
|
187
421
|
* spent. (2026-08-03)
|
|
188
422
|
*/
|
|
189
423
|
carriedCapacity?: Record<string, number>;
|
|
190
|
-
}
|
|
424
|
+
}
|
|
425
|
+
/** The curve totalCTC is read from, for one scope and option set, and what it was built from. */
|
|
426
|
+
export interface ReferenceCurve {
|
|
427
|
+
scope: MetricScope;
|
|
428
|
+
asymmetric: boolean;
|
|
429
|
+
interactions: boolean;
|
|
430
|
+
/** Graded reference pages at this scope. */
|
|
431
|
+
pages: number;
|
|
432
|
+
/** Built-in personas pooled on every page. */
|
|
433
|
+
personas: number;
|
|
434
|
+
/**
|
|
435
|
+
* Every registry id the build read: the chain's constants (demand curves
|
|
436
|
+
* included), the page-metric constants the reference pages were derived and
|
|
437
|
+
* measured with, the reference's page count and the interval's settings.
|
|
438
|
+
*/
|
|
439
|
+
reads: readonly string[];
|
|
440
|
+
curve: PercentileCurve;
|
|
441
|
+
/** The bootstrap interval of the curve, precomputed on a grid of raw costs. */
|
|
442
|
+
interval: PercentileInterval;
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* The percentile curve for one scope and option set: rawCTC of every graded
|
|
446
|
+
* reference page (ctc-reference.ts) for every built-in persona, through this
|
|
447
|
+
* chain, pooled. Each page's metrics are derived from its stored raw
|
|
448
|
+
* measurement (deriveMetrics) inside the build, so the page-metric
|
|
449
|
+
* normalisers move the curve exactly as the chain's constants do.
|
|
450
|
+
*
|
|
451
|
+
* WHICH OPTIONS SELECT A CURVE. `asymmetric` and `interactions` change the
|
|
452
|
+
* cost function, so each pair has its own curve: a symmetric raw cost ranked
|
|
453
|
+
* among asymmetric ones would compare two different quantities.
|
|
454
|
+
* `schwartzValues` and `carriedCapacity` do not. Both describe the person
|
|
455
|
+
* being scored (what they value, what earlier screens left them), not the
|
|
456
|
+
* yardstick, and a curve that moved with them would cancel part of the effect
|
|
457
|
+
* it is there to show. So a values-modulated score, and every screen after the
|
|
458
|
+
* first in a scroll, are ranked against the reference population as it
|
|
459
|
+
* arrives at a page. cognitive_effort's useValues edits demand before the chain
|
|
460
|
+
* runs, which lands in the same place.
|
|
461
|
+
*
|
|
462
|
+
* COST AND CACHE. One build is one deriveMetrics per page, one chain run per
|
|
463
|
+
* page per persona, and the page bootstrap (ctcReference.interval.*), under a
|
|
464
|
+
* second for the whole reference; cached per scope and option set for the
|
|
465
|
+
* life of the process, so every later score pays two binary searches. While a
|
|
466
|
+
* test overrides registered constants (activeOverrides() is non-null) a curve
|
|
467
|
+
* is cached against that override object instead: a change to any chain or
|
|
468
|
+
* page-metric constant re-derives the curve rather than reusing one built
|
|
469
|
+
* under other constants.
|
|
470
|
+
*/
|
|
471
|
+
export declare function ctcReferenceCurve(scope: MetricScope, options?: {
|
|
472
|
+
asymmetric?: boolean;
|
|
473
|
+
interactions?: boolean;
|
|
474
|
+
}): ReferenceCurve;
|
|
191
475
|
/**
|
|
192
476
|
* End-to-end Cognitive Optimal Transport computation.
|
|
193
477
|
*
|
|
194
478
|
* Extracts page metrics from a live Playwright page, computes the
|
|
195
|
-
*
|
|
479
|
+
* 29D demand distribution, and runs the full sequential transport chain.
|
|
196
480
|
*
|
|
197
481
|
* This is the primary entry point for MCP tools that need a single
|
|
198
482
|
* CTC score with full breakdown.
|
|
@@ -205,8 +489,14 @@ export declare function computeFullCOT(persona: OTCognitiveProfile, page: any):
|
|
|
205
489
|
/**
|
|
206
490
|
* Compute demand distribution from raw metric values (no page required).
|
|
207
491
|
* Useful for testing, simulation, and sensitivity analysis.
|
|
492
|
+
*
|
|
493
|
+
* informationDensity, textDensity and navigationDepth are carried onto the
|
|
494
|
+
* PageMetrics as reported values; since Stage C no demand reads them.
|
|
495
|
+
* choosingSecondsExpert (Stage C) is the choosing time's Hick-Hyman expert
|
|
496
|
+
* limit. It is required like the other law times and moves a demand only when
|
|
497
|
+
* options.siteFamiliarity is above 0.
|
|
208
498
|
*/
|
|
209
|
-
export declare function computeDemandFromRawMetrics(informationDensity: number, visualComplexity: number,
|
|
499
|
+
export declare function computeDemandFromRawMetrics(informationDensity: number, visualComplexity: number, textDensity: number, animationLevel: number, navigationDepth: number, pointingSeconds: number, choosingSeconds: number, readingSeconds: number, procedureSeconds: number, choosingSecondsExpert: number, options?: DemandOptions): DemandDistribution;
|
|
210
500
|
/**
|
|
211
501
|
* Compare sequential vs. additive CTC to quantify the sequential effect.
|
|
212
502
|
*
|
|
@@ -248,7 +538,11 @@ export interface ScreenResult {
|
|
|
248
538
|
screen: number;
|
|
249
539
|
/** Layer costs for this screen alone. */
|
|
250
540
|
layers: LayerResult[];
|
|
251
|
-
/**
|
|
541
|
+
/**
|
|
542
|
+
* This screen's totalCTC, rounded: its own raw cost (against the capacity
|
|
543
|
+
* earlier screens left) as a percentile of the reference, ranked against the
|
|
544
|
+
* reference matching its demand's scope (viewport for per-screen metrics).
|
|
545
|
+
*/
|
|
252
546
|
screenCTC: number;
|
|
253
547
|
/** P(this persona stops HERE, given they reached this screen). */
|
|
254
548
|
stopHazard: number;
|
|
@@ -273,7 +567,11 @@ export interface SequentialScrollResult {
|
|
|
273
567
|
layer: string;
|
|
274
568
|
share: number;
|
|
275
569
|
} | null;
|
|
276
|
-
/**
|
|
570
|
+
/**
|
|
571
|
+
* Sum over screens of reachProbability x screenCTC: each screen's percentile,
|
|
572
|
+
* weighted by the chance of reaching it. A sum of percentiles, so it grows
|
|
573
|
+
* with the number of screens reached and is not itself a percentile.
|
|
574
|
+
*/
|
|
277
575
|
reachWeightedCTC: number;
|
|
278
576
|
}
|
|
279
577
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cognitive-transport-chain.d.ts","sourceRoot":"","sources":["../../src/visual/cognitive-transport-chain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EACL,KAAK,kBAAkB,
|
|
1
|
+
{"version":3,"file":"cognitive-transport-chain.d.ts","sourceRoot":"","sources":["../../src/visual/cognitive-transport-chain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAGjB,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,kBAAkB,EAOxB,MAAM,oBAAoB,CAAC;AAI5B,kFAAkF;AAClF,MAAM,WAAW,WAAW;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,uBAAuB,EAAE,MAAM,CAAC;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,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