cbrowser 18.78.0 → 18.80.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (235) hide show
  1. package/dist/analysis/accessibility-empathy.d.ts.map +1 -1
  2. package/dist/analysis/accessibility-empathy.js +395 -66
  3. package/dist/analysis/accessibility-empathy.js.map +1 -1
  4. package/dist/analysis/agent-ready-audit.d.ts.map +1 -1
  5. package/dist/analysis/agent-ready-audit.js +78 -0
  6. package/dist/analysis/agent-ready-audit.js.map +1 -1
  7. package/dist/analysis/page-understanding.d.ts +139 -1
  8. package/dist/analysis/page-understanding.d.ts.map +1 -1
  9. package/dist/analysis/page-understanding.js +179 -12
  10. package/dist/analysis/page-understanding.js.map +1 -1
  11. package/dist/artifact-store.d.ts +19 -5
  12. package/dist/artifact-store.d.ts.map +1 -1
  13. package/dist/artifact-store.js +41 -11
  14. package/dist/artifact-store.js.map +1 -1
  15. package/dist/browser.d.ts +9 -0
  16. package/dist/browser.d.ts.map +1 -1
  17. package/dist/browser.js +81 -5
  18. package/dist/browser.js.map +1 -1
  19. package/dist/cli.js +55 -10
  20. package/dist/cli.js.map +1 -1
  21. package/dist/cognitive/index.d.ts.map +1 -1
  22. package/dist/cognitive/index.js +3 -2
  23. package/dist/cognitive/index.js.map +1 -1
  24. package/dist/config.d.ts +57 -0
  25. package/dist/config.d.ts.map +1 -1
  26. package/dist/config.js +234 -7
  27. package/dist/config.js.map +1 -1
  28. package/dist/index.js +1 -1
  29. package/dist/index.js.map +1 -1
  30. package/dist/mcp-server-remote.d.ts.map +1 -1
  31. package/dist/mcp-server-remote.js +108 -4
  32. package/dist/mcp-server-remote.js.map +1 -1
  33. package/dist/mcp-server.d.ts.map +1 -1
  34. package/dist/mcp-server.js +62 -938
  35. package/dist/mcp-server.js.map +1 -1
  36. package/dist/mcp-tools/account-personas.d.ts +41 -0
  37. package/dist/mcp-tools/account-personas.d.ts.map +1 -0
  38. package/dist/mcp-tools/account-personas.js +98 -0
  39. package/dist/mcp-tools/account-personas.js.map +1 -0
  40. package/dist/mcp-tools/base/analysis-tools.d.ts.map +1 -1
  41. package/dist/mcp-tools/base/analysis-tools.js +12 -2
  42. package/dist/mcp-tools/base/analysis-tools.js.map +1 -1
  43. package/dist/mcp-tools/base/artifact-tools.d.ts +3 -0
  44. package/dist/mcp-tools/base/artifact-tools.d.ts.map +1 -0
  45. package/dist/mcp-tools/base/artifact-tools.js +78 -0
  46. package/dist/mcp-tools/base/artifact-tools.js.map +1 -0
  47. package/dist/mcp-tools/base/audit-tools.d.ts +11 -0
  48. package/dist/mcp-tools/base/audit-tools.d.ts.map +1 -1
  49. package/dist/mcp-tools/base/audit-tools.js +595 -340
  50. package/dist/mcp-tools/base/audit-tools.js.map +1 -1
  51. package/dist/mcp-tools/base/browser-management-tools.d.ts.map +1 -1
  52. package/dist/mcp-tools/base/browser-management-tools.js +18 -0
  53. package/dist/mcp-tools/base/browser-management-tools.js.map +1 -1
  54. package/dist/mcp-tools/base/bug-analysis-tools.d.ts.map +1 -1
  55. package/dist/mcp-tools/base/bug-analysis-tools.js +59 -3
  56. package/dist/mcp-tools/base/bug-analysis-tools.js.map +1 -1
  57. package/dist/mcp-tools/base/capture-tools.d.ts +37 -0
  58. package/dist/mcp-tools/base/capture-tools.d.ts.map +1 -1
  59. package/dist/mcp-tools/base/capture-tools.js +267 -6
  60. package/dist/mcp-tools/base/capture-tools.js.map +1 -1
  61. package/dist/mcp-tools/base/cognitive-tools.d.ts +12 -0
  62. package/dist/mcp-tools/base/cognitive-tools.d.ts.map +1 -1
  63. package/dist/mcp-tools/base/cognitive-tools.js +63 -15
  64. package/dist/mcp-tools/base/cognitive-tools.js.map +1 -1
  65. package/dist/mcp-tools/base/extraction-tools.d.ts.map +1 -1
  66. package/dist/mcp-tools/base/extraction-tools.js +33 -2
  67. package/dist/mcp-tools/base/extraction-tools.js.map +1 -1
  68. package/dist/mcp-tools/base/index.d.ts +2 -0
  69. package/dist/mcp-tools/base/index.d.ts.map +1 -1
  70. package/dist/mcp-tools/base/index.js +9 -0
  71. package/dist/mcp-tools/base/index.js.map +1 -1
  72. package/dist/mcp-tools/base/marketing-tools.js +3 -3
  73. package/dist/mcp-tools/base/marketing-tools.js.map +1 -1
  74. package/dist/mcp-tools/base/persona-comparison-tools.d.ts.map +1 -1
  75. package/dist/mcp-tools/base/persona-comparison-tools.js +529 -40
  76. package/dist/mcp-tools/base/persona-comparison-tools.js.map +1 -1
  77. package/dist/mcp-tools/base/site-knowledge-tools.d.ts.map +1 -1
  78. package/dist/mcp-tools/base/site-knowledge-tools.js +36 -3
  79. package/dist/mcp-tools/base/site-knowledge-tools.js.map +1 -1
  80. package/dist/mcp-tools/base/values-tools.d.ts +113 -0
  81. package/dist/mcp-tools/base/values-tools.d.ts.map +1 -1
  82. package/dist/mcp-tools/base/values-tools.js +868 -78
  83. package/dist/mcp-tools/base/values-tools.js.map +1 -1
  84. package/dist/mcp-tools/base/visual-testing-tools.d.ts.map +1 -1
  85. package/dist/mcp-tools/base/visual-testing-tools.js +130 -10
  86. package/dist/mcp-tools/base/visual-testing-tools.js.map +1 -1
  87. package/dist/mcp-tools/index.d.ts +3 -1
  88. package/dist/mcp-tools/index.d.ts.map +1 -1
  89. package/dist/mcp-tools/index.js +3 -28
  90. package/dist/mcp-tools/index.js.map +1 -1
  91. package/dist/mcp-tools/persona-creation-tools.d.ts.map +1 -1
  92. package/dist/mcp-tools/persona-creation-tools.js +363 -20
  93. package/dist/mcp-tools/persona-creation-tools.js.map +1 -1
  94. package/dist/mcp-tools/persona-lifecycle-tools.d.ts +3 -0
  95. package/dist/mcp-tools/persona-lifecycle-tools.d.ts.map +1 -0
  96. package/dist/mcp-tools/persona-lifecycle-tools.js +406 -0
  97. package/dist/mcp-tools/persona-lifecycle-tools.js.map +1 -0
  98. package/dist/mcp-tools/screenshot-utils.d.ts.map +1 -1
  99. package/dist/mcp-tools/screenshot-utils.js +56 -10
  100. package/dist/mcp-tools/screenshot-utils.js.map +1 -1
  101. package/dist/mcp-tools/tier-gate.js +2 -2
  102. package/dist/mcp-tools/tier-gate.js.map +1 -1
  103. package/dist/mcp-tools/tool-categories.d.ts.map +1 -1
  104. package/dist/mcp-tools/tool-categories.js +4 -1
  105. package/dist/mcp-tools/tool-categories.js.map +1 -1
  106. package/dist/mcp-tools/ui-resources.d.ts +167 -0
  107. package/dist/mcp-tools/ui-resources.d.ts.map +1 -0
  108. package/dist/mcp-tools/ui-resources.js +707 -0
  109. package/dist/mcp-tools/ui-resources.js.map +1 -0
  110. package/dist/mcp-tools/widget-kit.d.ts +299 -0
  111. package/dist/mcp-tools/widget-kit.d.ts.map +1 -0
  112. package/dist/mcp-tools/widget-kit.js +2034 -0
  113. package/dist/mcp-tools/widget-kit.js.map +1 -0
  114. package/dist/mcp-ui-resources.d.ts.map +1 -1
  115. package/dist/mcp-ui-resources.js +14 -4
  116. package/dist/mcp-ui-resources.js.map +1 -1
  117. package/dist/persona-questionnaire.d.ts +69 -1
  118. package/dist/persona-questionnaire.d.ts.map +1 -1
  119. package/dist/persona-questionnaire.js +177 -76
  120. package/dist/persona-questionnaire.js.map +1 -1
  121. package/dist/persona-scope.d.ts +20 -0
  122. package/dist/persona-scope.d.ts.map +1 -0
  123. package/dist/persona-scope.js +59 -0
  124. package/dist/persona-scope.js.map +1 -0
  125. package/dist/personas.d.ts +51 -17
  126. package/dist/personas.d.ts.map +1 -1
  127. package/dist/personas.js +947 -286
  128. package/dist/personas.js.map +1 -1
  129. package/dist/recording/capture-player.d.ts +68 -0
  130. package/dist/recording/capture-player.d.ts.map +1 -0
  131. package/dist/recording/capture-player.js +298 -0
  132. package/dist/recording/capture-player.js.map +1 -0
  133. package/dist/recording/engine.d.ts +52 -0
  134. package/dist/recording/engine.d.ts.map +1 -1
  135. package/dist/recording/engine.js +241 -3
  136. package/dist/recording/engine.js.map +1 -1
  137. package/dist/recording/inline-player.d.ts +39 -0
  138. package/dist/recording/inline-player.d.ts.map +1 -0
  139. package/dist/recording/inline-player.js +272 -0
  140. package/dist/recording/inline-player.js.map +1 -0
  141. package/dist/recording/saliency-overlay.d.ts +133 -0
  142. package/dist/recording/saliency-overlay.d.ts.map +1 -0
  143. package/dist/recording/saliency-overlay.js +360 -0
  144. package/dist/recording/saliency-overlay.js.map +1 -0
  145. package/dist/recording/types.d.ts +32 -0
  146. package/dist/recording/types.d.ts.map +1 -1
  147. package/dist/recording/types.js +46 -0
  148. package/dist/recording/types.js.map +1 -1
  149. package/dist/site-model/manager.d.ts +20 -0
  150. package/dist/site-model/manager.d.ts.map +1 -1
  151. package/dist/site-model/manager.js +52 -0
  152. package/dist/site-model/manager.js.map +1 -1
  153. package/dist/trait-reference.d.ts +26 -2
  154. package/dist/trait-reference.d.ts.map +1 -1
  155. package/dist/trait-reference.js +129 -19
  156. package/dist/trait-reference.js.map +1 -1
  157. package/dist/types.d.ts +105 -18
  158. package/dist/types.d.ts.map +1 -1
  159. package/dist/types.js.map +1 -1
  160. package/dist/url-resolution.d.ts +58 -0
  161. package/dist/url-resolution.d.ts.map +1 -0
  162. package/dist/url-resolution.js +143 -0
  163. package/dist/url-resolution.js.map +1 -0
  164. package/dist/values/big-five-inference.d.ts +121 -0
  165. package/dist/values/big-five-inference.d.ts.map +1 -0
  166. package/dist/values/big-five-inference.js +241 -0
  167. package/dist/values/big-five-inference.js.map +1 -0
  168. package/dist/values/big-five-values.d.ts +76 -0
  169. package/dist/values/big-five-values.d.ts.map +1 -0
  170. package/dist/values/big-five-values.js +152 -0
  171. package/dist/values/big-five-values.js.map +1 -0
  172. package/dist/values/index.d.ts +1 -1
  173. package/dist/values/index.d.ts.map +1 -1
  174. package/dist/values/index.js +1 -1
  175. package/dist/values/index.js.map +1 -1
  176. package/dist/values/persona-completeness.d.ts +91 -0
  177. package/dist/values/persona-completeness.d.ts.map +1 -0
  178. package/dist/values/persona-completeness.js +114 -0
  179. package/dist/values/persona-completeness.js.map +1 -0
  180. package/dist/values/persona-diff.d.ts +50 -0
  181. package/dist/values/persona-diff.d.ts.map +1 -0
  182. package/dist/values/persona-diff.js +126 -0
  183. package/dist/values/persona-diff.js.map +1 -0
  184. package/dist/values/persona-values.d.ts +16 -0
  185. package/dist/values/persona-values.d.ts.map +1 -1
  186. package/dist/values/persona-values.js +33 -0
  187. package/dist/values/persona-values.js.map +1 -1
  188. package/dist/values/schwartz-values.d.ts +9 -1
  189. package/dist/values/schwartz-values.d.ts.map +1 -1
  190. package/dist/values/schwartz-values.js +10 -2
  191. package/dist/values/schwartz-values.js.map +1 -1
  192. package/dist/values/value-mappings.d.ts +41 -2
  193. package/dist/values/value-mappings.d.ts.map +1 -1
  194. package/dist/values/value-mappings.js +65 -8
  195. package/dist/values/value-mappings.js.map +1 -1
  196. package/dist/visual/attention-quality.d.ts +27 -0
  197. package/dist/visual/attention-quality.d.ts.map +1 -1
  198. package/dist/visual/attention-quality.js +164 -2
  199. package/dist/visual/attention-quality.js.map +1 -1
  200. package/dist/visual/attention-transport.d.ts +41 -2
  201. package/dist/visual/attention-transport.d.ts.map +1 -1
  202. package/dist/visual/attention-transport.js +98 -26
  203. package/dist/visual/attention-transport.js.map +1 -1
  204. package/dist/visual/barrier-overlay-html.d.ts +10 -0
  205. package/dist/visual/barrier-overlay-html.d.ts.map +1 -1
  206. package/dist/visual/barrier-overlay-html.js.map +1 -1
  207. package/dist/visual/cognitive-models.d.ts +109 -13
  208. package/dist/visual/cognitive-models.d.ts.map +1 -1
  209. package/dist/visual/cognitive-models.js +166 -3
  210. package/dist/visual/cognitive-models.js.map +1 -1
  211. package/dist/visual/cognitive-transport-chain.d.ts +149 -5
  212. package/dist/visual/cognitive-transport-chain.d.ts.map +1 -1
  213. package/dist/visual/cognitive-transport-chain.js +558 -30
  214. package/dist/visual/cognitive-transport-chain.js.map +1 -1
  215. package/dist/visual/cognitive-transport.d.ts +45 -3
  216. package/dist/visual/cognitive-transport.d.ts.map +1 -1
  217. package/dist/visual/cognitive-transport.js +126 -12
  218. package/dist/visual/cognitive-transport.js.map +1 -1
  219. package/dist/visual/fixation-corpus.d.ts +52 -0
  220. package/dist/visual/fixation-corpus.d.ts.map +1 -1
  221. package/dist/visual/fixation-corpus.js +95 -0
  222. package/dist/visual/fixation-corpus.js.map +1 -1
  223. package/dist/visual/llm-relevance.d.ts +193 -0
  224. package/dist/visual/llm-relevance.d.ts.map +1 -0
  225. package/dist/visual/llm-relevance.js +480 -0
  226. package/dist/visual/llm-relevance.js.map +1 -0
  227. package/dist/visual/perceptual-transport.d.ts +60 -0
  228. package/dist/visual/perceptual-transport.d.ts.map +1 -1
  229. package/dist/visual/perceptual-transport.js +228 -19
  230. package/dist/visual/perceptual-transport.js.map +1 -1
  231. package/dist/visual/persona-context.d.ts +23 -0
  232. package/dist/visual/persona-context.d.ts.map +1 -0
  233. package/dist/visual/persona-context.js +44 -0
  234. package/dist/visual/persona-context.js.map +1 -0
  235. package/package.json +2 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widget-kit.js","sourceRoot":"","sources":["../../src/mcp-tools/widget-kit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,6EAA6E;AAC7E,MAAM,CAAC,MAAM,YAAY,GAAG,2BAA2B,CAAC;AAmNxD,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EAAU,EAAU,EAAE,CAAC,iBAAiB,EAAE,EAAE,CAAC;AAEvE,8EAA8E;AAC9E,iBAAiB;AACjB,8EAA8E;AAE9E,MAAM,IAAI,GAAG,GAAW,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAA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;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE,MAAM,WAAW,qBAAqB;IACpC,qDAAqD;IACrD,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B;AAoBD,wEAAwE;AACxE,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAExD;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,QAAQ,MAAM,EAAE,EACrB,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,OAAO,GAAE,qBAA0B,GAClC,gBAAgB,GAAG,IAAI,CAgBzB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,GAAG,EAAE,QAAQ,MAAM,EAAE,EACrB,GAAG,EAAE,MAAM,GAAG,SAAS,GACtB,gBAAgB,GAAG,IAAI,CAiBzB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,gBAAgB,EAAE,EAC3B,QAAQ,EAAE,gBAAgB,GAAG,IAAI,GAChC,gBAAgB,EAAE,CAGpB;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAExD"}
