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
@@ -9,122 +9,131 @@ One library, two engines. omowright ships inside this skill; choose the engine b
9
9
 
10
10
  | You need | Engine | Entry point |
11
11
  |---|---|---|
12
- | A site the user is signed into, their open tabs, a form, a click-through, a screenshot, web QA, an extension popup | **attached** — the user's own browser through BrowserSkill | `connectBrowserSkill()` |
13
- | A throwaway profile, bot-scoring evasion, a CAPTCHA, network interception, a QA flight trace, coordinate control, headless runs | **owned** — a browser your code launches | `connectPipe()` / `connectCloakProfile()` — [references/owned-engine/README.md](references/owned-engine/README.md) |
14
- | A 403/WAF host the attached engine cannot open, a platform with a native reader, an archive snapshot | neither | the `ultimate-browsing` skill |
12
+ | A site the user is signed into, their open tabs, an extension popup, a step only they can do | **attached** — the user's own browser through BrowserSkill | `connectBrowserSkill()` |
13
+ | QA of a local or public page, screenshots at device sizes, scraping, network capture, a QA trace, bot-scored targets, headless runs | **owned** — a browser your code launches on a throwaway profile | `connectPipe()` / `connectCloakProfile()` |
14
+ | The tab the user watches beside the chat in OmO Desktop (`OMO_BROWSER_ENGINE` is set) | the app's built-in browser | `connectBuiltinBrowser()` — [references/desktop.md](references/desktop.md) |
15
+ | A 403/WAF host neither engine opens, a platform with a native reader, an archive snapshot | neither | the `ultimate-browsing` skill |
15
16
 
16
- **Attached is the default,** because it is the only engine carrying the user's logins and the only
17
- one where a human is a single call away. It works in an Agent Window inside the user's own browser profile, never in
18
- a copy of that profile, and exists only where the user installed and enabled the BrowserSkill extension. Never substitute one engine for the other silently: if
19
- the attached engine is not set up, run the onboarding script and tell the user its one remaining
20
- step.
17
+ **Anything that needs the user's logins is attached.** It works in an Agent Window inside the user's own
18
+ profile, never a copy, and exists only where the user enabled the BrowserSkill extension. Never
19
+ substitute one engine for the other silently, and **never launch a headless browser because the
20
+ attached one is missing**: it has none of the user's sessions. Run the doctor, relay its one step.
21
21
 
22
- ## Step 0 — inside OmO Desktop: everything above, plus the app's built-in browser
22
+ ```js
23
+ const { loadOmowright } = await import("<skill-root>/scripts/omowright.mjs")
24
+ const { omowright } = await loadOmowright()
25
+ ```
23
26
 
24
- When `OMO_BROWSER_ENGINE` is set (the OmO desktop app sets it for every session), everything above works exactly
25
- as in the terminal: `connectBrowserSkill()` for the user's own browser, `connectPipe()` / `connectCloakProfile()` /
26
- `connect()` for a browser of your own, with the same table to choose between them. The app adds one more option:
27
+ Before the first attached session: `node "<skill-root>/scripts/browser-doctor.mjs" --json`. `ready`
28
+ means start; every other state and its one next step are in [references/install.md](references/install.md).
27
29
 
28
- | Option | What it is | Use it when |
30
+ ## Three rules for both engines
31
+
32
+ **1. WAIT FOR A STATE, NEVER FOR A CLOCK.** No `Bun.sleep`, no `setTimeout` delay, no hand-written
33
+ poll loop: a fixed delay fails on a slow page and wastes itself on a fast one. Start the wait
34
+ before the action that causes it. `goto`, `newTab` and `navigate` already wait for content, so
35
+ nothing follows them.
36
+
37
+ | Waiting for | Owned | Attached |
29
38
  |---|---|---|
30
- | `connectBuiltinBrowser()` | OmO's built-in browser for this thread: the tab the user sees beside the chat, which they can watch, take over and share | the user should see the page while you work, the task is QA of something in the app, or a sign-in the user should do themselves in a visible tab |
39
+ | Page content appearing or changing | `page.waitForFunction(fn, undefined, { timeout })` (options are the THIRD argument), `page.locator(ref).waitFor()` | `navigate(url, { waitUntil: "networkidle" })`; later, `session.waitForElement(target, { state: "visible", timeoutMs })`, or for any other state `evaluate` a promise that resolves on it (`{ awaitPromise: true, timeoutMs, context }`) |
40
+ | The request an action triggers | `const got = page.waitForResponse("**/api/x")`, act, `await got` | `waitForNavigation()` after an action that navigates |
41
+ | A feed that loads more as you scroll | `omowright.collectWhileScrolling(page, snoop, { minItems, maxScrolls, extract })` over a `createNetworkSnoop`: [network.md](references/owned-engine/network.md) | `session.scrollTo(target)`, then wait as in the first row |
42
+ | A person | `requestHuman(page, { prompt, until })` | `session.requestHelp({ prompt, targets })` |
43
+
44
+ **2. ONE CONNECTION PER TASK, AND A LONG WAIT GOES TO `tool.monitor`.** Keep the handle on
45
+ `globalThis` and reuse it in later cells; a new connect in every cell throws the page state away.
46
+ A cell detaches after 30 s and then blocks the js kernel, so anything that may run longer (a
47
+ person, a deploy, a slow job) is **never awaited in a cell**. Subscribe first, start the wait
48
+ without `await`, and end the cell; the event wakes you on success and on timeout alike:
31
49
 
