psyclaw 0.33.1 → 0.34.0-preview.2

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 (175) hide show
  1. package/dist/apps/panel/index.html +16 -16
  2. package/dist/src/adapters/pi/arg-repair.d.ts +27 -0
  3. package/dist/src/adapters/pi/arg-repair.js +177 -0
  4. package/dist/src/adapters/pi/arg-repair.js.map +1 -0
  5. package/dist/src/adapters/pi/extension.js +1497 -540
  6. package/dist/src/adapters/pi/extension.js.map +1 -1
  7. package/dist/src/adapters/pi/observation-mask.d.ts +19 -0
  8. package/dist/src/adapters/pi/observation-mask.js +105 -2
  9. package/dist/src/adapters/pi/observation-mask.js.map +1 -1
  10. package/dist/src/adapters/pi/session.js +1 -1
  11. package/dist/src/adapters/pi/session.js.map +1 -1
  12. package/dist/src/analysis/decision-points.d.ts +4 -9
  13. package/dist/src/analysis/decision-points.js +20 -74
  14. package/dist/src/analysis/decision-points.js.map +1 -1
  15. package/dist/src/analysis/estimand.d.ts +127 -0
  16. package/dist/src/analysis/estimand.js +526 -0
  17. package/dist/src/analysis/estimand.js.map +1 -0
  18. package/dist/src/analysis/method-rules.d.ts +6 -0
  19. package/dist/src/analysis/method-rules.js +20 -3
  20. package/dist/src/analysis/method-rules.js.map +1 -1
  21. package/dist/src/analysis/package-net.d.ts +106 -0
  22. package/dist/src/analysis/package-net.js +277 -0
  23. package/dist/src/analysis/package-net.js.map +1 -0
  24. package/dist/src/analysis/plan.d.ts +6 -2
  25. package/dist/src/analysis/plan.js +34 -17
  26. package/dist/src/analysis/plan.js.map +1 -1
  27. package/dist/src/analysis/runtime-tools.d.ts +0 -6
  28. package/dist/src/analysis/runtime-tools.js +0 -156
  29. package/dist/src/analysis/runtime-tools.js.map +1 -1
  30. package/dist/src/analysis/shell-timeout.d.ts +21 -0
  31. package/dist/src/analysis/shell-timeout.js +87 -1
  32. package/dist/src/analysis/shell-timeout.js.map +1 -1
  33. package/dist/src/analysis/stats-router.d.ts +4 -8
  34. package/dist/src/analysis/stats-router.js +21 -23
  35. package/dist/src/analysis/stats-router.js.map +1 -1
  36. package/dist/src/ars/academic-router.d.ts +8 -8
  37. package/dist/src/ars/academic-router.js +22 -35
  38. package/dist/src/ars/academic-router.js.map +1 -1
  39. package/dist/src/ars/doctor.js +1 -2
  40. package/dist/src/ars/doctor.js.map +1 -1
  41. package/dist/src/ars/mode-editor.d.ts +7 -2
  42. package/dist/src/ars/mode-editor.js +15 -16
  43. package/dist/src/ars/mode-editor.js.map +1 -1
  44. package/dist/src/branding.d.ts +10 -0
  45. package/dist/src/branding.js +40 -33
  46. package/dist/src/branding.js.map +1 -1
  47. package/dist/src/chat.d.ts +1 -1
  48. package/dist/src/chat.js +12 -2
  49. package/dist/src/chat.js.map +1 -1
  50. package/dist/src/index.d.ts +1 -2
  51. package/dist/src/index.js +1 -2
  52. package/dist/src/index.js.map +1 -1
  53. package/dist/src/install/installer.js +0 -5
  54. package/dist/src/install/installer.js.map +1 -1
  55. package/dist/src/integrations/mcp-format.d.ts +6 -0
  56. package/dist/src/integrations/mcp-format.js +52 -0
  57. package/dist/src/integrations/mcp-format.js.map +1 -0
  58. package/dist/src/orchestration/research-agents.js +1 -1
  59. package/dist/src/orchestration/research-agents.js.map +1 -1
  60. package/dist/src/orchestration/runner.d.ts +0 -1
  61. package/dist/src/orchestration/runner.js +0 -3
  62. package/dist/src/orchestration/runner.js.map +1 -1
  63. package/dist/src/orchestration/scheduler.js +0 -31
  64. package/dist/src/orchestration/scheduler.js.map +1 -1
  65. package/dist/src/panel/server.js +3 -4
  66. package/dist/src/panel/server.js.map +1 -1
  67. package/dist/src/project/hitl.js +3 -3
  68. package/dist/src/project/hitl.js.map +1 -1
  69. package/dist/src/project/workspace.js +8 -20
  70. package/dist/src/project/workspace.js.map +1 -1
  71. package/dist/src/research/decisions.d.ts +115 -0
  72. package/dist/src/research/decisions.js +284 -0
  73. package/dist/src/research/decisions.js.map +1 -0
  74. package/dist/src/research/intent.d.ts +90 -0
  75. package/dist/src/research/intent.js +175 -0
  76. package/dist/src/research/intent.js.map +1 -0
  77. package/dist/src/research/plan-message.d.ts +117 -0
  78. package/dist/src/research/plan-message.js +187 -0
  79. package/dist/src/research/plan-message.js.map +1 -0
  80. package/dist/src/research/practice.d.ts +33 -0
  81. package/dist/src/research/practice.js +160 -0
  82. package/dist/src/research/practice.js.map +1 -0
  83. package/dist/src/router/decision-model.d.ts +54 -0
  84. package/dist/src/router/decision-model.js +129 -0
  85. package/dist/src/router/decision-model.js.map +1 -0
  86. package/dist/src/rules/user-rules.js.map +1 -1
  87. package/dist/src/safety/data-access.js +4 -4
  88. package/dist/src/safety/data-access.js.map +1 -1
  89. package/dist/src/safety/secret-marks.d.ts +44 -0
  90. package/dist/src/safety/secret-marks.js +88 -0
  91. package/dist/src/safety/secret-marks.js.map +1 -0
  92. package/dist/src/session/continuously-work.js +1 -1
  93. package/dist/src/session/continuously-work.js.map +1 -1
  94. package/dist/src/session/help.js +29 -38
  95. package/dist/src/session/help.js.map +1 -1
  96. package/dist/src/session/modes.d.ts +24 -21
  97. package/dist/src/session/modes.js +81 -130
  98. package/dist/src/session/modes.js.map +1 -1
  99. package/dist/src/session/skill-invoke.d.ts +54 -0
  100. package/dist/src/session/skill-invoke.js +177 -0
  101. package/dist/src/session/skill-invoke.js.map +1 -0
  102. package/dist/src/session/skill-reference.d.ts +15 -0
  103. package/dist/src/session/skill-reference.js +35 -0
  104. package/dist/src/session/skill-reference.js.map +1 -0
  105. package/dist/src/skills/recommended.js +0 -2
  106. package/dist/src/skills/recommended.js.map +1 -1
  107. package/dist/src/skills/user-skills.js +11 -0
  108. package/dist/src/skills/user-skills.js.map +1 -1
  109. package/dist/src/style/cli-ui.js +15 -13
  110. package/dist/src/style/cli-ui.js.map +1 -1
  111. package/dist/src/tui/biosignal-wizard.js +1 -1
  112. package/dist/src/tui/biosignal-wizard.js.map +1 -1
  113. package/dist/src/tui/wake-options.d.ts +2 -2
  114. package/dist/src/tui/wake-options.js +8 -5
  115. package/dist/src/tui/wake-options.js.map +1 -1
  116. package/dist/src/updates/check.js +4 -2
  117. package/dist/src/updates/check.js.map +1 -1
  118. package/dist/src/updates/registry.d.ts +2 -1
  119. package/dist/src/updates/registry.js +2 -2
  120. package/dist/src/updates/registry.js.map +1 -1
  121. package/dist/src/updates/status.d.ts +9 -2
  122. package/dist/src/updates/status.js +43 -6
  123. package/dist/src/updates/status.js.map +1 -1
  124. package/dist/src/updates/update.js +7 -3
  125. package/dist/src/updates/update.js.map +1 -1
  126. package/dist/src/verify/checklist.d.ts +1 -1
  127. package/dist/src/verify/checklist.js +5 -5
  128. package/dist/src/verify/checklist.js.map +1 -1
  129. package/dist/src/wake-options/runtime.d.ts +9 -0
  130. package/dist/src/wake-options/runtime.js +39 -1
  131. package/dist/src/wake-options/runtime.js.map +1 -1
  132. package/dist/src/workflows/academic-export.js.map +1 -1
  133. package/dist/src/workflows/meta-analysis.js +1 -1
  134. package/dist/src/workflows/meta-analysis.js.map +1 -1
  135. package/package.json +2 -1
  136. package/skills/core/academic-grill/SKILL.md +3 -3
  137. package/skills/core/analysis-plan/SKILL.md +35 -32
  138. package/skills/core/manifest.json +12 -4
  139. package/skills/core/package-install/SKILL.md +35 -0
  140. package/skills/core/package-install/pkgnet.py +178 -0
  141. package/skills/recommended/mcp-catalog.json +1 -1
  142. package/dist/src/analysis/prior/apply.d.ts +0 -15
  143. package/dist/src/analysis/prior/apply.js +0 -98
  144. package/dist/src/analysis/prior/apply.js.map +0 -1
  145. package/dist/src/analysis/prior/checks.d.ts +0 -21
  146. package/dist/src/analysis/prior/checks.js +0 -233
  147. package/dist/src/analysis/prior/checks.js.map +0 -1
  148. package/dist/src/analysis/prior/constants.d.ts +0 -33
  149. package/dist/src/analysis/prior/constants.js +0 -117
  150. package/dist/src/analysis/prior/constants.js.map +0 -1
  151. package/dist/src/analysis/prior/gate.d.ts +0 -14
  152. package/dist/src/analysis/prior/gate.js +0 -93
  153. package/dist/src/analysis/prior/gate.js.map +0 -1
  154. package/dist/src/analysis/prior/memory.d.ts +0 -8
  155. package/dist/src/analysis/prior/memory.js +0 -46
  156. package/dist/src/analysis/prior/memory.js.map +0 -1
  157. package/dist/src/analysis/prior/reflect.d.ts +0 -6
  158. package/dist/src/analysis/prior/reflect.js +0 -48
  159. package/dist/src/analysis/prior/reflect.js.map +0 -1
  160. package/dist/src/analysis/prior/render.d.ts +0 -20
  161. package/dist/src/analysis/prior/render.js +0 -159
  162. package/dist/src/analysis/prior/render.js.map +0 -1
  163. package/dist/src/analysis/prior/submit.d.ts +0 -32
  164. package/dist/src/analysis/prior/submit.js +0 -213
  165. package/dist/src/analysis/prior/submit.js.map +0 -1
  166. package/dist/src/analysis/prior/tools.d.ts +0 -6
  167. package/dist/src/analysis/prior/tools.js +0 -38
  168. package/dist/src/analysis/prior/tools.js.map +0 -1
  169. package/dist/src/research/choice.d.ts +0 -16
  170. package/dist/src/research/choice.js +0 -25
  171. package/dist/src/research/choice.js.map +0 -1
  172. package/dist/src/skills/registry.d.ts +0 -28
  173. package/dist/src/skills/registry.js +0 -550
  174. package/dist/src/skills/registry.js.map +0 -1
  175. package/skills/core/prior-plan/SKILL.md +0 -53
