@rulemetric/cli 0.17.0 → 0.17.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (270) hide show
  1. package/dist/base-command.js +1 -1
  2. package/dist/{chunk-GGUXEZC3.js → chunk-274MXEKI.js} +1 -1
  3. package/dist/{chunk-EFEPD4AZ.js → chunk-2C7CFCMM.js} +1 -1
  4. package/dist/{chunk-KEVDLLHT.js → chunk-3EZZGA72.js} +1 -1
  5. package/dist/{chunk-F5GSKVF2.js → chunk-3ZHBOILE.js} +1 -1
  6. package/dist/chunk-43TRZXJP.js +1 -0
  7. package/dist/{chunk-KR36ZDGN.js → chunk-4GM4OEQY.js} +1 -1
  8. package/dist/chunk-4LVSD2XZ.js +2 -0
  9. package/dist/{chunk-T7HZZ4DJ.js → chunk-55HFAX5Y.js} +1 -1
  10. package/dist/{chunk-WL5ZWQAS.js → chunk-5LTJNYCP.js} +1 -1
  11. package/dist/{chunk-5TM7AOH2.js → chunk-5U5SHJJA.js} +1 -1
  12. package/dist/chunk-5VWVQCNR.js +1 -0
  13. package/dist/{chunk-UVCVJKEN.js → chunk-7J7H7YFQ.js} +1 -1
  14. package/dist/{chunk-7LE2W3WP.js → chunk-7N55TWYQ.js} +1 -1
  15. package/dist/{chunk-GLBWNB2N.js → chunk-A2JFQUDW.js} +1 -1
  16. package/dist/{chunk-FZMO7XSN.js → chunk-A6XQSO62.js} +1 -1
  17. package/dist/chunk-ANLPPIMS.js +3 -0
  18. package/dist/{chunk-CVPAKEEZ.js → chunk-AZRGURHR.js} +1 -1
  19. package/dist/{chunk-FXQS7AEZ.js → chunk-AZWY2DOT.js} +1 -1
  20. package/dist/{chunk-Q7IDLOSP.js → chunk-BCPIY47G.js} +1 -1
  21. package/dist/chunk-BDWQ6J4V.js +1 -0
  22. package/dist/chunk-BOYWPUV2.js +12 -0
  23. package/dist/{chunk-STUNT4N3.js → chunk-BQVUZ6VE.js} +1 -1
  24. package/dist/{chunk-6QMIDH6X.js → chunk-BV3JMD3A.js} +1 -1
  25. package/dist/{chunk-DANMUHNW.js → chunk-C3XWDYZJ.js} +1 -1
  26. package/dist/{chunk-ISYU5BMU.js → chunk-CAQLSYOK.js} +1 -1
  27. package/dist/chunk-D7L7IMJQ.js +1 -0
  28. package/dist/{chunk-65LFPUDB.js → chunk-DOEPIICK.js} +1 -1
  29. package/dist/{chunk-ZKPURXUS.js → chunk-DZRBB34J.js} +1 -1
  30. package/dist/{chunk-PJ4RIUI3.js → chunk-EKTNI6RV.js} +1 -1
  31. package/dist/{chunk-ZBTJ5R7C.js → chunk-ENW5SUQJ.js} +1 -1
  32. package/dist/{chunk-TSLBCZ5P.js → chunk-FD53AP7T.js} +1 -1
  33. package/dist/chunk-FLXWL4F4.js +8 -0
  34. package/dist/{chunk-TQM7MF5C.js → chunk-FTCC4OZ4.js} +1 -1
  35. package/dist/{chunk-5CVP5NFH.js → chunk-GBSIOACS.js} +1 -1
  36. package/dist/{chunk-VUNJGZPP.js → chunk-GQYF2WVE.js} +1 -1
  37. package/dist/chunk-GWQ24FQP.js +9 -0
  38. package/dist/{chunk-WL34G6IR.js → chunk-H4VIQHBV.js} +1 -1
  39. package/dist/{chunk-LJE5J3EW.js → chunk-HBJMELKB.js} +1 -1
  40. package/dist/{chunk-BDQTVYYF.js → chunk-HNPC5U3C.js} +1 -1
  41. package/dist/{chunk-KGU2IW54.js → chunk-ICLAHFKK.js} +1 -1
  42. package/dist/{chunk-AKCCNLHL.js → chunk-IPNBW7ZW.js} +1 -1
  43. package/dist/{chunk-QPVUGTDP.js → chunk-JCZOEIL7.js} +1 -1
  44. package/dist/chunk-JGJU4JX5.js +1 -0
  45. package/dist/{chunk-ISEUEYSC.js → chunk-KR32Y5Q5.js} +1 -1
  46. package/dist/chunk-LARY6ZFT.js +1 -0
  47. package/dist/chunk-LELSVLNK.js +1 -0
  48. package/dist/chunk-LZPE6424.js +5 -0
  49. package/dist/chunk-MHLHLJ5T.js +48 -0
  50. package/dist/{chunk-7YZURVZD.js → chunk-MJLW5KN2.js} +1 -1
  51. package/dist/{chunk-USKRCVX3.js → chunk-N2PUNIWM.js} +1 -1
  52. package/dist/chunk-NLUHMHPM.js +1 -0
  53. package/dist/{chunk-NWV66NMA.js → chunk-NMCQ7JZZ.js} +1 -1
  54. package/dist/{chunk-QPAOX7P2.js → chunk-NSO2EBYE.js} +1 -1
  55. package/dist/{chunk-IMN4BWAR.js → chunk-OWXGXKK7.js} +1 -1
  56. package/dist/{chunk-5A6TMSRO.js → chunk-QJZ4DMVQ.js} +1 -1
  57. package/dist/{chunk-GIQ2HK3W.js → chunk-QRKMRG6W.js} +1 -1
  58. package/dist/chunk-RQBN7WNS.js +28 -0
  59. package/dist/{chunk-QXPGTEMO.js → chunk-RRBFKVCI.js} +1 -1
  60. package/dist/{chunk-4ZDE63UG.js → chunk-RWQG25JU.js} +1 -1
  61. package/dist/chunk-SVZYRGO5.js +4 -0
  62. package/dist/{chunk-EMZFZCS4.js → chunk-TBLUJ6AW.js} +1 -1
  63. package/dist/{chunk-PDXHRF4E.js → chunk-TL57YUJV.js} +1 -1
  64. package/dist/{chunk-WUCACPGC.js → chunk-TQFHRD5B.js} +1 -1
  65. package/dist/{chunk-FG343JM3.js → chunk-U6AASXY3.js} +1 -1
  66. package/dist/{chunk-FADINV4H.js → chunk-UGA2NFRG.js} +1 -1
  67. package/dist/{chunk-YXMAGC53.js → chunk-ULFSGFT2.js} +1 -1
  68. package/dist/{chunk-SFZPFNC6.js → chunk-UROUVE3D.js} +1 -1
  69. package/dist/chunk-URUHD4OI.js +2 -0
  70. package/dist/chunk-VCWT5KZL.js +8 -0
  71. package/dist/{chunk-HBDKOU2N.js → chunk-VNGJRYBD.js} +7 -6
  72. package/dist/chunk-VZYNZS5U.js +1 -0
  73. package/dist/{chunk-RDQXK5LG.js → chunk-WLLIFRRE.js} +1 -1
  74. package/dist/{chunk-E4CIJ67Z.js → chunk-WSUKOU3X.js} +1 -1
  75. package/dist/chunk-WULEBQPI.js +1 -0
  76. package/dist/{chunk-DX6IPDED.js → chunk-XAGNGQL3.js} +1 -1
  77. package/dist/{chunk-MYGVN6X4.js → chunk-XCN2YPWI.js} +1 -1
  78. package/dist/chunk-YGFZ6BLU.js +15 -0
  79. package/dist/{chunk-QNSIBPWG.js → chunk-YLEXR62G.js} +1 -1
  80. package/dist/{chunk-3H44B6PB.js → chunk-YT25HLWB.js} +1 -1
  81. package/dist/chunk-ZJABRHIP.js +1 -0
  82. package/dist/commands/antigravity/backfill.js +1 -1
  83. package/dist/commands/auth/create-key.js +1 -1
  84. package/dist/commands/auth/login.js +1 -1
  85. package/dist/commands/auth/logout.js +1 -1
  86. package/dist/commands/auth/revoke-key.js +1 -1
  87. package/dist/commands/auth/signup.js +1 -1
  88. package/dist/commands/auth/status.js +1 -1
  89. package/dist/commands/capture/scope.js +1 -1
  90. package/dist/commands/catalog/index.js +1 -1
  91. package/dist/commands/catalog/recommend.js +1 -1
  92. package/dist/commands/crons/list.js +1 -1
  93. package/dist/commands/crons/run.js +1 -1
  94. package/dist/commands/dashboard.js +1 -1
  95. package/dist/commands/diagnostics.js +1 -1
  96. package/dist/commands/eval-targets/create.js +1 -1
  97. package/dist/commands/eval-targets/list.js +1 -1
  98. package/dist/commands/evals/agent.js +1 -1
  99. package/dist/commands/evals/auto-run.js +1 -1
  100. package/dist/commands/evals/benchmark.js +1 -1
  101. package/dist/commands/evals/compare.js +1 -1
  102. package/dist/commands/evals/create.js +1 -1
  103. package/dist/commands/evals/optimize-description.js +1 -1
  104. package/dist/commands/evals/optimize.js +1 -1
  105. package/dist/commands/evals/refine-cases.js +1 -1
  106. package/dist/commands/evals/run.js +1 -1
  107. package/dist/commands/evals/validate-judge.js +1 -1
  108. package/dist/commands/experiments/list.js +1 -1
  109. package/dist/commands/gateway/ensure.js +1 -1
  110. package/dist/commands/hooks/install.js +1 -1
  111. package/dist/commands/hooks/run.js +1 -1
  112. package/dist/commands/hooks/uninstall.js +1 -1
  113. package/dist/commands/instructions/create.js +1 -1
  114. package/dist/commands/instructions/dedupe.js +1 -1
  115. package/dist/commands/instructions/delete.js +1 -1
  116. package/dist/commands/instructions/fork.js +1 -1
  117. package/dist/commands/instructions/get.js +1 -1
  118. package/dist/commands/instructions/list.js +1 -1
  119. package/dist/commands/instructions/promote.js +1 -1
  120. package/dist/commands/instructions/pull.js +1 -1
  121. package/dist/commands/instructions/restore.js +1 -1
  122. package/dist/commands/instructions/retract.js +1 -1
  123. package/dist/commands/instructions/upstream.js +1 -1
  124. package/dist/commands/instructions/versions.js +1 -1
  125. package/dist/commands/launcher.js +1 -1
  126. package/dist/commands/local/down.js +1 -1
  127. package/dist/commands/local/up.js +1 -1
  128. package/dist/commands/org/current.js +1 -1
  129. package/dist/commands/org/list.js +1 -1
  130. package/dist/commands/org/switch.js +1 -1
  131. package/dist/commands/packs/add-instruction.js +1 -1
  132. package/dist/commands/packs/apply.js +1 -1
  133. package/dist/commands/packs/create.js +1 -1
  134. package/dist/commands/packs/fork.js +1 -1
  135. package/dist/commands/packs/get.js +1 -1
  136. package/dist/commands/packs/list.js +1 -1
  137. package/dist/commands/packs/remove-instruction.js +1 -1
  138. package/dist/commands/proxy/env.js +1 -1
  139. package/dist/commands/proxy/logs.js +1 -1
  140. package/dist/commands/proxy/restart.js +1 -1
  141. package/dist/commands/proxy/setup.js +1 -1
  142. package/dist/commands/proxy/start.js +1 -1
  143. package/dist/commands/proxy/status.js +1 -1
  144. package/dist/commands/proxy/stop.js +1 -1
  145. package/dist/commands/research/backfill.js +1 -1
  146. package/dist/commands/research/resume-scoped-outcomes.js +1 -1
  147. package/dist/commands/research/tail-transcript.js +1 -1
  148. package/dist/commands/service/install.js +1 -1
  149. package/dist/commands/service/status.js +1 -1
  150. package/dist/commands/service/uninstall.js +1 -1
  151. package/dist/commands/sessions/analyze.js +1 -1
  152. package/dist/commands/sessions/delete.js +1 -1
  153. package/dist/commands/sessions/end.js +1 -1
  154. package/dist/commands/sessions/import.js +1 -1
  155. package/dist/commands/sessions/list.js +1 -1
  156. package/dist/commands/sessions/start.js +1 -1
  157. package/dist/commands/setup.js +1 -1
  158. package/dist/commands/skills/export-approved.js +1 -1
  159. package/dist/commands/skills/install.js +1 -1
  160. package/dist/commands/skills/list.js +1 -1
  161. package/dist/commands/skills/publish.js +1 -1
  162. package/dist/commands/skills/search.js +1 -1
  163. package/dist/commands/skills/update.js +1 -1
  164. package/dist/commands/suggestions/accept.js +1 -1
  165. package/dist/commands/suggestions/auto.js +1 -1
  166. package/dist/commands/suggestions/dismiss.js +1 -1
  167. package/dist/commands/suggestions/list.js +1 -1
  168. package/dist/commands/suggestions/refresh.js +1 -1
  169. package/dist/commands/suggestions/undo.js +1 -1
  170. package/dist/dashboard/Dashboard.js +1 -1
  171. package/dist/dashboard/data.js +1 -1
  172. package/dist/dashboard/launcher/LauncherOverlay.js +1 -1
  173. package/dist/dashboard/launcher/api.js +1 -1
  174. package/dist/dashboard/launcher/useLaunchJobs.js +1 -1
  175. package/dist/dashboard/panels/measurement.js +1 -1
  176. package/dist/dist-ZJY72TUD.js +1 -0
  177. package/dist/lib/active-org-refresh.js +1 -1
  178. package/dist/lib/actor-env.js +1 -0
  179. package/dist/lib/agent-loop.js +1 -1
  180. package/dist/lib/agent-presence.js +1 -1
  181. package/dist/lib/antigravity-transcript.js +1 -1
  182. package/dist/lib/api-client.js +1 -1
  183. package/dist/lib/codex-exec.js +1 -1
  184. package/dist/lib/ensure-api-key.js +1 -1
  185. package/dist/lib/ensure-fresh-token.js +1 -1
  186. package/dist/lib/eval-analyzer.js +1 -1
  187. package/dist/lib/eval-benchmark.js +1 -1
  188. package/dist/lib/eval-candidate-run.js +1 -1
  189. package/dist/lib/eval-case-generator.js +1 -1
  190. package/dist/lib/eval-conversation-handler.js +1 -1
  191. package/dist/lib/eval-executor.js +1 -1
  192. package/dist/lib/eval-grader.js +1 -1
  193. package/dist/lib/eval-meta-judge.js +1 -1
  194. package/dist/lib/eval-resume.js +1 -1
  195. package/dist/lib/eval-run-batch.js +1 -1
  196. package/dist/lib/eval-trigger-tester.js +1 -1
  197. package/dist/lib/evolution-enrolment.js +1 -1
  198. package/dist/lib/insights/generation/installed-asks.js +1 -1
  199. package/dist/lib/insights/generation/project-evidence.js +1 -1
  200. package/dist/lib/insights/generation/quality-review.js +1 -0
  201. package/dist/lib/insights/nomination/nominate.js +1 -1
  202. package/dist/lib/instruction-proposer.js +1 -1
  203. package/dist/lib/instruction-restoration.js +1 -1
  204. package/dist/lib/instructions/acceptance/accept-events.js +1 -1
  205. package/dist/lib/instructions/acceptance/accept-hook.js +1 -1
  206. package/dist/lib/instructions/acceptance/hook-install.js +1 -1
  207. package/dist/lib/instructions/acceptance/reverse-applications.js +1 -1
  208. package/dist/lib/instructions/acceptance/suggestion-accept.js +1 -1
  209. package/dist/lib/jobs/handlers/cron-auto-accept-suggestions.js +1 -1
  210. package/dist/lib/jobs/handlers/cron-eval-autorun.js +1 -1
  211. package/dist/lib/jobs/handlers/cron-instruction-evolution.js +1 -1
  212. package/dist/lib/jobs/handlers/cron-instruction-training.js +1 -1
  213. package/dist/lib/jobs/handlers/cron-reconcile-attribution.js +1 -1
  214. package/dist/lib/jobs/handlers/cron-refine-cases.js +1 -1
  215. package/dist/lib/jobs/handlers/cron-refresh-pricing.js +1 -1
  216. package/dist/lib/jobs/handlers/cron-retire-unused-skills.js +1 -1
  217. package/dist/lib/jobs/handlers/cron-suggest-instructions.js +1 -1
  218. package/dist/lib/jobs/handlers/distill-memories.js +1 -1
  219. package/dist/lib/jobs/handlers/finalize-scoped-launch.js +1 -1
  220. package/dist/lib/jobs/handlers/harbor-ab.js +1 -1
  221. package/dist/lib/jobs/handlers/prepare-suggestion-live.js +1 -1
  222. package/dist/lib/jobs/handlers/process-changelog.js +1 -1
  223. package/dist/lib/jobs/handlers/process-conversation.js +1 -1
  224. package/dist/lib/jobs/handlers/process-eval.js +1 -1
  225. package/dist/lib/jobs/handlers/process-insights.js +1 -1
  226. package/dist/lib/jobs/handlers/process-judge-review.js +1 -1
  227. package/dist/lib/jobs/handlers/process-launch.js +1 -1
  228. package/dist/lib/jobs/handlers/process-memory-ab.js +1 -1
  229. package/dist/lib/jobs/handlers/process-run-cleanup.js +1 -1
  230. package/dist/lib/jobs/handlers/process-session-goal.js +1 -1
  231. package/dist/lib/jobs/handlers/process-suggestion-adoption.js +1 -0
  232. package/dist/lib/jobs/handlers/process-suggestion-eval.js +1 -1
  233. package/dist/lib/jobs/shed-retry.js +1 -1
  234. package/dist/lib/judge-review-runner.js +1 -1
  235. package/dist/lib/llm-client.js +1 -1
  236. package/dist/lib/manual-tasks.js +1 -1
  237. package/dist/lib/measurement-llm.js +1 -1
  238. package/dist/lib/projects/workspace/eval-workspace.js +1 -1
  239. package/dist/lib/projects/workspace/worktree.js +1 -1
  240. package/dist/lib/refine-cases.js +1 -1
  241. package/dist/lib/repository-capabilities.js +1 -0
  242. package/dist/lib/research-client.js +1 -1
  243. package/dist/lib/retraction.js +1 -1
  244. package/dist/lib/setup-steps.js +1 -1
  245. package/dist/lib/telemetry.js +1 -1
  246. package/dist/lib/terminal-target-heartbeat.js +1 -1
  247. package/dist/lib/transcript-sync.js +1 -1
  248. package/dist/lib/work-report.js +1 -1
  249. package/oclif.manifest.json +1 -1
  250. package/package.json +6 -6
  251. package/dist/chunk-2PO5I3XR.js +0 -1
  252. package/dist/chunk-3MYCWZ63.js +0 -1
  253. package/dist/chunk-4GOXEEXZ.js +0 -1
  254. package/dist/chunk-CDSSOOIG.js +0 -1
  255. package/dist/chunk-CPDW7WW2.js +0 -28
  256. package/dist/chunk-CQD2R3BA.js +0 -3
  257. package/dist/chunk-DHIEGG4T.js +0 -9
  258. package/dist/chunk-FCALFMZV.js +0 -1
  259. package/dist/chunk-FHRBW4AQ.js +0 -12
  260. package/dist/chunk-GIXHG5FK.js +0 -1
  261. package/dist/chunk-HTAHNQZJ.js +0 -1
  262. package/dist/chunk-J4W6GNCF.js +0 -2
  263. package/dist/chunk-JNLDISBA.js +0 -4
  264. package/dist/chunk-KE5K3F7J.js +0 -1
  265. package/dist/chunk-KOORMTZO.js +0 -15
  266. package/dist/chunk-KUW6AVSI.js +0 -1
  267. package/dist/chunk-SWSOEYC7.js +0 -1
  268. package/dist/chunk-X6CF5KTW.js +0 -48
  269. package/dist/chunk-ZLBYYLJZ.js +0 -3
  270. package/dist/dist-5647V2E7.js +0 -1