32
50
  ```js
33
- const browser = await omowright.connectBuiltinBrowser()
34
- const [tab] = await browser.listTargets()
35
- const page = await browser.attachPage(tab.id)
36
- await page.goto(url)
51
+ // given: page
52
+ const flag = `${(await import("node:os")).tmpdir()}/signed-in-${Date.now()}.flag`
53
+ await tool.monitor({ description: "sign-in finished", path: flag, event: "create" })
54
+ globalThis.wait = page.waitForFunction(() => !!document.querySelector("[data-user]"), undefined, { timeout: 600_000 })
55
+ .then(() => Bun.write(flag, "ok"), (e) => Bun.write(flag, `failed: ${e.message}`))
37
56
  ```
38
57
 
39
- It is an OmOWright connection like `connect()`. Work in few calls: take `page.snapshot()` once, act on its refs,
40
- and chain several actions in one eval cell (`page.locator(ref).fill()`, `.click()`, `.selectOption(value)`,
41
- `.setInputFiles(path)`), snapshotting again only after the page changed. It has one tab: navigate it rather than
42
- opening new ones. `BuiltinBrowserUnavailableError` permits another engine only for `unavailable`, `timeout`, or
43
- `invalid_grant`. For `user_stopped` or any other app refusal, stop browser work and report it; do not open another browser.
58
+ The same shape holds for `requestHelp`, `requestHuman` and any other promise. For a state outside
59
+ the page (a dev server, a build) watch a command instead:
60
+ `tool.monitor({ description, command: "until curl -sf localhost:3000 >/dev/null; do sleep 1; done; printf 'READY\\n'", filter: "^READY$" })`.
44
61
 
45
- ## Step 1 — load omowright and prove the stack
62
+ **3. READ WITHIN A TOKEN BUDGET.** Read the smallest thing that answers the question:
63
+ `session.observe({ maxTokens: 4000 })` attached, and `session.read(target)` for the text, value or attributes of a few nodes; `omowright.compactSnapshot(await page.snapshot({ find: "Checkout" }))`
64
+ owned (`{ interactive: true }` for controls only, `{ diff: true }` after an action).
65
+ `omowright.snapshotTokens(snapshot).estTokens` measures a tree before you print it. From
66
+ `evaluate`, return the fields you need; never print `getHtml()`, `innerHTML` or a page's `innerText`.
46
67
 
47
- ```js
48
- const { loadOmowright } = await import("<skill-root>/scripts/omowright.mjs")
49
- const { omowright } = await loadOmowright() // { connectBrowserSkill, bskSnapshot, connectPipe, ... }
50
- ```
68
+ ## The loop (owned)
51
69
 
52
- ```bash
53
- node "<skill-root>/scripts/browser-doctor.mjs" --json
70
+ ```js
71
+ const { mkdtempSync, rmSync } = await import("node:fs"), { tmpdir } = await import("node:os"), { join } = await import("node:path")
72
+ const profile = mkdtempSync(join(tmpdir(), "omowright-"))
73
+ globalThis.browser = await omowright.connectPipe({
74
+ browserPath: omowright.detectBrowsers().find((b) => b.installed)?.binary, // bot-scored target: connectCloakProfile() instead
75
+ browserArgs: ["--headless", "--no-first-run", `--user-data-dir=${profile}`], storageRoot: profile,
76
+ })
77
+ globalThis.page = await browser.newTab("http://localhost:3000/")
78
+ await omowright.emulate(page, "iphone-14") // iphone-14 | pixel-7 | ipad-air | desktop-1440
79
+ print(omowright.compactSnapshot(await page.snapshot({ interactive: true }))) // refs (e7) come from the latest snapshot
80
+ const saved = page.waitForResponse("**/api/cart")
81
+ await page.locator("e7").click(); await saved
82
+ display(await page.screenshot())
83
+ // the task's last cell, on success and failure: await browser.close(); rmSync(profile, { recursive: true, force: true })
54
84
  ```
55
85
 
56
- | State | Meaning | Next |
57
- |---|---|---|
58
- | `ready` | CLI, daemon and a connected browser | start a session |
59
- | `no-cli` / `no-daemon` / `no-extension` | something is missing | `node "<skill-root>/scripts/browser-install.mjs" [--browser=<id>]` prepares everything it can for **the browser the user uses**, then prints the **single** step only the user can do (relaunch that browser and click **Enable**); relay it verbatim, wait, re-run the doctor |
60
- | `choose-browser` | the signals do not single out one browser (Safari/Firefox default, an idle default while another browser runs, several in use) | nothing was installed; take the browser from memory or ask the user, then `browser-install.mjs --browser=<id>` |
61
- | `no-browser-support` | no Chromium-family profile on this machine | say so and stop |
62
- | `outdated-extension` | the only connected extension is BrowserSkill 0.4.0, which leaves a "BrowserSkill" tab group in the user's browser after every task | start no session; relay the doctor's remedy (update the extension to 0.4.1 or later, delete saved "BrowserSkill" groups by hand), then re-run the doctor |
63
-
64
- **Install into the browser the user actually uses, never into whatever happens to be on disk.** Before
65
- installing, check your memory for the user's browser; otherwise read the doctor's `browser` (picked
66
- from the OS default browser, running apps and recent use — `candidates` shows the evidence). If memory
67
- and the doctor disagree, or the doctor says `choose-browser`, ask the user. Pass the answer as
68
- `--browser=<id>` and record it in memory. A Chrome that is merely installed is not their browser.
69
-
70
- **Never launch a headless browser because the attached one is missing.** It has none of the
71
- user's sessions, so every login turns into a ladder you should not be climbing. Say which state
72
- you hit and ask.
86
+ Launch, network capture, frames, coordinates and CAPTCHA: [references/owned-engine/README.md](references/owned-engine/README.md).
73
87
 
74
88
  ## The loop (attached)
75
89
 
76
90
  ```js
