cbrowser 20.2.2 → 21.0.1
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-age.d.ts +59 -0
- package/dist/persona-age.d.ts.map +1 -0
- package/dist/persona-age.js +84 -0
- package/dist/persona-age.js.map +1 -0
- package/dist/persona-questionnaire.js +1 -1
- package/dist/persona-questionnaire.js.map +1 -1
- package/dist/personas.d.ts +3 -1
- package/dist/personas.d.ts.map +1 -1
- package/dist/personas.js +154 -119
- 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 +335 -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/age.d.ts +30 -0
- package/dist/visual/provenance/age.d.ts.map +1 -0
- package/dist/visual/provenance/age.js +28 -0
- package/dist/visual/provenance/age.js.map +1 -0
- 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 +108 -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
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A persona's Schwartz scores, resolved the one way the transport chain takes
|
|
3
|
+
* them, for every tool that offers useValues on a cognitive transport score.
|
|
4
|
+
*
|
|
5
|
+
* cognitive_effort carried this inline (bb54106). visual_cognitive_story
|
|
6
|
+
* offered useValues too and never passed values to the chain, so its effort
|
|
7
|
+
* summary ignored the flag while its description promised otherwise. Both now
|
|
8
|
+
* resolve here, and both report what was found the same way.
|
|
9
|
+
*
|
|
10
|
+
* @copyright 2026 Alexandria Eden alexandria.shai.eden@gmail.com https://cbrowser.ai
|
|
11
|
+
* @license MIT
|
|
12
|
+
*/
|
|
13
|
+
const SCHWARTZ_KEYS = [
|
|
14
|
+
"selfDirection", "stimulation", "hedonism", "achievement", "power",
|
|
15
|
+
"security", "conformity", "tradition", "benevolence", "universalism",
|
|
16
|
+
];
|
|
17
|
+
/**
|
|
18
|
+
* The ten Schwartz scores of a persona's values record, the shape the chain's
|
|
19
|
+
* value modulation reads. A record carries higher-order values, SDT needs and
|
|
20
|
+
* a Maslow level beside them; only the ten are passed on. Undefined when none
|
|
21
|
+
* is a number, so "values applied" is never reported for an empty record.
|
|
22
|
+
*/
|
|
23
|
+
export function schwartzScores(values) {
|
|
24
|
+
const v = values;
|
|
25
|
+
const out = {};
|
|
26
|
+
for (const k of SCHWARTZ_KEYS) {
|
|
27
|
+
if (typeof v[k] === "number" && Number.isFinite(v[k]))
|
|
28
|
+
out[k] = v[k];
|
|
29
|
+
}
|
|
30
|
+
return Object.keys(out).length > 0 ? out : undefined;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The persona's Schwartz scores for the chain, or undefined when none exist:
|
|
34
|
+
* from the persona registry, the persona's own schwartzValues, its Big Five,
|
|
35
|
+
* or, failing those, an account persona in the CMS (registered into the
|
|
36
|
+
* caller's account store, as before). Never throws: a values lookup that fails
|
|
37
|
+
* scores the page without values, and valueModulationReport says so.
|
|
38
|
+
*/
|
|
39
|
+
export async function resolveChainValues(personaName) {
|
|
40
|
+
try {
|
|
41
|
+
// Imported here, not at the top. audit-tools.ts loads this module, and
|
|
42
|
+
// with persona-values imported statically, empathy_audit in
|
|
43
|
+
// tests/v8-p3-browser.test.ts (B49) hung until its 120 s timeout whenever
|
|
44
|
+
// another browser test had run first in the process (alone it passed in
|
|
45
|
+
// 3 s). The mechanism is not identified; loading it lazily, as audit-tools
|
|
46
|
+
// loads most modules, removes the hang (6 of 6 in 6 s).
|
|
47
|
+
// regPV2 writes the caller's account store, not the process-wide registry. (tenant, 2026-10-10)
|
|
48
|
+
const { registerAccountPersonaValues: regPV2, createPersonaValues: createPV2 } = await import("../../values/index.js");
|
|
49
|
+
const { resolveValuesForPersona } = await import("../../values/persona-values.js");
|
|
50
|
+
let pValues = resolveValuesForPersona(personaName);
|
|
51
|
+
// Custom persona CMS fallback
|
|
52
|
+
if (!pValues) {
|
|
53
|
+
try {
|
|
54
|
+
const { getSessionApiKey } = await import("./cognitive-tools.js");
|
|
55
|
+
const _sessionApiKey = getSessionApiKey();
|
|
56
|
+
if (_sessionApiKey) {
|
|
57
|
+
const cmsUrl = process.env.CMS_URL || "http://localhost:3200";
|
|
58
|
+
const res = await fetch(`${cmsUrl}/api/personas`, { headers: { "Authorization": `Bearer ${_sessionApiKey}` } });
|
|
59
|
+
if (res.ok) {
|
|
60
|
+
const data = await res.json();
|
|
61
|
+
const match = data.personas.find((p) => p.slug === personaName || p.name.toLowerCase() === personaName.toLowerCase());
|
|
62
|
+
if (match?.schwartz_values) {
|
|
63
|
+
const sv = typeof match.schwartz_values === "string" ? JSON.parse(match.schwartz_values) : match.schwartz_values;
|
|
64
|
+
const pv = createPV2({ selfDirection: sv.selfDirection ?? 0.5, stimulation: sv.stimulation ?? 0.5, hedonism: sv.hedonism ?? 0.5, achievement: sv.achievement ?? 0.5, power: sv.power ?? 0.5, security: sv.security ?? 0.5, conformity: sv.conformity ?? 0.5, tradition: sv.tradition ?? 0.5, benevolence: sv.benevolence ?? 0.5, universalism: sv.universalism ?? 0.5 }, { autonomyNeed: sv.autonomyNeed ?? 0.5, competenceNeed: sv.competenceNeed ?? 0.5, relatednessNeed: sv.relatednessNeed ?? 0.5 }, "esteem");
|
|
65
|
+
regPV2([{ personaName, values: pv, rationale: "Custom persona from CMS" }]);
|
|
66
|
+
pValues = pv;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
catch { /* CMS fallback failed */ }
|
|
72
|
+
}
|
|
73
|
+
return pValues ? schwartzScores(pValues) : undefined;
|
|
74
|
+
}
|
|
75
|
+
catch {
|
|
76
|
+
return undefined; // values not available: proceed without
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
/** The `valueModulation` field: applied with the scores used, or why not. */
|
|
80
|
+
export function valueModulationReport(scores) {
|
|
81
|
+
return scores
|
|
82
|
+
? { applied: true, scores }
|
|
83
|
+
: { applied: false, reason: "No Schwartz values were found for this persona (registry, its own schwartzValues, its Big Five, or an account persona in the CMS), so it was scored without them." };
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=chain-values.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chain-values.js","sourceRoot":"","sources":["../../../src/mcp-tools/base/chain-values.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cognitive-tools.d.ts","sourceRoot":"","sources":["../../../src/mcp-tools/base/cognitive-tools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"cognitive-tools.d.ts","sourceRoot":"","sources":["../../../src/mcp-tools/base/cognitive-tools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAwCtE;;;GAGG;AACH,wBAAsB,0BAA0B,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;IAC/E,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;CAClI,CAAC,CAAC,CAuBF;AAUD,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,QAIvD;AACD,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,SAAS,CAGrD;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,SAAS,EACjB,EAAE,UAAU,EAAE,iBAAiB,EAAE,EAAE,uBAAuB,GACzD,IAAI,CA+8BN"}
|
|
@@ -12,6 +12,9 @@ import { rankInfluencePatternsForProfile, resolveValuesForPersona } from "../../
|
|
|
12
12
|
import { resolvePersonaValues } from "./values-tools.js";
|
|
13
13
|
import { currentRequestIdentity } from "../../request-context.js";
|
|
14
14
|
import { markJourneyBrowser, releaseJourneyBrowser } from "../journey-sessions.js";
|
|
15
|
+
import { param } from "../../visual/model-provenance.js";
|
|
16
|
+
import { defaultJourneyTraits } from "../../cognitive/default-traits.js";
|
|
17
|
+
import { canonicalizeTraits } from "../../trait-reference.js";
|
|
15
18
|
/**
|
|
16
19
|
* 3dp, as persona_values_lookup already publishes these. The higher-order
|
|
17
20
|
* values are averages of Schwartz values, so binary residue leaked straight
|
|
@@ -19,7 +22,9 @@ import { markJourneyBrowser, releaseJourneyBrowser } from "../journey-sessions.j
|
|
|
19
22
|
* which do not pass through the security layer's residue boundary. (B15,
|
|
20
23
|
* 2026-10-09)
|
|
21
24
|
*/
|
|
22
|
-
const r3 = (n) => typeof n === "number" && Number.isFinite(n) ? Math.round(n *
|
|
25
|
+
const r3 = (n) => typeof n === "number" && Number.isFinite(n) ? Math.round(n * param("journeyMcp.display.rounding")) / param("journeyMcp.display.rounding") : n;
|
|
26
|
+
/** A Schwartz or self-determination value a CMS persona does not set. */
|
|
27
|
+
const cmsValue = (v) => v ?? param("journeyMcp.cmsValueDefault");
|
|
23
28
|
/**
|
|
24
29
|
* Fetch custom personas from CMS for the current account.
|
|
25
30
|
* Uses the API key from the session to authenticate.
|
|
@@ -39,7 +44,8 @@ export async function fetchCustomPersonasFromCMS(apiKey) {
|
|
|
39
44
|
name: p.name,
|
|
40
45
|
slug: p.slug,
|
|
41
46
|
description: p.description,
|
|
42
|
-
|
|
47
|
+
// Deprecated keys to canonical ones, as on the file path (trait-reference.ts).
|
|
48
|
+
traits: canonicalizeTraits(typeof p.traits === "string" ? JSON.parse(p.traits) : p.traits),
|
|
43
49
|
values: p.schwartz_values ? (typeof p.schwartz_values === "string" ? JSON.parse(p.schwartz_values) : p.schwartz_values) : undefined,
|
|
44
50
|
source: p.source,
|
|
45
51
|
}));
|
|
@@ -163,20 +169,20 @@ export function registerCognitiveTools(server, { getBrowser, getBrowserByToken }
|
|
|
163
169
|
try {
|
|
164
170
|
const { registerAccountPersonaValues, createPersonaValues } = await import("../../values/index.js");
|
|
165
171
|
const pv = createPersonaValues({
|
|
166
|
-
selfDirection: cmsMatch.values.selfDirection
|
|
167
|
-
stimulation: cmsMatch.values.stimulation
|
|
168
|
-
hedonism: cmsMatch.values.hedonism
|
|
169
|
-
achievement: cmsMatch.values.achievement
|
|
170
|
-
power: cmsMatch.values.power
|
|
171
|
-
security: cmsMatch.values.security
|
|
172
|
-
conformity: cmsMatch.values.conformity
|
|
173
|
-
tradition: cmsMatch.values.tradition
|
|
174
|
-
benevolence: cmsMatch.values.benevolence
|
|
175
|
-
universalism: cmsMatch.values.universalism
|
|
172
|
+
selfDirection: cmsValue(cmsMatch.values.selfDirection),
|
|
173
|
+
stimulation: cmsValue(cmsMatch.values.stimulation),
|
|
174
|
+
hedonism: cmsValue(cmsMatch.values.hedonism),
|
|
175
|
+
achievement: cmsValue(cmsMatch.values.achievement),
|
|
176
|
+
power: cmsValue(cmsMatch.values.power),
|
|
177
|
+
security: cmsValue(cmsMatch.values.security),
|
|
178
|
+
conformity: cmsValue(cmsMatch.values.conformity),
|
|
179
|
+
tradition: cmsValue(cmsMatch.values.tradition),
|
|
180
|
+
benevolence: cmsValue(cmsMatch.values.benevolence),
|
|
181
|
+
universalism: cmsValue(cmsMatch.values.universalism),
|
|
176
182
|
}, {
|
|
177
|
-
autonomyNeed: cmsMatch.values.autonomyNeed
|
|
178
|
-
competenceNeed: cmsMatch.values.competenceNeed
|
|
179
|
-
relatednessNeed: cmsMatch.values.relatednessNeed
|
|
183
|
+
autonomyNeed: cmsValue(cmsMatch.values.autonomyNeed),
|
|
184
|
+
competenceNeed: cmsValue(cmsMatch.values.competenceNeed),
|
|
185
|
+
relatednessNeed: cmsValue(cmsMatch.values.relatednessNeed),
|
|
180
186
|
}, "esteem");
|
|
181
187
|
registerAccountPersonaValues([{
|
|
182
188
|
personaName: cmsMatch.slug || cmsMatch.name,
|
|
@@ -205,34 +211,7 @@ export function registerCognitiveTools(server, { getBrowser, getBrowserByToken }
|
|
|
205
211
|
}
|
|
206
212
|
}
|
|
207
213
|
else if (customTraits) {
|
|
208
|
-
const defaultTraits =
|
|
209
|
-
patience: 0.5,
|
|
210
|
-
riskTolerance: 0.5,
|
|
211
|
-
comprehension: 0.5,
|
|
212
|
-
persistence: 0.5,
|
|
213
|
-
curiosity: 0.5,
|
|
214
|
-
workingMemory: 0.5,
|
|
215
|
-
readingTendency: 0.5,
|
|
216
|
-
resilience: 0.5,
|
|
217
|
-
selfEfficacy: 0.5,
|
|
218
|
-
satisficing: 0.5,
|
|
219
|
-
trustCalibration: 0.5,
|
|
220
|
-
interruptRecovery: 0.5,
|
|
221
|
-
informationForaging: 0.5,
|
|
222
|
-
changeBlindness: 0.3,
|
|
223
|
-
anchoringBias: 0.5,
|
|
224
|
-
timeHorizon: 0.5,
|
|
225
|
-
attributionStyle: 0.5,
|
|
226
|
-
metacognitivePlanning: 0.5,
|
|
227
|
-
proceduralFluency: 0.5,
|
|
228
|
-
transferLearning: 0.5,
|
|
229
|
-
authoritySensitivity: 0.5,
|
|
230
|
-
emotionalContagion: 0.5,
|
|
231
|
-
fearOfMissingOut: 0.5,
|
|
232
|
-
socialProofSensitivity: 0.5,
|
|
233
|
-
mentalModelFlexibility: 0.5,
|
|
234
|
-
siteFamiliarity: 0.5,
|
|
235
|
-
};
|
|
214
|
+
const defaultTraits = defaultJourneyTraits();
|
|
236
215
|
personaObj = {
|
|
237
216
|
...existingPersona,
|
|
238
217
|
cognitiveTraits: {
|
|
@@ -251,7 +230,7 @@ export function registerCognitiveTools(server, { getBrowser, getBrowserByToken }
|
|
|
251
230
|
confusionLevel: 0.0,
|
|
252
231
|
frustrationLevel: 0.0,
|
|
253
232
|
goalProgress: 0.0,
|
|
254
|
-
confidenceLevel:
|
|
233
|
+
confidenceLevel: param("journey.initialConfidence"),
|
|
255
234
|
currentMood: "neutral",
|
|
256
235
|
memory: {
|
|
257
236
|
pagesVisited: [startUrl],
|
|
@@ -263,13 +242,17 @@ export function registerCognitiveTools(server, { getBrowser, getBrowserByToken }
|
|
|
263
242
|
stepCount: 0,
|
|
264
243
|
};
|
|
265
244
|
const traits = profile.traits;
|
|
245
|
+
// Registered in src/visual/provenance/journey-mcp.ts (journeyMcp.*);
|
|
246
|
+
// the patience floor, bands and time limits are the autonomous
|
|
247
|
+
// journey's (journey.*).
|
|
248
|
+
const lowPatience = traits.patience < param("journey.band.low.patience");
|
|
266
249
|
const thresholds = {
|
|
267
|
-
patienceMin:
|
|
268
|
-
confusionMax: traits.comprehension <
|
|
269
|
-
frustrationMax:
|
|
270
|
-
maxStepsWithoutProgress: traits.persistence >
|
|
271
|
-
loopDetectionThreshold:
|
|
272
|
-
timeLimit: traits.patience >
|
|
250
|
+
patienceMin: param("journey.abandon.patienceFloor"),
|
|
251
|
+
confusionMax: traits.comprehension < param("journey.band.low.comprehension") ? param("journeyMcp.abandon.confusionLimit.lowComprehension") : param("journeyMcp.abandon.confusionLimit"),
|
|
252
|
+
frustrationMax: lowPatience ? param("journeyMcp.abandon.frustrationLimit.lowPatience") : param("journeyMcp.abandon.frustrationLimit"),
|
|
253
|
+
maxStepsWithoutProgress: traits.persistence > param("journey.band.high.persistence") ? param("journeyMcp.abandon.noProgressSteps.highPersistence") : param("journeyMcp.abandon.noProgressSteps"),
|
|
254
|
+
loopDetectionThreshold: param("journeyMcp.abandon.loopVisits"),
|
|
255
|
+
timeLimit: traits.patience > param("journey.band.high.patience") ? param("journey.abandon.timeLimitSeconds.highPatience") : (lowPatience ? param("journey.abandon.timeLimitSeconds.lowPatience") : param("journey.abandon.timeLimitSeconds")),
|
|
273
256
|
};
|
|
274
257
|
// v18.33.0: Use token-based browser for session continuity
|
|
275
258
|
let b;
|
|
@@ -301,7 +284,7 @@ export function registerCognitiveTools(server, { getBrowser, getBrowserByToken }
|
|
|
301
284
|
await b.navigate(startUrl, navOpts);
|
|
302
285
|
// v18.30.0: Verify browser is healthy after navigation
|
|
303
286
|
// JS-heavy sites can crash the persistent browser context
|
|
304
|
-
const MAX_RETRIES =
|
|
287
|
+
const MAX_RETRIES = param("journeyMcp.init.blankPageRetries");
|
|
305
288
|
for (let attempt = 0; attempt < MAX_RETRIES; attempt++) {
|
|
306
289
|
try {
|
|
307
290
|
const page = await b.getPage();
|
|
@@ -328,7 +311,10 @@ export function registerCognitiveTools(server, { getBrowser, getBrowserByToken }
|
|
|
328
311
|
// v18.35.0: Gate site model data by persona's siteFamiliarity trait
|
|
329
312
|
// If persona claims high familiarity but no site model data exists,
|
|
330
313
|
// downgrade to 0.0 and warn — can't simulate "knowing" a site we've never seen
|
|
331
|
-
const requestedFamiliarity = profile.traits.siteFamiliarity ??
|
|
314
|
+
const requestedFamiliarity = profile.traits.siteFamiliarity ?? param("journey.defaultTrait");
|
|
315
|
+
const fullCoverageAt = param("journeyMcp.familiarity.fullCoveragePages");
|
|
316
|
+
const expertAt = param("journeyMcp.familiarity.expert");
|
|
317
|
+
const familiarAt = param("journeyMcp.familiarity.familiar");
|
|
332
318
|
let effectiveFamiliarity = requestedFamiliarity;
|
|
333
319
|
let familiarityWarning;
|
|
334
320
|
let siteModelContext = { hasModel: false };
|
|
@@ -339,7 +325,7 @@ export function registerCognitiveTools(server, { getBrowser, getBrowserByToken }
|
|
|
339
325
|
const stats = await siteModel.getModelStats(domain);
|
|
340
326
|
const hasData = stats.navigationNodes > 0;
|
|
341
327
|
// Downgrade familiarity if persona claims knowledge we don't have
|
|
342
|
-
if (!hasData && requestedFamiliarity >
|
|
328
|
+
if (!hasData && requestedFamiliarity > param("journeyMcp.familiarity.claimFloor")) {
|
|
343
329
|
effectiveFamiliarity = 0.0;
|
|
344
330
|
familiarityWarning = `"${personaObj.name}" has siteFamiliarity=${requestedFamiliarity.toFixed(1)} but CBrowser has NO prior knowledge of ${domain}. Downgraded to 0.0 (first visit). To build site knowledge, navigate the site first — data accumulates automatically on every navigate/click/fill.`;
|
|
345
331
|
siteModelContext = {
|
|
@@ -348,12 +334,12 @@ export function registerCognitiveTools(server, { getBrowser, getBrowserByToken }
|
|
|
348
334
|
familiarityDowngraded: true,
|
|
349
335
|
originalFamiliarity: requestedFamiliarity,
|
|
350
336
|
pagesCrawled: 0,
|
|
351
|
-
fullCoverageAt
|
|
337
|
+
fullCoverageAt,
|
|
352
338
|
provenance: "siteFamiliarity is a persona-site variable, not a disposition like the other 25 traits: the same persona is familiar with one site and not another. The effective value is capped by how many pages this install has crawled, which grows as you use the tool — so it is not reproducible across runs and should be read as a ceiling on what may be simulated, not as a measurement of the persona.",
|
|
353
339
|
suggestion: familiarityWarning,
|
|
354
340
|
};
|
|
355
341
|
}
|
|
356
|
-
else if (hasData && requestedFamiliarity >
|
|
342
|
+
else if (hasData && requestedFamiliarity > param("journeyMcp.familiarity.scaleFloor")) {
|
|
357
343
|
// Scale familiarity by data coverage — partial knowledge = partial familiarity
|
|
358
344
|
// A site with 3 pages mapped shouldn't give "expert" level access
|
|
359
345
|
// Coverage, not familiarity.
|
|
@@ -366,19 +352,19 @@ export function registerCognitiveTools(server, { getBrowser, getBrowserByToken }
|
|
|
366
352
|
// entitled to simulate, which is a useful guard and a bad measurement.
|
|
367
353
|
// The 20-page threshold is a chosen constant, not a finding.
|
|
368
354
|
// Reported alongside so the number explains itself. (2026-08-01)
|
|
369
|
-
const coverageScore = Math.min(1.0, stats.navigationNodes /
|
|
355
|
+
const coverageScore = Math.min(1.0, stats.navigationNodes / fullCoverageAt);
|
|
370
356
|
effectiveFamiliarity = Math.min(requestedFamiliarity, coverageScore);
|
|
371
|
-
if (effectiveFamiliarity < requestedFamiliarity -
|
|
357
|
+
if (effectiveFamiliarity < requestedFamiliarity - param("journeyMcp.familiarity.warnMargin")) {
|
|
372
358
|
familiarityWarning = `"${personaObj.name}" has siteFamiliarity=${requestedFamiliarity.toFixed(1)} but site model only has ${stats.navigationNodes} pages mapped. Adjusted to ${effectiveFamiliarity.toFixed(1)}. More navigation will build fuller site knowledge.`;
|
|
373
359
|
}
|
|
374
|
-
const familiarityLevel = effectiveFamiliarity >=
|
|
375
|
-
effectiveFamiliarity >=
|
|
376
|
-
effectiveFamiliarity >=
|
|
377
|
-
if (effectiveFamiliarity >=
|
|
360
|
+
const familiarityLevel = effectiveFamiliarity >= expertAt ? "expert" :
|
|
361
|
+
effectiveFamiliarity >= familiarAt ? "familiar" :
|
|
362
|
+
effectiveFamiliarity >= param("journeyMcp.familiarity.vague") ? "vague" : "none";
|
|
363
|
+
if (effectiveFamiliarity >= expertAt) {
|
|
378
364
|
siteModelContext = {
|
|
379
365
|
hasModel: true,
|
|
380
366
|
pagesCrawled: stats.navigationNodes,
|
|
381
|
-
fullCoverageAt
|
|
367
|
+
fullCoverageAt,
|
|
382
368
|
provenance: "Capped by crawl coverage (pagesCrawled/fullCoverageAt), which grows as this install uses the tool — a ceiling on what may be simulated, not a reproducible measurement of the persona. siteFamiliarity is a persona-site variable, not a disposition like the other 25 traits.",
|
|
383
369
|
knownPaths: stats.goalPaths,
|
|
384
370
|
familiarityLevel,
|
|
@@ -389,11 +375,11 @@ export function registerCognitiveTools(server, { getBrowser, getBrowserByToken }
|
|
|
389
375
|
: `This persona knows the site layout (${stats.navigationNodes} pages) but hasn't completed goals here.`,
|
|
390
376
|
};
|
|
391
377
|
}
|
|
392
|
-
else if (effectiveFamiliarity >=
|
|
378
|
+
else if (effectiveFamiliarity >= familiarAt) {
|
|
393
379
|
siteModelContext = {
|
|
394
380
|
hasModel: true,
|
|
395
381
|
pagesCrawled: stats.navigationNodes,
|
|
396
|
-
fullCoverageAt
|
|
382
|
+
fullCoverageAt,
|
|
397
383
|
provenance: "Capped by crawl coverage (pagesCrawled/fullCoverageAt), which grows as this install uses the tool — a ceiling on what may be simulated, not a reproducible measurement of the persona. siteFamiliarity is a persona-site variable, not a disposition like the other 25 traits.",
|
|
398
384
|
familiarityLevel,
|
|
399
385
|
familiarityDowngraded: effectiveFamiliarity < requestedFamiliarity,
|
|
@@ -419,7 +405,7 @@ export function registerCognitiveTools(server, { getBrowser, getBrowserByToken }
|
|
|
419
405
|
}
|
|
420
406
|
catch {
|
|
421
407
|
// If site model fails, treat as no data — downgrade high familiarity
|
|
422
|
-
if (requestedFamiliarity >
|
|
408
|
+
if (requestedFamiliarity > param("journeyMcp.familiarity.claimFloor")) {
|
|
423
409
|
effectiveFamiliarity = 0.0;
|
|
424
410
|
siteModelContext = {
|
|
425
411
|
hasModel: false,
|
|
@@ -431,8 +417,18 @@ export function registerCognitiveTools(server, { getBrowser, getBrowserByToken }
|
|
|
431
417
|
}
|
|
432
418
|
}
|
|
433
419
|
const personaValues = resolveValuesForPersona(personaObj.name);
|
|
420
|
+
const lowP = param("journey.band.low.patience"), highP = param("journey.band.high.patience");
|
|
421
|
+
const lowR = param("journey.band.low.riskTolerance"), highR = param("journey.band.high.riskTolerance");
|
|
422
|
+
const lowC = param("journeyMcp.label.lowComprehension"), highC = param("journey.band.high.comprehension");
|
|
423
|
+
const lowT = param("journey.band.low.readingTendency"), highT = param("journey.band.high.readingTendency");
|
|
424
|
+
const highV = param("journeyMcp.valueLabel.high"), lowV = param("journeyMcp.valueLabel.low");
|
|
425
|
+
// The update rules cognitive_journey_update_state applies, stated from
|
|
426
|
+
// the same registry entries it reads, so the text cannot drift from them.
|
|
427
|
+
const U = (id) => param(`journeyMcp.update.${id}`);
|
|
428
|
+
const valueNeutral = param("journeyMcp.value.neutral");
|
|
429
|
+
const valueGain = param("journeyMcp.value.modulationGain");
|
|
434
430
|
const influencePatterns = personaValues
|
|
435
|
-
? rankInfluencePatternsForProfile(personaValues).slice(0,
|
|
431
|
+
? rankInfluencePatternsForProfile(personaValues).slice(0, param("journeyMcp.init.influencePatterns"))
|
|
436
432
|
: undefined;
|
|
437
433
|
return {
|
|
438
434
|
content: [
|
|
@@ -503,20 +499,20 @@ export function registerCognitiveTools(server, { getBrowser, getBrowserByToken }
|
|
|
503
499
|
COGNITIVE JOURNEY SIMULATION INSTRUCTIONS:
|
|
504
500
|
|
|
505
501
|
You are now simulating a "${personaObj.name}" user with these cognitive traits:
|
|
506
|
-
- Patience: ${profile.traits.patience.toFixed(2)} ${profile.traits.patience <
|
|
507
|
-
- Risk Tolerance: ${profile.traits.riskTolerance.toFixed(2)} ${profile.traits.riskTolerance <
|
|
508
|
-
- Comprehension: ${profile.traits.comprehension.toFixed(2)} ${profile.traits.comprehension <
|
|
509
|
-
- Reading Tendency: ${profile.traits.readingTendency.toFixed(2)} ${profile.traits.readingTendency <
|
|
502
|
+
- Patience: ${profile.traits.patience.toFixed(2)} ${profile.traits.patience < lowP ? "(impatient - will give up quickly)" : profile.traits.patience > highP ? "(patient - will persist)" : "(moderate)"}
|
|
503
|
+
- Risk Tolerance: ${profile.traits.riskTolerance.toFixed(2)} ${profile.traits.riskTolerance < lowR ? "(cautious - hesitates)" : profile.traits.riskTolerance > highR ? "(bold - clicks freely)" : "(moderate)"}
|
|
504
|
+
- Comprehension: ${profile.traits.comprehension.toFixed(2)} ${profile.traits.comprehension < lowC ? "(struggles with UI)" : profile.traits.comprehension > highC ? "(expert at UI patterns)" : "(moderate)"}
|
|
505
|
+
- Reading Tendency: ${profile.traits.readingTendency.toFixed(2)} ${profile.traits.readingTendency < lowT ? "(scans only)" : profile.traits.readingTendency > highT ? "(reads everything)" : "(selective reader)"}
|
|
510
506
|
|
|
511
507
|
Attention Pattern: ${profile.attentionPattern}
|
|
512
508
|
Decision Style: ${profile.decisionStyle}
|
|
513
509
|
${personaValues ? `
|
|
514
510
|
MOTIVATIONAL VALUES (Schwartz — influence what this persona notices and clicks):
|
|
515
|
-
- Security: ${personaValues.security.toFixed(2)} ${personaValues.security >
|
|
516
|
-
- Stimulation: ${personaValues.stimulation.toFixed(2)} ${personaValues.stimulation >
|
|
517
|
-
- Achievement: ${personaValues.achievement.toFixed(2)} ${personaValues.achievement >
|
|
518
|
-
- Conformity: ${personaValues.conformity.toFixed(2)} ${personaValues.conformity >
|
|
519
|
-
- Self-Direction: ${personaValues.selfDirection.toFixed(2)} ${personaValues.selfDirection >
|
|
511
|
+
- Security: ${personaValues.security.toFixed(2)} ${personaValues.security > highV ? "(seeks trust signals, guarantees, reads policies)" : personaValues.security < lowV ? "(skips fine print, comfortable with risk)" : ""}
|
|
512
|
+
- Stimulation: ${personaValues.stimulation.toFixed(2)} ${personaValues.stimulation > highV ? "(drawn to 'New', beta features, novelty)" : personaValues.stimulation < lowV ? "(ignores new features, prefers familiar)" : ""}
|
|
513
|
+
- Achievement: ${personaValues.achievement.toFixed(2)} ${personaValues.achievement > highV ? "(seeks ROI, metrics, efficiency)" : ""}
|
|
514
|
+
- Conformity: ${personaValues.conformity.toFixed(2)} ${personaValues.conformity > highV ? "(influenced by reviews, 'Most popular', social proof)" : personaValues.conformity < lowV ? "(ignores social proof, independent)" : ""}
|
|
515
|
+
- Self-Direction: ${personaValues.selfDirection.toFixed(2)} ${personaValues.selfDirection > highV ? "(resists defaults, customizes, explores options)" : ""}
|
|
520
516
|
` : ""}
|
|
521
517
|
GOAL: "${goal}"
|
|
522
518
|
|
|
@@ -528,16 +524,21 @@ SIMULATION LOOP:
|
|
|
528
524
|
2. COMPREHEND - Interpret elements as this persona would (lower comprehension = more confusion)
|
|
529
525
|
3. DECIDE - Choose action based on traits. Generate inner monologue.
|
|
530
526
|
4. EXECUTE - Use click/fill/navigate tools (always pass _browserToken).
|
|
531
|
-
5. EVALUATE -
|
|
532
|
-
- patienceRemaining -=
|
|
533
|
-
- confusionLevel
|
|
534
|
-
- frustrationLevel
|
|
535
|
-
|
|
527
|
+
5. EVALUATE - After each action, call cognitive_journey_update_state with its result. It applies these rules:
|
|
528
|
+
- patienceRemaining -= ${U("patiencePerStep")} + frustrationLevel × ${U("patiencePerFrustration")} × achievement modulation
|
|
529
|
+
- on success: confusionLevel -= ${U("confusionRecovery")} × stimulation modulation and frustrationLevel -= ${U("frustrationRecovery")}; with progress, confidenceLevel += ${U("confidenceGain")} × achievement modulation and goalProgress += ${U("progressPerStep")}
|
|
530
|
+
- on failure: frustrationLevel += ${U("frustrationPerFailure")} × security modulation
|
|
531
|
+
- on a confusing step: confusionLevel += (1 - comprehension) × ${U("confusionPerConfusing")} × conformity modulation
|
|
532
|
+
- on going back: confidenceLevel -= ${U("confidenceLossOnBack")} × security modulation
|
|
533
|
+
- timeElapsed += ${U("secondsPerStep")} s per update
|
|
534
|
+
A value's modulation is 1 + (value - ${valueNeutral}) × ${valueGain}, ${1 - valueNeutral * valueGain} to ${1 + (1 - valueNeutral) * valueGain} across the 0-1 scale (${valueNeutral} = no effect).
|
|
535
|
+
These rules and every limit below were set by hand. They are hypotheses, untested against people, not measurements: follow them to keep the simulation consistent, and do not report their outputs as findings.
|
|
536
|
+
6. CHECK ABANDONMENT - cognitive_journey_update_state returns shouldAbandon. It checks patience below ${thresholds.patienceMin}, frustration above ${param("journeyMcp.abandon.frustrationLimit")} / security modulation, and confusion above ${param("journeyMcp.abandon.confusionLimit")} / conformity modulation on two consecutive updates; it does not apply this persona's own confusion and frustration limits below, nor the step, page and time limits, which are yours to apply.
|
|
536
537
|
7. LOOP - Return to PERCEIVE until goal achieved or abandoned.
|
|
537
538
|
|
|
538
|
-
ABANDONMENT TRIGGERS:
|
|
539
|
+
ABANDONMENT TRIGGERS (this persona's limits):
|
|
539
540
|
- Patience < ${thresholds.patienceMin}: "This is taking too long. I give up."
|
|
540
|
-
- Confusion > ${thresholds.confusionMax}
|
|
541
|
+
- Confusion > ${thresholds.confusionMax} on two consecutive updates: "I have no idea what to do."
|
|
541
542
|
- Frustration > ${thresholds.frustrationMax}: "This is so frustrating!"
|
|
542
543
|
- No progress after ${thresholds.maxStepsWithoutProgress} steps: "I'm not getting anywhere."
|
|
543
544
|
- Same page ${thresholds.loopDetectionThreshold}x: "I keep ending up here."
|
|
@@ -552,7 +553,7 @@ Begin the simulation now. Narrate your thoughts as this persona.
|
|
|
552
553
|
});
|
|
553
554
|
server.registerTool("cognitive_journey_update_state", {
|
|
554
555
|
title: "Update Cognitive State",
|
|
555
|
-
description: "Update the cognitive state during a journey simulation. Call this after each action to track mental state.",
|
|
556
|
+
description: "Update the cognitive state during a journey simulation. Call this after each action to track mental state. The update rules and abandonment limits it applies were set by hand: hypotheses to keep a simulation consistent, untested against people, not measurements (cognitive_journey_init's instructions state them).",
|
|
556
557
|
inputSchema: {
|
|
557
558
|
currentState: z.object({
|
|
558
559
|
patienceRemaining: z.number(),
|
|
@@ -596,38 +597,41 @@ Begin the simulation now. Narrate your thoughts as this persona.
|
|
|
596
597
|
},
|
|
597
598
|
}, async ({ currentState, actionResult, personaTraits, personaValues, _browserToken }) => {
|
|
598
599
|
// Value modulation factors (0.8-1.2 range, default 1.0 when no values)
|
|
600
|
+
// Every rule below is registered (journeyMcp.*, src/visual/provenance/journey-mcp.ts).
|
|
599
601
|
const v = personaValues || {};
|
|
600
|
-
const
|
|
601
|
-
const
|
|
602
|
-
const
|
|
603
|
-
const
|
|
604
|
-
|
|
602
|
+
const neutral = param("journeyMcp.value.neutral");
|
|
603
|
+
const gain = param("journeyMcp.value.modulationGain");
|
|
604
|
+
const securityMod = 1 + ((v.security ?? neutral) - neutral) * gain; // 0.8-1.2: high security = more reactive to failure
|
|
605
|
+
const stimulationMod = 1 + ((v.stimulation ?? neutral) - neutral) * gain; // 0.8-1.2: high stimulation = more patience for novelty
|
|
606
|
+
const achievementMod = 1 + ((v.achievement ?? neutral) - neutral) * gain; // 0.8-1.2: high achievement = more impatient with inefficiency
|
|
607
|
+
const conformityMod = 1 + ((v.conformity ?? neutral) - neutral) * gain; // 0.8-1.2: high conformity = more frustrated without social proof
|
|
608
|
+
let newPatienceRemaining = currentState.patienceRemaining - param("journeyMcp.update.patiencePerStep");
|
|
605
609
|
let newConfusionLevel = currentState.confusionLevel;
|
|
606
610
|
let newFrustrationLevel = currentState.frustrationLevel;
|
|
607
611
|
let newConfidenceLevel = currentState.confidenceLevel;
|
|
608
612
|
let newMood = currentState.currentMood;
|
|
609
613
|
// Patience drain from frustration — achievement-driven personas drain faster
|
|
610
|
-
newPatienceRemaining -= currentState.frustrationLevel *
|
|
614
|
+
newPatienceRemaining -= currentState.frustrationLevel * param("journeyMcp.update.patiencePerFrustration") * achievementMod;
|
|
611
615
|
if (actionResult.success) {
|
|
612
616
|
// Success recovery — stimulation-seeking personas recover faster from novelty
|
|
613
|
-
newConfusionLevel = Math.max(0, newConfusionLevel -
|
|
614
|
-
newFrustrationLevel = Math.max(0, newFrustrationLevel -
|
|
617
|
+
newConfusionLevel = Math.max(0, newConfusionLevel - param("journeyMcp.update.confusionRecovery") * stimulationMod);
|
|
618
|
+
newFrustrationLevel = Math.max(0, newFrustrationLevel - param("journeyMcp.update.frustrationRecovery"));
|
|
615
619
|
if (actionResult.progressMade) {
|
|
616
620
|
// Achievement-driven personas get bigger confidence boost from progress
|
|
617
|
-
newConfidenceLevel = Math.min(1, newConfidenceLevel +
|
|
621
|
+
newConfidenceLevel = Math.min(1, newConfidenceLevel + param("journeyMcp.update.confidenceGain") * achievementMod);
|
|
618
622
|
}
|
|
619
623
|
}
|
|
620
624
|
else {
|
|
621
625
|
// Failure — security-focused personas accumulate MORE frustration on failure
|
|
622
|
-
newFrustrationLevel = Math.min(1, newFrustrationLevel +
|
|
626
|
+
newFrustrationLevel = Math.min(1, newFrustrationLevel + param("journeyMcp.update.frustrationPerFailure") * securityMod);
|
|
623
627
|
}
|
|
624
628
|
if (actionResult.wasConfusing) {
|
|
625
629
|
// Confusion — conformity-seeking personas get more confused without clear guidance
|
|
626
|
-
newConfusionLevel = Math.min(1, newConfusionLevel + (1 - personaTraits.comprehension) *
|
|
630
|
+
newConfusionLevel = Math.min(1, newConfusionLevel + (1 - personaTraits.comprehension) * param("journeyMcp.update.confusionPerConfusing") * conformityMod);
|
|
627
631
|
}
|
|
628
632
|
if (actionResult.wentBack) {
|
|
629
633
|
// Going back — security-focused personas lose more confidence (risk aversion)
|
|
630
|
-
newConfidenceLevel = Math.max(0, newConfidenceLevel -
|
|
634
|
+
newConfidenceLevel = Math.max(0, newConfidenceLevel - param("journeyMcp.update.confidenceLossOnBack") * securityMod);
|
|
631
635
|
}
|
|
632
636
|
// Mood resolved from the FINAL levels, by whichever dimension actually
|
|
633
637
|
// dominates. It used to be assigned inside whichever branch happened to
|
|
@@ -636,10 +640,10 @@ Begin the simulation now. Narrate your thoughts as this persona.
|
|
|
636
640
|
// persona carrying frustration 0.85 into a successful-but-confusing step
|
|
637
641
|
// came out "confused" while frustration outranked confusion 0.85 to 0.65.
|
|
638
642
|
// (2026-07-29)
|
|
639
|
-
if (newFrustrationLevel >
|
|
643
|
+
if (newFrustrationLevel > param("journeyMcp.mood.defeatedFrustration") && personaTraits.persistence < param("journeyMcp.mood.defeatedPersistence")) {
|
|
640
644
|
newMood = "defeated";
|
|
641
645
|
}
|
|
642
|
-
else if (newFrustrationLevel >
|
|
646
|
+
else if (newFrustrationLevel > param("journeyMcp.mood.frustrated") || newConfusionLevel > param("journeyMcp.mood.confused")) {
|
|
643
647
|
newMood = newFrustrationLevel >= newConfusionLevel ? "frustrated" : "confused";
|
|
644
648
|
}
|
|
645
649
|
else if (actionResult.success && actionResult.progressMade) {
|
|
@@ -650,7 +654,7 @@ Begin the simulation now. Narrate your thoughts as this persona.
|
|
|
650
654
|
// state threading dropped it. progressMade already means "the goal moved",
|
|
651
655
|
// so advance it there and echo it otherwise.
|
|
652
656
|
const newGoalProgress = actionResult.progressMade
|
|
653
|
-
? Math.min(1, currentState.goalProgress +
|
|
657
|
+
? Math.min(1, currentState.goalProgress + param("journeyMcp.update.progressPerStep"))
|
|
654
658
|
: currentState.goalProgress;
|
|
655
659
|
const newState = {
|
|
656
660
|
goalProgress: newGoalProgress,
|
|
@@ -660,7 +664,7 @@ Begin the simulation now. Narrate your thoughts as this persona.
|
|
|
660
664
|
confidenceLevel: newConfidenceLevel,
|
|
661
665
|
currentMood: newMood,
|
|
662
666
|
stepCount: currentState.stepCount + 1,
|
|
663
|
-
timeElapsed: currentState.timeElapsed +
|
|
667
|
+
timeElapsed: currentState.timeElapsed + param("journeyMcp.update.secondsPerStep"),
|
|
664
668
|
};
|
|
665
669
|
let shouldAbandon = false;
|
|
666
670
|
let abandonmentReason;
|
|
@@ -668,9 +672,11 @@ Begin the simulation now. Narrate your thoughts as this persona.
|
|
|
668
672
|
// Abandonment thresholds — values shift sensitivity
|
|
669
673
|
// Security-focused personas abandon earlier on risk/uncertainty
|
|
670
674
|
// Achievement-focused personas abandon earlier on inefficiency
|
|
671
|
-
const patienceThreshold =
|
|
672
|
-
const frustrationThreshold =
|
|
673
|
-
const confusionThreshold =
|
|
675
|
+
const patienceThreshold = param("journey.abandon.patienceFloor");
|
|
676
|
+
const frustrationThreshold = param("journeyMcp.abandon.frustrationLimit") / securityMod; // Lower threshold for high-security personas
|
|
677
|
+
const confusionThreshold = param("journeyMcp.abandon.confusionLimit") / conformityMod; // Lower threshold for high-conformity personas
|
|
678
|
+
const epsilon = param("journeyMcp.update.marginEpsilon");
|
|
679
|
+
const highValue = param("journeyMcp.valueLabel.high");
|
|
674
680
|
// Precedence used to be an implicit if/else chain — patience, then
|
|
675
681
|
// frustration, then confusion — so when two dimensions breached at once
|
|
676
682
|
// the reported reason depended on source order and nothing said which had
|
|
@@ -682,15 +688,15 @@ Begin the simulation now. Narrate your thoughts as this persona.
|
|
|
682
688
|
if (newState.patienceRemaining < patienceThreshold) {
|
|
683
689
|
breaches.push({
|
|
684
690
|
reason: "patience",
|
|
685
|
-
margin: (patienceThreshold - newState.patienceRemaining) / Math.max(patienceThreshold,
|
|
691
|
+
margin: (patienceThreshold - newState.patienceRemaining) / Math.max(patienceThreshold, epsilon),
|
|
686
692
|
message: "This is taking too long. I give up.",
|
|
687
693
|
});
|
|
688
694
|
}
|
|
689
695
|
if (newState.frustrationLevel > frustrationThreshold) {
|
|
690
696
|
breaches.push({
|
|
691
697
|
reason: "frustration",
|
|
692
|
-
margin: (newState.frustrationLevel - frustrationThreshold) / Math.max(frustrationThreshold,
|
|
693
|
-
message: (v.security ??
|
|
698
|
+
margin: (newState.frustrationLevel - frustrationThreshold) / Math.max(frustrationThreshold, epsilon),
|
|
699
|
+
message: (v.security ?? neutral) > highValue
|
|
694
700
|
? "This doesn't feel safe or reliable. I'm leaving."
|
|
695
701
|
: "This is so frustrating! I'm done.",
|
|
696
702
|
});
|
|
@@ -700,8 +706,8 @@ Begin the simulation now. Narrate your thoughts as this persona.
|
|
|
700
706
|
if (newState.confusionLevel > confusionThreshold && currentState.confusionLevel > confusionThreshold) {
|
|
701
707
|
breaches.push({
|
|
702
708
|
reason: "confusion",
|
|
703
|
-
margin: (newState.confusionLevel - confusionThreshold) / Math.max(confusionThreshold,
|
|
704
|
-
message: (v.conformity ??
|
|
709
|
+
margin: (newState.confusionLevel - confusionThreshold) / Math.max(confusionThreshold, epsilon),
|
|
710
|
+
message: (v.conformity ?? neutral) > highValue
|
|
705
711
|
? "I can't tell what most people would do here. I'll try something else."
|
|
706
712
|
: "I have no idea what I'm supposed to do here.",
|
|
707
713
|
});
|
|
@@ -890,16 +896,16 @@ Begin the simulation now. Narrate your thoughts as this persona.
|
|
|
890
896
|
cognitiveTraits: p.traits,
|
|
891
897
|
values: p.values ? (() => {
|
|
892
898
|
const sv = {
|
|
893
|
-
selfDirection: p.values.selfDirection
|
|
894
|
-
stimulation: p.values.stimulation
|
|
895
|
-
hedonism: p.values.hedonism
|
|
896
|
-
achievement: p.values.achievement
|
|
897
|
-
power: p.values.power
|
|
898
|
-
security: p.values.security
|
|
899
|
-
conformity: p.values.conformity
|
|
900
|
-
tradition: p.values.tradition
|
|
901
|
-
benevolence: p.values.benevolence
|
|
902
|
-
universalism: p.values.universalism
|
|
899
|
+
selfDirection: cmsValue(p.values.selfDirection),
|
|
900
|
+
stimulation: cmsValue(p.values.stimulation),
|
|
901
|
+
hedonism: cmsValue(p.values.hedonism),
|
|
902
|
+
achievement: cmsValue(p.values.achievement),
|
|
903
|
+
power: cmsValue(p.values.power),
|
|
904
|
+
security: cmsValue(p.values.security),
|
|
905
|
+
conformity: cmsValue(p.values.conformity),
|
|
906
|
+
tradition: cmsValue(p.values.tradition),
|
|
907
|
+
benevolence: cmsValue(p.values.benevolence),
|
|
908
|
+
universalism: cmsValue(p.values.universalism),
|
|
903
909
|
};
|
|
904
910
|
// Delegated to the shared resolver rather than recomputed here.
|
|
905
911
|
//
|
|
@@ -935,9 +941,9 @@ Begin the simulation now. Narrate your thoughts as this persona.
|
|
|
935
941
|
? { higherOrderWithImputed: resolved.higherOrderWithImputed }
|
|
936
942
|
: {}),
|
|
937
943
|
sdt: {
|
|
938
|
-
autonomyNeed: p.values.autonomyNeed
|
|
939
|
-
competenceNeed: p.values.competenceNeed
|
|
940
|
-
relatednessNeed: p.values.relatednessNeed
|
|
944
|
+
autonomyNeed: cmsValue(p.values.autonomyNeed),
|
|
945
|
+
competenceNeed: cmsValue(p.values.competenceNeed),
|
|
946
|
+
relatednessNeed: cmsValue(p.values.relatednessNeed),
|
|
941
947
|
},
|
|
942
948
|
valuesSource: resolved.source,
|
|
943
949
|
maslowLevel: resolved.maslowLevel,
|