omo-ai 5.1.69 → 5.1.71

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 (408) hide show
  1. package/bin/darwin/omo-keychain +0 -0
  2. package/bin/lib/agent-dir.js +8 -1
  3. package/bin/lib/auth-store.js +11 -1
  4. package/bin/lib/bun-bin-shim.js +12 -2
  5. package/bin/lib/category-coverage.js +56 -18
  6. package/bin/lib/child-process.js +2 -1
  7. package/bin/lib/compile-safe-engine.js +14 -2
  8. package/bin/lib/daemon-adopt.js +41 -10
  9. package/bin/lib/daemon-config.js +9 -3
  10. package/bin/lib/daemon-operations.js +11 -3
  11. package/bin/lib/daemon-rollback.js +28 -23
  12. package/bin/lib/daemon-status.js +9 -3
  13. package/bin/lib/daemon.js +18 -3
  14. package/bin/lib/doctor-memory-runtime.js +46 -12
  15. package/bin/lib/doctor-migration.js +65 -38
  16. package/bin/lib/doctor-pi-config.js +8 -3
  17. package/bin/lib/doctor-reflection-lock.js +35 -12
  18. package/bin/lib/doctor.js +64 -49
  19. package/bin/lib/engine-boot.js +3 -1
  20. package/bin/lib/engine-commands.js +11 -1
  21. package/bin/lib/engine-environment.js +8 -1
  22. package/bin/lib/engine-models.js +2 -1
  23. package/bin/lib/engine-prepare.js +18 -3
  24. package/bin/lib/host-status.js +5 -1
  25. package/bin/lib/jsonc-edit.js +10 -6
  26. package/bin/lib/keychain-helper-doctor.js +13 -3
  27. package/bin/lib/launch-spec-mode.js +6 -2
  28. package/bin/lib/launcher.js +31 -19
  29. package/bin/lib/model-chains.js +12 -5
  30. package/bin/lib/npm-dist-tags.js +2 -1
  31. package/bin/lib/package-paths.js +18 -10
  32. package/bin/lib/private-fd-table.js +19 -10
  33. package/bin/lib/process-list.js +26 -0
  34. package/bin/lib/provider-map.json +1 -1
  35. package/bin/lib/rpc-stream-errors.js +6 -2
  36. package/bin/lib/same-version.js +6 -1
  37. package/bin/lib/self-update.js +41 -10
  38. package/bin/lib/service-auth.generated.js +57 -43
  39. package/bin/lib/setup-assets-import.js +25 -5
  40. package/bin/lib/setup-commandcode.js +5 -2
  41. package/bin/lib/setup-credentials.js +12 -2
  42. package/bin/lib/setup-detect-refresh.js +9 -6
  43. package/bin/lib/setup-detect.js +4 -5
  44. package/bin/lib/setup-guidance.js +1 -1
  45. package/bin/lib/setup-import.js +35 -7
  46. package/bin/lib/setup-model-choices-import.js +61 -10
  47. package/bin/lib/setup-models.js +9 -5
  48. package/bin/lib/setup-opencode-assets.js +26 -9
  49. package/bin/lib/setup-opencode-models.d.ts +4 -1
  50. package/bin/lib/setup-opencode-models.js +76 -30
  51. package/bin/lib/setup-opencode-providers.js +58 -17
  52. package/bin/lib/setup-providers-import.js +38 -6
  53. package/bin/lib/setup-report.js +9 -7
  54. package/bin/lib/setup-stream-items.js +29 -5
  55. package/bin/lib/setup-stream.d.ts +13 -3
  56. package/bin/lib/setup-stream.js +92 -15
  57. package/bin/lib/setup-summary.js +61 -18
  58. package/bin/lib/sqlite-rows.js +3 -1
  59. package/bin/lib/thread-output.js +14 -4
  60. package/bin/lib/thread.js +224 -38
  61. package/bin/lib/update-args.js +5 -1
  62. package/bin/lib/update-lock.js +13 -2
  63. package/bin/omo.js +1 -1
  64. package/package.json +2 -2
  65. package/plugin/CHANGELOG.md +148 -0
  66. package/plugin/README.md +9 -1
  67. package/plugin/extensions/gateway-store-worker.mjs +2 -2
  68. package/plugin/extensions/memory-run-supervisor.mjs +1 -1
  69. package/plugin/extensions/omo-claim-receipt.js +1 -1
  70. package/plugin/extensions/omo-computer-run-worker.mjs +1 -1
  71. package/plugin/extensions/omo-computer-use.js +2 -2
  72. package/plugin/extensions/omo-desktop-toolkit.js +1 -1
  73. package/plugin/extensions/omo-device-account.js +4 -4
  74. package/plugin/extensions/omo-device-service.js +5 -5
  75. package/plugin/extensions/omo-feedback.js +2 -2
  76. package/plugin/extensions/omo-init-deep-advisor.js +2 -2
  77. package/plugin/extensions/omo-member.js +2 -2
  78. package/plugin/extensions/omo-memory-commands.js +2 -2
  79. package/plugin/extensions/omo-memory-doctor.js +3 -3
  80. package/plugin/extensions/omo-memory-memfs.js +1 -1
  81. package/plugin/extensions/omo-memory-palace.js +3 -3
  82. package/plugin/extensions/omo-memory-sync.js +2 -2
  83. package/plugin/extensions/omo-onboarding-scan.js +2 -2
  84. package/plugin/extensions/omo-recall-store.js +1 -1
  85. package/plugin/extensions/omo-session-history.js +1 -1
  86. package/plugin/extensions/omo-side-panel.js +3 -3
  87. package/plugin/extensions/omo-task.js +2 -2
  88. package/plugin/extensions/omo-telemetry-otlp.js +2 -2
  89. package/plugin/extensions/omo-telemetry-posthog.js +1 -1
  90. package/plugin/extensions/omo-telemetry-recovery.js +1 -1
  91. package/plugin/extensions/omo-thread-client.js +5 -5
  92. package/plugin/extensions/omo.js +3 -3
  93. package/plugin/package.json +1 -1
  94. package/plugin/runtime/agent-toolkit-sdk/sdk.js +2 -2
  95. package/plugin/runtime/ast-grep-mcp/cli.js +26 -5
  96. package/plugin/runtime/ast-grep-mcp/manifest.json +2 -2
  97. package/plugin/runtime/bunshin-ts/sdk.js +4 -4
  98. package/plugin/runtime/category-coverage/index.js +6 -6
  99. package/plugin/runtime/lsp-daemon/dist/.omo-runtime-manifest.json +4 -4
  100. package/plugin/runtime/lsp-daemon/dist/cli.js +8 -2
  101. package/plugin/runtime/lsp-daemon/dist/client.js +8 -2
  102. package/plugin/runtime/lsp-daemon/dist/index.js +8 -2
  103. package/plugin/runtime/rollback-migrate.js +2 -2
  104. package/plugin/runtime/task-config/index.js +3 -3
  105. package/plugin/runtime/thread-sdk/sdk.js +5 -5
  106. package/plugin/scripts/install.mjs +20 -15
  107. package/plugin/skills/ast-grep/references/recipes.md +1 -1
  108. package/plugin/skills/ast-grep/tests/smoke.ps1 +1 -1
  109. package/plugin/skills/ast-grep/tests/smoke.sh +1 -1
  110. package/plugin/skills/browser/runtime/omowright/index.js +16 -16
  111. package/plugin/skills/browser/runtime/omowright/manifest.json +5 -5
  112. package/plugin/skills/browser/runtime/omowright/page-bundle.js +14 -4
  113. package/plugin/skills/browser/scripts/browser-doctor-report.mjs +36 -9
  114. package/plugin/skills/browser/scripts/browser-doctor.mjs +24 -7
  115. package/plugin/skills/browser/scripts/browser-engine-guard.mjs +2 -1
  116. package/plugin/skills/browser/scripts/browser-install.mjs +40 -8
  117. package/plugin/skills/debugging/references/scripts/dap.mjs +280 -170
  118. package/plugin/skills/debugging/references/scripts/fixture-adapter.mjs +104 -42
  119. package/plugin/skills/frontend/scripts/detect/cli.ts +67 -50
  120. package/plugin/skills/frontend/scripts/detect/config.ts +41 -38
  121. package/plugin/skills/frontend/scripts/detect/core/color.ts +109 -94
  122. package/plugin/skills/frontend/scripts/detect/core/page.ts +43 -42
  123. package/plugin/skills/frontend/scripts/detect/core/shadow.ts +38 -29
  124. package/plugin/skills/frontend/scripts/detect/core/source.ts +25 -20
  125. package/plugin/skills/frontend/scripts/detect/detect.ts +63 -45
  126. package/plugin/skills/frontend/scripts/detect/lint.ts +78 -69
  127. package/plugin/skills/frontend/scripts/detect/render/probe-placement.ts +36 -32
  128. package/plugin/skills/frontend/scripts/detect/render/renderer.ts +14 -13
  129. package/plugin/skills/frontend/scripts/detect/render/webview.ts +53 -50
  130. package/plugin/skills/frontend/scripts/detect/report.ts +20 -18
  131. package/plugin/skills/frontend/scripts/detect/rule.ts +21 -21
  132. package/plugin/skills/frontend/scripts/detect/rules/color/ai-color-palette.ts +144 -63
  133. package/plugin/skills/frontend/scripts/detect/rules/color/cream-palette.ts +41 -27
  134. package/plugin/skills/frontend/scripts/detect/rules/color/dark-glow.ts +59 -34
  135. package/plugin/skills/frontend/scripts/detect/rules/color/design-system-color.ts +37 -28
  136. package/plugin/skills/frontend/scripts/detect/rules/color/gradient-text.ts +68 -45
  137. package/plugin/skills/frontend/scripts/detect/rules/color/gray-on-color.ts +34 -25
  138. package/plugin/skills/frontend/scripts/detect/rules/color/index.ts +9 -2
  139. package/plugin/skills/frontend/scripts/detect/rules/color/low-contrast.ts +106 -43
  140. package/plugin/skills/frontend/scripts/detect/rules/color/radial-halo.ts +48 -23
  141. package/plugin/skills/frontend/scripts/detect/rules/color/radial-spotlight-glow.ts +49 -26
  142. package/plugin/skills/frontend/scripts/detect/rules/color/support/animation-opacity.ts +90 -66
  143. package/plugin/skills/frontend/scripts/detect/rules/color/support/color-path.ts +43 -6
  144. package/plugin/skills/frontend/scripts/detect/rules/color/support/contrast-pairs.ts +75 -38
  145. package/plugin/skills/frontend/scripts/detect/rules/color/support/contrast-role.ts +142 -59
  146. package/plugin/skills/frontend/scripts/detect/rules/color/support/glow-forms.ts +93 -44
  147. package/plugin/skills/frontend/scripts/detect/rules/color/support/gradient-samples.ts +115 -114
  148. package/plugin/skills/frontend/scripts/detect/rules/color/support/gradients.ts +77 -66
  149. package/plugin/skills/frontend/scripts/detect/rules/color/support/mockup-roots.ts +178 -48
  150. package/plugin/skills/frontend/scripts/detect/rules/color/support/page-ignore.ts +6 -2
  151. package/plugin/skills/frontend/scripts/detect/rules/color/support/painted-text.ts +171 -108
  152. package/plugin/skills/frontend/scripts/detect/rules/color/support/palette-roles.ts +60 -39
  153. package/plugin/skills/frontend/scripts/detect/rules/color/support/placeholder-contrast.ts +36 -16
  154. package/plugin/skills/frontend/scripts/detect/rules/color/support/stock-accent.ts +48 -18
  155. package/plugin/skills/frontend/scripts/detect/rules/color/support/text-colors.ts +88 -62
  156. package/plugin/skills/frontend/scripts/detect/rules/copy/aphoristic-cadence.ts +25 -15
  157. package/plugin/skills/frontend/scripts/detect/rules/copy/broken-image.ts +20 -12
  158. package/plugin/skills/frontend/scripts/detect/rules/copy/em-dash-overuse.ts +63 -39
  159. package/plugin/skills/frontend/scripts/detect/rules/copy/index.ts +9 -2
  160. package/plugin/skills/frontend/scripts/detect/rules/copy/marketing-buzzword.ts +53 -25
  161. package/plugin/skills/frontend/scripts/detect/rules/copy/numbered-section-labels.ts +49 -28
  162. package/plugin/skills/frontend/scripts/detect/rules/copy/repeated-container-text.ts +80 -47
  163. package/plugin/skills/frontend/scripts/detect/rules/copy/script-error.ts +42 -34
  164. package/plugin/skills/frontend/scripts/detect/rules/copy/skipped-heading.ts +199 -75
  165. package/plugin/skills/frontend/scripts/detect/rules/copy/support/numbered-label.ts +122 -71
  166. package/plugin/skills/frontend/scripts/detect/rules/copy/support/page-text.ts +32 -24
  167. package/plugin/skills/frontend/scripts/detect/rules/copy/theater-slop-phrase.ts +42 -13
  168. package/plugin/skills/frontend/scripts/detect/rules/decoration/blinking-cursor.ts +49 -41
  169. package/plugin/skills/frontend/scripts/detect/rules/decoration/border-accent-on-rounded.ts +10 -10
  170. package/plugin/skills/frontend/scripts/detect/rules/decoration/bounce-easing.ts +87 -68
  171. package/plugin/skills/frontend/scripts/detect/rules/decoration/buried-raster.ts +83 -64
  172. package/plugin/skills/frontend/scripts/detect/rules/decoration/codex-grid-background.ts +29 -29
  173. package/plugin/skills/frontend/scripts/detect/rules/decoration/design-system-radius.ts +33 -26
  174. package/plugin/skills/frontend/scripts/detect/rules/decoration/gpt-thin-border-wide-shadow.ts +61 -58
  175. package/plugin/skills/frontend/scripts/detect/rules/decoration/hard-offset-shadow.ts +25 -23
  176. package/plugin/skills/frontend/scripts/detect/rules/decoration/hero-eyebrow-chip.ts +16 -14
  177. package/plugin/skills/frontend/scripts/detect/rules/decoration/icon-tile-stack.ts +85 -84
  178. package/plugin/skills/frontend/scripts/detect/rules/decoration/index.ts +17 -17
  179. package/plugin/skills/frontend/scripts/detect/rules/decoration/kicker-above-heading.ts +79 -64
  180. package/plugin/skills/frontend/scripts/detect/rules/decoration/marquee.ts +57 -40
  181. package/plugin/skills/frontend/scripts/detect/rules/decoration/organic-clip-path.ts +34 -34
  182. package/plugin/skills/frontend/scripts/detect/rules/decoration/pulsing-dot.ts +92 -58
  183. package/plugin/skills/frontend/scripts/detect/rules/decoration/repeating-stripes-gradient.ts +19 -19
  184. package/plugin/skills/frontend/scripts/detect/rules/decoration/shape-assembled-illustration.ts +59 -53
  185. package/plugin/skills/frontend/scripts/detect/rules/decoration/side-tab.ts +15 -12
  186. package/plugin/skills/frontend/scripts/detect/rules/decoration/support/appearance.ts +89 -85
  187. package/plugin/skills/frontend/scripts/detect/rules/decoration/support/assert-cases.ts +17 -15
  188. package/plugin/skills/frontend/scripts/detect/rules/decoration/support/borders.ts +178 -136
  189. package/plugin/skills/frontend/scripts/detect/rules/decoration/support/clip-geometry.ts +155 -145
  190. package/plugin/skills/frontend/scripts/detect/rules/decoration/support/css-candidates.ts +60 -54
  191. package/plugin/skills/frontend/scripts/detect/rules/decoration/support/curve-samples.ts +51 -48
  192. package/plugin/skills/frontend/scripts/detect/rules/decoration/support/gradient-pattern.ts +43 -34
  193. package/plugin/skills/frontend/scripts/detect/rules/decoration/support/keyframes.ts +118 -113
  194. package/plugin/skills/frontend/scripts/detect/rules/decoration/support/labels.ts +74 -67
  195. package/plugin/skills/frontend/scripts/detect/rules/decoration/support/raster-state.ts +80 -42
  196. package/plugin/skills/frontend/scripts/detect/rules/index.ts +6 -6
  197. package/plugin/skills/frontend/scripts/detect/rules/layout/body-text-viewport-edge.ts +116 -55
  198. package/plugin/skills/frontend/scripts/detect/rules/layout/clipped-overflow-container.ts +22 -9
  199. package/plugin/skills/frontend/scripts/detect/rules/layout/content-hidden-at-rest.ts +113 -52
  200. package/plugin/skills/frontend/scripts/detect/rules/layout/cramped-padding.ts +167 -90
  201. package/plugin/skills/frontend/scripts/detect/rules/layout/edge-flush-cards.ts +82 -41
  202. package/plugin/skills/frontend/scripts/detect/rules/layout/first-viewport-column-overflow.ts +74 -37
  203. package/plugin/skills/frontend/scripts/detect/rules/layout/heading-rhythm.ts +49 -24
  204. package/plugin/skills/frontend/scripts/detect/rules/layout/index.ts +14 -3
  205. package/plugin/skills/frontend/scripts/detect/rules/layout/monotonous-spacing.ts +47 -28
  206. package/plugin/skills/frontend/scripts/detect/rules/layout/nested-cards.ts +66 -31
  207. package/plugin/skills/frontend/scripts/detect/rules/layout/straggler.ts +46 -22
  208. package/plugin/skills/frontend/scripts/detect/rules/layout/support/cards.ts +157 -82
  209. package/plugin/skills/frontend/scripts/detect/rules/layout/support/clipping.ts +98 -50
  210. package/plugin/skills/frontend/scripts/detect/rules/layout/support/declared-mockups.ts +100 -36
  211. package/plugin/skills/frontend/scripts/detect/rules/layout/support/geometry.ts +66 -43
  212. package/plugin/skills/frontend/scripts/detect/rules/layout/support/hidden-interface.ts +56 -24
  213. package/plugin/skills/frontend/scripts/detect/rules/layout/support/layout-cases.ts +23 -8
  214. package/plugin/skills/frontend/scripts/detect/rules/layout/support/line-breaks.ts +28 -16
  215. package/plugin/skills/frontend/scripts/detect/rules/layout/support/motion.ts +88 -56
  216. package/plugin/skills/frontend/scripts/detect/rules/layout/support/padding.ts +106 -68
  217. package/plugin/skills/frontend/scripts/detect/rules/layout/support/rhythm.ts +204 -128
  218. package/plugin/skills/frontend/scripts/detect/rules/layout/text-occlusion.ts +125 -70
  219. package/plugin/skills/frontend/scripts/detect/rules/layout/text-overflow.ts +111 -59
  220. package/plugin/skills/frontend/scripts/detect/rules/layout/unbalanced-heading.ts +27 -16
  221. package/plugin/skills/frontend/scripts/detect/rules/layout/viewport-reflow.ts +38 -23
  222. package/plugin/skills/frontend/scripts/detect/rules/source/ai-color-palette.ts +17 -6
  223. package/plugin/skills/frontend/scripts/detect/rules/source/aphoristic-cadence.ts +19 -9
  224. package/plugin/skills/frontend/scripts/detect/rules/source/border-accent-on-rounded.ts +31 -13
  225. package/plugin/skills/frontend/scripts/detect/rules/source/bounce-easing.ts +41 -16
  226. package/plugin/skills/frontend/scripts/detect/rules/source/broken-image.ts +19 -9
  227. package/plugin/skills/frontend/scripts/detect/rules/source/codex-grid-background.ts +36 -12
  228. package/plugin/skills/frontend/scripts/detect/rules/source/dark-glow.ts +28 -14
  229. package/plugin/skills/frontend/scripts/detect/rules/source/em-dash-overuse.ts +17 -9
  230. package/plugin/skills/frontend/scripts/detect/rules/source/gradient-text.ts +14 -6
  231. package/plugin/skills/frontend/scripts/detect/rules/source/gray-on-color.ts +18 -7
  232. package/plugin/skills/frontend/scripts/detect/rules/source/index.ts +18 -1
  233. package/plugin/skills/frontend/scripts/detect/rules/source/marketing-buzzword.ts +49 -11
  234. package/plugin/skills/frontend/scripts/detect/rules/source/marquee.ts +16 -6
  235. package/plugin/skills/frontend/scripts/detect/rules/source/monotonous-spacing.ts +35 -17
  236. package/plugin/skills/frontend/scripts/detect/rules/source/overused-font.ts +51 -10
  237. package/plugin/skills/frontend/scripts/detect/rules/source/radial-halo.ts +16 -8
  238. package/plugin/skills/frontend/scripts/detect/rules/source/side-tab.ts +88 -47
  239. package/plugin/skills/frontend/scripts/detect/rules/source/support/accent-scans.ts +103 -62
  240. package/plugin/skills/frontend/scripts/detect/rules/source/support/check-source.ts +6 -2
  241. package/plugin/skills/frontend/scripts/detect/rules/source/support/corners.ts +148 -80
  242. package/plugin/skills/frontend/scripts/detect/rules/source/support/css-effects.ts +86 -66
  243. package/plugin/skills/frontend/scripts/detect/rules/source/support/css-scopes.ts +148 -113
  244. package/plugin/skills/frontend/scripts/detect/rules/source/support/image-tags.ts +113 -105
  245. package/plugin/skills/frontend/scripts/detect/rules/source/support/js-punctuation.ts +47 -30
  246. package/plugin/skills/frontend/scripts/detect/rules/source/support/markup-scope.ts +45 -34
  247. package/plugin/skills/frontend/scripts/detect/rules/source/support/source-color.ts +64 -29
  248. package/plugin/skills/frontend/scripts/detect/rules/source/support/source-shadow.ts +17 -10
  249. package/plugin/skills/frontend/scripts/detect/rules/source/support/source-text.ts +128 -86
  250. package/plugin/skills/frontend/scripts/detect/rules/typography/all-caps-body.ts +23 -9
  251. package/plugin/skills/frontend/scripts/detect/rules/typography/design-system-font-size.ts +27 -17
  252. package/plugin/skills/frontend/scripts/detect/rules/typography/design-system-font.ts +27 -17
  253. package/plugin/skills/frontend/scripts/detect/rules/typography/extreme-negative-tracking.ts +26 -12
  254. package/plugin/skills/frontend/scripts/detect/rules/typography/flat-type-hierarchy.ts +41 -19
  255. package/plugin/skills/frontend/scripts/detect/rules/typography/index.ts +14 -3
  256. package/plugin/skills/frontend/scripts/detect/rules/typography/italic-serif-display.ts +67 -16
  257. package/plugin/skills/frontend/scripts/detect/rules/typography/justified-text.ts +47 -25
  258. package/plugin/skills/frontend/scripts/detect/rules/typography/line-length.ts +37 -21
  259. package/plugin/skills/frontend/scripts/detect/rules/typography/oversized-h1.ts +35 -14
  260. package/plugin/skills/frontend/scripts/detect/rules/typography/overused-font.ts +83 -38
  261. package/plugin/skills/frontend/scripts/detect/rules/typography/support/drawn-enlargement.ts +68 -40
  262. package/plugin/skills/frontend/scripts/detect/rules/typography/support/fading-text.ts +59 -39
  263. package/plugin/skills/frontend/scripts/detect/rules/typography/support/flex-runs.ts +13 -8
  264. package/plugin/skills/frontend/scripts/detect/rules/typography/support/font-family.ts +68 -17
  265. package/plugin/skills/frontend/scripts/detect/rules/typography/support/painted-text.ts +173 -67
  266. package/plugin/skills/frontend/scripts/detect/rules/typography/support/svg-size.ts +56 -49
  267. package/plugin/skills/frontend/scripts/detect/rules/typography/support/text-context.ts +155 -78
  268. package/plugin/skills/frontend/scripts/detect/rules/typography/support/text-lines.ts +38 -28
  269. package/plugin/skills/frontend/scripts/detect/rules/typography/support/type-hierarchy.ts +43 -38
  270. package/plugin/skills/frontend/scripts/detect/rules/typography/tight-leading.ts +67 -39
  271. package/plugin/skills/frontend/scripts/detect/rules/typography/tiny-text.ts +34 -15
  272. package/plugin/skills/frontend/scripts/detect/rules/typography/undersized-ui-text.ts +52 -22
  273. package/plugin/skills/frontend/scripts/detect/rules/typography/wide-tracking.ts +37 -19
  274. package/plugin/skills/frontend/scripts/detect/snapshot/collect.ts +154 -145
  275. package/plugin/skills/frontend/scripts/detect/snapshot/style-props.ts +121 -21
  276. package/plugin/skills/frontend/scripts/detect/testing/build-snapshot.ts +140 -65
  277. package/plugin/skills/frontend/scripts/detect/types.ts +81 -76
  278. package/plugin/skills/frontend/scripts/perfection/accent-stripes/color.ts +205 -85
  279. package/plugin/skills/frontend/scripts/perfection/accent-stripes/css-parse.ts +97 -80
  280. package/plugin/skills/frontend/scripts/perfection/accent-stripes/declarations.ts +129 -101
  281. package/plugin/skills/frontend/scripts/perfection/accent-stripes/findings.ts +23 -23
  282. package/plugin/skills/frontend/scripts/perfection/accent-stripes/gradient.ts +43 -42
  283. package/plugin/skills/frontend/scripts/perfection/accent-stripes/lint.ts +75 -60
  284. package/plugin/skills/frontend/scripts/perfection/accent-stripes/markup.ts +131 -106
  285. package/plugin/skills/frontend/scripts/perfection/accent-stripes/selector.ts +28 -25
  286. package/plugin/skills/frontend/scripts/perfection/accent-stripes/tailwind.ts +93 -78
  287. package/plugin/skills/frontend/scripts/perfection/check-accent-stripes.ts +22 -22
  288. package/plugin/skills/frontend/scripts/perfection/check-draft-guard.ts +24 -24
  289. package/plugin/skills/frontend/scripts/perfection/collect-files.ts +49 -36
  290. package/plugin/skills/frontend/scripts/perfection/draft-guard/findings.ts +10 -9
  291. package/plugin/skills/frontend/scripts/perfection/draft-guard/lint.ts +27 -24
  292. package/plugin/skills/frontend/scripts/perfection/draft-guard/rules.ts +46 -42
  293. package/plugin/skills/frontend/scripts/perfection/draft-guard/text-nodes.ts +98 -75
  294. package/plugin/skills/lsp-setup/scripts/detect-lsp.ts +162 -152
  295. package/plugin/skills/lsp-setup/scripts/lsp-server-table.ts +164 -164
  296. package/plugin/skills/lsp-setup/scripts/verify-lsp.ts +94 -91
  297. package/plugin/skills/programming/SKILL.md +2 -2
  298. package/plugin/skills/programming/scripts/go/new-project.ts +68 -68
  299. package/plugin/skills/programming/scripts/python/new-project.ts +64 -64
  300. package/plugin/skills/programming/scripts/python/new-script.ts +39 -39
  301. package/plugin/skills/programming/scripts/rust/new-project.ts +60 -57
  302. package/plugin/skills/programming/scripts/shared/run-tool.ts +7 -7
  303. package/plugin/skills/programming/scripts/typescript/check-no-excuse-rules.ts +96 -36
  304. package/plugin/skills/programming/scripts/typescript/check-test-junk-rules.ts +38 -17
  305. package/plugin/skills/programming/scripts/typescript/check-test-junk.ts +13 -2
  306. package/plugin/skills/programming/scripts/typescript/mutation-proof.ts +16 -4
  307. package/plugin/skills/programming/scripts/typescript/new-project.ts +21 -21
  308. package/plugin/skills/ultimate-browsing/engine/templates/playwright_mobile_chrome.js +65 -62
  309. package/plugin/skills/ultimate-browsing/engine/templates/playwright_real_chrome.js +73 -70
  310. package/plugin/skills/ulw-plan/scripts/plan-templates.mjs +30 -30
  311. package/plugin/skills/ulw-plan/scripts/scaffold-plan.mjs +131 -123
  312. package/plugin/skills/ulw-research/scripts/claim-kinds.mjs +178 -67
  313. package/plugin/skills/ulw-research/scripts/claims-index.mjs +117 -93
  314. package/plugin/skills/ulw-research/scripts/cli-support.mjs +73 -73
  315. package/plugin/skills/ulw-research/scripts/contracts.mjs +604 -174
  316. package/plugin/skills/ulw-research/scripts/conversion-probe.mjs +161 -113
  317. package/plugin/skills/ulw-research/scripts/css-hiding.mjs +126 -92
  318. package/plugin/skills/ulw-research/scripts/css-lite.mjs +143 -137
  319. package/plugin/skills/ulw-research/scripts/design-spec.mjs +123 -107
  320. package/plugin/skills/ulw-research/scripts/entities.mjs +66 -30
  321. package/plugin/skills/ulw-research/scripts/entry-guard.mjs +8 -8
  322. package/plugin/skills/ulw-research/scripts/fact-commands-fill.mjs +104 -51
  323. package/plugin/skills/ulw-research/scripts/fact-commands-meaning.mjs +207 -105
  324. package/plugin/skills/ulw-research/scripts/fact-commands-polish.mjs +143 -76
  325. package/plugin/skills/ulw-research/scripts/fact-commands-verify.mjs +164 -120
  326. package/plugin/skills/ulw-research/scripts/fact-commands.mjs +264 -151
  327. package/plugin/skills/ulw-research/scripts/fact-derive.mjs +92 -48
  328. package/plugin/skills/ulw-research/scripts/fact-expr.mjs +90 -78
  329. package/plugin/skills/ulw-research/scripts/fact-fill.mjs +215 -127
  330. package/plugin/skills/ulw-research/scripts/fact-ledger-kinds.mjs +305 -131
  331. package/plugin/skills/ulw-research/scripts/fact-ledger-schema.mjs +264 -158
  332. package/plugin/skills/ulw-research/scripts/fact-ledger.mjs +93 -57
  333. package/plugin/skills/ulw-research/scripts/fact-locate.mjs +204 -147
  334. package/plugin/skills/ulw-research/scripts/fact-pairs.mjs +126 -108
  335. package/plugin/skills/ulw-research/scripts/fact-recompute.mjs +89 -66
  336. package/plugin/skills/ulw-research/scripts/fidelity-binding.mjs +101 -70
  337. package/plugin/skills/ulw-research/scripts/fidelity-brief.mjs +95 -89
  338. package/plugin/skills/ulw-research/scripts/fidelity-claims.mjs +76 -48
  339. package/plugin/skills/ulw-research/scripts/fidelity-csv.mjs +27 -27
  340. package/plugin/skills/ulw-research/scripts/fidelity-lexicon.mjs +101 -78
  341. package/plugin/skills/ulw-research/scripts/fidelity-originals.mjs +124 -77
  342. package/plugin/skills/ulw-research/scripts/fidelity-policy.mjs +132 -83
  343. package/plugin/skills/ulw-research/scripts/fidelity-records.mjs +179 -117
  344. package/plugin/skills/ulw-research/scripts/fidelity-snapshot-readability.mjs +38 -33
  345. package/plugin/skills/ulw-research/scripts/fidelity-sources.mjs +92 -54
  346. package/plugin/skills/ulw-research/scripts/fidelity-state.mjs +27 -27
  347. package/plugin/skills/ulw-research/scripts/fidelity-trace.mjs +81 -48
  348. package/plugin/skills/ulw-research/scripts/fidelity-value-unit.mjs +207 -104
  349. package/plugin/skills/ulw-research/scripts/fidelity-values.mjs +255 -154
  350. package/plugin/skills/ulw-research/scripts/format-extract-css.mjs +74 -74
  351. package/plugin/skills/ulw-research/scripts/format-extract.mjs +161 -134
  352. package/plugin/skills/ulw-research/scripts/gates-fidelity.mjs +118 -59
  353. package/plugin/skills/ulw-research/scripts/gates-figures.mjs +192 -141
  354. package/plugin/skills/ulw-research/scripts/gates-layout.mjs +119 -85
  355. package/plugin/skills/ulw-research/scripts/gates-static.mjs +109 -102
  356. package/plugin/skills/ulw-research/scripts/gates-structure.mjs +105 -86
  357. package/plugin/skills/ulw-research/scripts/gates-text.mjs +169 -113
  358. package/plugin/skills/ulw-research/scripts/html-foreign-object.mjs +39 -34
  359. package/plugin/skills/ulw-research/scripts/html-lite.mjs +230 -176
  360. package/plugin/skills/ulw-research/scripts/html-markup.mjs +150 -128
  361. package/plugin/skills/ulw-research/scripts/html-text-map.mjs +125 -96
  362. package/plugin/skills/ulw-research/scripts/layout-probe.mjs +10 -8
  363. package/plugin/skills/ulw-research/scripts/lexicon.mjs +36 -19
  364. package/plugin/skills/ulw-research/scripts/markdown-closers.mjs +85 -85
  365. package/plugin/skills/ulw-research/scripts/md-lite.mjs +133 -125
  366. package/plugin/skills/ulw-research/scripts/meaning-check.mjs +154 -123
  367. package/plugin/skills/ulw-research/scripts/number-grammar.mjs +10 -8
  368. package/plugin/skills/ulw-research/scripts/numerals.mjs +181 -137
  369. package/plugin/skills/ulw-research/scripts/outcome-start.mjs +50 -36
  370. package/plugin/skills/ulw-research/scripts/outcome.mjs +194 -153
  371. package/plugin/skills/ulw-research/scripts/particles-ko.mjs +72 -70
  372. package/plugin/skills/ulw-research/scripts/placeholder.mjs +130 -112
  373. package/plugin/skills/ulw-research/scripts/polish-apply.mjs +67 -51
  374. package/plugin/skills/ulw-research/scripts/polish-diff.mjs +10 -5
  375. package/plugin/skills/ulw-research/scripts/polish-project.mjs +67 -57
  376. package/plugin/skills/ulw-research/scripts/polish-rules.mjs +120 -100
  377. package/plugin/skills/ulw-research/scripts/rational.mjs +74 -73
  378. package/plugin/skills/ulw-research/scripts/raw-decode.mjs +74 -74
  379. package/plugin/skills/ulw-research/scripts/raw-locator.mjs +32 -24
  380. package/plugin/skills/ulw-research/scripts/repair-tracker.mjs +98 -93
  381. package/plugin/skills/ulw-research/scripts/report-tools-commands.mjs +265 -176
  382. package/plugin/skills/ulw-research/scripts/report-tools.mjs +65 -62
  383. package/plugin/skills/ulw-research/scripts/sentence-split.mjs +63 -43
  384. package/plugin/skills/ulw-research/scripts/source-commands.mjs +199 -125
  385. package/plugin/skills/ulw-research/scripts/source-refresh.mjs +91 -54
  386. package/plugin/skills/ulw-research/scripts/source-snapshot.mjs +143 -102
  387. package/plugin/skills/ulw-research/scripts/source-view.mjs +82 -46
  388. package/plugin/skills/ulw-research/scripts/sources-citation.mjs +135 -96
  389. package/plugin/skills/ulw-research/scripts/text-normalize.mjs +63 -48
  390. package/plugin/skills/ulw-research/scripts/text-similarity.mjs +15 -15
  391. package/plugin/skills/ulw-research/scripts/unit-algebra.mjs +98 -66
  392. package/plugin/skills/ulw-research/scripts/unit-errors.mjs +14 -14
  393. package/plugin/skills/ulw-research/scripts/unit-metadata.mjs +30 -14
  394. package/plugin/skills/ulw-research/scripts/unit-pairs.mjs +57 -45
  395. package/plugin/skills/ulw-research/scripts/unit-precision.mjs +39 -25
  396. package/plugin/skills/ulw-research/scripts/unit-rules-shapes.mjs +79 -44
  397. package/plugin/skills/ulw-research/scripts/unit-rules.mjs +262 -135
  398. package/plugin/skills/ulw-research/scripts/units.mjs +96 -65
  399. package/plugin/skills/visual-qa/scripts/ansi.ts +3 -6
  400. package/plugin/skills/visual-qa/scripts/cli.ts +52 -52
  401. package/plugin/skills/visual-qa/scripts/east-asian-width.ts +53 -53
  402. package/plugin/skills/visual-qa/scripts/image-diff.ts +86 -86
  403. package/plugin/skills/visual-qa/scripts/png-crc.ts +16 -16
  404. package/plugin/skills/visual-qa/scripts/png-decode.ts +167 -167
  405. package/plugin/skills/visual-qa/scripts/png-synth.ts +36 -40
  406. package/plugin/skills/visual-qa/scripts/tui-grid.ts +63 -63
  407. package/plugin/skills/visual-qa/scripts/types.ts +37 -37
  408. package/plugin/skills/visual-qa/scripts/visual-qa.mjs +268 -289
