omo-ai 5.1.51 → 5.1.55

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 (253) hide show
  1. package/bin/darwin/omo-keychain +0 -0
  2. package/bin/lib/bun-runtime.js +4 -2
  3. package/bin/lib/child-process.js +22 -8
  4. package/bin/lib/engine-prepare.js +0 -2
  5. package/bin/lib/launcher.js +11 -2
  6. package/bin/lib/private-fd-table.js +114 -0
  7. package/bin/lib/private-fds.js +13 -0
  8. package/bin/lib/provider-map.json +1 -1
  9. package/bin/lib/remote-attach-launch.js +15 -0
  10. package/bin/lib/service-auth.generated.js +80 -9
  11. package/bin/lib/setup-commandcode.js +98 -0
  12. package/bin/lib/setup-guidance.js +11 -0
  13. package/bin/lib/setup-providers-import.js +1 -1
  14. package/bin/lib/setup-stream.js +4 -2
  15. package/bin/lib/setup-summary.js +18 -4
  16. package/bin/omo.js +19 -1
  17. package/package.json +2 -2
  18. package/plugin/CHANGELOG.md +159 -113
  19. package/plugin/extensions/assets.generated.json +5 -5
  20. package/plugin/extensions/dream-persona.md +1 -0
  21. package/plugin/extensions/gateway-store-worker.mjs +1 -1
  22. package/plugin/extensions/memory-run-supervisor.mjs +3 -3
  23. package/plugin/extensions/omo-claim-receipt.js +2 -2
  24. package/plugin/extensions/omo-computer-use.js +2 -2
  25. package/plugin/extensions/omo-desktop-toolkit.js +2 -0
  26. package/plugin/extensions/omo-device-account.js +2 -2
  27. package/plugin/extensions/omo-feedback.js +2 -2
  28. package/plugin/extensions/omo-init-deep-advisor.js +2 -2
  29. package/plugin/extensions/omo-member.js +2 -2
  30. package/plugin/extensions/omo-memory-commands.js +3 -3
  31. package/plugin/extensions/omo-memory-doctor.js +3 -3
  32. package/plugin/extensions/omo-memory-memfs.js +3 -3
  33. package/plugin/extensions/omo-memory-palace.js +3 -3
  34. package/plugin/extensions/omo-memory-sync.js +2 -2
  35. package/plugin/extensions/omo-onboarding-scan.js +3 -3
  36. package/plugin/extensions/omo-recall-store.js +2 -2
  37. package/plugin/extensions/omo-session-history.js +1 -1
  38. package/plugin/extensions/omo-side-panel.js +3 -3
  39. package/plugin/extensions/omo-task.js +2 -2
  40. package/plugin/extensions/omo-telemetry-otlp.js +2 -2
  41. package/plugin/extensions/omo-telemetry-posthog.js +1 -1
  42. package/plugin/extensions/omo-telemetry-recovery.js +1 -1
  43. package/plugin/extensions/omo-thread-client.js +2 -2
  44. package/plugin/extensions/omo.js +3 -3
  45. package/plugin/extensions/reflection-persona.md +2 -0
  46. package/plugin/package.json +3 -1
  47. package/plugin/runtime/agent-toolkit-sdk/sdk.js +2 -2
  48. package/plugin/runtime/ast-grep-mcp/manifest.json +1 -1
  49. package/plugin/runtime/category-coverage/assets.generated.json +5 -5
  50. package/plugin/runtime/category-coverage/index.js +6 -6
  51. package/plugin/runtime/lsp-daemon/dist/.omo-runtime-manifest.json +4 -4
  52. package/plugin/runtime/lsp-daemon/dist/cli.js +81 -15
  53. package/plugin/runtime/lsp-daemon/dist/client.js +74 -8
  54. package/plugin/runtime/lsp-daemon/dist/index.js +76 -10
  55. package/plugin/runtime/rollback-migrate.js +2 -2
  56. package/plugin/runtime/task-config/index.js +1 -1
  57. package/plugin/runtime/thread-sdk/sdk.js +2 -2
  58. package/plugin/scripts/install.mjs +1 -0
  59. package/plugin/skills/browser/runtime/omowright/index.js +24 -33
  60. package/plugin/skills/browser/runtime/omowright/manifest.json +3 -3
  61. package/plugin/skills/frontend/ATTRIBUTION.md +104 -1
  62. package/plugin/skills/frontend/SKILL.md +7 -3
  63. package/plugin/skills/frontend/references/design/design-system-architecture.md +3 -3
  64. package/plugin/skills/frontend/references/perfection/craft-floor.md +59 -0
  65. package/plugin/skills/frontend/references/perfection/detect.md +52 -0
  66. package/plugin/skills/frontend/scripts/detect/cli.ts +70 -0
  67. package/plugin/skills/frontend/scripts/detect/config.ts +53 -0
  68. package/plugin/skills/frontend/scripts/detect/core/characters.ts +2 -0
  69. package/plugin/skills/frontend/scripts/detect/core/color.ts +150 -0
  70. package/plugin/skills/frontend/scripts/detect/core/page.ts +84 -0
  71. package/plugin/skills/frontend/scripts/detect/core/shadow.ts +40 -0
  72. package/plugin/skills/frontend/scripts/detect/core/source.ts +33 -0
  73. package/plugin/skills/frontend/scripts/detect/detect.ts +77 -0
  74. package/plugin/skills/frontend/scripts/detect/index.ts +23 -0
  75. package/plugin/skills/frontend/scripts/detect/lint.ts +98 -0
  76. package/plugin/skills/frontend/scripts/detect/render/probe-placement.ts +50 -0
  77. package/plugin/skills/frontend/scripts/detect/render/renderer.ts +37 -0
  78. package/plugin/skills/frontend/scripts/detect/render/webview.ts +71 -0
  79. package/plugin/skills/frontend/scripts/detect/report.ts +29 -0
  80. package/plugin/skills/frontend/scripts/detect/rule.ts +42 -0
  81. package/plugin/skills/frontend/scripts/detect/rules/color/ai-color-palette.ts +83 -0
  82. package/plugin/skills/frontend/scripts/detect/rules/color/cream-palette.ts +35 -0
  83. package/plugin/skills/frontend/scripts/detect/rules/color/dark-glow.ts +44 -0
  84. package/plugin/skills/frontend/scripts/detect/rules/color/design-system-color.ts +35 -0
  85. package/plugin/skills/frontend/scripts/detect/rules/color/gradient-text.ts +59 -0
  86. package/plugin/skills/frontend/scripts/detect/rules/color/gray-on-color.ts +38 -0
  87. package/plugin/skills/frontend/scripts/detect/rules/color/index.ts +15 -0
  88. package/plugin/skills/frontend/scripts/detect/rules/color/low-contrast.ts +57 -0
  89. package/plugin/skills/frontend/scripts/detect/rules/color/radial-halo.ts +31 -0
  90. package/plugin/skills/frontend/scripts/detect/rules/color/radial-spotlight-glow.ts +33 -0
  91. package/plugin/skills/frontend/scripts/detect/rules/color/support/animation-opacity.ts +78 -0
  92. package/plugin/skills/frontend/scripts/detect/rules/color/support/color-path.ts +15 -0
  93. package/plugin/skills/frontend/scripts/detect/rules/color/support/contrast-pairs.ts +54 -0
  94. package/plugin/skills/frontend/scripts/detect/rules/color/support/contrast-role.ts +76 -0
  95. package/plugin/skills/frontend/scripts/detect/rules/color/support/glow-forms.ts +56 -0
  96. package/plugin/skills/frontend/scripts/detect/rules/color/support/gradient-samples.ts +134 -0
  97. package/plugin/skills/frontend/scripts/detect/rules/color/support/gradients.ts +91 -0
  98. package/plugin/skills/frontend/scripts/detect/rules/color/support/mockup-roots.ts +63 -0
  99. package/plugin/skills/frontend/scripts/detect/rules/color/support/page-ignore.ts +7 -0
  100. package/plugin/skills/frontend/scripts/detect/rules/color/support/painted-text.ts +141 -0
  101. package/plugin/skills/frontend/scripts/detect/rules/color/support/palette-roles.ts +58 -0
  102. package/plugin/skills/frontend/scripts/detect/rules/color/support/placeholder-contrast.ts +25 -0
  103. package/plugin/skills/frontend/scripts/detect/rules/color/support/stock-accent.ts +31 -0
  104. package/plugin/skills/frontend/scripts/detect/rules/color/support/text-colors.ts +80 -0
  105. package/plugin/skills/frontend/scripts/detect/rules/copy/aphoristic-cadence.ts +20 -0
  106. package/plugin/skills/frontend/scripts/detect/rules/copy/broken-image.ts +17 -0
  107. package/plugin/skills/frontend/scripts/detect/rules/copy/em-dash-overuse.ts +46 -0
  108. package/plugin/skills/frontend/scripts/detect/rules/copy/index.ts +15 -0
  109. package/plugin/skills/frontend/scripts/detect/rules/copy/marketing-buzzword.ts +33 -0
  110. package/plugin/skills/frontend/scripts/detect/rules/copy/numbered-section-labels.ts +34 -0
  111. package/plugin/skills/frontend/scripts/detect/rules/copy/repeated-container-text.ts +56 -0
  112. package/plugin/skills/frontend/scripts/detect/rules/copy/script-error.ts +38 -0
  113. package/plugin/skills/frontend/scripts/detect/rules/copy/skipped-heading.ts +81 -0
  114. package/plugin/skills/frontend/scripts/detect/rules/copy/support/numbered-label.ts +94 -0
  115. package/plugin/skills/frontend/scripts/detect/rules/copy/support/page-text.ts +37 -0
  116. package/plugin/skills/frontend/scripts/detect/rules/copy/theater-slop-phrase.ts +21 -0
  117. package/plugin/skills/frontend/scripts/detect/rules/decoration/blinking-cursor.ts +48 -0
  118. package/plugin/skills/frontend/scripts/detect/rules/decoration/border-accent-on-rounded.ts +14 -0
  119. package/plugin/skills/frontend/scripts/detect/rules/decoration/bounce-easing.ts +83 -0
  120. package/plugin/skills/frontend/scripts/detect/rules/decoration/buried-raster.ts +72 -0
  121. package/plugin/skills/frontend/scripts/detect/rules/decoration/codex-grid-background.ts +34 -0
  122. package/plugin/skills/frontend/scripts/detect/rules/decoration/design-system-radius.ts +31 -0
  123. package/plugin/skills/frontend/scripts/detect/rules/decoration/gpt-thin-border-wide-shadow.ts +66 -0
  124. package/plugin/skills/frontend/scripts/detect/rules/decoration/hard-offset-shadow.ts +31 -0
  125. package/plugin/skills/frontend/scripts/detect/rules/decoration/hero-eyebrow-chip.ts +19 -0
  126. package/plugin/skills/frontend/scripts/detect/rules/decoration/icon-tile-stack.ts +92 -0
  127. package/plugin/skills/frontend/scripts/detect/rules/decoration/index.ts +38 -0
  128. package/plugin/skills/frontend/scripts/detect/rules/decoration/kicker-above-heading.ts +69 -0
  129. package/plugin/skills/frontend/scripts/detect/rules/decoration/marquee.ts +51 -0
  130. package/plugin/skills/frontend/scripts/detect/rules/decoration/organic-clip-path.ts +41 -0
  131. package/plugin/skills/frontend/scripts/detect/rules/decoration/pulsing-dot.ts +72 -0
  132. package/plugin/skills/frontend/scripts/detect/rules/decoration/repeating-stripes-gradient.ts +25 -0
  133. package/plugin/skills/frontend/scripts/detect/rules/decoration/shape-assembled-illustration.ts +58 -0
  134. package/plugin/skills/frontend/scripts/detect/rules/decoration/side-tab.ts +17 -0
  135. package/plugin/skills/frontend/scripts/detect/rules/decoration/support/appearance.ts +110 -0
  136. package/plugin/skills/frontend/scripts/detect/rules/decoration/support/assert-cases.ts +25 -0
  137. package/plugin/skills/frontend/scripts/detect/rules/decoration/support/borders.ts +150 -0
  138. package/plugin/skills/frontend/scripts/detect/rules/decoration/support/clip-geometry.ts +151 -0
  139. package/plugin/skills/frontend/scripts/detect/rules/decoration/support/css-candidates.ts +66 -0
  140. package/plugin/skills/frontend/scripts/detect/rules/decoration/support/curve-samples.ts +55 -0
  141. package/plugin/skills/frontend/scripts/detect/rules/decoration/support/gradient-pattern.ts +40 -0
  142. package/plugin/skills/frontend/scripts/detect/rules/decoration/support/keyframes.ts +134 -0
  143. package/plugin/skills/frontend/scripts/detect/rules/decoration/support/labels.ts +85 -0
  144. package/plugin/skills/frontend/scripts/detect/rules/decoration/support/raster-state.ts +51 -0
  145. package/plugin/skills/frontend/scripts/detect/rules/index.ts +16 -0
  146. package/plugin/skills/frontend/scripts/detect/rules/layout/body-text-viewport-edge.ts +62 -0
  147. package/plugin/skills/frontend/scripts/detect/rules/layout/clipped-overflow-container.ts +15 -0
  148. package/plugin/skills/frontend/scripts/detect/rules/layout/content-hidden-at-rest.ts +63 -0
  149. package/plugin/skills/frontend/scripts/detect/rules/layout/cramped-padding.ts +97 -0
  150. package/plugin/skills/frontend/scripts/detect/rules/layout/edge-flush-cards.ts +47 -0
  151. package/plugin/skills/frontend/scripts/detect/rules/layout/first-viewport-column-overflow.ts +43 -0
  152. package/plugin/skills/frontend/scripts/detect/rules/layout/heading-rhythm.ts +30 -0
  153. package/plugin/skills/frontend/scripts/detect/rules/layout/index.ts +21 -0
  154. package/plugin/skills/frontend/scripts/detect/rules/layout/monotonous-spacing.ts +32 -0
  155. package/plugin/skills/frontend/scripts/detect/rules/layout/nested-cards.ts +38 -0
  156. package/plugin/skills/frontend/scripts/detect/rules/layout/straggler.ts +28 -0
  157. package/plugin/skills/frontend/scripts/detect/rules/layout/support/cards.ts +114 -0
  158. package/plugin/skills/frontend/scripts/detect/rules/layout/support/clipping.ts +71 -0
  159. package/plugin/skills/frontend/scripts/detect/rules/layout/support/declared-mockups.ts +46 -0
  160. package/plugin/skills/frontend/scripts/detect/rules/layout/support/geometry.ts +73 -0
  161. package/plugin/skills/frontend/scripts/detect/rules/layout/support/hidden-interface.ts +35 -0
  162. package/plugin/skills/frontend/scripts/detect/rules/layout/support/layout-cases.ts +23 -0
  163. package/plugin/skills/frontend/scripts/detect/rules/layout/support/line-breaks.ts +32 -0
  164. package/plugin/skills/frontend/scripts/detect/rules/layout/support/motion.ts +77 -0
  165. package/plugin/skills/frontend/scripts/detect/rules/layout/support/padding.ts +93 -0
  166. package/plugin/skills/frontend/scripts/detect/rules/layout/support/rhythm.ts +161 -0
  167. package/plugin/skills/frontend/scripts/detect/rules/layout/text-occlusion.ts +84 -0
  168. package/plugin/skills/frontend/scripts/detect/rules/layout/text-overflow.ts +72 -0
  169. package/plugin/skills/frontend/scripts/detect/rules/layout/unbalanced-heading.ts +22 -0
  170. package/plugin/skills/frontend/scripts/detect/rules/layout/viewport-reflow.ts +33 -0
  171. package/plugin/skills/frontend/scripts/detect/rules/source/ai-color-palette.ts +11 -0
  172. package/plugin/skills/frontend/scripts/detect/rules/source/aphoristic-cadence.ts +14 -0
  173. package/plugin/skills/frontend/scripts/detect/rules/source/border-accent-on-rounded.ts +20 -0
  174. package/plugin/skills/frontend/scripts/detect/rules/source/bounce-easing.ts +21 -0
  175. package/plugin/skills/frontend/scripts/detect/rules/source/broken-image.ts +16 -0
  176. package/plugin/skills/frontend/scripts/detect/rules/source/codex-grid-background.ts +18 -0
  177. package/plugin/skills/frontend/scripts/detect/rules/source/dark-glow.ts +21 -0
  178. package/plugin/skills/frontend/scripts/detect/rules/source/em-dash-overuse.ts +15 -0
  179. package/plugin/skills/frontend/scripts/detect/rules/source/gradient-text.ts +11 -0
  180. package/plugin/skills/frontend/scripts/detect/rules/source/gray-on-color.ts +13 -0
  181. package/plugin/skills/frontend/scripts/detect/rules/source/index.ts +19 -0
  182. package/plugin/skills/frontend/scripts/detect/rules/source/marketing-buzzword.ts +17 -0
  183. package/plugin/skills/frontend/scripts/detect/rules/source/marquee.ts +12 -0
  184. package/plugin/skills/frontend/scripts/detect/rules/source/monotonous-spacing.ts +22 -0
  185. package/plugin/skills/frontend/scripts/detect/rules/source/overused-font.ts +16 -0
  186. package/plugin/skills/frontend/scripts/detect/rules/source/radial-halo.ts +14 -0
  187. package/plugin/skills/frontend/scripts/detect/rules/source/side-tab.ts +58 -0
  188. package/plugin/skills/frontend/scripts/detect/rules/source/support/accent-scans.ts +78 -0
  189. package/plugin/skills/frontend/scripts/detect/rules/source/support/check-source.ts +6 -0
  190. package/plugin/skills/frontend/scripts/detect/rules/source/support/corners.ts +105 -0
  191. package/plugin/skills/frontend/scripts/detect/rules/source/support/css-effects.ts +81 -0
  192. package/plugin/skills/frontend/scripts/detect/rules/source/support/css-scopes.ts +131 -0
  193. package/plugin/skills/frontend/scripts/detect/rules/source/support/image-tags.ts +113 -0
  194. package/plugin/skills/frontend/scripts/detect/rules/source/support/js-punctuation.ts +34 -0
  195. package/plugin/skills/frontend/scripts/detect/rules/source/support/markup-scope.ts +44 -0
  196. package/plugin/skills/frontend/scripts/detect/rules/source/support/source-color.ts +42 -0
  197. package/plugin/skills/frontend/scripts/detect/rules/source/support/source-shadow.ts +15 -0
  198. package/plugin/skills/frontend/scripts/detect/rules/source/support/source-text.ts +110 -0
  199. package/plugin/skills/frontend/scripts/detect/rules/typography/all-caps-body.ts +15 -0
  200. package/plugin/skills/frontend/scripts/detect/rules/typography/design-system-font-size.ts +23 -0
  201. package/plugin/skills/frontend/scripts/detect/rules/typography/design-system-font.ts +24 -0
  202. package/plugin/skills/frontend/scripts/detect/rules/typography/extreme-negative-tracking.ts +18 -0
  203. package/plugin/skills/frontend/scripts/detect/rules/typography/flat-type-hierarchy.ts +26 -0
  204. package/plugin/skills/frontend/scripts/detect/rules/typography/index.ts +21 -0
  205. package/plugin/skills/frontend/scripts/detect/rules/typography/italic-serif-display.ts +24 -0
  206. package/plugin/skills/frontend/scripts/detect/rules/typography/justified-text.ts +32 -0
  207. package/plugin/skills/frontend/scripts/detect/rules/typography/line-length.ts +28 -0
  208. package/plugin/skills/frontend/scripts/detect/rules/typography/oversized-h1.ts +20 -0
  209. package/plugin/skills/frontend/scripts/detect/rules/typography/overused-font.ts +45 -0
  210. package/plugin/skills/frontend/scripts/detect/rules/typography/support/drawn-enlargement.ts +48 -0
  211. package/plugin/skills/frontend/scripts/detect/rules/typography/support/fading-text.ts +48 -0
  212. package/plugin/skills/frontend/scripts/detect/rules/typography/support/flex-runs.ts +16 -0
  213. package/plugin/skills/frontend/scripts/detect/rules/typography/support/font-family.ts +28 -0
  214. package/plugin/skills/frontend/scripts/detect/rules/typography/support/painted-text.ts +81 -0
  215. package/plugin/skills/frontend/scripts/detect/rules/typography/support/svg-size.ts +57 -0
  216. package/plugin/skills/frontend/scripts/detect/rules/typography/support/text-context.ts +112 -0
  217. package/plugin/skills/frontend/scripts/detect/rules/typography/support/text-lines.ts +43 -0
  218. package/plugin/skills/frontend/scripts/detect/rules/typography/support/type-hierarchy.ts +48 -0
  219. package/plugin/skills/frontend/scripts/detect/rules/typography/tight-leading.ts +47 -0
  220. package/plugin/skills/frontend/scripts/detect/rules/typography/tiny-text.ts +23 -0
  221. package/plugin/skills/frontend/scripts/detect/rules/typography/undersized-ui-text.ts +28 -0
  222. package/plugin/skills/frontend/scripts/detect/rules/typography/wide-tracking.ts +26 -0
  223. package/plugin/skills/frontend/scripts/detect/snapshot/collect.ts +158 -0
  224. package/plugin/skills/frontend/scripts/detect/snapshot/style-props.ts +25 -0
  225. package/plugin/skills/frontend/scripts/detect/testing/build-snapshot.ts +78 -0
  226. package/plugin/skills/frontend/scripts/detect/tsconfig.json +19 -0
  227. package/plugin/skills/frontend/scripts/detect/types.ts +124 -0
  228. package/plugin/skills/programming/SKILL.md +17 -74
  229. package/plugin/skills/programming/references/go/README.md +1 -1
  230. package/plugin/skills/programming/references/go/bootstrap.md +2 -2
  231. package/plugin/skills/programming/references/python/README.md +4 -4
  232. package/plugin/skills/programming/references/python/one-liners.md +5 -5
  233. package/plugin/skills/programming/references/testing/README.md +82 -0
  234. package/plugin/skills/programming/references/testing/junk-classes.md +56 -0
  235. package/plugin/skills/programming/references/typescript/README.md +1 -2
  236. package/plugin/skills/programming/scripts/go/new-project.ts +197 -0
  237. package/plugin/skills/programming/scripts/python/new-project.ts +231 -0
  238. package/plugin/skills/programming/scripts/python/new-script.ts +134 -0
  239. package/plugin/skills/programming/scripts/rust/new-project.ts +215 -0
  240. package/plugin/skills/programming/scripts/shared/run-tool.ts +19 -0
  241. package/plugin/skills/programming/scripts/typescript/check-test-junk-rules.ts +140 -0
  242. package/plugin/skills/programming/scripts/typescript/check-test-junk.ts +148 -0
  243. package/plugin/skills/programming/scripts/typescript/mutation-proof.ts +179 -0
  244. package/plugin/skills/remove-ai-slops/SKILL.md +32 -20
  245. package/plugin/skills/ulw-research/scripts/source-commands.mjs +3 -1
  246. package/plugin/skills/visual-qa/SKILL.md +12 -1
  247. package/plugin/telemetry-schema.json +97 -1
  248. package/plugin/telemetry-schema.omo-cloud.json +97 -1
  249. package/bin/lib/claude-code-floor.js +0 -57
  250. package/plugin/skills/programming/scripts/go/new-project.py +0 -138
  251. package/plugin/skills/programming/scripts/python/new-project.py +0 -172
  252. package/plugin/skills/programming/scripts/python/new-script.py +0 -116
  253. package/plugin/skills/programming/scripts/rust/new-project.py +0 -178
