psytools 0.5.1 → 0.5.3

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 (244) hide show
  1. package/README.md +45 -13
  2. package/SOURCES.md +82 -6
  3. package/dist/cjs/index.d.ts +2 -2
  4. package/dist/cjs/index.js +10 -1
  5. package/dist/cjs/inventories/aq10.js +1 -0
  6. package/dist/cjs/inventories/asrs6.js +1 -0
  7. package/dist/cjs/inventories/audit.js +1 -0
  8. package/dist/cjs/inventories/cesd.d.ts +11 -0
  9. package/dist/cjs/inventories/cesd.js +205 -0
  10. package/dist/cjs/inventories/common.d.ts +11 -0
  11. package/dist/cjs/inventories/common.js +26 -1
  12. package/dist/cjs/inventories/dass21.js +1 -0
  13. package/dist/cjs/inventories/ecr-r.d.ts +16 -0
  14. package/dist/cjs/inventories/ecr-r.js +112 -0
  15. package/dist/cjs/inventories/erq.d.ts +16 -0
  16. package/dist/cjs/inventories/erq.js +77 -0
  17. package/dist/cjs/inventories/flourishing.d.ts +12 -0
  18. package/dist/cjs/inventories/flourishing.js +51 -0
  19. package/dist/cjs/inventories/gad7.js +1 -0
  20. package/dist/cjs/inventories/hsps.d.ts +14 -0
  21. package/dist/cjs/inventories/hsps.js +81 -0
  22. package/dist/cjs/inventories/index.d.ts +21 -4
  23. package/dist/cjs/inventories/index.js +44 -2
  24. package/dist/cjs/inventories/k10.d.ts +12 -0
  25. package/dist/cjs/inventories/k10.js +60 -0
  26. package/dist/cjs/inventories/k6.d.ts +12 -0
  27. package/dist/cjs/inventories/k6.js +55 -0
  28. package/dist/cjs/inventories/mini-ipip.js +1 -0
  29. package/dist/cjs/inventories/phq9.js +1 -0
  30. package/dist/cjs/inventories/rses.d.ts +11 -0
  31. package/dist/cjs/inventories/rses.js +61 -0
  32. package/dist/cjs/inventories/swls.d.ts +12 -0
  33. package/dist/cjs/inventories/swls.js +57 -0
  34. package/dist/cjs/inventories/who5.js +1 -0
  35. package/dist/cjs/locales/de/cesd.d.ts +4 -0
  36. package/dist/cjs/locales/de/cesd.js +43 -0
  37. package/dist/cjs/locales/de/erq.d.ts +4 -0
  38. package/dist/cjs/locales/de/erq.js +36 -0
  39. package/dist/cjs/locales/de/flourishing.d.ts +4 -0
  40. package/dist/cjs/locales/de/flourishing.js +30 -0
  41. package/dist/cjs/locales/de/k10.d.ts +4 -0
  42. package/dist/cjs/locales/de/k10.js +36 -0
  43. package/dist/cjs/locales/de/k6.d.ts +4 -0
  44. package/dist/cjs/locales/de/k6.js +31 -0
  45. package/dist/cjs/locales/de/rses.d.ts +4 -0
  46. package/dist/cjs/locales/de/rses.js +34 -0
  47. package/dist/cjs/locales/de/swls.d.ts +4 -0
  48. package/dist/cjs/locales/de/swls.js +36 -0
  49. package/dist/cjs/locales/es/cesd.d.ts +4 -0
  50. package/dist/cjs/locales/es/cesd.js +43 -0
  51. package/dist/cjs/locales/es/erq.d.ts +4 -0
  52. package/dist/cjs/locales/es/erq.js +36 -0
  53. package/dist/cjs/locales/es/flourishing.d.ts +4 -0
  54. package/dist/cjs/locales/es/flourishing.js +46 -0
  55. package/dist/cjs/locales/es/k10.d.ts +4 -0
  56. package/dist/cjs/locales/es/k10.js +56 -0
  57. package/dist/cjs/locales/es/k6.d.ts +4 -0
  58. package/dist/cjs/locales/es/k6.js +43 -0
  59. package/dist/cjs/locales/es/rses.d.ts +4 -0
  60. package/dist/cjs/locales/es/rses.js +54 -0
  61. package/dist/cjs/locales/es/swls.d.ts +4 -0
  62. package/dist/cjs/locales/es/swls.js +46 -0
  63. package/dist/cjs/locales/index.js +51 -0
  64. package/dist/cjs/locales/tr/cesd.d.ts +4 -0
  65. package/dist/cjs/locales/tr/cesd.js +43 -0
  66. package/dist/cjs/locales/tr/ecr-r.d.ts +12 -0
  67. package/dist/cjs/locales/tr/ecr-r.js +70 -0
  68. package/dist/cjs/locales/tr/erq.d.ts +10 -0
  69. package/dist/cjs/locales/tr/erq.js +42 -0
  70. package/dist/cjs/locales/tr/flourishing.d.ts +4 -0
  71. package/dist/cjs/locales/tr/flourishing.js +46 -0
  72. package/dist/cjs/locales/tr/hsps.d.ts +10 -0
  73. package/dist/cjs/locales/tr/hsps.js +55 -0
  74. package/dist/cjs/locales/tr/k10.d.ts +4 -0
  75. package/dist/cjs/locales/tr/k10.js +56 -0
  76. package/dist/cjs/locales/tr/k6.d.ts +4 -0
  77. package/dist/cjs/locales/tr/k6.js +43 -0
  78. package/dist/cjs/locales/tr/rses.d.ts +4 -0
  79. package/dist/cjs/locales/tr/rses.js +54 -0
  80. package/dist/cjs/locales/tr/swls.d.ts +4 -0
  81. package/dist/cjs/locales/tr/swls.js +46 -0
  82. package/dist/cjs/locales/zh/cesd.d.ts +4 -0
  83. package/dist/cjs/locales/zh/cesd.js +43 -0
  84. package/dist/cjs/locales/zh/erq.d.ts +4 -0
  85. package/dist/cjs/locales/zh/erq.js +36 -0
  86. package/dist/cjs/locales/zh/flourishing.d.ts +4 -0
  87. package/dist/cjs/locales/zh/flourishing.js +46 -0
  88. package/dist/cjs/locales/zh/k10.d.ts +4 -0
  89. package/dist/cjs/locales/zh/k10.js +56 -0
  90. package/dist/cjs/locales/zh/k6.d.ts +4 -0
  91. package/dist/cjs/locales/zh/k6.js +43 -0
  92. package/dist/cjs/locales/zh/rses.d.ts +4 -0
  93. package/dist/cjs/locales/zh/rses.js +54 -0
  94. package/dist/cjs/locales/zh/swls.d.ts +4 -0
  95. package/dist/cjs/locales/zh/swls.js +46 -0
  96. package/dist/cjs/types.d.ts +19 -3
  97. package/dist/esm/index.d.ts +2 -2
  98. package/dist/esm/index.js +1 -1
  99. package/dist/esm/inventories/aq10.js +1 -0
  100. package/dist/esm/inventories/asrs6.js +1 -0
  101. package/dist/esm/inventories/audit.js +1 -0
  102. package/dist/esm/inventories/cesd.d.ts +11 -0
  103. package/dist/esm/inventories/cesd.js +202 -0
  104. package/dist/esm/inventories/common.d.ts +11 -0
  105. package/dist/esm/inventories/common.js +25 -0
  106. package/dist/esm/inventories/dass21.js +1 -0
  107. package/dist/esm/inventories/ecr-r.d.ts +16 -0
  108. package/dist/esm/inventories/ecr-r.js +109 -0
  109. package/dist/esm/inventories/erq.d.ts +16 -0
  110. package/dist/esm/inventories/erq.js +74 -0
  111. package/dist/esm/inventories/flourishing.d.ts +12 -0
  112. package/dist/esm/inventories/flourishing.js +48 -0
  113. package/dist/esm/inventories/gad7.js +1 -0
  114. package/dist/esm/inventories/hsps.d.ts +14 -0
  115. package/dist/esm/inventories/hsps.js +78 -0
  116. package/dist/esm/inventories/index.d.ts +21 -4
  117. package/dist/esm/inventories/index.js +35 -2
  118. package/dist/esm/inventories/k10.d.ts +12 -0
  119. package/dist/esm/inventories/k10.js +57 -0
  120. package/dist/esm/inventories/k6.d.ts +12 -0
  121. package/dist/esm/inventories/k6.js +52 -0
  122. package/dist/esm/inventories/mini-ipip.js +1 -0
  123. package/dist/esm/inventories/phq9.js +1 -0
  124. package/dist/esm/inventories/rses.d.ts +11 -0
  125. package/dist/esm/inventories/rses.js +58 -0
  126. package/dist/esm/inventories/swls.d.ts +12 -0
  127. package/dist/esm/inventories/swls.js +54 -0
  128. package/dist/esm/inventories/who5.js +1 -0
  129. package/dist/esm/locales/de/cesd.d.ts +4 -0
  130. package/dist/esm/locales/de/cesd.js +41 -0
  131. package/dist/esm/locales/de/erq.d.ts +4 -0
  132. package/dist/esm/locales/de/erq.js +34 -0
  133. package/dist/esm/locales/de/flourishing.d.ts +4 -0
  134. package/dist/esm/locales/de/flourishing.js +28 -0
  135. package/dist/esm/locales/de/k10.d.ts +4 -0
  136. package/dist/esm/locales/de/k10.js +34 -0
  137. package/dist/esm/locales/de/k6.d.ts +4 -0
  138. package/dist/esm/locales/de/k6.js +29 -0
  139. package/dist/esm/locales/de/rses.d.ts +4 -0
  140. package/dist/esm/locales/de/rses.js +32 -0
  141. package/dist/esm/locales/de/swls.d.ts +4 -0
  142. package/dist/esm/locales/de/swls.js +34 -0
  143. package/dist/esm/locales/es/cesd.d.ts +4 -0
  144. package/dist/esm/locales/es/cesd.js +41 -0
  145. package/dist/esm/locales/es/erq.d.ts +4 -0
  146. package/dist/esm/locales/es/erq.js +34 -0
  147. package/dist/esm/locales/es/flourishing.d.ts +4 -0
  148. package/dist/esm/locales/es/flourishing.js +44 -0
  149. package/dist/esm/locales/es/k10.d.ts +4 -0
  150. package/dist/esm/locales/es/k10.js +54 -0
  151. package/dist/esm/locales/es/k6.d.ts +4 -0
  152. package/dist/esm/locales/es/k6.js +41 -0
  153. package/dist/esm/locales/es/rses.d.ts +4 -0
  154. package/dist/esm/locales/es/rses.js +52 -0
  155. package/dist/esm/locales/es/swls.d.ts +4 -0
  156. package/dist/esm/locales/es/swls.js +44 -0
  157. package/dist/esm/locales/index.js +51 -0
  158. package/dist/esm/locales/tr/cesd.d.ts +4 -0
  159. package/dist/esm/locales/tr/cesd.js +41 -0
  160. package/dist/esm/locales/tr/ecr-r.d.ts +12 -0
  161. package/dist/esm/locales/tr/ecr-r.js +68 -0
  162. package/dist/esm/locales/tr/erq.d.ts +10 -0
  163. package/dist/esm/locales/tr/erq.js +40 -0
  164. package/dist/esm/locales/tr/flourishing.d.ts +4 -0
  165. package/dist/esm/locales/tr/flourishing.js +44 -0
  166. package/dist/esm/locales/tr/hsps.d.ts +10 -0
  167. package/dist/esm/locales/tr/hsps.js +53 -0
  168. package/dist/esm/locales/tr/k10.d.ts +4 -0
  169. package/dist/esm/locales/tr/k10.js +54 -0
  170. package/dist/esm/locales/tr/k6.d.ts +4 -0
  171. package/dist/esm/locales/tr/k6.js +41 -0
  172. package/dist/esm/locales/tr/rses.d.ts +4 -0
  173. package/dist/esm/locales/tr/rses.js +52 -0
  174. package/dist/esm/locales/tr/swls.d.ts +4 -0
  175. package/dist/esm/locales/tr/swls.js +44 -0
  176. package/dist/esm/locales/zh/cesd.d.ts +4 -0
  177. package/dist/esm/locales/zh/cesd.js +41 -0
  178. package/dist/esm/locales/zh/erq.d.ts +4 -0
  179. package/dist/esm/locales/zh/erq.js +34 -0
  180. package/dist/esm/locales/zh/flourishing.d.ts +4 -0
  181. package/dist/esm/locales/zh/flourishing.js +44 -0
  182. package/dist/esm/locales/zh/k10.d.ts +4 -0
  183. package/dist/esm/locales/zh/k10.js +54 -0
  184. package/dist/esm/locales/zh/k6.d.ts +4 -0
  185. package/dist/esm/locales/zh/k6.js +41 -0
  186. package/dist/esm/locales/zh/rses.d.ts +4 -0
  187. package/dist/esm/locales/zh/rses.js +52 -0
  188. package/dist/esm/locales/zh/swls.d.ts +4 -0
  189. package/dist/esm/locales/zh/swls.js +44 -0
  190. package/dist/esm/types.d.ts +19 -3
  191. package/package.json +18 -2
  192. package/schema/assessment-definition.schema.json +5 -0
  193. package/src/index.ts +10 -0
  194. package/src/inventories/aq10.ts +1 -0
  195. package/src/inventories/asrs6.ts +1 -0
  196. package/src/inventories/audit.ts +1 -0
  197. package/src/inventories/cesd.ts +208 -0
  198. package/src/inventories/common.ts +27 -0
  199. package/src/inventories/dass21.ts +1 -0
  200. package/src/inventories/ecr-r.ts +117 -0
  201. package/src/inventories/erq.ts +81 -0
  202. package/src/inventories/flourishing.ts +54 -0
  203. package/src/inventories/gad7.ts +1 -0
  204. package/src/inventories/hsps.ts +86 -0
  205. package/src/inventories/index.ts +47 -5
  206. package/src/inventories/k10.ts +62 -0
  207. package/src/inventories/k6.ts +57 -0
  208. package/src/inventories/mini-ipip.ts +1 -0
  209. package/src/inventories/phq9.ts +1 -0
  210. package/src/inventories/rses.ts +64 -0
  211. package/src/inventories/swls.ts +60 -0
  212. package/src/inventories/who5.ts +1 -0
  213. package/src/locales/de/cesd.ts +44 -0
  214. package/src/locales/de/erq.ts +37 -0
  215. package/src/locales/de/flourishing.ts +31 -0
  216. package/src/locales/de/k10.ts +37 -0
  217. package/src/locales/de/k6.ts +32 -0
  218. package/src/locales/de/rses.ts +35 -0
  219. package/src/locales/de/swls.ts +37 -0
  220. package/src/locales/es/cesd.ts +44 -0
  221. package/src/locales/es/erq.ts +37 -0
  222. package/src/locales/es/flourishing.ts +47 -0
  223. package/src/locales/es/k10.ts +57 -0
  224. package/src/locales/es/k6.ts +44 -0
  225. package/src/locales/es/rses.ts +55 -0
  226. package/src/locales/es/swls.ts +47 -0
  227. package/src/locales/index.ts +51 -0
  228. package/src/locales/tr/cesd.ts +44 -0
  229. package/src/locales/tr/ecr-r.ts +71 -0
  230. package/src/locales/tr/erq.ts +43 -0
  231. package/src/locales/tr/flourishing.ts +47 -0
  232. package/src/locales/tr/hsps.ts +56 -0
  233. package/src/locales/tr/k10.ts +57 -0
  234. package/src/locales/tr/k6.ts +44 -0
  235. package/src/locales/tr/rses.ts +55 -0
  236. package/src/locales/tr/swls.ts +47 -0
  237. package/src/locales/zh/cesd.ts +44 -0
  238. package/src/locales/zh/erq.ts +37 -0
  239. package/src/locales/zh/flourishing.ts +47 -0
  240. package/src/locales/zh/k10.ts +57 -0
  241. package/src/locales/zh/k6.ts +44 -0
  242. package/src/locales/zh/rses.ts +55 -0
  243. package/src/locales/zh/swls.ts +47 -0
  244. package/src/types.ts +34 -3
