oh-my-opencode 5.1.83 → 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 (442) 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/cli-program.d.ts +3 -0
  8. package/dist/cli/index.js +1197 -1008
  9. package/dist/cli/service-auth/devices.d.ts +5 -2
  10. package/dist/cli-node/index.js +1197 -1008
  11. package/dist/config/schema/agent-names.d.ts +1 -0
  12. package/dist/index.js +194 -213
  13. package/dist/skills/browser/SKILL.md +100 -91
  14. package/dist/skills/browser/references/commands.md +92 -27
  15. package/dist/skills/browser/references/desktop.md +22 -0
  16. package/dist/skills/browser/references/install.md +18 -0
  17. package/dist/skills/browser/references/owned-engine/README.md +7 -2
  18. package/dist/skills/browser/references/owned-engine/frames-and-humans.md +9 -2
  19. package/dist/skills/browser/references/owned-engine/network.md +13 -7
  20. package/dist/skills/browser/references/recipes/1password.md +6 -2
  21. package/dist/skills/browser/runtime/omowright/index.js +15 -15
  22. package/dist/skills/browser/runtime/omowright/manifest.json +4 -4
  23. package/dist/skills/debugging/SKILL.md +1 -1
  24. package/dist/skills/debugging/references/tools/browser-qa.md +1 -1
  25. package/dist/skills/git/SKILL.md +62 -0
  26. package/dist/skills/git/agents/openai.yaml +13 -0
  27. package/dist/skills/github/SKILL.md +94 -0
  28. package/dist/skills/github/references/branch-rules.md +129 -0
  29. package/dist/skills/github/references/evidence-attachments.md +16 -0
  30. package/dist/skills/github/references/repo-setup.md +152 -0
  31. package/dist/skills/github/references/waiting.md +52 -0
  32. package/dist/skills/github/references/workflows.md +161 -0
  33. package/dist/skills/github/scripts/cli.ts +8 -0
  34. package/dist/skills/github/scripts/package.json +12 -0
  35. package/dist/skills/github/scripts/sdk.ts +11 -0
  36. package/dist/skills/github/scripts/src/account.ts +243 -0
  37. package/dist/skills/github/scripts/src/actions-write.ts +86 -0
  38. package/dist/skills/github/scripts/src/actions.ts +210 -0
  39. package/dist/skills/github/scripts/src/attestations.ts +136 -0
  40. package/dist/skills/github/scripts/src/blake2b.ts +102 -0
  41. package/dist/skills/github/scripts/src/branch-protection.ts +192 -0
  42. package/dist/skills/github/scripts/src/caches.ts +105 -0
  43. package/dist/skills/github/scripts/src/checks.ts +107 -0
  44. package/dist/skills/github/scripts/src/codespaces.ts +230 -0
  45. package/dist/skills/github/scripts/src/conversation-lock.ts +50 -0
  46. package/dist/skills/github/scripts/src/discussion-list.ts +126 -0
  47. package/dist/skills/github/scripts/src/discussion-lookup.ts +127 -0
  48. package/dist/skills/github/scripts/src/discussions.ts +234 -0
  49. package/dist/skills/github/scripts/src/env.ts +100 -0
  50. package/dist/skills/github/scripts/src/errors.ts +79 -0
  51. package/dist/skills/github/scripts/src/fields.ts +27 -0
  52. package/dist/skills/github/scripts/src/gist-shape.ts +58 -0
  53. package/dist/skills/github/scripts/src/gists-write.ts +130 -0
  54. package/dist/skills/github/scripts/src/gists.ts +118 -0
  55. package/dist/skills/github/scripts/src/git-auth.ts +46 -0
  56. package/dist/skills/github/scripts/src/http.ts +159 -0
  57. package/dist/skills/github/scripts/src/issue-develop.ts +118 -0
  58. package/dist/skills/github/scripts/src/issues-extra.ts +135 -0
  59. package/dist/skills/github/scripts/src/issues-write.ts +174 -0
  60. package/dist/skills/github/scripts/src/issues.ts +156 -0
  61. package/dist/skills/github/scripts/src/keys.ts +176 -0
  62. package/dist/skills/github/scripts/src/labels.ts +209 -0
  63. package/dist/skills/github/scripts/src/merge.ts +115 -0
  64. package/dist/skills/github/scripts/src/poly1305.ts +22 -0
  65. package/dist/skills/github/scripts/src/pr-checkout.ts +92 -0
  66. package/dist/skills/github/scripts/src/pr-view.ts +106 -0
  67. package/dist/skills/github/scripts/src/project-fields.ts +144 -0
  68. package/dist/skills/github/scripts/src/project-item-edit.ts +153 -0
  69. package/dist/skills/github/scripts/src/project-items.ts +191 -0
  70. package/dist/skills/github/scripts/src/project-links.ts +104 -0
  71. package/dist/skills/github/scripts/src/project-ref.ts +145 -0
  72. package/dist/skills/github/scripts/src/project-state.ts +99 -0
  73. package/dist/skills/github/scripts/src/projects.ts +158 -0
  74. package/dist/skills/github/scripts/src/pulls-extra.ts +165 -0
  75. package/dist/skills/github/scripts/src/pulls-read.ts +176 -0
  76. package/dist/skills/github/scripts/src/pulls-review.ts +206 -0
  77. package/dist/skills/github/scripts/src/pulls-write.ts +187 -0
  78. package/dist/skills/github/scripts/src/raw.ts +78 -0
  79. package/dist/skills/github/scripts/src/read.ts +77 -0
  80. package/dist/skills/github/scripts/src/release-assets.ts +111 -0
  81. package/dist/skills/github/scripts/src/release-download.ts +151 -0
  82. package/dist/skills/github/scripts/src/release-write.ts +197 -0
  83. package/dist/skills/github/scripts/src/repo-admin.ts +112 -0
  84. package/dist/skills/github/scripts/src/repo-content.ts +187 -0
  85. package/dist/skills/github/scripts/src/repo-create.ts +139 -0
  86. package/dist/skills/github/scripts/src/repo-extras.ts +217 -0
  87. package/dist/skills/github/scripts/src/repo-list.ts +143 -0
  88. package/dist/skills/github/scripts/src/repo-settings.ts +176 -0
  89. package/dist/skills/github/scripts/src/repo-sync.ts +81 -0
  90. package/dist/skills/github/scripts/src/repo-url.ts +104 -0
  91. package/dist/skills/github/scripts/src/repos.ts +87 -0
  92. package/dist/skills/github/scripts/src/ruleset-shape.ts +96 -0
  93. package/dist/skills/github/scripts/src/rulesets-write.ts +124 -0
  94. package/dist/skills/github/scripts/src/rulesets.ts +80 -0
  95. package/dist/skills/github/scripts/src/run-download.ts +88 -0
  96. package/dist/skills/github/scripts/src/salsa20.ts +97 -0
  97. package/dist/skills/github/scripts/src/scopes.ts +165 -0
  98. package/dist/skills/github/scripts/src/sealed-box.ts +75 -0
  99. package/dist/skills/github/scripts/src/search-commits.ts +114 -0
  100. package/dist/skills/github/scripts/src/search.ts +116 -0
  101. package/dist/skills/github/scripts/src/secrets.ts +131 -0
  102. package/dist/skills/github/scripts/src/snappy.ts +57 -0
  103. package/dist/skills/github/scripts/src/status-search.ts +55 -0
  104. package/dist/skills/github/scripts/src/transfer.ts +97 -0
  105. package/dist/skills/github/scripts/src/types.ts +75 -0
  106. package/dist/skills/github/scripts/src/variables.ts +86 -0
  107. package/dist/skills/github/scripts/src/wait.ts +164 -0
  108. package/dist/skills/github/scripts/src/wire.ts +159 -0
  109. package/dist/skills/github/scripts/src/workflows.ts +144 -0
  110. package/dist/skills/github/scripts/src/zip.ts +104 -0
  111. package/dist/skills/github/scripts/surface.ts +106 -0
  112. package/dist/skills/github/scripts/vendor/surface/SOURCE.json +15 -0
  113. package/dist/skills/github/scripts/vendor/surface/cli.ts +203 -0
  114. package/dist/skills/github/scripts/vendor/surface/flags.ts +195 -0
  115. package/dist/skills/github/scripts/vendor/surface/help.ts +89 -0
  116. package/dist/skills/github/scripts/vendor/surface/http.ts +180 -0
  117. package/dist/skills/github/scripts/vendor/surface/index.ts +44 -0
  118. package/dist/skills/github/scripts/vendor/surface/mcp.ts +241 -0
  119. package/dist/skills/github/scripts/vendor/surface/schema.ts +200 -0
  120. package/dist/skills/github/scripts/vendor/surface/stdio.ts +54 -0
  121. package/dist/skills/github/scripts/vendor/surface/surface.ts +250 -0
  122. package/dist/skills/github/scripts/vendor/surface/tools.ts +80 -0
  123. package/dist/skills/programming/SKILL.md +51 -320
  124. package/dist/skills/programming/references/go/README.md +1 -0
  125. package/dist/skills/programming/references/python/README.md +21 -3
  126. package/dist/skills/programming/references/python/error-handling.md +14 -0
  127. package/dist/skills/programming/references/rust/README.md +5 -1
  128. package/dist/skills/programming/references/typescript/README.md +9 -3
  129. package/dist/skills/programming/references/typescript/error-handling.md +18 -0
  130. package/dist/skills/ultimate-browsing/SKILL.md +1 -1
  131. package/dist/skills/ulw-execute/SKILL.md +1 -1
  132. package/dist/skills/visual-qa/references/browser-setup.md +5 -5
  133. package/dist/tui.js +32 -29
  134. package/package.json +28 -26
  135. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  136. package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +2 -2
  137. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  138. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  139. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  140. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  141. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  142. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  143. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  144. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  145. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +2 -2
  146. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  147. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  148. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  149. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  150. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  151. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  152. package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +8711 -172
  153. package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +8660 -121
  154. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  155. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  156. package/packages/omo-codex/plugin/components/telemetry/src/posthog.ts +5 -0
  157. package/packages/omo-codex/plugin/components/telemetry/tsconfig.json +2 -2
  158. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  159. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  160. package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +1 -1
  161. package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
  162. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +5 -5
  163. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  164. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/SKILL.md +1 -1
  165. package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +3 -3
  166. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  167. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  168. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  169. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  170. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  171. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  172. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  173. package/packages/omo-codex/plugin/hooks/post-tool-use-recording-spawn-admission.json +1 -1
  174. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  175. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  176. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  177. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  178. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  179. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  180. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  181. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-execute-continuation.json +1 -1
  182. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  183. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  184. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  185. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  186. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  187. package/packages/omo-codex/plugin/package-lock.json +12 -12
  188. package/packages/omo-codex/plugin/package.json +1 -1
  189. package/packages/omo-codex/plugin/shared/src/config-loader.ts +15 -1
  190. package/packages/omo-codex/plugin/skills/browser/SKILL.md +100 -91
  191. package/packages/omo-codex/plugin/skills/browser/references/commands.md +92 -27
  192. package/packages/omo-codex/plugin/skills/browser/references/desktop.md +22 -0
  193. package/packages/omo-codex/plugin/skills/browser/references/install.md +18 -0
  194. package/packages/omo-codex/plugin/skills/browser/references/owned-engine/README.md +7 -2
  195. package/packages/omo-codex/plugin/skills/browser/references/owned-engine/frames-and-humans.md +9 -2
  196. package/packages/omo-codex/plugin/skills/browser/references/owned-engine/network.md +13 -7
  197. package/packages/omo-codex/plugin/skills/browser/references/recipes/1password.md +6 -2
  198. package/packages/omo-codex/plugin/skills/browser/runtime/omowright/index.js +15 -15
  199. package/packages/omo-codex/plugin/skills/browser/runtime/omowright/manifest.json +4 -4
  200. package/packages/omo-codex/plugin/skills/debugging/SKILL.md +1 -1
  201. package/packages/omo-codex/plugin/skills/debugging/references/tools/browser-qa.md +1 -1
  202. package/packages/omo-codex/plugin/skills/git/SKILL.md +62 -0
  203. package/packages/omo-codex/plugin/skills/git/agents/openai.yaml +13 -0
  204. package/packages/omo-codex/plugin/skills/github/SKILL.md +94 -0
  205. package/packages/omo-codex/plugin/skills/github/agents/openai.yaml +2 -0
  206. package/packages/omo-codex/plugin/skills/github/references/branch-rules.md +129 -0
  207. package/packages/omo-codex/plugin/skills/github/references/evidence-attachments.md +16 -0
  208. package/packages/omo-codex/plugin/skills/github/references/repo-setup.md +152 -0
  209. package/packages/omo-codex/plugin/skills/github/references/waiting.md +52 -0
  210. package/packages/omo-codex/plugin/skills/github/references/workflows.md +161 -0
  211. package/packages/omo-codex/plugin/skills/github/scripts/cli.ts +8 -0
  212. package/packages/omo-codex/plugin/skills/github/scripts/package.json +12 -0
  213. package/packages/omo-codex/plugin/skills/github/scripts/sdk.ts +11 -0
  214. package/packages/omo-codex/plugin/skills/github/scripts/src/account.ts +243 -0
  215. package/packages/omo-codex/plugin/skills/github/scripts/src/actions-write.ts +86 -0
  216. package/packages/omo-codex/plugin/skills/github/scripts/src/actions.ts +210 -0
  217. package/packages/omo-codex/plugin/skills/github/scripts/src/attestations.ts +136 -0
  218. package/packages/omo-codex/plugin/skills/github/scripts/src/blake2b.ts +102 -0
  219. package/packages/omo-codex/plugin/skills/github/scripts/src/branch-protection.ts +192 -0
  220. package/packages/omo-codex/plugin/skills/github/scripts/src/caches.ts +105 -0
  221. package/packages/omo-codex/plugin/skills/github/scripts/src/checks.ts +107 -0
  222. package/packages/omo-codex/plugin/skills/github/scripts/src/codespaces.ts +230 -0
  223. package/packages/omo-codex/plugin/skills/github/scripts/src/conversation-lock.ts +50 -0
  224. package/packages/omo-codex/plugin/skills/github/scripts/src/discussion-list.ts +126 -0
  225. package/packages/omo-codex/plugin/skills/github/scripts/src/discussion-lookup.ts +127 -0
  226. package/packages/omo-codex/plugin/skills/github/scripts/src/discussions.ts +234 -0
  227. package/packages/omo-codex/plugin/skills/github/scripts/src/env.ts +100 -0
  228. package/packages/omo-codex/plugin/skills/github/scripts/src/errors.ts +79 -0
  229. package/packages/omo-codex/plugin/skills/github/scripts/src/fields.ts +27 -0
  230. package/packages/omo-codex/plugin/skills/github/scripts/src/gist-shape.ts +58 -0
  231. package/packages/omo-codex/plugin/skills/github/scripts/src/gists-write.ts +130 -0
  232. package/packages/omo-codex/plugin/skills/github/scripts/src/gists.ts +118 -0
  233. package/packages/omo-codex/plugin/skills/github/scripts/src/git-auth.ts +46 -0
  234. package/packages/omo-codex/plugin/skills/github/scripts/src/http.ts +159 -0
  235. package/packages/omo-codex/plugin/skills/github/scripts/src/issue-develop.ts +118 -0
  236. package/packages/omo-codex/plugin/skills/github/scripts/src/issues-extra.ts +135 -0
  237. package/packages/omo-codex/plugin/skills/github/scripts/src/issues-write.ts +174 -0
  238. package/packages/omo-codex/plugin/skills/github/scripts/src/issues.ts +156 -0
  239. package/packages/omo-codex/plugin/skills/github/scripts/src/keys.ts +176 -0
  240. package/packages/omo-codex/plugin/skills/github/scripts/src/labels.ts +209 -0
  241. package/packages/omo-codex/plugin/skills/github/scripts/src/merge.ts +115 -0
  242. package/packages/omo-codex/plugin/skills/github/scripts/src/poly1305.ts +22 -0
  243. package/packages/omo-codex/plugin/skills/github/scripts/src/pr-checkout.ts +92 -0
  244. package/packages/omo-codex/plugin/skills/github/scripts/src/pr-view.ts +106 -0
  245. package/packages/omo-codex/plugin/skills/github/scripts/src/project-fields.ts +144 -0
  246. package/packages/omo-codex/plugin/skills/github/scripts/src/project-item-edit.ts +153 -0
  247. package/packages/omo-codex/plugin/skills/github/scripts/src/project-items.ts +191 -0
  248. package/packages/omo-codex/plugin/skills/github/scripts/src/project-links.ts +104 -0
  249. package/packages/omo-codex/plugin/skills/github/scripts/src/project-ref.ts +145 -0
  250. package/packages/omo-codex/plugin/skills/github/scripts/src/project-state.ts +99 -0
  251. package/packages/omo-codex/plugin/skills/github/scripts/src/projects.ts +158 -0
  252. package/packages/omo-codex/plugin/skills/github/scripts/src/pulls-extra.ts +165 -0
  253. package/packages/omo-codex/plugin/skills/github/scripts/src/pulls-read.ts +176 -0
  254. package/packages/omo-codex/plugin/skills/github/scripts/src/pulls-review.ts +206 -0
  255. package/packages/omo-codex/plugin/skills/github/scripts/src/pulls-write.ts +187 -0
  256. package/packages/omo-codex/plugin/skills/github/scripts/src/raw.ts +78 -0
  257. package/packages/omo-codex/plugin/skills/github/scripts/src/read.ts +77 -0
  258. package/packages/omo-codex/plugin/skills/github/scripts/src/release-assets.ts +111 -0
  259. package/packages/omo-codex/plugin/skills/github/scripts/src/release-download.ts +151 -0
  260. package/packages/omo-codex/plugin/skills/github/scripts/src/release-write.ts +197 -0
  261. package/packages/omo-codex/plugin/skills/github/scripts/src/repo-admin.ts +112 -0
  262. package/packages/omo-codex/plugin/skills/github/scripts/src/repo-content.ts +187 -0
  263. package/packages/omo-codex/plugin/skills/github/scripts/src/repo-create.ts +139 -0
  264. package/packages/omo-codex/plugin/skills/github/scripts/src/repo-extras.ts +217 -0
  265. package/packages/omo-codex/plugin/skills/github/scripts/src/repo-list.ts +143 -0
  266. package/packages/omo-codex/plugin/skills/github/scripts/src/repo-settings.ts +176 -0
  267. package/packages/omo-codex/plugin/skills/github/scripts/src/repo-sync.ts +81 -0
  268. package/packages/omo-codex/plugin/skills/github/scripts/src/repo-url.ts +104 -0
  269. package/packages/omo-codex/plugin/skills/github/scripts/src/repos.ts +87 -0
  270. package/packages/omo-codex/plugin/skills/github/scripts/src/ruleset-shape.ts +96 -0
  271. package/packages/omo-codex/plugin/skills/github/scripts/src/rulesets-write.ts +124 -0
  272. package/packages/omo-codex/plugin/skills/github/scripts/src/rulesets.ts +80 -0
  273. package/packages/omo-codex/plugin/skills/github/scripts/src/run-download.ts +88 -0
  274. package/packages/omo-codex/plugin/skills/github/scripts/src/salsa20.ts +97 -0
  275. package/packages/omo-codex/plugin/skills/github/scripts/src/scopes.ts +165 -0
  276. package/packages/omo-codex/plugin/skills/github/scripts/src/sealed-box.ts +75 -0
  277. package/packages/omo-codex/plugin/skills/github/scripts/src/search-commits.ts +114 -0
  278. package/packages/omo-codex/plugin/skills/github/scripts/src/search.ts +116 -0
  279. package/packages/omo-codex/plugin/skills/github/scripts/src/secrets.ts +131 -0
  280. package/packages/omo-codex/plugin/skills/github/scripts/src/snappy.ts +57 -0
  281. package/packages/omo-codex/plugin/skills/github/scripts/src/status-search.ts +55 -0
  282. package/packages/omo-codex/plugin/skills/github/scripts/src/transfer.ts +97 -0
  283. package/packages/omo-codex/plugin/skills/github/scripts/src/types.ts +75 -0
  284. package/packages/omo-codex/plugin/skills/github/scripts/src/variables.ts +86 -0
  285. package/packages/omo-codex/plugin/skills/github/scripts/src/wait.ts +164 -0
  286. package/packages/omo-codex/plugin/skills/github/scripts/src/wire.ts +159 -0
  287. package/packages/omo-codex/plugin/skills/github/scripts/src/workflows.ts +144 -0
  288. package/packages/omo-codex/plugin/skills/github/scripts/src/zip.ts +104 -0
  289. package/packages/omo-codex/plugin/skills/github/scripts/surface.ts +106 -0
  290. package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/SOURCE.json +15 -0
  291. package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/cli.ts +203 -0
  292. package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/flags.ts +195 -0
  293. package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/help.ts +89 -0
  294. package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/http.ts +180 -0
  295. package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/index.ts +44 -0
  296. package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/mcp.ts +241 -0
  297. package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/schema.ts +200 -0
  298. package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/stdio.ts +54 -0
  299. package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/surface.ts +250 -0
  300. package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/tools.ts +80 -0
  301. package/packages/omo-codex/plugin/skills/programming/SKILL.md +51 -320
  302. package/packages/omo-codex/plugin/skills/programming/references/go/README.md +1 -0
  303. package/packages/omo-codex/plugin/skills/programming/references/python/README.md +21 -3
  304. package/packages/omo-codex/plugin/skills/programming/references/python/error-handling.md +14 -0
  305. package/packages/omo-codex/plugin/skills/programming/references/rust/README.md +5 -1
  306. package/packages/omo-codex/plugin/skills/programming/references/typescript/README.md +9 -3
  307. package/packages/omo-codex/plugin/skills/programming/references/typescript/error-handling.md +18 -0
  308. package/packages/omo-codex/plugin/skills/ultimate-browsing/SKILL.md +1 -1
  309. package/packages/omo-codex/plugin/skills/ulw-execute/SKILL.md +1 -1
  310. package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +1 -1
  311. package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +3 -3
  312. package/packages/omo-codex/plugin/skills/visual-qa/references/browser-setup.md +5 -5
  313. package/packages/omo-codex/plugin/test/sync-skills-codex-compatibility.test.mjs +1 -1
  314. package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +2 -1
  315. package/packages/omo-codex/plugin/test/sync-skills.test.mjs +5 -5
  316. package/packages/omo-codex/scripts/install-dist/install-local.mjs +21279 -20738
  317. package/packages/shared-skills/skills/browser/SKILL.md +100 -91
  318. package/packages/shared-skills/skills/browser/references/commands.md +92 -27
  319. package/packages/shared-skills/skills/browser/references/desktop.md +22 -0
  320. package/packages/shared-skills/skills/browser/references/install.md +18 -0
  321. package/packages/shared-skills/skills/browser/references/owned-engine/README.md +7 -2
  322. package/packages/shared-skills/skills/browser/references/owned-engine/frames-and-humans.md +9 -2
  323. package/packages/shared-skills/skills/browser/references/owned-engine/network.md +13 -7
  324. package/packages/shared-skills/skills/browser/references/recipes/1password.md +6 -2
  325. package/packages/shared-skills/skills/browser/runtime/omowright/index.js +15 -15
  326. package/packages/shared-skills/skills/browser/runtime/omowright/manifest.json +4 -4
  327. package/packages/shared-skills/skills/debugging/SKILL.md +1 -1
  328. package/packages/shared-skills/skills/debugging/references/tools/browser-qa.md +1 -1
  329. package/packages/shared-skills/skills/git/SKILL.md +62 -0
  330. package/packages/shared-skills/skills/git/agents/openai.yaml +13 -0
  331. package/packages/shared-skills/skills/github/SKILL.md +94 -0
  332. package/packages/shared-skills/skills/github/references/branch-rules.md +129 -0
  333. package/packages/shared-skills/skills/github/references/evidence-attachments.md +16 -0
  334. package/packages/shared-skills/skills/github/references/repo-setup.md +152 -0
  335. package/packages/shared-skills/skills/github/references/waiting.md +52 -0
  336. package/packages/shared-skills/skills/github/references/workflows.md +161 -0
  337. package/packages/shared-skills/skills/github/scripts/cli.ts +8 -0
  338. package/packages/shared-skills/skills/github/scripts/package.json +12 -0
  339. package/packages/shared-skills/skills/github/scripts/sdk.ts +11 -0
  340. package/packages/shared-skills/skills/github/scripts/src/account.ts +243 -0
  341. package/packages/shared-skills/skills/github/scripts/src/actions-write.ts +86 -0
  342. package/packages/shared-skills/skills/github/scripts/src/actions.ts +210 -0
  343. package/packages/shared-skills/skills/github/scripts/src/attestations.ts +136 -0
  344. package/packages/shared-skills/skills/github/scripts/src/blake2b.ts +102 -0
  345. package/packages/shared-skills/skills/github/scripts/src/branch-protection.ts +192 -0
  346. package/packages/shared-skills/skills/github/scripts/src/caches.ts +105 -0
  347. package/packages/shared-skills/skills/github/scripts/src/checks.ts +107 -0
  348. package/packages/shared-skills/skills/github/scripts/src/codespaces.ts +230 -0
  349. package/packages/shared-skills/skills/github/scripts/src/conversation-lock.ts +50 -0
  350. package/packages/shared-skills/skills/github/scripts/src/discussion-list.ts +126 -0
  351. package/packages/shared-skills/skills/github/scripts/src/discussion-lookup.ts +127 -0
  352. package/packages/shared-skills/skills/github/scripts/src/discussions.ts +234 -0
  353. package/packages/shared-skills/skills/github/scripts/src/env.ts +100 -0
  354. package/packages/shared-skills/skills/github/scripts/src/errors.ts +79 -0
  355. package/packages/shared-skills/skills/github/scripts/src/fields.ts +27 -0
  356. package/packages/shared-skills/skills/github/scripts/src/gist-shape.ts +58 -0
  357. package/packages/shared-skills/skills/github/scripts/src/gists-write.ts +130 -0
  358. package/packages/shared-skills/skills/github/scripts/src/gists.ts +118 -0
  359. package/packages/shared-skills/skills/github/scripts/src/git-auth.ts +46 -0
  360. package/packages/shared-skills/skills/github/scripts/src/http.ts +159 -0
  361. package/packages/shared-skills/skills/github/scripts/src/issue-develop.ts +118 -0
  362. package/packages/shared-skills/skills/github/scripts/src/issues-extra.ts +135 -0
  363. package/packages/shared-skills/skills/github/scripts/src/issues-write.ts +174 -0
  364. package/packages/shared-skills/skills/github/scripts/src/issues.ts +156 -0
  365. package/packages/shared-skills/skills/github/scripts/src/keys.ts +176 -0
  366. package/packages/shared-skills/skills/github/scripts/src/labels.ts +209 -0
  367. package/packages/shared-skills/skills/github/scripts/src/merge.ts +115 -0
  368. package/packages/shared-skills/skills/github/scripts/src/poly1305.ts +22 -0
  369. package/packages/shared-skills/skills/github/scripts/src/pr-checkout.ts +92 -0
  370. package/packages/shared-skills/skills/github/scripts/src/pr-view.ts +106 -0
  371. package/packages/shared-skills/skills/github/scripts/src/project-fields.ts +144 -0
  372. package/packages/shared-skills/skills/github/scripts/src/project-item-edit.ts +153 -0
  373. package/packages/shared-skills/skills/github/scripts/src/project-items.ts +191 -0
  374. package/packages/shared-skills/skills/github/scripts/src/project-links.ts +104 -0
  375. package/packages/shared-skills/skills/github/scripts/src/project-ref.ts +145 -0
  376. package/packages/shared-skills/skills/github/scripts/src/project-state.ts +99 -0
  377. package/packages/shared-skills/skills/github/scripts/src/projects.ts +158 -0
  378. package/packages/shared-skills/skills/github/scripts/src/pulls-extra.ts +165 -0
  379. package/packages/shared-skills/skills/github/scripts/src/pulls-read.ts +176 -0
  380. package/packages/shared-skills/skills/github/scripts/src/pulls-review.ts +206 -0
  381. package/packages/shared-skills/skills/github/scripts/src/pulls-write.ts +187 -0
  382. package/packages/shared-skills/skills/github/scripts/src/raw.ts +78 -0
  383. package/packages/shared-skills/skills/github/scripts/src/read.ts +77 -0
  384. package/packages/shared-skills/skills/github/scripts/src/release-assets.ts +111 -0
  385. package/packages/shared-skills/skills/github/scripts/src/release-download.ts +151 -0
  386. package/packages/shared-skills/skills/github/scripts/src/release-write.ts +197 -0
  387. package/packages/shared-skills/skills/github/scripts/src/repo-admin.ts +112 -0
  388. package/packages/shared-skills/skills/github/scripts/src/repo-content.ts +187 -0
  389. package/packages/shared-skills/skills/github/scripts/src/repo-create.ts +139 -0
  390. package/packages/shared-skills/skills/github/scripts/src/repo-extras.ts +217 -0
  391. package/packages/shared-skills/skills/github/scripts/src/repo-list.ts +143 -0
  392. package/packages/shared-skills/skills/github/scripts/src/repo-settings.ts +176 -0
  393. package/packages/shared-skills/skills/github/scripts/src/repo-sync.ts +81 -0
  394. package/packages/shared-skills/skills/github/scripts/src/repo-url.ts +104 -0
  395. package/packages/shared-skills/skills/github/scripts/src/repos.ts +87 -0
  396. package/packages/shared-skills/skills/github/scripts/src/ruleset-shape.ts +96 -0
  397. package/packages/shared-skills/skills/github/scripts/src/rulesets-write.ts +124 -0
  398. package/packages/shared-skills/skills/github/scripts/src/rulesets.ts +80 -0
  399. package/packages/shared-skills/skills/github/scripts/src/run-download.ts +88 -0
  400. package/packages/shared-skills/skills/github/scripts/src/salsa20.ts +97 -0
  401. package/packages/shared-skills/skills/github/scripts/src/scopes.ts +165 -0
  402. package/packages/shared-skills/skills/github/scripts/src/sealed-box.ts +75 -0
  403. package/packages/shared-skills/skills/github/scripts/src/search-commits.ts +114 -0
  404. package/packages/shared-skills/skills/github/scripts/src/search.ts +116 -0
  405. package/packages/shared-skills/skills/github/scripts/src/secrets.ts +131 -0
  406. package/packages/shared-skills/skills/github/scripts/src/snappy.ts +57 -0
  407. package/packages/shared-skills/skills/github/scripts/src/status-search.ts +55 -0
  408. package/packages/shared-skills/skills/github/scripts/src/transfer.ts +97 -0
  409. package/packages/shared-skills/skills/github/scripts/src/types.ts +75 -0
  410. package/packages/shared-skills/skills/github/scripts/src/variables.ts +86 -0
  411. package/packages/shared-skills/skills/github/scripts/src/wait.ts +164 -0
  412. package/packages/shared-skills/skills/github/scripts/src/wire.ts +159 -0
  413. package/packages/shared-skills/skills/github/scripts/src/workflows.ts +144 -0
  414. package/packages/shared-skills/skills/github/scripts/src/zip.ts +104 -0
  415. package/packages/shared-skills/skills/github/scripts/surface.ts +106 -0
  416. package/packages/shared-skills/skills/github/scripts/vendor/surface/SOURCE.json +15 -0
  417. package/packages/shared-skills/skills/github/scripts/vendor/surface/cli.ts +203 -0
  418. package/packages/shared-skills/skills/github/scripts/vendor/surface/flags.ts +195 -0
  419. package/packages/shared-skills/skills/github/scripts/vendor/surface/help.ts +89 -0
  420. package/packages/shared-skills/skills/github/scripts/vendor/surface/http.ts +180 -0
  421. package/packages/shared-skills/skills/github/scripts/vendor/surface/index.ts +44 -0
  422. package/packages/shared-skills/skills/github/scripts/vendor/surface/mcp.ts +241 -0
  423. package/packages/shared-skills/skills/github/scripts/vendor/surface/schema.ts +200 -0
  424. package/packages/shared-skills/skills/github/scripts/vendor/surface/stdio.ts +54 -0
  425. package/packages/shared-skills/skills/github/scripts/vendor/surface/surface.ts +250 -0
  426. package/packages/shared-skills/skills/github/scripts/vendor/surface/tools.ts +80 -0
  427. package/packages/shared-skills/skills/programming/SKILL.md +51 -320
  428. package/packages/shared-skills/skills/programming/references/go/README.md +1 -0
  429. package/packages/shared-skills/skills/programming/references/python/README.md +21 -3
  430. package/packages/shared-skills/skills/programming/references/python/error-handling.md +14 -0
  431. package/packages/shared-skills/skills/programming/references/rust/README.md +5 -1
  432. package/packages/shared-skills/skills/programming/references/typescript/README.md +9 -3
  433. package/packages/shared-skills/skills/programming/references/typescript/error-handling.md +18 -0
  434. package/packages/shared-skills/skills/ultimate-browsing/SKILL.md +1 -1
  435. package/packages/shared-skills/skills/ulw-execute/SKILL.md +1 -1
  436. package/packages/shared-skills/skills/visual-qa/references/browser-setup.md +5 -5
  437. package/dist/skills/git-master/SKILL.md +0 -114
  438. package/dist/skills/git-master/agents/openai.yaml +0 -13
  439. package/packages/omo-codex/plugin/skills/git-master/SKILL.md +0 -114
  440. package/packages/omo-codex/plugin/skills/git-master/agents/openai.yaml +0 -13
  441. package/packages/shared-skills/skills/git-master/SKILL.md +0 -114
  442. 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.83",
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.2",
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.83",
2410
- "oh-my-opencode-darwin-x64": "5.1.83",
2411
- "oh-my-opencode-darwin-x64-baseline": "5.1.83",
2412
- "oh-my-opencode-linux-arm64": "5.1.83",
2413
- "oh-my-opencode-linux-arm64-musl": "5.1.83",
2414
- "oh-my-opencode-linux-x64": "5.1.83",
2415
- "oh-my-opencode-linux-x64-baseline": "5.1.83",
2416
- "oh-my-opencode-linux-x64-musl": "5.1.83",
2417
- "oh-my-opencode-linux-x64-musl-baseline": "5.1.83",
2418
- "oh-my-opencode-windows-arm64": "5.1.83",
2419
- "oh-my-opencode-windows-x64": "5.1.83",
2420
- "oh-my-opencode-windows-x64-baseline": "5.1.83"
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",
@@ -2433,6 +2435,91 @@ var init_package = __esm(() => {
2433
2435
  };
2434
2436
  });