77
- const session = await omowright.connectBrowserSkill({ name: "<task>", focused: false })
78
- const sync = async () => (await session.cooperate("sync")).context_id // one context per page action
79
- try {
80
- await session.navigate("https://example.com/", { waitUntil: "load", context: await sync() })
81
- const { tree, refs, css } = await omowright.bskSnapshot(session, { interactive: true, context: await sync() }) // OmOWright tree + refs, no trace in the page
82
- await session.click({ selector: css.e3 }, { context: await sync() }) // css[ref] is null inside shadow roots:
83
- const vom = await session.observe({ maxTokens: 4000 }) // then read the daemon's own tree ...
84
- await session.click("@e7", { context: await sync() }) // ... and click its @eN ref
85
- await session.fill(css.e5, "hello", { context: await sync() })
86
- await session.press("Enter", { context: await sync() })
87
- await session.waitForNavigation({ waitUntil: "load" })
88
- const shot = await session.screenshot() // { buffer, width, height, captureId }
89
- } finally {
90
- await session.stop() // success AND failure; returns borrowed tabs
91
- }
91
+ globalThis.session = await omowright.connectBrowserSkill({ name: "<task>", focused: false })
92
+ const sync = async () => (await session.cooperate("sync")).context_id // strict policy: one context per gated action
93
+ await session.navigate("https://example.com/", { waitUntil: "load" }) // the first navigate needs no context
94
+ const vom = await session.observe({ maxTokens: 4000 }) // @eN refs; shadow DOM and frames included
95
+ const { items } = await session.read("a") // [{ ref, values: { text } }]: no context, no script
96
+ await session.hover("a", { context: await sync(), expect: [{ target: "a", field: "text", equals: items[0].values.text }] })
97
+ await session.press("End", { context: await sync() })
98
+ await session.navigate("https://example.org/", { waitUntil: "load", context: await sync() })
99
+ const shot = await session.screenshot() // { buffer, width, height, captureId }
100
+ // the task's last cell, on success and failure: await session.stop() // returns borrowed tabs
92
101
  ```
93
102
 
94
- 1. **Read before every action.** `bskSnapshot` refs and `observe` `@eN` refs are reissued on each
95
- call; use a ref in the same cycle you read it.
96
- 2. **Navigation and large DOM changes stale every ref.** Read again rather than reusing.
97
- 3. **Two identical failures mean change approach, not retry.** A third identical attempt is a defect.
103
+ 1. **Refs are reissued by every read, `cooperate("sync")` included.** Act on a ref in the cycle you
104
+ read it, or use a CSS selector, which resolves live; navigation and large DOM changes stale all refs.
105
+ 2. **Two identical failures mean change approach, not retry.** A third identical attempt is a defect.
106
+ 3. **Sync before every gated action except the first navigate.** Under the default `strict`
107
+ policy a context from `session.cooperate("sync")` is good for one action; reads (`observe`,
108
+ `read`, `snapshot`, `screenshot()`, `waitForElement`, `waitForNavigation`) need none. `expect`
109
+ names facts the extension checks right before the input; a false one refuses the action and
110
+ nothing reaches the page. Under strict that refusal carries `cooperation_sync_required` and
111
+ a message starting `Precondition failed:`, so read the page again instead of waiting. The `target` policy reuses one context
112
+ across DOM actions: [references/commands.md](references/commands.md). On
113
+ `cooperation_sync_required` the person is using the tab:
114
+ `session.cooperate("wait", { timeoutMs: 25_000 })` until `ready`, read again and replan; never
115
+ replay the refused action.
98
116
  4. **Borrow a user tab explicitly** (`tabList({ scope: "user" })`, `tabBorrow(id)`, `tabReturn(id)`).
99
117
  Borrowing prompts the user; never invent tab ids and never repeat a denied borrow.
100
- 5. **Always `stop()` the session,** on success and on failure.
101
- 6. **Sync before every page action.** The person at the keyboard can work in the same tab, so
102
- BrowserSkill 0.4 refuses an action (`permission_denied`, `data.reason: "cooperation_sync_required"`)
103
- unless it carries `{ context }` from the latest `session.cooperate("sync")`. A context is good
104
- for one action: sync, act with `{ context }`, sync again. Navigation, every input method,
105
- `evaluate` (and so `bskSnapshot`), `tabClose`, `resize`, `emulate`, `observe({ probeHover })` and
106
- `screenshot({ fullPage: true })` need it; plain reads (`observe`, `snapshot`, `getHtml`,
107
- `screenshot()`, `console`, `network`, `waitForNavigation`) do not.
108
- 7. **On `cooperation_sync_required`, wait for the person, then replan.** Call
109
- `session.cooperate("wait", { timeoutMs: 25_000 })` until it reports `ready`, read the page again
110
- and decide afresh; never replay the refused action blindly.
111
- 8. **Pass only the options a method takes.** A gated action throws a `TypeError` on any other key
112
- (a misspelt `contextId` would otherwise send no context). `bskSnapshot` and
113
- `screenshot({ fullPage: true })` do not throw: they drop the stray key, and the daemon then
114
- refuses the call with `cooperation_sync_required`.
115
-
116
- Every method, its options, and the failure codes are in [references/commands.md](references/commands.md).
118
+ 5. **Always `stop()` the session**, and keep `focused: false`: the browser belongs to someone who is
119
+ probably using it.
120
+
121
+ Every method, its options, the gated list and the failure codes: [references/commands.md](references/commands.md).
117
122
 
118
123
  ## When a human is the only way through
119
124
 
120
125
  Login, CAPTCHA, OTP, a payment confirmation, a consent dialog:
121
126
 
122
127
  ```js