@@ -0,0 +1,34 @@
1
+ /** Simplified Chinese locale pack for erq. AI translation (Anthropic Claude, claude-fable-5), unverified — see SOURCES.md. */
2
+ const pack = {
3
+ "id": "erq",
4
+ "locale": "zh",
5
+ "title": "情绪调节问卷(ERQ)",
6
+ "description": "测量两种情绪调节策略——认知重评与表达抑制——习惯性使用程度的10个条目量表。",
7
+ "instructions": "我们想了解您的情绪生活,特别是您如何控制(即调节和管理)自己的情绪。以下问题涉及您情绪生活的两个不同方面。一个是情绪体验,即您内心的感受;另一个是情绪表达,即您通过言谈、姿态或行为表现情绪的方式。虽然下面有些问题看起来彼此相似,但它们在重要方面有所不同。",
8
+ "options": [
9
+ "1 — 完全不同意",
10
+ "2",
11
+ "3",
12
+ "4 — 中立",
13
+ "5",
14
+ "6",
15
+ "7 — 完全同意"
16
+ ],
17
+ "questions": {
18
+ "erq-1": { "text": "当我想感受更多积极情绪(如快乐或愉悦)时,我会改变自己正在想的事情。" },
19
+ "erq-2": { "text": "我把情绪藏在心里。" },
20
+ "erq-3": { "text": "当我想减少消极情绪(如悲伤或愤怒)时,我会改变自己正在想的事情。" },
21
+ "erq-4": { "text": "当我产生积极情绪时,我会小心不把它们表现出来。" },
22
+ "erq-5": { "text": "面对有压力的情境时,我会让自己以一种有助于保持冷静的方式去思考它。" },
23
+ "erq-6": { "text": "我通过不表达情绪来控制自己的情绪。" },
24
+ "erq-7": { "text": "当我想感受更多积极情绪时,我会改变自己对所处情境的看法。" },
25
+ "erq-8": { "text": "我通过改变对所处情境的看法来控制自己的情绪。" },
26
+ "erq-9": { "text": "当我产生消极情绪时,我会确保不把它们表现出来。" },
27
+ "erq-10": { "text": "当我想减少消极情绪时,我会改变自己对所处情境的看法。" }
28
+ },
29
+ "subscales": {
30
+ "reappraisal": { "label": "认知重评" },
31
+ "suppression": { "label": "表达抑制" }
32
+ }
33
+ };
34
+ export default pack;
@@ -0,0 +1,4 @@
1
+ import type { InventoryLocalePack } from "../../types.ts";
2
+ /** Simplified Chinese locale pack for flourishing. AI translation (Anthropic Claude, claude-sonnet-5), unverified — see SOURCES.md. */
3
+ declare const pack: InventoryLocalePack;
4
+ export default pack;
@@ -0,0 +1,44 @@
1
+ /** Simplified Chinese locale pack for flourishing. AI translation (Anthropic Claude, claude-sonnet-5), unverified — see SOURCES.md. */
2
+ const pack = {
3
+ "id": "flourishing",
4
+ "locale": "zh",
5
+ "title": "蓬勃发展量表(FS)",
6
+ "description": "一份包含8个条目的综合量表,用于测量个体在人际关系、自尊、人生目标和乐观等重要领域的自我认知成功感。",
7
+ "instructions": "以下是八条陈述,您可能同意或不同意。请对每个条目表明您的同意程度。",
8
+ "options": [
9
+ "非常不同意",
10
+ "不同意",
11
+ "有点不同意",
12
+ "既不同意也不反对",
13
+ "有点同意",
14
+ "同意",
15
+ "非常同意"
16
+ ],
17
+ "questions": {
18
+ "flourishing-1": {
19
+ "text": "我过着有目标、有意义的生活"
20
+ },
21
+ "flourishing-2": {
22
+ "text": "我的社会关系给我支持,也让我感到有收获"
23
+ },
24
+ "flourishing-3": {
25
+ "text": "我投入并关注自己的日常活动"
26
+ },
27
+ "flourishing-4": {
28
+ "text": "我积极为他人的幸福和福祉做出贡献"
29
+ },
30
+ "flourishing-5": {
31
+ "text": "在对我重要的活动中,我表现得有能力、有胜任力"
32
+ },
33
+ "flourishing-6": {
34
+ "text": "我是一个好人,过着良好的生活"
35
+ },
36
+ "flourishing-7": {
37
+ "text": "我对自己的未来感到乐观"
38
+ },
39
+ "flourishing-8": {
40
+ "text": "人们尊重我"
41
+ }
42
+ }
43
+ };
44
+ export default pack;
@@ -0,0 +1,4 @@
1
+ import type { InventoryLocalePack } from "../../types.ts";
2
+ /** Simplified Chinese locale pack for k10. AI translation (Anthropic Claude, claude-sonnet-5), unverified — see SOURCES.md. */
3
+ declare const pack: InventoryLocalePack;
4
+ export default pack;
@@ -0,0 +1,54 @@
1
+ /** Simplified Chinese locale pack for k10. AI translation (Anthropic Claude, claude-sonnet-5), unverified — see SOURCES.md. */
2
+ const pack = {
3
+ "id": "k10",
4
+ "locale": "zh",
5
+ "title": "凯斯勒心理困扰量表(K10)",
6
+ "description": "一份包含10个条目的筛查量表,用于测量过去30天内的非特异性心理困扰程度。",
7
+ "instructions": "以下问题询问您在过去30天内的感受情况。",
8
+ "options": [
9
+ "完全没有",
10
+ "很少的时候",
11
+ "有些时候",
12
+ "大部分时候",
13
+ "所有时候"
14
+ ],
15
+ "questions": {
16
+ "k10-1": {
17
+ "text": "您有多经常感到无缘无故地疲惫不堪?"
18
+ },
19
+ "k10-2": {
20
+ "text": "您有多经常感到紧张?"
21
+ },
22
+ "k10-3": {
23
+ "text": "您有多经常感到紧张到无法平静下来?"
24
+ },
25
+ "k10-4": {
26
+ "text": "您有多经常感到绝望?"
27
+ },
28
+ "k10-5": {
29
+ "text": "您有多经常感到坐立不安或烦躁不安?"
30
+ },
31
+ "k10-6": {
32
+ "text": "您有多经常感到坐立不安到无法安坐?"
33
+ },
34
+ "k10-7": {
35
+ "text": "您有多经常感到情绪低落?"
36
+ },
37
+ "k10-8": {
38
+ "text": "您有多经常感到做任何事都很费力?"
39
+ },
40
+ "k10-9": {
41
+ "text": "您有多经常感到悲伤到什么都无法让您开心起来?"
42
+ },
43
+ "k10-10": {
44
+ "text": "您有多经常感到自己一无是处?"
45
+ }
46
+ },
47
+ "bands": {
48
+ "low": "很可能状态良好",
49
+ "mild": "轻度心理困扰",
50
+ "moderate": "中度心理困扰",
51
+ "severe": "重度心理困扰"
52
+ }
53
+ };
54
+ export default pack;
@@ -0,0 +1,4 @@
1
+ import type { InventoryLocalePack } from "../../types.ts";
2
+ /** Simplified Chinese locale pack for k6. AI translation (Anthropic Claude, claude-sonnet-5), unverified — see SOURCES.md. */
3
+ declare const pack: InventoryLocalePack;
4
+ export default pack;
@@ -0,0 +1,41 @@
1
+ /** Simplified Chinese locale pack for k6. AI translation (Anthropic Claude, claude-sonnet-5), unverified — see SOURCES.md. */
2
+ const pack = {
3
+ "id": "k6",
4
+ "locale": "zh",
5
+ "title": "凯斯勒心理困扰量表(K6)",
6
+ "description": "一份包含6个条目的筛查量表,用于测量过去30天内的非特异性心理困扰程度。",
7
+ "instructions": "以下问题询问您在过去30天内的感受情况。",
8
+ "options": [
9
+ "完全没有",
10
+ "很少的时候",
11
+ "有些时候",
12
+ "大部分时候",
13
+ "所有时候"
14
+ ],
15
+ "questions": {
16
+ "k6-1": {
17
+ "text": "在过去30天里,您有多经常感到紧张?"
18
+ },
19
+ "k6-2": {
20
+ "text": "在过去30天里,您有多经常感到绝望?"
21
+ },
22
+ "k6-3": {
23
+ "text": "在过去30天里,您有多经常感到坐立不安或烦躁不安?"
24
+ },
25
+ "k6-4": {
26
+ "text": "在过去30天里,您有多经常感到情绪低落到什么都无法让您开心起来?"
27
+ },
28
+ "k6-5": {
29
+ "text": "在过去30天里,您有多经常感到做任何事都很费力?"
30
+ },
31
+ "k6-6": {
32
+ "text": "在过去30天里,您有多经常感到自己一无是处?"
33
+ }
34
+ },
35
+ "bands": {
36
+ "low": "低度心理困扰",
37
+ "moderate": "中度心理困扰",
38
+ "serious": "重度心理困扰"
39
+ }
40
+ };
41
+ export default pack;
@@ -0,0 +1,4 @@
1
+ import type { InventoryLocalePack } from "../../types.ts";
2
+ /** Simplified Chinese locale pack for rses. AI translation (Anthropic Claude, claude-sonnet-5), unverified — see SOURCES.md. */
3
+ declare const pack: InventoryLocalePack;
4
+ export default pack;
@@ -0,0 +1,52 @@
1
+ /** Simplified Chinese locale pack for rses. AI translation (Anthropic Claude, claude-sonnet-5), unverified — see SOURCES.md. */
2
+ const pack = {
3
+ "id": "rses",
4
+ "locale": "zh",
5
+ "title": "罗森伯格自尊量表(RSES)",
6
+ "description": "一份包含10个条目的量表,用于测量总体自我价值感,涵盖对自我的积极和消极情感。",
7
+ "instructions": "以下是一系列关于您对自己总体感受的陈述。请指出您对每条陈述的同意或不同意程度。",
8
+ "options": [
9
+ "非常不同意",
10
+ "不同意",
11
+ "同意",
12
+ "非常同意"
13
+ ],
14
+ "questions": {
15
+ "rses-1": {
16
+ "text": "总的来说,我对自己感到满意"
17
+ },
18
+ "rses-2": {
19
+ "text": "有时我觉得自己一无是处"
20
+ },
21
+ "rses-3": {
22
+ "text": "我觉得自己拥有不少优点"
23
+ },
24
+ "rses-4": {
25
+ "text": "我能够像大多数人一样把事情做好"
26
+ },
27
+ "rses-5": {
28
+ "text": "我觉得自己没有什么值得自豪的地方"
29
+ },
30
+ "rses-6": {
31
+ "text": "有时我确实感到自己毫无用处"
32
+ },
33
+ "rses-7": {
34
+ "text": "我觉得自己是一个有价值的人,至少和别人是平等的"
35
+ },
36
+ "rses-8": {
37
+ "text": "我希望自己能更加尊重自己"
38
+ },
39
+ "rses-9": {
40
+ "text": "总的来说,我倾向于认为自己是个失败者"
41
+ },
42
+ "rses-10": {
43
+ "text": "我对自己持积极的态度"
44
+ }
45
+ },
46
+ "bands": {
47
+ "low": "自尊水平较低",
48
+ "normal": "处于正常范围",
49
+ "high": "自尊水平较高"
50
+ }
51
+ };
52
+ export default pack;
@@ -0,0 +1,4 @@
1
+ import type { InventoryLocalePack } from "../../types.ts";
2
+ /** Simplified Chinese locale pack for swls. AI translation (Anthropic Claude, claude-sonnet-5), unverified — see SOURCES.md. */
3
+ declare const pack: InventoryLocalePack;
4
+ export default pack;
@@ -0,0 +1,44 @@
1
+ /** Simplified Chinese locale pack for swls. AI translation (Anthropic Claude, claude-sonnet-5), unverified — see SOURCES.md. */
2
+ const pack = {
3
+ "id": "swls",
4
+ "locale": "zh",
5
+ "title": "生活满意度量表(SWLS)",
6
+ "description": "一份包含5个条目的量表,用于测量总体生活满意度。",
7
+ "instructions": "以下是五条陈述,您可能同意或不同意。请对每个条目表明您的同意程度。请如实、坦诚地作答。",
8
+ "options": [
9
+ "非常不同意",
10
+ "不同意",
11
+ "有点不同意",
12
+ "既不同意也不反对",
13
+ "有点同意",
14
+ "同意",
15
+ "非常同意"
16
+ ],
17
+ "questions": {
18
+ "swls-1": {
19
+ "text": "在大多数方面,我的生活都接近我理想的状态"
20
+ },
21
+ "swls-2": {
22
+ "text": "我的生活条件非常好"
23
+ },
24
+ "swls-3": {
25
+ "text": "我对自己的生活感到满意"
26
+ },
27
+ "swls-4": {
28
+ "text": "到目前为止,我已经得到了我人生中想要的重要东西"
29
+ },
30
+ "swls-5": {
31
+ "text": "如果能重新来过,我几乎不会做任何改变"
32
+ }
33
+ },
34
+ "bands": {
35
+ "extremely-dissatisfied": "极度不满意",
36
+ "dissatisfied": "不满意",
37
+ "slightly-dissatisfied": "略微不满意",
38
+ "neutral": "中等",
39
+ "slightly-satisfied": "略微满意",
40
+ "satisfied": "满意",
41
+ "extremely-satisfied": "极度满意"
42
+ }
43
+ };
44
+ export default pack;
@@ -132,6 +132,12 @@ export interface CountScoring {
132
132
  }