2435
2437
 
2438
+ // packages/telemetry-core/src/constants.ts
2439
+ var DEFAULT_POSTHOG_HOST = "https://us.i.posthog.com", DEFAULT_POSTHOG_API_KEY = "phc_CFJhj5HyvA62QPhvyaUCtaq23aUfznnijg5VaaGkNk74", UNCONFIGURED_POSTHOG_API_KEY = "phc_REPLACE_ME_OMO_NATIVE";
2440
+
2441
+ // packages/telemetry-core/src/env.ts
2442
+ function normalizeEnvValue(value) {
2443
+ return value?.trim().toLowerCase();
2444
+ }
2445
+ function includesValue(values, value) {
2446
+ const normalized = normalizeEnvValue(value);
2447
+ return normalized !== undefined && values.includes(normalized);
2448
+ }
2449
+ function isDisableFlag(value) {
2450
+ return includesValue(TRUTHY_DISABLE_VALUES, value);
2451
+ }
2452
+ function isSendOptOutFlag(value) {
2453
+ return includesValue(SEND_OPT_OUT_VALUES, value);
2454
+ }
2455
+ function shouldDisableTelemetry(input) {
2456
+ const env = input.env ?? process.env;
2457
+ const globalPrefix = input.globalEnvPrefix ?? "OMO";
2458
+ const prefixes = Array.from(new Set([globalPrefix, input.productEnvPrefix]));
2459
+ if (isDisableFlag(env["DO_NOT_TRACK"]) || isDisableFlag(env[`${globalPrefix}_DISABLE_TELEMETRY`])) {
2460
+ return true;
2461
+ }
2462
+ if (env["OTEL_SDK_DISABLED"]?.trim().toLowerCase() === "true") {
2463
+ return true;
2464
+ }
2465
+ for (const prefix of prefixes) {
2466
+ if (isDisableFlag(env[`${prefix}_DISABLE_POSTHOG`])) {
2467
+ return true;
2468
+ }
2469
+ if (isSendOptOutFlag(env[`${prefix}_SEND_ANONYMOUS_TELEMETRY`])) {
2470
+ return true;
2471
+ }
2472
+ }
2473
+ return false;
2474
+ }
2475
+ function getTelemetryApiKey(env = process.env, defaultApiKey = DEFAULT_POSTHOG_API_KEY) {
2476
+ return env["POSTHOG_API_KEY"]?.trim() ?? defaultApiKey;
2477
+ }
2478
+ function isConfiguredTelemetryApiKey(apiKey) {
2479
+ const normalized = apiKey.trim();
2480
+ return normalized.length > 0 && normalized !== UNCONFIGURED_POSTHOG_API_KEY;
2481
+ }
2482
+ function hasTelemetryApiKey(env, defaultApiKey) {
2483
+ return isConfiguredTelemetryApiKey(getTelemetryApiKey(env, defaultApiKey));
2484
+ }
2485
+ function getTelemetryHost(env = process.env, defaultHost = DEFAULT_POSTHOG_HOST) {
2486
+ return env["POSTHOG_HOST"]?.trim() || defaultHost;
2487
+ }
2488
+ var TRUTHY_DISABLE_VALUES, SEND_OPT_OUT_VALUES;
2489
+ var init_env = __esm(() => {
2490
+ TRUTHY_DISABLE_VALUES = ["1", "true", "yes"];
2491
+ SEND_OPT_OUT_VALUES = ["0", "false", "no"];
2492
+ });
2493
+
2494
+ // packages/telemetry-core/src/otlp-config.ts
2495
+ var DEFAULT_OTLP_ENDPOINT = "https://t.omo.dev", RESOURCE_OR_RELAY_KEYS;
2496
+ var init_otlp_config = __esm(() => {
2497
+ RESOURCE_OR_RELAY_KEYS = new Set([
2498
+ "$os",
2499
+ "$os_version",
2500
+ "$process_person_profile",
2501
+ "$session_id",
2502
+ "ci",
2503
+ "event_id",
2504
+ "install_hash",
2505
+ "package_version",
2506
+ "platform",
2507
+ "product_name",
2508
+ "schema_version",
2509
+ "surface"
2510
+ ]);
2511
+ });
2512
+
2513
+ // packages/telemetry-core/src/destinations.ts
2514
+ var TELEMETRY_DESTINATIONS;
2515
+ var init_destinations = __esm(() => {
2516
+ init_otlp_config();
2517
+ TELEMETRY_DESTINATIONS = [
2518
+ { kind: "posthog", label: "PostHog in the United States", host: DEFAULT_POSTHOG_HOST },
2519
+ { kind: "otlp", label: "the OmO telemetry collector", host: DEFAULT_OTLP_ENDPOINT }
2520
+ ];
2521
+ });
2522
+
2436
2523
  // node_modules/.bun/picocolors@1.1.1/node_modules/picocolors/picocolors.js
