lazycodex-ai 5.1.44 → 5.1.46
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/README.de.md +0 -5
- package/README.es.md +0 -5
- package/README.fr.md +0 -5
- package/README.it.md +0 -5
- package/README.ja.md +0 -5
- package/README.ko.md +0 -5
- package/README.md +4 -5
- package/README.pt-br.md +0 -5
- package/README.ru.md +0 -6
- package/README.zh-cn.md +0 -5
- package/dist/cli/index.js +865 -413
- package/dist/cli/service-auth/keystore.d.ts +4 -2
- package/dist/cli-node/index.js +865 -413
- package/docs/reference/web-terminal-visual-qa.md +8 -0
- package/package.json +1 -1
- package/packages/lsp-daemon/dist/cli.js +7 -7
- package/packages/lsp-daemon/dist/client.js +7 -7
- package/packages/lsp-daemon/dist/index.js +7 -7
- package/packages/lsp-daemon/package.json +3 -3
- package/packages/lsp-tools-mcp/dist/cli.js +7 -7
- package/packages/lsp-tools-mcp/dist/mcp.js +7 -7
- package/packages/lsp-tools-mcp/dist/tools.js +4 -4
- package/packages/lsp-tools-mcp/package.json +3 -3
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +77 -26
- 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/bootstrap/src/hook.ts +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/biome.json +1 -21
- package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/package.json +4 -4
- 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/biome.json +1 -21
- 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 +4 -4
- package/packages/omo-codex/plugin/components/lsp/biome.json +1 -21
- package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +3 -3
- package/packages/omo-codex/plugin/components/lsp/dist/cli.js +4 -4
- package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/package.json +4 -4
- package/packages/omo-codex/plugin/components/lsp/scripts/build-runtime.mjs +0 -1
- package/packages/omo-codex/plugin/components/lsp/test/codex-hook-not-installed.test.ts +1 -1
- package/packages/omo-codex/plugin/components/rules/biome.json +1 -21
- package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/package.json +4 -4
- 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/biome.json +1 -21
- package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +90 -1
- package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +91 -1
- package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/package.json +4 -4
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-gate-reviewer.toml +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/biome.json +1 -21
- package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/package.json +4 -4
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/biome.json +1 -21
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/directive.md +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 +4 -4
- package/packages/omo-codex/plugin/components/ulw-loop/biome.json +1 -21
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint.js +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +7 -7
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-instruction.js +5 -5
- package/packages/omo-codex/plugin/components/ulw-loop/dist/stop-resume-hook.js +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 +4 -4
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/codex-goal-instruction.ts +5 -5
- package/packages/omo-codex/plugin/components/ulw-loop/src/stop-resume-hook.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/commit-mutations.mjs +2 -0
- 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/scripts/sync-skills.mjs +14 -9
- package/packages/omo-codex/plugin/skills/ast-grep/AGENTS.md +1 -1
- package/packages/omo-codex/plugin/skills/browser/SKILL.md +21 -22
- package/packages/omo-codex/plugin/skills/browser/references/commands.md +2 -9
- package/packages/omo-codex/plugin/skills/browser/references/install.md +1 -2
- package/packages/omo-codex/plugin/skills/browser/runtime/omowright/manifest.json +1 -1
- package/packages/omo-codex/plugin/skills/browser/scripts/browser-doctor.mjs +2 -2
- package/packages/omo-codex/plugin/skills/browser/scripts/browser-engine-guard.mjs +63 -487
- package/packages/omo-codex/plugin/skills/browser/scripts/browser-install.mjs +1 -1
- package/packages/omo-codex/plugin/skills/browser/scripts/omowright.mjs +1 -10
- package/packages/omo-codex/plugin/skills/frontend/ATTRIBUTION.md +2 -2
- package/packages/omo-codex/plugin/skills/frontend/SKILL.md +79 -118
- package/packages/omo-codex/plugin/skills/frontend/references/design/README.md +75 -224
- package/packages/omo-codex/plugin/skills/frontend/references/design/stylegallery.md +32 -27
- package/packages/omo-codex/plugin/skills/frontend/references/perfection/README.md +2 -2
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/check-accent-stripes.ts +8 -24
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/check-draft-guard.ts +40 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/collect-files.ts +53 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/draft-guard/findings.ts +16 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/draft-guard/lint.ts +38 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/draft-guard/rules.ts +69 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/draft-guard/text-nodes.ts +121 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/attr-lookalikes.tsx +10 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/bound-values.tsx +12 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/const-generics.tsx +3 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/generics.tsx +7 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/measured-stats.html +6 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/plain-copy.html +9 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/state-copy.html +11 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/attribute-edges.html +7 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/components.tsx +16 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/decorative-badge.vue +7 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/emoji-icons.tsx +9 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/jsx-edges.tsx +1 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/promo-copy.html +6 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/promo-copy.tsx +8 -0
- package/packages/omo-codex/plugin/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/vanity-stats.html +5 -0
- package/packages/omo-codex/plugin/skills/init-deep/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/programming/SKILL.md +10 -7
- package/packages/omo-codex/plugin/skills/programming/references/typescript/README.md +10 -7
- package/packages/omo-codex/plugin/skills/programming/references/typescript/bootstrap.md +9 -23
- package/packages/omo-codex/plugin/skills/programming/references/typescript/oxc-lint.md +130 -0
- package/packages/omo-codex/plugin/skills/programming/references/typescript/tsconfig-strict.md +6 -62
- package/packages/omo-codex/plugin/skills/programming/scripts/typescript/check-no-excuse-rules.ts +12 -12
- package/packages/omo-codex/plugin/skills/programming/scripts/typescript/new-project.ts +20 -81
- package/packages/omo-codex/plugin/skills/programming/scripts/typescript/oxc/.oxfmtrc.json +9 -0
- package/packages/omo-codex/plugin/skills/programming/scripts/typescript/oxc/.oxlintrc.json +46 -0
- package/packages/omo-codex/plugin/skills/programming/scripts/typescript/oxc/lint/oxlint-plugin/LICENSE +21 -0
- package/packages/omo-codex/plugin/skills/programming/scripts/typescript/oxc/lint/oxlint-plugin/index.js +10 -0
- package/packages/omo-codex/plugin/skills/programming/scripts/typescript/oxc/lint/oxlint-plugin/no-em-dash-copy.js +28 -0
- package/packages/omo-codex/plugin/skills/programming/scripts/typescript/oxc/lint/oxlint-plugin/require-suppression-reason.js +62 -0
- package/packages/omo-codex/plugin/skills/programming/scripts/typescript/oxc/tsconfig.json +29 -0
- package/packages/omo-codex/plugin/skills/refactor/SKILL.md +14 -14
- package/packages/omo-codex/plugin/skills/remove-ai-slops/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/review-work/SKILL.md +2 -2
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/AGENTS.md +1 -1
- package/packages/omo-codex/plugin/skills/ulw-execute/SKILL.md +2 -2
- package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/ulw-research/AGENTS.md +21 -3
- package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +37 -12
- package/packages/omo-codex/plugin/skills/ulw-research/references/deliverable-phase.md +77 -16
- package/packages/omo-codex/plugin/skills/ulw-research/references/fact-ledger-grammar.md +134 -0
- package/packages/omo-codex/plugin/skills/ulw-research/references/fact-ledger.md +95 -0
- package/packages/omo-codex/plugin/skills/ulw-research/references/fidelity-claim-kinds.md +19 -0
- package/packages/omo-codex/plugin/skills/ulw-research/references/report-gates.md +68 -3
- package/packages/omo-codex/plugin/skills/ulw-research/references/report-visualization.md +2 -0
- package/packages/omo-codex/plugin/skills/ulw-research/references/unit-rules.md +157 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/claim-kinds.mjs +116 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/claims-index.mjs +125 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/cli-support.mjs +19 -5
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/contracts.mjs +89 -3
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-commands-meaning.mjs +191 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-commands-verify.mjs +164 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-commands.mjs +239 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-derive.mjs +66 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-expr.mjs +108 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-fill.mjs +194 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-ledger-kinds.mjs +250 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-ledger-schema.mjs +221 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-ledger.mjs +123 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-locate.mjs +231 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-pairs.mjs +187 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fact-recompute.mjs +89 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-binding.mjs +130 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-brief.mjs +150 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-claims.mjs +89 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-lexicon.mjs +145 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-records.mjs +163 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-state.mjs +64 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-trace.mjs +85 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/fidelity-values.mjs +229 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-fidelity.mjs +113 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-static.mjs +29 -9
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-structure.mjs +1 -1
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/gates-text.mjs +1 -27
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/html-lite.mjs +2 -2
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/html-markup.mjs +182 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/lexicon.mjs +47 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/md-lite.mjs +193 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/meaning-check.mjs +196 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/numerals.mjs +226 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/outcome.mjs +8 -8
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/particles-ko.mjs +108 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/placeholder.mjs +184 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/polish-apply.mjs +115 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/polish-diff.mjs +31 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/polish-project.mjs +125 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/polish-rules.mjs +170 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/rational.mjs +139 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/report-tools-commands.mjs +21 -10
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/report-tools.mjs +15 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/sentence-split.mjs +77 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/source-commands.mjs +140 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/source-snapshot.mjs +176 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/text-normalize.mjs +82 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/text-similarity.mjs +28 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-algebra.mjs +101 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-errors.mjs +23 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-metadata.mjs +31 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-pairs.mjs +72 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-precision.mjs +44 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-rules-shapes.mjs +64 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/unit-rules.mjs +173 -0
- package/packages/omo-codex/plugin/skills/ulw-research/scripts/units.mjs +105 -0
- package/packages/omo-codex/plugin/skills/visual-qa/SKILL.md +71 -64
- package/packages/omo-codex/plugin/test/component-bundled-cli.test.mjs +4 -1
- package/packages/omo-codex/plugin/test/sync-skills-codex-compatibility.test.mjs +19 -0
- package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +12 -8
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +169 -30
- package/packages/shared-skills/skills/ast-grep/AGENTS.md +1 -1
- package/packages/shared-skills/skills/browser/SKILL.md +21 -22
- package/packages/shared-skills/skills/browser/references/commands.md +2 -9
- package/packages/shared-skills/skills/browser/references/install.md +1 -2
- package/packages/shared-skills/skills/browser/runtime/omowright/manifest.json +1 -1
- package/packages/shared-skills/skills/browser/scripts/browser-doctor.mjs +2 -2
- package/packages/shared-skills/skills/browser/scripts/browser-engine-guard.mjs +63 -487
- package/packages/shared-skills/skills/browser/scripts/browser-install.mjs +1 -1
- package/packages/shared-skills/skills/browser/scripts/omowright.mjs +1 -10
- package/packages/shared-skills/skills/frontend/ATTRIBUTION.md +2 -2
- package/packages/shared-skills/skills/frontend/SKILL.md +79 -118
- package/packages/shared-skills/skills/frontend/references/design/README.md +75 -224
- package/packages/shared-skills/skills/frontend/references/design/stylegallery.md +32 -27
- package/packages/shared-skills/skills/frontend/references/perfection/README.md +2 -2
- package/packages/shared-skills/skills/frontend/scripts/perfection/check-accent-stripes.ts +8 -24
- package/packages/shared-skills/skills/frontend/scripts/perfection/check-draft-guard.test.ts +101 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/check-draft-guard.ts +40 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/collect-files.test.ts +50 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/collect-files.ts +53 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/draft-guard/findings.ts +16 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/draft-guard/lint.ts +38 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/draft-guard/rules.ts +69 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/draft-guard/text-nodes.ts +121 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/attr-lookalikes.tsx +10 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/bound-values.tsx +12 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/const-generics.tsx +3 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/generics.tsx +7 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/measured-stats.html +6 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/plain-copy.html +9 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/negative/state-copy.html +11 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/attribute-edges.html +7 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/components.tsx +16 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/decorative-badge.vue +7 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/emoji-icons.tsx +9 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/jsx-edges.tsx +1 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/promo-copy.html +6 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/promo-copy.tsx +8 -0
- package/packages/shared-skills/skills/frontend/scripts/perfection/fixtures/draft-guard/positive/vanity-stats.html +5 -0
- package/packages/shared-skills/skills/programming/SKILL.md +10 -7
- package/packages/shared-skills/skills/programming/references/typescript/README.md +10 -7
- package/packages/shared-skills/skills/programming/references/typescript/bootstrap.md +9 -23
- package/packages/shared-skills/skills/programming/references/typescript/oxc-lint.md +130 -0
- package/packages/shared-skills/skills/programming/references/typescript/tsconfig-strict.md +6 -62
- package/packages/shared-skills/skills/programming/scripts/typescript/check-no-excuse-rules.ts +12 -12
- package/packages/shared-skills/skills/programming/scripts/typescript/new-project.test.ts +162 -0
- package/packages/shared-skills/skills/programming/scripts/typescript/new-project.ts +20 -81
- package/packages/shared-skills/skills/programming/scripts/typescript/oxc/.oxfmtrc.json +9 -0
- package/packages/shared-skills/skills/programming/scripts/typescript/oxc/.oxlintrc.json +46 -0
- package/packages/shared-skills/skills/programming/scripts/typescript/oxc/lint/oxlint-plugin/LICENSE +21 -0
- package/packages/shared-skills/skills/programming/scripts/typescript/oxc/lint/oxlint-plugin/index.js +10 -0
- package/packages/shared-skills/skills/programming/scripts/typescript/oxc/lint/oxlint-plugin/no-em-dash-copy.js +28 -0
- package/packages/shared-skills/skills/programming/scripts/typescript/oxc/lint/oxlint-plugin/require-suppression-reason.js +62 -0
- package/packages/shared-skills/skills/programming/scripts/typescript/oxc/tsconfig.json +29 -0
- package/packages/shared-skills/skills/refactor/SKILL.md +13 -13
- package/packages/shared-skills/skills/ultimate-browsing/engine/AGENTS.md +1 -1
- package/packages/shared-skills/skills/ulw-execute/SKILL.md +1 -1
- package/packages/shared-skills/skills/ulw-research/AGENTS.md +21 -3
- package/packages/shared-skills/skills/ulw-research/SKILL.md +37 -12
- package/packages/shared-skills/skills/ulw-research/references/deliverable-phase.md +77 -16
- package/packages/shared-skills/skills/ulw-research/references/fact-ledger-grammar.md +134 -0
- package/packages/shared-skills/skills/ulw-research/references/fact-ledger.md +95 -0
- package/packages/shared-skills/skills/ulw-research/references/fidelity-claim-kinds.md +19 -0
- package/packages/shared-skills/skills/ulw-research/references/report-gates.md +68 -3
- package/packages/shared-skills/skills/ulw-research/references/report-visualization.md +2 -0
- package/packages/shared-skills/skills/ulw-research/references/unit-rules.md +157 -0
- package/packages/shared-skills/skills/ulw-research/scripts/claim-kinds.mjs +116 -0
- package/packages/shared-skills/skills/ulw-research/scripts/claim-kinds.test.ts +193 -0
- package/packages/shared-skills/skills/ulw-research/scripts/claims-index.mjs +125 -0
- package/packages/shared-skills/skills/ulw-research/scripts/claims-index.test.ts +149 -0
- package/packages/shared-skills/skills/ulw-research/scripts/cli-support.mjs +19 -5
- package/packages/shared-skills/skills/ulw-research/scripts/cli-support.test.ts +13 -2
- package/packages/shared-skills/skills/ulw-research/scripts/contracts.mjs +89 -3
- package/packages/shared-skills/skills/ulw-research/scripts/contracts.test.ts +100 -12
- package/packages/shared-skills/skills/ulw-research/scripts/copy-returns.test.ts +183 -0
- package/packages/shared-skills/skills/ulw-research/scripts/delivery-barrier.test.ts +245 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-commands-meaning.mjs +191 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-commands-verify.mjs +164 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-commands.mjs +239 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-derive.mjs +66 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-derive.test.ts +375 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-expr.mjs +108 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-fill.mjs +194 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-fill.test.ts +221 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-grammar.test.ts +197 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-kinds.mjs +250 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-kinds.test.ts +156 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-legacy.test.ts +160 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-schema.mjs +221 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger-schema.test.ts +43 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger.mjs +123 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-ledger.test.ts +254 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-locate.mjs +231 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-locate.test.ts +118 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-pairs.mjs +187 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-pairs.test.ts +167 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-recompute.mjs +89 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-unit-dimensions.test.ts +409 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fact-unit-rules.test.ts +388 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-binding.mjs +130 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-binding.test.ts +81 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-brief.mjs +150 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-brief.test.ts +179 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-claims.mjs +89 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-lexicon.mjs +145 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-lexicon.test.ts +117 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-records.mjs +163 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-state.mjs +64 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-state.test.ts +46 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-trace.mjs +85 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-trace.test.ts +58 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-values.mjs +229 -0
- package/packages/shared-skills/skills/ulw-research/scripts/fidelity-values.test.ts +270 -0
- package/packages/shared-skills/skills/ulw-research/scripts/gates-context.test.ts +64 -0
- package/packages/shared-skills/skills/ulw-research/scripts/gates-fidelity.mjs +113 -0
- package/packages/shared-skills/skills/ulw-research/scripts/gates-fidelity.test.ts +73 -0
- package/packages/shared-skills/skills/ulw-research/scripts/gates-static.mjs +29 -9
- package/packages/shared-skills/skills/ulw-research/scripts/gates-structure.mjs +1 -1
- package/packages/shared-skills/skills/ulw-research/scripts/gates-text.mjs +1 -27
- package/packages/shared-skills/skills/ulw-research/scripts/html-lite.mjs +2 -2
- package/packages/shared-skills/skills/ulw-research/scripts/html-markup.mjs +182 -0
- package/packages/shared-skills/skills/ulw-research/scripts/lexicon.mjs +47 -0
- package/packages/shared-skills/skills/ulw-research/scripts/lexicon.test.ts +57 -0
- package/packages/shared-skills/skills/ulw-research/scripts/md-lite.mjs +193 -0
- package/packages/shared-skills/skills/ulw-research/scripts/md-lite.test.ts +271 -0
- package/packages/shared-skills/skills/ulw-research/scripts/meaning-check.mjs +196 -0
- package/packages/shared-skills/skills/ulw-research/scripts/meaning-check.test.ts +228 -0
- package/packages/shared-skills/skills/ulw-research/scripts/numerals.mjs +226 -0
- package/packages/shared-skills/skills/ulw-research/scripts/numerals.test.ts +120 -0
- package/packages/shared-skills/skills/ulw-research/scripts/outcome.mjs +8 -8
- package/packages/shared-skills/skills/ulw-research/scripts/outcome.test.ts +29 -0
- package/packages/shared-skills/skills/ulw-research/scripts/particles-ko.mjs +108 -0
- package/packages/shared-skills/skills/ulw-research/scripts/particles-ko.test.ts +86 -0
- package/packages/shared-skills/skills/ulw-research/scripts/placeholder.mjs +184 -0
- package/packages/shared-skills/skills/ulw-research/scripts/placeholder.test.ts +77 -0
- package/packages/shared-skills/skills/ulw-research/scripts/polish-apply.mjs +115 -0
- package/packages/shared-skills/skills/ulw-research/scripts/polish-apply.test.ts +363 -0
- package/packages/shared-skills/skills/ulw-research/scripts/polish-diff.mjs +31 -0
- package/packages/shared-skills/skills/ulw-research/scripts/polish-diff.test.ts +168 -0
- package/packages/shared-skills/skills/ulw-research/scripts/polish-markup.test.ts +187 -0
- package/packages/shared-skills/skills/ulw-research/scripts/polish-project.mjs +125 -0
- package/packages/shared-skills/skills/ulw-research/scripts/polish-rules.mjs +170 -0
- package/packages/shared-skills/skills/ulw-research/scripts/rational.mjs +139 -0
- package/packages/shared-skills/skills/ulw-research/scripts/rational.test.ts +46 -0
- package/packages/shared-skills/skills/ulw-research/scripts/report-tools-commands.mjs +21 -10
- package/packages/shared-skills/skills/ulw-research/scripts/report-tools.mjs +15 -0
- package/packages/shared-skills/skills/ulw-research/scripts/report-tools.test.ts +458 -2
- package/packages/shared-skills/skills/ulw-research/scripts/sentence-split.mjs +77 -0
- package/packages/shared-skills/skills/ulw-research/scripts/sentence-split.test.ts +109 -0
- package/packages/shared-skills/skills/ulw-research/scripts/source-commands.mjs +140 -0
- package/packages/shared-skills/skills/ulw-research/scripts/source-snapshot.mjs +176 -0
- package/packages/shared-skills/skills/ulw-research/scripts/source-snapshot.test.ts +113 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/assets/share.csv +3 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/claim-graph.md +13 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/gen-legacy-dev.mjs +89 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/ledger-basic.json +223 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/ledger-legacy-dev.json +859 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/ledger-verify.json +420 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/report-bad.html +19 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/report-good.html +39 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S4/acronyms.json +3 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S4/meta.json +9 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S4/sentences.jsonl +7 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S4/text.txt +7 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S4.html +19 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S5/acronyms.json +1 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S5/meta.json +9 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S5/sentences.jsonl +1 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S5/text.txt +1 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity/sources/S9.txt +1 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity-brief-locked.md +17 -0
- package/packages/shared-skills/skills/ulw-research/scripts/tests/fixtures/fidelity-brief-pending.md +17 -0
- package/packages/shared-skills/skills/ulw-research/scripts/text-normalize.mjs +82 -0
- package/packages/shared-skills/skills/ulw-research/scripts/text-normalize.test.ts +73 -0
- package/packages/shared-skills/skills/ulw-research/scripts/text-similarity.mjs +28 -0
- package/packages/shared-skills/skills/ulw-research/scripts/text-similarity.test.ts +38 -0
- package/packages/shared-skills/skills/ulw-research/scripts/unit-algebra.mjs +101 -0
- package/packages/shared-skills/skills/ulw-research/scripts/unit-errors.mjs +23 -0
- package/packages/shared-skills/skills/ulw-research/scripts/unit-metadata.mjs +31 -0
- package/packages/shared-skills/skills/ulw-research/scripts/unit-pairs.mjs +72 -0
- package/packages/shared-skills/skills/ulw-research/scripts/unit-precision.mjs +44 -0
- package/packages/shared-skills/skills/ulw-research/scripts/unit-rules-shapes.mjs +64 -0
- package/packages/shared-skills/skills/ulw-research/scripts/unit-rules.mjs +173 -0
- package/packages/shared-skills/skills/ulw-research/scripts/units.mjs +105 -0
- package/packages/shared-skills/skills/ulw-research/scripts/units.test.ts +83 -0
- package/packages/shared-skills/skills/visual-qa/SKILL.md +70 -63
- package/packages/shared-skills/skills/visual-qa/scripts/skill-doc-fields.test.ts +34 -0
- package/script/qa/web-terminal-visual-qa.mjs +6 -2
- package/script/qa/xterm-live-terminal.mjs +26 -3
|
@@ -1,506 +1,82 @@
|
|
|
1
|
-
|
|
2
|
-
export const BROWSER_ENGINE_ENV = "OMO_BROWSER_ENGINE"
|
|
3
|
-
export const BROWSER_STATE_EVENT = "omo.browser.state"
|
|
4
|
-
|
|
5
|
-
const BRIDGE_TOOL = "omo_browser_bridge"
|
|
6
|
-
const ENGINES = new Set(["connected", "builtin", "none"])
|
|
7
|
-
const NOT_CONNECTED_CODES = new Set(["no_browser_connected", "no_daemon", "unsupported"])
|
|
8
|
-
const CLASSIFY_HTML_BYTES = 4096
|
|
9
|
-
const QUESTION_HEADER = "Browser"
|
|
10
|
-
const ALLOW = "Allow"
|
|
11
|
-
const DECLINE = "Don't allow"
|
|
12
|
-
const READ_ONLY_RAW_TOOLS = new Set(["observe", "snapshot", "get_html", "screenshot", "tab_list", "console", "network"])
|
|
13
|
-
|
|
14
|
-
const OWNED_SESSION_CREATORS = new Set(["connect", "connectPipe", "connectCloakProfile"])
|
|
15
|
-
const PASSTHROUGH_FUNCTIONS = new Set([
|
|
16
|
-
"bskDoctor",
|
|
17
|
-
"bskOnboard",
|
|
18
|
-
"installBskCli",
|
|
19
|
-
"readDaemonInfo",
|
|
20
|
-
"resolveBskHome",
|
|
21
|
-
"listBrowsers",
|
|
22
|
-
"catalogBrowsers",
|
|
23
|
-
"detectBrowsers",
|
|
24
|
-
"identifyBrowser",
|
|
25
|
-
"probeBrowserSignals",
|
|
26
|
-
"findCloakBrowserPath",
|
|
27
|
-
"resolveCloakProfile",
|
|
28
|
-
"registerExternalExtension",
|
|
29
|
-
"unregisterExternalExtension",
|
|
30
|
-
"externalExtensionEntry",
|
|
31
|
-
"buildSnapshotExpression",
|
|
32
|
-
"buildCloakBrowserArgs",
|
|
33
|
-
"compactSnapshot",
|
|
34
|
-
"snapshotTokens",
|
|
35
|
-
"describeLayers",
|
|
36
|
-
"layersHeader",
|
|
37
|
-
"decodeFrames",
|
|
38
|
-
"encodeFrame",
|
|
39
|
-
"reconcileFrames",
|
|
40
|
-
"normalizeDialogPolicy",
|
|
41
|
-
"resolveDialogAction",
|
|
42
|
-
"sanitizeCookies",
|
|
43
|
-
"toHar",
|
|
44
|
-
"BskRpcError",
|
|
45
|
-
"BridgeProtocolError",
|
|
46
|
-
"BridgeUnavailableError",
|
|
47
|
-
"BrowserCdpCommandError",
|
|
48
|
-
"UnsupportedOperationError",
|
|
49
|
-
])
|
|
50
|
-
|
|
51
|
-
class CodedError extends Error {
|
|
52
|
-
constructor(name, code, message, options) {
|
|
53
|
-
super(message, options)
|
|
54
|
-
this.name = name
|
|
55
|
-
this.code = code
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export class BrowserEngineRefusal extends CodedError {
|
|
60
|
-
constructor(code, message) {
|
|
61
|
-
super("BrowserEngineRefusal", code, message)
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export class BrowserNotConnectedError extends CodedError {
|
|
66
|
-
constructor(message, options) {
|
|
67
|
-
super("BrowserNotConnectedError", "browser_not_connected", message, options)
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export class BrowserUserStoppedError extends CodedError {
|
|
72
|
-
constructor(message = "The user stopped browser use. Report that and do not start another browser session this turn.") {
|
|
73
|
-
super("BrowserUserStoppedError", "user_stopped", message)
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export class BrowserActionDeclinedError extends CodedError {
|
|
78
|
-
constructor(message, code = "user_declined") {
|
|
79
|
-
super("BrowserActionDeclinedError", code, message)
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
const IRREVERSIBLE_LABELS = [
|
|
84
|
-
/\b(send|post|publish|tweet|reply)\b/i,
|
|
85
|
-
/\b(pay|purchase|buy|subscribe|donate|checkout|submit|confirm|transfer|approve|merge)\b/i,
|
|
86
|
-
/\b(e-?sign|sign\s+(the\s+|this\s+|your\s+)?(document|contract|agreement|transaction|petition|form))\b/i,
|
|
87
|
-
/\border\b(?!\s+(history|status|details|number|tracking))/i,
|
|
88
|
-
/\b(delete|remove|unsubscribe|deactivate)\b/i,
|
|
89
|
-
/\bcancel\s+(my\s+|your\s+)?(subscription|membership|plan|account)\b/i,
|
|
90
|
-
/\bclose\s+(my\s+|your\s+)?account\b/i,
|
|
91
|
-
/결제|구매|주문|구독|삭제|제거|탈퇴|전송|발송|게시|발행|제출|승인|송금|이체|병합/,
|
|
92
|
-
]
|
|
93
|
-
const IRREVERSIBLE_ACTION_PATH = /\/(send|post|publish|pay|purchase|order|subscribe|delete|remove)\b/i
|
|
94
|
-
const SCRIPT_DRIVES_UI = /\.(click|submit|requestSubmit)\s*\(|\bdispatchEvent\b/
|
|
95
|
-
const SCRIPT_BEACON = /\bsendBeacon\s*\(/
|
|
96
|
-
const SCRIPT_REACHES_NETWORK = /\b(fetch|XMLHttpRequest)\b/
|
|
97
|
-
const SCRIPT_WRITES = /["'`](POST|PUT|PATCH|DELETE)["'`]/i
|
|
98
|
-
const ENTER_KEY = /(^|\+)(Enter|Return)$/i
|
|
99
|
-
const SENDING_CHORD = /(^|\+)(Control|Ctrl|Meta|Cmd|Command)\+/i
|
|
100
|
-
|
|
101
|
-
export function isIrreversibleLabel(label) {
|
|
102
|
-
return typeof label === "string" && IRREVERSIBLE_LABELS.some((pattern) => pattern.test(label))
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
function labelsOf(descriptor) {
|
|
106
|
-
return [descriptor?.text, descriptor?.ariaLabel, descriptor?.title, descriptor?.value].filter((label) => typeof label === "string" && label.length > 0)
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
function markupIsEditable(html) {
|
|
110
|
-
return /\bcontenteditable\b(?!\s*=\s*["']?false)|\brole\s*=\s*["']textbox["']|<textarea\b/i.test(html)
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
function labelsFromMarkup(html) {
|
|
114
|
-
const labels = []
|
|
115
|
-
for (const match of html.matchAll(/\b(?:aria-label|title|value|alt)\s*=\s*"([^"]*)"/gi)) labels.push(match[1])
|
|
116
|
-
labels.push(html.replace(/<[^>]*>/g, " ").replace(/\s+/g, " ").trim())
|
|
117
|
-
return labels.filter((label) => label.length > 0)
|
|
118
|
-
}
|
|
1
|
+
import { readFile } from "node:fs/promises"
|
|
119
2
|
|
|
120
|
-
|
|
121
|
-
if (typeof expression !== "string") return false
|
|
122
|
-
if (SCRIPT_DRIVES_UI.test(expression) || SCRIPT_BEACON.test(expression)) return true
|
|
123
|
-
return SCRIPT_REACHES_NETWORK.test(expression) && SCRIPT_WRITES.test(expression)
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
function describeElementExpression(selector) {
|
|
127
|
-
return `(function (selector) {
|
|
128
|
-
const el = selector ? document.querySelector(selector) : document.activeElement
|
|
129
|
-
if (!el || el === document.body || el === document.documentElement) return null
|
|
130
|
-
const text = (el.innerText || el.textContent || "").trim().slice(0, 200)
|
|
131
|
-
const form = el.form || (el.closest ? el.closest("form") : null)
|
|
132
|
-
return {
|
|
133
|
-
tag: el.localName,
|
|
134
|
-
editable: el.isContentEditable === true || el.localName === "textarea" || el.getAttribute("role") === "textbox",
|
|
135
|
-
text,
|
|
136
|
-
ariaLabel: el.getAttribute("aria-label") || undefined,
|
|
137
|
-
title: el.getAttribute("title") || undefined,
|
|
138
|
-
value: el.localName === "button" || (el.localName === "input" && /^(submit|button|image)$/i.test(el.type)) ? el.value : undefined,
|
|
139
|
-
form: form ? {
|
|
140
|
-
action: form.getAttribute("action") || "",
|
|
141
|
-
method: (form.getAttribute("method") || "get").toLowerCase(),
|
|
142
|
-
submitLabels: Array.from(form.querySelectorAll("button, input[type=submit], input[type=image]")).filter((b) => (b.type || "submit") === "submit").map((b) => (b.innerText || b.value || b.getAttribute("aria-label") || "").trim().slice(0, 100)),
|
|
143
|
-
} : undefined,
|
|
144
|
-
}
|
|
145
|
-
})(${JSON.stringify(selector ?? null)})`
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
function codeOf(error) {
|
|
149
|
-
return typeof error?.code === "string" ? error.code : error instanceof Error ? error.name : "error"
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
function targetKind(target) {
|
|
153
|
-
if (typeof target === "string") return /^@?e\d+$/.test(target) ? { kind: "ref", ref: target } : { kind: "selector", selector: target }
|
|
154
|
-
if (target && typeof target === "object") {
|
|
155
|
-
if (typeof target.ref === "string") return { kind: "ref", ref: target.ref }
|
|
156
|
-
if (typeof target.selector === "string") return { kind: "selector", selector: target.selector }
|
|
157
|
-
}
|
|
158
|
-
return { kind: "point" }
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
function createBridge(host, context) {
|
|
162
|
-
const call = async (args) => {
|
|
163
|
-
if (host === undefined) return undefined
|
|
164
|
-
try {
|
|
165
|
-
const result = await host.callTool(BRIDGE_TOOL, args)
|
|
166
|
-
return result?.hasError === true ? undefined : result
|
|
167
|
-
} catch {
|
|
168
|
-
return undefined
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
return {
|
|
172
|
-
async emit(status, extra = {}) {
|
|
173
|
-
const data = { engine: context.engine, status }
|
|
174
|
-
if (context.sessionId !== undefined) data.session = context.sessionId
|
|
175
|
-
for (const [key, value] of Object.entries(extra)) if (value !== undefined) data[key] = value
|
|
176
|
-
await call({ op: "state", data })
|
|
177
|
-
},
|
|
178
|
-
async stopped() {
|
|
179
|
-
return (await call({ op: "status" }))?.details?.stopped === true
|
|
180
|
-
},
|
|
181
|
-
async markStopped() {
|
|
182
|
-
await call({ op: "stopped" })
|
|
183
|
-
},
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
function describeTab(tab) {
|
|
188
|
-
if (!tab || typeof tab !== "object") return undefined
|
|
189
|
-
const favicon = tab.favicon_url ?? tab.faviconUrl ?? tab.favIconUrl ?? tab.favicon
|
|
190
|
-
const described = { id: tab.id, url: tab.url, title: tab.title }
|
|
191
|
-
if (typeof favicon === "string") described.favicon = favicon
|
|
192
|
-
return described
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
async function currentTab(rawSession) {
|
|
196
|
-
try {
|
|
197
|
-
const { tabs } = await rawSession.tabList({ scope: "agent" })
|
|
198
|
-
return describeTab(tabs?.find((tab) => tab.active) ?? tabs?.[0])
|
|
199
|
-
} catch {
|
|
200
|
-
return undefined
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
function questionFor(variant, description) {
|
|
205
|
-
const options = [
|
|
206
|
-
{ label: ALLOW, description: "Do it this once." },
|
|
207
|
-
{ label: DECLINE, description: "Stop this action and tell the agent." },
|
|
208
|
-
]
|
|
209
|
-
const question = `Allow the agent to ${description}?`
|
|
210
|
-
if (variant === "ask_user_question") {
|
|
211
|
-
return { waitForAnswer: true, questions: [{ header: QUESTION_HEADER, question, multiSelect: false, options }] }
|
|
212
|
-
}
|
|
213
|
-
return { wait_for_answer: true, questions: [{ id: "confirm_browser_action", header: QUESTION_HEADER, question, options }] }
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
function chosenAnswer(variant, details) {
|
|
217
|
-
if (details?.status !== "answered") return undefined
|
|
218
|
-
const entries = Object.values(details.answers ?? {})
|
|
219
|
-
if (entries.length !== 1) return undefined
|
|
220
|
-
return variant === "ask_user_question" ? entries[0] : entries[0]?.answers?.[0]
|
|
221
|
-
}
|
|
3
|
+
export const BROWSER_ENGINE_ENV = "OMO_BROWSER_ENGINE"
|
|
222
4
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
let variant
|
|
229
|
-
try {
|
|
230
|
-
const names = host === undefined ? [] : await host.listTools()
|
|
231
|
-
variant = ["ask_user_question", "request_user_input"].find((name) => names.includes(name))
|
|
232
|
-
} catch {
|
|
233
|
-
variant = undefined
|
|
234
|
-
}
|
|
235
|
-
if (host === undefined || variant === undefined) {
|
|
236
|
-
throw decline("The user could not be asked because this session has no question tool.")
|
|
237
|
-
}
|
|
238
|
-
const tab = await currentTab(rawSession)
|
|
239
|
-
await bridge.emit("awaiting_confirmation", { action, tab })
|
|
240
|
-
let answer
|
|
241
|
-
try {
|
|
242
|
-
const result = await host.callTool(variant, questionFor(variant, description))
|
|
243
|
-
answer = result?.hasError === true ? undefined : chosenAnswer(variant, result?.details)
|
|
244
|
-
} catch {
|
|
245
|
-
answer = undefined
|
|
246
|
-
}
|
|
247
|
-
if (answer !== ALLOW) {
|
|
248
|
-
await bridge.emit("failed", { action, reason: "user_declined", tab })
|
|
249
|
-
throw decline()
|
|
250
|
-
}
|
|
5
|
+
const TOOLKIT_TOOL = "omo_desktop_toolkit"
|
|
6
|
+
const BUILTIN_UNAVAILABLE = {
|
|
7
|
+
unavailable: "this app does not offer its built-in browser to this session",
|
|
8
|
+
timeout: "the app did not answer the request for its built-in browser",
|
|
9
|
+
invalid_grant: "the app answered the request for its built-in browser with something unusable",
|
|
251
10
|
}
|
|
252
11
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
12
|
+
export class BuiltinBrowserUnavailableError extends Error {
|
|
13
|
+
constructor(reason) {
|
|
14
|
+
const unavailable = Object.hasOwn(BUILTIN_UNAVAILABLE, reason)
|
|
15
|
+
super(
|
|
16
|
+
unavailable
|
|
17
|
+
? `OmO's built-in browser is not available here: ${BUILTIN_UNAVAILABLE[reason]}. Every other browser works as usual: connectBrowserSkill() for the user's own browser, connectPipe() for a browser of your own.`
|
|
18
|
+
: `OmO's built-in browser was refused: ${reason === "user_stopped" ? "the user stopped browser work" : `the app refused it (${reason})`}. Stop browser work and report the refusal; do not open another browser.`,
|
|
19
|
+
)
|
|
20
|
+
this.name = "BuiltinBrowserUnavailableError"
|
|
21
|
+
this.code = "browser_builtin_unavailable"
|
|
22
|
+
this.reason = reason
|
|
258
23
|
}
|
|
259
24
|
}
|
|
260
25
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
if (!(await bridge.stopped())) return
|
|
269
|
-
try {
|
|
270
|
-
await rawSession.stop()
|
|
271
|
-
} catch {
|
|
272
|
-
// The daemon may already have ended the session.
|
|
273
|
-
}
|
|
274
|
-
throw new BrowserUserStoppedError()
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
const confirm = async (action, label) => {
|
|
278
|
-
const tab = await currentTab(rawSession)
|
|
279
|
-
await confirmWithUser({ host, bridge, rawSession, description: await describeForConfirmation(rawSession, label, tab), action })
|
|
280
|
-
}
|
|
26
|
+
/**
|
|
27
|
+
* Inside OmO Desktop (`OMO_BROWSER_ENGINE` set) the library is the terminal's own, unchanged, plus
|
|
28
|
+
* `connectBuiltinBrowser()`: the app's built-in browser for this thread, the tab the user sees beside the chat.
|
|
29
|
+
*/
|
|
30
|
+
export function guardOmowright(raw, { env = process.env, host } = {}) {
|
|
31
|
+
const engine = env[BROWSER_ENGINE_ENV]
|
|
32
|
+
if (engine === undefined || engine === "") return raw
|
|
281
33
|
|
|
282
|
-
const
|
|
283
|
-
|
|
284
|
-
if (kind.kind === "point") return { unknown: true, labels: [] }
|
|
34
|
+
const acquireBuiltinBrowser = async () => {
|
|
35
|
+
let details
|
|
285
36
|
try {
|
|
286
|
-
|
|
287
|
-
const reply = await rawSession.getHtml({ ref: kind.ref, maxBytes: CLASSIFY_HTML_BYTES })
|
|
288
|
-
const html = String(reply?.html ?? "")
|
|
289
|
-
return { unknown: false, labels: labelsFromMarkup(html), editable: markupIsEditable(html) }
|
|
290
|
-
}
|
|
291
|
-
const reply = await rawSession.evaluate(describeElementExpression(kind.selector), { returnByValue: true, awaitPromise: false })
|
|
292
|
-
if (!reply || reply.ok === false) return { unknown: true, labels: [] }
|
|
293
|
-
if (reply.value === null || reply.value === undefined) return { unknown: false, labels: [], missing: true }
|
|
294
|
-
return { unknown: false, labels: labelsOf(reply.value), descriptor: reply.value }
|
|
37
|
+
details = (await host?.callTool(TOOLKIT_TOOL, { op: "acquire", toolkit: "browser" }))?.details
|
|
295
38
|
} catch {
|
|
296
|
-
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
const preflightClick = async (target) => {
|
|
301
|
-
const read = await readTarget(target)
|
|
302
|
-
if (read.unknown) return confirm("click", "click a control whose label could not be read")
|
|
303
|
-
const label = read.labels.find(isIrreversibleLabel)
|
|
304
|
-
if (label !== undefined) return confirm("click", `click "${label}"`)
|
|
305
|
-
return undefined
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
const preflightPress = async (key, options) => {
|
|
309
|
-
if (typeof key !== "string" || !ENTER_KEY.test(key)) return undefined
|
|
310
|
-
if (SENDING_CHORD.test(key)) return confirm("press", `press ${key}, which sends in many apps`)
|
|
311
|
-
if (/(^|\+)Shift\+/i.test(key)) return undefined
|
|
312
|
-
const sendsFromMessageBox = () => confirm("press", "press Enter in a message box, which sends in many apps")
|
|
313
|
-
const target = options?.target
|
|
314
|
-
if (target !== undefined && targetKind(target).kind !== "selector") {
|
|
315
|
-
const read = await readTarget(target)
|
|
316
|
-
if (read.unknown) return confirm("press", "press Enter on a control that could not be read")
|
|
317
|
-
if (read.editable) return sendsFromMessageBox()
|
|
318
|
-
const label = read.labels.find(isIrreversibleLabel)
|
|
319
|
-
return label === undefined ? undefined : confirm("press", `press Enter on "${label}"`)
|
|
39
|
+
details = undefined
|
|
320
40
|
}
|
|
321
|
-
|
|
41
|
+
if (details?.ok !== true) throw new BuiltinBrowserUnavailableError(typeof details?.reason === "string" ? details.reason : "unavailable")
|
|
42
|
+
// Without an endpoint CdpClient falls back to 127.0.0.1:9222 and would send the token to whatever listens there.
|
|
43
|
+
const endpoint = details.grant?.endpoint
|
|
44
|
+
if (typeof endpoint !== "string" || endpoint === "") throw new BuiltinBrowserUnavailableError("invalid_grant")
|
|
45
|
+
let token
|
|
322
46
|
try {
|
|
323
|
-
|
|
324
|
-
returnByValue: true,
|
|
325
|
-
awaitPromise: false,
|
|
326
|
-
})
|
|
327
|
-
if (!reply || reply.ok === false) return confirm("press", "press Enter in a field that could not be read")
|
|
328
|
-
described = reply.value
|
|
47
|
+
token = (await readFile(details.grant.tokenFile, "utf8")).trim()
|
|
329
48
|
} catch {
|
|
330
|
-
|
|
49
|
+
throw new BuiltinBrowserUnavailableError("invalid_grant")
|
|
331
50
|
}
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
await bridge.emit("user_stopped", { action: kind })
|
|
355
|
-
try {
|
|
356
|
-
await rawSession.stop()
|
|
357
|
-
} catch {
|
|
358
|
-
// The daemon already ended it.
|
|
51
|
+
return { endpoint, authorization: `Bearer ${token}` }
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// A CDP endpoint that shows only this thread's tabs. The token is read from the file the grant names, so it never
|
|
55
|
+
// passes through a tool result.
|
|
56
|
+
const connectBuiltinBrowser = async (options = {}) => {
|
|
57
|
+
let current = await acquireBuiltinBrowser()
|
|
58
|
+
// Concurrent refreshes share one acquire, so a token is never paired with another grant's endpoint.
|
|
59
|
+
let refreshing
|
|
60
|
+
const authorizer = {
|
|
61
|
+
async resolveAuthorization({ forceRefresh } = {}) {
|
|
62
|
+
if (forceRefresh) {
|
|
63
|
+
refreshing ??= acquireBuiltinBrowser()
|
|
64
|
+
.then((next) => {
|
|
65
|
+
current = next
|
|
66
|
+
client.cdpUrl = next.endpoint
|
|
67
|
+
return next
|
|
68
|
+
})
|
|
69
|
+
.finally(() => {
|
|
70
|
+
refreshing = undefined
|
|
71
|
+
})
|
|
72
|
+
return (await refreshing).authorization
|
|
359
73
|
}
|
|
360
|
-
|
|
361
|
-
}
|
|
362
|
-
await bridge.emit("failed", { action: kind, reason: codeOf(error) })
|
|
363
|
-
throw error
|
|
364
|
-
}
|
|
365
|
-
if (navigates) await bridge.emit("navigated", { action: kind, tab: await currentTab(rawSession) })
|
|
366
|
-
await bridge.emit("idle", { action: kind })
|
|
367
|
-
return result
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
const plain = (method, navigates) => (...args) => act(method, () => rawSession[method](...args), { navigates })
|
|
371
|
-
const handlers = {
|
|
372
|
-
navigate: plain("navigate", true),
|
|
373
|
-
back: plain("back", true),
|
|
374
|
-
forward: plain("forward", true),
|
|
375
|
-
reload: plain("reload", true),
|
|
376
|
-
waitForNavigation: plain("waitForNavigation", true),
|
|
377
|
-
tabCreate: plain("tabCreate", true),
|
|
378
|
-
tabSelect: plain("tabSelect", true),
|
|
379
|
-
tabClose: plain("tabClose", true),
|
|
380
|
-
tabBorrow: plain("tabBorrow", true),
|
|
381
|
-
tabReturn: plain("tabReturn", true),
|
|
382
|
-
fill: plain("fill", false),
|
|
383
|
-
select: plain("select", false),
|
|
384
|
-
hover: plain("hover", false),
|
|
385
|
-
focus: plain("focus", false),
|
|
386
|
-
blur: plain("blur", false),
|
|
387
|
-
scrollTo: plain("scrollTo", false),
|
|
388
|
-
wheel: plain("wheel", false),
|
|
389
|
-
click: (target, options) => act("click", () => rawSession.click(target, options), { preflight: () => preflightClick(target) }),
|
|
390
|
-
press: (key, options) => act("press", () => rawSession.press(key, options), { preflight: () => preflightPress(key, options) }),
|
|
391
|
-
evaluate: (expression, options) =>
|
|
392
|
-
act("evaluate", () => rawSession.evaluate(expression, options), {
|
|
393
|
-
preflight: () => (scriptNeedsConfirmation(expression) ? confirm("evaluate", "run a script that can click, submit or send in your browser") : undefined),
|
|
394
|
-
}),
|
|
395
|
-
tool: async (name, params) => {
|
|
396
|
-
if (!READ_ONLY_RAW_TOOLS.has(name)) {
|
|
397
|
-
throw new BrowserEngineRefusal("browser_tool_blocked", `session.tool("${name}") skips the confirmation policy; only reads go through it. Call the matching session method instead.`)
|
|
398
|
-
}
|
|
399
|
-
return await rawSession.tool(name, params)
|
|
400
|
-
},
|
|
401
|
-
async stop() {
|
|
402
|
-
if (rawSession.stopped) return null
|
|
403
|
-
try {
|
|
404
|
-
return await rawSession.stop()
|
|
405
|
-
} finally {
|
|
406
|
-
await bridge.emit("stopped")
|
|
407
|
-
}
|
|
408
|
-
},
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
return new Proxy(rawSession, {
|
|
412
|
-
get(target, property) {
|
|
413
|
-
if (Object.hasOwn(handlers, property)) return handlers[property]
|
|
414
|
-
const value = Reflect.get(target, property, target)
|
|
415
|
-
return typeof value === "function" ? value.bind(target) : value
|
|
416
|
-
},
|
|
417
|
-
})
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
const GUARDED_SESSIONS = new WeakMap()
|
|
421
|
-
|
|
422
|
-
function connectErrorFor(error) {
|
|
423
|
-
if (NOT_CONNECTED_CODES.has(codeOf(error))) {
|
|
424
|
-
return new BrowserNotConnectedError(
|
|
425
|
-
"Connect your browser: this session is set to drive the user's own browser, and none is connected. Ask the user to open the browser that has the BrowserSkill extension enabled, then try again. Do not use or launch another browser.",
|
|
426
|
-
{ cause: error },
|
|
427
|
-
)
|
|
428
|
-
}
|
|
429
|
-
return error
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
export function guardOmowright(raw, { env = process.env, host } = {}) {
|
|
433
|
-
const engine = env[BROWSER_ENGINE_ENV]
|
|
434
|
-
if (engine === undefined || engine === "") return raw
|
|
435
|
-
|
|
436
|
-
const connectBrowserSkill = async (options) => {
|
|
437
|
-
if (!ENGINES.has(engine)) {
|
|
438
|
-
throw new BrowserEngineRefusal("browser_engine_unsupported", `${BROWSER_ENGINE_ENV} is "${engine}", which is not connected, builtin or none; browser use is refused.`)
|
|
439
|
-
}
|
|
440
|
-
if (engine === "none") {
|
|
441
|
-
throw new BrowserEngineRefusal("browser_engine_none", "Agent browser access is off for this project. Tell the user; do not try another browser.")
|
|
74
|
+
return current.authorization
|
|
75
|
+
},
|
|
442
76
|
}
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
}
|
|
446
|
-
const context = { engine, sessionId: undefined }
|
|
447
|
-
const bridge = createBridge(host, context)
|
|
448
|
-
if (await bridge.stopped()) throw new BrowserUserStoppedError()
|
|
449
|
-
let rawSession
|
|
450
|
-
try {
|
|
451
|
-
rawSession = await raw.connectBrowserSkill(options)
|
|
452
|
-
} catch (error) {
|
|
453
|
-
await bridge.emit("connect_failed", { reason: codeOf(error) })
|
|
454
|
-
throw connectErrorFor(error)
|
|
455
|
-
}
|
|
456
|
-
context.sessionId = rawSession.sessionId
|
|
457
|
-
const session = wrapSession(rawSession, context, bridge, host)
|
|
458
|
-
GUARDED_SESSIONS.set(session, rawSession)
|
|
459
|
-
await bridge.emit("started")
|
|
460
|
-
return session
|
|
77
|
+
const client = new raw.CdpClient({ ...options.client, cdpUrl: current.endpoint, authorizer })
|
|
78
|
+
return await new raw.BrowserConnection(client, options).initialize()
|
|
461
79
|
}
|
|
462
80
|
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
return allowlistedLibrary(raw, engine, { connectBrowserSkill, bskSnapshot })
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
function ownedBrowserRefusal(engine) {
|
|
469
|
-
const why =
|
|
470
|
-
engine === "none"
|
|
471
|
-
? "Agent browser access is off for this project."
|
|
472
|
-
: engine === "builtin"
|
|
473
|
-
? "This session uses the app's built-in browser."
|
|
474
|
-
: engine === "connected"
|
|
475
|
-
? "This session drives the user's own browser only."
|
|
476
|
-
: `${BROWSER_ENGINE_ENV} is "${engine}", which is not connected, builtin or none.`
|
|
477
|
-
const refusal = new BrowserEngineRefusal("browser_engine_owned_blocked", `${why} Do not launch an owned browser; tell the user instead.`)
|
|
478
|
-
refusal.engine = engine
|
|
479
|
-
return refusal
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
function blockedExport(name, engine) {
|
|
483
|
-
const blocked = function () {
|
|
484
|
-
const refusal = new BrowserEngineRefusal(
|
|
485
|
-
OWNED_SESSION_CREATORS.has(name) ? "browser_engine_owned_blocked" : "browser_engine_export_blocked",
|
|
486
|
-
OWNED_SESSION_CREATORS.has(name)
|
|
487
|
-
? ownedBrowserRefusal(engine).message
|
|
488
|
-
: `omowright.${name} is not available while ${BROWSER_ENGINE_ENV} is set; it can act on a browser without the engine and confirmation policy.`,
|
|
489
|
-
)
|
|
490
|
-
refusal.engine = engine
|
|
491
|
-
if (new.target !== undefined) throw refusal
|
|
492
|
-
return Promise.reject(refusal)
|
|
493
|
-
}
|
|
494
|
-
Object.defineProperty(blocked, "name", { value: name })
|
|
495
|
-
return blocked
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
function allowlistedLibrary(raw, engine, guarded) {
|
|
499
|
-
const library = {}
|
|
500
|
-
for (const [name, value] of Object.entries(raw)) {
|
|
501
|
-
if (typeof value !== "function") library[name] = value
|
|
502
|
-
else if (PASSTHROUGH_FUNCTIONS.has(name)) library[name] = value
|
|
503
|
-
else library[name] = blockedExport(name, engine)
|
|
504
|
-
}
|
|
505
|
-
return Object.assign(library, guarded)
|
|
81
|
+
return { ...raw, connectBuiltinBrowser }
|
|
506
82
|
}
|
|
@@ -36,7 +36,7 @@ if (json) {
|
|
|
36
36
|
console.log(`attached engine ready: ${summary.browsersConnected.map((b) => `${b.name} ${b.version}`).join(", ")}`)
|
|
37
37
|
} else {
|
|
38
38
|
console.log(`cli: ${result.cli.installed ? `${result.cli.bskBin} (${result.cli.version})` : "install failed"}`)
|
|
39
|
-
console.log(`daemon: ${result.daemon.running ? "running" : `not running${result.daemon.error ? `
|
|
39
|
+
console.log(`daemon: ${result.daemon.running ? "running" : `not running${result.daemon.error ? ` - ${result.daemon.error}` : ""}`}`)
|
|
40
40
|
console.log(summary.browser ? `browser: ${summary.browser.label} [${summary.browser.id}] (${summary.browser.reason})` : `browser: not identified (${result.identification.reason})`)
|
|
41
41
|
for (const r of summary.registrations) {
|
|
42
42
|
console.log(`extension for ${r.browser}: ${r.registered ? (r.alreadyPresent ? "already registered" : "registered") : `not registered (${r.reason})`}`)
|
|
@@ -3,16 +3,7 @@ import { dirname, join } from "node:path"
|
|
|
3
3
|
import { fileURLToPath, pathToFileURL } from "node:url"
|
|
4
4
|
import { guardOmowright } from "./browser-engine-guard.mjs"
|
|
5
5
|
|
|
6
|
-
export {
|
|
7
|
-
BROWSER_CONFIRMATION_POLICY,
|
|
8
|
-
BROWSER_ENGINE_ENV,
|
|
9
|
-
BROWSER_STATE_EVENT,
|
|
10
|
-
BrowserActionDeclinedError,
|
|
11
|
-
BrowserEngineRefusal,
|
|
12
|
-
BrowserNotConnectedError,
|
|
13
|
-
BrowserUserStoppedError,
|
|
14
|
-
guardOmowright,
|
|
15
|
-
} from "./browser-engine-guard.mjs"
|
|
6
|
+
export { BROWSER_ENGINE_ENV, BuiltinBrowserUnavailableError, guardOmowright } from "./browser-engine-guard.mjs"
|
|
16
7
|
|
|
17
8
|
const scriptDir = dirname(fileURLToPath(import.meta.url))
|
|
18
9
|
const skillRoot = dirname(scriptDir)
|
|
@@ -215,7 +215,7 @@ operating guide for consulting the beui.dev animated-component registry during i
|
|
|
215
215
|
and motion work, written from live endpoint verification; no beui.dev source code,
|
|
216
216
|
documentation text, or component implementations are vendored. beui.dev names remain the
|
|
217
217
|
property of their owner, and the guide instructs reading component source for mechanism
|
|
218
|
-
extraction only, not
|
|
218
|
+
extraction only, not copying it into references or projects.
|
|
219
219
|
|
|
220
220
|
`frontend/references/design/ambience-skill.md` is a project-original, curl-only operating
|
|
221
221
|
guide for consulting the react-bits (reactbits.dev) animated-component registry during hero
|
|
@@ -223,7 +223,7 @@ atmosphere, background, typographic-motion, and card-surface work, written from
|
|
|
223
223
|
verification; no react-bits source code, documentation text, or component implementations are
|
|
224
224
|
vendored. react-bits is distributed under MIT plus the Commons Clause, which permits use inside
|
|
225
225
|
applications but forbids redistributing or porting the components themselves; the guide
|
|
226
|
-
therefore instructs reading component source for mechanism extraction only and never
|
|
226
|
+
therefore instructs reading component source for mechanism extraction only and never copying
|
|
227
227
|
it into references, design documents, or this repository. React Bits names remain the property
|
|
228
228
|
of their owner.
|
|
229
229
|
|