123
- const outcome = await session.requestHelp({ prompt: "<what you need done>", targets: ["@e4"], timeoutMs: 300_000 })
128
+ const flag = `${(await import("node:os")).tmpdir()}/help-${Date.now()}.flag`
129
+ await tool.monitor({ description: "help finished", path: flag, event: "create" })
130
+ globalThis.help = session.requestHelp({ prompt: "<what you need done>", targets: ["@e4"], timeoutMs: 300_000 })
131
+ .then((r) => Bun.write(flag, r.outcome), (e) => Bun.write(flag, `failed: ${e.message}`))
124
132
  ```
125
133
 
126
- Then read the page again. Respect a `cancelled` or `timed_out` outcome; do not work around it by
127
- changing the extension's automation settings.
134
+ A person takes longer than a cell, so this is rule 2. When the event arrives, read the flag and
135
+ the page again. Respect a `cancelled` or `timed_out` outcome; do not work around it by changing
136
+ the extension's automation settings.
128
137
 
129
138
  ## Rules
130
139
 
@@ -132,17 +141,17 @@ changing the extension's automation settings.
132
141
  cookie or recovery code. The value of the attached engine is that the browser is already signed in.
133
142
  - **Never clear cookies, cache or site data.** It is the user's real profile; clearing it logs them
134
143
  out everywhere. No flow here needs it.
135
- - **`focused: false` by default.** The browser belongs to someone who is probably using it.
136
- - **One short, named session per task,** always stopped.
137
- - **Bot-scored or WAF targets never go through the attached engine** — route them to the `ultimate-browsing` skill, whose browser tier is the owned engine (`connectCloakProfile()`). The attached engine's daemon enables console
138
- capture on every tab it drives, which is a known automation signal.
144
+ - **Bot-scored or WAF targets never go through the attached engine** — route them to the
145
+ `ultimate-browsing` skill, whose browser tier is `connectCloakProfile()`. The attached engine's
146
+ daemon enables console capture on every tab it drives, which is a known automation signal.
139
147
 
140
148
  ## Where the rest lives
141
149
 
142
150
  | Topic | Read |
143
151
  |---|---|
144
152
  | Session methods, targets, options, error codes | [references/commands.md](references/commands.md) |
145
- | Installing: CLI, daemon, extension, the one human step, blocklisted extension | [references/install.md](references/install.md) |
153
+ | Doctor states, installing the CLI, daemon and extension, the one human step | [references/install.md](references/install.md) |
154
+ | The built-in browser inside OmO Desktop | [references/desktop.md](references/desktop.md) |
146
155
  | Agent on one machine, browser on another | [references/remote.md](references/remote.md) |
147
156
  | Owned engine: launch, snapshot ladder, network, frames, human handoff | [references/owned-engine/README.md](references/owned-engine/README.md) |
148
157
  | Reading a 1Password vault the user has unlocked | [references/recipes/1password.md](references/recipes/1password.md) |
@@ -6,10 +6,11 @@ daemon's tool surface; options are the daemon's parameter names in camelCase.
6
6
  ## Sessions
7
7
 
8
8
  ```js
9
+ // given: omowright (from the loader in SKILL.md)
9
10
  const session = await omowright.connectBrowserSkill({ name: "<task>", focused: false, browser: "<instance id>", width: 1200, height: 800 })
10
11
  session.sessionId // four letters, e.g. "ckhg"
11
12
  session.browserInstanceId // which connected browser owns the Agent Window
12
- await session.stop() // ALWAYS, on success and failure
13
+ // the task's last cell, on success and failure: await session.stop() (the examples below use this session)
13
14
  ```
14
15
 
15
16
  `browser` is needed only when more than one browser is connected (`bskDoctor()` lists them).
@@ -17,36 +18,68 @@ await session.stop() // ALWAYS, on success and failure
17
18
  on purpose. Throws `BskRpcError` `no_browser_connected` when no extension is attached — that is a
18
19
  stop, not a cue to launch something else.
19
20
 
20
- ## Shared control (BrowserSkill 0.4+)
21
+ ## Shared control (BrowserSkill 0.5)
21
22
 
22
- The person at the keyboard can work in the task tab while you do, so the extension refuses every
23
- gated page action with `permission_denied` / `data.reason: "cooperation_sync_required"` unless it
24
- carries the `context_id` of the latest `session.cooperate("sync")`. The daemon never fills it in
25
- for you.
23
+ The person at the keyboard can work in the task tab while you do, so the extension refuses a gated
24
+ page action unless it carries what the latest `session.cooperate("sync")` returned. The daemon
25
+ never fills it in for you. Every gated action takes `{ context, observation, expect, dependsOn }`
26
+ besides its own options.
27
+
28
+ A session runs under one control policy, chosen by its first sync and fixed after that (a sync
29
+ naming the other policy fails with `invalid_params`; start a new session to change it):
30
+
31
+ | Action | `strict` (the default) | `target` (`cooperate("sync", { controlPolicy: "target" })`) |
32
+ |---|---|---|
33
+ | `click`, `hover`, `fill` and the other calls on a ref or selector | a fresh `context` per action | `context`; the same one serves the next DOM action |
34
+ | `evaluate` (and so `bskSnapshot`) | a fresh `context` per action | `context` plus an unused `observation`, or `expect` facts, or `unverified: true` |
35
+ | `press` with no target, `navigate` | a fresh `context` per action | `context` plus an unused `observation` |
36
+ | `dependsOn` | narrows the check to the observed regions your decision used | refused; state facts in `expect` |
26
37
 
27
38
  ```js