2437
2524
  var require_picocolors = __commonJS(function(exports, module) {
2438
2525
  var p = process || {};
@@ -77745,6 +77832,9 @@ var init_team = __esm(() => {
77745
77832
  });
77746
77833
 
77747
77834
  // packages/omo-config-core/src/schema/telemetry.ts
77835
+ function isOmoTelemetryEnabled(config) {
77836
+ return config.telemetry?.enabled ?? true;
77837
+ }
77748
77838
  var OmoTelemetrySettingsShape, OmoTelemetrySettingsLayerSchema, OmoTelemetrySettingsSchema;
77749
77839
  var init_telemetry = __esm(() => {
77750
77840
  init_zod();
@@ -77968,7 +78058,7 @@ var init_config = __esm(() => {
77968
78058
 
77969
78059
  // packages/omo-config-core/src/schema/legacy-category-names.ts
77970
78060
  function canonicalCategoryName(name) {
77971
- return Object.hasOwn(LEGACY_CATEGORY_NAME_ALIASES, name) ? LEGACY_CATEGORY_NAME_ALIASES[name] : name;
78061
+ return Object.hasOwn(LEGACY_CATEGORY_NAME_ALIASES, name) ? LEGACY_CATEGORY_NAME_ALIASES[name] ?? name : name;
77972
78062
  }
77973
78063
  function isRecord9(value) {
77974
78064
  return typeof value === "object" && value !== null && !Array.isArray(value);
@@ -78030,7 +78120,7 @@ var init_legacy_category_names = __esm(() => {
78030
78120
 
78031
78121
  // packages/omo-config-core/src/schema/legacy-harness-names.ts
78032
78122
  function canonicalHarnessName(name) {
78033
- return Object.hasOwn(OMO_CONFIG_LEGACY_HARNESS_ALIASES, name) ? OMO_CONFIG_LEGACY_HARNESS_ALIASES[name] : name;
78123
+ return Object.hasOwn(OMO_CONFIG_LEGACY_HARNESS_ALIASES, name) ? OMO_CONFIG_LEGACY_HARNESS_ALIASES[name] ?? name : name;
78034
78124
  }
78035
78125
  function harnessBlockKey(harness) {
78036
78126
  return `[${harness}]`;
@@ -79719,15 +79809,15 @@ function stripRetiredCodegraph(document) {
79719
79809
  if (!isPlainObject5(value))
79720
79810
  return;
79721
79811
  if (Object.prototype.hasOwnProperty.call(value, "codegraph")) {
79722
- delete value.codegraph;
79812
+ delete value["codegraph"];
79723
79813
  removedPaths.push([...path, "codegraph"]);
79724
79814
  }
79725
79815
  };
79726
79816
  strip(stripped, []);
79727
79817
  for (const harness of OMO_HARNESS_BLOCKS)
79728
79818
  strip(stripped[harness], [harness]);
79729
- if (isPlainObject5(stripped.profiles)) {
79730
- for (const [profileName, profile] of Object.entries(stripped.profiles)) {
79819
+ if (isPlainObject5(stripped["profiles"])) {
79820
+ for (const [profileName, profile] of Object.entries(stripped["profiles"])) {
79731
79821
  strip(profile, ["profiles", profileName]);
79732
79822
  if (!isPlainObject5(profile))
79733
79823
  continue;
@@ -82975,9 +83065,6 @@ var init_activity_state = __esm(() => {
82975
83065
  // packages/telemetry-core/src/consent-gated-fetch.ts
82976
83066
  var init_consent_gated_fetch = () => {};
82977
83067
 
82978
- // packages/telemetry-core/src/constants.ts
82979
- var DEFAULT_POSTHOG_HOST = "https://us.i.posthog.com", DEFAULT_POSTHOG_API_KEY = "phc_CFJhj5HyvA62QPhvyaUCtaq23aUfznnijg5VaaGkNk74", UNCONFIGURED_POSTHOG_API_KEY = "phc_REPLACE_ME_OMO_NATIVE";
82980
-
82981
83068
  // packages/telemetry-core/src/diagnostics.ts
82982
83069
  import { appendFileSync as appendFileSync2, existsSync as existsSync26, mkdirSync as mkdirSync11, readFileSync as readFileSync13 } from "fs";
82983
83070
  import { join as join57 } from "path";
@@ -83099,56 +83186,6 @@ var init_diagnostics = __esm(() => {
83099
83186
  DIAGNOSTICS_MAX_BYTES = 256 * 1024;
83100
83187
  });
83101
83188
 
83102
- // packages/telemetry-core/src/env.ts
83103
- function normalizeEnvValue(value) {
83104
- return value?.trim().toLowerCase();
83105
- }
83106
- function includesValue(values, value) {
83107
- const normalized = normalizeEnvValue(value);
83108
- return normalized !== undefined && values.includes(normalized);
83109
- }
83110
- function isDisableFlag(value) {
83111
- return includesValue(TRUTHY_DISABLE_VALUES, value);
83112
- }
83113
- function isSendOptOutFlag(value) {
83114
- return includesValue(SEND_OPT_OUT_VALUES, value);
83115
- }
83116
- function shouldDisableTelemetry(input) {
83117
- const env = input.env ?? process.env;
83118
- const globalPrefix = input.globalEnvPrefix ?? "OMO";
83119
- const prefixes = Array.from(new Set([globalPrefix, input.productEnvPrefix]));
83120
- if (isDisableFlag(env["DO_NOT_TRACK"]) || isDisableFlag(env[`${globalPrefix}_DISABLE_TELEMETRY`])) {
83121
- return true;
83122
- }
83123
- for (const prefix of prefixes) {
83124
- if (isDisableFlag(env[`${prefix}_DISABLE_POSTHOG`])) {
83125
- return true;
83126
- }
83127
- if (isSendOptOutFlag(env[`${prefix}_SEND_ANONYMOUS_TELEMETRY`])) {
83128
- return true;
83129
- }
83130
- }
83131
- return false;
83132
- }
83133
- function getTelemetryApiKey(env = process.env, defaultApiKey = DEFAULT_POSTHOG_API_KEY) {
83134
- return env["POSTHOG_API_KEY"]?.trim() ?? defaultApiKey;
83135
- }
83136
- function isConfiguredTelemetryApiKey(apiKey) {
83137
- const normalized = apiKey.trim();
83138
- return normalized.length > 0 && normalized !== UNCONFIGURED_POSTHOG_API_KEY;
83139
- }
83140
- function hasTelemetryApiKey(env, defaultApiKey) {
83141
- return isConfiguredTelemetryApiKey(getTelemetryApiKey(env, defaultApiKey));
83142
- }
83143
- function getTelemetryHost(env = process.env, defaultHost = DEFAULT_POSTHOG_HOST) {
83144
- return env["POSTHOG_HOST"]?.trim() || defaultHost;
83145
- }
83146
- var TRUTHY_DISABLE_VALUES, SEND_OPT_OUT_VALUES;
83147
- var init_env = __esm(() => {
83148
- TRUTHY_DISABLE_VALUES = ["1", "true", "yes"];
83149
- SEND_OPT_OUT_VALUES = ["0", "false", "no", "yes"];
83150
- });
83151
-
83152
83189
  // packages/telemetry-core/src/event-id.ts
83153
83190
  import { randomBytes as nodeRandomBytes } from "crypto";
83154
83191
  function createUuidV7Generator(source = {}) {
@@ -92934,6 +92971,7 @@ var init_turn_trace_bridge = __esm(() => {
92934
92971
  var init_src5 = __esm(() => {
92935
92972
  init_activity_state();
92936
92973
  init_consent_gated_fetch();
92974
+ init_destinations();
92937
92975
  init_diagnostics();
92938
92976
  init_env();
92939
92977
  init_event_id();
@@ -92950,7 +92988,7 @@ var package_default2;
92950
92988
  var init_package2 = __esm(() => {
92951
92989
  package_default2 = {
92952
92990
  name: "@oh-my-opencode/omo-codex",
92953
- version: "5.1.83",
92991
+ version: "5.1.86",
92954
92992
  type: "module",
92955
92993
  private: true,
92956
92994
  description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
@@ -92981,6 +93019,7 @@ var init_package2 = __esm(() => {
92981
93019
  "sync:skills": "node plugin/scripts/sync-skills.mjs"
92982
93020
  },
92983
93021
  dependencies: {
93022
+ "@oh-my-opencode/omo-config-core": "workspace:*",
92984
93023
  "@oh-my-opencode/shared-skills": "workspace:*",
92985
93024
  "@oh-my-opencode/utils": "workspace:*"
92986
93025
  },
@@ -93036,6 +93075,18 @@ var init_data_path2 = __esm(() => {
93036
93075
  init_product_identity();
93037
93076
  });
93038
93077
 
93078
+ // packages/omo-codex/src/telemetry/config-gate.ts
93079
+ function isOmoConfigTelemetryEnabled(env = process.env) {
93080
+ try {
93081
+ return isOmoTelemetryEnabled(loadOmoConfig({ env, harness: "codex" }).config);
93082
+ } catch {
93083
+ return true;
93084
+ }
93085
+ }
93086
+ var init_config_gate = __esm(() => {
93087
+ init_src4();
93088
+ });
93089
+
93039
93090
  // packages/omo-codex/src/telemetry/diagnostics.ts
93040
93091
  function writeTelemetryDiagnostic2(input, now = new Date) {
93041
93092
  writeTelemetryDiagnostic(input, {
@@ -93079,6 +93130,9 @@ function resolveActivityStateProvider(options) {
93079
93130
  return () => getPostHogActivityCaptureState(options.now ?? new Date);
93080
93131
  }
93081
93132
  function createPostHogClient(source, options = {}) {
93133
+ if (!isOmoConfigTelemetryEnabled(options.env ?? process.env)) {
93134
+ return NO_OP_POSTHOG;
93135
+ }
93082
93136
  const client = createTelemetryClient2({
93083
93137
  diagnostics: writeTelemetryDiagnostic2,
93084
93138
  env: options.env ?? process.env,
@@ -93119,6 +93173,7 @@ var osProviderOverride2 = null, activityStateProviderOverride = null, transportF
93119
93173
  var init_posthog = __esm(() => {
93120
93174
  init_src5();
93121
93175
  init_data_path2();
93176
+ init_config_gate();
93122
93177
  init_diagnostics2();
93123
93178
  init_posthog_activity_state();
93124
93179
  init_product_identity();
@@ -94182,6 +94237,29 @@ var init_auto_update_checker = __esm(() => {
94182
94237
  init_cache();
94183
94238
  });
94184
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
+
94185
94263
  // packages/device-service-core/src/local-api/errors.ts
94186
94264
  var LocalApiError, protocolViolation = (detail) => {
94187
94265
  throw new LocalApiError("protocol_violation", detail);
@@ -97739,6 +97817,7 @@ var init_unsettled_command = __esm(() => {
97739
97817
  import { randomBytes as randomBytes9 } from "crypto";
97740
97818
  function openAttach(client, device, sessionId, timers = realTimers) {
97741
97819
  const early = [];
97820
+ const ATTACH_HISTORY_MAX = 512;
97742
97821
  const history = [];
97743
97822
  const listeners = new Set;
97744
97823
  let handle;
@@ -97790,6 +97869,8 @@ function openAttach(client, device, sessionId, timers = realTimers) {
97790
97869
  resolveSnapshot(remote.snapshot);
97791
97870
  }
97792
97871
  history.push(remote);
97872
+ if (history.length > ATTACH_HISTORY_MAX)
97873
+ history.splice(0, history.length - ATTACH_HISTORY_MAX);
97793
97874
  for (const listener of [...listeners]) {
97794
97875
  try {
97795
97876
  listener(remote);
@@ -98096,7 +98177,7 @@ var init_engine_endpoint = __esm(() => {
98096
98177
  NoPrimaryEndpointError = class NoPrimaryEndpointError extends NotSentError {
98097
98178
  constructor(device, listed) {
98098
98179
  super("unsupported", `${device} lists ${listed} engine endpoint(s) and names none as its own engine; nothing was opened`, {
98099
- 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.`
98100
98181
  });
98101
98182
  }
98102
98183
  };
@@ -98298,6 +98379,616 @@ var init_device_service2 = __esm(() => {
98298
98379
  UPDATE_IN_FLIGHT = new Set(["pending", "trial"]);
98299
98380
  });
98300
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
+
98301
98992
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/system/memory/metrics.mjs
98302
98993
  var Metrics;
98303
98994
  var init_metrics2 = __esm(() => {
@@ -100624,7 +101315,7 @@ function IsExtendsTrueLike(value) {
100624
101315
  function Match3(result, true_, false_) {
100625
101316
  return IsExtendsTrueLike(result) ? true_(result.inferred) : false_();
100626
101317
  }
100627
- var init_result = __esm(() => {
101318
+ var init_result2 = __esm(() => {
100628
101319
  init_guard2();
100629
101320
  init_memory3();
100630
101321
  });
@@ -100668,7 +101359,7 @@ var init_extends_right = __esm(() => {
100668
101359
  init_union();
100669
101360
  init_unknown();
100670
101361
  init_extends_left();
100671
- init_result();
101362
+ init_result2();
100672
101363
  init_evaluate2();
100673
101364
  init_evaluate2();
100674
101365
  });
@@ -100682,7 +101373,7 @@ var init_any2 = __esm(() => {
100682
101373
  init_any();
100683
101374
  init_unknown();
100684
101375
  init_extends_right();
100685
- init_result();
101376
+ init_result2();
100686
101377
  });
100687
101378
 
100688
101379
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/array.mjs
@@ -100699,7 +101390,7 @@ var init_array2 = __esm(() => {
100699
101390
  init__immutable();
100700
101391
  init_extends_right();
100701
101392
  init_extends_left();
100702
- init_result();
101393
+ init_result2();
100703
101394
  });
100704
101395
 
100705
101396
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/bigint.mjs
@@ -100709,7 +101400,7 @@ function ExtendsBigInt(inferred, left, right) {
100709
101400
  var init_bigint3 = __esm(() => {
100710
101401
  init_bigint();
100711
101402
  init_extends_right();
100712
- init_result();
101403
+ init_result2();
100713
101404
  });
100714
101405
 
100715
101406
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/boolean.mjs
@@ -100719,7 +101410,7 @@ function ExtendsBoolean(inferred, left, right) {
100719
101410
  var init_boolean2 = __esm(() => {
100720
101411
  init_boolean();
100721
101412
  init_extends_right();
100722
- init_result();
101413
+ init_result2();
100723
101414
  });
100724
101415
 
100725
101416
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/parameters.mjs
@@ -100744,7 +101435,7 @@ var init_parameters = __esm(() => {
100744
101435
  init_infer();
100745
101436
  init__optional();
100746
101437
  init_extends_left();
100747
- init_result();
101438
+ init_result2();
100748
101439
  });
100749
101440
 
100750
101441
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/return_type.mjs
@@ -100754,7 +101445,7 @@ function ExtendsReturnType(inferred, left, right) {
100754
101445
  var init_return_type = __esm(() => {
100755
101446
  init_void();
100756
101447
  init_extends_left();
100757
- init_result();
101448
+ init_result2();
100758
101449
  });
100759
101450
 
100760
101451
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/constructor.mjs
@@ -100765,7 +101456,7 @@ var init_constructor2 = __esm(() => {
100765
101456
  init_any();
100766
101457
  init_constructor();
100767
101458
  init_unknown();
100768
- init_result();
101459
+ init_result2();
100769
101460
  init_parameters();
100770
101461
  init_return_type();
100771
101462
  });
@@ -100776,7 +101467,7 @@ function ExtendsDependent(inferred, if_, then_, else_, right) {
100776
101467
  }
100777
101468
  var init_dependent2 = __esm(() => {
100778
101469
  init_extends_left();
100779
- init_result();
101470
+ init_result2();
100780
101471
  });
100781
101472
 
100782
101473
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/enum.mjs
@@ -100797,7 +101488,7 @@ var init_function2 = __esm(() => {
100797
101488
  init_any();
100798
101489
  init_function();
100799
101490
  init_unknown();
100800
- init_result();
101491
+ init_result2();
100801
101492
  init_parameters();
100802
101493
  init_return_type();
100803
101494
  });
@@ -100810,7 +101501,7 @@ var init_integer3 = __esm(() => {
100810
101501
  init_integer();
100811
101502
  init_number();
100812
101503
  init_extends_right();
100813
- init_result();
101504
+ init_result2();
100814
101505
  });
100815
101506
 
100816
101507
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/intersect.mjs
@@ -100850,7 +101541,7 @@ var init_literal2 = __esm(() => {
100850
101541
  init_number();
100851
101542
  init_string();
100852
101543
  init_extends_right();
100853
- init_result();
101544
+ init_result2();
100854
101545
  });
100855
101546
 
100856
101547
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/never.mjs
@@ -100860,7 +101551,7 @@ function ExtendsNever(inferred, left, right) {
100860
101551
  var init_never2 = __esm(() => {
100861
101552
  init_infer();
100862
101553
  init_extends_right();
100863
- init_result();
101554
+ init_result2();
100864
101555
  });
100865
101556
 
100866
101557
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/null.mjs
@@ -100870,7 +101561,7 @@ function ExtendsNull(inferred, left, right) {
100870
101561
  var init_null2 = __esm(() => {
100871
101562
  init_null();
100872
101563
  init_extends_right();
100873
- init_result();
101564
+ init_result2();
100874
101565
  });
100875
101566
 
100876
101567
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/number.mjs
@@ -100880,7 +101571,7 @@ function ExtendsNumber(inferred, left, right) {
100880
101571
  var init_number3 = __esm(() => {
100881
101572
  init_number();
100882
101573
  init_extends_right();
100883
- init_result();
101574
+ init_result2();
100884
101575
  });
100885
101576
 
100886
101577
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/object.mjs
@@ -100942,7 +101633,7 @@ var init_object2 = __esm(() => {
100942
101633
  init_union();
100943
101634
  init_extends_left();
100944
101635
  init_extends_right();
100945
- init_result();
101636
+ init_result2();
100946
101637
  });
100947
101638
 
100948
101639
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/record.mjs
@@ -100962,7 +101653,7 @@ var init_record2 = __esm(() => {
100962
101653
  init_object();
100963
101654
  init_record();
100964
101655
  init_extends_left();
100965
- init_result();
101656
+ init_result2();
100966
101657
  });
100967
101658
 
100968
101659
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/string.mjs
@@ -100972,7 +101663,7 @@ function ExtendsString(inferred, left, right) {
100972
101663
  var init_string3 = __esm(() => {
100973
101664
  init_string();
100974
101665
  init_extends_right();
100975
- init_result();
101666
+ init_result2();
100976
101667
  });
100977
101668
 
100978
101669
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/symbol.mjs
@@ -100982,7 +101673,7 @@ function ExtendsSymbol(inferred, left, right) {
100982
101673
  var init_symbol2 = __esm(() => {
100983
101674
  init_symbol();
100984
101675
  init_extends_right();
100985
- init_result();
101676
+ init_result2();
100986
101677
  });
100987
101678
 
100988
101679
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/template_literal.mjs
@@ -101036,7 +101727,7 @@ var init_inference = __esm(() => {
101036
101727
  init_union();
101037
101728
  init_infer();
101038
101729
  init_rest();
101039
- init_result();
101730
+ init_result2();
101040
101731
  });
101041
101732
 
101042
101733
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/tuple.mjs
@@ -101093,7 +101784,7 @@ var init_tuple2 = __esm(() => {
101093
101784
  init_tuple();
101094
101785
  init_extends_left();
101095
101786
  init_extends_right();
101096
- init_result();
101787
+ init_result2();
101097
101788
  init_instantiate27();
101098
101789
  init_instantiate27();
101099
101790
  init_inference();
@@ -101107,7 +101798,7 @@ var init_undefined2 = __esm(() => {
101107
101798
  init_undefined();
101108
101799
  init_void();
101109
101800
  init_extends_right();
101110
- init_result();
101801
+ init_result2();
101111
101802
  });
101112
101803
 
101113
101804
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/union.mjs
@@ -101125,7 +101816,7 @@ var init_union2 = __esm(() => {
101125
101816
  init_guard2();
101126
101817
  init_union();
101127
101818
  init_extends_left();
101128
- init_result();
101819
+ init_result2();
101129
101820
  init_inference();
101130
101821
  });
101131
101822
 
@@ -101138,7 +101829,7 @@ var init_unknown2 = __esm(() => {
101138
101829
  init_unknown();
101139
101830
  init_infer();
101140
101831
  init_extends_right();
101141
- init_result();
101832
+ init_result2();
101142
101833
  });
101143
101834
 
101144
101835
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/void.mjs
@@ -101148,7 +101839,7 @@ function ExtendsVoid(inferred, left, right) {
101148
101839
  var init_void2 = __esm(() => {
101149
101840
  init_void();
101150
101841
  init_extends_right();
101151
- init_result();
101842
+ init_result2();
101152
101843
  });
101153
101844
 
101154
101845
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/extends_left.mjs
@@ -101204,7 +101895,7 @@ var init_extends_left = __esm(() => {
101204
101895
  init_unknown();
101205
101896
  init_union();
101206
101897
  init_void();
101207
- init_result();
101898
+ init_result2();
101208
101899
  });
101209
101900
 
101210
101901
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/engine/interface/instantiate.mjs
@@ -101443,7 +102134,7 @@ var init_extends2 = __esm(() => {
101443
102134
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/extends/index.mjs
101444
102135
  var init_extends3 = __esm(() => {
101445
102136
  init_extends2();
101446
- init_result();
102137
+ init_result2();
101447
102138
  });
101448
102139
 
101449
102140
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/type/engine/evaluate/compare.mjs
@@ -103773,13 +104464,6 @@ var init_build = __esm(() => {
103773
104464
  init_types10();
103774
104465
  });
103775
104466
 
103776
- // packages/omo-senpi/src/components/thread/gateway/bindings.ts
103777
- var BINDING_MAX_TTL_SECONDS, OUTBOX_RETENTION_MS, RELAY_TEXT_MAX_BYTES = 32768;
103778
- var init_bindings = __esm(() => {
103779
- BINDING_MAX_TTL_SECONDS = 366 * 24 * 60 * 60;
103780
- OUTBOX_RETENTION_MS = 30 * 24 * 60 * 60 * 1000;
103781
- });
103782
-
103783
104467
  // packages/omo-senpi/src/components/thread/contracts/fields.ts
103784
104468
  var THREAD_MESSAGE_MAX_BYTES = 32768, THREAD_SUMMARY_MAX_LENGTH = 200, THREAD_READ_DEFAULT_BYTES = 131072, THREAD_READ_MAX_BYTES = 1048576, ThreadAddress, AllScope, IdempotencyKey, CollapseKey, ExpectedTurnId, Summary, Message2, thinkingLevel = (description) => Union([
103785
104469
  Literal("off"),
@@ -103789,10 +104473,9 @@ var THREAD_MESSAGE_MAX_BYTES = 32768, THREAD_SUMMARY_MAX_LENGTH = 200, THREAD_RE
103789
104473
  Literal("high"),
103790
104474
  Literal("xhigh"),
103791
104475
  Literal("max")
103792
- ], { description }), BindingId, RelayText, DEFAULT_THREAD_DELIVERY = "auto", ThreadDeliveryMode;
104476
+ ], { description }), DEFAULT_THREAD_DELIVERY = "auto", ThreadDeliveryMode;
103793
104477
  var init_fields = __esm(() => {
103794
104478
  init_build();
103795
- init_bindings();
103796
104479
  ThreadAddress = String2({
103797
104480
  description: "Recipient thread: the thread value of a thread_list row (tool.thread_list() in an eval cell) or of any thread tool result, an alias, a unique name, or the first 8+ characters of a thread value when only one thread starts with them. A name or prefix shared by several threads returns ambiguous_target with candidates. self addresses the caller's own session."
103798
104481
  });
@@ -103818,13 +104501,6 @@ var init_fields = __esm(() => {
103818
104501
  maxLength: THREAD_MESSAGE_MAX_BYTES,
103819
104502
  description: `Instruction to deliver to the target thread; longer than ${THREAD_MESSAGE_MAX_BYTES} UTF-8 bytes returns message_too_large.`
103820
104503
  });
103821
- BindingId = String2({
103822
- minLength: 1,
103823
- description: "Id of the chat binding the gateway keeps for the thread."
103824
- });
103825
- RelayText = String2({
103826
- description: `Text relayed to or from the external thread; longer than ${RELAY_TEXT_MAX_BYTES} UTF-8 bytes returns message_too_large.`
103827
- });
103828
104504
  ThreadDeliveryMode = Union([Literal("auto"), Literal("steer"), Literal("follow_up")], {
103829
104505
  default: DEFAULT_THREAD_DELIVERY,
103830
104506
  description: "Omitted: auto. auto steers the running turn when one is active and starts a new turn otherwise; steer requires expected_turn_id and becomes turn_conflict when the active turn changed; follow_up queues the message behind the running turn (pass it only when the message must wait for that turn to end)."
@@ -103837,160 +104513,103 @@ var init_permission_presets = __esm(() => {
103837
104513
  PERMISSION_PRESETS = ["full-access", "workspace", "accept-edits", "auto", "read-only", "ask"];
103838
104514
  });
103839
104515
 
103840
- // packages/omo-senpi/src/components/thread/remote/ports.ts
103841
- var init_ports = () => {};
103842
-
103843
- // packages/omo-senpi/src/components/thread/errors.ts
103844
- function isThreadErrorCode(value) {
103845
- return typeof value === "string" && CODE_SET.has(value);
103846
- }
103847
- function threadToolFailure(code, message, nextAction, details) {
103848
- if (!isThreadErrorCode(code)) {
103849
- throw new Error(`unknown thread error code: ${String(code)}`);
103850
- }
103851
- return { code, message, next_action: nextAction, ...details === undefined ? {} : { details } };
103852
- }
103853
- var THREAD_ERROR_CODES, CODE_SET;
103854
- var init_errors5 = __esm(() => {
103855
- THREAD_ERROR_CODES = [
103856
- "invalid_arguments",
103857
- "caller_context_missing",
103858
- "not_found",
103859
- "reply_target_mismatch",
103860
- "ambiguous_target",
103861
- "scope_denied",
103862
- "name_conflict",
103863
- "not_resumable",
103864
- "orphaned",
103865
- "foreign_live_owner",
103866
- "no_active_turn",
103867
- "turn_conflict",
103868
- "turn_active",
103869
- "not_steerable",
103870
- "message_too_large",
103871
- "queue_full",
103872
- "cursor_invalid",
103873
- "cursor_stale",
103874
- "idempotency_conflict",
103875
- "idempotency_in_progress",
103876
- "idempotency_uncertain",
103877
- "delivered_unconfirmed",
103878
- "prompt_not_started",
103879
- "approval_unavailable",
103880
- "approval_route_locked",
103881
- "partial_commit",
103882
- "unsupported",
103883
- "overloaded",
103884
- "transport_closed",
103885
- "host_unavailable",
103886
- "internal_error",
103887
- "model_not_found",
103888
- "model_ambiguous",
103889
- "thinking_level_unsupported",
103890
- "loop_detected",
103891
- "pair_loop_guard",
103892
- "chain_count_limit",
103893
- "binding_conflict",
103894
- "binding_mismatch",
103895
- "binding_inactive",
103896
- "stale_revision",
103897
- "stale_token",
103898
- "already_answered",
103899
- "answer_in_progress",
103900
- "device_offline",
103901
- "relay_requires_paid_plan",
103902
- "alias_taken",
103903
- "gateway_schema_too_new"
103904
- ];
103905
- CODE_SET = new Set(THREAD_ERROR_CODES);
103906
- });
103907
-
103908
- // packages/omo-senpi/src/components/thread/initial-skills.ts
103909
- var init_initial_skills = () => {};
103910
-
103911
- // packages/omo-senpi/src/components/thread/gateway/result.ts
103912
- var init_result2 = __esm(() => {
103913
- init_errors5();
103914
- });
103915
-
103916
- // packages/omo-senpi/src/components/thread/remote/outcome.ts
103917
- var READ_UNCERTAIN, UNANSWERED, NOT_SIGNED_IN;
103918
- var init_outcome = __esm(() => {
103919
- init_errors5();
103920
- init_result2();
103921
- READ_UNCERTAIN = {
103922
- request_gone: "retry",
103923
- no_receipt: "retry",
103924
- engine_restarted: "retry",
103925
- recipient_revoked: "retry",
103926
- transport_expired: "retry",
103927
- unconfirmed: "retry",
103928
- lease_expired: "retry",
103929
- cancelled: "retry",
103930
- hand_restarted: "retry",
103931
- result_expired: "retry",
103932
- record_too_large: "too_large",
103933
- result_undecodable: "retry"
103934
- };
103935
- UNANSWERED = new Set([
103936
- "closed",
103937
- "protocol_violation",
103938
- "internal",
103939
- "read_failed",
103940
- "request_timeout",
103941
- "handshake_timeout",
103942
- "attach_failed",
103943
- "reply_lost",
103944
- "delivered_unconfirmed",
103945
- "host_not_answering",
103946
- "peer_not_found",
103947
- "engine_stale",
103948
- ...Object.entries(READ_UNCERTAIN).filter(([, answer]) => answer === "retry").map(([reason]) => reason)
103949
- ]);
103950
- NOT_SIGNED_IN = new Set(["sign_in_required", "signed_out"]);
103951
- });
103952
-
103953
- // packages/omo-senpi/src/components/thread/address/refusals.ts
103954
- var init_refusals = __esm(() => {
104516
+ // packages/omo-senpi/src/components/thread/addressing.ts
104517
+ var init_addressing = __esm(() => {
103955
104518
  init_errors5();
103956
104519
  });
103957
104520
 
103958
- // packages/omo-senpi/src/components/thread/remote/address-book.ts
103959
- var REMOTE_NOT_SET_UP;
103960
- var init_address_book = __esm(() => {
103961
- init_ports();
103962
- 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;
103963
104526
  });
103964
-
103965
- // packages/omo-senpi/src/components/thread/address/account.ts
103966
- var NOT_SET_UP, lastListed;
103967
- var init_account = __esm(() => {
103968
- init_remote_ops();
103969
- init_address_book();
103970
- NOT_SET_UP = new Set(["not_configured", "disabled", "signed_out", "sign_in_required"]);
103971
- 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();
103972
104531
  });
103973
104532
 
103974
- // packages/omo-senpi/src/components/thread/address/device.ts
103975
- var init_device = __esm(() => {
103976
- init_errors5();
103977
- init_account();
103978
- init_refusals();
103979
- });
104533
+ // packages/omo-senpi/src/components/thread/contracts/send-result-order.ts
104534
+ var init_send_result_order = () => {};
103980
104535
 
103981
- // packages/omo-senpi/src/components/thread/remote/remote-ops.ts
103982
- var init_remote_ops = __esm(() => {
103983
- init_refusals();
103984
- init_device();
103985
- init_account();
103986
- 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
+ ];
103987
104607
  });
103988
104608
 
103989
- // packages/omo-senpi/src/components/call-budget/call-deadline.ts
103990
- import { AsyncLocalStorage as AsyncLocalStorage4 } from "async_hooks";
103991
- var scope;
103992
- var init_call_deadline = __esm(() => {
103993
- 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/`;
103994
104613
  });
103995
104614
 
103996
104615
  // packages/omo-senpi/src/components/thread/contracts/create-params.ts
@@ -104061,7 +104680,7 @@ var init_create_params = __esm(() => {
104061
104680
  });
104062
104681
 
104063
104682
  // packages/omo-senpi/src/components/thread/contracts/params.ts
104064
- var ThreadListParams, THREAD_READ_WAIT_MAX_MS = 600000, ThreadReadParams, ThreadSendParams, ThreadInterruptParams, SelfOrThread, ThreadCloseParams, ThreadHandoffParams, ThreadRenameParams, ThreadSetModelParams, ThreadSetReasoningParams, ThreadArchiveParams, ThreadReportParams, ThreadOutboxParams, ThreadOutboxAckParams, ThreadAnswerParams;
104683
+ var ThreadListParams, THREAD_READ_WAIT_MAX_MS = 600000, ThreadReadParams, ThreadSendParams, ThreadInterruptParams, SelfOrThread, ThreadCloseParams, ThreadHandoffParams, ThreadRenameParams, ThreadSetModelParams, ThreadSetReasoningParams, ThreadArchiveParams;
104065
104684
  var init_params = __esm(() => {
104066
104685
  init_build();
104067
104686
  init_fields();
@@ -104070,14 +104689,27 @@ var init_params = __esm(() => {
104070
104689
  all_scope: Optional(Boolean2({
104071
104690
  description: "List this machine's threads from every workspace; the default returns only the caller's workspace here. The account's other devices' threads are always listed."
104072
104691
  })),
104073
- state: Optional(_Array_(Union([Literal("running"), Literal("idle"), Literal("inactive"), Literal("archived")]), {
104692
+ state: Optional(_Array_(Union([
104693
+ Literal("opening"),
104694
+ Literal("running"),
104695
+ Literal("idle"),
104696
+ Literal("held"),
104697
+ Literal("unknown"),
104698
+ Literal("inactive"),
104699
+ Literal("archived")
104700
+ ]), {
104074
104701
  minItems: 1,
104075
- description: "Thread states to list: running, idle, inactive (no engine holds it) or archived; the default lists every state but archived."
104702
+ description: "Thread states to list: opening (not yet ready for controls), running, idle, inactive (no engine holds it) or archived; the default lists every state but archived."
104076
104703
  })),
104077
104704
  idempotency_key: IdempotencyKey
104078
104705
  });
104079
104706
  ThreadReadParams = _Object_({
104080
104707
  thread: ThreadAddress,
104708
+ delivery_id: Optional(String2({
104709
+ minLength: 1,
104710
+ maxLength: 128,
104711
+ description: "Query only the outcome of your original delivery to this exact thread ID. Reads no conversation, sends no message and wakes no session; after evidence expires answers outcome_unavailable."
104712
+ })),
104081
104713
  cursor: Optional(String2({
104082
104714
  description: "Opaque cursor from an earlier thread_read (tool.thread_read() in an eval cell) to page the older messages of a truncated read (a read without one returns the newest messages that fit max_bytes); a transcript revision that moved past it returns cursor_stale."
104083
104715
  })),
@@ -104190,61 +104822,6 @@ var init_params = __esm(() => {
104190
104822
  all_scope: AllScope,
104191
104823
  idempotency_key: IdempotencyKey
104192
104824
  });
104193
- ThreadReportParams = _Object_({
104194
- binding_id: Optional(String2({
104195
- minLength: 1,
104196
- description: "Binding to report to; defaults to the originating binding, the one the message this session is answering now arrived through; refused when that is ambiguous."
104197
- })),
104198
- kind: Union([Literal("milestone"), Literal("report"), Literal("question"), Literal("completion")], {
104199
- description: "milestone updates the thread's progress message, report posts a result, question relays a pending question of this session and returns a reply_token, completion is written once when this session's run settles, with the run's real outcome."
104200
- }),
104201
- text: RelayText,
104202
- request_id: Optional(String2({
104203
- minLength: 1,
104204
- description: "For kind question: the id of this session's pending extension UI request the answer resolves."
104205
- })),
104206
- request_kind: Optional(Union([
104207
- Literal("question"),
104208
- Literal("select"),
104209
- Literal("confirm"),
104210
- Literal("input"),
104211
- Literal("editor")
104212
- ], {
104213
- description: "For kind question: which extension UI request request_id is. It decides the answer forms thread_answer (tool.thread_answer() in an eval cell) accepts: confirm takes yes/no (any case, surrounding spaces ignored), input and editor take any text including empty, question and select take non-blank text. Without it the answer goes out in every text form at once, so a question, select, input or editor each reads its own and the text must be non-blank; a yes/no word also goes out as the confirm field, so an undeclared confirm reads yes/no too (any other text reads as no)."
104214
- })),
104215
- idempotency_key: IdempotencyKey
104216
- });
104217
- ThreadOutboxParams = _Object_({
104218
- binding_id: BindingId,
104219
- after_cursor: Optional(Integer({
104220
- minimum: 0,
104221
- description: "Read rows after this cursor; unset continues after the binding's acknowledged cursor."
104222
- })),
104223
- limit: Optional(Integer({ minimum: 1, maximum: 500, description: "Rows per read, default 100 and at most 500." })),
104224
- idempotency_key: IdempotencyKey
104225
- });
104226
- ThreadOutboxAckParams = _Object_({
104227
- binding_id: BindingId,
104228
- cursor: Integer({
104229
- minimum: 1,
104230
- description: "Every outbox row up to this cursor is marked delivered; an older cursor changes nothing."
104231
- }),
104232
- provider_message_id: Optional(String2({
104233
- minLength: 1,
104234
- maxLength: 256,
104235
- description: "Platform id of the message posted for the row at cursor; the first one for a milestone becomes the progress message later milestones edit."
104236
- })),
104237
- idempotency_key: IdempotencyKey
104238
- });
104239
- ThreadAnswerParams = _Object_({
104240
- binding_id: String2({
104241
- minLength: 1,
104242
- description: "Binding the answer arrived through; it must be the binding that asked the question."
104243
- }),
104244
- reply_token: String2({ minLength: 1, description: "reply_token of the question row being answered." }),
104245
- answer: RelayText,
104246
- idempotency_key: IdempotencyKey
104247
- });
104248
104825
  });
104249
104826
 
104250
104827
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/schema/types/_refine.mjs
@@ -105431,7 +106008,7 @@ function DynamicRef(stack, dynamicRef) {
105431
106008
  const fragmentTarget = RefInternal(stack.context, fragmentRoot, stack.lexicalBase, dynamicRef.$dynamicRef);
105432
106009
  return IsUndefined(fragmentTarget) ? DynamicRefWhenNotFound(stack, dynamicRef) : DynamicRefWhenFound(stack, dynamicRef, fragmentTarget);
105433
106010
  }
105434
- var init_resolve = __esm(() => {
106011
+ var init_resolve2 = __esm(() => {
105435
106012
  init_guard2();
105436
106013
  init_pointer2();
105437
106014
  init_types11();
@@ -105439,8 +106016,8 @@ var init_resolve = __esm(() => {
105439
106016
  });
105440
106017
 
105441
106018
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/schema/resolve/index.mjs
105442
- var init_resolve2 = __esm(() => {
105443
- init_resolve();
106019
+ var init_resolve3 = __esm(() => {
106020
+ init_resolve2();
105444
106021
  });
105445
106022
 
105446
106023
  // node_modules/.bun/typebox@1.3.34/node_modules/typebox/build/schema/engine/dynamicRef.mjs
@@ -105457,7 +106034,7 @@ function ErrorDynamicRef(stack, context, schemaPath, instancePath, schema, value
105457
106034
  var init_dynamicRef2 = __esm(() => {
105458
106035
  init_types11();
105459
106036
  init__functions();
105460
- init_resolve2();
106037
+ init_resolve3();
105461
106038
  init_schema4();
105462
106039
  });
105463
106040
 
@@ -106556,7 +107133,7 @@ function ErrorRecursiveRef(stack, context, schemaPath, instancePath, schema, val
106556
107133
  var init_recursiveRef2 = __esm(() => {
106557
107134
  init_types11();
106558
107135
  init__functions();
106559
- init_resolve2();
107136
+ init_resolve3();
106560
107137
  init_schema4();
106561
107138
  });
106562
107139
 
@@ -106584,7 +107161,7 @@ function ErrorRef(stack, context, schemaPath, instancePath, schema, value) {
106584
107161
  var init_ref4 = __esm(() => {
106585
107162
  init__functions();
106586
107163
  init_types11();
106587
- init_resolve2();
107164
+ init_resolve3();
106588
107165
  init__context();
106589
107166
  init_guard2();
106590
107167
  init_schema4();
@@ -106843,7 +107420,7 @@ var init_intern = __esm(() => {
106843
107420
  init_types11();
106844
107421
  init__stack();
106845
107422
  init_guard2();
106846
- init_resolve2();
107423
+ init_resolve3();
106847
107424
  registry2 = new Map;
106848
107425
  resolved = new Map;
106849
107426
  });
@@ -106974,7 +107551,7 @@ var init_schema6 = __esm(() => {
106974
107551
  init_intern2();
106975
107552
  init_meta2();
106976
107553
  init_pointer2();
106977
- init_resolve2();
107554
+ init_resolve3();
106978
107555
  init_static3();
106979
107556
  init_types11();
106980
107557
  init_build2();
@@ -108761,170 +109338,8 @@ var init_thread_state = __esm(() => {
108761
109338
  RETRY_WAIT_KINDS = new Set(["rate_limit", "retry"]);
108762
109339
  });
108763
109340
 
108764
- // packages/omo-senpi/src/components/thread/control/port.ts
108765
- var REFUSAL;
108766
- var init_port = __esm(() => {
108767
- init_errors5();
108768
- init_thread_state();
108769
- REFUSAL = Symbol.for("omo.thread.control.refusal");
108770
- });
108771
-
108772
- // packages/omo-senpi/src/components/thread/control/close-ladder.ts
108773
- var SESSION_GONE;
108774
- var init_close_ladder = __esm(() => {
108775
- init_call_deadline();
108776
- init_port();
108777
- SESSION_GONE = new Set([
108778
- "unknown_session",
108779
- "route_unlisted",
108780
- "session_identity_mismatch",
108781
- "session_not_attached",
108782
- "not_attached"
108783
- ]);
108784
- });
108785
-
108786
- // packages/omo-senpi/src/components/thread/worktree/failures.ts
108787
- var init_failures = __esm(() => {
108788
- init_errors5();
108789
- });
108790
-
108791
- // packages/omo-senpi/src/components/thread/control/open-reply.ts
108792
- var init_open_reply = __esm(() => {
108793
- init_errors5();
108794
- init_outcome();
108795
- init_failures();
108796
- });
108797
- // packages/omo-senpi/src/components/thread/worktree/remote-worktree.ts
108798
- var init_remote_worktree = __esm(() => {
108799
- init_close_ladder();
108800
- init_open_reply();
108801
- init_port();
108802
- init_errors5();
108803
- init_outcome();
108804
- init_remote_ops();
108805
- init_failures();
108806
- });
108807
-
108808
- // packages/omo-senpi/src/components/thread/thread-link.ts
108809
- var THREAD_LINK_SCHEME = "omo-thread", PREFIX;
108810
- var init_thread_link = __esm(() => {
108811
- PREFIX = `${THREAD_LINK_SCHEME}://v1/`;
108812
- });
108813
-
108814
- // packages/omo-senpi/src/components/thread/addressing.ts
108815
- var init_addressing = __esm(() => {
108816
- init_errors5();
108817
- });
108818
-
108819
- // packages/omo-senpi/src/components/thread/session-facts.ts
108820
- var SESSION_FACTS_WINDOW_BYTES, SESSION_FACTS_LAST_LINE_MAX_BYTES;
108821
- var init_session_facts = __esm(() => {
108822
- SESSION_FACTS_WINDOW_BYTES = 64 * 1024;
108823
- SESSION_FACTS_LAST_LINE_MAX_BYTES = SESSION_FACTS_WINDOW_BYTES * 4;
108824
- });
108825
-
108826
- // packages/omo-senpi/src/components/thread/address-book.ts
108827
- var init_address_book2 = __esm(() => {
108828
- init_addressing();
108829
- init_session_facts();
108830
- });
108831
-
108832
- // packages/omo-senpi/src/components/thread/metadata.ts
108833
- var THREAD_TOOL_EXPOSURE = "eval", ROUTE_TO_TASK = "; to spawn a child task instead, use task.", THREAD_TOOL_METADATA;
108834
- var init_metadata = __esm(() => {
108835
- THREAD_TOOL_METADATA = [
108836
- {
108837
- name: "thread_create",
108838
- label: "Create session",
108839
- 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,
108840
- exposure: THREAD_TOOL_EXPOSURE
108841
- },
108842
- {
108843
- name: "thread_list",
108844
- label: "List sessions",
108845
- 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,
108846
- exposure: THREAD_TOOL_EXPOSURE
108847
- },
108848
- {
108849
- name: "thread_read",
108850
- label: "Read session",
108851
- description: "Returns the transcript and latest output of another session, for when the user asks what another session said or produced" + ROUTE_TO_TASK,
108852
- exposure: THREAD_TOOL_EXPOSURE
108853
- },
108854
- {
108855
- name: "thread_send",
108856
- label: "Send message to session",
108857
- 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, and a bound chat thread's replies through thread_report and thread_answer (in an eval cell: tool.thread_read(), tool.thread_report(), tool.thread_answer())" + ROUTE_TO_TASK,
108858
- exposure: THREAD_TOOL_EXPOSURE
108859
- },
108860
- {
108861
- name: "thread_interrupt",
108862
- label: "Interrupt session turn",
108863
- 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,
108864
- exposure: THREAD_TOOL_EXPOSURE
108865
- },
108866
- {
108867
- name: "thread_close",
108868
- label: "Close session",
108869
- 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,
108870
- exposure: THREAD_TOOL_EXPOSURE
108871
- },
108872
- {
108873
- name: "thread_handoff",
108874
- label: "Hand off session",
108875
- 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,
108876
- exposure: THREAD_TOOL_EXPOSURE
108877
- },
108878
- {
108879
- name: "thread_rename",
108880
- label: "Rename session",
108881
- 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",
108882
- exposure: THREAD_TOOL_EXPOSURE
108883
- },
108884
- {
108885
- name: "thread_set_model",
108886
- label: "Switch session model",
108887
- description: "Moves a session onto a different model, for when the user asks to switch that session to another model or a cheaper one",
108888
- exposure: THREAD_TOOL_EXPOSURE
108889
- },
108890
- {
108891
- name: "thread_set_reasoning",
108892
- label: "Set session reasoning level",
108893
- description: "Sets how much reasoning a session applies, for when the user asks to raise or lower the thinking effort of a session",
108894
- exposure: THREAD_TOOL_EXPOSURE
108895
- },
108896
- {
108897
- name: "thread_archive",
108898
- label: "Archive session",
108899
- 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",
108900
- exposure: THREAD_TOOL_EXPOSURE
108901
- },
108902
- {
108903
- name: "thread_report",
108904
- label: "Report to chat thread",
108905
- description: "Posts a milestone, result, question or completion from this session to its bound chat thread, for when the user wants progress relayed to that chat; replies flow back through thread_read, thread_report and thread_answer (in an eval cell: tool.thread_read(), tool.thread_report(), tool.thread_answer())",
108906
- exposure: THREAD_TOOL_EXPOSURE
108907
- },
108908
- {
108909
- name: "thread_outbox",
108910
- label: "Read chat outbox",
108911
- description: "Returns the reports waiting for a bound chat thread with a cursor, for when a connector collects what sessions posted",
108912
- exposure: THREAD_TOOL_EXPOSURE
108913
- },
108914
- {
108915
- name: "thread_outbox_ack",
108916
- label: "Acknowledge chat outbox",
108917
- description: "Marks outbox rows up to a cursor as posted to the chat, for when a connector confirms delivery",
108918
- exposure: THREAD_TOOL_EXPOSURE
108919
- },
108920
- {
108921
- name: "thread_answer",
108922
- label: "Answer relayed question",
108923
- description: "Resolves a question a session relayed to a chat thread with the answer that arrived there, for when a connector hands back a chat user's reply",
108924
- exposure: THREAD_TOOL_EXPOSURE
108925
- }
108926
- ];
108927
- });
109341
+ // packages/omo-senpi/src/components/thread/tools/row-liveness.ts
109342
+ var init_row_liveness = () => {};
108928
109343
 
108929
109344
  // packages/omo-senpi/src/components/thread/tools/internals.ts
108930
109345
  function failure3(code, message, next, details) {
@@ -108933,36 +109348,26 @@ function failure3(code, message, next, details) {
108933
109348
  var init_internals = __esm(() => {
108934
109349
  init_address_book2();
108935
109350
  init_addressing();
109351
+ init_send_result_order();
108936
109352
  init_errors5();
108937
109353
  init_metadata();
108938
109354
  init_session_facts();
108939
109355
  init_thread_link();
108940
109356
  init_thread_state();
109357
+ init_row_liveness();
108941
109358
  });
108942
109359
 
108943
- // packages/omo-senpi/src/components/thread/control/session-host.ts
108944
- var init_session_host = __esm(() => {
109360
+ // packages/omo-senpi/src/components/thread/tools/model-match.ts
109361
+ var init_model_match = __esm(() => {
108945
109362
  init_internals();
108946
109363
  });
108947
109364
 
108948
- // packages/omo-senpi/src/components/thread/control/relay-session-host.ts
108949
- var init_relay_session_host = __esm(() => {
108950
- init_ports();
109365
+ // packages/omo-senpi/src/components/thread/control/port.ts
109366
+ var REFUSAL;
109367
+ var init_port = __esm(() => {
108951
109368
  init_errors5();
108952
- init_initial_skills();
108953
- init_outcome();
108954
- init_remote_ops();
108955
- init_device();
108956
- init_remote_worktree();
108957
- init_open_reply();
108958
- init_thread_link();
108959
109369
  init_thread_state();
108960
- init_session_host();
108961
- });
108962
-
108963
- // packages/omo-senpi/src/components/thread/tools/model-match.ts
108964
- var init_model_match = __esm(() => {
108965
- init_internals();
109370
+ REFUSAL = Symbol.for("omo.thread.control.refusal");
108966
109371
  });
108967
109372
 
108968
109373
  // packages/omo-senpi/src/components/thread/control/operations.ts
@@ -109014,6 +109419,20 @@ var init_transcript_tail = __esm(() => {
109014
109419
  kept = new WeakMap;
109015
109420
  unpaged = new WeakMap;
109016
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
+ });
109017
109436
  // packages/omo-senpi/src/components/thread/control/wait-settled.ts
109018
109437
  var IN_PROGRESS, RUN_RECORDS;
109019
109438
  var init_wait_settled = __esm(() => {
@@ -109034,6 +109453,58 @@ var init_wait_settled = __esm(() => {
109034
109453
  ]);
109035
109454
  });
109036
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
+
109037
109508
  // packages/omo-senpi/src/components/thread/tools/thread-row.ts
109038
109509
  var init_thread_row = __esm(() => {
109039
109510
  init_thread_link();
@@ -109055,157 +109526,8 @@ var init_relay_control = __esm(() => {
109055
109526
  init_thread_row();
109056
109527
  });
109057
109528
 
109058
- // packages/omo-senpi/src/components/thread/remote/attach-pool.ts
109059
- var CATALOG_RECORD = "get_available_models", HELD_RECORDS;
109060
- var init_attach_pool = __esm(() => {
109061
- HELD_RECORDS = new Set([CATALOG_RECORD, "get_protocol_info"]);
109062
- });
109063
-
109064
- // packages/omo-senpi/src/components/thread/remote/session-state.ts
109065
- var ACCESS_ENDED, ACCESS_REFUSED, SESSION_LEFT, SESSION_GONE2;
109066
- var init_session_state = __esm(() => {
109067
- ACCESS_ENDED = new Set([
109068
- "authorization_expired",
109069
- "peer_revoked",
109070
- "owner_transfer",
109071
- "service_disabled"
109072
- ]);
109073
- ACCESS_REFUSED = new Set([
109074
- "unauthenticated",
109075
- "forbidden",
109076
- "owner_transfer",
109077
- "signed_out",
109078
- "service_disabled",
109079
- "sign_in_required",
109080
- "plan_required",
109081
- "peer_not_found",
109082
- "peer_not_session_client",
109083
- "account_changed",
109084
- "device_changed",
109085
- "capability_missing",
109086
- "engine_too_old"
109087
- ]);
109088
- SESSION_LEFT = new Set(["session_closed", "session_replaced"]);
109089
- SESSION_GONE2 = new Set([
109090
- "session_not_found",
109091
- "unknown_session",
109092
- "session_identity_mismatch"
109093
- ]);
109094
- });
109095
- // packages/omo-senpi/src/components/thread/remote/remote-watch.ts
109096
- var init_remote_watch = __esm(() => {
109097
- init_device_service2();
109098
- init_session_state();
109099
- });
109100
- // packages/omo-senpi/src/components/remote/port/device-service.ts
109101
- var READ_ONLY_RECORDS, MARKED_RECORDS, LOOKUP_NONE;
109102
- var init_device_service3 = __esm(() => {
109103
- init_outcome();
109104
- init_device_service2();
109105
- init_attach_pool();
109106
- init_remote_watch();
109107
- init_call_deadline();
109108
- READ_ONLY_RECORDS = new Set([
109109
- "get_state",
109110
- "get_messages",
109111
- "get_entries",
109112
- "get_protocol_info"
109113
- ]);
109114
- MARKED_RECORDS = new Set(["admit_external_message"]);
109115
- LOOKUP_NONE = new Set(["session_not_found", "peer_not_found", "peer_not_session_client"]);
109116
- });
109117
-
109118
- // packages/device-service-core/src/wire.ts
109119
- var init_wire = __esm(() => {
109120
- init_errors4();
109121
- });
109122
-
109123
- // packages/omo-senpi/src/components/remote/codes.ts
109124
- var REMOTE_CODES, ENGINE_CODES;
109125
- var init_codes = __esm(() => {
109126
- init_wire();
109127
- init_errors5();
109128
- REMOTE_CODES = [
109129
- ...THREAD_ERROR_CODES,
109130
- "timeout",
109131
- "cancelled",
109132
- "session_ended",
109133
- "sender_not_allowed",
109134
- "local_only",
109135
- "host_not_answering",
109136
- "no_transport",
109137
- "device_offline",
109138
- "undelivered",
109139
- "transport_expired",
109140
- "unconfirmed",
109141
- "host_error"
109142
- ];
109143
- ENGINE_CODES = new Map([
109144
- ["model_unavailable", { code: "model_not_found" }],
109145
- ["invalid_level", { code: "thinking_level_unsupported" }],
109146
- ["worktree_failed", { code: "unsupported", details: { feature: "worktree" } }],
109147
- ["not_running", { code: "not_resumable" }],
109148
- ["handle_lost", { code: "not_found", details: { kind: "handle" } }]
109149
- ]);
109150
- });
109151
-
109152
- // packages/omo-senpi/src/components/remote/connection-of.ts
109153
- var lenders;
109154
- var init_connection_of = __esm(() => {
109155
- lenders = new WeakMap;
109156
- });
109157
-
109158
- // packages/omo-senpi/src/components/remote/deadlines.ts
109159
- var init_deadlines = __esm(() => {
109160
- init_codes();
109161
- });
109162
-
109163
- // packages/omo-senpi/src/components/remote/seams.ts
109164
- var init_seams = __esm(() => {
109165
- init_codes();
109166
- });
109167
-
109168
- // packages/omo-senpi/src/components/remote/resolve.ts
109169
- var init_resolve3 = __esm(() => {
109170
- init_client5();
109171
- init_deadlines();
109172
- init_codes();
109173
- init_seams();
109174
- });
109175
-
109176
- // packages/omo-senpi/src/components/remote/aliases.ts
109177
- var init_aliases = __esm(() => {
109178
- init_codes();
109179
- init_deadlines();
109180
- init_resolve3();
109181
- init_seams();
109182
- });
109183
-
109184
- // packages/omo-senpi/src/components/remote/attach.ts
109185
- var DIALOG_KINDS;
109186
- var init_attach = __esm(() => {
109187
- init_device_service2();
109188
- init_outcome();
109189
- init_client5();
109190
- init_codes();
109191
- init_deadlines();
109192
- init_device_service3();
109193
- init_resolve3();
109194
- init_seams();
109195
- DIALOG_KINDS = new Set(["select", "confirm", "input", "editor", "question"]);
109196
- });
109197
-
109198
- // packages/omo-senpi/src/components/remote/follow.ts
109199
- var RUN_OVER;
109200
- var init_follow = __esm(() => {
109201
- init_outcome();
109202
- init_attach();
109203
- init_client5();
109204
- init_codes();
109205
- init_deadlines();
109206
- init_seams();
109207
- RUN_OVER = new Set(["waiting_children", "waiting_background", "done", "failed", "cancelled"]);
109208
- });
109529
+ // packages/omo-senpi/src/components/thread/gateway/hash-args.ts
109530
+ var init_hash_args = () => {};
109209
109531
 
109210
109532
  // packages/omo-senpi/src/components/thread/gateway/provenance-resolver.ts
109211
109533
  var init_provenance_resolver = () => {};
@@ -109240,19 +109562,35 @@ var init_find_session = __esm(() => {
109240
109562
  ]);
109241
109563
  });
109242
109564
 
109565
+ // packages/omo-senpi/src/components/thread/remote/reopen-parked.ts
109566
+ var init_reopen_parked = __esm(() => {
109567
+ init_device();
109568
+ init_relay_session_host();
109569
+ init_errors5();
109570
+ init_find_session();
109571
+ });
109572
+
109573
+ // packages/omo-senpi/src/components/thread/remote/receipt.ts
109574
+ var init_receipt = __esm(() => {
109575
+ init_remote_ops();
109576
+ init_outcome();
109577
+ });
109578
+
109243
109579
  // packages/omo-senpi/src/components/thread/remote/relay-transport.ts
109244
109580
  var ADMIT_UNSUPPORTED, WAITS;
109245
109581
  var init_relay_transport = __esm(() => {
109246
109582
  init_ports();
109247
109583
  init_errors5();
109248
- init_bindings();
109584
+ init_hash_args();
109249
109585
  init_provenance2();
109250
- init_result2();
109586
+ init_result();
109251
109587
  init_remote_ops();
109252
109588
  init_device();
109253
109589
  init_outcome();
109254
109590
  init_find_session();
109591
+ init_reopen_parked();
109255
109592
  init_call_deadline();
109593
+ init_receipt();
109256
109594
  ADMIT_UNSUPPORTED = new Set([
109257
109595
  "method_unclassified",
109258
109596
  "delegation_unclassified",
@@ -109282,7 +109620,7 @@ var init_sessions = __esm(() => {
109282
109620
  init_port();
109283
109621
  init_relay_control();
109284
109622
  init_relay_session_host();
109285
- init_bindings();
109623
+ init_hash_args();
109286
109624
  init_provenance_resolver();
109287
109625
  init_address_book();
109288
109626
  init_outcome();
@@ -109293,9 +109631,10 @@ var init_sessions = __esm(() => {
109293
109631
  init_codes();
109294
109632
  init_deadlines();
109295
109633
  init_device_service3();
109296
- init_resolve3();
109634
+ init_resolve();
109297
109635
  init_seams();
109298
109636
  init_client_message_id();
109637
+ init_send_transcript();
109299
109638
  NO_SESSION = new Set(["unknown_session", "session_not_found"]);
109300
109639
  });
109301
109640
  // packages/omo-senpi/src/components/remote/unknown-device.ts
@@ -109312,7 +109651,7 @@ var init_client5 = __esm(() => {
109312
109651
  init_codes();
109313
109652
  init_deadlines();
109314
109653
  init_follow();
109315
- init_resolve3();
109654
+ init_resolve();
109316
109655
  init_seams();
109317
109656
  init_sessions();
109318
109657
  init_unknown_device();
@@ -109337,6 +109676,11 @@ var init_ladder = __esm(() => {
109337
109676
  init_errors5();
109338
109677
  });
109339
109678
 
109679
+ // packages/omo-senpi/src/components/thread/address/solo-retry.ts
109680
+ var init_solo_retry = __esm(() => {
109681
+ init_call_deadline();
109682
+ });
109683
+
109340
109684
  // packages/omo-senpi/src/components/thread/address/probe.ts
109341
109685
  var init_probe = __esm(() => {
109342
109686
  init_errors5();
@@ -109345,6 +109689,7 @@ var init_probe = __esm(() => {
109345
109689
  init_remote_ops();
109346
109690
  init_account();
109347
109691
  init_refusals();
109692
+ init_solo_retry();
109348
109693
  });
109349
109694
 
109350
109695
  // packages/omo-senpi/src/components/thread/address/bare.ts
@@ -109390,6 +109735,54 @@ var init_address = __esm(() => {
109390
109735
  init_resolve4();
109391
109736
  });
109392
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
+
109393
109786
  // packages/omo-opencode/src/cli/cli-program.ts
109394
109787
  init_commander();
109395
109788
 
@@ -109400,10 +109793,11 @@ init_package();
109400
109793
  import { createInterface as createInterface2 } from "readline/promises";
109401
109794
 
109402
109795
  // packages/telemetry-core/src/install-disclosure.ts
109796
+ init_destinations();
109403
109797
  var TELEMETRY_PRIVACY_POLICY_URL = "https://github.com/code-yeongyu/oh-my-openagent/blob/dev/docs/legal/privacy-policy.md";
109404
109798
  var TELEMETRY_INSTALL_DISCLOSURE_LINES = [
109405
109799
  "OmO sends anonymous usage telemetry (no prompts, code, file paths, or account data) to improve the product.",
109406
- "The data goes to PostHog in the United States.",
109800
+ `The data goes to ${TELEMETRY_DESTINATIONS.map((destination) => `${destination.label} (${destination.host})`).join(" and ")}.`,
109407
109801
  "Turn it off with DO_NOT_TRACK=1 (or OMO_DISABLE_TELEMETRY=1).",
109408
109802
  `Details: ${TELEMETRY_PRIVACY_POLICY_URL}`
109409
109803
  ];
@@ -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;
@@ -131719,8 +132132,11 @@ function createSession(options) {
131719
132132
  return await locked(async () => {
131720
132133
  let current = null;
131721
132134
  let account;
132135
+ let readSettled = false;
132136
+ let storeUnavailable = false;
131722
132137
  try {
131723
132138
  current = await store.readAuthoritative();
132139
+ readSettled = true;
131724
132140
  if (current !== null) {
131725
132141
  if (current.refreshState === "uncertain")
131726
132142
  return false;
@@ -131735,15 +132151,21 @@ function createSession(options) {
131735
132151
  } catch (error) {
131736
132152
  if (error instanceof SessionEnded)
131737
132153
  return error.deviceRevoked;
132154
+ if (!readSettled && error instanceof CredentialStoreError) {
132155
+ storeUnavailable = true;
132156
+ throw error;
132157
+ }
131738
132158
  if (error instanceof SignInError)
131739
132159
  return false;
131740
132160
  throw error;
131741
132161
  } finally {
131742
- await writeSignedOutMarker(markerPath, current?.device.id ?? null);
131743
- const stored = current === null ? null : await store.read().catch(() => current);
131744
- if (stored !== null)
131745
- await beforeKeysDiscarded(discardedOf(stored.accountId === undefined && account !== undefined ? { ...stored, accountId: account } : stored, "logout"));
131746
- await store.clear();
132162
+ if (!storeUnavailable) {
132163
+ await writeSignedOutMarker(markerPath, current?.device.id ?? null);
132164
+ const stored = current === null ? null : await store.read().catch(() => current);
132165
+ if (stored !== null)
132166
+ await beforeKeysDiscarded(discardedOf(stored.accountId === undefined && account !== undefined ? { ...stored, accountId: account } : stored, "logout"));
132167
+ await store.clear();
132168
+ }
131747
132169
  }
131748
132170
  });
131749
132171
  } finally {
@@ -132285,8 +132707,9 @@ async function run3(action, options, hooks = {}) {
132285
132707
  console.log(`This computer's earlier OmO device (id ${terminalText(replacedDeviceId)}) was signed out.`);
132286
132708
  await signedIn();
132287
132709
  } catch (error) {
132288
- console.error(controller.signal.aborted ? "Sign-in cancelled." : error instanceof SignInError ? error.message : "OmO sign-in stopped on an unexpected error. Run the command again, and report it with /bug if it keeps failing.");
132289
- process.exitCode = 1;
132710
+ const storeUnavailable = action === "logout" && error instanceof CredentialStoreError;
132711
+ console.error(controller.signal.aborted ? "Sign-in cancelled." : storeUnavailable ? "OmO could not read the credential store. Stored credentials and device keys were left untouched; run omo logout again when the keyring answers." : error instanceof SignInError ? error.message : "OmO sign-in stopped on an unexpected error. Run the command again, and report it with /bug if it keeps failing.");
132712
+ process.exitCode = storeUnavailable ? 9 : 1;
132290
132713
  } finally {
132291
132714
  process.removeListener("SIGINT", cancel);
132292
132715
  process.removeListener("SIGTERM", cancel);
@@ -132371,208 +132794,26 @@ function configureServiceAuthCommands(program, open = serviceAccountsOpen(), hoo
132371
132794
  }
132372
132795
 
132373
132796
  // packages/omo-native/device-service-handoff.ts
132797
+ init_src6();
132798
+ init_hand_device_keys();
132799
+ init_local_only();
132374
132800
  import { existsSync as existsSync67 } from "fs";
132375
-
132376
- // packages/device-service-core/src/index.ts
132377
- init_device_service2();
132378
-
132379
- // packages/device-service-core/src/delivery-consumer.ts
132380
- init_client4();
132381
- init_background_transport();
132382
- init_device_service2();
132383
- // packages/device-service-core/src/bootstrap.ts
132384
- import { existsSync as existsSync66 } from "fs";
132385
- init_device_service2();
132386
-
132387
- // packages/device-service-core/src/hand-device-keys.ts
132388
- init_device_service2();
132389
- import { existsSync as existsSync65 } from "fs";
132390
- var DEAD_ENDPOINT_CODES = new Set(["ENOENT", "ECONNREFUSED", "ECONNRESET", "EPIPE"]);
132391
- var connectFailure = (error) => {
132392
- const detail = error instanceof Error ? error.message : String(error);
132393
- if (error instanceof LocalApiError) {
132394
- if (error.code === "refused" || error.code === "server_proof_invalid")
132395
- return { cause: "refused", detail };
132396
- if (error.code === "insecure_state_dir")
132397
- return { cause: "unreadable", detail };
132398
- if (error.code === "handshake_timeout" || error.code === "request_timeout")
132399
- return { cause: "timed_out", detail };
132400
- return { cause: "failed", detail };
132401
- }
132402
- const code = error instanceof Error && "code" in error ? String(error.code) : "";
132403
- return { cause: DEAD_ENDPOINT_CODES.has(code) ? "dead_endpoint" : "failed", detail };
132404
- };
132405
- var connectOrNotRunning = async (connect, log) => {
132406
- try {
132407
- return await connect();
132408
- } catch (error) {
132409
- const { cause, detail } = connectFailure(error);
132410
- log?.(`OmO device service: ${cause}, treated as not running (${detail}).`);
132411
- return "not_running";
132412
- }
132413
- };
132414
- var adopted = (status) => status.device !== null && status.state !== "sign_in_required";
132415
- var handDeviceKeys = async (options) => {
132416
- if (!existsSync65(deviceServiceEndpointPath(options.stateDir)))
132417
- return "not_running";
132418
- const service = await connectOrNotRunning(options.connect, options.log);
132419
- if (service === "not_running")
132420
- return "not_running";
132421
- try {
132422
- if (options.when === "not_adopted" && adopted(await service.status()))
132423
- return "already_adopted";
132424
- await service.adopt(options.credential);
132425
- return "adopted";
132426
- } finally {
132427
- service.close();
132428
- }
132429
- };
132430
-
132431
- // packages/device-service-core/src/bootstrap.ts
132432
- init_version2();
132433
- var forgetDeviceService = async (options) => {
132434
- if (!existsSync66(deviceServiceEndpointPath(options.stateDir)))
132435
- return "not_running";
132436
- const service = await connectOrNotRunning(options.connect, options.log);
132437
- if (service === "not_running")
132438
- return "not_running";
132439
- try {
132440
- await service.forget();
132441
- } finally {
132442
- service.close();
132443
- }
132444
- return "forgotten";
132445
- };
132446
- // packages/device-service-core/src/cold-wake/host.ts
132447
- var UNREPAIRABLE = new Set(["EPERM", "EACCES", "EROFS"]);
132448
-
132449
- // packages/device-service-core/src/cold-wake/service-table.ts
132450
- var SERVICE_TABLE_ENV = "OMO_RELAYD_SERVICES";
132451
-
132452
- // packages/device-service-core/src/cold-wake/darwin.ts
132453
- var TABLE_KEY = `EnvironmentVariables.${SERVICE_TABLE_ENV}`;
132454
- // packages/device-service-core/src/release/acquire.ts
132455
- init_access();
132456
- init_dacl();
132457
-
132458
- // packages/device-service-core/src/release/windows-dacl.ts
132459
- init_errors4();
132460
- init_dacl();
132461
- var SID_TOKEN_SCRIPT = String.raw`
132462
- $ErrorActionPreference = 'Stop'
132463
- (New-Object System.Security.AccessControl.RawSecurityDescriptor("O:$env:LA_SID")).GetSddlForm('Owner')
132464
- `;
132465
- var userSidToken = async (userSid, run = runPowerShell) => {
132466
- const { code, out } = await run(SID_TOKEN_SCRIPT, { LA_SID: userSid });
132467
- const match = code === 0 ? /^O:(S-1-\d+(?:-\d+)+|[A-Z]{2})$/.exec(out.trim()) : null;
132468
- return match?.[1];
132469
- };
132470
- var aliasedDaclVerdict = (dacl, userSid, kind, userAlias) => {
132471
- const asSid = (token) => userAlias !== undefined && token === userAlias ? userSid : token;
132472
- return exactDaclVerdict({ ...dacl, owner: asSid(dacl.owner), aces: dacl.aces.map((ace) => ({ ...ace, sid: asSid(ace.sid) })) }, userSid, kind);
132473
- };
132474
- var verifyExactDacl2 = async (path, userSid, kind, run = runPowerShell) => {
132475
- let dacl;
132476
- try {
132477
- dacl = await describeDacl(path, run);
132478
- } catch (error) {
132479
- if (error instanceof LocalApiError)
132480
- return false;
132481
- throw error;
132482
- }
132483
- return aliasedDaclVerdict(dacl, userSid, kind, await userSidToken(userSid, run));
132484
- };
132485
- var windowsSecureFile2 = (userSid, run = runPowerShell) => async (path, kind) => {
132486
- const target = kind === "dir" ? "dir" : "file";
132487
- await applyExactDacl(path, userSid, target, run);
132488
- if (!await verifyExactDacl2(path, userSid, target, run))
132489
- throw new LocalApiError("insecure_state_dir", "the DACL is not exactly one ACE for the user");
132490
- };
132491
-
132492
- // packages/device-service-core/src/release/release-assets.ts
132493
- init_version2();
132494
- var MANIFEST = "latest.json";
132495
- var CHECKSUMS_MAX_BYTES = 64 * 1024;
132496
- var MANIFEST_MAX_BYTES = 4 * 1024;
132497
- var BINARY_MAX_BYTES = 512 * 1024 * 1024;
132498
- var DEVICE_SERVICE_HOSTS = [
132499
- "darwin-arm64",
132500
- "darwin-x64",
132501
- "linux-x64",
132502
- "linux-arm64",
132503
- "windows-x64",
132504
- "windows-arm64"
132505
- ];
132506
- var deviceServiceAssetName = (host) => host.startsWith("windows-") ? `omo-device-service-${host}.exe` : `omo-device-service-${host}`;
132507
- var RELEASE_FILES = new Set([MANIFEST, ...DEVICE_SERVICE_HOSTS.map(deviceServiceAssetName)]);
132508
-
132509
- // packages/device-service-core/src/strict-ed25519/strict-ed25519.ts
132510
- var P = (1n << 255n) - 19n;
132511
- var L = (1n << 252n) + 27742317777372353535851937790883648493n;
132512
- var mod = (n) => {
132513
- const r = n % P;
132514
- return r < 0n ? r + P : r;
132515
- };
132516
- var power = (base, exponent) => {
132517
- let result = 1n;
132518
- let b = mod(base);
132519
- for (let n = exponent;n > 0n; n >>= 1n) {
132520
- if (n & 1n)
132521
- result = mod(result * b);
132522
- b = mod(b * b);
132523
- }
132524
- return result;
132525
- };
132526
- var D = mod(-121665n * power(121666n, P - 2n));
132527
- var SQRT_MINUS_ONE = power(2n, (P - 1n) / 4n);
132528
- var keyCache = new Map;
132529
- // packages/device-service-core/src/release/release-key.json
132530
- var release_key_default = {
132531
- alg: "Ed25519",
132532
- public_keys_hex: ["6c6781a91888e3e5be10d1b27466319a7d5adf2a7d2b254f4118eda9cbcb4465", "ca9407b484a30ac7f09cb152455176f1e03fc6ca3446ff930bc7587215759016"]
132533
- };
132534
-
132535
- // packages/device-service-core/src/release/release-signature.ts
132536
- var HEX_KEY = /^[0-9a-f]{64}$/;
132537
- var parseReleaseKeySet = (value) => {
132538
- if (typeof value !== "object" || value === null || Array.isArray(value))
132539
- throw new Error("release key: not an object");
132540
- if (Object.keys(value).toSorted().join(",") !== "alg,public_keys_hex")
132541
- throw new Error("release key: fields must be exactly alg and public_keys_hex");
132542
- const alg = Reflect.get(value, "alg");
132543
- const hexes = Reflect.get(value, "public_keys_hex");
132544
- if (alg !== "Ed25519")
132545
- throw new Error("release key: alg must be Ed25519");
132546
- if (!Array.isArray(hexes))
132547
- throw new Error("release key: public_keys_hex must be an array");
132548
- if (new Set(hexes).size !== hexes.length)
132549
- throw new Error("release key: public_keys_hex must not repeat a key");
132550
- return hexes.map((hex) => {
132551
- if (typeof hex !== "string" || !HEX_KEY.test(hex))
132552
- throw new Error("release key: each public_keys_hex entry must be 64 lowercase hex characters");
132553
- return hex;
132554
- });
132555
- };
132556
- var DEVICE_SERVICE_RELEASE_KEYS = parseReleaseKeySet(release_key_default);
132557
-
132558
- // packages/device-service-core/src/release/acquire.ts
132559
- init_version2();
132560
- var platformSecure = process.platform === "win32" ? async (path, kind, origin) => windowsSecureFile2(await currentUserSid())(path, kind, origin) : posixSecureFile;
132561
- // packages/device-service-core/src/registrant.ts
132562
- init_device_service2();
132563
- var NONE2 = Symbol("none registered");
132564
-
132565
- // packages/device-service-core/src/index.ts
132566
- init_timers();
132567
132801
  // packages/omo-native/package.json
132568
132802
  var package_default4 = {
132569
132803
  name: "omo-ai",
132570
- version: "5.1.83",
132804
+ version: "5.1.86",
132571
132805
  type: "module",
132572
132806
  description: "OmO Native - the standalone omo command with the OMO extension built in: bun add -g omo-ai",
132573
132807
  bin: {
132574
132808
  omo: "bin/omo.js"
132575
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
+ },
132576
132817
  files: [
132577
132818
  "bin",
132578
132819
  "plugin"
@@ -132670,7 +132911,7 @@ function cliDeviceServiceHandoff(options) {
132670
132911
  }
132671
132912
 
132672
132913
  // packages/omo-native/remote-entry.ts
132673
- init_device_service2();
132914
+ init_remote();
132674
132915
 
132675
132916
  // packages/memory-core/src/journal/fsync.ts
132676
132917
  var SKIPPABLE_SYNC_CODES = new Set(["ENOENT", "EISDIR", "EPERM", "EACCES", "EINVAL"]);
@@ -132684,7 +132925,7 @@ var ED25519_PKCS8_PREFIX = hexBytes("302e020100300506032b657004220420");
132684
132925
  var ED25519_SPKI_PREFIX = hexBytes("302a300506032b6570032100");
132685
132926
  // packages/memory-core/src/sync/crypto/anchor.ts
132686
132927
  var anchors = new WeakSet;
132687
- var candidates = new WeakSet;
132928
+ var candidates2 = new WeakSet;
132688
132929
  var bootstraps = new WeakSet;
132689
132930
 
132690
132931
  // packages/memory-core/src/sync/crypto/strict-ed25519/strict-ed25519.ts
@@ -132730,6 +132971,12 @@ var refreshAttemptSchema = object({
132730
132971
  state: _enum(["ready", "sent_unknown", "successor_received_uncommitted", "exhausted"])
132731
132972
  });
132732
132973
 
132974
+ // packages/omo-native/remote-bootstrap.ts
132975
+ init_src6();
132976
+
132977
+ // packages/omo-native/remote-cold-wake.ts
132978
+ init_src6();
132979
+
132733
132980
  // packages/omo-native/remote-session-args.ts
132734
132981
  init_fields();
132735
132982
 
@@ -132752,83 +132999,29 @@ var VERBS = [
132752
132999
  ...SESSION_VERBS
132753
133000
  ];
132754
133001
 
132755
- // packages/omo-native/remote-session-verbs.ts
132756
- init_relay_session_host();
132757
- init_operations();
132758
- init_relay_control();
132759
- init_device_service3();
132760
-
132761
- // packages/omo-senpi/src/components/remote/index.ts
132762
- init_codes();
132763
- init_factories();
132764
- init_seams();
132765
- init_address();
132766
-
132767
- // packages/omo-senpi/src/components/remote/device-address.ts
132768
- init_address();
132769
- init_errors5();
132770
- // packages/omo-senpi/src/components/thread/gateway/store.ts
132771
- init_constants6();
132772
- init_provenance_resolver();
132773
-
132774
- // packages/omo-senpi/src/components/thread/gateway/session-args-schema.ts
132775
- var TYPES = new Set(["object", "string", "number", "integer", "boolean", "array", "null"]);
132776
- var ANNOTATIONS = new Set(["title", "description", "default", "examples"]);
132777
- var COUNTS = ["minLength", "maxLength", "minItems", "maxItems"];
132778
- var BOUNDS2 = ["minimum", "maximum", "exclusiveMinimum", "exclusiveMaximum"];
132779
- var KEYWORDS = new Set([
132780
- "type",
132781
- "properties",
132782
- "required",
132783
- "additionalProperties",
132784
- "enum",
132785
- "const",
132786
- "pattern",
132787
- "items",
132788
- "anyOf",
132789
- ...COUNTS,
132790
- ...BOUNDS2,
132791
- ...ANNOTATIONS
132792
- ]);
133002
+ // packages/omo-native/remote-cli.ts
133003
+ init_remote();
132793
133004
 
132794
- // packages/omo-native/remote-session-verbs.ts
132795
- init_provenance_resolver();
132796
- init_relay_transport();
133005
+ // packages/omo-native/remote-attach-presentation.ts
133006
+ init_outcome();
133007
+ var FORWARD_WAIT_MS = 60 * 60000;
132797
133008
 
132798
- // packages/omo-senpi/src/components/thread/gateway/engine.ts
132799
- init_addressing();
132800
- init_errors5();
132801
- init_fields();
132802
- init_constants6();
132803
- init_result2();
132804
- init_provenance_resolver();
133009
+ // packages/omo-native/remote-attach.ts
133010
+ var MAX_LINE_CHARS = 64 * 1024 * 1024;
132805
133011
 
132806
- // packages/omo-senpi/src/components/thread/gateway/local-transport.ts
132807
- init_errors5();
133012
+ // packages/omo-native/remote-local.ts
133013
+ init_remote();
132808
133014
 
132809
133015
  // packages/omo-native/remote-session-verbs.ts
132810
- init_address_book();
132811
- init_this_device();
132812
- init_thread_link();
132813
- init_thread_row();
132814
-
132815
- // packages/omo-native/bin/lib/package-paths.js
132816
- import { fileURLToPath as fileURLToPath9 } from "url";
132817
- var packageRoot = fileURLToPath9(new URL("../..", import.meta.url));
133016
+ init_remote();
132818
133017
 
132819
- // packages/omo-native/remote-session-verbs.ts
132820
- init_remote_ops();
133018
+ // packages/omo-native/remote-session-answer.ts
132821
133019
  var NO_SUCH_SESSION = new Set(["session_not_found", "unknown_session"]);
132822
133020
 
132823
- // packages/omo-native/remote-attach-presentation.ts
132824
- init_outcome();
132825
- var FORWARD_WAIT_MS = 60 * 60000;
132826
-
132827
- // packages/omo-native/remote-attach.ts
132828
- var MAX_LINE_CHARS = 64 * 1024 * 1024;
133021
+ // packages/omo-native/remote-session-open.ts
133022
+ init_remote();
132829
133023
 
132830
133024
  // packages/omo-native/remote-local.ts
132831
- init_device_service2();
132832
133025
  var READ_VERBS = new Set(["status", "devices", "sessions", "disable", "control", "wake"]);
132833
133026
 
132834
133027
  // packages/omo-native/remote-usage.ts
@@ -132880,7 +133073,7 @@ var USAGE_ENTRIES = [
132880
133073
  },
132881
133074
  {
132882
133075
  verbs: ["send"],
132883
- text: ` send <session> <text> [--steer|--follow-up] [--no-wait]
133076
+ text: ` send <session> <text|-> [--steer|--follow-up] [--no-wait]
132884
133077
  send a message and print the answer as it arrives (--steer: into the
132885
133078
  running turn; --no-wait: return once the session took it).
132886
133079
  Use the thread value from open --json, or <device>/<session>.`
@@ -132900,10 +133093,6 @@ var USAGE_ENTRIES = [
132900
133093
  ];
132901
133094
  var REMOTE_USAGE = [USAGE_HEAD, ...USAGE_ENTRIES.map((entry) => entry.text)].join(`
132902
133095
  `);
132903
-
132904
- // packages/omo-native/remote-cli.ts
132905
- init_device_service3();
132906
-
132907
133096
  // packages/omo-native/remote-entry.ts
132908
133097
  var testSkipKey = Symbol.for("omo.test.skipRemoteLoginSetup");
132909
133098
 
@@ -133362,7 +133551,7 @@ function linkedWorktrees(records) {
133362
133551
  }
133363
133552
  // packages/omo-opencode/src/cli/worktree-sweep/sweep.ts
133364
133553
  import { existsSync as existsSync70 } from "fs";
133365
- import { stat as stat12 } from "fs/promises";
133554
+ import { stat as stat13 } from "fs/promises";
133366
133555
  import os7 from "os";
133367
133556
  import { normalize as normalize2 } from "path";
133368
133557
 
@@ -133434,7 +133623,7 @@ async function isOlderThan(worktreePath, days, now) {
133434
133623
  if (days <= 0)
133435
133624
  return false;
133436
133625
  try {
133437
- const stats = await stat12(worktreePath);
133626
+ const stats = await stat13(worktreePath);
133438
133627
  return now - stats.mtimeMs > days * DAY_MS;
133439
133628
  } catch {
133440
133629
  return false;