@algolia/wizard 0.103.0-rc.217.762 → 0.103.0-rc.217.763

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.
Files changed (2) hide show
  1. package/dist/main.js +17 -8
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -2467,7 +2467,7 @@ async function ensureApplication(resumeAppId) {
2467
2467
  // package.json
2468
2468
  var package_default = {
2469
2469
  name: "@algolia/wizard",
2470
- version: "0.103.0-rc.217.762",
2470
+ version: "0.103.0-rc.217.763",
2471
2471
  description: "Magically implement Algolia functionality in your codebase",
2472
2472
  type: "module",
2473
2473
  engines: {
@@ -5044,7 +5044,6 @@ async function classifyCommandSafety(createModel, command, cwd, explanation, app
5044
5044
  const { output, usage } = await generateText({
5045
5045
  model: anthropic(profile.model),
5046
5046
  maxOutputTokens: CLASSIFIER_MAX_OUTPUT_TOKENS,
5047
- temperature: 0,
5048
5047
  providerOptions: {
5049
5048
  anthropic: {
5050
5049
  thinking: modelOptions.thinking,
@@ -6869,14 +6868,14 @@ function validationInstructions(input) {
6869
6868
  `The confirmed placement candidate was "${input.searchLocation ?? "unknown"}", but verify the actual mount rather than assuming the candidate was used.`,
6870
6869
  "Inspect the generated search component, its actual mount file, that file's parent layout and sibling controls, and the relevant content UI. Do not rely only on type checks or tests.",
6871
6870
  "Confirm that the application renders exactly one search bar. Check for an old search bar and duplicate mounts.",
6872
- "If the project sets a Content-Security-Policy, confirm that connect-src allows https://*.algolia.net, https://*.algolianet.com, and https://insights.algolia.io, and that search-insights is loaded from npm (not a CDN). If a CSP exists and fails either check, set sufficient=false. If the project has no CSP, skip both checks: do not set sufficient=false, and do not ask to add a CSP.",
6871
+ "If the project sets a Content-Security-Policy, confirm that connect-src allows https://*.algolia.net, https://*.algolianet.com, and https://insights.algolia.io, and that search-insights is loaded from npm (not a CDN). If a CSP exists and fails either check, set sufficient=false. If the project has no CSP, skip both checks: do not set sufficient=false, and do not ask to add a CSP. Without a CSP, insights={true} (or insights: true) with no search-insights package is correct, because the widget loads search-insights from its CDN: do not report a missing search-insights package.",
6873
6872
  "Confirm content-specific search is placed with the corresponding content or task controls. Shared navigation is valid only for genuinely app-wide search that fits the visual hierarchy and responsive layout without crowding primary actions.",
6874
6873
  "Confirm the input has a persistent accessible name; widget-provided combobox, popup, and item relationships and keyboard behavior are preserved; and loading, empty, and error status text is perceivable to assistive technology.",
6875
6874
  "Inspect the CSS that actually applies to the generated DOM. Confirm the results panel and the element drawing the input frame have non-transparent surfaces, the input frame is distinguishable from its surrounding background in every supported theme, text meets 4.5:1 contrast, meaningful boundaries and focus indicators meet 3:1, and no state relies on color alone.",
6876
6875
  "Confirm the search experience reflows without horizontal page scrolling at 320 CSS pixels, keeps its panel on-screen, preserves visible focus, and respects reduced-motion preferences for any added animation.",
6877
6876
  "If the project imports an InstantSearch theme, confirm that the project sets the theme palette to the app colors in each theme that the app supports: --ais-primary-color-rgb to the app accent color, and --ais-background-color-rgb, --ais-text-color-rgb, and --ais-border-color-rgb to the app surface, text, and border colors. If the project keeps the theme defaults, set sufficient=false, because the search icon, focus ring, and active item then show the theme blue, and the panel shows the theme surface instead of the app surface. A match between the light and dark themes of the widget and the page is not enough. The theme colors .ais-Highlight-highlighted and .ais-Snippet-highlighted with a fixed blue that the palette does not change: if the results show either class and the project does not restyle it, set sufficient=false.",
6878
6877
  "Then confirm that the palette overrides (--ais-*-rgb) win over the theme: they must use a higher specificity than the theme, for example `:root:root`, and for a dark mode `:root:root.dark` or `:root:root[data-theme=dark]`, because the theme sets its own blue in `:root` and in `:root[data-theme=dark], .dark`. `:root:root` alone ties with `:root[data-theme=dark]`. If an override can lose to the theme, set sufficient=false, because the search icon and focus ring then show the theme blue instead of the app accent color.",
6879
- "Find how the app selects each theme it supports (a class or attribute on an ancestor, a prefers-color-scheme media query, or a theme that exists only in code). Confirm that the search input and results panel take their colors from the active app theme through that same switch. A search widget whose colors do not match the page theme, for example a light panel on a dark page, is a failure: set sufficient=false.",
6878
+ "Find how the app selects each theme it supports (a class or attribute on an ancestor, a prefers-color-scheme media query, or a theme that exists only in code). A theme is supported only when the app can select it at runtime: a mounted theme switch, or a stored or system preference that the app applies. A theme file or theme option that the app never selects, for example because the app forces one mode, does not count. Confirm that the search input and results panel take their colors from the active app theme through that same switch. A search widget whose colors do not match the page theme, for example a light panel on a dark page, is a failure: set sufficient=false.",
6880
6879
  "When the project has a package.json, confirm that the theme CSS of the search widget (for InstantSearch, a theme from instantsearch.css) is imported once from a legal global-CSS entry for that framework (Next.js Pages Router: pages/_app; Next.js App Router: root layout; otherwise the app global stylesheet or a component module when allowed). If it is installed but not imported, or imported from a Next.js component file, set sufficient=false.",
6881
6880
  "Confirm that the search component is reachable from and fits the corresponding content task at every supported breakpoint; require app-wide reachability only when the search scope is genuinely app-wide.",
6882
6881
  "For an InstantSearch Autocomplete, confirm that the item component (the React itemComponent, or the item template in indices[].templates) calls the onSelect that it receives when the user clicks the result, for example onClick={onSelect} on its root element. The widget goes to the getURL route only through onSelect: the click on its <li> only sends the Insights event. If the item ignores onSelect, set sufficient=false, because a click on a result then does nothing.",
@@ -7199,6 +7198,13 @@ function validationRunInstructions(plan, attempt) {
7199
7198
  "Do not use an autofix option during validation."
7200
7199
  ];
7201
7200
  }
7201
+ function previousFindingsInstructions(findings) {
7202
+ if (!findings) return [];
7203
+ return [
7204
+ `The previous validation pass reported these findings: ${findings}`,
7205
+ "Check those findings first. Keep the conclusions of that pass that the changes did not affect, for example which themes the app supports. Report a new finding only when it breaks the search (the search bar does not render, search returns no results, or a click on a result does not open it), fails an accessibility requirement, or comes from a change made after the previous pass. Do not set sufficient=false for any other new issue: name it briefly in the summary."
7206
+ ];
7207
+ }
7202
7208
  function retryTypeCheckInstructions(plan) {
7203
7209
  if (!plan.run) return [];
7204
7210
  return [
@@ -7642,6 +7648,7 @@ ${detail}` : ""}`
7642
7648
  );
7643
7649
  let extraInstructions = [];
7644
7650
  let buildCheckPlan;
7651
+ let previousFindings;
7645
7652
  const confirmedFrameworks = language.frameworks ?? [];
7646
7653
  const detectedFrameworks = scan.frameworks ?? [];
7647
7654
  const framework = confirmedFrameworks[0]?.name ?? "unknown";
@@ -7687,9 +7694,10 @@ ${detail}` : ""}`
7687
7694
  searchConfigFile = searchResult.searchConfigFile;
7688
7695
  }
7689
7696
  buildCheckPlan ??= await resolveBuildCheckPlan(ctx, repoRoot, input);
7690
- const validation = await runValidationUseCase(
7691
- validationRunInstructions(buildCheckPlan, attempt)
7692
- );
7697
+ const validation = await runValidationUseCase([
7698
+ ...validationRunInstructions(buildCheckPlan, attempt),
7699
+ ...previousFindingsInstructions(previousFindings)
7700
+ ]);
7693
7701
  summaries.push(formatSummary("validation", validation.summary));
7694
7702
  const finalAttempt = attempt === MAX_IMPLEMENT_VALIDATION_ATTEMPTS;
7695
7703
  let investigateUnrelated = false;
@@ -7740,6 +7748,7 @@ ${detail}` : ""}`
7740
7748
  `Unable to validate the implementation after ${MAX_IMPLEMENT_VALIDATION_ATTEMPTS} attempts (details in wizard.log): ${briefSummary(validation.summary)}`
7741
7749
  );
7742
7750
  }
7751
+ previousFindings = validation.sufficient ? void 0 : validation.additionalInstructions ?? validation.summary;
7743
7752
  extraInstructions = validation.sufficient ? [] : validationRetryInstructions(validation);
7744
7753
  if (validation.unrelatedFailure && investigateUnrelated) {
7745
7754
  extraInstructions.push(
@@ -10165,7 +10174,7 @@ async function resetProjectState() {
10165
10174
  // package.json with { type: 'json' }
10166
10175
  var package_default2 = {
10167
10176
  name: "@algolia/wizard",
10168
- version: "0.103.0-rc.217.762",
10177
+ version: "0.103.0-rc.217.763",
10169
10178
  description: "Magically implement Algolia functionality in your codebase",
10170
10179
  type: "module",
10171
10180
  engines: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@algolia/wizard",
3
- "version": "0.103.0-rc.217.762",
3
+ "version": "0.103.0-rc.217.763",
4
4
  "description": "Magically implement Algolia functionality in your codebase",
5
5
  "type": "module",
6
6
  "engines": {