39
+ // strict: one context, one action
28
40
  const sync = async () => (await session.cooperate("sync")).context_id
29
- await session.click("@e3", { context: await sync() }) // one context, one action
41
+ await session.click("@e3", { context: await sync() })
30
42
  await session.fill("#q", "hello", { clearBefore: true, context: await sync() })
43
+
44
+ // target: one context for DOM actions, one observation per script, untargeted key or navigate
45
+ const s = await session.cooperate("sync", { controlPolicy: "target" })
46
+ await session.click("#apply-coupon", { context: s.context_id })
47
+ await session.click("#checkout", { context: s.context_id, expect: [{ target: "#total", field: "text", equals: "$3.00" }] })
48
+ const next = await session.cooperate("sync")
49
+ await session.press("Enter", { context: next.context_id, observation: next.observation_id })
31
50
  ```
32
51
 
33
52
  | Call | Use |
34
53
  |---|---|
35
- | `session.cooperate("sync", { tabId, maxTokens })` | returns `{ context_id, ... }`; pass it as `{ context }` to the next gated action, then sync again |
54
+ | `session.cooperate("sync", { controlPolicy, tabId, maxTokens })` | returns `{ context_id, observation_id, ... }`; pass them as `{ context, observation }`. An observation is good for one action |
36
55
  | `session.cooperate("wait", { tabId, timeoutMs })` | after `cooperation_sync_required`: blocks (at most 25 s per call) until the person is done; repeat until it reports `ready`, then sync and replan from the live page |
37
56
 
38
- - **Gated** (need `{ context }`): `navigate` (except the first navigation of the untouched blank tab),
39
- `back`, `forward`, `reload`, `click`, `hover`, `focus`, `blur`, `fill`, `press`, `select`,
40
- `scrollTo`, `wheel`, `evaluate` (and so `bskSnapshot`), `tabClose`, `resize`, `emulate`,
41
- `observe({ probeHover: true })`, `screenshot({ fullPage: true })`.
42
- - **Not gated:** `observe`, `snapshot`, `getHtml`, `screenshot()`, `console`, `network`,
43
- `waitForNavigation`, the tab list/borrow/return calls, `requestHelp`.
44
- - `dependsOn: ["@e2", ...]` narrows the check to the observed regions your decision used.
45
- - A gated action accepts only its own options plus `{ context, dependsOn }`; any other key
46
- (`contextId`, a stray option copied from another method) throws a `TypeError` before anything is
47
- sent. Two exceptions: `bskSnapshot` and `screenshot({ fullPage: true })` pass unknown keys
48
- through instead of throwing, so a misspelt `contextId` there sends no context and the daemon
49
- refuses the call with `cooperation_sync_required`.
57
+ - **`expect`** is a list of literal facts the extension checks right before the input:
58
+ `{ target, field, equals }`, where `field` is `text`, `value`, `checked`, `attribute` or `exists`.
59
+ A false fact refuses the action with `effect_state: "none"`, so nothing reached the page. The
60
+ reason differs by policy: under `target` it is `precondition_failed`; under `strict` it is
61
+ `cooperation_sync_required` with a message starting `Precondition failed: <target> <field>`.
62
+ Recognise the strict case by that prefix, and read the page again instead of calling
63
+ `cooperate("wait")`.
64
+ Use it for the fact your decision rests on: the total you are about to pay, the row you are about
65
+ to delete.
66
+ - **The first `navigate`** of a session needs no context. If the extension refuses it because the new
67
+ task tab is still committing its blank document, `navigate` waits for the tab to settle and sends
68
+ it once more by itself; it throws only when the tab never settles, naming the tab's state.
69
+ - **Gated:** `navigate` (after the first), `back`, `forward`, `reload`, `click`, `hover`, `focus`,
70
+ `blur`, `fill`, `press`, `select`, `scrollTo`, `wheel`, `drag`, `evaluate` (and so
71
+ `bskSnapshot`), `tabClose`, `resize`, `emulate`, `observe({ probeHover: true })`,
72
+ `screenshot({ fullPage: true })`.
73
+ - **Not gated:** `observe`, `snapshot`, `getHtml`, `read`, `extract`, `screenshot()`, `console`,
74
+ `network`, `waitForElement`, `waitForNavigation`, `tabList`, `tabCreate`, `tabSelect`,
75
+ `tabBorrow`, `tabReturn`, `requestHelp`.
76
+ - A method that reads or acts on a tab accepts only its own options (plus
77
+ `{ context, observation, expect, dependsOn }`);
78
+ any other key (`contextId`, an option copied from another method) throws a `TypeError` before
79
+ anything is sent, plain `observe()` included. Two calls do not throw:
80
+ `screenshot({ fullPage: true })` drops an unknown key and `bskSnapshot` passes it on as a
81
+ snapshot option, so a misspelt `contextId` there sends no context and the daemon refuses the
82
+ call with `cooperation_sync_required`.
50
83
  - Never replay a refused action blindly: the page may have changed under the person's hands.
51
84
 
52
85
  ## Targets
@@ -54,8 +87,8 @@ await session.fill("#q", "hello", { clearBefore: true, context: await sync() })
54
87
  | Form | Meaning |
55
88
  |---|---|
56
89
  | `"@e3"` / `"e3"` | a ref from the last `observe()` / `snapshot()` |
57
- | `"#login > button"` | a CSS selector, resolved live |
58
- | `{ captureId, x, y }` | a point in a screenshot, from `screenshot()` |
90
+ | `"#login > button"` | a CSS selector, resolved live in the main document; a gated action refuses one that matches more than one element (`invalid_params`, `target_unavailable`) |
91
+ | `{ captureId, x, y }` | a point in a screenshot, from `screenshot()`; `click` only. `captureId` is `null` when the daemon reports `captureUnavailable`; use a ref or selector then |
59
92
  | `css.e3` from `bskSnapshot` | the light-DOM CSS path of an OmOWright ref (`null` inside shadow roots — use the daemon ref instead) |
60
93
 
61
94
  ## Reading
@@ -65,9 +98,16 @@ await session.fill("#q", "hello", { clearBefore: true, context: await sync() })
65
98
  | `bskSnapshot(session, { interactive, maxDepth, context })` | `{ tree, refs, css }` — the OmOWright accessibility tree with refs, computed in the page **without** leaving a global or touching the DOM |
66
99
  | `session.observe({ maxTokens, cursor, probeHover })` | the daemon's semantic tree (`@vom`) with `@eN` refs, layers and hover probes — **the default read for shadow DOM and iframes** |
67
100
  | `session.snapshot({ maxDepth, maxTokens })` | the daemon's plain accessibility tree |
101
+ | `session.read(target, { fields, maxNodes })` | `{ items: [{ ref, values: { text, ... } }], page_url, title }` for the matching nodes, with no script and no context; `items` is empty when nothing matches. Each field is an object: `fields: [{ key: "href", read: "attribute", attribute: "href" }]` puts the link's `href` in `values.href` (`read` is `text`, `attribute`, `value`, `checked` or `exists`) |
102
+ | `session.extract("table" \| "list" \| "discover", { target, itemSelector, fields })` | rows of a table or list |
68
103
  | `session.getHtml({ ref, maxBytes })` | exact markup |
69
104
  | `session.screenshot({ ref })` / `screenshot({ fullPage: true })` | `{ buffer, width, height, captureId }`; full-page captures stream back in chunks |
70
- | `session.evaluate(expression, { awaitPromise, timeoutMs, context })` | `{ ok, value, error }` — **check `.ok`**; a resolved promise does not mean the script succeeded |
105
+ | `session.evaluate(expression, { awaitPromise, timeoutMs, unverified, context })` | `{ ok, value, error }` — **check `.ok`**; a resolved promise does not mean the script succeeded |
106
+
107
+ Prefer `read` or `extract` to `evaluate` whenever the answer is already in the DOM (a heading, an
108
+ input's value, a link's `href`, a table): they need no sync, cannot change the page, and pass the
109
+ field traps below. Keep `evaluate` for values the page computes (`location.href`, layout, app
110
+ state) and for waiting on a state that `waitForElement` cannot express.
71
111
  | `session.console({ since })` / `session.network({ since })` | buffered console entries / request metadata (no bodies) |
72
112
 
73
113
  **Refs are reissued by every read.** Read a ref and act on it in the same cycle. A ref captured
@@ -76,7 +116,7 @@ neighbouring row.
76
116
 
77
117
  ## Acting
78
118
 
79
- Every call here is gated: add `context` (from `cooperate("sync")`) to its options object, as in
119
+ Every call here except `waitForElement()` and `waitForNavigation()` is gated: add `context` (from `cooperate("sync")`) to its options object, as in
80
120
  `session.click(target, { context })`, `session.resize(width, height, { context })`,
81
121
  `session.tabClose(id, { context })`.
82
122
 
@@ -88,11 +128,17 @@ Every call here is gated: add `context` (from `cooperate("sync")`) to its option
88
128
  | Key | `session.press("Enter", { target, modifiers, holdMs })` |
89
129
  | Hover | `session.hover(target, { settleMs })` |
90
130
  | Scroll into view | `session.scrollTo(target)` |
131
+ | Drag | `session.drag(source, { target, delta: { x, y }, mode })` |
91
132
  | Wheel | `session.wheel({ deltaY: 600, target })` |
92
133
  | Focus / blur | `session.focus(target)` / `session.blur(target)` |
93
134
  | Navigate | `session.navigate(url, { waitUntil: "load" \| "domcontentloaded" \| "networkidle" \| "commit", timeoutMs })`, `back()`, `forward()`, `reload({ hard })`, `waitForNavigation()` |
94
135
  | Window | `session.resize(width, height)`, `session.emulate({ overrides: { width, mobile } })` |
95
136
 
137
+ Waiting is never a fixed delay: `navigate(url, { waitUntil: "networkidle" })` for a page that renders
138
+ after load, `waitForNavigation()` after an action that navigates,
139
+ `waitForElement(target, { state: "visible" | "hidden" | "attached" | "detached", timeoutMs })` for an
140
+ element, and for any other state `evaluate("new Promise((done) => { /* resolve when the state holds */ })", { awaitPromise: true, timeoutMs, context })`.
141
+
96
142
  Traps:
97
143
 
98
144
  - `select` takes the option's **value attribute**, not its visible label.
@@ -103,11 +149,21 @@ Traps:
103
149
  - Hover-only controls report `element not visible`: hover the trigger, read again, then act on the
104
150
  revealed item's fresh ref. `observe({ probeHover: true })` finds one when no marker does, at the
105
151
  cost of touching the live page.
106
- - The clipboard is unavailable in a window started `focused: false`, so read values out of the DOM.
152
+
153
+ ### Field traps in any Chromium-based browser
154
+
155
+ - **A frame injected by another extension** (a password manager, a translator, a grammar checker)
156
+ can make the debugger refuse the whole tab. It is usually transient: do
157
+ the work in one `evaluate`, or navigate away and back, then read again.
158
+ - **A control inside another extension's own frame can never be driven.** Its frame belongs to that
159
+ extension, not to the page. Hand that click to the person with `requestHelp`.
160
+ - **Clipboard writes fail in an unfocused Agent Window**, and `focused: false` is the default you
161
+ should keep. Read the value out of the DOM with `read` instead of copying it.
107
162
 
108
163
  ## Tabs
109
164
 
110
165
  ```js
