@alan512/experienceengine 0.2.1 → 0.3.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 (650) hide show
  1. package/.claude-plugin/marketplace.json +0 -0
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.env.example +0 -0
  4. package/.mcp.json +5 -6
  5. package/LICENSE +0 -0
  6. package/README.md +17 -7
  7. package/README.zh-CN.md +15 -5
  8. package/dist/adapters/claude-code/event-store.d.ts +0 -0
  9. package/dist/adapters/claude-code/event-store.js +0 -0
  10. package/dist/adapters/claude-code/event-store.js.map +0 -0
  11. package/dist/adapters/claude-code/hook-normalizer.d.ts +0 -0
  12. package/dist/adapters/claude-code/hook-normalizer.js +0 -0
  13. package/dist/adapters/claude-code/hook-normalizer.js.map +0 -0
  14. package/dist/adapters/claude-code/runtime-projection.d.ts +0 -0
  15. package/dist/adapters/claude-code/runtime-projection.js +0 -0
  16. package/dist/adapters/claude-code/runtime-projection.js.map +0 -0
  17. package/dist/adapters/claude-code/session-store.d.ts +0 -0
  18. package/dist/adapters/claude-code/session-store.js +0 -0
  19. package/dist/adapters/claude-code/session-store.js.map +0 -0
  20. package/dist/adapters/codex/action-registry.d.ts +23 -1
  21. package/dist/adapters/codex/action-registry.js +73 -0
  22. package/dist/adapters/codex/action-registry.js.map +1 -1
  23. package/dist/adapters/codex/behavior-loop.d.ts +80 -0
  24. package/dist/adapters/codex/behavior-loop.js +189 -0
  25. package/dist/adapters/codex/behavior-loop.js.map +1 -0
  26. package/dist/adapters/codex/broker-tools.d.ts +0 -0
  27. package/dist/adapters/codex/broker-tools.js +0 -0
  28. package/dist/adapters/codex/broker-tools.js.map +0 -0
  29. package/dist/adapters/codex/instruction-template.d.ts +0 -0
  30. package/dist/adapters/codex/instruction-template.js +0 -0
  31. package/dist/adapters/codex/instruction-template.js.map +0 -0
  32. package/dist/adapters/codex/mcp-server.d.ts +27 -72
  33. package/dist/adapters/codex/mcp-server.js +36 -160
  34. package/dist/adapters/codex/mcp-server.js.map +1 -1
  35. package/dist/analyzer/candidate-signals.d.ts +0 -0
  36. package/dist/analyzer/candidate-signals.js +0 -0
  37. package/dist/analyzer/candidate-signals.js.map +0 -0
  38. package/dist/analyzer/experience-analyzer.d.ts +0 -0
  39. package/dist/analyzer/experience-analyzer.js +0 -0
  40. package/dist/analyzer/experience-analyzer.js.map +0 -0
  41. package/dist/analyzer/extraction-evidence.d.ts +0 -0
  42. package/dist/analyzer/extraction-evidence.js +0 -0
  43. package/dist/analyzer/extraction-evidence.js.map +0 -0
  44. package/dist/analyzer/llm-learning-gate.d.ts +0 -0
  45. package/dist/analyzer/llm-learning-gate.js +0 -0
  46. package/dist/analyzer/llm-learning-gate.js.map +0 -0
  47. package/dist/analyzer/node-deduper.d.ts +0 -0
  48. package/dist/analyzer/node-deduper.js +0 -0
  49. package/dist/analyzer/node-deduper.js.map +0 -0
  50. package/dist/analyzer/node-normalizer.d.ts +0 -0
  51. package/dist/analyzer/node-normalizer.js +0 -0
  52. package/dist/analyzer/node-normalizer.js.map +0 -0
  53. package/dist/analyzer/storage-gate.d.ts +0 -0
  54. package/dist/analyzer/storage-gate.js +0 -0
  55. package/dist/analyzer/storage-gate.js.map +0 -0
  56. package/dist/analyzer/strategy-extractor.d.ts +0 -0
  57. package/dist/analyzer/strategy-extractor.js +0 -0
  58. package/dist/analyzer/strategy-extractor.js.map +0 -0
  59. package/dist/analyzer/warning-extractor.d.ts +0 -0
  60. package/dist/analyzer/warning-extractor.js +0 -0
  61. package/dist/analyzer/warning-extractor.js.map +0 -0
  62. package/dist/cli/commands/backup.d.ts +0 -0
  63. package/dist/cli/commands/backup.js +0 -0
  64. package/dist/cli/commands/backup.js.map +0 -0
  65. package/dist/cli/commands/claude-hook.d.ts +4 -0
  66. package/dist/cli/commands/claude-hook.js +105 -21
  67. package/dist/cli/commands/claude-hook.js.map +1 -1
  68. package/dist/cli/commands/codex-hook.d.ts +22 -0
  69. package/dist/cli/commands/codex-hook.js +298 -0
  70. package/dist/cli/commands/codex-hook.js.map +1 -0
  71. package/dist/cli/commands/codex-mcp-server.d.ts +0 -0
  72. package/dist/cli/commands/codex-mcp-server.js +0 -0
  73. package/dist/cli/commands/codex-mcp-server.js.map +0 -0
  74. package/dist/cli/commands/codex.d.ts +0 -0
  75. package/dist/cli/commands/codex.js +0 -0
  76. package/dist/cli/commands/codex.js.map +0 -0
  77. package/dist/cli/commands/config.d.ts +0 -0
  78. package/dist/cli/commands/config.js +9 -1
  79. package/dist/cli/commands/config.js.map +1 -1
  80. package/dist/cli/commands/cool.d.ts +0 -0
  81. package/dist/cli/commands/cool.js +0 -0
  82. package/dist/cli/commands/cool.js.map +0 -0
  83. package/dist/cli/commands/disable.d.ts +0 -0
  84. package/dist/cli/commands/disable.js +0 -0
  85. package/dist/cli/commands/disable.js.map +0 -0
  86. package/dist/cli/commands/doctor.d.ts +0 -0
  87. package/dist/cli/commands/doctor.js +63 -1
  88. package/dist/cli/commands/doctor.js.map +1 -1
  89. package/dist/cli/commands/enable.d.ts +0 -0
  90. package/dist/cli/commands/enable.js +0 -0
  91. package/dist/cli/commands/enable.js.map +0 -0
  92. package/dist/cli/commands/evaluate.d.ts +0 -0
  93. package/dist/cli/commands/evaluate.js +0 -0
  94. package/dist/cli/commands/evaluate.js.map +0 -0
  95. package/dist/cli/commands/export.d.ts +0 -0
  96. package/dist/cli/commands/export.js +0 -0
  97. package/dist/cli/commands/export.js.map +0 -0
  98. package/dist/cli/commands/feedback.d.ts +0 -0
  99. package/dist/cli/commands/feedback.js +0 -0
  100. package/dist/cli/commands/feedback.js.map +0 -0
  101. package/dist/cli/commands/import.d.ts +0 -0
  102. package/dist/cli/commands/import.js +0 -0
  103. package/dist/cli/commands/import.js.map +0 -0
  104. package/dist/cli/commands/init.d.ts +0 -0
  105. package/dist/cli/commands/init.js +0 -0
  106. package/dist/cli/commands/init.js.map +0 -0
  107. package/dist/cli/commands/inspect.d.ts +1 -1
  108. package/dist/cli/commands/inspect.js +325 -1
  109. package/dist/cli/commands/inspect.js.map +1 -1
  110. package/dist/cli/commands/install.d.ts +0 -0
  111. package/dist/cli/commands/install.js +2 -0
  112. package/dist/cli/commands/install.js.map +1 -1
  113. package/dist/cli/commands/maintenance.d.ts +0 -0
  114. package/dist/cli/commands/maintenance.js +4 -0
  115. package/dist/cli/commands/maintenance.js.map +1 -1
  116. package/dist/cli/commands/mcp-server.d.ts +0 -0
  117. package/dist/cli/commands/mcp-server.js +0 -0
  118. package/dist/cli/commands/mcp-server.js.map +0 -0
  119. package/dist/cli/commands/models.d.ts +0 -0
  120. package/dist/cli/commands/models.js +0 -0
  121. package/dist/cli/commands/models.js.map +0 -0
  122. package/dist/cli/commands/repair.d.ts +0 -0
  123. package/dist/cli/commands/repair.js +33 -3
  124. package/dist/cli/commands/repair.js.map +1 -1
  125. package/dist/cli/commands/retire.d.ts +0 -0
  126. package/dist/cli/commands/retire.js +0 -0
  127. package/dist/cli/commands/retire.js.map +0 -0
  128. package/dist/cli/commands/rollback.d.ts +0 -0
  129. package/dist/cli/commands/rollback.js +0 -0
  130. package/dist/cli/commands/rollback.js.map +0 -0
  131. package/dist/cli/commands/stats.d.ts +0 -0
  132. package/dist/cli/commands/stats.js +0 -0
  133. package/dist/cli/commands/stats.js.map +0 -0
  134. package/dist/cli/commands/status.d.ts +0 -0
  135. package/dist/cli/commands/status.js +27 -0
  136. package/dist/cli/commands/status.js.map +1 -1
  137. package/dist/cli/commands/upgrade.d.ts +0 -0
  138. package/dist/cli/commands/upgrade.js +0 -0
  139. package/dist/cli/commands/upgrade.js.map +0 -0
  140. package/dist/cli/dispatch.d.ts +0 -0
  141. package/dist/cli/dispatch.js +8 -3
  142. package/dist/cli/dispatch.js.map +1 -1
  143. package/dist/cli/index.d.ts +0 -0
  144. package/dist/cli/index.js +0 -0
  145. package/dist/cli/index.js.map +0 -0
  146. package/dist/cli/state-model.d.ts +0 -0
  147. package/dist/cli/state-model.js +0 -0
  148. package/dist/cli/state-model.js.map +0 -0
  149. package/dist/config/config-schema.d.ts +8 -0
  150. package/dist/config/config-schema.js +6 -0
  151. package/dist/config/config-schema.js.map +1 -1
  152. package/dist/config/default-config.d.ts +0 -0
  153. package/dist/config/default-config.js +1 -0
  154. package/dist/config/default-config.js.map +1 -1
  155. package/dist/config/load-config.d.ts +0 -0
  156. package/dist/config/load-config.js +3 -0
  157. package/dist/config/load-config.js.map +1 -1
  158. package/dist/config/path-resolver.d.ts +0 -0
  159. package/dist/config/path-resolver.js +0 -0
  160. package/dist/config/path-resolver.js.map +0 -0
  161. package/dist/config/runtime-env.d.ts +0 -0
  162. package/dist/config/runtime-env.js +0 -0
  163. package/dist/config/runtime-env.js.map +0 -0
  164. package/dist/config/secrets-store.d.ts +0 -0
  165. package/dist/config/secrets-store.js +0 -0
  166. package/dist/config/secrets-store.js.map +0 -0
  167. package/dist/config/settings-store.d.ts +0 -0
  168. package/dist/config/settings-store.js +0 -0
  169. package/dist/config/settings-store.js.map +0 -0
  170. package/dist/controller/candidate-retriever.d.ts +4 -1
  171. package/dist/controller/candidate-retriever.js +129 -13
  172. package/dist/controller/candidate-retriever.js.map +1 -1
  173. package/dist/controller/injection-renderer.d.ts +2 -2
  174. package/dist/controller/injection-renderer.js +22 -3
  175. package/dist/controller/injection-renderer.js.map +1 -1
  176. package/dist/controller/injection-scorecard.d.ts +0 -0
  177. package/dist/controller/injection-scorecard.js +3 -0
  178. package/dist/controller/injection-scorecard.js.map +1 -1
  179. package/dist/controller/inline-notice.d.ts +0 -0
  180. package/dist/controller/inline-notice.js +0 -0
  181. package/dist/controller/inline-notice.js.map +0 -0
  182. package/dist/controller/intervention-controller.d.ts +2 -2
  183. package/dist/controller/intervention-controller.js +183 -25
  184. package/dist/controller/intervention-controller.js.map +1 -1
  185. package/dist/controller/lexical-retriever.d.ts +0 -0
  186. package/dist/controller/lexical-retriever.js +0 -0
  187. package/dist/controller/lexical-retriever.js.map +0 -0
  188. package/dist/controller/model-reranker-mode.d.ts +4 -0
  189. package/dist/controller/model-reranker-mode.js +14 -0
  190. package/dist/controller/model-reranker-mode.js.map +1 -0
  191. package/dist/controller/model-reranker.d.ts +0 -1
  192. package/dist/controller/model-reranker.js +1 -13
  193. package/dist/controller/model-reranker.js.map +1 -1
  194. package/dist/controller/node-ranker.d.ts +0 -0
  195. package/dist/controller/node-ranker.js +0 -0
  196. package/dist/controller/node-ranker.js.map +0 -0
  197. package/dist/controller/policy-enricher.d.ts +2 -1
  198. package/dist/controller/policy-enricher.js +71 -11
  199. package/dist/controller/policy-enricher.js.map +1 -1
  200. package/dist/controller/query-rewrite.d.ts +0 -0
  201. package/dist/controller/query-rewrite.js +0 -0
  202. package/dist/controller/query-rewrite.js.map +0 -0
  203. package/dist/controller/retrieval-context.d.ts +0 -0
  204. package/dist/controller/retrieval-context.js +0 -0
  205. package/dist/controller/retrieval-context.js.map +0 -0
  206. package/dist/controller/second-opinion-gate.d.ts +0 -0
  207. package/dist/controller/second-opinion-gate.js +0 -0
  208. package/dist/controller/second-opinion-gate.js.map +0 -0
  209. package/dist/controller/trigger-evaluator.d.ts +0 -0
  210. package/dist/controller/trigger-evaluator.js +0 -0
  211. package/dist/controller/trigger-evaluator.js.map +0 -0
  212. package/dist/distillation/errors.d.ts +0 -0
  213. package/dist/distillation/errors.js +0 -0
  214. package/dist/distillation/errors.js.map +0 -0
  215. package/dist/distillation/experience-family.d.ts +0 -0
  216. package/dist/distillation/experience-family.js +0 -0
  217. package/dist/distillation/experience-family.js.map +0 -0
  218. package/dist/distillation/host-llm.d.ts +0 -0
  219. package/dist/distillation/host-llm.js +0 -0
  220. package/dist/distillation/host-llm.js.map +0 -0
  221. package/dist/distillation/llm-distiller.d.ts +0 -0
  222. package/dist/distillation/llm-distiller.js +0 -0
  223. package/dist/distillation/llm-distiller.js.map +0 -0
  224. package/dist/distillation/merge-decider.d.ts +0 -0
  225. package/dist/distillation/merge-decider.js +0 -0
  226. package/dist/distillation/merge-decider.js.map +0 -0
  227. package/dist/distillation/model-catalog.d.ts +0 -0
  228. package/dist/distillation/model-catalog.js +0 -0
  229. package/dist/distillation/model-catalog.js.map +0 -0
  230. package/dist/distillation/prompt-contract.d.ts +0 -0
  231. package/dist/distillation/prompt-contract.js +0 -0
  232. package/dist/distillation/prompt-contract.js.map +0 -0
  233. package/dist/distillation/providers/anthropic.d.ts +0 -0
  234. package/dist/distillation/providers/anthropic.js +0 -0
  235. package/dist/distillation/providers/anthropic.js.map +0 -0
  236. package/dist/distillation/providers/azure-openai.d.ts +0 -0
  237. package/dist/distillation/providers/azure-openai.js +0 -0
  238. package/dist/distillation/providers/azure-openai.js.map +0 -0
  239. package/dist/distillation/providers/baidu-qianfan.d.ts +0 -0
  240. package/dist/distillation/providers/baidu-qianfan.js +0 -0
  241. package/dist/distillation/providers/baidu-qianfan.js.map +0 -0
  242. package/dist/distillation/providers/bedrock.d.ts +0 -0
  243. package/dist/distillation/providers/bedrock.js +0 -0
  244. package/dist/distillation/providers/bedrock.js.map +0 -0
  245. package/dist/distillation/providers/dashscope.d.ts +0 -0
  246. package/dist/distillation/providers/dashscope.js +0 -0
  247. package/dist/distillation/providers/dashscope.js.map +0 -0
  248. package/dist/distillation/providers/deepseek.d.ts +0 -0
  249. package/dist/distillation/providers/deepseek.js +0 -0
  250. package/dist/distillation/providers/deepseek.js.map +0 -0
  251. package/dist/distillation/providers/gemini.d.ts +0 -0
  252. package/dist/distillation/providers/gemini.js +0 -0
  253. package/dist/distillation/providers/gemini.js.map +0 -0
  254. package/dist/distillation/providers/google-adc.d.ts +0 -0
  255. package/dist/distillation/providers/google-adc.js +0 -0
  256. package/dist/distillation/providers/google-adc.js.map +0 -0
  257. package/dist/distillation/providers/minimax.d.ts +0 -0
  258. package/dist/distillation/providers/minimax.js +0 -0
  259. package/dist/distillation/providers/minimax.js.map +0 -0
  260. package/dist/distillation/providers/moonshot.d.ts +0 -0
  261. package/dist/distillation/providers/moonshot.js +0 -0
  262. package/dist/distillation/providers/moonshot.js.map +0 -0
  263. package/dist/distillation/providers/openai-compatible-factory.d.ts +0 -0
  264. package/dist/distillation/providers/openai-compatible-factory.js +0 -0
  265. package/dist/distillation/providers/openai-compatible-factory.js.map +0 -0
  266. package/dist/distillation/providers/openai-compatible.d.ts +0 -0
  267. package/dist/distillation/providers/openai-compatible.js +0 -0
  268. package/dist/distillation/providers/openai-compatible.js.map +0 -0
  269. package/dist/distillation/providers/openai.d.ts +0 -0
  270. package/dist/distillation/providers/openai.js +0 -0
  271. package/dist/distillation/providers/openai.js.map +0 -0
  272. package/dist/distillation/providers/openrouter.d.ts +0 -0
  273. package/dist/distillation/providers/openrouter.js +0 -0
  274. package/dist/distillation/providers/openrouter.js.map +0 -0
  275. package/dist/distillation/providers/registry.d.ts +0 -0
  276. package/dist/distillation/providers/registry.js +0 -0
  277. package/dist/distillation/providers/registry.js.map +0 -0
  278. package/dist/distillation/providers/siliconflow.d.ts +0 -0
  279. package/dist/distillation/providers/siliconflow.js +0 -0
  280. package/dist/distillation/providers/siliconflow.js.map +0 -0
  281. package/dist/distillation/providers/tencent-hunyuan.d.ts +0 -0
  282. package/dist/distillation/providers/tencent-hunyuan.js +0 -0
  283. package/dist/distillation/providers/tencent-hunyuan.js.map +0 -0
  284. package/dist/distillation/providers/types.d.ts +0 -0
  285. package/dist/distillation/providers/types.js +0 -0
  286. package/dist/distillation/providers/types.js.map +0 -0
  287. package/dist/distillation/providers/volcengine-ark.d.ts +0 -0
  288. package/dist/distillation/providers/volcengine-ark.js +0 -0
  289. package/dist/distillation/providers/volcengine-ark.js.map +0 -0
  290. package/dist/distillation/providers/zhipu.d.ts +0 -0
  291. package/dist/distillation/providers/zhipu.js +0 -0
  292. package/dist/distillation/providers/zhipu.js.map +0 -0
  293. package/dist/distillation/queue-worker.d.ts +0 -0
  294. package/dist/distillation/queue-worker.js +0 -0
  295. package/dist/distillation/queue-worker.js.map +0 -0
  296. package/dist/distillation/types.d.ts +0 -0
  297. package/dist/distillation/types.js +0 -0
  298. package/dist/distillation/types.js.map +0 -0
  299. package/dist/evaluation/benchmark-report.d.ts +0 -0
  300. package/dist/evaluation/benchmark-report.js +0 -0
  301. package/dist/evaluation/benchmark-report.js.map +0 -0
  302. package/dist/evaluation/benchmark-summary.d.ts +0 -0
  303. package/dist/evaluation/benchmark-summary.js +0 -0
  304. package/dist/evaluation/benchmark-summary.js.map +0 -0
  305. package/dist/evaluation/codex-lifecycle-validation.d.ts +0 -0
  306. package/dist/evaluation/codex-lifecycle-validation.js +0 -0
  307. package/dist/evaluation/codex-lifecycle-validation.js.map +0 -0
  308. package/dist/evaluation/hybrid-phase1-rollout-summary.d.ts +0 -0
  309. package/dist/evaluation/hybrid-phase1-rollout-summary.js +0 -0
  310. package/dist/evaluation/hybrid-phase1-rollout-summary.js.map +0 -0
  311. package/dist/evaluation/hybrid-phase3-gate-metrics.d.ts +0 -0
  312. package/dist/evaluation/hybrid-phase3-gate-metrics.js +0 -0
  313. package/dist/evaluation/hybrid-phase3-gate-metrics.js.map +0 -0
  314. package/dist/evaluation/openclaw-baseline.d.ts +0 -0
  315. package/dist/evaluation/openclaw-baseline.js +0 -0
  316. package/dist/evaluation/openclaw-baseline.js.map +0 -0
  317. package/dist/evaluation/openclaw-scenarios.d.ts +0 -0
  318. package/dist/evaluation/openclaw-scenarios.js +12 -5
  319. package/dist/evaluation/openclaw-scenarios.js.map +1 -1
  320. package/dist/experience-management/governance-observability.d.ts +0 -0
  321. package/dist/experience-management/governance-observability.js +0 -0
  322. package/dist/experience-management/governance-observability.js.map +0 -0
  323. package/dist/experience-management/node-lifecycle-governance.d.ts +0 -0
  324. package/dist/experience-management/node-lifecycle-governance.js +0 -0
  325. package/dist/experience-management/node-lifecycle-governance.js.map +0 -0
  326. package/dist/experience-management/repo-policy.d.ts +53 -0
  327. package/dist/experience-management/repo-policy.js +175 -0
  328. package/dist/experience-management/repo-policy.js.map +1 -0
  329. package/dist/experience-management/task-management-signals.d.ts +0 -0
  330. package/dist/experience-management/task-management-signals.js +0 -0
  331. package/dist/experience-management/task-management-signals.js.map +0 -0
  332. package/dist/feedback/automatic-attribution.d.ts +0 -0
  333. package/dist/feedback/automatic-attribution.js +0 -0
  334. package/dist/feedback/automatic-attribution.js.map +0 -0
  335. package/dist/feedback/feedback-manager.d.ts +0 -0
  336. package/dist/feedback/feedback-manager.js +0 -0
  337. package/dist/feedback/feedback-manager.js.map +0 -0
  338. package/dist/feedback/harm-detector.d.ts +0 -0
  339. package/dist/feedback/harm-detector.js +0 -0
  340. package/dist/feedback/harm-detector.js.map +0 -0
  341. package/dist/feedback/state-transition.d.ts +0 -0
  342. package/dist/feedback/state-transition.js +0 -0
  343. package/dist/feedback/state-transition.js.map +0 -0
  344. package/dist/feedback/stats-updater.d.ts +0 -0
  345. package/dist/feedback/stats-updater.js +0 -0
  346. package/dist/feedback/stats-updater.js.map +0 -0
  347. package/dist/hybrid/capsule-builder.d.ts +0 -0
  348. package/dist/hybrid/capsule-builder.js +2 -0
  349. package/dist/hybrid/capsule-builder.js.map +1 -1
  350. package/dist/hybrid/explain-provider-client.d.ts +0 -0
  351. package/dist/hybrid/explain-provider-client.js +0 -0
  352. package/dist/hybrid/explain-provider-client.js.map +0 -0
  353. package/dist/hybrid/postmortem-provider-client.d.ts +0 -0
  354. package/dist/hybrid/postmortem-provider-client.js +0 -0
  355. package/dist/hybrid/postmortem-provider-client.js.map +0 -0
  356. package/dist/hybrid/rollout.d.ts +0 -0
  357. package/dist/hybrid/rollout.js +0 -0
  358. package/dist/hybrid/rollout.js.map +0 -0
  359. package/dist/hybrid/router.d.ts +0 -0
  360. package/dist/hybrid/router.js +0 -0
  361. package/dist/hybrid/router.js.map +0 -0
  362. package/dist/hybrid/types.d.ts +0 -0
  363. package/dist/hybrid/types.js +0 -0
  364. package/dist/hybrid/types.js.map +0 -0
  365. package/dist/hybrid/validators.d.ts +0 -0
  366. package/dist/hybrid/validators.js +0 -0
  367. package/dist/hybrid/validators.js.map +0 -0
  368. package/dist/hybrid/worker-client.d.ts +0 -0
  369. package/dist/hybrid/worker-client.js +0 -0
  370. package/dist/hybrid/worker-client.js.map +0 -0
  371. package/dist/hybrid/workers/explain-decision-llm.d.ts +0 -0
  372. package/dist/hybrid/workers/explain-decision-llm.js +0 -0
  373. package/dist/hybrid/workers/explain-decision-llm.js.map +0 -0
  374. package/dist/hybrid/workers/explain-decision.d.ts +0 -0
  375. package/dist/hybrid/workers/explain-decision.js +0 -0
  376. package/dist/hybrid/workers/explain-decision.js.map +0 -0
  377. package/dist/hybrid/workers/postmortem-review-llm.d.ts +0 -0
  378. package/dist/hybrid/workers/postmortem-review-llm.js +0 -0
  379. package/dist/hybrid/workers/postmortem-review-llm.js.map +0 -0
  380. package/dist/hybrid/workers/postmortem-review.d.ts +0 -0
  381. package/dist/hybrid/workers/postmortem-review.js +0 -0
  382. package/dist/hybrid/workers/postmortem-review.js.map +0 -0
  383. package/dist/index.d.ts +0 -0
  384. package/dist/index.js +0 -0
  385. package/dist/index.js.map +0 -0
  386. package/dist/input/context-summary-adapter.d.ts +0 -0
  387. package/dist/input/context-summary-adapter.js +0 -0
  388. package/dist/input/context-summary-adapter.js.map +0 -0
  389. package/dist/input/input-adapter.d.ts +0 -0
  390. package/dist/input/input-adapter.js +0 -0
  391. package/dist/input/input-adapter.js.map +0 -0
  392. package/dist/input/outcome-resolver.d.ts +0 -0
  393. package/dist/input/outcome-resolver.js +0 -0
  394. package/dist/input/outcome-resolver.js.map +0 -0
  395. package/dist/input/scope-resolver.d.ts +0 -0
  396. package/dist/input/scope-resolver.js +16 -4
  397. package/dist/input/scope-resolver.js.map +1 -1
  398. package/dist/input/tasktype-resolver.d.ts +0 -0
  399. package/dist/input/tasktype-resolver.js +0 -0
  400. package/dist/input/tasktype-resolver.js.map +0 -0
  401. package/dist/input/tool-event-significance.d.ts +0 -0
  402. package/dist/input/tool-event-significance.js +0 -0
  403. package/dist/input/tool-event-significance.js.map +0 -0
  404. package/dist/install/claude-cli.d.ts +0 -0
  405. package/dist/install/claude-cli.js +38 -21
  406. package/dist/install/claude-cli.js.map +1 -1
  407. package/dist/install/claude-code-doctor.d.ts +0 -0
  408. package/dist/install/claude-code-doctor.js +8 -3
  409. package/dist/install/claude-code-doctor.js.map +1 -1
  410. package/dist/install/claude-code-installer.d.ts +0 -0
  411. package/dist/install/claude-code-installer.js +5 -2
  412. package/dist/install/claude-code-installer.js.map +1 -1
  413. package/dist/install/claude-marketplace-state.d.ts +0 -0
  414. package/dist/install/claude-marketplace-state.js +0 -0
  415. package/dist/install/claude-marketplace-state.js.map +0 -0
  416. package/dist/install/claude-runtime-target.d.ts +5 -0
  417. package/dist/install/claude-runtime-target.js +32 -2
  418. package/dist/install/claude-runtime-target.js.map +1 -1
  419. package/dist/install/codex-cli.d.ts +7 -0
  420. package/dist/install/codex-cli.js +43 -20
  421. package/dist/install/codex-cli.js.map +1 -1
  422. package/dist/install/codex-hooks.d.ts +42 -0
  423. package/dist/install/codex-hooks.js +258 -0
  424. package/dist/install/codex-hooks.js.map +1 -0
  425. package/dist/install/codex-installer.d.ts +21 -3
  426. package/dist/install/codex-installer.js +98 -9
  427. package/dist/install/codex-installer.js.map +1 -1
  428. package/dist/install/codex-runtime-target.d.ts +20 -0
  429. package/dist/install/codex-runtime-target.js +85 -17
  430. package/dist/install/codex-runtime-target.js.map +1 -1
  431. package/dist/install/host-detection.d.ts +0 -0
  432. package/dist/install/host-detection.js +0 -0
  433. package/dist/install/host-detection.js.map +0 -0
  434. package/dist/install/openclaw-cli.d.ts +1 -0
  435. package/dist/install/openclaw-cli.js +52 -3
  436. package/dist/install/openclaw-cli.js.map +1 -1
  437. package/dist/install/openclaw-installer.d.ts +5 -0
  438. package/dist/install/openclaw-installer.js +24 -5
  439. package/dist/install/openclaw-installer.js.map +1 -1
  440. package/dist/install/public-install.d.ts +0 -0
  441. package/dist/install/public-install.js +0 -0
  442. package/dist/install/public-install.js.map +0 -0
  443. package/dist/install/registry-health.d.ts +0 -0
  444. package/dist/install/registry-health.js +0 -0
  445. package/dist/install/registry-health.js.map +0 -0
  446. package/dist/interaction/operational-actions-service.d.ts +0 -0
  447. package/dist/interaction/operational-actions-service.js +0 -0
  448. package/dist/interaction/operational-actions-service.js.map +0 -0
  449. package/dist/interaction/operational-service.d.ts +0 -0
  450. package/dist/interaction/operational-service.js +0 -0
  451. package/dist/interaction/operational-service.js.map +0 -0
  452. package/dist/interaction/repo-summary.d.ts +17 -0
  453. package/dist/interaction/repo-summary.js +33 -15
  454. package/dist/interaction/repo-summary.js.map +1 -1
  455. package/dist/interaction/retrieval-policy-inspection.d.ts +19 -0
  456. package/dist/interaction/retrieval-policy-inspection.js +33 -0
  457. package/dist/interaction/retrieval-policy-inspection.js.map +1 -0
  458. package/dist/interaction/service.d.ts +24 -1
  459. package/dist/interaction/service.js +171 -12
  460. package/dist/interaction/service.js.map +1 -1
  461. package/dist/interaction/state-artifact-service.d.ts +0 -0
  462. package/dist/interaction/state-artifact-service.js +0 -0
  463. package/dist/interaction/state-artifact-service.js.map +0 -0
  464. package/dist/maintenance/claude-validate-print.d.ts +8 -1
  465. package/dist/maintenance/claude-validate-print.js +52 -2
  466. package/dist/maintenance/claude-validate-print.js.map +1 -1
  467. package/dist/maintenance/embedding-smoke.d.ts +0 -0
  468. package/dist/maintenance/embedding-smoke.js +0 -0
  469. package/dist/maintenance/embedding-smoke.js.map +0 -0
  470. package/dist/maintenance/experience-export-drafts.d.ts +56 -0
  471. package/dist/maintenance/experience-export-drafts.js +217 -0
  472. package/dist/maintenance/experience-export-drafts.js.map +1 -0
  473. package/dist/maintenance/experience-hygiene.d.ts +38 -0
  474. package/dist/maintenance/experience-hygiene.js +266 -0
  475. package/dist/maintenance/experience-hygiene.js.map +1 -0
  476. package/dist/maintenance/operator-review-flow.d.ts +81 -0
  477. package/dist/maintenance/operator-review-flow.js +172 -0
  478. package/dist/maintenance/operator-review-flow.js.map +1 -0
  479. package/dist/maintenance/redistill-rule-nodes.d.ts +0 -0
  480. package/dist/maintenance/redistill-rule-nodes.js +0 -0
  481. package/dist/maintenance/redistill-rule-nodes.js.map +0 -0
  482. package/dist/maintenance/scope-merge.d.ts +0 -0
  483. package/dist/maintenance/scope-merge.js +0 -0
  484. package/dist/maintenance/scope-merge.js.map +0 -0
  485. package/dist/maintenance/warning-variant-cleanup.d.ts +0 -0
  486. package/dist/maintenance/warning-variant-cleanup.js +0 -0
  487. package/dist/maintenance/warning-variant-cleanup.js.map +0 -0
  488. package/dist/plugin/fixture-sanitizer.d.ts +0 -0
  489. package/dist/plugin/fixture-sanitizer.js +0 -0
  490. package/dist/plugin/fixture-sanitizer.js.map +0 -0
  491. package/dist/plugin/hooks/before-prompt-build.d.ts +0 -0
  492. package/dist/plugin/hooks/before-prompt-build.js +0 -0
  493. package/dist/plugin/hooks/before-prompt-build.js.map +0 -0
  494. package/dist/plugin/hooks/message-sent.d.ts +0 -0
  495. package/dist/plugin/hooks/message-sent.js +0 -0
  496. package/dist/plugin/hooks/message-sent.js.map +0 -0
  497. package/dist/plugin/hooks/tool-result-persist.d.ts +0 -0
  498. package/dist/plugin/hooks/tool-result-persist.js +0 -0
  499. package/dist/plugin/hooks/tool-result-persist.js.map +0 -0
  500. package/dist/plugin/openclaw-install-state.d.ts +0 -0
  501. package/dist/plugin/openclaw-install-state.js +0 -0
  502. package/dist/plugin/openclaw-install-state.js.map +0 -0
  503. package/dist/plugin/openclaw-plugin.d.ts +5 -0
  504. package/dist/plugin/openclaw-plugin.js +0 -0
  505. package/dist/plugin/openclaw-plugin.js.map +0 -0
  506. package/dist/plugin/openclaw-routine-interaction.d.ts +0 -0
  507. package/dist/plugin/openclaw-routine-interaction.js +0 -0
  508. package/dist/plugin/openclaw-routine-interaction.js.map +0 -0
  509. package/dist/plugin/openclaw-runtime-defaults.d.ts +0 -0
  510. package/dist/plugin/openclaw-runtime-defaults.js +0 -0
  511. package/dist/plugin/openclaw-runtime-defaults.js.map +0 -0
  512. package/dist/plugin/runtime-capture.d.ts +0 -0
  513. package/dist/plugin/runtime-capture.js +0 -0
  514. package/dist/plugin/runtime-capture.js.map +0 -0
  515. package/dist/plugin/runtime-helpers.d.ts +0 -0
  516. package/dist/plugin/runtime-helpers.js +43 -1
  517. package/dist/plugin/runtime-helpers.js.map +1 -1
  518. package/dist/runtime/prompt-service.d.ts +51 -0
  519. package/dist/runtime/prompt-service.js +209 -0
  520. package/dist/runtime/prompt-service.js.map +1 -0
  521. package/dist/runtime/service.d.ts +7 -2
  522. package/dist/runtime/service.js +176 -25
  523. package/dist/runtime/service.js.map +1 -1
  524. package/dist/store/logs/jsonl-logger.d.ts +0 -0
  525. package/dist/store/logs/jsonl-logger.js +0 -0
  526. package/dist/store/logs/jsonl-logger.js.map +0 -0
  527. package/dist/store/sqlite/db.d.ts +0 -0
  528. package/dist/store/sqlite/db.js +15 -0
  529. package/dist/store/sqlite/db.js.map +1 -1
  530. package/dist/store/sqlite/migrations.d.ts +0 -0
  531. package/dist/store/sqlite/migrations.js +0 -0
  532. package/dist/store/sqlite/migrations.js.map +0 -0
  533. package/dist/store/sqlite/repositories/attribution-record-repo.d.ts +15 -0
  534. package/dist/store/sqlite/repositories/attribution-record-repo.js +111 -0
  535. package/dist/store/sqlite/repositories/attribution-record-repo.js.map +1 -0
  536. package/dist/store/sqlite/repositories/candidate-repo.d.ts +0 -0
  537. package/dist/store/sqlite/repositories/candidate-repo.js +0 -0
  538. package/dist/store/sqlite/repositories/candidate-repo.js.map +0 -0
  539. package/dist/store/sqlite/repositories/distillation-job-repo.d.ts +0 -0
  540. package/dist/store/sqlite/repositories/distillation-job-repo.js +0 -0
  541. package/dist/store/sqlite/repositories/distillation-job-repo.js.map +0 -0
  542. package/dist/store/sqlite/repositories/episode-repo.d.ts +14 -0
  543. package/dist/store/sqlite/repositories/episode-repo.js +84 -0
  544. package/dist/store/sqlite/repositories/episode-repo.js.map +1 -0
  545. package/dist/store/sqlite/repositories/hybrid-invocation-trace-repo.d.ts +0 -0
  546. package/dist/store/sqlite/repositories/hybrid-invocation-trace-repo.js +0 -0
  547. package/dist/store/sqlite/repositories/hybrid-invocation-trace-repo.js.map +0 -0
  548. package/dist/store/sqlite/repositories/hybrid-review-artifact-repo.d.ts +0 -0
  549. package/dist/store/sqlite/repositories/hybrid-review-artifact-repo.js +0 -0
  550. package/dist/store/sqlite/repositories/hybrid-review-artifact-repo.js.map +0 -0
  551. package/dist/store/sqlite/repositories/injection-repo.d.ts +2 -0
  552. package/dist/store/sqlite/repositories/injection-repo.js +32 -5
  553. package/dist/store/sqlite/repositories/injection-repo.js.map +1 -1
  554. package/dist/store/sqlite/repositories/input-record-repo.d.ts +1 -0
  555. package/dist/store/sqlite/repositories/input-record-repo.js +23 -10
  556. package/dist/store/sqlite/repositories/input-record-repo.js.map +1 -1
  557. package/dist/store/sqlite/repositories/node-repo.d.ts +1 -0
  558. package/dist/store/sqlite/repositories/node-repo.js +10 -0
  559. package/dist/store/sqlite/repositories/node-repo.js.map +1 -1
  560. package/dist/store/sqlite/repositories/outcome-record-repo.d.ts +1 -0
  561. package/dist/store/sqlite/repositories/outcome-record-repo.js +11 -2
  562. package/dist/store/sqlite/repositories/outcome-record-repo.js.map +1 -1
  563. package/dist/store/sqlite/repositories/repo-policy-repo.d.ts +11 -0
  564. package/dist/store/sqlite/repositories/repo-policy-repo.js +87 -0
  565. package/dist/store/sqlite/repositories/repo-policy-repo.js.map +1 -0
  566. package/dist/store/sqlite/repositories/review-event-repo.d.ts +1 -0
  567. package/dist/store/sqlite/repositories/review-event-repo.js +11 -2
  568. package/dist/store/sqlite/repositories/review-event-repo.js.map +1 -1
  569. package/dist/store/sqlite/repositories/scope-repo.d.ts +0 -0
  570. package/dist/store/sqlite/repositories/scope-repo.js +0 -0
  571. package/dist/store/sqlite/repositories/scope-repo.js.map +0 -0
  572. package/dist/store/sqlite/repositories/stats-repo.d.ts +0 -0
  573. package/dist/store/sqlite/repositories/stats-repo.js +0 -0
  574. package/dist/store/sqlite/repositories/stats-repo.js.map +0 -0
  575. package/dist/store/sqlite/repositories/task-run-repo.d.ts +1 -0
  576. package/dist/store/sqlite/repositories/task-run-repo.js +11 -2
  577. package/dist/store/sqlite/repositories/task-run-repo.js.map +1 -1
  578. package/dist/store/sqlite/schema.sql +43 -0
  579. package/dist/store/vector/api-embedding-provider.d.ts +0 -0
  580. package/dist/store/vector/api-embedding-provider.js +14 -3
  581. package/dist/store/vector/api-embedding-provider.js.map +1 -1
  582. package/dist/store/vector/embeddings.d.ts +0 -0
  583. package/dist/store/vector/embeddings.js +7 -1
  584. package/dist/store/vector/embeddings.js.map +1 -1
  585. package/dist/store/vector/lancedb.d.ts +0 -0
  586. package/dist/store/vector/lancedb.js +0 -0
  587. package/dist/store/vector/lancedb.js.map +0 -0
  588. package/dist/store/vector/local-provider.d.ts +0 -0
  589. package/dist/store/vector/local-provider.js +0 -0
  590. package/dist/store/vector/local-provider.js.map +0 -0
  591. package/dist/store/vector/node-index.d.ts +0 -0
  592. package/dist/store/vector/node-index.js +0 -0
  593. package/dist/store/vector/node-index.js.map +0 -0
  594. package/dist/store/vector/provider-types.d.ts +0 -0
  595. package/dist/store/vector/provider-types.js +0 -0
  596. package/dist/store/vector/provider-types.js.map +0 -0
  597. package/dist/types/analyzer.d.ts +0 -0
  598. package/dist/types/analyzer.js +0 -0
  599. package/dist/types/analyzer.js.map +0 -0
  600. package/dist/types/domain.d.ts +89 -1
  601. package/dist/types/domain.js +0 -0
  602. package/dist/types/domain.js.map +0 -0
  603. package/dist/types/plugin.d.ts +0 -0
  604. package/dist/types/plugin.js +0 -0
  605. package/dist/types/plugin.js.map +0 -0
  606. package/dist/types/storage.d.ts +0 -0
  607. package/dist/types/storage.js +0 -0
  608. package/dist/types/storage.js.map +0 -0
  609. package/dist/utils/clock.d.ts +0 -0
  610. package/dist/utils/clock.js +0 -0
  611. package/dist/utils/clock.js.map +0 -0
  612. package/dist/utils/errors.d.ts +0 -0
  613. package/dist/utils/errors.js +0 -0
  614. package/dist/utils/errors.js.map +0 -0
  615. package/dist/utils/hashing.d.ts +0 -0
  616. package/dist/utils/hashing.js +0 -0
  617. package/dist/utils/hashing.js.map +0 -0
  618. package/dist/utils/ids.d.ts +0 -0
  619. package/dist/utils/ids.js +0 -0
  620. package/dist/utils/ids.js.map +0 -0
  621. package/dist/utils/text.d.ts +0 -0
  622. package/dist/utils/text.js +5 -1
  623. package/dist/utils/text.js.map +1 -1
  624. package/dist/version/package-version.d.ts +0 -0
  625. package/dist/version/package-version.js +0 -0
  626. package/dist/version/package-version.js.map +0 -0
  627. package/dist/version/remote-release.d.ts +0 -0
  628. package/dist/version/remote-release.js +0 -0
  629. package/dist/version/remote-release.js.map +0 -0
  630. package/docs/assets/readme/inspect-last-example.svg +37 -0
  631. package/docs/releases/v0.1.0.md +0 -0
  632. package/docs/releases/v0.1.1.md +0 -0
  633. package/docs/releases/v0.1.2.md +0 -0
  634. package/docs/releases/v0.1.3.md +0 -0
  635. package/docs/releases/v0.2.0.md +0 -0
  636. package/docs/releases/v0.2.1.md +9 -0
  637. package/docs/releases/v0.3.0.md +17 -0
  638. package/docs/user-guide.md +86 -4
  639. package/hooks/hooks.json +0 -0
  640. package/openclaw.plugin.json +1 -1
  641. package/package.json +3 -2
  642. package/plugins/claude-code-experienceengine/.claude-plugin/plugin.json +1 -1
  643. package/plugins/claude-code-experienceengine/.mcp.json +3 -9
  644. package/plugins/claude-code-experienceengine/hooks/hooks.json +0 -0
  645. package/plugins/claude-code-experienceengine/scripts/claude-hook.sh +0 -0
  646. package/plugins/claude-code-experienceengine/scripts/install-deps.sh +1 -1
  647. package/plugins/claude-code-experienceengine/scripts/mcp-server.sh +43 -0
  648. package/scripts/claude-plugin/claude-hook.sh +6 -1
  649. package/scripts/claude-plugin/install-deps.sh +0 -0
  650. package/scripts/claude-plugin/mcp-server.sh +45 -0
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -11,6 +11,7 @@ export type ValidationState = "pending_reuse_validation" | "validated_by_reuse"
11
11
  export type CorrectionScope = "task_local" | "repo_local" | "workflow_local" | "host_local" | "cross_repo_candidate";
