@william_jin/autobrowse 0.0.0-stage → 0.8.4
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.md +91 -0
- package/README.md +991 -2
- package/dist/access/fence.d.ts +13 -0
- package/dist/access/fence.js +66 -0
- package/dist/access/fence.js.map +1 -0
- package/dist/access/keys.d.ts +51 -0
- package/dist/access/keys.js +116 -0
- package/dist/access/keys.js.map +1 -0
- package/dist/agent/builder.d.ts +44 -0
- package/dist/agent/builder.js +97 -0
- package/dist/agent/builder.js.map +1 -0
- package/dist/agent/digest.d.ts +52 -0
- package/dist/agent/digest.js +411 -0
- package/dist/agent/digest.js.map +1 -0
- package/dist/agent/evaluator.d.ts +33 -0
- package/dist/agent/evaluator.js +73 -0
- package/dist/agent/evaluator.js.map +1 -0
- package/dist/agent/explorer.d.ts +274 -0
- package/dist/agent/explorer.js +484 -0
- package/dist/agent/explorer.js.map +1 -0
- package/dist/agent/heal.d.ts +58 -0
- package/dist/agent/heal.js +280 -0
- package/dist/agent/heal.js.map +1 -0
- package/dist/agent/index.d.ts +7 -0
- package/dist/agent/index.js +8 -0
- package/dist/agent/index.js.map +1 -0
- package/dist/agent/ledger.d.ts +31 -0
- package/dist/agent/ledger.js +38 -0
- package/dist/agent/ledger.js.map +1 -0
- package/dist/agent/records.d.ts +27 -0
- package/dist/agent/records.js +157 -0
- package/dist/agent/records.js.map +1 -0
- package/dist/agent/repair.d.ts +8 -0
- package/dist/agent/repair.js +38 -0
- package/dist/agent/repair.js.map +1 -0
- package/dist/agent/schedule.d.ts +24 -0
- package/dist/agent/schedule.js +42 -0
- package/dist/agent/schedule.js.map +1 -0
- package/dist/agent/sessions.d.ts +100 -0
- package/dist/agent/sessions.js +314 -0
- package/dist/agent/sessions.js.map +1 -0
- package/dist/app/apple-passwords.d.ts +14 -0
- package/dist/app/apple-passwords.js +114 -0
- package/dist/app/apple-passwords.js.map +1 -0
- package/dist/app/backend.d.ts +187 -0
- package/dist/app/backend.js +316 -0
- package/dist/app/backend.js.map +1 -0
- package/dist/app/bitwarden.d.ts +38 -0
- package/dist/app/bitwarden.js +81 -0
- package/dist/app/bitwarden.js.map +1 -0
- package/dist/app/box-register.d.ts +11 -0
- package/dist/app/box-register.js +51 -0
- package/dist/app/box-register.js.map +1 -0
- package/dist/app/box.d.ts +25 -0
- package/dist/app/box.js +62 -0
- package/dist/app/box.js.map +1 -0
- package/dist/app/cli-access.d.ts +7 -0
- package/dist/app/cli-access.js +67 -0
- package/dist/app/cli-access.js.map +1 -0
- package/dist/app/cli-accounts.d.ts +35 -0
- package/dist/app/cli-accounts.js +154 -0
- package/dist/app/cli-accounts.js.map +1 -0
- package/dist/app/cli-auth.d.ts +11 -0
- package/dist/app/cli-auth.js +826 -0
- package/dist/app/cli-auth.js.map +1 -0
- package/dist/app/cli-autotrack.d.ts +11 -0
- package/dist/app/cli-autotrack.js +187 -0
- package/dist/app/cli-autotrack.js.map +1 -0
- package/dist/app/cli-aws.d.ts +4 -0
- package/dist/app/cli-aws.js +118 -0
- package/dist/app/cli-aws.js.map +1 -0
- package/dist/app/cli-calls.d.ts +9 -0
- package/dist/app/cli-calls.js +65 -0
- package/dist/app/cli-calls.js.map +1 -0
- package/dist/app/cli-connectors.d.ts +18 -0
- package/dist/app/cli-connectors.js +114 -0
- package/dist/app/cli-connectors.js.map +1 -0
- package/dist/app/cli-desktop.d.ts +2 -0
- package/dist/app/cli-desktop.js +46 -0
- package/dist/app/cli-desktop.js.map +1 -0
- package/dist/app/cli-do.d.ts +8 -0
- package/dist/app/cli-do.js +40 -0
- package/dist/app/cli-do.js.map +1 -0
- package/dist/app/cli-env.d.ts +34 -0
- package/dist/app/cli-env.js +274 -0
- package/dist/app/cli-env.js.map +1 -0
- package/dist/app/cli-files.d.ts +3 -0
- package/dist/app/cli-files.js +186 -0
- package/dist/app/cli-files.js.map +1 -0
- package/dist/app/cli-film.d.ts +6 -0
- package/dist/app/cli-film.js +25 -0
- package/dist/app/cli-film.js.map +1 -0
- package/dist/app/cli-json.d.ts +2 -0
- package/dist/app/cli-json.js +17 -0
- package/dist/app/cli-json.js.map +1 -0
- package/dist/app/cli-keys.d.ts +34 -0
- package/dist/app/cli-keys.js +306 -0
- package/dist/app/cli-keys.js.map +1 -0
- package/dist/app/cli-langfuse.d.ts +8 -0
- package/dist/app/cli-langfuse.js +55 -0
- package/dist/app/cli-langfuse.js.map +1 -0
- package/dist/app/cli-mods.d.ts +3 -0
- package/dist/app/cli-mods.js +134 -0
- package/dist/app/cli-mods.js.map +1 -0
- package/dist/app/cli-needs.d.ts +24 -0
- package/dist/app/cli-needs.js +75 -0
- package/dist/app/cli-needs.js.map +1 -0
- package/dist/app/cli-reach.d.ts +14 -0
- package/dist/app/cli-reach.js +206 -0
- package/dist/app/cli-reach.js.map +1 -0
- package/dist/app/cli-record.d.ts +4 -0
- package/dist/app/cli-record.js +692 -0
- package/dist/app/cli-record.js.map +1 -0
- package/dist/app/cli-runs.d.ts +24 -0
- package/dist/app/cli-runs.js +496 -0
- package/dist/app/cli-runs.js.map +1 -0
- package/dist/app/cli-share.d.ts +5 -0
- package/dist/app/cli-share.js +134 -0
- package/dist/app/cli-share.js.map +1 -0
- package/dist/app/cli-shots.d.ts +8 -0
- package/dist/app/cli-shots.js +76 -0
- package/dist/app/cli-shots.js.map +1 -0
- package/dist/app/cli-site.d.ts +18 -0
- package/dist/app/cli-site.js +241 -0
- package/dist/app/cli-site.js.map +1 -0
- package/dist/app/cli-teach.d.ts +3 -0
- package/dist/app/cli-teach.js +105 -0
- package/dist/app/cli-teach.js.map +1 -0
- package/dist/app/cli-unsubscribe.d.ts +7 -0
- package/dist/app/cli-unsubscribe.js +57 -0
- package/dist/app/cli-unsubscribe.js.map +1 -0
- package/dist/app/cli-wallet.d.ts +9 -0
- package/dist/app/cli-wallet.js +199 -0
- package/dist/app/cli-wallet.js.map +1 -0
- package/dist/app/cli-watched.d.ts +16 -0
- package/dist/app/cli-watched.js +125 -0
- package/dist/app/cli-watched.js.map +1 -0
- package/dist/app/cli.d.ts +2 -0
- package/dist/app/cli.js +695 -0
- package/dist/app/cli.js.map +1 -0
- package/dist/app/client.d.ts +77 -0
- package/dist/app/client.js +31 -0
- package/dist/app/client.js.map +1 -0
- package/dist/app/config.d.ts +342 -0
- package/dist/app/config.js +606 -0
- package/dist/app/config.js.map +1 -0
- package/dist/app/desk.d.ts +1 -0
- package/dist/app/desk.js +140 -0
- package/dist/app/desk.js.map +1 -0
- package/dist/app/display.d.ts +13 -0
- package/dist/app/display.js +6 -0
- package/dist/app/display.js.map +1 -0
- package/dist/app/endpoint.d.ts +19 -0
- package/dist/app/endpoint.js +43 -0
- package/dist/app/endpoint.js.map +1 -0
- package/dist/app/help.d.ts +15 -0
- package/dist/app/help.js +182 -0
- package/dist/app/help.js.map +1 -0
- package/dist/app/idle.d.ts +36 -0
- package/dist/app/idle.js +68 -0
- package/dist/app/idle.js.map +1 -0
- package/dist/app/main.d.ts +2 -0
- package/dist/app/main.js +313 -0
- package/dist/app/main.js.map +1 -0
- package/dist/app/needs.d.ts +116 -0
- package/dist/app/needs.js +515 -0
- package/dist/app/needs.js.map +1 -0
- package/dist/app/ops.d.ts +11 -0
- package/dist/app/ops.js +20 -0
- package/dist/app/ops.js.map +1 -0
- package/dist/app/owed.d.ts +32 -0
- package/dist/app/owed.js +80 -0
- package/dist/app/owed.js.map +1 -0
- package/dist/app/owner.d.ts +30 -0
- package/dist/app/owner.js +171 -0
- package/dist/app/owner.js.map +1 -0
- package/dist/app/pending.d.ts +18 -0
- package/dist/app/pending.js +15 -0
- package/dist/app/pending.js.map +1 -0
- package/dist/app/prompt.d.ts +22 -0
- package/dist/app/prompt.js +60 -0
- package/dist/app/prompt.js.map +1 -0
- package/dist/app/register.d.ts +20 -0
- package/dist/app/register.js +34 -0
- package/dist/app/register.js.map +1 -0
- package/dist/app/sentry.d.ts +18 -0
- package/dist/app/sentry.js +43 -0
- package/dist/app/sentry.js.map +1 -0
- package/dist/app/services-browser.d.ts +53 -0
- package/dist/app/services-browser.js +211 -0
- package/dist/app/services-browser.js.map +1 -0
- package/dist/app/services-keys.d.ts +34 -0
- package/dist/app/services-keys.js +151 -0
- package/dist/app/services-keys.js.map +1 -0
- package/dist/app/services-kit.d.ts +7 -0
- package/dist/app/services-kit.js +23 -0
- package/dist/app/services-kit.js.map +1 -0
- package/dist/app/services-money.d.ts +95 -0
- package/dist/app/services-money.js +182 -0
- package/dist/app/services-money.js.map +1 -0
- package/dist/app/services-reach.d.ts +35 -0
- package/dist/app/services-reach.js +159 -0
- package/dist/app/services-reach.js.map +1 -0
- package/dist/app/services-signin.d.ts +53 -0
- package/dist/app/services-signin.js +248 -0
- package/dist/app/services-signin.js.map +1 -0
- package/dist/app/services-state.d.ts +109 -0
- package/dist/app/services-state.js +328 -0
- package/dist/app/services-state.js.map +1 -0
- package/dist/app/services-workflows.d.ts +33 -0
- package/dist/app/services-workflows.js +165 -0
- package/dist/app/services-workflows.js.map +1 -0
- package/dist/app/services.d.ts +58 -0
- package/dist/app/services.js +212 -0
- package/dist/app/services.js.map +1 -0
- package/dist/app/setup.d.ts +72 -0
- package/dist/app/setup.js +240 -0
- package/dist/app/setup.js.map +1 -0
- package/dist/app/status.d.ts +41 -0
- package/dist/app/status.js +40 -0
- package/dist/app/status.js.map +1 -0
- package/dist/app/step-lines.d.ts +10 -0
- package/dist/app/step-lines.js +29 -0
- package/dist/app/step-lines.js.map +1 -0
- package/dist/auth/accounts.d.ts +86 -0
- package/dist/auth/accounts.js +235 -0
- package/dist/auth/accounts.js.map +1 -0
- package/dist/auth/codes.d.ts +79 -0
- package/dist/auth/codes.js +143 -0
- package/dist/auth/codes.js.map +1 -0
- package/dist/auth/enroll.d.ts +22 -0
- package/dist/auth/enroll.js +101 -0
- package/dist/auth/enroll.js.map +1 -0
- package/dist/auth/exists.d.ts +75 -0
- package/dist/auth/exists.js +77 -0
- package/dist/auth/exists.js.map +1 -0
- package/dist/auth/facebook.d.ts +12 -0
- package/dist/auth/facebook.js +68 -0
- package/dist/auth/facebook.js.map +1 -0
- package/dist/auth/free-accounts.d.ts +43 -0
- package/dist/auth/free-accounts.js +42 -0
- package/dist/auth/free-accounts.js.map +1 -0
- package/dist/auth/github.d.ts +10 -0
- package/dist/auth/github.js +109 -0
- package/dist/auth/github.js.map +1 -0
- package/dist/auth/google.d.ts +10 -0
- package/dist/auth/google.js +380 -0
- package/dist/auth/google.js.map +1 -0
- package/dist/auth/guard.d.ts +77 -0
- package/dist/auth/guard.js +140 -0
- package/dist/auth/guard.js.map +1 -0
- package/dist/auth/identities.d.ts +57 -0
- package/dist/auth/identities.js +155 -0
- package/dist/auth/identities.js.map +1 -0
- package/dist/auth/index.d.ts +15 -0
- package/dist/auth/index.js +15 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/ingest.d.ts +32 -0
- package/dist/auth/ingest.js +98 -0
- package/dist/auth/ingest.js.map +1 -0
- package/dist/auth/instagram.d.ts +13 -0
- package/dist/auth/instagram.js +67 -0
- package/dist/auth/instagram.js.map +1 -0
- package/dist/auth/keep.d.ts +19 -0
- package/dist/auth/keep.js +19 -0
- package/dist/auth/keep.js.map +1 -0
- package/dist/auth/keys.d.ts +68 -0
- package/dist/auth/keys.js +120 -0
- package/dist/auth/keys.js.map +1 -0
- package/dist/auth/ledger.d.ts +20 -0
- package/dist/auth/ledger.js +59 -0
- package/dist/auth/ledger.js.map +1 -0
- package/dist/auth/link.d.ts +38 -0
- package/dist/auth/link.js +98 -0
- package/dist/auth/link.js.map +1 -0
- package/dist/auth/linkedin.d.ts +14 -0
- package/dist/auth/linkedin.js +73 -0
- package/dist/auth/linkedin.js.map +1 -0
- package/dist/auth/login.d.ts +334 -0
- package/dist/auth/login.js +650 -0
- package/dist/auth/login.js.map +1 -0
- package/dist/auth/microsoft.d.ts +9 -0
- package/dist/auth/microsoft.js +173 -0
- package/dist/auth/microsoft.js.map +1 -0
- package/dist/auth/passkey.d.ts +9 -0
- package/dist/auth/passkey.js +71 -0
- package/dist/auth/passkey.js.map +1 -0
- package/dist/auth/providers.d.ts +23 -0
- package/dist/auth/providers.js +16 -0
- package/dist/auth/providers.js.map +1 -0
- package/dist/auth/recovery.d.ts +19 -0
- package/dist/auth/recovery.js +64 -0
- package/dist/auth/recovery.js.map +1 -0
- package/dist/auth/roles.d.ts +83 -0
- package/dist/auth/roles.js +171 -0
- package/dist/auth/roles.js.map +1 -0
- package/dist/auth/rotate.d.ts +10 -0
- package/dist/auth/rotate.js +54 -0
- package/dist/auth/rotate.js.map +1 -0
- package/dist/auth/signup.d.ts +157 -0
- package/dist/auth/signup.js +371 -0
- package/dist/auth/signup.js.map +1 -0
- package/dist/auth/sites.d.ts +52 -0
- package/dist/auth/sites.js +819 -0
- package/dist/auth/sites.js.map +1 -0
- package/dist/auth/tiktok.d.ts +10 -0
- package/dist/auth/tiktok.js +66 -0
- package/dist/auth/tiktok.js.map +1 -0
- package/dist/auth/uwaterloo.d.ts +5 -0
- package/dist/auth/uwaterloo.js +123 -0
- package/dist/auth/uwaterloo.js.map +1 -0
- package/dist/auth/x.d.ts +17 -0
- package/dist/auth/x.js +83 -0
- package/dist/auth/x.js.map +1 -0
- package/dist/autotrack/code.d.ts +36 -0
- package/dist/autotrack/code.js +59 -0
- package/dist/autotrack/code.js.map +1 -0
- package/dist/autotrack/enroll.d.ts +46 -0
- package/dist/autotrack/enroll.js +60 -0
- package/dist/autotrack/enroll.js.map +1 -0
- package/dist/autotrack/episodes.d.ts +32 -0
- package/dist/autotrack/episodes.js +107 -0
- package/dist/autotrack/episodes.js.map +1 -0
- package/dist/autotrack/health.d.ts +40 -0
- package/dist/autotrack/health.js +114 -0
- package/dist/autotrack/health.js.map +1 -0
- package/dist/autotrack/heartbeat.d.ts +69 -0
- package/dist/autotrack/heartbeat.js +114 -0
- package/dist/autotrack/heartbeat.js.map +1 -0
- package/dist/autotrack/iam.d.ts +4 -0
- package/dist/autotrack/iam.js +82 -0
- package/dist/autotrack/iam.js.map +1 -0
- package/dist/autotrack/import.d.ts +76 -0
- package/dist/autotrack/import.js +277 -0
- package/dist/autotrack/import.js.map +1 -0
- package/dist/autotrack/join.d.ts +75 -0
- package/dist/autotrack/join.js +319 -0
- package/dist/autotrack/join.js.map +1 -0
- package/dist/autotrack/label-run.d.ts +26 -0
- package/dist/autotrack/label-run.js +46 -0
- package/dist/autotrack/label-run.js.map +1 -0
- package/dist/autotrack/label.d.ts +121 -0
- package/dist/autotrack/label.js +518 -0
- package/dist/autotrack/label.js.map +1 -0
- package/dist/autotrack/pool.d.ts +2 -0
- package/dist/autotrack/pool.js +16 -0
- package/dist/autotrack/pool.js.map +1 -0
- package/dist/autotrack/quality.d.ts +58 -0
- package/dist/autotrack/quality.js +84 -0
- package/dist/autotrack/quality.js.map +1 -0
- package/dist/autotrack/signals.d.ts +62 -0
- package/dist/autotrack/signals.js +219 -0
- package/dist/autotrack/signals.js.map +1 -0
- package/dist/autotrack/steps-run.d.ts +25 -0
- package/dist/autotrack/steps-run.js +85 -0
- package/dist/autotrack/steps-run.js.map +1 -0
- package/dist/autotrack/steps.d.ts +124 -0
- package/dist/autotrack/steps.js +268 -0
- package/dist/autotrack/steps.js.map +1 -0
- package/dist/autotrack/store.d.ts +87 -0
- package/dist/autotrack/store.js +117 -0
- package/dist/autotrack/store.js.map +1 -0
- package/dist/autotrack/tree.d.ts +45 -0
- package/dist/autotrack/tree.js +145 -0
- package/dist/autotrack/tree.js.map +1 -0
- package/dist/autotrack/types.d.ts +398 -0
- package/dist/autotrack/types.js +8 -0
- package/dist/autotrack/types.js.map +1 -0
- package/dist/browser/attempt.d.ts +54 -0
- package/dist/browser/attempt.js +90 -0
- package/dist/browser/attempt.js.map +1 -0
- package/dist/browser/browsers.d.ts +81 -0
- package/dist/browser/browsers.js +202 -0
- package/dist/browser/browsers.js.map +1 -0
- package/dist/browser/captcha/index.d.ts +86 -0
- package/dist/browser/captcha/index.js +459 -0
- package/dist/browser/captcha/index.js.map +1 -0
- package/dist/browser/captcha/llm-eyes.d.ts +4 -0
- package/dist/browser/captcha/llm-eyes.js +16 -0
- package/dist/browser/captcha/llm-eyes.js.map +1 -0
- package/dist/browser/download.d.ts +24 -0
- package/dist/browser/download.js +43 -0
- package/dist/browser/download.js.map +1 -0
- package/dist/browser/egress.d.ts +46 -0
- package/dist/browser/egress.js +149 -0
- package/dist/browser/egress.js.map +1 -0
- package/dist/browser/film.d.ts +116 -0
- package/dist/browser/film.js +334 -0
- package/dist/browser/film.js.map +1 -0
- package/dist/browser/fingerprint.d.ts +72 -0
- package/dist/browser/fingerprint.js +98 -0
- package/dist/browser/fingerprint.js.map +1 -0
- package/dist/browser/fixes.d.ts +45 -0
- package/dist/browser/fixes.js +117 -0
- package/dist/browser/fixes.js.map +1 -0
- package/dist/browser/flow.d.ts +265 -0
- package/dist/browser/flow.js +809 -0
- package/dist/browser/flow.js.map +1 -0
- package/dist/browser/flows/aws-cli-login.d.ts +9 -0
- package/dist/browser/flows/aws-cli-login.js +99 -0
- package/dist/browser/flows/aws-cli-login.js.map +1 -0
- package/dist/browser/flows/calcom-api-key.d.ts +20 -0
- package/dist/browser/flows/calcom-api-key.js +30 -0
- package/dist/browser/flows/calcom-api-key.js.map +1 -0
- package/dist/browser/flows/cloudflare-token.d.ts +21 -0
- package/dist/browser/flows/cloudflare-token.js +74 -0
- package/dist/browser/flows/cloudflare-token.js.map +1 -0
- package/dist/browser/flows/connector-keys.d.ts +39 -0
- package/dist/browser/flows/connector-keys.js +84 -0
- package/dist/browser/flows/connector-keys.js.map +1 -0
- package/dist/browser/flows/consent-walker.d.ts +47 -0
- package/dist/browser/flows/consent-walker.js +80 -0
- package/dist/browser/flows/consent-walker.js.map +1 -0
- package/dist/browser/flows/dialog-following.d.ts +23 -0
- package/dist/browser/flows/dialog-following.js +43 -0
- package/dist/browser/flows/dialog-following.js.map +1 -0
- package/dist/browser/flows/discord.d.ts +32 -0
- package/dist/browser/flows/discord.js +93 -0
- package/dist/browser/flows/discord.js.map +1 -0
- package/dist/browser/flows/facebook-oauth-consent.d.ts +3 -0
- package/dist/browser/flows/facebook-oauth-consent.js +17 -0
- package/dist/browser/flows/facebook-oauth-consent.js.map +1 -0
- package/dist/browser/flows/fingerprint.d.ts +57 -0
- package/dist/browser/flows/fingerprint.js +169 -0
- package/dist/browser/flows/fingerprint.js.map +1 -0
- package/dist/browser/flows/google-dkim.d.ts +11 -0
- package/dist/browser/flows/google-dkim.js +61 -0
- package/dist/browser/flows/google-dkim.js.map +1 -0
- package/dist/browser/flows/google-place.d.ts +53 -0
- package/dist/browser/flows/google-place.js +145 -0
- package/dist/browser/flows/google-place.js.map +1 -0
- package/dist/browser/flows/google-profile-photo.d.ts +3 -0
- package/dist/browser/flows/google-profile-photo.js +30 -0
- package/dist/browser/flows/google-profile-photo.js.map +1 -0
- package/dist/browser/flows/google-reviews.d.ts +72 -0
- package/dist/browser/flows/google-reviews.js +227 -0
- package/dist/browser/flows/google-reviews.js.map +1 -0
- package/dist/browser/flows/google-search.d.ts +90 -0
- package/dist/browser/flows/google-search.js +290 -0
- package/dist/browser/flows/google-search.js.map +1 -0
- package/dist/browser/flows/google-workspace-logo.d.ts +3 -0
- package/dist/browser/flows/google-workspace-logo.js +32 -0
- package/dist/browser/flows/google-workspace-logo.js.map +1 -0
- package/dist/browser/flows/index.d.ts +42 -0
- package/dist/browser/flows/index.js +43 -0
- package/dist/browser/flows/index.js.map +1 -0
- package/dist/browser/flows/instagram-act.d.ts +85 -0
- package/dist/browser/flows/instagram-act.js +256 -0
- package/dist/browser/flows/instagram-act.js.map +1 -0
- package/dist/browser/flows/instagram-comments.d.ts +51 -0
- package/dist/browser/flows/instagram-comments.js +205 -0
- package/dist/browser/flows/instagram-comments.js.map +1 -0
- package/dist/browser/flows/instagram-create-post.d.ts +10 -0
- package/dist/browser/flows/instagram-create-post.js +82 -0
- package/dist/browser/flows/instagram-create-post.js.map +1 -0
- package/dist/browser/flows/instagram-oauth-consent.d.ts +3 -0
- package/dist/browser/flows/instagram-oauth-consent.js +15 -0
- package/dist/browser/flows/instagram-oauth-consent.js.map +1 -0
- package/dist/browser/flows/kit.d.ts +19 -0
- package/dist/browser/flows/kit.js +41 -0
- package/dist/browser/flows/kit.js.map +1 -0
- package/dist/browser/flows/learn.d.ts +44 -0
- package/dist/browser/flows/learn.js +194 -0
- package/dist/browser/flows/learn.js.map +1 -0
- package/dist/browser/flows/linkedin-act.d.ts +27 -0
- package/dist/browser/flows/linkedin-act.js +102 -0
- package/dist/browser/flows/linkedin-act.js.map +1 -0
- package/dist/browser/flows/linkedin-activity.d.ts +58 -0
- package/dist/browser/flows/linkedin-activity.js +165 -0
- package/dist/browser/flows/linkedin-activity.js.map +1 -0
- package/dist/browser/flows/linkedin-audience.d.ts +25 -0
- package/dist/browser/flows/linkedin-audience.js +55 -0
- package/dist/browser/flows/linkedin-audience.js.map +1 -0
- package/dist/browser/flows/linkedin-comment.d.ts +134 -0
- package/dist/browser/flows/linkedin-comment.js +469 -0
- package/dist/browser/flows/linkedin-comment.js.map +1 -0
- package/dist/browser/flows/linkedin-create-post.d.ts +11 -0
- package/dist/browser/flows/linkedin-create-post.js +111 -0
- package/dist/browser/flows/linkedin-create-post.js.map +1 -0
- package/dist/browser/flows/linkedin-dashboard.d.ts +18 -0
- package/dist/browser/flows/linkedin-dashboard.js +101 -0
- package/dist/browser/flows/linkedin-dashboard.js.map +1 -0
- package/dist/browser/flows/linkedin-notifications.d.ts +33 -0
- package/dist/browser/flows/linkedin-notifications.js +127 -0
- package/dist/browser/flows/linkedin-notifications.js.map +1 -0
- package/dist/browser/flows/linkedin-oauth-consent.d.ts +3 -0
- package/dist/browser/flows/linkedin-oauth-consent.js +18 -0
- package/dist/browser/flows/linkedin-oauth-consent.js.map +1 -0
- package/dist/browser/flows/linkedin-post-analytics.d.ts +54 -0
- package/dist/browser/flows/linkedin-post-analytics.js +205 -0
- package/dist/browser/flows/linkedin-post-analytics.js.map +1 -0
- package/dist/browser/flows/linkedin-posts.d.ts +191 -0
- package/dist/browser/flows/linkedin-posts.js +438 -0
- package/dist/browser/flows/linkedin-posts.js.map +1 -0
- package/dist/browser/flows/linkedin-reach.d.ts +306 -0
- package/dist/browser/flows/linkedin-reach.js +830 -0
- package/dist/browser/flows/linkedin-reach.js.map +1 -0
- package/dist/browser/flows/loom.d.ts +25 -0
- package/dist/browser/flows/loom.js +130 -0
- package/dist/browser/flows/loom.js.map +1 -0
- package/dist/browser/flows/npm-create-org.d.ts +22 -0
- package/dist/browser/flows/npm-create-org.js +34 -0
- package/dist/browser/flows/npm-create-org.js.map +1 -0
- package/dist/browser/flows/npm-granular-token.d.ts +46 -0
- package/dist/browser/flows/npm-granular-token.js +85 -0
- package/dist/browser/flows/npm-granular-token.js.map +1 -0
- package/dist/browser/flows/npm-trusted-publisher.d.ts +19 -0
- package/dist/browser/flows/npm-trusted-publisher.js +63 -0
- package/dist/browser/flows/npm-trusted-publisher.js.map +1 -0
- package/dist/browser/flows/oauth-consent.d.ts +19 -0
- package/dist/browser/flows/oauth-consent.js +111 -0
- package/dist/browser/flows/oauth-consent.js.map +1 -0
- package/dist/browser/flows/outlook-oauth-consent.d.ts +3 -0
- package/dist/browser/flows/outlook-oauth-consent.js +16 -0
- package/dist/browser/flows/outlook-oauth-consent.js.map +1 -0
- package/dist/browser/flows/perplexity-ask.d.ts +32 -0
- package/dist/browser/flows/perplexity-ask.js +141 -0
- package/dist/browser/flows/perplexity-ask.js.map +1 -0
- package/dist/browser/flows/profile-name.d.ts +33 -0
- package/dist/browser/flows/profile-name.js +138 -0
- package/dist/browser/flows/profile-name.js.map +1 -0
- package/dist/browser/flows/proof-shot.d.ts +70 -0
- package/dist/browser/flows/proof-shot.js +150 -0
- package/dist/browser/flows/proof-shot.js.map +1 -0
- package/dist/browser/flows/reddit-rss.d.ts +86 -0
- package/dist/browser/flows/reddit-rss.js +248 -0
- package/dist/browser/flows/reddit-rss.js.map +1 -0
- package/dist/browser/flows/reddit.d.ts +116 -0
- package/dist/browser/flows/reddit.js +736 -0
- package/dist/browser/flows/reddit.js.map +1 -0
- package/dist/browser/flows/reset-mail-probe.d.ts +17 -0
- package/dist/browser/flows/reset-mail-probe.js +19 -0
- package/dist/browser/flows/reset-mail-probe.js.map +1 -0
- package/dist/browser/flows/threads-following.d.ts +12 -0
- package/dist/browser/flows/threads-following.js +61 -0
- package/dist/browser/flows/threads-following.js.map +1 -0
- package/dist/browser/flows/threads-oauth-consent.d.ts +3 -0
- package/dist/browser/flows/threads-oauth-consent.js +17 -0
- package/dist/browser/flows/threads-oauth-consent.js.map +1 -0
- package/dist/browser/flows/tiktok-comments.d.ts +67 -0
- package/dist/browser/flows/tiktok-comments.js +216 -0
- package/dist/browser/flows/tiktok-comments.js.map +1 -0
- package/dist/browser/flows/tiktok-create-post.d.ts +84 -0
- package/dist/browser/flows/tiktok-create-post.js +300 -0
- package/dist/browser/flows/tiktok-create-post.js.map +1 -0
- package/dist/browser/flows/tiktok-following.d.ts +12 -0
- package/dist/browser/flows/tiktok-following.js +51 -0
- package/dist/browser/flows/tiktok-following.js.map +1 -0
- package/dist/browser/flows/tiktok-oauth-consent.d.ts +3 -0
- package/dist/browser/flows/tiktok-oauth-consent.js +18 -0
- package/dist/browser/flows/tiktok-oauth-consent.js.map +1 -0
- package/dist/browser/flows/tiktok-video-analytics.d.ts +40 -0
- package/dist/browser/flows/tiktok-video-analytics.js +169 -0
- package/dist/browser/flows/tiktok-video-analytics.js.map +1 -0
- package/dist/browser/flows/wrangler-login.d.ts +7 -0
- package/dist/browser/flows/wrangler-login.js +31 -0
- package/dist/browser/flows/wrangler-login.js.map +1 -0
- package/dist/browser/flows/x-act.d.ts +26 -0
- package/dist/browser/flows/x-act.js +144 -0
- package/dist/browser/flows/x-act.js.map +1 -0
- package/dist/browser/flows/x-oauth-consent.d.ts +3 -0
- package/dist/browser/flows/x-oauth-consent.js +20 -0
- package/dist/browser/flows/x-oauth-consent.js.map +1 -0
- package/dist/browser/flows/x-read.d.ts +146 -0
- package/dist/browser/flows/x-read.js +439 -0
- package/dist/browser/flows/x-read.js.map +1 -0
- package/dist/browser/flows/youtube-community-post.d.ts +14 -0
- package/dist/browser/flows/youtube-community-post.js +54 -0
- package/dist/browser/flows/youtube-community-post.js.map +1 -0
- package/dist/browser/flows/youtube-studio-analytics.d.ts +18 -0
- package/dist/browser/flows/youtube-studio-analytics.js +79 -0
- package/dist/browser/flows/youtube-studio-analytics.js.map +1 -0
- package/dist/browser/flows/youtube-thumbnail.d.ts +14 -0
- package/dist/browser/flows/youtube-thumbnail.js +49 -0
- package/dist/browser/flows/youtube-thumbnail.js.map +1 -0
- package/dist/browser/frames.d.ts +30 -0
- package/dist/browser/frames.js +109 -0
- package/dist/browser/frames.js.map +1 -0
- package/dist/browser/human/draw.d.ts +15 -0
- package/dist/browser/human/draw.js +20 -0
- package/dist/browser/human/draw.js.map +1 -0
- package/dist/browser/human/index.d.ts +132 -0
- package/dist/browser/human/index.js +476 -0
- package/dist/browser/human/index.js.map +1 -0
- package/dist/browser/human/mouse.d.ts +75 -0
- package/dist/browser/human/mouse.js +158 -0
- package/dist/browser/human/mouse.js.map +1 -0
- package/dist/browser/human/scroll.d.ts +25 -0
- package/dist/browser/human/scroll.js +33 -0
- package/dist/browser/human/scroll.js.map +1 -0
- package/dist/browser/human/typing.d.ts +49 -0
- package/dist/browser/human/typing.js +104 -0
- package/dist/browser/human/typing.js.map +1 -0
- package/dist/browser/in-page.d.ts +10 -0
- package/dist/browser/in-page.js +4 -0
- package/dist/browser/in-page.js.map +1 -0
- package/dist/browser/keep-session.d.ts +13 -0
- package/dist/browser/keep-session.js +27 -0
- package/dist/browser/keep-session.js.map +1 -0
- package/dist/browser/layout.d.ts +54 -0
- package/dist/browser/layout.js +234 -0
- package/dist/browser/layout.js.map +1 -0
- package/dist/browser/locate.d.ts +50 -0
- package/dist/browser/locate.js +123 -0
- package/dist/browser/locate.js.map +1 -0
- package/dist/browser/lock.d.ts +15 -0
- package/dist/browser/lock.js +40 -0
- package/dist/browser/lock.js.map +1 -0
- package/dist/browser/network.d.ts +119 -0
- package/dist/browser/network.js +305 -0
- package/dist/browser/network.js.map +1 -0
- package/dist/browser/own.d.ts +18 -0
- package/dist/browser/own.js +81 -0
- package/dist/browser/own.js.map +1 -0
- package/dist/browser/page-state.d.ts +15 -0
- package/dist/browser/page-state.js +39 -0
- package/dist/browser/page-state.js.map +1 -0
- package/dist/browser/park.d.ts +38 -0
- package/dist/browser/park.js +80 -0
- package/dist/browser/park.js.map +1 -0
- package/dist/browser/pick.d.ts +19 -0
- package/dist/browser/pick.js +42 -0
- package/dist/browser/pick.js.map +1 -0
- package/dist/browser/profile-wait.d.ts +52 -0
- package/dist/browser/profile-wait.js +141 -0
- package/dist/browser/profile-wait.js.map +1 -0
- package/dist/browser/reap.d.ts +38 -0
- package/dist/browser/reap.js +101 -0
- package/dist/browser/reap.js.map +1 -0
- package/dist/browser/records.d.ts +38 -0
- package/dist/browser/records.js +112 -0
- package/dist/browser/records.js.map +1 -0
- package/dist/browser/render.d.ts +25 -0
- package/dist/browser/render.js +63 -0
- package/dist/browser/render.js.map +1 -0
- package/dist/browser/repair.d.ts +67 -0
- package/dist/browser/repair.js +165 -0
- package/dist/browser/repair.js.map +1 -0
- package/dist/browser/resume.d.ts +28 -0
- package/dist/browser/resume.js +77 -0
- package/dist/browser/resume.js.map +1 -0
- package/dist/browser/run-files.d.ts +30 -0
- package/dist/browser/run-files.js +136 -0
- package/dist/browser/run-files.js.map +1 -0
- package/dist/browser/screens.d.ts +143 -0
- package/dist/browser/screens.js +361 -0
- package/dist/browser/screens.js.map +1 -0
- package/dist/browser/scroll-collect.d.ts +32 -0
- package/dist/browser/scroll-collect.js +36 -0
- package/dist/browser/scroll-collect.js.map +1 -0
- package/dist/browser/secrets.d.ts +7 -0
- package/dist/browser/secrets.js +27 -0
- package/dist/browser/secrets.js.map +1 -0
- package/dist/browser/session.d.ts +136 -0
- package/dist/browser/session.js +294 -0
- package/dist/browser/session.js.map +1 -0
- package/dist/browser/trace-secrets.d.ts +20 -0
- package/dist/browser/trace-secrets.js +251 -0
- package/dist/browser/trace-secrets.js.map +1 -0
- package/dist/browser/watch.d.ts +40 -0
- package/dist/browser/watch.js +134 -0
- package/dist/browser/watch.js.map +1 -0
- package/dist/browser/watchers.d.ts +103 -0
- package/dist/browser/watchers.js +336 -0
- package/dist/browser/watchers.js.map +1 -0
- package/dist/browser/webauthn.d.ts +37 -0
- package/dist/browser/webauthn.js +74 -0
- package/dist/browser/webauthn.js.map +1 -0
- package/dist/calls/obs.d.ts +48 -0
- package/dist/calls/obs.js +202 -0
- package/dist/calls/obs.js.map +1 -0
- package/dist/calls/recorder.d.ts +110 -0
- package/dist/calls/recorder.js +289 -0
- package/dist/calls/recorder.js.map +1 -0
- package/dist/calls/service.d.ts +17 -0
- package/dist/calls/service.js +65 -0
- package/dist/calls/service.js.map +1 -0
- package/dist/calls/setup.d.ts +25 -0
- package/dist/calls/setup.js +45 -0
- package/dist/calls/setup.js.map +1 -0
- package/dist/calls/windows.d.ts +2 -0
- package/dist/calls/windows.js +17 -0
- package/dist/calls/windows.js.map +1 -0
- package/dist/channels/commands.d.ts +22 -0
- package/dist/channels/commands.js +43 -0
- package/dist/channels/commands.js.map +1 -0
- package/dist/channels/email.d.ts +8 -0
- package/dist/channels/email.js +16 -0
- package/dist/channels/email.js.map +1 -0
- package/dist/channels/forward.d.ts +20 -0
- package/dist/channels/forward.js +82 -0
- package/dist/channels/forward.js.map +1 -0
- package/dist/channels/index.d.ts +9 -0
- package/dist/channels/index.js +10 -0
- package/dist/channels/index.js.map +1 -0
- package/dist/channels/linq.d.ts +7 -0
- package/dist/channels/linq.js +14 -0
- package/dist/channels/linq.js.map +1 -0
- package/dist/channels/memory.d.ts +8 -0
- package/dist/channels/memory.js +15 -0
- package/dist/channels/memory.js.map +1 -0
- package/dist/channels/phone.d.ts +4 -0
- package/dist/channels/phone.js +17 -0
- package/dist/channels/phone.js.map +1 -0
- package/dist/channels/render.d.ts +9 -0
- package/dist/channels/render.js +26 -0
- package/dist/channels/render.js.map +1 -0
- package/dist/channels/types.d.ts +18 -0
- package/dist/channels/types.js +13 -0
- package/dist/channels/types.js.map +1 -0
- package/dist/channels/webhook.d.ts +9 -0
- package/dist/channels/webhook.js +14 -0
- package/dist/channels/webhook.js.map +1 -0
- package/dist/chores/aws-login.d.ts +26 -0
- package/dist/chores/aws-login.js +80 -0
- package/dist/chores/aws-login.js.map +1 -0
- package/dist/chores/cli-tail.d.ts +2 -0
- package/dist/chores/cli-tail.js +12 -0
- package/dist/chores/cli-tail.js.map +1 -0
- package/dist/chores/gcloud-login.d.ts +24 -0
- package/dist/chores/gcloud-login.js +63 -0
- package/dist/chores/gcloud-login.js.map +1 -0
- package/dist/chores/langfuse.d.ts +65 -0
- package/dist/chores/langfuse.js +80 -0
- package/dist/chores/langfuse.js.map +1 -0
- package/dist/chores/unsubscribe.d.ts +90 -0
- package/dist/chores/unsubscribe.js +186 -0
- package/dist/chores/unsubscribe.js.map +1 -0
- package/dist/chores/wrangler-login.d.ts +23 -0
- package/dist/chores/wrangler-login.js +70 -0
- package/dist/chores/wrangler-login.js.map +1 -0
- package/dist/claude/service.d.ts +28 -0
- package/dist/claude/service.js +110 -0
- package/dist/claude/service.js.map +1 -0
- package/dist/clients/aws-domain.d.ts +36 -0
- package/dist/clients/aws-domain.js +225 -0
- package/dist/clients/aws-domain.js.map +1 -0
- package/dist/clients/cloudflare.d.ts +80 -0
- package/dist/clients/cloudflare.js +183 -0
- package/dist/clients/cloudflare.js.map +1 -0
- package/dist/clients/dynadot.d.ts +53 -0
- package/dist/clients/dynadot.js +146 -0
- package/dist/clients/dynadot.js.map +1 -0
- package/dist/clients/google-admin.d.ts +55 -0
- package/dist/clients/google-admin.js +104 -0
- package/dist/clients/google-admin.js.map +1 -0
- package/dist/clients/http.d.ts +69 -0
- package/dist/clients/http.js +165 -0
- package/dist/clients/http.js.map +1 -0
- package/dist/clients/inbox-insiders.d.ts +74 -0
- package/dist/clients/inbox-insiders.js +66 -0
- package/dist/clients/inbox-insiders.js.map +1 -0
- package/dist/clients/instantly.d.ts +65 -0
- package/dist/clients/instantly.js +91 -0
- package/dist/clients/instantly.js.map +1 -0
- package/dist/clients/linq.d.ts +59 -0
- package/dist/clients/linq.js +108 -0
- package/dist/clients/linq.js.map +1 -0
- package/dist/clients/roster.d.ts +22 -0
- package/dist/clients/roster.js +61 -0
- package/dist/clients/roster.js.map +1 -0
- package/dist/clients/twilio.d.ts +12 -0
- package/dist/clients/twilio.js +25 -0
- package/dist/clients/twilio.js.map +1 -0
- package/dist/clients/wren.d.ts +23 -0
- package/dist/clients/wren.js +56 -0
- package/dist/clients/wren.js.map +1 -0
- package/dist/compiler/check.d.ts +8 -0
- package/dist/compiler/check.js +64 -0
- package/dist/compiler/check.js.map +1 -0
- package/dist/compiler/finish.d.ts +52 -0
- package/dist/compiler/finish.js +182 -0
- package/dist/compiler/finish.js.map +1 -0
- package/dist/compiler/index.d.ts +35 -0
- package/dist/compiler/index.js +82 -0
- package/dist/compiler/index.js.map +1 -0
- package/dist/compiler/lint.d.ts +28 -0
- package/dist/compiler/lint.js +105 -0
- package/dist/compiler/lint.js.map +1 -0
- package/dist/compiler/outline.d.ts +749 -0
- package/dist/compiler/outline.js +189 -0
- package/dist/compiler/outline.js.map +1 -0
- package/dist/compiler/patch.d.ts +34 -0
- package/dist/compiler/patch.js +159 -0
- package/dist/compiler/patch.js.map +1 -0
- package/dist/compiler/polish.d.ts +16 -0
- package/dist/compiler/polish.js +101 -0
- package/dist/compiler/polish.js.map +1 -0
- package/dist/compiler/render.d.ts +21 -0
- package/dist/compiler/render.js +373 -0
- package/dist/compiler/render.js.map +1 -0
- package/dist/compiler/structure.d.ts +44 -0
- package/dist/compiler/structure.js +509 -0
- package/dist/compiler/structure.js.map +1 -0
- package/dist/deps/keys.d.ts +22 -0
- package/dist/deps/keys.js +9 -0
- package/dist/deps/keys.js.map +1 -0
- package/dist/deps/shell.d.ts +18 -0
- package/dist/deps/shell.js +44 -0
- package/dist/deps/shell.js.map +1 -0
- package/dist/deps/sink.d.ts +16 -0
- package/dist/deps/sink.js +27 -0
- package/dist/deps/sink.js.map +1 -0
- package/dist/deps/stats.d.ts +9 -0
- package/dist/deps/stats.js +30 -0
- package/dist/deps/stats.js.map +1 -0
- package/dist/desktop/describe.d.ts +4 -0
- package/dist/desktop/describe.js +24 -0
- package/dist/desktop/describe.js.map +1 -0
- package/dist/desktop/mac.d.ts +33 -0
- package/dist/desktop/mac.js +238 -0
- package/dist/desktop/mac.js.map +1 -0
- package/dist/desktop/types.d.ts +85 -0
- package/dist/desktop/types.js +92 -0
- package/dist/desktop/types.js.map +1 -0
- package/dist/devices/phone.d.ts +33 -0
- package/dist/devices/phone.js +130 -0
- package/dist/devices/phone.js.map +1 -0
- package/dist/do/catalog.d.ts +55 -0
- package/dist/do/catalog.js +79 -0
- package/dist/do/catalog.js.map +1 -0
- package/dist/do/doer.d.ts +79 -0
- package/dist/do/doer.js +187 -0
- package/dist/do/doer.js.map +1 -0
- package/dist/do/index.d.ts +8 -0
- package/dist/do/index.js +9 -0
- package/dist/do/index.js.map +1 -0
- package/dist/do/memory.d.ts +13 -0
- package/dist/do/memory.js +44 -0
- package/dist/do/memory.js.map +1 -0
- package/dist/do/pick.d.ts +23 -0
- package/dist/do/pick.js +58 -0
- package/dist/do/pick.js.map +1 -0
- package/dist/do/service.d.ts +13 -0
- package/dist/do/service.js +48 -0
- package/dist/do/service.js.map +1 -0
- package/dist/do/tools.d.ts +43 -0
- package/dist/do/tools.js +113 -0
- package/dist/do/tools.js.map +1 -0
- package/dist/do/wire.d.ts +64 -0
- package/dist/do/wire.js +98 -0
- package/dist/do/wire.js.map +1 -0
- package/dist/engine/browser-service.d.ts +36 -0
- package/dist/engine/browser-service.js +223 -0
- package/dist/engine/browser-service.js.map +1 -0
- package/dist/engine/effects.d.ts +52 -0
- package/dist/engine/effects.js +24 -0
- package/dist/engine/effects.js.map +1 -0
- package/dist/engine/events.d.ts +55 -0
- package/dist/engine/events.js +2 -0
- package/dist/engine/events.js.map +1 -0
- package/dist/engine/feed.d.ts +25 -0
- package/dist/engine/feed.js +54 -0
- package/dist/engine/feed.js.map +1 -0
- package/dist/engine/guards.d.ts +14 -0
- package/dist/engine/guards.js +31 -0
- package/dist/engine/guards.js.map +1 -0
- package/dist/engine/inputs.d.ts +31 -0
- package/dist/engine/inputs.js +117 -0
- package/dist/engine/inputs.js.map +1 -0
- package/dist/engine/memory.d.ts +12 -0
- package/dist/engine/memory.js +26 -0
- package/dist/engine/memory.js.map +1 -0
- package/dist/engine/object.d.ts +80 -0
- package/dist/engine/object.js +311 -0
- package/dist/engine/object.js.map +1 -0
- package/dist/engine/registry.d.ts +29 -0
- package/dist/engine/registry.js +36 -0
- package/dist/engine/registry.js.map +1 -0
- package/dist/engine/rows.d.ts +59 -0
- package/dist/engine/rows.js +137 -0
- package/dist/engine/rows.js.map +1 -0
- package/dist/engine/run.d.ts +80 -0
- package/dist/engine/run.js +179 -0
- package/dist/engine/run.js.map +1 -0
- package/dist/engine/workflow.d.ts +74 -0
- package/dist/engine/workflow.js +21 -0
- package/dist/engine/workflow.js.map +1 -0
- package/dist/explore/commands.d.ts +432 -0
- package/dist/explore/commands.js +260 -0
- package/dist/explore/commands.js.map +1 -0
- package/dist/explore/journal.d.ts +9 -0
- package/dist/explore/journal.js +26 -0
- package/dist/explore/journal.js.map +1 -0
- package/dist/explore/lease.d.ts +9 -0
- package/dist/explore/lease.js +10 -0
- package/dist/explore/lease.js.map +1 -0
- package/dist/explore/marks.d.ts +32 -0
- package/dist/explore/marks.js +146 -0
- package/dist/explore/marks.js.map +1 -0
- package/dist/explore/server.d.ts +196 -0
- package/dist/explore/server.js +1542 -0
- package/dist/explore/server.js.map +1 -0
- package/dist/files/index.d.ts +6 -0
- package/dist/files/index.js +7 -0
- package/dist/files/index.js.map +1 -0
- package/dist/files/migrate.d.ts +22 -0
- package/dist/files/migrate.js +88 -0
- package/dist/files/migrate.js.map +1 -0
- package/dist/files/store.d.ts +150 -0
- package/dist/files/store.js +407 -0
- package/dist/files/store.js.map +1 -0
- package/dist/files/text.d.ts +9 -0
- package/dist/files/text.js +28 -0
- package/dist/files/text.js.map +1 -0
- package/dist/film/director.d.ts +15 -0
- package/dist/film/director.js +198 -0
- package/dist/film/director.js.map +1 -0
- package/dist/film/tape.d.ts +35 -0
- package/dist/film/tape.js +36 -0
- package/dist/film/tape.js.map +1 -0
- package/dist/gates/ask.d.ts +21 -0
- package/dist/gates/ask.js +33 -0
- package/dist/gates/ask.js.map +1 -0
- package/dist/gates/payment.d.ts +94 -0
- package/dist/gates/payment.js +202 -0
- package/dist/gates/payment.js.map +1 -0
- package/dist/gates/spend.d.ts +88 -0
- package/dist/gates/spend.js +153 -0
- package/dist/gates/spend.js.map +1 -0
- package/dist/google/auth.d.ts +90 -0
- package/dist/google/auth.js +209 -0
- package/dist/google/auth.js.map +1 -0
- package/dist/google/gmail.d.ts +150 -0
- package/dist/google/gmail.js +361 -0
- package/dist/google/gmail.js.map +1 -0
- package/dist/google/index.d.ts +7 -0
- package/dist/google/index.js +8 -0
- package/dist/google/index.js.map +1 -0
- package/dist/index.d.ts +49 -0
- package/dist/index.js +47 -0
- package/dist/index.js.map +1 -0
- package/dist/llm/anthropic.d.ts +17 -0
- package/dist/llm/anthropic.js +49 -0
- package/dist/llm/anthropic.js.map +1 -0
- package/dist/llm/budget.d.ts +31 -0
- package/dist/llm/budget.js +91 -0
- package/dist/llm/budget.js.map +1 -0
- package/dist/llm/claude-code.d.ts +20 -0
- package/dist/llm/claude-code.js +110 -0
- package/dist/llm/claude-code.js.map +1 -0
- package/dist/llm/cohere.d.ts +19 -0
- package/dist/llm/cohere.js +55 -0
- package/dist/llm/cohere.js.map +1 -0
- package/dist/llm/fake.d.ts +9 -0
- package/dist/llm/fake.js +17 -0
- package/dist/llm/fake.js.map +1 -0
- package/dist/llm/index.d.ts +26 -0
- package/dist/llm/index.js +49 -0
- package/dist/llm/index.js.map +1 -0
- package/dist/llm/ledger.d.ts +58 -0
- package/dist/llm/ledger.js +129 -0
- package/dist/llm/ledger.js.map +1 -0
- package/dist/llm/openai.d.ts +9 -0
- package/dist/llm/openai.js +60 -0
- package/dist/llm/openai.js.map +1 -0
- package/dist/llm/trace.d.ts +51 -0
- package/dist/llm/trace.js +179 -0
- package/dist/llm/trace.js.map +1 -0
- package/dist/llm/types.d.ts +55 -0
- package/dist/llm/types.js +55 -0
- package/dist/llm/types.js.map +1 -0
- package/dist/mail/imap.d.ts +34 -0
- package/dist/mail/imap.js +129 -0
- package/dist/mail/imap.js.map +1 -0
- package/dist/mail/index.d.ts +9 -0
- package/dist/mail/index.js +10 -0
- package/dist/mail/index.js.map +1 -0
- package/dist/mail/instantly.d.ts +54 -0
- package/dist/mail/instantly.js +103 -0
- package/dist/mail/instantly.js.map +1 -0
- package/dist/mail/session.d.ts +20 -0
- package/dist/mail/session.js +49 -0
- package/dist/mail/session.js.map +1 -0
- package/dist/mail/types.d.ts +22 -0
- package/dist/mail/types.js +25 -0
- package/dist/mail/types.js.map +1 -0
- package/dist/memory/backboard.d.ts +14 -0
- package/dist/memory/backboard.js +63 -0
- package/dist/memory/backboard.js.map +1 -0
- package/dist/memory/index.d.ts +2 -0
- package/dist/memory/index.js +3 -0
- package/dist/memory/index.js.map +1 -0
- package/dist/memory/types.d.ts +24 -0
- package/dist/memory/types.js +29 -0
- package/dist/memory/types.js.map +1 -0
- package/dist/mods/install.d.ts +87 -0
- package/dist/mods/install.js +346 -0
- package/dist/mods/install.js.map +1 -0
- package/dist/mods/login.d.ts +199 -0
- package/dist/mods/login.js +149 -0
- package/dist/mods/login.js.map +1 -0
- package/dist/mods/mod.d.ts +148 -0
- package/dist/mods/mod.js +215 -0
- package/dist/mods/mod.js.map +1 -0
- package/dist/mods/pack.d.ts +42 -0
- package/dist/mods/pack.js +353 -0
- package/dist/mods/pack.js.map +1 -0
- package/dist/money/bank-code.d.ts +34 -0
- package/dist/money/bank-code.js +59 -0
- package/dist/money/bank-code.js.map +1 -0
- package/dist/money/charges.d.ts +94 -0
- package/dist/money/charges.js +120 -0
- package/dist/money/charges.js.map +1 -0
- package/dist/money/profile.d.ts +80 -0
- package/dist/money/profile.js +231 -0
- package/dist/money/profile.js.map +1 -0
- package/dist/money/wallet.d.ts +177 -0
- package/dist/money/wallet.js +388 -0
- package/dist/money/wallet.js.map +1 -0
- package/dist/oauth/apps.d.ts +37 -0
- package/dist/oauth/apps.js +39 -0
- package/dist/oauth/apps.js.map +1 -0
- package/dist/oauth/core.d.ts +28 -0
- package/dist/oauth/core.js +81 -0
- package/dist/oauth/core.js.map +1 -0
- package/dist/oauth/index.d.ts +15 -0
- package/dist/oauth/index.js +16 -0
- package/dist/oauth/index.js.map +1 -0
- package/dist/oauth/mail.d.ts +77 -0
- package/dist/oauth/mail.js +126 -0
- package/dist/oauth/mail.js.map +1 -0
- package/dist/oauth/platform.d.ts +94 -0
- package/dist/oauth/platform.js +229 -0
- package/dist/oauth/platform.js.map +1 -0
- package/dist/oauth/providers.d.ts +37 -0
- package/dist/oauth/providers.js +112 -0
- package/dist/oauth/providers.js.map +1 -0
- package/dist/owner.d.ts +43 -0
- package/dist/owner.js +55 -0
- package/dist/owner.js.map +1 -0
- package/dist/reach/html.d.ts +12 -0
- package/dist/reach/html.js +59 -0
- package/dist/reach/html.js.map +1 -0
- package/dist/reach/key-ring.d.ts +94 -0
- package/dist/reach/key-ring.js +202 -0
- package/dist/reach/key-ring.js.map +1 -0
- package/dist/reach/key-source.d.ts +61 -0
- package/dist/reach/key-source.js +150 -0
- package/dist/reach/key-source.js.map +1 -0
- package/dist/reach/ladder.d.ts +113 -0
- package/dist/reach/ladder.js +257 -0
- package/dist/reach/ladder.js.map +1 -0
- package/dist/reach/linkedin-leads.d.ts +38 -0
- package/dist/reach/linkedin-leads.js +89 -0
- package/dist/reach/linkedin-leads.js.map +1 -0
- package/dist/reach/maps.d.ts +35 -0
- package/dist/reach/maps.js +120 -0
- package/dist/reach/maps.js.map +1 -0
- package/dist/reach/web.d.ts +255 -0
- package/dist/reach/web.js +595 -0
- package/dist/reach/web.js.map +1 -0
- package/dist/recorder/browser.d.ts +55 -0
- package/dist/recorder/browser.js +129 -0
- package/dist/recorder/browser.js.map +1 -0
- package/dist/recorder/index.d.ts +17 -0
- package/dist/recorder/index.js +66 -0
- package/dist/recorder/index.js.map +1 -0
- package/dist/recorder/observer.d.ts +20 -0
- package/dist/recorder/observer.js +110 -0
- package/dist/recorder/observer.js.map +1 -0
- package/dist/recorder/redact.d.ts +27 -0
- package/dist/recorder/redact.js +125 -0
- package/dist/recorder/redact.js.map +1 -0
- package/dist/recorder/store.d.ts +12 -0
- package/dist/recorder/store.js +65 -0
- package/dist/recorder/store.js.map +1 -0
- package/dist/recorder/terminal.d.ts +11 -0
- package/dist/recorder/terminal.js +45 -0
- package/dist/recorder/terminal.js.map +1 -0
- package/dist/recorder/types.d.ts +148 -0
- package/dist/recorder/types.js +12 -0
- package/dist/recorder/types.js.map +1 -0
- package/dist/runs/calls.d.ts +34 -0
- package/dist/runs/calls.js +69 -0
- package/dist/runs/calls.js.map +1 -0
- package/dist/runs/flows.d.ts +68 -0
- package/dist/runs/flows.js +125 -0
- package/dist/runs/flows.js.map +1 -0
- package/dist/runs/import.d.ts +39 -0
- package/dist/runs/import.js +87 -0
- package/dist/runs/import.js.map +1 -0
- package/dist/runs/log.d.ts +129 -0
- package/dist/runs/log.js +222 -0
- package/dist/runs/log.js.map +1 -0
- package/dist/runs/success.d.ts +144 -0
- package/dist/runs/success.js +287 -0
- package/dist/runs/success.js.map +1 -0
- package/dist/runs/tokens.d.ts +88 -0
- package/dist/runs/tokens.js +175 -0
- package/dist/runs/tokens.js.map +1 -0
- package/dist/share/fetch.d.ts +1 -0
- package/dist/share/fetch.js +46 -0
- package/dist/share/fetch.js.map +1 -0
- package/dist/share/gate.d.ts +84 -0
- package/dist/share/gate.js +359 -0
- package/dist/share/gate.js.map +1 -0
- package/dist/share/presidio.d.ts +56 -0
- package/dist/share/presidio.js +283 -0
- package/dist/share/presidio.js.map +1 -0
- package/dist/share/scrub.d.ts +32 -0
- package/dist/share/scrub.js +315 -0
- package/dist/share/scrub.js.map +1 -0
- package/dist/share/share.d.ts +80 -0
- package/dist/share/share.js +259 -0
- package/dist/share/share.js.map +1 -0
- package/dist/shots/s3.d.ts +30 -0
- package/dist/shots/s3.js +128 -0
- package/dist/shots/s3.js.map +1 -0
- package/dist/shots/ship.d.ts +39 -0
- package/dist/shots/ship.js +119 -0
- package/dist/shots/ship.js.map +1 -0
- package/dist/shots/trace-scrub.d.ts +28 -0
- package/dist/shots/trace-scrub.js +79 -0
- package/dist/shots/trace-scrub.js.map +1 -0
- package/dist/shots/traces.d.ts +57 -0
- package/dist/shots/traces.js +144 -0
- package/dist/shots/traces.js.map +1 -0
- package/dist/sites/calcom.d.ts +5 -0
- package/dist/sites/calcom.js +155 -0
- package/dist/sites/calcom.js.map +1 -0
- package/dist/sites/caps.d.ts +55 -0
- package/dist/sites/caps.js +139 -0
- package/dist/sites/caps.js.map +1 -0
- package/dist/sites/connectors.d.ts +33 -0
- package/dist/sites/connectors.js +52 -0
- package/dist/sites/connectors.js.map +1 -0
- package/dist/sites/discord.d.ts +57 -0
- package/dist/sites/discord.js +462 -0
- package/dist/sites/discord.js.map +1 -0
- package/dist/sites/drive.d.ts +4 -0
- package/dist/sites/drive.js +126 -0
- package/dist/sites/drive.js.map +1 -0
- package/dist/sites/facade.d.ts +225 -0
- package/dist/sites/facade.js +707 -0
- package/dist/sites/facade.js.map +1 -0
- package/dist/sites/fb-public.d.ts +18 -0
- package/dist/sites/fb-public.js +110 -0
- package/dist/sites/fb-public.js.map +1 -0
- package/dist/sites/gmail.d.ts +9 -0
- package/dist/sites/gmail.js +185 -0
- package/dist/sites/gmail.js.map +1 -0
- package/dist/sites/index.d.ts +30 -0
- package/dist/sites/index.js +72 -0
- package/dist/sites/index.js.map +1 -0
- package/dist/sites/instagram.d.ts +12 -0
- package/dist/sites/instagram.js +444 -0
- package/dist/sites/instagram.js.map +1 -0
- package/dist/sites/keys.d.ts +81 -0
- package/dist/sites/keys.js +78 -0
- package/dist/sites/keys.js.map +1 -0
- package/dist/sites/langfuse.d.ts +3 -0
- package/dist/sites/langfuse.js +74 -0
- package/dist/sites/langfuse.js.map +1 -0
- package/dist/sites/linkedin.d.ts +67 -0
- package/dist/sites/linkedin.js +843 -0
- package/dist/sites/linkedin.js.map +1 -0
- package/dist/sites/loom.d.ts +3 -0
- package/dist/sites/loom.js +69 -0
- package/dist/sites/loom.js.map +1 -0
- package/dist/sites/meta.d.ts +6 -0
- package/dist/sites/meta.js +986 -0
- package/dist/sites/meta.js.map +1 -0
- package/dist/sites/npm.d.ts +24 -0
- package/dist/sites/npm.js +105 -0
- package/dist/sites/npm.js.map +1 -0
- package/dist/sites/oauth.d.ts +110 -0
- package/dist/sites/oauth.js +353 -0
- package/dist/sites/oauth.js.map +1 -0
- package/dist/sites/outlook.d.ts +5 -0
- package/dist/sites/outlook.js +221 -0
- package/dist/sites/outlook.js.map +1 -0
- package/dist/sites/perplexity.d.ts +51 -0
- package/dist/sites/perplexity.js +83 -0
- package/dist/sites/perplexity.js.map +1 -0
- package/dist/sites/poll.d.ts +7 -0
- package/dist/sites/poll.js +17 -0
- package/dist/sites/poll.js.map +1 -0
- package/dist/sites/proof.d.ts +1 -0
- package/dist/sites/proof.js +25 -0
- package/dist/sites/proof.js.map +1 -0
- package/dist/sites/reddit.d.ts +9 -0
- package/dist/sites/reddit.js +525 -0
- package/dist/sites/reddit.js.map +1 -0
- package/dist/sites/refused.d.ts +60 -0
- package/dist/sites/refused.js +125 -0
- package/dist/sites/refused.js.map +1 -0
- package/dist/sites/renew.d.ts +66 -0
- package/dist/sites/renew.js +128 -0
- package/dist/sites/renew.js.map +1 -0
- package/dist/sites/send-journal.d.ts +52 -0
- package/dist/sites/send-journal.js +134 -0
- package/dist/sites/send-journal.js.map +1 -0
- package/dist/sites/service.d.ts +87 -0
- package/dist/sites/service.js +630 -0
- package/dist/sites/service.js.map +1 -0
- package/dist/sites/threads.d.ts +7 -0
- package/dist/sites/threads.js +232 -0
- package/dist/sites/threads.js.map +1 -0
- package/dist/sites/tiktok.d.ts +17 -0
- package/dist/sites/tiktok.js +394 -0
- package/dist/sites/tiktok.js.map +1 -0
- package/dist/sites/types.d.ts +308 -0
- package/dist/sites/types.js +30 -0
- package/dist/sites/types.js.map +1 -0
- package/dist/sites/upload-file.d.ts +10 -0
- package/dist/sites/upload-file.js +49 -0
- package/dist/sites/upload-file.js.map +1 -0
- package/dist/sites/uploads.d.ts +9 -0
- package/dist/sites/uploads.js +59 -0
- package/dist/sites/uploads.js.map +1 -0
- package/dist/sites/verdict.d.ts +120 -0
- package/dist/sites/verdict.js +75 -0
- package/dist/sites/verdict.js.map +1 -0
- package/dist/sites/verify-kit.d.ts +27 -0
- package/dist/sites/verify-kit.js +60 -0
- package/dist/sites/verify-kit.js.map +1 -0
- package/dist/sites/web.d.ts +2 -0
- package/dist/sites/web.js +219 -0
- package/dist/sites/web.js.map +1 -0
- package/dist/sites/why.d.ts +18 -0
- package/dist/sites/why.js +30 -0
- package/dist/sites/why.js.map +1 -0
- package/dist/sites/wire.d.ts +104 -0
- package/dist/sites/wire.js +312 -0
- package/dist/sites/wire.js.map +1 -0
- package/dist/sites/x.d.ts +13 -0
- package/dist/sites/x.js +400 -0
- package/dist/sites/x.js.map +1 -0
- package/dist/sites/youtube.d.ts +30 -0
- package/dist/sites/youtube.js +811 -0
- package/dist/sites/youtube.js.map +1 -0
- package/dist/studio/service.d.ts +26 -0
- package/dist/studio/service.js +100 -0
- package/dist/studio/service.js.map +1 -0
- package/dist/style.d.ts +21 -0
- package/dist/style.js +34 -0
- package/dist/style.js.map +1 -0
- package/dist/types.d.ts +2 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/ui/affordances.d.ts +39 -0
- package/dist/ui/affordances.js +60 -0
- package/dist/ui/affordances.js.map +1 -0
- package/dist/ui/api.d.ts +59 -0
- package/dist/ui/api.js +973 -0
- package/dist/ui/api.js.map +1 -0
- package/dist/ui/auth.d.ts +35 -0
- package/dist/ui/auth.js +113 -0
- package/dist/ui/auth.js.map +1 -0
- package/dist/ui/bus.d.ts +17 -0
- package/dist/ui/bus.js +50 -0
- package/dist/ui/bus.js.map +1 -0
- package/dist/ui/http.d.ts +72 -0
- package/dist/ui/http.js +100 -0
- package/dist/ui/http.js.map +1 -0
- package/dist/ui/jobs.d.ts +34 -0
- package/dist/ui/jobs.js +84 -0
- package/dist/ui/jobs.js.map +1 -0
- package/dist/ui/server.d.ts +15 -0
- package/dist/ui/server.js +27 -0
- package/dist/ui/server.js.map +1 -0
- package/dist/walks/build.d.ts +116 -0
- package/dist/walks/build.js +640 -0
- package/dist/walks/build.js.map +1 -0
- package/dist/walks/cut.d.ts +1015 -0
- package/dist/walks/cut.js +555 -0
- package/dist/walks/cut.js.map +1 -0
- package/dist/walks/flow.d.ts +61 -0
- package/dist/walks/flow.js +430 -0
- package/dist/walks/flow.js.map +1 -0
- package/dist/walks/login.d.ts +27 -0
- package/dist/walks/login.js +82 -0
- package/dist/walks/login.js.map +1 -0
- package/dist/walks/spec.d.ts +1019 -0
- package/dist/walks/spec.js +413 -0
- package/dist/walks/spec.js.map +1 -0
- package/dist/walks/teach.d.ts +57 -0
- package/dist/walks/teach.js +277 -0
- package/dist/walks/teach.js.map +1 -0
- package/dist/workflows/anthropic-console-api-key/index.d.ts +71 -0
- package/dist/workflows/anthropic-console-api-key/index.js +208 -0
- package/dist/workflows/anthropic-console-api-key/index.js.map +1 -0
- package/dist/workflows/aws-port25-request/index.d.ts +47 -0
- package/dist/workflows/aws-port25-request/index.js +77 -0
- package/dist/workflows/aws-port25-request/index.js.map +1 -0
- package/dist/workflows/bootstrap/index.d.ts +52 -0
- package/dist/workflows/bootstrap/index.js +89 -0
- package/dist/workflows/bootstrap/index.js.map +1 -0
- package/dist/workflows/compiled-deps.d.ts +40 -0
- package/dist/workflows/compiled-deps.js +38 -0
- package/dist/workflows/compiled-deps.js.map +1 -0
- package/dist/workflows/compiled.d.ts +57 -0
- package/dist/workflows/compiled.js +110 -0
- package/dist/workflows/compiled.js.map +1 -0
- package/dist/workflows/domain/deps.d.ts +33 -0
- package/dist/workflows/domain/deps.js +2 -0
- package/dist/workflows/domain/deps.js.map +1 -0
- package/dist/workflows/domain/ideas.d.ts +15 -0
- package/dist/workflows/domain/ideas.js +41 -0
- package/dist/workflows/domain/ideas.js.map +1 -0
- package/dist/workflows/domain/index.d.ts +22 -0
- package/dist/workflows/domain/index.js +39 -0
- package/dist/workflows/domain/index.js.map +1 -0
- package/dist/workflows/domain/plan.d.ts +31 -0
- package/dist/workflows/domain/plan.js +56 -0
- package/dist/workflows/domain/plan.js.map +1 -0
- package/dist/workflows/domain/steps.d.ts +66 -0
- package/dist/workflows/domain/steps.js +498 -0
- package/dist/workflows/domain/steps.js.map +1 -0
- package/dist/workflows/example-title/index.d.ts +20 -0
- package/dist/workflows/example-title/index.js +37 -0
- package/dist/workflows/example-title/index.js.map +1 -0
- package/dist/workflows/google-cloud-oauth-client/index.d.ts +54 -0
- package/dist/workflows/google-cloud-oauth-client/index.js +111 -0
- package/dist/workflows/google-cloud-oauth-client/index.js.map +1 -0
- package/dist/workflows/google-cloud-project/index.d.ts +29 -0
- package/dist/workflows/google-cloud-project/index.js +47 -0
- package/dist/workflows/google-cloud-project/index.js.map +1 -0
- package/dist/workflows/google-name/index.d.ts +20 -0
- package/dist/workflows/google-name/index.js +34 -0
- package/dist/workflows/google-name/index.js.map +1 -0
- package/dist/workflows/hn-search/index.d.ts +27 -0
- package/dist/workflows/hn-search/index.js +77 -0
- package/dist/workflows/hn-search/index.js.map +1 -0
- package/dist/workflows/image.d.ts +18 -0
- package/dist/workflows/image.js +50 -0
- package/dist/workflows/image.js.map +1 -0
- package/dist/workflows/inbox-activity/index.d.ts +58 -0
- package/dist/workflows/inbox-activity/index.js +141 -0
- package/dist/workflows/inbox-activity/index.js.map +1 -0
- package/dist/workflows/inbox-fleet/index.d.ts +61 -0
- package/dist/workflows/inbox-fleet/index.js +30 -0
- package/dist/workflows/inbox-fleet/index.js.map +1 -0
- package/dist/workflows/inbox-fleet/steps.d.ts +84 -0
- package/dist/workflows/inbox-fleet/steps.js +418 -0
- package/dist/workflows/inbox-fleet/steps.js.map +1 -0
- package/dist/workflows/instagram-change-email/index.d.ts +34 -0
- package/dist/workflows/instagram-change-email/index.js +110 -0
- package/dist/workflows/instagram-change-email/index.js.map +1 -0
- package/dist/workflows/instagram-profile-basics/index.d.ts +29 -0
- package/dist/workflows/instagram-profile-basics/index.js +63 -0
- package/dist/workflows/instagram-profile-basics/index.js.map +1 -0
- package/dist/workflows/langfuse-project-keys/index.d.ts +26 -0
- package/dist/workflows/langfuse-project-keys/index.js +44 -0
- package/dist/workflows/langfuse-project-keys/index.js.map +1 -0
- package/dist/workflows/learn-quiz-submit/index.d.ts +38 -0
- package/dist/workflows/learn-quiz-submit/index.js +66 -0
- package/dist/workflows/learn-quiz-submit/index.js.map +1 -0
- package/dist/workflows/linkedin-page-admin/index.d.ts +84 -0
- package/dist/workflows/linkedin-page-admin/index.js +288 -0
- package/dist/workflows/linkedin-page-admin/index.js.map +1 -0
- package/dist/workflows/linkedin-page-branding/index.d.ts +98 -0
- package/dist/workflows/linkedin-page-branding/index.js +425 -0
- package/dist/workflows/linkedin-page-branding/index.js.map +1 -0
- package/dist/workflows/linkedin-profile-basics/index.d.ts +102 -0
- package/dist/workflows/linkedin-profile-basics/index.js +314 -0
- package/dist/workflows/linkedin-profile-basics/index.js.map +1 -0
- package/dist/workflows/linkedin-profile-photo/index.d.ts +44 -0
- package/dist/workflows/linkedin-profile-photo/index.js +163 -0
- package/dist/workflows/linkedin-profile-photo/index.js.map +1 -0
- package/dist/workflows/plans.d.ts +14 -0
- package/dist/workflows/plans.js +50 -0
- package/dist/workflows/plans.js.map +1 -0
- package/dist/workflows/proof.d.ts +47 -0
- package/dist/workflows/proof.js +68 -0
- package/dist/workflows/proof.js.map +1 -0
- package/dist/workflows/redirect/index.d.ts +31 -0
- package/dist/workflows/redirect/index.js +81 -0
- package/dist/workflows/redirect/index.js.map +1 -0
- package/dist/workflows/roots.d.ts +19 -0
- package/dist/workflows/roots.js +64 -0
- package/dist/workflows/roots.js.map +1 -0
- package/dist/workflows/sender-domain/index.d.ts +42 -0
- package/dist/workflows/sender-domain/index.js +14 -0
- package/dist/workflows/sender-domain/index.js.map +1 -0
- package/dist/workflows/signup-instagram/index.d.ts +34 -0
- package/dist/workflows/signup-instagram/index.js +80 -0
- package/dist/workflows/signup-instagram/index.js.map +1 -0
- package/dist/workflows/signup-reddit/index.d.ts +42 -0
- package/dist/workflows/signup-reddit/index.js +126 -0
- package/dist/workflows/signup-reddit/index.js.map +1 -0
- package/dist/workflows/workspace-inbox/index.d.ts +62 -0
- package/dist/workflows/workspace-inbox/index.js +141 -0
- package/dist/workflows/workspace-inbox/index.js.map +1 -0
- package/dist/workflows/workspace-skip-passwords/index.d.ts +34 -0
- package/dist/workflows/workspace-skip-passwords/index.js +51 -0
- package/dist/workflows/workspace-skip-passwords/index.js.map +1 -0
- package/package.json +142 -4
|
@@ -0,0 +1,1542 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Explore mode: one browser stays open on a site and takes commands one
|
|
3
|
+
* at a time over loopback, so a flow can be mapped in seconds per step
|
|
4
|
+
* instead of a full run per miss. Every act that succeeds is journaled
|
|
5
|
+
* as a recorder `Action`, so `save` writes a recording the compiler
|
|
6
|
+
* already understands. The person at the keyboard may be a model.
|
|
7
|
+
*
|
|
8
|
+
* The socket drives a signed-in browser, so it is loopback only and every
|
|
9
|
+
* request carries the bearer token the CLI leaves in an owner-only file
|
|
10
|
+
* (`tokenFileFor(port)`) for the session's life. What comes back is
|
|
11
|
+
* masked like a transcript (tokens, keys) unless a command asks for raw.
|
|
12
|
+
*/
|
|
13
|
+
import { randomBytes } from "node:crypto";
|
|
14
|
+
import { appendFileSync, existsSync, mkdirSync, readdirSync, readFileSync, rmSync, utimesSync, writeFileSync, } from "node:fs";
|
|
15
|
+
import { createServer } from "node:http";
|
|
16
|
+
import { tmpdir } from "node:os";
|
|
17
|
+
import { dirname, join, relative } from "node:path";
|
|
18
|
+
import { writeRecords } from "../agent/records.js";
|
|
19
|
+
import { SecretLeak, urlWithoutQuery } from "../auth/guard.js";
|
|
20
|
+
import { fetchFile } from "../browser/download.js";
|
|
21
|
+
import { filmLog } from "../browser/film.js";
|
|
22
|
+
import { chooseOption, defineFlow, flowRunner, } from "../browser/flow.js";
|
|
23
|
+
import { ariaWithFrames, withFrame } from "../browser/frames.js";
|
|
24
|
+
import { handsFor } from "../browser/human/index.js";
|
|
25
|
+
import { inPage } from "../browser/in-page.js";
|
|
26
|
+
import { layoutText } from "../browser/layout.js";
|
|
27
|
+
import { locate, locateAll, textOf } from "../browser/locate.js";
|
|
28
|
+
import { diffHtml, diffShapes, htmlForFile, MAX_BODY_BYTES, MAX_ROWS, NETWORK_OFF, parseRows, redactUrl, rowLine, shapes, } from "../browser/network.js";
|
|
29
|
+
import { checkRows, readRecords } from "../browser/records.js";
|
|
30
|
+
import { snapshotPage } from "../browser/repair.js";
|
|
31
|
+
import { lookAt, urlShape } from "../browser/screens.js";
|
|
32
|
+
import { holdsSecret, secret } from "../browser/secrets.js";
|
|
33
|
+
import { bodyText, looksLikeWall, NeedsHuman } from "../browser/session.js";
|
|
34
|
+
import { macDesktop } from "../desktop/mac.js";
|
|
35
|
+
import { noDesktop, treeText } from "../desktop/types.js";
|
|
36
|
+
import { describeFile, fileLine, filePayload, fileRef, filesInSets, } from "../files/store.js";
|
|
37
|
+
import { activates, amountNear, chargesNow, PaymentFlowYes, PaymentGate, PendingApprovals, paymentAmount, paymentFlowOf, paymentGate, scriptActs, } from "../gates/payment.js";
|
|
38
|
+
import { bankCodeSecret, codeWindowOpen } from "../money/bank-code.js";
|
|
39
|
+
import { receiptOutcome, stillAsking } from "../money/charges.js";
|
|
40
|
+
import { ADDRESS_FIELDS, billingKind, holdsBilling, profileField, profileSecret, } from "../money/profile.js";
|
|
41
|
+
import { cardEnding, cardField, cardSecret, describeCard, RECURRING, } from "../money/wallet.js";
|
|
42
|
+
import { redactRaw } from "../recorder/browser.js";
|
|
43
|
+
import { BINDING, OBSERVER_SCRIPT } from "../recorder/observer.js";
|
|
44
|
+
import { looksLikeSecretField, looksLikeSecretValue, REDACTED, redactAria, redactRow, redactText, } from "../recorder/redact.js";
|
|
45
|
+
import { saveRecording } from "../recorder/store.js";
|
|
46
|
+
import { machine, runLog } from "../runs/log.js";
|
|
47
|
+
import { missCause, targetOf } from "../runs/success.js";
|
|
48
|
+
import { commandSchema, LOOKED_AT, LOOKS, placeHint, toLocatorHints, UNBATCHABLE, WAITS_FOR_CONTROL, WHOLE_PAGE, } from "./commands.js";
|
|
49
|
+
import { readJournal } from "./journal.js";
|
|
50
|
+
import { DEFAULT_IDLE_MINUTES } from "./lease.js";
|
|
51
|
+
import { marksFor, missed } from "./marks.js";
|
|
52
|
+
export { commandSchema, placeHint } from "./commands.js";
|
|
53
|
+
export { journalFileFor, readJournal, tokenFileFor } from "./journal.js";
|
|
54
|
+
/** How long one yes to pay on a host lasts. */
|
|
55
|
+
const FLOW_MS = 30 * 60_000;
|
|
56
|
+
/** How long a spending click's page gets to say paid or declined before it counts as no charge. */
|
|
57
|
+
const SETTLE_MS = Number(process.env.EXPLORE_CHARGE_SETTLE_MS ?? 60_000);
|
|
58
|
+
/** A frame's visible, editable text inputs, each tagged `data-ab-billing` so a locator finds it again; `billingKind` reads the label. */
|
|
59
|
+
const BILLING_FIELDS = `(() => {
|
|
60
|
+
const skip = /^(hidden|password|checkbox|radio|submit|button|file|search|number)$/;
|
|
61
|
+
const out = [];
|
|
62
|
+
let i = 0;
|
|
63
|
+
for (const el of document.querySelectorAll("input")) {
|
|
64
|
+
if (skip.test(el.type) || el.disabled || el.readOnly) continue;
|
|
65
|
+
const r = el.getBoundingClientRect();
|
|
66
|
+
if (!r.width || !r.height) continue;
|
|
67
|
+
const label = [el.type, el.name, el.id, el.autocomplete, el.placeholder,
|
|
68
|
+
el.getAttribute("aria-label"), el.labels && el.labels[0] ? el.labels[0].innerText : ""].join(" ");
|
|
69
|
+
el.setAttribute("data-ab-billing", String(i));
|
|
70
|
+
out.push({ i: i++, label, value: el.value });
|
|
71
|
+
}
|
|
72
|
+
return out;
|
|
73
|
+
})()`;
|
|
74
|
+
/** How long they look for a control in frames that have not finished loading. */
|
|
75
|
+
const FRAME_MS = 5_000;
|
|
76
|
+
/** How long the whole-page measure may take before the row goes without it. */
|
|
77
|
+
const FULL_MS = 1_500;
|
|
78
|
+
const HAND_GRACE_MS = 750;
|
|
79
|
+
/** Rows the diff returns; `snapshot` has the rest. */
|
|
80
|
+
const CHANGED_ROWS = 40;
|
|
81
|
+
/**
|
|
82
|
+
* Where an act left the page, short: an OAuth URL runs to 2 KB, and every
|
|
83
|
+
* act and batch step repeats it. The path stays, a long query does not;
|
|
84
|
+
* `{"cmd":"url"}` still answers the whole thing.
|
|
85
|
+
*/
|
|
86
|
+
export function shortUrl(u) {
|
|
87
|
+
if (u.length <= 160)
|
|
88
|
+
return u;
|
|
89
|
+
const q = u.indexOf("?");
|
|
90
|
+
return q >= 0 && q <= 150 ? `${u.slice(0, q)}?…` : `${u.slice(0, 150)}…`;
|
|
91
|
+
}
|
|
92
|
+
/** An answer with its `url` fields short (the top one and each batch step's). */
|
|
93
|
+
function leanUrls(answer) {
|
|
94
|
+
if (!answer || typeof answer !== "object")
|
|
95
|
+
return answer;
|
|
96
|
+
const a = answer;
|
|
97
|
+
const step = (d) => d && typeof d === "object" && typeof d.url === "string"
|
|
98
|
+
? { ...d, url: shortUrl(d.url) }
|
|
99
|
+
: d;
|
|
100
|
+
return {
|
|
101
|
+
...step(a),
|
|
102
|
+
...(Array.isArray(a.done) ? { done: a.done.map(step) } : {}),
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
/** What an act changed, as a multiset diff of snapshot rows. */
|
|
106
|
+
export function pageChange(before, after) {
|
|
107
|
+
const left = new Map();
|
|
108
|
+
for (const r of before)
|
|
109
|
+
left.set(r, (left.get(r) ?? 0) + 1);
|
|
110
|
+
const added = [];
|
|
111
|
+
for (const r of after) {
|
|
112
|
+
const n = left.get(r) ?? 0;
|
|
113
|
+
if (n)
|
|
114
|
+
left.set(r, n - 1);
|
|
115
|
+
else
|
|
116
|
+
added.push(r);
|
|
117
|
+
}
|
|
118
|
+
const gone = [...left.values()].reduce((a, b) => a + b, 0);
|
|
119
|
+
return {
|
|
120
|
+
added: added.slice(0, CHANGED_ROWS),
|
|
121
|
+
gone,
|
|
122
|
+
...(added.length > CHANGED_ROWS ? { more: added.length - CHANGED_ROWS } : {}),
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
export { DEFAULT_IDLE_MINUTES };
|
|
126
|
+
/**
|
|
127
|
+
* After an act: a page it navigated to loads, then a short wait for the network
|
|
128
|
+
* to go quiet. Live apps (Facebook, X) poll forever and never reach networkidle,
|
|
129
|
+
* so waiting for it cost the full cap on every act; the next command's locator
|
|
130
|
+
* waits for its own control anyway.
|
|
131
|
+
*/
|
|
132
|
+
async function settle(page) {
|
|
133
|
+
await page.waitForLoadState("domcontentloaded", { timeout: 8_000 }).catch(() => undefined);
|
|
134
|
+
await page.waitForLoadState("networkidle", { timeout: 1_500 }).catch(() => undefined);
|
|
135
|
+
}
|
|
136
|
+
/** Resolves once the DOM has not changed for 300 ms, or after 3 s on a page that never stops. */
|
|
137
|
+
const DOM_QUIET = `() => new Promise((done) => {
|
|
138
|
+
let t;
|
|
139
|
+
const end = () => { o.disconnect(); clearTimeout(cap); done(true); };
|
|
140
|
+
const o = new MutationObserver(() => { clearTimeout(t); t = setTimeout(end, 300); });
|
|
141
|
+
o.observe(document, { subtree: true, childList: true, attributes: true, characterData: true });
|
|
142
|
+
t = setTimeout(end, 300);
|
|
143
|
+
const cap = setTimeout(end, 3000);
|
|
144
|
+
})`;
|
|
145
|
+
/**
|
|
146
|
+
* Explore runs as one long flow: the runner owns the session, so a login
|
|
147
|
+
* wall on `open` is signed through, popups are tracked, and the profile
|
|
148
|
+
* is the same one the compiled flow will use.
|
|
149
|
+
*/
|
|
150
|
+
/** Every button's words on the page (in the page, as a string: no DOM types here). */
|
|
151
|
+
const BUTTON_LABELS = `[...document.querySelectorAll("button,[role=button],input[type=submit],input[type=button]")]
|
|
152
|
+
.map((e) => e.innerText || e.value || e.getAttribute("aria-label") || "")
|
|
153
|
+
.filter(Boolean)
|
|
154
|
+
.slice(0, 300)`;
|
|
155
|
+
export async function startExplore(opts) {
|
|
156
|
+
// An unknown set fails before a browser opens.
|
|
157
|
+
if (opts.fileSets?.length && !opts.files)
|
|
158
|
+
throw new Error("--files: no files here (they live on the Mac: autobrowse files add)");
|
|
159
|
+
const files = opts.fileSets?.length && opts.files ? await filesInSets(opts.files, opts.fileSets) : [];
|
|
160
|
+
const ready = new Promise((resolve, reject) => {
|
|
161
|
+
const flow = defineFlow({
|
|
162
|
+
site: opts.site,
|
|
163
|
+
name: "explore",
|
|
164
|
+
run: (fp) => new Promise((finish) => {
|
|
165
|
+
resolve({ fp, finish });
|
|
166
|
+
}),
|
|
167
|
+
});
|
|
168
|
+
const runner = flowRunner(opts.browser, {
|
|
169
|
+
pace: opts.pace ?? null,
|
|
170
|
+
network: { maxRows: MAX_ROWS, maxBodyBytes: MAX_BODY_BYTES },
|
|
171
|
+
...(opts.login ? { login: opts.login } : {}),
|
|
172
|
+
...(opts.captcha ? { captcha: opts.captcha } : {}),
|
|
173
|
+
});
|
|
174
|
+
// A run that fails before the flow starts (the profile held elsewhere) is the opener's
|
|
175
|
+
// error; once started, `ready` has settled and the rejection is a no-op.
|
|
176
|
+
void runner.run(flow, undefined).catch(reject);
|
|
177
|
+
});
|
|
178
|
+
const { fp, finish: finishFlow } = await ready;
|
|
179
|
+
return serve(opts, fp, finishFlow, files);
|
|
180
|
+
}
|
|
181
|
+
/** One `os` act against the desktop; the tree comes back as text like `aria` does. */
|
|
182
|
+
async function runDesktop(d, a, shotsDir, n) {
|
|
183
|
+
switch (a.op) {
|
|
184
|
+
case "apps":
|
|
185
|
+
return { apps: await d.apps() };
|
|
186
|
+
case "open":
|
|
187
|
+
await d.open(a.app);
|
|
188
|
+
return { ok: true };
|
|
189
|
+
case "tree":
|
|
190
|
+
return { tree: redactText(treeText(await d.tree(a.app, a.depth))) };
|
|
191
|
+
case "click":
|
|
192
|
+
await d.click({
|
|
193
|
+
name: a.name,
|
|
194
|
+
...(a.role ? { role: a.role } : {}),
|
|
195
|
+
...(a.app ? { app: a.app } : {}),
|
|
196
|
+
});
|
|
197
|
+
return { ok: true };
|
|
198
|
+
case "type":
|
|
199
|
+
await d.type(a.text);
|
|
200
|
+
return { ok: true };
|
|
201
|
+
case "key":
|
|
202
|
+
await d.key(a.combo);
|
|
203
|
+
return { ok: true };
|
|
204
|
+
case "shot": {
|
|
205
|
+
const file = join(shotsDir, `os-${String(n).padStart(4, "0")}.png`);
|
|
206
|
+
await d.screenshot(file);
|
|
207
|
+
return { file };
|
|
208
|
+
}
|
|
209
|
+
case "shell": {
|
|
210
|
+
const r = await d.shell(a.command, a.root ?? false);
|
|
211
|
+
// Output can hold tokens: masked like everything else that leaves the socket.
|
|
212
|
+
return {
|
|
213
|
+
code: r.code,
|
|
214
|
+
stdout: redactText(r.stdout.slice(0, 4_000)),
|
|
215
|
+
stderr: redactText(r.stderr.slice(0, 1_000)),
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
case "wait":
|
|
219
|
+
await new Promise((r) => setTimeout(r, a.ms));
|
|
220
|
+
return { ok: true };
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
async function serve(opts, fp, finishFlow, sessionFiles) {
|
|
224
|
+
const now = opts.now ?? Date.now;
|
|
225
|
+
const t0 = now();
|
|
226
|
+
const startedAt = new Date(t0).toISOString();
|
|
227
|
+
const infoFile = opts.tokenFile ? `${opts.tokenFile.replace(/\.token$/, "")}.json` : null;
|
|
228
|
+
const actions = opts.journalFile ? readJournal(opts.journalFile) : [];
|
|
229
|
+
const carried = actions.at(-1);
|
|
230
|
+
const resumedFrom = carried ? { acts: actions.length, url: carried.url ?? null } : null;
|
|
231
|
+
/** A resumed journal's times run on from where it stopped. */
|
|
232
|
+
const tBase = carried ? carried.t + 1 : 0;
|
|
233
|
+
const shotsDir = join(opts.recordingsDir, `.explore-${opts.site}`);
|
|
234
|
+
mkdirSync(shotsDir, { recursive: true });
|
|
235
|
+
const desktop = opts.desktop ?? (process.platform === "darwin" ? macDesktop() : noDesktop());
|
|
236
|
+
// A resumed journal points at the earlier shots: number on past them. A fresh
|
|
237
|
+
// session writes over them, so the folder stays one session's size.
|
|
238
|
+
let shotN = carried ? readdirSync(shotsDir).filter((f) => /^\d{4}\.png$/.test(f)).length : 0;
|
|
239
|
+
let finish = () => undefined;
|
|
240
|
+
const done = new Promise((resolve) => {
|
|
241
|
+
finish = resolve;
|
|
242
|
+
});
|
|
243
|
+
/** The active page: it moves when a popup opens (OAuth) and comes back after; re-read per command. */
|
|
244
|
+
let page = fp.page;
|
|
245
|
+
let paused = false;
|
|
246
|
+
let waiters = [];
|
|
247
|
+
/** Acts a person did by hand since the last `pause`. */
|
|
248
|
+
let handActs = 0;
|
|
249
|
+
/**
|
|
250
|
+
* Help without a pause: a person at a headed browser types the code the
|
|
251
|
+
* agent could not get, or clicks past the screen it was stuck on, between
|
|
252
|
+
* two commands. Those acts are journaled like paused ones and counted here
|
|
253
|
+
* until the next command, whose answer says so (`helped`).
|
|
254
|
+
*/
|
|
255
|
+
let helpedActs = 0;
|
|
256
|
+
/** Commands in flight, and when the last one's own late DOM events stop counting as a person's. */
|
|
257
|
+
let busy = 0;
|
|
258
|
+
let quietAt = 0;
|
|
259
|
+
/** Where the agent last left the page: the url, and the rows when its last act diffed them. */
|
|
260
|
+
let left = null;
|
|
261
|
+
const byHand = () => paused || (busy === 0 && now() >= quietAt);
|
|
262
|
+
const resume = () => {
|
|
263
|
+
paused = false;
|
|
264
|
+
for (const w of waiters)
|
|
265
|
+
w();
|
|
266
|
+
waiters = [];
|
|
267
|
+
};
|
|
268
|
+
// Run history: the journal is resume state and goes on `close`; the run stays.
|
|
269
|
+
// A resumed session goes on writing the run its journal's sidecar names.
|
|
270
|
+
const runSide = opts.journalFile ? `${opts.journalFile}.run` : null;
|
|
271
|
+
let history = null;
|
|
272
|
+
let carriedRun = resumedFrom && runSide && existsSync(runSide) ? readFileSync(runSide, "utf8").trim() : null;
|
|
273
|
+
let firstGoal = opts.goal ?? null;
|
|
274
|
+
/** A recording was saved this run: the close that follows ends it `saved`. */
|
|
275
|
+
let saved = false;
|
|
276
|
+
/** How the session ended when no `done` said: an idle close, else closed. */
|
|
277
|
+
let endedBy = null;
|
|
278
|
+
/** What a `close` with `why` said: the run's summary. */
|
|
279
|
+
let closedWhy = null;
|
|
280
|
+
/** `close` was sent: nothing of this run is left to resume. */
|
|
281
|
+
let closing = false;
|
|
282
|
+
/** The page the command in flight acts on, as it was before the act. */
|
|
283
|
+
let lookBefore = null;
|
|
284
|
+
/**
|
|
285
|
+
* The page as it last went quiet: the look a person's next act is done on.
|
|
286
|
+
* Taken after every act, command and load; one that lands after the next
|
|
287
|
+
* act came in is dropped (a fill's change event fires as the next click lands).
|
|
288
|
+
*/
|
|
289
|
+
let handLook = null;
|
|
290
|
+
let lookGen = 0;
|
|
291
|
+
const lookWhenQuiet = () => {
|
|
292
|
+
if (!opts.runs)
|
|
293
|
+
return;
|
|
294
|
+
const gen = ++lookGen;
|
|
295
|
+
const p = page;
|
|
296
|
+
void (async () => {
|
|
297
|
+
await p.waitForLoadState("domcontentloaded", { timeout: 8_000 }).catch(() => undefined);
|
|
298
|
+
await p.evaluate(`(${DOM_QUIET})()`).catch(() => undefined);
|
|
299
|
+
const look = p.isClosed() ? null : await lookAt(p).catch(() => null);
|
|
300
|
+
if (gen === lookGen && look)
|
|
301
|
+
handLook = look;
|
|
302
|
+
})();
|
|
303
|
+
};
|
|
304
|
+
/** The history never fails a command: a full disk loses rows, not acts. */
|
|
305
|
+
const logged = (f) => {
|
|
306
|
+
const h = history;
|
|
307
|
+
if (!h || h.ended())
|
|
308
|
+
return;
|
|
309
|
+
try {
|
|
310
|
+
f(h);
|
|
311
|
+
}
|
|
312
|
+
catch {
|
|
313
|
+
// not written
|
|
314
|
+
}
|
|
315
|
+
};
|
|
316
|
+
const openRun = () => {
|
|
317
|
+
if (!opts.runs || (history && !history.ended()))
|
|
318
|
+
return;
|
|
319
|
+
const was = carriedRun;
|
|
320
|
+
carriedRun = null;
|
|
321
|
+
try {
|
|
322
|
+
history = runLog(opts.runs, opts.site, was ? { id: was } : {});
|
|
323
|
+
}
|
|
324
|
+
catch {
|
|
325
|
+
// A sidecar naming no run (hand-edited, cut): a new one.
|
|
326
|
+
history = runLog(opts.runs, opts.site);
|
|
327
|
+
}
|
|
328
|
+
if (runSide)
|
|
329
|
+
writeFileSync(runSide, history.id, { mode: 0o600 });
|
|
330
|
+
const vp = page.viewportSize();
|
|
331
|
+
logged((h) => h.start({
|
|
332
|
+
run: h.id,
|
|
333
|
+
site: opts.site,
|
|
334
|
+
driver: opts.driver ?? "console",
|
|
335
|
+
goal: firstGoal,
|
|
336
|
+
machine: machine(),
|
|
337
|
+
resumed: was !== null,
|
|
338
|
+
viewport: vp ? { width: vp.width, height: vp.height } : null,
|
|
339
|
+
}));
|
|
340
|
+
firstGoal = null;
|
|
341
|
+
saved = false;
|
|
342
|
+
};
|
|
343
|
+
/** `resumable`: an idle close or a lost browser, whose next life goes on writing this run. */
|
|
344
|
+
const endRun = async (outcome, summary, resumable = false) => {
|
|
345
|
+
const h = history;
|
|
346
|
+
if (!h || h.ended())
|
|
347
|
+
return;
|
|
348
|
+
// A person who closed the browser ended on the page they last saw.
|
|
349
|
+
const look = page.isClosed() ? handLook : await lookAt(page).catch(() => null);
|
|
350
|
+
logged((l) => l.end({ outcome, summary, look }));
|
|
351
|
+
if (runSide && !resumable)
|
|
352
|
+
rmSync(runSide, { force: true });
|
|
353
|
+
};
|
|
354
|
+
/** What the whole accessibility tree would have cost, in chars; null when it takes too long. */
|
|
355
|
+
const wholePage = async () => {
|
|
356
|
+
const p = page;
|
|
357
|
+
let timer;
|
|
358
|
+
const late = new Promise((resolve) => {
|
|
359
|
+
timer = setTimeout(() => resolve(null), FULL_MS);
|
|
360
|
+
});
|
|
361
|
+
const tree = await Promise.race([ariaWithFrames(p).catch(() => null), late]);
|
|
362
|
+
clearTimeout(timer);
|
|
363
|
+
return tree === null ? null : tree.length;
|
|
364
|
+
};
|
|
365
|
+
/**
|
|
366
|
+
* One command's row: how long, what its answer cost the caller in chars,
|
|
367
|
+
* and (for acts and looks) what the whole page would have. The whole page
|
|
368
|
+
* is measured beside the next command, never in its way.
|
|
369
|
+
*/
|
|
370
|
+
const counted = (c, t0, error, chars,
|
|
371
|
+
/** The whole error, call log included: why a locator missed. */
|
|
372
|
+
detail) => {
|
|
373
|
+
const h = history;
|
|
374
|
+
if (!h || h.ended())
|
|
375
|
+
return;
|
|
376
|
+
const ms = now() - t0;
|
|
377
|
+
const host = URL.canParse(page.url()) ? new URL(page.url()).host : "";
|
|
378
|
+
const missed = error !== null && "hints" in c && c.hints && /^locator\.\w+: Timeout/.test(error)
|
|
379
|
+
? { target: redactText(targetOf(c.hints)), miss: missCause(detail ?? error) }
|
|
380
|
+
: {};
|
|
381
|
+
const write = (full) => logged((l) => l.cmd({
|
|
382
|
+
cmd: c.cmd,
|
|
383
|
+
ok: error === null,
|
|
384
|
+
error: error === null ? null : redactText(error).slice(0, 200),
|
|
385
|
+
ms,
|
|
386
|
+
chars,
|
|
387
|
+
full,
|
|
388
|
+
host,
|
|
389
|
+
...missed,
|
|
390
|
+
}));
|
|
391
|
+
if (error !== null || !WHOLE_PAGE.has(c.cmd))
|
|
392
|
+
return write(null);
|
|
393
|
+
void wholePage().then(write);
|
|
394
|
+
};
|
|
395
|
+
// This session's page calls and saved pages, beside its shots; kept for good, shipped like them.
|
|
396
|
+
const netStamp = startedAt.replace(/[:.]/g, "-");
|
|
397
|
+
const netFile = join(shotsDir, `network-${netStamp}.jsonl`);
|
|
398
|
+
const htmlDir = join(shotsDir, "html");
|
|
399
|
+
const htmlIndex = join(htmlDir, "index.jsonl");
|
|
400
|
+
let htmlN = 0;
|
|
401
|
+
const writeNet = () => {
|
|
402
|
+
const text = fp.network?.jsonl();
|
|
403
|
+
if (text)
|
|
404
|
+
writeFileSync(netFile, text);
|
|
405
|
+
};
|
|
406
|
+
/** The newest log an earlier session of this site wrote. */
|
|
407
|
+
const lastNet = () => {
|
|
408
|
+
const prev = readdirSync(shotsDir)
|
|
409
|
+
.filter((f) => /^network-.*\.jsonl$/.test(f) && join(shotsDir, f) !== netFile)
|
|
410
|
+
.sort()
|
|
411
|
+
.at(-1);
|
|
412
|
+
return prev ? parseRows(readFileSync(join(shotsDir, prev), "utf8")) : null;
|
|
413
|
+
};
|
|
414
|
+
const network = (c) => {
|
|
415
|
+
const log = fp.network;
|
|
416
|
+
if (!log)
|
|
417
|
+
throw new Error(NETWORK_OFF);
|
|
418
|
+
writeNet();
|
|
419
|
+
const rows = log.rows();
|
|
420
|
+
if (c.id !== undefined) {
|
|
421
|
+
const r = log.row(c.id);
|
|
422
|
+
if (!r)
|
|
423
|
+
throw new Error(`no call ${c.id} (the log keeps the newest ${MAX_ROWS})`);
|
|
424
|
+
const body = r.body === undefined ? undefined : JSON.stringify(r.body, null, 1);
|
|
425
|
+
const cap = c.limit ?? 20_000;
|
|
426
|
+
return {
|
|
427
|
+
...r,
|
|
428
|
+
...(body !== undefined ? { body: body.slice(0, cap) } : {}),
|
|
429
|
+
...(body && body.length > cap ? { more: body.length - cap } : {}),
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
if (c.diff) {
|
|
433
|
+
const prev = lastNet();
|
|
434
|
+
if (!prev)
|
|
435
|
+
return { diff: null, reason: "no earlier session of this site" };
|
|
436
|
+
return { diff: diffShapes(shapes(prev), shapes(rows)) };
|
|
437
|
+
}
|
|
438
|
+
const hits = c.filter ? rows.filter((r) => r.url.includes(c.filter ?? "")) : rows;
|
|
439
|
+
const shown = hits.slice(-(c.last ?? 40));
|
|
440
|
+
return {
|
|
441
|
+
calls: shown.map(rowLine),
|
|
442
|
+
...(hits.length > shown.length ? { more: hits.length - shown.length } : {}),
|
|
443
|
+
...(log.personal ? { personal: true } : {}),
|
|
444
|
+
file: netFile,
|
|
445
|
+
};
|
|
446
|
+
};
|
|
447
|
+
const html = async (c) => {
|
|
448
|
+
if (!fp.network)
|
|
449
|
+
throw new Error(NETWORK_OFF);
|
|
450
|
+
if (fp.network.personal)
|
|
451
|
+
throw new Error("a personal profile keeps no HTML");
|
|
452
|
+
const url = page.url();
|
|
453
|
+
const text = htmlForFile(await page.content());
|
|
454
|
+
mkdirSync(htmlDir, { recursive: true });
|
|
455
|
+
const name = `${netStamp}-${String(htmlN++).padStart(3, "0")}.html`;
|
|
456
|
+
const shape = urlShape(url);
|
|
457
|
+
const before = existsSync(htmlIndex)
|
|
458
|
+
? readFileSync(htmlIndex, "utf8")
|
|
459
|
+
.split("\n")
|
|
460
|
+
.filter(Boolean)
|
|
461
|
+
.map((l) => JSON.parse(l))
|
|
462
|
+
.filter((e) => e.shape === shape && existsSync(join(htmlDir, e.file)))
|
|
463
|
+
.at(-1)
|
|
464
|
+
: undefined;
|
|
465
|
+
writeFileSync(join(htmlDir, name), text);
|
|
466
|
+
appendFileSync(htmlIndex, `${JSON.stringify({ file: name, url: redactUrl(url), shape, at: new Date(now()).toISOString() })}\n`);
|
|
467
|
+
const saved = { file: join(htmlDir, name), bytes: text.length };
|
|
468
|
+
if (!c.diff)
|
|
469
|
+
return saved;
|
|
470
|
+
if (!before)
|
|
471
|
+
return { ...saved, diff: null, reason: "no earlier save of this page" };
|
|
472
|
+
const d = diffHtml(readFileSync(join(htmlDir, before.file), "utf8"), text);
|
|
473
|
+
return {
|
|
474
|
+
...saved,
|
|
475
|
+
diff: {
|
|
476
|
+
against: before.file,
|
|
477
|
+
added: d.added.slice(0, 40),
|
|
478
|
+
removed: d.removed.slice(0, 40),
|
|
479
|
+
addedCount: d.added.length,
|
|
480
|
+
removedCount: d.removed.length,
|
|
481
|
+
},
|
|
482
|
+
};
|
|
483
|
+
};
|
|
484
|
+
const shoot = async () => {
|
|
485
|
+
const file = join(shotsDir, `${String(shotN++).padStart(4, "0")}.png`);
|
|
486
|
+
// A failed shot is an error, never a path to a file that is not there.
|
|
487
|
+
await page.screenshot({ path: file });
|
|
488
|
+
return file;
|
|
489
|
+
};
|
|
490
|
+
const journal = (a) => {
|
|
491
|
+
const act = { ...a, t: tBase + now() - t0, url: page.url() };
|
|
492
|
+
actions.push(act);
|
|
493
|
+
if (opts.journalFile)
|
|
494
|
+
appendFileSync(opts.journalFile, `${JSON.stringify(act)}\n`);
|
|
495
|
+
// A person's act between commands: the page as it last went quiet, before this act changed it.
|
|
496
|
+
const hand = byHand();
|
|
497
|
+
if (hand)
|
|
498
|
+
lookGen++;
|
|
499
|
+
const look = hand ? handLook : lookBefore;
|
|
500
|
+
logged((h) => h.act(act, look, hand));
|
|
501
|
+
lookBefore = null;
|
|
502
|
+
if (hand)
|
|
503
|
+
lookWhenQuiet();
|
|
504
|
+
};
|
|
505
|
+
// While paused, the page reports what a person does (the recorder's
|
|
506
|
+
// observer), so hand-done steps sit in the same journal as the
|
|
507
|
+
// commands. Un-paused, commands journal themselves and the DOM is quiet.
|
|
508
|
+
await page
|
|
509
|
+
.context()
|
|
510
|
+
.exposeBinding(BINDING, (_src, raw) => {
|
|
511
|
+
if (!byHand())
|
|
512
|
+
return;
|
|
513
|
+
if (paused)
|
|
514
|
+
handActs++;
|
|
515
|
+
else
|
|
516
|
+
helpedActs++;
|
|
517
|
+
journal(redactRaw(raw));
|
|
518
|
+
})
|
|
519
|
+
.catch(() => undefined);
|
|
520
|
+
await page
|
|
521
|
+
.context()
|
|
522
|
+
.addInitScript(OBSERVER_SCRIPT)
|
|
523
|
+
.catch(() => undefined);
|
|
524
|
+
// A load between commands is a person's only when they also acted (a slow redirect is not).
|
|
525
|
+
page.on("framenavigated", (frame) => {
|
|
526
|
+
if (frame !== page.mainFrame())
|
|
527
|
+
return;
|
|
528
|
+
if (paused || ((helpedActs || opts.driver === "person") && byHand()))
|
|
529
|
+
journal({ kind: "navigate" });
|
|
530
|
+
lookWhenQuiet();
|
|
531
|
+
});
|
|
532
|
+
const find = (t) => locate(page, t.hints);
|
|
533
|
+
const marks = marksFor();
|
|
534
|
+
/** The marks picture, names masked as `aria` masks them. */
|
|
535
|
+
const takeMarks = async () => {
|
|
536
|
+
const taken = await marks.take(page, shoot);
|
|
537
|
+
return {
|
|
538
|
+
...taken,
|
|
539
|
+
marks: taken.marks.map((m) => ({ ...m, name: m.name && redactText(m.name) })),
|
|
540
|
+
};
|
|
541
|
+
};
|
|
542
|
+
/**
|
|
543
|
+
* Billing fields and spending buttons wait for the person; refused when
|
|
544
|
+
* nobody can be asked. Over the socket the question is asked once and the
|
|
545
|
+
* same command is sent again after the reply (`reason: "asked"`); in
|
|
546
|
+
* process the caller waits.
|
|
547
|
+
*/
|
|
548
|
+
const approvals = opts.approve ? new PendingApprovals(opts.approve) : null;
|
|
549
|
+
/**
|
|
550
|
+
* One yes per payment flow (William, 2026-09-25: "only ask one yes or no
|
|
551
|
+
* for whether you want to start the payment flow and pay, not repeated
|
|
552
|
+
* questions"): a yes on a site (www. and my. alike) covers every money act there (billing
|
|
553
|
+
* fields, the card, checkout, pay) for FLOW_MS, across session restarts. A no is asked again.
|
|
554
|
+
*/
|
|
555
|
+
const flowYes = new PaymentFlowYes(opts.yesFile ?? join(tmpdir(), "autobrowse", "payment-flows.json"));
|
|
556
|
+
const decide = async (_key, what, url, wait, amount = null) => {
|
|
557
|
+
if (!approvals)
|
|
558
|
+
throw new PaymentGate(what, "no-approver");
|
|
559
|
+
// The flow is the site (my. and www. are one checkout); the yes survives a session restart.
|
|
560
|
+
const flow = paymentFlowOf(url);
|
|
561
|
+
if (flowYes.covers(flow))
|
|
562
|
+
return;
|
|
563
|
+
await approvals.decide(`pay ${flow}`, {
|
|
564
|
+
what: `start paying on ${flow.length > 60 ? "this page" : flow}: ${what} (one yes covers the card and the pay clicks here for ${FLOW_MS / 60_000} min)`,
|
|
565
|
+
url,
|
|
566
|
+
site: opts.site,
|
|
567
|
+
...(amount ? { amount } : {}),
|
|
568
|
+
}, wait);
|
|
569
|
+
flowYes.grant(flow, FLOW_MS);
|
|
570
|
+
};
|
|
571
|
+
/** Instant for a console; a person's hands when an agent drives (`pace`). */
|
|
572
|
+
const hands = handsFor(opts.pace ?? null, Math.random, filmLog, holdsSecret);
|
|
573
|
+
const gate = async (act, t, wait) => {
|
|
574
|
+
// A click is judged by what the button says too: `#checkout` or `.btn` alone names nothing.
|
|
575
|
+
const said = act === "click"
|
|
576
|
+
? await find(t)
|
|
577
|
+
.first()
|
|
578
|
+
.evaluate((e) => e.innerText ||
|
|
579
|
+
e.value ||
|
|
580
|
+
e.getAttribute("aria-label") ||
|
|
581
|
+
"", undefined, { timeout: 10_000 })
|
|
582
|
+
.catch(() => "")
|
|
583
|
+
: "";
|
|
584
|
+
const hints = {
|
|
585
|
+
...t.hints,
|
|
586
|
+
...(said.trim() ? { text: `${t.hints.text ?? ""} ${said.trim().slice(0, 200)}` } : {}),
|
|
587
|
+
};
|
|
588
|
+
const what = paymentGate(act, hints);
|
|
589
|
+
if (!what)
|
|
590
|
+
return null;
|
|
591
|
+
// A miss is a miss, not a question: the element must be there before anyone is asked.
|
|
592
|
+
await find(t).first().waitFor({ state: "visible", timeout: 10_000 });
|
|
593
|
+
// The button's own amount, else the order total next to it, else a question with no amount.
|
|
594
|
+
const amount = act === "click"
|
|
595
|
+
? (paymentAmount(t.hints) ?? (await amountNear(find(t).first())))
|
|
596
|
+
: null;
|
|
597
|
+
await decide(`${act} ${JSON.stringify(t.hints)}`, what, page.url(), wait, amount);
|
|
598
|
+
return { what, amount, charges: chargesNow(hints) };
|
|
599
|
+
};
|
|
600
|
+
/** A secret this session holds by name (a code, a minted password, a stored login). */
|
|
601
|
+
const sessionSecret = async (name) => {
|
|
602
|
+
if (!opts.secrets)
|
|
603
|
+
throw new Error(`place: no secrets in this session; ${placeHint(name)}`);
|
|
604
|
+
const value = await opts.secrets(name);
|
|
605
|
+
if (!value)
|
|
606
|
+
throw new Error(`place: ${name} is not available now (a code: the site's message has not arrived in the inbox this run reads yet, wait and retry); ${placeHint(name)}`);
|
|
607
|
+
return secret(value);
|
|
608
|
+
};
|
|
609
|
+
/** A field of the owner's profile. */
|
|
610
|
+
const profileValue = async (name, want) => {
|
|
611
|
+
if (!opts.profiles)
|
|
612
|
+
throw new Error("place: no profiles here (they live on the Mac: autobrowse profile set)");
|
|
613
|
+
const p = await opts.profiles(want.id);
|
|
614
|
+
if (!p)
|
|
615
|
+
throw new Error(`place: ${name}: no profile ${want.id ?? "(name one: profile@<id>.)"}`);
|
|
616
|
+
const value = profileField(p, want.field);
|
|
617
|
+
if (!value)
|
|
618
|
+
throw new Error(`place: ${name}: profile ${p.id} has no ${want.field} (fields: taxId, name, email, phone, ${ADDRESS_FIELDS.join(", ")})`);
|
|
619
|
+
return value;
|
|
620
|
+
};
|
|
621
|
+
/** File-and-host pairs a person said yes to this session (papers only). */
|
|
622
|
+
const filesYes = new Set();
|
|
623
|
+
/** One file use in the audit: never its bytes or text. */
|
|
624
|
+
const auditFile = (name, by, allowed) => opts.audit?.record({
|
|
625
|
+
at: new Date().toISOString(),
|
|
626
|
+
credential: `file:${name}`,
|
|
627
|
+
field: "secret",
|
|
628
|
+
site: opts.site,
|
|
629
|
+
url: urlWithoutQuery(page.url()),
|
|
630
|
+
by,
|
|
631
|
+
allowed,
|
|
632
|
+
});
|
|
633
|
+
/**
|
|
634
|
+
* An upload's files: paths as given, or every `file:<name>` as bytes from memory, audited
|
|
635
|
+
* either way. A paper first needs a person's yes for that file on this host; a doc does not.
|
|
636
|
+
* Stored files and paths don't mix.
|
|
637
|
+
*/
|
|
638
|
+
const uploadFiles = async (files, wait) => {
|
|
639
|
+
const old = files.find((f) => f.startsWith("paper:"));
|
|
640
|
+
if (old)
|
|
641
|
+
throw new Error(`upload: ${old} is now file:${old.slice(6)} (autobrowse files list)`);
|
|
642
|
+
const names = files.map(fileRef);
|
|
643
|
+
if (names.every((n) => n === null))
|
|
644
|
+
return files;
|
|
645
|
+
if (names.some((n) => n === null))
|
|
646
|
+
throw new Error("upload: stored files (file:<name>) and paths in separate uploads");
|
|
647
|
+
if (!opts.files)
|
|
648
|
+
throw new Error("upload: no files here (they live on the Mac: autobrowse files add)");
|
|
649
|
+
const host = new URL(page.url()).host;
|
|
650
|
+
const out = [];
|
|
651
|
+
for (const name of names) {
|
|
652
|
+
const by = `upload file:${name}`;
|
|
653
|
+
const got = await opts.files.get(name);
|
|
654
|
+
if (!got) {
|
|
655
|
+
await auditFile(name, by, false);
|
|
656
|
+
throw new Error(`upload: no file ${name} (autobrowse files list)`);
|
|
657
|
+
}
|
|
658
|
+
const key = `${name}@${host}`;
|
|
659
|
+
if (got.file.kind === "paper" && !filesYes.has(key)) {
|
|
660
|
+
const what = `upload ${describeFile(got.file)} to ${host || "this page"}`;
|
|
661
|
+
try {
|
|
662
|
+
if (!approvals)
|
|
663
|
+
throw new PaymentGate(what, "no-approver");
|
|
664
|
+
await approvals.decide(`file ${key}`, { what, url: page.url(), site: opts.site }, wait);
|
|
665
|
+
}
|
|
666
|
+
catch (err) {
|
|
667
|
+
await auditFile(name, by, false);
|
|
668
|
+
throw err;
|
|
669
|
+
}
|
|
670
|
+
filesYes.add(key);
|
|
671
|
+
}
|
|
672
|
+
await auditFile(name, by, true);
|
|
673
|
+
out.push(filePayload(got.file, got.data));
|
|
674
|
+
}
|
|
675
|
+
return out;
|
|
676
|
+
};
|
|
677
|
+
/** Card-and-host pairs a person said yes to this session; the card last placed, for the receipt. */
|
|
678
|
+
const cardsYes = new Set();
|
|
679
|
+
let placedCard = null;
|
|
680
|
+
/** When and where the card last landed: the bank's code is only for the payment it confirms. */
|
|
681
|
+
let cardLanded = null;
|
|
682
|
+
const pageText = async () => (await page.innerText("body").catch(() => "")).slice(0, 20_000);
|
|
683
|
+
/**
|
|
684
|
+
* William (2026-10-04): a billing form's email, phone and tax id are always the
|
|
685
|
+
* card owner's (the placed card's contacts, else the only profile's), never the
|
|
686
|
+
* login email a site prefilled. Run when a card lands and before a spend click,
|
|
687
|
+
* in every frame (Stripe's fields live in iframes). Names the kinds it set.
|
|
688
|
+
*/
|
|
689
|
+
const fillBilling = async () => {
|
|
690
|
+
const p = placedCard ? null : await opts.profiles?.(null).catch(() => null);
|
|
691
|
+
const want = placedCard?.contacts ??
|
|
692
|
+
(p
|
|
693
|
+
? {
|
|
694
|
+
...(p.email ? { email: p.email } : {}),
|
|
695
|
+
...(p.phone ? { phone: p.phone } : {}),
|
|
696
|
+
...(p.taxId ? { taxId: p.taxId } : {}),
|
|
697
|
+
}
|
|
698
|
+
: {});
|
|
699
|
+
if (!Object.keys(want).length)
|
|
700
|
+
return [];
|
|
701
|
+
const set = [];
|
|
702
|
+
for (const frame of page.frames()) {
|
|
703
|
+
const fields = await frame
|
|
704
|
+
.evaluate(BILLING_FIELDS)
|
|
705
|
+
.catch(() => []);
|
|
706
|
+
for (const f of fields) {
|
|
707
|
+
const kind = billingKind(f.label);
|
|
708
|
+
const value = kind ? want[kind] : undefined;
|
|
709
|
+
if (!kind || !value || holdsBilling(kind, f.value, value))
|
|
710
|
+
continue;
|
|
711
|
+
await hands.paste(frame.locator(`[data-ab-billing="${f.i}"]`), value, { timeout: 10_000 });
|
|
712
|
+
set.push(kind);
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
return set;
|
|
716
|
+
};
|
|
717
|
+
const placeCard = async (c, want, wait) => {
|
|
718
|
+
if (!opts.cards)
|
|
719
|
+
throw new Error("place: no wallet here (cards live on the Mac: autobrowse wallet add)");
|
|
720
|
+
const host = new URL(page.url()).host;
|
|
721
|
+
const recurring = RECURRING.test(await pageText());
|
|
722
|
+
const audit = (allowed) => opts.audit?.record({
|
|
723
|
+
at: new Date().toISOString(),
|
|
724
|
+
credential: "wallet",
|
|
725
|
+
field: "secret",
|
|
726
|
+
site: opts.site,
|
|
727
|
+
url: urlWithoutQuery(page.url()),
|
|
728
|
+
by: `place ${c.secret}`,
|
|
729
|
+
allowed,
|
|
730
|
+
});
|
|
731
|
+
let card;
|
|
732
|
+
try {
|
|
733
|
+
card = await opts.cards({ host, label: want.label, subscription: recurring });
|
|
734
|
+
}
|
|
735
|
+
catch (err) {
|
|
736
|
+
await audit(false);
|
|
737
|
+
throw err;
|
|
738
|
+
}
|
|
739
|
+
const value = cardField(card, want.field, card.billing);
|
|
740
|
+
if (!value)
|
|
741
|
+
throw new Error(`place: ${c.secret}: ${card.label} has no ${want.field} (fields: number, exp, expMonth, expYear, expYY, cvc, name, postal; from its owner's profile: ${ADDRESS_FIELDS.join(", ")})`);
|
|
742
|
+
// The number and code are the card's secrets; a name or postal code is plain text.
|
|
743
|
+
if (want.field === "number" || want.field === "cvc")
|
|
744
|
+
secret(value);
|
|
745
|
+
const key = `${card.label}@${host}`;
|
|
746
|
+
if (!cardsYes.has(key)) {
|
|
747
|
+
await decide(`card ${key}`, `put ${describeCard(card)} on ${host}${card.kind === "debit" ? " (a DEBIT card)" : ""}${recurring ? " for a recurring charge" : ""}`, page.url(), wait);
|
|
748
|
+
cardsYes.add(key);
|
|
749
|
+
}
|
|
750
|
+
await audit(true);
|
|
751
|
+
await hands.think(page);
|
|
752
|
+
await hands.paste(find(c), value, { timeout: 10_000 });
|
|
753
|
+
journalAct(c, (target) => ({
|
|
754
|
+
kind: "input",
|
|
755
|
+
target,
|
|
756
|
+
value: REDACTED,
|
|
757
|
+
redacted: true,
|
|
758
|
+
secret: c.secret,
|
|
759
|
+
}));
|
|
760
|
+
if (placedCard?.line !== cardEnding(card))
|
|
761
|
+
await opts.cardsOnFile
|
|
762
|
+
?.placed({ at: new Date().toISOString(), site: opts.site, host, card: cardEnding(card) })
|
|
763
|
+
.catch(() => undefined);
|
|
764
|
+
cardLanded = { at: now(), flow: paymentFlowOf(page.url()), label: card.label };
|
|
765
|
+
placedCard = {
|
|
766
|
+
line: cardEnding(card),
|
|
767
|
+
recurring,
|
|
768
|
+
...(card.tell ? { tell: card.tell } : {}),
|
|
769
|
+
contacts: { ...card.tell, ...(card.taxId ? { taxId: card.taxId } : {}) },
|
|
770
|
+
};
|
|
771
|
+
const billing = await fillBilling();
|
|
772
|
+
return { ok: true, secret: c.secret, ...(billing.length ? { billing } : {}) };
|
|
773
|
+
};
|
|
774
|
+
/**
|
|
775
|
+
* The bank's confirmation code (3-D Secure, often in an iframe on the bank's
|
|
776
|
+
* domain): any host and frame, but only for a card this session placed, on a
|
|
777
|
+
* flow that still has a payment yes (the session's, or a `spend --grant`),
|
|
778
|
+
* within the code window of the card landing, and only a text that came after.
|
|
779
|
+
*/
|
|
780
|
+
const placeBankCode = async (c, want) => {
|
|
781
|
+
const audit = (allowed) => opts.audit?.record({
|
|
782
|
+
at: new Date().toISOString(),
|
|
783
|
+
credential: "wallet",
|
|
784
|
+
field: "secret",
|
|
785
|
+
site: opts.site,
|
|
786
|
+
url: urlWithoutQuery(page.url()),
|
|
787
|
+
by: `place ${c.secret}`,
|
|
788
|
+
allowed,
|
|
789
|
+
});
|
|
790
|
+
const refuse = async (why) => {
|
|
791
|
+
await audit(false);
|
|
792
|
+
throw new Error(`place: ${c.secret}: ${why}`);
|
|
793
|
+
};
|
|
794
|
+
if (!opts.cardCode)
|
|
795
|
+
throw new Error("place: no phone here to read the bank's code (it lives on the Mac: PHONE_NUMBER, Text Message Forwarding)");
|
|
796
|
+
const landed = cardLanded;
|
|
797
|
+
if (!landed)
|
|
798
|
+
return refuse("no card was placed in this session; place the card first");
|
|
799
|
+
if (want.label && want.label !== landed.label)
|
|
800
|
+
return refuse(`the card placed here is ${landed.label}, not ${want.label}`);
|
|
801
|
+
if (!codeWindowOpen(landed.at, now()))
|
|
802
|
+
return refuse("the card landed over 10 min ago; place it again for a new payment");
|
|
803
|
+
const yes = flowYes.covers(landed.flow) ||
|
|
804
|
+
[opts.site, landed.flow].some((site) => opts.grantedAhead?.(site) === true);
|
|
805
|
+
if (!yes)
|
|
806
|
+
return refuse(`no payment yes for ${landed.flow} is live; a person must say yes to the payment first (press the pay button, or spend --grant)`);
|
|
807
|
+
const code = await opts.cardCode(new Date(landed.at));
|
|
808
|
+
if (!code)
|
|
809
|
+
throw new Error(`place: ${c.secret} is not available now (the bank's text has not arrived on the phone yet, wait and retry)`);
|
|
810
|
+
await audit(true);
|
|
811
|
+
await hands.think(page);
|
|
812
|
+
await hands.paste(find(c), secret(code), { timeout: 10_000 });
|
|
813
|
+
journalAct(c, (target) => ({
|
|
814
|
+
kind: "input",
|
|
815
|
+
target,
|
|
816
|
+
value: REDACTED,
|
|
817
|
+
redacted: true,
|
|
818
|
+
secret: c.secret,
|
|
819
|
+
}));
|
|
820
|
+
return { ok: true, secret: c.secret };
|
|
821
|
+
};
|
|
822
|
+
/** After a yes and the click: the page it landed on is the receipt. A failed report never fails the click. */
|
|
823
|
+
const reportSpend = async (spent) => {
|
|
824
|
+
if (!opts.charges)
|
|
825
|
+
return [];
|
|
826
|
+
// Told only once the page says paid or declined: a click that opened a form, or a
|
|
827
|
+
// payment still processing (a captcha, a bank check), is not a charge (five false texts, 2026-09-25).
|
|
828
|
+
let whole = await pageText();
|
|
829
|
+
for (let waited = 0; receiptOutcome(whole) === "unclear" && waited < SETTLE_MS; waited += 3_000) {
|
|
830
|
+
if (stillAsking(whole))
|
|
831
|
+
return [];
|
|
832
|
+
await page.waitForTimeout(3_000);
|
|
833
|
+
whole = await pageText();
|
|
834
|
+
}
|
|
835
|
+
if (receiptOutcome(whole) === "unclear" || stillAsking(whole))
|
|
836
|
+
return [];
|
|
837
|
+
const text = redactText(whole).slice(0, 6_000);
|
|
838
|
+
const png = await page.screenshot({ fullPage: true, timeout: 15_000 }).catch(() => undefined);
|
|
839
|
+
const host = new URL(page.url()).host;
|
|
840
|
+
const kept = placedCard
|
|
841
|
+
? null
|
|
842
|
+
: await (opts.cardsOnFile?.on(host) ?? Promise.resolve(null)).catch(() => null);
|
|
843
|
+
return opts
|
|
844
|
+
.charges({
|
|
845
|
+
at: new Date().toISOString(),
|
|
846
|
+
site: opts.site,
|
|
847
|
+
host,
|
|
848
|
+
url: urlWithoutQuery(page.url()),
|
|
849
|
+
what: spent.what,
|
|
850
|
+
...(spent.amount ? { amount: spent.amount } : {}),
|
|
851
|
+
card: placedCard?.line ??
|
|
852
|
+
(kept
|
|
853
|
+
? `${kept}, the one put on ${host} before`
|
|
854
|
+
: "the card the site keeps (ending not known here)"),
|
|
855
|
+
recurring: placedCard?.recurring ?? RECURRING.test(whole),
|
|
856
|
+
outcome: receiptOutcome(whole),
|
|
857
|
+
}, { text, ...(png ? { png } : {}) }, placedCard?.tell)
|
|
858
|
+
.catch(() => []);
|
|
859
|
+
};
|
|
860
|
+
/** A desktop click that spends (an App Store "Buy") waits for the person the same way; "url" is the app. */
|
|
861
|
+
const gateDesktop = async (a, wait) => {
|
|
862
|
+
if (a.op !== "click")
|
|
863
|
+
return;
|
|
864
|
+
const what = paymentGate("click", { name: a.name, ...(a.role ? { role: a.role } : {}) });
|
|
865
|
+
if (!what)
|
|
866
|
+
return;
|
|
867
|
+
const app = a.app ?? (await desktop.apps())[0] ?? "desktop";
|
|
868
|
+
const there = (await desktop.tree(a.app)).some((n) => n.name === a.name && (!a.role || n.role === a.role));
|
|
869
|
+
if (!there)
|
|
870
|
+
throw new Error(`no ${a.role ?? "control"} "${a.name}" in ${app}`);
|
|
871
|
+
await decide(`os ${JSON.stringify(a)}`, `${what} in ${app}`, `app:${app}`, wait);
|
|
872
|
+
};
|
|
873
|
+
const journalAct = (t, act) => journal(act(toLocatorHints(t.hints)));
|
|
874
|
+
/** What leaves the socket: masked like a transcript, unless the caller asks for raw. */
|
|
875
|
+
const out = (text, raw) => (raw ? text : redactText(text));
|
|
876
|
+
/**
|
|
877
|
+
* One browser, one hand: page commands run one after another, whoever
|
|
878
|
+
* sends them (two clicks in flight would race the same page). Session
|
|
879
|
+
* controls (pause, resume, journal, url, pages, close) answer at once,
|
|
880
|
+
* so a person can stop a long act instead of queueing behind it.
|
|
881
|
+
*/
|
|
882
|
+
const IMMEDIATE = new Set([
|
|
883
|
+
"pause",
|
|
884
|
+
"resume",
|
|
885
|
+
"journal",
|
|
886
|
+
"url",
|
|
887
|
+
"pages",
|
|
888
|
+
"close",
|
|
889
|
+
"goal",
|
|
890
|
+
]);
|
|
891
|
+
let chain = Promise.resolve();
|
|
892
|
+
let lastTouch = now();
|
|
893
|
+
/** The info file's mtime is the last touch: `browsers` reads idle time from it. */
|
|
894
|
+
const touch = () => {
|
|
895
|
+
lastTouch = now();
|
|
896
|
+
try {
|
|
897
|
+
if (infoFile)
|
|
898
|
+
utimesSync(infoFile, new Date(), new Date());
|
|
899
|
+
}
|
|
900
|
+
catch {
|
|
901
|
+
// not written yet, or removed: idle shows from the start
|
|
902
|
+
}
|
|
903
|
+
};
|
|
904
|
+
const run = (c, wait = false) => {
|
|
905
|
+
touch();
|
|
906
|
+
// After a `done`, the next command that works the page (or names a goal) starts the next run.
|
|
907
|
+
if (c.cmd === "goal" || !IMMEDIATE.has(c.cmd))
|
|
908
|
+
openRun();
|
|
909
|
+
if (IMMEDIATE.has(c.cmd))
|
|
910
|
+
return runOne(c, wait);
|
|
911
|
+
const next = chain.then(() => runOne(c, wait));
|
|
912
|
+
chain = next.catch(() => undefined);
|
|
913
|
+
return next;
|
|
914
|
+
};
|
|
915
|
+
/** The page's interactive elements, masked: what a diff compares. */
|
|
916
|
+
const rows = async () => (await snapshotPage(page, 150))
|
|
917
|
+
.split("\n")
|
|
918
|
+
.filter(Boolean)
|
|
919
|
+
.map((r) => redactRow(r));
|
|
920
|
+
const runOne = async (c, wait) => {
|
|
921
|
+
page = fp.page;
|
|
922
|
+
if (IMMEDIATE.has(c.cmd))
|
|
923
|
+
return act(c, wait);
|
|
924
|
+
busy++;
|
|
925
|
+
try {
|
|
926
|
+
const helped = await helpedSince();
|
|
927
|
+
if (history && LOOKED_AT.has(c.cmd))
|
|
928
|
+
lookBefore = await lookAt(page).catch(() => null);
|
|
929
|
+
const out = await looked(c, wait);
|
|
930
|
+
left = { url: page.url(), rows: out.rows ?? left?.rows ?? null };
|
|
931
|
+
return helped && out.answer && typeof out.answer === "object" && !Array.isArray(out.answer)
|
|
932
|
+
? { helped, ...out.answer }
|
|
933
|
+
: out.answer;
|
|
934
|
+
}
|
|
935
|
+
finally {
|
|
936
|
+
busy--;
|
|
937
|
+
quietAt = now() + HAND_GRACE_MS;
|
|
938
|
+
lookBefore = null;
|
|
939
|
+
lookWhenQuiet();
|
|
940
|
+
}
|
|
941
|
+
};
|
|
942
|
+
const looked = async (c, wait) => {
|
|
943
|
+
if (!LOOKS.has(c.cmd))
|
|
944
|
+
return { answer: await act(c, wait), rows: null };
|
|
945
|
+
const before = await rows();
|
|
946
|
+
const out = await act(c, wait);
|
|
947
|
+
page = fp.page;
|
|
948
|
+
const after = await rows();
|
|
949
|
+
return { answer: { ...out, changed: pageChange(before, after) }, rows: after };
|
|
950
|
+
};
|
|
951
|
+
/**
|
|
952
|
+
* What a person did since the agent's last command, once: the count, where
|
|
953
|
+
* the page was and is, and what changed on it. The agent reads this as
|
|
954
|
+
* "someone got me past it": it re-reads the page instead of redoing the step.
|
|
955
|
+
*/
|
|
956
|
+
const helpedSince = async () => {
|
|
957
|
+
if (!helpedActs || paused)
|
|
958
|
+
return null;
|
|
959
|
+
const acts = helpedActs;
|
|
960
|
+
helpedActs = 0;
|
|
961
|
+
journal({ kind: "note", text: `a person did ${acts} act(s) by hand here, unpaused` });
|
|
962
|
+
const now_ = await rows();
|
|
963
|
+
const out = {
|
|
964
|
+
acts,
|
|
965
|
+
...(left ? { from: shortUrl(left.url) } : {}),
|
|
966
|
+
url: shortUrl(page.url()),
|
|
967
|
+
...(left?.rows ? { changed: pageChange(left.rows, now_) } : {}),
|
|
968
|
+
note: "A person acted in the browser since your last command. The page is where they left it: read it, do not redo their step.",
|
|
969
|
+
};
|
|
970
|
+
left = { url: page.url(), rows: now_ };
|
|
971
|
+
return out;
|
|
972
|
+
};
|
|
973
|
+
const act = async (given, wait) => {
|
|
974
|
+
page = fp.page;
|
|
975
|
+
// A mark from the last picture acts, and journals, as the control's own hints.
|
|
976
|
+
const cmd = "hints" in given && given.hints?.mark
|
|
977
|
+
? { ...given, hints: await marks.hints(page, given.hints.mark) }
|
|
978
|
+
: given;
|
|
979
|
+
// A target on no frame that the page lacks is looked for in its iframes (card fields, a
|
|
980
|
+
// bank's challenge). A fill or place gives frames still loading a moment.
|
|
981
|
+
const c = "hints" in cmd && cmd.hints && !cmd.hints.frame
|
|
982
|
+
? {
|
|
983
|
+
...cmd,
|
|
984
|
+
hints: await withFrame(page, cmd.hints, WAITS_FOR_CONTROL.has(cmd.cmd) ? FRAME_MS : 0),
|
|
985
|
+
}
|
|
986
|
+
: cmd;
|
|
987
|
+
switch (c.cmd) {
|
|
988
|
+
case "open": {
|
|
989
|
+
// Through the runner: a login wall is signed through. A captcha comes back as the
|
|
990
|
+
// wall, not an error: a checkbox one is clicked like any control, a puzzle goes to a person.
|
|
991
|
+
try {
|
|
992
|
+
await fp.open(c.url, { allowWall: !opts.login });
|
|
993
|
+
}
|
|
994
|
+
catch (err) {
|
|
995
|
+
if (!(err instanceof NeedsHuman) || (await looksLikeWall(page))?.kind !== "captcha")
|
|
996
|
+
throw err;
|
|
997
|
+
}
|
|
998
|
+
journal({ kind: "navigate" });
|
|
999
|
+
return { url: page.url(), wall: await looksLikeWall(page) };
|
|
1000
|
+
}
|
|
1001
|
+
case "click": {
|
|
1002
|
+
const spent = await gate("click", c, wait);
|
|
1003
|
+
const billing = spent ? await fillBilling() : [];
|
|
1004
|
+
await hands.think(page);
|
|
1005
|
+
await hands.click(find(c), { timeout: 10_000, ...(c.at ? { at: c.at } : {}) });
|
|
1006
|
+
await settle(page);
|
|
1007
|
+
journalAct(c, (target) => ({ kind: "click", target }));
|
|
1008
|
+
// A receipt only for the click that takes money; checkout or "add a card" only led there.
|
|
1009
|
+
const set = billing.length ? { billing } : {};
|
|
1010
|
+
if (spent?.charges)
|
|
1011
|
+
return { url: page.url(), ...set, told: await reportSpend(spent) };
|
|
1012
|
+
return { url: page.url(), ...set };
|
|
1013
|
+
}
|
|
1014
|
+
case "drag": {
|
|
1015
|
+
await hands.think(page);
|
|
1016
|
+
await hands.drag(find(c), c.from, c.to, { timeout: 10_000 });
|
|
1017
|
+
await settle(page);
|
|
1018
|
+
return { url: page.url() };
|
|
1019
|
+
}
|
|
1020
|
+
case "fill": {
|
|
1021
|
+
await gate("fill", c, wait);
|
|
1022
|
+
await hands.think(page);
|
|
1023
|
+
await hands.type(find(c), c.value, { timeout: 10_000 });
|
|
1024
|
+
const secret = looksLikeSecretField(toLocatorHints(c.hints)) || looksLikeSecretValue(c.value);
|
|
1025
|
+
journalAct(c, (target) => ({
|
|
1026
|
+
kind: "input",
|
|
1027
|
+
target,
|
|
1028
|
+
value: secret ? REDACTED : c.value,
|
|
1029
|
+
redacted: secret,
|
|
1030
|
+
}));
|
|
1031
|
+
return { ok: true };
|
|
1032
|
+
}
|
|
1033
|
+
case "place": {
|
|
1034
|
+
const bank = bankCodeSecret(c.secret);
|
|
1035
|
+
if (bank)
|
|
1036
|
+
return placeBankCode(c, bank);
|
|
1037
|
+
const card = cardSecret(c.secret);
|
|
1038
|
+
if (card)
|
|
1039
|
+
return placeCard(c, card, wait);
|
|
1040
|
+
const own = profileSecret(c.secret);
|
|
1041
|
+
const value = own ? await profileValue(c.secret, own) : await sessionSecret(c.secret);
|
|
1042
|
+
const host = new URL(page.url()).host;
|
|
1043
|
+
// A profile field is the person's own, not a site's login: any host may have it.
|
|
1044
|
+
const allowed = !own && opts.secretHosts ? opts.secretHosts(host, c.secret) : true;
|
|
1045
|
+
await opts.audit?.record({
|
|
1046
|
+
at: new Date().toISOString(),
|
|
1047
|
+
credential: opts.site,
|
|
1048
|
+
field: "secret",
|
|
1049
|
+
site: opts.site,
|
|
1050
|
+
url: urlWithoutQuery(page.url()),
|
|
1051
|
+
by: `place ${c.secret}`,
|
|
1052
|
+
allowed,
|
|
1053
|
+
});
|
|
1054
|
+
if (!allowed)
|
|
1055
|
+
throw new SecretLeak(opts.site, host, `${c.secret}`, "a signup that moves to a parent's identity host lists it in SIGNUP_ALSO_HOSTS");
|
|
1056
|
+
await gate("fill", c, wait);
|
|
1057
|
+
await hands.think(page);
|
|
1058
|
+
// A secret arrives whole, as autofill or a password manager puts it; nobody types a minted password.
|
|
1059
|
+
await hands.paste(find(c), value, { timeout: 10_000 });
|
|
1060
|
+
journalAct(c, (target) => ({
|
|
1061
|
+
kind: "input",
|
|
1062
|
+
target,
|
|
1063
|
+
value: REDACTED,
|
|
1064
|
+
redacted: true,
|
|
1065
|
+
secret: c.secret,
|
|
1066
|
+
}));
|
|
1067
|
+
return { ok: true, secret: c.secret };
|
|
1068
|
+
}
|
|
1069
|
+
case "select": {
|
|
1070
|
+
await gate("select", c, wait);
|
|
1071
|
+
await hands.think(page);
|
|
1072
|
+
await chooseOption(find(c), c.value, 10_000, hands);
|
|
1073
|
+
journalAct(c, (target) => ({ kind: "select", target, value: c.value }));
|
|
1074
|
+
return { ok: true };
|
|
1075
|
+
}
|
|
1076
|
+
case "upload": {
|
|
1077
|
+
await fp.act({ kind: "upload", files: await uploadFiles(c.files, wait) }, c.hints, {
|
|
1078
|
+
goal: c.goal ?? "upload",
|
|
1079
|
+
timeoutMs: 10_000,
|
|
1080
|
+
});
|
|
1081
|
+
await settle(page);
|
|
1082
|
+
journalAct(c, (target) => ({ kind: "upload", target, files: c.files }));
|
|
1083
|
+
return { url: page.url() };
|
|
1084
|
+
}
|
|
1085
|
+
case "press": {
|
|
1086
|
+
// Enter or Space on a button is a click: the same gate, the same receipt.
|
|
1087
|
+
const spent = activates(c.key) ? await gate("click", c, wait) : null;
|
|
1088
|
+
const billing = spent ? await fillBilling() : [];
|
|
1089
|
+
await hands.think(page);
|
|
1090
|
+
await hands.press(find(c), c.key, { timeout: 10_000 });
|
|
1091
|
+
await settle(page);
|
|
1092
|
+
journalAct(c, (target) => ({ kind: "press", target, key: c.key }));
|
|
1093
|
+
const set = billing.length ? { billing } : {};
|
|
1094
|
+
if (spent?.charges)
|
|
1095
|
+
return { url: page.url(), ...set, told: await reportSpend(spent) };
|
|
1096
|
+
return { url: page.url(), ...set };
|
|
1097
|
+
}
|
|
1098
|
+
case "type":
|
|
1099
|
+
await hands.type(page, c.text, { timeout: 10_000 });
|
|
1100
|
+
return { ok: true };
|
|
1101
|
+
case "key": {
|
|
1102
|
+
// Enter or Space presses whatever has focus: judged as a click on it.
|
|
1103
|
+
const focused = { ...c, hints: { css: "*:focus" } };
|
|
1104
|
+
const spent = activates(c.key) ? await gate("click", focused, wait) : null;
|
|
1105
|
+
await hands.press(page, c.key, { timeout: 10_000 });
|
|
1106
|
+
await settle(page);
|
|
1107
|
+
if (spent?.charges)
|
|
1108
|
+
return { url: page.url(), told: await reportSpend(spent) };
|
|
1109
|
+
return { url: page.url() };
|
|
1110
|
+
}
|
|
1111
|
+
case "aria": {
|
|
1112
|
+
const tree = await (c.hints
|
|
1113
|
+
? locate(page, c.hints).ariaSnapshot()
|
|
1114
|
+
: ariaWithFrames(page)).catch((e) => `error: ${e.message}`);
|
|
1115
|
+
// Even raw: a password typed into a field is never something a caller may read back.
|
|
1116
|
+
const aria = out(redactAria(tree.slice(0, c.limit ?? 12_000)), c.raw);
|
|
1117
|
+
return c.hints && tree.startsWith("error:")
|
|
1118
|
+
? { aria, hint: 'see the page: {"cmd":"marks"}' }
|
|
1119
|
+
: { aria };
|
|
1120
|
+
}
|
|
1121
|
+
case "snapshot":
|
|
1122
|
+
return {
|
|
1123
|
+
rows: (await snapshotPage(page, c.limit ?? 120))
|
|
1124
|
+
.split("\n")
|
|
1125
|
+
.map((r) => redactRow(r))
|
|
1126
|
+
.join("\n"),
|
|
1127
|
+
};
|
|
1128
|
+
case "text":
|
|
1129
|
+
return {
|
|
1130
|
+
text: out(c.layout === false
|
|
1131
|
+
? await bodyText(page, c.limit ?? 4_000)
|
|
1132
|
+
: await layoutText(page, c.limit ?? 4_000, { coords: c.coords === true }), c.raw),
|
|
1133
|
+
};
|
|
1134
|
+
case "url":
|
|
1135
|
+
return { url: page.url() };
|
|
1136
|
+
case "files": {
|
|
1137
|
+
if (!opts.files)
|
|
1138
|
+
throw new Error("files: none here (they live on the Mac: autobrowse files add)");
|
|
1139
|
+
// A session without sets, or `all`, sees every file: sets are a convenience, not a fence.
|
|
1140
|
+
const files = c.all || !opts.fileSets?.length ? await opts.files.list() : sessionFiles;
|
|
1141
|
+
return {
|
|
1142
|
+
files: files.map(fileLine),
|
|
1143
|
+
sets: Object.keys(await opts.files.sets()),
|
|
1144
|
+
use: 'upload{files:["file:<name>"]}; read_file{name} for a doc\'s text',
|
|
1145
|
+
};
|
|
1146
|
+
}
|
|
1147
|
+
case "read_file": {
|
|
1148
|
+
const by = "read_file";
|
|
1149
|
+
if (!opts.files)
|
|
1150
|
+
throw new Error("read_file: no files here (they live on the Mac: autobrowse files add)");
|
|
1151
|
+
const got = await opts.files.get(c.name);
|
|
1152
|
+
if (!got) {
|
|
1153
|
+
await auditFile(c.name, by, false);
|
|
1154
|
+
throw new Error(`read_file: no file ${c.name} (autobrowse files list)`);
|
|
1155
|
+
}
|
|
1156
|
+
await auditFile(c.name, by, true);
|
|
1157
|
+
const f = got.file;
|
|
1158
|
+
if (f.kind === "paper")
|
|
1159
|
+
return { name: f.name, text: null, why: "no text: an ID document" };
|
|
1160
|
+
if (!f.text)
|
|
1161
|
+
return { name: f.name, text: null, why: "no text: an image or a scan" };
|
|
1162
|
+
const limit = c.limit ?? 40_000;
|
|
1163
|
+
return {
|
|
1164
|
+
name: f.name,
|
|
1165
|
+
note: f.note,
|
|
1166
|
+
text: f.text.slice(0, limit),
|
|
1167
|
+
...(f.text.length > limit ? { more: f.text.length - limit } : {}),
|
|
1168
|
+
};
|
|
1169
|
+
}
|
|
1170
|
+
case "pages":
|
|
1171
|
+
return {
|
|
1172
|
+
pages: page
|
|
1173
|
+
.context()
|
|
1174
|
+
.pages()
|
|
1175
|
+
.map((p, i) => ({ index: i, url: p.url(), active: p === page })),
|
|
1176
|
+
};
|
|
1177
|
+
case "page": {
|
|
1178
|
+
const all = page.context().pages();
|
|
1179
|
+
const next = c.index === "main" ? all[0] : all[c.index];
|
|
1180
|
+
if (!next || next.isClosed())
|
|
1181
|
+
throw new Error(`no open page ${c.index}`);
|
|
1182
|
+
fp.switchTo(next);
|
|
1183
|
+
page = next;
|
|
1184
|
+
// A popup that closes (OAuth done) hands control back to the main page.
|
|
1185
|
+
if (c.index !== "main")
|
|
1186
|
+
next.once("close", () => fp.switchTo(all[0]));
|
|
1187
|
+
return { url: next.url() };
|
|
1188
|
+
}
|
|
1189
|
+
case "screenshot":
|
|
1190
|
+
return { file: await shoot() };
|
|
1191
|
+
case "marks":
|
|
1192
|
+
return takeMarks();
|
|
1193
|
+
case "network":
|
|
1194
|
+
return network(c);
|
|
1195
|
+
case "html":
|
|
1196
|
+
return html(c);
|
|
1197
|
+
case "eval": {
|
|
1198
|
+
// A click by script never meets the click's gate: on a page that shows a spending button,
|
|
1199
|
+
// it needs the same yes first.
|
|
1200
|
+
if (scriptActs(c.js)) {
|
|
1201
|
+
const labels = await page.evaluate(BUTTON_LABELS).catch(() => []);
|
|
1202
|
+
const spend = labels
|
|
1203
|
+
.map((text) => paymentGate("click", { text: text.trim().slice(0, 200) }))
|
|
1204
|
+
.find((w) => w !== null);
|
|
1205
|
+
if (spend)
|
|
1206
|
+
await decide(`eval ${c.js.slice(0, 80)}`, `run a script on a page where it can ${spend.replace(/^press /, "press ")}`, page.url(), wait);
|
|
1207
|
+
}
|
|
1208
|
+
const result = c.hints
|
|
1209
|
+
? await locate(page, c.hints)
|
|
1210
|
+
.first()
|
|
1211
|
+
// A string is an expression to Playwright, never called: wrap it as a function of el.
|
|
1212
|
+
.evaluate(new Function("el", `return (${c.js})(el);`), undefined, {
|
|
1213
|
+
timeout: 10_000,
|
|
1214
|
+
})
|
|
1215
|
+
: await inPage(page, c.js);
|
|
1216
|
+
// A script that clicked or submitted is an act a walk replays; one that only looked is not.
|
|
1217
|
+
if (scriptActs(c.js))
|
|
1218
|
+
journal({
|
|
1219
|
+
kind: "eval",
|
|
1220
|
+
target: c.hints ? toLocatorHints(c.hints) : null,
|
|
1221
|
+
js: c.js,
|
|
1222
|
+
});
|
|
1223
|
+
return { result: typeof result === "string" ? out(result, c.raw) : result };
|
|
1224
|
+
}
|
|
1225
|
+
case "count":
|
|
1226
|
+
return { count: await locateAll(page, c.hints).count() };
|
|
1227
|
+
case "read": {
|
|
1228
|
+
const text = (await find(c).first().innerText({ timeout: 10_000 })).trim().slice(0, 2_000);
|
|
1229
|
+
const shown = out(text, false);
|
|
1230
|
+
journalAct(c, (target) => ({ kind: "read", target, as: c.as, value: shown }));
|
|
1231
|
+
return { as: c.as, text: shown };
|
|
1232
|
+
}
|
|
1233
|
+
case "records": {
|
|
1234
|
+
const key = c.key ?? c.fields[0].key;
|
|
1235
|
+
if (!c.fields.some((f) => f.key === key))
|
|
1236
|
+
throw new Error(`records: key ${key} is not a field`);
|
|
1237
|
+
const base = {
|
|
1238
|
+
as: c.as,
|
|
1239
|
+
goal: c.goal,
|
|
1240
|
+
fields: c.fields,
|
|
1241
|
+
key,
|
|
1242
|
+
...(c.max ? { max: c.max } : {}),
|
|
1243
|
+
};
|
|
1244
|
+
let op;
|
|
1245
|
+
let rows;
|
|
1246
|
+
if (c.code) {
|
|
1247
|
+
op = { kind: "records", ...base, code: c.code, min: 0, sample: [] };
|
|
1248
|
+
({ rows } = await readRecords(fp, op));
|
|
1249
|
+
const problem = checkRows(rows, { fields: c.fields, min: c.min === 0 ? 0 : 1 });
|
|
1250
|
+
if (problem)
|
|
1251
|
+
throw new Error(`records: ${problem}`);
|
|
1252
|
+
op.sample = rows.slice(0, 3);
|
|
1253
|
+
}
|
|
1254
|
+
else {
|
|
1255
|
+
if (!opts.llm)
|
|
1256
|
+
throw new Error("records: send `code`, or set LLM_PROVIDER for a model to write it");
|
|
1257
|
+
const w = await writeRecords({ fp, llm: opts.llm, ...base });
|
|
1258
|
+
if ("error" in w)
|
|
1259
|
+
throw new Error(`records: ${w.error}`);
|
|
1260
|
+
({ op, rows } = w);
|
|
1261
|
+
}
|
|
1262
|
+
op.min = c.min ?? Math.max(1, Math.floor(rows.length / 2));
|
|
1263
|
+
journal({ kind: "records", op });
|
|
1264
|
+
return {
|
|
1265
|
+
as: c.as,
|
|
1266
|
+
rows: rows.length,
|
|
1267
|
+
min: op.min,
|
|
1268
|
+
first: out(JSON.stringify(rows.slice(0, 5)), c.raw),
|
|
1269
|
+
};
|
|
1270
|
+
}
|
|
1271
|
+
case "keep": {
|
|
1272
|
+
if (!opts.sink)
|
|
1273
|
+
throw new Error("keep needs a secret sink (SECRET_SINK / .env)");
|
|
1274
|
+
const value = await textOf(find(c));
|
|
1275
|
+
if (!value)
|
|
1276
|
+
throw new Error("keep: the element is empty");
|
|
1277
|
+
await opts.sink.put(c.env, value);
|
|
1278
|
+
journalAct(c, (target) => ({ kind: "keep", target, env: c.env }));
|
|
1279
|
+
return { env: c.env, length: value.length };
|
|
1280
|
+
}
|
|
1281
|
+
case "captcha": {
|
|
1282
|
+
const got = await fp.captcha();
|
|
1283
|
+
page = fp.page;
|
|
1284
|
+
journal({ kind: "note", text: "solved a captcha here: `await fp.captcha()`" });
|
|
1285
|
+
return got;
|
|
1286
|
+
}
|
|
1287
|
+
case "note":
|
|
1288
|
+
journal({ kind: "note", text: c.text });
|
|
1289
|
+
return { ok: true };
|
|
1290
|
+
case "cut":
|
|
1291
|
+
journal({ kind: "cut", name: c.name });
|
|
1292
|
+
return { ok: true };
|
|
1293
|
+
case "download": {
|
|
1294
|
+
if (!c.url && !c.hints)
|
|
1295
|
+
throw new Error("download: give url or hints");
|
|
1296
|
+
const got = await fetchFile(page, {
|
|
1297
|
+
url: c.url ?? null,
|
|
1298
|
+
hints: c.hints ?? null,
|
|
1299
|
+
});
|
|
1300
|
+
const dir = join(shotsDir, "downloads");
|
|
1301
|
+
mkdirSync(dir, { recursive: true });
|
|
1302
|
+
const file = join(dir, `${c.as}-${got.name}`);
|
|
1303
|
+
writeFileSync(file, got.buffer);
|
|
1304
|
+
journal({
|
|
1305
|
+
kind: "download",
|
|
1306
|
+
target: c.hints ? toLocatorHints(c.hints) : null,
|
|
1307
|
+
href: c.url ?? null,
|
|
1308
|
+
as: c.as,
|
|
1309
|
+
});
|
|
1310
|
+
return { as: c.as, file, bytes: got.buffer.length, type: got.mimeType };
|
|
1311
|
+
}
|
|
1312
|
+
case "goal":
|
|
1313
|
+
logged((h) => h.goal(c.text));
|
|
1314
|
+
return { ok: true, run: history?.id ?? null };
|
|
1315
|
+
case "done": {
|
|
1316
|
+
const id = history && !history.ended() ? history.id : null;
|
|
1317
|
+
await endRun(c.outcome, c.summary ?? null);
|
|
1318
|
+
return { ok: true, run: id };
|
|
1319
|
+
}
|
|
1320
|
+
case "os": {
|
|
1321
|
+
const a = c.act;
|
|
1322
|
+
await gateDesktop(a, wait);
|
|
1323
|
+
const result = await runDesktop(desktop, a, shotsDir, shotN++);
|
|
1324
|
+
// Looking (apps, tree, shot) is not journaled; acts are, with typed secrets hidden.
|
|
1325
|
+
if (a.op !== "apps" && a.op !== "tree" && a.op !== "shot") {
|
|
1326
|
+
const redacted = a.op === "type" && (a.secret === true || looksLikeSecretValue(a.text));
|
|
1327
|
+
journal({
|
|
1328
|
+
kind: "desktop",
|
|
1329
|
+
op: redacted && a.op === "type" ? { ...a, text: REDACTED } : a,
|
|
1330
|
+
redacted,
|
|
1331
|
+
});
|
|
1332
|
+
}
|
|
1333
|
+
return result;
|
|
1334
|
+
}
|
|
1335
|
+
case "pause":
|
|
1336
|
+
paused = true;
|
|
1337
|
+
handActs = 0;
|
|
1338
|
+
if (history)
|
|
1339
|
+
lookBefore = await lookAt(page).catch(() => null);
|
|
1340
|
+
journal({ kind: "pause" });
|
|
1341
|
+
// The page may predate the init script: hook it now.
|
|
1342
|
+
await inPage(page, OBSERVER_SCRIPT).catch(() => undefined);
|
|
1343
|
+
return { paused: true };
|
|
1344
|
+
case "resume": {
|
|
1345
|
+
journal({ kind: "resume" });
|
|
1346
|
+
resume();
|
|
1347
|
+
return { paused: false, handActs };
|
|
1348
|
+
}
|
|
1349
|
+
case "journal":
|
|
1350
|
+
return { total: actions.length, actions: c.last ? actions.slice(-c.last) : actions };
|
|
1351
|
+
case "save": {
|
|
1352
|
+
const rec = {
|
|
1353
|
+
name: c.name,
|
|
1354
|
+
site: opts.site,
|
|
1355
|
+
startedAt,
|
|
1356
|
+
finishedAt: new Date(now()).toISOString(),
|
|
1357
|
+
actions: actions.map((a) => a.screenshot ? { ...a, screenshot: relative(opts.recordingsDir, a.screenshot) } : a),
|
|
1358
|
+
trace: null,
|
|
1359
|
+
terminal: null,
|
|
1360
|
+
commands: [],
|
|
1361
|
+
};
|
|
1362
|
+
const dir = await saveRecording(opts.recordingsDir, rec);
|
|
1363
|
+
saved = true;
|
|
1364
|
+
return { dir, actions: actions.length };
|
|
1365
|
+
}
|
|
1366
|
+
case "batch": {
|
|
1367
|
+
const cmds = c.cmds.map((raw, i) => {
|
|
1368
|
+
const one = commandSchema.safeParse(raw);
|
|
1369
|
+
if (!one.success)
|
|
1370
|
+
throw new Error(`batch[${i}]: ${one.error.message}`);
|
|
1371
|
+
if (UNBATCHABLE.has(one.data.cmd))
|
|
1372
|
+
throw new Error(`batch[${i}]: ${one.data.cmd} cannot be batched`);
|
|
1373
|
+
return one.data;
|
|
1374
|
+
});
|
|
1375
|
+
const before = await rows();
|
|
1376
|
+
const done = [];
|
|
1377
|
+
const answer = async (extra) => {
|
|
1378
|
+
page = fp.page;
|
|
1379
|
+
return { done, ...extra, url: page.url(), changed: pageChange(before, await rows()) };
|
|
1380
|
+
};
|
|
1381
|
+
for (const [i, one] of cmds.entries()) {
|
|
1382
|
+
try {
|
|
1383
|
+
if (history && LOOKED_AT.has(one.cmd))
|
|
1384
|
+
lookBefore = await lookAt(page).catch(() => null);
|
|
1385
|
+
done.push(await act(one, wait));
|
|
1386
|
+
}
|
|
1387
|
+
catch (err) {
|
|
1388
|
+
// A payment gate answers the whole call, as it does a single act.
|
|
1389
|
+
if (err instanceof PaymentGate)
|
|
1390
|
+
throw err;
|
|
1391
|
+
const error = err instanceof Error ? err.message.split("\n")[0] : String(err);
|
|
1392
|
+
const shot = "hints" in one && missed(err) ? await takeMarks().catch(() => null) : null;
|
|
1393
|
+
return answer({
|
|
1394
|
+
failed: { at: i, cmd: one.cmd, error },
|
|
1395
|
+
...(shot ? { marks: shot } : {}),
|
|
1396
|
+
});
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1399
|
+
return answer({});
|
|
1400
|
+
}
|
|
1401
|
+
case "close":
|
|
1402
|
+
// Closed on purpose: nothing left to resume, unless asked to keep it.
|
|
1403
|
+
closing = !c.keep;
|
|
1404
|
+
if (c.why) {
|
|
1405
|
+
endedBy = "idle";
|
|
1406
|
+
closedWhy = c.why;
|
|
1407
|
+
}
|
|
1408
|
+
if (opts.journalFile && closing)
|
|
1409
|
+
rmSync(opts.journalFile, { force: true });
|
|
1410
|
+
queueMicrotask(() => finish());
|
|
1411
|
+
return { ok: true };
|
|
1412
|
+
}
|
|
1413
|
+
};
|
|
1414
|
+
const token = randomBytes(16).toString("hex");
|
|
1415
|
+
const server = createServer((req, res) => {
|
|
1416
|
+
if (req.headers.authorization !== `Bearer ${token}`) {
|
|
1417
|
+
res.statusCode = 401;
|
|
1418
|
+
res.end('{"error":"bad or missing bearer token"}');
|
|
1419
|
+
return;
|
|
1420
|
+
}
|
|
1421
|
+
let body = "";
|
|
1422
|
+
req.on("data", (chunk) => {
|
|
1423
|
+
body += chunk;
|
|
1424
|
+
});
|
|
1425
|
+
req.on("end", async () => {
|
|
1426
|
+
res.setHeader("content-type", "application/json");
|
|
1427
|
+
let parsed;
|
|
1428
|
+
try {
|
|
1429
|
+
parsed = commandSchema.parse(JSON.parse(body || "{}"));
|
|
1430
|
+
}
|
|
1431
|
+
catch (err) {
|
|
1432
|
+
res.statusCode = 400;
|
|
1433
|
+
res.end(JSON.stringify({ error: err instanceof Error ? err.message : String(err) }));
|
|
1434
|
+
return;
|
|
1435
|
+
}
|
|
1436
|
+
// `?wait=1`: a payment gate holds the request until the person answers (one request, not a
|
|
1437
|
+
// resend loop); without it the gate answers 202 at once and the same command re-asks.
|
|
1438
|
+
const wait = new URL(req.url ?? "/", "http://x").searchParams.get("wait") === "1";
|
|
1439
|
+
const t = now();
|
|
1440
|
+
try {
|
|
1441
|
+
const answer = await run(parsed, wait);
|
|
1442
|
+
const body = JSON.stringify(parsed.cmd === "url" ? answer : leanUrls(answer));
|
|
1443
|
+
counted(parsed, t, null, body.length);
|
|
1444
|
+
res.end(body);
|
|
1445
|
+
}
|
|
1446
|
+
catch (err) {
|
|
1447
|
+
res.statusCode = err instanceof PaymentGate ? (err.reason === "asked" ? 202 : 403) : 500;
|
|
1448
|
+
const detail = err instanceof Error ? err.message : String(err);
|
|
1449
|
+
const error = detail.split("\n")[0];
|
|
1450
|
+
// A target the page lacks as named: the picture of what it has, numbered to act on.
|
|
1451
|
+
const shot = "hints" in parsed && parsed.hints && missed(err)
|
|
1452
|
+
? await run({ cmd: "marks" }).catch(() => null)
|
|
1453
|
+
: null;
|
|
1454
|
+
const body = JSON.stringify({
|
|
1455
|
+
error,
|
|
1456
|
+
url: shortUrl(page.url()),
|
|
1457
|
+
...(err instanceof PaymentGate ? { gate: err.gate, reason: err.reason } : {}),
|
|
1458
|
+
...(shot ? { marks: shot, hint: 'act on a mark: "hints":{"mark":n}' } : {}),
|
|
1459
|
+
});
|
|
1460
|
+
counted(parsed, t, error ?? "", body.length, detail);
|
|
1461
|
+
res.end(body);
|
|
1462
|
+
}
|
|
1463
|
+
});
|
|
1464
|
+
});
|
|
1465
|
+
await new Promise((resolve) => server.listen(opts.port, "127.0.0.1", resolve));
|
|
1466
|
+
if (opts.tokenFile) {
|
|
1467
|
+
mkdirSync(dirname(opts.tokenFile), { recursive: true, mode: 0o700 });
|
|
1468
|
+
writeFileSync(opts.tokenFile, token, { mode: 0o600 });
|
|
1469
|
+
}
|
|
1470
|
+
const idleMs = (opts.idleMinutes ?? DEFAULT_IDLE_MINUTES) * 60_000;
|
|
1471
|
+
if (infoFile) {
|
|
1472
|
+
// No secret in it: who serves this port, for `autobrowse browsers`. Never idle-closed = held.
|
|
1473
|
+
const info = {
|
|
1474
|
+
port: opts.port,
|
|
1475
|
+
pid: process.pid,
|
|
1476
|
+
site: opts.site,
|
|
1477
|
+
driver: opts.driver ?? "console",
|
|
1478
|
+
held: idleMs === 0,
|
|
1479
|
+
startedAt,
|
|
1480
|
+
};
|
|
1481
|
+
writeFileSync(infoFile, JSON.stringify(info), { mode: 0o600 });
|
|
1482
|
+
}
|
|
1483
|
+
page.context().on("close", () => finish());
|
|
1484
|
+
// A page load is a person (or a popup) still at work.
|
|
1485
|
+
page.context().on("page", (p) => p.on("framenavigated", touch));
|
|
1486
|
+
fp.page.on("framenavigated", touch);
|
|
1487
|
+
const idleCheck = idleMs > 0
|
|
1488
|
+
? setInterval(() => {
|
|
1489
|
+
if (now() - lastTouch >= (paused ? idleMs * 4 : idleMs)) {
|
|
1490
|
+
endedBy = "idle";
|
|
1491
|
+
finish();
|
|
1492
|
+
}
|
|
1493
|
+
}, Math.min(60_000, idleMs))
|
|
1494
|
+
: null;
|
|
1495
|
+
idleCheck?.unref();
|
|
1496
|
+
const ended = done.then(async () => {
|
|
1497
|
+
if (idleCheck)
|
|
1498
|
+
clearInterval(idleCheck);
|
|
1499
|
+
try {
|
|
1500
|
+
writeNet();
|
|
1501
|
+
}
|
|
1502
|
+
catch {
|
|
1503
|
+
// A full disk loses the log, never the close.
|
|
1504
|
+
}
|
|
1505
|
+
server.close();
|
|
1506
|
+
if (opts.tokenFile)
|
|
1507
|
+
rmSync(opts.tokenFile, { force: true });
|
|
1508
|
+
if (infoFile)
|
|
1509
|
+
rmSync(infoFile, { force: true });
|
|
1510
|
+
// A recording saved and then closed is a run that did its job; an idle close or a lost browser resumes.
|
|
1511
|
+
// A person teaching ends by closing the browser: that run did its job too.
|
|
1512
|
+
const closedAs = saved ? "saved" : opts.driver === "person" ? "achieved" : "closed";
|
|
1513
|
+
await endRun(endedBy ?? closedAs, closedWhy, !closing).catch(() => undefined);
|
|
1514
|
+
finishFlow();
|
|
1515
|
+
});
|
|
1516
|
+
openRun();
|
|
1517
|
+
return {
|
|
1518
|
+
port: opts.port,
|
|
1519
|
+
token,
|
|
1520
|
+
exec: async (c) => {
|
|
1521
|
+
const t = now();
|
|
1522
|
+
try {
|
|
1523
|
+
const answer = await run(c, true);
|
|
1524
|
+
counted(c, t, null, JSON.stringify(answer ?? null).length);
|
|
1525
|
+
return answer;
|
|
1526
|
+
}
|
|
1527
|
+
catch (err) {
|
|
1528
|
+
const detail = err instanceof Error ? err.message : String(err);
|
|
1529
|
+
const error = detail.split("\n")[0] ?? "";
|
|
1530
|
+
counted(c, t, error, error.length, detail);
|
|
1531
|
+
throw err;
|
|
1532
|
+
}
|
|
1533
|
+
},
|
|
1534
|
+
paused: () => paused,
|
|
1535
|
+
resumed: () => paused ? new Promise((resolve) => waiters.push(resolve)) : Promise.resolve(),
|
|
1536
|
+
done: ended,
|
|
1537
|
+
resumedFrom,
|
|
1538
|
+
runId: () => (history && !history.ended() ? history.id : null),
|
|
1539
|
+
files: sessionFiles.map(fileLine),
|
|
1540
|
+
};
|
|
1541
|
+
}
|
|
1542
|
+
//# sourceMappingURL=server.js.map
|