166
+ // given: tabId, url, id (a tab id from tabs, the URL to open, the id tabCreate returned)
111
167
  const { tabs } = await session.tabList({ scope: "user" }) // "user" | "agent" | "all"
112
168
  await session.tabBorrow(tabId) // the user confirms in the browser (60 s)
113
169
  await session.tabReturn(tabId) // stop() returns anything still borrowed
@@ -119,10 +175,15 @@ Never invent tab ids and never repeat a denied borrow.
119
175
  ## Humans
120
176
 
121
177
  ```js
122
- const { outcome } = await session.requestHelp({ prompt, title, targets: ["@e4"], completionCriteria, timeoutMs })
178
+ const flag = `${(await import("node:os")).tmpdir()}/help-${Date.now()}.flag`
179
+ await tool.monitor({ description: "help finished", path: flag, event: "create" }) // subscribe first
180
+ globalThis.help = session.requestHelp({ prompt: "Please finish the sign-in, then continue.", targets: ["@e4"], timeoutMs: 300_000 }) // optional: title, completionCriteria
181
+ .then((r) => Bun.write(flag, r.outcome), (e) => Bun.write(flag, `failed: ${e.message}`))
123
182
  // outcome: "completed" | "continued" | "cancelled" | "timed_out" | "navigated" | "disabled"
124
183
  ```
