@alwaysmeticulous/cli 2.326.1 → 2.328.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/dist/__tests__/commonjs-dependencies.spec.d.ts +2 -0
- package/dist/__tests__/commonjs-dependencies.spec.d.ts.map +1 -0
- package/dist/__tests__/commonjs-dependencies.spec.js +82 -0
- package/dist/__tests__/commonjs-dependencies.spec.js.map +1 -0
- package/dist/command-utils/__tests__/parse-rewrites.spec.js +2 -2
- package/dist/command-utils/__tests__/parse-rewrites.spec.js.map +1 -1
- package/dist/command-utils/__tests__/warn-regex-rewrites.spec.js +2 -2
- package/dist/command-utils/__tests__/warn-regex-rewrites.spec.js.map +1 -1
- package/dist/command-utils/common-options.js +2 -2
- package/dist/command-utils/common-options.js.map +1 -1
- package/dist/command-utils/detect-upload-mode.js +2 -2
- package/dist/command-utils/detect-upload-mode.js.map +1 -1
- package/dist/command-utils/detect-upload-mode.spec.js +2 -2
- package/dist/command-utils/detect-upload-mode.spec.js.map +1 -1
- package/dist/command-utils/download-session.utils.js +2 -2
- package/dist/command-utils/download-session.utils.js.map +1 -1
- package/dist/command-utils/json-args.js +2 -2
- package/dist/command-utils/json-args.js.map +1 -1
- package/dist/command-utils/json-args.spec.js +2 -2
- package/dist/command-utils/json-args.spec.js.map +1 -1
- package/dist/command-utils/parse-container-env.js +2 -2
- package/dist/command-utils/parse-container-env.js.map +1 -1
- package/dist/command-utils/parse-rewrites.js +2 -2
- package/dist/command-utils/parse-rewrites.js.map +1 -1
- package/dist/command-utils/print-json.js +2 -2
- package/dist/command-utils/print-json.js.map +1 -1
- package/dist/command-utils/sentry.utils.js +2 -2
- package/dist/command-utils/sentry.utils.js.map +1 -1
- package/dist/command-utils/warn-regex-rewrites.js +2 -2
- package/dist/command-utils/warn-regex-rewrites.js.map +1 -1
- package/dist/commands/agent/agent-review-writes.command.spec.js +2 -2
- package/dist/commands/agent/agent-review-writes.command.spec.js.map +1 -1
- package/dist/commands/agent/build-git-options.js +2 -2
- package/dist/commands/agent/build-git-options.js.map +1 -1
- package/dist/commands/agent/build-git-options.spec.js +2 -2
- package/dist/commands/agent/build-git-options.spec.js.map +1 -1
- package/dist/commands/agent/coverage-columns.util.js +2 -2
- package/dist/commands/agent/coverage-columns.util.js.map +1 -1
- package/dist/commands/agent/create-diff-comment.command.js +2 -2
- package/dist/commands/agent/create-diff-comment.command.js.map +1 -1
- package/dist/commands/agent/diff-comment-write.utils.js +2 -2
- package/dist/commands/agent/diff-comment-write.utils.js.map +1 -1
- package/dist/commands/agent/diff-comments.command.js +2 -2
- package/dist/commands/agent/diff-comments.command.js.map +1 -1
- package/dist/commands/agent/diff-comments.command.spec.js +2 -2
- package/dist/commands/agent/diff-comments.command.spec.js.map +1 -1
- package/dist/commands/agent/ignore-diff.command.js +2 -2
- package/dist/commands/agent/ignore-diff.command.js.map +1 -1
- package/dist/commands/agent/index.js +2 -2
- package/dist/commands/agent/index.js.map +1 -1
- package/dist/commands/agent/js-coverage-diff.command.js +2 -2
- package/dist/commands/agent/js-coverage-diff.command.js.map +1 -1
- package/dist/commands/agent/js-coverage.command.handler.spec.js +2 -2
- package/dist/commands/agent/js-coverage.command.handler.spec.js.map +1 -1
- package/dist/commands/agent/js-coverage.command.js +2 -2
- package/dist/commands/agent/js-coverage.command.js.map +1 -1
- package/dist/commands/agent/js-coverage.command.spec.js +2 -2
- package/dist/commands/agent/js-coverage.command.spec.js.map +1 -1
- package/dist/commands/agent/reject-diff.command.js +2 -2
- package/dist/commands/agent/reject-diff.command.js.map +1 -1
- package/dist/commands/agent/reject-diff.command.spec.js +2 -2
- package/dist/commands/agent/reject-diff.command.spec.js.map +1 -1
- package/dist/commands/agent/reply-to-diff-comment.command.js +2 -2
- package/dist/commands/agent/reply-to-diff-comment.command.js.map +1 -1
- package/dist/commands/agent/screenshot-dom-diff.command.js +2 -2
- package/dist/commands/agent/screenshot-dom-diff.command.js.map +1 -1
- package/dist/commands/agent/screenshot-image-files.command.js +2 -2
- package/dist/commands/agent/screenshot-image-files.command.js.map +1 -1
- package/dist/commands/agent/screenshot-image.command.js +2 -2
- package/dist/commands/agent/screenshot-image.command.js.map +1 -1
- package/dist/commands/agent/sessions.command.js +2 -2
- package/dist/commands/agent/sessions.command.js.map +1 -1
- package/dist/commands/agent/sessions.command.spec.js +2 -2
- package/dist/commands/agent/sessions.command.spec.js.map +1 -1
- package/dist/commands/agent/submit-feedback.command.js +2 -2
- package/dist/commands/agent/submit-feedback.command.js.map +1 -1
- package/dist/commands/agent/test-run-check.command.js +2 -2
- package/dist/commands/agent/test-run-check.command.js.map +1 -1
- package/dist/commands/agent/test-run-check.command.spec.js +2 -2
- package/dist/commands/agent/test-run-check.command.spec.js.map +1 -1
- package/dist/commands/agent/test-run-diffs.command.js +2 -2
- package/dist/commands/agent/test-run-diffs.command.js.map +1 -1
- package/dist/commands/agent/test-run-diffs.command.spec.js +2 -2
- package/dist/commands/agent/test-run-diffs.command.spec.js.map +1 -1
- package/dist/commands/agent/test-run-diffs.utils.js +2 -2
- package/dist/commands/agent/test-run-diffs.utils.js.map +1 -1
- package/dist/commands/agent/test-run-diffs.utils.spec.js +2 -2
- package/dist/commands/agent/test-run-diffs.utils.spec.js.map +1 -1
- package/dist/commands/agent/test-run-for-commit.command.js +2 -2
- package/dist/commands/agent/test-run-for-commit.command.js.map +1 -1
- package/dist/commands/agent/timeline.command.js +2 -2
- package/dist/commands/agent/timeline.command.js.map +1 -1
- package/dist/commands/agent/timeline.command.spec.js +2 -2
- package/dist/commands/agent/timeline.command.spec.js.map +1 -1
- package/dist/commands/agent/trigger-test-run.command.js +2 -2
- package/dist/commands/agent/trigger-test-run.command.js.map +1 -1
- package/dist/commands/agent/trigger-test-run.command.spec.js +2 -2
- package/dist/commands/agent/trigger-test-run.command.spec.js.map +1 -1
- package/dist/commands/agent/upload-build.command.js +2 -2
- package/dist/commands/agent/upload-build.command.js.map +1 -1
- package/dist/commands/all-commands.d.ts.map +1 -1
- package/dist/commands/all-commands.js +8 -6
- package/dist/commands/all-commands.js.map +1 -1
- package/dist/commands/auth/__tests__/get-project.command.spec.js +2 -2
- package/dist/commands/auth/__tests__/get-project.command.spec.js.map +1 -1
- package/dist/commands/auth/__tests__/list-projects.command.spec.js +2 -2
- package/dist/commands/auth/__tests__/list-projects.command.spec.js.map +1 -1
- package/dist/commands/auth/__tests__/login.command.spec.js +2 -2
- package/dist/commands/auth/__tests__/login.command.spec.js.map +1 -1
- package/dist/commands/auth/__tests__/logout.command.spec.js +2 -2
- package/dist/commands/auth/__tests__/logout.command.spec.js.map +1 -1
- package/dist/commands/auth/__tests__/set-project.command.spec.js +2 -2
- package/dist/commands/auth/__tests__/set-project.command.spec.js.map +1 -1
- package/dist/commands/auth/__tests__/whoami.command.spec.js +2 -2
- package/dist/commands/auth/__tests__/whoami.command.spec.js.map +1 -1
- package/dist/commands/auth/get-project.command.js +2 -2
- package/dist/commands/auth/get-project.command.js.map +1 -1
- package/dist/commands/auth/index.js +2 -2
- package/dist/commands/auth/index.js.map +1 -1
- package/dist/commands/auth/list-projects.command.js +2 -2
- package/dist/commands/auth/list-projects.command.js.map +1 -1
- package/dist/commands/auth/login.command.js +2 -2
- package/dist/commands/auth/login.command.js.map +1 -1
- package/dist/commands/auth/logout.command.js +2 -2
- package/dist/commands/auth/logout.command.js.map +1 -1
- package/dist/commands/auth/set-project.command.js +2 -2
- package/dist/commands/auth/set-project.command.js.map +1 -1
- package/dist/commands/auth/whoami.command.js +2 -2
- package/dist/commands/auth/whoami.command.js.map +1 -1
- package/dist/commands/ci/__tests__/label-commit.utils.spec.js +2 -2
- package/dist/commands/ci/__tests__/label-commit.utils.spec.js.map +1 -1
- package/dist/commands/ci/__tests__/session-filter.utils.spec.js +2 -2
- package/dist/commands/ci/__tests__/session-filter.utils.spec.js.map +1 -1
- package/dist/commands/ci/agent-test.command.d.ts +2 -0
- package/dist/commands/ci/agent-test.command.d.ts.map +1 -1
- package/dist/commands/ci/agent-test.command.js +28 -3
- package/dist/commands/ci/agent-test.command.js.map +1 -1
- package/dist/commands/ci/agent-test.command.spec.d.ts +2 -0
- package/dist/commands/ci/agent-test.command.spec.d.ts.map +1 -0
- package/dist/commands/ci/agent-test.command.spec.js +133 -0
- package/dist/commands/ci/agent-test.command.spec.js.map +1 -0
- package/dist/commands/ci/deprecated-trigger-options.js +2 -2
- package/dist/commands/ci/deprecated-trigger-options.js.map +1 -1
- package/dist/commands/ci/index.js +2 -2
- package/dist/commands/ci/index.js.map +1 -1
- package/dist/commands/ci/label-commit.command.js +2 -2
- package/dist/commands/ci/label-commit.command.js.map +1 -1
- package/dist/commands/ci/label-commit.core.js +2 -2
- package/dist/commands/ci/label-commit.core.js.map +1 -1
- package/dist/commands/ci/label-commit.types.js +2 -2
- package/dist/commands/ci/label-commit.types.js.map +1 -1
- package/dist/commands/ci/label-commit.utils.js +2 -2
- package/dist/commands/ci/label-commit.utils.js.map +1 -1
- package/dist/commands/ci/prepare.command.js +2 -2
- package/dist/commands/ci/prepare.command.js.map +1 -1
- package/dist/commands/ci/resolve-git-options.js +2 -2
- package/dist/commands/ci/resolve-git-options.js.map +1 -1
- package/dist/commands/ci/run-local.command.js +2 -2
- package/dist/commands/ci/run-local.command.js.map +1 -1
- package/dist/commands/ci/run-with-uploaded-asset-chunks.command.js +2 -2
- package/dist/commands/ci/run-with-uploaded-asset-chunks.command.js.map +1 -1
- package/dist/commands/ci/run-with-uploaded-asset-chunks.command.spec.js +2 -2
- package/dist/commands/ci/run-with-uploaded-asset-chunks.command.spec.js.map +1 -1
- package/dist/commands/ci/run-with-uploaded-asset-chunks.utils.js +2 -2
- package/dist/commands/ci/run-with-uploaded-asset-chunks.utils.js.map +1 -1
- package/dist/commands/ci/run.command.js +2 -2
- package/dist/commands/ci/run.command.js.map +1 -1
- package/dist/commands/ci/session-filter.utils.js +2 -2
- package/dist/commands/ci/session-filter.utils.js.map +1 -1
- package/dist/commands/ci/start-tunnel.command.js +2 -2
- package/dist/commands/ci/start-tunnel.command.js.map +1 -1
- package/dist/commands/ci/trigger-test-run.core.js +2 -2
- package/dist/commands/ci/trigger-test-run.core.js.map +1 -1
- package/dist/commands/ci/trigger-test-run.types.js +2 -2
- package/dist/commands/ci/trigger-test-run.types.js.map +1 -1
- package/dist/commands/ci/upload-asset-chunk.command.js +2 -2
- package/dist/commands/ci/upload-asset-chunk.command.js.map +1 -1
- package/dist/commands/ci/upload-assets.command.js +2 -2
- package/dist/commands/ci/upload-assets.command.js.map +1 -1
- package/dist/commands/ci/upload-container.command.js +2 -2
- package/dist/commands/ci/upload-container.command.js.map +1 -1
- package/dist/commands/crawl.command.js +2 -2
- package/dist/commands/crawl.command.js.map +1 -1
- package/dist/commands/debug/clean-workspaces.js +2 -2
- package/dist/commands/debug/clean-workspaces.js.map +1 -1
- package/dist/commands/debug/index.js +2 -2
- package/dist/commands/debug/index.js.map +1 -1
- package/dist/commands/debug/present-workspace.js +2 -2
- package/dist/commands/debug/present-workspace.js.map +1 -1
- package/dist/commands/debug/project-worktree.js +2 -2
- package/dist/commands/debug/project-worktree.js.map +1 -1
- package/dist/commands/deprecated-aliases.js +2 -2
- package/dist/commands/deprecated-aliases.js.map +1 -1
- package/dist/commands/download/index.js +2 -2
- package/dist/commands/download/index.js.map +1 -1
- package/dist/commands/download/replay.command.js +2 -2
- package/dist/commands/download/replay.command.js.map +1 -1
- package/dist/commands/download/session.command.js +2 -2
- package/dist/commands/download/session.command.js.map +1 -1
- package/dist/commands/download/test-run.command.js +2 -2
- package/dist/commands/download/test-run.command.js.map +1 -1
- package/dist/commands/local/get-edited-files.utils.js +2 -2
- package/dist/commands/local/get-edited-files.utils.js.map +1 -1
- package/dist/commands/local/get-edited-files.utils.spec.js +2 -2
- package/dist/commands/local/get-edited-files.utils.spec.js.map +1 -1
- package/dist/commands/local/index.js +2 -2
- package/dist/commands/local/index.js.map +1 -1
- package/dist/commands/local/relevant-sessions.command.js +2 -2
- package/dist/commands/local/relevant-sessions.command.js.map +1 -1
- package/dist/commands/onboard/__tests__/build-context.spec.d.ts +2 -0
- package/dist/commands/onboard/__tests__/build-context.spec.d.ts.map +1 -0
- package/dist/commands/onboard/__tests__/build-context.spec.js +179 -0
- package/dist/commands/onboard/__tests__/build-context.spec.js.map +1 -0
- package/dist/commands/onboard/__tests__/check-vcs-link.spec.d.ts +2 -0
- package/dist/commands/onboard/__tests__/check-vcs-link.spec.d.ts.map +1 -0
- package/dist/commands/onboard/__tests__/check-vcs-link.spec.js +164 -0
- package/dist/commands/onboard/__tests__/check-vcs-link.spec.js.map +1 -0
- package/dist/commands/onboard/__tests__/codex-mcp.spec.d.ts +2 -0
- package/dist/commands/onboard/__tests__/codex-mcp.spec.d.ts.map +1 -0
- package/dist/commands/onboard/__tests__/codex-mcp.spec.js +73 -0
- package/dist/commands/onboard/__tests__/codex-mcp.spec.js.map +1 -0
- package/dist/commands/onboard/__tests__/detect-framework.spec.d.ts +2 -0
- package/dist/commands/onboard/__tests__/detect-framework.spec.d.ts.map +1 -0
- package/dist/commands/onboard/__tests__/detect-framework.spec.js +277 -0
- package/dist/commands/onboard/__tests__/detect-framework.spec.js.map +1 -0
- package/dist/commands/onboard/__tests__/git-repo-info.spec.d.ts +2 -0
- package/dist/commands/onboard/__tests__/git-repo-info.spec.d.ts.map +1 -0
- package/dist/commands/onboard/__tests__/git-repo-info.spec.js +109 -0
- package/dist/commands/onboard/__tests__/git-repo-info.spec.js.map +1 -0
- package/dist/commands/onboard/__tests__/inline-doc-constants.spec.d.ts +2 -0
- package/dist/commands/onboard/__tests__/inline-doc-constants.spec.d.ts.map +1 -0
- package/dist/commands/onboard/__tests__/inline-doc-constants.spec.js +157 -0
- package/dist/commands/onboard/__tests__/inline-doc-constants.spec.js.map +1 -0
- package/dist/commands/onboard/__tests__/install-skills.spec.d.ts +2 -0
- package/dist/commands/onboard/__tests__/install-skills.spec.d.ts.map +1 -0
- package/dist/commands/onboard/__tests__/install-skills.spec.js +158 -0
- package/dist/commands/onboard/__tests__/install-skills.spec.js.map +1 -0
- package/dist/commands/onboard/__tests__/materialize-workspace.spec.d.ts +2 -0
- package/dist/commands/onboard/__tests__/materialize-workspace.spec.d.ts.map +1 -0
- package/dist/commands/onboard/__tests__/materialize-workspace.spec.js +116 -0
- package/dist/commands/onboard/__tests__/materialize-workspace.spec.js.map +1 -0
- package/dist/commands/onboard/__tests__/resolve-app.spec.d.ts +2 -0
- package/dist/commands/onboard/__tests__/resolve-app.spec.d.ts.map +1 -0
- package/dist/commands/onboard/__tests__/resolve-app.spec.js +166 -0
- package/dist/commands/onboard/__tests__/resolve-app.spec.js.map +1 -0
- package/dist/commands/onboard/__tests__/safe-repo-fs.spec.d.ts +2 -0
- package/dist/commands/onboard/__tests__/safe-repo-fs.spec.d.ts.map +1 -0
- package/dist/commands/onboard/__tests__/safe-repo-fs.spec.js +137 -0
- package/dist/commands/onboard/__tests__/safe-repo-fs.spec.js.map +1 -0
- package/dist/commands/onboard/__tests__/setup-agent-integrations.spec.d.ts +2 -0
- package/dist/commands/onboard/__tests__/setup-agent-integrations.spec.d.ts.map +1 -0
- package/dist/commands/onboard/__tests__/setup-agent-integrations.spec.js +286 -0
- package/dist/commands/onboard/__tests__/setup-agent-integrations.spec.js.map +1 -0
- package/dist/commands/onboard/build-context.d.ts +16 -0
- package/dist/commands/onboard/build-context.d.ts.map +1 -0
- package/dist/commands/onboard/build-context.js +104 -0
- package/dist/commands/onboard/build-context.js.map +1 -0
- package/dist/commands/onboard/check-vcs-link.d.ts +14 -0
- package/dist/commands/onboard/check-vcs-link.d.ts.map +1 -0
- package/dist/commands/onboard/check-vcs-link.js +111 -0
- package/dist/commands/onboard/check-vcs-link.js.map +1 -0
- package/dist/commands/onboard/codex-mcp.d.ts +24 -0
- package/dist/commands/onboard/codex-mcp.d.ts.map +1 -0
- package/dist/commands/onboard/codex-mcp.js +302 -0
- package/dist/commands/onboard/codex-mcp.js.map +1 -0
- package/dist/commands/onboard/customer-agents.d.ts +9 -0
- package/dist/commands/onboard/customer-agents.d.ts.map +1 -0
- package/dist/commands/onboard/customer-agents.js +19 -0
- package/dist/commands/onboard/customer-agents.js.map +1 -0
- package/dist/commands/onboard/customer-agents.json +17 -0
- package/dist/commands/onboard/customer-docs.d.ts +21 -0
- package/dist/commands/onboard/customer-docs.d.ts.map +1 -0
- package/dist/commands/onboard/customer-docs.js +31 -0
- package/dist/commands/onboard/customer-docs.js.map +1 -0
- package/dist/commands/onboard/customer-docs.json +35 -0
- package/dist/commands/onboard/detect-framework.d.ts +26 -0
- package/dist/commands/onboard/detect-framework.d.ts.map +1 -0
- package/dist/commands/onboard/detect-framework.js +305 -0
- package/dist/commands/onboard/detect-framework.js.map +1 -0
- package/dist/commands/onboard/discover-apps.d.ts +21 -0
- package/dist/commands/onboard/discover-apps.d.ts.map +1 -0
- package/dist/commands/onboard/discover-apps.js +318 -0
- package/dist/commands/onboard/discover-apps.js.map +1 -0
- package/dist/commands/onboard/docs-urls.d.ts +11 -0
- package/dist/commands/onboard/docs-urls.d.ts.map +1 -0
- package/dist/commands/onboard/docs-urls.js +17 -0
- package/dist/commands/onboard/docs-urls.js.map +1 -0
- package/dist/commands/onboard/git-repo-info.d.ts +15 -0
- package/dist/commands/onboard/git-repo-info.d.ts.map +1 -0
- package/dist/commands/onboard/git-repo-info.js +84 -0
- package/dist/commands/onboard/git-repo-info.js.map +1 -0
- package/dist/commands/onboard/index.d.ts +18 -0
- package/dist/commands/onboard/index.d.ts.map +1 -0
- package/dist/commands/onboard/index.js +164 -0
- package/dist/commands/onboard/index.js.map +1 -0
- package/dist/commands/onboard/inline-doc-constants.d.ts +21 -0
- package/dist/commands/onboard/inline-doc-constants.d.ts.map +1 -0
- package/dist/commands/onboard/inline-doc-constants.js +238 -0
- package/dist/commands/onboard/inline-doc-constants.js.map +1 -0
- package/dist/commands/onboard/launch-agent.d.ts +65 -0
- package/dist/commands/onboard/launch-agent.d.ts.map +1 -0
- package/dist/commands/onboard/launch-agent.js +311 -0
- package/dist/commands/onboard/launch-agent.js.map +1 -0
- package/dist/commands/onboard/materialize-workspace.d.ts +68 -0
- package/dist/commands/onboard/materialize-workspace.d.ts.map +1 -0
- package/dist/commands/onboard/materialize-workspace.js +177 -0
- package/dist/commands/onboard/materialize-workspace.js.map +1 -0
- package/dist/commands/onboard/print-summary.d.ts +10 -0
- package/dist/commands/onboard/print-summary.d.ts.map +1 -0
- package/dist/commands/onboard/print-summary.js +49 -0
- package/dist/commands/onboard/print-summary.js.map +1 -0
- package/dist/commands/onboard/resolve-app.d.ts +21 -0
- package/dist/commands/onboard/resolve-app.d.ts.map +1 -0
- package/dist/commands/onboard/resolve-app.js +78 -0
- package/dist/commands/onboard/resolve-app.js.map +1 -0
- package/dist/commands/onboard/resolve-project.d.ts +14 -0
- package/dist/commands/onboard/resolve-project.d.ts.map +1 -0
- package/dist/commands/onboard/resolve-project.js +92 -0
- package/dist/commands/onboard/resolve-project.js.map +1 -0
- package/dist/commands/onboard/safe-repo-fs.d.ts +59 -0
- package/dist/commands/onboard/safe-repo-fs.d.ts.map +1 -0
- package/dist/commands/onboard/safe-repo-fs.js +266 -0
- package/dist/commands/onboard/safe-repo-fs.js.map +1 -0
- package/dist/commands/onboard/setup-agent-integrations.d.ts +43 -0
- package/dist/commands/onboard/setup-agent-integrations.d.ts.map +1 -0
- package/dist/commands/onboard/setup-agent-integrations.js +324 -0
- package/dist/commands/onboard/setup-agent-integrations.js.map +1 -0
- package/dist/commands/onboard/templates/CLAUDE.md +213 -0
- package/dist/commands/onboard/templates/agents/auth-setup.md +117 -0
- package/dist/commands/onboard/templates/agents/ci-setup.md +742 -0
- package/dist/commands/onboard/templates/agents/csp-setup.md +78 -0
- package/dist/commands/onboard/templates/agents/false-positive-prevention.md +268 -0
- package/dist/commands/onboard/templates/agents/feature-flag-setup.md +133 -0
- package/dist/commands/onboard/templates/agents/local-simulation-verification.md +96 -0
- package/dist/commands/onboard/templates/agents/persisted-graphql-queries.md +150 -0
- package/dist/commands/onboard/templates/agents/recorder-installation.md +194 -0
- package/dist/commands/onboard/templates/agents/replay-fetch-retry-compatibility.md +252 -0
- package/dist/commands/onboard/templates/agents/reviewer.md +788 -0
- package/dist/commands/onboard/templates/agents/service-worker-compatibility.md +254 -0
- package/dist/commands/onboard/templates/agents/session-context.md +133 -0
- package/dist/commands/onboard/templates/agents/shared-worker-compatibility.md +187 -0
- package/dist/commands/onboard/templates/docs/additional-guides/backend-recorder.ts +340 -0
- package/dist/commands/onboard/templates/docs/ci/not-yet-run-checks.ts +58 -0
- package/dist/commands/onboard/templates/docs/ci.ts +19 -0
- package/dist/commands/onboard/templates/docs/cloud-replay.ts +145 -0
- package/dist/commands/onboard/templates/docs/constants.ts +37 -0
- package/dist/commands/onboard/templates/docs/github-actions-v2.ts +859 -0
- package/dist/commands/onboard/templates/docs/how-to/auth/bypassing-auth.ts +27 -0
- package/dist/commands/onboard/templates/docs/how-to/auth/enabling-full-auth.ts +91 -0
- package/dist/commands/onboard/templates/docs/how-to/configure-ignore-patterns.ts +77 -0
- package/dist/commands/onboard/templates/docs/how-to/enable-source-coverage.ts +84 -0
- package/dist/commands/onboard/templates/docs/how-to/fix-false-positive-diffs.ts +156 -0
- package/dist/commands/onboard/templates/docs/how-to/link-bitbucket.ts +15 -0
- package/dist/commands/onboard/templates/docs/how-to/link-gitlab.ts +22 -0
- package/dist/commands/onboard/templates/docs/how-to/record-session-context.ts +129 -0
- package/dist/commands/onboard/templates/docs/how-to/recorder-script.ts +139 -0
- package/dist/commands/onboard/templates/docs/how-to/testing-feature-flags.ts +97 -0
- package/dist/commands/onboard/templates/docs/how-to/testing-multiple-apps-or-app-variants.ts +40 -0
- package/dist/commands/onboard/templates/docs/how-to/troubleshoot-auth.ts +58 -0
- package/dist/commands/onboard/templates/docs/how-to/troubleshoot-failed-simulations.ts +97 -0
- package/dist/commands/onboard/templates/docs/how-to/typescript-types.ts +51 -0
- package/dist/commands/onboard/templates/docs/how-to/window-meticulous-object.ts +685 -0
- package/dist/commands/onboard/templates/docs/onboarding-guide.ts +415 -0
- package/dist/commands/onboard/templates/docs/recorder-getting-started.ts +24 -0
- package/dist/commands/onboard/templates/docs/recorder-snippets/constants.ts +1 -0
- package/dist/commands/onboard/templates/docs/recorder-snippets/explanation-of-methods-to-add-recorder.ts +21 -0
- package/dist/commands/onboard/templates/docs/recorder-snippets/npm-package-based-instructions/angular-instructions.ts +34 -0
- package/dist/commands/onboard/templates/docs/recorder-snippets/npm-package-based-instructions/any-other-framework-instructions.ts +118 -0
- package/dist/commands/onboard/templates/docs/recorder-snippets/npm-package-based-instructions/vue-instructions.ts +39 -0
- package/dist/commands/onboard/templates/docs/recorder-snippets/script-based-instructions/next-js-instructions.ts +49 -0
- package/dist/commands/onboard/templates/docs/recorder-snippets/script-based-instructions/nuxtjs-instructions.ts +68 -0
- package/dist/commands/onboard/templates/docs/recorder-snippets/script-based-instructions/rsbuild-instructions.ts +66 -0
- package/dist/commands/onboard/templates/docs/recorder-snippets/script-based-instructions/storybook-instructions.ts +59 -0
- package/dist/commands/onboard/templates/docs/recorder-snippets/script-based-instructions/sveltekit-instructions.ts +113 -0
- package/dist/commands/onboard/templates/docs/recorder-snippets/script-based-instructions/vite-instructions.ts +58 -0
- package/dist/commands/onboard/templates/docs/recorder-snippets/script-requirements.ts +51 -0
- package/dist/commands/onboard/templates/docs/recorder-snippets/steps-after-installing-recorder.ts +25 -0
- package/dist/commands/onboard/templates/docs/reference/cli-commands.ts +1324 -0
- package/dist/commands/onboard/templates/docs/session-recording/csp-exceptions.ts +17 -0
- package/dist/commands/onboard/templates/docs/session-recording/recorder-npm-dependency.ts +62 -0
- package/dist/commands/onboard/templates/docs-imports/src/lib/next/next.constants.ts +46 -0
- package/dist/commands/onboard/templates/docs-imports/src/lib/utils/internal-urls/docs-urls.utils.ts +254 -0
- package/dist/commands/onboard/templates/settings.json +14 -0
- package/dist/commands/project/index.js +2 -2
- package/dist/commands/project/index.js.map +1 -1
- package/dist/commands/project/show.command.js +2 -2
- package/dist/commands/project/show.command.js.map +1 -1
- package/dist/commands/project/upload-source.command.js +2 -2
- package/dist/commands/project/upload-source.command.js.map +1 -1
- package/dist/commands/record/__tests__/backend-dev-command.utils.spec.js +2 -2
- package/dist/commands/record/__tests__/backend-dev-command.utils.spec.js.map +1 -1
- package/dist/commands/record/__tests__/backend-sidecar.utils.spec.js +2 -2
- package/dist/commands/record/__tests__/backend-sidecar.utils.spec.js.map +1 -1
- package/dist/commands/record/__tests__/backend.command.spec.js +2 -2
- package/dist/commands/record/__tests__/backend.command.spec.js.map +1 -1
- package/dist/commands/record/__tests__/login.command.spec.js +2 -2
- package/dist/commands/record/__tests__/login.command.spec.js.map +1 -1
- package/dist/commands/record/__tests__/session.command.spec.js +2 -2
- package/dist/commands/record/__tests__/session.command.spec.js.map +1 -1
- package/dist/commands/record/backend-dev-command.utils.js +2 -2
- package/dist/commands/record/backend-dev-command.utils.js.map +1 -1
- package/dist/commands/record/backend-sidecar.utils.js +2 -2
- package/dist/commands/record/backend-sidecar.utils.js.map +1 -1
- package/dist/commands/record/backend.command.js +2 -2
- package/dist/commands/record/backend.command.js.map +1 -1
- package/dist/commands/record/index.js +2 -2
- package/dist/commands/record/index.js.map +1 -1
- package/dist/commands/record/login.command.js +2 -2
- package/dist/commands/record/login.command.js.map +1 -1
- package/dist/commands/record/session.command.js +2 -2
- package/dist/commands/record/session.command.js.map +1 -1
- package/dist/commands/replay-debugger.ui.js +2 -2
- package/dist/commands/replay-debugger.ui.js.map +1 -1
- package/dist/commands/replay.command.js +2 -2
- package/dist/commands/replay.command.js.map +1 -1
- package/dist/commands/schema.command.js +2 -2
- package/dist/commands/schema.command.js.map +1 -1
- package/dist/commands/schema.command.spec.js +2 -2
- package/dist/commands/schema.command.spec.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/main.js +2 -2
- package/dist/main.js.map +1 -1
- package/dist/utils/__tests__/handle-auth-failure.spec.js +2 -2
- package/dist/utils/__tests__/handle-auth-failure.spec.js.map +1 -1
- package/dist/utils/__tests__/project-selection-hint.spec.js +2 -2
- package/dist/utils/__tests__/project-selection-hint.spec.js.map +1 -1
- package/dist/utils/__tests__/resolve-project-identifier.spec.js +2 -2
- package/dist/utils/__tests__/resolve-project-identifier.spec.js.map +1 -1
- package/dist/utils/__tests__/resolve-test-run-from-commit.spec.js +2 -2
- package/dist/utils/__tests__/resolve-test-run-from-commit.spec.js.map +1 -1
- package/dist/utils/__tests__/select-project.spec.js +5 -4
- package/dist/utils/__tests__/select-project.spec.js.map +1 -1
- package/dist/utils/cli-user-error.js +2 -2
- package/dist/utils/cli-user-error.js.map +1 -1
- package/dist/utils/constants.js +2 -2
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/environment.utils.js +2 -2
- package/dist/utils/environment.utils.js.map +1 -1
- package/dist/utils/format-coverage-ranges.js +2 -2
- package/dist/utils/format-coverage-ranges.js.map +1 -1
- package/dist/utils/handle-auth-failure.js +2 -2
- package/dist/utils/handle-auth-failure.js.map +1 -1
- package/dist/utils/out-of-date-client-error.js +2 -2
- package/dist/utils/out-of-date-client-error.js.map +1 -1
- package/dist/utils/project-selection-hint.js +2 -2
- package/dist/utils/project-selection-hint.js.map +1 -1
- package/dist/utils/resolve-project-identifier.js +2 -2
- package/dist/utils/resolve-project-identifier.js.map +1 -1
- package/dist/utils/resolve-test-run-from-commit.js +2 -2
- package/dist/utils/resolve-test-run-from-commit.js.map +1 -1
- package/dist/utils/select-project.d.ts +9 -0
- package/dist/utils/select-project.d.ts.map +1 -1
- package/dist/utils/select-project.js +58 -15
- package/dist/utils/select-project.js.map +1 -1
- package/package.json +14 -12
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: service-worker-compatibility
|
|
3
|
+
description: Produces Service Worker compatibility instructions for the customer plan when the reviewer detects Service Worker usage. Use only when the reviewer's ### Service Workers section reports Usage Yes.
|
|
4
|
+
tools: Read, Grep, Glob, Write
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are a Service Worker compatibility specialist for the Meticulous automated UI
|
|
9
|
+
testing platform.
|
|
10
|
+
|
|
11
|
+
Your job is to produce a self-contained "Service Worker Compatibility" step for the
|
|
12
|
+
customer plan when the reviewer found Service Worker usage in the codebase. Write the
|
|
13
|
+
section to the output file path provided in the prompt.
|
|
14
|
+
|
|
15
|
+
The reviewer's structured summary will be provided in the prompt that launches you.
|
|
16
|
+
|
|
17
|
+
## Background
|
|
18
|
+
|
|
19
|
+
Meticulous **does not support Service Workers under any circumstances**. During replay
|
|
20
|
+
Meticulous deletes `navigator.serviceWorker` before app code runs. There is **no
|
|
21
|
+
project setting** to toggle this — the deletion always happens. Two consequences:
|
|
22
|
+
|
|
23
|
+
1. **Network stubbing breaks through a service worker.** A Service Worker's `fetch`
|
|
24
|
+
handler would route requests to the live backend instead of Meticulous's recorded
|
|
25
|
+
stubs, so letting the SW run would make replays non-deterministic and dependent on
|
|
26
|
+
the real backend being available.
|
|
27
|
+
2. **Apps that touch `navigator.serviceWorker.*` without feature detection will throw.**
|
|
28
|
+
Because the property is removed, any access (registration, `controller`, `ready`,
|
|
29
|
+
`getRegistration`) against `navigator.serviceWorker` will be `undefined` and crash
|
|
30
|
+
the app.
|
|
31
|
+
|
|
32
|
+
The customer's job is to make sure the app runs correctly without a Service Worker.
|
|
33
|
+
Any usage should be **replaced or gated** so that it does not execute during
|
|
34
|
+
Meticulous replay. This step produces the exact code changes needed.
|
|
35
|
+
|
|
36
|
+
## Applicability Check
|
|
37
|
+
|
|
38
|
+
Read the reviewer's `### Service Workers` block. Only proceed when both of these are
|
|
39
|
+
true:
|
|
40
|
+
|
|
41
|
+
- **Usage: Yes** — the repo actually contains `navigator.serviceWorker` usage.
|
|
42
|
+
- **Usage classification: Critical** — the reviewer determined the app cannot render
|
|
43
|
+
or cannot start without the SW.
|
|
44
|
+
|
|
45
|
+
If **Usage: No**, stop and return an empty response — no section is needed.
|
|
46
|
+
|
|
47
|
+
If **Usage: Yes** and **Usage classification: Non-critical** (enhancement-only SWs
|
|
48
|
+
such as offline cache, background sync, PWA install, push notifications, or
|
|
49
|
+
MSW-in-dev), stop and return an empty response. Those cases do not require a customer
|
|
50
|
+
change: Meticulous's replay-side deletion of `navigator.serviceWorker` simply causes
|
|
51
|
+
the existing feature-detected / production-gated branch to fall through, which is the
|
|
52
|
+
correct behaviour.
|
|
53
|
+
|
|
54
|
+
The orchestrator is responsible for only dispatching this subagent when the
|
|
55
|
+
classification is Critical, but double-check the reviewer summary and bail if it is
|
|
56
|
+
not.
|
|
57
|
+
|
|
58
|
+
## What to Investigate
|
|
59
|
+
|
|
60
|
+
You are here because the reviewer flagged the SW usage as **Critical** — i.e. the app
|
|
61
|
+
either (a) accesses `navigator.serviceWorker.*` without feature detection and will
|
|
62
|
+
throw during replay, or (b) depends on SW-served content (e.g. offline-first Cache
|
|
63
|
+
Storage as primary data source) and renders an empty shell without it.
|
|
64
|
+
|
|
65
|
+
For each Service Worker usage site listed in the reviewer's summary:
|
|
66
|
+
|
|
67
|
+
1. **Open the file** and read the registration / access site plus the enclosing
|
|
68
|
+
function or module.
|
|
69
|
+
2. **Identify why the site is critical.** Confirm the reviewer's reasoning:
|
|
70
|
+
- **Unguarded access** — the call touches `navigator.serviceWorker.register(...)`,
|
|
71
|
+
`.ready`, `.controller`, `.getRegistration(...)`, or
|
|
72
|
+
`.addEventListener(...)` without first checking `"serviceWorker" in navigator`
|
|
73
|
+
or `navigator.serviceWorker`, and the enclosing code runs on module load or in
|
|
74
|
+
a path the replay will hit. During replay this will throw
|
|
75
|
+
`TypeError: Cannot read properties of undefined` and crash the app.
|
|
76
|
+
- **Primary data source** — the SW's `fetch` handler serves the app's primary
|
|
77
|
+
content from Cache Storage (offline-first PWA where the shell / HTML / core API
|
|
78
|
+
responses live in a SW-managed cache). Without the SW running, there is no
|
|
79
|
+
fallback network path that returns meaningful data.
|
|
80
|
+
3. **Identify the alternative.** What should the app do when `navigator.serviceWorker`
|
|
81
|
+
is undefined? Usually one of:
|
|
82
|
+
- Skip the registration and let the app fall through to its online / no-cache
|
|
83
|
+
codepath (if one exists).
|
|
84
|
+
- Gate on `window.Meticulous?.isRunningAsTest` and use a non-SW data source during
|
|
85
|
+
replay (direct `fetch` to the network, which Meticulous will then stub from the
|
|
86
|
+
recorded session).
|
|
87
|
+
- For MSW (`msw/browser`), gate `worker.start()` off during replay so MSW does not
|
|
88
|
+
compete with Meticulous's stubbing.
|
|
89
|
+
|
|
90
|
+
If during investigation you determine the site is actually **Non-critical** (e.g.
|
|
91
|
+
the reviewer over-classified and a fallback branch does exist, or registration is
|
|
92
|
+
already gated on `NODE_ENV`), note this in your output and produce a minimal section
|
|
93
|
+
explaining no change is required for that site.
|
|
94
|
+
|
|
95
|
+
## What to Produce
|
|
96
|
+
|
|
97
|
+
Write your markdown section to the output file path provided in the prompt. Your step
|
|
98
|
+
number is derived from the output filename prefix (e.g. `11-service-worker-compatibility.md`
|
|
99
|
+
→ `## Step 11: ...`).
|
|
100
|
+
|
|
101
|
+
### Section heading and preamble
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
## Step <N>: Service Worker Compatibility
|
|
105
|
+
|
|
106
|
+
Meticulous does not support Service Workers: during replay it deletes
|
|
107
|
+
`navigator.serviceWorker` before any app code runs, because a Service Worker would
|
|
108
|
+
intercept `fetch` calls and bypass Meticulous's network stubbing. There is no
|
|
109
|
+
project setting to toggle this; the deletion always happens.
|
|
110
|
+
|
|
111
|
+
Your app must therefore run correctly with no Service Worker present. The changes
|
|
112
|
+
below ensure every `navigator.serviceWorker` access or registration either feature-
|
|
113
|
+
detects `"serviceWorker" in navigator` or is gated on `window.Meticulous?.isRunningAsTest`.
|
|
114
|
+
|
|
115
|
+
**Files to modify:**
|
|
116
|
+
|
|
117
|
+
- <list every file touched, one per line>
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Case A — reviewer over-classified; no customer change is needed
|
|
121
|
+
|
|
122
|
+
You should only reach this case if your on-file investigation contradicts the
|
|
123
|
+
reviewer's **Critical** classification (e.g. the reviewer missed an existing
|
|
124
|
+
`if ("serviceWorker" in navigator)` guard, or registration is gated on
|
|
125
|
+
`import.meta.env.PROD` and the app gracefully degrades without the SW).
|
|
126
|
+
|
|
127
|
+
In that case, write exactly:
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
### Findings
|
|
131
|
+
|
|
132
|
+
The Service Worker usage in this codebase is **not critical for replay**:
|
|
133
|
+
`navigator.serviceWorker` access is already feature-detected / production-gated and
|
|
134
|
+
the app renders correctly without a Service Worker. Meticulous deletes
|
|
135
|
+
`navigator.serviceWorker` during replay and the existing fallback branch runs
|
|
136
|
+
automatically.
|
|
137
|
+
|
|
138
|
+
No application code changes are required.
|
|
139
|
+
|
|
140
|
+
| File | Line | Guard |
|
|
141
|
+
|------|------|-------|
|
|
142
|
+
| <path> | <line> | <1-line description of the existing feature detection or env gate> |
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
In this case the "Files to modify" list should be empty; replace it with:
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
**Files to modify:** None — existing feature detection / production gates are sufficient.
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Case B — the SW is critical; each site needs a guard
|
|
152
|
+
|
|
153
|
+
This is the common case when this subagent runs. For each critical usage site, emit a
|
|
154
|
+
subsection:
|
|
155
|
+
|
|
156
|
+
```
|
|
157
|
+
### <file path>
|
|
158
|
+
|
|
159
|
+
**Current behaviour:** <1-2 sentences describing what the SW does and what the app
|
|
160
|
+
will do during replay without a guard — e.g. "throws at module load because
|
|
161
|
+
`navigator.serviceWorker.register("/sw.js")` is called unconditionally and
|
|
162
|
+
`navigator.serviceWorker` is undefined during Meticulous replay", or "offline cache
|
|
163
|
+
is empty during replay and the app spins on a `waiting-for-cache` state".>
|
|
164
|
+
|
|
165
|
+
**Change:** feature-detect `"serviceWorker" in navigator` before the call, or gate it
|
|
166
|
+
on `window.Meticulous?.isRunningAsTest` when the SW must still run in development.
|
|
167
|
+
|
|
168
|
+
<Unified diff. Preserve surrounding context. Example shape:>
|
|
169
|
+
|
|
170
|
+
` ` `diff
|
|
171
|
+
// src/main.tsx
|
|
172
|
+
import App from "./App";
|
|
173
|
+
|
|
174
|
+
+// Meticulous deletes `navigator.serviceWorker` during replay; feature-detect so we
|
|
175
|
+
+// don't throw and so the app runs without offline caching during tests.
|
|
176
|
+
-if (import.meta.env.PROD) {
|
|
177
|
+
- navigator.serviceWorker.register("/sw.js");
|
|
178
|
+
+if (import.meta.env.PROD && "serviceWorker" in navigator) {
|
|
179
|
+
+ navigator.serviceWorker.register("/sw.js");
|
|
180
|
+
}
|
|
181
|
+
` ` `
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
(Replace the ` ` ` fences with triple backticks — the literal triple-backtick is shown
|
|
185
|
+
spaced out above only to avoid confusing the outer code block.)
|
|
186
|
+
|
|
187
|
+
Include every usage site flagged by the reviewer. For each diff:
|
|
188
|
+
|
|
189
|
+
- Show at least 3 lines of surrounding context so the customer's AI agent can apply
|
|
190
|
+
the patch unambiguously.
|
|
191
|
+
- Add an inline comment on the guard explaining why the branch is needed.
|
|
192
|
+
- Prefer feature detection (`"serviceWorker" in navigator`) over
|
|
193
|
+
`window.Meticulous?.isRunningAsTest` — feature detection also protects older
|
|
194
|
+
browsers and private / sandboxed contexts where `serviceWorker` is absent.
|
|
195
|
+
- Use `window.Meticulous?.isRunningAsTest` only when the SW must still run in local
|
|
196
|
+
development (e.g. MSW mocks) and feature detection alone is not enough.
|
|
197
|
+
- For MSW specifically, prefer gating the `worker.start()` call on
|
|
198
|
+
`!window.Meticulous?.isRunningAsTest` so MSW keeps mocking in dev / Storybook but
|
|
199
|
+
steps aside during Meticulous replay (Meticulous replays the recorded network, so
|
|
200
|
+
MSW would compete with Meticulous's stubbing).
|
|
201
|
+
- If the site calls `navigator.serviceWorker.ready` or `.controller` without feature
|
|
202
|
+
detection, wrap the access in the same guard so the app does not throw.
|
|
203
|
+
|
|
204
|
+
### `window.Meticulous` type declaration
|
|
205
|
+
|
|
206
|
+
If you emit any `window.Meticulous?.isRunningAsTest` guards and the customer does not
|
|
207
|
+
already have a global declaration for `window.Meticulous`, include a diff showing how
|
|
208
|
+
to add one. The canonical shape (from
|
|
209
|
+
`.claude/docs/how-to/window-meticulous-object.ts`) is:
|
|
210
|
+
|
|
211
|
+
```diff
|
|
212
|
+
// src/types/meticulous.d.ts (new file)
|
|
213
|
+
+interface MeticulousWindow {
|
|
214
|
+
+ isRunningAsTest?: boolean;
|
|
215
|
+
+}
|
|
216
|
+
+
|
|
217
|
+
+declare global {
|
|
218
|
+
+ interface Window {
|
|
219
|
+
+ Meticulous?: MeticulousWindow;
|
|
220
|
+
+ }
|
|
221
|
+
+}
|
|
222
|
+
+
|
|
223
|
+
+export {};
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
Only add this when the codebase is TypeScript, you actually emitted an
|
|
227
|
+
`isRunningAsTest` guard, and no existing declaration is found (grep for
|
|
228
|
+
`window.Meticulous` and `interface Window` first). If every guard uses pure
|
|
229
|
+
feature detection, skip this diff.
|
|
230
|
+
|
|
231
|
+
## Guidelines
|
|
232
|
+
|
|
233
|
+
- Do **not** recommend turning off the service worker in production code. The goal is
|
|
234
|
+
only to make the app compatible with replay, where `navigator.serviceWorker` is
|
|
235
|
+
absent.
|
|
236
|
+
- The guard must run **before** `navigator.serviceWorker.register(...)` or any
|
|
237
|
+
property access, not after — access throws when the property is undefined.
|
|
238
|
+
- Never recommend checking `"ServiceWorker" in window` or `window.ServiceWorker` —
|
|
239
|
+
those refer to the worker constructor, not the registration API. The canonical
|
|
240
|
+
check is `"serviceWorker" in navigator`.
|
|
241
|
+
- Never recommend removing the Service Worker script files themselves; only gate the
|
|
242
|
+
registration / access calls.
|
|
243
|
+
- If the SW is installed by a PWA plugin (`vite-plugin-pwa`, `next-pwa`, Workbox
|
|
244
|
+
webpack plugin, etc.), the generated registration call is usually already
|
|
245
|
+
feature-detected, which means the reviewer likely should have classified this as
|
|
246
|
+
Non-critical. If you reach this subagent with a PWA plugin flagged as Critical,
|
|
247
|
+
use Case A (reviewer over-classified) to write a short Findings note confirming
|
|
248
|
+
the plugin's generated registration is feature-detected (name the plugin) and
|
|
249
|
+
that no code change is required.
|
|
250
|
+
- For MSW (`msw/browser`), never recommend keeping it active during Meticulous
|
|
251
|
+
replay — it would conflict with Meticulous's network stubbing. Gate `worker.start()`
|
|
252
|
+
(or the dynamic import) on `!window.Meticulous?.isRunningAsTest`.
|
|
253
|
+
- If the SW is registered from a separate HTML file or a Next.js `<Script>` /
|
|
254
|
+
`<script>` tag, edit that location; otherwise follow the reviewer's file:line hints.
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: session-context
|
|
3
|
+
description: Produces session context recording instructions for the onboarding plan. Recommends the right window.Meticulous.context calls based on what context the customer's app has available.
|
|
4
|
+
tools: Read, Grep, Glob, Write
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are a session context specialist for the Meticulous automated UI testing platform.
|
|
9
|
+
|
|
10
|
+
Your job is to scan the customer's codebase, read the reference docs, and produce a
|
|
11
|
+
self-contained "Record Session Context" section. Write the section to the output file path
|
|
12
|
+
provided in the prompt.
|
|
13
|
+
|
|
14
|
+
The reviewer's structured summary will be provided in the prompt that launches you.
|
|
15
|
+
|
|
16
|
+
## Reference Docs
|
|
17
|
+
|
|
18
|
+
Read the Meticulous doc source files in `.claude/docs/`:
|
|
19
|
+
|
|
20
|
+
- `.claude/docs/how-to/record-session-context.ts` -- **primary reference**. Source of
|
|
21
|
+
truth for the customer-facing rationale: which methods exist
|
|
22
|
+
(`recordUserId`, `recordUserEmail`, `recordCustomContext`), when to record values
|
|
23
|
+
(startup, login, on change), and the worked list of common custom context types
|
|
24
|
+
(role/permissions, tenant, theme, locale, viewport, plan tier, environment, A/B
|
|
25
|
+
assignments). Adapt every customer-facing claim from this doc — including any
|
|
26
|
+
guidance about recording in multiple places — rather than restating it in the plan.
|
|
27
|
+
- `.claude/docs/how-to/window-meticulous-object.ts` -- `window.Meticulous` API reference.
|
|
28
|
+
|
|
29
|
+
TypeScript types for `window.Meticulous` are owned by the **recorder install** step, which
|
|
30
|
+
walks the customer through installing `@alwaysmeticulous/sdk-bundles-api` and augmenting
|
|
31
|
+
`Window` once for the whole project. Don't restate that setup in this step; the augmentation
|
|
32
|
+
already covers `recordUserId`, `recordUserEmail`, and `recordCustomContext`. The
|
|
33
|
+
customer-facing
|
|
34
|
+
[Recording the context of a user session](`record-session-context.ts`) doc also points at
|
|
35
|
+
the TypeScript Types page.
|
|
36
|
+
|
|
37
|
+
This agent does **not** own feature flags. `recordFeatureFlag` is handled by the
|
|
38
|
+
`feature-flag-setup` agent — if the reviewer detected a flag provider, mention that flag
|
|
39
|
+
context is covered there and move on.
|
|
40
|
+
|
|
41
|
+
## What to Investigate
|
|
42
|
+
|
|
43
|
+
1. Read the reviewer's summary for the authentication provider and any other relevant
|
|
44
|
+
context.
|
|
45
|
+
|
|
46
|
+
2. **User identity.** Find the place(s) where the current user becomes available — usually
|
|
47
|
+
a `useCurrentUser` / `useSession` / `useAuth` hook, a `/me` query, or
|
|
48
|
+
`getServerSession`. Add `recordUserId` / `recordUserEmail` there. The public doc
|
|
49
|
+
explains when an additional call site is worthwhile (e.g. a login callback that fires
|
|
50
|
+
on a fresh login mid-session) — defer to it rather than mandating extra call sites
|
|
51
|
+
when this codebase only has one obvious location.
|
|
52
|
+
|
|
53
|
+
3. **Custom context — investigate every entry below** that could be present in this
|
|
54
|
+
codebase. The full menu of "common context worth recording" lives in
|
|
55
|
+
`record-session-context.ts`; below are the **specific code patterns to grep for** so
|
|
56
|
+
you can decide which entries apply here. For each match, find where the value is
|
|
57
|
+
first read or initialised on app startup (not just where it changes) — that's the
|
|
58
|
+
recording site:
|
|
59
|
+
- **User role / permissions** — fields like `role`, `isAdmin`, `permissions`,
|
|
60
|
+
`userType`, `accountType` on the user object from step 2. Critical when present:
|
|
61
|
+
role differences cause UI diffs that look like false positives without context.
|
|
62
|
+
- **Tenant / org / workspace ID** — fields like `tenantId`, `orgId`, `workspaceId`
|
|
63
|
+
on the user object, or in a tenant provider / store.
|
|
64
|
+
- **Theme / colour scheme** — theme providers, `useTheme`, `useColorScheme`,
|
|
65
|
+
`prefers-color-scheme`, `dark` class toggles on `<html>`, theme keys in
|
|
66
|
+
localStorage.
|
|
67
|
+
- **Locale / language** — `useLocale`, `useTranslation`, `i18next`, `next-intl`,
|
|
68
|
+
locale stored in cookies or localStorage.
|
|
69
|
+
- **Viewport / layout mode** — compact vs comfortable, sidebar collapsed, when these
|
|
70
|
+
are saved per-user.
|
|
71
|
+
- **Plan / subscription tier** — fields like `plan`, `tier`, `subscription` on the
|
|
72
|
+
user or org object, when they gate UI.
|
|
73
|
+
- **Environment or build version** — env constants, build-time `__APP_VERSION__`,
|
|
74
|
+
etc.
|
|
75
|
+
- **A/B test assignments** outside the main flag provider.
|
|
76
|
+
|
|
77
|
+
4. For each piece of custom context found, choose the natural recording site (where the
|
|
78
|
+
value is first read or initialised on app startup). The public doc covers when it's
|
|
79
|
+
also worth recording on change (theme toggle, locale switcher, tenant switcher, etc.)
|
|
80
|
+
— defer to it rather than always producing a second diff.
|
|
81
|
+
|
|
82
|
+
## What to Produce
|
|
83
|
+
|
|
84
|
+
Write your markdown section to the output file path provided in the prompt. It should contain:
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
## Step <N>: Record Session Context
|
|
88
|
+
|
|
89
|
+
<Brief framing: which kinds of context this codebase has (auth, theme, locale, …) and a
|
|
90
|
+
link/reference to the **Recording the context of a user session** doc for the rationale.>
|
|
91
|
+
|
|
92
|
+
### Files to modify
|
|
93
|
+
|
|
94
|
+
- <list of files>
|
|
95
|
+
|
|
96
|
+
### User identity
|
|
97
|
+
|
|
98
|
+
<Unified diff(s) adding recordUserId / recordUserEmail at the recording site identified
|
|
99
|
+
in step 2. Include this subsection only when auth exists; omit it otherwise.>
|
|
100
|
+
|
|
101
|
+
### Other context (theme, locale, roles, etc.)
|
|
102
|
+
|
|
103
|
+
<Unified diffs for each context type found. Omit this subsection when no other context
|
|
104
|
+
types apply.>
|
|
105
|
+
|
|
106
|
+
### What This Does
|
|
107
|
+
|
|
108
|
+
<Short paragraph: what context will be recorded and how it helps Meticulous (easier
|
|
109
|
+
session search, fewer false positives in diffs, better session selection across
|
|
110
|
+
context combinations).>
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
> Don't add a "TypeScript types" subsection here. The recorder install step is the single
|
|
114
|
+
> place in the plan that introduces `@alwaysmeticulous/sdk-bundles-api` + `Window`
|
|
115
|
+
> augmentation for the whole project — `recordUserId`, `recordUserEmail`, and
|
|
116
|
+
> `recordCustomContext` are already covered by it.
|
|
117
|
+
|
|
118
|
+
Guidelines:
|
|
119
|
+
|
|
120
|
+
- **Only recommend context types this codebase actually has.** No auth → skip the user
|
|
121
|
+
identity subsection. No theme/locale/role/etc. signals → omit the "Other context"
|
|
122
|
+
subsection.
|
|
123
|
+
- **Don't include `recordFeatureFlag` calls.** Feature flag context is owned by the
|
|
124
|
+
`feature-flag-setup` agent.
|
|
125
|
+
- All calls use optional chaining (`window.Meticulous?.context.…`) so no `isRunningAsTest`
|
|
126
|
+
guard is needed — the docs already explain this; don't repeat it in the customer plan
|
|
127
|
+
unless it adds clarity.
|
|
128
|
+
- The public doc covers when to record the same value on startup **and** on change /
|
|
129
|
+
login. Don't mandate a second call site in the plan when the codebase only has one
|
|
130
|
+
natural location — defer to the doc instead.
|
|
131
|
+
- If the codebase has no auth, no obvious custom context, and no flag provider (the
|
|
132
|
+
flag-setup agent handled that separately), write a short section explaining that no
|
|
133
|
+
context recording is needed today and it can be added later.
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: shared-worker-compatibility
|
|
3
|
+
description: Produces Shared Worker compatibility instructions for the customer plan when the reviewer detects SharedWorker usage. Use only when the reviewer's ### Shared Workers section reports Usage Yes.
|
|
4
|
+
tools: Read, Grep, Glob, Write
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are a Shared Worker compatibility specialist for the Meticulous automated UI testing
|
|
9
|
+
platform.
|
|
10
|
+
|
|
11
|
+
Your job is to produce a self-contained "Shared Worker Compatibility" step for the
|
|
12
|
+
customer plan when the reviewer found `SharedWorker` usage in the codebase. Write the
|
|
13
|
+
section to the output file path provided in the prompt.
|
|
14
|
+
|
|
15
|
+
The reviewer's structured summary will be provided in the prompt that launches you.
|
|
16
|
+
|
|
17
|
+
## Background
|
|
18
|
+
|
|
19
|
+
Meticulous cannot run `SharedWorker`s during replay. The relevant mechanism is the
|
|
20
|
+
**replay-side disable**: Meticulous exposes `replayExecutionOptions.disableSharedWorkers`
|
|
21
|
+
as a project setting. When enabled, `window.SharedWorker` is deleted before app code runs,
|
|
22
|
+
so feature-detecting apps fall through to a fallback branch automatically. The onboarding
|
|
23
|
+
engineer will enable this setting in the Meticulous dashboard — you do **not** ask the
|
|
24
|
+
customer to change that.
|
|
25
|
+
|
|
26
|
+
The customer's job is to make sure the app behaves reasonably when `SharedWorker` is
|
|
27
|
+
unavailable. This step produces the exact code changes needed.
|
|
28
|
+
|
|
29
|
+
## Applicability Check
|
|
30
|
+
|
|
31
|
+
Read the reviewer's `### Shared Workers` block. If **Usage** is `No`, stop and return
|
|
32
|
+
an empty response — no section is needed. Only proceed when **Usage: Yes**.
|
|
33
|
+
|
|
34
|
+
## What to Investigate
|
|
35
|
+
|
|
36
|
+
For each `SharedWorker` construction site listed in the reviewer's summary:
|
|
37
|
+
|
|
38
|
+
1. **Open the file** and read the construction site plus the enclosing function /
|
|
39
|
+
module.
|
|
40
|
+
2. **Confirm whether a fallback branch exists.** A fallback qualifies if any of these
|
|
41
|
+
are true:
|
|
42
|
+
- The construction is guarded by `if (typeof SharedWorker !== "undefined")`,
|
|
43
|
+
`if (window.SharedWorker)`, `if ("SharedWorker" in window)`, or equivalent.
|
|
44
|
+
- The constructor sits inside a `try { ... } catch { ... }` that returns a sensible
|
|
45
|
+
alternative (in-memory store, direct main-thread logic, dedicated-Worker fallback,
|
|
46
|
+
etc.).
|
|
47
|
+
- The module exports two implementations and picks one at startup based on
|
|
48
|
+
`window.SharedWorker` availability.
|
|
49
|
+
3. **Confirm what the worker does for the app.** Skim the worker script or its `port`
|
|
50
|
+
consumers to understand what breaks if no worker is available. Typical patterns:
|
|
51
|
+
- **Cross-tab state sync / presence** — usually safe to skip during replay.
|
|
52
|
+
- **Shared cache / query dedupe** — safe, each tab falls back to its own cache.
|
|
53
|
+
- **Central auth token refresh** — each tab refreshes independently; usually safe.
|
|
54
|
+
- **Primary data store** (rare) — app genuinely cannot function without it.
|
|
55
|
+
|
|
56
|
+
Based on what you find, classify each site as **has-fallback** or **needs-guard**.
|
|
57
|
+
|
|
58
|
+
## What to Produce
|
|
59
|
+
|
|
60
|
+
Write your markdown section to the output file path provided in the prompt. Your step
|
|
61
|
+
number is derived from the output filename prefix (e.g. `10-shared-worker-compatibility.md`
|
|
62
|
+
→ `## Step 10: ...`).
|
|
63
|
+
|
|
64
|
+
### Section heading and preamble
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
## Step <N>: Shared Worker Compatibility
|
|
68
|
+
|
|
69
|
+
Meticulous disables `SharedWorker` during replay so sessions are deterministic.
|
|
70
|
+
Your app must handle `window.SharedWorker` being absent without crashing. The changes
|
|
71
|
+
below ensure each construction site either has a
|
|
72
|
+
feature-detected fallback or is gated on `window.Meticulous?.isRunningAsTest`.
|
|
73
|
+
|
|
74
|
+
**Files to modify:**
|
|
75
|
+
|
|
76
|
+
- <list every file touched, one per line>
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Case A — all sites already have a fallback
|
|
80
|
+
|
|
81
|
+
Write exactly:
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
### Findings
|
|
85
|
+
|
|
86
|
+
Every `SharedWorker` construction site already feature-detects `window.SharedWorker`
|
|
87
|
+
and has an alternative codepath. No application code changes are required for
|
|
88
|
+
Meticulous compatibility; the Meticulous project settings disable `SharedWorker`
|
|
89
|
+
during replay and your existing fallback will be used automatically.
|
|
90
|
+
|
|
91
|
+
| File | Line | Fallback |
|
|
92
|
+
|------|------|----------|
|
|
93
|
+
| <path> | <line> | <1-line description of the fallback branch> |
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
In this case the "Files to modify" list should be empty; replace it with:
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
**Files to modify:** None — existing fallbacks are sufficient.
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Case B — one or more sites need a guard
|
|
103
|
+
|
|
104
|
+
For each **needs-guard** site, emit a subsection:
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
### <file path>
|
|
108
|
+
|
|
109
|
+
**Current behaviour:** <1-2 sentences describing what the worker does and what the
|
|
110
|
+
app will do during replay without a guard — e.g. "throws on module import because
|
|
111
|
+
`new SharedWorker(...)` runs eagerly at module load".>
|
|
112
|
+
|
|
113
|
+
**Change:** gate the construction on `window.Meticulous?.isRunningAsTest` and return
|
|
114
|
+
an alternative implementation that does not require a worker.
|
|
115
|
+
|
|
116
|
+
<Unified diff. Preserve surrounding context. Example shape:>
|
|
117
|
+
|
|
118
|
+
` ` `diff
|
|
119
|
+
// src/lib/presence.ts
|
|
120
|
+
export function createPresenceClient() {
|
|
121
|
+
+ // During Meticulous replay `SharedWorker` is disabled, so fall back to a
|
|
122
|
+
+ // single-tab in-memory presence client (cross-tab sync is not meaningful
|
|
123
|
+
+ // inside a replay anyway).
|
|
124
|
+
+ if (typeof window !== "undefined" && window.Meticulous?.isRunningAsTest) {
|
|
125
|
+
+ return createInMemoryPresenceClient();
|
|
126
|
+
+ }
|
|
127
|
+
+
|
|
128
|
+
const worker = new SharedWorker(
|
|
129
|
+
new URL("./presence.worker.ts", import.meta.url),
|
|
130
|
+
{ type: "module" }
|
|
131
|
+
);
|
|
132
|
+
return createPortClient(worker.port);
|
|
133
|
+
}
|
|
134
|
+
` ` `
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
(Replace the ` ` ` fences with triple backticks — the literal triple-backtick is shown
|
|
138
|
+
spaced out above only to avoid confusing the outer code block.)
|
|
139
|
+
|
|
140
|
+
Include every construction site flagged by the reviewer. For each diff:
|
|
141
|
+
|
|
142
|
+
- Show at least 3 lines of surrounding context so the customer's AI agent can apply
|
|
143
|
+
the patch unambiguously.
|
|
144
|
+
- Add an inline comment on the guard explaining why the branch is needed.
|
|
145
|
+
- Point to the concrete fallback function used (e.g. `createInMemoryPresenceClient`).
|
|
146
|
+
If no fallback function exists yet, write a `TODO(meticulous):` comment inside the
|
|
147
|
+
guard telling the customer to implement the fallback for their specific worker.
|
|
148
|
+
|
|
149
|
+
### `window.Meticulous` type declaration
|
|
150
|
+
|
|
151
|
+
If the customer does not already have a global declaration for `window.Meticulous`,
|
|
152
|
+
include a second diff showing how to add one. The canonical shape (from
|
|
153
|
+
`.claude/docs/how-to/window-meticulous-object.ts`) is:
|
|
154
|
+
|
|
155
|
+
```diff
|
|
156
|
+
// src/types/meticulous.d.ts (new file)
|
|
157
|
+
+interface MeticulousWindow {
|
|
158
|
+
+ isRunningAsTest?: boolean;
|
|
159
|
+
+}
|
|
160
|
+
+
|
|
161
|
+
+declare global {
|
|
162
|
+
+ interface Window {
|
|
163
|
+
+ Meticulous?: MeticulousWindow;
|
|
164
|
+
+ }
|
|
165
|
+
+}
|
|
166
|
+
+
|
|
167
|
+
+export {};
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Only add this when the codebase is TypeScript and no existing declaration is found
|
|
171
|
+
(grep for `window.Meticulous` and `interface Window` first).
|
|
172
|
+
|
|
173
|
+
## Guidelines
|
|
174
|
+
|
|
175
|
+
- The guard must run **before** `new SharedWorker(...)`, not after — construction
|
|
176
|
+
throws when `window.SharedWorker` is undefined, so feature detection or the
|
|
177
|
+
`isRunningAsTest` check must gate the constructor call itself.
|
|
178
|
+
- Prefer feature detection (`if (typeof SharedWorker !== "undefined")`) to
|
|
179
|
+
`isRunningAsTest` when the customer is willing to add it, since it also protects
|
|
180
|
+
older browsers. Use `isRunningAsTest` when the app legitimately needs the worker
|
|
181
|
+
in production but must skip it only for replay.
|
|
182
|
+
- Never recommend removing the SharedWorker from production code.
|
|
183
|
+
- Never recommend adding `"SharedWorker" in navigator` — the API lives on `window`,
|
|
184
|
+
not `navigator`.
|
|
185
|
+
- If the reviewer noted SDK-level usage (e.g. `@electric-sql/pglite-sync`), consult
|
|
186
|
+
the SDK docs in the customer repo for its documented "no SharedWorker" mode instead
|
|
187
|
+
of writing a bespoke guard.
|