12
12
  export type CorrectionCategory = "goal_interpretation" | "quality_bar" | "interaction_behavior" | "verification_order" | "implementation_boundary" | "style_constraint";
13
13
  export type InjectionMode = "skip" | "inject_conservative" | "inject";
14
+ export type InterventionStrength = "diagnostic_hint" | "soft_recommendation" | "strong_recommendation" | "hard_constraint";
14
15
  export type InjectionRiskLevel = "low" | "medium" | "high";
15
16
  export type MatchBand = "high" | "medium" | "low";
16
17
  export type ScopeMatchBand = "same" | "related" | "cross" | "none";
@@ -31,6 +32,11 @@ export type SyncSecondOpinionDecision = "allow" | "allow_conservative" | "skip";
31
32
  export type SyncSecondOpinionTrigger = "conservative_delivery_state" | "harm_history" | "close_score_margin" | "expectation_correction";
32
33
  export type EvaluationMode = "live" | "shadow" | "holdout";
33
34
  export type OutcomeSignal = "success" | "failure" | "unknown";
35
+ export type AttributionVerdict = "strong_helped" | "weak_helped" | "neutral" | "unknown" | "weak_harmed" | "strong_harmed";
36
+ export type AttributionConfidence = "low" | "medium" | "high";
37
+ export type AttributionSource = "automatic" | "manual_override" | "diagnostic_record";
38
+ export type RepoExperienceMode = "safe" | "fast_learning" | "strict";
39
+ export type RepoCircuitState = "clear" | "tripped";
34
40
  export type ToolEventStatus = "success" | "failure" | "unknown";
