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
@@ -32,16 +32,31 @@ function isPreparedFor(senpiRoot, omoVersion) {
32
32
  * of omo-ai under a loose umask rewrites the plugin while the engine tree keeps its stamp (#9208).
33
33
  * Fail-open like the engine preparation: a failure warns with the manual fix and never blocks.
34
34
  */
35
- export function preparePluginLaunchSpec({ pluginRoot, report = (line) => { process.stderr.write(line) }, io = {} }) {
35
+ export function preparePluginLaunchSpec({
36
+ pluginRoot,
37
+ report = (line) => {
38
+ process.stderr.write(line)
39
+ },
40
+ io = {},
41
+ }) {
36
42
  try {
37
43
  normalizeLaunchSpecMode(pluginRoot, io)
38
44
  } catch (error) {
39
45
  const path = join(pluginRoot, LAUNCH_SPEC_FILENAME)
40
- report(`omo: could not make ${path} private (${error.message}); task children and teams need it, run: chmod 644 ${path}\n`)
46
+ report(
47
+ `omo: could not make ${path} private (${error.message}); task children and teams need it, run: chmod 644 ${path}\n`,
48
+ )
41
49
  }
42
50
  }
43
51
 
44
- export function ensureEnginePrepared({ senpiRoot, omoVersion, reinstallCommand, report = (line) => { process.stderr.write(line) } }) {
52
+ export function ensureEnginePrepared({
53
+ senpiRoot,
54
+ omoVersion,
55
+ reinstallCommand,
56
+ report = (line) => {
57
+ process.stderr.write(line)
58
+ },
59
+ }) {
45
60
  if (isPreparedFor(senpiRoot, omoVersion)) return
46
61
  try {
47
62
  prepareInstalledEngine(senpiRoot)
@@ -40,7 +40,11 @@ function withLastActivity(payload, readActivity) {
40
40
  }
41
41
 
42
42
  function inventory(stdout) {
43
- const line = stdout.trim().split("\n").filter((candidate) => candidate.trim() !== "").pop()
43
+ const line = stdout
44
+ .trim()
45
+ .split("\n")
46
+ .filter((candidate) => candidate.trim() !== "")
47
+ .pop()
44
48
  if (line === undefined) return undefined
45
49
  try {
46
50
  const parsed = JSON.parse(line)
@@ -72,7 +72,8 @@ function lineIndent(text, index) {
72
72
  }
73
73
 
74
74
  function indentOf(text, node) {
75
- const closing = lineIndent(text, node.close) ?? /^[ \t]*/.exec(text.slice(text.lastIndexOf("\n", node.open - 1) + 1))[0]
75
+ const closing =
76
+ lineIndent(text, node.close) ?? /^[ \t]*/.exec(text.slice(text.lastIndexOf("\n", node.open - 1) + 1))[0]
76
77
  const first = node.members[0]
77
78
  return { closing, member: (first && lineIndent(text, first.keyStart)) ?? `${closing} ` }
78
79
  }
@@ -87,7 +88,8 @@ function insertInto(text, node, key, value) {
87
88
  if (node.members.length === 0) {
88
89
  const inner = text.slice(node.open + 1, node.close)
89
90
  // An empty `{}` (or one holding only whitespace) is rewritten whole; one holding a comment keeps it.
90
- if (inner.trim() === "") return `${text.slice(0, node.open + 1)}\n${member}\n${indent.closing}${text.slice(node.close)}`
91
+ if (inner.trim() === "")
92
+ return `${text.slice(0, node.open + 1)}\n${member}\n${indent.closing}${text.slice(node.close)}`
91
93
  return `${text.slice(0, node.open + 1)}\n${member}${text.slice(node.open + 1)}`
92
94
  }
93
95
  let at = node.close
@@ -131,10 +133,12 @@ export function insertJsoncMember(text, path, key, value) {
131
133
  if (member.object === undefined) throw new TypeError(`${path.slice(0, depth + 1).join(".")} is not an object`)
132
134
  node = member.object
133
135
  }
134
- if (depth === path.length && node.members.some((member) => member.key === key)) throw new TypeError(`${[...path, key].join(".")} already exists`)
135
- const next = depth === path.length
136
- ? insertInto(text, node, key, value)
137
- : insertInto(text, node, path[depth], nest(path.slice(depth + 1), key, value))
136
+ if (depth === path.length && node.members.some((member) => member.key === key))
137
+ throw new TypeError(`${[...path, key].join(".")} already exists`)
138
+ const next =
139
+ depth === path.length
140
+ ? insertInto(text, node, key, value)
141
+ : insertInto(text, node, path[depth], nest(path.slice(depth + 1), key, value))
138
142
  if (!isDeepStrictEqual(parseJsonc(next), setIn(parseJsonc(text), path, key, value))) {
139
143
  throw new SyntaxError("the edited document does not parse back to the intended value")
140
144
  }
@@ -9,17 +9,27 @@ export const KEYCHAIN_HELPER_REQUIREMENT =
9
9
  'and certificate leaf[field.1.2.840.113635.100.6.1.13] and certificate leaf[subject.OU] = "523JNR86LZ"'
10
10
 
11
11
  const verifyWithCodesign = (path) =>
12
- spawnSync("/usr/bin/codesign", ["--verify", "--strict", `-R=${KEYCHAIN_HELPER_REQUIREMENT}`, path], { stdio: "ignore" }).status === 0
12
+ spawnSync("/usr/bin/codesign", ["--verify", "--strict", `-R=${KEYCHAIN_HELPER_REQUIREMENT}`, path], {
13
+ stdio: "ignore",
14
+ }).status === 0
13
15
 
14
16
  /**
15
17
  * The one place a missing or damaged keychain helper is reported (#11262 addendum Q1/row 9): normal output stays silent
16
18
  * and sign-in takes the previous path, so this is a warning, never a failure. macOS only.
17
19
  */
18
- export function keychainHelperDoctorLines({ packageRoot, helperRelPath = "bin/darwin/omo-keychain", platform = process.platform, exists = existsSync, verify = verifyWithCodesign }) {
20
+ export function keychainHelperDoctorLines({
21
+ packageRoot,
22
+ helperRelPath = "bin/darwin/omo-keychain",
23
+ platform = process.platform,
24
+ exists = existsSync,
25
+ verify = verifyWithCodesign,
26
+ }) {
19
27
  if (platform !== "darwin") return []
20
28
  const helper = join(packageRoot, helperRelPath)
21
29
  if (!exists(helper))
22
- return [`WARN keychain helper: missing ${helperRelPath}; macOS sign-in uses the previous keychain path and may ask for access again. Reinstall omo.`]
30
+ return [
31
+ `WARN keychain helper: missing ${helperRelPath}; macOS sign-in uses the previous keychain path and may ask for access again. Reinstall omo.`,
32
+ ]
23
33
  if (!verify(helper))
24
34
  return [`WARN keychain helper: ${helperRelPath} failed its signature check and is never run; reinstall omo.`]
25
35
  return [`PASS keychain helper: ${helperRelPath} (signed)`]
@@ -68,11 +68,15 @@ export function launchSpecDoctorLines(pluginRoot, io = {}) {
68
68
  const uid = io.getuid === undefined ? currentUid() : io.getuid()
69
69
  const impact = "the task host refuses it, so process-mode task children and every team_create fail"
70
70
  if (uid !== undefined && stat.uid !== uid) {
71
- return [`FAIL launch spec: launch_spec_insecure: ${path} is not owned by you (uid ${stat.uid}); ${impact}. Fix: reinstall omo as this user, or run: sudo chown ${ownerName()} ${path}`]
71
+ return [
72
+ `FAIL launch spec: launch_spec_insecure: ${path} is not owned by you (uid ${stat.uid}); ${impact}. Fix: reinstall omo as this user, or run: sudo chown ${ownerName()} ${path}`,
73
+ ]
72
74
  }
73
75
  if ((stat.mode & WRITABLE_BY_OTHERS) !== 0) {
74
76
  const mode = (stat.mode & 0o777).toString(8)
75
- return [`FAIL launch spec: launch_spec_insecure: ${path} is group/world-writable (${mode}); ${impact}. Fix: chmod 644 ${path}`]
77
+ return [
78
+ `FAIL launch spec: launch_spec_insecure: ${path} is group/world-writable (${mode}); ${impact}. Fix: chmod 644 ${path}`,
79
+ ]
76
80
  }
77
81
  return []
78
82
  }
@@ -15,7 +15,11 @@ import { runThreadCommand } from "./thread.js"
15
15
  import { isHostStatusAll, runHostStatusAll, sessionActivityReader } from "./host-status.js"
16
16
  import { runDoctor } from "./doctor.js"
17
17
  import { reflectionLockFix, reflectionLockReport } from "./doctor-reflection-lock.js"
18
- import { memoryRuntimeDiscardResolver, memoryRuntimeMaxBytesResolver, memoryRuntimeReport } from "./doctor-memory-runtime.js"
18
+ import {
19
+ memoryRuntimeDiscardResolver,
20
+ memoryRuntimeMaxBytesResolver,
21
+ memoryRuntimeReport,
22
+ } from "./doctor-memory-runtime.js"
19
23
  import { ensureEnginePrepared, preparePluginLaunchSpec } from "./engine-prepare.js"
20
24
  import { migrateLegacyBunGlobalManifest } from "./legacy-bun-global-migration.js"
21
25
  import { removeLegacyServiceCredentials } from "./legacy-service-credentials.js"
@@ -61,16 +65,16 @@ async function bootsWithMemorySyncClaim(args, env) {
61
65
  return launchClaimsMemorySyncAtBoot(args, env, claimsMemorySyncAtBoot, { execArgv: [], versions: process.versions })
62
66
  } catch (error) {
63
67
  // Without the sidecar the memory component's registration still selects once when the first session opens.
64
- process.stderr.write(`omo: memory sync could not start at boot: ${error instanceof Error ? error.message : String(error)}\n`)
68
+ process.stderr.write(
69
+ `omo: memory sync could not start at boot: ${error instanceof Error ? error.message : String(error)}\n`,
70
+ )
65
71
  return false
66
72
  }
67
73
  }
68
74
 
69
75
  async function spawnSenpi(args, withExtension) {
70
76
  const senpi = preparedSenpi()
71
- const finalArgs = withExtension
72
- ? ["--extension", join(packageRoot, "plugin"), ...args]
73
- : args
77
+ const finalArgs = withExtension ? ["--extension", join(packageRoot, "plugin"), ...args] : args
74
78
  const env = senpiEnvironment(senpi.packageRoot)
75
79
  if (withExtension) withHerdrAgentHint(env, args)
76
80
  const handoff = privateFdHandoff(env)
@@ -82,7 +86,7 @@ async function spawnSenpi(args, withExtension) {
82
86
  // A failed replacement still uses the signal-aware child path below.
83
87
  }
84
88
  }
85
- if (handoff !== undefined && await bootsWithMemorySyncClaim(finalArgs, handoff.env)) {
89
+ if (handoff !== undefined && (await bootsWithMemorySyncClaim(finalArgs, handoff.env))) {
86
90
  await spawnNode(ENGINE_BOOT_ENTRY, [senpi.cliPath, ...finalArgs], handoff)
87
91
  return
88
92
  }
@@ -172,7 +176,9 @@ export async function runLauncher(args = process.argv.slice(2)) {
172
176
  // The toolkit CLI is no longer part of the Native payload; the loop is driven in-process by the
173
177
  // eval SDK the extension publishes. Report that plainly instead of failing on a missing file.
174
178
  if (command === "ulw-loop") {
175
- console.error('omo ulw-loop is unavailable in this build: use the agent toolkit SDK from an eval js cell: const { agentToolkit } = await import(`${env("OMO_AGENT_TOOLKIT_SDK_ROOT")}/sdk.js`); print(await agentToolkit.status()) (Codex keeps the standalone CLI).')
179
+ console.error(
180
+ 'omo ulw-loop is unavailable in this build: use the agent toolkit SDK from an eval js cell: const { agentToolkit } = await import(`${env("OMO_AGENT_TOOLKIT_SDK_ROOT")}/sdk.js`); print(await agentToolkit.status()) (Codex keeps the standalone CLI).',
181
+ )
176
182
  process.exitCode = 2
177
183
  return
178
184
  }
@@ -231,18 +237,24 @@ export async function runLauncher(args = process.argv.slice(2)) {
231
237
  process.exitCode = result.failed ? 1 : 0
232
238
  return
233
239
  }
234
- const [categoryCoverage, computerUse, configDiagnostics, reflectionLock, memoryRuntime] = args[1] === "--reap"
235
- ? [[], [], [], [], []]
236
- : await Promise.all([
237
- doctorCoverageLines({ agentDir: canonicalAgentDir() }),
238
- doctorComputerUseLines(),
239
- doctorConfigLines(),
240
- reflectionLockReport(),
241
- memoryRuntimeReport({
242
- maxBytesFor: memoryRuntimeMaxBytesResolver({ pluginRoot: join(packageRoot, "plugin") }),
243
- discardFor: memoryRuntimeDiscardResolver({ pluginRoot: join(packageRoot, "plugin") }),
244
- }).then((report) => report.lines, (error) => [`WARN memory runtime: unavailable: ${error instanceof Error ? error.message : String(error)}`]),
245
- ])
240
+ const [categoryCoverage, computerUse, configDiagnostics, reflectionLock, memoryRuntime] =
241
+ args[1] === "--reap"
242
+ ? [[], [], [], [], []]
243
+ : await Promise.all([
244
+ doctorCoverageLines({ agentDir: canonicalAgentDir() }),
245
+ doctorComputerUseLines(),
246
+ doctorConfigLines(),
247
+ reflectionLockReport(),
248
+ memoryRuntimeReport({
249
+ maxBytesFor: memoryRuntimeMaxBytesResolver({ pluginRoot: join(packageRoot, "plugin") }),
250
+ discardFor: memoryRuntimeDiscardResolver({ pluginRoot: join(packageRoot, "plugin") }),
251
+ }).then(
252
+ (report) => report.lines,
253
+ (error) => [
254
+ `WARN memory runtime: unavailable: ${error instanceof Error ? error.message : String(error)}`,
255
+ ],
256
+ ),
257
+ ])
246
258
  runDoctor(await detectHarnesses(), args.slice(1), {
247
259
  daemonEngine: { run: engineHostCall },
248
260
  categoryCoverage,
@@ -36,16 +36,20 @@ function rungLines(rungs) {
36
36
  }
37
37
 
38
38
  function entryLines(entry) {
39
- const head = entry.status === "resolved"
40
- ? ` ${entry.name}: ${entry.runtime.join(" -> ")}`
41
- : ` ${entry.name}: ${entry.status}${entry.reason === undefined ? "" : ` (${entry.reason})`}`
39
+ const head =
40
+ entry.status === "resolved"
41
+ ? ` ${entry.name}: ${entry.runtime.join(" -> ")}`
42
+ : ` ${entry.name}: ${entry.status}${entry.reason === undefined ? "" : ` (${entry.reason})`}`
42
43
  return [head, ...rungLines(entry.rungs)]
43
44
  }
44
45
 
45
46
  /** The human report. @param {any} view the runtime's `modelChains` result */
46
47
  export function formatModelChainLines(view) {
47
48
  const profile = view.modelProfile
48
- const lane = profile.selection === "set" ? `model_profile ${profile.profile}` : `model_profile unset, default lane ${profile.profile}`
49
+ const lane =
50
+ profile.selection === "set"
51
+ ? `model_profile ${profile.profile}`
52
+ : `model_profile unset, default lane ${profile.profile}`
49
53
  return [
50
54
  "Models a spawn resolves right now (logins read offline; credentials are not probed).",
51
55
  `exclude_models: ${view.excludeModels.length === 0 ? "none" : view.excludeModels.join(", ")}`,
@@ -85,7 +89,10 @@ export async function doctorModelChains(options) {
85
89
  const cwd = options.cwd ?? process.cwd()
86
90
  const models = await engineAvailableModels({ agentDir: options.agentDir, cwd, loadEngine: options.loadEngine })
87
91
  const view = runtime.modelChains({ models, cwd, env: options.env ?? process.env })
88
- return { output: options.json ? JSON.stringify(view, null, 2) : formatModelChainLines(view).join("\n"), failed: false }
92
+ return {
93
+ output: options.json ? JSON.stringify(view, null, 2) : formatModelChainLines(view).join("\n"),
94
+ failed: false,
95
+ }
89
96
  } catch (error) {
90
97
  return { output: `FAIL models: ${error instanceof Error ? error.message : String(error)}`, failed: true }
91
98
  }
@@ -33,7 +33,8 @@ export function fetchNpmDistTagsSync(options = {}) {
33
33
  windowsHide: true,
34
34
  env: process.env,
35
35
  })
36
- if (result.error || result.status !== 0 || typeof result.stdout !== "string" || result.stdout.trim() === "") return null
36
+ if (result.error || result.status !== 0 || typeof result.stdout !== "string" || result.stdout.trim() === "")
37
+ return null
37
38
  const parsed = JSON.parse(result.stdout)
38
39
  return parsed !== null && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : null
39
40
  } catch {
@@ -72,8 +72,9 @@ export function updateTarget(
72
72
  const bunInstall = normalizedRoot.endsWith(BUN_GLOBAL_PACKAGE_SUFFIX)
73
73
  ? normalizedRoot.slice(0, -BUN_GLOBAL_PACKAGE_SUFFIX.length)
74
74
  : undefined
75
- const isLegacyBunGlobal = normalizedRoot === `${normalizedHome}/node_modules/omo-ai`
76
- && (exists(join(homeDir, "bun.lock")) || exists(join(homeDir, "bun.lockb")))
75
+ const isLegacyBunGlobal =
76
+ normalizedRoot === `${normalizedHome}/node_modules/omo-ai` &&
77
+ (exists(join(homeDir, "bun.lock")) || exists(join(homeDir, "bun.lockb")))
77
78
  if (bunInstall !== undefined || isLegacyBunGlobal) {
78
79
  // `--cwd` into this package dir does not retarget `bun add -g`; bun still installs into
79
80
  // `$BUN_INSTALL/install/global` (or `~/.bun` when that env is unset). The prefix is the
@@ -102,7 +103,9 @@ export function resolveSenpi(options = {}) {
102
103
  try {
103
104
  indexPath = resolveIndex()
104
105
  } catch (error) {
105
- throw new Error(`could not resolve @code-yeongyu/senpi; reinstall with: ${updateTarget().command} (${error.message})`)
106
+ throw new Error(
107
+ `could not resolve @code-yeongyu/senpi; reinstall with: ${updateTarget().command} (${error.message})`,
108
+ )
106
109
  }
107
110
 
108
111
  const distDir = dirname(indexPath)
@@ -122,9 +125,10 @@ export function resolveSenpi(options = {}) {
122
125
  // checking it here turns the engine's raw ERR_MODULE_NOT_FOUND stack into one actionable line.
123
126
  const brandPath = join(distDir, "core", "brand.js")
124
127
  if (!existsSync(brandPath)) {
125
- const windowsHint = platform === "win32"
126
- ? " (close every running omo/senpi process first: Windows locks loaded native modules, so npm fails with EBUSY mid-upgrade and leaves exactly this partial state)"
127
- : ""
128
+ const windowsHint =
129
+ platform === "win32"
130
+ ? " (close every running omo/senpi process first: Windows locks loaded native modules, so npm fails with EBUSY mid-upgrade and leaves exactly this partial state)"
131
+ : ""
128
132
  throw new Error(
129
133
  `senpi engine files are incomplete: ${brandPath} is missing, which usually means an interrupted or failed omo-ai upgrade; reinstall with: ${updateTarget().command}${windowsHint}`,
130
134
  )
@@ -137,10 +141,14 @@ export function nearestNodeBin(startPath) {
137
141
  // whose .bin is a sibling, not a child - starting the climb inside node_modules would walk to the
138
142
  // filesystem root and never find it. For unscoped packages begin at the package's parent; for
139
143
  // scoped packages (…/node_modules/@scope/package), begin at the parent of node_modules instead.
140
- let current = basename(startPath) === "node_modules" ? dirname(startPath)
141
- : basename(dirname(startPath)) === "node_modules" ? dirname(dirname(startPath))
142
- : basename(dirname(dirname(startPath))) === "node_modules" ? dirname(dirname(dirname(startPath)))
143
- : startPath
144
+ let current =
145
+ basename(startPath) === "node_modules"
146
+ ? dirname(startPath)
147
+ : basename(dirname(startPath)) === "node_modules"
148
+ ? dirname(dirname(startPath))
149
+ : basename(dirname(dirname(startPath))) === "node_modules"
150
+ ? dirname(dirname(dirname(startPath)))
151
+ : startPath
144
152
  const root = parse(current).root
145
153
  while (true) {
146
154
  const candidate = join(current, "node_modules", ".bin")
@@ -65,8 +65,14 @@ export function inspectPrivateFdTable(table, platform = process.platform) {
65
65
  for (const [name, fd] of Object.entries(value)) {
66
66
  forwarded[name] = null
67
67
  if (platform === "win32") {
68
- const usable = Array.isArray(fd) && fd.length === 2 && fd.every(inRange) && fd[0] !== fd[1] &&
69
- ipc !== undefined && !fd.some(descriptor => descriptor === ipc || counts.get(descriptor) > 1) && fd.every(isPipe)
68
+ const usable =
69
+ Array.isArray(fd) &&
70
+ fd.length === 2 &&
71
+ fd.every(inRange) &&
72
+ fd[0] !== fd[1] &&
73
+ ipc !== undefined &&
74
+ !fd.some((descriptor) => descriptor === ipc || counts.get(descriptor) > 1) &&
75
+ fd.every(isPipe)
70
76
  if (usable) {
71
77
  forwarded[name] = fd
72
78
  fds.push(...fd)
@@ -97,18 +103,21 @@ export function privateFdHandoffFor(env, table, platform = process.platform, { s
97
103
  while (stdio.length <= fd) stdio.push("ignore")
98
104
  stdio[fd] = fd
99
105
  }
100
- const forwarded = shell && inspected.fds.length > 0
101
- ? JSON.stringify(Object.fromEntries(Object.keys(JSON.parse(inspected.table)).map(name => [name, null])))
102
- : inspected.table
106
+ const forwarded =
107
+ shell && inspected.fds.length > 0
108
+ ? JSON.stringify(Object.fromEntries(Object.keys(JSON.parse(inspected.table)).map((name) => [name, null])))
109
+ : inspected.table
103
110
  return {
104
111
  env: { ...env, [PRIVATE_FDS_ENV]: forwarded },
105
112
  stdio,
106
113
  // Unlike POSIX's protected sockets, Windows pipes must not remain in the waiting parent.
107
114
  // runChild invokes this immediately after spawn, including a synchronous spawn failure.
108
- ...(platform === "win32" && inspected.fds.length > 0 ? {
109
- onSpawn() {
110
- for (const fd of inspected.fds) closeSync(fd)
111
- },
112
- } : {}),
115
+ ...(platform === "win32" && inspected.fds.length > 0
116
+ ? {
117
+ onSpawn() {
118
+ for (const fd of inspected.fds) closeSync(fd)
119
+ },
120
+ }
121
+ : {}),
113
122
  }
114
123
  }
@@ -0,0 +1,26 @@
1
+ import { spawnSync } from "node:child_process"
2
+
3
+ /**
4
+ * Reads the live process table. `ps` is the portable answer on macOS and Linux alike, and reading
5
+ * it can never be a reason for diagnostics to fail, so an unavailable or unparsable listing is an
6
+ * empty list.
7
+ */
8
+ export function listProcesses() {
9
+ if (process.platform === "win32") return []
10
+ // -ww: an unlimited width, so `args` is never cut at the terminal width (BSD/macOS `ps` truncates).
11
+ const listed = spawnSync("ps", ["-ww", "-axo", "pid=,ppid=,etime=,tty=,args="], { encoding: "utf8" })
12
+ if (listed.status !== 0 || typeof listed.stdout !== "string") return []
13
+ const entries = []
14
+ for (const line of listed.stdout.split("\n")) {
15
+ const match = /^\s*(\d+)\s+(\d+)\s+(\S+)\s+(\S+)\s+(.*)$/.exec(line)
16
+ if (!match) continue
17
+ entries.push({
18
+ pid: Number(match[1]),
19
+ ppid: Number(match[2]),
20
+ elapsed: match[3],
21
+ tty: match[4],
22
+ command: match[5],
23
+ })
24
+ }
25
+ return entries
26
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "_comment": "Derived from @code-yeongyu/senpi 2026.11.10-2 builtinProviders(). builtinProviderIds and oauthProviderIds are the engine registry verbatim; providers maps a source harness id onto the omo provider that serves the same endpoint; oauthLogins maps a source OAuth id onto the omo provider to run /login for. Re-derive all four whenever the senpi pin changes.",
2
+ "_comment": "Derived from @code-yeongyu/senpi 2026.11.15 builtinProviders(). builtinProviderIds and oauthProviderIds are the engine registry verbatim; providers maps a source harness id onto the omo provider that serves the same endpoint; oauthLogins maps a source OAuth id onto the omo provider to run /login for. Re-derive all four whenever the senpi pin changes.",
3
3
  "builtinProviderIds": [
4
4
  "alibaba-token-plan",
5
5
  "amazon-bedrock",
@@ -16,7 +16,10 @@ export const guardedSerialization = `try {
16
16
 
17
17
  // Each binding lists every declaration shape upstream has shipped for it; one match is enough.
18
18
  const requiredBindings = [
19
- ["shutdown", [/^\s*async function shutdown\(exitCode = 0, signal\)\s*\{/m, /^\s*const shutdown = createRpcShutdown\(/m]],
19
+ [
20
+ "shutdown",
21
+ [/^\s*async function shutdown\(exitCode = 0, signal\)\s*\{/m, /^\s*const shutdown = createRpcShutdown\(/m],
22
+ ],
20
23
  ["toJsonEvent", [/^import\s*\{\s*toJsonEvent\s*\}\s*from ["']\.\.\/json-event\.[jt]s["'];/m]],
21
24
  ["value", [/^\s*const value = JSON\.parse\(line\);/m]],
22
25
  ]
@@ -27,7 +30,8 @@ export function prepareRpcStreamErrors(senpiRoot) {
27
30
  if (!existsSync(path)) throw new Error("omo-ai: rpc_patch_target_missing: dist/modes/rpc/rpc-mode.js")
28
31
  const source = readFileSync(path, "utf8")
29
32
  for (const [name, declarations] of requiredBindings) {
30
- if (!declarations.some((declaration) => declaration.test(source))) throw new Error(`omo-ai: rpc_patch_binding_missing: ${name}`)
33
+ if (!declarations.some((declaration) => declaration.test(source)))
34
+ throw new Error(`omo-ai: rpc_patch_binding_missing: ${name}`)
31
35
  }
32
36
  if (source.includes(guardedSerialization)) return
33
37
  if (!source.includes(serialization)) throw new Error("omo-ai: unsupported Senpi RPC stream serializer")
@@ -6,7 +6,12 @@ function normalize(version) {
6
6
  const [core = "", ...pre] = String(version).trim().replace(/^v/, "").split("+")[0].split("-")
7
7
  const numeric = (part) => (/^\d+$/.test(part) ? String(Number.parseInt(part, 10)) : part)
8
8
  const release = core.split(".").map(numeric).join(".")
9
- const prerelease = pre.join("-").split(".").filter((part) => part !== "").map(numeric).join(".")
9
+ const prerelease = pre
10
+ .join("-")
11
+ .split(".")
12
+ .filter((part) => part !== "")
13
+ .map(numeric)
14
+ .join(".")
10
15
  return prerelease === "" ? release : `${release}-${prerelease}`
11
16
  }
12
17
 
@@ -1,7 +1,16 @@
1
1
  import { dirname, join } from "node:path"
2
2
  import { runChild } from "./child-process.js"
3
3
  import { fetchNpmDistTagsSync } from "./npm-dist-tags.js"
4
- import { channelDistTagVersion, channelPackageSpec, packageManifest, packageRoot, readJson, releaseChannel, resolveSenpi, updateTarget } from "./package-paths.js"
4
+ import {
5
+ channelDistTagVersion,
6
+ channelPackageSpec,
7
+ packageManifest,
8
+ packageRoot,
9
+ readJson,
10
+ releaseChannel,
11
+ resolveSenpi,
12
+ updateTarget,
13
+ } from "./package-paths.js"
5
14
  import { isPrintOnlyUpdate, updateUsageAnswer } from "./update-args.js"
6
15
  import { findHolders, heldTarget, isLockFailure, listWindowsProcesses, LOCK_RETRY_DELAYS_MS } from "./update-lock.js"
7
16
 
@@ -63,8 +72,9 @@ export function formatVersionChange(before, after) {
63
72
  * @returns {Promise<number>}
64
73
  */
65
74
  export async function runSelfUpdate(args, options = {}) {
66
- const resolveUpdate = options.resolveUpdate
67
- ?? ((targetVersion) => updateTarget(undefined, undefined, undefined, undefined, undefined, targetVersion))
75
+ const resolveUpdate =
76
+ options.resolveUpdate ??
77
+ ((targetVersion) => updateTarget(undefined, undefined, undefined, undefined, undefined, targetVersion))
68
78
  const fetchDistTags = options.fetchDistTags ?? fetchNpmDistTagsSync
69
79
  const log = options.log ?? ((line) => console.log(line))
70
80
  const error = options.error ?? ((line) => console.error(line))
@@ -86,7 +96,9 @@ export async function runSelfUpdate(args, options = {}) {
86
96
  const update = resolveUpdate(target)
87
97
 
88
98
  if (target === undefined) {
89
- log(`omo: could not confirm the ${channel} omo-ai version from the npm registry; installing the unpinned ${channelPackageSpec(before.omo)}`)
99
+ log(
100
+ `omo: could not confirm the ${channel} omo-ai version from the npm registry; installing the unpinned ${channelPackageSpec(before.omo)}`,
101
+ )
90
102
  }
91
103
  if (isPrintOnlyUpdate(args)) {
92
104
  log(formatUpdateCommand(update))
@@ -95,7 +107,9 @@ export async function runSelfUpdate(args, options = {}) {
95
107
  if (target !== undefined && target === before.omo) {
96
108
  // Already on the target, the update installs nothing, so a broken engine tree needs the reinstall named.
97
109
  if (before.engine === "unknown") {
98
- error(`omo ${before.omo} is up to date, but its engine files are missing or incomplete; reinstall with: ${update.command}`)
110
+ error(
111
+ `omo ${before.omo} is up to date, but its engine files are missing or incomplete; reinstall with: ${update.command}`,
112
+ )
99
113
  return 1
100
114
  }
101
115
  log(`omo ${before.omo} is up to date (omo-ai@${channel} is ${target})`)
@@ -125,12 +139,23 @@ export async function runSelfUpdate(args, options = {}) {
125
139
  }
126
140
  if (!failed(result) || !heldOnWindows(result) || attempt >= LOCK_RETRY_DELAYS_MS.length) break
127
141
  const delay = LOCK_RETRY_DELAYS_MS[attempt]
128
- log(`omo: ${heldTarget(result.stderr) ?? "a package file"} is held by another process; retrying in ${delay / 1000}s (attempt ${attempt + 2} of ${LOCK_RETRY_DELAYS_MS.length + 1})`)
142
+ log(
143
+ `omo: ${heldTarget(result.stderr) ?? "a package file"} is held by another process; retrying in ${delay / 1000}s (attempt ${attempt + 2} of ${LOCK_RETRY_DELAYS_MS.length + 1})`,
144
+ )
129
145
  await sleep(delay)
130
146
  }
131
147
 
132
148
  if (failed(result) && heldOnWindows(result)) {
133
- await reportHeldInstall({ result, before, install, resolveUpdate, readInstalled, error, options, attempts: LOCK_RETRY_DELAYS_MS.length + 1 })
149
+ await reportHeldInstall({
150
+ result,
151
+ before,
152
+ install,
153
+ resolveUpdate,
154
+ readInstalled,
155
+ error,
156
+ options,
157
+ attempts: LOCK_RETRY_DELAYS_MS.length + 1,
158
+ })
134
159
  return 1
135
160
  }
136
161
  if (failed(result)) {
@@ -164,13 +189,17 @@ async function reportHeldInstall({ result, before, install, resolveUpdate, readI
164
189
  const selfPids = options.selfPids ?? [process.pid, process.ppid]
165
190
  const holders = findHolders(installDir, listProcesses(), selfPids, held)
166
191
 
167
- error(`omo: update stopped: Windows would not let the package manager replace ${file}; it was still held after ${attempts} attempts.`)
192
+ error(
193
+ `omo: update stopped: Windows would not let the package manager replace ${file}; it was still held after ${attempts} attempts.`,
194
+ )
168
195
  if (holders.length > 0) {
169
196
  error(`omo: held by ${holders.map((holder) => `${holder.name} (pid ${holder.pid})`).join(", ")}`)
170
197
  const names = [...new Set(holders.map((holder) => holder.name))].join(", ")
171
198
  error(`omo: Quit ${names} and run omo update again.`)
172
199
  } else {
173
- error("omo: No omo command-line process was found holding it. Another app (for example the OmO desktop app or an editor) or antivirus may be holding it: close it, or wait a minute, then run omo update again.")
200
+ error(
201
+ "omo: No omo command-line process was found holding it. Another app (for example the OmO desktop app or an editor) or antivirus may be holding it: close it, or wait a minute, then run omo update again.",
202
+ )
174
203
  }
175
204
 
176
205
  const now = readInstalledOrUndefined(readInstalled)
@@ -182,7 +211,9 @@ async function reportHeldInstall({ result, before, install, resolveUpdate, readI
182
211
  // manager can fail moving an old dependency after the new omo-ai is in place, and reinstalling over it
183
212
  // would undo a working update and hit the same held file. Only an unreadable install is restored.
184
213
  if (now !== undefined) {
185
- error(`omo: omo ${now.omo} is installed, but the package manager did not finish; run omo update again afterwards to complete it.`)
214
+ error(
215
+ `omo: omo ${now.omo} is installed, but the package manager did not finish; run omo update again afterwards to complete it.`,
216
+ )
186
217
  return
187
218
  }
188
219
  const previous = resolveUpdate(before.omo)