@@ -40,11 +40,21 @@ import { createUIResource } from "@mcp-ui/server";
40
40
  export const UI_RESOURCE_MAX_BYTES = 400_000;
41
41
  /**
42
42
  * Patterns that would make the HTML depend on a network the iframe may not be
43
- * allowed to reach. `src="https://cbrowser.ai/heatmaps/…"` is the deliberate
44
- * exception: our own served artifacts are the entire point of the overlay, and
45
- * they are same-site with the product.
43
+ * allowed to reach.
44
+ *
45
+ * cbrowser.ai was previously exempted here on the grounds that our own served
46
+ * artifacts are same-site with the product. That is true of a browser tab and
47
+ * false of the widget sandbox, whose CSP allowlists a fixed set of origins not
48
+ * including ours -- measured against the real policy, a control img on
49
+ * cbrowser.ai was blocked with a logged violation while a data: URI rendered.
50
+ * The exemption therefore let through exactly the HTML that cannot work, and
51
+ * because overlay boxes are absolutely positioned, the failure looked like ten
52
+ * outlines floating over empty space rather than a broken image.
53
+ *
54
+ * No exemption now: HTML that reaches off-origin for something it needs is
55
+ * rejected, and callers inline the bytes instead.
46
56
  */
47
- const REMOTE_REF = /(?:\bsrc\s*=\s*["']https?:\/\/(?!cbrowser\.ai\/)|@import\s|<link[^>]+href\s*=\s*["']https?:|\bfetch\s*\(|XMLHttpRequest|new\s+WebSocket)/i;
57
+ const REMOTE_REF = /(?:\bsrc\s*=\s*["']https?:\/\/|@import\s|<link[^>]+href\s*=\s*["']https?:|\bfetch\s*\(|XMLHttpRequest|new\s+WebSocket)/i;
48
58
  /** True when the HTML reaches outside itself for something it needs. */
49
59
  export function hasRemoteReference(html) {
50
60
  return REMOTE_REF.test(html);
@@ -1 +1 @@
1
- {"version":3,"file":"mcp-ui-resources.js","sourceRoot":"","sources":["../src/mcp-ui-resources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGlD;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,OAAO,CAAC;AAc7C;;;;;GAKG;AACH,MAAM,UAAU,GAAG,2IAA2I,CAAC;AAE/J,wEAAwE;AACxE,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC7C,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC/B,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAC5B,GAAqB,EACrB,IAAwB,EACxB,UAAiC,EAAE;IAEnC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAC5C,IAAI,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,qBAAqB;QAAE,OA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C;YAC3F,mEAAmE;SACpE,CAAgC,CAAC;IACpC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAC3B,GAAqB,EACrB,GAAuB;IAEvB,IAAI,CAAC,GAAG;QAAE,OAAO,IAAI,CAAC;IACtB,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;QAC5B,IAAI,MAAM,CAAC,QAAQ,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,KAAK,OAAO;YAAE,OAAO,IAAI,CAAC;IAC/E,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,CAAC;QACH,OAAO,gBAAgB,CAAC;YACtB,GAAG;YACH,OAAO,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,SAAS,EAAE,GAAG,EAAE;YAChD,QAAQ,EAAE,MAAM;SACjB,CAAgC,CAAC;IACpC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAC9B,OAA2B,EAC3B,QAAiC;IAEjC,IAAI,QAAQ;QAAE,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACrC,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,GAAY;IAC7C,OAAO,GAAG,KAAK,KAAK,CAAC;AACvB,CAAC"}
@@ -26,7 +26,25 @@ export interface TraitReference {
26
26
  export declare const TRAIT_REFERENCE_MATRIX: TraitReference[];
27
27
  export interface QuestionnaireQuestion {
28
28
  id: string;
29
- trait: keyof CognitiveTraits;
29
+ /**
30
+ * Absent on Big Five items. They previously carried a placeholder trait to
31
+ * satisfy this field, which implied a trait-to-factor link that does not
32
+ * exist and invited exactly the wrong reading of the derivation chain:
33
+ * that Big Five is computed FROM the 26 traits and values are two hops
34
+ * downstream. It is not. Big Five is supplied by whoever answers, and values
35
+ * derive from it in one hop. (2026-08-01)
36
+ */
37
+ trait?: keyof CognitiveTraits;
38
+ /**
39
+ * Set instead of a trait when the question asks about a value axis directly.
40
+ *
41
+ * Four Schwartz axes -- hedonism, power, universalism, relatednessNeed -- have
42
+ * no trait correlation, so no combination of trait answers can move them off
43
+ * the 0.5 baseline. Asking about them straight is the only route to a real
44
+ * number that involves no inference at all, which makes it the most defensible
45
+ * one available. (2026-08-01)
46
+ */
47
+ valueAxis?: string;
30
48
  question: string;
31
49
  options: Array<{
32
50
  value: number;
@@ -38,6 +56,45 @@ export interface QuestionnaireQuestion {
38
56
  * Generate a questionnaire for building a custom persona.
39
57
  * Returns a subset of questions covering the most impactful traits.
40
58
  */
59
+ /**
60
+ * Direct questions for the value axes no trait can reach.
61
+ *
62
+ * Worded as everyday preferences rather than as the Schwartz construct name:
63
+ * "power" asks about wanting influence over outcomes, not about the word power.
64
+ * Four options, matching the trait questions' 0 / 0.33 / 0.67 / 1 scale.
65
+ */
66
+ /**
67
+ * Five Big Five items, one per factor.
68
+ *
69
+ * This is the better route to values than the four direct questions below,
70
+ * because the published value correlations are with the Big Five — deriving
71
+ * from these crosses no gap the research does not cover, whereas deriving from
72
+ * cognitive traits always does. Five items also reach all thirteen axes rather
73
+ * than the four the direct questions patch.
74
+ *
75
+ * Written plainly rather than reproducing a published instrument's items. That
76
+ * costs validation: these are not the TIPI or the BFI-10 and carry none of
77
+ * their psychometric properties. They are a usable estimate for simulation, not
78
+ * a measurement of a person. (2026-08-01)
79
+ */
80
+ export declare const BIG_FIVE_QUESTIONS: QuestionnaireQuestion[];
81
+ /** Big Five scores from questionnaire answers; absent factors are omitted. */
82
+ export declare function buildBigFiveFromAnswers(answers: Record<string, number>): Record<string, number>;
83
+ /**
84
+ * There is no VALUE_AXIS_QUESTIONS here on purpose.
85
+ *
86
+ * A first pass added four direct questions for hedonism, power, universalism
87
+ * and relatedness — the axes no cognitive trait can reach. They were redundant:
88
+ * persona-creation-tools.ts already carries VALUES_QUESTIONS, ten items, one
89
+ * per Schwartz value, and the questionnaire flow already prefers an answered
90
+ * value over a derived one. The four axes were never broken for personas built
91
+ * through the questionnaire; they are broken for every other route, which is
92
+ * what the Big Five items above are for.
93
+ *
94
+ * Two competing sets of questions for the same axes would have been the worse
95
+ * outcome — whichever one a caller found first would silently decide which
96
+ * wording a persona was scored against. (2026-08-01)
97
+ */
41
98
  export declare function generatePersonaQuestionnaire(options?: {
42
99
  comprehensive?: boolean;
43
100
  traits?: (keyof CognitiveTraits)[];
@@ -205,6 +262,17 @@ export declare const TRAIT_VALUE_CORRELATIONS: Record<string, {
205
262
  * @param traits - Cognitive traits (0-1 scale)
206
263
  * @returns Derived values with research basis
207
264
  */
265
+ /**
266
+ * How many trait correlations target each value axis.
267
+ *
268
+ * Lets a consumer tell two very different 0.5s apart: an axis with no
269
+ * correlations can never leave the baseline, while an axis whose correlations
270
+ * happen to cancel is a real reading that landed near the middle. tradition on
271
+ * one persona nets to -0.01 from patience and authoritySensitivity pulling
272
+ * opposite ways -- indistinguishable from unpopulated in the output, and not
273
+ * the same thing at all. (2026-08-01)
274
+ */
275
+ export declare function valueAxisCorrelationCounts(): Record<string, number>;
208
276
  export declare function deriveValuesFromTraits(traits: Partial<CognitiveTraits> | Record<string, number>): {
209
277
  values: Partial<CategoryValuePreset["defaultValues"]>;
210
278
  derivations: Array<{
@@ -1 +1 @@
1
- {"version":3,"file":"persona-questionnaire.d.ts","sourceRoot":"","sources":["../src/persona-questionnaire.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAOlD,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,aAAa,CAA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aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,CA8FA;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EACzB,MAAM,EAAE,OAAO,CAAC,mBAAmB,CAAC,eAAe,CAAC,CAAC,GACpD,MAAM,EAAE,CA8CV;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,eAAe,CAAA;KAAE,CAAC,CAAC;CAyCnF,CAAC"}
@@ -527,7 +527,7 @@ export const TRAIT_REFERENCE_MATRIX = [
527
527
  {
528
528
  name: "satisficing",
529
529
  description: "Decision style: accept 'good enough' vs. seek optimal",
530
- researchBasis: "Simon (1956) - Bounded Rationality; Schwartz (2002) - Maximizing vs Satisficing",
530
+ researchBasis: "Simon (1956) - Bounded Rationality; Schwartz, B. (2002) - Maximizing vs Satisficing",
531
531
  levels: [
532
532
  {
533
533
  value: 0.0,
@@ -1380,7 +1380,7 @@ export const TRAIT_REFERENCE_MATRIX = [
1380
1380
  ],
1381
1381
  },
1382
1382
  {
1383
- name: "mentalModelRigidity",
1383
+ name: "mentalModelFlexibility",
1384
1384
  description: "Ability to update mental models when interfaces change",
1385
1385
  researchBasis: "Johnson-Laird (1983) - Mental Models; Norman (2013) - Design of Everyday Things",
1386
1386
  levels: [
@@ -1436,67 +1436,109 @@ export const TRAIT_REFERENCE_MATRIX = [
1436
1436
  },
1437
1437
  ],
1438
1438
  },
1439
+ ];
1440
+ /**
1441
+ * Generate a questionnaire for building a custom persona.
1442
+ * Returns a subset of questions covering the most impactful traits.
1443
+ */
1444
+ /**
1445
+ * Direct questions for the value axes no trait can reach.
1446
+ *
1447
+ * Worded as everyday preferences rather than as the Schwartz construct name:
1448
+ * "power" asks about wanting influence over outcomes, not about the word power.
1449
+ * Four options, matching the trait questions' 0 / 0.33 / 0.67 / 1 scale.
1450
+ */
1451
+ /**
1452
+ * Five Big Five items, one per factor.
1453
+ *
1454
+ * This is the better route to values than the four direct questions below,
1455
+ * because the published value correlations are with the Big Five — deriving
1456
+ * from these crosses no gap the research does not cover, whereas deriving from
1457
+ * cognitive traits always does. Five items also reach all thirteen axes rather
1458
+ * than the four the direct questions patch.
1459
+ *
1460
+ * Written plainly rather than reproducing a published instrument's items. That
1461
+ * costs validation: these are not the TIPI or the BFI-10 and carry none of
1462
+ * their psychometric properties. They are a usable estimate for simulation, not
1463
+ * a measurement of a person. (2026-08-01)
1464
+ */
1465
+ export const BIG_FIVE_QUESTIONS = [
1439
1466
  {
1440
- name: "siteFamiliarity",
1441
- description: "How much the persona knows about a site from prior visits",
1442
- researchBasis: "Cockburn et al. (2007) - Familiar Interfaces; Tauscher & Greenberg (1997) - How people revisit web pages; Weinreich et al. (2008) - Off the beaten tracks",
1443
- levels: [
1444
- {
1445
- value: 0.0,
1446
- label: "Brand New Visitor",
1447
- behaviors: [
1448
- "Has never visited this site before",
1449
- "No memory of navigation or layout",
1450
- "Explores blindly, no shortcuts",
1451
- "Every page is a discovery",
1452
- ],
1453
- },
1454
- {
1455
- value: 0.25,
1456
- label: "Vague Memory",
1457
- behaviors: [
1458
- "Has visited once or twice before",
1459
- "Remembers what went wrong, not where things are",
1460
- "May avoid known problem areas",
1461
- "Doesn't remember navigation structure",
1462
- ],
1463
- },
1464
- {
1465
- value: 0.5,
1466
- label: "Occasional Visitor",
1467
- behaviors: [
1468
- "Knows the general site structure",
1469
- "Remembers main navigation but not details",
1470
- "Has partial memory of common paths",
1471
- "Needs some re-orientation each visit",
1472
- ],
1473
- },
1474
- {
1475
- value: 0.75,
1476
- label: "Regular User",
1477
- behaviors: [
1478
- "Knows the site well",
1479
- "Navigates efficiently to common areas",
1480
- "Remembers specific paths and shortcuts",
1481
- "Only confused by new or changed sections",
1482
- ],
1483
- },
1484
- {
1485
- value: 1.0,
1486
- label: "Daily User / Expert",
1487
- behaviors: [
1488
- "Uses the site daily or near-daily",
1489
- "Knows exactly where everything is",
1490
- "Uses keyboard shortcuts and direct URLs",
1491
- "Navigates entirely from memory",
1492
- ],
1493
- },
1467
+ id: "bigfive-openness", valueAxis: "bigfive:openness",
1468
+ question: "How drawn is this person to new ideas, unfamiliar things and abstract thinking?",
1469
+ options: [
1470
+ { value: 0, label: "Prefers the familiar", description: "Sticks to what is known and proven; novelty is a cost" },
1471
+ { value: 0.33, label: "Mildly curious", description: "Open to new things when there is a clear reason" },
1472
+ { value: 0.67, label: "Actively curious", description: "Seeks out unfamiliar ideas and enjoys the unusual" },
1473
+ { value: 1, label: "Strongly exploratory", description: "Novelty and abstraction are their default interest" },
1474
+ ],
1475
+ },
1476
+ {
1477
+ id: "bigfive-conscientiousness", valueAxis: "bigfive:conscientiousness",
1478
+ question: "How organised and follow-through-oriented is this person?",
1479
+ options: [
1480
+ { value: 0, label: "Spontaneous", description: "Improvises; plans and deadlines slide" },
1481
+ { value: 0.33, label: "Loosely organised", description: "Gets there, not always methodically" },
1482
+ { value: 0.67, label: "Organised", description: "Plans ahead and generally finishes what they start" },
1483
+ { value: 1, label: "Highly diligent", description: "Systematic, thorough, finishes reliably" },
1484
+ ],
1485
+ },
1486
+ {
1487
+ id: "bigfive-extraversion", valueAxis: "bigfive:extraversion",
1488
+ question: "How outgoing and energised by people and activity is this person?",
1489
+ options: [
1490
+ { value: 0, label: "Reserved", description: "Quiet, drained by social activity, prefers solitude" },
1491
+ { value: 0.33, label: "Somewhat reserved", description: "Sociable in small doses" },
1492
+ { value: 0.67, label: "Outgoing", description: "Comfortable and energised in company" },
1493
+ { value: 1, label: "Highly gregarious", description: "Seeks stimulation, attention and company" },
1494
+ ],
1495
+ },
1496
+ {
1497
+ id: "bigfive-agreeableness", valueAxis: "bigfive:agreeableness",
1498
+ question: "How warm, trusting and accommodating is this person toward others?",
1499
+ options: [
1500
+ { value: 0, label: "Sceptical", description: "Guarded, competitive, quick to doubt motives" },
1501
+ { value: 0.33, label: "Cautious", description: "Civil but slow to trust" },
1502
+ { value: 0.67, label: "Warm", description: "Trusting, cooperative, gives people the benefit of the doubt" },
1503
+ { value: 1, label: "Highly agreeable", description: "Trusting and accommodating almost by default" },
1504
+ ],
1505
+ },
1506
+ {
1507
+ id: "bigfive-neuroticism", valueAxis: "bigfive:neuroticism",
1508
+ question: "How readily does this person feel anxious, stressed or thrown by setbacks?",
1509
+ options: [
1510
+ { value: 0, label: "Very steady", description: "Calm under pressure; setbacks barely register" },
1511
+ { value: 0.33, label: "Mostly steady", description: "Occasional worry, recovers quickly" },
1512
+ { value: 0.67, label: "Reactive", description: "Stress lands hard and lingers" },
1513
+ { value: 1, label: "Highly reactive", description: "Anxious by default; setbacks are destabilising" },
1494
1514
  ],
1495
1515
  },
1496
1516
  ];
1517
+ /** Big Five scores from questionnaire answers; absent factors are omitted. */
1518
+ export function buildBigFiveFromAnswers(answers) {
1519
+ const out = {};
1520
+ for (const q of BIG_FIVE_QUESTIONS) {
1521
+ const a = answers[q.id];
1522
+ const factor = q.valueAxis?.split(":")[1];
1523
+ if (typeof a === "number" && factor)
1524
+ out[factor] = a;
1525
+ }
1526
+ return out;
1527
+ }
1497
1528
  /**
1498
- * Generate a questionnaire for building a custom persona.
1499
- * Returns a subset of questions covering the most impactful traits.
1529
+ * There is no VALUE_AXIS_QUESTIONS here on purpose.
1530
+ *
1531
+ * A first pass added four direct questions for hedonism, power, universalism
1532
+ * and relatedness — the axes no cognitive trait can reach. They were redundant:
1533
+ * persona-creation-tools.ts already carries VALUES_QUESTIONS, ten items, one
1534
+ * per Schwartz value, and the questionnaire flow already prefers an answered
1535
+ * value over a derived one. The four axes were never broken for personas built
1536
+ * through the questionnaire; they are broken for every other route, which is
1537
+ * what the Big Five items above are for.
1538
+ *
1539
+ * Two competing sets of questions for the same axes would have been the worse
1540
+ * outcome — whichever one a caller found first would silently decide which
1541
+ * wording a persona was scored against. (2026-08-01)
1500
1542
  */
1501
1543
  export function generatePersonaQuestionnaire(options) {
1502
1544
  const { comprehensive = false, traits } = options || {};
@@ -1514,7 +1556,7 @@ export function generatePersonaQuestionnaire(options) {
1514
1556
  const traitsToInclude = traits || (comprehensive
1515
1557
  ? TRAIT_REFERENCE_MATRIX.map(t => t.name)
1516
1558
  : coreTraits);
1517
- return traitsToInclude.map(traitName => {
1559
+ const traitQuestions = traitsToInclude.map(traitName => {
1518
1560
  const traitRef = TRAIT_REFERENCE_MATRIX.find(t => t.name === traitName);
1519
1561
  if (!traitRef)
1520
1562
  return null;
@@ -1536,6 +1578,16 @@ export function generatePersonaQuestionnaire(options) {
1536
1578
  })),
1537
1579
  };
1538
1580
  }).filter(Boolean);
1581
+ // The four value questions always ride along: they are the only way those
1582
+ // axes ever get a real number, and they are cheap — four items on a
1583
+ // questionnaire that already runs to eight or more.
1584
+ // Big Five first: it reaches all thirteen axes through published
1585
+ // correlations. The four direct value questions stay as an override for
1586
+ // anyone who would rather state an axis than have it inferred, and as the
1587
+ // fallback when the Big Five items go unanswered.
1588
+ // Big Five rides along because it is the only route to values for personas
1589
+ // that never go through the creation questionnaire's own ten value items.
1590
+ return [...traitQuestions, ...BIG_FIVE_QUESTIONS];
1539
1591
  }
1540
1592
  function generateQuestionText(trait) {
1541
1593
  const questionMap = {
@@ -1563,8 +1615,7 @@ function generateQuestionText(trait) {
1563
1615
  emotionalContagion: "How much does the visual design and aesthetics of a website affect your experience?",
1564
1616
  fearOfMissingOut: "How do 'limited time' offers and countdown timers affect your decisions?",
1565
1617
  socialProofSensitivity: "How much do reviews, ratings, and testimonials influence your decisions?",
1566
- mentalModelRigidity: "When a website you use regularly changes its layout, how do you respond?",
1567
- siteFamiliarity: "How well do you typically know the websites you visit — are you usually a first-time visitor or a returning regular?",
1618
+ mentalModelFlexibility: "When a website you use regularly changes its layout, how do you respond?",
1568
1619
  };
1569
1620
  return questionMap[trait.name] || `How would you describe your ${trait.name}?`;
1570
1621
  }
@@ -1610,8 +1661,7 @@ export function buildTraitsFromAnswers(answers) {
1610
1661
  emotionalContagion: 0.55, // Research: emotional mirroring is default
1611
1662
  fearOfMissingOut: 0.50, // Neutral - highly age-dependent
1612
1663
  socialProofSensitivity: 0.60, // Research: social proof is powerful (Cialdini)
1613
- mentalModelRigidity: 0.55, // Research: confirmation bias is common
1614
- siteFamiliarity: 0.5, // Research: 58% of pages are revisits (Tauscher & Greenberg)
1664
+ mentalModelFlexibility: 0.55, // Research: confirmation bias is common
1615
1665
  };
1616
1666
  // Apply answers
1617
1667
  for (const [trait, value] of Object.entries(answers)) {
@@ -1657,8 +1707,7 @@ const BASELINE_TRAITS = {
1657
1707
  emotionalContagion: 0.55,
1658
1708
  fearOfMissingOut: 0.50,
1659
1709
  socialProofSensitivity: 0.60,
1660
- mentalModelRigidity: 0.55,
1661
- siteFamiliarity: 0.5,
1710
+ mentalModelFlexibility: 0.55,
1662
1711
  };
1663
1712
  /** Check if a trait is at its baseline (wasn't explicitly set) */
1664
1713
  function isAtBaseline(trait, value) {
@@ -1765,8 +1814,7 @@ const TRAIT_SHORT_HEADERS = {
1765
1814
  emotionalContagion: "Emotional",
1766
1815
  fearOfMissingOut: "FOMO",
1767
1816
  socialProofSensitivity: "SocialProof",
1768
- mentalModelRigidity: "Rigidity",
1769
- siteFamiliarity: "SiteMem",
1817
+ mentalModelFlexibility: "Rigidity",
1770
1818
  };
1771
1819
  /**
1772
1820
  * Get a short header for a trait (max 12 chars).
@@ -1780,7 +1828,11 @@ function getTraitShortHeader(trait) {
1780
1828
  export function formatForAskUserQuestion(questions) {
1781
1829
  return questions.map(q => ({
1782
1830
  question: q.question,
1783
- header: getTraitShortHeader(q.trait), // v16.7.2: Use meaningful abbreviations
1831
+ // Big Five items have no trait; their short header comes from the factor
1832
+ // name in the id rather than the trait abbreviation table.
1833
+ header: q.trait
1834
+ ? getTraitShortHeader(q.trait)
1835
+ : (q.valueAxis?.split(":")[1] ?? q.id).slice(0, 8),
1784
1836
  options: q.options.map(o => ({
1785
1837
  label: o.label,
1786
1838
  description: o.description,
@@ -2147,7 +2199,7 @@ export const TRAIT_VALUE_CORRELATIONS = {
2147
2199
  { value: "security", direction: "negative", weight: 0.7 },
2148
2200
  { value: "stimulation", direction: "positive", weight: 0.4 },
2149
2201
  ],
2150
- researchBasis: "Schwartz (2012): Security opposes stimulation on value circumplex",
2202
+ researchBasis: "Schwartz, S.H. (2012): Security opposes stimulation on value circumplex",
2151
2203
  },
2152
2204
  patience: {
2153
2205
  affects: [
@@ -2183,7 +2235,7 @@ export const TRAIT_VALUE_CORRELATIONS = {
2183
2235
  { value: "tradition", direction: "positive", weight: 0.4 },
2184
2236
  { value: "selfDirection", direction: "negative", weight: 0.3 },
2185
2237
  ],
2186
- researchBasis: "Schwartz (2012): Authority acceptance aligns with conservation values",
2238
+ researchBasis: "Schwartz, S.H. (2012): Authority acceptance aligns with conservation values",
2187
2239
  },
2188
2240
  fearOfMissingOut: {
2189
2241
  affects: [
@@ -2231,6 +2283,24 @@ export const TRAIT_VALUE_CORRELATIONS = {
2231
2283
  * @param traits - Cognitive traits (0-1 scale)
2232
2284
  * @returns Derived values with research basis
2233
2285
  */
2286
+ /**
2287
+ * How many trait correlations target each value axis.
2288
+ *
2289
+ * Lets a consumer tell two very different 0.5s apart: an axis with no
2290
+ * correlations can never leave the baseline, while an axis whose correlations
2291
+ * happen to cancel is a real reading that landed near the middle. tradition on
2292
+ * one persona nets to -0.01 from patience and authoritySensitivity pulling
2293
+ * opposite ways -- indistinguishable from unpopulated in the output, and not
2294
+ * the same thing at all. (2026-08-01)
2295
+ */
2296
+ export function valueAxisCorrelationCounts() {
2297
+ const counts = {};
2298
+ for (const c of Object.values(TRAIT_VALUE_CORRELATIONS)) {
2299
+ for (const e of c.affects)
2300
+ counts[e.value] = (counts[e.value] ?? 0) + 1;
2301
+ }
2302
+ return counts;
2303
+ }
2234
2304
  export function deriveValuesFromTraits(traits) {
2235
2305
  // Start with neutral baseline
2236
2306
  const derivedValues = {
@@ -2248,6 +2318,11 @@ export function deriveValuesFromTraits(traits) {
2248
2318
  competenceNeed: 0.5,
2249
2319
  relatednessNeed: 0.5,
2250
2320
  };
2321
+ // Signed evidence per value, before any squashing. Kept separate from
2322
+ // derivedValues so nothing is discarded mid-accumulation.
2323
+ const rawTotals = {};
2324
+ for (const k of Object.keys(derivedValues))
2325
+ rawTotals[k] = 0;
2251
2326
  const derivations = [];
2252
2327
  const researchBasis = [];
2253
2328
  // Apply trait correlations
@@ -2260,10 +2335,19 @@ export function deriveValuesFromTraits(traits) {
2260
2335
  for (const effect of correlation.affects) {
2261
2336
  // Calculate contribution: deviation * weight * direction
2262
2337
  const contribution = traitDeviation * effect.weight * (effect.direction === "positive" ? 1 : -1);
2263
- // Apply to value (clamped to 0-1)
2264
- if (derivedValues[effect.value] !== undefined) {
2265
- const oldValue = derivedValues[effect.value];
2266
- derivedValues[effect.value] = Math.max(0, Math.min(1, oldValue + contribution));
2338
+ // Accumulated raw, squashed once at the end.
2339
+ //
2340
+ // This clamped to [0,1] on every step, and the values with the MOST
2341
+ // trait evidence are the ones that overflow: stimulation is driven by 5
2342
+ // traits summing to at most 1.15 against 0.5 of headroom, security by 4
2343
+ // (0.95), competenceNeed by 4 (0.85). A persona whose traits point
2344
+ // consistently one way pinned those to exactly 1.0 or 0, and the clamp
2345
+ // destroyed the excess, so the rail was reached and never left. The
2346
+ // derivation was least informative precisely where it had the most
2347
+ // evidence, and two personas differing in strength were reported
2348
+ // identical at the wall. (2026-07-31)
2349
+ if (rawTotals[effect.value] !== undefined) {
2350
+ rawTotals[effect.value] += contribution;
2267
2351
  if (Math.abs(contribution) > 0.05) {
2268
2352
  derivations.push({
2269
2353
  trait: traitName,
@@ -2277,9 +2361,26 @@ export function deriveValuesFromTraits(traits) {
2277
2361
  researchBasis.push(correlation.researchBasis);
2278
2362
  }
2279
2363
  }
2280
- // Round values for cleaner output
2364
+ // Map accumulated evidence onto [0,1] once, with a curve that approaches the
2365
+ // rails without reaching them. tanh is monotone, so more evidence always
2366
+ // moves a value further out and two personas that differ in strength stay
2367
+ // distinguishable — which a clamp cannot promise, because everything past
2368
+ // the wall lands on the same number. K is set so the strongest signal the
2369
+ // correlation table can produce (raw 1.15) lands near 0.91 rather than 1.0,
2370
+ // and a lone moderate signal (raw 0.3) still moves to about 0.65.
2371
+ const SQUASH_K = 1.0;
2281
2372
  for (const key of Object.keys(derivedValues)) {
2282
- derivedValues[key] = Math.round(derivedValues[key] * 100) / 100;
2373
+ const raw = rawTotals[key] ?? 0;
2374
+ const squashed = 0.5 + 0.5 * Math.tanh(raw / SQUASH_K);
2375
+ // Three decimals, not two.
2376
+ //
2377
+ // tradition derives to 0.495 for one persona and rounded to 0.50 — the
2378
+ // same literal power returns from never being touched at all. The list of
2379
+ // unpopulated axes disambiguated them, which works only if someone reads
2380
+ // the list. A number formatted identically to a measurement is the failure
2381
+ // this whole exercise is about, so the distinction belongs in the value.
2382
+ // (2026-08-01)
2383
+ derivedValues[key] = Math.round(squashed * 1000) / 1000;
2283
2384
  }
2284
2385
  return {
2285
2386
  values: derivedValues,