browser-automation-skill 0.71.0
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/LICENSE +21 -0
- package/README.md +144 -0
- package/SECURITY.md +39 -0
- package/SKILL.md +206 -0
- package/bin/cli.mjs +55 -0
- package/install.sh +143 -0
- package/package.json +54 -0
- package/references/adapter-candidates.md +40 -0
- package/references/browser-mcp-cheatsheet.md +132 -0
- package/references/browser-stats-cheatsheet.md +155 -0
- package/references/chrome-devtools-mcp-cheatsheet.md +232 -0
- package/references/midscene-integration.md +359 -0
- package/references/obscura-cheatsheet.md +103 -0
- package/references/playwright-cli-cheatsheet.md +64 -0
- package/references/playwright-lib-cheatsheet.md +90 -0
- package/references/recipes/add-a-tool-adapter.md +134 -0
- package/references/recipes/agent-workflows/README.md +37 -0
- package/references/recipes/agent-workflows/cache-driven-bulk-operation.md +110 -0
- package/references/recipes/agent-workflows/flow-record-and-replay.md +102 -0
- package/references/recipes/agent-workflows/incremental-pattern-discovery.md +125 -0
- package/references/recipes/agent-workflows/login-then-scrape.md +100 -0
- package/references/recipes/anti-patterns-tool-extension.md +182 -0
- package/references/recipes/body-bytes-not-body.md +139 -0
- package/references/recipes/cache-write-security.md +210 -0
- package/references/recipes/fingerprint-rescue.md +154 -0
- package/references/recipes/model-routing.md +143 -0
- package/references/recipes/path-security.md +138 -0
- package/references/recipes/privacy-canary.md +96 -0
- package/references/recipes/visual-rescue-hook.md +182 -0
- package/references/stats-prices.json +42 -0
- package/references/stats-schema.json +77 -0
- package/references/tool-versions.md +8 -0
- package/scripts/browser-add-site.sh +113 -0
- package/scripts/browser-assert.sh +106 -0
- package/scripts/browser-audit.sh +68 -0
- package/scripts/browser-baseline.sh +135 -0
- package/scripts/browser-click.sh +100 -0
- package/scripts/browser-creds-add.sh +254 -0
- package/scripts/browser-creds-list.sh +67 -0
- package/scripts/browser-creds-migrate.sh +122 -0
- package/scripts/browser-creds-remove.sh +69 -0
- package/scripts/browser-creds-rotate-totp.sh +109 -0
- package/scripts/browser-creds-show.sh +82 -0
- package/scripts/browser-creds-totp.sh +94 -0
- package/scripts/browser-do.sh +630 -0
- package/scripts/browser-doctor.sh +365 -0
- package/scripts/browser-drag.sh +90 -0
- package/scripts/browser-extract.sh +192 -0
- package/scripts/browser-fill.sh +142 -0
- package/scripts/browser-flow.sh +316 -0
- package/scripts/browser-history.sh +187 -0
- package/scripts/browser-hover.sh +92 -0
- package/scripts/browser-inspect.sh +188 -0
- package/scripts/browser-list-sessions.sh +78 -0
- package/scripts/browser-list-sites.sh +42 -0
- package/scripts/browser-login.sh +279 -0
- package/scripts/browser-mcp.sh +65 -0
- package/scripts/browser-migrate.sh +195 -0
- package/scripts/browser-open.sh +134 -0
- package/scripts/browser-press.sh +80 -0
- package/scripts/browser-remove-session.sh +72 -0
- package/scripts/browser-remove-site.sh +68 -0
- package/scripts/browser-replay.sh +206 -0
- package/scripts/browser-route.sh +174 -0
- package/scripts/browser-select.sh +122 -0
- package/scripts/browser-show-session.sh +57 -0
- package/scripts/browser-show-site.sh +37 -0
- package/scripts/browser-snapshot.sh +176 -0
- package/scripts/browser-stats.sh +522 -0
- package/scripts/browser-tab-close.sh +112 -0
- package/scripts/browser-tab-list.sh +70 -0
- package/scripts/browser-tab-switch.sh +111 -0
- package/scripts/browser-upload.sh +132 -0
- package/scripts/browser-use.sh +60 -0
- package/scripts/browser-vlm.sh +707 -0
- package/scripts/browser-wait.sh +97 -0
- package/scripts/install-git-hooks.sh +16 -0
- package/scripts/lib/capture.sh +356 -0
- package/scripts/lib/common.sh +262 -0
- package/scripts/lib/credential.sh +237 -0
- package/scripts/lib/fingerprint-rescue.js +123 -0
- package/scripts/lib/flow.sh +448 -0
- package/scripts/lib/flow_record.sh +210 -0
- package/scripts/lib/mask.sh +49 -0
- package/scripts/lib/memory.sh +427 -0
- package/scripts/lib/migrate.sh +390 -0
- package/scripts/lib/migrators/README.md +23 -0
- package/scripts/lib/migrators/memory/v1_to_v2.sh +15 -0
- package/scripts/lib/migrators/recent_urls/README.md +13 -0
- package/scripts/lib/migrators/stats/README.md +24 -0
- package/scripts/lib/node/chrome-devtools-bridge.mjs +1812 -0
- package/scripts/lib/node/mcp-server.mjs +531 -0
- package/scripts/lib/node/mcp-tools.json +68 -0
- package/scripts/lib/node/playwright-driver.mjs +1104 -0
- package/scripts/lib/node/totp-core.mjs +52 -0
- package/scripts/lib/node/totp.mjs +52 -0
- package/scripts/lib/node/url-pattern-cluster.mjs +102 -0
- package/scripts/lib/node/url-pattern-resolver.mjs +77 -0
- package/scripts/lib/output.sh +79 -0
- package/scripts/lib/router.sh +342 -0
- package/scripts/lib/sanitize.sh +107 -0
- package/scripts/lib/secret/keychain.sh +91 -0
- package/scripts/lib/secret/libsecret.sh +74 -0
- package/scripts/lib/secret/plaintext.sh +75 -0
- package/scripts/lib/secret_backend_select.sh +57 -0
- package/scripts/lib/session.sh +153 -0
- package/scripts/lib/site.sh +126 -0
- package/scripts/lib/stats.sh +419 -0
- package/scripts/lib/tool/.gitkeep +0 -0
- package/scripts/lib/tool/chrome-devtools-mcp.sh +349 -0
- package/scripts/lib/tool/obscura.sh +249 -0
- package/scripts/lib/tool/playwright-cli.sh +155 -0
- package/scripts/lib/tool/playwright-lib.sh +106 -0
- package/scripts/lib/verb_helpers.sh +222 -0
- package/scripts/lib/visual-rescue-default.sh +145 -0
- package/scripts/regenerate-docs.sh +99 -0
- package/uninstall.sh +51 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# scripts/regenerate-docs.sh — manual regen of cross-cutting docs from adapter
|
|
3
|
+
# metadata. Intended to be run by hand; never by hooks. Drift is caught by
|
|
4
|
+
# tests/lint.sh (Task 13). See: extension-model spec §6.
|
|
5
|
+
|
|
6
|
+
set -euo pipefail
|
|
7
|
+
IFS=$'\n\t'
|
|
8
|
+
|
|
9
|
+
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
10
|
+
LIB_TOOL_DIR="${REPO_ROOT}/scripts/lib/tool"
|
|
11
|
+
|
|
12
|
+
emit_tool_versions() {
|
|
13
|
+
local to_stdout="${1:-}"
|
|
14
|
+
local out_file="${REPO_ROOT}/references/tool-versions.md"
|
|
15
|
+
local body
|
|
16
|
+
body="$(
|
|
17
|
+
printf '# Tool versions (autogenerated — do not edit; run scripts/regenerate-docs.sh)\n\n'
|
|
18
|
+
printf '| Tool | Version pin | Install hint | Cheatsheet |\n'
|
|
19
|
+
printf '|---|---|---|---|\n'
|
|
20
|
+
shopt -s nullglob
|
|
21
|
+
for adapter_file in "${LIB_TOOL_DIR}"/*.sh; do
|
|
22
|
+
[ "$(basename "${adapter_file}")" = ".gitkeep" ] && continue
|
|
23
|
+
meta="$(source "${adapter_file}" 2>/dev/null; tool_metadata 2>/dev/null)"
|
|
24
|
+
# install_hint is static (in tool_metadata), NOT dynamic (tool_doctor_check),
|
|
25
|
+
# so the generator output is deterministic across environments — drift lint
|
|
26
|
+
# passes regardless of whether the tool is currently installed on PATH.
|
|
27
|
+
jq -nr --argjson meta "${meta}" \
|
|
28
|
+
'"| \($meta.name) | \($meta.version_pin) | \($meta.install_hint // "n/a") | [\($meta.cheatsheet_path)](../\($meta.cheatsheet_path)) |"'
|
|
29
|
+
done
|
|
30
|
+
shopt -u nullglob
|
|
31
|
+
)"
|
|
32
|
+
if [ "${to_stdout}" = "--to-stdout" ]; then
|
|
33
|
+
printf '%s\n' "${body}"
|
|
34
|
+
else
|
|
35
|
+
printf '%s\n' "${body}" > "${out_file}"
|
|
36
|
+
fi
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
emit_skill_md() {
|
|
40
|
+
local to_stdout="${1:-}"
|
|
41
|
+
local skill_md="${REPO_ROOT}/SKILL.md"
|
|
42
|
+
local body
|
|
43
|
+
body="$(
|
|
44
|
+
printf '<!-- BEGIN AUTOGEN: tools-table — generated by scripts/regenerate-docs.sh -->\n'
|
|
45
|
+
printf '| Tool | Strengths | Cheatsheet |\n'
|
|
46
|
+
printf '|---|---|---|\n'
|
|
47
|
+
shopt -s nullglob
|
|
48
|
+
for adapter_file in "${LIB_TOOL_DIR}"/*.sh; do
|
|
49
|
+
[ "$(basename "${adapter_file}")" = ".gitkeep" ] && continue
|
|
50
|
+
meta="$(source "${adapter_file}" 2>/dev/null; tool_metadata 2>/dev/null)"
|
|
51
|
+
caps="$(source "${adapter_file}" 2>/dev/null; tool_capabilities 2>/dev/null)"
|
|
52
|
+
verb_count="$(jq -r '.verbs | length' <<<"${caps}")"
|
|
53
|
+
jq -nr --argjson meta "${meta}" --argjson n "${verb_count}" \
|
|
54
|
+
'"| \($meta.name) | declares \($n) verbs | [\($meta.cheatsheet_path)](\($meta.cheatsheet_path)) |"'
|
|
55
|
+
done
|
|
56
|
+
shopt -u nullglob
|
|
57
|
+
printf '<!-- END AUTOGEN: tools-table -->\n'
|
|
58
|
+
)"
|
|
59
|
+
if [ "${to_stdout}" = "--to-stdout" ]; then
|
|
60
|
+
printf '%s' "${body}"
|
|
61
|
+
return
|
|
62
|
+
fi
|
|
63
|
+
local tmp body_file
|
|
64
|
+
tmp="$(mktemp)"
|
|
65
|
+
body_file="$(mktemp)"
|
|
66
|
+
printf '%s' "${body}" > "${body_file}"
|
|
67
|
+
awk -v body_file="${body_file}" '
|
|
68
|
+
/<!-- BEGIN AUTOGEN: tools-table/ {
|
|
69
|
+
while ((getline line < body_file) > 0) print line
|
|
70
|
+
close(body_file)
|
|
71
|
+
in_block=1
|
|
72
|
+
next
|
|
73
|
+
}
|
|
74
|
+
/<!-- END AUTOGEN: tools-table -->/ { in_block=0; next }
|
|
75
|
+
!in_block { print }
|
|
76
|
+
' "${skill_md}" > "${tmp}"
|
|
77
|
+
mv "${tmp}" "${skill_md}"
|
|
78
|
+
rm -f "${body_file}"
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
case "${1:-}" in
|
|
82
|
+
--to-stdout)
|
|
83
|
+
case "${2:-}" in
|
|
84
|
+
tool-versions) emit_tool_versions --to-stdout ;;
|
|
85
|
+
skill-md) emit_skill_md --to-stdout ;;
|
|
86
|
+
*) printf 'usage: %s --to-stdout {tool-versions|skill-md}\n' "$0" >&2; exit 2 ;;
|
|
87
|
+
esac
|
|
88
|
+
;;
|
|
89
|
+
tool-versions) emit_tool_versions ;;
|
|
90
|
+
skill-md) emit_skill_md ;;
|
|
91
|
+
""|all)
|
|
92
|
+
emit_tool_versions
|
|
93
|
+
emit_skill_md
|
|
94
|
+
;;
|
|
95
|
+
*)
|
|
96
|
+
printf 'usage: %s [tool-versions|skill-md|all|--to-stdout {tool-versions|skill-md}]\n' "$0" >&2
|
|
97
|
+
exit 2
|
|
98
|
+
;;
|
|
99
|
+
esac
|
package/uninstall.sh
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# uninstall.sh — remove the ~/.claude/skills symlink. Optionally remove state.
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
IFS=$'\n\t'
|
|
5
|
+
|
|
6
|
+
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
7
|
+
# shellcheck source=scripts/lib/common.sh
|
|
8
|
+
# shellcheck disable=SC1091
|
|
9
|
+
source "${REPO_ROOT}/scripts/lib/common.sh"
|
|
10
|
+
|
|
11
|
+
KEEP_STATE=0
|
|
12
|
+
DRY_RUN=0
|
|
13
|
+
|
|
14
|
+
usage() {
|
|
15
|
+
cat <<'USAGE'
|
|
16
|
+
Usage: ./uninstall.sh [options]
|
|
17
|
+
|
|
18
|
+
--keep-state do not delete ~/.browser-skill/ (default; today the script
|
|
19
|
+
never deletes state — a future release may add an opt-in
|
|
20
|
+
--delete-state flag)
|
|
21
|
+
--dry-run print what would happen, change nothing
|
|
22
|
+
-h, --help
|
|
23
|
+
USAGE
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
for arg in "$@"; do
|
|
27
|
+
case "${arg}" in
|
|
28
|
+
--keep-state) KEEP_STATE=1 ;;
|
|
29
|
+
--dry-run) DRY_RUN=1 ;;
|
|
30
|
+
-h|--help) usage; exit 0 ;;
|
|
31
|
+
*) warn "ignoring unknown arg: ${arg}" ;;
|
|
32
|
+
esac
|
|
33
|
+
done
|
|
34
|
+
|
|
35
|
+
init_paths
|
|
36
|
+
|
|
37
|
+
link="${HOME}/.claude/skills/browser-automation-skill"
|
|
38
|
+
if [ -L "${link}" ]; then
|
|
39
|
+
if [ "${DRY_RUN}" = "1" ]; then
|
|
40
|
+
ok "dry-run: would remove symlink ${link}"
|
|
41
|
+
else
|
|
42
|
+
rm "${link}"
|
|
43
|
+
ok "removed symlink: ${link}"
|
|
44
|
+
fi
|
|
45
|
+
else
|
|
46
|
+
ok "no symlink at ${link} (already gone)"
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
if [ "${KEEP_STATE}" != "1" ] && [ -d "${BROWSER_SKILL_HOME}" ]; then
|
|
50
|
+
ok "keeping state at ${BROWSER_SKILL_HOME} (use rm -rf manually to delete)"
|
|
51
|
+
fi
|