@@ -1 +0,0 @@
1
- import{f as u}from"./chunk-GIXHG5FK.js";import{a as m}from"./chunk-ZLLER3HP.js";async function p(n,a,s){if(a)try{let t=Array.isArray(n.recommendation_candidates)?n.recommendation_candidates.filter(e=>typeof e.title=="string"&&typeof e.artifact=="string"&&typeof e.canonicalBody=="string"&&e.canonicalBody.trim().length>=12).map(e=>({title:String(e.title).trim(),artifact:String(e.artifact),canonicalBody:String(e.canonicalBody).trim(),rationale:String(e.rationale??""),evidence:Array.isArray(e.evidence)?e.evidence:[],outcomeMetric:String(e.outcomeMetric??"session_outcome"),renderings:Array.isArray(e.renderings)?e.renderings:[]})):[],i=n.suggestions,l=Array.isArray(i?.claude_md_additions)?i.claude_md_additions.filter(e=>typeof e?.addition=="string"&&e.addition.trim().length>=12).map(e=>({addition:String(e.addition).trim(),why:String(e.why??"")})):[],d=Array.isArray(n.recommended_skills)?n.recommended_skills.filter(e=>typeof e?.skillId=="string"&&e.skillId.length>0).map(e=>({skillId:String(e.skillId),reason:String(e.reason??"")})):[],g=Array.isArray(i?.features_to_try)?i.features_to_try.filter(e=>typeof e?.feature=="string"&&e.feature.trim().length>=2).map(e=>({feature:String(e.feature).trim(),one_liner:String(e.one_liner??""),why_for_you:String(e.why_for_you??""),example_code:String(e.example_code??"")})):[],c=[...Array.isArray(i?.usage_patterns)?i.usage_patterns.map(e=>({title:String(e.title??"").trim(),lead:String(e.suggestion??""),detail:String(e.detail??""),copyable_prompt:String(e.copyable_prompt??""),origin:"usage_pattern"})):[],...Array.isArray(n.on_the_horizon?.opportunities)?n.on_the_horizon.opportunities.map(e=>({title:String(e.title??"").trim(),lead:String(e.whats_possible??""),detail:String(e.how_to_try??""),copyable_prompt:String(e.copyable_prompt??""),origin:"opportunity"})):[]].filter(e=>e.title.length>=2);if(t.length===0&&l.length===0&&d.length===0&&g.length===0&&c.length===0)return;let r=await u("/api/insights/recommendations/nominate",{projectPath:a,candidates:t.slice(0,40),additions:l.slice(0,20),skills:d.slice(0,20),features:g.slice(0,20),advice:c.slice(0,40)}),o=r.additionsRejected??[];s(` ${r.nominated} recommendation(s) nominated into the suggestion feed (${r.additionsCreated} new instruction(s)`+((r.featuresCreated??0)>0?`, ${r.featuresCreated} feature proposal(s)`:"")+((r.adviceCreated??0)>0?`, ${r.adviceCreated} pattern/opportunity`:"")+(r.skillsUnresolved>0?`, ${r.skillsUnresolved} skill slug(s) unresolved`:"")+(o.length>0?`, ${o.length} rejected as unfilled templates`:"")+")");for(let e of o)s(` rejected "${e.name}" \u2014 unfilled placeholder(s): ${e.placeholders.join(", ")}`);for(let e of r.itemsFailed??[])s(` failed "${e.name}" \u2014 ${e.error}`)}catch(t){s(` nomination skipped (whole batch): ${t instanceof Error?t.message:String(t)}`)}}m(p,"nominateRecommendations");export{p as a};
@@ -1,15 +0,0 @@
1
- import{a as M}from"./chunk-5RBLIVBF.js";import{c as q}from"./chunk-GLBWNB2N.js";import{a as K,b as Y}from"./chunk-CQD2R3BA.js";import{a as A,d as N}from"./chunk-3UKZJAFS.js";import{a as j,b as k,c as V,d as D}from"./chunk-77FH6UZP.js";import{a as Z}from"./chunk-KE5K3F7J.js";import{b as W,e as B,g as T}from"./chunk-DHIEGG4T.js";import{e as h,f as U,h as m}from"./chunk-GIXHG5FK.js";import{a as L,b as H}from"./chunk-X6CF5KTW.js";import{a as f}from"./chunk-ZLLER3HP.js";var Q=f((l,{limit:a,sort:n,eventTypes:s})=>h(`/api/sessions/${l}/events?limit=${a}&sort=${n}&eventType=${encodeURIComponent(s.join(","))}&hasContent=true`),"fetchTranscriptTurns");async function ms(l,a){let{mirrorId:n,projectPath:s,projectId:r,config:u}=l,e=f(t=>a.logger.info(t),"log");if(u?.sessionId)return es({mirrorId:n,sessionId:u.sessionId},e);e(`Processing insights job ${n}...`),await m(`/api/insights-jobs/${n}/progress`,{status:"running",progress:{step:"reading_data"}});try{let{repaired:t}=await U("/api/sessions/repair-analyzed-at",{});t>0&&e(` Repaired analyzed_at on ${t} orphan session(s).`)}catch(t){e(` Warning: analyzed_at repair failed: ${t instanceof Error?t.message:String(t)}`)}let p=20,C=200,z=15*6e4,F=3,E=Date.now()+z,I=B()==="none"?"no-llm-backend":null;if(I&&a.logger.warn?.("[process-insights] no LLM backend (no claude/codex CLI and no ANTHROPIC_API_KEY) \u2014 facet grading SKIPPED for this run; the summary below is computed from already-graded sessions only"),!I){let t=0,i=0;try{for(;t<C&&Date.now()<E;){let c=await h(`/api/sessions?needsFacets=true&graderVersion=${2}&limit=${p}&offset=${i}`);if(c.length===0)break;e(` Generating facets for ${c.length} un-analyzed sessions (drained ${t} so far)...`);for(let b=0;b<c.length&&!(t>=C||Date.now()>=E);b+=F){let R=c.slice(b,b+F);await Promise.all(R.map(async g=>{if(!(t>=C||Date.now()>=E))try{let d=await N(ss=>Q(g.id,ss));if(d.turnCount<2){t++,i++;return}let O=await T(D,d.text,4096);O&&typeof O.outcome=="string"?(await m(`/api/sessions/${g.id}/enrich`,{analysis:{source:"generated_facets",...O,graderVersion:2},...g.eventCount!=null?{analyzedEventCount:g.eventCount}:{},analyzedTurnCount:d.turnCount}),e(` Generated facets for session ${g.id} (${g.tool}, ${d.turnCount} turns)`)):i++,t++}catch(d){e(` Failed to generate facets for session ${g.id}: ${d instanceof Error?d.message:String(d)}`),t++,i++}}))}if(c.length<p)break}}catch(c){e(` Warning: facet generation failed after ${t} sessions: ${c instanceof Error?c.message:String(c)}`)}if(t>0){let c=Date.now()>=E?`time budget (${Math.round(z/6e4)}m)`:t>=C?`hard cap (${C})`:"queue empty";e(` Facet drain stopped on ${c} after ${t} session(s); the rest resume next run.`)}}let _=await ns(s,r);if(!_)throw new M("No session data found \u2014 ensure sessions are captured and enriched.");e(` Found ${_.stats.sessions} sessions, generating recommendations...`);let y=await Y({projectId:r,projectPath:s},h);_.summary+=`
2
-
3
- ${y.text}`,e(` Session evidence: ${y.sessionIds.length} usable, ${y.failedSessionIds.length} unavailable`);let S=await ts(s,e);S&&e(` Generator memory: ${S.split(`
4
- `).length} lines of prior-advice context`);let o={},$=[],w=k.length+1;for(let t=0;t<k.length;t++){let i=k[t];e(` [${t+1}/${w}] Generating ${i.name}...`);try{await m(`/api/insights-jobs/${n}/progress`,{status:"running",progress:{step:i.name,current:t+1,total:w,partial:{...o}}})}catch(d){e(` Warning: progress update failed for ${i.name}: ${d instanceof Error?d.message:String(d)}`)}e(` Running LLM prompt for ${i.name}...`);let c=i.usesGeneratorMemory&&S?`${_.summary}
5
- ${S}`:_.summary,b=Date.now(),R=await T(i.prompt,c,i.maxTokens,{timeoutMs:i.timeoutMs}),g=Date.now()-b;R?(o[i.name]=R,e(` Got result for ${i.name} (${Math.round(g/1e3)}s)`)):($.push(i.name),e(` No result for ${i.name} after ${Math.round(g/1e3)}s (budget ${Math.round((i.timeoutMs??12e4)/1e3)}s) \u2014 section DROPPED`))}e(` [${w}/${w}] Generating at_a_glance...`),await m(`/api/insights-jobs/${n}/progress`,{status:"running",progress:{step:"at_a_glance",current:w,total:w,partial:{...o}}});let X=[_.summary,o.what_works?`
6
- ## What Works
7
- ${JSON.stringify(o.what_works)}`:"",o.friction_analysis?`
8
- ## Friction
9
- ${JSON.stringify(o.friction_analysis)}`:"",o.suggestions?`
10
- ## Suggestions
11
- ${JSON.stringify(o.suggestions)}`:"",o.on_the_horizon?`
12
- ## On the Horizon
13
- ${JSON.stringify(o.on_the_horizon)}`:""].join(`
14
- `),x=await T(V,X,8192);x&&(o.at_a_glance=x),e(" Uploading results..."),e(` Done! Recommendations generated for job ${n}`),H(o);let v=K(o.recommendation_candidates,y.sessionIds);o.recommendation_candidates=v.candidates;let P=o.suggestions;if(P&&typeof P=="object"&&!Array.isArray(P)){let t=P;t.recommendation_candidates=v.candidates,t.claude_md_additions=[],t.features_to_try=[]}L(o);let J={recommendations:o,sessionEvidence:{sessionIds:y.sessionIds,failedSessionIds:y.failedSessionIds,emptySessionIds:y.emptySessionIds,selection:"recent-8-head-tail",rejectedCandidateTitles:v.rejected},...$.length>0?{sectionsFailed:$}:{},...I?{facetsSkipped:I}:{}};return $.length>0&&e(` \u26A0 ${$.length} section(s) produced nothing: ${$.join(", ")}`),await m(`/api/insights-jobs/${n}/state`,{result:J}).catch(t=>{e(`result persist failed: ${t instanceof Error?t.message:String(t)}`)}),await Z(o,s,e),J}f(ms,"processInsights");async function es(l,a){let{mirrorId:n,sessionId:s}=l;a(`Analyzing session ${s} via tool CLI...`),await m(`/api/insights-jobs/${n}/progress`,{status:"running",progress:{step:"fetching_session"}});let r=await h(`/api/sessions/${s}`);if(r.analysis&&r.analysis.source==="session_analysis")return a(` Session ${s} already analyzed \u2014 skipping (idempotency guard)`),{sessionId:s,skipped:!0,reason:"already_analyzed"};let u=await N(p=>Q(s,p));if(u.turnCount<2)throw new M("Session has too few conversation turns to analyze");await m(`/api/insights-jobs/${n}/progress`,{status:"running",progress:{step:"running_analysis",tool:r.tool}});let e=await W(r.tool,D,u.text);if(!e.ok)throw new Error(`Analysis failed \u2014 ${e.reason}`);return await m(`/api/sessions/${s}/enrich`,{analysis:{source:"session_analysis",tool:r.tool,...e.value,graderVersion:2},...r.eventCount!=null?{analyzedEventCount:r.eventCount}:{},analyzedTurnCount:u.turnCount}),a(` Session ${s} analyzed via ${r.tool}`),{sessionId:s,tool:r.tool,facets:e.value}}f(es,"processSessionAnalysisInline");async function ts(l,a,n=h,s=q){let{asks:r,omitted:u}=s(l);try{let e=await n(`/api/insights/recommendations/history?projectPath=${encodeURIComponent(l??"")}`);return!e||!Array.isArray(e.dismissed)||!Array.isArray(e.repeated)?j({dismissed:[],repeated:[],installed:r,installedOmitted:u}):j({...e,installed:r,installedOmitted:u})}catch(e){return a(` Warning: generator memory unavailable (${e instanceof Error?e.message:String(e)}) \u2014 generating without it`),j({dismissed:[],repeated:[],installed:r,installedOmitted:u})}}f(ts,"fetchGeneratorMemory");async function ns(l,a){try{let n=new URLSearchParams;a?n.set("projectId",a):l&&n.set("projectPath",l);let s=await h(`/api/insights/compute?${n}`);if(!s||s.total_sessions===0)return null;let r=Object.entries(s.tool_counts??{}).sort((e,p)=>p[1]-e[1]).slice(0,10).map(([e,p])=>`${e}: ${p}`).join(", ");return{summary:[`Sessions: ${s.total_sessions}, Messages: ${s.total_messages}, Session-hours: ${Math.round(s.total_duration_hours)} (sum of per-session spans across ${s.sessions_with_meta} measured sessions; concurrent sessions counted separately, so this exceeds elapsed time)`,`Top tools: ${r}`,s.goal_categories&&Object.keys(s.goal_categories).length>0?`Goals: ${JSON.stringify(s.goal_categories)}`:"",s.friction&&Object.keys(s.friction).length>0?`Friction: ${JSON.stringify(s.friction)}`:"",s.outcomes&&Object.keys(s.outcomes).length>0?`Outcomes: ${JSON.stringify(s.outcomes)}`:"",s.projects&&Object.keys(s.projects).length>0?`Projects: ${JSON.stringify(s.projects)}`:""].filter(Boolean).join(`
15
- `),stats:{sessions:s.total_sessions,totalMessages:s.total_messages,totalSessionHours:s.total_duration_hours,measuredSessions:s.sessions_with_meta,toolCounts:s.tool_counts,goalCounts:s.goal_categories,frictionCounts:s.friction}}}catch(n){throw new G(n instanceof Error?n.message:String(n))}}f(ns,"buildDataSummaryFromApi");var G=class extends Error{static{f(this,"InsightsSummaryUnavailableError")}constructor(a){super(`Could not read session summary (retryable): ${a}`),this.name="InsightsSummaryUnavailableError"}};export{ms as a,ts as b};
@@ -1 +0,0 @@
1
- import{b as T,d as H}from"./chunk-VBGHPAUT.js";import{b as A,e as c,f as m}from"./chunk-GIXHG5FK.js";import{a as u}from"./chunk-ZLLER3HP.js";import{createHash as M,randomUUID as D}from"node:crypto";import{readFileSync as h,existsSync as g}from"node:fs";import{join as i}from"node:path";import{pathToFileURL as L}from"node:url";import{execFileSync as O}from"node:child_process";import{scriptsDir as J}from"@rulemetric/hooks/scripts-dir";var f=u(t=>M("sha256").update(t).digest("hex"),"hash");async function Q(t){let k=await c(`/api/instruction-suggestions/${t.suggestionId}/test`);if(k.liveStudies?.length)return{status:"existing",studyId:k.liveStudies[0].id};let o=await c(`/api/eval-targets/${t.evalTargetId}`);if(!o.projectPath||!o.instructionId)return{status:"blocked",reason:"The suggestion has no project and instruction link."};let s=o.projectPath;if(!g(i(s,"package.json")))return{status:"blocked",reason:"Automatic repository checks currently require a package.json type-check or typecheck script."};let d=JSON.parse(h(i(s,"package.json"),"utf8")),y=["type-check","typecheck"].find(e=>typeof d.scripts?.[e]=="string");if(!y)return{status:"blocked",reason:"Add a type-check or typecheck script to prepare independently checked code tasks."};let v=t.research?[]:await c(`/api/eval-targets/${t.evalTargetId}/runs?jobId=${t.evalJobId}&limit=100`),b=v.flatMap(e=>e.outputs?.engine==="claude"&&e.outputs.model?[e.outputs.model]:[]),x=[...new Set(b)],l=t.requestedModel?.trim()||(x.length===1?x[0]:void 0);if(!l)return{status:"blocked",reason:"Choose an exact Claude model for the separately budgeted live study. Missing comparison model metadata does not determine live eligibility."};let p=await import(L(i(J,"scoped-live.mjs")).href);if(typeof p.runRepositoryCheck!="function")return{status:"blocked",reason:"Upgrade the installed hooks to support repository checks."};let r=p.observeEnvironment(s);for(let e of Object.keys(r.contextHashes))if(r.contextHashes[e]&&/(?:CLAUDE(?:\.local)?|AGENTS)\.md$/.test(e)&&h(e,"utf8").includes(t.content.trim()))return{status:"blocked",reason:"The candidate already exists in background instructions; it cannot be withheld from baseline tasks."};let P=O("git",["ls-files","-z"],{cwd:s,encoding:"utf8",timeout:5e3}).split("\0"),I=[...new Set(["package.json",...P.filter(e=>!e.split("/").some(q=>q.startsWith("."))&&/(^|\/)(package\.json|tsconfig[^/]*\.json|turbo\.json|pnpm-workspace\.yaml|pnpm-lock\.yaml|package-lock\.json|yarn\.lock)$/.test(e))])];if(I.length>300)return{status:"blocked",reason:"Repository verifier configuration exceeds the 300-file preparation bound."};let $=Object.fromEntries(I.sort().map(e=>[e,f(h(i(s,e),"utf8"))])),w={name:"Repository type checking passes",path:"package.json",kind:"command_exit",expected:"0",primary:!0,command:[d.packageManager?.startsWith("pnpm@")||g(i(s,"pnpm-lock.yaml"))?"pnpm":d.packageManager?.startsWith("yarn@")||g(i(s,"yarn.lock"))?"yarn":"npm","run",y],timeoutMs:12e4,fileHashes:$},n=p.runRepositoryCheck(s,w);if(n.error||n.exitCode===null)return{status:"blocked",reason:`The verifier could not execute: ${n.error??"no exit status"}`};let a=t.research?.taskLimit??20,j=Array.from({length:a+1},()=>`work-${D()}`),S=H.parse({version:1,mode:"exploration",research:{question:t.research?.question??`Does ${o.name} increase the fraction of fresh launched tasks leaving repository type checks passing?`,rationale:t.research?T(t.research):o.description||"Test the exact suggested instruction on prospective project work.",eligibility:"Fresh work requests supplied before launch in this project, using the pinned Claude model. One request per task; resumed and repeated work excluded.",riskReview:`${a} task assignments, one baseline follow-up, seven-day expiry. Frozen repository checks; changes to checker configuration invalidate outcomes. Shared-checkout carryover is recorded; final causal interpretation remains inconclusive. No automatic adoption.`,enrollment:"prospective-launches",suggestionId:t.suggestionId,evalTargetId:t.evalTargetId,preparationJobId:t.preparationJobId,carryoverPolicy:"fresh-session-per-task",adoptionPolicy:"no-adoption"},projectPath:s,taskFamily:"fresh-project-work",harness:"claude_code",model:l,configurationHash:f(JSON.stringify({harnessVersion:r.harnessVersion,repositoryRevision:r.repositoryRevision,contextHashes:r.contextHashes})),baselineDeliveryHash:f(""),treatmentDeliveryHash:t.contentHash,primaryOutcome:"Repository type checking passes after the task; this is not a claim of full task correctness.",outcomeRule:{source:"session_analysis",completedValues:["achieved"],failedValues:["failed"]},eligibleTaskIds:j,maxAssignments:a,decisionRule:{minCompletedPerArm:2,minimumAbsoluteEffect:.1},expiresAt:new Date(Date.now()+7*864e5).toISOString(),verification:{version:1,kind:"artifact-checks",environment:r,tasks:j.map(e=>({taskId:e,checks:[w]}))}}),C=await m("/api/instruction-experiments",{instructionId:o.instructionId,projectPath:s,source:"trial",mode:"scoped"}),R;try{R=await m(`/api/instruction-experiments/${C.experimentId}/scoped-live-confirmations`,{protocol:S})}catch(e){if(e instanceof A&&e.statusCode===409&&e.message==="Preparation was cancelled before the live study opened")return{status:"cancelled",reason:e.message};throw e}return{status:"waiting_for_work",studyId:R.confirmation.id,verifierReadiness:n,taskLimit:a,comparisonRunsWithUnknownModel:v.length-b.length,modelSelection:t.requestedModel?"explicit_request":"comparison_observation",outcome:S.primaryOutcome,model:l}}u(Q,"prepareSuggestionLive");export{Q as a};
@@ -1 +0,0 @@
1
- import{a as v}from"./chunk-U2NT5OSQ.js";import{a as u}from"./chunk-GYNZ3OZF.js";import{c as k,e as E}from"./chunk-UPFH72PF.js";import{a}from"./chunk-ZLLER3HP.js";import{mkdirSync as N,readdirSync as h,rmSync as I,writeFileSync as S}from"node:fs";import{join as p,relative as y,sep as _}from"node:path";var b="v2-neutral-workspace";function C(e){return e==="codex"?"v3-codex-project-neutral":b}a(C,"evalMethodology");var T=["CLAUDE.md","CLAUDE.local.md","AGENTS.md"],A=new Set(["node_modules",".git","dist","build",".next","coverage"]),W={claude:{file:u.claude_code,delivery:"claude_md"},codex:{file:u.codex,delivery:"agents_md"},pi:{file:u.codex,delivery:"agents_md"}};function x(e,s="claude"){let n=[],t=new Set(T);s==="codex"&&t.add("AGENTS.override.md");let d=a(i=>{let r;try{r=h(i,{withFileTypes:!0})}catch{return}for(let o of r){let l=p(i,o.name);if(s==="codex"&&[".codex",".agents"].includes(o.name)){n.push(y(e,l));continue}if(o.isDirectory()){if(A.has(o.name)||o.name.startsWith(".")&&o.name!==".claude")continue;d(l)}else t.has(o.name)&&n.push(y(e,l))}},"walk");return d(e),n}a(x,"findAmbientInstructionFiles");function F(e,s){let n=[];for(let t of x(e,s))try{I(p(e,t),{force:!0,recursive:!0}),n.push(t)}catch{}return n}a(F,"stripAmbientInstructions");function O(e){return/[a-z0-9]/i.test(e??"")?k(e??""):"eval-target-skill"}a(O,"skillSlug");function j(e={}){let{baseDir:s,targetType:n,targetContent:t,targetName:d,engine:i="claude"}=e,r=v(s),o=F(r.workDir,i),l="none",m,f=[];if(t)switch(n){case"prompt":m=t,l="system_prompt";break;case"skill":{if(i!=="claude")throw r.cleanup(),new Error(`createEvalWorkspace: a skill target cannot be measured on ${i} \u2014 .claude/skills is read by Claude Code only, so both arms would run without it.`);let c=O(d),g=E({dirName:c,content:t});D(r.workDir,p(".claude","skills",c,"SKILL.md"),g.text),l="skill";break}default:{let{file:c,delivery:g}=W[i];D(r.workDir,c,t),f.push(c),l=g;break}}let w=x(r.workDir,i).filter(c=>!f.includes(c));return{workDir:r.workDir,systemPrompt:m,delivery:l,methodology:C(i),isWorktree:r.isWorktree,strippedFiles:o,leakedFiles:w,cleanup:r.cleanup}}a(j,"createEvalWorkspace");function D(e,s,n){let t=p(e,s),d=t.slice(0,t.lastIndexOf(_));N(d,{recursive:!0}),S(t,n,"utf8")}a(D,"writeFileInWorkspace");export{b as a,C as b,T as c,x as d,O as e,j as f};
@@ -1,48 +0,0 @@
1
- import{f as I,g as N}from"./chunk-XQYAVSUQ.js";import{a as i}from"./chunk-ZLLER3HP.js";function ne(e){return(e.trim().split(`
2
- `)[0]?.replace(/^#+\s*/,"").trim()||"Suggested instruction").slice(0,120)}i(ne,"recommendationTitle");function oe(e){if(!e||typeof e!="object")return e;let t=e;if(Array.isArray(t.recommendation_candidates))return e;let n=t.suggestions;if(!n||typeof n!="object")return e;let o=n.claude_md_additions;return Array.isArray(o)&&(t.recommendation_candidates=o.flatMap(r=>{if(!r||typeof r!="object")return[];let s=r;if(typeof s.addition!="string"||s.addition.trim()==="")return[];let a=s.addition.trim();return[{title:ne(a),artifact:"instruction",canonicalBody:a,rationale:typeof s.why=="string"?s.why:"",evidence:[],outcomeMetric:"session_outcome",renderings:[{harness:"claude_code",target:"CLAUDE.md",body:a},{harness:"codex",target:"AGENTS.md",body:a}]}]})),e}i(oe,"normalizeRecommendationCandidates");var re=new Set(["instruction"]);function se(e){if(!e||typeof e!="object")return e;let t=e,n=t.recommendation_candidates;if(!Array.isArray(n)||n.length===0)return e;let o=n.filter(s=>!!s&&typeof s=="object"&&typeof s.canonicalBody=="string"&&s.canonicalBody.trim().length>0);for(let s of o){if(Array.isArray(s.renderings)&&s.renderings.length>0)continue;let a=s.canonicalBody.trim(),c=re.has(String(s.artifact));s.renderings=c?[{harness:"claude_code",target:"CLAUDE.md",body:a},{harness:"codex",target:"AGENTS.md",body:a}]:[{harness:"claude_code",target:"manual",body:a},{harness:"codex",target:"manual",body:a}]}let r=t.suggestions&&typeof t.suggestions=="object"?t.suggestions:{};return(!Array.isArray(r.claude_md_additions)||r.claude_md_additions.length===0)&&(r.claude_md_additions=o.filter(s=>s.artifact==="instruction").map(s=>({addition:s.canonicalBody.trim(),why:typeof s.rationale=="string"?s.rationale:"",prompt_scaffold:"Add to CLAUDE.md (and AGENTS.md for Codex)."}))),(!Array.isArray(r.features_to_try)||r.features_to_try.length===0)&&(r.features_to_try=o.filter(s=>s.artifact!=="instruction").map(s=>({feature:typeof s.title=="string"?s.title:"Proposed change",one_liner:typeof s.rationale=="string"?s.rationale:"",why_for_you:typeof s.outcomeMetric=="string"?`Aimed at ${s.outcomeMetric}.`:"",example_code:s.canonicalBody.trim()}))),Array.isArray(r.usage_patterns)||(r.usage_patterns=[]),t.suggestions=r,e}i(se,"deriveLegacyPresentation");function ie(e){if(!e||typeof e!="object")return e;let t=e,n=t.project_areas;if(n!==void 0&&!Array.isArray(n)){let o=n&&typeof n=="object"?n.areas:void 0;t.project_areas=Array.isArray(o)?o:void 0}return ae(e),oe(e),e}i(ie,"normalizeRecommendations");function ae(e){if(!e||typeof e!="object")return;let t=e;if(Array.isArray(t.recommendation_candidates)&&t.recommendation_candidates.length>0)return;let n=t.suggestions;if(!n||typeof n!="object")return;let o=n.recommendation_candidates;!Array.isArray(o)||o.length===0||(t.recommendation_candidates=o)}i(ae,"liftNestedCandidates");import{z as d}from"zod";var P=["org","team","project","personal"],D=d.object({name:d.string().min(1),description:d.string().min(1),type:d.literal("instruction").default("instruction"),scope:d.enum(P),version:d.string().min(1),tags:d.array(d.string()).optional(),compatibility:d.array(d.string()).optional(),slots:d.record(d.string(),d.string()).optional(),metadata:d.record(d.string(),d.unknown()).optional()});import{z as p}from"zod";var j=p.object({name:p.string().min(1),description:p.string().min(1),type:p.literal("prompt"),version:p.string().min(1),tags:p.array(p.string()).optional(),variables:p.array(p.string()).optional(),metadata:p.record(p.string(),p.unknown()).optional()});function _(e,t){let n=t.map(o=>`- ID: ${o.id}
3
- Name: ${o.name}
4
- Description: ${o.description}
5
- Tags: ${o.tags.join(", ")}
6
- Preview: ${o.contentPreview}`).join(`
7
-
8
- `);return`You are an expert at matching AI coding instructions to software projects.
9
-
10
- ## Project
11
- - Name: ${e.name}
12
- - Description: ${e.description??"No description"}
13
- - Languages: ${e.languages.join(", ")||"Unknown"}
14
- - Topics: ${e.topics.join(", ")||"None"}
15
- - Dependencies: ${e.dependencies.join(", ")||"None"}
16
-
17
- ## Available Instructions
18
-
19
- ${n}
20
-
21
- ## Task
22
-
23
- Analyze the project and recommend which instructions would be most useful. Consider:
24
- 1. Language and framework alignment
25
- 2. Project purpose and what standards/practices would help
26
- 3. Security, testing, and quality needs based on the project type
27
-
28
- Return your response as JSON in this exact format:
29
- {
30
- "recommendations": [
31
- { "instructionId": "<id>", "score": <0.0-1.0>, "reason": "<one sentence explanation>" }
32
- ]
33
- }
34
-
35
- Only include instructions with a relevance score >= ${.5}. Order by score descending. Return valid JSON only, no markdown fences.`}i(_,"buildRecommendationPrompt");var $=32e3,ce={name:"x".repeat(64),description:"x".repeat(256),languages:["TypeScript","Python","Go"],topics:["x".repeat(32)],dependencies:["x".repeat(32)]};function M(e,t={}){if(e.length===0)return[];let n=t.charBudget??$,o=_(ce,[]).length,r=[],s=[],a=0;for(let c of e){let l=le(c);s.length>0&&o+a+l>n&&(r.push(s),s=[],a=0),s.push(c),a+=l}return s.length>0&&r.push(s),r}i(M,"batchCandidatesForPrompt");function le(e){return`- ID: ${e.id}
36
- Name: ${e.name}
37
- Description: ${e.description}
38
- Tags: ${e.tags.join(", ")}
39
- Preview: ${e.contentPreview}`.length+2}i(le,"renderedSize");var H=["Added","Changed","Fixed","Removed","Deprecated","Security"],ue=/^##\s+\[([^\]]+)\](?:\s*[-–]\s*(\d{4}-\d{2}-\d{2}))?\s*$/,me=/^###\s+(.+?)\s*$/,de=/^[-*]\s+(.*\S)\s*$/,pe=/^ {2,}(\S.*)$/;function fe(e){let t=e.split(/\r?\n/),n=[],o=null,r=null,s=null;for(let a of t){let c=a.match(ue);if(c){o&&n.push(o);let m=c[1].trim();o={version:m,date:c[2]??null,unreleased:m.toLowerCase()==="unreleased",sections:{}},r=null,s=null;continue}if(!o)continue;let l=a.match(me);if(l){let m=l[1].trim();H.includes(m)?(r=m,o.sections[r]||(o.sections[r]=[]),s=o.sections[r]):(r=null,s=null);continue}if(!r||!s)continue;let u=a.match(de);if(u){s.push(u[1]);continue}let f=a.match(pe);if(f&&s.length>0){s[s.length-1]+=" "+f[1].trim();continue}}return o&&n.push(o),{entries:n}}i(fe,"parseChangelog");function he(e){return e.entries.filter(t=>t.unreleased?!1:Object.values(t.sections).some(n=>n&&n.length>0))}i(he,"announceableEntries");function E(e){let t=/^(#{1,6})\s+/.exec(e);return t?t[1].length:0}i(E,"headingLevel");function B(e){return e.replace(/^#{1,6}\s+/,"").replace(/[`*_~]/g,"").trim().toLowerCase()}i(B,"normaliseHeading");function ge(e,t){let n=B(t);if(n.length===0)return{content:e,removed:!1,removedText:null,reason:"not-found"};let o=e.split(`
40
- `),r=[];for(let m=0;m<o.length;m+=1)E(o[m])>0&&B(o[m])===n&&r.push(m);if(r.length===0)return{content:e,removed:!1,removedText:null,reason:"not-found"};if(r.length>1)return{content:e,removed:!1,removedText:null,reason:"ambiguous"};let s=r[0],a=E(o[s]),c=o.length;for(let m=s+1;m<o.length;m+=1){let v=E(o[m]);if(v>0&&v<=a){c=m;break}}let l=o.slice(s,c).join(`
41
- `),u=[...o.slice(0,s),...o.slice(c)];return u.join("").trim().length===0?{content:e,removed:!1,removedText:null,reason:"would-empty-file"}:{content:u.join(`
42
- `).replace(/\n{3,}/g,`
43
-
44
- `),removed:!0,removedText:l}}i(ge,"removeMarkdownSection");function ye(e,t){let n=t.trim();if(n.length===0)return{content:e,removed:!1,removedText:null,reason:"not-found"};let o=e.indexOf(n);if(o===-1)return{content:e,removed:!1,removedText:null,reason:"not-found"};if(e.indexOf(n,o+1)!==-1)return{content:e,removed:!1,removedText:null,reason:"ambiguous"};let r=(e.slice(0,o)+e.slice(o+n.length)).replace(/\n{3,}/g,`
45
-
46
- `);return r.trim().length===0?{content:e,removed:!1,removedText:null,reason:"would-empty-file"}:{content:r,removed:!0,removedText:n}}i(ye,"removeExactBlock");var U=["HTTPS_PROXY","HTTP_PROXY","NODE_EXTRA_CA_CERTS"];function xe(e,t){if(!e||typeof e!="object")return{value:e,removed:!1,removedDescriptions:[],reason:"not-found"};let n=structuredClone(e);if(!n.hooks)return{value:n,removed:!1,removedDescriptions:[],reason:"not-found"};let o=[];for(let[r,s]of Object.entries(n.hooks)){if(!Array.isArray(s))continue;let a=s.filter(c=>{let l=(c.hooks??[]).some(u=>typeof u.command=="string"&&u.command.includes(t));return l&&o.push(`${r}: ${c.matcher??"*"} \u2192 ${(c.hooks??[]).map(u=>u.command).join(", ")}`),!l});a.length===0?delete n.hooks[r]:n.hooks[r]=a}return Object.keys(n.hooks).length===0&&delete n.hooks,{value:n,removed:o.length>0,removedDescriptions:o,...o.length===0?{reason:"not-found"}:{}}}i(xe,"removeHookByCommand");function _e(e,t){if(!e||typeof e!="object")return{value:e,removed:!1,removedDescriptions:[],reason:"not-found"};let n=structuredClone(e);return!n.mcpServers||!(t in n.mcpServers)?{value:n,removed:!1,removedDescriptions:[],reason:"not-found"}:(delete n.mcpServers[t],Object.keys(n.mcpServers).length===0&&delete n.mcpServers,{value:n,removed:!0,removedDescriptions:[`mcpServers.${t}`]})}i(_e,"removeMcpServer");function S(e){if(!e||typeof e!="object")return[];let t=e.env;return t?U.filter(n=>n in t):[]}i(S,"protectedEnvKeysPresent");function ve(e,t){let n=S(e),o=new Set(S(t));return n.filter(r=>!o.has(r))}i(ve,"lostProtectedEnvKeys");function Ee(e,t){let n=`HTTP ${e}`;if(!t||typeof t!="object")return{message:n};let o=t,r=typeof o.error=="string"&&o.error?o.error:o.error?JSON.stringify(o.error):n,s=typeof o.code=="string"&&o.code?o.code:void 0;return s?{message:r,code:s}:{message:r}}i(Ee,"parseApiError");var T=["inside","outside"];function y(e){return e.trim().toLowerCase()}i(y,"normalizeDependencyKey");function Se(e){let t=[];if(T.includes(e.boundaryClass)||t.push({field:"boundaryClass",message:`must be one of ${T.join(" | ")}`}),!Array.isArray(e.targets)||e.targets.length===0)t.push({field:"targets",message:"a proposal that cannot name the paths it writes cannot be applied"});else{for(let r of e.targets)if(typeof r!="string"||r.trim().length===0){t.push({field:"targets",message:"target paths must be non-empty"});break}let n=e.targets.filter(r=>typeof r=="string"&&(r.startsWith("/")||/^[A-Za-z]:[\\/]/.test(r)));n.length>0&&t.push({field:"targets",message:`targets must be project-relative (absolute: ${n.join(", ")})`});let o=e.targets.filter(r=>typeof r=="string"&&r.split(/[\\/]/).includes(".."));o.length>0&&t.push({field:"targets",message:`targets must not traverse outside the project (${o.join(", ")})`})}for(let n of["requires","provides"]){let o=e[n];if(!Array.isArray(o)){t.push({field:n,message:"must be an array of dependency keys"});continue}o.some(r=>typeof r!="string"||r.trim().length===0)&&t.push({field:n,message:"dependency keys must be non-empty strings"})}return t}i(Se,"validateArtifactSpec");function Ae(e,t){let n=[],o=new Set(e.targets??[]);if(t.kind==="delete-paths"){e.boundaryClass!=="inside"&&n.push({field:"inverse",message:"deleting paths is only an inverse for `inside` artifacts; an `outside` path may hold text we did not write"}),t.paths.length===0&&n.push({field:"inverse.paths",message:"nothing to delete \u2014 this is not an inverse"});let r=t.paths.filter(s=>!o.has(s));return r.length>0&&n.push({field:"inverse.paths",message:`would delete paths the spec never declared: ${r.join(", ")}`}),n}return e.boundaryClass!=="outside"&&n.push({field:"inverse",message:"a compensation is only an inverse for `outside` artifacts; an `inside` path owes an exact undo"}),(!t.backupPath||t.backupPath.trim().length===0)&&n.push({field:"inverse.backupPath",message:"an `outside` write owes a backup"}),(!t.hashAtWrite||t.hashAtWrite.trim().length===0)&&n.push({field:"inverse.hashAtWrite",message:"without the post-write hash the undo cannot tell a drifted file from an untouched one"}),o.has(t.file)||n.push({field:"inverse.file",message:`wrote ${t.file}, which the spec did not declare as a target`}),t.kind==="remove-marked-region"?(!t.startMarker||!t.endMarker)&&n.push({field:"inverse",message:"an `outside` region needs both markers, or the undo cannot tell where our text ends"}):t.command.trim().length===0&&n.push({field:"inverse.command",message:"the exact command written is the identity of the entry; without it the undo is a search"}),n}i(Ae,"validateArtifactInverse");var z="artifact";function A(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"&&t.trim().length>0):[]}i(A,"stringArray");function Te(e){if(!e||typeof e!="object")return null;let t=e[z];if(!t||typeof t!="object")return null;let n=t;return{boundaryClass:n.boundaryClass,targets:A(n.targets),requires:A(n.requires),provides:A(n.provides)}}i(Te,"parseArtifactSpec");var be=["applied","measuring","improved","inconclusive","harmful","rollback_ready"];function K(e){return e.appliedAt?e.appliedAt instanceof Date?e.appliedAt.getTime():new Date(e.appliedAt).getTime():0}i(K,"appliedAtMs");function ke(e){return[...e].sort((t,n)=>{let o=K(n)-K(t);return o!==0?o:(n.applySeq??0)-(t.applySeq??0)})}i(ke,"orderForReversal");var Y=["SessionStart","SessionEnd","UserPromptSubmit","PreToolUse","PostToolUse","PreCompact","Notification","Stop","SubagentStop"],b=".claude/settings.local.json";function G(e){return`# rm-artifact:${e}`}i(G,"hookTag");function Ce(e,t){return`${e.trim()} ${G(t)}`}i(Ce,"taggedHookCommand");var Oe=new Set(["if","then","else","elif","fi","for","while","until","do","done","case","esac","function","return","exit","cd","echo","test","true","false"]);function k(e){let t=e.trim().split(/\s+/)[0]??"";return!/^[a-z][a-z0-9_-]*$/.test(t)||Oe.has(t)?null:y(`cmd:${t}`)}i(k,"inferredCommandRequirement");function we(e,t){let n=new Set((t?.requires??[]).map(y).filter(Boolean)),o=k(e.command);return o&&n.add(o),{boundaryClass:"outside",targets:[b],requires:[...n],provides:(t?.provides??[]).map(y).filter(Boolean)}}i(we,"hookArtifactSpec");function x(e){let t=[];Y.includes(e.event)||t.push({field:"event",message:`unknown hook event ${JSON.stringify(e.event)} \u2014 a hook on an event that never fires is indistinguishable from one that was never installed`});let n=(e.command??"").trim();return n.length===0?t.push({field:"command",message:"a hook with no command installs nothing"}):(/[\r\n]/.test(n)&&t.push({field:"command",message:"multi-line commands are refused: the identity tag is a trailing shell comment, which would silence only the final line, and a human reviewing an install should read one line"}),n.includes("\0")&&t.push({field:"command",message:"command contains a NUL byte"}),n.includes("rulemetric")&&t.push({field:"command",message:'refused: `rulemetric hooks uninstall` deletes every hook whose command contains "rulemetric", so installing one here would make this hook collateral damage of an unrelated command'}),n.includes("rm-artifact:")&&t.push({field:"command",message:"command already carries an artifact tag \u2014 installing it would produce two identities for one entry"})),e.matcher!==void 0&&(typeof e.matcher!="string"||e.matcher.trim().length===0)&&t.push({field:"matcher",message:"matcher must be a non-empty string when present"}),t}i(x,"validateHookSpec");function Re(e){let t=[`runs on: ${e.event}${e.matcher?` (tools matching ${e.matcher})`:""}`,`spawns: ${e.command.trim()}`,`writes: ${b} (one entry, tagged with this artifact's id)`],n=k(e.command);return n&&t.push(`needs: ${n} on PATH`),t}i(Re,"describeHookCapability");var q="hook";function h(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}i(h,"asRecord");function F(e){let t=e.event,n=e.command;if(typeof t!="string"||typeof n!="string")return null;let o=typeof e.matcher=="string"?e.matcher:void 0;return{event:t,matcher:o,command:n}}i(F,"readBareSpec");function W(e){let t=h(e.hooks)??e,n=[];for(let[o,r]of Object.entries(t))if(Array.isArray(r))for(let s of r){let a=h(s);if(!a)continue;let c=typeof a.matcher=="string"&&a.matcher.length>0?a.matcher:void 0,l=Array.isArray(a.hooks)?a.hooks:[];for(let u of l){let f=h(u)?.command;typeof f=="string"&&n.push({event:o,matcher:c,command:f})}}return n.length===0?{spec:null,problems:[]}:n.length>1?{spec:null,problems:[{field:"hook",message:`proposal describes ${n.length} hook entries; one proposal installs exactly one hook, so its inverse stays exact and its review stays readable`}]}:{spec:n[0],problems:[]}}i(W,"readSettingsFragment");function Le(e){let t=[],n=/```[a-zA-Z]*\n([\s\S]*?)```/g,o;for(;(o=n.exec(e))!==null;)t.push(o[1]);return t}i(Le,"fencedBlocks");function Ie(e){let t=h(h(e.frontmatter)?.artifact),n=t?h(t[q]):null;if(n){let o=F(n);if(o)return{spec:o,problems:x(o),source:"envelope"};let r=W(n);if(r.spec)return{spec:r.spec,problems:x(r.spec),source:"envelope"};if(r.problems.length>0)return{spec:null,problems:r.problems,source:"envelope"}}for(let o of Le(e.content??"")){let r;try{r=JSON.parse(o)}catch{continue}let s=h(r);if(!s)continue;let a=F(s);if(a)return{spec:a,problems:x(a),source:"content-fragment"};let c=W(s);if(c.spec)return{spec:c.spec,problems:x(c.spec),source:"content-fragment"};if(c.problems.length>0)return{spec:null,problems:c.problems,source:"content-fragment"}}return{spec:null,problems:[{field:"hook",message:"no hook spec found \u2014 a hook proposal must carry {event, command} in its artifact envelope or a JSON settings fragment in its body"}],source:"none"}}i(Ie,"parseHookSpec");var V=25,C=N,X=[{task:"rm-batch-task",instructions:"rm-batch-task/inject.md",class:"proven",axis:"reward",measured:"2026-09-02 n=25/arm Haiku 4.5: 0/25 \u2192 25/25, delta +1.000, 95% CI [+0.734, +1.000]"},{task:"rm-locality-task",instructions:"rm-locality-task/inject.md",class:"proven",axis:"cost",measured:"2026-09-02 n=25/arm Haiku 4.5: 25/25 both arms, cost \u221225.6%/trial, 95% CI [\u22120.0171, \u22120.0107]"},{task:"rm-migrations-task",instructions:"rm-migrations-task/inject.md",class:"negative",axis:"reward",measured:"2026-08-31 Haiku 4.5: inconclusive after two exploratory reworks; redundancy unestablished"},{task:"rm-pagination-task",instructions:"rm-pagination-task/inject.md",class:"negative",axis:"reward",measured:"2026-09-02 n=25/arm Haiku 4.5: 25/25 baseline under --allowedTools Bash; observed cost +8.0%/trial; reward equivalence unestablished"}];function Ne(e){return X.filter(t=>t.class===e)}i(Ne,"harborTasksOfClass");function J(e,t){return t?.engine==="pi"?"Pi is supported for eval trials, not Harbor tasks":t?.engine==="codex"&&e.axis==="cost"?`${e.task}: dollar-cost telemetry is unavailable for Codex; reward calibration remains supported`:null}i(J,"harborTaskSupport");function Pe(e,t,n=null){let o=n?I.parse(n):null,r=J(e,o);if(r)throw new Error(r);let s=!o||o.engine==="claude"&&o.model===C;return{task:e.task,instructions:e.instructions,class:s?e.class:"unvalidated",axis:e.axis,model:o?.model??C,...o?{measurement:o}:{},nTrials:V,lane:t}}i(Pe,"harborPayloadFor");var De=/[\p{L}\p{N}]+/gu;function O(e){let t=new Set;for(let n of e.toLowerCase().matchAll(De)){let o=` ${n[0]} `;for(let r=0;r+3<=o.length;r+=1)t.add(o.slice(r,r+3))}return t}i(O,"trigrams");function g(e,t){let n=O(e),o=O(t);if(n.size===0||o.size===0)return 0;let r=0,[s,a]=n.size<=o.size?[n,o]:[o,n];for(let l of s)a.has(l)&&(r+=1);let c=n.size+o.size-r;return c===0?0:r/c}i(g,"trigramSimilarity");var R=.3,je=15;function w(e){let n=e.replace(/<!--[\s\S]*?-->/g," ").replace(/```[\s\S]*?```/g," "),o=[];for(let r of n.split(`
47
- `)){let s=r.trim();if(s.length===0||s.startsWith("#"))continue;let a=s.replace(/^(?:[-*+]|\d+[.)])\s+/,"").trim();if(a.length!==0)for(let c of a.split(/(?<=[.!?])\s+(?=[A-Z(`"'*])/)){let l=c.trim();l.length>=je&&o.push(l)}}return o}i(w,"splitDirectives");function Z(e,t,n=R){let o=w(e);if(o.length===0)return{redundant:!1,coverage:0,matches:[],novel:[]};let r=t.flatMap(c=>w(c.content).map(l=>({text:l,id:c.id,source:c.source}))),s=[],a=[];for(let c of o){let l=null;for(let u of r){let f=g(c,u.text);f<n||(l===null||f>l.similarity)&&(l={directive:c,matchedDirective:u.text,matchedId:u.id,matchedSource:u.source,similarity:f})}l?s.push(l):a.push(c)}return{redundant:a.length===0,coverage:s.length/o.length,matches:s,novel:a}}i(Z,"assessRedundancy");function $e(e,t=R){let n=[];for(let o=0;o<e.length;o+=1){let r=Z(e[o].content,e.slice(0,o),t);r.matches.length>0&&n.push({instruction:e[o],verdict:r})}return n}i($e,"findInternalRedundancy");var Q=.5,Me=/-(?=[0-9a-f]{6}$)[0-9a-f]*[0-9][0-9a-f]*$/;function L(e){return e.trim().toLowerCase().replace(/^skills--/,"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").replace(Me,"").replace(/-+$/,"")}i(L,"skillNameStem");function He(e,t,n=Q){let o=L(e.name);for(let s of t)if(o.length>0&&L(s.name)===o)return{name:s.name,similarity:g(e.content,s.content),reason:"name-stem"};let r=null;for(let s of t){let a=g(e.content,s.content);a<n||(r===null||a>r.similarity)&&(r={name:s.name,similarity:a,reason:"body"})}return r}i(He,"assessSkillDuplication");var Be=new Set(["sh","bash","zsh","fish"]),Ue=new Set(["mjs","cjs","js","ts","py","rb","pl"]),Ke=/(?:^|[\s(`'"])(?:sudo\s+)?(?:node|npx|pnpm|npm|yarn|bun|deno|tsx|ts-node|vitest|jest|python3?|python|ruby|perl|bash|sh|zsh|exec|run|dlx)\s+(?:[-\w=@./]+\s+)*$/,ze=/(?:\.\/)?(?:[\w.@-]+\/)+[\w.@-]+\.\w+/g;function Fe(e){return e.replace(/```[\w-]*\n?/g," ").replace(/`/g," ")}i(Fe,"stripCodeMarkers");function We(e){let t=e.trim();return t=t.replace(/[.,;:)\]]+$/,""),t.startsWith("./")&&(t=t.slice(2)),t.length===0||t.startsWith("/")||t.startsWith("~")||t.startsWith("..")||/[<>{}*?]/.test(t)?null:t}i(We,"normalise");function ee(e){let t=Fe(e),n=new Set,o=[];for(let r of t.matchAll(ze)){let s=r[0],a=r.index??0,c=t.slice(Math.max(0,a-1),a);if(c.length>0&&!/[\s(['"=]/.test(c))continue;let l=We(s);if(!l)continue;let u=l.slice(l.lastIndexOf(".")+1).toLowerCase();(Be.has(u)||Ue.has(u)&&(s.startsWith("./")||Ke.test(t.slice(t.lastIndexOf(`
48
- `,Math.max(0,a-1))+1,a))))&&(n.has(l)||(n.add(l),o.push({reference:s,path:l})))}return o}i(ee,"extractCommandReferences");function Ye(e,t){return ee(e).filter(n=>!t(n.path))}i(Ye,"findUnresolvableReferences");import Yt from"gray-matter";import{z as te}from"zod";var Xt=te.object({type:te.enum(["instruction","prompt"])});export{se as a,ie as b,_ as c,M as d,fe as e,he as f,ge as g,ye as h,xe as i,_e as j,ve as k,Ee as l,y as m,Se as n,Ae as o,Te as p,be as q,ke as r,b as s,G as t,Ce as u,we as v,Re as w,Ie as x,C as y,Ne as z,J as A,Pe as B,w as C,Z as D,$e as E,He as F,Ye as G};
@@ -1,3 +0,0 @@
1
- import{h as R}from"./chunk-CVPAKEEZ.js";import{g as x}from"./chunk-CDSSOOIG.js";import{a as $,b as S,c as v,f as w,g as A}from"./chunk-SIGZEQ3K.js";import{e as y,f}from"./chunk-GIXHG5FK.js";import{a as c}from"./chunk-ZLLER3HP.js";import{execFileSync as P}from"node:child_process";import{openSync as C,readSync as j,closeSync as E,readFileSync as I}from"node:fs";function W(l){let t;try{t=C(l,"r");let o=Buffer.alloc(64*1024),s=j(t,o,0,o.length,0),i=o.subarray(0,s).toString("utf-8");for(let n of i.split(`
2
- `))if(n.startsWith("{"))try{let a=JSON.parse(n).cwd;if(typeof a=="string"&&a.startsWith("/"))return a}catch{}return null}catch{return null}finally{t!==void 0&&E(t)}}c(W,"readTranscriptCwd");function k(l){let t=c(n=>{try{return P("git",["-C",l,...n],{encoding:"utf-8",stdio:["ignore","pipe","ignore"],timeout:5e3}).trim()||null}catch{return null}},"git");if(!t(["rev-parse","--show-toplevel"]))return null;let s=t(["rev-parse","--git-dir"]),i=t(["rev-parse","--git-common-dir"]);return{gitRemote:t(["remote","get-url","origin"]),gitRootCommit:t(["rev-list","--max-parents=0","HEAD"])?.split(`
3
- `).pop()?.trim()??null,gitBranch:t(["branch","--show-current"]),isWorktree:!!s&&!!i&&s!==i}}c(k,"gitAnchors");async function F(l,t,o=S(k,W)){let s=Math.min(l.limit??200,1e3);try{let e=await x(r=>t.logger.info(r));e.scanned>0&&t.logger.info(`scoped outcomes: scanned=${e.scanned} delivered=${e.delivered} failed=${e.failed} unmeasured=${e.unmeasured}`)}catch(e){t.logger.info(`scoped outcome resume sweep failed: ${e.message}`)}let i=await R(()=>y(`/api/sessions/unattributed?limit=${s}`),{log:c(e=>t.logger.info(e),"log"),label:"sessions/unattributed",idempotent:!0}),n=i.sessions??[],a=i.total??n.length;if(n.length===0)return t.logger.info("no unattributed sessions"),{scanned:0,repaired:0,reimported:0,unrepairable:0,remaining:0};let m=0,g=0,d=0;for(let e of n){if(!e.externalSessionId){d++;continue}let r=A(e,o);if(!r){d++;continue}try{await f("/api/sessions",{tool:e.tool,externalSessionId:e.externalSessionId,projectPath:r.projectPath,...r.gitBranch?{gitBranch:r.gitBranch}:{},metadata:{...r.gitRemote?{gitRemote:r.gitRemote}:{},...r.gitRootCommit?{gitRootCommit:r.gitRootCommit}:{},isWorktree:r.isWorktree,reconciledAttribution:!0}}),m++}catch(u){d++,t.logger.info(`reconcile failed for ${e.externalSessionId}: ${u.message}`);continue}let p=e.tool==="claude_code"?v(e.externalSessionId,o):null,b=w({tool:e.tool,pathWasJunk:!!e.projectPath&&$(e.projectPath),endedAt:e.endedAt??null,transcript:p?o.stat(p):null});if(b.reimport&&p)try{let u=I(p,"utf-8");await f(`/api/sessions/${e.id}/reimport`,{content:u,tool:"claude_code"}),g++}catch(u){t.logger.info(`reimport failed for ${e.externalSessionId} (${b.reason}): ${u.message}`)}}let h=a-m;return t.logger.info(`reconciled attribution: scanned=${n.length} repaired=${m} reimported=${g} unrepairable=${d} remaining=${h} (of ${a} total)`),{scanned:n.length,repaired:m,reimported:g,unrepairable:d,remaining:h}}c(F,"cronReconcileAttribution");export{F as a};
@@ -1 +0,0 @@
1
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x}from"./chunk-CPDW7WW2.js";import"./chunk-ZLLER3HP.js";export{c as ClaudeCodeAdapter,i as CodexAdapter,f as CopilotAgentAdapter,d as CursorAdapter,j as PiAdapter,g as RuleMetricMcpAdapter,b as SESSION_EVENT_TYPES,a as SESSION_TOOLS,e as VSCodeCopilotAdapter,t as buildTmuxAttachCommand,s as buildTmuxHasSessionArgs,q as buildTmuxLaunchArgs,r as buildTmuxSendKeysArgs,l as detectTool,n as discoverAllSessions,h as freshCodexState,k as getAdapter,m as getAllProviders,v as getAvailableLaunchers,u as getLauncher,o as getProvider,w as sanitizeBranch,p as sanitizeTmuxName,x as worktreePathFor};