125
184
 
185
+ Never `await` it in an eval cell: a person takes longer than a cell (SKILL.md rule 2).
186
+
126
187
  ## Errors
127
188
 
128
189
  Every refusal is a `BskRpcError` with the daemon's own `code`:
@@ -132,7 +193,11 @@ Every refusal is a `BskRpcError` with the daemon's own `code`:
132
193
  | `no_browser_connected` | no extension attached | run the onboarding script, relay the human step, wait |
133
194
  | `not_found` | stale ref or unknown session | read again; if the session is gone, start a new one |
134
195
  | `invalid_params` | wrong option shape | fix the call, do not retry as-is |
135
- | `permission_denied` with `data.reason: "cooperation_sync_required"` | a gated action without the latest sync context, or the person is using the tab | `cooperate("wait")` until `ready`, sync, read the page again, replan |
196
+ | `permission_denied` with `data.reason: "cooperation_sync_required"` (any other message) | a gated action without the latest sync context, or the person is using the tab | `cooperate("wait")` until `ready`, sync, read the page again, replan |
197
+ | `permission_denied` with `data.reason: "precondition_failed"` (target), or `cooperation_sync_required` with a message starting `Precondition failed:` (strict) | an `expect` fact was false; nothing was sent | read the page again and decide afresh |
198
+ | `permission_denied` with `data.reason: "observation_required"` | target policy: a script, an untargeted key or a navigate with no observation, or with one already used | sync, pass `{ context, observation }` (or `expect` for a script) |
199
+ | `permission_denied` with `data.reason: "observation_changed"` | target policy: the page changed between the sync and this action | sync again, read, replan |
200
+ | `data.reason: "control_context_invalid"` | the keyboard focus changed since the sync | sync again, read, replan |
136
201
  | `permission_denied` (any other reason) | `evaluate` on a tab outside the Agent Window, or a denied borrow | stop; the user said no |
137
202
  | `timeout` | the tool did not finish in its budget | read the page state before retrying once |
138
203
  | `user_aborted` | the user pressed Stop in the browser | stop the task and report |
@@ -0,0 +1,22 @@
1
+ # The built-in browser inside OmO Desktop
2
+
3
+ When `OMO_BROWSER_ENGINE` is set (the OmO desktop app sets it for every session), both engines work exactly
4
+ as in the terminal. The app adds one more option:
5
+
6
+ | Option | What it is | Use it when |
7
+ |---|---|---|
8
+ | `connectBuiltinBrowser()` | OmO's built-in browser for this thread: the tab the user sees beside the chat, which they can watch, take over and share | the user should see the page while you work, the task is QA of something in the app, or a sign-in the user should do themselves in a visible tab |
9
+
10
+ ```js
11
+ // given: omowright, url
12
+ const browser = await omowright.connectBuiltinBrowser()
13
+ const [tab] = await browser.listTargets()
14
+ const page = await browser.attachPage(tab.id)
15
+ await page.goto(url)
16
+ ```
17
+
18
+ It is an OmOWright connection like `connect()`. Work in few calls: take `page.snapshot()` once, act on its refs,
19
+ and chain several actions in one eval cell (`page.locator(ref).fill()`, `.click()`, `.selectOption(value)`,
20
+ `.setInputFiles(path)`), snapshotting again only after the page changed. It has one tab: navigate it rather than
21
+ opening new ones. `BuiltinBrowserUnavailableError` permits another engine only for `unavailable`, `timeout`, or
22
+ `invalid_grant`. For `user_stopped` or any other app refusal, stop browser work and report it; do not open another browser.
@@ -1,5 +1,23 @@
1
1
  # Installing the attached engine
2
2
 