35
41
  export type CandidateLifecycleState = "pending" | "distilled" | "failed" | "discarded";
36
42
  export type DistillationJobState = "pending" | "processing" | "succeeded" | "failed" | "discarded";
@@ -82,8 +88,27 @@ export type RetrievalContext = {
82
88
  modulePaths?: string[];
83
89
  expectationCorrectionIntent?: boolean;
84
90
  };
91
+ export type RetrievalPolicyStageName = "retrieval_context" | "hard_filter" | "shortlist" | "semantic_rerank_backfill" | "policy_enrichment" | "decision_assembly";
92
+ export type RetrievalPolicyStageDiagnostic = {
93
+ stage: RetrievalPolicyStageName;
94
+ acceptedCount?: number;
95
+ rejectedCount?: number;
96
+ passedCount?: number;
97
+ reasonCodes: string[];
98
+ };
99
+ export type RetrievalPolicyDiagnostics = {
100
+ stages: RetrievalPolicyStageDiagnostic[];
101
+ };
102
+ export type PolicyEnrichmentComponentCategory = "family_fit" | "specificity" | "feedback" | "maturity" | "penalty" | "expectation_correction" | "task_alignment" | "retrieval_context";
103
+ export type PolicyEnrichmentComponent = {
104
+ name: string;
105
+ category: PolicyEnrichmentComponentCategory;
106
+ value: number;
107
+ reason: string;
108
+ };
85
109
  export type ExperienceInputRecord = {
86
110
  record_id: string;
111
+ episode_id?: string;
87
112
  scope_id: string;
88
113
  session_id?: string;
89
114
  task_type: ResolvedTaskType;
@@ -96,6 +121,7 @@ export type ExperienceInputRecord = {
96
121
  };
97
122
  export type TaskRun = {
98
123
  id: string;
124
+ episode_id?: string;
99
125
  host: "openclaw" | "claude-code" | "codex";
100
126
  scope_id: string;
101
127
  session_id?: string;
@@ -114,6 +140,7 @@ export type TaskRun = {
114
140
  };
115
141
  export type OutcomeRecord = {
116
142
  id: string;
143
+ episode_id?: string;
117
144
  task_run_id: string;
118
145
  outcome_signal: OutcomeSignal;
119
146
  failure_signature?: string;
@@ -122,6 +149,7 @@ export type OutcomeRecord = {
122
149
  };
123
150
  export type ReviewEvent = {
124
151
  id: string;
152
+ episode_id?: string;
125
153
  node_id: string;
126
154
  task_run_id?: string;
127
155
  event_type: "mark_helped" | "mark_harmed" | "mark_uncertain" | "cool" | "retire" | "quarantine" | "restore_conservative" | "restore_eligible" | "promote_eligible";
@@ -221,6 +249,7 @@ export type ExperienceNode = {
221
249
  };
222
250
  export type InjectionEvent = {
223
251
  injection_id: string;
252
+ episode_id?: string;
224
253
  session_id?: string;
225
254
  scope_id: string;
226
255
  task_type: TaskType;
@@ -237,6 +266,58 @@ export type InjectionEvent = {
237
266
  created_at: string;
238
267
  resolved_at?: string;
239
268
  };
269
+ export type AttributionRecord = {
270
+ id: string;
271
+ injection_id?: string;
272
+ node_id: string;
273
+ episode_id?: string;
274
+ intervention_strength?: InterventionStrength;
275
+ injection_mode?: InjectionMode;
276
+ delivery_mode?: EvaluationMode;
277
+ delivered: boolean;
278
+ outcome: OutcomeSignal;
279
+ attribution_verdict: AttributionVerdict;
280
+ confidence: AttributionConfidence;
281
+ evidence_refs: string[];
282
+ user_override?: "helped" | "harmed" | "neutral";
283
+ source: AttributionSource;
284
+ attribution_reason?: FeedbackAttributionReason | "manual_override" | "diagnostic_record";
285
+ created_at: string;
286
+ resolved_at?: string;
287
+ };
288
+ export type RepoPolicy = {
289
+ scope_id: string;
290
+ configured_mode: RepoExperienceMode;
291
+ effective_mode: RepoExperienceMode;
292
+ circuit_state: RepoCircuitState;
293
+ circuit_reason?: string;
294
+ live_diagnostics_disabled: boolean;
295
+ created_at: string;
296
+ updated_at: string;
297
+ last_tripped_at?: string;
298
+ restored_at?: string;
299
+ };
300
+ export type EpisodeProjection = {
301
+ episode_id: string;
302
+ scope_id?: string;
303
+ session_id?: string;
304
+ task_run?: TaskRun;
305
+ input_records: ExperienceInputRecord[];
306
+ outcome_records: OutcomeRecord[];
307
+ injection_events: InjectionEvent[];
308
+ attribution_records: AttributionRecord[];
309
+ review_events: ReviewEvent[];
310
+ };
311
+ export type EpisodeSummary = {
312
+ episode_id: string;
313
+ scope_id: string;
314
+ session_id?: string;
315
+ task_type?: ResolvedTaskType;
316
+ task_summary?: string;
317
+ outcome?: OutcomeSignal;
318
+ created_at: string;
319
+ updated_at: string;
320
+ };
240
321
  export type InjectionScorecardNode = {
241
322
  id: string;
242
323
  nodeType: ExperienceNodeType;
@@ -265,6 +346,7 @@ export type InjectionScorecardCandidate = {
265
346
  rerankSource?: "heuristic" | "model";
266
347
  retrievalReasons?: string[];
267
348
  policyReasons?: string[];
349
+ policyComponents?: PolicyEnrichmentComponent[];
268
350
  taskFamilyMatch: boolean;
269
351
  };
270
352
  export type InterventionRejectedCandidate = {
@@ -275,6 +357,9 @@ export type InterventionRejectedCandidate = {
275
357
  totalScore?: number;
276
358
  };
277
359
  export type InterventionDecisionDiagnostics = {
360
+ interventionStrength?: InterventionStrength;
361
+ recordOnlyDiagnosticCandidateIds?: string[];
362
+ retrievalPolicyDiagnostics?: RetrievalPolicyDiagnostics;
278
363
  topCandidates: InjectionScorecardCandidate[];
279
364
  topCandidateScore?: number;
280
365
  scoreMargin?: number;
@@ -300,7 +385,8 @@ export type InjectionScorecard = {
300
385
  scopeId: string;
301
386
  taskType: TaskType;
302
387
  taskSummary: string;
303
- mode: Exclude<InjectionMode, "skip">;
388
+ mode: InjectionMode;
389
+ interventionStrength?: InterventionStrength;
304
390
  riskLevel: InjectionRiskLevel;
305
391
  recommendation: string;
306
392
  reasons: string[];
@@ -322,6 +408,8 @@ export type InjectionScorecard = {
322
408
  secondOpinionReason?: string;
323
409
  secondOpinionTrigger?: SyncSecondOpinionTrigger;
324
410
  selectedCandidateIds?: string[];
411
+ recordOnlyDiagnosticCandidateIds?: string[];
412
+ retrievalPolicyDiagnostics?: RetrievalPolicyDiagnostics;
325
413
  rejectedCandidates?: InterventionRejectedCandidate[];
326
414
  nodes: InjectionScorecardNode[];
327
415
  createdAt: string;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/dist/utils/ids.js CHANGED
File without changes
File without changes
File without changes
@@ -13,7 +13,11 @@ export const tokenize = (value) => normalizeWhitespace(value)
13
13
  .filter(Boolean);
14
14
  const EXPERIENCE_INJECTION_HEADINGS = [
15
15
  "Execution hints from prior similar tasks:",
16
- "Conservative execution hints:"
16
+ "Conservative execution hints:",
17
+ "Diagnostic lead from prior experience:",
18
+ "Relevant prior experience:",
19
+ "Validated prior experience:",
20
+ "Project constraint or explicit instruction:"
17
21
  ];
18
22
  export const stripLeadingExperienceInjection = (value) => {
19
23
  let next = value.trimStart();
@@ -1 +1 @@
1
- {"version":3,"file":"text.js","sourceRoot":"","sources":["../../src/utils/text.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAE,GAAG,GAAG,GAAG,EA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,CAAC"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,37 @@
1
+ <svg width="1200" height="920" viewBox="0 0 1200 920" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect width="1200" height="920" rx="20" fill="#0B1020"/>
3
+ <rect x="24" y="24" width="1152" height="64" rx="14" fill="#131A2E"/>
4
+ <circle cx="60" cy="56" r="9" fill="#FF5F57"/>
5
+ <circle cx="88" cy="56" r="9" fill="#FEBB2E"/>
6
+ <circle cx="116" cy="56" r="9" fill="#28C840"/>
7
+ <text x="600" y="62" text-anchor="middle" fill="#DDE7FF" font-family="DejaVu Sans Mono, monospace" font-size="24">ee inspect --last --verbose</text>
8
+
9
+ <rect x="24" y="104" width="1152" height="792" rx="14" fill="#0F172A"/>
10
+
11
+ <g font-family="DejaVu Sans Mono, monospace" font-size="24">
12
+ <text x="48" y="152" fill="#93C5FD">$ ee inspect --last --verbose</text>
13
+
14
+ <text x="48" y="198" fill="#E5E7EB">Session: session_last</text>
15
+ <text x="48" y="232" fill="#E5E7EB">Scope: scope_current_repo</text>
16
+ <text x="48" y="266" fill="#E5E7EB">Task type: test_debug</text>
17
+ <text x="48" y="300" fill="#E5E7EB">Intervention: inject</text>
18
+ <text x="48" y="334" fill="#E5E7EB">Delivery style: normal hint delivery</text>
19
+ <text x="48" y="368" fill="#E5E7EB">Automatic feedback: helped</text>
20
+
21
+ <text x="48" y="426" fill="#A7F3D0">Injected nodes:</text>
22
+ <text x="72" y="460" fill="#E5E7EB">- node_inspect strategy active system_derived</text>
23
+ <text x="96" y="494" fill="#E5E7EB">Trigger: Fix the failing auth test</text>
24
+ <text x="96" y="528" fill="#E5E7EB">Quality: strong</text>
25
+ <text x="96" y="562" fill="#E5E7EB">Best fit: test_debug tasks in this repo scope</text>
26
+
27
+ <text x="48" y="620" fill="#FDE68A">Scorecard:</text>
28
+ <text x="72" y="654" fill="#E5E7EB">- Risk: low</text>
29
+ <text x="72" y="688" fill="#E5E7EB">- Recommendation: Apply these hints, then mark helped or harmed.</text>
30
+ <text x="72" y="722" fill="#E5E7EB">- Why ExperienceEngine acted: best reusable guidance for this task.</text>
31
+ <text x="72" y="756" fill="#E5E7EB">- Trust summary: low-risk active guidance with helped signals.</text>
32
+
33
+ <text x="48" y="814" fill="#67E8F9">Hints:</text>
34
+ <text x="72" y="848" fill="#E5E7EB">- Run the failing auth test before editing and verify after the fix.</text>
35
+ <text x="48" y="882" fill="#C4B5FD">Outcome: success</text>
36
+ </g>
37
+ </svg>
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -14,8 +14,17 @@ This development slice tightens Codex-era live-delivery quality after reviewing
14
14
  - high-match same-scope conservative experience can promote to normal eligible delivery after successful reuse
15
15
  - cross-scope reuse is available only through conservative candidates, not direct injection
16
16
  - `ee status` and `ee doctor codex` now report whether the `ee` CLI fallback is available on `PATH`
17
+ - Codex managed setup now targets Codex-native hooks plus MCP: `codex_hooks` is enabled, ExperienceEngine-owned Codex hook entries are installed, and stale `experienceengine-claude-hook` drift can be repaired safely.
18
+ - Codex project hooks now support the practical Windows Codex App + WSL Codex CLI split: repo hooks are shared through `.codex/hooks.json`, while MCP registration stays owned by each runtime's Codex home.
19
+ - Codex hook runtime is leaner on the prompt path: prompt-time lookup uses a light runtime, full runtime/provider loading is deferred, and `PostToolUse` / `Stop` are queued for background processing.
20
+ - Codex hook launchers use a fast path for hook execution so missing local embedding fallback dependencies do not block normal host interaction.
21
+ - Source-repo host validation now covers Windows Codex App, WSL Codex CLI, Claude Code, and WSL OpenClaw writing to the same project scope.
22
+ - OpenClaw prompt payloads now resolve the real project root from explicit host fields or nearby repo markers before scope selection; unresolved global OpenClaw workspace payloads are session-isolated instead of being reused as a broad project scope.
17
23
 
18
24
  ## Notes
19
25
 
20
26
  - LLM usage remains in the existing places: posttask distillation and selective second-opinion review.
21
27
  - The new routing layer is deterministic and is intended to reduce both over-conservative same-scope skips and harmful broad reuse.
28
+ - `UserPromptSubmit` remains intentionally synchronous because it owns live injection. The async queue applies to follow-up capture and finalize hooks.
29
+ - Host validation statements in this release note refer to source-repo validation, not published npm package or host marketplace validation.
30
+ - OpenClaw validation used the OpenClaw-compatible `openrouter/tencent/hy3-preview:free` model id. The bare `tencent/hy3-preview:free` id matched the Claude Code spelling but is marked missing by OpenClaw's model registry.
@@ -0,0 +1,17 @@
1
+ # ExperienceEngine v0.3.0
2
+
3
+ v0.3.0 focuses on making the same project-level EE experience state usable across the current host set without leaking host-specific installation details into the published package.
4
+
5
+ ## Highlights
6
+
7
+ - Added cross-runtime Codex hook launchers so a shared project can work from both Windows Codex App and WSL Codex CLI while writing to the same configured EE home.
8
+ - Added cross-runtime Claude Code hook launchers and plugin MCP startup flow so marketplace installs no longer depend on local source-repo paths.
9
+ - Improved Claude Code validation by checking both the Claude print transcript and the underlying EE MCP server tool list.
10
+ - Improved OpenClaw repair diagnostics so a loaded, matching host-native plugin is not reported as needing restart.
11
+ - Kept Codex `PreToolUse` disabled by default; Codex live injection remains on `UserPromptSubmit`, with `PostToolUse` and `Stop` used for learning and finalization.
12
+
13
+ ## Upgrade Notes
14
+
15
+ - New npm users should install with `npm install -g @alan512/experienceengine@0.3.0`, then run `ee install <host>` or `ee upgrade <host>` for the hosts they use.
16
+ - Existing users should run `ee upgrade codex`, `ee upgrade claude-code`, or `ee upgrade openclaw` after updating the npm package so host wiring is regenerated with the current launchers.
17
+ - Mixed Windows App and WSL CLI Codex use should keep `EXPERIENCE_ENGINE_HOME` pointed at the same shared EE data directory if the user wants both hosts to share one project experience store.
@@ -107,7 +107,8 @@ Install ExperienceEngine through the host setup flow for:
107
107
  - `ee install codex`
108
108
  - native/manual fallback:
109
109
  - `codex mcp add experienceengine --env EXPERIENCE_ENGINE_HOME=$HOME/.experienceengine -- npx -y @alan512/experienceengine codex-mcp-server`
110
- - after either path, start a new Codex session in this repo so the MCP wiring and `AGENTS.md` instruction block are picked up
110
+ - after the managed path, start a new Codex session in this repo so Codex-native hooks, MCP wiring, and the `AGENTS.md` instruction block are picked up
111
+ - the manual MCP fallback only installs the tool surface; use `ee install codex` or `ee repair codex` when hook lifecycle capture/injection is needed
111
112
  - `Claude Code`
112
113
  - host-native marketplace install:
113
114
  - add the bundled marketplace from GitHub:
@@ -253,6 +254,53 @@ When you inspect a specific node, ExperienceEngine now also shows a lightweight
253
254
  - the short drivers behind that judgment
254
255
  - a compact applicability profile covering best fit, scope validity, confidence, risk, and when to avoid reuse
255
256
 
257
+ ### Operator Review Workflow
258
+
259
+ Use the operator review workflow when you want one read-only checkpoint across the current repo before deciding what to inspect next.
260
+
261
+ The fallback CLI entry point is:
262
+
263
+ ```bash
264
+ ee inspect review
265
+ ```
266
+
267
+ For a specific workspace and a smaller checklist:
268
+
269
+ ```bash
270
+ ee inspect review --cwd /path/to/repo --limit 3
271
+ ```
272
+
273
+ The review report summarizes:
274
+
275
+ - repo policy health and circuit state
276
+ - hygiene finding counts
277
+ - export draft counts
278
+ - recommended review order
279
+ - prioritized review items
280
+ - review-only next actions
281
+ - drill-down commands for detailed read-only reports
282
+
283
+ The drill-down commands are manual inspection steps:
284
+
285
+ ```bash
286
+ ee inspect repo
287
+ ee inspect hygiene
288
+ ee inspect export-drafts
289
+ ```
290
+
291
+ In MCP-capable hosts, ask the host agent to inspect the ExperienceEngine operator review or read `experienceengine://review`. The structured payload uses the same source names as the CLI: `repo_policy`, `hygiene`, and `export_drafts`.
292
+
293
+ This workflow is intentionally read-only. It does not:
294
+
295
+ - restore repo policy
296
+ - cool or retire nodes
297
+ - write attribution or review events
298
+ - create backups or snapshots
299
+ - write instruction files, skills, or docs
300
+ - export guidance automatically
301
+ - open a console or mutation dashboard
302
+ - coordinate team workflows
303
+
256
304
  ## How MCP Interaction Works
257
305
 
258
306
  For `Codex` and `Claude Code`, ExperienceEngine is designed to keep routine review and management inside the host session first.
@@ -522,10 +570,12 @@ ee install codex
522
570
  What happens:
523
571
  - ExperienceEngine registers its shared MCP server with Codex
524
572
  - new Codex MCP sessions can use ExperienceEngine interaction surfaces
573
+ - ExperienceEngine writes Codex-native project hooks and enables `codex_hooks`
525
574
  - install ends with a short cold-start note so users know capture is active before the first formal hint appears
526
575
 
527
576
  Local state changes:
528
- - Codex MCP config in `~/.codex/config.toml`
577
+ - project hook config in `.codex/hooks.json`
578
+ - Codex MCP config in the active runtime's `~/.codex/config.toml`
529
579
  - ExperienceEngine-managed product state under `~/.experienceengine`
530
580
 
531
581
  Useful commands:
@@ -548,12 +598,19 @@ codex mcp get experienceengine
548
598
  Success looks like:
549
599
  - doctor reports the adapter as installed
550
600
  - `codex mcp get experienceengine` shows the server as enabled
601
+ - doctor reports Codex hooks as healthy and `codex_hooks` as enabled
551
602
  - a new `codex exec` session can call ExperienceEngine MCP resources or tools
552
603
 
553
604
  Host note:
554
605
  - ExperienceEngine installs a longer `startup_timeout_sec` for Codex automatically
555
606
  - this avoids MCP handshake failures on slower local startups
556
- - if Codex still cannot see ExperienceEngine in new sessions, re-run `ee install codex`
607
+ - ExperienceEngine installs Codex-native hooks for prompt-time guidance, tool-result capture, and stop/finalize writeback
608
+ - `UserPromptSubmit` is synchronous because it decides prompt-time injection
609
+ - `PostToolUse` and `Stop` are queued for background processing by default
610
+ - `PreToolUse` is not registered by default; set `EXPERIENCE_ENGINE_CODEX_PRETOOL_HOOK_ENABLED=1` only for synchronous gating experiments
611
+ - in a Windows Codex App + WSL Codex CLI repo, `.codex/hooks.json` is shared project hook wiring, while MCP config is owned by each runtime's Codex home
612
+ - `ee repair codex` refreshes project hooks and removes stale project-scoped ExperienceEngine MCP config
613
+ - if Codex still cannot see ExperienceEngine or doctor reports hook drift, run `ee repair codex`
557
614
  - `ee codex exec` is a deterministic wrapper for non-interactive runs
558
615
  - the wrapper owns `lookup -> child codex exec -> record -> finalize` outside the child process
559
616
  - for wrapped runs, ExperienceEngine removes the nested `experienceengine` MCP server from the child Codex config temporarily so lifecycle evidence is not double-written
@@ -561,6 +618,27 @@ Host note:
561
618
  - use `--ee-session-id <id>` when CI or debugging needs a stable ExperienceEngine session id
562
619
  - `codex exec review` is not wrapped yet; keep using native Codex review or the MCP/CLI surfaces for review workflows
563
620
 
621
+ Diagnostics note:
622
+ - `ee doctor codex` separates project hook health, `codex_hooks` enablement, MCP registration, and PATH-visible `ee` CLI fallback
623
+ - Windows Codex App can have healthy project hooks even when a Windows `codex` CLI is not installed
624
+ - WSL Codex CLI must have its own MCP registration in the WSL Codex home; it can still reuse the same repo `.codex/hooks.json`
625
+ - on WSL, `ee doctor codex` also warns when `codex` resolves to a WindowsApps shim instead of the Linux Codex CLI
626
+
627
+ Developer source-repo host validation lives at:
628
+
629
+ - [docs/development/source-repo-host-validation.md](development/source-repo-host-validation.md)
630
+
631
+ Source-repo host validation matrix:
632
+
633
+ | Host path | Source-repo validation status | Notes |
634
+ | --- | --- | --- |
635
+ | Windows Codex App | Validated | Project hooks are healthy, default events are `UserPromptSubmit`, `PostToolUse`, and `Stop`, and task runs write to the shared project scope. |
636
+ | WSL Codex CLI | Validated | WSL `codex exec` with shared `.codex/hooks.json` writes to the same ExperienceEngine home and `scope_id` as Windows Codex App. |
637
+ | Claude Code on Windows | Validated | Real hooks fired `UserPromptSubmit`, `PreToolUse`, `PostToolUse`, and `SessionEnd`; `SessionEnd` drained through the background queue and wrote to the shared project scope. |
638
+ | OpenClaw on WSL | Validated | WSL OpenClaw gateway loaded the current ExperienceEngine plugin and wrote task runs to the shared ExperienceEngine home. ExperienceEngine now resolves the real project root from OpenClaw hook payloads or nearby repo markers before scope resolution. If OpenClaw only reports its global workspace, ExperienceEngine isolates that session instead of reusing unrelated global-workspace experience. OpenClaw validated with `openrouter/tencent/hy3-preview:free`; the bare `tencent/hy3-preview:free` id is marked missing by OpenClaw's model registry. |
639
+
640
+ This matrix is source-repo validation only. Published npm package validation and host-native marketplace validation must be called out separately during release preparation.
641
+
564
642
  Developer validation docs:
565
643
 
566
644
  - [docs/development/codex-runtime-validation.md](development/codex-runtime-validation.md)
@@ -591,6 +669,10 @@ Useful fallback commands:
591
669
  ```bash
592
670
  ee inspect --last
593
671
  ee inspect recent injected 10
672
+ ee inspect review
673
+ ee inspect repo
674
+ ee inspect hygiene
675
+ ee inspect export-drafts
594
676
  ee inspect backups
595
677
  ee inspect active
596
678
  ee inspect node <id>
@@ -864,7 +946,7 @@ Claude Code:
864
946
  Codex:
865
947
  - run `ee doctor codex`
866
948
  - verify `codex mcp get experienceengine`
867
- - if a new Codex session still cannot see ExperienceEngine, run `ee install codex`
949
+ - if doctor reports disabled hooks, stale Claude hook entries, WSL path drift, or missing MCP wiring, run `ee repair codex`
868
950
  - then start a new Codex session so the MCP connection is recreated
869
951
 
870
952
  ### What ExperienceEngine does not back up
package/hooks/hooks.json CHANGED
File without changes
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "experienceengine",
3
3
  "name": "ExperienceEngine",
4
- "version": "0.2.1",
4
+ "version": "0.3.0",
5
5
  "description": "Context-aware experience intervention controller for coding and debugging tasks.",
6
6
  "configSchema": {
7
7
  "type": "object",
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@alan512/experienceengine",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "description": "Experience governance for coding agents: learn from real task outcomes, inject reusable hints, and retire low-value guidance.",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
9
- "url": "https://github.com/Alan-512/ExperienceEngine.git"
9
+ "url": "git+https://github.com/Alan-512/ExperienceEngine.git"
10
10
  },
11
11
  "openclaw": {
12
12
  "extensions": [
@@ -34,6 +34,7 @@
34
34
  "hooks",
35
35
  "plugins/claude-code-experienceengine",
36
36
  "README.md",
37
+ "docs/assets/readme",
37
38
  "docs/user-guide.md",
38
39
  "docs/releases",
39
40
  "openclaw.plugin.json",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "experienceengine",
3
3
  "description": "Context-aware experience intervention controller for Claude Code.",
4
- "version": "0.2.1",
4
+ "version": "0.3.0",
5
5
  "author": {
6
6
  "name": "ExperienceEngine"
7
7
  },
@@ -2,16 +2,10 @@
2
2
  "mcpServers": {
3
3
  "experienceengine": {
4
4
  "type": "stdio",
5
- "command": "node",
5
+ "command": "bash",
6
6
  "args": [
7
- "${CLAUDE_PLUGIN_ROOT}/node_modules/@alan512/experienceengine/dist/cli/index.js",
8
- "mcp-server"
9
- ],
10
- "env": {
11
- "NODE_PATH": "${CLAUDE_PLUGIN_ROOT}/node_modules",
12
- "EXPERIENCE_ENGINE_HOME": "${CLAUDE_PLUGIN_ROOT}/experienceengine-home",
13
- "EXPERIENCE_ENGINE_CLAUDE_HOOK_SOURCE": "marketplace"
14
- }
7
+ "${CLAUDE_PLUGIN_ROOT}/scripts/mcp-server.sh"
8
+ ]
15
9
  }
16
10
  }
17
11
  }
@@ -11,7 +11,7 @@ PACKAGE_ENTRY="${PACKAGE_DIR}/dist/cli/index.js"
11
11
  STAMP_PATH="${PLUGIN_DATA}/.experienceengine-plugin-version"
12
12
  EXPERIENCE_ENGINE_HOME_PATH="${EXPERIENCE_ENGINE_HOME:-${PLUGIN_DATA}/experienceengine-home}"
13
13
  STATE_PATH="${EXPERIENCE_ENGINE_HOME_PATH}/claude-marketplace-state.json"
14
- PACKAGE_VERSION="0.2.1"
14
+ PACKAGE_VERSION="0.3.0"
15
15
  PACKAGE_SPEC="${EXPERIENCE_ENGINE_PLUGIN_PACKAGE_SPEC:-@alan512/experienceengine@${PACKAGE_VERSION}}"
16
16
 
17
17
  mkdir -p "${PLUGIN_DATA}"