@posthog/wizard 2.9.1 → 2.10.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 +40 -0
- package/dist/McpScreen-BmHapIaP.js +3357 -0
- package/dist/McpScreen-BmHapIaP.js.map +1 -0
- package/dist/add-mcp-server-to-clients-DZtISNrs.js +455 -0
- package/dist/add-mcp-server-to-clients-DZtISNrs.js.map +1 -0
- package/dist/agent-runner-CGwrcr57.js +1112 -0
- package/dist/agent-runner-CGwrcr57.js.map +1 -0
- package/dist/agent-skill-BVjJqol6.js +59 -0
- package/dist/agent-skill-BVjJqol6.js.map +1 -0
- package/dist/analytics-C4jO5Qda.js +207 -0
- package/dist/analytics-C4jO5Qda.js.map +1 -0
- package/dist/analytics-CpjaBpx6.js +2 -0
- package/dist/bin.d.ts +1 -2
- package/dist/bin.js +635 -521
- package/dist/bin.js.map +1 -1
- package/dist/craft-pre-release.sh +10 -0
- package/dist/debug-CIyf0ZGx.js +2 -0
- package/dist/debug-CyJ_3dTP.js +201 -0
- package/dist/debug-CyJ_3dTP.js.map +1 -0
- package/dist/defaults-DoVkE0gW.js +234 -0
- package/dist/defaults-DoVkE0gW.js.map +1 -0
- package/dist/detection-CkLpxBCD.js +122 -0
- package/dist/detection-CkLpxBCD.js.map +1 -0
- package/dist/env-api-key-K8TdTDII.js +20 -0
- package/dist/env-api-key-K8TdTDII.js.map +1 -0
- package/dist/file-utils-BWneZy6p.js +38 -0
- package/dist/file-utils-BWneZy6p.js.map +1 -0
- package/dist/generate-version.cjs +11 -0
- package/dist/package-json-BQgl5C3Z.js +2 -0
- package/dist/package-json-Ctq6LSl8.js +25 -0
- package/dist/package-json-Ctq6LSl8.js.map +1 -0
- package/dist/package-manager-nUQ-ebjr.js +222 -0
- package/dist/package-manager-nUQ-ebjr.js.map +1 -0
- package/dist/posthog-integration-BzxdDK4z.js +230 -0
- package/dist/posthog-integration-BzxdDK4z.js.map +1 -0
- package/dist/readiness-Dn7eq8NE.js +2156 -0
- package/dist/readiness-Dn7eq8NE.js.map +1 -0
- package/dist/registry-s55_iuJT.js +2922 -0
- package/dist/registry-s55_iuJT.js.map +1 -0
- package/dist/rolldown-runtime-B_-DWIq7.js +15 -0
- package/dist/router-D5A1Sb4p.js +141 -0
- package/dist/router-D5A1Sb4p.js.map +1 -0
- package/dist/setup-utils-CdDnllRW.js +928 -0
- package/dist/setup-utils-CdDnllRW.js.map +1 -0
- package/dist/smoke-test-ci.sh +165 -0
- package/dist/start-playground-B8qCLu7U.js +1005 -0
- package/dist/start-playground-B8qCLu7U.js.map +1 -0
- package/dist/start-tui-PygiIyNC.js +1887 -0
- package/dist/start-tui-PygiIyNC.js.map +1 -0
- package/dist/steps-CySv8XdD.js +146 -0
- package/dist/steps-CySv8XdD.js.map +1 -0
- package/dist/telemetry-Ct_GGkSO.js +13 -0
- package/dist/telemetry-Ct_GGkSO.js.map +1 -0
- package/dist/wizard-abort-7HUIsqv1.js +39 -0
- package/dist/wizard-abort-7HUIsqv1.js.map +1 -0
- package/dist/wizard-abort-Dhjb2o08.js +2 -0
- package/dist/wizard-session-Db6R023m.js +62 -0
- package/dist/wizard-session-Db6R023m.js.map +1 -0
- package/dist/wizard-session-y7nf6aKH.js +2 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +16 -8
- package/dist/src/__tests__/cli.test.d.ts +0 -1
- package/dist/src/__tests__/cli.test.js +0 -256
- package/dist/src/__tests__/cli.test.js.map +0 -1
- package/dist/src/__tests__/package-json.test.d.ts +0 -1
- package/dist/src/__tests__/package-json.test.js +0 -173
- package/dist/src/__tests__/package-json.test.js.map +0 -1
- package/dist/src/__tests__/wizard-abort.test.d.ts +0 -1
- package/dist/src/__tests__/wizard-abort.test.js +0 -148
- package/dist/src/__tests__/wizard-abort.test.js.map +0 -1
- package/dist/src/frameworks/android/android-wizard-agent.d.ts +0 -6
- package/dist/src/frameworks/android/android-wizard-agent.js +0 -142
- package/dist/src/frameworks/android/android-wizard-agent.js.map +0 -1
- package/dist/src/frameworks/android/utils.d.ts +0 -11
- package/dist/src/frameworks/android/utils.js +0 -97
- package/dist/src/frameworks/android/utils.js.map +0 -1
- package/dist/src/frameworks/angular/angular-wizard-agent.d.ts +0 -4
- package/dist/src/frameworks/angular/angular-wizard-agent.js +0 -65
- package/dist/src/frameworks/angular/angular-wizard-agent.js.map +0 -1
- package/dist/src/frameworks/angular/utils.d.ts +0 -4
- package/dist/src/frameworks/angular/utils.js +0 -9
- package/dist/src/frameworks/angular/utils.js.map +0 -1
- package/dist/src/frameworks/astro/astro-wizard-agent.d.ts +0 -7
- package/dist/src/frameworks/astro/astro-wizard-agent.js +0 -102
- package/dist/src/frameworks/astro/astro-wizard-agent.js.map +0 -1
- package/dist/src/frameworks/astro/utils.d.ts +0 -14
- package/dist/src/frameworks/astro/utils.js +0 -114
- package/dist/src/frameworks/astro/utils.js.map +0 -1
- package/dist/src/frameworks/django/django-wizard-agent.d.ts +0 -8
- package/dist/src/frameworks/django/django-wizard-agent.js +0 -173
- package/dist/src/frameworks/django/django-wizard-agent.js.map +0 -1
- package/dist/src/frameworks/django/utils.d.ts +0 -31
- package/dist/src/frameworks/django/utils.js +0 -306
- package/dist/src/frameworks/django/utils.js.map +0 -1
- package/dist/src/frameworks/fastapi/fastapi-wizard-agent.d.ts +0 -5
- package/dist/src/frameworks/fastapi/fastapi-wizard-agent.js +0 -191
- package/dist/src/frameworks/fastapi/fastapi-wizard-agent.js.map +0 -1
- package/dist/src/frameworks/fastapi/utils.d.ts +0 -26
- package/dist/src/frameworks/fastapi/utils.js +0 -258
- package/dist/src/frameworks/fastapi/utils.js.map +0 -1
- package/dist/src/frameworks/flask/flask-wizard-agent.d.ts +0 -8
- package/dist/src/frameworks/flask/flask-wizard-agent.js +0 -179
- package/dist/src/frameworks/flask/flask-wizard-agent.js.map +0 -1
- package/dist/src/frameworks/flask/utils.d.ts +0 -28
- package/dist/src/frameworks/flask/utils.js +0 -344
- package/dist/src/frameworks/flask/utils.js.map +0 -1
- package/dist/src/frameworks/javascript-node/javascript-node-wizard-agent.d.ts +0 -4
- package/dist/src/frameworks/javascript-node/javascript-node-wizard-agent.js +0 -61
- package/dist/src/frameworks/javascript-node/javascript-node-wizard-agent.js.map +0 -1
- package/dist/src/frameworks/javascript-web/javascript-web-wizard-agent.d.ts +0 -3
- package/dist/src/frameworks/javascript-web/javascript-web-wizard-agent.js +0 -152
- package/dist/src/frameworks/javascript-web/javascript-web-wizard-agent.js.map +0 -1
- package/dist/src/frameworks/javascript-web/utils.d.ts +0 -28
- package/dist/src/frameworks/javascript-web/utils.js +0 -147
- package/dist/src/frameworks/javascript-web/utils.js.map +0 -1
- package/dist/src/frameworks/laravel/laravel-wizard-agent.d.ts +0 -10
- package/dist/src/frameworks/laravel/laravel-wizard-agent.js +0 -182
- package/dist/src/frameworks/laravel/laravel-wizard-agent.js.map +0 -1
- package/dist/src/frameworks/laravel/utils.d.ts +0 -38
- package/dist/src/frameworks/laravel/utils.js +0 -238
- package/dist/src/frameworks/laravel/utils.js.map +0 -1
- package/dist/src/frameworks/nextjs/nextjs-wizard-agent.d.ts +0 -7
- package/dist/src/frameworks/nextjs/nextjs-wizard-agent.js +0 -94
- package/dist/src/frameworks/nextjs/nextjs-wizard-agent.js.map +0 -1
- package/dist/src/frameworks/nextjs/utils.d.ts +0 -12
- package/dist/src/frameworks/nextjs/utils.js +0 -52
- package/dist/src/frameworks/nextjs/utils.js.map +0 -1
- package/dist/src/frameworks/nuxt/nuxt-wizard-agent.d.ts +0 -6
- package/dist/src/frameworks/nuxt/nuxt-wizard-agent.js +0 -77
- package/dist/src/frameworks/nuxt/nuxt-wizard-agent.js.map +0 -1
- package/dist/src/frameworks/python/python-wizard-agent.d.ts +0 -7
- package/dist/src/frameworks/python/python-wizard-agent.js +0 -195
- package/dist/src/frameworks/python/python-wizard-agent.js.map +0 -1
- package/dist/src/frameworks/python/utils.d.ts +0 -28
- package/dist/src/frameworks/python/utils.js +0 -147
- package/dist/src/frameworks/python/utils.js.map +0 -1
- package/dist/src/frameworks/rails/rails-wizard-agent.d.ts +0 -8
- package/dist/src/frameworks/rails/rails-wizard-agent.js +0 -90
- package/dist/src/frameworks/rails/rails-wizard-agent.js.map +0 -1
- package/dist/src/frameworks/rails/utils.d.ts +0 -37
- package/dist/src/frameworks/rails/utils.js +0 -187
- package/dist/src/frameworks/rails/utils.js.map +0 -1
- package/dist/src/frameworks/react-native/react-native-wizard-agent.d.ts +0 -7
- package/dist/src/frameworks/react-native/react-native-wizard-agent.js +0 -89
- package/dist/src/frameworks/react-native/react-native-wizard-agent.js.map +0 -1
- package/dist/src/frameworks/react-native/utils.d.ts +0 -8
- package/dist/src/frameworks/react-native/utils.js +0 -28
- package/dist/src/frameworks/react-native/utils.js.map +0 -1
- package/dist/src/frameworks/react-router/react-router-wizard-agent.d.ts +0 -7
- package/dist/src/frameworks/react-router/react-router-wizard-agent.js +0 -94
- package/dist/src/frameworks/react-router/react-router-wizard-agent.js.map +0 -1
- package/dist/src/frameworks/react-router/utils.d.ts +0 -13
- package/dist/src/frameworks/react-router/utils.js +0 -161
- package/dist/src/frameworks/react-router/utils.js.map +0 -1
- package/dist/src/frameworks/ruby/ruby-wizard-agent.d.ts +0 -7
- package/dist/src/frameworks/ruby/ruby-wizard-agent.js +0 -113
- package/dist/src/frameworks/ruby/ruby-wizard-agent.js.map +0 -1
- package/dist/src/frameworks/ruby/utils.d.ts +0 -25
- package/dist/src/frameworks/ruby/utils.js +0 -158
- package/dist/src/frameworks/ruby/utils.js.map +0 -1
- package/dist/src/frameworks/svelte/svelte-wizard-agent.d.ts +0 -4
- package/dist/src/frameworks/svelte/svelte-wizard-agent.js +0 -61
- package/dist/src/frameworks/svelte/svelte-wizard-agent.js.map +0 -1
- package/dist/src/frameworks/swift/swift-wizard-agent.d.ts +0 -7
- package/dist/src/frameworks/swift/swift-wizard-agent.js +0 -143
- package/dist/src/frameworks/swift/swift-wizard-agent.js.map +0 -1
- package/dist/src/frameworks/swift/utils.d.ts +0 -8
- package/dist/src/frameworks/swift/utils.js +0 -105
- package/dist/src/frameworks/swift/utils.js.map +0 -1
- package/dist/src/frameworks/tanstack-router/tanstack-router-wizard-agent.d.ts +0 -7
- package/dist/src/frameworks/tanstack-router/tanstack-router-wizard-agent.js +0 -96
- package/dist/src/frameworks/tanstack-router/tanstack-router-wizard-agent.js.map +0 -1
- package/dist/src/frameworks/tanstack-router/utils.d.ts +0 -11
- package/dist/src/frameworks/tanstack-router/utils.js +0 -149
- package/dist/src/frameworks/tanstack-router/utils.js.map +0 -1
- package/dist/src/frameworks/tanstack-start/tanstack-start-wizard-agent.d.ts +0 -4
- package/dist/src/frameworks/tanstack-start/tanstack-start-wizard-agent.js +0 -64
- package/dist/src/frameworks/tanstack-start/tanstack-start-wizard-agent.js.map +0 -1
- package/dist/src/frameworks/tanstack-start/utils.d.ts +0 -4
- package/dist/src/frameworks/tanstack-start/utils.js +0 -9
- package/dist/src/frameworks/tanstack-start/utils.js.map +0 -1
- package/dist/src/frameworks/vue/vue-wizard-agent.d.ts +0 -4
- package/dist/src/frameworks/vue/vue-wizard-agent.js +0 -62
- package/dist/src/frameworks/vue/vue-wizard-agent.js.map +0 -1
- package/dist/src/lib/__tests__/agent-interface.test.d.ts +0 -1
- package/dist/src/lib/__tests__/agent-interface.test.js +0 -317
- package/dist/src/lib/__tests__/agent-interface.test.js.map +0 -1
- package/dist/src/lib/__tests__/cloudflare-detection.test.d.ts +0 -1
- package/dist/src/lib/__tests__/cloudflare-detection.test.js +0 -119
- package/dist/src/lib/__tests__/cloudflare-detection.test.js.map +0 -1
- package/dist/src/lib/__tests__/wizard-tools.test.d.ts +0 -1
- package/dist/src/lib/__tests__/wizard-tools.test.js +0 -200
- package/dist/src/lib/__tests__/wizard-tools.test.js.map +0 -1
- package/dist/src/lib/__tests__/yara-hooks.test.d.ts +0 -1
- package/dist/src/lib/__tests__/yara-hooks.test.js +0 -432
- package/dist/src/lib/__tests__/yara-hooks.test.js.map +0 -1
- package/dist/src/lib/__tests__/yara-scanner.test.d.ts +0 -1
- package/dist/src/lib/__tests__/yara-scanner.test.js +0 -613
- package/dist/src/lib/__tests__/yara-scanner.test.js.map +0 -1
- package/dist/src/lib/agent/__tests__/agent-prompt.test.d.ts +0 -1
- package/dist/src/lib/agent/__tests__/agent-prompt.test.js +0 -57
- package/dist/src/lib/agent/__tests__/agent-prompt.test.js.map +0 -1
- package/dist/src/lib/agent/agent-interface.d.ts +0 -171
- package/dist/src/lib/agent/agent-interface.js +0 -1082
- package/dist/src/lib/agent/agent-interface.js.map +0 -1
- package/dist/src/lib/agent/agent-prompt.d.ts +0 -23
- package/dist/src/lib/agent/agent-prompt.js +0 -47
- package/dist/src/lib/agent/agent-prompt.js.map +0 -1
- package/dist/src/lib/agent/agent-runner.d.ts +0 -78
- package/dist/src/lib/agent/agent-runner.js +0 -325
- package/dist/src/lib/agent/agent-runner.js.map +0 -1
- package/dist/src/lib/agent/commandments.d.ts +0 -1
- package/dist/src/lib/agent/commandments.js +0 -26
- package/dist/src/lib/agent/commandments.js.map +0 -1
- package/dist/src/lib/api.d.ts +0 -75
- package/dist/src/lib/api.js +0 -105
- package/dist/src/lib/api.js.map +0 -1
- package/dist/src/lib/cloudflare-detection.d.ts +0 -14
- package/dist/src/lib/cloudflare-detection.js +0 -74
- package/dist/src/lib/cloudflare-detection.js.map +0 -1
- package/dist/src/lib/constants.d.ts +0 -74
- package/dist/src/lib/constants.js +0 -98
- package/dist/src/lib/constants.js.map +0 -1
- package/dist/src/lib/detection/__tests__/context.test.d.ts +0 -1
- package/dist/src/lib/detection/__tests__/context.test.js +0 -72
- package/dist/src/lib/detection/__tests__/context.test.js.map +0 -1
- package/dist/src/lib/detection/__tests__/features.test.d.ts +0 -1
- package/dist/src/lib/detection/__tests__/features.test.js +0 -75
- package/dist/src/lib/detection/__tests__/features.test.js.map +0 -1
- package/dist/src/lib/detection/__tests__/package-manager.test.d.ts +0 -1
- package/dist/src/lib/detection/__tests__/package-manager.test.js +0 -195
- package/dist/src/lib/detection/__tests__/package-manager.test.js.map +0 -1
- package/dist/src/lib/detection/context.d.ts +0 -31
- package/dist/src/lib/detection/context.js +0 -92
- package/dist/src/lib/detection/context.js.map +0 -1
- package/dist/src/lib/detection/features.d.ts +0 -16
- package/dist/src/lib/detection/features.js +0 -56
- package/dist/src/lib/detection/features.js.map +0 -1
- package/dist/src/lib/detection/framework.d.ts +0 -14
- package/dist/src/lib/detection/framework.js +0 -35
- package/dist/src/lib/detection/framework.js.map +0 -1
- package/dist/src/lib/detection/index.d.ts +0 -3
- package/dist/src/lib/detection/index.js +0 -11
- package/dist/src/lib/detection/index.js.map +0 -1
- package/dist/src/lib/detection/package-manager.d.ts +0 -37
- package/dist/src/lib/detection/package-manager.js +0 -183
- package/dist/src/lib/detection/package-manager.js.map +0 -1
- package/dist/src/lib/framework-config.d.ts +0 -175
- package/dist/src/lib/framework-config.js +0 -22
- package/dist/src/lib/framework-config.js.map +0 -1
- package/dist/src/lib/health-checks/__tests__/health-checks.test.d.ts +0 -18
- package/dist/src/lib/health-checks/__tests__/health-checks.test.js +0 -759
- package/dist/src/lib/health-checks/__tests__/health-checks.test.js.map +0 -1
- package/dist/src/lib/health-checks/endpoints.d.ts +0 -4
- package/dist/src/lib/health-checks/endpoints.js +0 -49
- package/dist/src/lib/health-checks/endpoints.js.map +0 -1
- package/dist/src/lib/health-checks/index.d.ts +0 -4
- package/dist/src/lib/health-checks/index.js +0 -24
- package/dist/src/lib/health-checks/index.js.map +0 -1
- package/dist/src/lib/health-checks/readiness.d.ts +0 -29
- package/dist/src/lib/health-checks/readiness.js +0 -188
- package/dist/src/lib/health-checks/readiness.js.map +0 -1
- package/dist/src/lib/health-checks/statuspage.d.ts +0 -9
- package/dist/src/lib/health-checks/statuspage.js +0 -105
- package/dist/src/lib/health-checks/statuspage.js.map +0 -1
- package/dist/src/lib/health-checks/types.d.ts +0 -32
- package/dist/src/lib/health-checks/types.js +0 -10
- package/dist/src/lib/health-checks/types.js.map +0 -1
- package/dist/src/lib/helper-functions.d.ts +0 -1
- package/dist/src/lib/helper-functions.js +0 -6
- package/dist/src/lib/helper-functions.js.map +0 -1
- package/dist/src/lib/middleware/benchmark.d.ts +0 -54
- package/dist/src/lib/middleware/benchmark.js +0 -45
- package/dist/src/lib/middleware/benchmark.js.map +0 -1
- package/dist/src/lib/middleware/benchmarks/cache-tracker.d.ts +0 -44
- package/dist/src/lib/middleware/benchmarks/cache-tracker.js +0 -81
- package/dist/src/lib/middleware/benchmarks/cache-tracker.js.map +0 -1
- package/dist/src/lib/middleware/benchmarks/compaction-tracker.d.ts +0 -29
- package/dist/src/lib/middleware/benchmarks/compaction-tracker.js +0 -60
- package/dist/src/lib/middleware/benchmarks/compaction-tracker.js.map +0 -1
- package/dist/src/lib/middleware/benchmarks/context-size-tracker.d.ts +0 -26
- package/dist/src/lib/middleware/benchmarks/context-size-tracker.js +0 -56
- package/dist/src/lib/middleware/benchmarks/context-size-tracker.js.map +0 -1
- package/dist/src/lib/middleware/benchmarks/cost-tracker.d.ts +0 -16
- package/dist/src/lib/middleware/benchmarks/cost-tracker.js +0 -76
- package/dist/src/lib/middleware/benchmarks/cost-tracker.js.map +0 -1
- package/dist/src/lib/middleware/benchmarks/duration-tracker.d.ts +0 -20
- package/dist/src/lib/middleware/benchmarks/duration-tracker.js +0 -40
- package/dist/src/lib/middleware/benchmarks/duration-tracker.js.map +0 -1
- package/dist/src/lib/middleware/benchmarks/index.d.ts +0 -9
- package/dist/src/lib/middleware/benchmarks/index.js +0 -60
- package/dist/src/lib/middleware/benchmarks/index.js.map +0 -1
- package/dist/src/lib/middleware/benchmarks/json-writer.d.ts +0 -15
- package/dist/src/lib/middleware/benchmarks/json-writer.js +0 -144
- package/dist/src/lib/middleware/benchmarks/json-writer.js.map +0 -1
- package/dist/src/lib/middleware/benchmarks/summary.d.ts +0 -9
- package/dist/src/lib/middleware/benchmarks/summary.js +0 -102
- package/dist/src/lib/middleware/benchmarks/summary.js.map +0 -1
- package/dist/src/lib/middleware/benchmarks/token-tracker.d.ts +0 -40
- package/dist/src/lib/middleware/benchmarks/token-tracker.js +0 -77
- package/dist/src/lib/middleware/benchmarks/token-tracker.js.map +0 -1
- package/dist/src/lib/middleware/benchmarks/turn-counter.d.ts +0 -34
- package/dist/src/lib/middleware/benchmarks/turn-counter.js +0 -59
- package/dist/src/lib/middleware/benchmarks/turn-counter.js.map +0 -1
- package/dist/src/lib/middleware/config.d.ts +0 -24
- package/dist/src/lib/middleware/config.js +0 -78
- package/dist/src/lib/middleware/config.js.map +0 -1
- package/dist/src/lib/middleware/index.d.ts +0 -11
- package/dist/src/lib/middleware/index.js +0 -18
- package/dist/src/lib/middleware/index.js.map +0 -1
- package/dist/src/lib/middleware/phase-detector.d.ts +0 -7
- package/dist/src/lib/middleware/phase-detector.js +0 -64
- package/dist/src/lib/middleware/phase-detector.js.map +0 -1
- package/dist/src/lib/middleware/pipeline.d.ts +0 -29
- package/dist/src/lib/middleware/pipeline.js +0 -82
- package/dist/src/lib/middleware/pipeline.js.map +0 -1
- package/dist/src/lib/middleware/types.d.ts +0 -40
- package/dist/src/lib/middleware/types.js +0 -9
- package/dist/src/lib/middleware/types.js.map +0 -1
- package/dist/src/lib/registry.d.ts +0 -3
- package/dist/src/lib/registry.js +0 -49
- package/dist/src/lib/registry.js.map +0 -1
- package/dist/src/lib/safe-tools.d.ts +0 -2
- package/dist/src/lib/safe-tools.js +0 -215
- package/dist/src/lib/safe-tools.js.map +0 -1
- package/dist/src/lib/skill-install.d.ts +0 -10
- package/dist/src/lib/skill-install.js +0 -23
- package/dist/src/lib/skill-install.js.map +0 -1
- package/dist/src/lib/version.d.ts +0 -1
- package/dist/src/lib/version.js +0 -6
- package/dist/src/lib/version.js.map +0 -1
- package/dist/src/lib/wizard-session.d.ts +0 -146
- package/dist/src/lib/wizard-session.js +0 -116
- package/dist/src/lib/wizard-session.js.map +0 -1
- package/dist/src/lib/wizard-tools.d.ts +0 -91
- package/dist/src/lib/wizard-tools.js +0 -389
- package/dist/src/lib/wizard-tools.js.map +0 -1
- package/dist/src/lib/workflows/__tests__/agent-skill.test.d.ts +0 -1
- package/dist/src/lib/workflows/__tests__/agent-skill.test.js +0 -73
- package/dist/src/lib/workflows/__tests__/agent-skill.test.js.map +0 -1
- package/dist/src/lib/workflows/__tests__/revenue-analytics-detect.test.d.ts +0 -1
- package/dist/src/lib/workflows/__tests__/revenue-analytics-detect.test.js +0 -101
- package/dist/src/lib/workflows/__tests__/revenue-analytics-detect.test.js.map +0 -1
- package/dist/src/lib/workflows/__tests__/workflow-registry.test.d.ts +0 -1
- package/dist/src/lib/workflows/__tests__/workflow-registry.test.js +0 -32
- package/dist/src/lib/workflows/__tests__/workflow-registry.test.js.map +0 -1
- package/dist/src/lib/workflows/__tests__/workflow-step.test.d.ts +0 -1
- package/dist/src/lib/workflows/__tests__/workflow-step.test.js +0 -54
- package/dist/src/lib/workflows/__tests__/workflow-step.test.js.map +0 -1
- package/dist/src/lib/workflows/agent-skill/index.d.ts +0 -44
- package/dist/src/lib/workflows/agent-skill/index.js +0 -47
- package/dist/src/lib/workflows/agent-skill/index.js.map +0 -1
- package/dist/src/lib/workflows/agent-skill/steps.d.ts +0 -8
- package/dist/src/lib/workflows/agent-skill/steps.js +0 -43
- package/dist/src/lib/workflows/agent-skill/steps.js.map +0 -1
- package/dist/src/lib/workflows/posthog-integration/detect.d.ts +0 -12
- package/dist/src/lib/workflows/posthog-integration/detect.js +0 -57
- package/dist/src/lib/workflows/posthog-integration/detect.js.map +0 -1
- package/dist/src/lib/workflows/posthog-integration/index.d.ts +0 -3
- package/dist/src/lib/workflows/posthog-integration/index.js +0 -152
- package/dist/src/lib/workflows/posthog-integration/index.js.map +0 -1
- package/dist/src/lib/workflows/posthog-integration/steps.d.ts +0 -9
- package/dist/src/lib/workflows/posthog-integration/steps.js +0 -100
- package/dist/src/lib/workflows/posthog-integration/steps.js.map +0 -1
- package/dist/src/lib/workflows/revenue-analytics/detect.d.ts +0 -40
- package/dist/src/lib/workflows/revenue-analytics/detect.js +0 -156
- package/dist/src/lib/workflows/revenue-analytics/detect.js.map +0 -1
- package/dist/src/lib/workflows/revenue-analytics/index.d.ts +0 -4
- package/dist/src/lib/workflows/revenue-analytics/index.js +0 -30
- package/dist/src/lib/workflows/revenue-analytics/index.js.map +0 -1
- package/dist/src/lib/workflows/revenue-analytics/steps.d.ts +0 -8
- package/dist/src/lib/workflows/revenue-analytics/steps.js +0 -53
- package/dist/src/lib/workflows/revenue-analytics/steps.js.map +0 -1
- package/dist/src/lib/workflows/workflow-registry.d.ts +0 -18
- package/dist/src/lib/workflows/workflow-registry.js +0 -32
- package/dist/src/lib/workflows/workflow-registry.js.map +0 -1
- package/dist/src/lib/workflows/workflow-step.d.ts +0 -126
- package/dist/src/lib/workflows/workflow-step.js +0 -28
- package/dist/src/lib/workflows/workflow-step.js.map +0 -1
- package/dist/src/lib/yara-hooks.d.ts +0 -44
- package/dist/src/lib/yara-hooks.js +0 -377
- package/dist/src/lib/yara-hooks.js.map +0 -1
- package/dist/src/lib/yara-scanner.d.ts +0 -61
- package/dist/src/lib/yara-scanner.js +0 -328
- package/dist/src/lib/yara-scanner.js.map +0 -1
- package/dist/src/steps/add-mcp-server-to-clients/MCPClient.d.ts +0 -30
- package/dist/src/steps/add-mcp-server-to-clients/MCPClient.js +0 -138
- package/dist/src/steps/add-mcp-server-to-clients/MCPClient.js.map +0 -1
- package/dist/src/steps/add-mcp-server-to-clients/__tests__/defaults.test.d.ts +0 -1
- package/dist/src/steps/add-mcp-server-to-clients/__tests__/defaults.test.js +0 -72
- package/dist/src/steps/add-mcp-server-to-clients/__tests__/defaults.test.js.map +0 -1
- package/dist/src/steps/add-mcp-server-to-clients/clients/__tests__/claude.test.d.ts +0 -1
- package/dist/src/steps/add-mcp-server-to-clients/clients/__tests__/claude.test.js +0 -341
- package/dist/src/steps/add-mcp-server-to-clients/clients/__tests__/claude.test.js.map +0 -1
- package/dist/src/steps/add-mcp-server-to-clients/clients/__tests__/codex.test.d.ts +0 -1
- package/dist/src/steps/add-mcp-server-to-clients/clients/__tests__/codex.test.js +0 -108
- package/dist/src/steps/add-mcp-server-to-clients/clients/__tests__/codex.test.js.map +0 -1
- package/dist/src/steps/add-mcp-server-to-clients/clients/claude-code.d.ts +0 -89
- package/dist/src/steps/add-mcp-server-to-clients/clients/claude-code.js +0 -169
- package/dist/src/steps/add-mcp-server-to-clients/clients/claude-code.js.map +0 -1
- package/dist/src/steps/add-mcp-server-to-clients/clients/claude.d.ts +0 -80
- package/dist/src/steps/add-mcp-server-to-clients/clients/claude.js +0 -64
- package/dist/src/steps/add-mcp-server-to-clients/clients/claude.js.map +0 -1
- package/dist/src/steps/add-mcp-server-to-clients/clients/codex.d.ts +0 -88
- package/dist/src/steps/add-mcp-server-to-clients/clients/codex.js +0 -76
- package/dist/src/steps/add-mcp-server-to-clients/clients/codex.js.map +0 -1
- package/dist/src/steps/add-mcp-server-to-clients/clients/cursor.d.ts +0 -84
- package/dist/src/steps/add-mcp-server-to-clients/clients/cursor.js +0 -61
- package/dist/src/steps/add-mcp-server-to-clients/clients/cursor.js.map +0 -1
- package/dist/src/steps/add-mcp-server-to-clients/clients/visual-studio-code.d.ts +0 -92
- package/dist/src/steps/add-mcp-server-to-clients/clients/visual-studio-code.js +0 -101
- package/dist/src/steps/add-mcp-server-to-clients/clients/visual-studio-code.js.map +0 -1
- package/dist/src/steps/add-mcp-server-to-clients/clients/zed.d.ts +0 -110
- package/dist/src/steps/add-mcp-server-to-clients/clients/zed.js +0 -102
- package/dist/src/steps/add-mcp-server-to-clients/clients/zed.js.map +0 -1
- package/dist/src/steps/add-mcp-server-to-clients/defaults.d.ts +0 -119
- package/dist/src/steps/add-mcp-server-to-clients/defaults.js +0 -239
- package/dist/src/steps/add-mcp-server-to-clients/defaults.js.map +0 -1
- package/dist/src/steps/add-mcp-server-to-clients/index.d.ts +0 -23
- package/dist/src/steps/add-mcp-server-to-clients/index.js +0 -111
- package/dist/src/steps/add-mcp-server-to-clients/index.js.map +0 -1
- package/dist/src/steps/add-or-update-environment-variables.d.ts +0 -10
- package/dist/src/steps/add-or-update-environment-variables.js +0 -188
- package/dist/src/steps/add-or-update-environment-variables.js.map +0 -1
- package/dist/src/steps/index.d.ts +0 -4
- package/dist/src/steps/index.js +0 -21
- package/dist/src/steps/index.js.map +0 -1
- package/dist/src/steps/run-prettier.d.ts +0 -5
- package/dist/src/steps/run-prettier.js +0 -91
- package/dist/src/steps/run-prettier.js.map +0 -1
- package/dist/src/steps/upload-environment-variables/EnvironmentProvider.d.ts +0 -11
- package/dist/src/steps/upload-environment-variables/EnvironmentProvider.js +0 -12
- package/dist/src/steps/upload-environment-variables/EnvironmentProvider.js.map +0 -1
- package/dist/src/steps/upload-environment-variables/index.d.ts +0 -6
- package/dist/src/steps/upload-environment-variables/index.js +0 -38
- package/dist/src/steps/upload-environment-variables/index.js.map +0 -1
- package/dist/src/steps/upload-environment-variables/providers/__tests__/vercel.test.d.ts +0 -1
- package/dist/src/steps/upload-environment-variables/providers/__tests__/vercel.test.js +0 -117
- package/dist/src/steps/upload-environment-variables/providers/__tests__/vercel.test.js.map +0 -1
- package/dist/src/steps/upload-environment-variables/providers/vercel.d.ts +0 -15
- package/dist/src/steps/upload-environment-variables/providers/vercel.js +0 -142
- package/dist/src/steps/upload-environment-variables/providers/vercel.js.map +0 -1
- package/dist/src/telemetry.d.ts +0 -2
- package/dist/src/telemetry.js +0 -13
- package/dist/src/telemetry.js.map +0 -1
- package/dist/src/ui/index.d.ts +0 -8
- package/dist/src/ui/index.js +0 -17
- package/dist/src/ui/index.js.map +0 -1
- package/dist/src/ui/logging-ui.d.ts +0 -52
- package/dist/src/ui/logging-ui.js +0 -121
- package/dist/src/ui/logging-ui.js.map +0 -1
- package/dist/src/ui/tui/App.d.ts +0 -6
- package/dist/src/ui/tui/App.js +0 -10
- package/dist/src/ui/tui/App.js.map +0 -1
- package/dist/src/ui/tui/__tests__/flows.test.d.ts +0 -1
- package/dist/src/ui/tui/__tests__/flows.test.js +0 -115
- package/dist/src/ui/tui/__tests__/flows.test.js.map +0 -1
- package/dist/src/ui/tui/__tests__/layout-helpers.test.d.ts +0 -1
- package/dist/src/ui/tui/__tests__/layout-helpers.test.js +0 -68
- package/dist/src/ui/tui/__tests__/layout-helpers.test.js.map +0 -1
- package/dist/src/ui/tui/__tests__/router.test.d.ts +0 -1
- package/dist/src/ui/tui/__tests__/router.test.js +0 -87
- package/dist/src/ui/tui/__tests__/router.test.js.map +0 -1
- package/dist/src/ui/tui/__tests__/store.test.d.ts +0 -1
- package/dist/src/ui/tui/__tests__/store.test.js +0 -935
- package/dist/src/ui/tui/__tests__/store.test.js.map +0 -1
- package/dist/src/ui/tui/components/LearnCard.d.ts +0 -10
- package/dist/src/ui/tui/components/LearnCard.js +0 -217
- package/dist/src/ui/tui/components/LearnCard.js.map +0 -1
- package/dist/src/ui/tui/components/ServiceHealthList.d.ts +0 -15
- package/dist/src/ui/tui/components/ServiceHealthList.js +0 -57
- package/dist/src/ui/tui/components/ServiceHealthList.js.map +0 -1
- package/dist/src/ui/tui/components/TipsCard.d.ts +0 -9
- package/dist/src/ui/tui/components/TipsCard.js +0 -55
- package/dist/src/ui/tui/components/TipsCard.js.map +0 -1
- package/dist/src/ui/tui/components/TitleBar.d.ts +0 -6
- package/dist/src/ui/tui/components/TitleBar.js +0 -17
- package/dist/src/ui/tui/components/TitleBar.js.map +0 -1
- package/dist/src/ui/tui/flows.d.ts +0 -52
- package/dist/src/ui/tui/flows.js +0 -76
- package/dist/src/ui/tui/flows.js.map +0 -1
- package/dist/src/ui/tui/hooks/useStdoutDimensions.d.ts +0 -9
- package/dist/src/ui/tui/hooks/useStdoutDimensions.js +0 -37
- package/dist/src/ui/tui/hooks/useStdoutDimensions.js.map +0 -1
- package/dist/src/ui/tui/ink-ui.d.ts +0 -58
- package/dist/src/ui/tui/ink-ui.js +0 -125
- package/dist/src/ui/tui/ink-ui.js.map +0 -1
- package/dist/src/ui/tui/package.json +0 -1
- package/dist/src/ui/tui/playground/PlaygroundApp.d.ts +0 -12
- package/dist/src/ui/tui/playground/PlaygroundApp.js +0 -50
- package/dist/src/ui/tui/playground/PlaygroundApp.js.map +0 -1
- package/dist/src/ui/tui/playground/demos/HealthCheckDemo.d.ts +0 -11
- package/dist/src/ui/tui/playground/demos/HealthCheckDemo.js +0 -57
- package/dist/src/ui/tui/playground/demos/HealthCheckDemo.js.map +0 -1
- package/dist/src/ui/tui/playground/demos/InputDemo.d.ts +0 -4
- package/dist/src/ui/tui/playground/demos/InputDemo.js +0 -53
- package/dist/src/ui/tui/playground/demos/InputDemo.js.map +0 -1
- package/dist/src/ui/tui/playground/demos/LayoutDemo.d.ts +0 -5
- package/dist/src/ui/tui/playground/demos/LayoutDemo.js +0 -25
- package/dist/src/ui/tui/playground/demos/LayoutDemo.js.map +0 -1
- package/dist/src/ui/tui/playground/demos/LogDemo.d.ts +0 -5
- package/dist/src/ui/tui/playground/demos/LogDemo.js +0 -53
- package/dist/src/ui/tui/playground/demos/LogDemo.js.map +0 -1
- package/dist/src/ui/tui/playground/demos/McpDemo.d.ts +0 -12
- package/dist/src/ui/tui/playground/demos/McpDemo.js +0 -27
- package/dist/src/ui/tui/playground/demos/McpDemo.js.map +0 -1
- package/dist/src/ui/tui/playground/demos/ModalDemo.d.ts +0 -6
- package/dist/src/ui/tui/playground/demos/ModalDemo.js +0 -13
- package/dist/src/ui/tui/playground/demos/ModalDemo.js.map +0 -1
- package/dist/src/ui/tui/playground/demos/ProgressDemo.d.ts +0 -5
- package/dist/src/ui/tui/playground/demos/ProgressDemo.js +0 -58
- package/dist/src/ui/tui/playground/demos/ProgressDemo.js.map +0 -1
- package/dist/src/ui/tui/playground/demos/RunScreenDemo.d.ts +0 -11
- package/dist/src/ui/tui/playground/demos/RunScreenDemo.js +0 -159
- package/dist/src/ui/tui/playground/demos/RunScreenDemo.js.map +0 -1
- package/dist/src/ui/tui/playground/demos/WelcomeDemo.d.ts +0 -9
- package/dist/src/ui/tui/playground/demos/WelcomeDemo.js +0 -15
- package/dist/src/ui/tui/playground/demos/WelcomeDemo.js.map +0 -1
- package/dist/src/ui/tui/playground/start-playground.d.ts +0 -4
- package/dist/src/ui/tui/playground/start-playground.js +0 -24
- package/dist/src/ui/tui/playground/start-playground.js.map +0 -1
- package/dist/src/ui/tui/primitives/CardLayout.d.ts +0 -12
- package/dist/src/ui/tui/primitives/CardLayout.js +0 -10
- package/dist/src/ui/tui/primitives/CardLayout.js.map +0 -1
- package/dist/src/ui/tui/primitives/ConfirmationInput.d.ts +0 -13
- package/dist/src/ui/tui/primitives/ConfirmationInput.js +0 -35
- package/dist/src/ui/tui/primitives/ConfirmationInput.js.map +0 -1
- package/dist/src/ui/tui/primitives/ContentSequencer.d.ts +0 -42
- package/dist/src/ui/tui/primitives/ContentSequencer.js +0 -137
- package/dist/src/ui/tui/primitives/ContentSequencer.js.map +0 -1
- package/dist/src/ui/tui/primitives/DissolveTransition.d.ts +0 -21
- package/dist/src/ui/tui/primitives/DissolveTransition.js +0 -149
- package/dist/src/ui/tui/primitives/DissolveTransition.js.map +0 -1
- package/dist/src/ui/tui/primitives/Divider.d.ts +0 -6
- package/dist/src/ui/tui/primitives/Divider.js +0 -15
- package/dist/src/ui/tui/primitives/Divider.js.map +0 -1
- package/dist/src/ui/tui/primitives/EventPlanViewer.d.ts +0 -9
- package/dist/src/ui/tui/primitives/EventPlanViewer.js +0 -9
- package/dist/src/ui/tui/primitives/EventPlanViewer.js.map +0 -1
- package/dist/src/ui/tui/primitives/GroupedPickerMenu.d.ts +0 -23
- package/dist/src/ui/tui/primitives/GroupedPickerMenu.js +0 -182
- package/dist/src/ui/tui/primitives/GroupedPickerMenu.js.map +0 -1
- package/dist/src/ui/tui/primitives/HNViewer.d.ts +0 -7
- package/dist/src/ui/tui/primitives/HNViewer.js +0 -63
- package/dist/src/ui/tui/primitives/HNViewer.js.map +0 -1
- package/dist/src/ui/tui/primitives/LinesBlock.d.ts +0 -16
- package/dist/src/ui/tui/primitives/LinesBlock.js +0 -37
- package/dist/src/ui/tui/primitives/LinesBlock.js.map +0 -1
- package/dist/src/ui/tui/primitives/LoadingBox.d.ts +0 -8
- package/dist/src/ui/tui/primitives/LoadingBox.js +0 -10
- package/dist/src/ui/tui/primitives/LoadingBox.js.map +0 -1
- package/dist/src/ui/tui/primitives/LogViewer.d.ts +0 -11
- package/dist/src/ui/tui/primitives/LogViewer.js +0 -55
- package/dist/src/ui/tui/primitives/LogViewer.js.map +0 -1
- package/dist/src/ui/tui/primitives/ModalOverlay.d.ts +0 -25
- package/dist/src/ui/tui/primitives/ModalOverlay.js +0 -7
- package/dist/src/ui/tui/primitives/ModalOverlay.js.map +0 -1
- package/dist/src/ui/tui/primitives/NodeBlock.d.ts +0 -13
- package/dist/src/ui/tui/primitives/NodeBlock.js +0 -17
- package/dist/src/ui/tui/primitives/NodeBlock.js.map +0 -1
- package/dist/src/ui/tui/primitives/PickerMenu.d.ts +0 -20
- package/dist/src/ui/tui/primitives/PickerMenu.js +0 -143
- package/dist/src/ui/tui/primitives/PickerMenu.js.map +0 -1
- package/dist/src/ui/tui/primitives/ProgressList.d.ts +0 -15
- package/dist/src/ui/tui/primitives/ProgressList.js +0 -32
- package/dist/src/ui/tui/primitives/ProgressList.js.map +0 -1
- package/dist/src/ui/tui/primitives/PromptLabel.d.ts +0 -11
- package/dist/src/ui/tui/primitives/PromptLabel.js +0 -13
- package/dist/src/ui/tui/primitives/PromptLabel.js.map +0 -1
- package/dist/src/ui/tui/primitives/ScreenContainer.d.ts +0 -16
- package/dist/src/ui/tui/primitives/ScreenContainer.js +0 -36
- package/dist/src/ui/tui/primitives/ScreenContainer.js.map +0 -1
- package/dist/src/ui/tui/primitives/ScreenErrorBoundary.d.ts +0 -22
- package/dist/src/ui/tui/primitives/ScreenErrorBoundary.js +0 -35
- package/dist/src/ui/tui/primitives/ScreenErrorBoundary.js.map +0 -1
- package/dist/src/ui/tui/primitives/SplitView.d.ts +0 -11
- package/dist/src/ui/tui/primitives/SplitView.js +0 -9
- package/dist/src/ui/tui/primitives/SplitView.js.map +0 -1
- package/dist/src/ui/tui/primitives/TabContainer.d.ts +0 -23
- package/dist/src/ui/tui/primitives/TabContainer.js +0 -45
- package/dist/src/ui/tui/primitives/TabContainer.js.map +0 -1
- package/dist/src/ui/tui/primitives/TextBlock.d.ts +0 -41
- package/dist/src/ui/tui/primitives/TextBlock.js +0 -144
- package/dist/src/ui/tui/primitives/TextBlock.js.map +0 -1
- package/dist/src/ui/tui/primitives/content-types.d.ts +0 -37
- package/dist/src/ui/tui/primitives/content-types.js +0 -19
- package/dist/src/ui/tui/primitives/content-types.js.map +0 -1
- package/dist/src/ui/tui/primitives/index.d.ts +0 -27
- package/dist/src/ui/tui/primitives/index.js +0 -24
- package/dist/src/ui/tui/primitives/index.js.map +0 -1
- package/dist/src/ui/tui/primitives/layout-helpers.d.ts +0 -36
- package/dist/src/ui/tui/primitives/layout-helpers.js +0 -95
- package/dist/src/ui/tui/primitives/layout-helpers.js.map +0 -1
- package/dist/src/ui/tui/primitives/text-helpers.d.ts +0 -10
- package/dist/src/ui/tui/primitives/text-helpers.js +0 -43
- package/dist/src/ui/tui/primitives/text-helpers.js.map +0 -1
- package/dist/src/ui/tui/router.d.ts +0 -58
- package/dist/src/ui/tui/router.js +0 -96
- package/dist/src/ui/tui/router.js.map +0 -1
- package/dist/src/ui/tui/screen-registry.d.ts +0 -19
- package/dist/src/ui/tui/screen-registry.js +0 -46
- package/dist/src/ui/tui/screen-registry.js.map +0 -1
- package/dist/src/ui/tui/screens/AgentSkillIntroScreen.d.ts +0 -12
- package/dist/src/ui/tui/screens/AgentSkillIntroScreen.js +0 -75
- package/dist/src/ui/tui/screens/AgentSkillIntroScreen.js.map +0 -1
- package/dist/src/ui/tui/screens/AuthErrorScreen.d.ts +0 -7
- package/dist/src/ui/tui/screens/AuthErrorScreen.js +0 -16
- package/dist/src/ui/tui/screens/AuthErrorScreen.js.map +0 -1
- package/dist/src/ui/tui/screens/AuthScreen.d.ts +0 -13
- package/dist/src/ui/tui/screens/AuthScreen.js +0 -20
- package/dist/src/ui/tui/screens/AuthScreen.js.map +0 -1
- package/dist/src/ui/tui/screens/IntroScreenLayout.d.ts +0 -46
- package/dist/src/ui/tui/screens/IntroScreenLayout.js +0 -33
- package/dist/src/ui/tui/screens/IntroScreenLayout.js.map +0 -1
- package/dist/src/ui/tui/screens/KeepSkillsScreen.d.ts +0 -14
- package/dist/src/ui/tui/screens/KeepSkillsScreen.js +0 -74
- package/dist/src/ui/tui/screens/KeepSkillsScreen.js.map +0 -1
- package/dist/src/ui/tui/screens/ManagedSettingsScreen.d.ts +0 -13
- package/dist/src/ui/tui/screens/ManagedSettingsScreen.js +0 -32
- package/dist/src/ui/tui/screens/ManagedSettingsScreen.js.map +0 -1
- package/dist/src/ui/tui/screens/McpScreen.d.ts +0 -24
- package/dist/src/ui/tui/screens/McpScreen.js +0 -130
- package/dist/src/ui/tui/screens/McpScreen.js.map +0 -1
- package/dist/src/ui/tui/screens/OutroScreen.d.ts +0 -11
- package/dist/src/ui/tui/screens/OutroScreen.js +0 -22
- package/dist/src/ui/tui/screens/OutroScreen.js.map +0 -1
- package/dist/src/ui/tui/screens/PortConflictScreen.d.ts +0 -11
- package/dist/src/ui/tui/screens/PortConflictScreen.js +0 -30
- package/dist/src/ui/tui/screens/PortConflictScreen.js.map +0 -1
- package/dist/src/ui/tui/screens/PostHogIntegrationIntroScreen.d.ts +0 -15
- package/dist/src/ui/tui/screens/PostHogIntegrationIntroScreen.js +0 -135
- package/dist/src/ui/tui/screens/PostHogIntegrationIntroScreen.js.map +0 -1
- package/dist/src/ui/tui/screens/RevenueIntroScreen.d.ts +0 -16
- package/dist/src/ui/tui/screens/RevenueIntroScreen.js +0 -89
- package/dist/src/ui/tui/screens/RevenueIntroScreen.js.map +0 -1
- package/dist/src/ui/tui/screens/RunScreen.d.ts +0 -16
- package/dist/src/ui/tui/screens/RunScreen.js +0 -73
- package/dist/src/ui/tui/screens/RunScreen.js.map +0 -1
- package/dist/src/ui/tui/screens/SettingsOverrideScreen.d.ts +0 -6
- package/dist/src/ui/tui/screens/SettingsOverrideScreen.js +0 -30
- package/dist/src/ui/tui/screens/SettingsOverrideScreen.js.map +0 -1
- package/dist/src/ui/tui/screens/SetupScreen.d.ts +0 -13
- package/dist/src/ui/tui/screens/SetupScreen.js +0 -74
- package/dist/src/ui/tui/screens/SetupScreen.js.map +0 -1
- package/dist/src/ui/tui/screens/health/HealthCheckScreen.d.ts +0 -14
- package/dist/src/ui/tui/screens/health/HealthCheckScreen.js +0 -77
- package/dist/src/ui/tui/screens/health/HealthCheckScreen.js.map +0 -1
- package/dist/src/ui/tui/services/mcp-installer.d.ts +0 -21
- package/dist/src/ui/tui/services/mcp-installer.js +0 -58
- package/dist/src/ui/tui/services/mcp-installer.js.map +0 -1
- package/dist/src/ui/tui/start-tui.d.ts +0 -9
- package/dist/src/ui/tui/start-tui.js +0 -41
- package/dist/src/ui/tui/start-tui.js.map +0 -1
- package/dist/src/ui/tui/store.d.ts +0 -190
- package/dist/src/ui/tui/store.js +0 -474
- package/dist/src/ui/tui/store.js.map +0 -1
- package/dist/src/ui/tui/styles.d.ts +0 -32
- package/dist/src/ui/tui/styles.js +0 -35
- package/dist/src/ui/tui/styles.js.map +0 -1
- package/dist/src/ui/wizard-ui.d.ts +0 -81
- package/dist/src/ui/wizard-ui.js +0 -19
- package/dist/src/ui/wizard-ui.js.map +0 -1
- package/dist/src/utils/__tests__/analytics.test.d.ts +0 -1
- package/dist/src/utils/__tests__/analytics.test.js +0 -136
- package/dist/src/utils/__tests__/analytics.test.js.map +0 -1
- package/dist/src/utils/__tests__/provisioning.test.d.ts +0 -1
- package/dist/src/utils/__tests__/provisioning.test.js +0 -192
- package/dist/src/utils/__tests__/provisioning.test.js.map +0 -1
- package/dist/src/utils/__tests__/semver.test.d.ts +0 -1
- package/dist/src/utils/__tests__/semver.test.js +0 -159
- package/dist/src/utils/__tests__/semver.test.js.map +0 -1
- package/dist/src/utils/__tests__/setup-utils.test.d.ts +0 -1
- package/dist/src/utils/__tests__/setup-utils.test.js +0 -138
- package/dist/src/utils/__tests__/setup-utils.test.js.map +0 -1
- package/dist/src/utils/analytics.d.ts +0 -33
- package/dist/src/utils/analytics.js +0 -137
- package/dist/src/utils/analytics.js.map +0 -1
- package/dist/src/utils/anthropic-status.d.ts +0 -17
- package/dist/src/utils/anthropic-status.js +0 -49
- package/dist/src/utils/anthropic-status.js.map +0 -1
- package/dist/src/utils/bash.d.ts +0 -2
- package/dist/src/utils/bash.js +0 -54
- package/dist/src/utils/bash.js.map +0 -1
- package/dist/src/utils/custom-headers.d.ts +0 -9
- package/dist/src/utils/custom-headers.js +0 -24
- package/dist/src/utils/custom-headers.js.map +0 -1
- package/dist/src/utils/debug.d.ts +0 -29
- package/dist/src/utils/debug.js +0 -87
- package/dist/src/utils/debug.js.map +0 -1
- package/dist/src/utils/env-api-key.d.ts +0 -5
- package/dist/src/utils/env-api-key.js +0 -57
- package/dist/src/utils/env-api-key.js.map +0 -1
- package/dist/src/utils/environment.d.ts +0 -4
- package/dist/src/utils/environment.js +0 -77
- package/dist/src/utils/environment.js.map +0 -1
- package/dist/src/utils/file-utils.d.ts +0 -10
- package/dist/src/utils/file-utils.js +0 -49
- package/dist/src/utils/file-utils.js.map +0 -1
- package/dist/src/utils/logging.d.ts +0 -9
- package/dist/src/utils/logging.js +0 -47
- package/dist/src/utils/logging.js.map +0 -1
- package/dist/src/utils/oauth.d.ts +0 -33
- package/dist/src/utils/oauth.js +0 -288
- package/dist/src/utils/oauth.js.map +0 -1
- package/dist/src/utils/package-json.d.ts +0 -30
- package/dist/src/utils/package-json.js +0 -47
- package/dist/src/utils/package-json.js.map +0 -1
- package/dist/src/utils/package-manager.d.ts +0 -21
- package/dist/src/utils/package-manager.js +0 -210
- package/dist/src/utils/package-manager.js.map +0 -1
- package/dist/src/utils/provisioning.d.ts +0 -25
- package/dist/src/utils/provisioning.js +0 -191
- package/dist/src/utils/provisioning.js.map +0 -1
- package/dist/src/utils/rules/astro-rules.md +0 -44
- package/dist/src/utils/rules/next-rules.md +0 -9
- package/dist/src/utils/rules/react-native-rules.md +0 -7
- package/dist/src/utils/rules/react-rules.md +0 -7
- package/dist/src/utils/rules/svelte-rules.md +0 -7
- package/dist/src/utils/rules/universal.md +0 -32
- package/dist/src/utils/semver.d.ts +0 -21
- package/dist/src/utils/semver.js +0 -87
- package/dist/src/utils/semver.js.map +0 -1
- package/dist/src/utils/setup-utils.d.ts +0 -79
- package/dist/src/utils/setup-utils.js +0 -406
- package/dist/src/utils/setup-utils.js.map +0 -1
- package/dist/src/utils/string.d.ts +0 -1
- package/dist/src/utils/string.js +0 -9
- package/dist/src/utils/string.js.map +0 -1
- package/dist/src/utils/types.d.ts +0 -85
- package/dist/src/utils/types.js +0 -3
- package/dist/src/utils/types.js.map +0 -1
- package/dist/src/utils/urls.d.ts +0 -7
- package/dist/src/utils/urls.js +0 -78
- package/dist/src/utils/urls.js.map +0 -1
- package/dist/src/utils/vendor/is-unicorn-supported.d.ts +0 -1
- package/dist/src/utils/vendor/is-unicorn-supported.js +0 -24
- package/dist/src/utils/vendor/is-unicorn-supported.js.map +0 -1
- package/dist/src/utils/wizard-abort.d.ts +0 -16
- package/dist/src/utils/wizard-abort.js +0 -59
- package/dist/src/utils/wizard-abort.js.map +0 -1
|
@@ -1,935 +0,0 @@
|
|
|
1
|
-
import { WizardStore, TaskStatus, Flow, Screen, Overlay, RunPhase, McpOutcome, } from '../store.js';
|
|
2
|
-
import { OutroKind, AdditionalFeature } from '../../../lib/wizard-session.js';
|
|
3
|
-
import { WizardReadiness, evaluateWizardReadiness, } from '../../../lib/health-checks/readiness.js';
|
|
4
|
-
import { buildSession } from '../../../lib/wizard-session.js';
|
|
5
|
-
import { Integration } from '../../../lib/constants.js';
|
|
6
|
-
import { analytics } from '../../../utils/analytics.js';
|
|
7
|
-
jest.mock('../../../utils/analytics.js', () => ({
|
|
8
|
-
analytics: {
|
|
9
|
-
capture: jest.fn(),
|
|
10
|
-
wizardCapture: jest.fn(),
|
|
11
|
-
setTag: jest.fn(),
|
|
12
|
-
shutdown: jest.fn().mockResolvedValue(undefined),
|
|
13
|
-
},
|
|
14
|
-
sessionProperties: jest.fn(() => ({})),
|
|
15
|
-
}));
|
|
16
|
-
jest.mock('../../../lib/health-checks/readiness.js', () => ({
|
|
17
|
-
evaluateWizardReadiness: jest.fn().mockResolvedValue({
|
|
18
|
-
decision: 'yes',
|
|
19
|
-
health: {},
|
|
20
|
-
reasons: [],
|
|
21
|
-
}),
|
|
22
|
-
WizardReadiness: {
|
|
23
|
-
Yes: 'yes',
|
|
24
|
-
No: 'no',
|
|
25
|
-
YesWithWarnings: 'yes-with-warnings',
|
|
26
|
-
},
|
|
27
|
-
SERVICE_LABELS: {},
|
|
28
|
-
}));
|
|
29
|
-
function createStore(flow) {
|
|
30
|
-
return new WizardStore(flow);
|
|
31
|
-
}
|
|
32
|
-
const wizardCaptureMock = analytics.wizardCapture;
|
|
33
|
-
const evaluateWizardReadinessMock = evaluateWizardReadiness;
|
|
34
|
-
async function flushMicrotasks() {
|
|
35
|
-
await Promise.resolve();
|
|
36
|
-
await Promise.resolve();
|
|
37
|
-
}
|
|
38
|
-
describe('WizardStore', () => {
|
|
39
|
-
beforeEach(() => {
|
|
40
|
-
jest.clearAllMocks();
|
|
41
|
-
evaluateWizardReadinessMock.mockResolvedValue({
|
|
42
|
-
decision: WizardReadiness.Yes,
|
|
43
|
-
health: {},
|
|
44
|
-
reasons: [],
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
// ── Construction ─────────────────────────────────────────────────
|
|
48
|
-
describe('constructor', () => {
|
|
49
|
-
it('initialises with default state', () => {
|
|
50
|
-
const store = createStore();
|
|
51
|
-
expect(store.version).toBe('');
|
|
52
|
-
expect(store.statusMessages).toEqual([]);
|
|
53
|
-
expect(store.tasks).toEqual([]);
|
|
54
|
-
expect(store.session).toEqual(buildSession({}));
|
|
55
|
-
});
|
|
56
|
-
it('defaults to Wizard flow', () => {
|
|
57
|
-
const store = createStore();
|
|
58
|
-
expect(store.router.activeFlow).toBe(Flow.PostHogIntegration);
|
|
59
|
-
});
|
|
60
|
-
it('accepts a custom flow', () => {
|
|
61
|
-
const store = createStore(Flow.McpAdd);
|
|
62
|
-
expect(store.router.activeFlow).toBe(Flow.McpAdd);
|
|
63
|
-
});
|
|
64
|
-
it('starts with version 0', () => {
|
|
65
|
-
const store = createStore();
|
|
66
|
-
expect(store.getVersion()).toBe(0);
|
|
67
|
-
expect(store.getSnapshot()).toBe(0);
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
// ── Change notification ──────────────────────────────────────────
|
|
71
|
-
describe('change notification', () => {
|
|
72
|
-
it('emitChange increments version and notifies subscribers', () => {
|
|
73
|
-
const store = createStore();
|
|
74
|
-
const listener = jest.fn();
|
|
75
|
-
store.subscribe(listener);
|
|
76
|
-
store.emitChange();
|
|
77
|
-
expect(store.getVersion()).toBe(1);
|
|
78
|
-
expect(listener).toHaveBeenCalledTimes(1);
|
|
79
|
-
});
|
|
80
|
-
it('version increments on each emitChange', () => {
|
|
81
|
-
const store = createStore();
|
|
82
|
-
store.emitChange();
|
|
83
|
-
store.emitChange();
|
|
84
|
-
store.emitChange();
|
|
85
|
-
expect(store.getVersion()).toBe(3);
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
// ── React integration (subscribe / getSnapshot) ──────────────────
|
|
89
|
-
describe('subscribe / getSnapshot', () => {
|
|
90
|
-
it('subscribe registers a listener that fires on change', () => {
|
|
91
|
-
const store = createStore();
|
|
92
|
-
const cb = jest.fn();
|
|
93
|
-
store.subscribe(cb);
|
|
94
|
-
store.emitChange();
|
|
95
|
-
expect(cb).toHaveBeenCalledTimes(1);
|
|
96
|
-
});
|
|
97
|
-
it('subscribe returns an unsubscribe function', () => {
|
|
98
|
-
const store = createStore();
|
|
99
|
-
const cb = jest.fn();
|
|
100
|
-
const unsub = store.subscribe(cb);
|
|
101
|
-
unsub();
|
|
102
|
-
store.emitChange();
|
|
103
|
-
expect(cb).not.toHaveBeenCalled();
|
|
104
|
-
});
|
|
105
|
-
it('getSnapshot returns the current version', () => {
|
|
106
|
-
const store = createStore();
|
|
107
|
-
expect(store.getSnapshot()).toBe(0);
|
|
108
|
-
store.emitChange();
|
|
109
|
-
expect(store.getSnapshot()).toBe(1);
|
|
110
|
-
});
|
|
111
|
-
it('is compatible with useSyncExternalStore contract', () => {
|
|
112
|
-
const store = createStore();
|
|
113
|
-
const cb = jest.fn();
|
|
114
|
-
const unsub = store.subscribe(cb);
|
|
115
|
-
const v1 = store.getSnapshot();
|
|
116
|
-
store.completeSetup();
|
|
117
|
-
const v2 = store.getSnapshot();
|
|
118
|
-
expect(v2).toBeGreaterThan(v1);
|
|
119
|
-
expect(cb).toHaveBeenCalled();
|
|
120
|
-
unsub();
|
|
121
|
-
});
|
|
122
|
-
});
|
|
123
|
-
// ── Session setters ──────────────────────────────────────────────
|
|
124
|
-
describe('session setters', () => {
|
|
125
|
-
it('completeSetup sets setupConfirmed and resolves intro gate', async () => {
|
|
126
|
-
const store = createStore();
|
|
127
|
-
const cb = jest.fn();
|
|
128
|
-
store.subscribe(cb);
|
|
129
|
-
store.completeSetup();
|
|
130
|
-
expect(store.session.setupConfirmed).toBe(true);
|
|
131
|
-
await store.getGate('intro');
|
|
132
|
-
expect(cb).toHaveBeenCalled();
|
|
133
|
-
});
|
|
134
|
-
it('setRunPhase updates session.runPhase', () => {
|
|
135
|
-
const store = createStore();
|
|
136
|
-
store.setRunPhase(RunPhase.Running);
|
|
137
|
-
expect(store.session.runPhase).toBe(RunPhase.Running);
|
|
138
|
-
});
|
|
139
|
-
it('setCredentials updates session.credentials', () => {
|
|
140
|
-
const store = createStore();
|
|
141
|
-
const creds = {
|
|
142
|
-
accessToken: 'tok',
|
|
143
|
-
projectApiKey: 'pk',
|
|
144
|
-
host: 'https://app.posthog.com',
|
|
145
|
-
projectId: 42,
|
|
146
|
-
};
|
|
147
|
-
store.setCredentials(creds);
|
|
148
|
-
expect(store.session.credentials).toEqual(creds);
|
|
149
|
-
});
|
|
150
|
-
it('setFrameworkConfig updates integration and frameworkConfig', () => {
|
|
151
|
-
const store = createStore();
|
|
152
|
-
const integration = Integration.nextjs;
|
|
153
|
-
const config = {
|
|
154
|
-
metadata: { name: 'Next.js' },
|
|
155
|
-
};
|
|
156
|
-
store.setFrameworkConfig(integration, config);
|
|
157
|
-
expect(store.session.integration).toBe(integration);
|
|
158
|
-
expect(store.session.frameworkConfig).toBe(config);
|
|
159
|
-
});
|
|
160
|
-
it('setDetectionComplete marks detection done', () => {
|
|
161
|
-
const store = createStore();
|
|
162
|
-
expect(store.session.detectionComplete).toBe(false);
|
|
163
|
-
store.setDetectionComplete();
|
|
164
|
-
expect(store.session.detectionComplete).toBe(true);
|
|
165
|
-
});
|
|
166
|
-
it('setDetectedFramework sets the label', () => {
|
|
167
|
-
const store = createStore();
|
|
168
|
-
store.setDetectedFramework('Django');
|
|
169
|
-
expect(store.session.detectedFrameworkLabel).toBe('Django');
|
|
170
|
-
});
|
|
171
|
-
it('setLoginUrl sets and clears the login URL', () => {
|
|
172
|
-
const store = createStore();
|
|
173
|
-
store.setLoginUrl('https://example.com/auth');
|
|
174
|
-
expect(store.session.loginUrl).toBe('https://example.com/auth');
|
|
175
|
-
store.setLoginUrl(null);
|
|
176
|
-
expect(store.session.loginUrl).toBeNull();
|
|
177
|
-
});
|
|
178
|
-
it('setReadinessResult sets readiness info', () => {
|
|
179
|
-
const store = createStore();
|
|
180
|
-
const result = {
|
|
181
|
-
decision: WizardReadiness.No,
|
|
182
|
-
health: {},
|
|
183
|
-
reasons: ['Anthropic: down'],
|
|
184
|
-
};
|
|
185
|
-
store.setReadinessResult(result);
|
|
186
|
-
expect(store.session.readinessResult).toEqual(result);
|
|
187
|
-
store.setReadinessResult(null);
|
|
188
|
-
expect(store.session.readinessResult).toBeNull();
|
|
189
|
-
});
|
|
190
|
-
it('setMcpComplete marks MCP step done with outcome', () => {
|
|
191
|
-
const store = createStore();
|
|
192
|
-
expect(store.session.mcpComplete).toBe(false);
|
|
193
|
-
store.setMcpComplete(McpOutcome.Installed, ['Cursor']);
|
|
194
|
-
expect(store.session.mcpComplete).toBe(true);
|
|
195
|
-
expect(store.session.mcpOutcome).toBe(McpOutcome.Installed);
|
|
196
|
-
expect(store.session.mcpInstalledClients).toEqual(['Cursor']);
|
|
197
|
-
});
|
|
198
|
-
it('setOutroData sets outro information', () => {
|
|
199
|
-
const store = createStore();
|
|
200
|
-
const data = { kind: OutroKind.Success, message: 'Done!' };
|
|
201
|
-
store.setOutroData(data);
|
|
202
|
-
expect(store.session.outroData).toEqual(data);
|
|
203
|
-
});
|
|
204
|
-
it('setFrameworkContext sets key-value pairs', () => {
|
|
205
|
-
const store = createStore();
|
|
206
|
-
store.setFrameworkContext('packageManager', 'pnpm');
|
|
207
|
-
expect(store.session.frameworkContext['packageManager']).toBe('pnpm');
|
|
208
|
-
store.setFrameworkContext('srcDir', 'src');
|
|
209
|
-
expect(store.session.frameworkContext['srcDir']).toBe('src');
|
|
210
|
-
});
|
|
211
|
-
it('every setter emits exactly one change event', () => {
|
|
212
|
-
const store = createStore();
|
|
213
|
-
const cb = jest.fn();
|
|
214
|
-
store.subscribe(cb);
|
|
215
|
-
store.completeSetup();
|
|
216
|
-
store.setRunPhase(RunPhase.Running);
|
|
217
|
-
store.setCredentials(null);
|
|
218
|
-
store.setDetectionComplete();
|
|
219
|
-
store.setDetectedFramework('React');
|
|
220
|
-
store.setLoginUrl('url');
|
|
221
|
-
store.setReadinessResult(null);
|
|
222
|
-
store.setMcpComplete();
|
|
223
|
-
store.setOutroDismissed();
|
|
224
|
-
store.setSkillsComplete(true);
|
|
225
|
-
store.setOutroData({ kind: OutroKind.Success });
|
|
226
|
-
store.setFrameworkContext('k', 'v');
|
|
227
|
-
store.setFrameworkConfig(null, null);
|
|
228
|
-
expect(cb).toHaveBeenCalledTimes(13);
|
|
229
|
-
});
|
|
230
|
-
});
|
|
231
|
-
// ── Setter analytics events ────────────────────────────────────
|
|
232
|
-
describe('setter analytics events', () => {
|
|
233
|
-
it('completeSetup fires setup confirmed event', () => {
|
|
234
|
-
const store = createStore();
|
|
235
|
-
store.completeSetup();
|
|
236
|
-
expect(wizardCaptureMock).toHaveBeenCalledWith('setup confirmed', expect.any(Object));
|
|
237
|
-
});
|
|
238
|
-
it('setCredentials fires auth complete event', () => {
|
|
239
|
-
const store = createStore();
|
|
240
|
-
store.setCredentials({
|
|
241
|
-
accessToken: 'tok',
|
|
242
|
-
projectApiKey: 'pk',
|
|
243
|
-
host: 'h',
|
|
244
|
-
projectId: 42,
|
|
245
|
-
});
|
|
246
|
-
expect(wizardCaptureMock).toHaveBeenCalledWith('auth complete', {
|
|
247
|
-
project_id: 42,
|
|
248
|
-
});
|
|
249
|
-
});
|
|
250
|
-
it('enableFeature fires feature enabled event', () => {
|
|
251
|
-
const store = createStore();
|
|
252
|
-
store.enableFeature(AdditionalFeature.LLM);
|
|
253
|
-
expect(wizardCaptureMock).toHaveBeenCalledWith('feature enabled', {
|
|
254
|
-
feature: AdditionalFeature.LLM,
|
|
255
|
-
});
|
|
256
|
-
});
|
|
257
|
-
it('setMcpComplete fires mcp complete event', () => {
|
|
258
|
-
const store = createStore();
|
|
259
|
-
store.setMcpComplete(McpOutcome.Installed, ['Cursor', 'VS Code']);
|
|
260
|
-
expect(wizardCaptureMock).toHaveBeenCalledWith('mcp complete', expect.objectContaining({
|
|
261
|
-
mcp_outcome: McpOutcome.Installed,
|
|
262
|
-
mcp_installed_clients: ['Cursor', 'VS Code'],
|
|
263
|
-
}));
|
|
264
|
-
});
|
|
265
|
-
});
|
|
266
|
-
// ── Screen resolution (derived state) ────────────────────────────
|
|
267
|
-
describe('currentScreen', () => {
|
|
268
|
-
it('starts at intro for Wizard flow', () => {
|
|
269
|
-
const store = createStore();
|
|
270
|
-
expect(store.currentScreen).toBe(Screen.Intro);
|
|
271
|
-
});
|
|
272
|
-
it('advances to health check after setup confirmed', () => {
|
|
273
|
-
const store = createStore();
|
|
274
|
-
store.completeSetup();
|
|
275
|
-
expect(store.currentScreen).toBe(Screen.HealthCheck);
|
|
276
|
-
});
|
|
277
|
-
it('advances to auth after health check passes', () => {
|
|
278
|
-
const store = createStore();
|
|
279
|
-
store.completeSetup();
|
|
280
|
-
store.setReadinessResult({
|
|
281
|
-
decision: WizardReadiness.Yes,
|
|
282
|
-
health: {},
|
|
283
|
-
reasons: [],
|
|
284
|
-
});
|
|
285
|
-
expect(store.currentScreen).toBe(Screen.Auth);
|
|
286
|
-
});
|
|
287
|
-
it('advances to run after credentials are set', () => {
|
|
288
|
-
const store = createStore();
|
|
289
|
-
store.completeSetup();
|
|
290
|
-
store.setReadinessResult({
|
|
291
|
-
decision: WizardReadiness.Yes,
|
|
292
|
-
health: {},
|
|
293
|
-
reasons: [],
|
|
294
|
-
});
|
|
295
|
-
store.setCredentials({
|
|
296
|
-
accessToken: 'tok',
|
|
297
|
-
projectApiKey: 'pk',
|
|
298
|
-
host: 'h',
|
|
299
|
-
projectId: 1,
|
|
300
|
-
});
|
|
301
|
-
expect(store.currentScreen).toBe(Screen.Run);
|
|
302
|
-
});
|
|
303
|
-
it('advances to mcp after run completes', () => {
|
|
304
|
-
const store = createStore();
|
|
305
|
-
store.completeSetup();
|
|
306
|
-
store.setReadinessResult({
|
|
307
|
-
decision: WizardReadiness.Yes,
|
|
308
|
-
health: {},
|
|
309
|
-
reasons: [],
|
|
310
|
-
});
|
|
311
|
-
store.setCredentials({
|
|
312
|
-
accessToken: 'tok',
|
|
313
|
-
projectApiKey: 'pk',
|
|
314
|
-
host: 'h',
|
|
315
|
-
projectId: 1,
|
|
316
|
-
});
|
|
317
|
-
store.setRunPhase(RunPhase.Completed);
|
|
318
|
-
expect(store.currentScreen).toBe(Screen.Mcp);
|
|
319
|
-
});
|
|
320
|
-
it('advances to outro after mcp completes', () => {
|
|
321
|
-
const store = createStore();
|
|
322
|
-
store.completeSetup();
|
|
323
|
-
store.setReadinessResult({
|
|
324
|
-
decision: WizardReadiness.Yes,
|
|
325
|
-
health: {},
|
|
326
|
-
reasons: [],
|
|
327
|
-
});
|
|
328
|
-
store.setCredentials({
|
|
329
|
-
accessToken: 'tok',
|
|
330
|
-
projectApiKey: 'pk',
|
|
331
|
-
host: 'h',
|
|
332
|
-
projectId: 1,
|
|
333
|
-
});
|
|
334
|
-
store.setRunPhase(RunPhase.Completed);
|
|
335
|
-
store.setMcpComplete();
|
|
336
|
-
expect(store.currentScreen).toBe(Screen.Outro);
|
|
337
|
-
});
|
|
338
|
-
it('advances to skills after outro dismissed', () => {
|
|
339
|
-
const store = createStore();
|
|
340
|
-
store.completeSetup();
|
|
341
|
-
store.setReadinessResult({
|
|
342
|
-
decision: WizardReadiness.Yes,
|
|
343
|
-
health: {},
|
|
344
|
-
reasons: [],
|
|
345
|
-
});
|
|
346
|
-
store.setCredentials({
|
|
347
|
-
accessToken: 'tok',
|
|
348
|
-
projectApiKey: 'pk',
|
|
349
|
-
host: 'h',
|
|
350
|
-
projectId: 1,
|
|
351
|
-
});
|
|
352
|
-
store.setRunPhase(RunPhase.Completed);
|
|
353
|
-
store.setMcpComplete();
|
|
354
|
-
store.setOutroDismissed();
|
|
355
|
-
expect(store.currentScreen).toBe(Screen.KeepSkills);
|
|
356
|
-
});
|
|
357
|
-
it('starts at McpAdd for McpAdd flow', () => {
|
|
358
|
-
const store = createStore(Flow.McpAdd);
|
|
359
|
-
expect(store.currentScreen).toBe(Screen.McpAdd);
|
|
360
|
-
});
|
|
361
|
-
it('starts at McpRemove for McpRemove flow', () => {
|
|
362
|
-
const store = createStore(Flow.McpRemove);
|
|
363
|
-
expect(store.currentScreen).toBe(Screen.McpRemove);
|
|
364
|
-
});
|
|
365
|
-
});
|
|
366
|
-
// ── Overlay navigation ───────────────────────────────────────────
|
|
367
|
-
describe('overlay navigation', () => {
|
|
368
|
-
it('pushOverlay shows the overlay over the current screen', () => {
|
|
369
|
-
const store = createStore();
|
|
370
|
-
store.pushOverlay(Overlay.SettingsOverride);
|
|
371
|
-
expect(store.currentScreen).toBe(Overlay.SettingsOverride);
|
|
372
|
-
});
|
|
373
|
-
it('popOverlay returns to the underlying screen', () => {
|
|
374
|
-
const store = createStore();
|
|
375
|
-
store.pushOverlay(Overlay.SettingsOverride);
|
|
376
|
-
store.popOverlay();
|
|
377
|
-
expect(store.currentScreen).toBe(Screen.Intro);
|
|
378
|
-
});
|
|
379
|
-
it('pushOverlay emits change and increments version', () => {
|
|
380
|
-
const store = createStore();
|
|
381
|
-
const cb = jest.fn();
|
|
382
|
-
store.subscribe(cb);
|
|
383
|
-
store.pushOverlay(Overlay.SettingsOverride);
|
|
384
|
-
expect(cb).toHaveBeenCalledTimes(1);
|
|
385
|
-
expect(store.getVersion()).toBe(1);
|
|
386
|
-
});
|
|
387
|
-
it('popOverlay emits change and increments version', () => {
|
|
388
|
-
const store = createStore();
|
|
389
|
-
store.pushOverlay(Overlay.SettingsOverride);
|
|
390
|
-
const cb = jest.fn();
|
|
391
|
-
store.subscribe(cb);
|
|
392
|
-
store.popOverlay();
|
|
393
|
-
expect(cb).toHaveBeenCalledTimes(1);
|
|
394
|
-
});
|
|
395
|
-
it('pushOverlay sets direction to push', () => {
|
|
396
|
-
const store = createStore();
|
|
397
|
-
store.pushOverlay(Overlay.SettingsOverride);
|
|
398
|
-
expect(store.lastNavDirection).toBe('push');
|
|
399
|
-
});
|
|
400
|
-
it('popOverlay sets direction to pop', () => {
|
|
401
|
-
const store = createStore();
|
|
402
|
-
store.pushOverlay(Overlay.SettingsOverride);
|
|
403
|
-
store.popOverlay();
|
|
404
|
-
expect(store.lastNavDirection).toBe('pop');
|
|
405
|
-
});
|
|
406
|
-
});
|
|
407
|
-
// ── Agent observation state ──────────────────────────────────────
|
|
408
|
-
describe('statusMessages', () => {
|
|
409
|
-
it('pushStatus appends messages', () => {
|
|
410
|
-
const store = createStore();
|
|
411
|
-
store.pushStatus('Installing SDK...');
|
|
412
|
-
store.pushStatus('Configuring...');
|
|
413
|
-
expect(store.statusMessages).toEqual([
|
|
414
|
-
'Installing SDK...',
|
|
415
|
-
'Configuring...',
|
|
416
|
-
]);
|
|
417
|
-
});
|
|
418
|
-
it('pushStatus emits change', () => {
|
|
419
|
-
const store = createStore();
|
|
420
|
-
const cb = jest.fn();
|
|
421
|
-
store.subscribe(cb);
|
|
422
|
-
store.pushStatus('msg');
|
|
423
|
-
expect(cb).toHaveBeenCalledTimes(1);
|
|
424
|
-
});
|
|
425
|
-
});
|
|
426
|
-
describe('tasks', () => {
|
|
427
|
-
it('setTasks replaces the task list', () => {
|
|
428
|
-
const store = createStore();
|
|
429
|
-
const tasks = [
|
|
430
|
-
{ label: 'Install SDK', status: TaskStatus.Pending, done: false },
|
|
431
|
-
{ label: 'Configure', status: TaskStatus.Pending, done: false },
|
|
432
|
-
];
|
|
433
|
-
store.setTasks(tasks);
|
|
434
|
-
expect(store.tasks).toEqual(tasks);
|
|
435
|
-
});
|
|
436
|
-
it('updateTask marks a task as done', () => {
|
|
437
|
-
const store = createStore();
|
|
438
|
-
store.setTasks([
|
|
439
|
-
{ label: 'Install SDK', status: TaskStatus.Pending, done: false },
|
|
440
|
-
]);
|
|
441
|
-
store.updateTask(0, true);
|
|
442
|
-
expect(store.tasks[0].done).toBe(true);
|
|
443
|
-
expect(store.tasks[0].status).toBe(TaskStatus.Completed);
|
|
444
|
-
});
|
|
445
|
-
it('updateTask marks a task as not done', () => {
|
|
446
|
-
const store = createStore();
|
|
447
|
-
store.setTasks([
|
|
448
|
-
{ label: 'Install SDK', status: TaskStatus.Completed, done: true },
|
|
449
|
-
]);
|
|
450
|
-
store.updateTask(0, false);
|
|
451
|
-
expect(store.tasks[0].done).toBe(false);
|
|
452
|
-
expect(store.tasks[0].status).toBe(TaskStatus.Pending);
|
|
453
|
-
});
|
|
454
|
-
it('updateTask is a no-op for out-of-bounds index', () => {
|
|
455
|
-
const store = createStore();
|
|
456
|
-
store.setTasks([
|
|
457
|
-
{ label: 'Install SDK', status: TaskStatus.Pending, done: false },
|
|
458
|
-
]);
|
|
459
|
-
const cb = jest.fn();
|
|
460
|
-
store.subscribe(cb);
|
|
461
|
-
store.updateTask(99, true);
|
|
462
|
-
expect(cb).not.toHaveBeenCalled();
|
|
463
|
-
});
|
|
464
|
-
});
|
|
465
|
-
describe('syncTodos', () => {
|
|
466
|
-
it('maps incoming todos to TaskItems', () => {
|
|
467
|
-
const store = createStore();
|
|
468
|
-
store.syncTodos([
|
|
469
|
-
{ content: 'Install SDK', status: 'pending' },
|
|
470
|
-
{ content: 'Configure', status: 'completed' },
|
|
471
|
-
]);
|
|
472
|
-
expect(store.tasks).toHaveLength(2);
|
|
473
|
-
expect(store.tasks[0]).toEqual({
|
|
474
|
-
label: 'Install SDK',
|
|
475
|
-
activeForm: undefined,
|
|
476
|
-
status: TaskStatus.Pending,
|
|
477
|
-
done: false,
|
|
478
|
-
});
|
|
479
|
-
expect(store.tasks[1]).toEqual({
|
|
480
|
-
label: 'Configure',
|
|
481
|
-
activeForm: undefined,
|
|
482
|
-
status: TaskStatus.Completed,
|
|
483
|
-
done: true,
|
|
484
|
-
});
|
|
485
|
-
});
|
|
486
|
-
it('retains completed tasks not in the incoming list', () => {
|
|
487
|
-
const store = createStore();
|
|
488
|
-
store.setTasks([
|
|
489
|
-
{ label: 'Old done task', status: TaskStatus.Completed, done: true },
|
|
490
|
-
{ label: 'Old pending task', status: TaskStatus.Pending, done: false },
|
|
491
|
-
]);
|
|
492
|
-
store.syncTodos([{ content: 'New task', status: 'pending' }]);
|
|
493
|
-
// Old done task is retained, old pending task is dropped
|
|
494
|
-
expect(store.tasks).toHaveLength(2);
|
|
495
|
-
expect(store.tasks[0].label).toBe('Old done task');
|
|
496
|
-
expect(store.tasks[1].label).toBe('New task');
|
|
497
|
-
});
|
|
498
|
-
it('does not duplicate completed tasks that appear in both', () => {
|
|
499
|
-
const store = createStore();
|
|
500
|
-
store.setTasks([
|
|
501
|
-
{ label: 'Shared task', status: TaskStatus.Completed, done: true },
|
|
502
|
-
]);
|
|
503
|
-
store.syncTodos([{ content: 'Shared task', status: 'completed' }]);
|
|
504
|
-
// Should not have duplicates — incomingLabels includes "Shared task",
|
|
505
|
-
// so the retained filter excludes it
|
|
506
|
-
expect(store.tasks).toHaveLength(1);
|
|
507
|
-
expect(store.tasks[0].label).toBe('Shared task');
|
|
508
|
-
});
|
|
509
|
-
it('preserves activeForm from incoming todos', () => {
|
|
510
|
-
const store = createStore();
|
|
511
|
-
store.syncTodos([
|
|
512
|
-
{
|
|
513
|
-
content: 'Installing',
|
|
514
|
-
status: 'in_progress',
|
|
515
|
-
activeForm: 'Installing SDK...',
|
|
516
|
-
},
|
|
517
|
-
]);
|
|
518
|
-
expect(store.tasks[0].activeForm).toBe('Installing SDK...');
|
|
519
|
-
});
|
|
520
|
-
it('emits change', () => {
|
|
521
|
-
const store = createStore();
|
|
522
|
-
const cb = jest.fn();
|
|
523
|
-
store.subscribe(cb);
|
|
524
|
-
store.syncTodos([{ content: 'task', status: 'pending' }]);
|
|
525
|
-
expect(cb).toHaveBeenCalled();
|
|
526
|
-
});
|
|
527
|
-
});
|
|
528
|
-
// ── Navigation direction ─────────────────────────────────────────
|
|
529
|
-
describe('lastNavDirection', () => {
|
|
530
|
-
it('starts as null', () => {
|
|
531
|
-
const store = createStore();
|
|
532
|
-
expect(store.lastNavDirection).toBeNull();
|
|
533
|
-
});
|
|
534
|
-
it('is set to push on emitChange', () => {
|
|
535
|
-
const store = createStore();
|
|
536
|
-
store.emitChange();
|
|
537
|
-
expect(store.lastNavDirection).toBe('push');
|
|
538
|
-
});
|
|
539
|
-
});
|
|
540
|
-
// ── Concurrent / rapid-fire mutations ─────────────────────────────
|
|
541
|
-
describe('concurrent mutations', () => {
|
|
542
|
-
it('rapid-fire setters each increment version by 1', () => {
|
|
543
|
-
const store = createStore();
|
|
544
|
-
const cb = jest.fn();
|
|
545
|
-
store.subscribe(cb);
|
|
546
|
-
store.completeSetup();
|
|
547
|
-
store.setRunPhase(RunPhase.Running);
|
|
548
|
-
store.pushStatus('msg1');
|
|
549
|
-
store.pushStatus('msg2');
|
|
550
|
-
store.setDetectedFramework('React');
|
|
551
|
-
expect(store.getVersion()).toBe(5);
|
|
552
|
-
expect(cb).toHaveBeenCalledTimes(5);
|
|
553
|
-
});
|
|
554
|
-
it('subscriber sees consistent state during a setter call', () => {
|
|
555
|
-
const store = createStore();
|
|
556
|
-
const snapshots = [];
|
|
557
|
-
store.subscribe(() => {
|
|
558
|
-
snapshots.push({
|
|
559
|
-
confirmed: store.session.setupConfirmed,
|
|
560
|
-
version: store.getSnapshot(),
|
|
561
|
-
});
|
|
562
|
-
});
|
|
563
|
-
store.completeSetup();
|
|
564
|
-
expect(snapshots).toEqual([{ confirmed: true, version: 1 }]);
|
|
565
|
-
});
|
|
566
|
-
it('multiple subscribers all see the same state', () => {
|
|
567
|
-
const store = createStore();
|
|
568
|
-
const results = [];
|
|
569
|
-
store.subscribe(() => results.push(store.getSnapshot()));
|
|
570
|
-
store.subscribe(() => results.push(store.getSnapshot()));
|
|
571
|
-
store.subscribe(() => results.push(store.getSnapshot()));
|
|
572
|
-
store.completeSetup();
|
|
573
|
-
// All 3 subscribers should see version 1
|
|
574
|
-
expect(results).toEqual([1, 1, 1]);
|
|
575
|
-
});
|
|
576
|
-
it('subscriber that mutates store during notification triggers additional notifications', () => {
|
|
577
|
-
const store = createStore();
|
|
578
|
-
const versions = [];
|
|
579
|
-
// First subscriber triggers another mutation
|
|
580
|
-
store.subscribe(() => {
|
|
581
|
-
versions.push(store.getSnapshot());
|
|
582
|
-
if (store.session.setupConfirmed &&
|
|
583
|
-
store.session.runPhase === RunPhase.Idle) {
|
|
584
|
-
store.setRunPhase(RunPhase.Running);
|
|
585
|
-
}
|
|
586
|
-
});
|
|
587
|
-
store.completeSetup();
|
|
588
|
-
// Should see version 1 (from completeSetup) and version 2 (from setRunPhase)
|
|
589
|
-
expect(versions).toEqual([1, 2]);
|
|
590
|
-
expect(store.session.runPhase).toBe(RunPhase.Running);
|
|
591
|
-
});
|
|
592
|
-
it('interleaved overlay and session mutations are all visible', () => {
|
|
593
|
-
const store = createStore();
|
|
594
|
-
const screens = [];
|
|
595
|
-
store.subscribe(() => {
|
|
596
|
-
screens.push(store.currentScreen);
|
|
597
|
-
});
|
|
598
|
-
store.completeSetup(); // -> health-check
|
|
599
|
-
store.pushOverlay(Overlay.SettingsOverride); // -> settings-override
|
|
600
|
-
store.setCredentials({
|
|
601
|
-
// -> settings-override (overlay still on top)
|
|
602
|
-
accessToken: 'tok',
|
|
603
|
-
projectApiKey: 'pk',
|
|
604
|
-
host: 'h',
|
|
605
|
-
projectId: 1,
|
|
606
|
-
});
|
|
607
|
-
store.popOverlay(); // -> health-check (readinessResult still null)
|
|
608
|
-
expect(screens).toEqual([
|
|
609
|
-
Screen.HealthCheck,
|
|
610
|
-
Overlay.SettingsOverride,
|
|
611
|
-
Overlay.SettingsOverride,
|
|
612
|
-
Screen.HealthCheck,
|
|
613
|
-
]);
|
|
614
|
-
});
|
|
615
|
-
it('unsubscribing mid-notification does not affect other subscribers', () => {
|
|
616
|
-
const store = createStore();
|
|
617
|
-
const log = [];
|
|
618
|
-
store.subscribe(() => {
|
|
619
|
-
log.push('sub1');
|
|
620
|
-
});
|
|
621
|
-
const unsub2 = store.subscribe(() => {
|
|
622
|
-
log.push('sub2');
|
|
623
|
-
});
|
|
624
|
-
store.subscribe(() => {
|
|
625
|
-
log.push('sub3');
|
|
626
|
-
});
|
|
627
|
-
store.emitChange();
|
|
628
|
-
expect(log).toEqual(['sub1', 'sub2', 'sub3']);
|
|
629
|
-
// Unsub the second listener
|
|
630
|
-
unsub2();
|
|
631
|
-
log.length = 0;
|
|
632
|
-
store.emitChange();
|
|
633
|
-
expect(log).toEqual(['sub1', 'sub3']);
|
|
634
|
-
});
|
|
635
|
-
});
|
|
636
|
-
// ── Multiple subscribers ─────────────────────────────────────────
|
|
637
|
-
describe('multiple subscribers', () => {
|
|
638
|
-
it('supports many concurrent subscribers', () => {
|
|
639
|
-
const store = createStore();
|
|
640
|
-
const callbacks = Array.from({ length: 50 }, () => jest.fn());
|
|
641
|
-
const unsubs = callbacks.map((cb) => store.subscribe(cb));
|
|
642
|
-
store.emitChange();
|
|
643
|
-
callbacks.forEach((cb) => expect(cb).toHaveBeenCalledTimes(1));
|
|
644
|
-
// Unsubscribe all
|
|
645
|
-
unsubs.forEach((unsub) => unsub());
|
|
646
|
-
store.emitChange();
|
|
647
|
-
// No more notifications
|
|
648
|
-
callbacks.forEach((cb) => expect(cb).toHaveBeenCalledTimes(1));
|
|
649
|
-
});
|
|
650
|
-
it('double-unsubscribe is safe', () => {
|
|
651
|
-
const store = createStore();
|
|
652
|
-
const cb = jest.fn();
|
|
653
|
-
const unsub = store.subscribe(cb);
|
|
654
|
-
unsub();
|
|
655
|
-
unsub(); // should not throw
|
|
656
|
-
store.emitChange();
|
|
657
|
-
expect(cb).not.toHaveBeenCalled();
|
|
658
|
-
});
|
|
659
|
-
});
|
|
660
|
-
// ── Edge cases ───────────────────────────────────────────────────
|
|
661
|
-
describe('edge cases', () => {
|
|
662
|
-
it('setFrameworkContext overwrites existing keys', () => {
|
|
663
|
-
const store = createStore();
|
|
664
|
-
store.setFrameworkContext('key', 'value1');
|
|
665
|
-
store.setFrameworkContext('key', 'value2');
|
|
666
|
-
expect(store.session.frameworkContext['key']).toBe('value2');
|
|
667
|
-
});
|
|
668
|
-
it('setFrameworkConfig with null integration and config', () => {
|
|
669
|
-
const store = createStore();
|
|
670
|
-
store.setFrameworkConfig(null, null);
|
|
671
|
-
expect(store.session.integration).toBeNull();
|
|
672
|
-
expect(store.session.frameworkConfig).toBeNull();
|
|
673
|
-
});
|
|
674
|
-
it('pushStatus with empty string', () => {
|
|
675
|
-
const store = createStore();
|
|
676
|
-
store.pushStatus('');
|
|
677
|
-
expect(store.statusMessages).toEqual(['']);
|
|
678
|
-
});
|
|
679
|
-
it('syncTodos with empty array clears non-completed tasks', () => {
|
|
680
|
-
const store = createStore();
|
|
681
|
-
store.setTasks([
|
|
682
|
-
{ label: 'Pending', status: TaskStatus.Pending, done: false },
|
|
683
|
-
{ label: 'Done', status: TaskStatus.Completed, done: true },
|
|
684
|
-
]);
|
|
685
|
-
store.syncTodos([]);
|
|
686
|
-
// Only the completed task is retained
|
|
687
|
-
expect(store.tasks).toEqual([
|
|
688
|
-
{ label: 'Done', status: TaskStatus.Completed, done: true },
|
|
689
|
-
]);
|
|
690
|
-
});
|
|
691
|
-
it('syncTodos with unknown status defaults to Pending', () => {
|
|
692
|
-
const store = createStore();
|
|
693
|
-
store.syncTodos([{ content: 'Task', status: '' }]);
|
|
694
|
-
expect(store.tasks[0].status).toBe(TaskStatus.Pending);
|
|
695
|
-
});
|
|
696
|
-
it('updateTask with negative index is a no-op', () => {
|
|
697
|
-
const store = createStore();
|
|
698
|
-
store.setTasks([
|
|
699
|
-
{ label: 'Task', status: TaskStatus.Pending, done: false },
|
|
700
|
-
]);
|
|
701
|
-
const cb = jest.fn();
|
|
702
|
-
store.subscribe(cb);
|
|
703
|
-
store.updateTask(-1, true);
|
|
704
|
-
expect(cb).not.toHaveBeenCalled();
|
|
705
|
-
});
|
|
706
|
-
it('popOverlay on empty stack does not crash', () => {
|
|
707
|
-
const store = createStore();
|
|
708
|
-
expect(() => store.popOverlay()).not.toThrow();
|
|
709
|
-
expect(store.currentScreen).toBe(Screen.Intro);
|
|
710
|
-
});
|
|
711
|
-
it('screen advances to outro on RunPhase.Error too', () => {
|
|
712
|
-
const store = createStore();
|
|
713
|
-
store.completeSetup();
|
|
714
|
-
store.setReadinessResult({
|
|
715
|
-
decision: WizardReadiness.Yes,
|
|
716
|
-
health: {},
|
|
717
|
-
reasons: [],
|
|
718
|
-
});
|
|
719
|
-
store.setCredentials({
|
|
720
|
-
accessToken: 'tok',
|
|
721
|
-
projectApiKey: 'pk',
|
|
722
|
-
host: 'h',
|
|
723
|
-
projectId: 1,
|
|
724
|
-
});
|
|
725
|
-
store.setRunPhase(RunPhase.Error);
|
|
726
|
-
// Run is "complete" (either Completed or Error), so we advance past it
|
|
727
|
-
expect(store.currentScreen).toBe(Screen.Mcp);
|
|
728
|
-
});
|
|
729
|
-
it('completeSetup can only resolve the promise once', async () => {
|
|
730
|
-
const store = createStore();
|
|
731
|
-
store.completeSetup();
|
|
732
|
-
store.completeSetup(); // second call — promise already resolved
|
|
733
|
-
await store.getGate('intro');
|
|
734
|
-
expect(store.session.setupConfirmed).toBe(true);
|
|
735
|
-
});
|
|
736
|
-
it('version property (string) is independent from internal _version counter', () => {
|
|
737
|
-
const store = createStore();
|
|
738
|
-
store.version = '1.2.3';
|
|
739
|
-
expect(store.version).toBe('1.2.3');
|
|
740
|
-
expect(store.getVersion()).toBe(0);
|
|
741
|
-
store.emitChange();
|
|
742
|
-
expect(store.version).toBe('1.2.3');
|
|
743
|
-
expect(store.getVersion()).toBe(1);
|
|
744
|
-
});
|
|
745
|
-
});
|
|
746
|
-
// ── Full wizard flow simulation ──────────────────────────────────
|
|
747
|
-
describe('full wizard flow', () => {
|
|
748
|
-
it('walks through the posthog integration flow correctly', () => {
|
|
749
|
-
const store = createStore();
|
|
750
|
-
const screenHistory = [];
|
|
751
|
-
store.subscribe(() => screenHistory.push(store.currentScreen));
|
|
752
|
-
expect(store.currentScreen).toBe(Screen.Intro);
|
|
753
|
-
// Step 1: Confirm setup
|
|
754
|
-
store.completeSetup();
|
|
755
|
-
expect(store.currentScreen).toBe(Screen.HealthCheck);
|
|
756
|
-
// Step 2: Health check passes
|
|
757
|
-
store.setReadinessResult({
|
|
758
|
-
decision: WizardReadiness.Yes,
|
|
759
|
-
health: {},
|
|
760
|
-
reasons: [],
|
|
761
|
-
});
|
|
762
|
-
expect(store.currentScreen).toBe(Screen.Auth);
|
|
763
|
-
// Step 3: Authenticate
|
|
764
|
-
store.setCredentials({
|
|
765
|
-
accessToken: 'tok',
|
|
766
|
-
projectApiKey: 'pk',
|
|
767
|
-
host: 'https://app.posthog.com',
|
|
768
|
-
projectId: 1,
|
|
769
|
-
});
|
|
770
|
-
expect(store.currentScreen).toBe(Screen.Run);
|
|
771
|
-
// Step 4: Start and complete run
|
|
772
|
-
store.setRunPhase(RunPhase.Running);
|
|
773
|
-
expect(store.currentScreen).toBe(Screen.Run);
|
|
774
|
-
store.setRunPhase(RunPhase.Completed);
|
|
775
|
-
expect(store.currentScreen).toBe(Screen.Mcp);
|
|
776
|
-
// Step 5: Complete MCP
|
|
777
|
-
store.setMcpComplete();
|
|
778
|
-
expect(store.currentScreen).toBe(Screen.Outro);
|
|
779
|
-
// Step 6: Dismiss outro
|
|
780
|
-
store.setOutroDismissed();
|
|
781
|
-
expect(store.currentScreen).toBe(Screen.KeepSkills);
|
|
782
|
-
// Verify version was bumped for each setter call
|
|
783
|
-
expect(store.getVersion()).toBe(7);
|
|
784
|
-
});
|
|
785
|
-
it('walks through the revenue analytics flow correctly', () => {
|
|
786
|
-
const store = createStore(Flow.RevenueAnalyticsSetup);
|
|
787
|
-
expect(store.currentScreen).toBe(Screen.RevenueIntro);
|
|
788
|
-
// Step 1: Confirm intro
|
|
789
|
-
store.completeSetup();
|
|
790
|
-
expect(store.currentScreen).toBe(Screen.Auth);
|
|
791
|
-
// Step 2: Authenticate
|
|
792
|
-
store.setCredentials({
|
|
793
|
-
accessToken: 'tok',
|
|
794
|
-
projectApiKey: 'pk',
|
|
795
|
-
host: 'https://app.posthog.com',
|
|
796
|
-
projectId: 1,
|
|
797
|
-
});
|
|
798
|
-
expect(store.currentScreen).toBe(Screen.Run);
|
|
799
|
-
// Step 3: Start and complete run
|
|
800
|
-
store.setRunPhase(RunPhase.Running);
|
|
801
|
-
expect(store.currentScreen).toBe(Screen.Run);
|
|
802
|
-
store.setRunPhase(RunPhase.Completed);
|
|
803
|
-
expect(store.currentScreen).toBe(Screen.Outro);
|
|
804
|
-
// Step 4: Dismiss outro
|
|
805
|
-
store.setOutroDismissed();
|
|
806
|
-
expect(store.currentScreen).toBe('skills');
|
|
807
|
-
});
|
|
808
|
-
it('walks through the agent skill flow correctly', () => {
|
|
809
|
-
const store = createStore(Flow.AgentSkill);
|
|
810
|
-
expect(store.currentScreen).toBe(Screen.AgentSkillIntro);
|
|
811
|
-
// Step 1: Confirm intro
|
|
812
|
-
store.completeSetup();
|
|
813
|
-
expect(store.currentScreen).toBe(Screen.Auth);
|
|
814
|
-
// Step 2: Authenticate
|
|
815
|
-
store.setCredentials({
|
|
816
|
-
accessToken: 'tok',
|
|
817
|
-
projectApiKey: 'pk',
|
|
818
|
-
host: 'https://app.posthog.com',
|
|
819
|
-
projectId: 1,
|
|
820
|
-
});
|
|
821
|
-
expect(store.currentScreen).toBe(Screen.Run);
|
|
822
|
-
// Step 3: Start and complete run
|
|
823
|
-
store.setRunPhase(RunPhase.Running);
|
|
824
|
-
expect(store.currentScreen).toBe(Screen.Run);
|
|
825
|
-
store.setRunPhase(RunPhase.Completed);
|
|
826
|
-
expect(store.currentScreen).toBe(Screen.Outro);
|
|
827
|
-
// Step 4: Dismiss outro
|
|
828
|
-
store.setOutroDismissed();
|
|
829
|
-
expect(store.currentScreen).toBe('skills');
|
|
830
|
-
});
|
|
831
|
-
});
|
|
832
|
-
// ── health-check gate ────────────────────────────────────────────
|
|
833
|
-
describe('health-check gate', () => {
|
|
834
|
-
it('resolves immediately for non-Wizard flows', async () => {
|
|
835
|
-
const store = createStore(Flow.McpAdd);
|
|
836
|
-
await expect(store.getGate('health-check')).resolves.toBeUndefined();
|
|
837
|
-
});
|
|
838
|
-
it('resolves automatically when readiness is non-blocking', async () => {
|
|
839
|
-
evaluateWizardReadinessMock.mockResolvedValueOnce({
|
|
840
|
-
decision: WizardReadiness.Yes,
|
|
841
|
-
health: {},
|
|
842
|
-
reasons: [],
|
|
843
|
-
});
|
|
844
|
-
const store = createStore();
|
|
845
|
-
let resolved = false;
|
|
846
|
-
void store.getGate('health-check').then(() => {
|
|
847
|
-
resolved = true;
|
|
848
|
-
});
|
|
849
|
-
await flushMicrotasks();
|
|
850
|
-
expect(resolved).toBe(true);
|
|
851
|
-
expect(store.session.readinessResult).toEqual({
|
|
852
|
-
decision: WizardReadiness.Yes,
|
|
853
|
-
health: {},
|
|
854
|
-
reasons: [],
|
|
855
|
-
});
|
|
856
|
-
});
|
|
857
|
-
it('stays pending for blocking readiness until outage is dismissed', async () => {
|
|
858
|
-
evaluateWizardReadinessMock.mockResolvedValueOnce({
|
|
859
|
-
decision: WizardReadiness.No,
|
|
860
|
-
health: {},
|
|
861
|
-
reasons: ['Anthropic: down'],
|
|
862
|
-
});
|
|
863
|
-
const store = createStore();
|
|
864
|
-
let resolved = false;
|
|
865
|
-
void store.getGate('health-check').then(() => {
|
|
866
|
-
resolved = true;
|
|
867
|
-
});
|
|
868
|
-
await flushMicrotasks();
|
|
869
|
-
expect(resolved).toBe(false);
|
|
870
|
-
expect(store.currentScreen).toBe(Screen.Intro);
|
|
871
|
-
store.dismissOutage();
|
|
872
|
-
await store.getGate('health-check');
|
|
873
|
-
expect(resolved).toBe(true);
|
|
874
|
-
expect(store.session.outageDismissed).toBe(true);
|
|
875
|
-
});
|
|
876
|
-
});
|
|
877
|
-
// ── Screen transition analytics ───────────────────────────────────
|
|
878
|
-
describe('screen transition analytics', () => {
|
|
879
|
-
it('fires when a real screen transition occurs after the initial screen', () => {
|
|
880
|
-
const store = createStore();
|
|
881
|
-
store.completeSetup();
|
|
882
|
-
wizardCaptureMock.mockClear();
|
|
883
|
-
store.setReadinessResult({
|
|
884
|
-
decision: WizardReadiness.Yes,
|
|
885
|
-
health: {},
|
|
886
|
-
reasons: [],
|
|
887
|
-
});
|
|
888
|
-
expect(wizardCaptureMock).toHaveBeenCalledWith('screen auth', expect.objectContaining({
|
|
889
|
-
from_screen: Screen.HealthCheck,
|
|
890
|
-
}));
|
|
891
|
-
});
|
|
892
|
-
it('does not fire a screen event when the visible screen stays the same', () => {
|
|
893
|
-
const store = createStore();
|
|
894
|
-
store.completeSetup();
|
|
895
|
-
store.setReadinessResult({
|
|
896
|
-
decision: WizardReadiness.Yes,
|
|
897
|
-
health: {},
|
|
898
|
-
reasons: [],
|
|
899
|
-
});
|
|
900
|
-
store.setCredentials({
|
|
901
|
-
accessToken: 'tok',
|
|
902
|
-
projectApiKey: 'pk',
|
|
903
|
-
host: 'h',
|
|
904
|
-
projectId: 1,
|
|
905
|
-
});
|
|
906
|
-
wizardCaptureMock.mockClear();
|
|
907
|
-
store.setRunPhase(RunPhase.Running);
|
|
908
|
-
expect(store.currentScreen).toBe(Screen.Run);
|
|
909
|
-
expect(wizardCaptureMock.mock.calls.some(([event]) => typeof event === 'string' && event.startsWith('screen '))).toBe(false);
|
|
910
|
-
});
|
|
911
|
-
});
|
|
912
|
-
// ── intro gate ──────────────────────────────────────────────────
|
|
913
|
-
describe('intro gate', () => {
|
|
914
|
-
it('resolves when completeSetup is called', async () => {
|
|
915
|
-
const store = createStore();
|
|
916
|
-
store.completeSetup();
|
|
917
|
-
await store.getGate('intro');
|
|
918
|
-
expect(store.session.setupConfirmed).toBe(true);
|
|
919
|
-
});
|
|
920
|
-
it('is a promise that can be awaited before completeSetup is called', async () => {
|
|
921
|
-
const store = createStore();
|
|
922
|
-
let resolved = false;
|
|
923
|
-
void store.getGate('intro').then(() => {
|
|
924
|
-
resolved = true;
|
|
925
|
-
});
|
|
926
|
-
// Not yet resolved
|
|
927
|
-
await Promise.resolve(); // flush microtasks
|
|
928
|
-
expect(resolved).toBe(false);
|
|
929
|
-
store.completeSetup();
|
|
930
|
-
await store.getGate('intro');
|
|
931
|
-
expect(resolved).toBe(true);
|
|
932
|
-
});
|
|
933
|
-
});
|
|
934
|
-
});
|
|
935
|
-
//# sourceMappingURL=store.test.js.map
|