133
133
  /** Declarative, serializable scoring rules built into psytools. */
134
134
  export type ScoringDefinition = SumScoring | SubscaleScoring | CountScoring;
135
+ /**
136
+ * Categories used by the bundled inventories to describe what an
137
+ * instrument measures. `AssessmentDefinition.categories` accepts any
138
+ * string, so custom assessments are free to define their own taxonomy.
139
+ */
140
+ export type InventoryCategory = "depression" | "anxiety" | "stress" | "well-being" | "adhd" | "autism" | "substance-use" | "personality" | "attachment" | "relationships" | "emotion-regulation" | "sensory-processing" | "distress" | "self-esteem";
135
141
  /**
136
142
  * The complete, serializable description of an assessment.
137
143
  *
@@ -143,6 +149,12 @@ export interface AssessmentDefinition {
143
149
  id: string;
144
150
  /** Version of this definition (semver or free-form), for provenance. */
145
151
  version?: string;
152
+ /**
153
+ * What the assessment measures, for filtering and display. Bundled
154
+ * inventories use `InventoryCategory` values; custom definitions may use
155
+ * any strings.
156
+ */
157
+ categories?: string[];
146
158
  title: LocalizedText;
147
159
  description?: LocalizedText;
148
160
  /** Instructions shown to the respondent (incl. the recall timeframe). */
