oh-my-opencode 5.1.84 → 5.1.86

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 (405) hide show
  1. package/.agents/command/remove-deadcode.md +1 -1
  2. package/.agents/skills/remove-deadcode/SKILL.md +1 -1
  3. package/.agents/skills/work-with-pr/SKILL.md +2 -2
  4. package/.opencode/command/remove-deadcode.md +1 -1
  5. package/.opencode/skills/work-with-pr/SKILL.md +2 -2
  6. package/THIRD-PARTY-NOTICES.md +9 -3
  7. package/dist/cli/index.js +1022 -842
  8. package/dist/cli/service-auth/devices.d.ts +5 -2
  9. package/dist/cli-node/index.js +1022 -842
  10. package/dist/config/schema/agent-names.d.ts +1 -0
  11. package/dist/index.js +180 -205
  12. package/dist/skills/browser/SKILL.md +4 -1
  13. package/dist/skills/browser/references/commands.md +5 -2
  14. package/dist/skills/browser/references/desktop.md +1 -0
  15. package/dist/skills/browser/references/owned-engine/README.md +2 -0
  16. package/dist/skills/browser/references/owned-engine/frames-and-humans.md +2 -0
  17. package/dist/skills/browser/references/owned-engine/network.md +10 -5
  18. package/dist/skills/browser/references/recipes/1password.md +2 -0
  19. package/dist/skills/browser/runtime/omowright/index.js +11 -11
  20. package/dist/skills/browser/runtime/omowright/manifest.json +4 -4
  21. package/dist/skills/debugging/SKILL.md +1 -1
  22. package/dist/skills/git/SKILL.md +62 -0
  23. package/dist/skills/git/agents/openai.yaml +13 -0
  24. package/dist/skills/github/SKILL.md +94 -0
  25. package/dist/skills/github/references/branch-rules.md +129 -0
  26. package/dist/skills/github/references/evidence-attachments.md +16 -0
  27. package/dist/skills/github/references/repo-setup.md +152 -0
  28. package/dist/skills/github/references/waiting.md +52 -0
  29. package/dist/skills/github/references/workflows.md +161 -0
  30. package/dist/skills/github/scripts/cli.ts +8 -0
  31. package/dist/skills/github/scripts/package.json +12 -0
  32. package/dist/skills/github/scripts/sdk.ts +11 -0
  33. package/dist/skills/github/scripts/src/account.ts +243 -0
  34. package/dist/skills/github/scripts/src/actions-write.ts +86 -0
  35. package/dist/skills/github/scripts/src/actions.ts +210 -0
  36. package/dist/skills/github/scripts/src/attestations.ts +136 -0
  37. package/dist/skills/github/scripts/src/blake2b.ts +102 -0
  38. package/dist/skills/github/scripts/src/branch-protection.ts +192 -0
  39. package/dist/skills/github/scripts/src/caches.ts +105 -0
  40. package/dist/skills/github/scripts/src/checks.ts +107 -0
  41. package/dist/skills/github/scripts/src/codespaces.ts +230 -0
  42. package/dist/skills/github/scripts/src/conversation-lock.ts +50 -0
  43. package/dist/skills/github/scripts/src/discussion-list.ts +126 -0
  44. package/dist/skills/github/scripts/src/discussion-lookup.ts +127 -0
  45. package/dist/skills/github/scripts/src/discussions.ts +234 -0
  46. package/dist/skills/github/scripts/src/env.ts +100 -0
  47. package/dist/skills/github/scripts/src/errors.ts +79 -0
  48. package/dist/skills/github/scripts/src/fields.ts +27 -0
  49. package/dist/skills/github/scripts/src/gist-shape.ts +58 -0
  50. package/dist/skills/github/scripts/src/gists-write.ts +130 -0
  51. package/dist/skills/github/scripts/src/gists.ts +118 -0
  52. package/dist/skills/github/scripts/src/git-auth.ts +46 -0
  53. package/dist/skills/github/scripts/src/http.ts +159 -0
  54. package/dist/skills/github/scripts/src/issue-develop.ts +118 -0
  55. package/dist/skills/github/scripts/src/issues-extra.ts +135 -0
  56. package/dist/skills/github/scripts/src/issues-write.ts +174 -0
  57. package/dist/skills/github/scripts/src/issues.ts +156 -0
  58. package/dist/skills/github/scripts/src/keys.ts +176 -0
  59. package/dist/skills/github/scripts/src/labels.ts +209 -0
  60. package/dist/skills/github/scripts/src/merge.ts +115 -0
  61. package/dist/skills/github/scripts/src/poly1305.ts +22 -0
  62. package/dist/skills/github/scripts/src/pr-checkout.ts +92 -0
  63. package/dist/skills/github/scripts/src/pr-view.ts +106 -0
  64. package/dist/skills/github/scripts/src/project-fields.ts +144 -0
  65. package/dist/skills/github/scripts/src/project-item-edit.ts +153 -0
  66. package/dist/skills/github/scripts/src/project-items.ts +191 -0
  67. package/dist/skills/github/scripts/src/project-links.ts +104 -0
  68. package/dist/skills/github/scripts/src/project-ref.ts +145 -0
  69. package/dist/skills/github/scripts/src/project-state.ts +99 -0
  70. package/dist/skills/github/scripts/src/projects.ts +158 -0
  71. package/dist/skills/github/scripts/src/pulls-extra.ts +165 -0
  72. package/dist/skills/github/scripts/src/pulls-read.ts +176 -0
  73. package/dist/skills/github/scripts/src/pulls-review.ts +206 -0
  74. package/dist/skills/github/scripts/src/pulls-write.ts +187 -0
  75. package/dist/skills/github/scripts/src/raw.ts +78 -0
  76. package/dist/skills/github/scripts/src/read.ts +77 -0
  77. package/dist/skills/github/scripts/src/release-assets.ts +111 -0
  78. package/dist/skills/github/scripts/src/release-download.ts +151 -0
  79. package/dist/skills/github/scripts/src/release-write.ts +197 -0
  80. package/dist/skills/github/scripts/src/repo-admin.ts +112 -0
  81. package/dist/skills/github/scripts/src/repo-content.ts +187 -0
  82. package/dist/skills/github/scripts/src/repo-create.ts +139 -0
  83. package/dist/skills/github/scripts/src/repo-extras.ts +217 -0
  84. package/dist/skills/github/scripts/src/repo-list.ts +143 -0
  85. package/dist/skills/github/scripts/src/repo-settings.ts +176 -0
  86. package/dist/skills/github/scripts/src/repo-sync.ts +81 -0
  87. package/dist/skills/github/scripts/src/repo-url.ts +104 -0
  88. package/dist/skills/github/scripts/src/repos.ts +87 -0
  89. package/dist/skills/github/scripts/src/ruleset-shape.ts +96 -0
  90. package/dist/skills/github/scripts/src/rulesets-write.ts +124 -0
  91. package/dist/skills/github/scripts/src/rulesets.ts +80 -0
  92. package/dist/skills/github/scripts/src/run-download.ts +88 -0
  93. package/dist/skills/github/scripts/src/salsa20.ts +97 -0
  94. package/dist/skills/github/scripts/src/scopes.ts +165 -0
  95. package/dist/skills/github/scripts/src/sealed-box.ts +75 -0
  96. package/dist/skills/github/scripts/src/search-commits.ts +114 -0
  97. package/dist/skills/github/scripts/src/search.ts +116 -0
  98. package/dist/skills/github/scripts/src/secrets.ts +131 -0
  99. package/dist/skills/github/scripts/src/snappy.ts +57 -0
  100. package/dist/skills/github/scripts/src/status-search.ts +55 -0
  101. package/dist/skills/github/scripts/src/transfer.ts +97 -0
  102. package/dist/skills/github/scripts/src/types.ts +75 -0
  103. package/dist/skills/github/scripts/src/variables.ts +86 -0
  104. package/dist/skills/github/scripts/src/wait.ts +164 -0
  105. package/dist/skills/github/scripts/src/wire.ts +159 -0
  106. package/dist/skills/github/scripts/src/workflows.ts +144 -0
  107. package/dist/skills/github/scripts/src/zip.ts +104 -0
  108. package/dist/skills/github/scripts/surface.ts +106 -0
  109. package/dist/skills/github/scripts/vendor/surface/SOURCE.json +15 -0
  110. package/dist/skills/github/scripts/vendor/surface/cli.ts +203 -0
  111. package/dist/skills/github/scripts/vendor/surface/flags.ts +195 -0
  112. package/dist/skills/github/scripts/vendor/surface/help.ts +89 -0
  113. package/dist/skills/github/scripts/vendor/surface/http.ts +180 -0
  114. package/dist/skills/github/scripts/vendor/surface/index.ts +44 -0
  115. package/dist/skills/github/scripts/vendor/surface/mcp.ts +241 -0
  116. package/dist/skills/github/scripts/vendor/surface/schema.ts +200 -0
  117. package/dist/skills/github/scripts/vendor/surface/stdio.ts +54 -0
  118. package/dist/skills/github/scripts/vendor/surface/surface.ts +250 -0
  119. package/dist/skills/github/scripts/vendor/surface/tools.ts +80 -0
  120. package/dist/skills/programming/SKILL.md +1 -1
  121. package/dist/skills/ulw-execute/SKILL.md +1 -1
  122. package/dist/tui.js +30 -27
  123. package/package.json +28 -26
  124. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  125. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  126. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  127. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  128. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  129. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  130. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  131. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  132. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  133. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +2 -2
  134. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  135. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  136. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  137. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  138. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  139. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  140. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  141. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  142. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  143. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  144. package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +1 -1
  145. package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
  146. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +5 -5
  147. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  148. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/SKILL.md +1 -1
  149. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +3 -3
  150. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  151. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  152. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  153. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  154. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  155. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  156. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  157. package/packages/omo-codex/plugin/hooks/post-tool-use-recording-spawn-admission.json +1 -1
  158. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  159. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  160. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  161. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  162. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  163. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  164. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  165. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-execute-continuation.json +1 -1
  166. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  167. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  168. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  169. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  170. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  171. package/packages/omo-codex/plugin/package-lock.json +12 -12
  172. package/packages/omo-codex/plugin/package.json +1 -1
  173. package/packages/omo-codex/plugin/skills/browser/SKILL.md +4 -1
  174. package/packages/omo-codex/plugin/skills/browser/references/commands.md +5 -2
  175. package/packages/omo-codex/plugin/skills/browser/references/desktop.md +1 -0
  176. package/packages/omo-codex/plugin/skills/browser/references/owned-engine/README.md +2 -0
  177. package/packages/omo-codex/plugin/skills/browser/references/owned-engine/frames-and-humans.md +2 -0
  178. package/packages/omo-codex/plugin/skills/browser/references/owned-engine/network.md +10 -5
  179. package/packages/omo-codex/plugin/skills/browser/references/recipes/1password.md +2 -0
  180. package/packages/omo-codex/plugin/skills/browser/runtime/omowright/index.js +11 -11
  181. package/packages/omo-codex/plugin/skills/browser/runtime/omowright/manifest.json +4 -4
  182. package/packages/omo-codex/plugin/skills/debugging/SKILL.md +1 -1
  183. package/packages/omo-codex/plugin/skills/git/SKILL.md +62 -0
  184. package/packages/omo-codex/plugin/skills/git/agents/openai.yaml +13 -0
  185. package/packages/omo-codex/plugin/skills/github/SKILL.md +94 -0
  186. package/packages/omo-codex/plugin/skills/github/agents/openai.yaml +2 -0
  187. package/packages/omo-codex/plugin/skills/github/references/branch-rules.md +129 -0
  188. package/packages/omo-codex/plugin/skills/github/references/evidence-attachments.md +16 -0
  189. package/packages/omo-codex/plugin/skills/github/references/repo-setup.md +152 -0
  190. package/packages/omo-codex/plugin/skills/github/references/waiting.md +52 -0
  191. package/packages/omo-codex/plugin/skills/github/references/workflows.md +161 -0
  192. package/packages/omo-codex/plugin/skills/github/scripts/cli.ts +8 -0
  193. package/packages/omo-codex/plugin/skills/github/scripts/package.json +12 -0
  194. package/packages/omo-codex/plugin/skills/github/scripts/sdk.ts +11 -0
  195. package/packages/omo-codex/plugin/skills/github/scripts/src/account.ts +243 -0
  196. package/packages/omo-codex/plugin/skills/github/scripts/src/actions-write.ts +86 -0
  197. package/packages/omo-codex/plugin/skills/github/scripts/src/actions.ts +210 -0
  198. package/packages/omo-codex/plugin/skills/github/scripts/src/attestations.ts +136 -0
  199. package/packages/omo-codex/plugin/skills/github/scripts/src/blake2b.ts +102 -0
  200. package/packages/omo-codex/plugin/skills/github/scripts/src/branch-protection.ts +192 -0
  201. package/packages/omo-codex/plugin/skills/github/scripts/src/caches.ts +105 -0
  202. package/packages/omo-codex/plugin/skills/github/scripts/src/checks.ts +107 -0
  203. package/packages/omo-codex/plugin/skills/github/scripts/src/codespaces.ts +230 -0
  204. package/packages/omo-codex/plugin/skills/github/scripts/src/conversation-lock.ts +50 -0
  205. package/packages/omo-codex/plugin/skills/github/scripts/src/discussion-list.ts +126 -0
  206. package/packages/omo-codex/plugin/skills/github/scripts/src/discussion-lookup.ts +127 -0
  207. package/packages/omo-codex/plugin/skills/github/scripts/src/discussions.ts +234 -0
  208. package/packages/omo-codex/plugin/skills/github/scripts/src/env.ts +100 -0
  209. package/packages/omo-codex/plugin/skills/github/scripts/src/errors.ts +79 -0
  210. package/packages/omo-codex/plugin/skills/github/scripts/src/fields.ts +27 -0
  211. package/packages/omo-codex/plugin/skills/github/scripts/src/gist-shape.ts +58 -0
  212. package/packages/omo-codex/plugin/skills/github/scripts/src/gists-write.ts +130 -0
  213. package/packages/omo-codex/plugin/skills/github/scripts/src/gists.ts +118 -0
  214. package/packages/omo-codex/plugin/skills/github/scripts/src/git-auth.ts +46 -0
  215. package/packages/omo-codex/plugin/skills/github/scripts/src/http.ts +159 -0
  216. package/packages/omo-codex/plugin/skills/github/scripts/src/issue-develop.ts +118 -0
  217. package/packages/omo-codex/plugin/skills/github/scripts/src/issues-extra.ts +135 -0
  218. package/packages/omo-codex/plugin/skills/github/scripts/src/issues-write.ts +174 -0
  219. package/packages/omo-codex/plugin/skills/github/scripts/src/issues.ts +156 -0
  220. package/packages/omo-codex/plugin/skills/github/scripts/src/keys.ts +176 -0
  221. package/packages/omo-codex/plugin/skills/github/scripts/src/labels.ts +209 -0
  222. package/packages/omo-codex/plugin/skills/github/scripts/src/merge.ts +115 -0
  223. package/packages/omo-codex/plugin/skills/github/scripts/src/poly1305.ts +22 -0
  224. package/packages/omo-codex/plugin/skills/github/scripts/src/pr-checkout.ts +92 -0
  225. package/packages/omo-codex/plugin/skills/github/scripts/src/pr-view.ts +106 -0
  226. package/packages/omo-codex/plugin/skills/github/scripts/src/project-fields.ts +144 -0
  227. package/packages/omo-codex/plugin/skills/github/scripts/src/project-item-edit.ts +153 -0
  228. package/packages/omo-codex/plugin/skills/github/scripts/src/project-items.ts +191 -0
  229. package/packages/omo-codex/plugin/skills/github/scripts/src/project-links.ts +104 -0
  230. package/packages/omo-codex/plugin/skills/github/scripts/src/project-ref.ts +145 -0
  231. package/packages/omo-codex/plugin/skills/github/scripts/src/project-state.ts +99 -0
  232. package/packages/omo-codex/plugin/skills/github/scripts/src/projects.ts +158 -0
  233. package/packages/omo-codex/plugin/skills/github/scripts/src/pulls-extra.ts +165 -0
  234. package/packages/omo-codex/plugin/skills/github/scripts/src/pulls-read.ts +176 -0
  235. package/packages/omo-codex/plugin/skills/github/scripts/src/pulls-review.ts +206 -0
  236. package/packages/omo-codex/plugin/skills/github/scripts/src/pulls-write.ts +187 -0
  237. package/packages/omo-codex/plugin/skills/github/scripts/src/raw.ts +78 -0
  238. package/packages/omo-codex/plugin/skills/github/scripts/src/read.ts +77 -0
  239. package/packages/omo-codex/plugin/skills/github/scripts/src/release-assets.ts +111 -0
  240. package/packages/omo-codex/plugin/skills/github/scripts/src/release-download.ts +151 -0
  241. package/packages/omo-codex/plugin/skills/github/scripts/src/release-write.ts +197 -0
  242. package/packages/omo-codex/plugin/skills/github/scripts/src/repo-admin.ts +112 -0
  243. package/packages/omo-codex/plugin/skills/github/scripts/src/repo-content.ts +187 -0
  244. package/packages/omo-codex/plugin/skills/github/scripts/src/repo-create.ts +139 -0
  245. package/packages/omo-codex/plugin/skills/github/scripts/src/repo-extras.ts +217 -0
  246. package/packages/omo-codex/plugin/skills/github/scripts/src/repo-list.ts +143 -0
  247. package/packages/omo-codex/plugin/skills/github/scripts/src/repo-settings.ts +176 -0
  248. package/packages/omo-codex/plugin/skills/github/scripts/src/repo-sync.ts +81 -0
  249. package/packages/omo-codex/plugin/skills/github/scripts/src/repo-url.ts +104 -0
  250. package/packages/omo-codex/plugin/skills/github/scripts/src/repos.ts +87 -0
  251. package/packages/omo-codex/plugin/skills/github/scripts/src/ruleset-shape.ts +96 -0
  252. package/packages/omo-codex/plugin/skills/github/scripts/src/rulesets-write.ts +124 -0
  253. package/packages/omo-codex/plugin/skills/github/scripts/src/rulesets.ts +80 -0
  254. package/packages/omo-codex/plugin/skills/github/scripts/src/run-download.ts +88 -0
  255. package/packages/omo-codex/plugin/skills/github/scripts/src/salsa20.ts +97 -0
  256. package/packages/omo-codex/plugin/skills/github/scripts/src/scopes.ts +165 -0
  257. package/packages/omo-codex/plugin/skills/github/scripts/src/sealed-box.ts +75 -0
  258. package/packages/omo-codex/plugin/skills/github/scripts/src/search-commits.ts +114 -0
  259. package/packages/omo-codex/plugin/skills/github/scripts/src/search.ts +116 -0
  260. package/packages/omo-codex/plugin/skills/github/scripts/src/secrets.ts +131 -0
  261. package/packages/omo-codex/plugin/skills/github/scripts/src/snappy.ts +57 -0
  262. package/packages/omo-codex/plugin/skills/github/scripts/src/status-search.ts +55 -0
  263. package/packages/omo-codex/plugin/skills/github/scripts/src/transfer.ts +97 -0
  264. package/packages/omo-codex/plugin/skills/github/scripts/src/types.ts +75 -0
  265. package/packages/omo-codex/plugin/skills/github/scripts/src/variables.ts +86 -0
  266. package/packages/omo-codex/plugin/skills/github/scripts/src/wait.ts +164 -0
  267. package/packages/omo-codex/plugin/skills/github/scripts/src/wire.ts +159 -0
  268. package/packages/omo-codex/plugin/skills/github/scripts/src/workflows.ts +144 -0
  269. package/packages/omo-codex/plugin/skills/github/scripts/src/zip.ts +104 -0
  270. package/packages/omo-codex/plugin/skills/github/scripts/surface.ts +106 -0
  271. package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/SOURCE.json +15 -0
  272. package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/cli.ts +203 -0
  273. package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/flags.ts +195 -0
  274. package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/help.ts +89 -0
  275. package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/http.ts +180 -0
  276. package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/index.ts +44 -0
  277. package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/mcp.ts +241 -0
  278. package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/schema.ts +200 -0
  279. package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/stdio.ts +54 -0
  280. package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/surface.ts +250 -0
  281. package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/tools.ts +80 -0
  282. package/packages/omo-codex/plugin/skills/programming/SKILL.md +1 -1
  283. package/packages/omo-codex/plugin/skills/ulw-execute/SKILL.md +1 -1
  284. package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +1 -1
  285. package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +3 -3
  286. package/packages/omo-codex/plugin/test/sync-skills-codex-compatibility.test.mjs +1 -1
  287. package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +2 -1
  288. package/packages/omo-codex/plugin/test/sync-skills.test.mjs +5 -5
  289. package/packages/omo-codex/scripts/install-dist/install-local.mjs +20 -15
  290. package/packages/shared-skills/skills/browser/SKILL.md +4 -1
  291. package/packages/shared-skills/skills/browser/references/commands.md +5 -2
  292. package/packages/shared-skills/skills/browser/references/desktop.md +1 -0
  293. package/packages/shared-skills/skills/browser/references/owned-engine/README.md +2 -0
  294. package/packages/shared-skills/skills/browser/references/owned-engine/frames-and-humans.md +2 -0
  295. package/packages/shared-skills/skills/browser/references/owned-engine/network.md +10 -5
  296. package/packages/shared-skills/skills/browser/references/recipes/1password.md +2 -0
  297. package/packages/shared-skills/skills/browser/runtime/omowright/index.js +11 -11
  298. package/packages/shared-skills/skills/browser/runtime/omowright/manifest.json +4 -4
  299. package/packages/shared-skills/skills/debugging/SKILL.md +1 -1
  300. package/packages/shared-skills/skills/git/SKILL.md +62 -0
  301. package/packages/shared-skills/skills/git/agents/openai.yaml +13 -0
  302. package/packages/shared-skills/skills/github/SKILL.md +94 -0
  303. package/packages/shared-skills/skills/github/references/branch-rules.md +129 -0
  304. package/packages/shared-skills/skills/github/references/evidence-attachments.md +16 -0
  305. package/packages/shared-skills/skills/github/references/repo-setup.md +152 -0
  306. package/packages/shared-skills/skills/github/references/waiting.md +52 -0
  307. package/packages/shared-skills/skills/github/references/workflows.md +161 -0
  308. package/packages/shared-skills/skills/github/scripts/cli.ts +8 -0
  309. package/packages/shared-skills/skills/github/scripts/package.json +12 -0
  310. package/packages/shared-skills/skills/github/scripts/sdk.ts +11 -0
  311. package/packages/shared-skills/skills/github/scripts/src/account.ts +243 -0
  312. package/packages/shared-skills/skills/github/scripts/src/actions-write.ts +86 -0
  313. package/packages/shared-skills/skills/github/scripts/src/actions.ts +210 -0
  314. package/packages/shared-skills/skills/github/scripts/src/attestations.ts +136 -0
  315. package/packages/shared-skills/skills/github/scripts/src/blake2b.ts +102 -0
  316. package/packages/shared-skills/skills/github/scripts/src/branch-protection.ts +192 -0
  317. package/packages/shared-skills/skills/github/scripts/src/caches.ts +105 -0
  318. package/packages/shared-skills/skills/github/scripts/src/checks.ts +107 -0
  319. package/packages/shared-skills/skills/github/scripts/src/codespaces.ts +230 -0
  320. package/packages/shared-skills/skills/github/scripts/src/conversation-lock.ts +50 -0
  321. package/packages/shared-skills/skills/github/scripts/src/discussion-list.ts +126 -0
  322. package/packages/shared-skills/skills/github/scripts/src/discussion-lookup.ts +127 -0
  323. package/packages/shared-skills/skills/github/scripts/src/discussions.ts +234 -0
  324. package/packages/shared-skills/skills/github/scripts/src/env.ts +100 -0
  325. package/packages/shared-skills/skills/github/scripts/src/errors.ts +79 -0
  326. package/packages/shared-skills/skills/github/scripts/src/fields.ts +27 -0
  327. package/packages/shared-skills/skills/github/scripts/src/gist-shape.ts +58 -0
  328. package/packages/shared-skills/skills/github/scripts/src/gists-write.ts +130 -0
  329. package/packages/shared-skills/skills/github/scripts/src/gists.ts +118 -0
  330. package/packages/shared-skills/skills/github/scripts/src/git-auth.ts +46 -0
  331. package/packages/shared-skills/skills/github/scripts/src/http.ts +159 -0
  332. package/packages/shared-skills/skills/github/scripts/src/issue-develop.ts +118 -0
  333. package/packages/shared-skills/skills/github/scripts/src/issues-extra.ts +135 -0
  334. package/packages/shared-skills/skills/github/scripts/src/issues-write.ts +174 -0
  335. package/packages/shared-skills/skills/github/scripts/src/issues.ts +156 -0
  336. package/packages/shared-skills/skills/github/scripts/src/keys.ts +176 -0
  337. package/packages/shared-skills/skills/github/scripts/src/labels.ts +209 -0
  338. package/packages/shared-skills/skills/github/scripts/src/merge.ts +115 -0
  339. package/packages/shared-skills/skills/github/scripts/src/poly1305.ts +22 -0
  340. package/packages/shared-skills/skills/github/scripts/src/pr-checkout.ts +92 -0
  341. package/packages/shared-skills/skills/github/scripts/src/pr-view.ts +106 -0
  342. package/packages/shared-skills/skills/github/scripts/src/project-fields.ts +144 -0
  343. package/packages/shared-skills/skills/github/scripts/src/project-item-edit.ts +153 -0
  344. package/packages/shared-skills/skills/github/scripts/src/project-items.ts +191 -0
  345. package/packages/shared-skills/skills/github/scripts/src/project-links.ts +104 -0
  346. package/packages/shared-skills/skills/github/scripts/src/project-ref.ts +145 -0
  347. package/packages/shared-skills/skills/github/scripts/src/project-state.ts +99 -0
  348. package/packages/shared-skills/skills/github/scripts/src/projects.ts +158 -0
  349. package/packages/shared-skills/skills/github/scripts/src/pulls-extra.ts +165 -0
  350. package/packages/shared-skills/skills/github/scripts/src/pulls-read.ts +176 -0
  351. package/packages/shared-skills/skills/github/scripts/src/pulls-review.ts +206 -0
  352. package/packages/shared-skills/skills/github/scripts/src/pulls-write.ts +187 -0
  353. package/packages/shared-skills/skills/github/scripts/src/raw.ts +78 -0
  354. package/packages/shared-skills/skills/github/scripts/src/read.ts +77 -0
  355. package/packages/shared-skills/skills/github/scripts/src/release-assets.ts +111 -0
  356. package/packages/shared-skills/skills/github/scripts/src/release-download.ts +151 -0
  357. package/packages/shared-skills/skills/github/scripts/src/release-write.ts +197 -0
  358. package/packages/shared-skills/skills/github/scripts/src/repo-admin.ts +112 -0
  359. package/packages/shared-skills/skills/github/scripts/src/repo-content.ts +187 -0
  360. package/packages/shared-skills/skills/github/scripts/src/repo-create.ts +139 -0
  361. package/packages/shared-skills/skills/github/scripts/src/repo-extras.ts +217 -0
  362. package/packages/shared-skills/skills/github/scripts/src/repo-list.ts +143 -0
  363. package/packages/shared-skills/skills/github/scripts/src/repo-settings.ts +176 -0
  364. package/packages/shared-skills/skills/github/scripts/src/repo-sync.ts +81 -0
  365. package/packages/shared-skills/skills/github/scripts/src/repo-url.ts +104 -0
  366. package/packages/shared-skills/skills/github/scripts/src/repos.ts +87 -0
  367. package/packages/shared-skills/skills/github/scripts/src/ruleset-shape.ts +96 -0
  368. package/packages/shared-skills/skills/github/scripts/src/rulesets-write.ts +124 -0
  369. package/packages/shared-skills/skills/github/scripts/src/rulesets.ts +80 -0
  370. package/packages/shared-skills/skills/github/scripts/src/run-download.ts +88 -0
  371. package/packages/shared-skills/skills/github/scripts/src/salsa20.ts +97 -0
  372. package/packages/shared-skills/skills/github/scripts/src/scopes.ts +165 -0
  373. package/packages/shared-skills/skills/github/scripts/src/sealed-box.ts +75 -0
  374. package/packages/shared-skills/skills/github/scripts/src/search-commits.ts +114 -0
  375. package/packages/shared-skills/skills/github/scripts/src/search.ts +116 -0
  376. package/packages/shared-skills/skills/github/scripts/src/secrets.ts +131 -0
  377. package/packages/shared-skills/skills/github/scripts/src/snappy.ts +57 -0
  378. package/packages/shared-skills/skills/github/scripts/src/status-search.ts +55 -0
  379. package/packages/shared-skills/skills/github/scripts/src/transfer.ts +97 -0
  380. package/packages/shared-skills/skills/github/scripts/src/types.ts +75 -0
  381. package/packages/shared-skills/skills/github/scripts/src/variables.ts +86 -0
  382. package/packages/shared-skills/skills/github/scripts/src/wait.ts +164 -0
  383. package/packages/shared-skills/skills/github/scripts/src/wire.ts +159 -0
  384. package/packages/shared-skills/skills/github/scripts/src/workflows.ts +144 -0
  385. package/packages/shared-skills/skills/github/scripts/src/zip.ts +104 -0
  386. package/packages/shared-skills/skills/github/scripts/surface.ts +106 -0
  387. package/packages/shared-skills/skills/github/scripts/vendor/surface/SOURCE.json +15 -0
  388. package/packages/shared-skills/skills/github/scripts/vendor/surface/cli.ts +203 -0
  389. package/packages/shared-skills/skills/github/scripts/vendor/surface/flags.ts +195 -0
  390. package/packages/shared-skills/skills/github/scripts/vendor/surface/help.ts +89 -0
  391. package/packages/shared-skills/skills/github/scripts/vendor/surface/http.ts +180 -0
  392. package/packages/shared-skills/skills/github/scripts/vendor/surface/index.ts +44 -0
  393. package/packages/shared-skills/skills/github/scripts/vendor/surface/mcp.ts +241 -0
  394. package/packages/shared-skills/skills/github/scripts/vendor/surface/schema.ts +200 -0
  395. package/packages/shared-skills/skills/github/scripts/vendor/surface/stdio.ts +54 -0
  396. package/packages/shared-skills/skills/github/scripts/vendor/surface/surface.ts +250 -0
  397. package/packages/shared-skills/skills/github/scripts/vendor/surface/tools.ts +80 -0
  398. package/packages/shared-skills/skills/programming/SKILL.md +1 -1
  399. package/packages/shared-skills/skills/ulw-execute/SKILL.md +1 -1
  400. package/dist/skills/git-master/SKILL.md +0 -114
  401. package/dist/skills/git-master/agents/openai.yaml +0 -13
  402. package/packages/omo-codex/plugin/skills/git-master/SKILL.md +0 -114
  403. package/packages/omo-codex/plugin/skills/git-master/agents/openai.yaml +0 -13
  404. package/packages/shared-skills/skills/git-master/SKILL.md +0 -114
  405. package/packages/shared-skills/skills/git-master/agents/openai.yaml +0 -13
