@jitsusama/agentic-harness.core 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -0
- package/dist/advisor/charter.d.ts +14 -0
- package/dist/advisor/charter.js +48 -0
- package/dist/advisor/findings.d.ts +43 -0
- package/dist/advisor/findings.js +82 -0
- package/dist/advisor/index.d.ts +24 -0
- package/dist/advisor/index.js +23 -0
- package/dist/advisor/settings.d.ts +16 -0
- package/dist/advisor/settings.js +30 -0
- package/dist/advisor/substantive.d.ts +14 -0
- package/dist/advisor/substantive.js +33 -0
- package/dist/advisor/tools.d.ts +38 -0
- package/dist/advisor/tools.js +202 -0
- package/dist/attribution/commit-hook.d.ts +53 -0
- package/dist/attribution/commit-hook.js +133 -0
- package/dist/attribution/gh-footer.d.ts +27 -0
- package/dist/attribution/gh-footer.js +80 -0
- package/dist/attribution/index.d.ts +11 -0
- package/dist/attribution/index.js +11 -0
- package/dist/attribution/model-name.d.ts +11 -0
- package/dist/attribution/model-name.js +26 -0
- package/dist/bin/attribution.d.ts +36 -0
- package/dist/bin/attribution.js +82 -0
- package/dist/bin/cli.d.ts +14 -0
- package/dist/bin/cli.js +236 -0
- package/dist/bin/gate-deps.d.ts +23 -0
- package/dist/bin/gate-deps.js +61 -0
- package/dist/bin/guardians.d.ts +51 -0
- package/dist/bin/guardians.js +174 -0
- package/dist/bin/memory.d.ts +16 -0
- package/dist/bin/memory.js +81 -0
- package/dist/bin/notes.d.ts +30 -0
- package/dist/bin/notes.js +67 -0
- package/dist/bin/process-exec.d.ts +14 -0
- package/dist/bin/process-exec.js +31 -0
- package/dist/bin/quest.d.ts +38 -0
- package/dist/bin/quest.js +187 -0
- package/dist/bin/slack-auth.d.ts +49 -0
- package/dist/bin/slack-auth.js +107 -0
- package/dist/clock/index.d.ts +46 -0
- package/dist/clock/index.js +72 -0
- package/dist/command/cwd.d.ts +21 -0
- package/dist/command/cwd.js +60 -0
- package/dist/command/edit.d.ts +14 -0
- package/dist/command/edit.js +22 -0
- package/dist/command/flags.d.ts +29 -0
- package/dist/command/flags.js +111 -0
- package/dist/command/index.d.ts +16 -0
- package/dist/command/index.js +12 -0
- package/dist/command/tokenize.d.ts +7 -0
- package/dist/command/tokenize.js +315 -0
- package/dist/command/types.d.ts +66 -0
- package/dist/command/types.js +9 -0
- package/dist/completion/index.d.ts +17 -0
- package/dist/completion/index.js +16 -0
- package/dist/completion/investigate.d.ts +63 -0
- package/dist/completion/investigate.js +198 -0
- package/dist/completion/resolve.d.ts +29 -0
- package/dist/completion/resolve.js +42 -0
- package/dist/completion/side.d.ts +51 -0
- package/dist/completion/side.js +93 -0
- package/dist/completion/types.d.ts +84 -0
- package/dist/completion/types.js +14 -0
- package/dist/exec/exec.d.ts +38 -0
- package/dist/exec/exec.js +51 -0
- package/dist/exec/index.d.ts +8 -0
- package/dist/exec/index.js +8 -0
- package/dist/gate/decision.d.ts +52 -0
- package/dist/gate/decision.js +68 -0
- package/dist/gate/deps.d.ts +14 -0
- package/dist/gate/deps.js +1 -0
- package/dist/gate/index.d.ts +2 -0
- package/dist/gate/index.js +1 -0
- package/dist/git-cli/index.d.ts +47 -0
- package/dist/git-cli/index.js +127 -0
- package/dist/github-cli/command-spec.d.ts +14 -0
- package/dist/github-cli/command-spec.js +18 -0
- package/dist/github-cli/index.d.ts +71 -0
- package/dist/github-cli/index.js +188 -0
- package/dist/google/apis/calendar.d.ts +64 -0
- package/dist/google/apis/calendar.js +297 -0
- package/dist/google/apis/docs.d.ts +29 -0
- package/dist/google/apis/docs.js +154 -0
- package/dist/google/apis/drive.d.ts +46 -0
- package/dist/google/apis/drive.js +189 -0
- package/dist/google/apis/gmail.d.ts +67 -0
- package/dist/google/apis/gmail.js +374 -0
- package/dist/google/apis/index.d.ts +10 -0
- package/dist/google/apis/index.js +10 -0
- package/dist/google/apis/sheets.d.ts +16 -0
- package/dist/google/apis/sheets.js +54 -0
- package/dist/google/apis/slides.d.ts +16 -0
- package/dist/google/apis/slides.js +40 -0
- package/dist/google/auth/browser.d.ts +5 -0
- package/dist/google/auth/browser.js +27 -0
- package/dist/google/auth/credentials.d.ts +26 -0
- package/dist/google/auth/credentials.js +69 -0
- package/dist/google/auth/errors.d.ts +15 -0
- package/dist/google/auth/errors.js +26 -0
- package/dist/google/auth/index.d.ts +12 -0
- package/dist/google/auth/index.js +12 -0
- package/dist/google/auth/oauth-app.d.ts +15 -0
- package/dist/google/auth/oauth-app.js +20 -0
- package/dist/google/auth/oauth.d.ts +46 -0
- package/dist/google/auth/oauth.js +146 -0
- package/dist/google/auth/server.d.ts +13 -0
- package/dist/google/auth/server.js +70 -0
- package/dist/google/auth/setup-instructions.d.ts +16 -0
- package/dist/google/auth/setup-instructions.js +24 -0
- package/dist/google/auth/store.d.ts +19 -0
- package/dist/google/auth/store.js +27 -0
- package/dist/google/index.d.ts +13 -0
- package/dist/google/index.js +12 -0
- package/dist/google/paths.d.ts +17 -0
- package/dist/google/paths.js +28 -0
- package/dist/google/renderers/calendar.d.ts +23 -0
- package/dist/google/renderers/calendar.js +312 -0
- package/dist/google/renderers/drive.d.ts +31 -0
- package/dist/google/renderers/drive.js +214 -0
- package/dist/google/renderers/email.d.ts +16 -0
- package/dist/google/renderers/email.js +130 -0
- package/dist/google/renderers/index.d.ts +8 -0
- package/dist/google/renderers/index.js +8 -0
- package/dist/google/types.d.ts +143 -0
- package/dist/google/types.js +27 -0
- package/dist/governance/distill.d.ts +31 -0
- package/dist/governance/distill.js +78 -0
- package/dist/governance/index.d.ts +11 -0
- package/dist/governance/index.js +10 -0
- package/dist/governance/render.d.ts +13 -0
- package/dist/governance/render.js +23 -0
- package/dist/governance/store.d.ts +32 -0
- package/dist/governance/store.js +102 -0
- package/dist/governance/types.d.ts +19 -0
- package/dist/governance/types.js +9 -0
- package/dist/guardian/index.d.ts +7 -0
- package/dist/guardian/index.js +7 -0
- package/dist/guardian/types.d.ts +37 -0
- package/dist/guardian/types.js +12 -0
- package/dist/internal/github/cli.d.ts +40 -0
- package/dist/internal/github/cli.js +102 -0
- package/dist/internal/guardian/commit-file.d.ts +7 -0
- package/dist/internal/guardian/commit-file.js +36 -0
- package/dist/internal/guardian/commit-format.d.ts +35 -0
- package/dist/internal/guardian/commit-format.js +63 -0
- package/dist/internal/guardian/commit-shell.d.ts +38 -0
- package/dist/internal/guardian/commit-shell.js +134 -0
- package/dist/internal/guardian/history-gate.d.ts +41 -0
- package/dist/internal/guardian/history-gate.js +76 -0
- package/dist/internal/guardian/prose-gate.d.ts +31 -0
- package/dist/internal/guardian/prose-gate.js +50 -0
- package/dist/internal/guardian/redirect-gate.d.ts +41 -0
- package/dist/internal/guardian/redirect-gate.js +114 -0
- package/dist/internal/guardian/section-gate.d.ts +20 -0
- package/dist/internal/guardian/section-gate.js +36 -0
- package/dist/internal/guardian/title-gate.d.ts +20 -0
- package/dist/internal/guardian/title-gate.js +36 -0
- package/dist/internal/json-array.d.ts +11 -0
- package/dist/internal/json-array.js +40 -0
- package/dist/internal/lsp/registry.d.ts +12 -0
- package/dist/internal/lsp/registry.js +16 -0
- package/dist/internal/notes/discovery.d.ts +59 -0
- package/dist/internal/notes/discovery.js +91 -0
- package/dist/internal/notes/frontmatter.d.ts +52 -0
- package/dist/internal/notes/frontmatter.js +163 -0
- package/dist/internal/notes/id.d.ts +42 -0
- package/dist/internal/notes/id.js +80 -0
- package/dist/internal/notes/io.d.ts +25 -0
- package/dist/internal/notes/io.js +51 -0
- package/dist/internal/notes/sanitize.d.ts +19 -0
- package/dist/internal/notes/sanitize.js +35 -0
- package/dist/internal/process-global.d.ts +20 -0
- package/dist/internal/process-global.js +28 -0
- package/dist/internal/quest/alias-index.d.ts +61 -0
- package/dist/internal/quest/alias-index.js +69 -0
- package/dist/internal/quest/append-journey.d.ts +22 -0
- package/dist/internal/quest/append-journey.js +63 -0
- package/dist/internal/quest/bash-write.d.ts +49 -0
- package/dist/internal/quest/bash-write.js +208 -0
- package/dist/internal/quest/dates.d.ts +14 -0
- package/dist/internal/quest/dates.js +20 -0
- package/dist/internal/quest/discovery.d.ts +96 -0
- package/dist/internal/quest/discovery.js +354 -0
- package/dist/internal/quest/fields.d.ts +37 -0
- package/dist/internal/quest/fields.js +94 -0
- package/dist/internal/quest/frontmatter.d.ts +88 -0
- package/dist/internal/quest/frontmatter.js +630 -0
- package/dist/internal/quest/git-signals.d.ts +53 -0
- package/dist/internal/quest/git-signals.js +192 -0
- package/dist/internal/quest/id.d.ts +50 -0
- package/dist/internal/quest/id.js +116 -0
- package/dist/internal/quest/io.d.ts +54 -0
- package/dist/internal/quest/io.js +233 -0
- package/dist/internal/quest/mentions.d.ts +45 -0
- package/dist/internal/quest/mentions.js +70 -0
- package/dist/internal/quest/mutate.d.ts +38 -0
- package/dist/internal/quest/mutate.js +83 -0
- package/dist/internal/quest/process-liveness.d.ts +98 -0
- package/dist/internal/quest/process-liveness.js +216 -0
- package/dist/internal/quest/quest-doc.d.ts +116 -0
- package/dist/internal/quest/quest-doc.js +239 -0
- package/dist/internal/quest/ranking.d.ts +48 -0
- package/dist/internal/quest/ranking.js +114 -0
- package/dist/internal/quest/reopen.d.ts +65 -0
- package/dist/internal/quest/reopen.js +113 -0
- package/dist/internal/quest/resolve-cwd.d.ts +32 -0
- package/dist/internal/quest/resolve-cwd.js +89 -0
- package/dist/internal/quest/sanitize.d.ts +42 -0
- package/dist/internal/quest/sanitize.js +69 -0
- package/dist/internal/quest/scaffold.d.ts +59 -0
- package/dist/internal/quest/scaffold.js +169 -0
- package/dist/internal/quest/scratch.d.ts +27 -0
- package/dist/internal/quest/scratch.js +106 -0
- package/dist/internal/quest/session-liveness.d.ts +125 -0
- package/dist/internal/quest/session-liveness.js +386 -0
- package/dist/internal/quest/session-ownership.d.ts +22 -0
- package/dist/internal/quest/session-ownership.js +100 -0
- package/dist/internal/quest/session-registry.d.ts +221 -0
- package/dist/internal/quest/session-registry.js +266 -0
- package/dist/internal/quest/status.d.ts +10 -0
- package/dist/internal/quest/status.js +15 -0
- package/dist/internal/quest/structural-journal.d.ts +41 -0
- package/dist/internal/quest/structural-journal.js +67 -0
- package/dist/internal/quest/structural.d.ts +43 -0
- package/dist/internal/quest/structural.js +77 -0
- package/dist/internal/quest/toc.d.ts +28 -0
- package/dist/internal/quest/toc.js +90 -0
- package/dist/internal/quest/trees.d.ts +53 -0
- package/dist/internal/quest/trees.js +145 -0
- package/dist/internal/quest/url-fetchers.d.ts +50 -0
- package/dist/internal/quest/url-fetchers.js +97 -0
- package/dist/internal/quest/write-classifier.d.ts +46 -0
- package/dist/internal/quest/write-classifier.js +59 -0
- package/dist/internal/refs/builtins.d.ts +32 -0
- package/dist/internal/refs/builtins.js +179 -0
- package/dist/internal/refs/registry.d.ts +25 -0
- package/dist/internal/refs/registry.js +42 -0
- package/dist/internal/registry/global-symbol-registry.d.ts +37 -0
- package/dist/internal/registry/global-symbol-registry.js +55 -0
- package/dist/internal/review/registry.d.ts +12 -0
- package/dist/internal/review/registry.js +16 -0
- package/dist/internal/sqlite/db.d.ts +16 -0
- package/dist/internal/sqlite/db.js +26 -0
- package/dist/internal/terminal/builtins.d.ts +8 -0
- package/dist/internal/terminal/builtins.js +14 -0
- package/dist/internal/terminal/drivers/fallback.d.ts +8 -0
- package/dist/internal/terminal/drivers/fallback.js +31 -0
- package/dist/internal/terminal/drivers/shared.d.ts +39 -0
- package/dist/internal/terminal/drivers/shared.js +51 -0
- package/dist/internal/terminal/drivers/tmux.d.ts +14 -0
- package/dist/internal/terminal/drivers/tmux.js +88 -0
- package/dist/internal/terminal/drivers/wezterm.d.ts +35 -0
- package/dist/internal/terminal/drivers/wezterm.js +175 -0
- package/dist/internal/terminal/registry.d.ts +12 -0
- package/dist/internal/terminal/registry.js +16 -0
- package/dist/internal/tree/builtins.d.ts +8 -0
- package/dist/internal/tree/builtins.js +10 -0
- package/dist/internal/tree/providers/git-worktree.d.ts +20 -0
- package/dist/internal/tree/providers/git-worktree.js +279 -0
- package/dist/internal/tree/registry.d.ts +12 -0
- package/dist/internal/tree/registry.js +16 -0
- package/dist/lsp/config.d.ts +77 -0
- package/dist/lsp/config.js +154 -0
- package/dist/lsp/external.d.ts +13 -0
- package/dist/lsp/external.js +52 -0
- package/dist/lsp/format.d.ts +11 -0
- package/dist/lsp/format.js +54 -0
- package/dist/lsp/index.d.ts +17 -0
- package/dist/lsp/index.js +16 -0
- package/dist/lsp/offsets.d.ts +22 -0
- package/dist/lsp/offsets.js +51 -0
- package/dist/lsp/registry.d.ts +28 -0
- package/dist/lsp/registry.js +45 -0
- package/dist/lsp/standalone/backend.d.ts +42 -0
- package/dist/lsp/standalone/backend.js +150 -0
- package/dist/lsp/standalone/document.d.ts +45 -0
- package/dist/lsp/standalone/document.js +81 -0
- package/dist/lsp/standalone/server.d.ts +84 -0
- package/dist/lsp/standalone/server.js +521 -0
- package/dist/lsp/types.d.ts +119 -0
- package/dist/lsp/types.js +13 -0
- package/dist/memory/db.d.ts +15 -0
- package/dist/memory/db.js +25 -0
- package/dist/memory/index.d.ts +12 -0
- package/dist/memory/index.js +11 -0
- package/dist/memory/paths.d.ts +19 -0
- package/dist/memory/paths.js +33 -0
- package/dist/memory/scope.d.ts +14 -0
- package/dist/memory/scope.js +22 -0
- package/dist/memory/store.d.ts +12 -0
- package/dist/memory/store.js +146 -0
- package/dist/memory/types.d.ts +80 -0
- package/dist/memory/types.js +6 -0
- package/dist/notes/types.d.ts +50 -0
- package/dist/notes/types.js +23 -0
- package/dist/notes/verbs/create.d.ts +5 -0
- package/dist/notes/verbs/create.js +55 -0
- package/dist/notes/verbs/mutate.d.ts +8 -0
- package/dist/notes/verbs/mutate.js +152 -0
- package/dist/notes/verbs/queries.d.ts +15 -0
- package/dist/notes/verbs/queries.js +116 -0
- package/dist/notes/verbs/reindex.d.ts +12 -0
- package/dist/notes/verbs/reindex.js +35 -0
- package/dist/notes/verbs/shared.d.ts +37 -0
- package/dist/notes/verbs/shared.js +29 -0
- package/dist/observability/index.d.ts +13 -0
- package/dist/observability/index.js +12 -0
- package/dist/observability/recorder.d.ts +50 -0
- package/dist/observability/recorder.js +77 -0
- package/dist/observability/store.d.ts +22 -0
- package/dist/observability/store.js +213 -0
- package/dist/observability/types.d.ts +82 -0
- package/dist/observability/types.js +1 -0
- package/dist/process/index.d.ts +9 -0
- package/dist/process/index.js +9 -0
- package/dist/process/process.d.ts +95 -0
- package/dist/process/process.js +153 -0
- package/dist/prose/block.d.ts +9 -0
- package/dist/prose/block.js +43 -0
- package/dist/prose/detect.d.ts +50 -0
- package/dist/prose/detect.js +217 -0
- package/dist/prose/gate.d.ts +14 -0
- package/dist/prose/gate.js +21 -0
- package/dist/prose/index.d.ts +4 -0
- package/dist/prose/index.js +4 -0
- package/dist/prose/wrap.d.ts +9 -0
- package/dist/prose/wrap.js +47 -0
- package/dist/quest/actions.d.ts +20 -0
- package/dist/quest/actions.js +107 -0
- package/dist/quest/config.d.ts +79 -0
- package/dist/quest/config.js +83 -0
- package/dist/quest/index.d.ts +29 -0
- package/dist/quest/index.js +28 -0
- package/dist/quest/lifecycle.d.ts +365 -0
- package/dist/quest/lifecycle.js +900 -0
- package/dist/quest/lookup.d.ts +243 -0
- package/dist/quest/lookup.js +496 -0
- package/dist/quest/machine.d.ts +48 -0
- package/dist/quest/machine.js +96 -0
- package/dist/quest/render-rows.d.ts +166 -0
- package/dist/quest/render-rows.js +214 -0
- package/dist/quest/state.d.ts +111 -0
- package/dist/quest/state.js +46 -0
- package/dist/quest/types.d.ts +224 -0
- package/dist/quest/types.js +10 -0
- package/dist/quest/verbs/alias.d.ts +9 -0
- package/dist/quest/verbs/alias.js +129 -0
- package/dist/quest/verbs/lifecycle.d.ts +36 -0
- package/dist/quest/verbs/lifecycle.js +407 -0
- package/dist/quest/verbs/queries.d.ts +24 -0
- package/dist/quest/verbs/queries.js +241 -0
- package/dist/quest/verbs/reorder.d.ts +15 -0
- package/dist/quest/verbs/reorder.js +85 -0
- package/dist/quest/verbs/shared.d.ts +63 -0
- package/dist/quest/verbs/shared.js +35 -0
- package/dist/quest/verbs/stage.d.ts +39 -0
- package/dist/quest/verbs/stage.js +506 -0
- package/dist/quest/verbs/structural.d.ts +23 -0
- package/dist/quest/verbs/structural.js +310 -0
- package/dist/quest/verbs/tree-ops.d.ts +20 -0
- package/dist/quest/verbs/tree-ops.js +289 -0
- package/dist/refs/index.d.ts +13 -0
- package/dist/refs/index.js +12 -0
- package/dist/refs/lookup.d.ts +53 -0
- package/dist/refs/lookup.js +102 -0
- package/dist/refs/register.d.ts +34 -0
- package/dist/refs/register.js +44 -0
- package/dist/refs/types.d.ts +81 -0
- package/dist/refs/types.js +17 -0
- package/dist/remote/index.d.ts +9 -0
- package/dist/remote/index.js +9 -0
- package/dist/remote/name.d.ts +22 -0
- package/dist/remote/name.js +30 -0
- package/dist/result/cite.d.ts +84 -0
- package/dist/result/cite.js +127 -0
- package/dist/result/counts.d.ts +15 -0
- package/dist/result/counts.js +17 -0
- package/dist/result/details.d.ts +61 -0
- package/dist/result/details.js +121 -0
- package/dist/result/digest.d.ts +37 -0
- package/dist/result/digest.js +227 -0
- package/dist/result/follow.d.ts +29 -0
- package/dist/result/follow.js +37 -0
- package/dist/result/index.d.ts +26 -0
- package/dist/result/index.js +26 -0
- package/dist/result/listing.d.ts +62 -0
- package/dist/result/listing.js +72 -0
- package/dist/result/location.d.ts +67 -0
- package/dist/result/location.js +125 -0
- package/dist/result/query.d.ts +67 -0
- package/dist/result/query.js +144 -0
- package/dist/result/spill.d.ts +41 -0
- package/dist/result/spill.js +121 -0
- package/dist/result/store.d.ts +83 -0
- package/dist/result/store.js +214 -0
- package/dist/result/view.d.ts +31 -0
- package/dist/result/view.js +38 -0
- package/dist/review/anchor.d.ts +84 -0
- package/dist/review/anchor.js +89 -0
- package/dist/review/ask/agents.d.ts +80 -0
- package/dist/review/ask/agents.js +296 -0
- package/dist/review/ask/anchorable.d.ts +35 -0
- package/dist/review/ask/anchorable.js +76 -0
- package/dist/review/ask/answer.d.ts +54 -0
- package/dist/review/ask/answer.js +209 -0
- package/dist/review/ask/audit.d.ts +71 -0
- package/dist/review/ask/audit.js +158 -0
- package/dist/review/ask/collect.d.ts +41 -0
- package/dist/review/ask/collect.js +82 -0
- package/dist/review/ask/council.d.ts +290 -0
- package/dist/review/ask/council.js +386 -0
- package/dist/review/ask/critique.d.ts +69 -0
- package/dist/review/ask/critique.js +157 -0
- package/dist/review/ask/harvest.d.ts +119 -0
- package/dist/review/ask/harvest.js +409 -0
- package/dist/review/ask/identity.d.ts +93 -0
- package/dist/review/ask/identity.js +134 -0
- package/dist/review/ask/judge.d.ts +37 -0
- package/dist/review/ask/judge.js +140 -0
- package/dist/review/ask/persona.d.ts +84 -0
- package/dist/review/ask/persona.js +127 -0
- package/dist/review/ask/progress.d.ts +117 -0
- package/dist/review/ask/progress.js +137 -0
- package/dist/review/ask/prompt.d.ts +131 -0
- package/dist/review/ask/prompt.js +242 -0
- package/dist/review/ask/roster.d.ts +94 -0
- package/dist/review/ask/roster.js +338 -0
- package/dist/review/ask/run.d.ts +435 -0
- package/dist/review/ask/run.js +340 -0
- package/dist/review/ask/span.d.ts +70 -0
- package/dist/review/ask/span.js +166 -0
- package/dist/review/ask/stack-round.d.ts +66 -0
- package/dist/review/ask/stack-round.js +125 -0
- package/dist/review/ask/start.d.ts +48 -0
- package/dist/review/ask/start.js +118 -0
- package/dist/review/ask/store.d.ts +83 -0
- package/dist/review/ask/store.js +226 -0
- package/dist/review/ask/wire.d.ts +89 -0
- package/dist/review/ask/wire.js +204 -0
- package/dist/review/attach.d.ts +161 -0
- package/dist/review/attach.js +357 -0
- package/dist/review/authoring.d.ts +84 -0
- package/dist/review/authoring.js +203 -0
- package/dist/review/backed.d.ts +90 -0
- package/dist/review/backed.js +168 -0
- package/dist/review/bind.d.ts +75 -0
- package/dist/review/bind.js +223 -0
- package/dist/review/budget.d.ts +133 -0
- package/dist/review/budget.js +278 -0
- package/dist/review/capabilities.d.ts +217 -0
- package/dist/review/capabilities.js +46 -0
- package/dist/review/change.d.ts +155 -0
- package/dist/review/change.js +15 -0
- package/dist/review/checks.d.ts +56 -0
- package/dist/review/checks.js +11 -0
- package/dist/review/config.d.ts +71 -0
- package/dist/review/config.js +125 -0
- package/dist/review/conventions.d.ts +35 -0
- package/dist/review/conventions.js +58 -0
- package/dist/review/conversation.d.ts +98 -0
- package/dist/review/conversation.js +16 -0
- package/dist/review/decided.d.ts +58 -0
- package/dist/review/decided.js +67 -0
- package/dist/review/diff.d.ts +116 -0
- package/dist/review/diff.js +237 -0
- package/dist/review/draft/continuation.d.ts +23 -0
- package/dist/review/draft/continuation.js +32 -0
- package/dist/review/draft/fanout.d.ts +57 -0
- package/dist/review/draft/fanout.js +46 -0
- package/dist/review/draft/handle.d.ts +55 -0
- package/dist/review/draft/handle.js +110 -0
- package/dist/review/draft/plan.d.ts +112 -0
- package/dist/review/draft/plan.js +343 -0
- package/dist/review/draft/publish.d.ts +38 -0
- package/dist/review/draft/publish.js +118 -0
- package/dist/review/draft/render.d.ts +32 -0
- package/dist/review/draft/render.js +100 -0
- package/dist/review/draft/state.d.ts +98 -0
- package/dist/review/draft/state.js +83 -0
- package/dist/review/draft/store.d.ts +33 -0
- package/dist/review/draft/store.js +100 -0
- package/dist/review/elsewhere.d.ts +27 -0
- package/dist/review/elsewhere.js +39 -0
- package/dist/review/engine.d.ts +106 -0
- package/dist/review/engine.js +243 -0
- package/dist/review/events.d.ts +59 -0
- package/dist/review/events.js +35 -0
- package/dist/review/failed.d.ts +46 -0
- package/dist/review/failed.js +56 -0
- package/dist/review/finding.d.ts +81 -0
- package/dist/review/finding.js +85 -0
- package/dist/review/fix.d.ts +147 -0
- package/dist/review/fix.js +175 -0
- package/dist/review/followup.d.ts +84 -0
- package/dist/review/followup.js +123 -0
- package/dist/review/index.d.ts +134 -0
- package/dist/review/index.js +80 -0
- package/dist/review/keys.d.ts +23 -0
- package/dist/review/keys.js +40 -0
- package/dist/review/landing.d.ts +37 -0
- package/dist/review/landing.js +68 -0
- package/dist/review/lenses.d.ts +132 -0
- package/dist/review/lenses.js +430 -0
- package/dist/review/propose-from.d.ts +76 -0
- package/dist/review/propose-from.js +86 -0
- package/dist/review/provider.d.ts +306 -0
- package/dist/review/provider.js +16 -0
- package/dist/review/providers/git/index.d.ts +23 -0
- package/dist/review/providers/git/index.js +214 -0
- package/dist/review/providers/github/authoring.d.ts +22 -0
- package/dist/review/providers/github/authoring.js +350 -0
- package/dist/review/providers/github/claims.d.ts +49 -0
- package/dist/review/providers/github/claims.js +136 -0
- package/dist/review/providers/github/conversation.d.ts +18 -0
- package/dist/review/providers/github/conversation.js +455 -0
- package/dist/review/providers/github/fields.d.ts +30 -0
- package/dist/review/providers/github/fields.js +47 -0
- package/dist/review/providers/github/index.d.ts +15 -0
- package/dist/review/providers/github/index.js +110 -0
- package/dist/review/providers/github/proposals.d.ts +14 -0
- package/dist/review/providers/github/proposals.js +298 -0
- package/dist/review/providers/github/queue.d.ts +46 -0
- package/dist/review/providers/github/queue.js +122 -0
- package/dist/review/providers/github/stacking.d.ts +20 -0
- package/dist/review/providers/github/stacking.js +107 -0
- package/dist/review/queue.d.ts +43 -0
- package/dist/review/queue.js +56 -0
- package/dist/review/reactable.d.ts +93 -0
- package/dist/review/reactable.js +140 -0
- package/dist/review/register.d.ts +52 -0
- package/dist/review/register.js +53 -0
- package/dist/review/resolve.d.ts +58 -0
- package/dist/review/resolve.js +150 -0
- package/dist/review/retarget.d.ts +73 -0
- package/dist/review/retarget.js +82 -0
- package/dist/review/revisited.d.ts +77 -0
- package/dist/review/revisited.js +121 -0
- package/dist/review/stack.d.ts +110 -0
- package/dist/review/stack.js +52 -0
- package/dist/sections/block.d.ts +9 -0
- package/dist/sections/block.js +42 -0
- package/dist/sections/detect.d.ts +31 -0
- package/dist/sections/detect.js +67 -0
- package/dist/sections/gate.d.ts +21 -0
- package/dist/sections/gate.js +22 -0
- package/dist/sections/index.d.ts +5 -0
- package/dist/sections/index.js +5 -0
- package/dist/sections/sanctioned.d.ts +13 -0
- package/dist/sections/sanctioned.js +21 -0
- package/dist/shell/index.d.ts +8 -0
- package/dist/shell/index.js +8 -0
- package/dist/shell/parse.d.ts +125 -0
- package/dist/shell/parse.js +298 -0
- package/dist/slack/api/channels.d.ts +12 -0
- package/dist/slack/api/channels.js +28 -0
- package/dist/slack/api/client.d.ts +94 -0
- package/dist/slack/api/client.js +272 -0
- package/dist/slack/api/files.d.ts +95 -0
- package/dist/slack/api/files.js +223 -0
- package/dist/slack/api/index.d.ts +11 -0
- package/dist/slack/api/index.js +11 -0
- package/dist/slack/api/messages.d.ts +98 -0
- package/dist/slack/api/messages.js +292 -0
- package/dist/slack/api/reactions.d.ts +47 -0
- package/dist/slack/api/reactions.js +50 -0
- package/dist/slack/api/resolve-conversations.d.ts +43 -0
- package/dist/slack/api/resolve-conversations.js +130 -0
- package/dist/slack/api/resolve-messages.d.ts +29 -0
- package/dist/slack/api/resolve-messages.js +93 -0
- package/dist/slack/api/resolve-users.d.ts +27 -0
- package/dist/slack/api/resolve-users.js +73 -0
- package/dist/slack/api/search.d.ts +86 -0
- package/dist/slack/api/search.js +186 -0
- package/dist/slack/api/users.d.ts +12 -0
- package/dist/slack/api/users.js +33 -0
- package/dist/slack/auth/browser-extract.d.ts +33 -0
- package/dist/slack/auth/browser-extract.js +201 -0
- package/dist/slack/auth/browser.d.ts +5 -0
- package/dist/slack/auth/browser.js +25 -0
- package/dist/slack/auth/credentials.d.ts +14 -0
- package/dist/slack/auth/credentials.js +24 -0
- package/dist/slack/auth/errors.d.ts +9 -0
- package/dist/slack/auth/errors.js +19 -0
- package/dist/slack/auth/extract.d.ts +23 -0
- package/dist/slack/auth/extract.js +44 -0
- package/dist/slack/auth/index.d.ts +12 -0
- package/dist/slack/auth/index.js +11 -0
- package/dist/slack/auth/oauth-app.d.ts +11 -0
- package/dist/slack/auth/oauth-app.js +20 -0
- package/dist/slack/auth/oauth.d.ts +31 -0
- package/dist/slack/auth/oauth.js +82 -0
- package/dist/slack/auth/server.d.ts +14 -0
- package/dist/slack/auth/server.js +75 -0
- package/dist/slack/auth/store.d.ts +17 -0
- package/dist/slack/auth/store.js +27 -0
- package/dist/slack/block-message.d.ts +9 -0
- package/dist/slack/block-message.js +30 -0
- package/dist/slack/blocks.d.ts +94 -0
- package/dist/slack/blocks.js +765 -0
- package/dist/slack/content-gate.d.ts +12 -0
- package/dist/slack/content-gate.js +22 -0
- package/dist/slack/detect.d.ts +31 -0
- package/dist/slack/detect.js +125 -0
- package/dist/slack/index.d.ts +18 -0
- package/dist/slack/index.js +17 -0
- package/dist/slack/paths.d.ts +28 -0
- package/dist/slack/paths.js +46 -0
- package/dist/slack/renderers/channel.d.ts +6 -0
- package/dist/slack/renderers/channel.js +27 -0
- package/dist/slack/renderers/index.d.ts +9 -0
- package/dist/slack/renderers/index.js +9 -0
- package/dist/slack/renderers/message.d.ts +21 -0
- package/dist/slack/renderers/message.js +214 -0
- package/dist/slack/renderers/reactions.d.ts +8 -0
- package/dist/slack/renderers/reactions.js +43 -0
- package/dist/slack/renderers/search.d.ts +6 -0
- package/dist/slack/renderers/search.js +39 -0
- package/dist/slack/renderers/user.d.ts +6 -0
- package/dist/slack/renderers/user.js +32 -0
- package/dist/slack/resolvers/cache.d.ts +29 -0
- package/dist/slack/resolvers/cache.js +70 -0
- package/dist/slack/resolvers/conversation-cache.d.ts +42 -0
- package/dist/slack/resolvers/conversation-cache.js +128 -0
- package/dist/slack/resolvers/conversation.d.ts +44 -0
- package/dist/slack/resolvers/conversation.js +229 -0
- package/dist/slack/resolvers/index.d.ts +8 -0
- package/dist/slack/resolvers/index.js +8 -0
- package/dist/slack/resolvers/target.d.ts +19 -0
- package/dist/slack/resolvers/target.js +45 -0
- package/dist/slack/resolvers/url.d.ts +20 -0
- package/dist/slack/resolvers/url.js +22 -0
- package/dist/slack/resolvers/user.d.ts +54 -0
- package/dist/slack/resolvers/user.js +134 -0
- package/dist/slack/types.d.ts +180 -0
- package/dist/slack/types.js +13 -0
- package/dist/tdd/attest.d.ts +21 -0
- package/dist/tdd/attest.js +21 -0
- package/dist/tdd/discipline.d.ts +11 -0
- package/dist/tdd/discipline.js +28 -0
- package/dist/tdd/index.d.ts +14 -0
- package/dist/tdd/index.js +13 -0
- package/dist/tdd/machine.d.ts +48 -0
- package/dist/tdd/machine.js +139 -0
- package/dist/tdd/presentation.d.ts +34 -0
- package/dist/tdd/presentation.js +38 -0
- package/dist/tdd/queries.d.ts +10 -0
- package/dist/tdd/queries.js +22 -0
- package/dist/terminal/index.d.ts +12 -0
- package/dist/terminal/index.js +11 -0
- package/dist/terminal/register.d.ts +21 -0
- package/dist/terminal/register.js +31 -0
- package/dist/terminal/resolve.d.ts +63 -0
- package/dist/terminal/resolve.js +117 -0
- package/dist/terminal/types.d.ts +134 -0
- package/dist/terminal/types.js +19 -0
- package/dist/thinking/index.d.ts +20 -0
- package/dist/thinking/index.js +27 -0
- package/dist/title/block.d.ts +9 -0
- package/dist/title/block.js +32 -0
- package/dist/title/detect.d.ts +25 -0
- package/dist/title/detect.js +154 -0
- package/dist/title/gate.d.ts +19 -0
- package/dist/title/gate.js +21 -0
- package/dist/title/index.d.ts +3 -0
- package/dist/title/index.js +3 -0
- package/dist/tree/index.d.ts +18 -0
- package/dist/tree/index.js +17 -0
- package/dist/tree/register.d.ts +21 -0
- package/dist/tree/register.js +31 -0
- package/dist/tree/resolve.d.ts +20 -0
- package/dist/tree/resolve.js +31 -0
- package/dist/tree/types.d.ts +83 -0
- package/dist/tree/types.js +12 -0
- package/dist/ui/count.d.ts +29 -0
- package/dist/ui/count.js +35 -0
- package/dist/ui/path.d.ts +25 -0
- package/dist/ui/path.js +40 -0
- package/dist/verify/index.d.ts +17 -0
- package/dist/verify/index.js +14 -0
- package/dist/verify/project.d.ts +21 -0
- package/dist/verify/project.js +49 -0
- package/dist/verify/resolve.d.ts +26 -0
- package/dist/verify/resolve.js +27 -0
- package/dist/verify/run.d.ts +31 -0
- package/dist/verify/run.js +145 -0
- package/dist/web/a11y/announcements.d.ts +67 -0
- package/dist/web/a11y/announcements.js +116 -0
- package/dist/web/a11y/budget.d.ts +75 -0
- package/dist/web/a11y/budget.js +97 -0
- package/dist/web/a11y/focus.d.ts +37 -0
- package/dist/web/a11y/focus.js +106 -0
- package/dist/web/a11y/index.d.ts +19 -0
- package/dist/web/a11y/index.js +25 -0
- package/dist/web/a11y/naming.d.ts +23 -0
- package/dist/web/a11y/naming.js +55 -0
- package/dist/web/a11y/outline.d.ts +23 -0
- package/dist/web/a11y/outline.js +42 -0
- package/dist/web/a11y/reading.d.ts +12 -0
- package/dist/web/a11y/reading.js +101 -0
- package/dist/web/a11y/scope.d.ts +23 -0
- package/dist/web/a11y/scope.js +99 -0
- package/dist/web/a11y/states.d.ts +22 -0
- package/dist/web/a11y/states.js +53 -0
- package/dist/web/a11y/tree.d.ts +124 -0
- package/dist/web/a11y/tree.js +269 -0
- package/dist/web/a11y/walk.d.ts +225 -0
- package/dist/web/a11y/walk.js +568 -0
- package/dist/web/a11y/walkprobe.d.ts +44 -0
- package/dist/web/a11y/walkprobe.js +365 -0
- package/dist/web/audit/axe.d.ts +219 -0
- package/dist/web/audit/axe.js +322 -0
- package/dist/web/audit/behind.d.ts +63 -0
- package/dist/web/audit/behind.js +142 -0
- package/dist/web/audit/capture.d.ts +43 -0
- package/dist/web/audit/capture.js +185 -0
- package/dist/web/audit/colour.d.ts +85 -0
- package/dist/web/audit/colour.js +189 -0
- package/dist/web/audit/contrast.d.ts +74 -0
- package/dist/web/audit/contrast.js +104 -0
- package/dist/web/audit/health.d.ts +27 -0
- package/dist/web/audit/health.js +57 -0
- package/dist/web/audit/index.d.ts +22 -0
- package/dist/web/audit/index.js +22 -0
- package/dist/web/audit/pair.d.ts +55 -0
- package/dist/web/audit/pair.js +157 -0
- package/dist/web/audit/probe.d.ts +31 -0
- package/dist/web/audit/probe.js +189 -0
- package/dist/web/audit/report.d.ts +22 -0
- package/dist/web/audit/report.js +250 -0
- package/dist/web/audit/structure.d.ts +126 -0
- package/dist/web/audit/structure.js +595 -0
- package/dist/web/audit/sweep.d.ts +66 -0
- package/dist/web/audit/sweep.js +117 -0
- package/dist/web/audit/target.d.ts +89 -0
- package/dist/web/audit/target.js +168 -0
- package/dist/web/audit/verdict.d.ts +48 -0
- package/dist/web/audit/verdict.js +52 -0
- package/dist/web/audit/visual.d.ts +161 -0
- package/dist/web/audit/visual.js +297 -0
- package/dist/web/browser.d.ts +213 -0
- package/dist/web/browser.js +927 -0
- package/dist/web/compare/images.d.ts +45 -0
- package/dist/web/compare/images.js +101 -0
- package/dist/web/compare/index.d.ts +15 -0
- package/dist/web/compare/index.js +15 -0
- package/dist/web/compare/provenance.d.ts +48 -0
- package/dist/web/compare/provenance.js +86 -0
- package/dist/web/compare/regions.d.ts +78 -0
- package/dist/web/compare/regions.js +211 -0
- package/dist/web/cookies/extract.d.ts +26 -0
- package/dist/web/cookies/extract.js +167 -0
- package/dist/web/cookies/index.d.ts +8 -0
- package/dist/web/cookies/index.js +7 -0
- package/dist/web/cookies/inject.d.ts +13 -0
- package/dist/web/cookies/inject.js +27 -0
- package/dist/web/cookies/setup.d.ts +31 -0
- package/dist/web/cookies/setup.js +94 -0
- package/dist/web/design/index.d.ts +9 -0
- package/dist/web/design/index.js +9 -0
- package/dist/web/design/inventory.d.ts +126 -0
- package/dist/web/design/inventory.js +324 -0
- package/dist/web/design/probe.d.ts +24 -0
- package/dist/web/design/probe.js +88 -0
- package/dist/web/element/actionable.d.ts +34 -0
- package/dist/web/element/actionable.js +48 -0
- package/dist/web/element/animations.d.ts +48 -0
- package/dist/web/element/animations.js +74 -0
- package/dist/web/element/box.d.ts +53 -0
- package/dist/web/element/box.js +58 -0
- package/dist/web/element/hover.d.ts +75 -0
- package/dist/web/element/hover.js +172 -0
- package/dist/web/element/index.d.ts +17 -0
- package/dist/web/element/index.js +17 -0
- package/dist/web/element/listeners.d.ts +72 -0
- package/dist/web/element/listeners.js +98 -0
- package/dist/web/element/measure.d.ts +40 -0
- package/dist/web/element/measure.js +118 -0
- package/dist/web/element/probes.d.ts +108 -0
- package/dist/web/element/probes.js +195 -0
- package/dist/web/element/pseudo.d.ts +51 -0
- package/dist/web/element/pseudo.js +96 -0
- package/dist/web/element/view.d.ts +30 -0
- package/dist/web/element/view.js +117 -0
- package/dist/web/element/visibility.d.ts +42 -0
- package/dist/web/element/visibility.js +67 -0
- package/dist/web/envelope/artifacts.d.ts +23 -0
- package/dist/web/envelope/artifacts.js +45 -0
- package/dist/web/envelope/index.d.ts +9 -0
- package/dist/web/envelope/index.js +9 -0
- package/dist/web/envelope/naming.d.ts +23 -0
- package/dist/web/envelope/naming.js +43 -0
- package/dist/web/envelope/paged.d.ts +42 -0
- package/dist/web/envelope/paged.js +99 -0
- package/dist/web/envelope/sink.d.ts +43 -0
- package/dist/web/envelope/sink.js +67 -0
- package/dist/web/environment/devices.d.ts +65 -0
- package/dist/web/environment/devices.js +82 -0
- package/dist/web/environment/emulation.d.ts +124 -0
- package/dist/web/environment/emulation.js +258 -0
- package/dist/web/environment/index.d.ts +15 -0
- package/dist/web/environment/index.js +15 -0
- package/dist/web/environment/probes.d.ts +18 -0
- package/dist/web/environment/probes.js +40 -0
- package/dist/web/environment/shaping.d.ts +90 -0
- package/dist/web/environment/shaping.js +141 -0
- package/dist/web/environment/status.d.ts +51 -0
- package/dist/web/environment/status.js +109 -0
- package/dist/web/environment/storage.d.ts +55 -0
- package/dist/web/environment/storage.js +142 -0
- package/dist/web/environment/tabs.d.ts +32 -0
- package/dist/web/environment/tabs.js +47 -0
- package/dist/web/environment/view.d.ts +10 -0
- package/dist/web/environment/view.js +42 -0
- package/dist/web/evaluate/index.d.ts +6 -0
- package/dist/web/evaluate/index.js +6 -0
- package/dist/web/evaluate/outcome.d.ts +74 -0
- package/dist/web/evaluate/outcome.js +91 -0
- package/dist/web/evaluate/probe.d.ts +31 -0
- package/dist/web/evaluate/probe.js +303 -0
- package/dist/web/index.d.ts +47 -0
- package/dist/web/index.js +47 -0
- package/dist/web/input/index.d.ts +11 -0
- package/dist/web/input/index.js +11 -0
- package/dist/web/input/keys.d.ts +48 -0
- package/dist/web/input/keys.js +189 -0
- package/dist/web/input/pointer.d.ts +56 -0
- package/dist/web/input/pointer.js +77 -0
- package/dist/web/input/touch.d.ts +61 -0
- package/dist/web/input/touch.js +83 -0
- package/dist/web/mermaid.d.ts +69 -0
- package/dist/web/mermaid.js +223 -0
- package/dist/web/paths.d.ts +16 -0
- package/dist/web/paths.js +27 -0
- package/dist/web/perf/heap.d.ts +42 -0
- package/dist/web/perf/heap.js +73 -0
- package/dist/web/perf/index.d.ts +14 -0
- package/dist/web/perf/index.js +14 -0
- package/dist/web/perf/layers.d.ts +98 -0
- package/dist/web/perf/layers.js +165 -0
- package/dist/web/perf/probe.d.ts +26 -0
- package/dist/web/perf/probe.js +123 -0
- package/dist/web/perf/profile.d.ts +53 -0
- package/dist/web/perf/profile.js +97 -0
- package/dist/web/perf/trace.d.ts +152 -0
- package/dist/web/perf/trace.js +429 -0
- package/dist/web/perf/view.d.ts +6 -0
- package/dist/web/perf/view.js +86 -0
- package/dist/web/perf/vitals.d.ts +141 -0
- package/dist/web/perf/vitals.js +175 -0
- package/dist/web/reader.d.ts +131 -0
- package/dist/web/reader.js +340 -0
- package/dist/web/screenshot.d.ts +50 -0
- package/dist/web/screenshot.js +108 -0
- package/dist/web/search.d.ts +49 -0
- package/dist/web/search.js +137 -0
- package/dist/web/session/artifacts.d.ts +32 -0
- package/dist/web/session/artifacts.js +47 -0
- package/dist/web/session/emulation.d.ts +118 -0
- package/dist/web/session/emulation.js +307 -0
- package/dist/web/session/recording.d.ts +51 -0
- package/dist/web/session/recording.js +64 -0
- package/dist/web/session/settling.d.ts +42 -0
- package/dist/web/session/settling.js +104 -0
- package/dist/web/session/shaping.d.ts +48 -0
- package/dist/web/session/shaping.js +113 -0
- package/dist/web/session/sourcemaps.d.ts +64 -0
- package/dist/web/session/sourcemaps.js +135 -0
- package/dist/web/session/telemetry.d.ts +219 -0
- package/dist/web/session/telemetry.js +486 -0
- package/dist/web/session/wires.d.ts +22 -0
- package/dist/web/session/wires.js +11 -0
- package/dist/web/session.d.ts +1153 -0
- package/dist/web/session.js +3400 -0
- package/dist/web/snapshot/deep.d.ts +36 -0
- package/dist/web/snapshot/deep.js +91 -0
- package/dist/web/snapshot/flatten.d.ts +101 -0
- package/dist/web/snapshot/flatten.js +131 -0
- package/dist/web/snapshot/index.d.ts +8 -0
- package/dist/web/snapshot/index.js +10 -0
- package/dist/web/snapshot/presented.d.ts +32 -0
- package/dist/web/snapshot/presented.js +74 -0
- package/dist/web/snapshot/query.d.ts +67 -0
- package/dist/web/snapshot/query.js +136 -0
- package/dist/web/sourcemap/index.d.ts +9 -0
- package/dist/web/sourcemap/index.js +9 -0
- package/dist/web/sourcemap/mappings.d.ts +111 -0
- package/dist/web/sourcemap/mappings.js +218 -0
- package/dist/web/styles/capture.d.ts +49 -0
- package/dist/web/styles/capture.js +85 -0
- package/dist/web/styles/cascade.d.ts +107 -0
- package/dist/web/styles/cascade.js +275 -0
- package/dist/web/styles/curation.d.ts +45 -0
- package/dist/web/styles/curation.js +282 -0
- package/dist/web/styles/index.d.ts +10 -0
- package/dist/web/styles/index.js +10 -0
- package/dist/web/target/index.d.ts +7 -0
- package/dist/web/target/index.js +7 -0
- package/dist/web/target/refusals.d.ts +59 -0
- package/dist/web/target/refusals.js +305 -0
- package/dist/web/target/target.d.ts +59 -0
- package/dist/web/target/target.js +94 -0
- package/dist/web/telemetry/buffer.d.ts +35 -0
- package/dist/web/telemetry/buffer.js +72 -0
- package/dist/web/telemetry/console.d.ts +127 -0
- package/dist/web/telemetry/console.js +217 -0
- package/dist/web/telemetry/dialogs.d.ts +41 -0
- package/dist/web/telemetry/dialogs.js +38 -0
- package/dist/web/telemetry/downloads.d.ts +42 -0
- package/dist/web/telemetry/downloads.js +65 -0
- package/dist/web/telemetry/failure.d.ts +31 -0
- package/dist/web/telemetry/failure.js +72 -0
- package/dist/web/telemetry/har.d.ts +97 -0
- package/dist/web/telemetry/har.js +227 -0
- package/dist/web/telemetry/index.d.ts +18 -0
- package/dist/web/telemetry/index.js +18 -0
- package/dist/web/telemetry/lifecycle.d.ts +69 -0
- package/dist/web/telemetry/lifecycle.js +120 -0
- package/dist/web/telemetry/network.d.ts +152 -0
- package/dist/web/telemetry/network.js +130 -0
- package/dist/web/telemetry/requests.d.ts +31 -0
- package/dist/web/telemetry/requests.js +119 -0
- package/dist/web/telemetry/sockets.d.ts +56 -0
- package/dist/web/telemetry/sockets.js +101 -0
- package/dist/web/telemetry/view.d.ts +16 -0
- package/dist/web/telemetry/view.js +125 -0
- package/dist/web/wait/conditions.d.ts +87 -0
- package/dist/web/wait/conditions.js +100 -0
- package/dist/web/wait/index.d.ts +6 -0
- package/dist/web/wait/index.js +6 -0
- package/dist/web/wait/settle.d.ts +54 -0
- package/dist/web/wait/settle.js +84 -0
- package/dist/work/ask.d.ts +45 -0
- package/dist/work/ask.js +85 -0
- package/dist/work/author.d.ts +61 -0
- package/dist/work/author.js +144 -0
- package/dist/work/broker.d.ts +151 -0
- package/dist/work/broker.js +165 -0
- package/dist/work/events.d.ts +98 -0
- package/dist/work/events.js +57 -0
- package/dist/work/history.d.ts +69 -0
- package/dist/work/history.js +174 -0
- package/dist/work/index.d.ts +49 -0
- package/dist/work/index.js +33 -0
- package/dist/work/inplay.d.ts +43 -0
- package/dist/work/inplay.js +42 -0
- package/dist/work/memory.d.ts +84 -0
- package/dist/work/memory.js +203 -0
- package/dist/work/objection.d.ts +92 -0
- package/dist/work/objection.js +72 -0
- package/dist/work/provider.d.ts +79 -0
- package/dist/work/provider.js +45 -0
- package/dist/work/providers/git.d.ts +29 -0
- package/dist/work/providers/git.js +87 -0
- package/dist/work/publish.d.ts +53 -0
- package/dist/work/publish.js +139 -0
- package/dist/work/rebase.d.ts +78 -0
- package/dist/work/rebase.js +261 -0
- package/dist/work/reclaim.d.ts +56 -0
- package/dist/work/reclaim.js +52 -0
- package/dist/work/register.d.ts +29 -0
- package/dist/work/register.js +41 -0
- package/dist/work/stack.d.ts +126 -0
- package/dist/work/stack.js +243 -0
- package/dist/work/stacks.d.ts +156 -0
- package/dist/work/stacks.js +524 -0
- package/dist/work/survey.d.ts +52 -0
- package/dist/work/survey.js +58 -0
- package/dist/work/tidy.d.ts +147 -0
- package/dist/work/tidy.js +136 -0
- package/dist/work/tree.d.ts +120 -0
- package/dist/work/tree.js +69 -0
- package/dist/work/unattended.d.ts +40 -0
- package/dist/work/unattended.js +57 -0
- package/package.json +145 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bending the network under the page.
|
|
3
|
+
*
|
|
4
|
+
* Two different needs share this module. Mocking and blocking
|
|
5
|
+
* answer "what does this page do when that request returns
|
|
6
|
+
* something else, or nothing at all", which is the only honest
|
|
7
|
+
* way to see an error path that a healthy server never
|
|
8
|
+
* produces. Throttling answers "what is this like on a train".
|
|
9
|
+
*/
|
|
10
|
+
/** What to do with a request that matches. */
|
|
11
|
+
export type ShapeAction = "mock" | "block";
|
|
12
|
+
/** One instruction about a family of requests. */
|
|
13
|
+
export interface NetworkRule {
|
|
14
|
+
readonly pattern: string;
|
|
15
|
+
readonly action: ShapeAction;
|
|
16
|
+
/** For a mock: the status to answer with. Defaults to 200. */
|
|
17
|
+
readonly status?: number;
|
|
18
|
+
/** For a mock: the body to answer with. */
|
|
19
|
+
readonly body?: string;
|
|
20
|
+
/** For a mock: what the body is. */
|
|
21
|
+
readonly contentType?: string;
|
|
22
|
+
/** For a block: the reason Chrome should report. */
|
|
23
|
+
readonly reason?: string;
|
|
24
|
+
}
|
|
25
|
+
/** How fast the network should pretend to be. */
|
|
26
|
+
export interface ThrottleConditions {
|
|
27
|
+
readonly offline: boolean;
|
|
28
|
+
/** Bytes per second down, 0 meaning no limit. */
|
|
29
|
+
readonly download: number;
|
|
30
|
+
/** Bytes per second up, 0 meaning no limit. */
|
|
31
|
+
readonly upload: number;
|
|
32
|
+
/** Round trip milliseconds added to every request. */
|
|
33
|
+
readonly latency: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The profiles Chrome's own devtools ships.
|
|
37
|
+
*
|
|
38
|
+
* Written as the expressions from its source rather than as
|
|
39
|
+
* the products, so the derivation stays checkable: a datasheet
|
|
40
|
+
* bandwidth, a loss factor, and a round trip multiplied to
|
|
41
|
+
* account for the several trips a real request makes. Chrome
|
|
42
|
+
* renamed "Fast 3G" to "Slow 4G" in 2024, and both names are
|
|
43
|
+
* accepted so neither vocabulary is wrong here.
|
|
44
|
+
*/
|
|
45
|
+
export declare const THROTTLE_PROFILES: Readonly<Record<string, ThrottleConditions>>;
|
|
46
|
+
/** A named profile, under either the current or the old name. */
|
|
47
|
+
export declare function throttleProfile(name: string): ThrottleConditions | undefined;
|
|
48
|
+
/** Every profile name that can be asked for. */
|
|
49
|
+
export declare function throttleNames(): readonly string[];
|
|
50
|
+
/**
|
|
51
|
+
* The conditions a caller means, named or spelled out.
|
|
52
|
+
*
|
|
53
|
+
* A profile name is the natural thing to write and was the one
|
|
54
|
+
* thing that did not work: passed a name, the library read the
|
|
55
|
+
* fields it wanted off a string, found nothing, and shaped
|
|
56
|
+
* nothing. A navigation then came back 200 while the caller
|
|
57
|
+
* believed the network was offline, which is the worst kind of
|
|
58
|
+
* quiet failure because the test appears to have run.
|
|
59
|
+
*
|
|
60
|
+
* Throws on a name that is not a profile. A caller who names a
|
|
61
|
+
* network that does not exist cannot be given one, and continuing
|
|
62
|
+
* at full speed would misreport whatever they measure next.
|
|
63
|
+
*/
|
|
64
|
+
export declare function resolveThrottle(value: ThrottleConditions | string): ThrottleConditions;
|
|
65
|
+
/**
|
|
66
|
+
* Whether a url answers to a pattern.
|
|
67
|
+
*
|
|
68
|
+
* Patterns are globs because that is what the protocol's own
|
|
69
|
+
* request interception uses, so one vocabulary covers both what
|
|
70
|
+
* we match locally and what we ask Chrome to intercept.
|
|
71
|
+
*
|
|
72
|
+
* Both arguments are strings and transposing them is silent, so
|
|
73
|
+
* they are named rather than positional. That is not a
|
|
74
|
+
* hypothetical: the first caller outside this file passed them
|
|
75
|
+
* the wrong way round and got a confident false.
|
|
76
|
+
*/
|
|
77
|
+
export declare function matchesPattern({ pattern, url, }: {
|
|
78
|
+
pattern: string;
|
|
79
|
+
url: string;
|
|
80
|
+
}): boolean;
|
|
81
|
+
/**
|
|
82
|
+
* The rule that governs a url, or none.
|
|
83
|
+
*
|
|
84
|
+
* First match wins, in the order the rules were given, so a
|
|
85
|
+
* caller can put a specific exception ahead of a general rule
|
|
86
|
+
* and have it hold.
|
|
87
|
+
*/
|
|
88
|
+
export declare function ruleFor(rules: readonly NetworkRule[], url: string): NetworkRule | undefined;
|
|
89
|
+
/** What the network is currently being made to do. */
|
|
90
|
+
export declare function renderShaping(rules: readonly NetworkRule[], throttle: ThrottleConditions | undefined): string;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bending the network under the page.
|
|
3
|
+
*
|
|
4
|
+
* Two different needs share this module. Mocking and blocking
|
|
5
|
+
* answer "what does this page do when that request returns
|
|
6
|
+
* something else, or nothing at all", which is the only honest
|
|
7
|
+
* way to see an error path that a healthy server never
|
|
8
|
+
* produces. Throttling answers "what is this like on a train".
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* The profiles Chrome's own devtools ships.
|
|
12
|
+
*
|
|
13
|
+
* Written as the expressions from its source rather than as
|
|
14
|
+
* the products, so the derivation stays checkable: a datasheet
|
|
15
|
+
* bandwidth, a loss factor, and a round trip multiplied to
|
|
16
|
+
* account for the several trips a real request makes. Chrome
|
|
17
|
+
* renamed "Fast 3G" to "Slow 4G" in 2024, and both names are
|
|
18
|
+
* accepted so neither vocabulary is wrong here.
|
|
19
|
+
*/
|
|
20
|
+
export const THROTTLE_PROFILES = {
|
|
21
|
+
offline: { offline: true, download: 0, upload: 0, latency: 0 },
|
|
22
|
+
"slow-3g": {
|
|
23
|
+
offline: false,
|
|
24
|
+
download: ((500 * 1000) / 8) * 0.8,
|
|
25
|
+
upload: ((500 * 1000) / 8) * 0.8,
|
|
26
|
+
latency: 400 * 5,
|
|
27
|
+
},
|
|
28
|
+
"slow-4g": {
|
|
29
|
+
offline: false,
|
|
30
|
+
download: ((1.6 * 1000 * 1000) / 8) * 0.9,
|
|
31
|
+
upload: ((750 * 1000) / 8) * 0.9,
|
|
32
|
+
latency: 150 * 3.75,
|
|
33
|
+
},
|
|
34
|
+
"fast-4g": {
|
|
35
|
+
offline: false,
|
|
36
|
+
download: ((9 * 1000 * 1000) / 8) * 0.9,
|
|
37
|
+
upload: ((1.5 * 1000 * 1000) / 8) * 0.9,
|
|
38
|
+
latency: 60 * 2.75,
|
|
39
|
+
},
|
|
40
|
+
none: { offline: false, download: 0, upload: 0, latency: 0 },
|
|
41
|
+
};
|
|
42
|
+
/** The name Chrome used before 2024, kept so it still works. */
|
|
43
|
+
const PROFILE_ALIASES = {
|
|
44
|
+
"fast-3g": "slow-4g",
|
|
45
|
+
"3g": "slow-3g",
|
|
46
|
+
"4g": "fast-4g",
|
|
47
|
+
};
|
|
48
|
+
/** A named profile, under either the current or the old name. */
|
|
49
|
+
export function throttleProfile(name) {
|
|
50
|
+
const key = name.toLowerCase();
|
|
51
|
+
return THROTTLE_PROFILES[PROFILE_ALIASES[key] ?? key];
|
|
52
|
+
}
|
|
53
|
+
/** Every profile name that can be asked for. */
|
|
54
|
+
export function throttleNames() {
|
|
55
|
+
return Object.keys(THROTTLE_PROFILES);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* The conditions a caller means, named or spelled out.
|
|
59
|
+
*
|
|
60
|
+
* A profile name is the natural thing to write and was the one
|
|
61
|
+
* thing that did not work: passed a name, the library read the
|
|
62
|
+
* fields it wanted off a string, found nothing, and shaped
|
|
63
|
+
* nothing. A navigation then came back 200 while the caller
|
|
64
|
+
* believed the network was offline, which is the worst kind of
|
|
65
|
+
* quiet failure because the test appears to have run.
|
|
66
|
+
*
|
|
67
|
+
* Throws on a name that is not a profile. A caller who names a
|
|
68
|
+
* network that does not exist cannot be given one, and continuing
|
|
69
|
+
* at full speed would misreport whatever they measure next.
|
|
70
|
+
*/
|
|
71
|
+
export function resolveThrottle(value) {
|
|
72
|
+
if (typeof value !== "string")
|
|
73
|
+
return value;
|
|
74
|
+
const profile = throttleProfile(value);
|
|
75
|
+
if (!profile) {
|
|
76
|
+
throw new Error(`No network profile named '${value}'. ` +
|
|
77
|
+
`Try one of ${throttleNames().join(", ")}, or give the ` +
|
|
78
|
+
"conditions directly.");
|
|
79
|
+
}
|
|
80
|
+
return profile;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Whether a url answers to a pattern.
|
|
84
|
+
*
|
|
85
|
+
* Patterns are globs because that is what the protocol's own
|
|
86
|
+
* request interception uses, so one vocabulary covers both what
|
|
87
|
+
* we match locally and what we ask Chrome to intercept.
|
|
88
|
+
*
|
|
89
|
+
* Both arguments are strings and transposing them is silent, so
|
|
90
|
+
* they are named rather than positional. That is not a
|
|
91
|
+
* hypothetical: the first caller outside this file passed them
|
|
92
|
+
* the wrong way round and got a confident false.
|
|
93
|
+
*/
|
|
94
|
+
export function matchesPattern({ pattern, url, }) {
|
|
95
|
+
if (pattern === "*")
|
|
96
|
+
return true;
|
|
97
|
+
const expression = pattern
|
|
98
|
+
// Escape everything a regular expression would read, then
|
|
99
|
+
// give the star back its meaning.
|
|
100
|
+
.replace(/[.+?^${}()|[\]\\]/g, "\\$&")
|
|
101
|
+
.replace(/\*/g, ".*");
|
|
102
|
+
return new RegExp(`^${expression}$`).test(url) || url.includes(pattern);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* The rule that governs a url, or none.
|
|
106
|
+
*
|
|
107
|
+
* First match wins, in the order the rules were given, so a
|
|
108
|
+
* caller can put a specific exception ahead of a general rule
|
|
109
|
+
* and have it hold.
|
|
110
|
+
*/
|
|
111
|
+
export function ruleFor(rules, url) {
|
|
112
|
+
return rules.find((rule) => matchesPattern({ pattern: rule.pattern, url }));
|
|
113
|
+
}
|
|
114
|
+
/** What the network is currently being made to do. */
|
|
115
|
+
export function renderShaping(rules, throttle) {
|
|
116
|
+
const lines = [];
|
|
117
|
+
if (throttle?.offline) {
|
|
118
|
+
lines.push("The network is offline.");
|
|
119
|
+
}
|
|
120
|
+
else if (throttle && (throttle.latency > 0 || throttle.download > 0)) {
|
|
121
|
+
lines.push(`Throttled to ${Math.round(throttle.download / 1024)} KB/s down, ` +
|
|
122
|
+
`${Math.round(throttle.upload / 1024)} KB/s up, ` +
|
|
123
|
+
`${Math.round(throttle.latency)}ms latency.`);
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
lines.push("The network is unshaped.");
|
|
127
|
+
}
|
|
128
|
+
if (rules.length === 0) {
|
|
129
|
+
lines.push("No requests are being mocked or blocked.");
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
lines.push("", "Rules, first match winning:");
|
|
133
|
+
for (const rule of rules) {
|
|
134
|
+
lines.push(rule.action === "block"
|
|
135
|
+
? ` block ${rule.pattern}`
|
|
136
|
+
: ` mock ${rule.pattern} -> ${rule.status ?? 200}` +
|
|
137
|
+
`${rule.contentType ? ` ${rule.contentType}` : ""}`);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return lines.join("\n");
|
|
141
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where a session stands.
|
|
3
|
+
*
|
|
4
|
+
* Everything a session accumulates is invisible until asked
|
|
5
|
+
* for: what it is pretending to be, what it has intercepted,
|
|
6
|
+
* how much it has recorded, and how far each buffer has been
|
|
7
|
+
* read. Coming back to a session after doing something else and
|
|
8
|
+
* having to guess at any of that is how a reading gets
|
|
9
|
+
* misattributed to the wrong page.
|
|
10
|
+
*/
|
|
11
|
+
import type { DialogPolicy, LifecycleEvent } from "../telemetry/index.js";
|
|
12
|
+
import type { Divergence, EmulationState } from "./emulation.js";
|
|
13
|
+
import type { NetworkRule, ThrottleConditions } from "./shaping.js";
|
|
14
|
+
/** Everything worth knowing about a session at a glance. */
|
|
15
|
+
export interface SessionStatus {
|
|
16
|
+
readonly name: string;
|
|
17
|
+
readonly url: string;
|
|
18
|
+
readonly title: string;
|
|
19
|
+
readonly emulation: EmulationState;
|
|
20
|
+
/** Where the page disagrees with what is being emulated. */
|
|
21
|
+
readonly gaps?: readonly Divergence[];
|
|
22
|
+
readonly rules: readonly NetworkRule[];
|
|
23
|
+
readonly throttle?: ThrottleConditions;
|
|
24
|
+
readonly dialogPolicy: DialogPolicy;
|
|
25
|
+
readonly dialogsSeen: number;
|
|
26
|
+
readonly logs: {
|
|
27
|
+
readonly count: number;
|
|
28
|
+
readonly cursor: number;
|
|
29
|
+
};
|
|
30
|
+
readonly announcements: {
|
|
31
|
+
readonly count: number;
|
|
32
|
+
readonly cursor: number;
|
|
33
|
+
};
|
|
34
|
+
readonly requests: {
|
|
35
|
+
readonly count: number;
|
|
36
|
+
readonly failed: number;
|
|
37
|
+
};
|
|
38
|
+
readonly history: readonly LifecycleEvent[];
|
|
39
|
+
readonly artifacts: readonly string[];
|
|
40
|
+
/**
|
|
41
|
+
* A trace being recorded anywhere in the browser.
|
|
42
|
+
*
|
|
43
|
+
* Reported by every session rather than only the one that
|
|
44
|
+
* started it, because tracing instruments every page and a
|
|
45
|
+
* reader wondering why theirs is slow should find the reason
|
|
46
|
+
* here instead of hunting for it.
|
|
47
|
+
*/
|
|
48
|
+
readonly recording?: string;
|
|
49
|
+
}
|
|
50
|
+
/** The session, in one reading. */
|
|
51
|
+
export declare function renderStatus(status: SessionStatus): string;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where a session stands.
|
|
3
|
+
*
|
|
4
|
+
* Everything a session accumulates is invisible until asked
|
|
5
|
+
* for: what it is pretending to be, what it has intercepted,
|
|
6
|
+
* how much it has recorded, and how far each buffer has been
|
|
7
|
+
* read. Coming back to a session after doing something else and
|
|
8
|
+
* having to guess at any of that is how a reading gets
|
|
9
|
+
* misattributed to the wrong page.
|
|
10
|
+
*/
|
|
11
|
+
/** How many recent navigations are worth recalling. */
|
|
12
|
+
const RECENT_HISTORY = 5;
|
|
13
|
+
/** The session, in one reading. */
|
|
14
|
+
export function renderStatus(status) {
|
|
15
|
+
const lines = [
|
|
16
|
+
`Session '${status.name}'`,
|
|
17
|
+
` at ${status.url || "nowhere yet"}`,
|
|
18
|
+
...(status.title ? [` titled ${status.title}`] : []),
|
|
19
|
+
"",
|
|
20
|
+
` ${status.logs.count} log entries, cursor ${status.logs.cursor}`,
|
|
21
|
+
` ${status.requests.count} requests${status.requests.failed > 0 ? `, ${status.requests.failed} failed` : ""}`,
|
|
22
|
+
` ${status.announcements.count} announcements, cursor ` +
|
|
23
|
+
`${status.announcements.cursor}`,
|
|
24
|
+
];
|
|
25
|
+
const pretending = describeEmulation(status.emulation);
|
|
26
|
+
if (pretending)
|
|
27
|
+
lines.push("", ` pretending: ${pretending}`);
|
|
28
|
+
// Only ever claimed with the page's agreement.
|
|
29
|
+
//
|
|
30
|
+
// An override sent to a renderer that a navigation then replaced
|
|
31
|
+
// goes nowhere, and Chrome gives no signal when that happens. It
|
|
32
|
+
// is now applied again on arrival and checked against the page,
|
|
33
|
+
// which fixes nearly every case, but a browser that loses it
|
|
34
|
+
// anyway must not be described as a phone: reading "pretending:
|
|
35
|
+
// iPhone 15 Pro" while the page cannot detect a touch screen is
|
|
36
|
+
// how a tester concludes a site is broken on mobile when it is
|
|
37
|
+
// the tool that is wrong. So the claim carries the page's answer
|
|
38
|
+
// with it, and the reader is told which part did not take.
|
|
39
|
+
for (const gap of status.gaps ?? []) {
|
|
40
|
+
lines.push(` not landed: ${gap.what} is ${gap.observed}`);
|
|
41
|
+
}
|
|
42
|
+
if (status.throttle?.offline) {
|
|
43
|
+
lines.push(" network: offline");
|
|
44
|
+
}
|
|
45
|
+
else if (status.throttle && status.throttle.latency > 0) {
|
|
46
|
+
lines.push(` network: throttled, ${status.throttle.latency}ms latency`);
|
|
47
|
+
}
|
|
48
|
+
if (status.recording)
|
|
49
|
+
lines.push(` ${status.recording}`);
|
|
50
|
+
if (status.rules.length > 0) {
|
|
51
|
+
lines.push(` intercepting: ${status.rules
|
|
52
|
+
.map((rule) => `${rule.action} ${rule.pattern}`)
|
|
53
|
+
.join(", ")}`);
|
|
54
|
+
}
|
|
55
|
+
lines.push(` dialogs: ${status.dialogPolicy.accept ? "accepted" : "dismissed"}` +
|
|
56
|
+
`${status.dialogsSeen > 0 ? `, ${status.dialogsSeen} so far` : ""}`);
|
|
57
|
+
// A crash divides the session in two, so it is worth seeing
|
|
58
|
+
// without having to ask for the history separately.
|
|
59
|
+
const crashes = status.history.filter((event) => event.kind === "crashed").length;
|
|
60
|
+
if (crashes > 0) {
|
|
61
|
+
lines.push(` the tab has crashed ${crashes === 1 ? "once" : `${crashes} times`}` +
|
|
62
|
+
" and been replaced");
|
|
63
|
+
}
|
|
64
|
+
const recent = status.history.slice(-RECENT_HISTORY);
|
|
65
|
+
if (recent.length > 0) {
|
|
66
|
+
lines.push("", " recently:");
|
|
67
|
+
for (const event of recent) {
|
|
68
|
+
lines.push(` ${event.kind}${event.url ? ` ${event.url}` : ""}`);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
if (status.artifacts.length > 0) {
|
|
72
|
+
lines.push("", " written to disk:");
|
|
73
|
+
for (const path of status.artifacts)
|
|
74
|
+
lines.push(` ${path}`);
|
|
75
|
+
}
|
|
76
|
+
return lines.join("\n");
|
|
77
|
+
}
|
|
78
|
+
/** What the session is pretending, in one phrase. */
|
|
79
|
+
function describeEmulation(state) {
|
|
80
|
+
const notes = [];
|
|
81
|
+
if (state.device)
|
|
82
|
+
notes.push(state.device);
|
|
83
|
+
else if (state.viewport) {
|
|
84
|
+
notes.push(`${state.viewport.width} by ${state.viewport.height}`);
|
|
85
|
+
}
|
|
86
|
+
if (state.colorScheme)
|
|
87
|
+
notes.push(`${state.colorScheme} mode`);
|
|
88
|
+
if (state.reducedMotion)
|
|
89
|
+
notes.push("reduced motion");
|
|
90
|
+
if (state.contrast && state.contrast !== "no-preference") {
|
|
91
|
+
notes.push(`${state.contrast} contrast`);
|
|
92
|
+
}
|
|
93
|
+
if (state.forcedColors)
|
|
94
|
+
notes.push("forced colours");
|
|
95
|
+
if (state.vision && state.vision !== "none")
|
|
96
|
+
notes.push(state.vision);
|
|
97
|
+
if (state.media === "print")
|
|
98
|
+
notes.push("print layout");
|
|
99
|
+
if (state.touch)
|
|
100
|
+
notes.push("touch");
|
|
101
|
+
if (state.timezone)
|
|
102
|
+
notes.push(state.timezone);
|
|
103
|
+
if (state.locale)
|
|
104
|
+
notes.push(state.locale);
|
|
105
|
+
if (state.cpuThrottle && state.cpuThrottle > 1) {
|
|
106
|
+
notes.push(`cpu ${state.cpuThrottle}x slower`);
|
|
107
|
+
}
|
|
108
|
+
return notes.join(", ");
|
|
109
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the page has kept: local storage, session storage,
|
|
3
|
+
* cookies and the clipboard.
|
|
4
|
+
*
|
|
5
|
+
* These are where the state behind a bug usually hides. A page
|
|
6
|
+
* that behaves differently on a second visit is nearly always
|
|
7
|
+
* remembering something, and the fastest way to find out what
|
|
8
|
+
* is to look rather than to reason about it.
|
|
9
|
+
*/
|
|
10
|
+
/** One cookie, as the protocol describes it. */
|
|
11
|
+
export interface CookieRecord {
|
|
12
|
+
readonly name: string;
|
|
13
|
+
readonly value: string;
|
|
14
|
+
readonly domain?: string;
|
|
15
|
+
readonly path?: string;
|
|
16
|
+
readonly expires?: number;
|
|
17
|
+
readonly httpOnly?: boolean;
|
|
18
|
+
readonly secure?: boolean;
|
|
19
|
+
readonly sameSite?: string;
|
|
20
|
+
}
|
|
21
|
+
/** Everything a session can see that the page has kept. */
|
|
22
|
+
export interface StorageSnapshot {
|
|
23
|
+
readonly local?: readonly (readonly [string, string])[];
|
|
24
|
+
readonly session?: readonly (readonly [string, string])[];
|
|
25
|
+
readonly cookies?: readonly CookieRecord[];
|
|
26
|
+
readonly clipboard?: string;
|
|
27
|
+
/** Why a store could not be read, when one could not. */
|
|
28
|
+
readonly unavailable?: Readonly<Record<string, string>>;
|
|
29
|
+
}
|
|
30
|
+
/** A signed-in state, saved so a later session can wear it. */
|
|
31
|
+
export interface SavedState {
|
|
32
|
+
/** The origin these belong to. Local storage is scoped to it. */
|
|
33
|
+
readonly origin: string;
|
|
34
|
+
readonly savedAt: string;
|
|
35
|
+
readonly cookies: readonly CookieRecord[];
|
|
36
|
+
readonly local: readonly (readonly [string, string])[];
|
|
37
|
+
readonly session: readonly (readonly [string, string])[];
|
|
38
|
+
}
|
|
39
|
+
/** Take what a session is holding and make it keepable. */
|
|
40
|
+
export declare function captureState(origin: string, snapshot: StorageSnapshot): SavedState;
|
|
41
|
+
/**
|
|
42
|
+
* Read a saved state back, or say why this is not one.
|
|
43
|
+
*
|
|
44
|
+
* Checked rather than trusted, because the text comes from a path
|
|
45
|
+
* a caller typed and the failure it guards against is silent: a
|
|
46
|
+
* state that restores nothing leaves a session signed out, which
|
|
47
|
+
* looks exactly like a site that logged you out and sends someone
|
|
48
|
+
* debugging the site instead of the path. Every refusal names
|
|
49
|
+
* what was wrong so the next attempt is better informed.
|
|
50
|
+
*/
|
|
51
|
+
export declare function readState(text: string): SavedState | {
|
|
52
|
+
problem: string;
|
|
53
|
+
};
|
|
54
|
+
/** What the page is holding on to. */
|
|
55
|
+
export declare function renderStorage(snapshot: StorageSnapshot): string;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the page has kept: local storage, session storage,
|
|
3
|
+
* cookies and the clipboard.
|
|
4
|
+
*
|
|
5
|
+
* These are where the state behind a bug usually hides. A page
|
|
6
|
+
* that behaves differently on a second visit is nearly always
|
|
7
|
+
* remembering something, and the fastest way to find out what
|
|
8
|
+
* is to look rather than to reason about it.
|
|
9
|
+
*/
|
|
10
|
+
/** Take what a session is holding and make it keepable. */
|
|
11
|
+
export function captureState(origin, snapshot) {
|
|
12
|
+
return {
|
|
13
|
+
origin,
|
|
14
|
+
savedAt: new Date().toISOString(),
|
|
15
|
+
cookies: snapshot.cookies ?? [],
|
|
16
|
+
local: snapshot.local ?? [],
|
|
17
|
+
session: snapshot.session ?? [],
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
/** Whether a value is a pair of strings, as a stored entry is. */
|
|
21
|
+
function isEntry(value) {
|
|
22
|
+
return (Array.isArray(value) &&
|
|
23
|
+
value.length === 2 &&
|
|
24
|
+
value.every((part) => typeof part === "string"));
|
|
25
|
+
}
|
|
26
|
+
/** Whether a value carries at least what a cookie needs. */
|
|
27
|
+
function isCookie(value) {
|
|
28
|
+
if (typeof value !== "object" || value === null)
|
|
29
|
+
return false;
|
|
30
|
+
const record = value;
|
|
31
|
+
return typeof record.name === "string" && typeof record.value === "string";
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Read a saved state back, or say why this is not one.
|
|
35
|
+
*
|
|
36
|
+
* Checked rather than trusted, because the text comes from a path
|
|
37
|
+
* a caller typed and the failure it guards against is silent: a
|
|
38
|
+
* state that restores nothing leaves a session signed out, which
|
|
39
|
+
* looks exactly like a site that logged you out and sends someone
|
|
40
|
+
* debugging the site instead of the path. Every refusal names
|
|
41
|
+
* what was wrong so the next attempt is better informed.
|
|
42
|
+
*/
|
|
43
|
+
export function readState(text) {
|
|
44
|
+
let parsed;
|
|
45
|
+
try {
|
|
46
|
+
parsed = JSON.parse(text);
|
|
47
|
+
}
|
|
48
|
+
catch (err) {
|
|
49
|
+
return { problem: `it is not JSON: ${String(err)}` };
|
|
50
|
+
}
|
|
51
|
+
if (typeof parsed !== "object" || parsed === null) {
|
|
52
|
+
return { problem: "it is not an object, so it holds no state" };
|
|
53
|
+
}
|
|
54
|
+
const record = parsed;
|
|
55
|
+
if (typeof record.origin !== "string" || record.origin === "") {
|
|
56
|
+
return {
|
|
57
|
+
problem: "it has no origin, so there is no way to know which site " +
|
|
58
|
+
"the local storage in it belongs to",
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
const cookies = record.cookies ?? [];
|
|
62
|
+
if (!Array.isArray(cookies) || !cookies.every(isCookie)) {
|
|
63
|
+
return {
|
|
64
|
+
problem: "its cookies are not cookies, each needing a name and a value",
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
const local = record.local ?? [];
|
|
68
|
+
const session = record.session ?? [];
|
|
69
|
+
if (!Array.isArray(local) ||
|
|
70
|
+
!local.every(isEntry) ||
|
|
71
|
+
!Array.isArray(session) ||
|
|
72
|
+
!session.every(isEntry)) {
|
|
73
|
+
return {
|
|
74
|
+
problem: "its stored entries are not name and value pairs",
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
origin: record.origin,
|
|
79
|
+
savedAt: typeof record.savedAt === "string" ? record.savedAt : "unknown",
|
|
80
|
+
cookies,
|
|
81
|
+
local,
|
|
82
|
+
session,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
/** How much of a stored value reads before it stops helping. */
|
|
86
|
+
const MAX_VALUE = 200;
|
|
87
|
+
/** What the page is holding on to. */
|
|
88
|
+
export function renderStorage(snapshot) {
|
|
89
|
+
const sections = [];
|
|
90
|
+
for (const [label, entries] of [
|
|
91
|
+
["local storage", snapshot.local],
|
|
92
|
+
["session storage", snapshot.session],
|
|
93
|
+
]) {
|
|
94
|
+
if (!entries)
|
|
95
|
+
continue;
|
|
96
|
+
sections.push(entries.length === 0
|
|
97
|
+
? `${label}: empty`
|
|
98
|
+
: `${label}: ${entries.length} ${entries.length === 1 ? "entry" : "entries"}\n${entries
|
|
99
|
+
.map(([key, value]) => ` ${key} = ${clip(value)}`)
|
|
100
|
+
.join("\n")}`);
|
|
101
|
+
}
|
|
102
|
+
if (snapshot.cookies) {
|
|
103
|
+
sections.push(snapshot.cookies.length === 0
|
|
104
|
+
? "cookies: none"
|
|
105
|
+
: `cookies: ${snapshot.cookies.length}\n${snapshot.cookies
|
|
106
|
+
.map((cookie) => ` ${cookie.name} = ${clip(cookie.value)}${flags(cookie)}`)
|
|
107
|
+
.join("\n")}`);
|
|
108
|
+
}
|
|
109
|
+
if (snapshot.clipboard !== undefined) {
|
|
110
|
+
sections.push(snapshot.clipboard === ""
|
|
111
|
+
? "clipboard: empty"
|
|
112
|
+
: `clipboard: ${clip(snapshot.clipboard)}`);
|
|
113
|
+
}
|
|
114
|
+
for (const [store, why] of Object.entries(snapshot.unavailable ?? {})) {
|
|
115
|
+
sections.push(`${store}: could not be read. ${why}`);
|
|
116
|
+
}
|
|
117
|
+
return sections.length === 0
|
|
118
|
+
? "Nothing was asked for."
|
|
119
|
+
: sections.join("\n\n");
|
|
120
|
+
}
|
|
121
|
+
/** The properties that change what a cookie is for. */
|
|
122
|
+
function flags(cookie) {
|
|
123
|
+
const noted = [];
|
|
124
|
+
if (cookie.httpOnly)
|
|
125
|
+
noted.push("httpOnly");
|
|
126
|
+
if (cookie.secure)
|
|
127
|
+
noted.push("secure");
|
|
128
|
+
if (cookie.sameSite)
|
|
129
|
+
noted.push(`sameSite=${cookie.sameSite}`);
|
|
130
|
+
// A session cookie has no expiry, which the protocol reports
|
|
131
|
+
// as -1 rather than as an absent field.
|
|
132
|
+
if (cookie.expires !== undefined && cookie.expires < 0) {
|
|
133
|
+
noted.push("session");
|
|
134
|
+
}
|
|
135
|
+
return noted.length === 0 ? "" : ` [${noted.join(", ")}]`;
|
|
136
|
+
}
|
|
137
|
+
/** A value cut to length, with the cut declared. */
|
|
138
|
+
function clip(value) {
|
|
139
|
+
return value.length > MAX_VALUE
|
|
140
|
+
? `${value.slice(0, MAX_VALUE)}... (${value.length} chars)`
|
|
141
|
+
: value;
|
|
142
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The tabs a session can see.
|
|
3
|
+
*
|
|
4
|
+
* A session drives one tab at a time, which is almost always what
|
|
5
|
+
* is wanted and is wrong exactly when a page opens another one: a
|
|
6
|
+
* target of _blank, a window.open, a payment or sign-in handed to
|
|
7
|
+
* a second window. What the page did then is real and invisible,
|
|
8
|
+
* and the last thing a caller sees is a click that appeared to do
|
|
9
|
+
* nothing.
|
|
10
|
+
*/
|
|
11
|
+
/** One tab the session's browser context is holding open. */
|
|
12
|
+
export interface TabRecord {
|
|
13
|
+
/** Its place in the list, from one, as a caller names it. */
|
|
14
|
+
readonly index: number;
|
|
15
|
+
readonly url: string;
|
|
16
|
+
readonly title: string;
|
|
17
|
+
/** Whether this is the one every read and act goes to. */
|
|
18
|
+
readonly current: boolean;
|
|
19
|
+
}
|
|
20
|
+
/** The tabs open, and which one is being driven. */
|
|
21
|
+
export declare function renderTabs(tabs: readonly TabRecord[]): string;
|
|
22
|
+
/**
|
|
23
|
+
* Pick the tab asked for, or refuse by saying what is open.
|
|
24
|
+
*
|
|
25
|
+
* The refusal carries the list because the caller's next move is
|
|
26
|
+
* always to ask for it, and making them spend a call to learn
|
|
27
|
+
* what was already in hand when the refusal was written is a
|
|
28
|
+
* needless round trip.
|
|
29
|
+
*/
|
|
30
|
+
export declare function chooseTab(tabs: readonly TabRecord[], wanted: number): TabRecord | {
|
|
31
|
+
refusal: string;
|
|
32
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The tabs a session can see.
|
|
3
|
+
*
|
|
4
|
+
* A session drives one tab at a time, which is almost always what
|
|
5
|
+
* is wanted and is wrong exactly when a page opens another one: a
|
|
6
|
+
* target of _blank, a window.open, a payment or sign-in handed to
|
|
7
|
+
* a second window. What the page did then is real and invisible,
|
|
8
|
+
* and the last thing a caller sees is a click that appeared to do
|
|
9
|
+
* nothing.
|
|
10
|
+
*/
|
|
11
|
+
/** The tabs open, and which one is being driven. */
|
|
12
|
+
export function renderTabs(tabs) {
|
|
13
|
+
if (tabs.length === 0)
|
|
14
|
+
return "No tabs open.";
|
|
15
|
+
if (tabs.length === 1) {
|
|
16
|
+
const only = tabs[0];
|
|
17
|
+
return `One tab: ${describe(only)}`;
|
|
18
|
+
}
|
|
19
|
+
const lines = tabs.map((tab) => `${tab.index}. ${describe(tab)}${tab.current ? " <- driving" : ""}`);
|
|
20
|
+
return [`${tabs.length} tabs open:`, ...lines].join("\n");
|
|
21
|
+
}
|
|
22
|
+
/** A tab in one line, title first because that is what is read. */
|
|
23
|
+
function describe(tab) {
|
|
24
|
+
return tab.title === "" ? tab.url : `${tab.title} (${tab.url})`;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Pick the tab asked for, or refuse by saying what is open.
|
|
28
|
+
*
|
|
29
|
+
* The refusal carries the list because the caller's next move is
|
|
30
|
+
* always to ask for it, and making them spend a call to learn
|
|
31
|
+
* what was already in hand when the refusal was written is a
|
|
32
|
+
* needless round trip.
|
|
33
|
+
*/
|
|
34
|
+
export function chooseTab(tabs, wanted) {
|
|
35
|
+
const found = tabs.find((tab) => tab.index === wanted);
|
|
36
|
+
if (found !== undefined)
|
|
37
|
+
return found;
|
|
38
|
+
if (tabs.length === 0) {
|
|
39
|
+
return {
|
|
40
|
+
refusal: "There are no tabs open to switch to, which means the session " +
|
|
41
|
+
"has no page at all rather than the wrong one.",
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
refusal: `There is no tab ${wanted}. Open are:\n${renderTabs(tabs)}`,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reading the emulated environment back.
|
|
3
|
+
*
|
|
4
|
+
* Led by what the page observes rather than by what was asked
|
|
5
|
+
* for, so a setting that did not take cannot read as though it
|
|
6
|
+
* did.
|
|
7
|
+
*/
|
|
8
|
+
import type { Divergence, EmulationState, ObservedEnvironment } from "./emulation.js";
|
|
9
|
+
/** What the page is experiencing, and where that differs from the ask. */
|
|
10
|
+
export declare function renderEnvironment(asked: EmulationState, observed: ObservedEnvironment, gaps: readonly Divergence[]): string;
|