@@ -161,17 +173,21 @@ export interface AssessmentDefinition {
161
173
  * One language for one inventory, shipped as a separate lazily-loadable
162
174
  * module so that only requested locales are bundled and held in memory.
163
175
  * Merge into a base definition with `applyLocale`.
176
+ *
177
+ * Packs are partial: every field but `id`/`locale` is optional, so the same
178
+ * shape also works as a small local override (e.g. reword one question) via
179
+ * `loadInventory(id, { overrides })` — no need to restate the whole pack.
164
180
  */
165
181
  export interface InventoryLocalePack {
166
182
  /** Id of the inventory this pack translates. */
167
183
  id: string;
168
184
  /** BCP-47 language tag of the pack, e.g. `"tr"`. */
169
185
  locale: string;
170
- title: string;
186
+ title?: string;
171
187
  description?: string;
172
188
  instructions?: string;
173
- /** Labels of the assessment-level option scale, by option index. */
174
- options: string[];
189
+ /** Labels of the assessment-level option scale, by option index. Length must match the option scale's when present. */
190
+ options?: string[];
175
191
  /** Per-question texts (and option labels for question-level scales), by question id. */
176
192
  questions: Record<string, {
177
193
  text: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "psytools",
3
- "version": "0.5.1",
4
- "description": "Zero-dependency toolkit for psychological assessments: data models, response validation, scoring, and predefined inventories (PHQ-9, GAD-7, DASS-21, WHO-5, ASRS, AQ-10, AUDIT, Mini-IPIP) in multiple languages.",
3
+ "version": "0.5.3",
4
+ "description": "Zero-dependency toolkit for psychological assessments: data models, response validation, scoring, and predefined inventories (PHQ-9, GAD-7, DASS-21, WHO-5, ASRS, AQ-10, AUDIT, Mini-IPIP, CES-D, ECR-R, ERQ, HSPS, SWLS, Flourishing, K10, K6, RSES) in multiple languages.",
5
5
  "keywords": [
6
6
  "psychology",
7
7
  "assessment",
@@ -17,6 +17,22 @@
17
17
  "ipip",
18
18
  "big-five",
19
19
  "personality",
20
+ "ces-d",
21
+ "depression",
22
+ "ecr-r",
23
+ "attachment",
24
+ "erq",
25
+ "emotion-regulation",
26
+ "hsp",
27
+ "sensory-processing",
28
+ "swls",
29
+ "life-satisfaction",
30
+ "flourishing",
31
+ "k10",
32
+ "k6",
33
+ "psychological-distress",
34
+ "rosenberg",
35
+ "self-esteem",
20
36
  "adhd",
21
37
  "autism",
22
38
  "well-being",
@@ -9,6 +9,11 @@
9
9
  "properties": {
10
10
  "id": { "type": "string", "minLength": 1 },
11
11
  "version": { "type": "string" },
12
+ "categories": {
13
+ "type": "array",
14
+ "description": "What the assessment measures, e.g. [\"depression\"]. Bundled inventories use a small controlled vocabulary; custom definitions may use any strings.",
15
+ "items": { "type": "string", "minLength": 1 }
16
+ },
12
17
  "title": { "$ref": "#/$defs/localizedText" },
13
18
  "description": { "$ref": "#/$defs/localizedText" },
14
19
  "instructions": { "$ref": "#/$defs/localizedText" },
package/src/index.ts CHANGED
@@ -3,6 +3,7 @@ export type {
3
3
  AssessmentOption,
4
4
  AssessmentQuestion,
5
5
  AssessmentDefinition,
6
+ InventoryCategory,
6
7
  ScoreBand,
7
8
  ScoreFlag,
8
9
  SumScoring,
@@ -50,6 +51,15 @@ export {
50
51
  aq10,
51
52
  audit,
52
53
  miniIpip,
54
+ cesd,
55
+ ecrR,
56
+ erq,
57
+ hsps,
58
+ swls,
59
+ flourishing,
60
+ k10,
61
+ k6,
62
+ rses,
53
63
  inventories,
54
64
  loadInventory,
55
65
  twoWeekFrequencyOptions,
@@ -13,6 +13,7 @@ import type { AssessmentDefinition } from "../types.ts";
13
13
  export const aq10: AssessmentDefinition = {
14
14
  id: "aq10",
15
15
  version: "1.0.0",
16
+ categories: ["autism"],
16
17
  title: {
17
18
  en: "Autism Spectrum Quotient (AQ-10) — Adult",
18
19
  },
@@ -12,6 +12,7 @@ import type { AssessmentDefinition } from "../types.ts";
12
12
  export const asrs6: AssessmentDefinition = {
13
13
  id: "asrs6",
14
14
  version: "1.0.0",
15
+ categories: ["adhd"],
15
16
  title: {
16
17
  en: "Adult ADHD Self-Report Scale (ASRS-v1.1) Screener",
17
18
  },
@@ -54,6 +54,7 @@ const injuryOptions: AssessmentOption[] = [
54
54
  export const audit: AssessmentDefinition = {
55
55
  id: "audit",
56
56
  version: "1.0.0",
57
+ categories: ["substance-use"],
57
58
  title: {
58
59
  en: "Alcohol Use Disorders Identification Test (AUDIT)",
59
60
  },
@@ -0,0 +1,208 @@
1
+ import type { AssessmentDefinition } from "../types.ts";
2
+
3
+ /**
4
+ * CES-D — Center for Epidemiologic Studies Depression Scale.
5
+ *
6
+ * 20 items, 0–3 past-week frequency scale, total score 0–60. Items 4, 8,
7
+ * 12 and 16 are positively worded and reverse scored. Scores of 16 or
8
+ * above indicate elevated depressive symptoms (Radloff, 1977). Developed
9
+ * at the U.S. National Institute of Mental Health; the scale is in the
10
+ * public domain.
11
+ */
12
+ export const cesd: AssessmentDefinition = {
13
+ id: "cesd",
14
+ version: "1.0.0",
15
+ categories: ["depression"],
16
+ title: {
17
+ en: "Center for Epidemiologic Studies Depression Scale (CES-D)",
18
+ },
19
+ description: {
20
+ en: "A 20-item self-report scale designed to measure depressive symptomatology in the general population.",
21
+ },
22
+ instructions: {
23
+ en: "Please read each statement carefully, then indicate how often you felt or behaved this way during the past week, including today.",
24
+ },
25
+ defaultLocale: "en",
26
+ options: [
27
+ {
28
+ value: 0,
29
+ label: {
30
+ en: "Rarely or none of the time (less than 1 day)",
31
+ },
32
+ },
33
+ {
34
+ value: 1,
35
+ label: {
36
+ en: "Some or a little of the time (1-2 days)",
37
+ },
38
+ },
39
+ {
40
+ value: 2,
41
+ label: {
42
+ en: "Occasionally or a moderate amount of the time (3-4 days)",
43
+ },
44
+ },
45
+ {
46
+ value: 3,
47
+ label: {
48
+ en: "Most or all of the time (5-7 days)",
49
+ },
50
+ },
51
+ ],
52
+ questions: [
53
+ {
54
+ id: "cesd-1",
55
+ text: {
56
+ en: "I was bothered by things that usually don't bother me",
57
+ },
58
+ },
59
+ {
60
+ id: "cesd-2",
61
+ text: {
62
+ en: "I did not feel like eating; my appetite was poor",
63
+ },
64
+ },
65
+ {
66
+ id: "cesd-3",
67
+ text: {
68
+ en: "I felt that I could not shake off the blues even with help from my family and friends",
69
+ },
70
+ },
71
+ {
72
+ id: "cesd-4",
73
+ text: {
74
+ en: "I felt that I was just as good as other people",
75
+ },
76
+ reverseScored: true,
77
+ },
78
+ {
79
+ id: "cesd-5",
80
+ text: {
81
+ en: "I had trouble keeping my mind on what I was doing",
82
+ },
83
+ },
84
+ {
85
+ id: "cesd-6",
86
+ text: {
87
+ en: "I felt depressed",
88
+ },
89
+ },
90
+ {
91
+ id: "cesd-7",
92
+ text: {
93
+ en: "I felt that everything I did was an effort",
94
+ },
95
+ },
96
+ {
97
+ id: "cesd-8",
98
+ text: {
99
+ en: "I felt hopeful about the future",
100
+ },
101
+ reverseScored: true,
102
+ },
103
+ {
104
+ id: "cesd-9",
105
+ text: {
106
+ en: "I thought my life had been a failure",
107
+ },
108
+ },
109
+ {
110
+ id: "cesd-10",
111
+ text: {
112
+ en: "I felt fearful",
113
+ },
114
+ },
115
+ {
116
+ id: "cesd-11",
117
+ text: {
118
+ en: "My sleep was restless",
119
+ },
120
+ },
121
+ {
122
+ id: "cesd-12",
123
+ text: {
124
+ en: "I was happy",
125
+ },
126
+ reverseScored: true,
127
+ },
128
+ {
129
+ id: "cesd-13",
130
+ text: {
131
+ en: "I talked less than usual",
132
+ },
133
+ },
134
+ {
135
+ id: "cesd-14",
136
+ text: {
137
+ en: "I felt lonely",
138
+ },
139
+ },
140
+ {
141
+ id: "cesd-15",
142
+ text: {
143
+ en: "People were unfriendly",
144
+ },
145
+ },
146
+ {
147
+ id: "cesd-16",
148
+ text: {
149
+ en: "I enjoyed life",
150
+ },
151
+ reverseScored: true,
152
+ },
153
+ {
154
+ id: "cesd-17",
155
+ text: {
156
+ en: "I had crying spells",
157
+ },
158
+ },
159
+ {
160
+ id: "cesd-18",
161
+ text: {
162
+ en: "I felt sad",
163
+ },
164
+ },
165
+ {
166
+ id: "cesd-19",
167
+ text: {
168
+ en: "I felt that people disliked me",
169
+ },
170
+ },
171
+ {
172
+ id: "cesd-20",
173
+ text: {
174
+ en: "I could not get \"going\"",
175
+ },
176
+ },
177
+ ],
178
+ scoring: {
179
+ kind: "sum",
180
+ missing: { strategy: "prorate", minAnswered: 16 },
181
+ bands: [
182
+ {
183
+ id: "below-cutoff",
184
+ min: 0,
185
+ max: 15,
186
+ label: { en: "Below the clinical cutoff" },
187
+ },
188
+ {
189
+ id: "elevated",
190
+ min: 16,
191
+ max: 60,
192
+ label: { en: "Elevated depressive symptoms (at or above the cutoff of 16)" },
193
+ },
194
+ ],
195
+ },
196
+ meta: {
197
+ reference:
198
+ "Radloff, L. S. (1977). The CES-D Scale: A self-report depression scale for research in the general population. Applied Psychological Measurement, 1(3), 385-401.",
199
+ license:
200
+ "Free — developed at the U.S. National Institute of Mental Health; the scale is in the public domain and may be used without permission",
201
+ licenseFlag: "free",
202
+ translationProvenance:
203
+ "en: reproduced from the original instrument (via the NIDA Seek, Test, Treat and Retain data harmonization packet). Other locales (tr, de, zh, es): AI translation (Anthropic Claude, claude-fable-5) from the original English; official translations were not consulted and the texts are unverified. See SOURCES.md.",
204
+ timeframe: "past week",
205
+ scoringNote:
206
+ "The >=16 cutoff for elevated depressive symptoms follows Radloff (1977); it screens for risk and is not a diagnosis. The prorating threshold (>=16 of 20 items) is an implementation choice, not part of the published scoring.",
207
+ },
208
+ };