@molecule/api-ai-tools 1.9.4 → 1.9.6

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.
@@ -1 +1 @@
1
- {"version":3,"file":"suite-overlap.d.ts","sourceRoot":"","sources":["../src/suite-overlap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAQH;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAoB1D;AAKD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEzD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAc1F;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,SAAS,MAAM,EAAE,EAC5B,QAAQ,GAAE,SAAS,MAAM,EAAO,EAChC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,EACtB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,GAClB,MAAM,CAqCR;AA8ID;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC/B,+FAA+F;IAC/F,SAAS,EAAE,OAAO,CAAA;IAClB,oFAAoF;IACpF,MAAM,EAAE,MAAM,CAAA;IACd;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,gBAAgB,EACzD,SAAS,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,E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D,SAAS,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,EAC7B,QAAQ,EAAE,SAAS,CAAC,EAAE,GACrB,CAAC,GAAG,IAAI,CAMV;AAqDD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAQvD"}
@@ -262,45 +262,18 @@ function playwrightLocations(locations, command, cwd) {
262
262
  /** A spec-file argument Playwright accepts as its positional filter — never a flag. */
263
263
  const SPEC_FILE_ARGUMENT = /^(?!-)[^\s]*\.(?:spec|test)\.[cm]?[jt]sx?(?::\d+(?::\d+)?)?$/;
264
264
  /**
265
- * A `file:line` location's own file part: Playwright prints failures as
266
- * `url-navigation.spec.ts:13:7`, and the file is the argument that supersedes.
265
+ * The statement with every bare spec-file argument taken out once the re-run names failure locations.
267
266
  *
268
- * @param location - A location (`file.spec.ts:13`, `file.spec.ts:13:7`) or a spec-file argument.
269
- * @returns The path without its line numbers.
270
- */
271
- function locationFile(location) {
272
- return location.replace(/:\d+(?::\d+)?$/, '');
273
- }
274
- /**
275
- * Whether two spellings name the same spec file: equal, or one the absolute (or longer) form of
276
- * the other. The command and the reporter routinely spell the same file differently — the model
277
- * names `url-navigation.spec.ts`, the summary prints `specs/e2e/url-navigation.spec.ts:13`, and a
278
- * hold hands back `/workspace/fixtures/realworld/specs/e2e/url-navigation.spec.ts:13`.
279
- *
280
- * @param argument - The spec-file argument as the command wrote it.
281
- * @param location - The failing location.
282
- * @returns True when the location is inside that file.
283
- */
284
- function sameSpecFile(argument, location) {
285
- const a = locationFile(argument)
286
- .replace(/^['"]|['"]$/g, '')
287
- .replace(/^\.\//, '');
288
- const l = locationFile(location)
289
- .replace(/^['"]|['"]$/g, '')
290
- .replace(/^\.\//, '');
291
- return a === l || a.endsWith(`/${l}`) || l.endsWith(`/${a}`);
292
- }
293
- /**
294
- * The statement with every spec-file argument its OWN failure locations already name taken out.
295
- *
296
- * A `file:line` inside a named file supersedes the whole file, so keeping both runs the file plus
297
- * the locations — the whole suite again, with the failures duplicated inside it. xr-molecule-flash-m118
298
- * (+45:24) composed just that: the model's `npx playwright test … url-navigation.spec.ts` was
299
- * narrowed to the 14 `file:line`s AND the bare file, "~297s" for a file and fourteen duplicates.
267
+ * The re-run is "just these": Playwright matches each positional argument against every collected
268
+ * file's path, so a bare file left beside the `file:line`s re-admits ALL of that file's tests.
269
+ * xr-molecule-flash-m118 (+45:24) kept the one file its 14 failures were in ("~297s" for a file and
270
+ * fourteen duplicates); xr-molecule-flash-m134 (+20:0x) kept all four files of a run whose 8
271
+ * failures sat in two of them — 32 tests, ~3 min, instead of the 8 failures' ~30 s. A file with no
272
+ * failure in it has nothing to re-run, so it goes too.
300
273
  *
301
274
  * @param statement - The Playwright statement, starting at its own `playwright test`.
302
275
  * @param locations - The failing `file:line`s the re-run names.
303
- * @returns The statement without those superseded file arguments.
276
+ * @returns The statement without its bare spec-file arguments.
304
277
  */
305
278
  function dropSupersededSpecFiles(statement, locations) {
306
279
  if (locations.length === 0)
@@ -312,9 +285,7 @@ function dropSupersededSpecFiles(statement, locations) {
312
285
  const kept = statement
313
286
  .slice(head.length)
314
287
  .replace(/(^|\s+)([^\s]+)(?=\s|$)/g, (whole, _space, token) => {
315
- if (!SPEC_FILE_ARGUMENT.test(token))
316
- return whole;
317
- return locations.every((location) => sameSpecFile(token, location)) ? '' : whole;
288
+ return SPEC_FILE_ARGUMENT.test(token) ? '' : whole;
318
289
  });
319
290
  return `${head}${kept}`;
320
291
  }
@@ -772,7 +772,7 @@ export function failureTraceNote(items, target, earlierFailures = []) {
772
772
  (transport.error === 'net::ERR_CONTENT_DECODING_FAILED'
773
773
  ? 'A body whose gzip `content-encoding` no longer matches its bytes does this; a ' +
774
774
  '`vite preview` over a build must be started with ' +
775
- '`MOL_E2E_PREVIEW_PLUGIN=0 npx vite preview --port 4173 --strictPort`. '
775
+ '`MOL_E2E_PREVIEW_PLUGIN=0 npx vite preview --host 127.0.0.1 --port 4173 --strictPort`. '
776
776
  : '') +
777
777
  'Fix the server before the app.\n\n';
778
778
  return (transportLead +
package/dist/utilities.js CHANGED
@@ -2626,7 +2626,7 @@ export function failureCausesNote(log, excluded = [], run, pageErrors = []) {
2626
2626
  (networkError === 'net::ERR_CONTENT_DECODING_FAILED'
2627
2627
  ? ': a body whose gzip `content-encoding` no longer matches its bytes does this, and a ' +
2628
2628
  '`vite preview` over a build must be started with ' +
2629
- '`MOL_E2E_PREVIEW_PLUGIN=0 npx vite preview --port 4173 --strictPort`'
2629
+ '`MOL_E2E_PREVIEW_PLUGIN=0 npx vite preview --host 127.0.0.1 --port 4173 --strictPort`'
2630
2630
  : ' (what the run hit, and why it refused the connection)') +
2631
2631
  (rerun ? `. Then send exactly this: \`${rerun}\`` : '') +
2632
2632
  (locations.length > 0 ? `. Failing tests: ${locations.join(', ')}.` : ''));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/api-ai-tools",
3
- "version": "1.9.4",
3
+ "version": "1.9.6",
4
4
  "description": "Shared AI agent tools with backend abstraction for sandbox and local execution",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",