@elaraai/e3-ui 1.0.103 → 1.0.104

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 (287) hide show
  1. package/dist/src/allocation/functions.d.ts +2 -1
  2. package/dist/src/allocation/functions.d.ts.map +1 -1
  3. package/dist/src/allocation/functions.js +3 -2
  4. package/dist/src/allocation/functions.js.map +1 -1
  5. package/dist/src/allocation/index.d.ts +120 -1
  6. package/dist/src/allocation/index.d.ts.map +1 -1
  7. package/dist/src/allocation/index.js +24 -4
  8. package/dist/src/allocation/index.js.map +1 -1
  9. package/dist/src/bind/data-indexed.d.ts +25 -4
  10. package/dist/src/bind/data-indexed.d.ts.map +1 -1
  11. package/dist/src/bind/data-indexed.js +58 -7
  12. package/dist/src/bind/data-indexed.js.map +1 -1
  13. package/dist/src/bind/data.d.ts +12 -14
  14. package/dist/src/bind/data.d.ts.map +1 -1
  15. package/dist/src/bind/data.js +11 -11
  16. package/dist/src/bind/data.js.map +1 -1
  17. package/dist/src/bind/func.d.ts +7 -2
  18. package/dist/src/bind/func.d.ts.map +1 -1
  19. package/dist/src/bind/func.js +10 -3
  20. package/dist/src/bind/func.js.map +1 -1
  21. package/dist/src/calendar/index.d.ts +148 -1
  22. package/dist/src/calendar/index.d.ts.map +1 -1
  23. package/dist/src/calendar/index.js +55 -5
  24. package/dist/src/calendar/index.js.map +1 -1
  25. package/dist/src/flowchart/canvas.d.ts +32 -14
  26. package/dist/src/flowchart/canvas.d.ts.map +1 -1
  27. package/dist/src/flowchart/canvas.js +21 -6
  28. package/dist/src/flowchart/canvas.js.map +1 -1
  29. package/dist/src/flowchart/details.d.ts +469 -0
  30. package/dist/src/flowchart/details.d.ts.map +1 -0
  31. package/dist/src/flowchart/details.js +1035 -0
  32. package/dist/src/flowchart/details.js.map +1 -0
  33. package/dist/src/flowchart/flowchart.d.ts +16 -72
  34. package/dist/src/flowchart/flowchart.d.ts.map +1 -1
  35. package/dist/src/flowchart/flowchart.js +10 -1
  36. package/dist/src/flowchart/flowchart.js.map +1 -1
  37. package/dist/src/flowchart/index.d.ts +282 -251
  38. package/dist/src/flowchart/index.d.ts.map +1 -1
  39. package/dist/src/flowchart/index.js +234 -220
  40. package/dist/src/flowchart/index.js.map +1 -1
  41. package/dist/src/flowchart/kinds.d.ts +438 -0
  42. package/dist/src/flowchart/kinds.d.ts.map +1 -0
  43. package/dist/src/flowchart/kinds.js +799 -0
  44. package/dist/src/flowchart/kinds.js.map +1 -0
  45. package/dist/src/flowchart/library.d.ts +154 -739
  46. package/dist/src/flowchart/library.d.ts.map +1 -1
  47. package/dist/src/flowchart/library.js +191 -673
  48. package/dist/src/flowchart/library.js.map +1 -1
  49. package/dist/src/flowchart/payload.d.ts +3652 -7843
  50. package/dist/src/flowchart/payload.d.ts.map +1 -1
  51. package/dist/src/flowchart/payload.js +331 -469
  52. package/dist/src/flowchart/payload.js.map +1 -1
  53. package/dist/src/flowchart/templates.d.ts +657 -0
  54. package/dist/src/flowchart/templates.d.ts.map +1 -0
  55. package/dist/src/flowchart/templates.js +658 -0
  56. package/dist/src/flowchart/templates.js.map +1 -0
  57. package/dist/src/flowchart/types.d.ts +2258 -214
  58. package/dist/src/flowchart/types.d.ts.map +1 -1
  59. package/dist/src/flowchart/types.js +374 -124
  60. package/dist/src/flowchart/types.js.map +1 -1
  61. package/dist/src/index.d.ts +13 -15
  62. package/dist/src/index.d.ts.map +1 -1
  63. package/dist/src/index.js +24 -29
  64. package/dist/src/index.js.map +1 -1
  65. package/dist/src/internal.d.ts +5 -7
  66. package/dist/src/internal.d.ts.map +1 -1
  67. package/dist/src/internal.js +12 -19
  68. package/dist/src/internal.js.map +1 -1
  69. package/dist/src/ontology/index.d.ts +44 -15
  70. package/dist/src/ontology/index.d.ts.map +1 -1
  71. package/dist/src/ontology/index.js +19 -11
  72. package/dist/src/ontology/index.js.map +1 -1
  73. package/dist/src/plan/event-rows.d.ts +2 -1
  74. package/dist/src/plan/event-rows.d.ts.map +1 -1
  75. package/dist/src/plan/event-rows.js +6 -4
  76. package/dist/src/plan/event-rows.js.map +1 -1
  77. package/dist/src/plan/ir.d.ts +1 -0
  78. package/dist/src/plan/ir.d.ts.map +1 -1
  79. package/dist/src/plan/plan.d.ts +145 -1
  80. package/dist/src/plan/plan.d.ts.map +1 -1
  81. package/dist/src/plan/plan.js +67 -3
  82. package/dist/src/plan/plan.js.map +1 -1
  83. package/dist/src/plan/types.d.ts +1 -0
  84. package/dist/src/plan/types.d.ts.map +1 -1
  85. package/dist/src/query/builder.d.ts +362 -315
  86. package/dist/src/query/builder.d.ts.map +1 -1
  87. package/dist/src/query/builder.js +12 -1
  88. package/dist/src/query/builder.js.map +1 -1
  89. package/dist/src/query/index.d.ts +5 -1
  90. package/dist/src/query/index.d.ts.map +1 -1
  91. package/dist/src/query/index.js +3 -1
  92. package/dist/src/query/index.js.map +1 -1
  93. package/dist/src/roster/fit.d.ts +5 -2
  94. package/dist/src/roster/fit.d.ts.map +1 -1
  95. package/dist/src/roster/fit.js +5 -3
  96. package/dist/src/roster/fit.js.map +1 -1
  97. package/dist/src/roster/index.d.ts +103 -2
  98. package/dist/src/roster/index.d.ts.map +1 -1
  99. package/dist/src/roster/index.js +45 -6
  100. package/dist/src/roster/index.js.map +1 -1
  101. package/dist/src/runtime/index.d.ts +1 -3
  102. package/dist/src/runtime/index.d.ts.map +1 -1
  103. package/dist/src/runtime/index.js +1 -3
  104. package/dist/src/runtime/index.js.map +1 -1
  105. package/dist/src/schedule/record-window.d.ts +1 -0
  106. package/dist/src/schedule/record-window.d.ts.map +1 -1
  107. package/dist/src/schematic/index.d.ts +1 -1
  108. package/dist/src/schematic/index.d.ts.map +1 -1
  109. package/dist/src/schematic/index.js +1 -1
  110. package/dist/src/schematic/index.js.map +1 -1
  111. package/dist/src/schematic/kinds.d.ts +4 -24
  112. package/dist/src/schematic/kinds.d.ts.map +1 -1
  113. package/dist/src/schematic/kinds.js +8 -212
  114. package/dist/src/schematic/kinds.js.map +1 -1
  115. package/dist/src/schematic/payload.d.ts +140 -1
  116. package/dist/src/schematic/payload.d.ts.map +1 -1
  117. package/dist/src/schematic/payload.js +38 -1
  118. package/dist/src/schematic/payload.js.map +1 -1
  119. package/dist/src/schematic/types.d.ts.map +1 -1
  120. package/dist/src/schematic/types.js +4 -36
  121. package/dist/src/schematic/types.js.map +1 -1
  122. package/dist/src/schematic/window.d.ts +9 -42
  123. package/dist/src/schematic/window.d.ts.map +1 -1
  124. package/dist/src/schematic/window.js +10 -115
  125. package/dist/src/schematic/window.js.map +1 -1
  126. package/dist/src/sheet/actions.d.ts +388 -0
  127. package/dist/src/sheet/actions.d.ts.map +1 -0
  128. package/dist/src/sheet/actions.js +594 -0
  129. package/dist/src/sheet/actions.js.map +1 -0
  130. package/dist/src/sheet/bridge.d.ts +12 -1
  131. package/dist/src/sheet/bridge.d.ts.map +1 -1
  132. package/dist/src/sheet/bridge.js +30 -6
  133. package/dist/src/sheet/bridge.js.map +1 -1
  134. package/dist/src/sheet/columns.d.ts +5 -2
  135. package/dist/src/sheet/columns.d.ts.map +1 -1
  136. package/dist/src/sheet/columns.js.map +1 -1
  137. package/dist/src/sheet/draft-bridge.d.ts +9 -4
  138. package/dist/src/sheet/draft-bridge.d.ts.map +1 -1
  139. package/dist/src/sheet/draft-bridge.js +22 -7
  140. package/dist/src/sheet/draft-bridge.js.map +1 -1
  141. package/dist/src/sheet/fields.d.ts +13 -0
  142. package/dist/src/sheet/fields.d.ts.map +1 -1
  143. package/dist/src/sheet/fields.js +3 -0
  144. package/dist/src/sheet/fields.js.map +1 -1
  145. package/dist/src/sheet/index.d.ts +32 -2
  146. package/dist/src/sheet/index.d.ts.map +1 -1
  147. package/dist/src/sheet/index.js +18 -3
  148. package/dist/src/sheet/index.js.map +1 -1
  149. package/dist/src/sheet/library.d.ts +8 -0
  150. package/dist/src/sheet/library.d.ts.map +1 -1
  151. package/dist/src/sheet/root.d.ts +23 -1
  152. package/dist/src/sheet/root.d.ts.map +1 -1
  153. package/dist/src/sheet/root.js +40 -5
  154. package/dist/src/sheet/root.js.map +1 -1
  155. package/dist/src/sheet/sheet.d.ts +7843 -4132
  156. package/dist/src/sheet/sheet.d.ts.map +1 -1
  157. package/dist/src/sheet/sheet.js +41 -2
  158. package/dist/src/sheet/sheet.js.map +1 -1
  159. package/dist/src/sheet/templates.d.ts +4 -0
  160. package/dist/src/sheet/templates.d.ts.map +1 -1
  161. package/dist/src/sheet/types.d.ts +12449 -5268
  162. package/dist/src/sheet/types.d.ts.map +1 -1
  163. package/dist/src/sheet/types.js +114 -2
  164. package/dist/src/sheet/types.js.map +1 -1
  165. package/dist/src/utils/derive.d.ts +1 -1
  166. package/dist/src/utils/derive.js +1 -1
  167. package/dist/src/utils/record-kind.d.ts +625 -0
  168. package/dist/src/utils/record-kind.d.ts.map +1 -0
  169. package/dist/src/utils/record-kind.js +450 -0
  170. package/dist/src/utils/record-kind.js.map +1 -0
  171. package/dist/src/utils/views.d.ts +55 -0
  172. package/dist/src/utils/views.d.ts.map +1 -0
  173. package/dist/src/utils/views.js +72 -0
  174. package/dist/src/utils/views.js.map +1 -0
  175. package/dist/src/utils/vocabulary.d.ts +48 -0
  176. package/dist/src/utils/vocabulary.d.ts.map +1 -0
  177. package/dist/src/utils/vocabulary.js +47 -0
  178. package/dist/src/utils/vocabulary.js.map +1 -0
  179. package/dist/test/allocation/allocation.examples.d.ts +2 -0
  180. package/dist/test/allocation/allocation.examples.d.ts.map +1 -1
  181. package/dist/test/allocation/allocation.examples.js +81 -2
  182. package/dist/test/allocation/allocation.examples.js.map +1 -1
  183. package/dist/test/bind/func/func.examples.d.ts +19 -1
  184. package/dist/test/bind/func/func.examples.d.ts.map +1 -1
  185. package/dist/test/bind/func/func.examples.js +36 -1
  186. package/dist/test/bind/func/func.examples.js.map +1 -1
  187. package/dist/test/calendar/calendar.examples.d.ts +2 -0
  188. package/dist/test/calendar/calendar.examples.d.ts.map +1 -1
  189. package/dist/test/calendar/calendar.examples.js +80 -2
  190. package/dist/test/calendar/calendar.examples.js.map +1 -1
  191. package/dist/test/decision/queue.examples.d.ts +1 -0
  192. package/dist/test/decision/queue.examples.d.ts.map +1 -1
  193. package/dist/test/decision/queue.examples.js +12 -0
  194. package/dist/test/decision/queue.examples.js.map +1 -1
  195. package/dist/test/examples-package.d.ts.map +1 -1
  196. package/dist/test/examples-package.js +5 -4
  197. package/dist/test/examples-package.js.map +1 -1
  198. package/dist/test/flowchart/flowchart.examples.d.ts +1250 -4605
  199. package/dist/test/flowchart/flowchart.examples.d.ts.map +1 -1
  200. package/dist/test/flowchart/flowchart.examples.js +861 -512
  201. package/dist/test/flowchart/flowchart.examples.js.map +1 -1
  202. package/dist/test/ontology/ontology.examples.d.ts +2 -3
  203. package/dist/test/ontology/ontology.examples.d.ts.map +1 -1
  204. package/dist/test/ontology/ontology.examples.js +32 -21
  205. package/dist/test/ontology/ontology.examples.js.map +1 -1
  206. package/dist/test/plan/plan-events.examples.d.ts +1 -0
  207. package/dist/test/plan/plan-events.examples.d.ts.map +1 -1
  208. package/dist/test/plan/plan-events.examples.js +44 -0
  209. package/dist/test/plan/plan-events.examples.js.map +1 -1
  210. package/dist/test/plan/plan-nested.examples.d.ts +2 -2
  211. package/dist/test/plan/plan-nested.examples.js +5 -5
  212. package/dist/test/plan/plan-nested.examples.js.map +1 -1
  213. package/dist/test/plan/plan-records.examples.d.ts.map +1 -1
  214. package/dist/test/plan/plan-records.examples.js +1 -1
  215. package/dist/test/plan/plan-records.examples.js.map +1 -1
  216. package/dist/test/query/query.examples.d.ts +2 -0
  217. package/dist/test/query/query.examples.d.ts.map +1 -1
  218. package/dist/test/query/query.examples.js +37 -1
  219. package/dist/test/query/query.examples.js.map +1 -1
  220. package/dist/test/roster/roster.examples.d.ts +2 -0
  221. package/dist/test/roster/roster.examples.d.ts.map +1 -1
  222. package/dist/test/roster/roster.examples.js +76 -15
  223. package/dist/test/roster/roster.examples.js.map +1 -1
  224. package/dist/test/schematic/schematic-records.examples.d.ts.map +1 -1
  225. package/dist/test/schematic/schematic-records.examples.js +6 -4
  226. package/dist/test/schematic/schematic-records.examples.js.map +1 -1
  227. package/dist/test/schematic/schematic.examples.d.ts +1 -0
  228. package/dist/test/schematic/schematic.examples.d.ts.map +1 -1
  229. package/dist/test/schematic/schematic.examples.js +144 -0
  230. package/dist/test/schematic/schematic.examples.js.map +1 -1
  231. package/dist/test/sheet/sheet-actions.examples.d.ts +1264 -0
  232. package/dist/test/sheet/sheet-actions.examples.d.ts.map +1 -0
  233. package/dist/test/sheet/sheet-actions.examples.js +394 -0
  234. package/dist/test/sheet/sheet-actions.examples.js.map +1 -0
  235. package/dist/test/sheet/sheet.examples.d.ts +1 -0
  236. package/dist/test/sheet/sheet.examples.d.ts.map +1 -1
  237. package/dist/test/sheet/sheet.examples.js +77 -0
  238. package/dist/test/sheet/sheet.examples.js.map +1 -1
  239. package/dist/test/studio/studio.examples.d.ts +1 -0
  240. package/dist/test/studio/studio.examples.d.ts.map +1 -1
  241. package/dist/test/studio/studio.examples.js +18 -8
  242. package/dist/test/studio/studio.examples.js.map +1 -1
  243. package/package.json +12 -12
  244. package/dist/src/diff/index.d.ts +0 -407
  245. package/dist/src/diff/index.d.ts.map +0 -1
  246. package/dist/src/diff/index.js +0 -203
  247. package/dist/src/diff/index.js.map +0 -1
  248. package/dist/src/experiment/index.d.ts +0 -1033
  249. package/dist/src/experiment/index.d.ts.map +0 -1
  250. package/dist/src/experiment/index.js +0 -197
  251. package/dist/src/experiment/index.js.map +0 -1
  252. package/dist/src/experiment/types.d.ts +0 -1093
  253. package/dist/src/experiment/types.d.ts.map +0 -1
  254. package/dist/src/experiment/types.js +0 -423
  255. package/dist/src/experiment/types.js.map +0 -1
  256. package/dist/src/flowchart/over.d.ts +0 -227
  257. package/dist/src/flowchart/over.d.ts.map +0 -1
  258. package/dist/src/flowchart/over.js +0 -213
  259. package/dist/src/flowchart/over.js.map +0 -1
  260. package/dist/src/flowchart/patch.d.ts +0 -64
  261. package/dist/src/flowchart/patch.d.ts.map +0 -1
  262. package/dist/src/flowchart/patch.js +0 -67
  263. package/dist/src/flowchart/patch.js.map +0 -1
  264. package/dist/src/flowchart/values.d.ts +0 -271
  265. package/dist/src/flowchart/values.d.ts.map +0 -1
  266. package/dist/src/flowchart/values.js +0 -220
  267. package/dist/src/flowchart/values.js.map +0 -1
  268. package/dist/src/flowchart/window.d.ts +0 -306
  269. package/dist/src/flowchart/window.d.ts.map +0 -1
  270. package/dist/src/flowchart/window.js +0 -63
  271. package/dist/src/flowchart/window.js.map +0 -1
  272. package/dist/src/runtime/diff.d.ts +0 -36
  273. package/dist/src/runtime/diff.d.ts.map +0 -1
  274. package/dist/src/runtime/diff.js +0 -34
  275. package/dist/src/runtime/diff.js.map +0 -1
  276. package/dist/src/runtime/experiment.d.ts +0 -48
  277. package/dist/src/runtime/experiment.d.ts.map +0 -1
  278. package/dist/src/runtime/experiment.js +0 -10
  279. package/dist/src/runtime/experiment.js.map +0 -1
  280. package/dist/test/diff/diff.examples.d.ts +0 -313
  281. package/dist/test/diff/diff.examples.d.ts.map +0 -1
  282. package/dist/test/diff/diff.examples.js +0 -452
  283. package/dist/test/diff/diff.examples.js.map +0 -1
  284. package/dist/test/experiment/experiment.examples.d.ts +0 -1512
  285. package/dist/test/experiment/experiment.examples.d.ts.map +0 -1
  286. package/dist/test/experiment/experiment.examples.js +0 -609
  287. package/dist/test/experiment/experiment.examples.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/experiment/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EACH,UAAU,EACV,WAAW,EACX,UAAU,EACV,SAAS,EACT,QAAQ,EACR,SAAS,EACT,WAAW,EACX,WAAW,EACX,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,UAAU,EACb,MAAM,eAAe,CAAC;AAOvB,6BAA6B;AAC7B,eAAO,MAAM,MAA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;;;;;;;;;;;;;;;;YA3ZvB,yEAAyE;;YAEzE,0EAA0E;;YAE1E,sEAAsE;;YAEtE,qFAAqF;;;QA2BrF,gFAAgF;;;;;;;;;;QAMhF;4FACoF;;QAEpF;sGAC8F;;QAE9F;qGAC6F;;;;;;;;;;;;;;;;;IAoX7F;yFACqF;;EAEvF,CAAC;AACH,6CAA6C;AAC7C,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC;AAEnD,iEAAiE;AACjE,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;YA1apB,yEAAyE;;YAEzE,0EAA0E;;YAE1E,sEAAsE;;YAEtE,qFAAqF;;;QA2BrF,gFAAgF;;;;;;;;;;QAMhF;4FACoF;;QAEpF;sGAC8F;;QAE9F;qGAC6F;;;;;;;;;;;;;;;;;IAoX7F;yFACqF;;GAOrC,CAAC;AACrD,0CAA0C;AAC1C,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC"}