Binary file
@@ -3,6 +3,7 @@ import { existsSync, realpathSync } from "node:fs"
3
3
  import { homedir as osHomedir } from "node:os"
4
4
  import { posix, win32 } from "node:path"
5
5
  import { propagateResult, runChild } from "./child-process.js"
6
+ import { privateFdHandoff } from "./private-fds.js"
6
7
 
7
8
  // A bun global install lives under <BUN_ROOT>/install/global/, and `bun add -g` links the launcher
8
9
  // into <BUN_ROOT>/bin. The link TARGET is what identifies the install, so every comparison below
@@ -267,7 +268,8 @@ export async function maybeReexecUnderBun(input) {
267
268
  const target = decision.nodePath ?? decision.bunPath
268
269
  // A hand-off to node is pinned there so the node launch never re-execs the old bun again.
269
270
  const childEnv = decision.nodePath ? { ...process.env, OMO_RUNTIME: "node" } : process.env
270
- if ((input.platform ?? process.platform) !== "win32" && typeof execve === "function") {
271
+ const handoff = privateFdHandoff(childEnv)
272
+ if (handoff === undefined && (input.platform ?? process.platform) !== "win32" && typeof execve === "function") {
271
273
  try {
272
274
  execve(target, [target, input.scriptPath, ...argv.slice(2)], childEnv)
273
275
  return true
@@ -278,7 +280,7 @@ export async function maybeReexecUnderBun(input) {
278
280
  const result = await run(target, [input.scriptPath, ...argv.slice(2)], {
279
281
  stdio: "inherit",
280
282
  windowsHide: true,
281
- ...(decision.nodePath ? { env: childEnv } : {}),
283
+ ...(handoff ?? (decision.nodePath ? { env: childEnv } : {})),
282
284
  })
283
285
  propagate(result)
284
286
  return true
@@ -1,5 +1,6 @@
1
1
  import { spawn } from "node:child_process"
2
2
  import { StringDecoder } from "node:string_decoder"
3
+ import { PRIVATE_FDS_ENV, privateFdHandoffFor } from "./private-fd-table.js"
3
4
 
4
5
  // POSIX launchers prefer execve and leave no wrapper. This async fallback remains for Windows
5
6
  // and missing/failed execve.
@@ -47,16 +48,29 @@ export function propagateResult(result) {
47
48
  * would terminate the child abruptly, so nothing is forwarded and the wait is the whole behavior.
48
49
  */
49
50
  export function runChild(command, args, options = {}) {
50
- const { captureStderr = false, ...spawnOptions } = options
51
+ const { captureStderr = false, onSpawn, ...spawnOptions } = options
51
52
  const env = spawnOptions.env ?? process.env
53
+ const shellHandoff = spawnOptions.shell
54
+ ? privateFdHandoffFor(env, env[PRIVATE_FDS_ENV], process.platform, { shell: true })
55
+ : undefined
56
+ const baseStdio = shellHandoff?.stdio ?? spawnOptions.stdio ?? "inherit"
57
+ const capturedStdio = typeof baseStdio === "string" ? [baseStdio, baseStdio, "pipe"] : [...baseStdio]
58
+ capturedStdio[2] = "pipe"
52
59
  return new Promise((resolve, reject) => {
53
- const child = spawn(command, args, {
54
- stdio: "inherit",
55
- windowsHide: true,
56
- ...spawnOptions,
57
- // A captured stderr is still shown live; the caller also gets its tail to classify the failure.
58
- ...(captureStderr ? { stdio: ["inherit", "inherit", "pipe"] } : {}),
59
- })
60
+ let child
61
+ try {
62
+ child = spawn(command, args, {
63
+ stdio: "inherit",
64
+ windowsHide: true,
65
+ ...spawnOptions,
66
+ ...(shellHandoff ? { env: shellHandoff.env, stdio: shellHandoff.stdio } : {}),
67
+ // A captured stderr is still shown live; the caller also gets its tail to classify the failure.
68
+ ...(captureStderr ? { stdio: capturedStdio } : {}),
69
+ })
70
+ } finally {
71
+ const closeOwned = onSpawn ?? shellHandoff?.onSpawn
72
+ closeOwned?.()
73
+ }
60
74
  let stderr = ""
61
75
  if (captureStderr) {
62
76
  // The decoder keeps a multi-byte character split across chunks whole; the echo stays raw bytes.
@@ -1,6 +1,5 @@
1
1
  import { existsSync, readFileSync, writeFileSync } from "node:fs"
2
2
  import { join } from "node:path"
3
- import { floorClaudeCodeVersion } from "./claude-code-floor.js"
4
3
  import { prepareCompileSafeEngine } from "./compile-safe-engine.js"
5
4
  import { LAUNCH_SPEC_FILENAME, normalizeLaunchSpecMode } from "./launch-spec-mode.js"
6
5
  import { prepareRpcStreamErrors } from "./rpc-stream-errors.js"
@@ -9,7 +8,6 @@ import { prepareRpcStreamErrors } from "./rpc-stream-errors.js"
9
8
  export const ENGINE_PREPARED_STAMP = ".omo-engine-prepared"
10
9
 
11
10
  export function prepareInstalledEngine(senpiRoot) {
12
- floorClaudeCodeVersion(senpiRoot)
13
11
  prepareCompileSafeEngine(senpiRoot)
14
12
  prepareRpcStreamErrors(senpiRoot)
15
13
  }
@@ -3,6 +3,7 @@ import { existsSync } from "node:fs"
3
3
  import { join } from "node:path"
4
4
  import { isEngineCommand } from "./engine-commands.js"
5
5
  import { spawnNode } from "./child-process.js"
6
+ import { privateFdHandoff } from "./private-fds.js"
6
7
  import { doctorCoverageLines } from "./category-coverage.js"
7
8
  import { runDoctorModels } from "./model-chains.js"
8
9
  import { doctorComputerUseLines } from "./computer-use-doctor.js"
@@ -52,7 +53,8 @@ async function spawnSenpi(args, withExtension) {
52
53
  : args
53
54
  const env = senpiEnvironment(senpi.packageRoot)
54
55
  if (withExtension) withHerdrAgentHint(env, args)
55
- if (process.platform !== "win32" && typeof process.execve === "function") {
56
+ const handoff = privateFdHandoff(env)
57
+ if (handoff === undefined && process.platform !== "win32" && typeof process.execve === "function") {
56
58
  try {
57
59
  process.execve(process.execPath, [process.execPath, senpi.cliPath, ...finalArgs], env)
58
60
  return
@@ -60,7 +62,14 @@ async function spawnSenpi(args, withExtension) {
60
62
  // A failed replacement still uses the signal-aware child path below.
61
63
  }
62
64
  }
63
- await spawnNode(senpi.cliPath, finalArgs, { env })
65
+ await spawnNode(senpi.cliPath, finalArgs, handoff ?? { env })
66
+ }
67
+
68
+ // `omo remote attach`: the engine's attach TUI runs as a signal-forwarding child, never an execve replacement,
69
+ // because this process serves the endpoint the TUI is attached to until the TUI exits.
70
+ export async function runAttachTui(args) {
71
+ const senpi = preparedSenpi()
72
+ await spawnNode(senpi.cliPath, args, { env: senpiEnvironment(senpi.packageRoot) })
64
73
  }
65
74
 
66
75
  // Routine launch notices go straight to stderr: Bun renders every console.error line red on a
@@ -0,0 +1,114 @@
1
+ import { closeSync, fstatSync } from "node:fs"
2
+
3
+ // senpi#4749: SENPI_PRIVATE_FDS maps each channel name to an inherited descriptor or null. Measured on
4
+ // Node 24/26 and Bun 1.4: process.execve does not keep inherited descriptors in the new image (all four
5
+ // hop/target pairs), and Node on Linux leaks descriptors from 24 up into every child while every runtime
6
+ // marks 5..21 close-on-exec at startup. So a launch that carries a table always reaches the engine as a
7
+ // child whose stdio lists the descriptors it forwards, and only an unshared socket in 5..15 that is not
8
+ // the runtime's own IPC channel is forwarded. Every other entry still travels as null, so the engine
9
+ // keeps the name declared (never a CLI fallback). Windows instead carries two distinct pipe halves
10
+ // in 5..64, atomically, on their original stdio slots (#11955). senpi owns receipt-side inherit clearing.
11
+ export const PRIVATE_FDS_ENV = "SENPI_PRIVATE_FDS"
12
+ const ADOPTABLE_MAX = 15
13
+
14
+ function ipcDescriptor() {
15
+ const channel = process.channel
16
+ if (typeof channel !== "object" || channel === null) return null
17
+ return typeof channel.fd === "number" ? channel.fd : undefined
18
+ }
19
+
20
+ function isSocket(fd) {
21
+ try {
22
+ return fstatSync(fd).isSocket()
23
+ } catch {
24
+ return false
25
+ }
26
+ }
27
+
28
+ function inRange(fd) {
29
+ return Number.isSafeInteger(fd) && fd >= 5 && fd <= 64
30
+ }
31
+
32
+ // Node and Bun on Windows report an anonymous pipe with mode S_IFIFO (0o010000), but Stats.isFIFO()
33
+ // returns false there because the platform defines no S_IFIFO constant. Compare the file-type bits directly.
34
+ const S_IFMT = 0o170000
35
+ const S_IFIFO = 0o010000
36
+
37
+ function isPipe(fd) {
38
+ try {
39
+ return (fstatSync(fd).mode & S_IFMT) === S_IFIFO
40
+ } catch {
41
+ return false
42
+ }
43
+ }
44
+
45
+ /** The table to hand on, the descriptors it forwards, and named sockets this process must close. */
46
+ export function inspectPrivateFdTable(table, platform = process.platform) {
47
+ let value
48
+ try {
49
+ value = JSON.parse(table)
50
+ } catch {
51
+ return { table, fds: [], discard: [] }
52
+ }
53
+ if (typeof value !== "object" || value === null || Array.isArray(value)) return { table, fds: [], discard: [] }
54
+ const ipc = ipcDescriptor()
55
+ const counts = new Map()
56
+ for (const fd of Object.values(value)) {
57
+ // Preserve #11786's POSIX alias behavior. On Windows even a malformed third half
58
+ // participates, so it cannot alias another name's otherwise valid pair.
59
+ const descriptors = platform === "win32" && Array.isArray(fd) ? fd : [fd]
60
+ for (const descriptor of descriptors) counts.set(descriptor, (counts.get(descriptor) ?? 0) + 1)
61
+ }
62
+ const forwarded = {}
63
+ const fds = []
64
+ const discard = []
65
+ for (const [name, fd] of Object.entries(value)) {
66
+ forwarded[name] = null
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)
70
+ if (usable) {
71
+ forwarded[name] = fd
72
+ fds.push(...fd)
73
+ } else if (ipc !== undefined) {
74
+ // Like POSIX, a refused entry's open pipes are closed so the hop never keeps them.
75
+ for (const descriptor of Array.isArray(fd) ? fd : [fd]) {
76
+ if (inRange(descriptor) && descriptor !== ipc && isPipe(descriptor)) discard.push(descriptor)
77
+ }
78
+ }
79
+ continue
80
+ }
81
+ if (!inRange(fd) || ipc === undefined || fd === ipc || !isSocket(fd)) continue
82
+ if (counts.get(fd) > 1 || fd > ADOPTABLE_MAX) discard.push(fd)
83
+ else {
84
+ forwarded[name] = fd
85
+ fds.push(fd)
86
+ }
87
+ }
88
+ return { table: JSON.stringify(forwarded), fds, discard: [...new Set(discard)] }
89
+ }
90
+
91
+ /** Child-spawn options that carry this launch's table and descriptors, or undefined when it has no table. */
92
+ export function privateFdHandoffFor(env, table, platform = process.platform, { shell = false } = {}) {
93
+ if (!table) return undefined
94
+ const inspected = inspectPrivateFdTable(table, platform)
95
+ const stdio = ["inherit", "inherit", "inherit"]
96
+ for (const fd of shell ? [] : inspected.fds) {
97
+ while (stdio.length <= fd) stdio.push("ignore")
98
+ stdio[fd] = fd
99
+ }
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
103
+ return {
104
+ env: { ...env, [PRIVATE_FDS_ENV]: forwarded },
105
+ stdio,
106
+ // Unlike POSIX's protected sockets, Windows pipes must not remain in the waiting parent.
107
+ // 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
+ } : {}),
113
+ }
114
+ }
@@ -0,0 +1,13 @@
1
+ import { closeSync } from "node:fs"
2
+ import { inspectPrivateFdTable, PRIVATE_FDS_ENV, privateFdHandoffFor } from "./private-fd-table.js"
3
+
4
+ // The npm launcher captures the table before anything spawns, so its helper children never see it,
5
+ // and closes named sockets it can never forward so no child inherits them. Windows pairs are
6
+ // transferred on explicit hops only; their waiting parent's copies close immediately after spawn.
7
+ const table = process.env[PRIVATE_FDS_ENV]
8
+ delete process.env[PRIVATE_FDS_ENV]
9
+ if (table) for (const fd of inspectPrivateFdTable(table).discard) closeSync(fd)
10
+
11
+ export function privateFdHandoff(env) {
12
+ return privateFdHandoffFor(env, table)
13
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "_comment": "Derived from @code-yeongyu/senpi 2026.10.27-1 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.10.30-1 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",
@@ -0,0 +1,15 @@
1
+ /**
2
+ * `omo remote attach` holds a device-service connection and a local endpoint open while the engine's
3
+ * attach TUI runs. The launcher therefore leaves through `exit` on every path: a TUI that cannot start
4
+ * (missing engine, spawn error) would otherwise leave both open, and the command would never return.
5
+ */
6
+ export async function runRemoteAttachLaunch({ prepare, runTui, reportError, exit }) {
7
+ try {
8
+ const engineArgs = await prepare()
9
+ if (engineArgs) await runTui(engineArgs)
10
+ } catch (error) {
11
+ reportError(error)
12
+ } finally {
13
+ exit()
14
+ }
15
+ }