3
+ ## Doctor states
4
+
5
+ `node "<skill-root>/scripts/browser-doctor.mjs" --json` reports one state:
6
+
7
+ | State | Meaning | Next |
8
+ |---|---|---|
9
+ | `ready` | CLI, daemon and a connected browser | start a session |
10
+ | `no-cli` / `no-daemon` / `no-extension` | something is missing | `node "<skill-root>/scripts/browser-install.mjs" [--browser=<id>]` prepares everything it can for **the browser the user uses**, then prints the **single** step only the user can do (relaunch that browser and click **Enable**); relay it verbatim, wait, re-run the doctor |
11
+ | `choose-browser` | the signals do not single out one browser (Safari/Firefox default, an idle default while another browser runs, several in use) | nothing was installed; take the browser from memory or ask the user, then `browser-install.mjs --browser=<id>` |
12
+ | `no-browser-support` | no Chromium-family profile on this machine | say so and stop |
13
+ | `outdated-extension` | the only connected extension is BrowserSkill 0.4.0, which leaves a "BrowserSkill" tab group in the user's browser after every task | start no session; relay the doctor's remedy (update the extension to 0.4.1 or later, delete saved "BrowserSkill" groups by hand), then re-run the doctor |
14
+
15
+ **Install into the browser the user actually uses, never into whatever happens to be on disk.** Before
16
+ installing, check your memory for the user's browser; otherwise read the doctor's `browser` (picked
17
+ from the OS default browser, running apps and recent use — `candidates` shows the evidence). If memory
18
+ and the doctor disagree, or the doctor says `choose-browser`, ask the user. Pass the answer as
19
+ `--browser=<id>` and record it in memory. A Chrome that is merely installed is not their browser.
20
+
3
21
  Three pieces. The onboarding script prepares all three; a human finishes exactly one.
4
22
 
5
23
  | Piece | Channel | Automatable |
@@ -4,10 +4,12 @@ A browser **your code launches and owns**, driven over CDP by omowright with its
4
4
  opposite of the attached engine: no user logins, full control.
5
5
 
6
6
  ```js
7
+ const { loadOmowright } = await import("<skill-root>/scripts/omowright.mjs")
7
8
  const { omowright } = await loadOmowright()
9
+ const { mkdtempSync, rmSync } = await import("node:fs"), { tmpdir } = await import("node:os"), { join } = await import("node:path")
8
10
  const profile = mkdtempSync(join(tmpdir(), "omowright-"))
9
11
  const browser = await omowright.connectPipe({
10
- browserPath: "<CloakBrowser or chrome-headless-shell binary>",
12
+ browserPath: omowright.detectBrowsers().find((b) => b.installed)?.binary, // or omowright.findCloakBrowserPath(); never a guessed path
11
13
  browserArgs: ["--headless", "--no-first-run", `--user-data-dir=${profile}`],
12
14
  storageRoot: profile,
13
15
  dialogPolicy: { accept: true },
@@ -49,7 +51,10 @@ blocked URL, neither: use the `ultimate-browsing` skill.
49
51
 
50
52
  `OmOPage` is Playwright-shaped: `goto`, `snapshot`, `locator(ref | css)`, `click`, `fill`,
51
53
  `press`, `hover`, `check`, `selectOption`, `dragTo`, `setInputFiles`, `screenshot`, `pdf`,
52
- `evaluate`, `waitForURL`, `keyboard`, `mouse`, `frameLocator`. A snapshot is an accessibility tree
54
+ `evaluate`, `keyboard`, `mouse`, `frameLocator`, `getByRole` / `getByText` / `getByLabel`, and the
55
+ waits `waitForFunction(fn, arg, { timeout })`, `waitForResponse` / `waitForRequest`, `waitForURL`,
56
+ `waitForLoadState`, `locator.waitFor`. `page.emulateMedia({ colorScheme, reducedMotion })` sets
57
+ media features; raw `Emulation.*` CDP is never needed. A snapshot is an accessibility tree
53
58
  with virtual refs (`[ref=e3]`, cross-origin frames as `f1e3`); `compactSnapshot()` drops the refs
54
59
  map, about half the bytes. Readiness is a content probe (body plus interactive elements, landmarks
55
60
  or text), not a timer; `goto(url, { waitUntil: "commit" })` is the escape hatch for empty pages.
@@ -36,6 +36,7 @@ and the `dialog.url` getter). A listener can answer it itself, which replaces th
36
36
  dialog; a listener that only observes leaves it to the policy:
37
37
 
38
38
  ```js
39
+ // given: page, omowright
39
40
  page.on("dialog", (dialog) => dialog.type() === "prompt" ? dialog.accept("42") : dialog.dismiss())
40
41
  ```
41
42
 
@@ -56,13 +57,19 @@ When every rung fails on a login, a one-time code, or a challenge you cannot cle
56
57
  the fallback, not the failure:
57
58
 
58
59
  ```js
59
- const { outcome } = await omowright.requestHuman(page, {
60
+ const flag = `${(await import("node:os")).tmpdir()}/signed-in-${Date.now()}.flag`
61
+ await tool.monitor({ description: "sign-in finished", path: flag, event: "create" }) // subscribe first
62
+ globalThis.handoff = omowright.requestHuman(page, {
60
63
  prompt: "Please finish the sign-in in this window.",
61
64
  until: { url: /\/dashboard/ }, // or { selector } or async (page) => boolean
62
65
  timeoutMs: 300_000,
63
- })
66
+ }).then((r) => Bun.write(flag, r.outcome), (e) => Bun.write(flag, `failed: ${e.message}`))
64
67
  ```
65
68
 
69
+ Never `await` it in the cell: a person takes longer than a cell, and the page stays usable from
70
+ other cells while the handoff is pending (measured: a second cell snapshotted the page 6 s in,
71
+ before the person finished).
72
+
66
73
  It brings the window to the front, shows a banner with a Done button, and waits on a
67
74
  **condition** with a bounded timeout rather than a fixed delay. Respect the answer: `timed_out`
68
75
  or `cancelled` is a stop, and the correct response is to report which rung failed with what