@@ -1,423 +0,0 @@
1
- /**
2
- * Copyright (c) 2025 Elara AI Pty Ltd
3
- * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
- */
5
- /**
6
- * The `Experiment` render contract.
7
- *
8
- * These types are **replicated verbatim (snake_case)** from
9
- * `east-py-datascience`'s `Causal.Types.*`, so the engine's `Causal.experiment`
10
- * result unifies **structurally** with the component's binding — replicate, don't
11
- * share (East type equality is structural; `e3-ui` never imports
12
- * `east-py-datascience`). Keep these byte-identical to the datascience
13
- * definitions — they are kept in sync by hand.
14
- *
15
- * The user edits an {@link ExperimentConfigType} (the staged "question + method")
16
- * and **Apply** runs the one bound `experiment` function, which returns an
17
- * {@link ExperimentResultType} — the naive vs adjusted effect, confounder
18
- * balance, propensity overlap, a robustness summary, and an honesty
19
- * {@link ExperimentVerdictType}. `adjusted` is `none` when the engine refuses.
20
- *
21
- * @packageDocumentation
22
- */
23
- import { StructType, VariantType, OptionType, ArrayType, DictType, FloatType, IntegerType, BooleanType, StringType, NullType, DateTimeType, VectorType, } from '@elaraai/east';
24
- import { Slice } from '@elaraai/east-ui';
25
- // ============================================================================
26
- // Shared vocabulary (= Causal.Types.*)
27
- // ============================================================================
28
- /** A confidence interval. */
29
- export const CiType = StructType({ lower: FloatType, upper: FloatType });
30
- /** Inverse-propensity weighting scheme. */
31
- export const WeightingSchemeType = VariantType({
32
- ips_weight: NullType,
33
- ips_stabilized_weight: NullType,
34
- ips_normalized_weight: NullType,
35
- });
36
- /** Backdoor-adjusted effect estimator. */
37
- export const EstimatorType = VariantType({
38
- linear_regression: NullType,
39
- propensity_score_weighting: StructType({
40
- weighting_scheme: OptionType(WeightingSchemeType),
41
- }),
42
- });
43
- /** Population the effect is reported for. */
44
- export const TargetUnitsType = VariantType({
45
- ate: NullType,
46
- att: NullType,
47
- atc: NullType,
48
- });
49
- /**
50
- * A directional prior on the effect — the sign a domain expert expects. Drives the
51
- * `expected_sign` guard.
52
- * twin: east-py-datascience causal.ts `CausalSignType`
53
- */
54
- export const SignType = VariantType({
55
- positive: NullType,
56
- negative: NullType,
57
- });
58
- /** Bootstrap confidence-interval configuration. */
59
- export const BootstrapConfigType = StructType({
60
- reps: IntegerType,
61
- cluster_column: OptionType(StringType),
62
- confidence_level: OptionType(FloatType),
63
- });
64
- /** Which robustness checks to run. */
65
- export const RefuteSpecType = StructType({
66
- /** Permuted-treatment negative control — a real effect should vanish. */
67
- placebo: BooleanType,
68
- /** Inject an independent random common cause — the effect should hold. */
69
- random_common_cause: BooleanType,
70
- /** Re-estimate on random subsamples — the effect should be stable. */
71
- data_subset: BooleanType,
72
- /** Unobserved-confounder strengths to simulate → the sensitivity / tipping curve. */
73
- sensitivity: OptionType(ArrayType(FloatType)),
74
- });
75
- // ============================================================================
76
- // The config the user edits (= CausalExperimentConfigType)
77
- // ============================================================================
78
- /**
79
- * The experiment the user framed — the staged value the pickers write and
80
- * **Apply** feeds to the bound `experiment` function.
81
- *
82
- * `treatment` / `outcome` / `common_causes` / `categorical` are **column names**
83
- * introspected from the bound dataset's row struct (the `Table` pattern). The
84
- * `method` / `estimand` advanced choices and the `min_*` guard thresholds are
85
- * optional developer-defaulted, user-adjustable knobs.
86
- */
87
- export const ExperimentConfigType = StructType({
88
- treatment: StringType,
89
- outcome: StringType,
90
- common_causes: ArrayType(StringType),
91
- categorical: OptionType(ArrayType(StringType)),
92
- method: OptionType(EstimatorType),
93
- estimand: OptionType(TargetUnitsType),
94
- refute: OptionType(RefuteSpecType),
95
- /** Continuous column for the ALE dose-response curve (the "How much?" view). */
96
- dose_feature: OptionType(StringType),
97
- min_overlap: OptionType(FloatType),
98
- min_treatment_variation: OptionType(FloatType),
99
- bootstrap: OptionType(BootstrapConfigType),
100
- random_state: OptionType(IntegerType),
101
- /** Graded-overlap threshold — common support below this keeps `causal` from the
102
- * top tier (verdict `modest`, `overlap.support_strength = thin`); default 0.55. */
103
- strong_overlap: OptionType(FloatType),
104
- /** Robustness floor — a `causal` verdict whose E-value is below this is downgraded to
105
- * `modest`. Off by default. (E-value is a monotone transform of the standardized effect.) */
106
- evalue_floor: OptionType(FloatType),
107
- /** Directional prior — a material, CI-clear effect of the opposite sign is flagged
108
- * (`expected_sign_ok = some(false)`, verdict `adjustment_insufficient`). Off by default. */
109
- expected_sign: OptionType(SignType),
110
- });
111
- // ============================================================================
112
- // The result the engine returns (= CausalExperimentResultType)
113
- // ============================================================================
114
- /** One confounder's before-adjustment imbalance (categoricals → one row per level). */
115
- export const BalanceRowType = StructType({
116
- column: StringType,
117
- /** The original confounder this row belongs to — equals `column` for a numeric
118
- * confounder; the base confounder for a one-hot categorical level. */
119
- base_column: StringType,
120
- treated_mean: FloatType,
121
- control_mean: FloatType,
122
- std_diff: FloatType,
123
- /** Post-adjustment SMD (weighted means, same pooled-sd denominator) — proof the
124
- * adjustment closed the gap. `some` only for the propensity estimator with
125
- * computable scores.
126
- * twin: east-py-datascience BalanceRowType.std_diff_adjusted */
127
- std_diff_adjusted: OptionType(FloatType),
128
- });
129
- /** One observed confounder placed on the sensitivity strengths axis — the simulated
130
- * strength whose effect-shift equals the shift from omitting that confounder, so
131
- * "tips at 0.9" reads as "a hidden cause as strong as `column`".
132
- * twin: east-py-datascience `SensitivityBenchmarkType` */
133
- export const SensitivityBenchmarkType = StructType({
134
- column: StringType,
135
- strength: FloatType,
136
- });
137
- /**
138
- * Graded common-support tier — `refused` (below `min_overlap`), `thin` (clears the
139
- * refuse gate but below `strong_overlap`), `strong` (≥ `strong_overlap`). Vacuously
140
- * `strong` with no confounders.
141
- * twin: east-py-datascience causal.ts `SupportStrengthType`
142
- */
143
- export const SupportStrengthType = VariantType({
144
- refused: NullType,
145
- thin: NullType,
146
- strong: NullType,
147
- });
148
- /** Positivity / common-support diagnostic (binary treatment). */
149
- export const OverlapDiagnosticType = StructType({
150
- treated_propensity: VectorType(FloatType),
151
- control_propensity: VectorType(FloatType),
152
- common_support_frac: FloatType,
153
- /** Clears the **refuse** gate `min_overlap` — NOT a quality signal (true at the
154
- * default 0.10 gate still means barely-overlapping). Read `support_strength`. */
155
- positivity_ok: BooleanType,
156
- /** Graded common-support tier (`refused` / `thin` / `strong`).
157
- * twin: datascience OverlapDiagnosticType.support_strength */
158
- support_strength: SupportStrengthType,
159
- });
160
- /** The unobserved-confounder sensitivity (tipping) curve — effect at each simulated strength. */
161
- export const SensitivityCurveType = StructType({
162
- strengths: VectorType(FloatType),
163
- effects: VectorType(FloatType),
164
- /** Observed-confounder benchmarks on the SAME strengths axis (empty when none is
165
- * computable) — lets the surface say "survives a hidden cause as strong as
166
- * `incoming_grade`". Clamped to the last simulated strength. */
167
- benchmarks: ArrayType(SensitivityBenchmarkType),
168
- });
169
- /** The robustness summary the verdict + trust tab consume. */
170
- export const RefutationType = StructType({
171
- /** Effect under a permuted (placebo) treatment — should be ≈ 0. */
172
- placebo_effect: OptionType(FloatType),
173
- /** Whether the placebo effect vanished. */
174
- placebo_passes: OptionType(BooleanType),
175
- /** Whether a decoy random common cause left the estimate inside its CI. */
176
- random_cc_within_ci: OptionType(BooleanType),
177
- /** Mean effect across data subsamples (stability). */
178
- data_subset_effect: OptionType(FloatType),
179
- /** Std of the effect across data subsamples. */
180
- data_subset_std: OptionType(FloatType),
181
- /** Closed-form E-value (risk-ratio scale) — confounder strength needed to explain the
182
- * effect away. A monotone transform of the standardized effect (not independent of it). */
183
- robustness_value: OptionType(FloatType),
184
- /** Unobserved-confounder sensitivity (tipping) curve: effect at each simulated strength. */
185
- sensitivity: OptionType(SensitivityCurveType),
186
- /** Sign-prior check (when `config.expected_sign` is set): `some(true)` if a material
187
- * effect matches the expected direction, `some(false)` if it points the other way,
188
- * `none` when no prior or the effect is near-zero.
189
- * twin: datascience RefutationType.expected_sign_ok */
190
- expected_sign_ok: OptionType(BooleanType),
191
- });
192
- /** A dose-response (ALE) curve of a continuous feature on the outcome. */
193
- export const DoseResponseType = StructType({
194
- feature: StringType,
195
- grid: VectorType(FloatType),
196
- effect: VectorType(FloatType),
197
- lower: OptionType(VectorType(FloatType)),
198
- upper: OptionType(VectorType(FloatType)),
199
- /** Rows per dose bin — drives the surface's "you are here" (busiest bin) marker. */
200
- size: VectorType(IntegerType),
201
- });
202
- /**
203
- * The honesty verdict — a thin tag; the numbers live top-level on the result.
204
- * Only `not_estimable` carries a human-readable reason.
205
- */
206
- export const ExperimentVerdictType = VariantType({
207
- causal: NullType,
208
- modest: NullType,
209
- adjustment_insufficient: NullType,
210
- non_identifiable_positivity: NullType,
211
- not_estimable: StringType,
212
- });
213
- /**
214
- * Machine-readable reason a verdict fell short of `causal` — every FAILING gate
215
- * (the verdict tag is chosen by severity precedence, but explaining "why modest?"
216
- * needs all of them). Empty for `causal` and for the two refusal verdicts.
217
- * twin: east-py-datascience `VerdictReasonType`
218
- */
219
- export const VerdictReasonType = VariantType({
220
- /** The placebo (shuffle) refuter didn't collapse to ~0. */
221
- placebo_failed: NullType,
222
- /** |effect| below the materiality band (0.10 × outcome_sd). */
223
- not_material: NullType,
224
- /** The adjusted CI straddles zero. */
225
- ci_spans_zero: NullType,
226
- /** Material + CI-clear but pointing against `config.expected_sign`. */
227
- wrong_sign: NullType,
228
- /** Common support cleared the refuse gate but is below `strong_overlap`. */
229
- thin_support: NullType,
230
- /** E-value below the (opt-in) `evalue_floor`. */
231
- low_robustness: NullType,
232
- });
233
- /** The adjusted (like-for-like) effect + its CI — `none` on the result when the engine refuses. */
234
- export const AdjustedEffectType = StructType({ effect: FloatType, ci: OptionType(CiType) });
235
- /**
236
- * The complete, honest result. `adjusted` is `none` when the engine refuses
237
- * (positivity / no-variation); the `verdict` tag carries the headline; every
238
- * word/colour on the surface is derived from these numbers.
239
- */
240
- export const ExperimentResultType = StructType({
241
- naive: FloatType,
242
- naive_ci: OptionType(CiType),
243
- adjusted: OptionType(AdjustedEffectType),
244
- n_total: IntegerType,
245
- n_treated: IntegerType,
246
- n_control: IntegerType,
247
- /** Rows OUTSIDE the propensity common support — units with no like-for-like
248
- * counterpart on the other side. Display-only; nothing is dropped. */
249
- n_dropped: IntegerType,
250
- balance: ArrayType(BalanceRowType),
251
- overlap: OverlapDiagnosticType,
252
- refutation: OptionType(RefutationType),
253
- /** ALE dose-response of `dose_feature` (present when `config.dose_feature` is set). */
254
- dose_response: OptionType(DoseResponseType),
255
- verdict: ExperimentVerdictType,
256
- /** Why the verdict fell short of `causal` — every failing gate (empty for
257
- * `causal` and for the refusals, where the tag itself is the reason). */
258
- verdict_reasons: ArrayType(VerdictReasonType),
259
- /** The outcome's standard deviation — the scale the materiality band is on. */
260
- outcome_sd: FloatType,
261
- /** The materiality band the verdict applied (0.10 × outcome_sd), echoed so the
262
- * surface can say "smaller than what would matter here (±x)". */
263
- materiality_threshold: FloatType,
264
- /** Raw outcome mean of the treated arm (`none` when the arm is empty). */
265
- treated_outcome_mean: OptionType(FloatType),
266
- /** Raw outcome mean of the control arm (`none` when the arm is empty). */
267
- control_outcome_mean: OptionType(FloatType),
268
- });
269
- // ============================================================================
270
- // Validation-design contract (= Causal.Types.ExperimentDesign*)
271
- //
272
- // `Causal.designValidation(data, config, result, design_config)` turns a finished
273
- // experiment into the recipe for a REAL controlled trial that would confirm the
274
- // effect — how many units, the split, and which categories to match the groups
275
- // on — or, when a plain trial can't be run, what to change so one can. There is
276
- // ONE design family (a randomised controlled trial); the framing, the size
277
- // `basis`, and the visuals vary with the verdict. The renderer's "Validate" tab
278
- // paints it from these numbers (KPI + split meter + match chips + power curve).
279
- // Mirrors `Causal.Types.*` in east-py-datascience — kept in sync by hand.
280
- // ============================================================================
281
- /**
282
- * Why the trial is sized the way it is — set from the verdict, so the tab's
283
- * headline + visuals change with the result rather than reading the same twice.
284
- */
285
- export const DesignBasisType = VariantType({
286
- /** Clear effect → power the trial to detect the *observed* effect. */
287
- detect_observed: NullType,
288
- /** Fuzzy / maybe-nothing → power to the smallest effect worth acting on. */
289
- resolve_vs_null: NullType,
290
- /** A trust check failed → randomise to remove the bias adjustment couldn't. */
291
- de_bias: NullType,
292
- /** No overlap → randomise within the comparable range. */
293
- restrict_to_overlap: NullType,
294
- /** No control group exists → hold back a random sample next time. */
295
- create_control: NullType,
296
- });
297
- /** One sizing option — a split and the head-count it needs (even split first). */
298
- export const TrialOptionType = StructType({
299
- /** Plain label, e.g. "Even split" / "Treat fewer". */
300
- label: StringType,
301
- /** Fraction assigned to the treatment (0..1; 0.5 = even). */
302
- treated_share: FloatType,
303
- n_treated: IntegerType,
304
- n_control: IntegerType,
305
- n_total: IntegerType,
306
- });
307
- /** The "chance of detecting it" curve — total head-count → power (0..1). */
308
- export const PowerCurveType = StructType({
309
- n: VectorType(IntegerType),
310
- power: VectorType(FloatType),
311
- });
312
- /**
313
- * The validation-trial recipe — a randomised controlled trial sized from the
314
- * observed effect (or the materiality threshold) and the outcome spread, with
315
- * the groups matched on the confounders that were most imbalanced. Everything
316
- * the "Validate" tab paints is derived from these fields.
317
- */
318
- export const ExperimentDesignType = StructType({
319
- /** The verdict that drove the recommendation (echoed for framing). */
320
- verdict: ExperimentVerdictType,
321
- basis: DesignBasisType,
322
- /** The effect size the trial is powered to detect (observed, or materiality). */
323
- target_effect: FloatType,
324
- /** Outcome spread (pooled SD) used to size it. */
325
- outcome_sd: FloatType,
326
- target_power: FloatType,
327
- alpha: FloatType,
328
- /** Chance the CURRENT sample would already detect `target_effect` (the "you're here" marker); `none` when there's no comparison group. */
329
- current_power: OptionType(FloatType),
330
- /** Categories both groups must be matched on (the most-imbalanced confounders). */
331
- match_on: ArrayType(StringType),
332
- /** Ranked split options (even split first; cost-saving alternates). */
333
- options: ArrayType(TrialOptionType),
334
- /** The detect-chance curve for the chart. */
335
- power_curve: PowerCurveType,
336
- /** One generated, plain-language sentence framing the recipe. */
337
- rationale: StringType,
338
- });
339
- /** Optional knobs `Causal.designValidation` accepts (all developer-defaulted). */
340
- export const DesignConfigType = StructType({
341
- /** Significance level (default 0.05). */
342
- alpha: OptionType(FloatType),
343
- /** Target chance of detecting the effect (default 0.8). */
344
- target_power: OptionType(FloatType),
345
- /** Smallest effect worth acting on — sizes the trial to this when set / when there's no trustworthy observed effect. */
346
- materiality: OptionType(FloatType),
347
- /** Treatment shares to offer as options (default [0.5]). */
348
- treated_shares: OptionType(ArrayType(FloatType)),
349
- });
350
- // ============================================================================
351
- // UI-only types (not part of the engine contract)
352
- // ============================================================================
353
- /**
354
- * The UI-side population filter — a set of {@link Slice} predicates the Step-4
355
- * rail edits. It narrows the rows **client-side, before** the `experiment` call,
356
- * so it is deliberately **not** a field of {@link ExperimentConfigType} (the
357
- * bound function never sees it; the config stays byte-identical to the causal
358
- * library's contract). Bound as its own optional staged dataset so a surface can
359
- * seed / persist / commit the framing filters.
360
- */
361
- export const PopulationType = ArrayType(Slice.Types.Predicate);
362
- /**
363
- * One developer-authored, vetted experiment configuration — a named question whose
364
- * `spec` is loaded into the working config (and whose optional `population` sets the
365
- * scope) when it is selected from the surface's question selector. A committed result
366
- * records the originating configuration by `id`.
367
- *
368
- * A configuration bundles the **vetted backdoor set + scope** so a non-expert can pick a
369
- * correct causal question from a menu rather than assemble one. `spec` is a full
370
- * {@link ExperimentConfigType} (column names are plain strings); `population` is the
371
- * optional Step-4 scope (`none` ⇒ no scope); `group` sections the selector. An entry may
372
- * also carry a precomputed `result`/`design` so the surface paints an answer with no live
373
- * call.
374
- */
375
- export const ConfigurationType = StructType({
376
- /** Stable key — the journal records THIS (not `label`), and it drives selection
377
- * identity, so a renamed `label` never orphans a committed row. */
378
- id: StringType,
379
- /** Display title shown in the question selector. */
380
- label: StringType,
381
- /** The causal question — the vetted, pre-baked {@link ExperimentConfigType} this
382
- * entry frames (loaded into the working config when selected). */
383
- spec: ExperimentConfigType,
384
- /** Optional population scope to apply on select; `none` ⇒ no scope. */
385
- population: OptionType(PopulationType),
386
- /** Optional section header — entries sharing a `group` are bucketed together. */
387
- group: OptionType(StringType),
388
- /** Optional precomputed answer for this question (e.g. a dataflow task ran
389
- * `Causal.experiment` once). `none` ⇒ compute live via the `experiment` function. */
390
- result: OptionType(ExperimentResultType),
391
- /** Optional precomputed "Validate" recipe ({@link ExperimentDesignType}) for this
392
- * question; `none` ⇒ compute live via the `design` function (if bound). */
393
- design: OptionType(ExperimentDesignType),
394
- });
395
- /**
396
- * Optional per-column display metadata the developer supplies once. Keyed by
397
- * column name. Lets the derived prose read "worse" instead of "lower" and show
398
- * friendly labels / units.
399
- */
400
- export const ColumnMetaType = DictType(StringType, StructType({
401
- label: OptionType(StringType),
402
- unit: OptionType(StringType),
403
- higherIsBetter: OptionType(BooleanType),
404
- }));
405
- /**
406
- * A committed experiment in the journal — the framed config + the verdict +
407
- * headline effect + who committed it when. The renderer derives the verdict
408
- * words and colour from `verdict` / `adjusted`.
409
- */
410
- export const JournalRowType = StructType({
411
- config: ExperimentConfigType,
412
- verdict: ExperimentVerdictType,
413
- naive: FloatType,
414
- adjusted: OptionType(FloatType),
415
- committed_at: DateTimeType,
416
- committed_by: StringType,
417
- /** The `id` of the preset this experiment was framed from (`none` for a
418
- * free-form / pre-presets row); the surface renders it as a "from {label}" chip. */
419
- preset: OptionType(StringType),
420
- });
421
- /** The journal dataset — committed experiments, newest first. */
422
- export const JournalType = ArrayType(JournalRowType);
423
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/experiment/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EACH,UAAU,EACV,WAAW,EACX,UAAU,EACV,SAAS,EACT,QAAQ,EACR,SAAS,EACT,WAAW,EACX,WAAW,EACX,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,UAAU,GACb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEzC,+EAA+E;AAC/E,uCAAuC;AACvC,+EAA+E;AAE/E,6BAA6B;AAC7B,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;AAIzE,2CAA2C;AAC3C,MAAM,CAAC,MAAM,mBAAmB,GAAG,WAAW,CAAC;IAC3C,UAAU,EAAE,QAAQ;IACpB,qBAAqB,EAAE,QAAQ;IAC/B,qBAAqB,EAAE,QAAQ;CAClC,CAAC,CAAC;AAIH,0CAA0C;AAC1C,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC;IACrC,iBAAiB,EAAE,QAAQ;IAC3B,0BAA0B,EAAE,UAAU,CAAC;QACnC,gBAAgB,EAAE,UAAU,CAAC,mBAAmB,CAAC;KACpD,CAAC;CACL,CAAC,CAAC;AAIH,6CAA6C;AAC7C,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CAAC;IACvC,GAAG,EAAE,QAAQ;IACb,GAAG,EAAE,QAAQ;IACb,GAAG,EAAE,QAAQ;CAChB,CAAC,CAAC;AAIH;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,WAAW,CAAC;IAChC,QAAQ,EAAE,QAAQ;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