@alan512/experienceengine 0.3.5 → 0.4.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 (720) hide show
  1. package/.claude-plugin/marketplace.json +0 -0
  2. package/.claude-plugin/plugin.json +0 -0
  3. package/.env.example +0 -0
  4. package/.mcp.json +0 -0
  5. package/LICENSE +0 -0
  6. package/README.md +17 -3
  7. package/README.zh-CN.md +15 -2
  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 +11 -0
  21. package/dist/adapters/codex/action-registry.js +62 -0
  22. package/dist/adapters/codex/action-registry.js.map +1 -1
  23. package/dist/adapters/codex/behavior-loop.d.ts +10 -0
  24. package/dist/adapters/codex/behavior-loop.js +30 -1
  25. package/dist/adapters/codex/behavior-loop.js.map +1 -1
  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 +5 -4
  31. package/dist/adapters/codex/instruction-template.js.map +1 -1
  32. package/dist/adapters/codex/mcp-server.d.ts +36 -0
  33. package/dist/adapters/codex/mcp-server.js +51 -16
  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 +0 -0
  66. package/dist/cli/commands/claude-hook.js +5 -1
  67. package/dist/cli/commands/claude-hook.js.map +1 -1
  68. package/dist/cli/commands/codex-hook.d.ts +0 -0
  69. package/dist/cli/commands/codex-hook.js +10 -0
  70. package/dist/cli/commands/codex-hook.js.map +1 -1
  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 +0 -0
  79. package/dist/cli/commands/config.js.map +0 -0
  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 +56 -0
  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 +0 -0
  108. package/dist/cli/commands/inspect.js +180 -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 +0 -0
  112. package/dist/cli/commands/install.js.map +0 -0
  113. package/dist/cli/commands/maintenance.d.ts +0 -0
  114. package/dist/cli/commands/maintenance.js +138 -3
  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 +0 -0
  124. package/dist/cli/commands/repair.js.map +0 -0
  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 +0 -0
  136. package/dist/cli/commands/status.js.map +0 -0
  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 +1 -1
  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/compiler/command-normalizer.d.ts +27 -0
  150. package/dist/compiler/command-normalizer.js +263 -0
  151. package/dist/compiler/command-normalizer.js.map +1 -0
  152. package/dist/compiler/trajectory-compiler.d.ts +12 -0
  153. package/dist/compiler/trajectory-compiler.js +179 -0
  154. package/dist/compiler/trajectory-compiler.js.map +1 -0
  155. package/dist/compiler/trajectory-matcher.d.ts +18 -0
  156. package/dist/compiler/trajectory-matcher.js +419 -0
  157. package/dist/compiler/trajectory-matcher.js.map +1 -0
  158. package/dist/config/config-schema.d.ts +11 -0
  159. package/dist/config/config-schema.js +9 -0
  160. package/dist/config/config-schema.js.map +1 -1
  161. package/dist/config/default-config.d.ts +0 -0
  162. package/dist/config/default-config.js +1 -0
  163. package/dist/config/default-config.js.map +1 -1
  164. package/dist/config/load-config.d.ts +0 -0
  165. package/dist/config/load-config.js +0 -0
  166. package/dist/config/load-config.js.map +0 -0
  167. package/dist/config/path-resolver.d.ts +0 -0
  168. package/dist/config/path-resolver.js +0 -0
  169. package/dist/config/path-resolver.js.map +0 -0
  170. package/dist/config/runtime-env.d.ts +0 -0
  171. package/dist/config/runtime-env.js +0 -0
  172. package/dist/config/runtime-env.js.map +0 -0
  173. package/dist/config/secrets-store.d.ts +0 -0
  174. package/dist/config/secrets-store.js +0 -0
  175. package/dist/config/secrets-store.js.map +0 -0
  176. package/dist/config/settings-store.d.ts +0 -0
  177. package/dist/config/settings-store.js +0 -0
  178. package/dist/config/settings-store.js.map +0 -0
  179. package/dist/controller/candidate-retriever.d.ts +3 -1
  180. package/dist/controller/candidate-retriever.js +247 -7
  181. package/dist/controller/candidate-retriever.js.map +1 -1
  182. package/dist/controller/injection-renderer.d.ts +0 -0
  183. package/dist/controller/injection-renderer.js +0 -0
  184. package/dist/controller/injection-renderer.js.map +0 -0
  185. package/dist/controller/injection-scorecard.d.ts +0 -0
  186. package/dist/controller/injection-scorecard.js +0 -0
  187. package/dist/controller/injection-scorecard.js.map +0 -0
  188. package/dist/controller/inline-notice.d.ts +0 -0
  189. package/dist/controller/inline-notice.js +0 -0
  190. package/dist/controller/inline-notice.js.map +0 -0
  191. package/dist/controller/intervention-controller.d.ts +0 -0
  192. package/dist/controller/intervention-controller.js +48 -21
  193. package/dist/controller/intervention-controller.js.map +1 -1
  194. package/dist/controller/lexical-retriever.d.ts +0 -0
  195. package/dist/controller/lexical-retriever.js +0 -0
  196. package/dist/controller/lexical-retriever.js.map +0 -0
  197. package/dist/controller/model-reranker-mode.d.ts +0 -0
  198. package/dist/controller/model-reranker-mode.js +0 -0
  199. package/dist/controller/model-reranker-mode.js.map +0 -0
  200. package/dist/controller/model-reranker.d.ts +0 -0
  201. package/dist/controller/model-reranker.js +0 -0
  202. package/dist/controller/model-reranker.js.map +0 -0
  203. package/dist/controller/node-ranker.d.ts +0 -0
  204. package/dist/controller/node-ranker.js +0 -0
  205. package/dist/controller/node-ranker.js.map +0 -0
  206. package/dist/controller/policy-enricher.d.ts +0 -0
  207. package/dist/controller/policy-enricher.js +0 -0
  208. package/dist/controller/policy-enricher.js.map +0 -0
  209. package/dist/controller/query-rewrite.d.ts +0 -0
  210. package/dist/controller/query-rewrite.js +0 -0
  211. package/dist/controller/query-rewrite.js.map +0 -0
  212. package/dist/controller/retrieval-context.d.ts +0 -0
  213. package/dist/controller/retrieval-context.js +0 -0
  214. package/dist/controller/retrieval-context.js.map +0 -0
  215. package/dist/controller/second-opinion-gate.d.ts +0 -0
  216. package/dist/controller/second-opinion-gate.js +0 -0
  217. package/dist/controller/second-opinion-gate.js.map +0 -0
  218. package/dist/controller/skip-reason.d.ts +0 -0
  219. package/dist/controller/skip-reason.js +0 -0
  220. package/dist/controller/skip-reason.js.map +0 -0
  221. package/dist/controller/skip-scorecard.d.ts +0 -0
  222. package/dist/controller/skip-scorecard.js +0 -0
  223. package/dist/controller/skip-scorecard.js.map +0 -0
  224. package/dist/controller/trigger-evaluator.d.ts +2 -1
  225. package/dist/controller/trigger-evaluator.js +10 -4
  226. package/dist/controller/trigger-evaluator.js.map +1 -1
  227. package/dist/distillation/errors.d.ts +0 -0
  228. package/dist/distillation/errors.js +0 -0
  229. package/dist/distillation/errors.js.map +0 -0
  230. package/dist/distillation/experience-family.d.ts +0 -0
  231. package/dist/distillation/experience-family.js +0 -0
  232. package/dist/distillation/experience-family.js.map +0 -0
  233. package/dist/distillation/host-llm.d.ts +0 -0
  234. package/dist/distillation/host-llm.js +0 -0
  235. package/dist/distillation/host-llm.js.map +0 -0
  236. package/dist/distillation/llm-distiller.d.ts +0 -0
  237. package/dist/distillation/llm-distiller.js +0 -0
  238. package/dist/distillation/llm-distiller.js.map +0 -0
  239. package/dist/distillation/merge-decider.d.ts +0 -0
  240. package/dist/distillation/merge-decider.js +0 -0
  241. package/dist/distillation/merge-decider.js.map +0 -0
  242. package/dist/distillation/model-catalog.d.ts +0 -0
  243. package/dist/distillation/model-catalog.js +0 -0
  244. package/dist/distillation/model-catalog.js.map +0 -0
  245. package/dist/distillation/prompt-contract.d.ts +0 -0
  246. package/dist/distillation/prompt-contract.js +0 -0
  247. package/dist/distillation/prompt-contract.js.map +0 -0
  248. package/dist/distillation/providers/anthropic.d.ts +0 -0
  249. package/dist/distillation/providers/anthropic.js +0 -0
  250. package/dist/distillation/providers/anthropic.js.map +0 -0
  251. package/dist/distillation/providers/azure-openai.d.ts +0 -0
  252. package/dist/distillation/providers/azure-openai.js +0 -0
  253. package/dist/distillation/providers/azure-openai.js.map +0 -0
  254. package/dist/distillation/providers/baidu-qianfan.d.ts +0 -0
  255. package/dist/distillation/providers/baidu-qianfan.js +0 -0
  256. package/dist/distillation/providers/baidu-qianfan.js.map +0 -0
  257. package/dist/distillation/providers/bedrock.d.ts +0 -0
  258. package/dist/distillation/providers/bedrock.js +0 -0
  259. package/dist/distillation/providers/bedrock.js.map +0 -0
  260. package/dist/distillation/providers/dashscope.d.ts +0 -0
  261. package/dist/distillation/providers/dashscope.js +0 -0
  262. package/dist/distillation/providers/dashscope.js.map +0 -0
  263. package/dist/distillation/providers/deepseek.d.ts +0 -0
  264. package/dist/distillation/providers/deepseek.js +0 -0
  265. package/dist/distillation/providers/deepseek.js.map +0 -0
  266. package/dist/distillation/providers/gemini.d.ts +0 -0
  267. package/dist/distillation/providers/gemini.js +0 -0
  268. package/dist/distillation/providers/gemini.js.map +0 -0
  269. package/dist/distillation/providers/google-adc.d.ts +0 -0
  270. package/dist/distillation/providers/google-adc.js +0 -0
  271. package/dist/distillation/providers/google-adc.js.map +0 -0
  272. package/dist/distillation/providers/minimax.d.ts +0 -0
  273. package/dist/distillation/providers/minimax.js +0 -0
  274. package/dist/distillation/providers/minimax.js.map +0 -0
  275. package/dist/distillation/providers/moonshot.d.ts +0 -0
  276. package/dist/distillation/providers/moonshot.js +0 -0
  277. package/dist/distillation/providers/moonshot.js.map +0 -0
  278. package/dist/distillation/providers/openai-compatible-factory.d.ts +0 -0
  279. package/dist/distillation/providers/openai-compatible-factory.js +0 -0
  280. package/dist/distillation/providers/openai-compatible-factory.js.map +0 -0
  281. package/dist/distillation/providers/openai-compatible.d.ts +0 -0
  282. package/dist/distillation/providers/openai-compatible.js +0 -0
  283. package/dist/distillation/providers/openai-compatible.js.map +0 -0
  284. package/dist/distillation/providers/openai.d.ts +0 -0
  285. package/dist/distillation/providers/openai.js +0 -0
  286. package/dist/distillation/providers/openai.js.map +0 -0
  287. package/dist/distillation/providers/openrouter.d.ts +0 -0
  288. package/dist/distillation/providers/openrouter.js +0 -0
  289. package/dist/distillation/providers/openrouter.js.map +0 -0
  290. package/dist/distillation/providers/registry.d.ts +0 -0
  291. package/dist/distillation/providers/registry.js +0 -0
  292. package/dist/distillation/providers/registry.js.map +0 -0
  293. package/dist/distillation/providers/siliconflow.d.ts +0 -0
  294. package/dist/distillation/providers/siliconflow.js +0 -0
  295. package/dist/distillation/providers/siliconflow.js.map +0 -0
  296. package/dist/distillation/providers/tencent-hunyuan.d.ts +0 -0
  297. package/dist/distillation/providers/tencent-hunyuan.js +0 -0
  298. package/dist/distillation/providers/tencent-hunyuan.js.map +0 -0
  299. package/dist/distillation/providers/types.d.ts +0 -0
  300. package/dist/distillation/providers/types.js +0 -0
  301. package/dist/distillation/providers/types.js.map +0 -0
  302. package/dist/distillation/providers/volcengine-ark.d.ts +0 -0
  303. package/dist/distillation/providers/volcengine-ark.js +0 -0
  304. package/dist/distillation/providers/volcengine-ark.js.map +0 -0
  305. package/dist/distillation/providers/zhipu.d.ts +0 -0
  306. package/dist/distillation/providers/zhipu.js +0 -0
  307. package/dist/distillation/providers/zhipu.js.map +0 -0
  308. package/dist/distillation/queue-worker.d.ts +0 -0
  309. package/dist/distillation/queue-worker.js +0 -0
  310. package/dist/distillation/queue-worker.js.map +0 -0
  311. package/dist/distillation/types.d.ts +0 -0
  312. package/dist/distillation/types.js +0 -0
  313. package/dist/distillation/types.js.map +0 -0
  314. package/dist/evaluation/benchmark-report.d.ts +0 -0
  315. package/dist/evaluation/benchmark-report.js +0 -0
  316. package/dist/evaluation/benchmark-report.js.map +0 -0
  317. package/dist/evaluation/benchmark-summary.d.ts +0 -0
  318. package/dist/evaluation/benchmark-summary.js +0 -0
  319. package/dist/evaluation/benchmark-summary.js.map +0 -0
  320. package/dist/evaluation/codex-lifecycle-validation.d.ts +0 -0
  321. package/dist/evaluation/codex-lifecycle-validation.js +0 -0
  322. package/dist/evaluation/codex-lifecycle-validation.js.map +0 -0
  323. package/dist/evaluation/hybrid-phase1-rollout-summary.d.ts +0 -0
  324. package/dist/evaluation/hybrid-phase1-rollout-summary.js +0 -0
  325. package/dist/evaluation/hybrid-phase1-rollout-summary.js.map +0 -0
  326. package/dist/evaluation/hybrid-phase3-gate-metrics.d.ts +0 -0
  327. package/dist/evaluation/hybrid-phase3-gate-metrics.js +0 -0
  328. package/dist/evaluation/hybrid-phase3-gate-metrics.js.map +0 -0
  329. package/dist/evaluation/openclaw-baseline.d.ts +0 -0
  330. package/dist/evaluation/openclaw-baseline.js +0 -0
  331. package/dist/evaluation/openclaw-baseline.js.map +0 -0
  332. package/dist/evaluation/openclaw-scenarios.d.ts +0 -0
  333. package/dist/evaluation/openclaw-scenarios.js +0 -0
  334. package/dist/evaluation/openclaw-scenarios.js.map +0 -0
  335. package/dist/experience-management/governance-observability.d.ts +0 -0
  336. package/dist/experience-management/governance-observability.js +0 -0
  337. package/dist/experience-management/governance-observability.js.map +0 -0
  338. package/dist/experience-management/node-lifecycle-governance.d.ts +0 -0
  339. package/dist/experience-management/node-lifecycle-governance.js +25 -6
  340. package/dist/experience-management/node-lifecycle-governance.js.map +1 -1
  341. package/dist/experience-management/repo-policy.d.ts +0 -0
  342. package/dist/experience-management/repo-policy.js +0 -0
  343. package/dist/experience-management/repo-policy.js.map +0 -0
  344. package/dist/experience-management/task-management-signals.d.ts +0 -0
  345. package/dist/experience-management/task-management-signals.js +0 -0
  346. package/dist/experience-management/task-management-signals.js.map +0 -0
  347. package/dist/feedback/automatic-attribution.d.ts +0 -0
  348. package/dist/feedback/automatic-attribution.js +0 -0
  349. package/dist/feedback/automatic-attribution.js.map +0 -0
  350. package/dist/feedback/feedback-manager.d.ts +0 -0
  351. package/dist/feedback/feedback-manager.js +0 -0
  352. package/dist/feedback/feedback-manager.js.map +0 -0
  353. package/dist/feedback/harm-detector.d.ts +0 -0
  354. package/dist/feedback/harm-detector.js +0 -0
  355. package/dist/feedback/harm-detector.js.map +0 -0
  356. package/dist/feedback/state-transition.d.ts +0 -0
  357. package/dist/feedback/state-transition.js +0 -0
  358. package/dist/feedback/state-transition.js.map +0 -0
  359. package/dist/feedback/stats-updater.d.ts +0 -0
  360. package/dist/feedback/stats-updater.js +0 -0
  361. package/dist/feedback/stats-updater.js.map +0 -0
  362. package/dist/hybrid/capsule-builder.d.ts +0 -0
  363. package/dist/hybrid/capsule-builder.js +0 -0
  364. package/dist/hybrid/capsule-builder.js.map +0 -0
  365. package/dist/hybrid/explain-provider-client.d.ts +0 -0
  366. package/dist/hybrid/explain-provider-client.js +0 -0
  367. package/dist/hybrid/explain-provider-client.js.map +0 -0
  368. package/dist/hybrid/postmortem-provider-client.d.ts +0 -0
  369. package/dist/hybrid/postmortem-provider-client.js +0 -0
  370. package/dist/hybrid/postmortem-provider-client.js.map +0 -0
  371. package/dist/hybrid/rollout.d.ts +0 -0
  372. package/dist/hybrid/rollout.js +0 -0
  373. package/dist/hybrid/rollout.js.map +0 -0
  374. package/dist/hybrid/router.d.ts +0 -0
  375. package/dist/hybrid/router.js +0 -0
  376. package/dist/hybrid/router.js.map +0 -0
  377. package/dist/hybrid/types.d.ts +0 -0
  378. package/dist/hybrid/types.js +0 -0
  379. package/dist/hybrid/types.js.map +0 -0
  380. package/dist/hybrid/validators.d.ts +0 -0
  381. package/dist/hybrid/validators.js +0 -0
  382. package/dist/hybrid/validators.js.map +0 -0
  383. package/dist/hybrid/worker-client.d.ts +0 -0
  384. package/dist/hybrid/worker-client.js +0 -0
  385. package/dist/hybrid/worker-client.js.map +0 -0
  386. package/dist/hybrid/workers/explain-decision-llm.d.ts +0 -0
  387. package/dist/hybrid/workers/explain-decision-llm.js +0 -0
  388. package/dist/hybrid/workers/explain-decision-llm.js.map +0 -0
  389. package/dist/hybrid/workers/explain-decision.d.ts +0 -0
  390. package/dist/hybrid/workers/explain-decision.js +0 -0
  391. package/dist/hybrid/workers/explain-decision.js.map +0 -0
  392. package/dist/hybrid/workers/postmortem-review-llm.d.ts +0 -0
  393. package/dist/hybrid/workers/postmortem-review-llm.js +0 -0
  394. package/dist/hybrid/workers/postmortem-review-llm.js.map +0 -0
  395. package/dist/hybrid/workers/postmortem-review.d.ts +0 -0
  396. package/dist/hybrid/workers/postmortem-review.js +0 -0
  397. package/dist/hybrid/workers/postmortem-review.js.map +0 -0
  398. package/dist/index.d.ts +0 -0
  399. package/dist/index.js +0 -0
  400. package/dist/index.js.map +0 -0
  401. package/dist/input/context-summary-adapter.d.ts +0 -0
  402. package/dist/input/context-summary-adapter.js +0 -0
  403. package/dist/input/context-summary-adapter.js.map +0 -0
  404. package/dist/input/fingerprint-extractor.d.ts +53 -0
  405. package/dist/input/fingerprint-extractor.js +620 -0
  406. package/dist/input/fingerprint-extractor.js.map +1 -0
  407. package/dist/input/input-adapter.d.ts +0 -0
  408. package/dist/input/input-adapter.js +2 -2
  409. package/dist/input/input-adapter.js.map +1 -1
  410. package/dist/input/outcome-resolver.d.ts +0 -0
  411. package/dist/input/outcome-resolver.js +2 -2
  412. package/dist/input/outcome-resolver.js.map +1 -1
  413. package/dist/input/scope-resolver.d.ts +0 -0
  414. package/dist/input/scope-resolver.js +0 -0
  415. package/dist/input/scope-resolver.js.map +0 -0
  416. package/dist/input/tasktype-resolver.d.ts +0 -0
  417. package/dist/input/tasktype-resolver.js +0 -0
  418. package/dist/input/tasktype-resolver.js.map +0 -0
  419. package/dist/input/tool-event-significance.d.ts +0 -0
  420. package/dist/input/tool-event-significance.js +0 -0
  421. package/dist/input/tool-event-significance.js.map +0 -0
  422. package/dist/install/claude-cli.d.ts +0 -0
  423. package/dist/install/claude-cli.js +0 -0
  424. package/dist/install/claude-cli.js.map +0 -0
  425. package/dist/install/claude-code-doctor.d.ts +0 -0
  426. package/dist/install/claude-code-doctor.js +0 -0
  427. package/dist/install/claude-code-doctor.js.map +0 -0
  428. package/dist/install/claude-code-installer.d.ts +0 -0
  429. package/dist/install/claude-code-installer.js +0 -0
  430. package/dist/install/claude-code-installer.js.map +0 -0
  431. package/dist/install/claude-marketplace-state.d.ts +0 -0
  432. package/dist/install/claude-marketplace-state.js +0 -0
  433. package/dist/install/claude-marketplace-state.js.map +0 -0
  434. package/dist/install/claude-runtime-target.d.ts +0 -0
  435. package/dist/install/claude-runtime-target.js +0 -0
  436. package/dist/install/claude-runtime-target.js.map +0 -0
  437. package/dist/install/codex-cli.d.ts +0 -0
  438. package/dist/install/codex-cli.js +0 -0
  439. package/dist/install/codex-cli.js.map +0 -0
  440. package/dist/install/codex-hooks.d.ts +0 -0
  441. package/dist/install/codex-hooks.js +0 -0
  442. package/dist/install/codex-hooks.js.map +0 -0
  443. package/dist/install/codex-installer.d.ts +0 -0
  444. package/dist/install/codex-installer.js +0 -0
  445. package/dist/install/codex-installer.js.map +0 -0
  446. package/dist/install/codex-runtime-target.d.ts +0 -0
  447. package/dist/install/codex-runtime-target.js +0 -0
  448. package/dist/install/codex-runtime-target.js.map +0 -0
  449. package/dist/install/host-detection.d.ts +0 -0
  450. package/dist/install/host-detection.js +0 -0
  451. package/dist/install/host-detection.js.map +0 -0
  452. package/dist/install/openclaw-cli.d.ts +0 -0
  453. package/dist/install/openclaw-cli.js +0 -0
  454. package/dist/install/openclaw-cli.js.map +0 -0
  455. package/dist/install/openclaw-installer.d.ts +0 -0
  456. package/dist/install/openclaw-installer.js +0 -0
  457. package/dist/install/openclaw-installer.js.map +0 -0
  458. package/dist/install/public-install.d.ts +0 -0
  459. package/dist/install/public-install.js +0 -0
  460. package/dist/install/public-install.js.map +0 -0
  461. package/dist/install/registry-health.d.ts +0 -0
  462. package/dist/install/registry-health.js +0 -0
  463. package/dist/install/registry-health.js.map +0 -0
  464. package/dist/interaction/operational-actions-service.d.ts +0 -0
  465. package/dist/interaction/operational-actions-service.js +0 -0
  466. package/dist/interaction/operational-actions-service.js.map +0 -0
  467. package/dist/interaction/operational-service.d.ts +0 -0
  468. package/dist/interaction/operational-service.js +0 -0
  469. package/dist/interaction/operational-service.js.map +0 -0
  470. package/dist/interaction/quality-band.d.ts +0 -0
  471. package/dist/interaction/quality-band.js +0 -0
  472. package/dist/interaction/quality-band.js.map +0 -0
  473. package/dist/interaction/repo-summary.d.ts +0 -0
  474. package/dist/interaction/repo-summary.js +0 -0
  475. package/dist/interaction/repo-summary.js.map +0 -0
  476. package/dist/interaction/retrieval-policy-inspection.d.ts +0 -0
  477. package/dist/interaction/retrieval-policy-inspection.js +0 -0
  478. package/dist/interaction/retrieval-policy-inspection.js.map +0 -0
  479. package/dist/interaction/service.d.ts +49 -1
  480. package/dist/interaction/service.js +125 -3
  481. package/dist/interaction/service.js.map +1 -1
  482. package/dist/interaction/state-artifact-service.d.ts +0 -0
  483. package/dist/interaction/state-artifact-service.js +0 -0
  484. package/dist/interaction/state-artifact-service.js.map +0 -0
  485. package/dist/interaction/surface-tiers.d.ts +0 -0
  486. package/dist/interaction/surface-tiers.js +1 -1
  487. package/dist/interaction/surface-tiers.js.map +1 -1
  488. package/dist/maintenance/claude-validate-print.d.ts +0 -0
  489. package/dist/maintenance/claude-validate-print.js +0 -0
  490. package/dist/maintenance/claude-validate-print.js.map +0 -0
  491. package/dist/maintenance/embedding-smoke.d.ts +0 -0
  492. package/dist/maintenance/embedding-smoke.js +0 -0
  493. package/dist/maintenance/embedding-smoke.js.map +0 -0
  494. package/dist/maintenance/experience-export-drafts.d.ts +0 -0
  495. package/dist/maintenance/experience-export-drafts.js +0 -0
  496. package/dist/maintenance/experience-export-drafts.js.map +0 -0
  497. package/dist/maintenance/experience-hygiene.d.ts +0 -0
  498. package/dist/maintenance/experience-hygiene.js +0 -0
  499. package/dist/maintenance/experience-hygiene.js.map +0 -0
  500. package/dist/maintenance/hygiene-governance-applicator.d.ts +21 -0
  501. package/dist/maintenance/hygiene-governance-applicator.js +246 -0
  502. package/dist/maintenance/hygiene-governance-applicator.js.map +1 -0
  503. package/dist/maintenance/hygiene-governance-approvals.d.ts +41 -0
  504. package/dist/maintenance/hygiene-governance-approvals.js +143 -0
  505. package/dist/maintenance/hygiene-governance-approvals.js.map +1 -0
  506. package/dist/maintenance/hygiene-governance-llm-planner.d.ts +26 -0
  507. package/dist/maintenance/hygiene-governance-llm-planner.js +169 -0
  508. package/dist/maintenance/hygiene-governance-llm-planner.js.map +1 -0
  509. package/dist/maintenance/hygiene-governance-planner.d.ts +113 -0
  510. package/dist/maintenance/hygiene-governance-planner.js +302 -0
  511. package/dist/maintenance/hygiene-governance-planner.js.map +1 -0
  512. package/dist/maintenance/hygiene-governance-scheduler.d.ts +72 -0
  513. package/dist/maintenance/hygiene-governance-scheduler.js +206 -0
  514. package/dist/maintenance/hygiene-governance-scheduler.js.map +1 -0
  515. package/dist/maintenance/hygiene-governance-validator.d.ts +14 -0
  516. package/dist/maintenance/hygiene-governance-validator.js +212 -0
  517. package/dist/maintenance/hygiene-governance-validator.js.map +1 -0
  518. package/dist/maintenance/operator-review-flow.d.ts +12 -1
  519. package/dist/maintenance/operator-review-flow.js +18 -2
  520. package/dist/maintenance/operator-review-flow.js.map +1 -1
  521. package/dist/maintenance/redistill-rule-nodes.d.ts +0 -0
  522. package/dist/maintenance/redistill-rule-nodes.js +0 -0
  523. package/dist/maintenance/redistill-rule-nodes.js.map +0 -0
  524. package/dist/maintenance/scope-merge.d.ts +0 -0
  525. package/dist/maintenance/scope-merge.js +0 -0
  526. package/dist/maintenance/scope-merge.js.map +0 -0
  527. package/dist/maintenance/vector-migrator.d.ts +37 -0
  528. package/dist/maintenance/vector-migrator.js +170 -0
  529. package/dist/maintenance/vector-migrator.js.map +1 -0
  530. package/dist/maintenance/warning-variant-cleanup.d.ts +0 -0
  531. package/dist/maintenance/warning-variant-cleanup.js +0 -0
  532. package/dist/maintenance/warning-variant-cleanup.js.map +0 -0
  533. package/dist/plugin/fixture-sanitizer.d.ts +0 -0
  534. package/dist/plugin/fixture-sanitizer.js +0 -0
  535. package/dist/plugin/fixture-sanitizer.js.map +0 -0
  536. package/dist/plugin/hooks/before-prompt-build.d.ts +0 -0
  537. package/dist/plugin/hooks/before-prompt-build.js +0 -0
  538. package/dist/plugin/hooks/before-prompt-build.js.map +0 -0
  539. package/dist/plugin/hooks/message-sent.d.ts +0 -0
  540. package/dist/plugin/hooks/message-sent.js +0 -0
  541. package/dist/plugin/hooks/message-sent.js.map +0 -0
  542. package/dist/plugin/hooks/tool-result-persist.d.ts +0 -0
  543. package/dist/plugin/hooks/tool-result-persist.js +0 -0
  544. package/dist/plugin/hooks/tool-result-persist.js.map +0 -0
  545. package/dist/plugin/openclaw-install-state.d.ts +0 -0
  546. package/dist/plugin/openclaw-install-state.js +0 -0
  547. package/dist/plugin/openclaw-install-state.js.map +0 -0
  548. package/dist/plugin/openclaw-plugin.d.ts +8 -0
  549. package/dist/plugin/openclaw-plugin.js +5 -1
  550. package/dist/plugin/openclaw-plugin.js.map +1 -1
  551. package/dist/plugin/openclaw-routine-interaction.d.ts +0 -0
  552. package/dist/plugin/openclaw-routine-interaction.js +0 -0
  553. package/dist/plugin/openclaw-routine-interaction.js.map +0 -0
  554. package/dist/plugin/openclaw-runtime-defaults.d.ts +0 -0
  555. package/dist/plugin/openclaw-runtime-defaults.js +0 -0
  556. package/dist/plugin/openclaw-runtime-defaults.js.map +0 -0
  557. package/dist/plugin/runtime-capture.d.ts +0 -0
  558. package/dist/plugin/runtime-capture.js +0 -0
  559. package/dist/plugin/runtime-capture.js.map +0 -0
  560. package/dist/plugin/runtime-helpers.d.ts +0 -0
  561. package/dist/plugin/runtime-helpers.js +0 -0
  562. package/dist/plugin/runtime-helpers.js.map +0 -0
  563. package/dist/runtime/learning-candidate-factory.d.ts +0 -0
  564. package/dist/runtime/learning-candidate-factory.js +0 -0
  565. package/dist/runtime/learning-candidate-factory.js.map +0 -0
  566. package/dist/runtime/learning-pipeline-service.d.ts +0 -0
  567. package/dist/runtime/learning-pipeline-service.js +0 -0
  568. package/dist/runtime/learning-pipeline-service.js.map +0 -0
  569. package/dist/runtime/prompt-service.d.ts +0 -0
  570. package/dist/runtime/prompt-service.js +10 -0
  571. package/dist/runtime/prompt-service.js.map +1 -1
  572. package/dist/runtime/service.d.ts +16 -0
  573. package/dist/runtime/service.js +189 -3
  574. package/dist/runtime/service.js.map +1 -1
  575. package/dist/runtime/task-finalization-service.d.ts +0 -0
  576. package/dist/runtime/task-finalization-service.js +0 -0
  577. package/dist/runtime/task-finalization-service.js.map +0 -0
  578. package/dist/store/logs/jsonl-logger.d.ts +0 -0
  579. package/dist/store/logs/jsonl-logger.js +0 -0
  580. package/dist/store/logs/jsonl-logger.js.map +0 -0
  581. package/dist/store/sqlite/db.d.ts +0 -0
  582. package/dist/store/sqlite/db.js +24 -1
  583. package/dist/store/sqlite/db.js.map +1 -1
  584. package/dist/store/sqlite/migrations.d.ts +0 -0
  585. package/dist/store/sqlite/migrations.js +0 -0
  586. package/dist/store/sqlite/migrations.js.map +0 -0
  587. package/dist/store/sqlite/repositories/attribution-record-repo.d.ts +0 -0
  588. package/dist/store/sqlite/repositories/attribution-record-repo.js +12 -0
  589. package/dist/store/sqlite/repositories/attribution-record-repo.js.map +1 -1
  590. package/dist/store/sqlite/repositories/candidate-repo.d.ts +0 -0
  591. package/dist/store/sqlite/repositories/candidate-repo.js +0 -0
  592. package/dist/store/sqlite/repositories/candidate-repo.js.map +0 -0
  593. package/dist/store/sqlite/repositories/distillation-job-repo.d.ts +0 -0
  594. package/dist/store/sqlite/repositories/distillation-job-repo.js +0 -0
  595. package/dist/store/sqlite/repositories/distillation-job-repo.js.map +0 -0
  596. package/dist/store/sqlite/repositories/episode-repo.d.ts +0 -0
  597. package/dist/store/sqlite/repositories/episode-repo.js +0 -0
  598. package/dist/store/sqlite/repositories/episode-repo.js.map +0 -0
  599. package/dist/store/sqlite/repositories/hybrid-invocation-trace-repo.d.ts +0 -0
  600. package/dist/store/sqlite/repositories/hybrid-invocation-trace-repo.js +0 -0
  601. package/dist/store/sqlite/repositories/hybrid-invocation-trace-repo.js.map +0 -0
  602. package/dist/store/sqlite/repositories/hybrid-review-artifact-repo.d.ts +0 -0
  603. package/dist/store/sqlite/repositories/hybrid-review-artifact-repo.js +0 -0
  604. package/dist/store/sqlite/repositories/hybrid-review-artifact-repo.js.map +0 -0
  605. package/dist/store/sqlite/repositories/hygiene-governance-repo.d.ts +187 -0
  606. package/dist/store/sqlite/repositories/hygiene-governance-repo.js +513 -0
  607. package/dist/store/sqlite/repositories/hygiene-governance-repo.js.map +1 -0
  608. package/dist/store/sqlite/repositories/injection-repo.d.ts +0 -0
  609. package/dist/store/sqlite/repositories/injection-repo.js +0 -0
  610. package/dist/store/sqlite/repositories/injection-repo.js.map +0 -0
  611. package/dist/store/sqlite/repositories/input-record-repo.d.ts +0 -0
  612. package/dist/store/sqlite/repositories/input-record-repo.js +0 -0
  613. package/dist/store/sqlite/repositories/input-record-repo.js.map +0 -0
  614. package/dist/store/sqlite/repositories/node-repo.d.ts +1 -0
  615. package/dist/store/sqlite/repositories/node-repo.js +47 -2
  616. package/dist/store/sqlite/repositories/node-repo.js.map +1 -1
  617. package/dist/store/sqlite/repositories/outcome-record-repo.d.ts +0 -0
  618. package/dist/store/sqlite/repositories/outcome-record-repo.js +0 -0
  619. package/dist/store/sqlite/repositories/outcome-record-repo.js.map +0 -0
  620. package/dist/store/sqlite/repositories/repo-policy-repo.d.ts +0 -0
  621. package/dist/store/sqlite/repositories/repo-policy-repo.js +0 -0
  622. package/dist/store/sqlite/repositories/repo-policy-repo.js.map +0 -0
  623. package/dist/store/sqlite/repositories/review-event-repo.d.ts +0 -0
  624. package/dist/store/sqlite/repositories/review-event-repo.js +0 -0
  625. package/dist/store/sqlite/repositories/review-event-repo.js.map +0 -0
  626. package/dist/store/sqlite/repositories/scope-fingerprint-repo.d.ts +8 -0
  627. package/dist/store/sqlite/repositories/scope-fingerprint-repo.js +23 -0
  628. package/dist/store/sqlite/repositories/scope-fingerprint-repo.js.map +1 -0
  629. package/dist/store/sqlite/repositories/scope-repo.d.ts +0 -0
  630. package/dist/store/sqlite/repositories/scope-repo.js +0 -0
  631. package/dist/store/sqlite/repositories/scope-repo.js.map +0 -0
  632. package/dist/store/sqlite/repositories/stats-repo.d.ts +0 -0
  633. package/dist/store/sqlite/repositories/stats-repo.js +0 -0
  634. package/dist/store/sqlite/repositories/stats-repo.js.map +0 -0
  635. package/dist/store/sqlite/repositories/task-run-repo.d.ts +0 -0
  636. package/dist/store/sqlite/repositories/task-run-repo.js +0 -0
  637. package/dist/store/sqlite/repositories/task-run-repo.js.map +0 -0
  638. package/dist/store/sqlite/schema.sql +124 -0
  639. package/dist/store/vector/api-embedding-provider.d.ts +0 -0
  640. package/dist/store/vector/api-embedding-provider.js +0 -0
  641. package/dist/store/vector/api-embedding-provider.js.map +0 -0
  642. package/dist/store/vector/embeddings.d.ts +4 -2
  643. package/dist/store/vector/embeddings.js +19 -6
  644. package/dist/store/vector/embeddings.js.map +1 -1
  645. package/dist/store/vector/lancedb.d.ts +0 -0
  646. package/dist/store/vector/lancedb.js +0 -0
  647. package/dist/store/vector/lancedb.js.map +0 -0
  648. package/dist/store/vector/local-provider.d.ts +1 -1
  649. package/dist/store/vector/local-provider.js +40 -8
  650. package/dist/store/vector/local-provider.js.map +1 -1
  651. package/dist/store/vector/node-index.d.ts +0 -0
  652. package/dist/store/vector/node-index.js +0 -0
  653. package/dist/store/vector/node-index.js.map +0 -0
  654. package/dist/store/vector/offline-manifest.d.ts +7 -0
  655. package/dist/store/vector/offline-manifest.js +162 -0
  656. package/dist/store/vector/offline-manifest.js.map +1 -0
  657. package/dist/store/vector/provider-types.d.ts +1 -0
  658. package/dist/store/vector/provider-types.js +0 -0
  659. package/dist/store/vector/provider-types.js.map +0 -0
  660. package/dist/types/analyzer.d.ts +0 -0
  661. package/dist/types/analyzer.js +0 -0
  662. package/dist/types/analyzer.js.map +0 -0
  663. package/dist/types/domain.d.ts +111 -1
  664. package/dist/types/domain.js +0 -0
  665. package/dist/types/domain.js.map +0 -0
  666. package/dist/types/plugin.d.ts +1 -0
  667. package/dist/types/plugin.js +0 -0
  668. package/dist/types/plugin.js.map +0 -0
  669. package/dist/types/storage.d.ts +0 -0
  670. package/dist/types/storage.js +0 -0
  671. package/dist/types/storage.js.map +0 -0
  672. package/dist/utils/clock.d.ts +0 -0
  673. package/dist/utils/clock.js +0 -0
  674. package/dist/utils/clock.js.map +0 -0
  675. package/dist/utils/errors.d.ts +0 -0
  676. package/dist/utils/errors.js +0 -0
  677. package/dist/utils/errors.js.map +0 -0
  678. package/dist/utils/hashing.d.ts +0 -0
  679. package/dist/utils/hashing.js +0 -0
  680. package/dist/utils/hashing.js.map +0 -0
  681. package/dist/utils/ids.d.ts +0 -0
  682. package/dist/utils/ids.js +0 -0
  683. package/dist/utils/ids.js.map +0 -0
  684. package/dist/utils/text.d.ts +0 -0
  685. package/dist/utils/text.js +0 -0
  686. package/dist/utils/text.js.map +0 -0
  687. package/dist/version/package-version.d.ts +0 -0
  688. package/dist/version/package-version.js +0 -0
  689. package/dist/version/package-version.js.map +0 -0
  690. package/dist/version/remote-release.d.ts +0 -0
  691. package/dist/version/remote-release.js +0 -0
  692. package/dist/version/remote-release.js.map +0 -0
  693. package/docs/assets/readme/inspect-last-example.svg +0 -0
  694. package/docs/releases/v0.1.0.md +0 -0
  695. package/docs/releases/v0.1.1.md +0 -0
  696. package/docs/releases/v0.1.2.md +0 -0
  697. package/docs/releases/v0.1.3.md +0 -0
  698. package/docs/releases/v0.2.0.md +0 -0
  699. package/docs/releases/v0.2.1.md +0 -0
  700. package/docs/releases/v0.3.0.md +0 -0
  701. package/docs/releases/v0.3.1.md +0 -0
  702. package/docs/releases/v0.3.2.md +0 -0
  703. package/docs/releases/v0.3.3.md +0 -0
  704. package/docs/releases/v0.3.4.md +0 -0
  705. package/docs/releases/v0.3.5.md +0 -0
  706. package/docs/releases/v0.3.6.md +28 -0
  707. package/docs/releases/v0.4.0.md +39 -0
  708. package/docs/user-guide.md +86 -2
  709. package/hooks/hooks.json +0 -0
  710. package/openclaw.plugin.json +1 -1
  711. package/package.json +1 -1
  712. package/plugins/claude-code-experienceengine/.claude-plugin/plugin.json +0 -0
  713. package/plugins/claude-code-experienceengine/.mcp.json +0 -0
  714. package/plugins/claude-code-experienceengine/hooks/hooks.json +0 -0
  715. package/plugins/claude-code-experienceengine/scripts/claude-hook.sh +0 -0
  716. package/plugins/claude-code-experienceengine/scripts/install-deps.sh +0 -0
  717. package/plugins/claude-code-experienceengine/scripts/mcp-server.sh +0 -0
  718. package/scripts/claude-plugin/claude-hook.sh +0 -0
  719. package/scripts/claude-plugin/install-deps.sh +0 -0
  720. package/scripts/claude-plugin/mcp-server.sh +0 -0