package/dist/cli/index.js CHANGED
@@ -2132,7 +2132,7 @@ var package_default;
2132
2132
  var init_package = __esm(() => {
2133
2133
  package_default = {
2134
2134
  name: "oh-my-opencode",
2135
- version: "5.1.84",
2135
+ version: "5.1.86",
2136
2136
  description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
2137
2137
  main: "./dist/index.js",
2138
2138
  types: "dist/index.d.ts",
@@ -2326,8 +2326,9 @@ var init_package = __esm(() => {
2326
2326
  },
2327
2327
  homepage: "https://github.com/code-yeongyu/oh-my-openagent#readme",
2328
2328
  dependencies: {
2329
- "@opentui/solid": "^0.5.11",
2329
+ "@opentui/solid": "^0.9.9",
2330
2330
  "detect-libc": "^2.1.2",
2331
+ "solid-js": "^1.9.20",
2331
2332
  zod: "^4.6.6"
2332
2333
  },
2333
2334
  devDependencies: {
@@ -2337,11 +2338,10 @@ var init_package = __esm(() => {
2337
2338
  "@oh-my-opencode/agents-md-core": "workspace:*",
2338
2339
  "@oh-my-opencode/ast-grep-mcp": "workspace:*",
2339
2340
  "@oh-my-opencode/boulder-state": "workspace:*",
2340
- "@oh-my-opencode/device-service-core": "workspace:*",
2341
2341
  "@oh-my-opencode/claude-code-compat-core": "workspace:*",
2342
2342
  "@oh-my-opencode/comment-checker-core": "workspace:*",
2343
2343
  "@oh-my-opencode/delegate-core": "workspace:*",
2344
- "@oh-my-opencode/thread-address-core": "workspace:*",
2344
+ "@oh-my-opencode/device-service-core": "workspace:*",
2345
2345
  "@oh-my-opencode/git-bash-mcp": "workspace:*",
2346
2346
  "@oh-my-opencode/hashline-core": "workspace:*",
2347
2347
  "@oh-my-opencode/isolation-core": "workspace:*",
@@ -2351,6 +2351,13 @@ var init_package = __esm(() => {
2351
2351
  "@oh-my-opencode/memory-core": "workspace:*",
2352
2352
  "@oh-my-opencode/model-core": "workspace:*",
2353
2353
  "@oh-my-opencode/omo-codex": "workspace:*",
2354
+ "@oh-my-opencode/omo-computer-carriers": "workspace:*",
2355
+ "@oh-my-opencode/omo-computer-engine": "workspace:*",
2356
+ "@oh-my-opencode/omo-computer-hand": "workspace:*",
2357
+ "@oh-my-opencode/omo-computer-prelude": "workspace:*",
2358
+ "@oh-my-opencode/omo-computer-protocol": "workspace:*",
2359
+ "@oh-my-opencode/omo-computer-sdk": "workspace:*",
2360
+ "@oh-my-opencode/omo-computer-tool": "workspace:*",
2354
2361
  "@oh-my-opencode/omo-config-core": "workspace:*",
2355
2362
  "@oh-my-opencode/omo-opencode": "workspace:*",
2356
2363
  "@oh-my-opencode/omo-senpi": "workspace:*",
@@ -2363,25 +2370,19 @@ var init_package = __esm(() => {
2363
2370
  "@oh-my-opencode/senpi-desktop-sdk": "workspace:*",
2364
2371
  "@oh-my-opencode/senpi-desktop-service": "workspace:*",
2365
2372
  "@oh-my-opencode/senpi-desktop-tool": "workspace:*",
2366
- "@oh-my-opencode/omo-computer-protocol": "workspace:*",
2367
- "@oh-my-opencode/omo-computer-sdk": "workspace:*",
2368
- "@oh-my-opencode/omo-computer-engine": "workspace:*",
2369
- "@oh-my-opencode/omo-computer-hand": "workspace:*",
2370
- "@oh-my-opencode/omo-computer-carriers": "workspace:*",
2371
- "@oh-my-opencode/omo-computer-tool": "workspace:*",
2372
- "@oh-my-opencode/omo-computer-prelude": "workspace:*",
2373
2373
  "@oh-my-opencode/senpi-task": "workspace:*",
2374
2374
  "@oh-my-opencode/shared-skills": "workspace:*",
2375
2375
  "@oh-my-opencode/skills-loader-core": "workspace:*",
2376
2376
  "@oh-my-opencode/team-core": "workspace:*",
2377
2377
  "@oh-my-opencode/telemetry-core": "workspace:*",
2378
+ "@oh-my-opencode/thread-address-core": "workspace:*",
2378
2379
  "@oh-my-opencode/tmux-core": "workspace:*",
2379
2380
  "@oh-my-opencode/utils": "workspace:*",
2380
2381
  "@opencode-ai/plugin": "1.18.31",
2381
2382
  "@opencode-ai/sdk": "1.18.31",
2382
2383
  "@opencode/plugin": "2.0.32",
2383
- "@opentui/core": "^0.5.11",
2384
- "@opentui/keymap": "^0.5.11",
2384
+ "@opentui/core": "^0.9.9",
2385
+ "@opentui/keymap": "^0.9.9",
2385
2386
  "@types/js-yaml": "^4.0.9",
2386
2387
  "@types/node": "26.6.2",
2387
2388
  "@types/picomatch": "^4.0.3",
@@ -2395,8 +2396,9 @@ var init_package = __esm(() => {
2395
2396
  "js-yaml": "^5.4.2",
2396
2397
  "jsonc-parser": "^3.3.1",
2397
2398
  knip: "6.43.0",
2399
+ "libsodium-wrappers": "^0.8.4",
2398
2400
  "node-pty": "^1.1.0",
2399
- omowright: "^0.3.4",
2401
+ omowright: "^0.3.10",
2400
2402
  "oxc-parser": "0.148.0",
2401
2403
  oxlint: "1.89.0",
2402
2404
  picocolors: "^1.1.1",
@@ -2406,18 +2408,18 @@ var init_package = __esm(() => {
2406
2408
  typescript: "^7.0.2"
2407
2409
  },
2408
2410
  optionalDependencies: {
2409
- "oh-my-opencode-darwin-arm64": "5.1.84",
2410
- "oh-my-opencode-darwin-x64": "5.1.84",
2411
- "oh-my-opencode-darwin-x64-baseline": "5.1.84",
2412
- "oh-my-opencode-linux-arm64": "5.1.84",
2413
- "oh-my-opencode-linux-arm64-musl": "5.1.84",
2414
- "oh-my-opencode-linux-x64": "5.1.84",
2415
- "oh-my-opencode-linux-x64-baseline": "5.1.84",
2416
- "oh-my-opencode-linux-x64-musl": "5.1.84",
2417
- "oh-my-opencode-linux-x64-musl-baseline": "5.1.84",
2418
- "oh-my-opencode-windows-arm64": "5.1.84",
2419
- "oh-my-opencode-windows-x64": "5.1.84",
2420
- "oh-my-opencode-windows-x64-baseline": "5.1.84"
2411
+ "oh-my-opencode-darwin-arm64": "5.1.86",
2412
+ "oh-my-opencode-darwin-x64": "5.1.86",
2413
+ "oh-my-opencode-darwin-x64-baseline": "5.1.86",
2414
+ "oh-my-opencode-linux-arm64": "5.1.86",
2415
+ "oh-my-opencode-linux-arm64-musl": "5.1.86",
2416
+ "oh-my-opencode-linux-x64": "5.1.86",
2417
+ "oh-my-opencode-linux-x64-baseline": "5.1.86",
2418
+ "oh-my-opencode-linux-x64-musl": "5.1.86",
2419
+ "oh-my-opencode-linux-x64-musl-baseline": "5.1.86",
2420
+ "oh-my-opencode-windows-arm64": "5.1.86",
2421
+ "oh-my-opencode-windows-x64": "5.1.86",
2422
+ "oh-my-opencode-windows-x64-baseline": "5.1.86"
2421
2423
  },
2422
2424
  overrides: {
2423
2425
  hono: "^4.13.8",
@@ -92986,7 +92988,7 @@ var package_default2;
92986
92988
  var init_package2 = __esm(() => {
92987
92989
  package_default2 = {
92988
92990
  name: "@oh-my-opencode/omo-codex",
92989
- version: "5.1.84",
92991
+ version: "5.1.86",
92990
92992
  type: "module",
92991
92993
  private: true,
92992
92994
  description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
@@ -94235,6 +94237,29 @@ var init_auto_update_checker = __esm(() => {
94235
94237
  init_cache();
94236
94238
  });
94237
94239
 
94240
+ // packages/device-service-core/src/local-only.ts
94241
+ function state3() {
94242
+ const holder = globalThis;
94243
+ holder[KEY2] ??= { marked: false };
94244
+ return holder[KEY2];
94245
+ }
94246
+ function refuseIfLocalOnly(site) {
94247
+ if (state3().marked)
94248
+ throw new LocalOnlyNetworkRefused(site);
94249
+ }
94250
+ var KEY2, LocalOnlyNetworkRefused;
94251
+ var init_local_only = __esm(() => {
94252
+ KEY2 = Symbol.for("omo.local-only-process.v1");
94253
+ LocalOnlyNetworkRefused = class LocalOnlyNetworkRefused extends Error {
94254
+ code = "local_only_network_refused";
94255
+ site;
94256
+ constructor(site) {
94257
+ super(`a local-only omo remote command reached the network at ${site}`);
94258
+ this.site = site;
94259
+ }
94260
+ };
94261
+ });
94262
+
94238
94263
  // packages/device-service-core/src/local-api/errors.ts
94239
94264
  var LocalApiError, protocolViolation = (detail) => {
94240
94265
  throw new LocalApiError("protocol_violation", detail);
@@ -98152,7 +98177,7 @@ var init_engine_endpoint = __esm(() => {
98152
98177
  NoPrimaryEndpointError = class NoPrimaryEndpointError extends NotSentError {
98153
98178
  constructor(device, listed) {
98154
98179
  super("unsupported", `${device} lists ${listed} engine endpoint(s) and names none as its own engine; nothing was opened`, {
98155
- action: `Start or restart omo on ${device}; if that does not help, update the device service on both devices.`
98180
+ action: `On ${device} run \`omo host ensure\`; if it answers primary_without_product_plugin, run \`omo host handoff\` once that host's sessions are idle; if it refuses, save its output and \`omo host status --json\`, stop only the primary host (\`omo host stop\`; never \`--force\`, which ends its live sessions) and ensure again; with no \`omo host\` command (omob), restart that omo; if it still names no engine, update the device service on both devices.`
98156
98181
  });
98157
98182
  }
98158
98183
  };
@@ -98354,6 +98379,616 @@ var init_device_service2 = __esm(() => {
98354
98379
  UPDATE_IN_FLIGHT = new Set(["pending", "trial"]);
98355
98380
  });
98356
98381
 
98382
+ // packages/device-service-core/src/delivery-consumer.ts
98383
+ var init_delivery_consumer = __esm(() => {
98384
+ init_client4();
98385
+ init_background_transport();
98386
+ init_device_service2();
98387
+ });
98388
+
98389
+ // packages/device-service-core/src/account-state.ts
98390
+ var init_account_state = () => {};
98391
+
98392
+ // packages/device-service-core/src/hand-device-keys.ts
98393
+ import { existsSync as existsSync65 } from "fs";
98394
+ var DEAD_ENDPOINT_CODES, connectFailure = (error) => {
98395
+ const detail = error instanceof Error ? error.message : String(error);
98396
+ if (error instanceof LocalApiError) {
98397
+ if (error.code === "refused" || error.code === "server_proof_invalid")
98398
+ return { cause: "refused", detail };
98399
+ if (error.code === "insecure_state_dir")
98400
+ return { cause: "unreadable", detail };
98401
+ if (error.code === "handshake_timeout" || error.code === "request_timeout")
98402
+ return { cause: "timed_out", detail };
98403
+ return { cause: "failed", detail };
98404
+ }
98405
+ const code = error instanceof Error && "code" in error ? String(error.code) : "";
98406
+ return { cause: DEAD_ENDPOINT_CODES.has(code) ? "dead_endpoint" : "failed", detail };
98407
+ }, connectOrNotRunning = async (connect, log) => {
98408
+ try {
98409
+ return await connect();
98410
+ } catch (error) {
98411
+ const { cause, detail } = connectFailure(error);
98412
+ log?.(`OmO device service: ${cause}, treated as not running (${detail}).`);
98413
+ return "not_running";
98414
+ }
98415
+ }, adopted = (status) => status.device !== null && status.state !== "sign_in_required", handDeviceKeys = async (options) => {
98416
+ if (!existsSync65(deviceServiceEndpointPath(options.stateDir)))
98417
+ return "not_running";
98418
+ const service = await connectOrNotRunning(options.connect, options.log);
98419
+ if (service === "not_running")
98420
+ return "not_running";
98421
+ try {
98422
+ if (options.when === "not_adopted" && adopted(await service.status()))
98423
+ return "already_adopted";
98424
+ await service.adopt(options.credential);
98425
+ return "adopted";
98426
+ } finally {
98427
+ service.close();
98428
+ }
98429
+ };
98430
+ var init_hand_device_keys = __esm(() => {
98431
+ init_device_service2();
98432
+ DEAD_ENDPOINT_CODES = new Set(["ENOENT", "ECONNREFUSED", "ECONNRESET", "EPIPE"]);
98433
+ });
98434
+
98435
+ // packages/device-service-core/src/bootstrap.ts
98436
+ import { existsSync as existsSync66 } from "fs";
98437
+ var forgetDeviceService = async (options) => {
98438
+ if (!existsSync66(deviceServiceEndpointPath(options.stateDir)))
98439
+ return "not_running";
98440
+ const service = await connectOrNotRunning(options.connect, options.log);
98441
+ if (service === "not_running")
98442
+ return "not_running";
98443
+ try {
98444
+ await service.forget();
98445
+ } finally {
98446
+ service.close();
98447
+ }
98448
+ return "forgotten";
98449
+ };
98450
+ var init_bootstrap = __esm(() => {
98451
+ init_account_state();
98452
+ init_device_service2();
98453
+ init_hand_device_keys();
98454
+ init_version2();
98455
+ });
98456
+
98457
+ // packages/device-service-core/src/cold-wake/host.ts
98458
+ var UNREPAIRABLE;
98459
+ var init_host = __esm(() => {
98460
+ UNREPAIRABLE = new Set(["EPERM", "EACCES", "EROFS"]);
98461
+ });
98462
+
98463
+ // packages/device-service-core/src/cold-wake/pinned-host.ts
98464
+ var init_pinned_host = __esm(() => {
98465
+ init_host();
98466
+ });
98467
+
98468
+ // packages/device-service-core/src/cold-wake/session-host-unit.ts
98469
+ var init_session_host_unit = () => {};
98470
+
98471
+ // packages/device-service-core/src/cold-wake/service-table.ts
98472
+ var SERVICE_TABLE_ENV = "OMO_RELAYD_SERVICES";
98473
+ var init_service_table = __esm(() => {
98474
+ init_session_host_unit();
98475
+ });
98476
+
98477
+ // packages/device-service-core/src/cold-wake/darwin.ts
98478
+ var TABLE_KEY;
98479
+ var init_darwin = __esm(() => {
98480
+ init_host();
98481
+ init_pinned_host();
98482
+ init_service_table();
98483
+ init_session_host_unit();
98484
+ TABLE_KEY = `EnvironmentVariables.${SERVICE_TABLE_ENV}`;
98485
+ });
98486
+
98487
+ // packages/device-service-core/src/cold-wake/linux.ts
98488
+ var init_linux = __esm(() => {
98489
+ init_host();
98490
+ init_pinned_host();
98491
+ init_service_table();
98492
+ init_session_host_unit();
98493
+ });
98494
+
98495
+ // packages/device-service-core/src/cold-wake/readback.ts
98496
+ var init_readback = __esm(() => {
98497
+ init_linux();
98498
+ init_pinned_host();
98499
+ init_service_table();
98500
+ init_session_host_unit();
98501
+ });
98502
+
98503
+ // packages/device-service-core/src/cold-wake/installed-unit.ts
98504
+ var init_installed_unit = () => {};
98505
+
98506
+ // packages/device-service-core/src/cold-wake/refresh.ts
98507
+ var init_refresh = __esm(() => {
98508
+ init_darwin();
98509
+ init_host();
98510
+ init_installed_unit();
98511
+ init_linux();
98512
+ init_session_host_unit();
98513
+ });
98514
+
98515
+ // packages/device-service-core/src/cold-wake/index.ts
98516
+ var init_cold_wake = __esm(() => {
98517
+ init_darwin();
98518
+ init_linux();
98519
+ init_readback();
98520
+ init_refresh();
98521
+ init_session_host_unit();
98522
+ });
98523
+
98524
+ // packages/device-service-core/src/release/windows-dacl.ts
98525
+ var SID_TOKEN_SCRIPT, userSidToken = async (userSid, run = runPowerShell) => {
98526
+ const { code, out } = await run(SID_TOKEN_SCRIPT, { LA_SID: userSid });
98527
+ const match = code === 0 ? /^O:(S-1-\d+(?:-\d+)+|[A-Z]{2})$/.exec(out.trim()) : null;
98528
+ return match?.[1];
98529
+ }, aliasedDaclVerdict = (dacl, userSid, kind, userAlias) => {
98530
+ const asSid = (token) => userAlias !== undefined && token === userAlias ? userSid : token;
98531
+ return exactDaclVerdict({ ...dacl, owner: asSid(dacl.owner), aces: dacl.aces.map((ace) => ({ ...ace, sid: asSid(ace.sid) })) }, userSid, kind);
98532
+ }, verifyExactDacl2 = async (path, userSid, kind, run = runPowerShell) => {
98533
+ let dacl;
98534
+ try {
98535
+ dacl = await describeDacl(path, run);
98536
+ } catch (error) {
98537
+ if (error instanceof LocalApiError)
98538
+ return false;
98539
+ throw error;
98540
+ }
98541
+ return aliasedDaclVerdict(dacl, userSid, kind, await userSidToken(userSid, run));
98542
+ }, windowsSecureFile2 = (userSid, run = runPowerShell) => async (path, kind) => {
98543
+ const target = kind === "dir" ? "dir" : "file";
98544
+ await applyExactDacl(path, userSid, target, run);
98545
+ if (!await verifyExactDacl2(path, userSid, target, run))
98546
+ throw new LocalApiError("insecure_state_dir", "the DACL is not exactly one ACE for the user");
98547
+ };
98548
+ var init_windows_dacl = __esm(() => {
98549
+ init_errors4();
98550
+ init_dacl();
98551
+ SID_TOKEN_SCRIPT = String.raw`
98552
+ $ErrorActionPreference = 'Stop'
98553
+ (New-Object System.Security.AccessControl.RawSecurityDescriptor("O:$env:LA_SID")).GetSddlForm('Owner')
98554
+ `;
98555
+ });
98556
+
98557
+ // packages/device-service-core/src/release/release-assets.ts
98558
+ var MANIFEST = "latest.json", CHECKSUMS_MAX_BYTES, MANIFEST_MAX_BYTES, BINARY_MAX_BYTES, DEVICE_SERVICE_HOSTS, deviceServiceAssetName = (host) => host.startsWith("windows-") ? `omo-device-service-${host}.exe` : `omo-device-service-${host}`, RELEASE_FILES;
98559
+ var init_release_assets = __esm(() => {
98560
+ init_version2();
98561
+ CHECKSUMS_MAX_BYTES = 64 * 1024;
98562
+ MANIFEST_MAX_BYTES = 4 * 1024;
98563
+ BINARY_MAX_BYTES = 512 * 1024 * 1024;
98564
+ DEVICE_SERVICE_HOSTS = [
98565
+ "darwin-arm64",
98566
+ "darwin-x64",
98567
+ "linux-x64",
98568
+ "linux-arm64",
98569
+ "windows-x64",
98570
+ "windows-arm64"
98571
+ ];
98572
+ RELEASE_FILES = new Set([MANIFEST, ...DEVICE_SERVICE_HOSTS.map(deviceServiceAssetName)]);
98573
+ });
98574
+
98575
+ // packages/device-service-core/src/strict-ed25519/strict-ed25519.ts
98576
+ var P, L, mod = (n) => {
98577
+ const r = n % P;
98578
+ return r < 0n ? r + P : r;
98579
+ }, power = (base, exponent) => {
98580
+ let result = 1n;
98581
+ let b = mod(base);
98582
+ for (let n = exponent;n > 0n; n >>= 1n) {
98583
+ if (n & 1n)
98584
+ result = mod(result * b);
98585
+ b = mod(b * b);
98586
+ }
98587
+ return result;
98588
+ }, D, SQRT_MINUS_ONE, keyCache;
98589
+ var init_strict_ed25519 = __esm(() => {
98590
+ P = (1n << 255n) - 19n;
98591
+ L = (1n << 252n) + 27742317777372353535851937790883648493n;
98592
+ D = mod(-121665n * power(121666n, P - 2n));
98593
+ SQRT_MINUS_ONE = power(2n, (P - 1n) / 4n);
98594
+ keyCache = new Map;
98595
+ });
98596
+
98597
+ // packages/device-service-core/src/release/release-key.json
98598
+ var release_key_default;
98599
+ var init_release_key = __esm(() => {
98600
+ release_key_default = {
98601
+ alg: "Ed25519",
98602
+ public_keys_hex: ["6c6781a91888e3e5be10d1b27466319a7d5adf2a7d2b254f4118eda9cbcb4465", "ca9407b484a30ac7f09cb152455176f1e03fc6ca3446ff930bc7587215759016"]
98603
+ };
98604
+ });
98605
+
98606
+ // packages/device-service-core/src/release/release-signature.ts
98607
+ var HEX_KEY, parseReleaseKeySet = (value) => {
98608
+ if (typeof value !== "object" || value === null || Array.isArray(value))
98609
+ throw new Error("release key: not an object");
98610
+ if (Object.keys(value).toSorted().join(",") !== "alg,public_keys_hex")
98611
+ throw new Error("release key: fields must be exactly alg and public_keys_hex");
98612
+ const alg = Reflect.get(value, "alg");
98613
+ const hexes = Reflect.get(value, "public_keys_hex");
98614
+ if (alg !== "Ed25519")
98615
+ throw new Error("release key: alg must be Ed25519");
98616
+ if (!Array.isArray(hexes))
98617
+ throw new Error("release key: public_keys_hex must be an array");
98618
+ if (new Set(hexes).size !== hexes.length)
98619
+ throw new Error("release key: public_keys_hex must not repeat a key");
98620
+ return hexes.map((hex) => {
98621
+ if (typeof hex !== "string" || !HEX_KEY.test(hex))
98622
+ throw new Error("release key: each public_keys_hex entry must be 64 lowercase hex characters");
98623
+ return hex;
98624
+ });
98625
+ }, DEVICE_SERVICE_RELEASE_KEYS;
98626
+ var init_release_signature = __esm(() => {
98627
+ init_strict_ed25519();
98628
+ init_release_key();
98629
+ HEX_KEY = /^[0-9a-f]{64}$/;
98630
+ DEVICE_SERVICE_RELEASE_KEYS = parseReleaseKeySet(release_key_default);
98631
+ });
98632
+
98633
+ // packages/device-service-core/src/release/acquire.ts
98634
+ var platformSecure;
98635
+ var init_acquire = __esm(() => {
98636
+ init_access();
98637
+ init_local_only();
98638
+ init_dacl();
98639
+ init_windows_dacl();
98640
+ init_release_assets();
98641
+ init_release_signature();
98642
+ init_version2();
98643
+ init_release_assets();
98644
+ init_release_signature();
98645
+ platformSecure = process.platform === "win32" ? async (path, kind, origin) => windowsSecureFile2(await currentUserSid())(path, kind, origin) : posixSecureFile;
98646
+ });
98647
+
98648
+ // packages/device-service-core/src/install.ts
98649
+ var init_install = __esm(() => {
98650
+ init_acquire();
98651
+ });
98652
+ // packages/device-service-core/src/registrant-watch.ts
98653
+ var init_registrant_watch = () => {};
98654
+
98655
+ // packages/device-service-core/src/registrant.ts
98656
+ var NONE2;
98657
+ var init_registrant = __esm(() => {
98658
+ init_device_service2();
98659
+ init_registrant_watch();
98660
+ NONE2 = Symbol("none registered");
98661
+ });
98662
+
98663
+ // packages/device-service-core/src/index.ts
98664
+ var init_src6 = __esm(() => {
98665
+ init_delivery_consumer();
98666
+ init_account_state();
98667
+ init_bootstrap();
98668
+ init_hand_device_keys();
98669
+ init_cold_wake();
98670
+ init_install();
98671
+ init_registrant();
98672
+ init_timers();
98673
+ init_acquire();
98674
+ init_device_service2();
98675
+ });
98676
+
98677
+ // packages/device-service-core/src/wire.ts
98678
+ var init_wire = __esm(() => {
98679
+ init_errors4();
98680
+ });
98681
+
98682
+ // packages/omo-senpi/src/components/thread/errors.ts
98683
+ function isThreadErrorCode(value) {
98684
+ return typeof value === "string" && CODE_SET.has(value);
98685
+ }
98686
+ function threadToolFailure(code, message, nextAction, details) {
98687
+ if (!isThreadErrorCode(code)) {
98688
+ throw new Error(`unknown thread error code: ${String(code)}`);
98689
+ }
98690
+ return { code, message, next_action: nextAction, ...details === undefined ? {} : { details } };
98691
+ }
98692
+ var THREAD_ERROR_CODES, CODE_SET;
98693
+ var init_errors5 = __esm(() => {
98694
+ THREAD_ERROR_CODES = [
98695
+ "invalid_arguments",
98696
+ "caller_context_missing",
98697
+ "not_found",
98698
+ "reply_target_mismatch",
98699
+ "ambiguous_target",
98700
+ "scope_denied",
98701
+ "name_conflict",
98702
+ "not_resumable",
98703
+ "orphaned",
98704
+ "foreign_live_owner",
98705
+ "no_active_turn",
98706
+ "turn_conflict",
98707
+ "turn_active",
98708
+ "not_steerable",
98709
+ "message_too_large",
98710
+ "queue_full",
98711
+ "cursor_invalid",
98712
+ "cursor_stale",
98713
+ "idempotency_conflict",
98714
+ "idempotency_in_progress",
98715
+ "idempotency_uncertain",
98716
+ "delivered_unconfirmed",
98717
+ "prompt_not_started",
98718
+ "approval_unavailable",
98719
+ "approval_route_locked",
98720
+ "partial_commit",
98721
+ "unsupported",
98722
+ "overloaded",
98723
+ "transport_closed",
98724
+ "host_unavailable",
98725
+ "internal_error",
98726
+ "model_not_found",
98727
+ "model_ambiguous",
98728
+ "thinking_level_unsupported",
98729
+ "loop_detected",
98730
+ "pair_loop_guard",
98731
+ "chain_count_limit",
98732
+ "device_offline",
98733
+ "relay_requires_paid_plan",
98734
+ "alias_taken",
98735
+ "gateway_schema_too_new"
98736
+ ];
98737
+ CODE_SET = new Set(THREAD_ERROR_CODES);
98738
+ });
98739
+
98740
+ // packages/omo-senpi/src/components/remote/codes.ts
98741
+ var REMOTE_CODES, ENGINE_CODES;
98742
+ var init_codes = __esm(() => {
98743
+ init_wire();
98744
+ init_errors5();
98745
+ REMOTE_CODES = [
98746
+ ...THREAD_ERROR_CODES,
98747
+ "timeout",
98748
+ "cancelled",
98749
+ "session_ended",
98750
+ "sender_not_allowed",
98751
+ "local_only",
98752
+ "host_not_answering",
98753
+ "no_transport",
98754
+ "device_offline",
98755
+ "undelivered",
98756
+ "transport_expired",
98757
+ "unconfirmed",
98758
+ "host_error"
98759
+ ];
98760
+ ENGINE_CODES = new Map([
98761
+ ["model_unavailable", { code: "model_not_found" }],
98762
+ ["invalid_level", { code: "thinking_level_unsupported" }],
98763
+ ["worktree_failed", { code: "unsupported", details: { feature: "worktree" } }],
98764
+ ["not_running", { code: "not_resumable" }],
98765
+ ["handle_lost", { code: "not_found", details: { kind: "handle" } }]
98766
+ ]);
98767
+ });
98768
+
98769
+ // packages/omo-senpi/src/components/remote/connection-of.ts
98770
+ var lenders;
98771
+ var init_connection_of = __esm(() => {
98772
+ lenders = new WeakMap;
98773
+ });
98774
+
98775
+ // packages/omo-senpi/src/components/remote/deadlines.ts
98776
+ var init_deadlines = __esm(() => {
98777
+ init_codes();
98778
+ });
98779
+
98780
+ // packages/omo-senpi/src/components/remote/seams.ts
98781
+ var init_seams = __esm(() => {
98782
+ init_codes();
98783
+ });
98784
+
98785
+ // packages/omo-senpi/src/components/remote/resolve.ts
98786
+ var init_resolve = __esm(() => {
98787
+ init_client5();
98788
+ init_deadlines();
98789
+ init_codes();
98790
+ init_seams();
98791
+ });
98792
+
98793
+ // packages/omo-senpi/src/components/remote/aliases.ts
98794
+ var init_aliases = __esm(() => {
98795
+ init_codes();
98796
+ init_deadlines();
98797
+ init_resolve();
98798
+ init_seams();
98799
+ });
98800
+
98801
+ // packages/omo-senpi/src/components/thread/gateway/result.ts
98802
+ var init_result = __esm(() => {
98803
+ init_errors5();
98804
+ });
98805
+
98806
+ // packages/omo-senpi/src/components/thread/remote/outcome.ts
98807
+ var READ_UNCERTAIN, UNANSWERED, NOT_SIGNED_IN, ENGINE_NOT_READY;
98808
+ var init_outcome = __esm(() => {
98809
+ init_errors5();
98810
+ init_result();
98811
+ READ_UNCERTAIN = {
98812
+ request_gone: "retry",
98813
+ no_receipt: "retry",
98814
+ engine_restarted: "retry",
98815
+ recipient_revoked: "retry",
98816
+ transport_expired: "retry",
98817
+ unconfirmed: "retry",
98818
+ lease_expired: "retry",
98819
+ cancelled: "retry",
98820
+ hand_restarted: "retry",
98821
+ result_expired: "retry",
98822
+ record_too_large: "too_large",
98823
+ result_undecodable: "retry"
98824
+ };
98825
+ UNANSWERED = new Set([
98826
+ "closed",
98827
+ "protocol_violation",
98828
+ "internal",
98829
+ "read_failed",
98830
+ "request_timeout",
98831
+ "handshake_timeout",
98832
+ "attach_failed",
98833
+ "reply_lost",
98834
+ "delivered_unconfirmed",
98835
+ "host_not_answering",
98836
+ "peer_not_found",
98837
+ "engine_stale",
98838
+ ...Object.entries(READ_UNCERTAIN).filter(([, answer]) => answer === "retry").map(([reason]) => reason)
98839
+ ]);
98840
+ NOT_SIGNED_IN = new Set(["sign_in_required", "signed_out"]);
98841
+ ENGINE_NOT_READY = new Set(["attach_required", "daemon_unavailable"]);
98842
+ });
98843
+
98844
+ // packages/omo-senpi/src/components/thread/remote/attach-pool.ts
98845
+ var CATALOG_RECORD = "get_available_models", HELD_RECORDS;
98846
+ var init_attach_pool = __esm(() => {
98847
+ HELD_RECORDS = new Set([CATALOG_RECORD, "get_protocol_info"]);
98848
+ });
98849
+
98850
+ // packages/omo-senpi/src/components/thread/remote/ports.ts
98851
+ var init_ports = () => {};
98852
+
98853
+ // packages/omo-senpi/src/components/thread/remote/session-state.ts
98854
+ var ACCESS_ENDED, ACCESS_REFUSED, SESSION_LEFT, SESSION_GONE;
98855
+ var init_session_state = __esm(() => {
98856
+ ACCESS_ENDED = new Set([
98857
+ "authorization_expired",
98858
+ "peer_revoked",
98859
+ "owner_transfer",
98860
+ "service_disabled"
98861
+ ]);
98862
+ ACCESS_REFUSED = new Set([
98863
+ "unauthenticated",
98864
+ "forbidden",
98865
+ "owner_transfer",
98866
+ "signed_out",
98867
+ "service_disabled",
98868
+ "sign_in_required",
98869
+ "plan_required",
98870
+ "peer_not_found",
98871
+ "peer_not_session_client",
98872
+ "account_changed",
98873
+ "device_changed",
98874
+ "capability_missing",
98875
+ "engine_too_old"
98876
+ ]);
98877
+ SESSION_LEFT = new Set(["session_closed", "session_replaced"]);
98878
+ SESSION_GONE = new Set([
98879
+ "session_not_found",
98880
+ "unknown_session",
98881
+ "session_identity_mismatch"
98882
+ ]);
98883
+ });
98884
+ // packages/omo-senpi/src/components/thread/remote/remote-watch.ts
98885
+ var init_remote_watch = __esm(() => {
98886
+ init_device_service2();
98887
+ init_ports();
98888
+ init_session_state();
98889
+ });
98890
+
98891
+ // packages/omo-senpi/src/components/call-budget/call-deadline.ts
98892
+ import { AsyncLocalStorage as AsyncLocalStorage4 } from "async_hooks";
98893
+ var scope;
98894
+ var init_call_deadline = __esm(() => {
98895
+ scope = new AsyncLocalStorage4;
98896
+ });
98897
+ // packages/omo-senpi/src/components/remote/port/lookup-gate.ts
98898
+ var init_lookup_gate = __esm(() => {
98899
+ init_ports();
98900
+ });
98901
+
98902
+ // packages/omo-senpi/src/components/remote/port/device-service.ts
98903
+ var READ_ONLY_RECORDS, MARKED_RECORDS, LOOKUP_NONE;
98904
+ var init_device_service3 = __esm(() => {
98905
+ init_outcome();
98906
+ init_device_service2();
98907
+ init_attach_pool();
98908
+ init_remote_watch();
98909
+ init_call_deadline();
98910
+ init_lookup_gate();
98911
+ READ_ONLY_RECORDS = new Set([
98912
+ "get_state",
98913
+ "get_messages",
98914
+ "get_entries",
98915
+ "get_protocol_info"
98916
+ ]);
98917
+ MARKED_RECORDS = new Set(["admit_external_message"]);
98918
+ LOOKUP_NONE = new Set(["session_not_found", "peer_not_found", "peer_not_session_client"]);
98919
+ });
98920
+
98921
+ // packages/omo-senpi/src/components/remote/attach.ts
98922
+ var DIALOG_KINDS;
98923
+ var init_attach = __esm(() => {
98924
+ init_device_service2();
98925
+ init_outcome();
98926
+ init_client5();
98927
+ init_codes();
98928
+ init_deadlines();
98929
+ init_device_service3();
98930
+ init_resolve();
98931
+ init_seams();
98932
+ DIALOG_KINDS = new Set(["select", "confirm", "input", "editor", "question"]);
98933
+ });
98934
+
98935
+ // packages/omo-senpi/src/components/thread/address/refusals.ts
98936
+ var init_refusals = __esm(() => {
98937
+ init_errors5();
98938
+ });
98939
+
98940
+ // packages/omo-senpi/src/components/thread/remote/address-book.ts
98941
+ var REMOTE_NOT_SET_UP;
98942
+ var init_address_book = __esm(() => {
98943
+ init_ports();
98944
+ REMOTE_NOT_SET_UP = new Set(["not_configured", "disabled", "signed_out", "sign_in_required"]);
98945
+ });
98946
+
98947
+ // packages/omo-senpi/src/components/thread/address/account.ts
98948
+ var NOT_SET_UP, lastListed;
98949
+ var init_account = __esm(() => {
98950
+ init_remote_ops();
98951
+ init_address_book();
98952
+ NOT_SET_UP = new Set(["not_configured", "disabled", "signed_out", "sign_in_required"]);
98953
+ lastListed = new WeakMap;
98954
+ });
98955
+
98956
+ // packages/omo-senpi/src/components/thread/address/device.ts
98957
+ var init_device = __esm(() => {
98958
+ init_errors5();
98959
+ init_account();
98960
+ init_refusals();
98961
+ });
98962
+
98963
+ // packages/omo-senpi/src/components/thread/remote/remote-ops.ts
98964
+ var init_remote_ops = __esm(() => {
98965
+ init_refusals();
98966
+ init_device();
98967
+ init_account();
98968
+ init_outcome();
98969
+ });
98970
+
98971
+ // packages/omo-senpi/src/components/remote/send-transcript.ts
98972
+ var awaiting, views;
98973
+ var init_send_transcript = __esm(() => {
98974
+ init_remote_ops();
98975
+ awaiting = new WeakMap;
98976
+ views = new WeakMap;
98977
+ });
98978
+
98979
+ // packages/omo-senpi/src/components/remote/follow.ts
98980
+ var RUN_OVER;
98981
+ var init_follow = __esm(() => {
98982
+ init_outcome();
98983
+ init_attach();
98984
+ init_client5();
98985
+ init_codes();
98986
+ init_deadlines();
98987
+ init_seams();
98988
+ init_send_transcript();
98989
+ RUN_OVER = new Set(["waiting_children", "waiting_background", "done", "failed", "cancelled"]);
98990
+ });
98991
+
98357
98992
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/system/memory/metrics.mjs
98358
98993
  var Metrics;
98359
98994
  var init_metrics2 = __esm(() => {
@@ -100680,7 +101315,7 @@ function IsExtendsTrueLike(value) {
100680
101315
  function Match3(result, true_, false_) {
100681
101316
  return IsExtendsTrueLike(result) ? true_(result.inferred) : false_();
100682
101317
  }
100683
- var init_result = __esm(() => {
101318
+ var init_result2 = __esm(() => {
100684
101319
  init_guard2();
100685
101320
  init_memory3();
100686
101321
  });
@@ -100724,7 +101359,7 @@ var init_extends_right = __esm(() => {
100724
101359
  init_union();
100725
101360
  init_unknown();
100726
101361
  init_extends_left();
100727
- init_result();
101362
+ init_result2();
100728
101363
  init_evaluate2();
100729
101364
  init_evaluate2();
100730
101365
  });
@@ -100738,7 +101373,7 @@ var init_any2 = __esm(() => {
100738
101373
  init_any();
100739
101374
  init_unknown();
100740
101375
  init_extends_right();
100741
- init_result();
101376
+ init_result2();
100742
101377
  });
100743
101378
 
100744
101379
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/array.mjs
@@ -100755,7 +101390,7 @@ var init_array2 = __esm(() => {
100755
101390
  init__immutable();
100756
101391
  init_extends_right();
100757
101392
  init_extends_left();
100758
- init_result();
101393
+ init_result2();
100759
101394
  });
100760
101395
 
100761
101396
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/bigint.mjs
@@ -100765,7 +101400,7 @@ function ExtendsBigInt(inferred, left, right) {
100765
101400
  var init_bigint3 = __esm(() => {
100766
101401
  init_bigint();
100767
101402
  init_extends_right();
100768
- init_result();
101403
+ init_result2();
100769
101404
  });
100770
101405
 
100771
101406
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/boolean.mjs
@@ -100775,7 +101410,7 @@ function ExtendsBoolean(inferred, left, right) {
100775
101410
  var init_boolean2 = __esm(() => {
100776
101411
  init_boolean();
100777
101412
  init_extends_right();
100778
- init_result();
101413
+ init_result2();
100779
101414
  });
100780
101415
 
100781
101416
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/parameters.mjs
@@ -100800,7 +101435,7 @@ var init_parameters = __esm(() => {
100800
101435
  init_infer();
100801
101436
  init__optional();
100802
101437
  init_extends_left();
100803
- init_result();
101438
+ init_result2();
100804
101439
  });
100805
101440
 
100806
101441
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/return_type.mjs
@@ -100810,7 +101445,7 @@ function ExtendsReturnType(inferred, left, right) {
100810
101445
  var init_return_type = __esm(() => {
100811
101446
  init_void();
100812
101447
  init_extends_left();
100813
- init_result();
101448
+ init_result2();
100814
101449
  });
100815
101450
 
100816
101451
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/constructor.mjs
@@ -100821,7 +101456,7 @@ var init_constructor2 = __esm(() => {
100821
101456
  init_any();
100822
101457
  init_constructor();
100823
101458
  init_unknown();
100824
- init_result();
101459
+ init_result2();
100825
101460
  init_parameters();
100826
101461
  init_return_type();
100827
101462
  });
@@ -100832,7 +101467,7 @@ function ExtendsDependent(inferred, if_, then_, else_, right) {
100832
101467
  }
100833
101468
  var init_dependent2 = __esm(() => {
100834
101469
  init_extends_left();
100835
- init_result();
101470
+ init_result2();
100836
101471
  });
100837
101472
 
100838
101473
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/enum.mjs
@@ -100853,7 +101488,7 @@ var init_function2 = __esm(() => {
100853
101488
  init_any();
100854
101489
  init_function();
100855
101490
  init_unknown();
100856
- init_result();
101491
+ init_result2();
100857
101492
  init_parameters();
100858
101493
  init_return_type();
100859
101494
  });
@@ -100866,7 +101501,7 @@ var init_integer3 = __esm(() => {
100866
101501
  init_integer();
100867
101502
  init_number();
100868
101503
  init_extends_right();
100869
- init_result();
101504
+ init_result2();
100870
101505
  });
100871
101506
 
100872
101507
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/intersect.mjs
@@ -100906,7 +101541,7 @@ var init_literal2 = __esm(() => {
100906
101541
  init_number();
100907
101542
  init_string();
100908
101543
  init_extends_right();
100909
- init_result();
101544
+ init_result2();
100910
101545
  });
100911
101546
 
100912
101547
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/never.mjs
@@ -100916,7 +101551,7 @@ function ExtendsNever(inferred, left, right) {
100916
101551
  var init_never2 = __esm(() => {
100917
101552
  init_infer();
100918
101553
  init_extends_right();
100919
- init_result();
101554
+ init_result2();
100920
101555
  });
100921
101556
 
100922
101557
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/null.mjs
@@ -100926,7 +101561,7 @@ function ExtendsNull(inferred, left, right) {
100926
101561
  var init_null2 = __esm(() => {
100927
101562
  init_null();
100928
101563
  init_extends_right();
100929
- init_result();
101564
+ init_result2();
100930
101565
  });
100931
101566
 
100932
101567
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/number.mjs
@@ -100936,7 +101571,7 @@ function ExtendsNumber(inferred, left, right) {
100936
101571
  var init_number3 = __esm(() => {
100937
101572
  init_number();
100938
101573
  init_extends_right();
100939
- init_result();
101574
+ init_result2();
100940
101575
  });
100941
101576
 
100942
101577
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/object.mjs
@@ -100998,7 +101633,7 @@ var init_object2 = __esm(() => {
100998
101633
  init_union();
100999
101634
  init_extends_left();
101000
101635
  init_extends_right();
101001
- init_result();
101636
+ init_result2();
101002
101637
  });
101003
101638
 
101004
101639
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/record.mjs
@@ -101018,7 +101653,7 @@ var init_record2 = __esm(() => {
101018
101653
  init_object();
101019
101654
  init_record();
101020
101655
  init_extends_left();
101021
- init_result();
101656
+ init_result2();
101022
101657
  });
101023
101658
 
101024
101659
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/string.mjs
@@ -101028,7 +101663,7 @@ function ExtendsString(inferred, left, right) {
101028
101663
  var init_string3 = __esm(() => {
101029
101664
  init_string();
101030
101665
  init_extends_right();
101031
- init_result();
101666
+ init_result2();
101032
101667
  });
101033
101668
 
101034
101669
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/symbol.mjs
@@ -101038,7 +101673,7 @@ function ExtendsSymbol(inferred, left, right) {
101038
101673
  var init_symbol2 = __esm(() => {
101039
101674
  init_symbol();
101040
101675
  init_extends_right();
101041
- init_result();
101676
+ init_result2();
101042
101677
  });
101043
101678
 
101044
101679
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/template_literal.mjs
@@ -101092,7 +101727,7 @@ var init_inference = __esm(() => {
101092
101727
  init_union();
101093
101728
  init_infer();
101094
101729
  init_rest();
101095
- init_result();
101730
+ init_result2();
101096
101731
  });
101097
101732
 
101098
101733
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/tuple.mjs
@@ -101149,7 +101784,7 @@ var init_tuple2 = __esm(() => {
101149
101784
  init_tuple();
101150
101785
  init_extends_left();
101151
101786
  init_extends_right();
101152
- init_result();
101787
+ init_result2();
101153
101788
  init_instantiate27();
101154
101789
  init_instantiate27();
101155
101790
  init_inference();
@@ -101163,7 +101798,7 @@ var init_undefined2 = __esm(() => {
101163
101798
  init_undefined();
101164
101799
  init_void();
101165
101800
  init_extends_right();
101166
- init_result();
101801
+ init_result2();
101167
101802
  });
101168
101803
 
101169
101804
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/union.mjs
@@ -101181,7 +101816,7 @@ var init_union2 = __esm(() => {
101181
101816
  init_guard2();
101182
101817
  init_union();
101183
101818
  init_extends_left();
101184
- init_result();
101819
+ init_result2();
101185
101820
  init_inference();
101186
101821
  });
101187
101822
 
@@ -101194,7 +101829,7 @@ var init_unknown2 = __esm(() => {
101194
101829
  init_unknown();
101195
101830
  init_infer();
101196
101831
  init_extends_right();
101197
- init_result();
101832
+ init_result2();
101198
101833
  });
101199
101834
 
101200
101835
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/void.mjs
@@ -101204,7 +101839,7 @@ function ExtendsVoid(inferred, left, right) {
101204
101839
  var init_void2 = __esm(() => {
101205
101840
  init_void();
101206
101841
  init_extends_right();
101207
- init_result();
101842
+ init_result2();
101208
101843
  });
101209
101844
 
101210
101845
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/extends_left.mjs
@@ -101260,7 +101895,7 @@ var init_extends_left = __esm(() => {
101260
101895
  init_unknown();
101261
101896
  init_union();
101262
101897
  init_void();
101263
- init_result();
101898
+ init_result2();
101264
101899
  });
101265
101900
 
101266
101901
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/engine/interface/instantiate.mjs
@@ -101499,7 +102134,7 @@ var init_extends2 = __esm(() => {
101499
102134
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/index.mjs
101500
102135
  var init_extends3 = __esm(() => {
101501
102136
  init_extends2();
101502
- init_result();
102137
+ init_result2();
101503
102138
  });
101504
102139
 
101505
102140
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/engine/evaluate/compare.mjs
@@ -103878,154 +104513,103 @@ var init_permission_presets = __esm(() => {
103878
104513
  PERMISSION_PRESETS = ["full-access", "workspace", "accept-edits", "auto", "read-only", "ask"];
103879
104514
  });
103880
104515
 
103881
- // packages/omo-senpi/src/components/thread/remote/ports.ts
103882
- var init_ports = () => {};
103883
-
103884
- // packages/omo-senpi/src/components/thread/errors.ts
103885
- function isThreadErrorCode(value) {
103886
- return typeof value === "string" && CODE_SET.has(value);
103887
- }
103888
- function threadToolFailure(code, message, nextAction, details) {
103889
- if (!isThreadErrorCode(code)) {
103890
- throw new Error(`unknown thread error code: ${String(code)}`);
103891
- }
103892
- return { code, message, next_action: nextAction, ...details === undefined ? {} : { details } };
103893
- }
103894
- var THREAD_ERROR_CODES, CODE_SET;
103895
- var init_errors5 = __esm(() => {
103896
- THREAD_ERROR_CODES = [
103897
- "invalid_arguments",
103898
- "caller_context_missing",
103899
- "not_found",
103900
- "reply_target_mismatch",
103901
- "ambiguous_target",
103902
- "scope_denied",
103903
- "name_conflict",
103904
- "not_resumable",
103905
- "orphaned",
103906
- "foreign_live_owner",
103907
- "no_active_turn",
103908
- "turn_conflict",
103909
- "turn_active",
103910
- "not_steerable",
103911
- "message_too_large",
103912
- "queue_full",
103913
- "cursor_invalid",
103914
- "cursor_stale",
103915
- "idempotency_conflict",
103916
- "idempotency_in_progress",
103917
- "idempotency_uncertain",
103918
- "delivered_unconfirmed",
103919
- "prompt_not_started",
103920
- "approval_unavailable",
103921
- "approval_route_locked",
103922
- "partial_commit",
103923
- "unsupported",
103924
- "overloaded",
103925
- "transport_closed",
103926
- "host_unavailable",
103927
- "internal_error",
103928
- "model_not_found",
103929
- "model_ambiguous",
103930
- "thinking_level_unsupported",
103931
- "loop_detected",
103932
- "pair_loop_guard",
103933
- "chain_count_limit",
103934
- "device_offline",
103935
- "relay_requires_paid_plan",
103936
- "alias_taken",
103937
- "gateway_schema_too_new"
103938
- ];
103939
- CODE_SET = new Set(THREAD_ERROR_CODES);
103940
- });
103941
-
103942
- // packages/omo-senpi/src/components/thread/initial-skills.ts
103943
- var init_initial_skills = () => {};
103944
-
103945
- // packages/omo-senpi/src/components/thread/gateway/result.ts
103946
- var init_result2 = __esm(() => {
103947
- init_errors5();
103948
- });
103949
-
103950
- // packages/omo-senpi/src/components/thread/remote/outcome.ts
103951
- var READ_UNCERTAIN, UNANSWERED, NOT_SIGNED_IN, ENGINE_NOT_READY;
103952
- var init_outcome = __esm(() => {
103953
- init_errors5();
103954
- init_result2();
103955
- READ_UNCERTAIN = {
103956
- request_gone: "retry",
103957
- no_receipt: "retry",
103958
- engine_restarted: "retry",
103959
- recipient_revoked: "retry",
103960
- transport_expired: "retry",
103961
- unconfirmed: "retry",
103962
- lease_expired: "retry",
103963
- cancelled: "retry",
103964
- hand_restarted: "retry",
103965
- result_expired: "retry",
103966
- record_too_large: "too_large",
103967
- result_undecodable: "retry"
103968
- };
103969
- UNANSWERED = new Set([
103970
- "closed",
103971
- "protocol_violation",
103972
- "internal",
103973
- "read_failed",
103974
- "request_timeout",
103975
- "handshake_timeout",
103976
- "attach_failed",
103977
- "reply_lost",
103978
- "delivered_unconfirmed",
103979
- "host_not_answering",
103980
- "peer_not_found",
103981
- "engine_stale",
103982
- ...Object.entries(READ_UNCERTAIN).filter(([, answer]) => answer === "retry").map(([reason]) => reason)
103983
- ]);
103984
- NOT_SIGNED_IN = new Set(["sign_in_required", "signed_out"]);
103985
- ENGINE_NOT_READY = new Set(["attach_required", "daemon_unavailable"]);
103986
- });
103987
-
103988
- // packages/omo-senpi/src/components/thread/address/refusals.ts
103989
- var init_refusals = __esm(() => {
104516
+ // packages/omo-senpi/src/components/thread/addressing.ts
104517
+ var init_addressing = __esm(() => {
103990
104518
  init_errors5();
103991
104519
  });
103992
104520
 
103993
- // packages/omo-senpi/src/components/thread/remote/address-book.ts
103994
- var REMOTE_NOT_SET_UP;
103995
- var init_address_book = __esm(() => {
103996
- init_ports();
103997
- REMOTE_NOT_SET_UP = new Set(["not_configured", "disabled", "signed_out", "sign_in_required"]);
104521
+ // packages/omo-senpi/src/components/thread/session-facts.ts
104522
+ var SESSION_FACTS_WINDOW_BYTES, SESSION_FACTS_LAST_LINE_MAX_BYTES;
104523
+ var init_session_facts = __esm(() => {
104524
+ SESSION_FACTS_WINDOW_BYTES = 64 * 1024;
104525
+ SESSION_FACTS_LAST_LINE_MAX_BYTES = SESSION_FACTS_WINDOW_BYTES * 4;
103998
104526
  });
103999
-
104000
- // packages/omo-senpi/src/components/thread/address/account.ts
104001
- var NOT_SET_UP, lastListed;
104002
- var init_account = __esm(() => {
104003
- init_remote_ops();
104004
- init_address_book();
104005
- NOT_SET_UP = new Set(["not_configured", "disabled", "signed_out", "sign_in_required"]);
104006
- lastListed = new WeakMap;
104527
+ // packages/omo-senpi/src/components/thread/address-book.ts
104528
+ var init_address_book2 = __esm(() => {
104529
+ init_addressing();
104530
+ init_session_facts();
104007
104531
  });
104008
104532
 
104009
- // packages/omo-senpi/src/components/thread/address/device.ts
104010
- var init_device = __esm(() => {
104011
- init_errors5();
104012
- init_account();
104013
- init_refusals();
104014
- });
104533
+ // packages/omo-senpi/src/components/thread/contracts/send-result-order.ts
104534
+ var init_send_result_order = () => {};
104015
104535
 
104016
- // packages/omo-senpi/src/components/thread/remote/remote-ops.ts
104017
- var init_remote_ops = __esm(() => {
104018
- init_refusals();
104019
- init_device();
104020
- init_account();
104021
- init_outcome();
104536
+ // packages/omo-senpi/src/components/thread/metadata.ts
104537
+ var THREAD_TOOL_EXPOSURE = "eval", ROUTE_TO_TASK = "; to spawn a child task instead, use task.", THREAD_TOOL_METADATA;
104538
+ var init_metadata = __esm(() => {
104539
+ THREAD_TOOL_METADATA = [
104540
+ {
104541
+ name: "thread_create",
104542
+ label: "Create session",
104543
+ description: "Starts a fresh agent session that runs alongside this one, for when the user wants a second session working in parallel" + ROUTE_TO_TASK,
104544
+ exposure: THREAD_TOOL_EXPOSURE
104545
+ },
104546
+ {
104547
+ name: "thread_list",
104548
+ label: "List sessions",
104549
+ description: "Shows every addressable session on this device and the account's other devices with its id, name, status and device, plus the account's devices, for when the user needs a valid target address before acting on a session" + ROUTE_TO_TASK,
104550
+ exposure: THREAD_TOOL_EXPOSURE
104551
+ },
104552
+ {
104553
+ name: "thread_read",
104554
+ label: "Read session",
104555
+ description: "Returns the transcript and latest output of another session, for when the user asks what another session said or produced" + ROUTE_TO_TASK,
104556
+ exposure: THREAD_TOOL_EXPOSURE
104557
+ },
104558
+ {
104559
+ name: "thread_send",
104560
+ label: "Send message to session",
104561
+ description: "Delivers a message into another session that is already running, for when the user wants to talk to that session mid-task; its reply comes back through thread_read (tool.thread_read() in an eval cell)" + ROUTE_TO_TASK,
104562
+ exposure: THREAD_TOOL_EXPOSURE
104563
+ },
104564
+ {
104565
+ name: "thread_interrupt",
104566
+ label: "Interrupt session turn",
104567
+ description: "Stops the turn running in another session, and the background jobs that turn started, for when the user wants to halt a session that is going down the wrong path; the result's background lists what was stopped" + ROUTE_TO_TASK,
104568
+ exposure: THREAD_TOOL_EXPOSURE
104569
+ },
104570
+ {
104571
+ name: "thread_close",
104572
+ label: "Close session",
104573
+ description: "Closes a session. Omit thread or pass self to close this session. thread accepts the thread value of a thread_list row (tool.thread_list() in an eval cell), an alias, or a unique name; the result is closed true or false plus a reason. A thread with messages it has not read is refused, naming them; pass force: true to close it anyway (dropped_deliveries lists them)" + ROUTE_TO_TASK,
104574
+ exposure: THREAD_TOOL_EXPOSURE
104575
+ },
104576
+ {
104577
+ name: "thread_handoff",
104578
+ label: "Hand off session",
104579
+ description: "Moves the current request to an old session that has the context, for when the user says to hand this off or reopen that earlier conversation" + ROUTE_TO_TASK,
104580
+ exposure: THREAD_TOOL_EXPOSURE
104581
+ },
104582
+ {
104583
+ name: "thread_rename",
104584
+ label: "Rename session",
104585
+ description: "Renames a session's label, for when the user asks to call a session something clearer. Omit thread or pass self to rename this session. thread accepts the thread value of a thread_list row (tool.thread_list() in an eval cell), an alias, or a unique name; a miss names the thread value to pass",
104586
+ exposure: THREAD_TOOL_EXPOSURE
104587
+ },
104588
+ {
104589
+ name: "thread_set_model",
104590
+ label: "Switch session model",
104591
+ description: "Moves a session onto a different model, for when the user asks to switch that session to another model or a cheaper one",
104592
+ exposure: THREAD_TOOL_EXPOSURE
104593
+ },
104594
+ {
104595
+ name: "thread_set_reasoning",
104596
+ label: "Set session reasoning level",
104597
+ description: "Sets how much reasoning a session applies, for when the user asks to raise or lower the thinking effort of a session",
104598
+ exposure: THREAD_TOOL_EXPOSURE
104599
+ },
104600
+ {
104601
+ name: "thread_archive",
104602
+ label: "Archive session",
104603
+ description: "Archives or unarchives a session so the session list hides or shows it again, for when the user is finished with a session but wants to keep it",
104604
+ exposure: THREAD_TOOL_EXPOSURE
104605
+ }
104606
+ ];
104022
104607
  });
104023
104608
 
104024
- // packages/omo-senpi/src/components/call-budget/call-deadline.ts
104025
- import { AsyncLocalStorage as AsyncLocalStorage4 } from "async_hooks";
104026
- var scope;
104027
- var init_call_deadline = __esm(() => {
104028
- scope = new AsyncLocalStorage4;
104609
+ // packages/omo-senpi/src/components/thread/thread-link.ts
104610
+ var THREAD_LINK_SCHEME = "omo-thread", PREFIX;
104611
+ var init_thread_link = __esm(() => {
104612
+ PREFIX = `${THREAD_LINK_SCHEME}://v1/`;
104029
104613
  });
104030
104614
 
104031
104615
  // packages/omo-senpi/src/components/thread/contracts/create-params.ts
@@ -104109,6 +104693,8 @@ var init_params = __esm(() => {
104109
104693
  Literal("opening"),
104110
104694
  Literal("running"),
104111
104695
  Literal("idle"),
104696
+ Literal("held"),
104697
+ Literal("unknown"),
104112
104698
  Literal("inactive"),
104113
104699
  Literal("archived")
104114
104700
  ]), {
@@ -105422,7 +106008,7 @@ function DynamicRef(stack, dynamicRef) {
105422
106008
  const fragmentTarget = RefInternal(stack.context, fragmentRoot, stack.lexicalBase, dynamicRef.$dynamicRef);
105423
106009
  return IsUndefined(fragmentTarget) ? DynamicRefWhenNotFound(stack, dynamicRef) : DynamicRefWhenFound(stack, dynamicRef, fragmentTarget);
105424
106010
  }
105425
- var init_resolve = __esm(() => {
106011
+ var init_resolve2 = __esm(() => {
105426
106012
  init_guard2();
105427
106013
  init_pointer2();
105428
106014
  init_types11();
@@ -105430,8 +106016,8 @@ var init_resolve = __esm(() => {
105430
106016
  });
105431
106017
 
105432
106018
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/schema/resolve/index.mjs
105433
- var init_resolve2 = __esm(() => {
105434
- init_resolve();
106019
+ var init_resolve3 = __esm(() => {
106020
+ init_resolve2();
105435
106021
  });
105436
106022
 
105437
106023
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/schema/engine/dynamicRef.mjs
@@ -105448,7 +106034,7 @@ function ErrorDynamicRef(stack, context, schemaPath, instancePath, schema, value
105448
106034
  var init_dynamicRef2 = __esm(() => {
105449
106035
  init_types11();
105450
106036
  init__functions();
105451
- init_resolve2();
106037
+ init_resolve3();
105452
106038
  init_schema4();
105453
106039
  });
105454
106040
 
@@ -106547,7 +107133,7 @@ function ErrorRecursiveRef(stack, context, schemaPath, instancePath, schema, val
106547
107133
  var init_recursiveRef2 = __esm(() => {
106548
107134
  init_types11();
106549
107135
  init__functions();
106550
- init_resolve2();
107136
+ init_resolve3();
106551
107137
  init_schema4();
106552
107138
  });
106553
107139
 
@@ -106575,7 +107161,7 @@ function ErrorRef(stack, context, schemaPath, instancePath, schema, value) {
106575
107161
  var init_ref4 = __esm(() => {
106576
107162
  init__functions();
106577
107163
  init_types11();
106578
- init_resolve2();
107164
+ init_resolve3();
106579
107165
  init__context();
106580
107166
  init_guard2();
106581
107167
  init_schema4();
@@ -106834,7 +107420,7 @@ var init_intern = __esm(() => {
106834
107420
  init_types11();
106835
107421
  init__stack();
106836
107422
  init_guard2();
106837
- init_resolve2();
107423
+ init_resolve3();
106838
107424
  registry2 = new Map;
106839
107425
  resolved = new Map;
106840
107426
  });
@@ -106965,7 +107551,7 @@ var init_schema6 = __esm(() => {
106965
107551
  init_intern2();
106966
107552
  init_meta2();
106967
107553
  init_pointer2();
106968
- init_resolve2();
107554
+ init_resolve3();
106969
107555
  init_static3();
106970
107556
  init_types11();
106971
107557
  init_build2();
@@ -108752,146 +109338,8 @@ var init_thread_state = __esm(() => {
108752
109338
  RETRY_WAIT_KINDS = new Set(["rate_limit", "retry"]);
108753
109339
  });
108754
109340
 
108755
- // packages/omo-senpi/src/components/thread/control/port.ts
108756
- var REFUSAL;
108757
- var init_port = __esm(() => {
108758
- init_errors5();
108759
- init_thread_state();
108760
- REFUSAL = Symbol.for("omo.thread.control.refusal");
108761
- });
108762
-
108763
- // packages/omo-senpi/src/components/thread/control/close-ladder.ts
108764
- var SESSION_GONE;
108765
- var init_close_ladder = __esm(() => {
108766
- init_call_deadline();
108767
- init_port();
108768
- SESSION_GONE = new Set([
108769
- "unknown_session",
108770
- "route_unlisted",
108771
- "session_identity_mismatch",
108772
- "session_not_attached",
108773
- "not_attached"
108774
- ]);
108775
- });
108776
-
108777
- // packages/omo-senpi/src/components/thread/worktree/failures.ts
108778
- var init_failures = __esm(() => {
108779
- init_errors5();
108780
- });
108781
-
108782
- // packages/omo-senpi/src/components/thread/control/open-reply.ts
108783
- var init_open_reply = __esm(() => {
108784
- init_errors5();
108785
- init_outcome();
108786
- init_failures();
108787
- });
108788
- // packages/omo-senpi/src/components/thread/worktree/remote-worktree.ts
108789
- var init_remote_worktree = __esm(() => {
108790
- init_close_ladder();
108791
- init_open_reply();
108792
- init_port();
108793
- init_errors5();
108794
- init_outcome();
108795
- init_remote_ops();
108796
- init_failures();
108797
- });
108798
-
108799
- // packages/omo-senpi/src/components/thread/thread-link.ts
108800
- var THREAD_LINK_SCHEME = "omo-thread", PREFIX;
108801
- var init_thread_link = __esm(() => {
108802
- PREFIX = `${THREAD_LINK_SCHEME}://v1/`;
108803
- });
108804
-
108805
- // packages/omo-senpi/src/components/thread/addressing.ts
108806
- var init_addressing = __esm(() => {
108807
- init_errors5();
108808
- });
108809
-
108810
- // packages/omo-senpi/src/components/thread/session-facts.ts
108811
- var SESSION_FACTS_WINDOW_BYTES, SESSION_FACTS_LAST_LINE_MAX_BYTES;
108812
- var init_session_facts = __esm(() => {
108813
- SESSION_FACTS_WINDOW_BYTES = 64 * 1024;
108814
- SESSION_FACTS_LAST_LINE_MAX_BYTES = SESSION_FACTS_WINDOW_BYTES * 4;
108815
- });
108816
-
108817
- // packages/omo-senpi/src/components/thread/address-book.ts
108818
- var init_address_book2 = __esm(() => {
108819
- init_addressing();
108820
- init_session_facts();
108821
- });
108822
-
108823
- // packages/omo-senpi/src/components/thread/metadata.ts
108824
- var THREAD_TOOL_EXPOSURE = "eval", ROUTE_TO_TASK = "; to spawn a child task instead, use task.", THREAD_TOOL_METADATA;
108825
- var init_metadata = __esm(() => {
108826
- THREAD_TOOL_METADATA = [
108827
- {
108828
- name: "thread_create",
108829
- label: "Create session",
108830
- description: "Starts a fresh agent session that runs alongside this one, for when the user wants a second session working in parallel" + ROUTE_TO_TASK,
108831
- exposure: THREAD_TOOL_EXPOSURE
108832
- },
108833
- {
108834
- name: "thread_list",
108835
- label: "List sessions",
108836
- description: "Shows every addressable session on this device and the account's other devices with its id, name, status and device, plus the account's devices, for when the user needs a valid target address before acting on a session" + ROUTE_TO_TASK,
108837
- exposure: THREAD_TOOL_EXPOSURE
108838
- },
108839
- {
108840
- name: "thread_read",
108841
- label: "Read session",
108842
- description: "Returns the transcript and latest output of another session, for when the user asks what another session said or produced" + ROUTE_TO_TASK,
108843
- exposure: THREAD_TOOL_EXPOSURE
108844
- },
108845
- {
108846
- name: "thread_send",
108847
- label: "Send message to session",
108848
- description: "Delivers a message into another session that is already running, for when the user wants to talk to that session mid-task; its reply comes back through thread_read (tool.thread_read() in an eval cell)" + ROUTE_TO_TASK,
108849
- exposure: THREAD_TOOL_EXPOSURE
108850
- },
108851
- {
108852
- name: "thread_interrupt",
108853
- label: "Interrupt session turn",
108854
- description: "Stops the turn running in another session, and the background jobs that turn started, for when the user wants to halt a session that is going down the wrong path; the result's background lists what was stopped" + ROUTE_TO_TASK,
108855
- exposure: THREAD_TOOL_EXPOSURE
108856
- },
108857
- {
108858
- name: "thread_close",
108859
- label: "Close session",
108860
- description: "Closes a session. Omit thread or pass self to close this session. thread accepts the thread value of a thread_list row (tool.thread_list() in an eval cell), an alias, or a unique name; the result is closed true or false plus a reason. A thread with messages it has not read is refused, naming them; pass force: true to close it anyway (dropped_deliveries lists them)" + ROUTE_TO_TASK,
108861
- exposure: THREAD_TOOL_EXPOSURE
108862
- },
108863
- {
108864
- name: "thread_handoff",
108865
- label: "Hand off session",
108866
- description: "Moves the current request to an old session that has the context, for when the user says to hand this off or reopen that earlier conversation" + ROUTE_TO_TASK,
108867
- exposure: THREAD_TOOL_EXPOSURE
108868
- },
108869
- {
108870
- name: "thread_rename",
108871
- label: "Rename session",
108872
- description: "Renames a session's label, for when the user asks to call a session something clearer. Omit thread or pass self to rename this session. thread accepts the thread value of a thread_list row (tool.thread_list() in an eval cell), an alias, or a unique name; a miss names the thread value to pass",
108873
- exposure: THREAD_TOOL_EXPOSURE
108874
- },
108875
- {
108876
- name: "thread_set_model",
108877
- label: "Switch session model",
108878
- description: "Moves a session onto a different model, for when the user asks to switch that session to another model or a cheaper one",
108879
- exposure: THREAD_TOOL_EXPOSURE
108880
- },
108881
- {
108882
- name: "thread_set_reasoning",
108883
- label: "Set session reasoning level",
108884
- description: "Sets how much reasoning a session applies, for when the user asks to raise or lower the thinking effort of a session",
108885
- exposure: THREAD_TOOL_EXPOSURE
108886
- },
108887
- {
108888
- name: "thread_archive",
108889
- label: "Archive session",
108890
- description: "Archives or unarchives a session so the session list hides or shows it again, for when the user is finished with a session but wants to keep it",
108891
- exposure: THREAD_TOOL_EXPOSURE
108892
- }
108893
- ];
108894
- });
109341
+ // packages/omo-senpi/src/components/thread/tools/row-liveness.ts
109342
+ var init_row_liveness = () => {};
108895
109343
 
108896
109344
  // packages/omo-senpi/src/components/thread/tools/internals.ts
108897
109345
  function failure3(code, message, next, details) {
@@ -108900,36 +109348,26 @@ function failure3(code, message, next, details) {
108900
109348
  var init_internals = __esm(() => {
108901
109349
  init_address_book2();
108902
109350
  init_addressing();
109351
+ init_send_result_order();
108903
109352
  init_errors5();
108904
109353
  init_metadata();
108905
109354
  init_session_facts();
108906
109355
  init_thread_link();
108907
109356
  init_thread_state();
109357
+ init_row_liveness();
108908
109358
  });
108909
109359
 
108910
- // packages/omo-senpi/src/components/thread/control/session-host.ts
108911
- var init_session_host = __esm(() => {
109360
+ // packages/omo-senpi/src/components/thread/tools/model-match.ts
109361
+ var init_model_match = __esm(() => {
108912
109362
  init_internals();
108913
109363
  });
108914
109364
 
108915
- // packages/omo-senpi/src/components/thread/control/relay-session-host.ts
108916
- var init_relay_session_host = __esm(() => {
108917
- init_ports();
109365
+ // packages/omo-senpi/src/components/thread/control/port.ts
109366
+ var REFUSAL;
109367
+ var init_port = __esm(() => {
108918
109368
  init_errors5();
108919
- init_initial_skills();
108920
- init_outcome();
108921
- init_remote_ops();
108922
- init_device();
108923
- init_remote_worktree();
108924
- init_open_reply();
108925
- init_thread_link();
108926
109369
  init_thread_state();
108927
- init_session_host();
108928
- });
108929
-
108930
- // packages/omo-senpi/src/components/thread/tools/model-match.ts
108931
- var init_model_match = __esm(() => {
108932
- init_internals();
109370
+ REFUSAL = Symbol.for("omo.thread.control.refusal");
108933
109371
  });
108934
109372
 
108935
109373
  // packages/omo-senpi/src/components/thread/control/operations.ts
@@ -108981,6 +109419,20 @@ var init_transcript_tail = __esm(() => {
108981
109419
  kept = new WeakMap;
108982
109420
  unpaged = new WeakMap;
108983
109421
  });
109422
+
109423
+ // packages/omo-senpi/src/components/thread/control/close-ladder.ts
109424
+ var SESSION_GONE2;
109425
+ var init_close_ladder = __esm(() => {
109426
+ init_call_deadline();
109427
+ init_port();
109428
+ SESSION_GONE2 = new Set([
109429
+ "unknown_session",
109430
+ "route_unlisted",
109431
+ "session_identity_mismatch",
109432
+ "session_not_attached",
109433
+ "not_attached"
109434
+ ]);
109435
+ });
108984
109436
  // packages/omo-senpi/src/components/thread/control/wait-settled.ts
108985
109437
  var IN_PROGRESS, RUN_RECORDS;
108986
109438
  var init_wait_settled = __esm(() => {
@@ -109001,6 +109453,58 @@ var init_wait_settled = __esm(() => {
109001
109453
  ]);
109002
109454
  });
109003
109455
 
109456
+ // packages/omo-senpi/src/components/thread/initial-skills.ts
109457
+ var init_initial_skills = () => {};
109458
+
109459
+ // packages/omo-senpi/src/components/thread/worktree/failures.ts
109460
+ var init_failures = __esm(() => {
109461
+ init_errors5();
109462
+ });
109463
+
109464
+ // packages/omo-senpi/src/components/thread/control/open-reply.ts
109465
+ var init_open_reply = __esm(() => {
109466
+ init_errors5();
109467
+ init_outcome();
109468
+ init_failures();
109469
+ });
109470
+ // packages/omo-senpi/src/components/thread/worktree/remote-worktree.ts
109471
+ var init_remote_worktree = __esm(() => {
109472
+ init_close_ladder();
109473
+ init_open_reply();
109474
+ init_port();
109475
+ init_errors5();
109476
+ init_outcome();
109477
+ init_remote_ops();
109478
+ init_failures();
109479
+ });
109480
+
109481
+ // packages/omo-senpi/src/components/thread/remote/listing-liveness.ts
109482
+ var init_listing_liveness = __esm(() => {
109483
+ init_row_liveness();
109484
+ init_thread_state();
109485
+ });
109486
+
109487
+ // packages/omo-senpi/src/components/thread/control/session-host.ts
109488
+ var init_session_host = __esm(() => {
109489
+ init_internals();
109490
+ });
109491
+
109492
+ // packages/omo-senpi/src/components/thread/control/relay-session-host.ts
109493
+ var init_relay_session_host = __esm(() => {
109494
+ init_ports();
109495
+ init_errors5();
109496
+ init_initial_skills();
109497
+ init_outcome();
109498
+ init_remote_ops();
109499
+ init_device();
109500
+ init_remote_worktree();
109501
+ init_open_reply();
109502
+ init_thread_link();
109503
+ init_thread_state();
109504
+ init_listing_liveness();
109505
+ init_session_host();
109506
+ });
109507
+
109004
109508
  // packages/omo-senpi/src/components/thread/tools/thread-row.ts
109005
109509
  var init_thread_row = __esm(() => {
109006
109510
  init_thread_link();
@@ -109022,165 +109526,6 @@ var init_relay_control = __esm(() => {
109022
109526
  init_thread_row();
109023
109527
  });
109024
109528
 
109025
- // packages/omo-senpi/src/components/thread/remote/attach-pool.ts
109026
- var CATALOG_RECORD = "get_available_models", HELD_RECORDS;
109027
- var init_attach_pool = __esm(() => {
109028
- HELD_RECORDS = new Set([CATALOG_RECORD, "get_protocol_info"]);
109029
- });
109030
-
109031
- // packages/omo-senpi/src/components/thread/remote/session-state.ts
109032
- var ACCESS_ENDED, ACCESS_REFUSED, SESSION_LEFT, SESSION_GONE2;
109033
- var init_session_state = __esm(() => {
109034
- ACCESS_ENDED = new Set([
109035
- "authorization_expired",
109036
- "peer_revoked",
109037
- "owner_transfer",
109038
- "service_disabled"
109039
- ]);
109040
- ACCESS_REFUSED = new Set([
109041
- "unauthenticated",
109042
- "forbidden",
109043
- "owner_transfer",
109044
- "signed_out",
109045
- "service_disabled",
109046
- "sign_in_required",
109047
- "plan_required",
109048
- "peer_not_found",
109049
- "peer_not_session_client",
109050
- "account_changed",
109051
- "device_changed",
109052
- "capability_missing",
109053
- "engine_too_old"
109054
- ]);
109055
- SESSION_LEFT = new Set(["session_closed", "session_replaced"]);
109056
- SESSION_GONE2 = new Set([
109057
- "session_not_found",
109058
- "unknown_session",
109059
- "session_identity_mismatch"
109060
- ]);
109061
- });
109062
- // packages/omo-senpi/src/components/thread/remote/remote-watch.ts
109063
- var init_remote_watch = __esm(() => {
109064
- init_device_service2();
109065
- init_ports();
109066
- init_session_state();
109067
- });
109068
- // packages/omo-senpi/src/components/remote/port/lookup-gate.ts
109069
- var init_lookup_gate = __esm(() => {
109070
- init_ports();
109071
- });
109072
-
109073
- // packages/omo-senpi/src/components/remote/port/device-service.ts
109074
- var READ_ONLY_RECORDS, MARKED_RECORDS, LOOKUP_NONE;
109075
- var init_device_service3 = __esm(() => {
109076
- init_outcome();
109077
- init_device_service2();
109078
- init_attach_pool();
109079
- init_remote_watch();
109080
- init_call_deadline();
109081
- init_lookup_gate();
109082
- READ_ONLY_RECORDS = new Set([
109083
- "get_state",
109084
- "get_messages",
109085
- "get_entries",
109086
- "get_protocol_info"
109087
- ]);
109088
- MARKED_RECORDS = new Set(["admit_external_message"]);
109089
- LOOKUP_NONE = new Set(["session_not_found", "peer_not_found", "peer_not_session_client"]);
109090
- });
109091
-
109092
- // packages/device-service-core/src/wire.ts
109093
- var init_wire = __esm(() => {
109094
- init_errors4();
109095
- });
109096
-
109097
- // packages/omo-senpi/src/components/remote/codes.ts
109098
- var REMOTE_CODES, ENGINE_CODES;
109099
- var init_codes = __esm(() => {
109100
- init_wire();
109101
- init_errors5();
109102
- REMOTE_CODES = [
109103
- ...THREAD_ERROR_CODES,
109104
- "timeout",
109105
- "cancelled",
109106
- "session_ended",
109107
- "sender_not_allowed",
109108
- "local_only",
109109
- "host_not_answering",
109110
- "no_transport",
109111
- "device_offline",
109112
- "undelivered",
109113
- "transport_expired",
109114
- "unconfirmed",
109115
- "host_error"
109116
- ];
109117
- ENGINE_CODES = new Map([
109118
- ["model_unavailable", { code: "model_not_found" }],
109119
- ["invalid_level", { code: "thinking_level_unsupported" }],
109120
- ["worktree_failed", { code: "unsupported", details: { feature: "worktree" } }],
109121
- ["not_running", { code: "not_resumable" }],
109122
- ["handle_lost", { code: "not_found", details: { kind: "handle" } }]
109123
- ]);
109124
- });
109125
-
109126
- // packages/omo-senpi/src/components/remote/connection-of.ts
109127
- var lenders;
109128
- var init_connection_of = __esm(() => {
109129
- lenders = new WeakMap;
109130
- });
109131
-
109132
- // packages/omo-senpi/src/components/remote/deadlines.ts
109133
- var init_deadlines = __esm(() => {
109134
- init_codes();
109135
- });
109136
-
109137
- // packages/omo-senpi/src/components/remote/seams.ts
109138
- var init_seams = __esm(() => {
109139
- init_codes();
109140
- });
109141
-
109142
- // packages/omo-senpi/src/components/remote/resolve.ts
109143
- var init_resolve3 = __esm(() => {
109144
- init_client5();
109145
- init_deadlines();
109146
- init_codes();
109147
- init_seams();
109148
- });
109149
-
109150
- // packages/omo-senpi/src/components/remote/aliases.ts
109151
- var init_aliases = __esm(() => {
109152
- init_codes();
109153
- init_deadlines();
109154
- init_resolve3();
109155
- init_seams();
109156
- });
109157
-
109158
- // packages/omo-senpi/src/components/remote/attach.ts
109159
- var DIALOG_KINDS;
109160
- var init_attach = __esm(() => {
109161
- init_device_service2();
109162
- init_outcome();
109163
- init_client5();
109164
- init_codes();
109165
- init_deadlines();
109166
- init_device_service3();
109167
- init_resolve3();
109168
- init_seams();
109169
- DIALOG_KINDS = new Set(["select", "confirm", "input", "editor", "question"]);
109170
- });
109171
-
109172
- // packages/omo-senpi/src/components/remote/follow.ts
109173
- var RUN_OVER;
109174
- var init_follow = __esm(() => {
109175
- init_outcome();
109176
- init_attach();
109177
- init_client5();
109178
- init_codes();
109179
- init_deadlines();
109180
- init_seams();
109181
- RUN_OVER = new Set(["waiting_children", "waiting_background", "done", "failed", "cancelled"]);
109182
- });
109183
-
109184
109529
  // packages/omo-senpi/src/components/thread/gateway/hash-args.ts
109185
109530
  var init_hash_args = () => {};
109186
109531
 
@@ -109238,7 +109583,7 @@ var init_relay_transport = __esm(() => {
109238
109583
  init_errors5();
109239
109584
  init_hash_args();
109240
109585
  init_provenance2();
109241
- init_result2();
109586
+ init_result();
109242
109587
  init_remote_ops();
109243
109588
  init_device();
109244
109589
  init_outcome();
@@ -109286,9 +109631,10 @@ var init_sessions = __esm(() => {
109286
109631
  init_codes();
109287
109632
  init_deadlines();
109288
109633
  init_device_service3();
109289
- init_resolve3();
109634
+ init_resolve();
109290
109635
  init_seams();
109291
109636
  init_client_message_id();
109637
+ init_send_transcript();
109292
109638
  NO_SESSION = new Set(["unknown_session", "session_not_found"]);
109293
109639
  });
109294
109640
  // packages/omo-senpi/src/components/remote/unknown-device.ts
@@ -109305,7 +109651,7 @@ var init_client5 = __esm(() => {
109305
109651
  init_codes();
109306
109652
  init_deadlines();
109307
109653
  init_follow();
109308
- init_resolve3();
109654
+ init_resolve();
109309
109655
  init_seams();
109310
109656
  init_sessions();
109311
109657
  init_unknown_device();
@@ -109389,6 +109735,54 @@ var init_address = __esm(() => {
109389
109735
  init_resolve4();
109390
109736
  });
109391
109737
 
109738
+ // packages/omo-senpi/src/components/remote/device-address.ts
109739
+ var init_device_address = __esm(() => {
109740
+ init_address();
109741
+ init_errors5();
109742
+ });
109743
+
109744
+ // packages/omo-senpi/src/components/remote/port/sessions-port.ts
109745
+ var init_sessions_port = __esm(() => {
109746
+ init_connection_of();
109747
+ init_device_service3();
109748
+ });
109749
+
109750
+ // packages/omo-senpi/src/components/remote/person-surface.ts
109751
+ var init_person_surface = __esm(() => {
109752
+ init_sessions_port();
109753
+ });
109754
+
109755
+ // packages/omo-senpi/src/components/remote/relay-availability.ts
109756
+ var init_relay_availability = __esm(() => {
109757
+ init_remote_ops();
109758
+ });
109759
+
109760
+ // packages/omo-senpi/src/components/remote/local-service.ts
109761
+ var init_local_service = __esm(() => {
109762
+ init_device_service2();
109763
+ });
109764
+
109765
+ // packages/omo-senpi/src/components/remote/port/thread-runtime.ts
109766
+ var init_thread_runtime = __esm(() => {
109767
+ init_factories();
109768
+ init_sessions_port();
109769
+ });
109770
+
109771
+ // packages/omo-senpi/src/components/remote/index.ts
109772
+ var init_remote = __esm(() => {
109773
+ init_codes();
109774
+ init_factories();
109775
+ init_seams();
109776
+ init_address();
109777
+ init_device_address();
109778
+ init_person_surface();
109779
+ init_relay_availability();
109780
+ init_account_state();
109781
+ init_device_service2();
109782
+ init_local_service();
109783
+ init_thread_runtime();
109784
+ });
109785
+
109392
109786
  // packages/omo-opencode/src/cli/cli-program.ts
109393
109787
  init_commander();
109394
109788
 
@@ -110699,25 +111093,30 @@ async function rewriteCachedManifestRoot(pluginRoot, fromRoot, toRoot) {
110699
111093
  }
110700
111094
 
110701
111095
  // packages/omo-codex/src/install/codex-cache-payload.ts
110702
- import { cp as cp2, lstat as lstat5, mkdtemp, readdir as readdir4, rename, rm as rm4 } from "fs/promises";
111096
+ import { cp as cp2, lstat as lstat5, mkdtemp, readdir as readdir4, rename, rm as rm4, stat as stat4 } from "fs/promises";
110703
111097
  import { join as join31, relative as relative4, sep as sep4 } from "path";
110704
111098
  var NPM_BIN_PATH_SEGMENT = `${sep4}node_modules${sep4}.bin${sep4}`;
111099
+ var isNpmBinEntry = (pluginRoot, path) => `${sep4}${relative4(pluginRoot, path)}`.includes(NPM_BIN_PATH_SEGMENT);
110705
111100
  async function finalizeCachedPluginPayload(pluginRoot) {
110706
- await materializeDirectory(pluginRoot);
111101
+ await materializeDirectory(pluginRoot, pluginRoot);
110707
111102
  const unsupported = await unsupportedEntries(pluginRoot, pluginRoot);
110708
- if (unsupported.length > 0) {
110709
- throw new Error(`Codex plugin contains unsupported entry types: ${unsupported.sort().join(", ")}`);
110710
- }
111103
+ if (unsupported.length > 0)
111104
+ throw unsupportedEntryError(unsupported);
110711
111105
  }
110712
- async function materializeDirectory(directory) {
111106
+ var unsupportedEntryError = (paths) => new Error(`Codex plugin contains unsupported entry types: ${[...paths].sort().join(", ")}`);
111107
+ async function materializeDirectory(pluginRoot, directory) {
110713
111108
  for (const name of await readdir4(directory)) {
110714
111109
  const path = join31(directory, name);
110715
111110
  let entry = await lstat5(path);
110716
- if (path.includes(NPM_BIN_PATH_SEGMENT) && !entry.isFile() && !entry.isDirectory()) {
111111
+ if (isNpmBinEntry(pluginRoot, path) && !entry.isFile() && !entry.isDirectory()) {
110717
111112
  await rm4(path, { recursive: true, force: true });
110718
111113
  continue;
110719
111114
  }
110720
111115
  if (entry.isSymbolicLink()) {
111116
+ if (await stat4(path).catch(() => {
111117
+ return;
111118
+ }) === undefined)
111119
+ throw unsupportedEntryError([relative4(pluginRoot, path)]);
110721
111120
  const staging = await mkdtemp(join31(directory, ".omo-materialize-"));
110722
111121
  try {
110723
111122
  const copyPath = join31(staging, "entry");
@@ -110725,7 +111124,7 @@ async function materializeDirectory(directory) {
110725
111124
  recursive: true,
110726
111125
  dereference: true,
110727
111126
  filter: async (source) => {
110728
- if (!source.includes(NPM_BIN_PATH_SEGMENT))
111127
+ if (!isNpmBinEntry(pluginRoot, source))
110729
111128
  return true;
110730
111129
  const sourceEntry = await lstat5(source);
110731
111130
  return sourceEntry.isFile() || sourceEntry.isDirectory();
@@ -110739,7 +111138,7 @@ async function materializeDirectory(directory) {
110739
111138
  entry = await lstat5(path);
110740
111139
  }
110741
111140
  if (entry.isDirectory())
110742
- await materializeDirectory(path);
111141
+ await materializeDirectory(pluginRoot, path);
110743
111142
  }
110744
111143
  }
110745
111144
  async function unsupportedEntries(root, directory) {
@@ -111033,7 +111432,7 @@ function repoRootForCodexPluginSource(sourcePath) {
111033
111432
  return dirname13(packagesRoot);
111034
111433
  }
111035
111434
  // packages/omo-codex/src/install/codex-cache-prune.ts
111036
- import { lstat as lstat6, readdir as readdir6, rm as rm6, stat as stat4 } from "fs/promises";
111435
+ import { lstat as lstat6, readdir as readdir6, rm as rm6, stat as stat5 } from "fs/promises";
111037
111436
  import { join as join34 } from "path";
111038
111437
  async function pruneMarketplaceCache(input) {
111039
111438
  const cacheRoot = join34(input.codexHome, "plugins", "cache", input.marketplaceName);
@@ -111089,7 +111488,7 @@ async function isBrokenCacheSymlink(path) {
111089
111488
  throw error;
111090
111489
  }
111091
111490
  try {
111092
- await stat4(path);
111491
+ await stat5(path);
111093
111492
  return false;
111094
111493
  } catch (error) {
111095
111494
  if (isNodeErrorWithCode(error) && error.code === "ENOENT")
@@ -111098,7 +111497,7 @@ async function isBrokenCacheSymlink(path) {
111098
111497
  }
111099
111498
  }
111100
111499
  // packages/omo-codex/src/install/codex-cached-marketplace-manifest.ts
111101
- import { mkdir as mkdir4, rename as rename3, rm as rm7, stat as stat5, writeFile as writeFile5 } from "fs/promises";
111500
+ import { mkdir as mkdir4, rename as rename3, rm as rm7, stat as stat6, writeFile as writeFile5 } from "fs/promises";
111102
111501
  import { join as join35 } from "path";
111103
111502
  async function writeCachedMarketplaceManifest(input) {
111104
111503
  const marketplaceDir = join35(input.marketplaceRoot, ".agents", "plugins");
@@ -111127,7 +111526,7 @@ async function writeCachedMarketplaceManifest(input) {
111127
111526
  }
111128
111527
  async function isDirectory2(path) {
111129
111528
  try {
111130
- return (await stat5(path)).isDirectory();
111529
+ return (await stat6(path)).isDirectory();
111131
111530
  } catch (error) {
111132
111531
  if (error instanceof Error && "code" in error && error.code === "ENOENT")
111133
111532
  return false;
@@ -115514,7 +115913,7 @@ function installLocalLauncher(options) {
115514
115913
  // packages/omo-senpi/src/install/plugin-artifacts.ts
115515
115914
  import { createHash as createHash7 } from "crypto";
115516
115915
  import { constants as constants9 } from "fs";
115517
- import { access as access3, readFile as readFile30, stat as stat6 } from "fs/promises";
115916
+ import { access as access3, readFile as readFile30, stat as stat7 } from "fs/promises";
115518
115917
  import { dirname as dirname25, join as join66 } from "path";
115519
115918
 
115520
115919
  // packages/memory-core/src/personas/manifest.ts
@@ -115661,6 +116060,7 @@ var REQUIRED_PLUGIN_ARTIFACTS = [
115661
116060
  join66("extensions", "omo-telemetry-posthog.js"),
115662
116061
  join66("extensions", "omo-telemetry-otlp.js"),
115663
116062
  join66("extensions", "omo-memory-sync.js"),
116063
+ join66("extensions", "omo-memory-sync-rpc.js"),
115664
116064
  join66("extensions", "loro_wasm_bg.wasm"),
115665
116065
  join66("extensions", "CaseFolding.txt"),
115666
116066
  join66("extensions", "omo-thread-client.js"),
@@ -115683,7 +116083,8 @@ var REQUIRED_PLUGIN_ARTIFACTS = [
115683
116083
  join66("skills", "coding-agent-sessions", "SKILL.md"),
115684
116084
  join66("skills", "debugging", "SKILL.md"),
115685
116085
  join66("skills", "frontend", "SKILL.md"),
115686
- join66("skills", "git-master", "SKILL.md"),
116086
+ join66("skills", "git", "SKILL.md"),
116087
+ join66("skills", "github", "SKILL.md"),
115687
116088
  join66("skills", "init-deep", "SKILL.md"),
115688
116089
  join66("skills", "lsp-setup", "SKILL.md"),
115689
116090
  join66("skills", "programming", "SKILL.md"),
@@ -115752,7 +116153,7 @@ async function verifyAstGrepRuntimeIntegrity(pluginPath, platform) {
115752
116153
  const manifestPath = join66(dirname25(runtimeEntry), "manifest.json");
115753
116154
  let runtimeStat;
115754
116155
  try {
115755
- runtimeStat = await stat6(runtimeEntry);
116156
+ runtimeStat = await stat7(runtimeEntry);
115756
116157
  if (!runtimeStat.isFile())
115757
116158
  throw new Error("runtime is not a file");
115758
116159
  await access3(runtimeEntry, constants9.R_OK | constants9.X_OK);
@@ -119999,6 +120400,7 @@ var BuiltinSkillNameSchema = _enum([
119999
120400
  "playwright",
120000
120401
  "dev-browser",
120001
120402
  "frontend",
120403
+ "git",
120002
120404
  "git-master",
120003
120405
  "review-work",
120004
120406
  "remove-ai-slops",
@@ -125436,7 +125838,7 @@ function resolveLatestVersion(input) {
125436
125838
 
125437
125839
  // packages/omo-opencode/src/cli/doctor/checks/codex-components.ts
125438
125840
  init_src();
125439
- import { readdir as readdir16, readFile as readFile32, stat as stat7 } from "fs/promises";
125841
+ import { readdir as readdir16, readFile as readFile32, stat as stat8 } from "fs/promises";
125440
125842
  import { homedir as homedir27 } from "os";
125441
125843
  import { dirname as dirname40, isAbsolute as isAbsolute15, join as join100, relative as relative10, resolve as resolve28, sep as sep11 } from "path";
125442
125844
  var CODEX_COMPONENTS_CHECK_ID = "codex-components";
@@ -125701,7 +126103,7 @@ async function readJson2(path) {
125701
126103
  }
125702
126104
  async function fileSize(path) {
125703
126105
  try {
125704
- const stats = await stat7(path);
126106
+ const stats = await stat8(path);
125705
126107
  return stats.isFile() ? stats.size : undefined;
125706
126108
  } catch {
125707
126109
  return;
@@ -128452,7 +128854,7 @@ var {
128452
128854
  realpath: realpath2,
128453
128855
  rm: rm16,
128454
128856
  rmdir: rmdir2,
128455
- stat: stat8,
128857
+ stat: stat9,
128456
128858
  statfs,
128457
128859
  unlink: unlink3
128458
128860
  } = promises;
@@ -128801,7 +129203,7 @@ async function locateHelper(candidates, verify) {
128801
129203
  // packages/omo-opencode/src/cli/service-auth/keychain-helper/pin.ts
128802
129204
  import { createHash as createHash11 } from "crypto";
128803
129205
  import { readdirSync as readdirSync15, rmSync as rmSync9 } from "fs";
128804
- import { chmod as chmod3, copyFile as copyFile5, constants as constants14, mkdir as mkdir11, readFile as readFile35, rename as rename9, rm as rm17, stat as stat9 } from "fs/promises";
129206
+ import { chmod as chmod3, copyFile as copyFile5, constants as constants14, mkdir as mkdir11, readFile as readFile35, rename as rename9, rm as rm17, stat as stat10 } from "fs/promises";
128805
129207
  import { tmpdir as tmpdir6 } from "os";
128806
129208
  import { basename as basename15, join as join108 } from "path";
128807
129209
  var DIR_PREFIX = "omo-keychain-";
@@ -128848,7 +129250,7 @@ async function defaultPinDir() {
128848
129250
  }
128849
129251
  async function fileVerdict(path, verify) {
128850
129252
  try {
128851
- if (!(await stat9(path)).isFile())
129253
+ if (!(await stat10(path)).isFile())
128852
129254
  return "absent";
128853
129255
  } catch {
128854
129256
  return "absent";
@@ -128857,7 +129259,7 @@ async function fileVerdict(path, verify) {
128857
129259
  }
128858
129260
  var pinned = new Map;
128859
129261
  async function sourceIdentity(source) {
128860
- const info = await stat9(source);
129262
+ const info = await stat10(source);
128861
129263
  return `${source}\x00${info.dev}\x00${info.ino}\x00${info.size}\x00${info.mtimeMs}\x00${info.ctimeMs}`;
128862
129264
  }
128863
129265
  async function copyAndVerify(source, verify, dir) {
@@ -128946,7 +129348,7 @@ async function pinVerifiedCopy(source, verify, dir) {
128946
129348
  }
128947
129349
 
128948
129350
  // packages/omo-opencode/src/cli/service-auth/keychain-helper/signature.ts
128949
- import { stat as stat10 } from "fs/promises";
129351
+ import { stat as stat11 } from "fs/promises";
128950
129352
  init_bun_spawn_shim();
128951
129353
  var KEYCHAIN_HELPER_REQUIREMENT = 'identifier "com.mengmota.omo-keychain-helper" and anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] ' + 'and certificate leaf[field.1.2.840.113635.100.6.1.13] and certificate leaf[subject.OU] = "523JNR86LZ"';
128952
129354
  var STRICT_ALL_ARCHITECTURES = 1 << 4 | 1 << 0;
@@ -129017,7 +129419,7 @@ var verifyWithSecurityFramework = async (path, requirement) => {
129017
129419
  };
129018
129420
  async function fileIdentity(path) {
129019
129421
  try {
129020
- const info = await stat10(path);
129422
+ const info = await stat11(path);
129021
129423
  if (!info.isFile())
129022
129424
  return null;
129023
129425
  return `${path}\x00${info.dev}\x00${info.ino}\x00${info.size}\x00${info.mtimeMs}\x00${info.ctimeMs}`;
@@ -129470,7 +129872,7 @@ import { dirname as dirname43 } from "path";
129470
129872
 
129471
129873
  // packages/team-core/src/team-state-store/lock-record.ts
129472
129874
  import { randomUUID as randomUUID6 } from "crypto";
129473
- import { readFile as readFile36, stat as stat11 } from "fs/promises";
129875
+ import { readFile as readFile36, stat as stat12 } from "fs/promises";
129474
129876
 
129475
129877
  // packages/memory-core/src/locks/process-identity.ts
129476
129878
  import { execFile as execFile8 } from "child_process";
@@ -129569,9 +129971,9 @@ function errorCode(error) {
129569
129971
  return;
129570
129972
  return typeof error.code === "string" ? error.code : undefined;
129571
129973
  }
129572
- async function execFileText(command, args) {
129974
+ async function execFileText(command, args, env) {
129573
129975
  return await new Promise((resolve) => {
129574
- execFile8(command, args, { encoding: "utf8", timeout: 2000, windowsHide: true }, (error, stdout) => {
129976
+ execFile8(command, args, { encoding: "utf8", timeout: 2000, windowsHide: true, env }, (error, stdout) => {
129575
129977
  if (error !== null) {
129576
129978
  resolve(null);
129577
129979
  return;
@@ -129640,13 +130042,17 @@ async function readProcessStartIdentity(pid) {
129640
130042
  const startSeconds = await readDarwinProcessStartSeconds(pid);
129641
130043
  if (startSeconds !== null)
129642
130044
  return `proc-start-epoch:${startSeconds}`;
129643
- const value = await execFileText("/bin/ps", ["-o", "lstart=", "-p", String(pid)]);
129644
- return value === null ? null : `ps-lstart:${value.replace(/\s+/g, " ")}`;
130045
+ return await readPsLstartIdentity(pid);
129645
130046
  }
129646
130047
  if (process.platform === "win32")
129647
130048
  return await readWin32StartIdentity(pid);
129648
130049
  return null;
129649
130050
  }
130051
+ async function readPsLstartIdentity(pid, exec = execFileText) {
130052
+ const env = { ...process.env, TZ: "UTC", LC_ALL: "C", LANG: "C" };
130053
+ const value = await exec("/bin/ps", ["-o", "lstart=", "-p", String(pid)], env);
130054
+ return value === null ? null : `ps-lstart-utc:${value.replace(/\s+/g, " ")}`;
130055
+ }
129650
130056
  async function getProcessCommandName(pid) {
129651
130057
  let argv0;
129652
130058
  if (process.platform === "linux") {
@@ -129667,9 +130073,35 @@ function identityScheme(identity) {
129667
130073
  const separator = identity.indexOf(":");
129668
130074
  return separator <= 0 ? null : identity.slice(0, separator);
129669
130075
  }
130076
+ var LSTART_MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
130077
+ var LSTART_C_RENDERING = /^[A-Z][a-z]{2} ([A-Z][a-z]{2}) (\d{1,2}) (\d{2}):(\d{2}):(\d{2}) (\d{4})$/;
130078
+ function lstartWallClockMs(rendering) {
130079
+ const match = LSTART_C_RENDERING.exec(rendering);
130080
+ if (match === null)
130081
+ return null;
130082
+ const [, month, day, hours, minutes, seconds, year] = match;
130083
+ const monthIndex = LSTART_MONTHS.indexOf(month ?? "");
130084
+ if (monthIndex < 0)
130085
+ return null;
130086
+ return Date.UTC(Number(year), monthIndex, Number(day), Number(hours), Number(minutes), Number(seconds));
130087
+ }
130088
+ var MIN_ZONE_OFFSET_MS = -12 * 3600000;
130089
+ var MAX_ZONE_OFFSET_MS = 14 * 3600000;
130090
+ var ZONE_OFFSET_STEP_MS = 15 * 60000;
130091
+ function legacyPsLstartConflict(recorded, actual) {
130092
+ const recordedWall = lstartWallClockMs(recorded.slice("ps-lstart:".length));
130093
+ const actualUtc = lstartWallClockMs(actual.slice("ps-lstart-utc:".length));
130094
+ if (recordedWall === null || actualUtc === null)
130095
+ return false;
130096
+ const offset = recordedWall - actualUtc;
130097
+ return offset < MIN_ZONE_OFFSET_MS || offset > MAX_ZONE_OFFSET_MS || offset % ZONE_OFFSET_STEP_MS !== 0;
130098
+ }
129670
130099
  function startIdentitiesConflict(recorded, actual) {
129671
130100
  const recordedScheme = identityScheme(recorded);
129672
- if (recordedScheme === null || recordedScheme !== identityScheme(actual))
130101
+ const actualScheme = identityScheme(actual);
130102
+ if (recordedScheme === "ps-lstart" && actualScheme === "ps-lstart-utc")
130103
+ return legacyPsLstartConflict(recorded, actual);
130104
+ if (recordedScheme === null || recordedScheme !== actualScheme)
129673
130105
  return false;
129674
130106
  return recorded !== actual;
129675
130107
  }
@@ -129889,7 +130321,7 @@ function parseLockHolder(content) {
129889
130321
  async function readLockRecord(lockPath) {
129890
130322
  try {
129891
130323
  const content = await readFile36(lockPath, "utf8");
129892
- const { mtimeMs } = await stat11(lockPath);
130324
+ const { mtimeMs } = await stat12(lockPath);
129893
130325
  return { content, modifiedAtEpochMs: mtimeMs };
129894
130326
  } catch (error) {
129895
130327
  if (!(error instanceof Error))
@@ -131213,29 +131645,9 @@ ${key.name}`;
131213
131645
  }
131214
131646
 
131215
131647
  // packages/omo-opencode/src/cli/service-auth/session.ts
131648
+ init_local_only();
131216
131649
  import { homedir as homedir34 } from "os";
131217
131650
 
131218
- // packages/device-service-core/src/local-only.ts
131219
- var KEY2 = Symbol.for("omo.local-only-process.v1");
131220
- function state3() {
131221
- const holder = globalThis;
131222
- holder[KEY2] ??= { marked: false };
131223
- return holder[KEY2];
131224
- }
131225
-
131226
- class LocalOnlyNetworkRefused extends Error {
131227
- code = "local_only_network_refused";
131228
- site;
131229
- constructor(site) {
131230
- super(`a local-only omo remote command reached the network at ${site}`);
131231
- this.site = site;
131232
- }
131233
- }
131234
- function refuseIfLocalOnly(site) {
131235
- if (state3().marked)
131236
- throw new LocalOnlyNetworkRefused(site);
131237
- }
131238
-
131239
131651
  // packages/memory-core/src/sync/contract-version.ts
131240
131652
  var SYNC_CONTRACT_VERSION = "1.44.0";
131241
131653
  var SYNC_CAPABILITIES = "phrase";
@@ -131246,6 +131658,7 @@ var syncRequestHeaders = (token) => ({
131246
131658
  });
131247
131659
 
131248
131660
  // packages/omo-opencode/src/cli/service-auth/protocol-request.ts
131661
+ init_local_only();
131249
131662
  init_zod();
131250
131663
  class InvalidApiResponse extends SignInError {
131251
131664
  status;
@@ -132381,208 +132794,26 @@ function configureServiceAuthCommands(program, open = serviceAccountsOpen(), hoo
132381
132794
  }
132382
132795
 
132383
132796
  // packages/omo-native/device-service-handoff.ts
132797
+ init_src6();
132798
+ init_hand_device_keys();
132799
+ init_local_only();
132384
132800
  import { existsSync as existsSync67 } from "fs";
132385
-
132386
- // packages/device-service-core/src/index.ts
132387
- init_device_service2();
132388
-
132389
- // packages/device-service-core/src/delivery-consumer.ts
132390
- init_client4();
132391
- init_background_transport();
132392
- init_device_service2();
132393
- // packages/device-service-core/src/bootstrap.ts
132394
- import { existsSync as existsSync66 } from "fs";
132395
- init_device_service2();
132396
-
132397
- // packages/device-service-core/src/hand-device-keys.ts
132398
- init_device_service2();
132399
- import { existsSync as existsSync65 } from "fs";
132400
- var DEAD_ENDPOINT_CODES = new Set(["ENOENT", "ECONNREFUSED", "ECONNRESET", "EPIPE"]);
132401
- var connectFailure = (error) => {
132402
- const detail = error instanceof Error ? error.message : String(error);
132403
- if (error instanceof LocalApiError) {
132404
- if (error.code === "refused" || error.code === "server_proof_invalid")
132405
- return { cause: "refused", detail };
132406
- if (error.code === "insecure_state_dir")
132407
- return { cause: "unreadable", detail };
132408
- if (error.code === "handshake_timeout" || error.code === "request_timeout")
132409
- return { cause: "timed_out", detail };
132410
- return { cause: "failed", detail };
132411
- }
132412
- const code = error instanceof Error && "code" in error ? String(error.code) : "";
132413
- return { cause: DEAD_ENDPOINT_CODES.has(code) ? "dead_endpoint" : "failed", detail };
132414
- };
132415
- var connectOrNotRunning = async (connect, log) => {
132416
- try {
132417
- return await connect();
132418
- } catch (error) {
132419
- const { cause, detail } = connectFailure(error);
132420
- log?.(`OmO device service: ${cause}, treated as not running (${detail}).`);
132421
- return "not_running";
132422
- }
132423
- };
132424
- var adopted = (status) => status.device !== null && status.state !== "sign_in_required";
132425
- var handDeviceKeys = async (options) => {
132426
- if (!existsSync65(deviceServiceEndpointPath(options.stateDir)))
132427
- return "not_running";
132428
- const service = await connectOrNotRunning(options.connect, options.log);
132429
- if (service === "not_running")
132430
- return "not_running";
132431
- try {
132432
- if (options.when === "not_adopted" && adopted(await service.status()))
132433
- return "already_adopted";
132434
- await service.adopt(options.credential);
132435
- return "adopted";
132436
- } finally {
132437
- service.close();
132438
- }
132439
- };
132440
-
132441
- // packages/device-service-core/src/bootstrap.ts
132442
- init_version2();
132443
- var forgetDeviceService = async (options) => {
132444
- if (!existsSync66(deviceServiceEndpointPath(options.stateDir)))
132445
- return "not_running";
132446
- const service = await connectOrNotRunning(options.connect, options.log);
132447
- if (service === "not_running")
132448
- return "not_running";
132449
- try {
132450
- await service.forget();
132451
- } finally {
132452
- service.close();
132453
- }
132454
- return "forgotten";
132455
- };
132456
- // packages/device-service-core/src/cold-wake/host.ts
132457
- var UNREPAIRABLE = new Set(["EPERM", "EACCES", "EROFS"]);
132458
-
132459
- // packages/device-service-core/src/cold-wake/service-table.ts
132460
- var SERVICE_TABLE_ENV = "OMO_RELAYD_SERVICES";
132461
-
132462
- // packages/device-service-core/src/cold-wake/darwin.ts
132463
- var TABLE_KEY = `EnvironmentVariables.${SERVICE_TABLE_ENV}`;
132464
- // packages/device-service-core/src/release/acquire.ts
132465
- init_access();
132466
- init_dacl();
132467
-
132468
- // packages/device-service-core/src/release/windows-dacl.ts
132469
- init_errors4();
132470
- init_dacl();
132471
- var SID_TOKEN_SCRIPT = String.raw`
132472
- $ErrorActionPreference = 'Stop'
132473
- (New-Object System.Security.AccessControl.RawSecurityDescriptor("O:$env:LA_SID")).GetSddlForm('Owner')
132474
- `;
132475
- var userSidToken = async (userSid, run = runPowerShell) => {
132476
- const { code, out } = await run(SID_TOKEN_SCRIPT, { LA_SID: userSid });
132477
- const match = code === 0 ? /^O:(S-1-\d+(?:-\d+)+|[A-Z]{2})$/.exec(out.trim()) : null;
132478
- return match?.[1];
132479
- };
132480
- var aliasedDaclVerdict = (dacl, userSid, kind, userAlias) => {
132481
- const asSid = (token) => userAlias !== undefined && token === userAlias ? userSid : token;
132482
- return exactDaclVerdict({ ...dacl, owner: asSid(dacl.owner), aces: dacl.aces.map((ace) => ({ ...ace, sid: asSid(ace.sid) })) }, userSid, kind);
132483
- };
132484
- var verifyExactDacl2 = async (path, userSid, kind, run = runPowerShell) => {
132485
- let dacl;
132486
- try {
132487
- dacl = await describeDacl(path, run);
132488
- } catch (error) {
132489
- if (error instanceof LocalApiError)
132490
- return false;
132491
- throw error;
132492
- }
132493
- return aliasedDaclVerdict(dacl, userSid, kind, await userSidToken(userSid, run));
132494
- };
132495
- var windowsSecureFile2 = (userSid, run = runPowerShell) => async (path, kind) => {
132496
- const target = kind === "dir" ? "dir" : "file";
132497
- await applyExactDacl(path, userSid, target, run);
132498
- if (!await verifyExactDacl2(path, userSid, target, run))
132499
- throw new LocalApiError("insecure_state_dir", "the DACL is not exactly one ACE for the user");
132500
- };
132501
-
132502
- // packages/device-service-core/src/release/release-assets.ts
132503
- init_version2();
132504
- var MANIFEST = "latest.json";
132505
- var CHECKSUMS_MAX_BYTES = 64 * 1024;
132506
- var MANIFEST_MAX_BYTES = 4 * 1024;
132507
- var BINARY_MAX_BYTES = 512 * 1024 * 1024;
132508
- var DEVICE_SERVICE_HOSTS = [
132509
- "darwin-arm64",
132510
- "darwin-x64",
132511
- "linux-x64",
132512
- "linux-arm64",
132513
- "windows-x64",
132514
- "windows-arm64"
132515
- ];
132516
- var deviceServiceAssetName = (host) => host.startsWith("windows-") ? `omo-device-service-${host}.exe` : `omo-device-service-${host}`;
132517
- var RELEASE_FILES = new Set([MANIFEST, ...DEVICE_SERVICE_HOSTS.map(deviceServiceAssetName)]);
132518
-
132519
- // packages/device-service-core/src/strict-ed25519/strict-ed25519.ts
132520
- var P = (1n << 255n) - 19n;
132521
- var L = (1n << 252n) + 27742317777372353535851937790883648493n;
132522
- var mod = (n) => {
132523
- const r = n % P;
132524
- return r < 0n ? r + P : r;
132525
- };
132526
- var power = (base, exponent) => {
132527
- let result = 1n;
132528
- let b = mod(base);
132529
- for (let n = exponent;n > 0n; n >>= 1n) {
132530
- if (n & 1n)
132531
- result = mod(result * b);
132532
- b = mod(b * b);
132533
- }
132534
- return result;
132535
- };
132536
- var D = mod(-121665n * power(121666n, P - 2n));
132537
- var SQRT_MINUS_ONE = power(2n, (P - 1n) / 4n);
132538
- var keyCache = new Map;
132539
- // packages/device-service-core/src/release/release-key.json
132540
- var release_key_default = {
132541
- alg: "Ed25519",
132542
- public_keys_hex: ["6c6781a91888e3e5be10d1b27466319a7d5adf2a7d2b254f4118eda9cbcb4465", "ca9407b484a30ac7f09cb152455176f1e03fc6ca3446ff930bc7587215759016"]
132543
- };
132544
-
132545
- // packages/device-service-core/src/release/release-signature.ts
132546
- var HEX_KEY = /^[0-9a-f]{64}$/;
132547
- var parseReleaseKeySet = (value) => {
132548
- if (typeof value !== "object" || value === null || Array.isArray(value))
132549
- throw new Error("release key: not an object");
132550
- if (Object.keys(value).toSorted().join(",") !== "alg,public_keys_hex")
132551
- throw new Error("release key: fields must be exactly alg and public_keys_hex");
132552
- const alg = Reflect.get(value, "alg");
132553
- const hexes = Reflect.get(value, "public_keys_hex");
132554
- if (alg !== "Ed25519")
132555
- throw new Error("release key: alg must be Ed25519");
132556
- if (!Array.isArray(hexes))
132557
- throw new Error("release key: public_keys_hex must be an array");
132558
- if (new Set(hexes).size !== hexes.length)
132559
- throw new Error("release key: public_keys_hex must not repeat a key");
132560
- return hexes.map((hex) => {
132561
- if (typeof hex !== "string" || !HEX_KEY.test(hex))
132562
- throw new Error("release key: each public_keys_hex entry must be 64 lowercase hex characters");
132563
- return hex;
132564
- });
132565
- };
132566
- var DEVICE_SERVICE_RELEASE_KEYS = parseReleaseKeySet(release_key_default);
132567
-
132568
- // packages/device-service-core/src/release/acquire.ts
132569
- init_version2();
132570
- var platformSecure = process.platform === "win32" ? async (path, kind, origin) => windowsSecureFile2(await currentUserSid())(path, kind, origin) : posixSecureFile;
132571
- // packages/device-service-core/src/registrant.ts
132572
- init_device_service2();
132573
- var NONE2 = Symbol("none registered");
132574
-
132575
- // packages/device-service-core/src/index.ts
132576
- init_timers();
132577
132801
  // packages/omo-native/package.json
132578
132802
  var package_default4 = {
132579
132803
  name: "omo-ai",
132580
- version: "5.1.84",
132804
+ version: "5.1.86",
132581
132805
  type: "module",
132582
132806
  description: "OmO Native - the standalone omo command with the OMO extension built in: bun add -g omo-ai",
132583
132807
  bin: {
132584
132808
  omo: "bin/omo.js"
132585
132809
  },
132810
+ exports: {
132811
+ "./remote": {
132812
+ types: "./bin/lib/remote-sdk.generated.d.ts",
132813
+ default: "./bin/lib/remote-sdk.generated.js"
132814
+ },
132815
+ "./package.json": "./package.json"
132816
+ },
132586
132817
  files: [
132587
132818
  "bin",
132588
132819
  "plugin"
@@ -132680,7 +132911,7 @@ function cliDeviceServiceHandoff(options) {
132680
132911
  }
132681
132912
 
132682
132913
  // packages/omo-native/remote-entry.ts
132683
- init_device_service2();
132914
+ init_remote();
132684
132915
 
132685
132916
  // packages/memory-core/src/journal/fsync.ts
132686
132917
  var SKIPPABLE_SYNC_CODES = new Set(["ENOENT", "EISDIR", "EPERM", "EACCES", "EINVAL"]);
@@ -132694,7 +132925,7 @@ var ED25519_PKCS8_PREFIX = hexBytes("302e020100300506032b657004220420");
132694
132925
  var ED25519_SPKI_PREFIX = hexBytes("302a300506032b6570032100");
132695
132926
  // packages/memory-core/src/sync/crypto/anchor.ts
132696
132927
  var anchors = new WeakSet;
132697
- var candidates = new WeakSet;
132928
+ var candidates2 = new WeakSet;
132698
132929
  var bootstraps = new WeakSet;
132699
132930
 
132700
132931
  // packages/memory-core/src/sync/crypto/strict-ed25519/strict-ed25519.ts
@@ -132740,6 +132971,12 @@ var refreshAttemptSchema = object({
132740
132971
  state: _enum(["ready", "sent_unknown", "successor_received_uncommitted", "exhausted"])
132741
132972
  });
132742
132973
 
132974
+ // packages/omo-native/remote-bootstrap.ts
132975
+ init_src6();
132976
+
132977
+ // packages/omo-native/remote-cold-wake.ts
132978
+ init_src6();
132979
+
132743
132980
  // packages/omo-native/remote-session-args.ts
132744
132981
  init_fields();
132745
132982
 
@@ -132762,82 +132999,29 @@ var VERBS = [
132762
132999
  ...SESSION_VERBS
132763
133000
  ];
132764
133001
 
132765
- // packages/omo-native/remote-session-verbs.ts
132766
- init_relay_session_host();
132767
- init_operations();
132768
- init_relay_control();
132769
- init_device_service3();
132770
-
132771
- // packages/omo-senpi/src/components/remote/index.ts
132772
- init_codes();
132773
- init_factories();
132774
- init_seams();
132775
- init_address();
132776
-
132777
- // packages/omo-senpi/src/components/remote/device-address.ts
132778
- init_address();
132779
- init_errors5();
132780
- // packages/omo-senpi/src/components/thread/gateway/store.ts
132781
- init_constants6();
132782
-
132783
- // packages/omo-senpi/src/components/thread/gateway/session-args-schema.ts
132784
- var TYPES = new Set(["object", "string", "number", "integer", "boolean", "array", "null"]);
132785
- var ANNOTATIONS = new Set(["title", "description", "default", "examples"]);
132786
- var COUNTS = ["minLength", "maxLength", "minItems", "maxItems"];
132787
- var BOUNDS2 = ["minimum", "maximum", "exclusiveMinimum", "exclusiveMaximum"];
132788
- var KEYWORDS = new Set([
132789
- "type",
132790
- "properties",
132791
- "required",
132792
- "additionalProperties",
132793
- "enum",
132794
- "const",
132795
- "pattern",
132796
- "items",
132797
- "anyOf",
132798
- ...COUNTS,
132799
- ...BOUNDS2,
132800
- ...ANNOTATIONS
132801
- ]);
133002
+ // packages/omo-native/remote-cli.ts
133003
+ init_remote();
132802
133004
 
132803
- // packages/omo-native/remote-session-verbs.ts
132804
- init_provenance_resolver();
132805
- init_relay_transport();
133005
+ // packages/omo-native/remote-attach-presentation.ts
133006
+ init_outcome();
133007
+ var FORWARD_WAIT_MS = 60 * 60000;
132806
133008
 
132807
- // packages/omo-senpi/src/components/thread/gateway/engine.ts
132808
- init_addressing();
132809
- init_errors5();
132810
- init_fields();
132811
- init_constants6();
132812
- init_result2();
132813
- init_provenance_resolver();
133009
+ // packages/omo-native/remote-attach.ts
133010
+ var MAX_LINE_CHARS = 64 * 1024 * 1024;
132814
133011
 
132815
- // packages/omo-senpi/src/components/thread/gateway/local-transport.ts
132816
- init_errors5();
133012
+ // packages/omo-native/remote-local.ts
133013
+ init_remote();
132817
133014
 
132818
133015
  // packages/omo-native/remote-session-verbs.ts
132819
- init_address_book();
132820
- init_this_device();
132821
- init_thread_link();
132822
- init_thread_row();
133016
+ init_remote();
132823
133017
 
132824
- // packages/omo-native/bin/lib/package-paths.js
132825
- import { fileURLToPath as fileURLToPath9 } from "url";
132826
- var packageRoot = fileURLToPath9(new URL("../..", import.meta.url));
132827
-
132828
- // packages/omo-native/remote-session-verbs.ts
132829
- init_remote_ops();
133018
+ // packages/omo-native/remote-session-answer.ts
132830
133019
  var NO_SUCH_SESSION = new Set(["session_not_found", "unknown_session"]);
132831
133020
 
132832
- // packages/omo-native/remote-attach-presentation.ts
132833
- init_outcome();
132834
- var FORWARD_WAIT_MS = 60 * 60000;
132835
-
132836
- // packages/omo-native/remote-attach.ts
132837
- var MAX_LINE_CHARS = 64 * 1024 * 1024;
133021
+ // packages/omo-native/remote-session-open.ts
133022
+ init_remote();
132838
133023
 
132839
133024
  // packages/omo-native/remote-local.ts
132840
- init_device_service2();
132841
133025
  var READ_VERBS = new Set(["status", "devices", "sessions", "disable", "control", "wake"]);
132842
133026
 
132843
133027
  // packages/omo-native/remote-usage.ts
@@ -132909,10 +133093,6 @@ var USAGE_ENTRIES = [
132909
133093
  ];
132910
133094
  var REMOTE_USAGE = [USAGE_HEAD, ...USAGE_ENTRIES.map((entry) => entry.text)].join(`
132911
133095
  `);
132912
-
132913
- // packages/omo-native/remote-cli.ts
132914
- init_device_service3();
132915
-
132916
133096
  // packages/omo-native/remote-entry.ts
132917
133097
  var testSkipKey = Symbol.for("omo.test.skipRemoteLoginSetup");
132918
133098
 
@@ -133371,7 +133551,7 @@ function linkedWorktrees(records) {
133371
133551
  }
133372
133552
  // packages/omo-opencode/src/cli/worktree-sweep/sweep.ts
133373
133553
  import { existsSync as existsSync70 } from "fs";
133374
- import { stat as stat12 } from "fs/promises";
133554
+ import { stat as stat13 } from "fs/promises";
133375
133555
  import os7 from "os";
133376
133556
  import { normalize as normalize2 } from "path";
133377
133557
 
@@ -133443,7 +133623,7 @@ async function isOlderThan(worktreePath, days, now) {
133443
133623
  if (days <= 0)
133444
133624
  return false;
133445
133625
  try {
133446
- const stats = await stat12(worktreePath);
133626
+ const stats = await stat13(worktreePath);
133447
133627
  return now - stats.mtimeMs > days * DAY_MS;
133448
133628
  } catch {
133449
133629
  return false;