@@ -52,7 +52,9 @@ const TASK_CONFIG_RUNTIME = join("runtime", "task-config", "index.js")
52
52
  */
53
53
  function loadMemoryRuntimeCaps(options) {
54
54
  try {
55
- const runtime = (options.loadRuntime ?? ((pluginRoot) => requireRuntime(join(pluginRoot, TASK_CONFIG_RUNTIME))))(options.pluginRoot)
55
+ const runtime = (options.loadRuntime ?? ((pluginRoot) => requireRuntime(join(pluginRoot, TASK_CONFIG_RUNTIME))))(
56
+ options.pluginRoot,
57
+ )
56
58
  return runtime.resolveMemoryRuntimeCaps({ cwd: options.cwd ?? process.cwd(), env: options.env ?? process.env })
57
59
  } catch {
58
60
  return undefined
@@ -75,14 +77,19 @@ function capText(maxBytes) {
75
77
  }
76
78
 
77
79
  function lastCleanupText(entry) {
78
- return entry.lastCleanup === undefined ? "; no cleanup recorded" : `; last cleanup ${entry.lastCleanup.at} removed ${entry.lastCleanup.total}`
80
+ return entry.lastCleanup === undefined
81
+ ? "; no cleanup recorded"
82
+ : `; last cleanup ${entry.lastCleanup.at} removed ${entry.lastCleanup.total}`
79
83
  }
80
84
 
81
85
  function formatMemoryRuntimeLines(identities, totalBytes) {
82
86
  if (identities.length === 0) return []
83
- const bySize = [...identities].sort((left, right) => right.bytes - left.bytes || left.identity.localeCompare(right.identity))
87
+ const bySize = [...identities].sort(
88
+ (left, right) => right.bytes - left.bytes || left.identity.localeCompare(right.identity),
89
+ )
84
90
  const lines = bySize.slice(0, LISTED_IDENTITIES).map((entry) => {
85
- if (entry.sizeUnknown !== undefined) return `INFO memory runtime: ${entry.identity} size unknown (${capText(entry.maxBytes)})${lastCleanupText(entry)}`
91
+ if (entry.sizeUnknown !== undefined)
92
+ return `INFO memory runtime: ${entry.identity} size unknown (${capText(entry.maxBytes)})${lastCleanupText(entry)}`
86
93
  const standing = runtimeSizeStanding(entry.bytes, entry.maxBytes)
87
94
  const share = standing.percent === undefined ? "" : `, ${standing.percent}%`
88
95
  return `INFO memory runtime: ${entry.identity} ${formatRuntimeBytes(entry.bytes)} (${capText(entry.maxBytes)}${share})${lastCleanupText(entry)}`
@@ -93,10 +100,14 @@ function formatMemoryRuntimeLines(identities, totalBytes) {
93
100
  lines.push(`INFO memory runtime: ${rest.length} more identities hold ${formatRuntimeBytes(restBytes)}`)
94
101
  }
95
102
  const unknown = identities.filter((entry) => entry.sizeUnknown !== undefined).length
96
- lines.push(`INFO memory runtime total: ${formatRuntimeBytes(totalBytes)} across ${identities.length} identit${identities.length === 1 ? "y" : "ies"}${unknown === 0 ? "" : ` (${unknown} not measured)`}`)
103
+ lines.push(
104
+ `INFO memory runtime total: ${formatRuntimeBytes(totalBytes)} across ${identities.length} identit${identities.length === 1 ? "y" : "ies"}${unknown === 0 ? "" : ` (${unknown} not measured)`}`,
105
+ )
97
106
  for (const entry of bySize) {
98
107
  if (entry.sizeUnknown !== undefined) {
99
- lines.push(`WARN memory runtime (${entry.identity}): size unknown: measurement exceeded ${entry.sizeUnknown.budgetMs} ms on ${entry.sizeUnknown.at}`)
108
+ lines.push(
109
+ `WARN memory runtime (${entry.identity}): size unknown: measurement exceeded ${entry.sizeUnknown.budgetMs} ms on ${entry.sizeUnknown.at}`,
110
+ )
100
111
  continue
101
112
  }
102
113
  const excess = describeRuntimeCapExcess({
@@ -107,12 +118,16 @@ function formatMemoryRuntimeLines(identities, totalBytes) {
107
118
  })
108
119
  // Over the cap, the excess line says what the next pass does; the near-cap line is for 80-100 %.
109
120
  if (excess !== undefined) {
110
- lines.push(`WARN memory runtime (${entry.identity}): ${excess}; raise memory.runtime.max_bytes, or set it to 0, to keep more.`)
121
+ lines.push(
122
+ `WARN memory runtime (${entry.identity}): ${excess}; raise memory.runtime.max_bytes, or set it to 0, to keep more.`,
123
+ )
111
124
  continue
112
125
  }
113
126
  const standing = runtimeSizeStanding(entry.bytes, entry.maxBytes)
114
127
  if (standing.level !== "warn") continue
115
- lines.push(`WARN memory runtime is near its size cap (${entry.identity}): ${formatRuntimeBytes(entry.bytes)} is ${standing.percent}% of the ${formatRuntimeBytes(entry.maxBytes)} cap (memory.runtime.max_bytes). The next maintenance pass evicts the oldest runtime data down to the cap; raise the cap, or set it to 0, to keep more.`)
128
+ lines.push(
129
+ `WARN memory runtime is near its size cap (${entry.identity}): ${formatRuntimeBytes(entry.bytes)} is ${standing.percent}% of the ${formatRuntimeBytes(entry.maxBytes)} cap (memory.runtime.max_bytes). The next maintenance pass evicts the oldest runtime data down to the cap; raise the cap, or set it to 0, to keep more.`,
130
+ )
116
131
  }
117
132
  return lines
118
133
  }
@@ -144,7 +159,14 @@ export async function memoryRuntimeReport(options = {}) {
144
159
  const startedAt = Date.now()
145
160
  const measured = await measureRuntimeSizeWithinBudget(paths.runtime, { budgetMs, now: startedAt, signal })
146
161
  if ("sizeUnknown" in measured) {
147
- identities.push({ identity, bytes: 0, maxBytes, discardUnreflectedJournals, sizeUnknown: measured.sizeUnknown, ...cleaned })
162
+ identities.push({
163
+ identity,
164
+ bytes: 0,
165
+ maxBytes,
166
+ discardUnreflectedJournals,
167
+ sizeUnknown: measured.sizeUnknown,
168
+ ...cleaned,
169
+ })
148
170
  continue
149
171
  }
150
172
  const bytes = measured.size.bytes
@@ -154,11 +176,23 @@ export async function memoryRuntimeReport(options = {}) {
154
176
  let evictableBytes
155
177
  try {
156
178
  // Printed only on the over-cap line, and only with the switch off.
157
- unreflectedBytes = overCap && !discardUnreflectedJournals ? await measureUnreflectedJournalBytes({ paths, policy, signal }) : undefined
158
- evictableBytes = overCap ? await measureRuntimeCapEvictableBytes({ paths, policy, now: Date.now, signal }) : undefined
179
+ unreflectedBytes =
180
+ overCap && !discardUnreflectedJournals
181
+ ? await measureUnreflectedJournalBytes({ paths, policy, signal })
182
+ : undefined
183
+ evictableBytes = overCap
184
+ ? await measureRuntimeCapEvictableBytes({ paths, policy, now: Date.now, signal })
185
+ : undefined
159
186
  } catch (error) {
160
187
  if (!signal.aborted) throw error
161
- identities.push({ identity, bytes: 0, maxBytes, discardUnreflectedJournals, sizeUnknown: { budgetMs, at: new Date(startedAt).toISOString() }, ...cleaned })
188
+ identities.push({
189
+ identity,
190
+ bytes: 0,
191
+ maxBytes,
192
+ discardUnreflectedJournals,
193
+ sizeUnknown: { budgetMs, at: new Date(startedAt).toISOString() },
194
+ ...cleaned,
195
+ })
162
196
  continue
163
197
  }
164
198
  identities.push({
@@ -44,8 +44,9 @@ export function resolveMigrationEnvironment({ env, platform, homeDir }) {
44
44
  .map((entry) => entry.trim())
45
45
  .filter((entry) => (isWindows ? win32.isAbsolute(entry) : isAbsolute(entry)))
46
46
  .filter((entry) => !/(?:^|[\\/])node_modules[\\/]\.bin[\\/]?$/.test(entry))
47
- const npmPrefixes = [env.npm_config_prefix, env.NPM_CONFIG_PREFIX, npmrcPrefix(homeDir)]
48
- .filter((prefix) => typeof prefix === "string" && prefix !== "")
47
+ const npmPrefixes = [env.npm_config_prefix, env.NPM_CONFIG_PREFIX, npmrcPrefix(homeDir)].filter(
48
+ (prefix) => typeof prefix === "string" && prefix !== "",
49
+ )
49
50
  // Global bins live in <prefix>/bin on POSIX and in <prefix> itself on Windows, so every global bin
50
51
  // dir on PATH also names a candidate prefix.
51
52
  for (const directory of pathDirectories) npmPrefixes.push(isWindows ? directory : dirname(directory))
@@ -77,11 +78,14 @@ export function scanOmoBins(environment) {
77
78
  if (binPath === undefined) continue
78
79
  const owner = resolveOwner(binPath)
79
80
  const kind = classify(owner)
80
- const standalone = kind === "foreign" ? standaloneBinaryVersion(binPath, environment.homeDir, environment.isWindows) : null
81
+ const standalone =
82
+ kind === "foreign" ? standaloneBinaryVersion(binPath, environment.homeDir, environment.isWindows) : null
81
83
  const broken = standalone === null ? brokenLaunchTarget(binPath, owner, environment.homeDir) : undefined
82
- entries.push(standalone === null
83
- ? { binPath, directory, owner, kind, ...(broken === undefined ? {} : { broken }) }
84
- : { binPath, directory, owner: { name: STANDALONE_LABEL, version: standalone }, kind: "standalone" })
84
+ entries.push(
85
+ standalone === null
86
+ ? { binPath, directory, owner, kind, ...(broken === undefined ? {} : { broken }) }
87
+ : { binPath, directory, owner: { name: STANDALONE_LABEL, version: standalone }, kind: "standalone" },
88
+ )
85
89
  }
86
90
  return entries
87
91
  }
@@ -162,10 +166,7 @@ function resolveOwner(binPath) {
162
166
  if (version !== undefined) return { name: "lazycodex", version }
163
167
  }
164
168
  // Ownership comes from an installed package the shim or its Bun sidecar really launches, never text alone.
165
- const entries = [
166
- ...(shim === undefined ? [] : shimEntryPaths(shim, dirname(binPath))),
167
- ...bunxEntryPaths(binPath),
168
- ]
169
+ const entries = [...(shim === undefined ? [] : shimEntryPaths(shim, dirname(binPath))), ...bunxEntryPaths(binPath)]
169
170
  for (const entry of entries) {
170
171
  if (!isInsideNodeModules(entry) || !pathExists(entry)) continue
171
172
  const owner = ownerOfFile(entry)
@@ -345,10 +346,21 @@ function omoInstallRemoval(entry, bunRoot) {
345
346
  return `npm uninstall -g omo-ai --prefix ${shellQuote(prefix)}`
346
347
  }
347
348
 
348
- export function formatMigrationLines({ shadowing, nativeDirectory, legacyPackages, registrations, restoreCommand, omoInstalls = [], bunRoot = "", standalone = false, broken = [] }) {
349
+ export function formatMigrationLines({
350
+ shadowing,
351
+ nativeDirectory,
352
+ legacyPackages,
353
+ registrations,
354
+ restoreCommand,
355
+ omoInstalls = [],
356
+ bunRoot = "",
357
+ standalone = false,
358
+ broken = [],
359
+ }) {
349
360
  const lines = []
350
361
  const first = omoInstalls[0]
351
- const target = first?.kind === "standalone" || (first === undefined && standalone) ? "the standalone omo binary" : "omo-ai"
362
+ const target =
363
+ first?.kind === "standalone" || (first === undefined && standalone) ? "the standalone omo binary" : "omo-ai"
352
364
  // A wrapper whose launch target is gone is broken wherever it sits on PATH, even
353
365
  // behind the install that runs; it gets its own line and never the repair offer
354
366
  // meant for a working older edition.
@@ -357,12 +369,15 @@ export function formatMigrationLines({ shadowing, nativeDirectory, legacyPackage
357
369
  }
358
370
  for (const entry of shadowing) {
359
371
  if (entry.broken !== undefined) continue
360
- const fix = entry.kind === "legacy" && target === "omo-ai"
361
- ? `${repairCommand()} (repairs it), or remove that file.`
362
- : nativeDirectory === null
363
- ? `remove that file, or put ${target === "omo-ai" ? "omo-ai's bin dir" : "the omo binary's directory"} ahead of it on PATH.`
364
- : `remove that file, or move ${nativeDirectory} ahead of ${entry.directory} on PATH.`
365
- lines.push(`WARN another omo precedes ${target} on PATH: ${entry.binPath} (${ownerLabel(entry.owner)}). Fix: ${fix}`)
372
+ const fix =
373
+ entry.kind === "legacy" && target === "omo-ai"
374
+ ? `${repairCommand()} (repairs it), or remove that file.`
375
+ : nativeDirectory === null
376
+ ? `remove that file, or put ${target === "omo-ai" ? "omo-ai's bin dir" : "the omo binary's directory"} ahead of it on PATH.`
377
+ : `remove that file, or move ${nativeDirectory} ahead of ${entry.directory} on PATH.`
378
+ lines.push(
379
+ `WARN another omo precedes ${target} on PATH: ${entry.binPath} (${ownerLabel(entry.owner)}). Fix: ${fix}`,
380
+ )
366
381
  }
367
382
  // Every further install is a second copy, whatever its kind: two omo-ai installs
368
383
  // of different versions, or from different managers, are the same warning. The
@@ -378,21 +393,28 @@ export function formatMigrationLines({ shadowing, nativeDirectory, legacyPackage
378
393
  if (shadowedOmo.length > 0) {
379
394
  const others = shadowedOmo.map((entry) => `${entry.binPath} (${ownerLabel(entry.owner)})`).join(", ")
380
395
  const removals = shadowedOmo.map((entry) => omoInstallRemoval(entry, bunRoot)).join(" and ")
381
- lines.push(`WARN more than one OmO install is on PATH: ${first.binPath} (${ownerLabel(first.owner)}) runs when you type omo; ${others} never runs. Keep one: ${removals}, or ${omoInstallRemoval(first, bunRoot)} to use the other.`)
396
+ lines.push(
397
+ `WARN more than one OmO install is on PATH: ${first.binPath} (${ownerLabel(first.owner)}) runs when you type omo; ${others} never runs. Keep one: ${removals}, or ${omoInstallRemoval(first, bunRoot)} to use the other.`,
398
+ )
382
399
  }
383
400
  for (const found of legacyPackages) {
384
401
  const label = ownerLabel({ name: found.name, version: found.version })
385
- const remove = found.manager === "npm"
386
- ? restoreCommand === null
387
- ? `npm uninstall -g ${found.name}`
388
- : `npm uninstall -g ${found.name}, then re-run ${restoreCommand} if omo disappears.`
389
- : `bun remove -g ${found.name}`
390
- lines.push(`WARN legacy package ${label} is still installed globally (${found.manager}: ${found.packageDir}). Remove: ${remove}`)
402
+ const remove =
403
+ found.manager === "npm"
404
+ ? restoreCommand === null
405
+ ? `npm uninstall -g ${found.name}`
406
+ : `npm uninstall -g ${found.name}, then re-run ${restoreCommand} if omo disappears.`
407
+ : `bun remove -g ${found.name}`
408
+ lines.push(
409
+ `WARN legacy package ${label} is still installed globally (${found.manager}: ${found.packageDir}). Remove: ${remove}`,
410
+ )
391
411
  }
392
412
  const byName = new Map()
393
413
  for (const { name, path } of registrations) byName.set(name, [...(byName.get(name) ?? []), path])
394
414
  for (const [name, paths] of byName) {
395
- lines.push(`INFO OpenCode still loads the ${name} plugin (${paths.join(", ")}). Keep it if you still use OpenCode; otherwise remove the plugin entry.`)
415
+ lines.push(
416
+ `INFO OpenCode still loads the ${name} plugin (${paths.join(", ")}). Keep it if you still use OpenCode; otherwise remove the plugin entry.`,
417
+ )
396
418
  }
397
419
  return lines
398
420
  }
@@ -400,7 +422,9 @@ export function formatMigrationLines({ shadowing, nativeDirectory, legacyPackage
400
422
  // The OpenCode edition's model settings Native does not use: the same line Native's first start
401
423
  // prints (omo-senpi config-startup), for as long as the gap exists.
402
424
  export function openCodeRoutingReport({ env, homeDir }) {
403
- const path = ["omo.jsonc", "omo.json"].map((name) => join(homeDir, ".omo", name)).find((candidate) => readWholeFile(candidate) !== undefined)
425
+ const path = ["omo.jsonc", "omo.json"]
426
+ .map((name) => join(homeDir, ".omo", name))
427
+ .find((candidate) => readWholeFile(candidate) !== undefined)
404
428
  let document = {}
405
429
  if (path !== undefined) {
406
430
  try {
@@ -420,15 +444,18 @@ export function migrationReport(options, restoreCommand) {
420
444
  const environment = resolveMigrationEnvironment({ env, platform: options.platform ?? process.platform, homeDir })
421
445
  const bins = scanOmoBins(environment)
422
446
  const omoInstalls = omoInstallsOnPath(bins)
423
- return [...formatMigrationLines({
424
- shadowing: shadowingOmoBins(bins),
425
- nativeDirectory: omoInstalls[0]?.directory ?? null,
426
- legacyPackages: findLegacyPackages(environment),
427
- registrations: findOpenCodeRegistrations(environment.opencodeConfigFiles),
428
- restoreCommand,
429
- omoInstalls,
430
- bunRoot: environment.bunRoot,
431
- standalone: options.standalone === true,
432
- broken: bins.filter((entry) => entry.broken !== undefined),
433
- }), ...openCodeRoutingReport({ env, homeDir })]
447
+ return [
448
+ ...formatMigrationLines({
449
+ shadowing: shadowingOmoBins(bins),
450
+ nativeDirectory: omoInstalls[0]?.directory ?? null,
451
+ legacyPackages: findLegacyPackages(environment),
452
+ registrations: findOpenCodeRegistrations(environment.opencodeConfigFiles),
453
+ restoreCommand,
454
+ omoInstalls,
455
+ bunRoot: environment.bunRoot,
456
+ standalone: options.standalone === true,
457
+ broken: bins.filter((entry) => entry.broken !== undefined),
458
+ }),
459
+ ...openCodeRoutingReport({ env, homeDir }),
460
+ ]
434
461
  }
@@ -53,8 +53,10 @@ export function findPiConfigEdits({ agentDir, homeDir }) {
53
53
  export function formatPiConfigLines(agentDir, edits) {
54
54
  return [
55
55
  `INFO config dir: ${agentDir}`,
56
- ...edits.map((edit) =>
57
- `WARN You edited ${edit.piPath} after omo moved to ${agentDir}; omo reads ${edit.agentPath}. Copy your change there (or run: omo config import-pi ${edit.file}).`),
56
+ ...edits.map(
57
+ (edit) =>
58
+ `WARN You edited ${edit.piPath} after omo moved to ${agentDir}; omo reads ${edit.agentPath}. Copy your change there (or run: omo config import-pi ${edit.file}).`,
59
+ ),
58
60
  ]
59
61
  }
60
62
 
@@ -65,6 +67,9 @@ export function piConfigReport(options = {}) {
65
67
  try {
66
68
  return formatPiConfigLines(agentDir, findPiConfigEdits({ agentDir, homeDir }))
67
69
  } catch (error) {
68
- return [`INFO config dir: ${agentDir}`, `WARN could not check ${join(homeDir, ".pi", "agent")} for config edits: ${error.message}`]
70
+ return [
71
+ `INFO config dir: ${agentDir}`,
72
+ `WARN could not check ${join(homeDir, ".pi", "agent")} for config edits: ${error.message}`,
73
+ ]
69
74
  }
70
75
  }
@@ -48,12 +48,18 @@ export function formatReflectionLockLines(identity, verdict, reflectionDir, deci
48
48
  if (verdict.state === "none" || verdict.state === "live") return []
49
49
  const lock = join(reflectionDir, "active.lock")
50
50
  if (verdict.state === "dead") {
51
- return [`WARN memory reflection is stuck on a stale lock (${identity}): run ${verdict.runId} still holds ${lock}, but its launcher is gone and it already recorded its outcome. Next step: open a session and send /reflect (or any message); the session settles that run and starts any queued request.`]
51
+ return [
52
+ `WARN memory reflection is stuck on a stale lock (${identity}): run ${verdict.runId} still holds ${lock}, but its launcher is gone and it already recorded its outcome. Next step: open a session and send /reflect (or any message); the session settles that run and starts any queued request.`,
53
+ ]
52
54
  }
53
55
  if (decision?.kind === "reap") {
54
- return [`WARN memory reflection is stuck on a stale lock (${identity}): run ${verdict.runId} still holds ${lock} and ${decision.reason}. Next step: omo doctor --fix (it would apply ${decision.action}).`]
56
+ return [
57
+ `WARN memory reflection is stuck on a stale lock (${identity}): run ${verdict.runId} still holds ${lock} and ${decision.reason}. Next step: omo doctor --fix (it would apply ${decision.action}).`,
58
+ ]
55
59
  }
56
- return [`WARN memory reflection is stuck on a stale lock (${identity}): run ${verdict.runId} still holds ${lock} and ${verdict.reason}. Next step: run /doctor in a session; if no reflection run is active, run omo doctor --fix.`]
60
+ return [
61
+ `WARN memory reflection is stuck on a stale lock (${identity}): run ${verdict.runId} still holds ${lock} and ${verdict.reason}. Next step: run /doctor in a session; if no reflection run is active, run omo doctor --fix.`,
62
+ ]
57
63
  }
58
64
 
59
65
  function listDurableIdentities(agentsRoot) {
@@ -98,7 +104,9 @@ function loadTaskConfigRuntime() {
98
104
  export function readGlobalMemorySettings(home = homedir(), options = {}) {
99
105
  try {
100
106
  const runtime = (options.loadTaskConfig ?? loadTaskConfigRuntime)()
101
- return runtime.resolveGlobalMemorySettings({ env: { ...(options.env ?? process.env), HOME: home, USERPROFILE: home } })
107
+ return runtime.resolveGlobalMemorySettings({
108
+ env: { ...(options.env ?? process.env), HOME: home, USERPROFILE: home },
109
+ })
102
110
  } catch {
103
111
  return undefined
104
112
  }
@@ -119,29 +127,44 @@ export async function reflectionLockFix(options = {}) {
119
127
  return formatStaleLockFixLines(identity.name, report, locks)
120
128
  } catch (error) {
121
129
  failed = true
122
- return [`FAIL ${identity.name} reflection lock fix failed: ${error instanceof Error ? error.message : String(error)}`]
130
+ return [
131
+ `FAIL ${identity.name} reflection lock fix failed: ${error instanceof Error ? error.message : String(error)}`,
132
+ ]
123
133
  }
124
134
  }
125
135
  const orphans = async (identity) => {
126
136
  try {
127
- return orphanLines(identity.name, await sweepIdentityOrphanWorktrees(identity.root, { now: (probe.now ?? Date.now)(), dryRun }), dryRun)
137
+ return orphanLines(
138
+ identity.name,
139
+ await sweepIdentityOrphanWorktrees(identity.root, { now: (probe.now ?? Date.now)(), dryRun }),
140
+ dryRun,
141
+ )
128
142
  } catch (error) {
129
143
  failed = true
130
- return [`FAIL ${identity.name} orphan worktree sweep failed: ${error instanceof Error ? error.message : String(error)}`]
144
+ return [
145
+ `FAIL ${identity.name} orphan worktree sweep failed: ${error instanceof Error ? error.message : String(error)}`,
146
+ ]
131
147
  }
132
148
  }
133
- const settings = options.memorySettings ?? readGlobalMemorySettings(options.home ?? homedir(), {
134
- env: options.env ?? process.env,
135
- ...(options.loadTaskConfig === undefined ? {} : { loadTaskConfig: options.loadTaskConfig }),
149
+ const settings =
150
+ options.memorySettings ??
151
+ readGlobalMemorySettings(options.home ?? homedir(), {
152
+ env: options.env ?? process.env,
153
+ ...(options.loadTaskConfig === undefined ? {} : { loadTaskConfig: options.loadTaskConfig }),
154
+ })
155
+ const retention = createRetentionHostSweepStep({
156
+ ...(settings === undefined ? {} : { settings }),
157
+ ...(probe.now === undefined ? {} : { now: probe.now }),
158
+ dryRun,
136
159
  })
137
- const retention = createRetentionHostSweepStep({ ...(settings === undefined ? {} : { settings }), ...(probe.now === undefined ? {} : { now: probe.now }), dryRun })
138
160
  const retain = async (identity) => {
139
161
  const lines = await retention(identity)
140
162
  if (lines.some((line) => line.startsWith("FAIL "))) failed = true
141
163
  return lines
142
164
  }
143
165
  const result = await sweepHostIdentities({ memoryRoot: memory, steps: [reap, orphans, retain], dryRun })
144
- if (result.status === "busy") return { lines: ["INFO another sweep is running on this host; try again when it finishes"], failed: false }
166
+ if (result.status === "busy")
167
+ return { lines: ["INFO another sweep is running on this host; try again when it finishes"], failed: false }
145
168
  const lines = result.lines.filter((line) => !/^INFO \S+ locks reclaimed 0, kept 0$/.test(line))
146
169
  if (lines.length === 0) lines.push(dryRun ? "INFO nothing to fix" : "PASS no stale reflection locks")
147
170
  return { lines, failed }
package/bin/lib/doctor.js CHANGED
@@ -1,16 +1,24 @@
1
- import { spawnSync } from "node:child_process"
2
1
  import { existsSync, readFileSync, readdirSync, statSync } from "node:fs"
3
2
  import { homedir } from "node:os"
4
3
  import { join, resolve } from "node:path"
5
4
  import { canonicalAgentDir } from "./agent-dir.js"
6
5
  import { fetchNpmDistTagsSync } from "./npm-dist-tags.js"
7
- import { channelDistTagVersion, packageManifest, packageRoot, readJson, releaseChannel, resolveSenpi, updateTarget } from "./package-paths.js"
6
+ import {
7
+ channelDistTagVersion,
8
+ packageManifest,
9
+ packageRoot,
10
+ readJson,
11
+ releaseChannel,
12
+ resolveSenpi,
13
+ updateTarget,
14
+ } from "./package-paths.js"
8
15
  import { daemonReportLines } from "./daemon.js"
9
16
  import { migrationReport } from "./doctor-migration.js"
10
17
  import { launchSpecDoctorLines } from "./launch-spec-mode.js"
11
18
  import { piConfigReport } from "./doctor-pi-config.js"
12
19
  import { needsSetupSuggestion } from "./setup-detect.js"
13
20
  import { keychainHelperDoctorLines } from "./keychain-helper-doctor.js"
21
+ import { listProcesses } from "./process-list.js"
14
22
  import { sameVersion } from "./same-version.js"
15
23
 
16
24
  export function installedDistTag(version) {
@@ -62,7 +70,9 @@ export function warningsForSettings() {
62
70
  return entry !== null && typeof entry === "object" && entry.source === "@code-yeongyu/omo-senpi"
63
71
  })
64
72
  return duplicate
65
- ? ["WARN duplicate @code-yeongyu/omo-senpi package entry; remove it from the packages array because omo loads the packaged extension"]
73
+ ? [
74
+ "WARN duplicate @code-yeongyu/omo-senpi package entry; remove it from the packages array because omo loads the packaged extension",
75
+ ]
66
76
  : []
67
77
  }
68
78
 
@@ -86,37 +96,27 @@ function engineVersionOrUnresolved(senpi) {
86
96
  const ENGINE_MARKERS = ["senpi/dist/cli.js", "senpi/dist/bundle/cli.js"]
87
97
  const MANAGED_MODE_FLAG = "--mode"
88
98
 
89
- /**
90
- * Reads the live process table. `ps` is the portable answer on macOS and Linux alike, and reading
91
- * it can never be a reason for diagnostics to fail, so an unavailable or unparsable listing is an
92
- * empty list.
93
- */
94
- export function listProcesses() {
95
- if (process.platform === "win32") return []
96
- // -ww: an unlimited width, so `args` is never cut at the terminal width (BSD/macOS `ps` truncates).
97
- const listed = spawnSync("ps", ["-ww", "-axo", "pid=,ppid=,etime=,tty=,args="], { encoding: "utf8" })
98
- if (listed.status !== 0 || typeof listed.stdout !== "string") return []
99
- const entries = []
100
- for (const line of listed.stdout.split("\n")) {
101
- const match = /^\s*(\d+)\s+(\d+)\s+(\S+)\s+(\S+)\s+(.*)$/.exec(line)
102
- if (!match) continue
103
- entries.push({
104
- pid: Number(match[1]),
105
- ppid: Number(match[2]),
106
- elapsed: match[3],
107
- tty: match[4],
108
- command: match[5],
109
- })
110
- }
111
- return entries
112
- }
113
-
114
99
  // A standalone binary runs its engine as the provisioned runtime executable itself. The same
115
100
  // executable also serves omo's own commands, internal hosts and bundled scripts, so only a bare launch
116
101
  // or engine flags count; those other roles are never engines.
117
102
  const BINARY_RUNTIME_EXECUTABLE = String.raw`[\\/]binary-runtime[\\/][^\\/\s]+[\\/]omo(?:\.exe)?`
118
103
  const BINARY_ENGINE = new RegExp(String.raw`${BINARY_RUNTIME_EXECUTABLE}(?=\s|$)\s*(\S*)`)
119
- const BINARY_NON_ENGINE_COMMANDS = new Set(["doctor", "setup", "daemon", "update", "upgrade", "host", "install", "remove", "list", "config", "auth", "ulw-loop", "--version", "-v"])
104
+ const BINARY_NON_ENGINE_COMMANDS = new Set([
105
+ "doctor",
106
+ "setup",
107
+ "daemon",
108
+ "update",
109
+ "upgrade",
110
+ "host",
111
+ "install",
112
+ "remove",
113
+ "list",
114
+ "config",
115
+ "auth",
116
+ "ulw-loop",
117
+ "--version",
118
+ "-v",
119
+ ])
120
120
 
121
121
  function isBinaryEngine(command) {
122
122
  const match = BINARY_ENGINE.exec(command)
@@ -169,7 +169,7 @@ export function formatStaleEngineLines(stale) {
169
169
  const lines = stale.map((entry) =>
170
170
  entry.retiredAppServer
171
171
  ? `WARN stale engine pid ${entry.pid} (age ${entry.elapsed}, tty ${entry.tty}) is an app-server daemon started by an older version; that command was removed, so stop it`
172
- : `WARN stale engine pid ${entry.pid} (age ${entry.elapsed}, tty ${entry.tty}) has no launcher; it was orphaned by a signaled launcher`
172
+ : `WARN stale engine pid ${entry.pid} (age ${entry.elapsed}, tty ${entry.tty}) has no launcher; it was orphaned by a signaled launcher`,
173
173
  )
174
174
  lines.push(`INFO reap them explicitly by pid: omo doctor --reap ${stale.map((entry) => entry.pid).join(" ")}`)
175
175
  return lines
@@ -213,10 +213,13 @@ export function classifyRetiredPayloadEngines(entries, input) {
213
213
 
214
214
  export function formatRetiredPayloadLines(retired) {
215
215
  if (retired.length === 0) return []
216
- const lines = retired.map((entry) =>
217
- `WARN engine pid ${entry.pid} (age ${entry.elapsed}, tty ${entry.tty}) started before this payload was installed; it still runs the previous plugin copy`
216
+ const lines = retired.map(
217
+ (entry) =>
218
+ `WARN engine pid ${entry.pid} (age ${entry.elapsed}, tty ${entry.tty}) started before this payload was installed; it still runs the previous plugin copy`,
219
+ )
220
+ lines.push(
221
+ "INFO restart those sessions to pick up the installed payload; a running engine is never rewritten in place",
218
222
  )
219
- lines.push("INFO restart those sessions to pick up the installed payload; a running engine is never rewritten in place")
220
223
  return lines
221
224
  }
222
225
 
@@ -261,7 +264,9 @@ export function reapStaleEngines(args, options = {}) {
261
264
  continue
262
265
  }
263
266
  if (!isInteractive(entry)) {
264
- lines.push(`FAIL refusing pid ${pid}: it is a managed engine (${MANAGED_MODE_FLAG}), owned by whatever started it`)
267
+ lines.push(
268
+ `FAIL refusing pid ${pid}: it is a managed engine (${MANAGED_MODE_FLAG}), owned by whatever started it`,
269
+ )
265
270
  failed = true
266
271
  continue
267
272
  }
@@ -339,24 +344,28 @@ export function formatTransientMemoryLines(counts) {
339
344
 
340
345
  export function transientMemoryReport(options) {
341
346
  const root = memoryRoot(options.env ?? process.env)
342
- return formatTransientMemoryLines(countTransientMemoryIdentities({
343
- agentsRoot: join(root, MEMORY_AGENTS_DIRNAME),
344
- transientRoot: join(root, MEMORY_TRANSIENT_DIRNAME),
345
- listDirs: options.listDirs ?? listSubdirectories,
346
- hasRepo: options.hasRepo ?? ((identityRoot) => existsSync(join(identityRoot, MEMORY_REPO_DIRNAME))),
347
- }))
347
+ return formatTransientMemoryLines(
348
+ countTransientMemoryIdentities({
349
+ agentsRoot: join(root, MEMORY_AGENTS_DIRNAME),
350
+ transientRoot: join(root, MEMORY_TRANSIENT_DIRNAME),
351
+ listDirs: options.listDirs ?? listSubdirectories,
352
+ hasRepo: options.hasRepo ?? ((identityRoot) => existsSync(join(identityRoot, MEMORY_REPO_DIRNAME))),
353
+ }),
354
+ )
348
355
  }
349
356
 
350
357
  function retiredPayloadReport(options) {
351
358
  const list = options.list ?? listProcesses
352
359
  const now = options.now ?? Date.now
353
- const payloadMtimeMs = options.payloadMtimeMs ?? ((payloadDir) => {
354
- try {
355
- return statSync(join(payloadDir, "extensions", "omo.js")).mtimeMs
356
- } catch {
357
- return undefined
358
- }
359
- })
360
+ const payloadMtimeMs =
361
+ options.payloadMtimeMs ??
362
+ ((payloadDir) => {
363
+ try {
364
+ return statSync(join(payloadDir, "extensions", "omo.js")).mtimeMs
365
+ } catch {
366
+ return undefined
367
+ }
368
+ })
360
369
  return formatRetiredPayloadLines(classifyRetiredPayloadEngines(list(), { payloadMtimeMs, nowMs: now() }))
361
370
  }
362
371
 
@@ -366,7 +375,11 @@ function daemonReport(options) {
366
375
  const engine = options.daemonEngine
367
376
  if (engine === undefined) return []
368
377
  return daemonReportLines({
369
- engine, pluginRoot: join(packageRoot, "plugin"), agentDir: canonicalAgentDir(), env: process.env, platform: process.platform,
378
+ engine,
379
+ pluginRoot: join(packageRoot, "plugin"),
380
+ agentDir: canonicalAgentDir(),
381
+ env: process.env,
382
+ platform: process.platform,
370
383
  })
371
384
  }
372
385
 
@@ -417,7 +430,9 @@ export function runDoctor(inventory, args = [], options = {}) {
417
430
 
418
431
  const version = packageManifest().version
419
432
  const latest = latestFromDistTags(readDistTags(options), version)
420
- lines.push(`INFO omo · Edition: Native · Installed: ${version} (engine: senpi ${engineVersionOrUnresolved(senpi)}) · Latest: ${latest}`)
433
+ lines.push(
434
+ `INFO omo · Edition: Native · Installed: ${version} (engine: senpi ${engineVersionOrUnresolved(senpi)}) · Latest: ${latest}`,
435
+ )
421
436
  lines.push(`INFO Update: ${updateTarget().command}`)
422
437
  lines.push(...migrationReport(options, updateTarget().command))
423
438
  lines.push(...warningsForSettings())
@@ -22,6 +22,8 @@ try {
22
22
  }
23
23
  } catch (error) {
24
24
  // The memory component's registration still selects once when the first session opens.
25
- process.stderr.write(`omo: memory sync could not start at boot: ${error instanceof Error ? error.message : String(error)}\n`)
25
+ process.stderr.write(
26
+ `omo: memory sync could not start at boot: ${error instanceof Error ? error.message : String(error)}\n`,
27
+ )
26
28
  }
27
29
  await import(moduleUrl(cliPath))
@@ -1,7 +1,17 @@
1
1
  // The engine dispatches these one-shot commands on argv[0] before any session starts, so they must
2
2
  // reach it with the command first; a leading `--extension` turns them into a chat launch (#9572).
3
3
  // The list is checked against the installed engine's own dispatch by test/engine-commands.test.ts.
4
- const ENGINE_COMMANDS = new Set(["install", "remove", "uninstall", "update", "list", "config", "auth", "host", "schedule"])
4
+ const ENGINE_COMMANDS = new Set([
5
+ "install",
6
+ "remove",
7
+ "uninstall",
8
+ "update",
9
+ "list",
10
+ "config",
11
+ "auth",
12
+ "host",
13
+ "schedule",
14
+ ])
5
15
 
6
16
  export function isEngineCommand(args) {
7
17
  const command = args[0]
@@ -3,7 +3,14 @@ import { delimiter, isAbsolute, join, relative, sep } from "node:path"
3
3
  import { canonicalAgentDir } from "./agent-dir.js"
4
4
  import { OMO_BRAND_LOGO } from "./brand-logo.generated.js"
5
5
  import { HERDR_AGENT_MARKER } from "./herdr-agent-hint.js"
6
- import { nearestNodeBin, packageManifest, packageRoot, readJson, releaseChannel, updateTarget } from "./package-paths.js"
6
+ import {
7
+ nearestNodeBin,
8
+ packageManifest,
9
+ packageRoot,
10
+ readJson,
11
+ releaseChannel,
12
+ updateTarget,
13
+ } from "./package-paths.js"
7
14
 
8
15
  // Identity the engine adopts for this install: what the user sees, where state lives, which
9
16
  // environment prefix is read first, what goes on the wire, and which channel to check for
@@ -19,7 +19,8 @@ import { resolveSenpi } from "./package-paths.js"
19
19
  async function builtinCatalog() {
20
20
  const { packageRoot } = resolveSenpi()
21
21
  const piAiRoot = engineDependencyDir(packageRoot, "@earendil-works/pi-ai")
22
- if (piAiRoot === undefined) throw new Error(`the engine model catalog is missing: @earendil-works/pi-ai is not resolvable from ${packageRoot}`)
22
+ if (piAiRoot === undefined)
23
+ throw new Error(`the engine model catalog is missing: @earendil-works/pi-ai is not resolvable from ${packageRoot}`)
23
24
  const path = join(piAiRoot, "dist", "providers", "all.js")
24
25
  if (!existsSync(path)) throw new Error(`the engine model catalog is missing at ${path}`)
25
26
  return (await import(pathToFileURL(path).href)).builtinProviders()