File without changes
@@ -1,6 +1,6 @@
1
1
  import { isExploratoryTool, isEditTool, isSignificantToolEvent } from "./tool-event-significance.js";
2
- const STRONG_SUCCESS_PATTERN = /\b(fixed|resolved|working|passed|completed|done|success)\b/i;
3
- const STRONG_FAILURE_PATTERN = /\b(failed|unable|cannot|blocked|broken|error persists)\b/i;
2
+ const STRONG_SUCCESS_PATTERN = /\b(fixed|resolved|working|passed|completed|done|success)\b|已完成|完成|已修复|修复完成|已验证通过|验证通过|成功|通过/i;
3
+ const STRONG_FAILURE_PATTERN = /\b(failed|unable|cannot|blocked|broken|error persists)\b|失败|无法|不能|阻塞|报错仍然存在|错误仍然存在/i;
4
4
  export const resolveOutcome = (events, finalMessage) => {
5
5
  const lastTerminalEvent = [...events]
6
6
  .reverse()
@@ -1 +1 @@
1
- {"version":3,"file":"outcome-resolver.js","sourceRoot":"","sources":["../../src/input/outcome-resolver.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAErG,MAAM,sBAAsB,GAAG,6DAA6D,CAAC;AAC7F,MAAM,sBAAsB,GAAG,2DAA2D,CAAC;AAE3F,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,MAAmB,EAAE,YAAqB,EAAiB,EAAE;IAC1F,MAAM,iBAAiB,GAAG,CAAC,GAAG,MAAM,CAAC;SAClC,OAAO,EAAE;SACT,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,sBAAsB,CAAC,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;IAErG,IAAI,iBAAiB,EAAE,CAAC;QACtB,IAAI,iBAAiB,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;YAC3C,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,IAAI,iBAAiB,CAAC,MAAM,KAAK,SAAS,IAAI,CAAC,iBAAiB,CAAC,SAAS,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;YACrF,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;IAED,IAAI,YAAY,IAAI,sBAAsB,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC;QAC9D,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,IAAI,YAAY,IAAI,sBAAsB,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC;QAC9D,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC"}
1
+ {"version":3,"file":"outcome-resolver.js","sourceRoot":"","sources":["../../src/input/outcome-resolver.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAErG,MAAM,sBAAsB,GAAG,8FAA8F,CAAC;AAC9H,MAAM,sBAAsB,GAAG,qFAAqF,CAAC;AAErH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,MAAmB,EAAE,YAAqB,EAAiB,EAAE;IAC1F,MAAM,iBAAiB,GAAG,CAAC,GAAG,MAAM,CAAC;SAClC,OAAO,EAAE;SACT,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,sBAAsB,CAAC,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;IAErG,IAAI,iBAAiB,EAAE,CAAC;QACtB,IAAI,iBAAiB,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;YAC3C,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,IAAI,iBAAiB,CAAC,MAAM,KAAK,SAAS,IAAI,CAAC,iBAAiB,CAAC,SAAS,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;YACrF,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;IAED,IAAI,YAAY,IAAI,sBAAsB,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC;QAC9D,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,IAAI,YAAY,IAAI,sBAAsB,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC;QAC9D,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC"}
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
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
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
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
@@ -4,7 +4,7 @@ import { type HygieneReviewFilters, type HygieneReviewReport } from "../maintena
4
4
  import { type ExperienceExportDraftFilters, type ExperienceExportDraftReport } from "../maintenance/experience-export-drafts.js";
5
5
  import { type OperatorReviewReport } from "../maintenance/operator-review-flow.js";
6
6
  import { type HybridRouteDecision } from "../hybrid/router.js";
7
- import type { CandidateLifecycleState, DistillationSource, DistillationJobState, EvaluationMode, ExperienceInputRecord, FeedbackAttributionReason, AttributionRecord, EpisodeProjection, InjectionEvent, InjectionScorecard, ExperienceNode, ExperienceNodeType, ExperienceState, TaskRun } from "../types/domain.js";
7
+ import type { CandidateLifecycleState, DistillationSource, DistillationJobState, EvaluationMode, ExperienceInputRecord, FeedbackAttributionReason, AttributionRecord, EpisodeProjection, InjectionEvent, InjectionScorecard, ExperienceNode, ExperienceNodeType, ExperienceState, TaskRun, DeliveryState } from "../types/domain.js";
8
8
  import { type ExperienceRepoSummary } from "./repo-summary.js";
9
9
  import { type RetrievalPolicyInspectionSummary } from "./retrieval-policy-inspection.js";
10
10
  import { type ExperienceQualityBandExplanation } from "./quality-band.js";
@@ -51,6 +51,16 @@ export type ExperienceNodeDetail = ExperienceNodeSummary & {
51
51
  originRecordIds: string[];
52
52
  helpedRecordIds: string[];
53
53
  harmedRecordIds: string[];
54
+ deliveryState?: DeliveryState;
55
+ migrationStatus?: "current" | "pending" | "migrating" | "failed";
56
+ sourceFingerprintHash?: string;
57
+ portableValidationEvidence?: ExperienceNode["portable_validation_evidence"];
58
+ quarantineLeaseExpiresAt?: string;
59
+ quarantineOriginalDeliveryState?: DeliveryState;
60
+ quarantineReleaseAttemptCount?: number;
61
+ quarantineLastReleaseAttemptAt?: string;
62
+ quarantineReleaseReason?: string;
63
+ quarantineNoHarmPassCount?: number;
54
64
  };
55
65
  export type ExperienceTimelineEntry = {
56
66
  kind: "decision" | "outcome" | "feedback";
@@ -200,6 +210,7 @@ export declare const deriveStructuredSilenceReason: (input: {
200
210
  readiness: ExperienceFirstValueReadiness;
201
211
  }) => ExperienceSilenceReason;
202
212
  export declare class ExperienceInteractionService {
213
+ private readonly db;
203
214
  private readonly config;
204
215
  private readonly hybridWorkerClient;
205
216
  private readonly inputRepo;
@@ -216,6 +227,43 @@ export declare class ExperienceInteractionService {
216
227
  private readonly reviewEventRepo;
217
228
  private readonly scopeRepo;
218
229
  constructor(config: ExperienceEngineConfig);
230
+ private inspectGovernanceForReview;
231
+ inspectGovernance(cwd?: string): {
232
+ scopeId: string;
233
+ status: "clear" | "attention";
234
+ recentAutomaticActions: number;
235
+ failedRuns: number;
236
+ pendingApprovals: number;
237
+ lastRunStatus?: string;
238
+ lastFailureClass?: string;
239
+ recentRuns: Array<{
240
+ runId: string;
241
+ trigger: string;
242
+ status: string;
243
+ failureClass?: string;
244
+ updatedAt: string;
245
+ }>;
246
+ recentActions: Array<{
247
+ actionId: string;
248
+ planId?: string;
249
+ actionType: string;
250
+ status: string;
251
+ rollbackRef?: string;
252
+ updatedAt: string;
253
+ }>;
254
+ };
255
+ inspectGovernancePendingApprovals(cwd?: string): {
256
+ scopeId: string;
257
+ approvals: Array<{
258
+ approvalId: string;
259
+ actionId: string;
260
+ planId?: string;
261
+ status: string;
262
+ diffSummary?: string;
263
+ createdAt: string;
264
+ updatedAt: string;
265
+ }>;
266
+ };
219
267
  private deriveOriginProfile;
220
268
  decideExplainRoute(userMessage: string): HybridRouteDecision;
221
269
  explainLastDecision(cwd?: string, userMessage?: string): Promise<string>;
@@ -66,6 +66,13 @@ const classifyLearningRejectionReason = (reason) => {
66
66
  }
67
67
  return "other";
68
68
  };
69
+ const HEARTBEAT_NOOP_PATTERN = /\bHEARTBEAT\.md\b|\bHEARTBEAT_OK\b|Read HEARTBEAT\.md if it exists/i;
70
+ const AUDIT_WINDOW_OVERSAMPLE_FACTOR = 5;
71
+ const AUDIT_WINDOW_MIN_OVERSAMPLE = 100;
72
+ const isHeartbeatNoopSummary = (value) => Boolean(value && HEARTBEAT_NOOP_PATTERN.test(value));
73
+ const isAuditNoopTaskRun = (run) => isHeartbeatNoopSummary(run.task_summary) || isHeartbeatNoopSummary(run.context_summary);
74
+ const isAuditNoopInputRecord = (record) => isHeartbeatNoopSummary(record.task_summary) || isHeartbeatNoopSummary(record.context_summary);
75
+ const auditWindowFetchLimit = (limit) => Math.max(limit, Math.min(Math.max(limit * AUDIT_WINDOW_OVERSAMPLE_FACTOR, AUDIT_WINDOW_MIN_OVERSAMPLE), 500));
69
76
  export const isExplicitHybridExplanationRequest = (userMessage) => {
70
77
  const message = normalizeHybridExplainPrompt(userMessage);
71
78
  const mentionsEe = message.includes("experienceengine")
@@ -212,7 +219,17 @@ const toNodeDetail = (node) => ({
212
219
  recommendedSteps: node.recommended_steps ?? [],
213
220
  originRecordIds: node.origin_record_ids,
214
221
  helpedRecordIds: node.helped_record_ids,
215
- harmedRecordIds: node.harmed_record_ids
222
+ harmedRecordIds: node.harmed_record_ids,
223
+ deliveryState: node.delivery_state,
224
+ migrationStatus: node.migration_status,
225
+ sourceFingerprintHash: node.source_fingerprint_hash,
226
+ portableValidationEvidence: node.portable_validation_evidence,
227
+ quarantineLeaseExpiresAt: node.quarantine_lease_expires_at,
228
+ quarantineOriginalDeliveryState: node.quarantine_original_delivery_state,
229
+ quarantineReleaseAttemptCount: node.quarantine_release_attempt_count,
230
+ quarantineLastReleaseAttemptAt: node.quarantine_last_release_attempt_at,
231
+ quarantineReleaseReason: node.quarantine_release_reason,
232
+ quarantineNoHarmPassCount: node.quarantine_no_harm_pass_count
216
233
  });
217
234
  const summarizeAutomaticFeedback = (events) => {
218
235
  const automatic = events.filter((event) => event.source === "automatic");
@@ -384,6 +401,7 @@ const buildRetrievalNotes = (scorecard) => {
384
401
  return notes;
385
402
  };
386
403
  export class ExperienceInteractionService {
404
+ db;
387
405
  config;
388
406
  hybridWorkerClient;
389
407
  inputRepo;
@@ -403,6 +421,7 @@ export class ExperienceInteractionService {
403
421
  this.config = config;
404
422
  const db = openDatabase(config);
405
423
  bootstrapDatabase(db);
424
+ this.db = db;
406
425
  this.inputRepo = new InputRecordRepository(db);
407
426
  this.injectionRepo = new InjectionRepository(db);
408
427
  this.attributionRecordRepo = new AttributionRecordRepository(db);
@@ -421,6 +440,102 @@ export class ExperienceInteractionService {
421
440
  explainDecisionLlmEnabled: config.hybridEnabled && config.hybridSyncExplainEnabled && config.hybridExplainLlmEnabled
422
441
  });
423
442
  }
443
+ inspectGovernanceForReview(scopeId) {
444
+ const latestRun = this.db
445
+ .prepare(`SELECT status, failure_class
446
+ FROM hygiene_governance_runs
447
+ WHERE scope_id = ?
448
+ ORDER BY updated_at DESC
449
+ LIMIT 1`)
450
+ .get(scopeId);
451
+ const failedRuns = this.db
452
+ .prepare("SELECT COUNT(*) AS count FROM hygiene_governance_runs WHERE scope_id = ? AND status = 'failed'")
453
+ .get(scopeId);
454
+ const recentAutomaticActions = this.db
455
+ .prepare("SELECT COUNT(*) AS count FROM hygiene_governance_actions WHERE scope_id = ? AND status = 'applied'")
456
+ .get(scopeId);
457
+ const pendingApprovals = this.db
458
+ .prepare("SELECT COUNT(*) AS count FROM hygiene_governance_approvals WHERE scope_id = ? AND status = 'pending'")
459
+ .get(scopeId);
460
+ const status = failedRuns.count > 0 || pendingApprovals.count > 0 ? "attention" : "clear";
461
+ return {
462
+ status,
463
+ recentAutomaticActions: recentAutomaticActions.count,
464
+ failedRuns: failedRuns.count,
465
+ pendingApprovals: pendingApprovals.count,
466
+ lastRunStatus: latestRun?.status,
467
+ lastFailureClass: latestRun?.failure_class ?? undefined,
468
+ drillDown: {
469
+ cli: "ee inspect governance",
470
+ mcpResource: "experienceengine://governance",
471
+ brokerAction: "inspect_governance"
472
+ }
473
+ };
474
+ }
475
+ inspectGovernance(cwd = process.cwd()) {
476
+ const scopeId = resolveScope(cwd).scope_id;
477
+ const summary = this.inspectGovernanceForReview(scopeId);
478
+ const recentRuns = this.db
479
+ .prepare(`SELECT run_id, trigger, status, failure_class, updated_at
480
+ FROM hygiene_governance_runs
481
+ WHERE scope_id = ?
482
+ ORDER BY updated_at DESC
483
+ LIMIT 5`)
484
+ .all(scopeId);
485
+ const recentActions = this.db
486
+ .prepare(`SELECT action_id, plan_id, action_type, status, before_snapshot_id, rollback_of_action_id, updated_at
487
+ FROM hygiene_governance_actions
488
+ WHERE scope_id = ?
489
+ ORDER BY updated_at DESC
490
+ LIMIT 5`)
491
+ .all(scopeId);
492
+ return {
493
+ scopeId,
494
+ status: summary.status,
495
+ recentAutomaticActions: summary.recentAutomaticActions,
496
+ failedRuns: summary.failedRuns,
497
+ pendingApprovals: summary.pendingApprovals,
498
+ lastRunStatus: summary.lastRunStatus,
499
+ lastFailureClass: summary.lastFailureClass,
500
+ recentRuns: recentRuns.map((run) => ({
501
+ runId: run.run_id,
502
+ trigger: run.trigger,
503
+ status: run.status,
504
+ failureClass: run.failure_class ?? undefined,
505
+ updatedAt: run.updated_at
506
+ })),
507
+ recentActions: recentActions.map((action) => ({
508
+ actionId: action.action_id,
509
+ planId: action.plan_id ?? undefined,
510
+ actionType: action.action_type,
511
+ status: action.status,
512
+ rollbackRef: action.rollback_of_action_id ?? action.before_snapshot_id ?? undefined,
513
+ updatedAt: action.updated_at
514
+ }))
515
+ };
516
+ }
517
+ inspectGovernancePendingApprovals(cwd = process.cwd()) {
518
+ const scopeId = resolveScope(cwd).scope_id;
519
+ const approvals = this.db
520
+ .prepare(`SELECT approval_id, action_id, plan_id, status, diff_summary, created_at, updated_at
521
+ FROM hygiene_governance_approvals
522
+ WHERE scope_id = ? AND status = 'pending'
523
+ ORDER BY created_at DESC
524
+ LIMIT 20`)
525
+ .all(scopeId);
526
+ return {
527
+ scopeId,
528
+ approvals: approvals.map((approval) => ({
529
+ approvalId: approval.approval_id,
530
+ actionId: approval.action_id,
531
+ planId: approval.plan_id ?? undefined,
532
+ status: approval.status,
533
+ diffSummary: approval.diff_summary ?? undefined,
534
+ createdAt: approval.created_at,
535
+ updatedAt: approval.updated_at
536
+ }))
537
+ };
538
+ }
424
539
  deriveOriginProfile(node) {
425
540
  return deriveNodeOriginProfileForNode(this.inputRepo, node);
426
541
  }
@@ -802,6 +917,7 @@ export class ExperienceInteractionService {
802
917
  repo,
803
918
  hygiene,
804
919
  exportDrafts,
920
+ governance: this.inspectGovernanceForReview(scopeId),
805
921
  limit
806
922
  });
807
923
  }
@@ -920,7 +1036,10 @@ export class ExperienceInteractionService {
920
1036
  }
921
1037
  inspectDecisionHealth(cwd = process.cwd(), limit = 10) {
922
1038
  const scope = resolveScope(cwd);
923
- const recentRecords = this.inputRepo.listRecentByScope(scope.scope_id, limit);
1039
+ const recentRecords = this.inputRepo
1040
+ .listRecentByScope(scope.scope_id, auditWindowFetchLimit(limit))
1041
+ .filter((record) => !isAuditNoopInputRecord(record))
1042
+ .slice(0, limit);
924
1043
  let recentInjects = 0;
925
1044
  let recentConservativeInjects = 0;
926
1045
  let recentSkips = 0;
@@ -1008,7 +1127,10 @@ export class ExperienceInteractionService {
1008
1127
  }
1009
1128
  inspectLearningQualityHealth(cwd = process.cwd(), limit = 50) {
1010
1129
  const scope = resolveScope(cwd);
1011
- const recentTaskRuns = this.taskRunRepo.listRecentByScope(scope.scope_id, limit);
1130
+ const recentTaskRuns = this.taskRunRepo
1131
+ .listRecentByScope(scope.scope_id, auditWindowFetchLimit(limit))
1132
+ .filter((run) => !isAuditNoopTaskRun(run))
1133
+ .slice(0, limit);
1012
1134
  const capturedRuns = recentTaskRuns.filter((run) => run.learning_status === "captured").length;
1013
1135
  const rejectedRuns = recentTaskRuns.filter((run) => run.learning_status === "rejected").length;
1014
1136
  const notApplicableRuns = recentTaskRuns.filter((run) => run.learning_status === "not_applicable").length;