@@ -1,53 +0,0 @@
1
- ---
2
- name: prior-plan
3
- description: Prior-mode process skill — recall before data, then a plan made of labeled constants. Does not run outcome models.
4
- license: MIT
5
- ---
6
-
7
- # Prior plan
8
-
9
- Prior mode does not load this skill. The session follows the prior prompt until the researcher approves. Approval rewrites the constants, runs the script, and returns to plain chat, where skills may be used.
10
-
11
- ## Order
12
-
13
- 1. Read only `BRIEF.md` or `psyclaw.md`. Do not open `data/`, a codebook, or a saved result.
14
- 2. Call `psyclaw_submit_recall`. For each hypothesis, in order: construct (how published studies usually score the instrument), internal validity (which comparison, whose data, what would make it misleading), statistical conclusion (what test the claim needs and what it assumes), dependence (whether this result should change another hypothesis). Put every approach you might use on its own line: `- id: description`. The id must later be an option of some constant.
15
- 3. After recall is accepted, profile the data once. Counts, ranges, missingness, and single-variable distributions are enough. Do not fit an outcome model.
16
- 4. Write `analysis/scripts/analysis.py` (or `.R`) and call `psyclaw_submit_plan_script` with the full script. It is checked, not run.
17
-
18
- ## Labels
19
-
20
- Put every analysis choice in a top-level constant, under a short comment naming the hypotheses it affects (`# H1, H2`):
21
-
22
- ```
23
- NAME = value # @intent value | other — why the researcher must choose
24
- NAME = value # @declare — why this needs no question
25
- NAME = value # @pseudo — why the options cannot differ for any data
26
- ```
27
-
28
- Sort each choice into one stage, then decide who settles it:
29
-
30
- 1. Analysis sample: who enters each hypothesis.
31
- 2. Variable construction: how each analysed variable is built.
32
- 3. Model specification: framework, covariates, which models are compared.
33
- 4. Inference and indices: estimator settings, tails, alpha, multiplicity, equivalence bounds, what counts as support, effect-size or fit-index definitions.
34
-
35
- Use `@intent` only in stages 1–3, and only where there is no common practice: an adapted scale with no scoring rule, a sample boundary the materials leave to the researcher, or two common frameworks that test different things. `@intent` needs at least one other value and a reason. Order `@intent` constants by how much they could change a hypothesis verdict, largest first.
36
-
37
- Stage 4 is always `@declare`. Do not ask about it.
38
-
39
- If the options agree in this data set but could differ in another, use `@declare` and say they are equivalent in this data. That is not `@pseudo`. `@pseudo` is only for options that must agree for any data, such as the mean versus the sum of the same items when the test is invariant to that scaling.
40
-
41
- Before labelling `@intent`, answer this: if the researcher picked the other option, which hypothesis verdict would change? If you cannot name it, use `@declare`. An `@intent` constant must be used by a hypothesis test in the script. A constant that appears only in a description, an exploration, or a covariate screen is `@declare`.
42
-
43
- A choice that matters only when another constant has a given value says so in the reason: `(if PARENT == value)`.
44
-
45
- ## Cards
46
-
47
- After the script is accepted, ask in the order the tool reports:
48
-
49
- - Core questions: one card each.
50
- - Technical settings: one card that confirms the current values together.
51
- - Dependent questions: wait until the parent choice is known.
52
-
53
- Use `psyclaw_wake_options`, then `psyclaw_record_choice`. Put the constant name in the prompt and the chosen option id in `selectedIds`. Soft「可以」settles only the current card. The plan is approved only when the researcher types `我已审阅并批准本方案`. That writes the confirmed values into the constants and runs the script. Do not run it yourself.