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.
- package/.agents/command/remove-deadcode.md +1 -1
- package/.agents/skills/remove-deadcode/SKILL.md +1 -1
- package/.agents/skills/work-with-pr/SKILL.md +2 -2
- package/.opencode/command/remove-deadcode.md +1 -1
- package/.opencode/skills/work-with-pr/SKILL.md +2 -2
- package/THIRD-PARTY-NOTICES.md +9 -3
- package/dist/cli/cli-program.d.ts +3 -0
- package/dist/cli/index.js +1197 -1008
- package/dist/cli/service-auth/devices.d.ts +5 -2
- package/dist/cli-node/index.js +1197 -1008
- package/dist/config/schema/agent-names.d.ts +1 -0
- package/dist/index.js +194 -213
- package/dist/skills/browser/SKILL.md +100 -91
- package/dist/skills/browser/references/commands.md +92 -27
- package/dist/skills/browser/references/desktop.md +22 -0
- package/dist/skills/browser/references/install.md +18 -0
- package/dist/skills/browser/references/owned-engine/README.md +7 -2
- package/dist/skills/browser/references/owned-engine/frames-and-humans.md +9 -2
- package/dist/skills/browser/references/owned-engine/network.md +13 -7
- package/dist/skills/browser/references/recipes/1password.md +6 -2
- package/dist/skills/browser/runtime/omowright/index.js +15 -15
- package/dist/skills/browser/runtime/omowright/manifest.json +4 -4
- package/dist/skills/debugging/SKILL.md +1 -1
- package/dist/skills/debugging/references/tools/browser-qa.md +1 -1
- package/dist/skills/git/SKILL.md +62 -0
- package/dist/skills/git/agents/openai.yaml +13 -0
- package/dist/skills/github/SKILL.md +94 -0
- package/dist/skills/github/references/branch-rules.md +129 -0
- package/dist/skills/github/references/evidence-attachments.md +16 -0
- package/dist/skills/github/references/repo-setup.md +152 -0
- package/dist/skills/github/references/waiting.md +52 -0
- package/dist/skills/github/references/workflows.md +161 -0
- package/dist/skills/github/scripts/cli.ts +8 -0
- package/dist/skills/github/scripts/package.json +12 -0
- package/dist/skills/github/scripts/sdk.ts +11 -0
- package/dist/skills/github/scripts/src/account.ts +243 -0
- package/dist/skills/github/scripts/src/actions-write.ts +86 -0
- package/dist/skills/github/scripts/src/actions.ts +210 -0
- package/dist/skills/github/scripts/src/attestations.ts +136 -0
- package/dist/skills/github/scripts/src/blake2b.ts +102 -0
- package/dist/skills/github/scripts/src/branch-protection.ts +192 -0
- package/dist/skills/github/scripts/src/caches.ts +105 -0
- package/dist/skills/github/scripts/src/checks.ts +107 -0
- package/dist/skills/github/scripts/src/codespaces.ts +230 -0
- package/dist/skills/github/scripts/src/conversation-lock.ts +50 -0
- package/dist/skills/github/scripts/src/discussion-list.ts +126 -0
- package/dist/skills/github/scripts/src/discussion-lookup.ts +127 -0
- package/dist/skills/github/scripts/src/discussions.ts +234 -0
- package/dist/skills/github/scripts/src/env.ts +100 -0
- package/dist/skills/github/scripts/src/errors.ts +79 -0
- package/dist/skills/github/scripts/src/fields.ts +27 -0
- package/dist/skills/github/scripts/src/gist-shape.ts +58 -0
- package/dist/skills/github/scripts/src/gists-write.ts +130 -0
- package/dist/skills/github/scripts/src/gists.ts +118 -0
- package/dist/skills/github/scripts/src/git-auth.ts +46 -0
- package/dist/skills/github/scripts/src/http.ts +159 -0
- package/dist/skills/github/scripts/src/issue-develop.ts +118 -0
- package/dist/skills/github/scripts/src/issues-extra.ts +135 -0
- package/dist/skills/github/scripts/src/issues-write.ts +174 -0
- package/dist/skills/github/scripts/src/issues.ts +156 -0
- package/dist/skills/github/scripts/src/keys.ts +176 -0
- package/dist/skills/github/scripts/src/labels.ts +209 -0
- package/dist/skills/github/scripts/src/merge.ts +115 -0
- package/dist/skills/github/scripts/src/poly1305.ts +22 -0
- package/dist/skills/github/scripts/src/pr-checkout.ts +92 -0
- package/dist/skills/github/scripts/src/pr-view.ts +106 -0
- package/dist/skills/github/scripts/src/project-fields.ts +144 -0
- package/dist/skills/github/scripts/src/project-item-edit.ts +153 -0
- package/dist/skills/github/scripts/src/project-items.ts +191 -0
- package/dist/skills/github/scripts/src/project-links.ts +104 -0
- package/dist/skills/github/scripts/src/project-ref.ts +145 -0
- package/dist/skills/github/scripts/src/project-state.ts +99 -0
- package/dist/skills/github/scripts/src/projects.ts +158 -0
- package/dist/skills/github/scripts/src/pulls-extra.ts +165 -0
- package/dist/skills/github/scripts/src/pulls-read.ts +176 -0
- package/dist/skills/github/scripts/src/pulls-review.ts +206 -0
- package/dist/skills/github/scripts/src/pulls-write.ts +187 -0
- package/dist/skills/github/scripts/src/raw.ts +78 -0
- package/dist/skills/github/scripts/src/read.ts +77 -0
- package/dist/skills/github/scripts/src/release-assets.ts +111 -0
- package/dist/skills/github/scripts/src/release-download.ts +151 -0
- package/dist/skills/github/scripts/src/release-write.ts +197 -0
- package/dist/skills/github/scripts/src/repo-admin.ts +112 -0
- package/dist/skills/github/scripts/src/repo-content.ts +187 -0
- package/dist/skills/github/scripts/src/repo-create.ts +139 -0
- package/dist/skills/github/scripts/src/repo-extras.ts +217 -0
- package/dist/skills/github/scripts/src/repo-list.ts +143 -0
- package/dist/skills/github/scripts/src/repo-settings.ts +176 -0
- package/dist/skills/github/scripts/src/repo-sync.ts +81 -0
- package/dist/skills/github/scripts/src/repo-url.ts +104 -0
- package/dist/skills/github/scripts/src/repos.ts +87 -0
- package/dist/skills/github/scripts/src/ruleset-shape.ts +96 -0
- package/dist/skills/github/scripts/src/rulesets-write.ts +124 -0
- package/dist/skills/github/scripts/src/rulesets.ts +80 -0
- package/dist/skills/github/scripts/src/run-download.ts +88 -0
- package/dist/skills/github/scripts/src/salsa20.ts +97 -0
- package/dist/skills/github/scripts/src/scopes.ts +165 -0
- package/dist/skills/github/scripts/src/sealed-box.ts +75 -0
- package/dist/skills/github/scripts/src/search-commits.ts +114 -0
- package/dist/skills/github/scripts/src/search.ts +116 -0
- package/dist/skills/github/scripts/src/secrets.ts +131 -0
- package/dist/skills/github/scripts/src/snappy.ts +57 -0
- package/dist/skills/github/scripts/src/status-search.ts +55 -0
- package/dist/skills/github/scripts/src/transfer.ts +97 -0
- package/dist/skills/github/scripts/src/types.ts +75 -0
- package/dist/skills/github/scripts/src/variables.ts +86 -0
- package/dist/skills/github/scripts/src/wait.ts +164 -0
- package/dist/skills/github/scripts/src/wire.ts +159 -0
- package/dist/skills/github/scripts/src/workflows.ts +144 -0
- package/dist/skills/github/scripts/src/zip.ts +104 -0
- package/dist/skills/github/scripts/surface.ts +106 -0
- package/dist/skills/github/scripts/vendor/surface/SOURCE.json +15 -0
- package/dist/skills/github/scripts/vendor/surface/cli.ts +203 -0
- package/dist/skills/github/scripts/vendor/surface/flags.ts +195 -0
- package/dist/skills/github/scripts/vendor/surface/help.ts +89 -0
- package/dist/skills/github/scripts/vendor/surface/http.ts +180 -0
- package/dist/skills/github/scripts/vendor/surface/index.ts +44 -0
- package/dist/skills/github/scripts/vendor/surface/mcp.ts +241 -0
- package/dist/skills/github/scripts/vendor/surface/schema.ts +200 -0
- package/dist/skills/github/scripts/vendor/surface/stdio.ts +54 -0
- package/dist/skills/github/scripts/vendor/surface/surface.ts +250 -0
- package/dist/skills/github/scripts/vendor/surface/tools.ts +80 -0
- package/dist/skills/programming/SKILL.md +51 -320
- package/dist/skills/programming/references/go/README.md +1 -0
- package/dist/skills/programming/references/python/README.md +21 -3
- package/dist/skills/programming/references/python/error-handling.md +14 -0
- package/dist/skills/programming/references/rust/README.md +5 -1
- package/dist/skills/programming/references/typescript/README.md +9 -3
- package/dist/skills/programming/references/typescript/error-handling.md +18 -0
- package/dist/skills/ultimate-browsing/SKILL.md +1 -1
- package/dist/skills/ulw-execute/SKILL.md +1 -1
- package/dist/skills/visual-qa/references/browser-setup.md +5 -5
- package/dist/tui.js +32 -29
- package/package.json +28 -26
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +2 -2
- package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
- package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
- package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/package.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +8711 -172
- package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +8660 -121
- package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/src/posthog.ts +5 -0
- package/packages/omo-codex/plugin/components/telemetry/tsconfig.json +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +5 -5
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/SKILL.md +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +3 -3
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-recording-spawn-admission.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-execute-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/package-lock.json +12 -12
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/shared/src/config-loader.ts +15 -1
- package/packages/omo-codex/plugin/skills/browser/SKILL.md +100 -91
- package/packages/omo-codex/plugin/skills/browser/references/commands.md +92 -27
- package/packages/omo-codex/plugin/skills/browser/references/desktop.md +22 -0
- package/packages/omo-codex/plugin/skills/browser/references/install.md +18 -0
- package/packages/omo-codex/plugin/skills/browser/references/owned-engine/README.md +7 -2
- package/packages/omo-codex/plugin/skills/browser/references/owned-engine/frames-and-humans.md +9 -2
- package/packages/omo-codex/plugin/skills/browser/references/owned-engine/network.md +13 -7
- package/packages/omo-codex/plugin/skills/browser/references/recipes/1password.md +6 -2
- package/packages/omo-codex/plugin/skills/browser/runtime/omowright/index.js +15 -15
- package/packages/omo-codex/plugin/skills/browser/runtime/omowright/manifest.json +4 -4
- package/packages/omo-codex/plugin/skills/debugging/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/debugging/references/tools/browser-qa.md +1 -1
- package/packages/omo-codex/plugin/skills/git/SKILL.md +62 -0
- package/packages/omo-codex/plugin/skills/git/agents/openai.yaml +13 -0
- package/packages/omo-codex/plugin/skills/github/SKILL.md +94 -0
- package/packages/omo-codex/plugin/skills/github/agents/openai.yaml +2 -0
- package/packages/omo-codex/plugin/skills/github/references/branch-rules.md +129 -0
- package/packages/omo-codex/plugin/skills/github/references/evidence-attachments.md +16 -0
- package/packages/omo-codex/plugin/skills/github/references/repo-setup.md +152 -0
- package/packages/omo-codex/plugin/skills/github/references/waiting.md +52 -0
- package/packages/omo-codex/plugin/skills/github/references/workflows.md +161 -0
- package/packages/omo-codex/plugin/skills/github/scripts/cli.ts +8 -0
- package/packages/omo-codex/plugin/skills/github/scripts/package.json +12 -0
- package/packages/omo-codex/plugin/skills/github/scripts/sdk.ts +11 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/account.ts +243 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/actions-write.ts +86 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/actions.ts +210 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/attestations.ts +136 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/blake2b.ts +102 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/branch-protection.ts +192 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/caches.ts +105 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/checks.ts +107 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/codespaces.ts +230 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/conversation-lock.ts +50 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/discussion-list.ts +126 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/discussion-lookup.ts +127 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/discussions.ts +234 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/env.ts +100 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/errors.ts +79 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/fields.ts +27 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/gist-shape.ts +58 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/gists-write.ts +130 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/gists.ts +118 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/git-auth.ts +46 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/http.ts +159 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/issue-develop.ts +118 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/issues-extra.ts +135 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/issues-write.ts +174 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/issues.ts +156 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/keys.ts +176 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/labels.ts +209 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/merge.ts +115 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/poly1305.ts +22 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/pr-checkout.ts +92 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/pr-view.ts +106 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/project-fields.ts +144 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/project-item-edit.ts +153 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/project-items.ts +191 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/project-links.ts +104 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/project-ref.ts +145 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/project-state.ts +99 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/projects.ts +158 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/pulls-extra.ts +165 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/pulls-read.ts +176 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/pulls-review.ts +206 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/pulls-write.ts +187 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/raw.ts +78 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/read.ts +77 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/release-assets.ts +111 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/release-download.ts +151 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/release-write.ts +197 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/repo-admin.ts +112 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/repo-content.ts +187 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/repo-create.ts +139 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/repo-extras.ts +217 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/repo-list.ts +143 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/repo-settings.ts +176 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/repo-sync.ts +81 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/repo-url.ts +104 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/repos.ts +87 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/ruleset-shape.ts +96 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/rulesets-write.ts +124 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/rulesets.ts +80 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/run-download.ts +88 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/salsa20.ts +97 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/scopes.ts +165 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/sealed-box.ts +75 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/search-commits.ts +114 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/search.ts +116 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/secrets.ts +131 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/snappy.ts +57 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/status-search.ts +55 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/transfer.ts +97 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/types.ts +75 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/variables.ts +86 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/wait.ts +164 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/wire.ts +159 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/workflows.ts +144 -0
- package/packages/omo-codex/plugin/skills/github/scripts/src/zip.ts +104 -0
- package/packages/omo-codex/plugin/skills/github/scripts/surface.ts +106 -0
- package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/SOURCE.json +15 -0
- package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/cli.ts +203 -0
- package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/flags.ts +195 -0
- package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/help.ts +89 -0
- package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/http.ts +180 -0
- package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/index.ts +44 -0
- package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/mcp.ts +241 -0
- package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/schema.ts +200 -0
- package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/stdio.ts +54 -0
- package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/surface.ts +250 -0
- package/packages/omo-codex/plugin/skills/github/scripts/vendor/surface/tools.ts +80 -0
- package/packages/omo-codex/plugin/skills/programming/SKILL.md +51 -320
- package/packages/omo-codex/plugin/skills/programming/references/go/README.md +1 -0
- package/packages/omo-codex/plugin/skills/programming/references/python/README.md +21 -3
- package/packages/omo-codex/plugin/skills/programming/references/python/error-handling.md +14 -0
- package/packages/omo-codex/plugin/skills/programming/references/rust/README.md +5 -1
- package/packages/omo-codex/plugin/skills/programming/references/typescript/README.md +9 -3
- package/packages/omo-codex/plugin/skills/programming/references/typescript/error-handling.md +18 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/ulw-execute/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +3 -3
- package/packages/omo-codex/plugin/skills/visual-qa/references/browser-setup.md +5 -5
- package/packages/omo-codex/plugin/test/sync-skills-codex-compatibility.test.mjs +1 -1
- package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +2 -1
- package/packages/omo-codex/plugin/test/sync-skills.test.mjs +5 -5
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +21279 -20738
- package/packages/shared-skills/skills/browser/SKILL.md +100 -91
- package/packages/shared-skills/skills/browser/references/commands.md +92 -27
- package/packages/shared-skills/skills/browser/references/desktop.md +22 -0
- package/packages/shared-skills/skills/browser/references/install.md +18 -0
- package/packages/shared-skills/skills/browser/references/owned-engine/README.md +7 -2
- package/packages/shared-skills/skills/browser/references/owned-engine/frames-and-humans.md +9 -2
- package/packages/shared-skills/skills/browser/references/owned-engine/network.md +13 -7
- package/packages/shared-skills/skills/browser/references/recipes/1password.md +6 -2
- package/packages/shared-skills/skills/browser/runtime/omowright/index.js +15 -15
- package/packages/shared-skills/skills/browser/runtime/omowright/manifest.json +4 -4
- package/packages/shared-skills/skills/debugging/SKILL.md +1 -1
- package/packages/shared-skills/skills/debugging/references/tools/browser-qa.md +1 -1
- package/packages/shared-skills/skills/git/SKILL.md +62 -0
- package/packages/shared-skills/skills/git/agents/openai.yaml +13 -0
- package/packages/shared-skills/skills/github/SKILL.md +94 -0
- package/packages/shared-skills/skills/github/references/branch-rules.md +129 -0
- package/packages/shared-skills/skills/github/references/evidence-attachments.md +16 -0
- package/packages/shared-skills/skills/github/references/repo-setup.md +152 -0
- package/packages/shared-skills/skills/github/references/waiting.md +52 -0
- package/packages/shared-skills/skills/github/references/workflows.md +161 -0
- package/packages/shared-skills/skills/github/scripts/cli.ts +8 -0
- package/packages/shared-skills/skills/github/scripts/package.json +12 -0
- package/packages/shared-skills/skills/github/scripts/sdk.ts +11 -0
- package/packages/shared-skills/skills/github/scripts/src/account.ts +243 -0
- package/packages/shared-skills/skills/github/scripts/src/actions-write.ts +86 -0
- package/packages/shared-skills/skills/github/scripts/src/actions.ts +210 -0
- package/packages/shared-skills/skills/github/scripts/src/attestations.ts +136 -0
- package/packages/shared-skills/skills/github/scripts/src/blake2b.ts +102 -0
- package/packages/shared-skills/skills/github/scripts/src/branch-protection.ts +192 -0
- package/packages/shared-skills/skills/github/scripts/src/caches.ts +105 -0
- package/packages/shared-skills/skills/github/scripts/src/checks.ts +107 -0
- package/packages/shared-skills/skills/github/scripts/src/codespaces.ts +230 -0
- package/packages/shared-skills/skills/github/scripts/src/conversation-lock.ts +50 -0
- package/packages/shared-skills/skills/github/scripts/src/discussion-list.ts +126 -0
- package/packages/shared-skills/skills/github/scripts/src/discussion-lookup.ts +127 -0
- package/packages/shared-skills/skills/github/scripts/src/discussions.ts +234 -0
- package/packages/shared-skills/skills/github/scripts/src/env.ts +100 -0
- package/packages/shared-skills/skills/github/scripts/src/errors.ts +79 -0
- package/packages/shared-skills/skills/github/scripts/src/fields.ts +27 -0
- package/packages/shared-skills/skills/github/scripts/src/gist-shape.ts +58 -0
- package/packages/shared-skills/skills/github/scripts/src/gists-write.ts +130 -0
- package/packages/shared-skills/skills/github/scripts/src/gists.ts +118 -0
- package/packages/shared-skills/skills/github/scripts/src/git-auth.ts +46 -0
- package/packages/shared-skills/skills/github/scripts/src/http.ts +159 -0
- package/packages/shared-skills/skills/github/scripts/src/issue-develop.ts +118 -0
- package/packages/shared-skills/skills/github/scripts/src/issues-extra.ts +135 -0
- package/packages/shared-skills/skills/github/scripts/src/issues-write.ts +174 -0
- package/packages/shared-skills/skills/github/scripts/src/issues.ts +156 -0
- package/packages/shared-skills/skills/github/scripts/src/keys.ts +176 -0
- package/packages/shared-skills/skills/github/scripts/src/labels.ts +209 -0
- package/packages/shared-skills/skills/github/scripts/src/merge.ts +115 -0
- package/packages/shared-skills/skills/github/scripts/src/poly1305.ts +22 -0
- package/packages/shared-skills/skills/github/scripts/src/pr-checkout.ts +92 -0
- package/packages/shared-skills/skills/github/scripts/src/pr-view.ts +106 -0
- package/packages/shared-skills/skills/github/scripts/src/project-fields.ts +144 -0
- package/packages/shared-skills/skills/github/scripts/src/project-item-edit.ts +153 -0
- package/packages/shared-skills/skills/github/scripts/src/project-items.ts +191 -0
- package/packages/shared-skills/skills/github/scripts/src/project-links.ts +104 -0
- package/packages/shared-skills/skills/github/scripts/src/project-ref.ts +145 -0
- package/packages/shared-skills/skills/github/scripts/src/project-state.ts +99 -0
- package/packages/shared-skills/skills/github/scripts/src/projects.ts +158 -0
- package/packages/shared-skills/skills/github/scripts/src/pulls-extra.ts +165 -0
- package/packages/shared-skills/skills/github/scripts/src/pulls-read.ts +176 -0
- package/packages/shared-skills/skills/github/scripts/src/pulls-review.ts +206 -0
- package/packages/shared-skills/skills/github/scripts/src/pulls-write.ts +187 -0
- package/packages/shared-skills/skills/github/scripts/src/raw.ts +78 -0
- package/packages/shared-skills/skills/github/scripts/src/read.ts +77 -0
- package/packages/shared-skills/skills/github/scripts/src/release-assets.ts +111 -0
- package/packages/shared-skills/skills/github/scripts/src/release-download.ts +151 -0
- package/packages/shared-skills/skills/github/scripts/src/release-write.ts +197 -0
- package/packages/shared-skills/skills/github/scripts/src/repo-admin.ts +112 -0
- package/packages/shared-skills/skills/github/scripts/src/repo-content.ts +187 -0
- package/packages/shared-skills/skills/github/scripts/src/repo-create.ts +139 -0
- package/packages/shared-skills/skills/github/scripts/src/repo-extras.ts +217 -0
- package/packages/shared-skills/skills/github/scripts/src/repo-list.ts +143 -0
- package/packages/shared-skills/skills/github/scripts/src/repo-settings.ts +176 -0
- package/packages/shared-skills/skills/github/scripts/src/repo-sync.ts +81 -0
- package/packages/shared-skills/skills/github/scripts/src/repo-url.ts +104 -0
- package/packages/shared-skills/skills/github/scripts/src/repos.ts +87 -0
- package/packages/shared-skills/skills/github/scripts/src/ruleset-shape.ts +96 -0
- package/packages/shared-skills/skills/github/scripts/src/rulesets-write.ts +124 -0
- package/packages/shared-skills/skills/github/scripts/src/rulesets.ts +80 -0
- package/packages/shared-skills/skills/github/scripts/src/run-download.ts +88 -0
- package/packages/shared-skills/skills/github/scripts/src/salsa20.ts +97 -0
- package/packages/shared-skills/skills/github/scripts/src/scopes.ts +165 -0
- package/packages/shared-skills/skills/github/scripts/src/sealed-box.ts +75 -0
- package/packages/shared-skills/skills/github/scripts/src/search-commits.ts +114 -0
- package/packages/shared-skills/skills/github/scripts/src/search.ts +116 -0
- package/packages/shared-skills/skills/github/scripts/src/secrets.ts +131 -0
- package/packages/shared-skills/skills/github/scripts/src/snappy.ts +57 -0
- package/packages/shared-skills/skills/github/scripts/src/status-search.ts +55 -0
- package/packages/shared-skills/skills/github/scripts/src/transfer.ts +97 -0
- package/packages/shared-skills/skills/github/scripts/src/types.ts +75 -0
- package/packages/shared-skills/skills/github/scripts/src/variables.ts +86 -0
- package/packages/shared-skills/skills/github/scripts/src/wait.ts +164 -0
- package/packages/shared-skills/skills/github/scripts/src/wire.ts +159 -0
- package/packages/shared-skills/skills/github/scripts/src/workflows.ts +144 -0
- package/packages/shared-skills/skills/github/scripts/src/zip.ts +104 -0
- package/packages/shared-skills/skills/github/scripts/surface.ts +106 -0
- package/packages/shared-skills/skills/github/scripts/vendor/surface/SOURCE.json +15 -0
- package/packages/shared-skills/skills/github/scripts/vendor/surface/cli.ts +203 -0
- package/packages/shared-skills/skills/github/scripts/vendor/surface/flags.ts +195 -0
- package/packages/shared-skills/skills/github/scripts/vendor/surface/help.ts +89 -0
- package/packages/shared-skills/skills/github/scripts/vendor/surface/http.ts +180 -0
- package/packages/shared-skills/skills/github/scripts/vendor/surface/index.ts +44 -0
- package/packages/shared-skills/skills/github/scripts/vendor/surface/mcp.ts +241 -0
- package/packages/shared-skills/skills/github/scripts/vendor/surface/schema.ts +200 -0
- package/packages/shared-skills/skills/github/scripts/vendor/surface/stdio.ts +54 -0
- package/packages/shared-skills/skills/github/scripts/vendor/surface/surface.ts +250 -0
- package/packages/shared-skills/skills/github/scripts/vendor/surface/tools.ts +80 -0
- package/packages/shared-skills/skills/programming/SKILL.md +51 -320
- package/packages/shared-skills/skills/programming/references/go/README.md +1 -0
- package/packages/shared-skills/skills/programming/references/python/README.md +21 -3
- package/packages/shared-skills/skills/programming/references/python/error-handling.md +14 -0
- package/packages/shared-skills/skills/programming/references/rust/README.md +5 -1
- package/packages/shared-skills/skills/programming/references/typescript/README.md +9 -3
- package/packages/shared-skills/skills/programming/references/typescript/error-handling.md +18 -0
- package/packages/shared-skills/skills/ultimate-browsing/SKILL.md +1 -1
- package/packages/shared-skills/skills/ulw-execute/SKILL.md +1 -1
- package/packages/shared-skills/skills/visual-qa/references/browser-setup.md +5 -5
- package/dist/skills/git-master/SKILL.md +0 -114
- package/dist/skills/git-master/agents/openai.yaml +0 -13
- package/packages/omo-codex/plugin/skills/git-master/SKILL.md +0 -114
- package/packages/omo-codex/plugin/skills/git-master/agents/openai.yaml +0 -13
- package/packages/shared-skills/skills/git-master/SKILL.md +0 -114
- 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,
|
|
13
|
-
|
|
|
14
|
-
|
|
|
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
|
-
**
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
22
|
+
```js
|
|
23
|
+
const { loadOmowright } = await import("<skill-root>/scripts/omowright.mjs")
|
|
24
|
+
const { omowright } = await loadOmowright()
|
|
25
|
+
```
|
|
23
26
|
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
|
|
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
|
-
|
|
|
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
|
-
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
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
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
```
|
|
53
|
-
node "
|
|
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
|
-
|
|
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
|
-
|
|
78
|
-
const sync = async () => (await session.cooperate("sync")).context_id // one context per
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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. **
|
|
95
|
-
|
|
96
|
-
2. **
|
|
97
|
-
3. **
|
|
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
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
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
|
|
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
|
-
|
|
127
|
-
|
|
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
|
-
-
|
|
136
|
-
-
|
|
137
|
-
|
|
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
|
-
|
|
|
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()
|
|
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.
|
|
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
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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() })
|
|
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
|
|
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
|
-
-
|
|
39
|
-
`
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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
|
-
|
|
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
|
|
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:
|
|
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`, `
|
|
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
|
|
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
|